diff --git a/week_01/test1/404.html b/week_01/test1/404.html index 5c4ae10..615aa08 100644 --- a/week_01/test1/404.html +++ b/week_01/test1/404.html @@ -6,10 +6,10 @@ Test - Slidev - + - + diff --git a/week_01/test1/assets/index-BhiEEYhA.js b/week_01/test1/assets/index-BhiEEYhA.js new file mode 100644 index 0000000..e72cbea --- /dev/null +++ b/week_01/test1/assets/index-BhiEEYhA.js @@ -0,0 +1,57 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/md-B2t6eFbF.js","assets/modules/vue-Bx6xSt6e.js","assets/slidev/context-CPMMc1kN.js","assets/monaco/bundled-types-CutNYhe2.js","assets/modules/file-saver-igGfcqei.js","assets/monaco/bundled-types-GI7L-5Qk.css","assets/modules/shiki-BeZKuXrB.js","assets/modules/shiki-BPvBenZD.css","assets/md-DPa-WfyF.css","assets/md-BV_QmVfM.js","assets/side-title-BzlhspPS.js","assets/layoutHelper-BN7rjZLy.js","assets/side-title-HArKzqYw.css","assets/md-Dx23vpFk.js","assets/md-raZpUvIj.css","assets/md-DBrHLyLI.js","assets/md-DD1qT321.css","assets/slidev/entry-CfOhylDU.js","assets/modules/unplugin-icons-B74mOkCF.js","assets/entry-CjNiybPK.css","assets/slidev/overview-DLIALU7m.js","assets/slidev/DrawingPreview.vue_vue_type_script_setup_true_lang-B5PB67Gu.js","assets/DrawingPreview-CH_UGS0D.css","assets/slidev/IconButton.vue_vue_type_script_setup_true_lang-C6q09ciw.js","assets/slidev/ClicksSlider-BzROmP15.js","assets/ClicksSlider-4jJhYgWZ.css","assets/slidev/notes-h7c9XeN0.js","assets/slidev/presenter-Dpmh3Akx.js","assets/slidev/useWakeLock-C_tVHjUn.js","assets/useWakeLock-DNhWM6s4.css","assets/slidev/DrawingControls.vue_vue_type_style_index_0_lang-M0vwdfOx.js","assets/DrawingControls-C5T1oZL5.css","assets/presenter-CIMwgrwJ.css","assets/slidev/play-Bc53t-gn.js","assets/play-CoA43pdi.css","assets/slidev/404-Bg3XtBLk.js","assets/404-BxKx_5aB.css"])))=>i.map(i=>d[i]); +import{n as Zn,H as Us,I as ln,J as Xn,t as O,G as Te,E as X,K as Ws,L as Qs,M as qs,N as es,O as ce,P as Ks,Q as Js,z as k,R as Et,S as cn,T as Ke,U as Gs,o as ht,b as Qt,d as Je,F as xs,g as Ys,e as ts,V as un,W as Zs,X as ns,Y as Xs,r as er,c as tr,Z as nr,_ as sr,$ as rr,a0 as or,a1 as ir,B as te,C as ar,a2 as lr,D as fn,a3 as cr,a4 as ur,a5 as fr,a6 as hr,a7 as dr,v as Be,a8 as ss,a9 as pr,aa as gr,u as mr}from"./modules/vue-Bx6xSt6e.js";import{c as z,a as qt,s as vr,_ as Z,b as Nt,d as yr,e as wr}from"./monaco/bundled-types-CutNYhe2.js";import{T as br}from"./modules/shiki-BeZKuXrB.js";import"./modules/file-saver-igGfcqei.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function t(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=t(r);fetch(r.href,o)}})();function Kt(n,e={},t){for(const s in n){const r=n[s],o=t?`${t}:${s}`:s;typeof r=="object"&&r!==null?Kt(r,e,o):typeof r=="function"&&(e[o]=r)}return e}const kr={run:n=>n()},_r=()=>kr,rs=typeof console.createTask<"u"?console.createTask:_r;function Sr(n,e){const t=e.shift(),s=rs(t);return n.reduce((r,o)=>r.then(()=>s.run(()=>o(...e))),Promise.resolve())}function Mr(n,e){const t=e.shift(),s=rs(t);return Promise.all(n.map(r=>s.run(()=>r(...e))))}function Rt(n,e){for(const t of[...n])t(e)}class Er{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(e,t,s={}){if(!e||typeof t!="function")return()=>{};const r=e;let o;for(;this._deprecatedHooks[e];)o=this._deprecatedHooks[e],e=o.to;if(o&&!s.allowDeprecated){let i=o.message;i||(i=`${r} hook has been deprecated`+(o.to?`, please use ${o.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(i)||(console.warn(i),this._deprecatedMessages.add(i))}if(!t.name)try{Object.defineProperty(t,"name",{get:()=>"_"+e.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(t),()=>{t&&(this.removeHook(e,t),t=void 0)}}hookOnce(e,t){let s,r=(...o)=>(typeof s=="function"&&s(),s=void 0,r=void 0,t(...o));return s=this.hook(e,r),s}removeHook(e,t){if(this._hooks[e]){const s=this._hooks[e].indexOf(t);s!==-1&&this._hooks[e].splice(s,1),this._hooks[e].length===0&&delete this._hooks[e]}}deprecateHook(e,t){this._deprecatedHooks[e]=typeof t=="string"?{to:t}:t;const s=this._hooks[e]||[];delete this._hooks[e];for(const r of s)this.hook(e,r)}deprecateHooks(e){Object.assign(this._deprecatedHooks,e);for(const t in e)this.deprecateHook(t,e[t])}addHooks(e){const t=Kt(e),s=Object.keys(t).map(r=>this.hook(r,t[r]));return()=>{for(const r of s.splice(0,s.length))r()}}removeHooks(e){const t=Kt(e);for(const s in t)this.removeHook(s,t[s])}removeAllHooks(){for(const e in this._hooks)delete this._hooks[e]}callHook(e,...t){return t.unshift(e),this.callHookWith(Sr,e,...t)}callHookParallel(e,...t){return t.unshift(e),this.callHookWith(Mr,e,...t)}callHookWith(e,t,...s){const r=this._before||this._after?{name:t,args:s,context:{}}:void 0;this._before&&Rt(this._before,r);const o=e(t in this._hooks?[...this._hooks[t]]:[],s);return o instanceof Promise?o.finally(()=>{this._after&&r&&Rt(this._after,r)}):(this._after&&r&&Rt(this._after,r),o)}beforeEach(e){return this._before=this._before||[],this._before.push(e),()=>{if(this._before!==void 0){const t=this._before.indexOf(e);t!==-1&&this._before.splice(t,1)}}}afterEach(e){return this._after=this._after||[],this._after.push(e),()=>{if(this._after!==void 0){const t=this._after.indexOf(e);t!==-1&&this._after.splice(t,1)}}}}function Pr(){return new Er}const Or=new Set(["title","titleTemplate","script","style","noscript"]),rt=new Set(["base","meta","link","style","script","noscript"]),Cr=new Set(["title","titleTemplate","templateParams","base","htmlAttrs","bodyAttrs","meta","link","style","script","noscript"]),Ar=new Set(["base","title","titleTemplate","bodyAttrs","htmlAttrs","templateParams"]),os=new Set(["tagPosition","tagPriority","tagDuplicateStrategy","children","innerHTML","textContent","processTemplateParams"]),Tr=typeof window<"u";function dt(n){let e=9;for(let t=0;t>>9)+65536).toString(16).substring(1,8).toLowerCase()}function Cn(n){if(n._h)return n._h;if(n._d)return dt(n._d);let e=`${n.tag}:${n.textContent||n.innerHTML||""}:`;for(const t in n.props)e+=`${t}:${n.props[t]},`;return dt(e)}const Lr=["name","property","http-equiv"];function is(n){const{props:e,tag:t}=n;if(Ar.has(t))return t;if(t==="link"&&e.rel==="canonical")return"canonical";if(e.charset)return"charset";if(e.id)return`${t}:id:${e.id}`;for(const s of Lr)if(e[s]!==void 0)return`${t}:${s}:${e[s]}`;return!1}function An(n,e){return n==null?e||null:typeof n=="function"?n(e):n}function $r(n,e){return n instanceof Promise?n.then(e):e(n)}function Jt(n,e,t,s){const r=s||ls(typeof e=="object"&&typeof e!="function"&&!(e instanceof Promise)?{...e}:{[n==="script"||n==="noscript"||n==="style"?"innerHTML":"textContent"]:e},n==="templateParams"||n==="titleTemplate");if(r instanceof Promise)return r.then(i=>Jt(n,e,t,i));const o={tag:n,props:r};for(const i of os){const a=o.props[i]!==void 0?o.props[i]:t[i];a!==void 0&&((!(i==="innerHTML"||i==="textContent"||i==="children")||Or.has(o.tag))&&(o[i==="children"?"innerHTML":i]=a),delete o.props[i])}return o.props.body&&(o.tagPosition="bodyClose",delete o.props.body),o.tag==="script"&&typeof o.innerHTML=="object"&&(o.innerHTML=JSON.stringify(o.innerHTML),o.props.type=o.props.type||"application/json"),Array.isArray(o.props.content)?o.props.content.map(i=>({...o,props:{...o.props,content:i}})):o}function Nr(n,e){var s;const t=n==="class"?" ":";";return typeof e=="object"&&!Array.isArray(e)&&(e=Object.entries(e).filter(([,r])=>r).map(([r,o])=>n==="style"?`${r}:${o}`:r)),(s=String(Array.isArray(e)?e.join(t):e))==null?void 0:s.split(t).filter(r=>!!r.trim()).join(t)}function as(n,e,t,s){for(let r=s;r(n[o]=i,as(n,e,t,r)));if(!e&&!os.has(o)){const i=String(n[o]),a=o.startsWith("data-");i==="true"||i===""?n[o]=a?"true":!0:n[o]||(a&&i==="false"?n[o]="false":delete n[o])}}}function ls(n,e=!1){const t=as(n,e,Object.keys(n),0);return t instanceof Promise?t.then(()=>n):n}const Rr=10;function cs(n,e,t){for(let s=t;s(e[s]=o,cs(n,e,s)));Array.isArray(r)?n.push(...r):n.push(r)}}function Ir(n){const e=[],t=n.resolvedInput;for(const r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;const o=t[r];if(!(o===void 0||!Cr.has(r))){if(Array.isArray(o)){for(const i of o)e.push(Jt(r,i,n));continue}e.push(Jt(r,o,n))}}if(e.length===0)return[];const s=[];return $r(cs(s,e,0),()=>s.map((r,o)=>(r._e=n._i,n.mode&&(r._m=n.mode),r._p=(n._i<{if(i===ie||!r.includes(i))return i;const a=Hr(e,i.slice(1));return a!==void 0?a:i}).trim(),o&&(n.endsWith(ie)&&(n=n.slice(0,-ie.length)),n.startsWith(ie)&&(n=n.slice(ie.length)),n=n.replace(Fr,t).trim()),n}async function jr(n,e={}){var u;const t=e.document||n.resolvedOptions.document;if(!t||!n.dirty)return;const s={shouldRender:!0,tags:[]};if(await n.hooks.callHook("dom:beforeRender",s),!s.shouldRender)return;const r=(await n.resolveTags()).map(f=>({tag:f,id:rt.has(f.tag)?Cn(f):f.tag,shouldRender:!0}));let o=n._dom;if(!o){o={elMap:{htmlAttrs:t.documentElement,bodyAttrs:t.body}};const f=new Set;for(const h of["body","head"]){const d=(u=t[h])==null?void 0:u.children;for(const p of d){const g=p.tagName.toLowerCase();if(!rt.has(g))continue;const v={tag:g,props:await ls(p.getAttributeNames().reduce((b,S)=>({...b,[S]:p.getAttribute(S)}),{})),innerHTML:p.innerHTML},m=is(v);let y=m,w=1;for(;y&&f.has(y);)y=`${m}:${w++}`;y&&(v._d=y,f.add(y)),o.elMap[p.getAttribute("data-hid")||Cn(v)]=p}}}o.pendingSideEffects={...o.sideEffects},o.sideEffects={};function i(f,h,d){const p=`${f}:${h}`;o.sideEffects[p]=d,delete o.pendingSideEffects[p]}function a({id:f,$el:h,tag:d}){const p=d.tag.endsWith("Attrs");if(o.elMap[f]=h,p||(d.textContent&&d.textContent!==h.textContent&&(h.textContent=d.textContent),d.innerHTML&&d.innerHTML!==h.innerHTML&&(h.innerHTML=d.innerHTML),i(f,"el",()=>{var g;(g=o.elMap[f])==null||g.remove(),delete o.elMap[f]})),d._eventHandlers)for(const g in d._eventHandlers)Object.prototype.hasOwnProperty.call(d._eventHandlers,g)&&h.getAttribute(`data-${g}`)!==""&&((d.tag==="bodyAttrs"?t.defaultView:h).addEventListener(g.substring(2),d._eventHandlers[g].bind(h)),h.setAttribute(`data-${g}`,""));for(const g in d.props){if(!Object.prototype.hasOwnProperty.call(d.props,g))continue;const v=d.props[g],m=`attr:${g}`;if(g==="class"){if(!v)continue;for(const y of v.split(" "))p&&i(f,`${m}:${y}`,()=>h.classList.remove(y)),!h.classList.contains(y)&&h.classList.add(y)}else if(g==="style"){if(!v)continue;for(const y of v.split(";")){const w=y.indexOf(":"),b=y.substring(0,w).trim(),S=y.substring(w+1).trim();i(f,`${m}:${b}`,()=>{h.style.removeProperty(b)}),h.style.setProperty(b,S)}}else h.getAttribute(g)!==v&&h.setAttribute(g,v===!0?"":String(v)),p&&i(f,m,()=>h.removeAttribute(g))}}const l=[],c={bodyClose:void 0,bodyOpen:void 0,head:void 0};for(const f of r){const{tag:h,shouldRender:d,id:p}=f;if(d){if(h.tag==="title"){t.title=h.textContent;continue}f.$el=f.$el||o.elMap[p],f.$el?a(f):rt.has(h.tag)&&l.push(f)}}for(const f of l){const h=f.tag.tagPosition||"head";f.$el=t.createElement(f.tag.tag),a(f),c[h]=c[h]||t.createDocumentFragment(),c[h].appendChild(f.$el)}for(const f of r)await n.hooks.callHook("dom:renderTag",f,t,i);c.head&&t.head.appendChild(c.head),c.bodyOpen&&t.body.insertBefore(c.bodyOpen,t.body.firstChild),c.bodyClose&&t.body.appendChild(c.bodyClose);for(const f in o.pendingSideEffects)o.pendingSideEffects[f]();n._dom=o,n.dirty=!1,await n.hooks.callHook("dom:rendered",{renders:r})}function zr(n,e={}){const t=e.delayFn||(s=>setTimeout(s,10));return n._domUpdatePromise=n._domUpdatePromise||new Promise(s=>t(()=>jr(n,e).then(()=>{delete n._domUpdatePromise,s()})))}function Br(n){return e=>{var s,r;const t=((r=(s=e.resolvedOptions.document)==null?void 0:s.head.querySelector('script[id="unhead:payload"]'))==null?void 0:r.innerHTML)||!1;return t&&e.push(JSON.parse(t)),{mode:"client",hooks:{"entries:updated":o=>{zr(o,n)}}}}}const Vr=new Set(["templateParams","htmlAttrs","bodyAttrs"]),Ur={hooks:{"tag:normalise":({tag:n})=>{n.props.hid&&(n.key=n.props.hid,delete n.props.hid),n.props.vmid&&(n.key=n.props.vmid,delete n.props.vmid),n.props.key&&(n.key=n.props.key,delete n.props.key);const t=is(n)||(n.key?`${n.tag}:${n.key}`:!1);t&&(n._d=t)},"tags:resolve":n=>{const e=Object.create(null);for(const s of n.tags){const r=(s.key?`${s.tag}:${s.key}`:s._d)||s._p,o=e[r];if(o){let a=s==null?void 0:s.tagDuplicateStrategy;if(!a&&Vr.has(s.tag)&&(a="merge"),a==="merge"){const l=o.props;l.style&&s.props.style&&(l.style[l.style.length-1]!==";"&&(l.style+=";"),s.props.style=`${l.style} ${s.props.style}`),l.class&&s.props.class?s.props.class=`${l.class} ${s.props.class}`:l.class&&(s.props.class=l.class),e[r].props={...l,...s.props};continue}else if(s._e===o._e){o._duped=o._duped||[],s._d=`${o._d}:${o._duped.length+1}`,o._duped.push(s);continue}else if(pt(s)>pt(o))continue}if(!(s.innerHTML||s.textContent||Object.keys(s.props).length!==0)&&rt.has(s.tag)){delete e[r];continue}e[r]=s}const t=[];for(const s in e){const r=e[s],o=r._duped;t.push(r),o&&(delete r._duped,t.push(...o))}n.tags=t,n.tags=n.tags.filter(s=>!(s.tag==="meta"&&(s.props.name||s.props.property)&&!s.props.content))}}},Wr={mode:"server",hooks:{"tags:resolve":n=>{const e={};let t=!1;for(const s of n.tags)s._m!=="server"||s.tag!=="titleTemplate"&&s.tag!=="templateParams"&&s.tag!=="title"||(e[s.tag]=s.tag==="title"||s.tag==="titleTemplate"?s.textContent:s.props,t=!0);t&&n.tags.push({tag:"script",innerHTML:JSON.stringify(e),props:{id:"unhead:payload",type:"application/json"}})}}},Qr=new Set(["script","link","bodyAttrs"]),qr=n=>({hooks:{"tags:resolve":e=>{for(const t of e.tags){if(!Qr.has(t.tag))continue;const s=t.props;for(const r in s){if(r[0]!=="o"||r[1]!=="n"||!Object.prototype.hasOwnProperty.call(s,r))continue;const o=s[r];typeof o=="function"&&(n.ssr&&$n.has(r)?s[r]=`this.dataset.${r}fired = true`:delete s[r],t._eventHandlers=t._eventHandlers||{},t._eventHandlers[r]=o)}n.ssr&&t._eventHandlers&&(t.props.src||t.props.href)&&(t.key=t.key||dt(t.props.src||t.props.href))}},"dom:renderTag":({$el:e,tag:t})=>{var r,o;const s=e==null?void 0:e.dataset;if(s)for(const i in s){if(!i.endsWith("fired"))continue;const a=i.slice(0,-5);$n.has(a)&&((o=(r=t._eventHandlers)==null?void 0:r[a])==null||o.call(e,new Event(a.substring(2))))}}}}),Kr=new Set(["link","style","script","noscript"]),Jr={hooks:{"tag:normalise":({tag:n})=>{n.key&&Kr.has(n.tag)&&(n.props["data-hid"]=n._h=dt(n.key))}}},Gr={hooks:{"tags:resolve":n=>{var e;for(const t of n.tags)if(typeof t.tagPriority=="string")for(const{prefix:s,offset:r}of Dr){if(!t.tagPriority.startsWith(s))continue;const o=t.tagPriority.substring(s.length),i=(e=n.tags.find(a=>a._d===o))==null?void 0:e._p;if(i!==void 0){t._p=i+r;break}}n.tags.sort((t,s)=>{const r=pt(t),o=pt(s);return ro?1:t._p-s._p})}}},xr={meta:"content",link:"href",htmlAttrs:"lang"},Yr=["innerHTML","textContent"],Zr=n=>({hooks:{"tags:resolve":e=>{var i;const{tags:t}=e;let s;for(let a=0;aa.tag==="title"))==null?void 0:i.textContent)||"",r,o);for(const a of t){if(a.processTemplateParams===!1)continue;const l=xr[a.tag];if(l&&typeof a.props[l]=="string")a.props[l]=It(a.props[l],r,o);else if(a.processTemplateParams||a.tag==="titleTemplate"||a.tag==="title")for(const c of Yr)typeof a[c]=="string"&&(a[c]=It(a[c],r,o))}n._templateParams=r,n._separator=o}}}),Xr={hooks:{"tags:resolve":n=>{const{tags:e}=n;let t,s;for(let r=0;r{for(const e of n.tags)typeof e.innerHTML=="string"&&(e.innerHTML&&(e.props.type==="application/ld+json"||e.props.type==="application/json")?e.innerHTML=e.innerHTML.replace(/{a.dirty=!0,e.callHook("entries:updated",a)};let r=0,o=[];const i=[],a={plugins:i,dirty:!1,resolvedOptions:n,hooks:e,headEntries(){return o},use(l){const c=typeof l=="function"?l(a):l;(!c.key||!i.some(u=>u.key===c.key))&&(i.push(c),Nn(c.mode,t)&&e.addHooks(c.hooks||{}))},push(l,c){c==null||delete c.head;const u={_i:r++,input:l,...c};return Nn(u.mode,t)&&(o.push(u),s()),{dispose(){o=o.filter(f=>f._i!==u._i),e.callHook("entries:updated",a),s()},patch(f){for(const h of o)h._i===u._i&&(h.input=u.input=f);s()}}},async resolveTags(){const l={tags:[],entries:[...o]};await e.callHook("entries:resolve",l);for(const c of l.entries){const u=c.resolvedInput||c.input;if(c.resolvedInput=await(c.transform?c.transform(u):u),c.resolvedInput)for(const f of await Ir(c)){const h={tag:f,entry:c,resolvedOptions:a.resolvedOptions};await e.callHook("tag:normalise",h),l.tags.push(h.tag)}}return await e.callHook("tags:beforeResolve",l),await e.callHook("tags:resolve",l),await e.callHook("tags:afterResolve",l),l.tags},ssr:t};return[Ur,Wr,qr,Jr,Gr,Zr,Xr,eo,...(n==null?void 0:n.plugins)||[]].forEach(l=>a.use(l)),a.hooks.callHook("init",a),a}function so(){return us}const ro=Us[0]==="3";function oo(n){return typeof n=="function"?n():ln(n)}function gt(n){if(n instanceof Promise)return n;const e=oo(n);if(!n||!e)return e;if(Array.isArray(e))return e.map(t=>gt(t));if(typeof e=="object"){const t={};for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(s==="titleTemplate"||s[0]==="o"&&s[1]==="n"){t[s]=ln(e[s]);continue}t[s]=gt(e[s])}return t}return e}const io={hooks:{"entries:resolve":n=>{for(const e of n.entries)e.resolvedInput=gt(e.input)}}},fs="usehead";function ao(n){return{install(t){ro&&(t.config.globalProperties.$unhead=n,t.config.globalProperties.$head=n,t.provide(fs,n))}}.install}function lo(n={}){n.domDelayFn=n.domDelayFn||(t=>Zn(()=>setTimeout(()=>t(),0)));const e=to(n);return e.use(io),e.install=ao(e),e}const Rn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},In="__unhead_injection_handler__";function co(){if(In in Rn)return Rn[In]();const n=Xn(fs);return n||so()}function uo(n,e={}){const t=e.head||co();if(t)return t.ssr?t.push(n,e):fo(t,n,e)}function fo(n,e,t={}){const s=O(!1),r=O({});Te(()=>{r.value=s.value?{}:gt(e)});const o=n.push(r.value,t);return X(r,a=>{o.patch(a)}),es()&&(Ws(()=>{o.dispose()}),Qs(()=>{s.value=!0}),qs(()=>{s.value=!1})),o}function hs(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(2,10)}function G(n,e,t){Object.defineProperty(n,e,{value:t,writable:!0,enumerable:!1})}const ke=ce({page:0,clicks:0});let ho=[],po=[];G(ke,"$syncUp",!0);G(ke,"$syncDown",!0);G(ke,"$paused",!1);G(ke,"$onSet",n=>ho.push(n));G(ke,"$onPatch",n=>po.push(n));hs();G(ke,"$patch",async()=>!1);function ds(n,e,t=!1){const s=[];let r=!1,o=!1,i,a;const l=ce(e);function c(d){s.push(d)}function u(d,p){l[d]!==p&&(clearTimeout(i),r=!0,l[d]=p,i=setTimeout(()=>r=!1,0))}function f(d){r||(clearTimeout(a),o=!0,Object.entries(d).forEach(([p,g])=>{l[p]=g}),a=setTimeout(()=>o=!1,0))}function h(d){let p;t?t&&window.addEventListener("storage",v=>{v&&v.key===d&&v.newValue&&f(JSON.parse(v.newValue))}):(p=new BroadcastChannel(d),p.addEventListener("message",v=>f(v.data)));function g(){!t&&p&&!o?p.postMessage(Ks(l)):t&&!o&&window.localStorage.setItem(d,JSON.stringify(l)),r||s.forEach(v=>v(l))}if(X(l,g,{deep:!0,flush:"sync"}),t){const v=window.localStorage.getItem(d);v&&f(JSON.parse(v))}}return{init:h,onPatch:c,patch:u,state:l}}const{init:go,onPatch:mo,patch:fe,state:Ha}=ds(ke,{page:1,clicks:0,clicksTotal:0,viewerPage:1,viewerClicks:0,viewerClicksTotal:0}),ae=ce({});let vo=[],yo=[];G(ae,"$syncUp",!0);G(ae,"$syncDown",!0);G(ae,"$paused",!1);G(ae,"$onSet",n=>vo.push(n));G(ae,"$onPatch",n=>yo.push(n));hs();G(ae,"$patch",async()=>!1);const{init:wo,onPatch:Fa,patch:ja,state:za}=ds(ae,ae,!1),Pt="$$slidev-clicks-context",hn="$$slidev-page",ps="$$slidev-slide-element",bo="$$slidev-slide-scale",ko="$$slidev-context",Ba="$$slidev-route",dn="$$slidev-render-context",_o="$$slidev-fontmatter",So="$$slidev-slide-zoom",ot="slidev-vclick-target",De="slidev-vclick-hidden",He="slidev-vclick-fade",Dt="slidev-vclick-hidden-explicitly",Ht="slidev-vclick-current",Ft="slidev-vclick-prior",it=999999,Mo=["localhost","127.0.0.1"],Eo=["clicks","clicksStart","disabled","hide","hideInToc","layout","level","preload","routeAlias","src","title","transition","zoom","dragPos"],Va=[...Eo,"theme","titleTemplate","info","author","keywords","presenter","download","exportFilename","export","highlighter","lineNumbers","monaco","monacoTypesSource","monacoTypesAdditionalPackages","monacoRunAdditionalDeps","remoteAssets","selectable","record","colorSchema","routerMode","aspectRatio","canvasWidth","themeConfig","favicon","plantUmlServer","fonts","defaults","drawings","htmlAttrs","mdc","contextMenu","wakeLock"],pn=O(!1),gn=Symbol.for("yaml.alias"),Po=Symbol.for("yaml.document"),we=Symbol.for("yaml.map"),gs=Symbol.for("yaml.pair"),mn=Symbol.for("yaml.scalar"),Ge=Symbol.for("yaml.seq"),re=Symbol.for("yaml.node.type"),$e=n=>!!n&&typeof n=="object"&&n[re]===gn,Ot=n=>!!n&&typeof n=="object"&&n[re]===Po,ms=n=>!!n&&typeof n=="object"&&n[re]===we,F=n=>!!n&&typeof n=="object"&&n[re]===gs,I=n=>!!n&&typeof n=="object"&&n[re]===mn,vn=n=>!!n&&typeof n=="object"&&n[re]===Ge;function Q(n){if(n&&typeof n=="object")switch(n[re]){case we:case Ge:return!0}return!1}function B(n){if(n&&typeof n=="object")switch(n[re]){case gn:case we:case mn:case Ge:return!0}return!1}const Oo=n=>(I(n)||Q(n))&&!!n.anchor,me=Symbol("break visit"),Co=Symbol("skip children"),Ve=Symbol("remove node");function Qe(n,e){const t=Ao(e);Ot(n)?Ee(null,n.contents,t,Object.freeze([n]))===Ve&&(n.contents=null):Ee(null,n,t,Object.freeze([]))}Qe.BREAK=me;Qe.SKIP=Co;Qe.REMOVE=Ve;function Ee(n,e,t,s){const r=To(n,e,t,s);if(B(r)||F(r))return Lo(n,s,r),Ee(n,r,t,s);if(typeof r!="symbol"){if(Q(e)){s=Object.freeze(s.concat(e));for(let o=0;oee(s,String(r),t));if(n&&typeof n.toJSON=="function"){if(!t||!Oo(n))return n.toJSON(e,t);const s={aliasCount:0,count:1,res:void 0};t.anchors.set(n,s),t.onCreate=o=>{s.res=o,delete t.onCreate};const r=n.toJSON(e,t);return t.onCreate&&t.onCreate(r),r}return typeof n=="bigint"&&!(t!=null&&t.keep)?Number(n):n}class yn{constructor(e){Object.defineProperty(this,re,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:s,onAnchor:r,reviver:o}={}){if(!Ot(e))throw new TypeError("A document argument is required");const i={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},a=ee(this,"",i);if(typeof r=="function")for(const{count:l,res:c}of i.anchors.values())r(c,l);return typeof o=="function"?ze(o,{"":a},"",a):a}}class $o extends yn{constructor(e){super(gn),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return Qe(e,{Node:(s,r)=>{if(r===this)return Qe.BREAK;r.anchor===this.source&&(t=r)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:s,doc:r,maxAliasCount:o}=t,i=this.resolve(r);if(!i){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=s.get(i);if(a||(ee(i,null,t),a=s.get(i)),!a||a.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(o>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=at(r,i,s)),a.count*a.aliasCount>o)){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,t,s){const r=`*${this.source}`;if(e){if(vs(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(e.implicitKey)return`${r} `}return r}}function at(n,e,t){if($e(e)){const s=e.resolve(n),r=t&&s&&t.get(s);return r?r.count*r.aliasCount:0}else if(Q(e)){let s=0;for(const r of e.items){const o=at(n,r,t);o>s&&(s=o)}return s}else if(F(e)){const s=at(n,e.key,t),r=at(n,e.value,t);return Math.max(s,r)}return 1}const ys=n=>!n||typeof n!="function"&&typeof n!="object";class R extends yn{constructor(e){super(mn),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:ee(this.value,e,t)}toString(){return String(this.value)}}R.BLOCK_FOLDED="BLOCK_FOLDED";R.BLOCK_LITERAL="BLOCK_LITERAL";R.PLAIN="PLAIN";R.QUOTE_DOUBLE="QUOTE_DOUBLE";R.QUOTE_SINGLE="QUOTE_SINGLE";function No(n,e,t){return t.find(s=>{var r;return((r=s.identify)==null?void 0:r.call(s,n))&&!s.format})}function mt(n,e,t){var f,h,d;if(Ot(n)&&(n=n.contents),B(n))return n;if(F(n)){const p=(h=(f=t.schema[we]).createNode)==null?void 0:h.call(f,t.schema,null,t);return p.items.push(n),p}(n instanceof String||n instanceof Number||n instanceof Boolean||typeof BigInt<"u"&&n instanceof BigInt)&&(n=n.valueOf());const{aliasDuplicateObjects:s,onAnchor:r,onTagObj:o,schema:i,sourceObjects:a}=t;let l;if(s&&n&&typeof n=="object"){if(l=a.get(n),l)return l.anchor||(l.anchor=r(n)),new $o(l.anchor);l={anchor:null,node:null},a.set(n,l)}let c=No(n,e,i.tags);if(!c){if(n&&typeof n.toJSON=="function"&&(n=n.toJSON()),!n||typeof n!="object"){const p=new R(n);return l&&(l.node=p),p}c=n instanceof Map?i[we]:Symbol.iterator in Object(n)?i[Ge]:i[we]}o&&(o(c),delete t.onTagObj);const u=c!=null&&c.createNode?c.createNode(t.schema,n,t):typeof((d=c==null?void 0:c.nodeClass)==null?void 0:d.from)=="function"?c.nodeClass.from(t.schema,n,t):new R(n);return c.default||(u.tag=c.tag),l&&(l.node=u),u}function Dn(n,e,t){let s=t;for(let r=e.length-1;r>=0;--r){const o=e[r];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const i=[];i[o]=s,s=i}else s=new Map([[o,s]])}return mt(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:n,sourceObjects:new Map})}const Ro=n=>n==null||typeof n=="object"&&!!n[Symbol.iterator]().next().done;class ws extends yn{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(s=>B(s)||F(s)?s.clone(e):s),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Ro(e))this.add(t);else{const[s,...r]=e,o=this.get(s,!0);if(Q(o))o.addIn(r,t);else if(o===void 0&&this.schema)this.set(s,Dn(this.schema,r,t));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${r}`)}}deleteIn(e){const[t,...s]=e;if(s.length===0)return this.delete(t);const r=this.get(t,!0);if(Q(r))return r.deleteIn(s);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${s}`)}getIn(e,t){const[s,...r]=e,o=this.get(s,!0);return r.length===0?!t&&I(o)?o.value:o:Q(o)?o.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!F(t))return!1;const s=t.value;return s==null||e&&I(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){const[t,...s]=e;if(s.length===0)return this.has(t);const r=this.get(t,!0);return Q(r)?r.hasIn(s):!1}setIn(e,t){const[s,...r]=e;if(r.length===0)this.set(s,t);else{const o=this.get(s,!0);if(Q(o))o.setIn(r,t);else if(o===void 0&&this.schema)this.set(s,Dn(this.schema,r,t));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${r}`)}}}const Io=n=>n.replace(/^(?!$)(?: $)?/gm,"#");function qe(n,e){return/^\n+$/.test(n)?n.substring(1):e?n.replace(/^(?! *$)/gm,e):n}const Pe=(n,e,t)=>n.endsWith(` +`)?qe(t,e):t.includes(` +`)?` +`+qe(t,e):(n.endsWith(" ")?"":" ")+t,bs="flow",Gt="block",lt="quoted";function Ct(n,e,t="flow",{indentAtStart:s,lineWidth:r=80,minContentWidth:o=20,onFold:i,onOverflow:a}={}){if(!r||r<0)return n;rr-Math.max(2,o)?c.push(0):f=r-s);let h,d,p=!1,g=-1,v=-1,m=-1;t===Gt&&(g=Hn(n,g,e.length),g!==-1&&(f=g+l));for(let w;w=n[g+=1];){if(t===lt&&w==="\\"){switch(v=g,n[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}m=g}if(w===` +`)t===Gt&&(g=Hn(n,g,e.length)),f=g+e.length+l,h=void 0;else{if(w===" "&&d&&d!==" "&&d!==` +`&&d!==" "){const b=n[g+1];b&&b!==" "&&b!==` +`&&b!==" "&&(h=g)}if(g>=f)if(h)c.push(h),f=h+l,h=void 0;else if(t===lt){for(;d===" "||d===" ";)d=w,w=n[g+=1],p=!0;const b=g>m+1?g-2:v-1;if(u[b])return n;c.push(b),u[b]=!0,f=b+l,h=void 0}else p=!0}d=w}if(p&&a&&a(),c.length===0)return n;i&&i();let y=n.slice(0,c[0]);for(let w=0;w({indentAtStart:e?n.indent.length:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),Tt=n=>/^(%|---|\.\.\.)/m.test(n);function Do(n,e,t){if(!e||e<0)return!1;const s=e-t,r=n.length;if(r<=s)return!1;for(let o=0,i=0;os)return!0;if(i=o+1,r-i<=s)return!1}return!0}function Ue(n,e){const t=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return t;const{implicitKey:s}=e,r=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(Tt(n)?" ":"");let i="",a=0;for(let l=0,c=t[l];c;c=t[++l])if(c===" "&&t[l+1]==="\\"&&t[l+2]==="n"&&(i+=t.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(t[l+1]){case"u":{i+=t.slice(a,l);const u=t.substr(l+2,4);switch(u){case"0000":i+="\\0";break;case"0007":i+="\\a";break;case"000b":i+="\\v";break;case"001b":i+="\\e";break;case"0085":i+="\\N";break;case"00a0":i+="\\_";break;case"2028":i+="\\L";break;case"2029":i+="\\P";break;default:u.substr(0,2)==="00"?i+="\\x"+u.substr(2):i+=t.substr(l,6)}l+=5,a=l+1}break;case"n":if(s||t[l+2]==='"'||t.length +`;let f,h;for(h=t.length;h>0;--h){const _=t[h-1];if(_!==` +`&&_!==" "&&_!==" ")break}let d=t.substring(h);const p=d.indexOf(` +`);p===-1?f="-":t===d||p!==d.length-1?(f="+",o&&o()):f="",d&&(t=t.slice(0,-d.length),d[d.length-1]===` +`&&(d=d.slice(0,-1)),d=d.replace(Yt,`$&${c}`));let g=!1,v,m=-1;for(v=0;v")+(g?c?"2":"1":"")+f;if(n&&(b+=" "+a(n.replace(/ ?[\r\n]+/g," ")),r&&r()),u)return t=t.replace(/\n+/g,`$&${c}`),`${b} +${c}${y}${t}${d}`;t=t.replace(/\n+/g,` +$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);const S=Ct(`${y}${t}${d}`,c,Gt,At(s,!0));return`${b} +${c}${S}`}function Ho(n,e,t,s){const{type:r,value:o}=n,{actualString:i,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&o.includes(` +`)||u&&/[[\]{},]/.test(o))return Oe(o,e);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return a||u||!o.includes(` +`)?Oe(o,e):ct(n,e,t,s);if(!a&&!u&&r!==R.PLAIN&&o.includes(` +`))return ct(n,e,t,s);if(Tt(o)){if(l==="")return e.forceBlockIndent=!0,ct(n,e,t,s);if(a&&l===c)return Oe(o,e)}const f=o.replace(/\n+/g,`$& +${l}`);if(i){const h=g=>{var v;return g.default&&g.tag!=="tag:yaml.org,2002:str"&&((v=g.test)==null?void 0:v.test(f))},{compat:d,tags:p}=e.doc.schema;if(p.some(h)||d!=null&&d.some(h))return Oe(o,e)}return a?f:Ct(f,l,bs,At(e,!1))}function Fo(n,e,t,s){const{implicitKey:r,inFlow:o}=e,i=typeof n.value=="string"?n:Object.assign({},n,{value:String(n.value)});let{type:a}=n;a!==R.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(i.value)&&(a=R.QUOTE_DOUBLE);const l=u=>{switch(u){case R.BLOCK_FOLDED:case R.BLOCK_LITERAL:return r||o?Oe(i.value,e):ct(i,e,t,s);case R.QUOTE_DOUBLE:return Ue(i.value,e);case R.QUOTE_SINGLE:return xt(i.value,e);case R.PLAIN:return Ho(i,e,t,s);default:return null}};let c=l(a);if(c===null){const{defaultKeyType:u,defaultStringType:f}=e.options,h=r&&u||f;if(c=l(h),c===null)throw new Error(`Unsupported default string type ${h}`)}return c}function jo(n,e){const t=Object.assign({blockQuote:!0,commentString:Io,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},n.schema.toStringOptions,e);let s;switch(t.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:n,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:s,options:t}}function zo(n,e){var r;if(e.tag){const o=n.filter(i=>i.tag===e.tag);if(o.length>0)return o.find(i=>i.format===e.format)??o[0]}let t,s;if(I(e)){s=e.value;const o=n.filter(i=>{var a;return(a=i.identify)==null?void 0:a.call(i,s)});t=o.find(i=>i.format===e.format)??o.find(i=>!i.format)}else s=e,t=n.find(o=>o.nodeClass&&s instanceof o.nodeClass);if(!t){const o=((r=s==null?void 0:s.constructor)==null?void 0:r.name)??typeof s;throw new Error(`Tag not resolved for ${o} value`)}return t}function Bo(n,e,{anchors:t,doc:s}){if(!s.directives)return"";const r=[],o=(I(n)||Q(n))&&n.anchor;o&&vs(o)&&(t.add(o),r.push(`&${o}`));const i=n.tag?n.tag:e.default?null:e.tag;return i&&r.push(s.directives.tagString(i)),r.join(" ")}function vt(n,e,t,s){var l;if(F(n))return n.toString(e,t,s);if($e(n)){if(e.doc.directives)return n.toString(e);if((l=e.resolvedAliases)!=null&&l.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(n):e.resolvedAliases=new Set([n]),n=n.resolve(e.doc)}let r;const o=B(n)?n:e.doc.createNode(n,{onTagObj:c=>r=c});r||(r=zo(e.doc.schema.tags,o));const i=Bo(o,r,e);i.length>0&&(e.indentAtStart=(e.indentAtStart??0)+i.length+1);const a=typeof r.stringify=="function"?r.stringify(o,e,t,s):I(o)?Fo(o,e,t,s):o.toString(e,t,s);return i?I(o)||a[0]==="{"||a[0]==="["?`${i} ${a}`:`${i} +${e.indent}${a}`:a}function Vo({key:n,value:e},t,s,r){const{allNullValues:o,doc:i,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=t;let h=B(n)&&n.comment||null;if(f){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(Q(n)||!B(n)&&typeof n=="object"){const E="With simple keys, collection cannot be used as a key value";throw new Error(E)}}let d=!f&&(!n||h&&e==null&&!t.inFlow||Q(n)||(I(n)?n.type===R.BLOCK_FOLDED||n.type===R.BLOCK_LITERAL:typeof n=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!d&&(f||!o),indent:a+l});let p=!1,g=!1,v=vt(n,t,()=>p=!0,()=>g=!0);if(!d&&!t.inFlow&&v.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");d=!0}if(t.inFlow){if(o||e==null)return p&&s&&s(),v===""?"?":d?`? ${v}`:v}else if(o&&!f||e==null&&d)return v=`? ${v}`,h&&!p?v+=Pe(v,t.indent,c(h)):g&&r&&r(),v;p&&(h=null),d?(h&&(v+=Pe(v,t.indent,c(h))),v=`? ${v} +${a}:`):(v=`${v}:`,h&&(v+=Pe(v,t.indent,c(h))));let m,y,w;B(e)?(m=!!e.spaceBefore,y=e.commentBefore,w=e.comment):(m=!1,y=null,w=null,e&&typeof e=="object"&&(e=i.createNode(e))),t.implicitKey=!1,!d&&!h&&I(e)&&(t.indentAtStart=v.length+1),g=!1,!u&&l.length>=2&&!t.inFlow&&!d&&vn(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let b=!1;const S=vt(e,t,()=>b=!0,()=>g=!0);let _=" ";if(h||m||y){if(_=m?` +`:"",y){const E=c(y);_+=` +${qe(E,t.indent)}`}S===""&&!t.inFlow?_===` +`&&(_=` + +`):_+=` +${t.indent}`}else if(!d&&Q(e)){const E=S[0],C=S.indexOf(` +`),L=C!==-1,j=t.inFlow??e.flow??e.items.length===0;if(L||!j){let $=!1;if(L&&(E==="&"||E==="!")){let P=S.indexOf(" ");E==="&"&&P!==-1&&Pn===Fn||I(n)&&n.value===Fn&&(!n.type||n.type===R.PLAIN);function jt(n,e,t){const s=n&&$e(t)?t.resolve(n.doc):t;if(!ms(s))throw new Error("Merge sources must be maps or map aliases");const r=s.toJSON(null,n,Map);for(const[o,i]of r)e instanceof Map?e.has(o)||e.set(o,i):e instanceof Set?e.add(o):Object.prototype.hasOwnProperty.call(e,o)||Object.defineProperty(e,o,{value:i,writable:!0,enumerable:!0,configurable:!0});return e}function Qo(n,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(B(n)&&(t!=null&&t.doc)){const s=jo(t.doc,{});s.anchors=new Set;for(const o of t.anchors.keys())s.anchors.add(o.anchor);s.inFlow=!0,s.inStringifyKey=!0;const r=n.toString(s);if(!t.mapKeyWarned){let o=JSON.stringify(r);o.length>40&&(o=o.substring(0,36)+'..."'),Uo(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return r}return JSON.stringify(e)}function wn(n,e,t){const s=mt(n,void 0,t),r=mt(e,void 0,t);return new oe(s,r)}class oe{constructor(e,t=null){Object.defineProperty(this,re,{value:gs}),this.key=e,this.value=t}clone(e){let{key:t,value:s}=this;return B(t)&&(t=t.clone(e)),B(s)&&(s=s.clone(e)),new oe(t,s)}toJSON(e,t){const s=t!=null&&t.mapAsMap?new Map:{};return ks(t,s,this)}toString(e,t,s){return e!=null&&e.doc?Vo(this,e,t,s):JSON.stringify(this)}}function _s(n,e,t){return(e.inFlow??n.flow?Ko:qo)(n,e,t)}function qo({comment:n,items:e},t,{blockItemPrefix:s,flowChars:r,itemIndent:o,onChompKeep:i,onComment:a}){const{indent:l,options:{commentString:c}}=t,u=Object.assign({},t,{indent:o,type:null});let f=!1;const h=[];for(let p=0;pv=null,()=>f=!0);v&&(m+=Pe(m,o,c(v))),f&&v&&(f=!1),h.push(s+m)}let d;if(h.length===0)d=r.start+r.end;else{d=h[0];for(let p=1;pv=null);pu||m.includes(` +`))&&(c=!0),f.push(m),u=f.length}const{start:h,end:d}=t;if(f.length===0)return h+d;if(!c){const p=f.reduce((g,v)=>g+v.length+2,2);c=e.options.lineWidth>0&&p>e.options.lineWidth}if(c){let p=h;for(const g of f)p+=g?` +${o}${r}${g}`:` +`;return`${p} +${r}${d}`}else return`${h}${i}${f.join(" ")}${i}${d}`}function yt({indent:n,options:{commentString:e}},t,s,r){if(s&&r&&(s=s.replace(/^\n+/,"")),s){const o=qe(e(s),n);t.push(o.trimStart())}}function ye(n,e){const t=I(e)?e.value:e;for(const s of n)if(F(s)&&(s.key===e||s.key===t||I(s.key)&&s.key.value===t))return s}class Se extends ws{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(we,e),this.items=[]}static from(e,t,s){const{keepUndefined:r,replacer:o}=s,i=new this(e),a=(l,c)=>{if(typeof o=="function")c=o.call(t,l,c);else if(Array.isArray(o)&&!o.includes(l))return;(c!==void 0||r)&&i.items.push(wn(l,c,s))};if(t instanceof Map)for(const[l,c]of t)a(l,c);else if(t&&typeof t=="object")for(const l of Object.keys(t))a(l,t[l]);return typeof e.sortMapEntries=="function"&&i.items.sort(e.sortMapEntries),i}add(e,t){var i;let s;F(e)?s=e:!e||typeof e!="object"||!("key"in e)?s=new oe(e,e==null?void 0:e.value):s=new oe(e.key,e.value);const r=ye(this.items,s.key),o=(i=this.schema)==null?void 0:i.sortMapEntries;if(r){if(!t)throw new Error(`Key ${s.key} already set`);I(r.value)&&ys(s.value)?r.value.value=s.value:r.value=s.value}else if(o){const a=this.items.findIndex(l=>o(s,l)<0);a===-1?this.items.push(s):this.items.splice(a,0,s)}else this.items.push(s)}delete(e){const t=ye(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const s=ye(this.items,e),r=s==null?void 0:s.value;return(!t&&I(r)?r.value:r)??void 0}has(e){return!!ye(this.items,e)}set(e,t){this.add(new oe(e,t),!0)}toJSON(e,t,s){const r=s?new s:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(r);for(const o of this.items)ks(t,r,o);return r}toString(e,t,s){if(!e)return JSON.stringify(this);for(const r of this.items)if(!F(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),_s(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:t})}}class Ss extends ws{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ge,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=Ze(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const s=Ze(e);if(typeof s!="number")return;const r=this.items[s];return!t&&I(r)?r.value:r}has(e){const t=Ze(e);return typeof t=="number"&&t=0?e:null}function Jo(n,e,t){const{replacer:s}=t,r=new Ss(n);r.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let i of e){typeof s=="function"&&(i=s.call(e,String(o++),i));let a,l;if(Array.isArray(i))if(i.length===2)a=i[0],l=i[1];else throw new TypeError(`Expected [key, value] tuple: ${i}`);else if(i&&i instanceof Object){const c=Object.keys(i);if(c.length===1)a=c[0],l=i[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=i;r.items.push(wn(a,l,t))}return r}class bn extends Ss{constructor(){super(),this.add=Se.prototype.add.bind(this),this.delete=Se.prototype.delete.bind(this),this.get=Se.prototype.get.bind(this),this.has=Se.prototype.has.bind(this),this.set=Se.prototype.set.bind(this),this.tag=bn.tag}toJSON(e,t){if(!t)return super.toJSON(e);const s=new Map;t!=null&&t.onCreate&&t.onCreate(s);for(const r of this.items){let o,i;if(F(r)?(o=ee(r.key,"",t),i=ee(r.value,o,t)):o=ee(r,"",t),s.has(o))throw new Error("Ordered maps must not include duplicate keys");s.set(o,i)}return s}static from(e,t,s){const r=Jo(e,t,s),o=new this;return o.items=r.items,o}}bn.tag="tag:yaml.org,2002:omap";class kn extends Se{constructor(e){super(e),this.tag=kn.tag}add(e){let t;F(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new oe(e.key,null):t=new oe(e,null),ye(this.items,t.key)||this.items.push(t)}get(e,t){const s=ye(this.items,e);return!t&&F(s)?I(s.key)?s.key.value:s.key:s}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const s=ye(this.items,e);s&&!t?this.items.splice(this.items.indexOf(s),1):!s&&t&&this.items.push(new oe(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,s);throw new Error("Set items must all have null values")}static from(e,t,s){const{replacer:r}=s,o=new this(e);if(t&&Symbol.iterator in Object(t))for(let i of t)typeof r=="function"&&(i=r.call(t,i,i)),o.items.push(wn(i,null,s));return o}}kn.tag="tag:yaml.org,2002:set";new Set("0123456789ABCDEFabcdef");new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()");new Set(",[]{}");new Set(` ,[]{} +\r `);function Ua(){const n=O(Date.now()),e=Js({interval:1e3}),t=k(()=>{const r=(e.value-n.value)/1e3,o=Math.floor(r%60).toString().padStart(2,"0");return`${Math.floor(r/60).toString().padStart(2,"0")}:${o}`});function s(){n.value=e.value}return{timer:t,resetTimer:s}}function _n(n=5){const e=[],t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",s=t.length;for(let r=0;ro.trim());t=e?r:s}if(t)return{...n,name:t}}function Yo(n,e,t){var r,o;let s=n>0?(r=t==null?void 0:t.meta)==null?void 0:r.transition:(o=e==null?void 0:e.meta)==null?void 0:o.transition;return s||(s=z.transition||void 0),xo(s,n<0)}function Zo(n,e,{mode:t="replace"}={}){const s=Et();return k({get(){const r=s.currentRoute.value.query[n];return r==null?e:Array.isArray(r)?r.filter(Boolean):r},set(r){Zn(()=>{(s.currentRoute.value.query[n]??(e==null?void 0:e.toString()))!==r.toString()&&s[ln(t)]({query:{...s.currentRoute.value.query,[n]:`${r}`===e?void 0:r}})})}})}function Ms(n,e,t=1){var r,o,i,a,l,c,u;const s=e.meta.slide.level??t;s&&s>t&&n.length>0?Ms(n[n.length-1].children,e,t+1):n.push({no:e.no,children:[],level:t,titleLevel:s,path:Ce(((o=(r=e.meta.slide)==null?void 0:r.frontmatter)==null?void 0:o.routeAlias)??e.no,!1),hideInToc:!!((l=(a=(i=e.meta)==null?void 0:i.slide)==null?void 0:a.frontmatter)!=null&&l.hideInToc),title:(u=(c=e.meta)==null?void 0:c.slide)==null?void 0:u.title})}function Es(n,e,t=!1,s,r){return n.map(o=>{const i={...o,active:o.no===(r==null?void 0:r.value),hasActiveParent:t};return i.children.length>0&&(i.children=Es(i.children,e,i.active||i.hasActiveParent,i,r)),s&&(i.active||i.activeParent)&&(s.activeParent=!0),i})}function Ps(n,e=1){return n.filter(t=>!t.hideInToc).map(t=>({...t,children:Ps(t.children,e+1)}))}function Xo(n,e,t){const s=k(()=>n.value.filter(o=>{var i,a;return(a=(i=o.meta)==null?void 0:i.slide)==null?void 0:a.title}).reduce((o,i)=>(Ms(o,i),o),[])),r=k(()=>Es(s.value,t.value,void 0,void 0,e));return k(()=>Ps(r.value))}function Zt(n){if(n===!1||n==="false")return null;if(n==null||n===!0||n==="true")return"+1";if(typeof n=="string"&&"+-".includes(n[0]))return n;const e=+n;return Number.isNaN(e)?(console.error(`Invalid "at" prop value: ${n}`),null):e}function ei(n){return Array.isArray(n)?[Zt(n[0]),Zt(n[1])]:null}function Os(n,e=0,t){const s=O(!1);let r=new Map,o=new Map;const i={get current(){return qt(+n.value,e,i.total)},set current(a){n.value=s.value?qt(a,e,i.total):a},clicksStart:e,get relativeSizeMap(){return r},get maxMap(){return o},get isMounted(){return s.value},setup(){cn(()=>{s.value=!0,o=Ke(o),i.current=n.value}),Gs(()=>{s.value=!1,r=new Map,o=new Map})},calculateSince(a,l=1){const c=Zt(a);if(c==null)return null;let u,f,h;if(typeof c=="string"){const d=i.currentOffset,p=+c;u=d+p,f=d+p+l-1,h=p+l-1}else u=c,f=c+l-1,h=0;return{start:u,end:+Number.POSITIVE_INFINITY,max:f,delta:h,currentOffset:k(()=>i.current-u),isCurrent:k(()=>i.current===u),isActive:k(()=>i.current>=u)}},calculateRange(a){const l=ei(a);if(l==null)return null;const[c,u]=l;let f,h,d;return typeof c=="string"?(f=i.currentOffset+ +c,d=+c):(f=c,d=0),typeof u=="string"?(h=f+ +u,d+=+u):h=u,{start:f,end:h,max:h,delta:d,currentOffset:k(()=>i.current-f),isCurrent:k(()=>i.current===f),isActive:k(()=>f<=i.current&&i.current{const t=n.__vccOpts||n;for(const[s,r]of e)t[s]=r;return t},si={},ri={class:"px-4 py-10 text-center text-red-700 dark:text-red-500 font-bold font-mono"};function oi(n,e){return ht(),Qt("div",ri," An error occurred on this slide. Check the terminal for more information. ")}const xe=ni(si,[["render",oi]]),ii={class:"h-full w-full flex items-center justify-center gap-2 slidev-slide-loading"},ai=ts("div",{class:"i-svg-spinners-90-ring-with-bg text-xl"},null,-1),li=ts("div",null,"Loading slide...",-1),ci=Je({__name:"SlideLoading",setup(n){const e=O(!1);return cn(()=>{setTimeout(()=>{e.value=!0},200)}),(t,s)=>(ht(),Qt("div",ii,[e.value?(ht(),Qt(xs,{key:0},[ai,li],64)):Ys("v-if",!0)]))}}),ui={title:"Test",layout:"cover",theme:"neversink",color:"bowdoin",routerMode:"hash"},he=ce(ui),fi=Ke({get layout(){return he.layout},get transition(){return he.transition},get class(){return he.class},get clicks(){return he.clicks},get name(){return he.name},get preload(){return he.preload},slide:{index:0,content:"",note:"",title:"Test",noteHTML:"",raw:"",frontmatter:he,filepath:"",start:0,id:0,no:1},__clicksContext:null,__preloaded:!1}),hi={title:"Test",layout:"side-title",titlewidth:"is-4",align:"rm-cm",theme:"neversink",color:"bowdoin-title"},de=ce(hi),di=Ke({get layout(){return de.layout},get transition(){return de.transition},get class(){return de.class},get clicks(){return de.clicks},get name(){return de.name},get preload(){return de.preload},slide:{index:1,content:"",note:"",title:"Test",noteHTML:"",raw:"",frontmatter:de,filepath:"",start:13,id:1,no:2},__clicksContext:null,__preloaded:!1}),pi={title:"Test",layout:"side-title",titlewidth:"is-3",align:"rm-lm",theme:"neversink",color:"bowdoin-title"},pe=ce(pi),gi=Ke({get layout(){return pe.layout},get transition(){return pe.transition},get class(){return pe.class},get clicks(){return pe.clicks},get name(){return pe.name},get preload(){return pe.preload},slide:{index:2,content:"",note:"",title:"Test",noteHTML:"",raw:"",frontmatter:pe,filepath:"",start:30,id:2,no:3},__clicksContext:null,__preloaded:!1}),mi={layout:"top-title-two-cols",align:"l-lm-c",theme:"neversink",color:"bowdoin-title"},ge=ce(mi),vi=Ke({get layout(){return ge.layout},get transition(){return ge.transition},get class(){return ge.class},get clicks(){return ge.clicks},get name(){return ge.name},get preload(){return ge.preload},slide:{index:3,content:"",note:"",title:"This has a list of things and a drawing",level:1,noteHTML:"",raw:"",frontmatter:ge,filepath:"",start:51,id:3,no:4},__clicksContext:null,__preloaded:!1}),J=new Array(4),Xe=(n,e)=>Zs({loader:e,delay:300,loadingComponent:ci,errorComponent:xe,onError:t=>console.error("Failed to load slide "+(n+1),t)}),jn=async()=>{try{return J[0]??(J[0]=await Z(()=>import("./md-B2t6eFbF.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))}catch(n){return console.error("slide failed to load",n),xe}},zn=async()=>{try{return J[1]??(J[1]=await Z(()=>import("./md-BV_QmVfM.js"),__vite__mapDeps([9,1,10,2,11,12,3,4,5,6,7])))}catch(n){return console.error("slide failed to load",n),xe}},Bn=async()=>{try{return J[2]??(J[2]=await Z(()=>import("./md-Dx23vpFk.js"),__vite__mapDeps([13,3,1,4,5,2,10,11,12,6,7,14])))}catch(n){return console.error("slide failed to load",n),xe}},Vn=async()=>{try{return J[3]??(J[3]=await Z(()=>import("./md-DBrHLyLI.js"),__vite__mapDeps([15,1,2,11,3,4,5,6,7,16])))}catch(n){return console.error("slide failed to load",n),xe}},yi=[{no:1,meta:fi,load:jn,component:Xe(0,jn)},{no:2,meta:di,load:zn,component:Xe(1,zn)},{no:3,meta:gi,load:Bn,component:Xe(2,Bn)},{no:4,meta:vi,load:Vn,component:Xe(3,Vn)}],se=un(yi);function wi(n,e,t=O(0),s,r,o){const i=k(()=>se.value.length),a=O(0),l=O(0),c=k(()=>Ce(n.value,s.value)),u=k(()=>n.value.no),f=k(()=>{var T;return((T=n.value.meta)==null?void 0:T.layout)||(u.value===1?"cover":"default")}),h=k(()=>e.value.current),d=k(()=>e.value.clicksStart),p=k(()=>e.value.total),g=k(()=>se.value[Math.min(se.value.length,u.value+1)-1]),v=k(()=>se.value[Math.max(1,u.value-1)-1]),m=k(()=>u.valueu.value>1||h.value>0),w=k(()=>Yo(a.value,n.value,v.value));X(n,(T,H)=>{a.value=T.no-H.no});async function b(T){return!1}const S=Xo(se,u,n);async function _(){l.value=1,p.value<=t.value?await C():t.value+=1}async function E(){l.value=-1,t.value<=d.value?await L(!0):t.value-=1}async function C(T=!1){l.value=1,u.value1&&await P(u.value-1,T&&!r.value?it:void 0)}function j(){return P(1)}function $(){return P(i.value)}async function P(T,H=0,ne=!1){var ue,Re,Ie;pn.value=!1;const Ne=u.value!==T,x=H!==t.value,q=(ue=Lt(T))==null?void 0:ue.meta,N=((Re=q==null?void 0:q.slide)==null?void 0:Re.frontmatter.clicksStart)??0;H=qt(H,N,((Ie=q==null?void 0:q.__clicksContext)==null?void 0:Ie.total)??it),(ne||Ne||x)&&await(o==null?void 0:o.push({path:Ce(T,s.value),query:{...o.currentRoute.value.query,clicks:H===0?void 0:H.toString(),embedded:location.search.includes("embedded")?"true":void 0}}))}function A(){o==null||o.push({path:Ce(u.value,!0),query:{...o.currentRoute.value.query}})}function D(){o==null||o.push({path:Ce(u.value,!1),query:{...o.currentRoute.value.query}})}return{slides:se,total:i,currentPath:c,currentSlideNo:u,currentPage:u,currentSlideRoute:n,currentLayout:f,currentTransition:w,clicksDirection:l,nextRoute:g,prevRoute:v,clicksContext:e,clicks:h,clicksStart:d,clicksTotal:p,hasNext:m,hasPrev:y,tocTree:S,navDirection:a,openInEditor:b,next:_,prev:E,go:P,goLast:$,goFirst:j,nextSlide:C,prevSlide:L,enterPresenter:A,exitPresenter:D}}const bi=ns(()=>{const n=Et(),e=k(()=>n.currentRoute.value),t=k(()=>(n.currentRoute.value.query,new URLSearchParams(location.search))),s=k(()=>t.value.has("print")),r=k(()=>t.value.get("print")==="clicks"),o=k(()=>t.value.has("embedded")),i=k(()=>e.value.name==="play"),a=k(()=>e.value.name==="presenter"),l=k(()=>e.value.name==="notes"),c=k(()=>!a.value&&(!z.remote||t.value.get("password")===z.remote)),u=Xs(i,a),f=k(()=>{var m;return u.value?((m=Lt(e.value.params.no))==null?void 0:m.no)??1:1}),h=k(()=>se.value[f.value-1]),d=Zo("clicks","0"),p=k(()=>v(h.value)),g=k({get(){let m=+(d.value||0);return Number.isNaN(m)&&(m=0),m},set(m){pn.value=!1,d.value=m.toString()}});function v(m){var b,S;if((b=m==null?void 0:m.meta)!=null&&b.__clicksContext)return m.meta.__clicksContext;const y=m.no,w=Os(k({get(){return f.value===y?Math.max(+(d.value??0),w.clicksStart):f.value>y?it:w.clicksStart},set(_){f.value===y&&(d.value=_.toString())}}),((S=m==null?void 0:m.meta.slide)==null?void 0:S.frontmatter.clicksStart)??0,m==null?void 0:m.meta.clicks);return m!=null&&m.meta&&(m.meta.__clicksContext=w),w}return{router:n,currentRoute:e,isPrintMode:s,isPrintWithClicks:r,isEmbedded:o,isPlaying:i,isPresenter:a,isNotesViewer:l,isPresenterAvailable:c,hasPrimarySlide:u,currentSlideNo:f,currentSlideRoute:h,clicksContext:p,queryClicksRaw:d,queryClicks:g,getPrimaryClicks:v}}),Xt=ns(()=>{const n=bi(),e=Et(),t=wi(n.currentSlideRoute,n.clicksContext,n.queryClicks,n.isPresenter,n.isPrintMode,e);return X([t.total,n.currentRoute],async()=>{const s=n.currentRoute.value.params.no;n.hasPrimarySlide.value&&!Lt(s)&&(s&&s!=="index.html"?await t.go(t.total.value,0,!0):await t.go(1,0,!0))},{flush:"pre",immediate:!0}),{...t,...n}});function Lt(n){return se.value.find(e=>{var t;return e.no===+n||((t=e.meta.slide)==null?void 0:t.frontmatter.routeAlias)===n})}function Ce(n,e){var s;(typeof n=="number"||typeof n=="string")&&(n=Lt(n));const t=((s=n.meta.slide)==null?void 0:s.frontmatter.routeAlias)??n.no;return e?`/presenter/${t}`:`/${t}`}const ki=[];function _i(){const n=es().appContext.app,e=ce({nav:Xt(),configs:z,themeConfigs:k(()=>z.themeConfig)});n.provide(dn,O("none")),n.provide(ko,e),n.provide(hn,k(()=>e.nav.currentSlideNo)),n.provide(Pt,un(ti()));for(const u of ki)u();const{clicksContext:t,currentSlideNo:s,hasPrimarySlide:r,isNotesViewer:o,isPresenter:i}=Xt();uo({title:Nt,htmlAttrs:z.htmlAttrs}),go(`${Nt} - shared`),wo(`${Nt} - drawings`);const a=`${location.origin}_${_n()}`;function l(){o.value||!i.value&&!Mo.includes(location.host.split(":")[0])||(i.value?(fe("page",+s.value),fe("clicks",t.value.current),fe("clicksTotal",t.value.total)):(fe("viewerPage",+s.value),fe("viewerClicks",t.value.current),fe("viewerClicksTotal",t.value.total)),fe("lastUpdate",{id:a,type:i.value?"presenter":"viewer",time:new Date().getTime()}))}const c=Et();c.afterEach(l),X(t,l),mo(u=>{var f;r.value&&((f=u.lastUpdate)==null?void 0:f.type)==="presenter"&&(+u.page!=+s.value||+t.value.current!=+u.clicks)&&(pn.value=!1,c.replace({path:Ce(u.page,i.value),query:{...c.currentRoute.value.query,clicks:u.clicks||0}}))})}const Si=Je({__name:"App",setup(n){return _i(),Te(()=>{for(const[e,t]of Object.entries(yr.value))document.body.style.setProperty(e,t.toString())}),(e,t)=>{const s=er("RouterView");return ht(),tr(s)}}});function Wa(n,e=""){var r,o;const t=["slidev-page",e],s=(o=(r=n==null?void 0:n.meta)==null?void 0:r.slide)==null?void 0:o.no;return s!=null&&t.push(`slidev-page-${s}`),t.filter(Boolean).join(" ")}async function Qa(){const{saveAs:n}=await Z(async()=>{const{saveAs:e}=await import("./modules/file-saver-igGfcqei.js").then(t=>t.F);return{saveAs:e}},[]);n(typeof z.download=="string"?z.download:z.exportFilename?`${z.exportFilename}.pdf`:"/lectures/week_01/test1/slidev-exported.pdf",`${z.title}.pdf`)}function Le(n,e,t){var s;return((s=n.instance)==null?void 0:s.$).provides[e]??t}function Mi(){return{install(n){n.directive("click",{name:"v-click",mounted(e,t){const s=ut(e,t,t.value);s!=null&&(e.classList.toggle(ot,!0),e.dataset.slidevClicksStart=String(s.start),Number.isFinite(s.end)&&(e.dataset.slidevClicksEnd=String(s.end)),e.watchStopHandle=Te(()=>{const r=s.isActive.value,o=s.isCurrent.value,i=r&&!o;s.flagHide?(e.classList.toggle(s.flagFade?He:De,r),e.classList.toggle(Dt,r)):e.classList.toggle(s.flagFade?He:De,!r),e.classList.toggle(Ht,o),e.classList.toggle(Ft,i)}))},unmounted:zt}),n.directive("after",{name:"v-after",mounted(e,t){const s=ut(e,t,"+0");s!=null&&(e.classList.toggle(ot,!0),e.watchStopHandle=Te(()=>{const r=s.isActive.value,o=s.isCurrent.value,i=r&&!o;s.flagHide?(e.classList.toggle(s.flagFade?He:De,r),e.classList.toggle(Dt,r)):e.classList.toggle(s.flagFade?He:De,!r),e.classList.toggle(Ht,o),e.classList.toggle(Ft,i)}))},unmounted:zt}),n.directive("click-hide",{name:"v-click-hide",mounted(e,t){const s=ut(e,t,t.value,!0);s!=null&&(e.classList.toggle(ot,!0),e.watchStopHandle=Te(()=>{const r=s.isActive.value,o=s.isCurrent.value,i=r&&!o;e.classList.toggle(s.flagFade?He:De,r),e.classList.toggle(Dt,r),e.classList.toggle(Ht,o),e.classList.toggle(Ft,i)}))},unmounted:zt})}}}const Cs=new Map;function ut(n,e,t,s=!1){var f;const r=(f=Le(e,Pt))==null?void 0:f.value;if(!n||!r)return null;const o=s||e.modifiers.hide!==!1&&e.modifiers.hide!=null,i=e.modifiers.fade!==!1&&e.modifiers.fade!=null,a=r.calculate(t);if(!a)return null;r.register(n,a);const l=k(()=>o?!a.isActive.value:a.isActive.value),c=k(()=>l.value?"shown":Number.isFinite(a.end)?r.currents.push(...r)),en(s,e,t)}function Oi(n,e){return n[0]===e[0]&&n[1]===e[1]}function Ci(n,e,t,s=1){const r=t,o=Math.max(e,.1),i=n[0]&&n[0][0]&&typeof n[0][0]=="number"?[n]:n,a=[0,0];if(r)for(const c of i)en(c,a,r);const l=Ai(i,o,s);if(r){for(const c of i)en(c,a,-r);Pi(l,a,-r)}return l}function Ai(n,e,t){const s=[];for(const c of n){const u=[...c];Oi(u[0],u[u.length-1])||u.push([u[0][0],u[0][1]]),u.length>2&&s.push(u)}const r=[];e=Math.max(e,.1);const o=[];for(const c of s)for(let u=0;uc.yminu.ymin?1:c.xu.x?1:c.ymax===u.ymax?0:(c.ymax-u.ymax)/Math.abs(c.ymax-u.ymax)),!o.length)return r;let i=[],a=o[0].ymin,l=0;for(;i.length||o.length;){if(o.length){let c=-1;for(let f=0;fa);f++)c=f;o.splice(0,c+1).forEach(f=>{i.push({s:a,edge:f})})}if(i=i.filter(c=>!(c.edge.ymax<=a)),i.sort((c,u)=>c.edge.x===u.edge.x?0:(c.edge.x-u.edge.x)/Math.abs(c.edge.x-u.edge.x)),(t!==1||l%e===0)&&i.length>1)for(let c=0;c=i.length)break;const f=i[c].edge,h=i[u].edge;r.push([[Math.round(f.x),a],[Math.round(h.x),a]])}a+=t,i.forEach(c=>{c.edge.x=c.edge.x+t*c.edge.islope}),l++}return r}function Ye(n,e){var t;const s=e.hachureAngle+90;let r=e.hachureGap;r<0&&(r=e.strokeWidth*4),r=Math.round(Math.max(r,.1));let o=1;return e.roughness>=1&&(((t=e.randomizer)===null||t===void 0?void 0:t.next())||Math.random())>.7&&(o=r),Ci(n,r,s,o||1)}class Sn{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){const s=Ye(e,t);return{type:"fillSketch",ops:this.renderLines(s,t)}}renderLines(e,t){const s=[];for(const r of e)s.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return s}}function $t(n){const e=n[0],t=n[1];return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}class Ti extends Sn{fillPolygons(e,t){let s=t.hachureGap;s<0&&(s=t.strokeWidth*4),s=Math.max(s,.1);const r=Object.assign({},t,{hachureGap:s}),o=Ye(e,r),i=Math.PI/180*t.hachureAngle,a=[],l=s*.5*Math.cos(i),c=s*.5*Math.sin(i);for(const[f,h]of o)$t([f,h])&&a.push([[f[0]-l,f[1]+c],[...h]],[[f[0]+l,f[1]-c],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,t)}}}class Li extends Sn{fillPolygons(e,t){const s=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),o=this._fillPolygons(e,r);return s.ops=s.ops.concat(o.ops),s}}class $i{constructor(e){this.helper=e}fillPolygons(e,t){t=Object.assign({},t,{hachureAngle:0});const s=Ye(e,t);return this.dotsOnLines(s,t)}dotsOnLines(e,t){const s=[];let r=t.hachureGap;r<0&&(r=t.strokeWidth*4),r=Math.max(r,.1);let o=t.fillWeight;o<0&&(o=t.strokeWidth/2);const i=r/4;for(const a of e){const l=$t(a),c=l/r,u=Math.ceil(c)-1,f=l-u*r,h=(a[0][0]+a[1][0])/2-r/4,d=Math.min(a[0][1],a[1][1]);for(let p=0;p{const a=$t(i),l=Math.floor(a/(s+r)),c=(a+r-l*(s+r))/2;let u=i[0],f=i[1];u[0]>f[0]&&(u=i[1],f=i[0]);const h=Math.atan((f[1]-u[1])/(f[0]-u[0]));for(let d=0;d{const i=$t(o),a=Math.round(i/(2*t));let l=o[0],c=o[1];l[0]>c[0]&&(l=o[1],c=o[0]);const u=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let f=0;fu%2?c+t:c+e);o.push({key:"C",data:l}),e=l[4],t=l[5];break}case"Q":o.push({key:"Q",data:[...a]}),e=a[2],t=a[3];break;case"q":{const l=a.map((c,u)=>u%2?c+t:c+e);o.push({key:"Q",data:l}),e=l[2],t=l[3];break}case"A":o.push({key:"A",data:[...a]}),e=a[5],t=a[6];break;case"a":e+=a[5],t+=a[6],o.push({key:"A",data:[a[0],a[1],a[2],a[3],a[4],e,t]});break;case"H":o.push({key:"H",data:[...a]}),e=a[0];break;case"h":e+=a[0],o.push({key:"H",data:[e]});break;case"V":o.push({key:"V",data:[...a]}),t=a[0];break;case"v":t+=a[0],o.push({key:"V",data:[t]});break;case"S":o.push({key:"S",data:[...a]}),e=a[2],t=a[3];break;case"s":{const l=a.map((c,u)=>u%2?c+t:c+e);o.push({key:"S",data:l}),e=l[2],t=l[3];break}case"T":o.push({key:"T",data:[...a]}),e=a[0],t=a[1];break;case"t":e+=a[0],t+=a[1],o.push({key:"T",data:[e,t]});break;case"Z":case"z":o.push({key:"Z",data:[]}),e=s,t=r;break}return o}function $s(n){const e=[];let t="",s=0,r=0,o=0,i=0,a=0,l=0;for(const{key:c,data:u}of n){switch(c){case"M":e.push({key:"M",data:[...u]}),[s,r]=u,[o,i]=u;break;case"C":e.push({key:"C",data:[...u]}),s=u[4],r=u[5],a=u[2],l=u[3];break;case"L":e.push({key:"L",data:[...u]}),[s,r]=u;break;case"H":s=u[0],e.push({key:"L",data:[s,r]});break;case"V":r=u[0],e.push({key:"L",data:[s,r]});break;case"S":{let f=0,h=0;t==="C"||t==="S"?(f=s+(s-a),h=r+(r-l)):(f=s,h=r),e.push({key:"C",data:[f,h,...u]}),a=u[0],l=u[1],s=u[2],r=u[3];break}case"T":{const[f,h]=u;let d=0,p=0;t==="Q"||t==="T"?(d=s+(s-a),p=r+(r-l)):(d=s,p=r);const g=s+2*(d-s)/3,v=r+2*(p-r)/3,m=f+2*(d-f)/3,y=h+2*(p-h)/3;e.push({key:"C",data:[g,v,m,y,f,h]}),a=d,l=p,s=f,r=h;break}case"Q":{const[f,h,d,p]=u,g=s+2*(f-s)/3,v=r+2*(h-r)/3,m=d+2*(f-d)/3,y=p+2*(h-p)/3;e.push({key:"C",data:[g,v,m,y,d,p]}),a=f,l=h,s=d,r=p;break}case"A":{const f=Math.abs(u[0]),h=Math.abs(u[1]),d=u[2],p=u[3],g=u[4],v=u[5],m=u[6];f===0||h===0?(e.push({key:"C",data:[s,r,v,m,v,m]}),s=v,r=m):(s!==v||r!==m)&&(Ns(s,r,v,m,f,h,d,p,g).forEach(function(w){e.push({key:"C",data:w})}),s=v,r=m);break}case"Z":e.push({key:"Z",data:[]}),s=o,r=i;break}t=c}return e}function Fi(n){return Math.PI*n/180}function Fe(n,e,t){const s=n*Math.cos(t)-e*Math.sin(t),r=n*Math.sin(t)+e*Math.cos(t);return[s,r]}function Ns(n,e,t,s,r,o,i,a,l,c){const u=Fi(i);let f=[],h=0,d=0,p=0,g=0;if(c)[h,d,p,g]=c;else{[n,e]=Fe(n,e,-u),[t,s]=Fe(t,s,-u);const P=(n-t)/2,A=(e-s)/2;let D=P*P/(r*r)+A*A/(o*o);D>1&&(D=Math.sqrt(D),r=D*r,o=D*o);const T=a===l?-1:1,H=r*r,ne=o*o,Ne=H*ne-H*A*A-ne*P*P,x=H*A*A+ne*P*P,q=T*Math.sqrt(Math.abs(Ne/x));p=q*r*A/o+(n+t)/2,g=q*-o*P/r+(e+s)/2,h=Math.asin(parseFloat(((e-g)/o).toFixed(9))),d=Math.asin(parseFloat(((s-g)/o).toFixed(9))),nd&&(h=h-Math.PI*2),!l&&d>h&&(d=d-Math.PI*2)}let v=d-h;if(Math.abs(v)>Math.PI*120/180){const P=d,A=t,D=s;l&&d>h?d=h+Math.PI*120/180*1:d=h+Math.PI*120/180*-1,t=p+r*Math.cos(d),s=g+o*Math.sin(d),f=Ns(t,s,A,D,r,o,i,0,l,[d,P,p,g])}v=d-h;const m=Math.cos(h),y=Math.sin(h),w=Math.cos(d),b=Math.sin(d),S=Math.tan(v/4),_=4/3*r*S,E=4/3*o*S,C=[n,e],L=[n+_*y,e-E*m],j=[t+_*b,s-E*w],$=[t,s];if(L[0]=2*C[0]-L[0],L[1]=2*C[1]-L[1],c)return[L,j,$].concat(f);{f=[L,j,$].concat(f);const P=[];for(let A=0;A2){const r=[];for(let o=0;oMath.PI*2&&(d=0,p=Math.PI*2);const g=Math.PI*2/l.curveStepCount,v=Math.min(g/2,(p-d)/2),m=Jn(v,c,u,f,h,d,p,1,l);if(!l.disableMultiStroke){const y=Jn(v,c,u,f,h,d,p,1.5,l);m.push(...y)}return i&&(a?m.push(...le(c,u,c+f*Math.cos(d),u+h*Math.sin(d),l),...le(c,u,c+f*Math.cos(p),u+h*Math.sin(p),l)):m.push({op:"lineTo",data:[c,u]},{op:"lineTo",data:[c+f*Math.cos(d),u+h*Math.sin(d)]})),{type:"path",ops:m}}function Qn(n,e){const t=$s(Ls(Mn(n))),s=[];let r=[0,0],o=[0,0];for(const{key:i,data:a}of t)switch(i){case"M":{o=[a[0],a[1]],r=[a[0],a[1]];break}case"L":s.push(...le(o[0],o[1],a[0],a[1],e)),o=[a[0],a[1]];break;case"C":{const[l,c,u,f,h,d]=a;s.push(...Qi(l,c,u,f,h,d,o,e)),o=[h,d];break}case"Z":s.push(...le(o[0],o[1],r[0],r[1],e)),o=[r[0],r[1]];break}return{type:"path",ops:s}}function Vt(n,e){const t=[];for(const s of n)if(s.length){const r=e.maxRandomnessOffset||0,o=s.length;if(o>2){t.push({op:"move",data:[s[0][0]+M(r,e),s[0][1]+M(r,e)]});for(let i=1;iMath.PI*2&&(f=0,h=Math.PI*2);const d=(h-f)/i.curveStepCount,p=[];for(let g=f;g<=h;g=g+d)p.push([a+c*Math.cos(g),l+u*Math.sin(g)]);return p.push([a+c*Math.cos(h),l+u*Math.sin(h)]),p.push([a,l]),Me([p],i)}function Vi(n,e){return M(n,e)}function Ui(n,e,t){return wt(n,e,t)}function Wi(n,e,t,s,r){return le(n,e,t,s,r,!0)}function qn(n){const e=Object.assign({},n);return e.randomizer=void 0,n.seed&&(e.seed=n.seed+1),e}function Ds(n){return n.randomizer||(n.randomizer=new Ei(n.seed||0)),n.randomizer.next()}function wt(n,e,t,s=1){return t.roughness*s*(Ds(t)*(e-n)+n)}function M(n,e,t=1){return wt(-n,n,e,t)}function le(n,e,t,s,r,o=!1){const i=o?r.disableMultiStrokeFill:r.disableMultiStroke,a=rn(n,e,t,s,r,!0,!1);if(i)return a;const l=rn(n,e,t,s,r,!0,!0);return a.concat(l)}function rn(n,e,t,s,r,o,i){const a=Math.pow(n-t,2)+Math.pow(e-s,2),l=Math.sqrt(a);let c=1;l<200?c=1:l>500?c=.4:c=-.0016668*l+1.233334;let u=r.maxRandomnessOffset||0;u*u*100>a&&(u=l/10);const f=u/2,h=.2+Ds(r)*.2;let d=r.bowing*r.maxRandomnessOffset*(s-e)/200,p=r.bowing*r.maxRandomnessOffset*(n-t)/200;d=M(d,r,c),p=M(p,r,c);const g=[],v=()=>M(f,r,c),m=()=>M(u,r,c),y=r.preserveVertices;return i?g.push({op:"move",data:[n+(y?0:v()),e+(y?0:v())]}):g.push({op:"move",data:[n+(y?0:M(u,r,c)),e+(y?0:M(u,r,c))]}),i?g.push({op:"bcurveTo",data:[d+n+(t-n)*h+v(),p+e+(s-e)*h+v(),d+n+2*(t-n)*h+v(),p+e+2*(s-e)*h+v(),t+(y?0:v()),s+(y?0:v())]}):g.push({op:"bcurveTo",data:[d+n+(t-n)*h+m(),p+e+(s-e)*h+m(),d+n+2*(t-n)*h+m(),p+e+2*(s-e)*h+m(),t+(y?0:m()),s+(y?0:m())]}),g}function tt(n,e,t){if(!n.length)return[];const s=[];s.push([n[0][0]+M(e,t),n[0][1]+M(e,t)]),s.push([n[0][0]+M(e,t),n[0][1]+M(e,t)]);for(let r=1;r3){const o=[],i=1-t.curveTightness;r.push({op:"move",data:[n[1][0],n[1][1]]});for(let a=1;a+21&&r.push(o):r.push(o),r.push(n[e+3])}else{const i=n[e+0],a=n[e+1],l=n[e+2],c=n[e+3],u=ve(i,a,.5),f=ve(a,l,.5),h=ve(l,c,.5),d=ve(u,f,.5),p=ve(f,h,.5),g=ve(d,p,.5);on([i,u,d,g],0,t,r),on([g,p,h,c],0,t,r)}return r}function Gi(n,e){return kt(n,0,n.length,e)}function kt(n,e,t,s,r){const o=r||[],i=n[e],a=n[t-1];let l=0,c=1;for(let u=e+1;ul&&(l=f,c=u)}return Math.sqrt(l)>s?(kt(n,e,c+1,s,o),kt(n,c,t,s,o)):(o.length||o.push(i),o.push(a)),o}function an(n,e=.15,t){const s=[],r=(n.length-1)/3;for(let o=0;o0?kt(s,0,s.length,t):s}function xi(n,e,t){const s=Mn(n),r=$s(Ls(s)),o=[];let i=[],a=[0,0],l=[];const c=()=>{l.length>=4&&i.push(...an(l,e)),l=[]},u=()=>{c(),i.length&&(o.push(i),i=[])};for(const{key:h,data:d}of r)switch(h){case"M":u(),a=[d[0],d[1]],i.push(a);break;case"L":c(),i.push([d[0],d[1]]);break;case"C":if(!l.length){const p=i.length?i[i.length-1]:a;l.push([p[0],p[1]])}l.push([d[0],d[1]]),l.push([d[2],d[3]]),l.push([d[4],d[5]]);break;case"Z":c(),i.push([a[0],a[1]]);break}if(u(),!t)return o;const f=[];for(const h of o){const d=Gi(h,t);d.length&&f.push(d)}return f}const W="none";class Yi{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return As()}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,s){return{shape:e,sets:t||[],options:s||this.defaultOptions}}line(e,t,s,r,o){const i=this._o(o);return this._d("line",[K(e,t,s,r,i)],i)}rectangle(e,t,s,r,o){const i=this._o(o),a=[],l=Rs(e,t,s,r,i);if(i.fill){const c=[[e,t],[e+s,t],[e+s,t+r],[e,t+r]];i.fillStyle==="solid"?a.push(Vt([c],i)):a.push(Me([c],i))}return i.stroke!==W&&a.push(l),this._d("rectangle",a,i)}ellipse(e,t,s,r,o){const i=this._o(o),a=[],l=Is(s,r,i),c=sn(e,t,i,l);if(i.fill)if(i.fillStyle==="solid"){const u=sn(e,t,i,l).opset;u.type="fillPath",a.push(u)}else a.push(Me([c.estimatedPoints],i));return i.stroke!==W&&a.push(c.opset),this._d("ellipse",a,i)}circle(e,t,s,r){const o=this.ellipse(e,t,s,s,r);return o.shape="circle",o}linearPath(e,t){const s=this._o(t);return this._d("linearPath",[We(e,!1,s)],s)}arc(e,t,s,r,o,i,a=!1,l){const c=this._o(l),u=[],f=Wn(e,t,s,r,o,i,a,!0,c);if(a&&c.fill)if(c.fillStyle==="solid"){const h=Object.assign({},c);h.disableMultiStroke=!0;const d=Wn(e,t,s,r,o,i,!0,!1,h);d.type="fillPath",u.push(d)}else u.push(Bi(e,t,s,r,o,i,c));return c.stroke!==W&&u.push(f),this._d("arc",u,c)}curve(e,t){const s=this._o(t),r=[],o=Un(e,s);if(s.fill&&s.fill!==W)if(s.fillStyle==="solid"){const i=Un(e,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(i.ops)})}else{const i=[],a=e;if(a.length){const c=typeof a[0][0]=="number"?[a]:a;for(const u of c)u.length<3?i.push(...u):u.length===3?i.push(...an(Gn([u[0],u[0],u[1],u[2]]),10,(1+s.roughness)/2)):i.push(...an(Gn(u),10,(1+s.roughness)/2))}i.length&&r.push(Me([i],s))}return s.stroke!==W&&r.push(o),this._d("curve",r,s)}polygon(e,t){const s=this._o(t),r=[],o=We(e,!0,s);return s.fill&&(s.fillStyle==="solid"?r.push(Vt([e],s)):r.push(Me([e],s))),s.stroke!==W&&r.push(o),this._d("polygon",r,s)}path(e,t){const s=this._o(t),r=[];if(!e)return this._d("path",r,s);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=s.fill&&s.fill!=="transparent"&&s.fill!==W,i=s.stroke!==W,a=!!(s.simplification&&s.simplification<1),l=a?4-4*(s.simplification||1):(1+s.roughness)/2,c=xi(e,1,l),u=Qn(e,s);if(o)if(s.fillStyle==="solid")if(c.length===1){const f=Qn(e,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(f.ops)})}else r.push(Vt(c,s));else r.push(Me(c,s));return i&&(a?c.forEach(f=>{r.push(We(f,!1,s))}):r.push(u)),this._d("path",r,s)}opsToPath(e,t){let s="";for(const r of e.ops){const o=typeof t=="number"&&t>=0?r.data.map(i=>+i.toFixed(t)):r.data;switch(r.op){case"move":s+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":s+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":s+=`L${o[0]} ${o[1]} `;break}}return s.trim()}toPaths(e){const t=e.sets||[],s=e.options||this.defaultOptions,r=[];for(const o of t){let i=null;switch(o.type){case"path":i={d:this.opsToPath(o),stroke:s.stroke,strokeWidth:s.strokeWidth,fill:W};break;case"fillPath":i={d:this.opsToPath(o),stroke:W,strokeWidth:0,fill:s.fill||W};break;case"fillSketch":i=this.fillSketch(o,s);break}i&&r.push(i)}return r}fillSketch(e,t){let s=t.fillWeight;return s<0&&(s=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||W,strokeWidth:s,fill:W}}_mergedShape(e){return e.filter((t,s)=>s===0?!0:t.op!=="move")}}const Hs="http://www.w3.org/2000/svg",Zi=800;let Ut=null;function Xi(){return Ut||(Ut=new Yi().defaultOptions),Ut}function Wt(n,e,t){return{...Xi(),maxRandomnessOffset:2,roughness:n==="highlight"?3:1.5,bowing:1,stroke:"#000",strokeWidth:1.5,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,disableMultiStroke:n!=="double",disableMultiStrokeFill:!1,seed:e,...t}}function ea(n){const e=n.padding;if(e||e===0){if(typeof e=="number")return[e,e,e,e];if(Array.isArray(e)){const t=e;if(t.length)switch(t.length){case 4:return[...t];case 1:return[t[0],t[0],t[0],t[0]];case 2:return[...t,...t];case 3:return[...t,t[1]];default:return[t[0],t[1],t[2],t[3]]}}}return[5,5,5,5]}function ta(n,e,t,s,r,o){const i=[];let a=t.strokeWidth||2;const l=ea(t),c=t.animate===void 0?!0:!!t.animate,u=t.iterations||2,f=t.rtl?1:0,h=Wt("single",o,t);switch(t.type){case"underline":{const d=e.y+e.h+l[2];for(let p=f;py.setAttribute(w,b);for(const y of d){const w=document.createElementNS(Hs,"path");if(m(w,"d",y),m(w,"fill","none"),m(w,"stroke",t.color||"currentColor"),m(w,"stroke-width",`${a}`),t.opacity!==void 0&&m(w,"style",`opacity:${t.opacity}`),c){const b=w.getTotalLength();p.push(b),v+=b}n.appendChild(w),g.push(w)}if(c){let y=0;for(let w=0;wsetTimeout(e,n))}function na(n){const e=[];for(const t of n){let s="";for(const r of t.ops){const o=r.data;switch(r.op){case"move":s.trim()&&e.push(s.trim()),s=`M${o[0]} ${o[1]} `;break;case"bcurveTo":s+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":s+=`L${o[0]} ${o[1]} `;break}}s.trim()&&e.push(s.trim())}return e}function sa(){if(!window.__rno_kf_s){const n=window.__rno_kf_s=document.createElement("style");n.textContent="@keyframes rough-notation-dash { to { stroke-dashoffset: 0; } }",document.head.appendChild(n)}}var ra=Object.defineProperty,oa=(n,e,t)=>e in n?ra(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Y=(n,e,t)=>(oa(n,typeof e!="symbol"?e+"":e,t),t);class ia{constructor(e,t){Y(this,"_state","unattached"),Y(this,"_config"),Y(this,"_resizing",!1),Y(this,"_ro"),Y(this,"_seed",As()),Y(this,"_e"),Y(this,"_svg"),Y(this,"_lastSizes",[]),Y(this,"_animationDelay",0),Y(this,"_resizeListener",()=>{this._resizing||(this._resizing=!0,setTimeout(()=>{this._resizing=!1,this._state==="showing"&&this.haveRectsChanged()&&this.show()},400))}),Y(this,"pendingRefresh"),this._e=e,this._config=JSON.parse(JSON.stringify(t)),this.attach()}getConfig(e){return this._config[e]}setConfig(e,t){this._config[e]!==t&&(this._config[e]=t,this.refresh())}get animate(){return this._config.animate}set animate(e){this._config.animate=e}get animationDuration(){return this._config.animationDuration}set animationDuration(e){this._config.animationDuration=e}get iterations(){return this._config.iterations}set iterations(e){this._config.iterations=e}get color(){return this._config.color}set color(e){this._config.color!==e&&(this._config.color=e,this.refresh())}get class(){return this._config.class}set class(e){this._config.class!==e&&(this._config.class=e,this._svg&&this._svg.setAttribute("class",["rough-annotation",this._config.class||""].filter(Boolean).join(" ")))}get strokeWidth(){return this._config.strokeWidth}set strokeWidth(e){this._config.strokeWidth!==e&&(this._config.strokeWidth=e,this.refresh())}get padding(){return this._config.padding}set padding(e){this._config.padding!==e&&(this._config.padding=e,this.refresh())}attach(){if(this._state==="unattached"&&this._e.parentElement){sa();const e=this._svg=document.createElementNS(Hs,"svg");e.setAttribute("class",["rough-annotation",this._config.class||""].filter(Boolean).join(" "));const t=e.style;t.position="absolute",t.top="0",t.left="0",t.overflow="visible",t.pointerEvents="none",t.width="100px",t.height="100px";const s=this._config.type==="highlight";if(this._e.insertAdjacentElement(s?"beforebegin":"afterend",e),this._state="not-showing",s){const r=window.getComputedStyle(this._e).position;(!r||r==="static")&&(this._e.style.position="relative")}this.attachListeners()}}detachListeners(){window.removeEventListener("resize",this._resizeListener),this._ro&&this._ro.unobserve(this._e)}attachListeners(){this.detachListeners(),window.addEventListener("resize",this._resizeListener,{passive:!0}),!this._ro&&"ResizeObserver"in window&&(this._ro=new window.ResizeObserver(e=>{for(const t of e)t.contentRect&&this._resizeListener()})),this._ro&&this._ro.observe(this._e)}haveRectsChanged(){if(this._lastSizes.length){const e=this.rects();if(e.length===this._lastSizes.length){for(let t=0;tMath.round(r)===Math.round(o);return s(e.x,t.x)&&s(e.y,t.y)&&s(e.w,t.w)&&s(e.h,t.h)}isShowing(){return this._state!=="not-showing"}refresh(){this.isShowing()&&!this.pendingRefresh&&(this.pendingRefresh=Promise.resolve().then(()=>{this.isShowing()&&this.show(),delete this.pendingRefresh}))}async show(){switch(this._state){case"unattached":break;case"showing":this.hide(),this._svg&&await this.render(this._svg,!0);break;case"not-showing":this.attach(),this._svg&&await this.render(this._svg,!1);break}}hide(){if(this._svg)for(;this._svg.lastChild;)this._svg.removeChild(this._svg.lastChild);this._state="not-showing"}remove(){this._svg&&this._svg.parentElement&&this._svg.parentElement.removeChild(this._svg),this._svg=void 0,this._state="unattached",this.detachListeners()}async render(e,t){let s=this._config;t&&(s=JSON.parse(JSON.stringify(this._config)),s.animate=!1);const r=this.rects();let o=0;r.forEach(c=>o+=c.w);const i=s.animationDuration||Zi;let a=0;const l=[];for(let c=0;cObject.assign(n,{type:"box"}),circle:n=>Object.assign(n,{type:"circle"}),underline:n=>Object.assign(n,{type:"underline"}),highlight:n=>Object.assign(n,{type:"highlight"}),"strike-through":n=>Object.assign(n,{type:"strike-through"}),"crossed-off":n=>Object.assign(n,{type:"crossed-off"}),bracket:n=>Object.assign(n,{type:"bracket"}),strike:n=>Object.assign(n,{type:"strike-through"}),cross:n=>Object.assign(n,{type:"crossed-off"}),crossed:n=>Object.assign(n,{type:"crossed-off"}),linethrough:n=>Object.assign(n,{type:"strike-through"}),"line-through":n=>Object.assign(n,{type:"strike-through"}),black:n=>U(n,"text-black"),blue:n=>U(n,"text-blue"),cyan:n=>U(n,"text-cyan"),gray:n=>U(n,"text-gray"),green:n=>U(n,"text-green"),indigo:n=>U(n,"text-indigo"),lime:n=>U(n,"text-lime"),orange:n=>U(n,"text-orange"),pink:n=>U(n,"text-pink"),purple:n=>U(n,"text-purple"),red:n=>U(n,"text-red"),teal:n=>U(n,"text-teal"),white:n=>U(n,"text-white"),yellow:n=>U(n,"text-yellow")},la=[[/^delay-?(\d+)?$/,(n,e,t)=>{const s=(n[1]?Number.parseInt(n[1]):t)||300;return e.delay=s,e}],[/^(?:op|opacity)-?(\d+)?$/,(n,e,t)=>{const s=(n[1]?Number.parseInt(n[1]):t)||100;return e.opacity=s/100,e}]];function ca(){return{install(n){n.directive("mark",{name:"v-mark",mounted:(e,t)=>{const s=k(()=>{const i=typeof t.value=="object"&&!Array.isArray(t.value)?{...t.value}:{at:t.value};let a={at:i.at};const l=Object.entries(t.modifiers).filter(([u,f])=>{if(Yn[u])return a=Yn[u](a,f),!1;for(const[h,d]of la){const p=u.match(h);if(p)return a=d(p,a,f),!1}return!0});l.length&&console.warn("[Slidev] Invalid modifiers for v-mark:",l);const c={...a,...i};return c.type||(c.type="underline"),c}),r=aa(e,s.value),o=ut(e,t,s.value.at);if(!o){r.show();return}e.watchStopHandle=Te(()=>{let i;s.value.class&&(r.class=s.value.class),s.value.color&&(r.color=s.value.color);const a=s.value.at;a===!0?i=!0:a===!1?i=!1:i=o.isActive.value,i!=null&&(i?r.show():r.hide())})},unmounted:e=>{var t;(t=e.watchStopHandle)==null||t.call(e)}})}}}const qa=O(!1),Ka=O(!1),Ja=O(!1),ua=O(!1),Ga=O(!0),xa=nr({xs:460,...lr}),_t=sr(),Ya=rr(),Za=k(()=>_t.height.value-_t.width.value/wr.value>120),Xa=or(fn?document.body:null),Fs=ir(),el=k(()=>{var n;return["INPUT","TEXTAREA"].includes(((n=Fs.value)==null?void 0:n.tagName)||"")}),tl=k(()=>{var n;return["BUTTON","A"].includes(((n=Fs.value)==null?void 0:n.tagName)||"")});te("slidev-camera","default",{listenToStorageChanges:!1});te("slidev-mic","default",{listenToStorageChanges:!1});const fa=te("slidev-scale",0),nl=te("slidev-wake-lock",!0),sl=te("slidev-presenter-cursor",!0,{listenToStorageChanges:!1}),ha=te("slidev-show-editor",!1,{listenToStorageChanges:!1}),da=te("slidev-editor-vertical",!1,{listenToStorageChanges:!1}),pa=te("slidev-editor-width",fn?window.innerWidth*.4:318,{listenToStorageChanges:!1}),ga=te("slidev-editor-height",fn?window.innerHeight*.4:300,{listenToStorageChanges:!1}),nt=un(null),St=te("slidev-presenter-font-size",1,{listenToStorageChanges:!1}),st=te("slidev-presenter-layout",1,{listenToStorageChanges:!1});function rl(){st.value=st.value+1,st.value>2&&(st.value=1)}function ol(){St.value=Math.min(2,St.value+.1)}function il(){St.value=Math.max(.5,St.value-.1)}const al=ar(ua);function ma(n=Xn(ps,O())){const e=cr(n),t=X([ha,da,pa,ga,fa,_t.width,_t.height],()=>{setTimeout(e.update,300)},{flush:"post",immediate:!0});return{...e,stop:t}}function va(n){return()=>{}}function ya(n,e,t,s=!1){var q;function r(N){return n?Le(n,N):hr(N)}const o=r(dn),i=r(_o)??{},a=r(hn),l=k(()=>va(a.value)),c=r(bo)??O(1),u=r(So)??O(1),{left:f,top:h,stop:d}=ma(r(ps)??O()),p=["slide","presenter"].includes(o.value);let g=n?"directive":"prop",v=_n(),m;if(Array.isArray(e)?m=e:typeof e=="string"&&e.includes(",")?m=e.split(",").map(Number):e!=null&&(g="frontmatter",v=`${e}`,e=(q=i==null?void 0:i.dragPos)==null?void 0:q[v],m=e==null?void 0:e.split(",").map(Number)),g!=="frontmatter"&&!t)throw new Error("[Slidev] Can not identify the source position of the v-drag element, please provide an explicit `id` prop.");const y=[d],w=!s&&e!=null&&!Number.isFinite(m==null?void 0:m[3]);m??(m=[Number.NaN,Number.NaN,0]);const b=O(m[2]),S=O(m[0]+m[2]/2),_=O(s?0:m[4]??0),E=k(()=>_.value*Math.PI/180),C=k(()=>Math.sin(E.value)),L=k(()=>Math.cos(E.value)),j=O(),$=O({left:0,top:0,width:0,height:0}),P=O(0);function A(){if(!j.value)return;const N=j.value.getBoundingClientRect();$.value={left:N.left/u.value,top:N.top/u.value,width:N.width/u.value,height:N.height/u.value},P.value=($.value.width+$.value.height)/c.value/(Math.abs(C.value)+Math.abs(L.value))-b.value}y.push(X(b,A,{flush:"post"}));const D=O(m[3]??0),T=w?k({get:()=>(w?P.value:D.value)||0,set:N=>!w&&(D.value=N)}):D,H=w?O(m[1]):O(m[1]+m[3]/2),ne=w?k({get:()=>H.value+T.value/2,set:N=>H.value=N-T.value/2}):H,Ne=k(()=>Number.isFinite(S.value)?{position:"absolute",zIndex:100,left:`${S.value-b.value/2}px`,top:`${ne.value-T.value/2}px`,width:`${b.value}px`,height:w?void 0:`${T.value}px`,transformOrigin:"center center",transform:`rotate(${_.value}deg)`}:{position:"absolute",zIndex:100});y.push(X([S,ne,b,T,_],([N,ue,Re,Ie,On])=>{let _e=[N-Re/2,ue-Ie/2,Re].map(Math.round).join();w?_e+=g==="directive"?",NaN":",_":_e+=`,${Math.round(Ie)}`,Math.round(On)!==0&&(_e+=`,${Math.round(On)}`),g==="directive"&&(_e=`[${_e}]`),l.value(v,_e,g,t)}));const x={dragId:v,dataSource:g,markdownSource:t,isArrow:s,zoom:u,autoHeight:w,x0:S,y0:ne,width:b,height:T,rotate:_,container:j,containerStyle:Ne,watchStopHandles:y,dragging:k(()=>nt.value===x),mounted(){p&&(A(),e||setTimeout(()=>{A(),S.value=($.value.left+$.value.width/2-f.value)/c.value,ne.value=($.value.top-h.value)/c.value,b.value=$.value.width/c.value,T.value=$.value.height/c.value},100))},unmounted(){p&&x.stopDragging()},startDragging(){A(),nt.value=x},stopDragging(){nt.value===x&&(nt.value=null)}};return y.push(ur(j,N=>{const ue=document.querySelector("#drag-control-container");ue&&N.target&&ue.contains(N.target)||x.stopDragging()}),X(fr(),N=>{N||x.stopDragging()})),x}function wa(){return{install(n){n.directive("drag",{name:"v-drag",created(e,t,s){var o;const r=ya(t,t.value,(o=s.props)==null?void 0:o.markdownSource);s.props&&(s.props={...s.props},delete s.props.markdownSource),r.container.value=e,e.draggingState=r,e.dataset.dragId=r.dragId,r.watchStopHandles.push(X(r.containerStyle,i=>{for(const[a,l]of Object.entries(i))l&&(e.style[a]=l)},{immediate:!0})),e.addEventListener("dblclick",r.startDragging)},mounted(e){e.draggingState.mounted()},unmounted(e){const t=e.draggingState;t.unmounted(),e.removeEventListener("dblclick",t.startDragging),t.watchStopHandles.forEach(s=>s())}})}}}function ba(){return{install(n){const e=dr();n.directive("motion",{name:"v-motion",mounted(t,s,r,o){var w,b,S;const i=Le(s,Pt),a=Le(s,hn),l=Le(s,dn),{currentPage:c,clicks:u,isPrintMode:f}=Xt(),h=r.props={...r.props},d={...h.initial,...(w=h.variants)==null?void 0:w["slidev-initial"]},p={...h.enter,...(b=h.variants)==null?void 0:b["slidev-enter"]},g={...h.leave,...(S=h.variants)==null?void 0:S["slidev-leave"]};delete h.initial,delete h.enter,delete h.leave;const v=`${_n()}-`,m=[];for(const _ of Object.keys(h))if(_.startsWith("click-")){const E=_.slice(6),C=E.includes("-")?E.split("-").map(Number):+E,L=v+E;m.push({id:L,at:C,variant:{...h[_]},info:i==null?void 0:i.value.calculate(C)}),delete h[_]}m.sort((_,E)=>(Array.isArray(_.at)?_.at[0]:_.at)-(Array.isArray(E.at)?E.at[0]:E.at)),e.created(t,s,r,o),e.mounted(t,s,r,o);const y=t.motionInstance;y.clickIds=m.map(_=>_.id),y.set(d),y.watchStopHandle=X([a,c,u].filter(Boolean),()=>{var E;const _=((E=Cs.get(t))==null?void 0:E.visibilityState.value)??"shown";if(!(i!=null&&i.value)||!["slide","presenter"].includes((l==null?void 0:l.value)??"")){const C={...d,...p};for(const{variant:L}of m)Object.assign(C,L);y.set(C)}else if(f.value||(a==null?void 0:a.value)===c.value)if(_==="shown"){const C={...d,...p};for(const{variant:L,info:j}of m)(!j||j.isActive.value)&&Object.assign(C,L);f.value?y.set(C):y.apply(C)}else y.apply(_==="before"?d:g);else y.apply(((a==null?void 0:a.value)??-1)>c.value?d:g)},{immediate:!0})},unmounted(t){t.motionInstance.watchStopHandle()}})}}}const ka=[];function _a(){const n=[];{let e=function(t){if(!z.remote||z.remote===t.query.password)return!0;if(z.remote&&t.query.password===void 0){const s=prompt("Enter password");if(z.remote===s)return!0}return t.params.no?{path:`/${t.params.no}`}:{path:""}};n.push({name:"entry",path:"/entry",component:()=>Z(()=>import("./slidev/entry-CfOhylDU.js"),__vite__mapDeps([17,18,1,3,4,5,6,7,19]))},{name:"overview",path:"/overview",component:()=>Z(()=>import("./slidev/overview-DLIALU7m.js"),__vite__mapDeps([20,18,1,3,4,5,21,2,22,23,24,25,6,7]))},{name:"notes",path:"/notes",component:()=>Z(()=>import("./slidev/notes-h7c9XeN0.js"),__vite__mapDeps([26,18,1,3,4,5,24,25,23,6,7])),beforeEnter:e},{name:"presenter",path:"/presenter/:no",component:()=>Z(()=>import("./slidev/presenter-Dpmh3Akx.js"),__vite__mapDeps([27,18,1,28,21,3,4,5,2,22,23,6,7,29,24,25,30,31,32])),beforeEnter:e},{path:"/presenter",redirect:{path:"/presenter/1"}})}return n.push({name:"play",path:"/:no",component:()=>Z(()=>import("./slidev/play-Bc53t-gn.js"),__vite__mapDeps([33,1,28,21,3,4,5,18,2,22,23,6,7,29,34]))},{path:"",redirect:{path:"/1"}},{path:"/:pathMatch(.*)*",name:"NotFound",component:()=>Z(()=>import("./slidev/404-Bg3XtBLk.js"),__vite__mapDeps([35,1,3,4,5,6,7,36]))}),ka.reduce((e,t)=>t(e),n)}function Sa(n){return n}var Ma=Sa;/*! + * qrcode.vue v3.4.1 + * A Vue.js component to generate QRCode. + * © 2017-2023 @scopewu(https://github.com/scopewu) + * MIT License. + */var Mt=function(){return Mt=Object.assign||function(e){for(var t,s=1,r=arguments.length;si.MAX_VERSION)throw new RangeError("Version value out of range");if(u<-1||u>7)throw new RangeError("Mask value out of range");this.size=a*4+17;for(var f=[],h=0;h7)throw new RangeError("Invalid value");var d,p;for(d=c;;d++){var g=i.getNumDataCodewords(d,l)*8,v=o.getTotalBits(a,d);if(v<=g){p=v;break}if(d>=u)throw new RangeError("Data too long")}for(var m=0,y=[i.Ecc.MEDIUM,i.Ecc.QUARTILE,i.Ecc.HIGH];m>>3]|=D<<7-(T&7)}),new i(d,l,A,f)},i.prototype.getModule=function(a,l){return 0<=a&&a>>9)*1335;var f=(l<<10|c)^21522;r(f>>>15==0);for(var u=0;u<=5;u++)this.setFunctionModule(8,u,s(f,u));this.setFunctionModule(8,7,s(f,6)),this.setFunctionModule(8,8,s(f,7)),this.setFunctionModule(7,8,s(f,8));for(var u=9;u<15;u++)this.setFunctionModule(14-u,8,s(f,u));for(var u=0;u<8;u++)this.setFunctionModule(this.size-1-u,8,s(f,u));for(var u=8;u<15;u++)this.setFunctionModule(8,this.size-15+u,s(f,u));this.setFunctionModule(8,this.size-8,!0)},i.prototype.drawVersion=function(){if(!(this.version<7)){for(var a=this.version,l=0;l<12;l++)a=a<<1^(a>>>11)*7973;var c=this.version<<12|a;r(c>>>18==0);for(var l=0;l<18;l++){var u=s(c,l),f=this.size-11+l%3,h=Math.floor(l/3);this.setFunctionModule(f,h,u),this.setFunctionModule(h,f,u)}}},i.prototype.drawFinderPattern=function(a,l){for(var c=-4;c<=4;c++)for(var u=-4;u<=4;u++){var f=Math.max(Math.abs(u),Math.abs(c)),h=a+u,d=l+c;0<=h&&h=d)&&S.push(C[E])})},m=0;m=1;c-=2){c==6&&(c=5);for(var u=0;u>>3],7-(l&7)),l++)}}r(l==a.length*8)},i.prototype.applyMask=function(a){if(a<0||a>7)throw new RangeError("Mask value out of range");for(var l=0;l5&&a++):(this.finderPenaltyAddHistory(u,f),c||(a+=this.finderPenaltyCountPatterns(f)*i.PENALTY_N3),c=this.modules[l][h],u=1);a+=this.finderPenaltyTerminateAndCount(c,u,f)*i.PENALTY_N3}for(var h=0;h5&&a++):(this.finderPenaltyAddHistory(d,f),c||(a+=this.finderPenaltyCountPatterns(f)*i.PENALTY_N3),c=this.modules[l][h],d=1);a+=this.finderPenaltyTerminateAndCount(c,d,f)*i.PENALTY_N3}for(var l=0;li.MAX_VERSION)throw new RangeError("Version number out of range");var l=(16*a+128)*a+64;if(a>=2){var c=Math.floor(a/7)+2;l-=(25*c-10)*c-55,a>=7&&(l-=36)}return r(208<=l&&l<=29648),l},i.getNumDataCodewords=function(a,l){return Math.floor(i.getNumRawDataModules(a)/8)-i.ECC_CODEWORDS_PER_BLOCK[l.ordinal][a]*i.NUM_ERROR_CORRECTION_BLOCKS[l.ordinal][a]},i.reedSolomonComputeDivisor=function(a){if(a<1||a>255)throw new RangeError("Degree out of range");for(var l=[],c=0;c>>8||l>>>8)throw new RangeError("Byte out of range");for(var c=0,u=7;u>=0;u--)c=c<<1^(c>>>7)*285,c^=(l>>>u&1)*a;return r(c>>>8==0),c},i.prototype.finderPenaltyCountPatterns=function(a){var l=a[1];r(l<=this.size*3);var c=l>0&&a[2]==l&&a[3]==l*3&&a[4]==l&&a[5]==l;return(c&&a[0]>=l*4&&a[6]>=l?1:0)+(c&&a[6]>=l*4&&a[0]>=l?1:0)},i.prototype.finderPenaltyTerminateAndCount=function(a,l,c){return a&&(this.finderPenaltyAddHistory(l,c),l=0),l+=this.size,this.finderPenaltyAddHistory(l,c),this.finderPenaltyCountPatterns(c)},i.prototype.finderPenaltyAddHistory=function(a,l){l[0]==0&&(a+=this.size),l.pop(),l.unshift(a)},i.MIN_VERSION=1,i.MAX_VERSION=40,i.PENALTY_N1=3,i.PENALTY_N2=3,i.PENALTY_N3=40,i.PENALTY_N4=10,i.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],i.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],i}();n.QrCode=e;function t(i,a,l){if(a<0||a>31||i>>>a)throw new RangeError("Value out of range");for(var c=a-1;c>=0;c--)l.push(i>>>c&1)}function s(i,a){return(i>>>a&1)!=0}function r(i){if(!i)throw new Error("Assertion error")}var o=function(){function i(a,l,c){if(this.mode=a,this.numChars=l,this.bitData=c,l<0)throw new RangeError("Invalid argument");this.bitData=c.slice()}return i.makeBytes=function(a){for(var l=[],c=0,u=a;c=1<-1}}}),Oa=Je({name:"QRCodeSvg",props:Pn,setup:function(n){var e=O(0),t=O(""),s=function(){var r=n.value,o=n.level,i=n.margin,a=Ae.QrCode.encodeText(r,En[o]).getModules();e.value=a.length+i*2,t.value=Bs(a,i)};return s(),ss(s),function(){return Be("svg",{width:n.size,height:n.size,"shape-rendering":"crispEdges",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(e.value," ").concat(e.value)},[Be("path",{fill:n.background,d:"M0,0 h".concat(e.value,"v").concat(e.value,"H0z")}),Be("path",{fill:n.foreground,d:t.value})])}}}),Ca=Je({name:"QRCodeCanvas",props:Pn,setup:function(n){var e=O(null),t=function(){var s=n.value,r=n.level,o=n.size,i=n.margin,a=n.background,l=n.foreground,c=e.value;if(c){var u=c.getContext("2d");if(u){var f=Ae.QrCode.encodeText(s,En[r]).getModules(),h=f.length+i*2,d=window.devicePixelRatio||1,p=o/h*d;c.height=c.width=o*d,u.scale(p,p),u.fillStyle=a,u.fillRect(0,0,h,h),u.fillStyle=l,Ea?u.fill(new Path2D(Bs(f,i))):f.forEach(function(g,v){g.forEach(function(m,y){m&&u.fillRect(y+i,v+i,1,1)})})}}};return cn(t),ss(t),function(){return Be("canvas",{ref:e,style:{width:"".concat(n.size,"px"),height:"".concat(n.size,"px")}})}}}),Aa=Je({name:"Qrcode",render:function(){var n=this.$props,e=n.renderAs,t=n.value,s=n.size,r=n.margin,o=n.level,i=n.background,a=n.foreground,l=s>>>0,c=r>>>0,u=zs(o)?o:js;return Be(e==="svg"?Oa:Ca,{value:t,size:l,margin:c,level:u,background:i,foreground:a})},props:Pa});const Ta=Ma(({app:n,router:e})=>{n.component("QRCode",Aa)}),La=[Ta];async function $a(n){function e(){document.documentElement.style.setProperty("--vh",`${window.innerHeight*.01}px`)}e(),window.addEventListener("resize",e);const t=pr({history:gr("/lectures/week_01/test1/"),routes:_a()});n.use(t),n.use(lo()),n.use(Mi()),n.use(ca()),n.use(wa()),n.use(ba()),n.use(br,{container:"#twoslash-container"});const s={app:n,router:t};for(const r of La)await r(s)}const Vs=mr(Si);$a(Vs);Vs.mount("#app");export{Va as $,Ga as A,tl as B,it as C,el as D,fa as E,nl as F,xa as G,Fs as H,rl as I,Lt as J,bo as K,ma as L,pn as M,ps as N,za as O,ja as P,Fa as Q,Ba as R,_o as S,hn as T,dn as U,Pt as V,So as W,Wa as X,_n as Y,ko as Z,ni as _,Xt as a,Eo as a0,Os as b,ti as c,Ua as d,sl as e,Xa as f,Ce as g,ha as h,St as i,ol as j,il as k,qa as l,Ka as m,Za as n,da as o,st as p,se as q,nt as r,Ha as s,ua as t,uo as u,al as v,_t as w,Ja as x,Ya as y,Qa as z}; diff --git a/week_01/test1/assets/md-B2t6eFbF.js b/week_01/test1/assets/md-B2t6eFbF.js new file mode 100644 index 0000000..29766f3 --- /dev/null +++ b/week_01/test1/assets/md-B2t6eFbF.js @@ -0,0 +1 @@ +import{z as _,o as c,b as d,e,f as l,i as p,c as h,k as f,q as $,s as v,I as n,ab as t}from"./modules/vue-Bx6xSt6e.js";import{u as i,f as k}from"./slidev/context-CPMMc1kN.js";import"./index-BhiEEYhA.js";import"./monaco/bundled-types-CutNYhe2.js";import"./modules/file-saver-igGfcqei.js";import"./modules/shiki-BeZKuXrB.js";const x={class:"myauto w-full"},w={class:"note absolute bottom-3"},C={__name:"cover",props:{color:{default:"white"}},setup(o){i();const r=o,a=_(()=>`neversink-${r.color}-scheme`);return(s,u)=>(c(),d("div",{class:p(["slidev-layout cover h-full slidecolor",a.value])},[e("div",x,[l(s.$slots,"default")]),e("div",w,[l(s.$slots,"note")])],2))}},b=e("h1",null,"Test",-1),B=e("p",null,[t("This is a "),e("em",null,"test"),t(" of "),e("mark",null,"neversink"),t(" with a "),e("strong",null,"custom"),t(" color scheme!")],-1),T=e("p",null,"I hope this works?",-1),g={__name:"slides.md__slidev_1",setup(o){const{$slidev:r,$nav:a,$clicksContext:s,$clicks:u,$page:z,$renderContext:P,$frontmatter:m}=i();return s.setup(),(y,I)=>(c(),h(C,$(v(n(k)(n(m),0))),{default:f(()=>[b,B,T]),_:1},16))}},j=g;export{j as default}; diff --git a/week_01/test1/assets/md-BV_QmVfM.js b/week_01/test1/assets/md-BV_QmVfM.js new file mode 100644 index 0000000..973575d --- /dev/null +++ b/week_01/test1/assets/md-BV_QmVfM.js @@ -0,0 +1 @@ +import{r as n,o as c,c as i,k as e,l as p,q as m,s as l,I as t,e as _}from"./modules/vue-Bx6xSt6e.js";import{I as d}from"./side-title-BzlhspPS.js";import{u,f}from"./slidev/context-CPMMc1kN.js";import"./layoutHelper-BN7rjZLy.js";import"./index-BhiEEYhA.js";import"./monaco/bundled-types-CutNYhe2.js";import"./modules/file-saver-igGfcqei.js";import"./modules/shiki-BeZKuXrB.js";const h=_("h1",null,"Check out these slides yourself!",-1),C={__name:"slides.md__slidev_2",setup($){const{$slidev:k,$nav:v,$clicksContext:o,$clicks:x,$page:P,$renderContext:g,$frontmatter:s}=u();return o.setup(),(w,B)=>{const r=n("QRCode");return c(),i(d,m(l(t(f)(t(s),1))),{title:e(a=>[h]),content:e(a=>[p(r,{value:"https://christopherwmm.github.io/lectures/week_01/test1/",size:300,"render-as":"svg"})]),_:1},16)}}},j=C;export{j as default}; diff --git a/week_01/test1/assets/md-DBrHLyLI.js b/week_01/test1/assets/md-DBrHLyLI.js new file mode 100644 index 0000000..c47d548 --- /dev/null +++ b/week_01/test1/assets/md-DBrHLyLI.js @@ -0,0 +1 @@ +import{d as P,aF as E,t as b,S as j,o as i,b as p,g as S,i as m,F as B,aD as F,z as x,e,ab as n,x as y,f as _,aE as I,p as L,a as V,c as M,k as $,l as N,q,s as z,I as C}from"./modules/vue-Bx6xSt6e.js";import{u as T,f as A}from"./slidev/context-CPMMc1kN.js";import{c as D,a as k}from"./layoutHelper-BN7rjZLy.js";import{_ as H}from"./index-BhiEEYhA.js";import"./monaco/bundled-types-CutNYhe2.js";import"./modules/file-saver-igGfcqei.js";import"./modules/shiki-BeZKuXrB.js";const J={key:0},O=["innerHTML"],R=P({__name:"Excalidraw",props:{drawFilePath:{},darkMode:{type:Boolean,default:!1},background:{type:Boolean,default:!1}},setup(r){T(),E();const a=b(!1),c=b(null),o=r;j(()=>{a.value=!0,g(["https://cdn.jsdelivr.net/npm/react@18.2.0/umd/react.production.min.js","https://cdn.jsdelivr.net/npm/react-dom@18.2.0/umd/react-dom.production.min.js","https://cdn.jsdelivr.net/npm/@excalidraw/excalidraw/dist/excalidraw.production.min.js"]).then(()=>{v(o)}).finally(()=>{a.value=!1})});const v=async({drawFilePath:l,darkMode:d=!1,background:u=!1})=>{try{const s=new URL(l,window.location.origin+"/lectures/week_01/test1/").href,h=await(await fetch(s)).json(),w=await ExcalidrawLib.exportToSvg({...h,appState:{...h.appState,exportWithDarkMode:d,exportBackground:u}});w.style.maxWidth="100%",w.style.height="auto",c.value=w.outerHTML}catch(s){console.error("Failed to load JSON or export to SVG",s)}};function t(l){return new Promise((d,u)=>{if(document.querySelector(`script[src="${l}"]`)){d("success");return}const s=document.createElement("script");s.src=l,s.onload=d,s.onerror=u,document.head.appendChild(s)})}function g(l){const d=l.map(u=>t(u));return Promise.all(d)}return(l,d)=>(i(),p(B,null,[a.value?(i(),p("p",J,"Loading Excalidraw...")):S("v-if",!0),c.value?(i(),p("div",{key:1,class:m(l.$attrs.class),innerHTML:c.value},null,10,O)):S("v-if",!0)],64))}}),f=r=>(L("data-v-3310aa71"),r=r(),V(),r),W={key:0,class:"slidev-layout default error"},G=f(()=>e("span",{class:"ns-c-warning"},[e("b",null,"Error"),n(": invalid layout params.")],-1)),U=f(()=>e("hr",null,null,-1)),K=f(()=>e("code",null,"columns",-1)),Q=f(()=>e("code",null,"align",-1)),X=f(()=>e("code",null,"color",-1)),Y=I("

The "slots" of the page are default :: title ::, :: left ::, and :: right ::

Options for columns are divided into 12 column units. So with columns: is-1-11 the left column is 1/12 wide and the the right columns is 11/12 wide. The component admits a short had of only specifying the left column (columns: is-1 does the same thing). In addition there are short hands like columns: is-one-quarter which resolves to is-3-9, etc...

The align parameter determines how the columns look. The notation is for example align: c-cm-cm. The first part is for the title, the second for the left column, and the third part is for the right column. The first letter is (c for center, l for left, r for right). This applies to all three second. For the columns the second letter is vertical alignment (t for top, m for middle, b for bottom).

The color parameter determines color of the title.

",4),Z={key:1},ee={class:"flex flex-col h-full w-full"},te={class:"slidev-layout toptitle content w-full"},ae={class:"flex flex-row h-full w-full"},oe={key:0,class:"h-fit w-full"},le={__name:"top-title-two-cols",props:{columns:{default:"is-one-half"},align:{default:"l-lt-lt"},color:{default:"light"}},setup(r){F(t=>({"76f4b01a":c.value.l,"76f4b00e":c.value.r})),T();const a=r,c=x(()=>D(a.columns)),o=x(()=>{const t=a.align.split("-");return{t:k(t[0]),l:k(t[1]),r:k(t[2])}}),v=x(()=>`neversink-${a.color}-scheme`);return(t,g)=>c.value=="error"||o.value.t=="error"||o.value.l=="error"||o.value.r=="error"?(i(),p("div",W,[G,U,e("p",null,[n(" There are three parameters: "),K,n(", "),Q,n(", and "),X,n(". Currently: "),e("code",null,"columns: "+y(a.columns),1),n(", "),e("code",null,"align: "+y(a.align),1),n(", and "),e("code",null,"color: "+y(a.color),1),n(". ")]),Y])):(i(),p("div",Z,[e("div",ee,[e("div",{class:m(["w-full h-fit min-h-13 pt-2 pb-2 slidecolor",v.value])},[e("div",{class:m(["slidev-layout toptitle title p-0 ml-6 mr-6 mt-auto mb-auto",o.value.t])},[_(t.$slots,"title",{},void 0,!0)],2)],2),e("div",te,[e("div",ae,[e("div",{class:m(["col-left",o.value.l])},[_(t.$slots,"left",{},void 0,!0)],2),e("div",{class:m(["col-right",o.value.r])},[_(t.$slots,"right",{},void 0,!0)],2)])]),t.$slots.default?(i(),p("div",oe,[_(t.$slots,"default",{},void 0,!0)])):S("v-if",!0)])]))}},se=H(le,[["__scopeId","data-v-3310aa71"]]),ne=e("h1",null,"This has a list of things and a drawing",-1),re=e("ul",null,[e("li",null,[n("A "),e("ul",null,[e("li",null,"a"),e("li",null,"aa")])]),e("li",null,[n("B "),e("ul",null,[e("li",null,"b")])]),e("li",null,"C")],-1),ce={__name:"slides.md__slidev_4",setup(r){const{$slidev:a,$nav:c,$clicksContext:o,$clicks:v,$page:t,$renderContext:g,$frontmatter:l}=T();return o.setup(),(d,u)=>{const s=R;return i(),M(se,q(z(C(A)(C(l),3))),{title:$(h=>[ne]),left:$(h=>[re]),right:$(h=>[N(s,{drawFilePath:"./test.excalidraw"})]),_:1},16)}}},ve=ce;export{ve as default}; diff --git a/week_01/test1/assets/md-Dx23vpFk.js b/week_01/test1/assets/md-Dx23vpFk.js new file mode 100644 index 0000000..5fe6568 --- /dev/null +++ b/week_01/test1/assets/md-Dx23vpFk.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/slidev/CodeRunner-CqGqxUsJ.js","assets/modules/unplugin-icons-B74mOkCF.js","assets/modules/vue-Bx6xSt6e.js","assets/monaco/bundled-types-CutNYhe2.js","assets/modules/file-saver-igGfcqei.js","assets/monaco/bundled-types-GI7L-5Qk.css","assets/slidev/context-CPMMc1kN.js","assets/index-BhiEEYhA.js","assets/modules/shiki-BeZKuXrB.js","assets/modules/shiki-BPvBenZD.css","assets/index-LNVs1Z9b.css","assets/slidev/IconButton.vue_vue_type_script_setup_true_lang-C6q09ciw.js","assets/CodeRunner-YBfxSSx9.css"])))=>i.map(i=>d[i]); +import{_ as $,k as Y}from"./monaco/bundled-types-CutNYhe2.js";import{d as q,t as S,z as N,aC as J,S as F,n as j,o as T,b as G,e as E,h as X,c as Z,I as k,g as ee,W as te,k as H,l as oe,m as ne,q as re,s as ie,ab as P}from"./modules/vue-Bx6xSt6e.js";import{a as ae}from"./modules/file-saver-igGfcqei.js";import{a as se,Y as Q}from"./index-BhiEEYhA.js";import{u as I,f as le}from"./slidev/context-CPMMc1kN.js";import{I as ue}from"./side-title-BzlhspPS.js";import"./modules/shiki-BeZKuXrB.js";import"./layoutHelper-BN7rjZLy.js";var D={exports:{}};D.exports;(function(O){var c=function(){var w=String.fromCharCode,A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",M={};function B(t,n){if(!M[t]){M[t]={};for(var s=0;s>>8,s[o*2+1]=d%256}return s},decompressFromUint8Array:function(t){if(t==null)return v.decompress(t);for(var n=new Array(t.length/2),s=0,o=n.length;s>1}else{for(i=1,o=0;o>1}h--,h==0&&(h=Math.pow(2,l),l++),delete _[f]}else for(i=d[f],o=0;o>1;h--,h==0&&(h=Math.pow(2,l),l++),d[x]=p++,f=String(m)}if(f!==""){if(Object.prototype.hasOwnProperty.call(_,f)){if(f.charCodeAt(0)<256){for(o=0;o>1}else{for(i=1,o=0;o>1}h--,h==0&&(h=Math.pow(2,l),l++),delete _[f]}else for(i=d[f],o=0;o>1;h--,h==0&&(h=Math.pow(2,l),l++)}for(i=2,o=0;o>1;for(;;)if(e=e<<1,a==n-1){u.push(s(e));break}else a++;return u.join("")},decompress:function(t){return t==null?"":t==""?null:v._decompress(t.length,32768,function(n){return t.charCodeAt(n)})},_decompress:function(t,n,s){var o=[],i=4,d=4,_=3,m="",x=[],f,h,p,l,u,e,a,r={val:s(0),position:n,index:1};for(f=0;f<3;f+=1)o[f]=f;for(p=0,u=Math.pow(2,2),e=1;e!=u;)l=r.val&r.position,r.position>>=1,r.position==0&&(r.position=n,r.val=s(r.index++)),p|=(l>0?1:0)*e,e<<=1;switch(p){case 0:for(p=0,u=Math.pow(2,8),e=1;e!=u;)l=r.val&r.position,r.position>>=1,r.position==0&&(r.position=n,r.val=s(r.index++)),p|=(l>0?1:0)*e,e<<=1;a=w(p);break;case 1:for(p=0,u=Math.pow(2,16),e=1;e!=u;)l=r.val&r.position,r.position>>=1,r.position==0&&(r.position=n,r.val=s(r.index++)),p|=(l>0?1:0)*e,e<<=1;a=w(p);break;case 2:return""}for(o[3]=a,h=a,x.push(a);;){if(r.index>t)return"";for(p=0,u=Math.pow(2,_),e=1;e!=u;)l=r.val&r.position,r.position>>=1,r.position==0&&(r.position=n,r.val=s(r.index++)),p|=(l>0?1:0)*e,e<<=1;switch(a=p){case 0:for(p=0,u=Math.pow(2,8),e=1;e!=u;)l=r.val&r.position,r.position>>=1,r.position==0&&(r.position=n,r.val=s(r.index++)),p|=(l>0?1:0)*e,e<<=1;o[d++]=w(p),a=d-1,i--;break;case 1:for(p=0,u=Math.pow(2,16),e=1;e!=u;)l=r.val&r.position,r.position>>=1,r.position==0&&(r.position=n,r.val=s(r.index++)),p|=(l>0?1:0)*e,e<<=1;o[d++]=w(p),a=d-1,i--;break;case 2:return x.join("")}if(i==0&&(i=Math.pow(2,_),_++),o[a])m=o[a];else if(a===d)m=h+h.charAt(0);else return null;x.push(m),o[d++]=h+m.charAt(0),i--,h=m,i==0&&(i=Math.pow(2,_),_++)}}};return v}();O!=null?O.exports=c:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return c})})(D);var ce=D.exports;const V=ae(ce),de={class:"relative slidev-monaco-container"},fe=q({__name:"Monaco",props:{codeLz:{default:""},diffLz:{},lang:{default:"typescript"},readonly:{type:Boolean,default:!1},lineNumbers:{default:"off"},height:{default:"initial"},editorOptions:{},ata:{type:Boolean,default:!0},runnable:{type:Boolean,default:!1},writable:{},autorun:{type:[Boolean,String],default:!0},showOutputAt:{type:[null,Boolean,String,Number,Array]},outputHeight:{},highlightOutput:{type:Boolean,default:!0},runnerOptions:{}},setup(O){const c=O,w=te(()=>$(()=>import("./slidev/CodeRunner-CqGqxUsJ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])).then(l=>l.default)),A=S(V.decompressFromBase64(c.codeLz).trimEnd()),b=c.diffLz&&S(V.decompressFromBase64(c.diffLz).trimEnd()),M=N(()=>c.writable&&!c.readonly&&!1),v={ts:"typescript",js:"javascript"}[c.lang]??c.lang,n={typescript:"mts",javascript:"mjs",ts:"mts",js:"mjs"}[c.lang]??c.lang,s=S(),o=S(),i=S(0),d=S(),_=N(()=>c.height==="auto"?`${i.value}px`:c.height==="initial"?`${d.value}px`:c.height),m=S(),{$page:x,$renderContext:f}=I(),{currentSlideNo:h}=se(),p=J(()=>Math.abs(x.value-h.value)<=1&&m.value,l=>{["slide","presenter"].includes(f.value)?l():setTimeout(l,5e3)});return F(async()=>{const{default:l}=await $(async()=>{const{default:g}=await import("./monaco/bundled-types-CutNYhe2.js").then(C=>C.u);return{default:g}},__vite__mapDeps([3,2,4,5])),{ata:u,monaco:e,editorOptions:a}=await l(),r=e.editor.createModel(A.value,v,e.Uri.parse(`file:///${Q()}.${n}`));r.onDidChangeContent(()=>A.value=r.getValue());const U={automaticLayout:!0,readOnly:c.readonly,lineNumbers:c.lineNumbers,minimap:{enabled:!1},overviewRulerBorder:!1,overviewRulerLanes:0,padding:{top:10,bottom:10},lineNumbersMinChars:3,bracketPairColorization:{enabled:!1},tabSize:2,fontSize:11.5,fontFamily:"var(--slidev-code-font-family)",scrollBeyondLastLine:!1,useInlineViewWhenSpaceIsLimited:!1,...a,...c.editorOptions};let y;if(b){const g=e.editor.createModel(b.value,v,e.Uri.parse(`file:///${Q()}.${n}`));g.onDidChangeContent(()=>A.value=r.getValue());const C=e.editor.createDiffEditor(o.value,{renderOverviewRuler:!1,...U});C.setModel({original:r,modified:g});const z=C.getOriginalEditor(),L=C.getModifiedEditor(),R=()=>{const W=Math.max(z.getContentHeight(),L.getContentHeight())+4;d.value??(d.value=W),i.value=W,j(()=>C.layout())};z.onDidContentSizeChange(R),L.onDidContentSizeChange(R),y=L}else{const g=e.editor.create(o.value,{model:r,lineDecorationsWidth:0,...U});g.onDidContentSizeChange(C=>{const z=C.contentHeight+4;d.value??(d.value=z),i.value=z,j(()=>y.layout())}),y=g}m.value=()=>{p(),$(()=>import("./monaco/bundled-types-CutNYhe2.js").then(g=>g.v),__vite__mapDeps([3,2,4,5])),c.ata&&(u(y.getValue()),y.onDidChangeModelContent(Y(1e3,()=>{u(y.getValue())})))};const K=y.layoutContentWidget.bind(y);y.layoutContentWidget=g=>{K(g),g.getId()==="editor.contrib.resizableContentHoverWidget"&&(g._resizableNode.domNode.style.transform=g._positionPreference===1?"translateY(calc(100% * (var(--slidev-slide-scale) - 1)))":"")},y.addAction({id:"slidev-save",label:"Save",keybindings:[e.KeyMod.CtrlCmd|e.KeyCode.KeyS],run:()=>{M.value,console.warn("[Slidev] this monaco editor is not writable, save action is ignored.")}}),j(()=>e.editor.remeasureFonts())}),(l,u)=>(T(),G("div",de,[E("div",{ref_key:"outer",ref:s,class:"relative slidev-monaco-container-inner",style:X({height:_.value})},[E("div",{ref_key:"container",ref:o,class:"absolute inset-0.5"},null,512)],4),c.runnable?(T(),Z(k(w),{key:0,modelValue:A.value,"onUpdate:modelValue":u[0]||(u[0]=e=>A.value=e),lang:k(v),autorun:c.autorun,"show-output-at":c.showOutputAt,height:c.outputHeight,"highlight-output":c.highlightOutput,"runner-options":c.runnerOptions},null,8,["modelValue","lang","autorun","show-output-at","height","highlight-output","runner-options"])):ee("v-if",!0)]))}}),pe=E("h1",null,"Code!",-1),he=E("h2",null,[P("We can execute some "),E("code",null,"code"),P("!")],-1),ve={__name:"slides.md__slidev_3",setup(O){const{$slidev:c,$nav:w,$clicksContext:A,$clicks:b,$page:M,$renderContext:B,$frontmatter:v}=I();return A.setup(),(t,n)=>{const s=fe;return T(),Z(ue,re(ie(k(le)(k(v),2))),{title:H(o=>[pe]),content:H(o=>[he,oe(s,ne({runnable:"","code-lz":"MYewdgziA2CmB00QHMAUAiAEraSAEA7iAE7QAmAhOgJQBQQA",lang:"ts"},{autorun:!0,editorOptions:{lineNumbers:"on"}}),null,16)]),_:1},16)}}},Me=ve;export{Me as default}; diff --git a/week_01/test1/assets/monaco/bundled-types-CutNYhe2.js b/week_01/test1/assets/monaco/bundled-types-CutNYhe2.js new file mode 100644 index 0000000..de39939 --- /dev/null +++ b/week_01/test1/assets/monaco/bundled-types-CutNYhe2.js @@ -0,0 +1,1154 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco/freemarker2-BNznXqn-.js","assets/modules/vue-Bx6xSt6e.js","assets/modules/file-saver-igGfcqei.js","assets/monaco/handlebars-BeFNmT0z.js","assets/monaco/html-DWqM5c3Y.js","assets/monaco/javascript-zZ_6YuDS.js","assets/monaco/typescript-B4jGL9um.js","assets/monaco/liquid-QuN8kA_y.js","assets/monaco/mdx-DiM9yg6c.js","assets/monaco/python-XZUT-zMz.js","assets/monaco/razor-B-LsaI92.js","assets/monaco/xml-C1Slvu_M.js","assets/monaco/yaml-CGCNEPCO.js","assets/monaco/cssMode-C9lpIxAQ.js","assets/monaco/htmlMode-DWjPXI9q.js","assets/monaco/jsonMode-ZHvbUFeD.js","assets/monaco/tsMode-CpBJDrta.js","assets/slidev/shiki-CPrRB9--.js","assets/modules/shiki-BeZKuXrB.js","assets/modules/shiki-BPvBenZD.css"])))=>i.map(i=>d[i]); +import{z as Rq,A as Sei,B as wei,C as xei,D as kei,E as Tei,G as Dei}from"../modules/vue-Bx6xSt6e.js";import{g as Eei,c as jpt,a as Iei}from"../modules/file-saver-igGfcqei.js";function Nei(c,e){for(var i=0;in[s]})}}}return Object.freeze(Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}))}function iAi(c,e,i){return Math.min(i,Math.max(e,c))}function nAi(...c){return Pei(c).reduce((e,i)=>e+i,0)}function Lei(c){return c=c??[],Array.isArray(c)?c:[c]}function Pei(c){return Lei(c).flat(1)}function rAi(...c){let e,i,n;c.length===1?(e=0,n=1,[i]=c):[e,i,n=1]=c;const s=[];let l=e;for(;le(i,n)).filter(Aei))}function Mei(c){let e;function i(){return e||(e=c()),e}return i.reset=async()=>{const n=e;e=void 0,n&&await n},i}function Rei(c,e,i){var n=i||{},s=n.noTrailing,l=s===void 0?!1:s,d=n.noLeading,f=d===void 0?!1:d,g=n.debounceMode,y=g===void 0?void 0:g,w,x=!1,I=0;function P(){w&&clearTimeout(w)}function O(X){var Z=X||{},ee=Z.upcomingOnly,he=ee===void 0?!1:ee;P(),x=!he}function W(){for(var X=arguments.length,Z=new Array(X),ee=0;eec?f?(I=Date.now(),l||(w=setTimeout(y?Be:Te,c))):Te():l!==!0&&(w=setTimeout(y?Be:Te,y===void 0?c-we:c))}return W.cancel=O,W}function sAi(c,e,i){var n={},s=n.atBegin,l=s===void 0?!1:s;return Rei(c,e,{debounceMode:l!==!1})}const G9={theme:"neversink",title:"Test",titleTemplate:"%s - Slidev",addons:[],remoteAssets:!1,monaco:!0,monacoTypesSource:"local",monacoTypesAdditionalPackages:[],monacoTypesIgnorePackages:[],monacoRunAdditionalDeps:[],download:!1,export:{},info:!1,highlighter:"shiki",twoslash:!0,lineNumbers:!1,colorSchema:"light",routerMode:"hash",aspectRatio:1.7777777777777777,canvasWidth:980,exportFilename:"",selectable:!1,themeConfig:{},fonts:{sans:["ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"',"sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"],webfonts:[],provider:"google",local:[],italic:!1,weights:["200","400","600"]},favicon:"https://cdn.jsdelivr.net/gh/slidevjs/slidev/assets/favicon.png",drawings:{enabled:!0,persist:!1,presenterOnly:!1,syncAll:!0},plantUmlServer:"https://www.plantuml.com/plantuml",codeCopy:!0,record:"dev",css:"unocss",presenter:!0,htmlAttrs:{},transition:null,editor:!0,contextMenu:null,wakeLock:!0,mdc:!1,layout:"cover",color:"bowdoin",slidesTitle:"Test - Slidev"},oAi="build",Fei=Rq(()=>G9.aspectRatio),Bei=Rq(()=>G9.canvasWidth),aAi=Rq(()=>Math.ceil(Bei.value/Fei.value)),lAi=Rq(()=>Oei(G9.themeConfig||{},(c,e)=>[`--slidev-theme-${c}`,e])),cAi=G9.slidesTitle,uAi="/lectures/week_01/test1/#/",Wei="modulepreload",Vei=function(c){return"/lectures/week_01/test1/"+c},zpt={},_o=function(e,i,n){let s=Promise.resolve();if(i&&i.length>0){document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),d=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));s=Promise.all(i.map(f=>{if(f=Vei(f),f in zpt)return;zpt[f]=!0;const g=f.endsWith(".css"),y=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${y}`))return;const w=document.createElement("link");if(w.rel=g?"stylesheet":Wei,g||(w.as="script",w.crossOrigin=""),w.href=f,d&&w.setAttribute("nonce",d),document.head.appendChild(w),g)return new Promise((x,I)=>{w.addEventListener("load",x),w.addEventListener("error",()=>I(new Error(`Unable to preload CSS for ${f}`)))})}))}return s.then(()=>e()).catch(l=>{const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=l,window.dispatchEvent(d),!d.defaultPrevented)throw l})},Upt=Sei(),y8e=wei("slidev-color-schema","auto"),qpt=Rq(()=>G9.colorSchema!=="auto"),uHe=Rq({get(){return qpt.value?G9.colorSchema==="dark":y8e.value==="auto"?Upt.value:y8e.value==="dark"},set(c){qpt.value||(y8e.value=c===Upt.value?"auto":c?"dark":"light")}}),dAi=xei(uHe);kei&&Tei(uHe,c=>{const e=document.querySelector("html");e.classList.toggle("dark",c),e.classList.toggle("light",!c)},{immediate:!0});function Ux(c,e=0){return c[c.length-(1+e)]}function Hei(c){if(c.length===0)throw new Error("Invalid tail call");return[c.slice(0,c.length-1),c[c.length-1]]}function ch(c,e,i=(n,s)=>n===s){if(c===e)return!0;if(!c||!e||c.length!==e.length)return!1;for(let n=0,s=c.length;ni(c[n],e))}function zei(c,e){let i=0,n=c-1;for(;i<=n;){const s=(i+n)/2|0,l=e(s);if(l<0)i=s+1;else if(l>0)n=s-1;else return s}return-(i+1)}function LFe(c,e,i){if(c=c|0,c>=e.length)throw new TypeError("invalid index");const n=e[Math.floor(e.length*Math.random())],s=[],l=[],d=[];for(const f of e){const g=i(f,n);g<0?s.push(f):g>0?l.push(f):d.push(f)}return c!!e)}function Jpt(c){let e=0;for(let i=0;i0}function z4(c,e=i=>i){const i=new Set;return c.filter(n=>{const s=e(n);return i.has(s)?!1:(i.add(s),!0)})}function fHe(c,e){return c.length>0?c[0]:e}function yb(c,e){let i=typeof e=="number"?c:0;typeof e=="number"?i=c:(i=0,e=c);const n=[];if(i<=e)for(let s=i;se;s--)n.push(s);return n}function N1e(c,e,i){const n=c.slice(0,e),s=c.slice(e);return n.concat(i,s)}function b8e(c,e){const i=c.indexOf(e);i>-1&&(c.splice(i,1),c.unshift(e))}function dge(c,e){const i=c.indexOf(e);i>-1&&(c.splice(i,1),c.push(e))}function PFe(c,e){for(const i of e)c.push(i)}function hHe(c){return Array.isArray(c)?c:[c]}function qei(c,e,i){const n=pbt(c,e),s=c.length,l=i.length;c.length=s+l;for(let d=s-1;d>=n;d--)c[d+l]=c[d];for(let d=0;d0}c.isGreaterThan=n;function s(l){return l===0}c.isNeitherLessOrGreaterThan=s,c.greaterThan=1,c.lessThan=-1,c.neitherLessOrGreaterThan=0})(Ite||(Ite={}));function kb(c,e){return(i,n)=>e(c(i),c(n))}function $ei(...c){return(e,i)=>{for(const n of c){const s=n(e,i);if(!Ite.isNeitherLessOrGreaterThan(s))return s}return Ite.neitherLessOrGreaterThan}}const uT=(c,e)=>c-e,Jei=(c,e)=>uT(c?1:0,e?1:0);function gbt(c){return(e,i)=>-c(e,i)}class U4{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let i=this.firstIdx;for(;i=0&&e(this.items[i]);)i--;const n=i===this.lastIdx?null:this.items.slice(i+1,this.lastIdx+1);return this.lastIdx=i,n}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const i=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,i}}class nL{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(i=>(e.push(i),!0)),e}filter(e){return new nL(i=>this.iterate(n=>e(n)?i(n):!0))}map(e){return new nL(i=>this.iterate(n=>i(e(n))))}findLast(e){let i;return this.iterate(n=>(e(n)&&(i=n),!0)),i}findLastMaxBy(e){let i,n=!0;return this.iterate(s=>((n||Ite.isGreaterThan(e(s,i)))&&(n=!1,i=s),!0)),i}}nL.empty=new nL(c=>{});class x0e{constructor(e){this._indexMap=e}static createSortPermutation(e,i){const n=Array.from(e.keys()).sort((s,l)=>i(e[s],e[l]));return new x0e(n)}apply(e){return e.map((i,n)=>e[this._indexMap[n]])}inverse(){const e=this._indexMap.slice();for(let i=0;i"u"}function rL(c){return!dw(c)}function dw(c){return wb(c)||c===null}function Ac(c,e){if(!c)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function yM(c){if(dw(c))throw new Error("Assertion Failed: argument is undefined or null");return c}function Nte(c){return typeof c=="function"}function Kei(c,e){const i=Math.min(c.length,e.length);for(let n=0;n{e[i]=n&&typeof n=="object"?o4(n):n}),e}function Xei(c){if(!c||typeof c!="object")return c;const e=[c];for(;e.length>0;){const i=e.shift();Object.freeze(i);for(const n in i)if(vbt.call(i,n)){const s=i[n];typeof s=="object"&&!Object.isFrozen(s)&&!Gei(s)&&e.push(s)}}return c}const vbt=Object.prototype.hasOwnProperty;function ybt(c,e){return AFe(c,e,new Set)}function AFe(c,e,i){if(dw(c))return c;const n=e(c);if(typeof n<"u")return n;if(Array.isArray(c)){const s=[];for(const l of c)s.push(AFe(l,e,i));return s}if(vy(c)){if(i.has(c))throw new Error("Cannot clone recursive data-structure");i.add(c);const s={};for(const l in c)vbt.call(c,l)&&(s[l]=AFe(c[l],e,i));return i.delete(c),s}return c}function L1e(c,e,i=!0){return vy(c)?(vy(e)&&Object.keys(e).forEach(n=>{n in c?i&&(vy(c[n])&&vy(e[n])?L1e(c[n],e[n],i):c[n]=e[n]):c[n]=e[n]}),c):e}function vw(c,e){if(c===e)return!0;if(c==null||e===null||e===void 0||typeof c!=typeof e||typeof c!="object"||Array.isArray(c)!==Array.isArray(e))return!1;let i,n;if(Array.isArray(c)){if(c.length!==e.length)return!1;for(i=0;ifunction(){const l=Array.prototype.slice.call(arguments,0);return e(s,l)},n={};for(const s of c)n[s]=i(s);return n}let eti=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function bbt(c,e){let i;return e.length===0?i=c:i=c.replace(/\{(\d+)\}/g,(n,s)=>{const l=s[0],d=e[l];let f=n;return typeof d=="string"?f=d:(typeof d=="number"||typeof d=="boolean"||d===void 0||d===null)&&(f=String(d)),f}),eti&&(i="["+i.replace(/[aouei]/g,"$&$&")+"]"),i}function V(c,e,...i){return bbt(e,i)}function xa(c,e,...i){const n=bbt(e,i);return{value:n,original:n}}var C8e,S8e;const qz="en";let k0e=!1,T0e=!1,Rme=!1,Cbt=!1,pHe=!1,gHe=!1,Sbt=!1,fge,Fme=qz,Qpt=qz,tti,QD;const O4=globalThis;let dy;typeof O4.vscode<"u"&&typeof O4.vscode.process<"u"?dy=O4.vscode.process:typeof process<"u"&&typeof((C8e=process==null?void 0:process.versions)===null||C8e===void 0?void 0:C8e.node)=="string"&&(dy=process);const iti=typeof((S8e=dy==null?void 0:dy.versions)===null||S8e===void 0?void 0:S8e.electron)=="string",nti=iti&&(dy==null?void 0:dy.type)==="renderer";if(typeof dy=="object"){k0e=dy.platform==="win32",T0e=dy.platform==="darwin",Rme=dy.platform==="linux",Rme&&dy.env.SNAP&&dy.env.SNAP_REVISION,dy.env.CI||dy.env.BUILD_ARTIFACTSTAGINGDIRECTORY,fge=qz,Fme=qz;const c=dy.env.VSCODE_NLS_CONFIG;if(c)try{const e=JSON.parse(c),i=e.availableLanguages["*"];fge=e.locale,Qpt=e.osLocale,Fme=i||qz,tti=e._translationsConfigFile}catch{}Cbt=!0}else typeof navigator=="object"&&!nti?(QD=navigator.userAgent,k0e=QD.indexOf("Windows")>=0,T0e=QD.indexOf("Macintosh")>=0,gHe=(QD.indexOf("Macintosh")>=0||QD.indexOf("iPad")>=0||QD.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Rme=QD.indexOf("Linux")>=0,Sbt=(QD==null?void 0:QD.indexOf("Mobi"))>=0,pHe=!0,V({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"),fge=qz,Fme=fge,Qpt=navigator.language):console.error("Unable to resolve platform.");const M0=k0e,Wl=T0e,Ty=Rme,mE=Cbt,xR=pHe,rti=pHe&&typeof O4.importScripts=="function",sti=rti?O4.origin:void 0,TE=gHe,wbt=Sbt,dL=QD,oti=Fme,ati=typeof O4.postMessage=="function"&&!O4.importScripts,xbt=(()=>{if(ati){const c=[];O4.addEventListener("message",i=>{if(i.data&&i.data.vscodeScheduleAsyncWork)for(let n=0,s=c.length;n{const n=++e;c.push({id:n,callback:i}),O4.postMessage({vscodeScheduleAsyncWork:n},"*")}}return c=>setTimeout(c)})(),FC=T0e||gHe?2:k0e?1:3;let Xpt=!0,Zpt=!1;function kbt(){if(!Zpt){Zpt=!0;const c=new Uint8Array(2);c[0]=1,c[1]=2,Xpt=new Uint16Array(c.buffer)[0]===513}return Xpt}const Tbt=!!(dL&&dL.indexOf("Chrome")>=0),lti=!!(dL&&dL.indexOf("Firefox")>=0),cti=!!(!Tbt&&dL&&dL.indexOf("Safari")>=0),uti=!!(dL&&dL.indexOf("Edg/")>=0),dti=!!(dL&&dL.indexOf("Android")>=0),mv={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}};var cc;(function(c){function e(he){return he&&typeof he=="object"&&typeof he[Symbol.iterator]=="function"}c.is=e;const i=Object.freeze([]);function n(){return i}c.empty=n;function*s(he){yield he}c.single=s;function l(he){return e(he)?he:s(he)}c.wrap=l;function d(he){return he||i}c.from=d;function*f(he){for(let we=he.length-1;we>=0;we--)yield he[we]}c.reverse=f;function g(he){return!he||he[Symbol.iterator]().next().done===!0}c.isEmpty=g;function y(he){return he[Symbol.iterator]().next().value}c.first=y;function w(he,we){for(const Te of he)if(we(Te))return!0;return!1}c.some=w;function x(he,we){for(const Te of he)if(we(Te))return Te}c.find=x;function*I(he,we){for(const Te of he)we(Te)&&(yield Te)}c.filter=I;function*P(he,we){let Te=0;for(const Be of he)yield we(Be,Te++)}c.map=P;function*O(...he){for(const we of he)yield*we}c.concat=O;function W(he,we,Te){let Be=Te;for(const Me of he)Be=we(Be,Me);return Be}c.reduce=W;function*X(he,we,Te=he.length){for(we<0&&(we+=he.length),Te<0?Te+=he.length:Te>he.length&&(Te=he.length);we{s||(s=!0,this._remove(n))}}shift(){if(this._first!==jp.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==jp.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==jp.Undefined&&e.next!==jp.Undefined){const i=e.prev;i.next=e.next,e.next.prev=i}else e.prev===jp.Undefined&&e.next===jp.Undefined?(this._first=jp.Undefined,this._last=jp.Undefined):e.next===jp.Undefined?(this._last=this._last.prev,this._last.next=jp.Undefined):e.prev===jp.Undefined&&(this._first=this._first.next,this._first.prev=jp.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==jp.Undefined;)yield e.element,e=e.next}}const Dbt="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function fti(c=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const i of Dbt)c.indexOf(i)>=0||(e+="\\"+i);return e+="\\s]+)",new RegExp(e,"g")}const mHe=fti();function vHe(c){let e=mHe;if(c&&c instanceof RegExp)if(c.global)e=c;else{let i="g";c.ignoreCase&&(i+="i"),c.multiline&&(i+="m"),c.unicode&&(i+="u"),e=new RegExp(c.source,i)}return e.lastIndex=0,e}const Ebt=new yy;Ebt.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Lte(c,e,i,n,s){if(e=vHe(e),s||(s=cc.first(Ebt)),i.length>s.maxLen){let y=c-s.maxLen/2;return y<0?y=0:n+=y,i=i.substring(y,c+s.maxLen/2),Lte(c,e,i,n,s)}const l=Date.now(),d=c-1-n;let f=-1,g=null;for(let y=1;!(Date.now()-l>=s.timeBudget);y++){const w=d-s.windowSize*y;e.lastIndex=Math.max(0,w);const x=hti(e,i,d,f);if(!x&&g||(g=x,w<=0))break;f=w}if(g){const y={word:g[0],startColumn:n+1+g.index,endColumn:n+1+g.index+g[0].length};return e.lastIndex=0,y}return null}function hti(c,e,i,n){let s;for(;s=c.exec(e);){const l=s.index||0;if(l<=i&&c.lastIndex>=i)return s;if(n>0&&l>n)return null}return null}const IN=8;class Ibt{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class Nbt{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class Ef{constructor(e,i,n,s){this.id=e,this.name=i,this.defaultValue=n,this.schema=s}applyUpdate(e,i){return P1e(e,i)}compute(e,i,n){return n}}class Jee{constructor(e,i){this.newValue=e,this.didChange=i}}function P1e(c,e){if(typeof c!="object"||typeof e!="object"||!c||!e)return new Jee(e,c!==e);if(Array.isArray(c)||Array.isArray(e)){const n=Array.isArray(c)&&Array.isArray(e)&&ch(c,e);return new Jee(e,!n)}let i=!1;for(const n in e)if(e.hasOwnProperty(n)){const s=P1e(c[n],e[n]);s.didChange&&(c[n]=s.newValue,i=!0)}return new Jee(c,i)}class hne{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,i){return P1e(e,i)}validate(e){return this.defaultValue}}class Fq{constructor(e,i,n,s){this.id=e,this.name=i,this.defaultValue=n,this.schema=s}applyUpdate(e,i){return P1e(e,i)}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,i,n){return n}}function oo(c,e){return typeof c>"u"?e:c==="false"?!1:!!c}class Lc extends Fq{constructor(e,i,n,s=void 0){typeof s<"u"&&(s.type="boolean",s.default=n),super(e,i,n,s)}validate(e){return oo(e,this.defaultValue)}}function x5(c,e,i,n){if(typeof c>"u")return e;let s=parseInt(c,10);return isNaN(s)?e:(s=Math.max(i,s),s=Math.min(n,s),s|0)}class Od extends Fq{static clampedInt(e,i,n,s){return x5(e,i,n,s)}constructor(e,i,n,s,l,d=void 0){typeof d<"u"&&(d.type="integer",d.default=n,d.minimum=s,d.maximum=l),super(e,i,n,d),this.minimum=s,this.maximum=l}validate(e){return Od.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function _ti(c,e,i,n){if(typeof c>"u")return e;const s=pw.float(c,e);return pw.clamp(s,i,n)}class pw extends Fq{static clamp(e,i,n){return en?n:e}static float(e,i){if(typeof e=="number")return e;if(typeof e>"u")return i;const n=parseFloat(e);return isNaN(n)?i:n}constructor(e,i,n,s,l){typeof l<"u"&&(l.type="number",l.default=n),super(e,i,n,l),this.validationFn=s}validate(e){return this.validationFn(pw.float(e,this.defaultValue))}}class hy extends Fq{static string(e,i){return typeof e!="string"?i:e}constructor(e,i,n,s=void 0){typeof s<"u"&&(s.type="string",s.default=n),super(e,i,n,s)}validate(e){return hy.string(e,this.defaultValue)}}function t_(c,e,i,n){return typeof c!="string"?e:n&&c in n?n[c]:i.indexOf(c)===-1?e:c}class Ih extends Fq{constructor(e,i,n,s,l=void 0){typeof l<"u"&&(l.type="string",l.enum=s,l.default=n),super(e,i,n,l),this._allowedValues=s}validate(e){return t_(e,this.defaultValue,this._allowedValues)}}class hge extends Ef{constructor(e,i,n,s,l,d,f=void 0){typeof f<"u"&&(f.type="string",f.enum=l,f.default=s),super(e,i,n,f),this._allowedValues=l,this._convert=d}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function pti(c){switch(c){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class gti extends Ef{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[V("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached."),V("accessibilitySupport.on","Optimize for usage with a Screen Reader."),V("accessibilitySupport.off","Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:V("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,i,n){return n===0?e.accessibilitySupport:n}}class mti extends Ef{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:V("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:V("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{insertSpace:oo(i.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:oo(i.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function vti(c){switch(c){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var t0;(function(c){c[c.Line=1]="Line",c[c.Block=2]="Block",c[c.Underline=3]="Underline",c[c.LineThin=4]="LineThin",c[c.BlockOutline=5]="BlockOutline",c[c.UnderlineThin=6]="UnderlineThin"})(t0||(t0={}));function yti(c){switch(c){case"line":return t0.Line;case"block":return t0.Block;case"underline":return t0.Underline;case"line-thin":return t0.LineThin;case"block-outline":return t0.BlockOutline;case"underline-thin":return t0.UnderlineThin}}class bti extends hne{constructor(){super(142)}compute(e,i,n){const s=["monaco-editor"];return i.get(39)&&s.push(i.get(39)),e.extraEditorClassName&&s.push(e.extraEditorClassName),i.get(74)==="default"?s.push("mouse-default"):i.get(74)==="copy"&&s.push("mouse-copy"),i.get(111)&&s.push("showUnused"),i.get(140)&&s.push("showDeprecated"),s.join(" ")}}class Cti extends Lc{constructor(){super(37,"emptySelectionClipboard",!0,{description:V("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,i,n){return n&&e.emptySelectionClipboard}}class Sti extends Ef{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:V("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[V("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),V("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),V("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:V("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[V("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),V("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),V("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:V("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:V("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:Wl},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:V("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:V("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{cursorMoveOnType:oo(i.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":t_(i.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":t_(i.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:oo(i.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:oo(i.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:oo(i.loop,this.defaultValue.loop)}}}class fw extends Ef{constructor(){super(51,"fontLigatures",fw.OFF,{anyOf:[{type:"boolean",description:V("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:V("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:V("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"||e.length===0?fw.OFF:e==="true"?fw.ON:e:e?fw.ON:fw.OFF}}fw.OFF='"liga" off, "calt" off';fw.ON='"liga" on, "calt" on';class dE extends Ef{constructor(){super(54,"fontVariations",dE.OFF,{anyOf:[{type:"boolean",description:V("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:V("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:V("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?dE.OFF:e==="true"?dE.TRANSLATE:e:e?dE.TRANSLATE:dE.OFF}compute(e,i,n){return e.fontInfo.fontVariationSettings}}dE.OFF="normal";dE.TRANSLATE="translate";class wti extends hne{constructor(){super(50)}compute(e,i,n){return e.fontInfo}}class xti extends Fq{constructor(){super(52,"fontSize",Tb.fontSize,{type:"number",minimum:6,maximum:100,default:Tb.fontSize,description:V("fontSize","Controls the font size in pixels.")})}validate(e){const i=pw.float(e,this.defaultValue);return i===0?Tb.fontSize:pw.clamp(i,6,100)}compute(e,i,n){return e.fontInfo.fontSize}}class zN extends Ef{constructor(){super(53,"fontWeight",Tb.fontWeight,{anyOf:[{type:"number",minimum:zN.MINIMUM_VALUE,maximum:zN.MAXIMUM_VALUE,errorMessage:V("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:zN.SUGGESTION_VALUES}],default:Tb.fontWeight,description:V("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(Od.clampedInt(e,Tb.fontWeight,zN.MINIMUM_VALUE,zN.MAXIMUM_VALUE))}}zN.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];zN.MINIMUM_VALUE=1;zN.MAXIMUM_VALUE=1e3;class kti extends Ef{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},i={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[V("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),V("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),V("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},n=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:V("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:V("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...i},"editor.gotoLocation.multipleTypeDefinitions":{description:V("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...i},"editor.gotoLocation.multipleDeclarations":{description:V("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...i},"editor.gotoLocation.multipleImplementations":{description:V("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...i},"editor.gotoLocation.multipleReferences":{description:V("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist."),...i},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:n,description:V("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:n,description:V("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:n,description:V("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:n,description:V("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:n,description:V("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var i,n,s,l,d;if(!e||typeof e!="object")return this.defaultValue;const f=e;return{multiple:t_(f.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(i=f.multipleDefinitions)!==null&&i!==void 0?i:t_(f.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(n=f.multipleTypeDefinitions)!==null&&n!==void 0?n:t_(f.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(s=f.multipleDeclarations)!==null&&s!==void 0?s:t_(f.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(l=f.multipleImplementations)!==null&&l!==void 0?l:t_(f.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(d=f.multipleReferences)!==null&&d!==void 0?d:t_(f.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:hy.string(f.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:hy.string(f.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:hy.string(f.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:hy.string(f.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:hy.string(f.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class Tti extends Ef{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:V("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:V("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:V("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:V("hover.hidingDelay","Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:V("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{enabled:oo(i.enabled,this.defaultValue.enabled),delay:Od.clampedInt(i.delay,this.defaultValue.delay,0,1e4),sticky:oo(i.sticky,this.defaultValue.sticky),hidingDelay:Od.clampedInt(i.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:oo(i.above,this.defaultValue.above)}}}class vU extends hne{constructor(){super(145)}compute(e,i,n){return vU.computeLayout(i,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){const i=e.height/e.lineHeight,n=Math.floor(e.paddingTop/e.lineHeight);let s=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(s=Math.max(s,i-1));const l=(n+e.viewLineCount+s)/(e.pixelRatio*e.height),d=Math.floor(e.viewLineCount/l);return{typicalViewportLineCount:i,extraLinesBeforeFirstLine:n,extraLinesBeyondLastLine:s,desiredRatio:l,minimapLineCount:d}}static _computeMinimapLayout(e,i){const n=e.outerWidth,s=e.outerHeight,l=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(l*s),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:s};const d=i.stableMinimapLayoutInput,f=d&&e.outerHeight===d.outerHeight&&e.lineHeight===d.lineHeight&&e.typicalHalfwidthCharacterWidth===d.typicalHalfwidthCharacterWidth&&e.pixelRatio===d.pixelRatio&&e.scrollBeyondLastLine===d.scrollBeyondLastLine&&e.paddingTop===d.paddingTop&&e.paddingBottom===d.paddingBottom&&e.minimap.enabled===d.minimap.enabled&&e.minimap.side===d.minimap.side&&e.minimap.size===d.minimap.size&&e.minimap.showSlider===d.minimap.showSlider&&e.minimap.renderCharacters===d.minimap.renderCharacters&&e.minimap.maxColumn===d.minimap.maxColumn&&e.minimap.scale===d.minimap.scale&&e.verticalScrollbarWidth===d.verticalScrollbarWidth&&e.isViewportWrapping===d.isViewportWrapping,g=e.lineHeight,y=e.typicalHalfwidthCharacterWidth,w=e.scrollBeyondLastLine,x=e.minimap.renderCharacters;let I=l>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const P=e.minimap.maxColumn,O=e.minimap.size,W=e.minimap.side,X=e.verticalScrollbarWidth,Z=e.viewLineCount,ee=e.remainingWidth,he=e.isViewportWrapping,we=x?2:3;let Te=Math.floor(l*s);const Be=Te/l;let Me=!1,vt=!1,Nt=we*I,Ni=I/l,ci=1;if(O==="fill"||O==="fit"){const{typicalViewportLineCount:Xs,extraLinesBeforeFirstLine:Yt,extraLinesBeyondLastLine:na,desiredRatio:Is,minimapLineCount:zs}=vU.computeContainedMinimapLineCount({viewLineCount:Z,scrollBeyondLastLine:w,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:s,lineHeight:g,pixelRatio:l});if(Z/zs>1)Me=!0,vt=!0,I=1,Nt=1,Ni=I/l;else{let bd=!1,zg=I+1;if(O==="fit"){const s_=Math.ceil((Yt+Z+na)*Nt);he&&f&&ee<=i.stableFitRemainingWidth?(bd=!0,zg=i.stableFitMaxMinimapScale):bd=s_>Te}if(O==="fill"||bd){Me=!0;const s_=I;Nt=Math.min(g*l,Math.max(1,Math.floor(1/Is))),he&&f&&ee<=i.stableFitRemainingWidth&&(zg=i.stableFitMaxMinimapScale),I=Math.min(zg,Math.max(1,Math.floor(Nt/we))),I>s_&&(ci=Math.min(2,I/s_)),Ni=I/l/ci,Te=Math.ceil(Math.max(Xs,Yt+Z+na)*Nt),he?(i.stableMinimapLayoutInput=e,i.stableFitRemainingWidth=ee,i.stableFitMaxMinimapScale=I):(i.stableMinimapLayoutInput=null,i.stableFitRemainingWidth=0)}}}const Mt=Math.floor(P*Ni),pi=Math.min(Mt,Math.max(0,Math.floor((ee-X-2)*Ni/(y+Ni)))+IN);let gn=Math.floor(l*pi);const $n=gn/l;gn=Math.floor(gn*ci);const Ri=x?1:2,ao=W==="left"?0:n-pi-X;return{renderMinimap:Ri,minimapLeft:ao,minimapWidth:pi,minimapHeightIsEditorHeight:Me,minimapIsSampling:vt,minimapScale:I,minimapLineHeight:Nt,minimapCanvasInnerWidth:gn,minimapCanvasInnerHeight:Te,minimapCanvasOuterWidth:$n,minimapCanvasOuterHeight:Be}}static computeLayout(e,i){const n=i.outerWidth|0,s=i.outerHeight|0,l=i.lineHeight|0,d=i.lineNumbersDigitCount|0,f=i.typicalHalfwidthCharacterWidth,g=i.maxDigitWidth,y=i.pixelRatio,w=i.viewLineCount,x=e.get(137),I=x==="inherit"?e.get(136):x,P=I==="inherit"?e.get(132):I,O=e.get(135),W=i.isDominatedByLongLines,X=e.get(57),Z=e.get(68).renderType!==0,ee=e.get(69),he=e.get(105),we=e.get(84),Te=e.get(73),Be=e.get(103),Me=Be.verticalScrollbarSize,vt=Be.verticalHasArrows,Nt=Be.arrowSize,Ni=Be.horizontalScrollbarSize,ci=e.get(43),Mt=e.get(110)!=="never";let pi=e.get(66);ci&&Mt&&(pi+=16);let gn=0;if(Z){const ns=Math.max(d,ee);gn=Math.round(ns*g)}let $n=0;X&&($n=l*i.glyphMarginDecorationLaneCount);let Ri=0,ao=Ri+$n,Xs=ao+gn,Yt=Xs+pi;const na=n-$n-gn-pi;let Is=!1,zs=!1,Ln=-1;I==="inherit"&&W?(Is=!0,zs=!0):P==="on"||P==="bounded"?zs=!0:P==="wordWrapColumn"&&(Ln=O);const bd=vU._computeMinimapLayout({outerWidth:n,outerHeight:s,lineHeight:l,typicalHalfwidthCharacterWidth:f,pixelRatio:y,scrollBeyondLastLine:he,paddingTop:we.top,paddingBottom:we.bottom,minimap:Te,verticalScrollbarWidth:Me,viewLineCount:w,remainingWidth:na,isViewportWrapping:zs},i.memory||new Nbt);bd.renderMinimap!==0&&bd.minimapLeft===0&&(Ri+=bd.minimapWidth,ao+=bd.minimapWidth,Xs+=bd.minimapWidth,Yt+=bd.minimapWidth);const zg=na-bd.minimapWidth,s_=Math.max(1,Math.floor((zg-Me-2)/f)),Wc=vt?Nt:0;return zs&&(Ln=Math.max(1,s_),P==="bounded"&&(Ln=Math.min(Ln,O))),{width:n,height:s,glyphMarginLeft:Ri,glyphMarginWidth:$n,glyphMarginDecorationLaneCount:i.glyphMarginDecorationLaneCount,lineNumbersLeft:ao,lineNumbersWidth:gn,decorationsLeft:Xs,decorationsWidth:pi,contentLeft:Yt,contentWidth:zg,minimap:bd,viewportColumn:s_,isWordWrapMinified:Is,isViewportWrapping:zs,wrappingColumn:Ln,verticalScrollbarWidth:Me,horizontalScrollbarHeight:Ni,overviewRuler:{top:Wc,width:Me,height:s-2*Wc,right:0}}}}class Dti extends Ef{constructor(){super(139,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[V("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),V("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:V("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return t_(e,"simple",["simple","advanced"])}compute(e,i,n){return i.get(2)===2?"advanced":n}}var tT;(function(c){c.Off="off",c.OnCode="onCode",c.On="on"})(tT||(tT={}));class Eti extends Ef{constructor(){const e={enabled:tT.On};super(65,"lightbulb",e,{"editor.lightbulb.enabled":{type:"string",tags:["experimental"],enum:[tT.Off,tT.OnCode,tT.On],default:e.enabled,enumDescriptions:[V("editor.lightbulb.enabled.off","Disable the code action menu."),V("editor.lightbulb.enabled.onCode","Show the code action menu when the cursor is on lines with code."),V("editor.lightbulb.enabled.on","Show the code action menu when the cursor is on lines with code or on empty lines.")],description:V("enabled","Enables the Code Action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:t_(e.enabled,this.defaultValue.enabled,[tT.Off,tT.OnCode,tT.On])}}}class Iti extends Ef{constructor(){const e={enabled:!0,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(115,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:V("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor."),tags:["experimental"]},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:20,description:V("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:V("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:V("editor.stickyScroll.scrollWithEditor","Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{enabled:oo(i.enabled,this.defaultValue.enabled),maxLineCount:Od.clampedInt(i.maxLineCount,this.defaultValue.maxLineCount,1,20),defaultModel:t_(i.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:oo(i.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class Nti extends Ef{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(141,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:V("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[V("editor.inlayHints.on","Inlay hints are enabled"),V("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",Wl?"Ctrl+Option":"Ctrl+Alt"),V("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",Wl?"Ctrl+Option":"Ctrl+Alt"),V("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:V("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:V("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:V("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return typeof i.enabled=="boolean"&&(i.enabled=i.enabled?"on":"off"),{enabled:t_(i.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:Od.clampedInt(i.fontSize,this.defaultValue.fontSize,0,100),fontFamily:hy.string(i.fontFamily,this.defaultValue.fontFamily),padding:oo(i.padding,this.defaultValue.padding)}}}class Lti extends Ef{constructor(){super(66,"lineDecorationsWidth",10)}validate(e){return typeof e=="string"&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):Od.clampedInt(e,this.defaultValue,0,1e3)}compute(e,i,n){return n<0?Od.clampedInt(-n*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):n}}class Pti extends pw{constructor(){super(67,"lineHeight",Tb.lineHeight,e=>pw.clamp(e,0,150),{markdownDescription:V("lineHeight",`Controls the line height. + - Use 0 to automatically compute the line height from the font size. + - Values between 0 and 8 will be used as a multiplier with the font size. + - Values greater than or equal to 8 will be used as effective values.`)})}compute(e,i,n){return e.fontInfo.lineHeight}}class Ati extends Ef{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1,showRegionSectionHeaders:!0,showMarkSectionHeaders:!0,sectionHeaderFontSize:9,sectionHeaderLetterSpacing:1};super(73,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:V("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:V("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[V("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),V("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),V("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:V("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:V("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:V("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:V("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:V("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:V("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")},"editor.minimap.showRegionSectionHeaders":{type:"boolean",default:e.showRegionSectionHeaders,description:V("minimap.showRegionSectionHeaders","Controls whether named regions are shown as section headers in the minimap.")},"editor.minimap.showMarkSectionHeaders":{type:"boolean",default:e.showMarkSectionHeaders,description:V("minimap.showMarkSectionHeaders","Controls whether MARK: comments are shown as section headers in the minimap.")},"editor.minimap.sectionHeaderFontSize":{type:"number",default:e.sectionHeaderFontSize,description:V("minimap.sectionHeaderFontSize","Controls the font size of section headers in the minimap.")},"editor.minimap.sectionHeaderLetterSpacing":{type:"number",default:e.sectionHeaderLetterSpacing,description:V("minimap.sectionHeaderLetterSpacing","Controls the amount of space (in pixels) between characters of section header. This helps the readability of the header in small font sizes.")}})}validate(e){var i,n;if(!e||typeof e!="object")return this.defaultValue;const s=e;return{enabled:oo(s.enabled,this.defaultValue.enabled),autohide:oo(s.autohide,this.defaultValue.autohide),size:t_(s.size,this.defaultValue.size,["proportional","fill","fit"]),side:t_(s.side,this.defaultValue.side,["right","left"]),showSlider:t_(s.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:oo(s.renderCharacters,this.defaultValue.renderCharacters),scale:Od.clampedInt(s.scale,1,1,3),maxColumn:Od.clampedInt(s.maxColumn,this.defaultValue.maxColumn,1,1e4),showRegionSectionHeaders:oo(s.showRegionSectionHeaders,this.defaultValue.showRegionSectionHeaders),showMarkSectionHeaders:oo(s.showMarkSectionHeaders,this.defaultValue.showMarkSectionHeaders),sectionHeaderFontSize:pw.clamp((i=s.sectionHeaderFontSize)!==null&&i!==void 0?i:this.defaultValue.sectionHeaderFontSize,4,32),sectionHeaderLetterSpacing:pw.clamp((n=s.sectionHeaderLetterSpacing)!==null&&n!==void 0?n:this.defaultValue.sectionHeaderLetterSpacing,0,5)}}}function Oti(c){return c==="ctrlCmd"?Wl?"metaKey":"ctrlKey":"altKey"}class Mti extends Ef{constructor(){super(84,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:V("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:V("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{top:Od.clampedInt(i.top,0,0,1e3),bottom:Od.clampedInt(i.bottom,0,0,1e3)}}}class Rti extends Ef{constructor(){const e={enabled:!0,cycle:!0};super(86,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:V("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:V("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{enabled:oo(i.enabled,this.defaultValue.enabled),cycle:oo(i.cycle,this.defaultValue.cycle)}}}class Fti extends hne{constructor(){super(143)}compute(e,i,n){return e.pixelRatio}}class Bti extends Ef{constructor(){const e={other:"on",comments:"off",strings:"off"},i=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[V("on","Quick suggestions show inside the suggest widget"),V("inline","Quick suggestions show as ghost text"),V("off","Quick suggestions are disabled")]}];super(89,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:i,default:e.strings,description:V("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:i,default:e.comments,description:V("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:i,default:e.other,description:V("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:V("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the '{0}'-setting which controls if suggestions are triggered by special characters.","#editor.suggestOnTriggerCharacters#")}),this.defaultValue=e}validate(e){if(typeof e=="boolean"){const y=e?"on":"off";return{comments:y,strings:y,other:y}}if(!e||typeof e!="object")return this.defaultValue;const{other:i,comments:n,strings:s}=e,l=["on","inline","off"];let d,f,g;return typeof i=="boolean"?d=i?"on":"off":d=t_(i,this.defaultValue.other,l),typeof n=="boolean"?f=n?"on":"off":f=t_(n,this.defaultValue.comments,l),typeof s=="boolean"?g=s?"on":"off":g=t_(s,this.defaultValue.strings,l),{other:d,comments:f,strings:g}}}class Wti extends Ef{constructor(){super(68,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[V("lineNumbers.off","Line numbers are not rendered."),V("lineNumbers.on","Line numbers are rendered as absolute number."),V("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),V("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:V("lineNumbers","Controls the display of line numbers.")})}validate(e){let i=this.defaultValue.renderType,n=this.defaultValue.renderFn;return typeof e<"u"&&(typeof e=="function"?(i=4,n=e):e==="interval"?i=3:e==="relative"?i=2:e==="on"?i=1:i=0),{renderType:i,renderFn:n}}}function D0e(c){const e=c.get(98);return e==="editable"?c.get(91):e!=="on"}class Vti extends Ef{constructor(){const e=[],i={type:"number",description:V("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(102,"rulers",e,{type:"array",items:{anyOf:[i,{type:["object"],properties:{column:i,color:{type:"string",description:V("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:V("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){const i=[];for(const n of e)if(typeof n=="number")i.push({column:Od.clampedInt(n,0,0,1e4),color:null});else if(n&&typeof n=="object"){const s=n;i.push({column:Od.clampedInt(s.column,0,0,1e4),color:s.color})}return i.sort((n,s)=>n.column-s.column),i}return this.defaultValue}}class Hti extends Ef{constructor(){super(92,"readOnlyMessage",void 0)}validate(e){return!e||typeof e!="object"?this.defaultValue:e}}function Ypt(c,e){if(typeof c!="string")return e;switch(c){case"hidden":return 2;case"visible":return 3;default:return 1}}let jti=class extends Ef{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1,ignoreHorizontalScrollbarInContentHeight:!1};super(103,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[V("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),V("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),V("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:V("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[V("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),V("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),V("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:V("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:V("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:V("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:V("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")},"editor.scrollbar.ignoreHorizontalScrollbarInContentHeight":{type:"boolean",default:e.ignoreHorizontalScrollbarInContentHeight,description:V("scrollbar.ignoreHorizontalScrollbarInContentHeight","When set, the horizontal scrollbar will not increase the size of the editor's content.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e,n=Od.clampedInt(i.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),s=Od.clampedInt(i.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:Od.clampedInt(i.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:Ypt(i.vertical,this.defaultValue.vertical),horizontal:Ypt(i.horizontal,this.defaultValue.horizontal),useShadows:oo(i.useShadows,this.defaultValue.useShadows),verticalHasArrows:oo(i.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:oo(i.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:oo(i.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:oo(i.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:n,horizontalSliderSize:Od.clampedInt(i.horizontalSliderSize,n,0,1e3),verticalScrollbarSize:s,verticalSliderSize:Od.clampedInt(i.verticalSliderSize,s,0,1e3),scrollByPage:oo(i.scrollByPage,this.defaultValue.scrollByPage),ignoreHorizontalScrollbarInContentHeight:oo(i.ignoreHorizontalScrollbarInContentHeight,this.defaultValue.ignoreHorizontalScrollbarInContentHeight)}}};const nw="inUntrustedWorkspace",Cb={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};class zti extends Ef{constructor(){const e={nonBasicASCII:nw,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:nw,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(125,"unicodeHighlight",e,{[Cb.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,nw],default:e.nonBasicASCII,description:V("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[Cb.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:V("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[Cb.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:V("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[Cb.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,nw],default:e.includeComments,description:V("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[Cb.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,nw],default:e.includeStrings,description:V("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[Cb.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:V("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[Cb.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:V("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,i){let n=!1;i.allowedCharacters&&e&&(vw(e.allowedCharacters,i.allowedCharacters)||(e={...e,allowedCharacters:i.allowedCharacters},n=!0)),i.allowedLocales&&e&&(vw(e.allowedLocales,i.allowedLocales)||(e={...e,allowedLocales:i.allowedLocales},n=!0));const s=super.applyUpdate(e,i);return n?new Jee(s.newValue,!0):s}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{nonBasicASCII:yU(i.nonBasicASCII,nw,[!0,!1,nw]),invisibleCharacters:oo(i.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:oo(i.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:yU(i.includeComments,nw,[!0,!1,nw]),includeStrings:yU(i.includeStrings,nw,[!0,!1,nw]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,i){if(typeof e!="object"||!e)return i;const n={};for(const[s,l]of Object.entries(e))l===!0&&(n[s]=!0);return n}}class Uti extends Ef{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1,fontFamily:"default"};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:V("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[V("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),V("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion."),V("inlineSuggest.showToolbar.never","Never show the inline suggestion toolbar.")],description:V("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:V("inlineSuggest.suppressSuggestions","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")},"editor.inlineSuggest.fontFamily":{type:"string",default:e.fontFamily,description:V("inlineSuggest.fontFamily","Controls the font family of the inline suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{enabled:oo(i.enabled,this.defaultValue.enabled),mode:t_(i.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:t_(i.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),suppressSuggestions:oo(i.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:oo(i.keepOnBlur,this.defaultValue.keepOnBlur),fontFamily:hy.string(i.fontFamily,this.defaultValue.fontFamily)}}}class qti extends Ef{constructor(){const e={enabled:!1,showToolbar:"onHover",fontFamily:"default",keepOnBlur:!1,backgroundColoring:!1};super(63,"experimentalInlineEdit",e,{"editor.experimentalInlineEdit.enabled":{type:"boolean",default:e.enabled,description:V("inlineEdit.enabled","Controls whether to show inline edits in the editor.")},"editor.experimentalInlineEdit.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[V("inlineEdit.showToolbar.always","Show the inline edit toolbar whenever an inline suggestion is shown."),V("inlineEdit.showToolbar.onHover","Show the inline edit toolbar when hovering over an inline suggestion."),V("inlineEdit.showToolbar.never","Never show the inline edit toolbar.")],description:V("inlineEdit.showToolbar","Controls when to show the inline edit toolbar.")},"editor.experimentalInlineEdit.fontFamily":{type:"string",default:e.fontFamily,description:V("inlineEdit.fontFamily","Controls the font family of the inline edit.")},"editor.experimentalInlineEdit.backgroundColoring":{type:"boolean",default:e.backgroundColoring,description:V("inlineEdit.backgroundColoring","Controls whether to color the background of inline edits.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{enabled:oo(i.enabled,this.defaultValue.enabled),showToolbar:t_(i.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),fontFamily:hy.string(i.fontFamily,this.defaultValue.fontFamily),keepOnBlur:oo(i.keepOnBlur,this.defaultValue.keepOnBlur),backgroundColoring:oo(i.backgroundColoring,this.defaultValue.backgroundColoring)}}}class $ti extends Ef{constructor(){const e={enabled:mv.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:mv.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:V("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:V("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{enabled:oo(i.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:oo(i.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class Jti extends Ef{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[V("editor.guides.bracketPairs.true","Enables bracket pair guides."),V("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),V("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:V("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[V("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),V("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),V("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:V("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:V("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:V("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[V("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),V("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),V("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:V("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{bracketPairs:yU(i.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:yU(i.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:oo(i.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:oo(i.indentation,this.defaultValue.indentation),highlightActiveIndentation:yU(i.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function yU(c,e,i){const n=i.indexOf(c);return n===-1?e:i[n]}class Gti extends Ef{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(118,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[V("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),V("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:V("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:V("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:V("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:V("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[V("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),V("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),V("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),V("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:V("suggest.selectionMode","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions (`#editor.quickSuggestions#` and `#editor.suggestOnTriggerCharacters#`) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:V("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:V("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:V("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:V("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:V("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:V("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:V("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.matchOnWordStartOnly","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:V("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{insertMode:t_(i.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:oo(i.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:oo(i.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:oo(i.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:oo(i.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:t_(i.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:oo(i.showIcons,this.defaultValue.showIcons),showStatusBar:oo(i.showStatusBar,this.defaultValue.showStatusBar),preview:oo(i.preview,this.defaultValue.preview),previewMode:t_(i.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:oo(i.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:oo(i.showMethods,this.defaultValue.showMethods),showFunctions:oo(i.showFunctions,this.defaultValue.showFunctions),showConstructors:oo(i.showConstructors,this.defaultValue.showConstructors),showDeprecated:oo(i.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:oo(i.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:oo(i.showFields,this.defaultValue.showFields),showVariables:oo(i.showVariables,this.defaultValue.showVariables),showClasses:oo(i.showClasses,this.defaultValue.showClasses),showStructs:oo(i.showStructs,this.defaultValue.showStructs),showInterfaces:oo(i.showInterfaces,this.defaultValue.showInterfaces),showModules:oo(i.showModules,this.defaultValue.showModules),showProperties:oo(i.showProperties,this.defaultValue.showProperties),showEvents:oo(i.showEvents,this.defaultValue.showEvents),showOperators:oo(i.showOperators,this.defaultValue.showOperators),showUnits:oo(i.showUnits,this.defaultValue.showUnits),showValues:oo(i.showValues,this.defaultValue.showValues),showConstants:oo(i.showConstants,this.defaultValue.showConstants),showEnums:oo(i.showEnums,this.defaultValue.showEnums),showEnumMembers:oo(i.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:oo(i.showKeywords,this.defaultValue.showKeywords),showWords:oo(i.showWords,this.defaultValue.showWords),showColors:oo(i.showColors,this.defaultValue.showColors),showFiles:oo(i.showFiles,this.defaultValue.showFiles),showReferences:oo(i.showReferences,this.defaultValue.showReferences),showFolders:oo(i.showFolders,this.defaultValue.showFolders),showTypeParameters:oo(i.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:oo(i.showSnippets,this.defaultValue.showSnippets),showUsers:oo(i.showUsers,this.defaultValue.showUsers),showIssues:oo(i.showIssues,this.defaultValue.showIssues)}}}class Kti extends Ef{constructor(){super(113,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:V("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:V("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:oo(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:oo(e.selectSubwords,this.defaultValue.selectSubwords)}}}class Qti extends Ef{constructor(){const e=[];super(130,"wordSegmenterLocales",e,{anyOf:[{description:V("wordSegmenterLocales","Locales to be used for word segmentation when doing word related navigations or operations. Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.)."),type:"string"},{description:V("wordSegmenterLocales","Locales to be used for word segmentation when doing word related navigations or operations. Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.)."),type:"array",items:{type:"string"}}]})}validate(e){if(typeof e=="string"&&(e=[e]),Array.isArray(e)){const i=[];for(const n of e)if(typeof n=="string")try{Intl.Segmenter.supportedLocalesOf(n).length>0&&i.push(n)}catch{}return i}return this.defaultValue}}class Xti extends Ef{constructor(){super(138,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[V("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),V("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),V("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),V("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:V("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,i,n){return i.get(2)===2?0:n}}class Zti extends hne{constructor(){super(146)}compute(e,i,n){const s=i.get(145);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:s.isWordWrapMinified,isViewportWrapping:s.isViewportWrapping,wrappingColumn:s.wrappingColumn}}}class Yti extends Ef{constructor(){const e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:V("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down the `Shift` key (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:V("dropIntoEditor.showDropSelector","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[V("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),V("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{enabled:oo(i.enabled,this.defaultValue.enabled),showDropSelector:t_(i.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}class eii extends Ef{constructor(){const e={enabled:!0,showPasteSelector:"afterPaste"};super(85,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:V("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:V("pasteAs.showPasteSelector","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[V("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),V("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{enabled:oo(i.enabled,this.defaultValue.enabled),showPasteSelector:t_(i.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}const tii="Consolas, 'Courier New', monospace",iii="Menlo, Monaco, 'Courier New', monospace",nii="'Droid Sans Mono', 'monospace', monospace",Tb={fontFamily:Wl?iii:Ty?nii:tii,fontWeight:"normal",fontSize:Wl?12:14,lineHeight:0,letterSpacing:0},$z=[];function kr(c){return $z[c.id]=c,c}const RE={acceptSuggestionOnCommitCharacter:kr(new Lc(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:V("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:kr(new Ih(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",V("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:V("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:kr(new gti),accessibilityPageSize:kr(new Od(3,"accessibilityPageSize",10,1,1073741824,{description:V("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:kr(new hy(4,"ariaLabel",V("editorViewAccessibleLabel","Editor content"))),ariaRequired:kr(new Lc(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:kr(new Lc(8,"screenReaderAnnounceInlineSuggestion",!0,{description:V("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:kr(new Ih(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",V("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),V("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:V("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:kr(new Ih(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",V("editor.autoClosingComments.languageDefined","Use language configurations to determine when to autoclose comments."),V("editor.autoClosingComments.beforeWhitespace","Autoclose comments only when the cursor is to the left of whitespace."),""],description:V("autoClosingComments","Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:kr(new Ih(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",V("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:V("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:kr(new Ih(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",V("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:V("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:kr(new Ih(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",V("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),V("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:V("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:kr(new hge(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],pti,{enumDescriptions:[V("editor.autoIndent.none","The editor will not insert indentation automatically."),V("editor.autoIndent.keep","The editor will keep the current line's indentation."),V("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),V("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),V("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:V("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:kr(new Lc(13,"automaticLayout",!1)),autoSurround:kr(new Ih(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[V("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),V("editor.autoSurround.quotes","Surround with quotes but not brackets."),V("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:V("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:kr(new $ti),bracketPairGuides:kr(new Jti),stickyTabStops:kr(new Lc(116,"stickyTabStops",!1,{description:V("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:kr(new Lc(17,"codeLens",!0,{description:V("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:kr(new hy(18,"codeLensFontFamily","",{description:V("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:kr(new Od(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:V("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:kr(new Lc(20,"colorDecorators",!0,{description:V("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:kr(new Ih(148,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[V("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),V("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),V("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:V("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:kr(new Od(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:V("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:kr(new Lc(22,"columnSelection",!1,{description:V("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:kr(new mti),contextmenu:kr(new Lc(24,"contextmenu",!0)),copyWithSyntaxHighlighting:kr(new Lc(25,"copyWithSyntaxHighlighting",!0,{description:V("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:kr(new hge(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],vti,{description:V("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:kr(new Ih(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[V("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),V("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),V("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:V("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:kr(new hge(28,"cursorStyle",t0.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],yti,{description:V("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:kr(new Od(29,"cursorSurroundingLines",0,0,1073741824,{description:V("cursorSurroundingLines","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:kr(new Ih(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[V("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),V("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],markdownDescription:V("cursorSurroundingLinesStyle","Controls when `#editor.cursorSurroundingLines#` should be enforced.")})),cursorWidth:kr(new Od(31,"cursorWidth",0,0,1073741824,{markdownDescription:V("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:kr(new Lc(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:kr(new Lc(33,"disableMonospaceOptimizations",!1)),domReadOnly:kr(new Lc(34,"domReadOnly",!1)),dragAndDrop:kr(new Lc(35,"dragAndDrop",!0,{description:V("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:kr(new Cti),dropIntoEditor:kr(new Yti),stickyScroll:kr(new Iti),experimentalWhitespaceRendering:kr(new Ih(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[V("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),V("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),V("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:V("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:kr(new hy(39,"extraEditorClassName","")),fastScrollSensitivity:kr(new pw(40,"fastScrollSensitivity",5,c=>c<=0?5:c,{markdownDescription:V("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:kr(new Sti),fixedOverflowWidgets:kr(new Lc(42,"fixedOverflowWidgets",!1)),folding:kr(new Lc(43,"folding",!0,{description:V("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:kr(new Ih(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[V("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),V("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:V("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:kr(new Lc(45,"foldingHighlight",!0,{description:V("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:kr(new Lc(46,"foldingImportsByDefault",!1,{description:V("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:kr(new Od(47,"foldingMaximumRegions",5e3,10,65e3,{description:V("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:kr(new Lc(48,"unfoldOnClickAfterEndOfLine",!1,{description:V("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:kr(new hy(49,"fontFamily",Tb.fontFamily,{description:V("fontFamily","Controls the font family.")})),fontInfo:kr(new wti),fontLigatures2:kr(new fw),fontSize:kr(new xti),fontWeight:kr(new zN),fontVariations:kr(new dE),formatOnPaste:kr(new Lc(55,"formatOnPaste",!1,{description:V("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:kr(new Lc(56,"formatOnType",!1,{description:V("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:kr(new Lc(57,"glyphMargin",!0,{description:V("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:kr(new kti),hideCursorInOverviewRuler:kr(new Lc(59,"hideCursorInOverviewRuler",!1,{description:V("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:kr(new Tti),inDiffEditor:kr(new Lc(61,"inDiffEditor",!1)),letterSpacing:kr(new pw(64,"letterSpacing",Tb.letterSpacing,c=>pw.clamp(c,-5,20),{description:V("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:kr(new Eti),lineDecorationsWidth:kr(new Lti),lineHeight:kr(new Pti),lineNumbers:kr(new Wti),lineNumbersMinChars:kr(new Od(69,"lineNumbersMinChars",5,1,300)),linkedEditing:kr(new Lc(70,"linkedEditing",!1,{description:V("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:kr(new Lc(71,"links",!0,{description:V("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:kr(new Ih(72,"matchBrackets","always",["always","near","never"],{description:V("matchBrackets","Highlight matching brackets.")})),minimap:kr(new Ati),mouseStyle:kr(new Ih(74,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:kr(new pw(75,"mouseWheelScrollSensitivity",1,c=>c===0?1:c,{markdownDescription:V("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:kr(new Lc(76,"mouseWheelZoom",!1,{markdownDescription:Wl?V("mouseWheelZoom.mac","Zoom the font of the editor when using mouse wheel and holding `Cmd`."):V("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:kr(new Lc(77,"multiCursorMergeOverlapping",!0,{description:V("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:kr(new hge(78,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],Oti,{markdownEnumDescriptions:[V("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),V("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:V({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:kr(new Ih(79,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[V("multiCursorPaste.spread","Each cursor pastes a single line of the text."),V("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:V("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:kr(new Od(80,"multiCursorLimit",1e4,1,1e5,{markdownDescription:V("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:kr(new Ih(81,"occurrencesHighlight","singleFile",["off","singleFile","multiFile"],{markdownEnumDescriptions:[V("occurrencesHighlight.off","Does not highlight occurrences."),V("occurrencesHighlight.singleFile","Highlights occurrences only in the current file."),V("occurrencesHighlight.multiFile","Experimental: Highlights occurrences across all valid open files.")],markdownDescription:V("occurrencesHighlight","Controls whether occurrences should be highlighted across open files.")})),overviewRulerBorder:kr(new Lc(82,"overviewRulerBorder",!0,{description:V("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:kr(new Od(83,"overviewRulerLanes",3,0,3)),padding:kr(new Mti),pasteAs:kr(new eii),parameterHints:kr(new Rti),peekWidgetDefaultFocus:kr(new Ih(87,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[V("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),V("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:V("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:kr(new Lc(88,"definitionLinkOpensInPeek",!1,{description:V("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:kr(new Bti),quickSuggestionsDelay:kr(new Od(90,"quickSuggestionsDelay",10,0,1073741824,{description:V("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:kr(new Lc(91,"readOnly",!1)),readOnlyMessage:kr(new Hti),renameOnType:kr(new Lc(93,"renameOnType",!1,{description:V("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:V("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:kr(new Lc(94,"renderControlCharacters",!0,{description:V("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:kr(new Ih(95,"renderFinalNewline",Ty?"dimmed":"on",["off","on","dimmed"],{description:V("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:kr(new Ih(96,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",V("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:V("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:kr(new Lc(97,"renderLineHighlightOnlyWhenFocus",!1,{description:V("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:kr(new Ih(98,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:kr(new Ih(99,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",V("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),V("renderWhitespace.selection","Render whitespace characters only on selected text."),V("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:V("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:kr(new Od(100,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:kr(new Lc(101,"roundedSelection",!0,{description:V("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:kr(new Vti),scrollbar:kr(new jti),scrollBeyondLastColumn:kr(new Od(104,"scrollBeyondLastColumn",4,0,1073741824,{description:V("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:kr(new Lc(105,"scrollBeyondLastLine",!0,{description:V("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:kr(new Lc(106,"scrollPredominantAxis",!0,{description:V("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:kr(new Lc(107,"selectionClipboard",!0,{description:V("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:Ty})),selectionHighlight:kr(new Lc(108,"selectionHighlight",!0,{description:V("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:kr(new Lc(109,"selectOnLineNumbers",!0)),showFoldingControls:kr(new Ih(110,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[V("showFoldingControls.always","Always show the folding controls."),V("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),V("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:V("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:kr(new Lc(111,"showUnused",!0,{description:V("showUnused","Controls fading out of unused code.")})),showDeprecated:kr(new Lc(140,"showDeprecated",!0,{description:V("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:kr(new Nti),snippetSuggestions:kr(new Ih(112,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[V("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),V("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),V("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),V("snippetSuggestions.none","Do not show snippet suggestions.")],description:V("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:kr(new Kti),smoothScrolling:kr(new Lc(114,"smoothScrolling",!1,{description:V("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:kr(new Od(117,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:kr(new Gti),inlineSuggest:kr(new Uti),inlineEdit:kr(new qti),inlineCompletionsAccessibilityVerbose:kr(new Lc(149,"inlineCompletionsAccessibilityVerbose",!1,{description:V("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:kr(new Od(119,"suggestFontSize",0,0,1e3,{markdownDescription:V("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:kr(new Od(120,"suggestLineHeight",0,0,1e3,{markdownDescription:V("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:kr(new Lc(121,"suggestOnTriggerCharacters",!0,{description:V("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:kr(new Ih(122,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[V("suggestSelection.first","Always select the first suggestion."),V("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),V("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:V("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:kr(new Ih(123,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[V("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),V("tabCompletion.off","Disable tab completions."),V("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:V("tabCompletion","Enables tab completions.")})),tabIndex:kr(new Od(124,"tabIndex",0,-1,1073741824)),unicodeHighlight:kr(new zti),unusualLineTerminators:kr(new Ih(126,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[V("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),V("unusualLineTerminators.off","Unusual line terminators are ignored."),V("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:V("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:kr(new Lc(127,"useShadowDOM",!0)),useTabStops:kr(new Lc(128,"useTabStops",!0,{description:V("useTabStops","Spaces and tabs are inserted and deleted in alignment with tab stops.")})),wordBreak:kr(new Ih(129,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[V("wordBreak.normal","Use the default line break rule."),V("wordBreak.keepAll","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:V("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSegmenterLocales:kr(new Qti),wordSeparators:kr(new hy(131,"wordSeparators",Dbt,{description:V("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:kr(new Ih(132,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[V("wordWrap.off","Lines will never wrap."),V("wordWrap.on","Lines will wrap at the viewport width."),V({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),V({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:V({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:kr(new hy(133,"wordWrapBreakAfterCharacters"," })]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:kr(new hy(134,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:kr(new Od(135,"wordWrapColumn",80,1,1073741824,{markdownDescription:V({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:kr(new Ih(136,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:kr(new Ih(137,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:kr(new bti),defaultColorDecorators:kr(new Lc(147,"defaultColorDecorators",!1,{markdownDescription:V("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:kr(new Fti),tabFocusMode:kr(new Lc(144,"tabFocusMode",!1,{markdownDescription:V("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:kr(new vU),wrappingInfo:kr(new Zti),wrappingIndent:kr(new Xti),wrappingStrategy:kr(new Dti)};class rii{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?qU.isErrorNoTelemetry(e)?new qU(e.message+` + +`+e.stack):new Error(e.message+` + +`+e.stack):e},0)}}emit(e){this.listeners.forEach(i=>{i(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const Lbt=new rii;function Ba(c){pT(c)||Lbt.onUnexpectedError(c)}function r_(c){pT(c)||Lbt.onUnexpectedExternalError(c)}function egt(c){if(c instanceof Error){const{name:e,message:i}=c,n=c.stacktrace||c.stack;return{$isError:!0,name:e,message:i,stack:n,noTelemetry:qU.isErrorNoTelemetry(c)}}return c}const E0e="Canceled";function pT(c){return c instanceof DE?!0:c instanceof Error&&c.name===E0e&&c.message===E0e}class DE extends Error{constructor(){super(E0e),this.name=this.message}}function sii(){const c=new Error(E0e);return c.name=c.message,c}function nk(c){return c?new Error(`Illegal argument: ${c}`):new Error("Illegal argument")}function yHe(c){return c?new Error(`Illegal state: ${c}`):new Error("Illegal state")}class oii extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class qU extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof qU)return e;const i=new qU;return i.message=e.message,i.stack=e.stack,i}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class Yu extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,Yu.prototype)}}function ZM(c,e){const i=this;let n=!1,s;return function(){return n||(n=!0,s=c.apply(i,arguments)),s}}function A1e(c){return typeof c=="object"&&c!==null&&typeof c.dispose=="function"&&c.dispose.length===0}function yd(c){if(cc.is(c)){const e=[];for(const i of c)if(i)try{i.dispose()}catch(n){e.push(n)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(c)?[]:c}else if(c)return c.dispose(),c}function dT(...c){return go(()=>yd(c))}function go(c){return{dispose:ZM(()=>{c()})}}class On{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{yd(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?On.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&this._toDispose.delete(e)}}On.DISABLE_DISPOSED_WARNING=!1;class Ii{constructor(){this._store=new On,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}Ii.None=Object.freeze({dispose(){}});class jg{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var i;this._isDisposed||e===this._value||((i=this._value)===null||i===void 0||i.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,(e=this._value)===null||e===void 0||e.dispose(),this._value=void 0}}class aii{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}class lii{constructor(e){this.object=e}dispose(){}}class bHe{constructor(){this._store=new Map,this._isDisposed=!1}dispose(){this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{yd(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,i,n=!1){var s;this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),n||(s=this._store.get(e))===null||s===void 0||s.dispose(),this._store.set(e,i)}deleteAndDispose(e){var i;(i=this._store.get(e))===null||i===void 0||i.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}const cii=globalThis.performance&&typeof globalThis.performance.now=="function";class o0{static create(e){return new o0(e)}constructor(e){this._now=cii&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}var Mr;(function(c){c.None=()=>Ii.None;function e(ci,Mt){return x(ci,()=>{},0,void 0,!0,void 0,Mt)}c.defer=e;function i(ci){return(Mt,pi=null,gn)=>{let $n=!1,Ri;return Ri=ci(ao=>{if(!$n)return Ri?Ri.dispose():$n=!0,Mt.call(pi,ao)},null,gn),$n&&Ri.dispose(),Ri}}c.once=i;function n(ci,Mt,pi){return y((gn,$n=null,Ri)=>ci(ao=>gn.call($n,Mt(ao)),null,Ri),pi)}c.map=n;function s(ci,Mt,pi){return y((gn,$n=null,Ri)=>ci(ao=>{Mt(ao),gn.call($n,ao)},null,Ri),pi)}c.forEach=s;function l(ci,Mt,pi){return y((gn,$n=null,Ri)=>ci(ao=>Mt(ao)&&gn.call($n,ao),null,Ri),pi)}c.filter=l;function d(ci){return ci}c.signal=d;function f(...ci){return(Mt,pi=null,gn)=>{const $n=dT(...ci.map(Ri=>Ri(ao=>Mt.call(pi,ao))));return w($n,gn)}}c.any=f;function g(ci,Mt,pi,gn){let $n=pi;return n(ci,Ri=>($n=Mt($n,Ri),$n),gn)}c.reduce=g;function y(ci,Mt){let pi;const gn={onWillAddFirstListener(){pi=ci($n.fire,$n)},onDidRemoveLastListener(){pi==null||pi.dispose()}},$n=new ui(gn);return Mt==null||Mt.add($n),$n.event}function w(ci,Mt){return Mt instanceof Array?Mt.push(ci):Mt&&Mt.add(ci),ci}function x(ci,Mt,pi=100,gn=!1,$n=!1,Ri,ao){let Xs,Yt,na,Is=0,zs;const Ln={leakWarningThreshold:Ri,onWillAddFirstListener(){Xs=ci(zg=>{Is++,Yt=Mt(Yt,zg),gn&&!na&&(bd.fire(Yt),Yt=void 0),zs=()=>{const s_=Yt;Yt=void 0,na=void 0,(!gn||Is>1)&&bd.fire(s_),Is=0},typeof pi=="number"?(clearTimeout(na),na=setTimeout(zs,pi)):na===void 0&&(na=0,queueMicrotask(zs))})},onWillRemoveListener(){$n&&Is>0&&(zs==null||zs())},onDidRemoveLastListener(){zs=void 0,Xs.dispose()}},bd=new ui(Ln);return ao==null||ao.add(bd),bd.event}c.debounce=x;function I(ci,Mt=0,pi){return c.debounce(ci,(gn,$n)=>gn?(gn.push($n),gn):[$n],Mt,void 0,!0,void 0,pi)}c.accumulate=I;function P(ci,Mt=(gn,$n)=>gn===$n,pi){let gn=!0,$n;return l(ci,Ri=>{const ao=gn||!Mt(Ri,$n);return gn=!1,$n=Ri,ao},pi)}c.latch=P;function O(ci,Mt,pi){return[c.filter(ci,Mt,pi),c.filter(ci,gn=>!Mt(gn),pi)]}c.split=O;function W(ci,Mt=!1,pi=[],gn){let $n=pi.slice(),Ri=ci(Yt=>{$n?$n.push(Yt):Xs.fire(Yt)});gn&&gn.add(Ri);const ao=()=>{$n==null||$n.forEach(Yt=>Xs.fire(Yt)),$n=null},Xs=new ui({onWillAddFirstListener(){Ri||(Ri=ci(Yt=>Xs.fire(Yt)),gn&&gn.add(Ri))},onDidAddFirstListener(){$n&&(Mt?setTimeout(ao):ao())},onDidRemoveLastListener(){Ri&&Ri.dispose(),Ri=null}});return gn&&gn.add(Xs),Xs.event}c.buffer=W;function X(ci,Mt){return(gn,$n,Ri)=>{const ao=Mt(new ee);return ci(function(Xs){const Yt=ao.evaluate(Xs);Yt!==Z&&gn.call($n,Yt)},void 0,Ri)}}c.chain=X;const Z=Symbol("HaltChainable");class ee{constructor(){this.steps=[]}map(Mt){return this.steps.push(Mt),this}forEach(Mt){return this.steps.push(pi=>(Mt(pi),pi)),this}filter(Mt){return this.steps.push(pi=>Mt(pi)?pi:Z),this}reduce(Mt,pi){let gn=pi;return this.steps.push($n=>(gn=Mt(gn,$n),gn)),this}latch(Mt=(pi,gn)=>pi===gn){let pi=!0,gn;return this.steps.push($n=>{const Ri=pi||!Mt($n,gn);return pi=!1,gn=$n,Ri?$n:Z}),this}evaluate(Mt){for(const pi of this.steps)if(Mt=pi(Mt),Mt===Z)break;return Mt}}function he(ci,Mt,pi=gn=>gn){const gn=(...Xs)=>ao.fire(pi(...Xs)),$n=()=>ci.on(Mt,gn),Ri=()=>ci.removeListener(Mt,gn),ao=new ui({onWillAddFirstListener:$n,onDidRemoveLastListener:Ri});return ao.event}c.fromNodeEventEmitter=he;function we(ci,Mt,pi=gn=>gn){const gn=(...Xs)=>ao.fire(pi(...Xs)),$n=()=>ci.addEventListener(Mt,gn),Ri=()=>ci.removeEventListener(Mt,gn),ao=new ui({onWillAddFirstListener:$n,onDidRemoveLastListener:Ri});return ao.event}c.fromDOMEventEmitter=we;function Te(ci){return new Promise(Mt=>i(ci)(Mt))}c.toPromise=Te;function Be(ci){const Mt=new ui;return ci.then(pi=>{Mt.fire(pi)},()=>{Mt.fire(void 0)}).finally(()=>{Mt.dispose()}),Mt.event}c.fromPromise=Be;function Me(ci,Mt,pi){return Mt(pi),ci(gn=>Mt(gn))}c.runAndSubscribe=Me;class vt{constructor(Mt,pi){this._observable=Mt,this._counter=0,this._hasChanged=!1;const gn={onWillAddFirstListener:()=>{Mt.addObserver(this)},onDidRemoveLastListener:()=>{Mt.removeObserver(this)}};this.emitter=new ui(gn),pi&&pi.add(this.emitter)}beginUpdate(Mt){this._counter++}handlePossibleChange(Mt){}handleChange(Mt,pi){this._hasChanged=!0}endUpdate(Mt){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function Nt(ci,Mt){return new vt(ci,Mt).emitter.event}c.fromObservable=Nt;function Ni(ci){return(Mt,pi,gn)=>{let $n=0,Ri=!1;const ao={beginUpdate(){$n++},endUpdate(){$n--,$n===0&&(ci.reportChanges(),Ri&&(Ri=!1,Mt.call(pi)))},handlePossibleChange(){},handleChange(){Ri=!0}};ci.addObserver(ao),ci.reportChanges();const Xs={dispose(){ci.removeObserver(ao)}};return gn instanceof On?gn.add(Xs):Array.isArray(gn)&&gn.push(Xs),Xs}}c.fromObservableLight=Ni})(Mr||(Mr={}));class $U{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${$U._idPool++}`,$U.all.add(this)}start(e){this._stopWatch=new o0,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}$U.all=new Set;$U._idPool=0;let uii=-1;class dii{constructor(e,i,n=Math.random().toString(18).slice(2,5)){this._errorHandler=e,this.threshold=i,this.name=n,this._warnCountdown=0}dispose(){var e;(e=this._stacks)===null||e===void 0||e.clear()}check(e,i){const n=this.threshold;if(n<=0||i{const l=this._stacks.get(e.value)||0;this._stacks.set(e.value,l-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,i=0;for(const[n,s]of this._stacks)(!e||i{var l,d,f,g,y,w,x;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const W=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(W);const X=(l=this._leakageMon.getMostFrequentStack())!==null&&l!==void 0?l:["UNKNOWN stack",-1],Z=new hii(`${W}. HINT: Stack shows most frequent listener (${X[1]}-times)`,X[0]);return(((d=this._options)===null||d===void 0?void 0:d.onListenerError)||Ba)(Z),Ii.None}if(this._disposed)return Ii.None;n&&(i=i.bind(n));const I=new w8e(i);let P;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(I.stack=CHe.create(),P=this._leakageMon.check(I.stack,this._size+1)),this._listeners?this._listeners instanceof w8e?((x=this._deliveryQueue)!==null&&x!==void 0||(this._deliveryQueue=new Pbt),this._listeners=[this._listeners,I]):this._listeners.push(I):((g=(f=this._options)===null||f===void 0?void 0:f.onWillAddFirstListener)===null||g===void 0||g.call(f,this),this._listeners=I,(w=(y=this._options)===null||y===void 0?void 0:y.onDidAddFirstListener)===null||w===void 0||w.call(y,this)),this._size++;const O=go(()=>{P==null||P(),this._removeListener(I)});return s instanceof On?s.add(O):Array.isArray(s)&&s.push(O),O}),this._event}_removeListener(e){var i,n,s,l;if((n=(i=this._options)===null||i===void 0?void 0:i.onWillRemoveListener)===null||n===void 0||n.call(i,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(l=(s=this._options)===null||s===void 0?void 0:s.onDidRemoveLastListener)===null||l===void 0||l.call(s,this),this._size=0;return}const d=this._listeners,f=d.indexOf(e);if(f===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,d[f]=void 0;const g=this._deliveryQueue.current===this;if(this._size*_ii<=d.length){let y=0;for(let w=0;w0}};const pii=()=>new Pbt;class Pbt{constructor(){this.i=-1,this.end=0}enqueue(e,i,n){this.i=0,this.end=n,this.current=e,this.value=i}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class _9 extends ui{constructor(e){super(e),this._isPaused=0,this._eventQueue=new yy,this._mergeFn=e==null?void 0:e.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}}class Abt extends _9{constructor(e){var i;super(e),this._delay=(i=e.delay)!==null&&i!==void 0?i:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}}class gii extends ui{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e==null?void 0:e.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(i=>super.fire(i)),this._queuedEvents=[]}))}}class mii{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new ui({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const i={event:e,listener:null};return this.events.push(i),this.hasListeners&&this.hook(i),go(ZM(()=>{this.hasListeners&&this.unhook(i);const s=this.events.indexOf(i);this.events.splice(s,1)}))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(e=>this.hook(e))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(e=>this.unhook(e))}hook(e){e.listener=e.event(i=>this.emitter.fire(i))}unhook(e){var i;(i=e.listener)===null||i===void 0||i.dispose(),e.listener=null}dispose(){var e;this.emitter.dispose();for(const i of this.events)(e=i.listener)===null||e===void 0||e.dispose();this.events=[]}}class O1e{constructor(){this.data=[]}wrapEvent(e,i,n){return(s,l,d)=>e(f=>{var g;const y=this.data[this.data.length-1];if(!i){y?y.buffers.push(()=>s.call(l,f)):s.call(l,f);return}const w=y;if(!w){s.call(l,i(n,f));return}(g=w.items)!==null&&g!==void 0||(w.items=[]),w.items.push(f),w.buffers.length===0&&y.buffers.push(()=>{var x;(x=w.reducedResult)!==null&&x!==void 0||(w.reducedResult=n?w.items.reduce(i,n):w.items.reduce(i)),s.call(l,w.reducedResult)})},void 0,d)}bufferEvents(e){const i={buffers:new Array};this.data.push(i);const n=e();return this.data.pop(),i.buffers.forEach(s=>s()),n}}class tgt{constructor(){this.listening=!1,this.inputEvent=Mr.None,this.inputEventListener=Ii.None,this.emitter=new ui({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}const Obt=Object.freeze(function(c,e){const i=setTimeout(c.bind(e),0);return{dispose(){clearTimeout(i)}}});var Gl;(function(c){function e(i){return i===c.None||i===c.Cancelled||i instanceof Bme?!0:!i||typeof i!="object"?!1:typeof i.isCancellationRequested=="boolean"&&typeof i.onCancellationRequested=="function"}c.isCancellationToken=e,c.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Mr.None}),c.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Obt})})(Gl||(Gl={}));class Bme{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Obt:(this._emitter||(this._emitter=new ui),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}let uh=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Bme),this._token}cancel(){this._token?this._token instanceof Bme&&this._token.cancel():this._token=Gl.Cancelled}dispose(e=!1){var i;e&&this.cancel(),(i=this._parentListener)===null||i===void 0||i.dispose(),this._token?this._token instanceof Bme&&this._token.dispose():this._token=Gl.None}};function igt(c){const e=new uh;return c.add({dispose(){e.cancel()}}),e.token}class SHe{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,i){this._keyCodeToStr[e]=i,this._strToKeyCode[i.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const Wme=new SHe,MFe=new SHe,RFe=new SHe,Mbt=new Array(230),vii=Object.create(null),yii=Object.create(null),wHe=[];for(let c=0;c<=193;c++)wHe[c]=-1;(function(){const c="",e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",c,c],[1,1,"Hyper",0,c,0,c,c,c],[1,2,"Super",0,c,0,c,c,c],[1,3,"Fn",0,c,0,c,c,c],[1,4,"FnLock",0,c,0,c,c,c],[1,5,"Suspend",0,c,0,c,c,c],[1,6,"Resume",0,c,0,c,c,c],[1,7,"Turbo",0,c,0,c,c,c],[1,8,"Sleep",0,c,0,"VK_SLEEP",c,c],[1,9,"WakeUp",0,c,0,c,c,c],[0,10,"KeyA",31,"A",65,"VK_A",c,c],[0,11,"KeyB",32,"B",66,"VK_B",c,c],[0,12,"KeyC",33,"C",67,"VK_C",c,c],[0,13,"KeyD",34,"D",68,"VK_D",c,c],[0,14,"KeyE",35,"E",69,"VK_E",c,c],[0,15,"KeyF",36,"F",70,"VK_F",c,c],[0,16,"KeyG",37,"G",71,"VK_G",c,c],[0,17,"KeyH",38,"H",72,"VK_H",c,c],[0,18,"KeyI",39,"I",73,"VK_I",c,c],[0,19,"KeyJ",40,"J",74,"VK_J",c,c],[0,20,"KeyK",41,"K",75,"VK_K",c,c],[0,21,"KeyL",42,"L",76,"VK_L",c,c],[0,22,"KeyM",43,"M",77,"VK_M",c,c],[0,23,"KeyN",44,"N",78,"VK_N",c,c],[0,24,"KeyO",45,"O",79,"VK_O",c,c],[0,25,"KeyP",46,"P",80,"VK_P",c,c],[0,26,"KeyQ",47,"Q",81,"VK_Q",c,c],[0,27,"KeyR",48,"R",82,"VK_R",c,c],[0,28,"KeyS",49,"S",83,"VK_S",c,c],[0,29,"KeyT",50,"T",84,"VK_T",c,c],[0,30,"KeyU",51,"U",85,"VK_U",c,c],[0,31,"KeyV",52,"V",86,"VK_V",c,c],[0,32,"KeyW",53,"W",87,"VK_W",c,c],[0,33,"KeyX",54,"X",88,"VK_X",c,c],[0,34,"KeyY",55,"Y",89,"VK_Y",c,c],[0,35,"KeyZ",56,"Z",90,"VK_Z",c,c],[0,36,"Digit1",22,"1",49,"VK_1",c,c],[0,37,"Digit2",23,"2",50,"VK_2",c,c],[0,38,"Digit3",24,"3",51,"VK_3",c,c],[0,39,"Digit4",25,"4",52,"VK_4",c,c],[0,40,"Digit5",26,"5",53,"VK_5",c,c],[0,41,"Digit6",27,"6",54,"VK_6",c,c],[0,42,"Digit7",28,"7",55,"VK_7",c,c],[0,43,"Digit8",29,"8",56,"VK_8",c,c],[0,44,"Digit9",30,"9",57,"VK_9",c,c],[0,45,"Digit0",21,"0",48,"VK_0",c,c],[1,46,"Enter",3,"Enter",13,"VK_RETURN",c,c],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",c,c],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",c,c],[1,49,"Tab",2,"Tab",9,"VK_TAB",c,c],[1,50,"Space",10,"Space",32,"VK_SPACE",c,c],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,c,0,c,c,c],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",c,c],[1,64,"F1",59,"F1",112,"VK_F1",c,c],[1,65,"F2",60,"F2",113,"VK_F2",c,c],[1,66,"F3",61,"F3",114,"VK_F3",c,c],[1,67,"F4",62,"F4",115,"VK_F4",c,c],[1,68,"F5",63,"F5",116,"VK_F5",c,c],[1,69,"F6",64,"F6",117,"VK_F6",c,c],[1,70,"F7",65,"F7",118,"VK_F7",c,c],[1,71,"F8",66,"F8",119,"VK_F8",c,c],[1,72,"F9",67,"F9",120,"VK_F9",c,c],[1,73,"F10",68,"F10",121,"VK_F10",c,c],[1,74,"F11",69,"F11",122,"VK_F11",c,c],[1,75,"F12",70,"F12",123,"VK_F12",c,c],[1,76,"PrintScreen",0,c,0,c,c,c],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",c,c],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",c,c],[1,79,"Insert",19,"Insert",45,"VK_INSERT",c,c],[1,80,"Home",14,"Home",36,"VK_HOME",c,c],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",c,c],[1,82,"Delete",20,"Delete",46,"VK_DELETE",c,c],[1,83,"End",13,"End",35,"VK_END",c,c],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",c,c],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",c],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",c],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",c],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",c],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",c,c],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",c,c],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",c,c],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",c,c],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",c,c],[1,94,"NumpadEnter",3,c,0,c,c,c],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",c,c],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",c,c],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",c,c],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",c,c],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",c,c],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",c,c],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",c,c],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",c,c],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",c,c],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",c,c],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",c,c],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",c,c],[1,107,"ContextMenu",58,"ContextMenu",93,c,c,c],[1,108,"Power",0,c,0,c,c,c],[1,109,"NumpadEqual",0,c,0,c,c,c],[1,110,"F13",71,"F13",124,"VK_F13",c,c],[1,111,"F14",72,"F14",125,"VK_F14",c,c],[1,112,"F15",73,"F15",126,"VK_F15",c,c],[1,113,"F16",74,"F16",127,"VK_F16",c,c],[1,114,"F17",75,"F17",128,"VK_F17",c,c],[1,115,"F18",76,"F18",129,"VK_F18",c,c],[1,116,"F19",77,"F19",130,"VK_F19",c,c],[1,117,"F20",78,"F20",131,"VK_F20",c,c],[1,118,"F21",79,"F21",132,"VK_F21",c,c],[1,119,"F22",80,"F22",133,"VK_F22",c,c],[1,120,"F23",81,"F23",134,"VK_F23",c,c],[1,121,"F24",82,"F24",135,"VK_F24",c,c],[1,122,"Open",0,c,0,c,c,c],[1,123,"Help",0,c,0,c,c,c],[1,124,"Select",0,c,0,c,c,c],[1,125,"Again",0,c,0,c,c,c],[1,126,"Undo",0,c,0,c,c,c],[1,127,"Cut",0,c,0,c,c,c],[1,128,"Copy",0,c,0,c,c,c],[1,129,"Paste",0,c,0,c,c,c],[1,130,"Find",0,c,0,c,c,c],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",c,c],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",c,c],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",c,c],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",c,c],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",c,c],[1,136,"KanaMode",0,c,0,c,c,c],[0,137,"IntlYen",0,c,0,c,c,c],[1,138,"Convert",0,c,0,c,c,c],[1,139,"NonConvert",0,c,0,c,c,c],[1,140,"Lang1",0,c,0,c,c,c],[1,141,"Lang2",0,c,0,c,c,c],[1,142,"Lang3",0,c,0,c,c,c],[1,143,"Lang4",0,c,0,c,c,c],[1,144,"Lang5",0,c,0,c,c,c],[1,145,"Abort",0,c,0,c,c,c],[1,146,"Props",0,c,0,c,c,c],[1,147,"NumpadParenLeft",0,c,0,c,c,c],[1,148,"NumpadParenRight",0,c,0,c,c,c],[1,149,"NumpadBackspace",0,c,0,c,c,c],[1,150,"NumpadMemoryStore",0,c,0,c,c,c],[1,151,"NumpadMemoryRecall",0,c,0,c,c,c],[1,152,"NumpadMemoryClear",0,c,0,c,c,c],[1,153,"NumpadMemoryAdd",0,c,0,c,c,c],[1,154,"NumpadMemorySubtract",0,c,0,c,c,c],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",c,c],[1,156,"NumpadClearEntry",0,c,0,c,c,c],[1,0,c,5,"Ctrl",17,"VK_CONTROL",c,c],[1,0,c,4,"Shift",16,"VK_SHIFT",c,c],[1,0,c,6,"Alt",18,"VK_MENU",c,c],[1,0,c,57,"Meta",91,"VK_COMMAND",c,c],[1,157,"ControlLeft",5,c,0,"VK_LCONTROL",c,c],[1,158,"ShiftLeft",4,c,0,"VK_LSHIFT",c,c],[1,159,"AltLeft",6,c,0,"VK_LMENU",c,c],[1,160,"MetaLeft",57,c,0,"VK_LWIN",c,c],[1,161,"ControlRight",5,c,0,"VK_RCONTROL",c,c],[1,162,"ShiftRight",4,c,0,"VK_RSHIFT",c,c],[1,163,"AltRight",6,c,0,"VK_RMENU",c,c],[1,164,"MetaRight",57,c,0,"VK_RWIN",c,c],[1,165,"BrightnessUp",0,c,0,c,c,c],[1,166,"BrightnessDown",0,c,0,c,c,c],[1,167,"MediaPlay",0,c,0,c,c,c],[1,168,"MediaRecord",0,c,0,c,c,c],[1,169,"MediaFastForward",0,c,0,c,c,c],[1,170,"MediaRewind",0,c,0,c,c,c],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",c,c],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",c,c],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",c,c],[1,174,"Eject",0,c,0,c,c,c],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",c,c],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",c,c],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",c,c],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",c,c],[1,179,"LaunchApp1",0,c,0,"VK_MEDIA_LAUNCH_APP1",c,c],[1,180,"SelectTask",0,c,0,c,c,c],[1,181,"LaunchScreenSaver",0,c,0,c,c,c],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",c,c],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",c,c],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",c,c],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",c,c],[1,186,"BrowserStop",0,c,0,"VK_BROWSER_STOP",c,c],[1,187,"BrowserRefresh",0,c,0,"VK_BROWSER_REFRESH",c,c],[1,188,"BrowserFavorites",0,c,0,"VK_BROWSER_FAVORITES",c,c],[1,189,"ZoomToggle",0,c,0,c,c,c],[1,190,"MailReply",0,c,0,c,c,c],[1,191,"MailForward",0,c,0,c,c,c],[1,192,"MailSend",0,c,0,c,c,c],[1,0,c,114,"KeyInComposition",229,c,c,c],[1,0,c,116,"ABNT_C2",194,"VK_ABNT_C2",c,c],[1,0,c,96,"OEM_8",223,"VK_OEM_8",c,c],[1,0,c,0,c,0,"VK_KANA",c,c],[1,0,c,0,c,0,"VK_HANGUL",c,c],[1,0,c,0,c,0,"VK_JUNJA",c,c],[1,0,c,0,c,0,"VK_FINAL",c,c],[1,0,c,0,c,0,"VK_HANJA",c,c],[1,0,c,0,c,0,"VK_KANJI",c,c],[1,0,c,0,c,0,"VK_CONVERT",c,c],[1,0,c,0,c,0,"VK_NONCONVERT",c,c],[1,0,c,0,c,0,"VK_ACCEPT",c,c],[1,0,c,0,c,0,"VK_MODECHANGE",c,c],[1,0,c,0,c,0,"VK_SELECT",c,c],[1,0,c,0,c,0,"VK_PRINT",c,c],[1,0,c,0,c,0,"VK_EXECUTE",c,c],[1,0,c,0,c,0,"VK_SNAPSHOT",c,c],[1,0,c,0,c,0,"VK_HELP",c,c],[1,0,c,0,c,0,"VK_APPS",c,c],[1,0,c,0,c,0,"VK_PROCESSKEY",c,c],[1,0,c,0,c,0,"VK_PACKET",c,c],[1,0,c,0,c,0,"VK_DBE_SBCSCHAR",c,c],[1,0,c,0,c,0,"VK_DBE_DBCSCHAR",c,c],[1,0,c,0,c,0,"VK_ATTN",c,c],[1,0,c,0,c,0,"VK_CRSEL",c,c],[1,0,c,0,c,0,"VK_EXSEL",c,c],[1,0,c,0,c,0,"VK_EREOF",c,c],[1,0,c,0,c,0,"VK_PLAY",c,c],[1,0,c,0,c,0,"VK_ZOOM",c,c],[1,0,c,0,c,0,"VK_NONAME",c,c],[1,0,c,0,c,0,"VK_PA1",c,c],[1,0,c,0,c,0,"VK_OEM_CLEAR",c,c]],i=[],n=[];for(const s of e){const[l,d,f,g,y,w,x,I,P]=s;if(n[d]||(n[d]=!0,vii[f]=d,yii[f.toLowerCase()]=d,l&&(wHe[d]=g)),!i[g]){if(i[g]=!0,!y)throw new Error(`String representation missing for key code ${g} around scan code ${f}`);Wme.define(g,y),MFe.define(g,I||y),RFe.define(g,P||I||y)}w&&(Mbt[w]=g)}})();var d4;(function(c){function e(f){return Wme.keyCodeToStr(f)}c.toString=e;function i(f){return Wme.strToKeyCode(f)}c.fromString=i;function n(f){return MFe.keyCodeToStr(f)}c.toUserSettingsUS=n;function s(f){return RFe.keyCodeToStr(f)}c.toUserSettingsGeneral=s;function l(f){return MFe.strToKeyCode(f)||RFe.strToKeyCode(f)}c.fromUserSettings=l;function d(f){if(f>=98&&f<=113)return null;switch(f){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Wme.keyCodeToStr(f)}c.toElectronAccelerator=d})(d4||(d4={}));function qp(c,e){const i=(e&65535)<<16>>>0;return(c|i)>>>0}var ngt={};let bU;const x8e=globalThis.vscode;if(typeof x8e<"u"&&typeof x8e.process<"u"){const c=x8e.process;bU={get platform(){return c.platform},get arch(){return c.arch},get env(){return c.env},cwd(){return c.cwd()}}}else typeof process<"u"?bU={get platform(){return process.platform},get arch(){return process.arch},get env(){return ngt},cwd(){return ngt.VSCODE_CWD||process.cwd()}}:bU={get platform(){return M0?"win32":Wl?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const I0e=bU.cwd,FFe=bU.env,bii=bU.platform,Cii=65,Sii=97,wii=90,xii=122,FM=46,b1=47,iw=92,GO=58,kii=63;class Rbt extends Error{constructor(e,i,n){let s;typeof i=="string"&&i.indexOf("not ")===0?(s="must not be",i=i.replace(/^not /,"")):s="must be";const l=e.indexOf(".")!==-1?"property":"argument";let d=`The "${e}" ${l} ${s} of type ${i}`;d+=`. Received type ${typeof n}`,super(d),this.code="ERR_INVALID_ARG_TYPE"}}function Tii(c,e){if(c===null||typeof c!="object")throw new Rbt(e,"Object",c)}function mm(c,e){if(typeof c!="string")throw new Rbt(e,"string",c)}const kR=bii==="win32";function ju(c){return c===b1||c===iw}function BFe(c){return c===b1}function KO(c){return c>=Cii&&c<=wii||c>=Sii&&c<=xii}function N0e(c,e,i,n){let s="",l=0,d=-1,f=0,g=0;for(let y=0;y<=c.length;++y){if(y2){const w=s.lastIndexOf(i);w===-1?(s="",l=0):(s=s.slice(0,w),l=s.length-1-s.lastIndexOf(i)),d=y,f=0;continue}else if(s.length!==0){s="",l=0,d=y,f=0;continue}}e&&(s+=s.length>0?`${i}..`:"..",l=2)}else s.length>0?s+=`${i}${c.slice(d+1,y)}`:s=c.slice(d+1,y),l=y-d-1;d=y,f=0}else g===FM&&f!==-1?++f:f=-1}return s}function Fbt(c,e){Tii(e,"pathObject");const i=e.dir||e.root,n=e.base||`${e.name||""}${e.ext||""}`;return i?i===e.root?`${i}${n}`:`${i}${c}${n}`:n}const BC={resolve(...c){let e="",i="",n=!1;for(let s=c.length-1;s>=-1;s--){let l;if(s>=0){if(l=c[s],mm(l,"path"),l.length===0)continue}else e.length===0?l=I0e():(l=FFe[`=${e}`]||I0e(),(l===void 0||l.slice(0,2).toLowerCase()!==e.toLowerCase()&&l.charCodeAt(2)===iw)&&(l=`${e}\\`));const d=l.length;let f=0,g="",y=!1;const w=l.charCodeAt(0);if(d===1)ju(w)&&(f=1,y=!0);else if(ju(w))if(y=!0,ju(l.charCodeAt(1))){let x=2,I=x;for(;x2&&ju(l.charCodeAt(2))&&(y=!0,f=3));if(g.length>0)if(e.length>0){if(g.toLowerCase()!==e.toLowerCase())continue}else e=g;if(n){if(e.length>0)break}else if(i=`${l.slice(f)}\\${i}`,n=y,y&&e.length>0)break}return i=N0e(i,!n,"\\",ju),n?`${e}\\${i}`:`${e}${i}`||"."},normalize(c){mm(c,"path");const e=c.length;if(e===0)return".";let i=0,n,s=!1;const l=c.charCodeAt(0);if(e===1)return BFe(l)?"\\":c;if(ju(l))if(s=!0,ju(c.charCodeAt(1))){let f=2,g=f;for(;f2&&ju(c.charCodeAt(2))&&(s=!0,i=3));let d=i0&&ju(c.charCodeAt(e-1))&&(d+="\\"),n===void 0?s?`\\${d}`:d:s?`${n}\\${d}`:`${n}${d}`},isAbsolute(c){mm(c,"path");const e=c.length;if(e===0)return!1;const i=c.charCodeAt(0);return ju(i)||e>2&&KO(i)&&c.charCodeAt(1)===GO&&ju(c.charCodeAt(2))},join(...c){if(c.length===0)return".";let e,i;for(let l=0;l0&&(e===void 0?e=i=d:e+=`\\${d}`)}if(e===void 0)return".";let n=!0,s=0;if(typeof i=="string"&&ju(i.charCodeAt(0))){++s;const l=i.length;l>1&&ju(i.charCodeAt(1))&&(++s,l>2&&(ju(i.charCodeAt(2))?++s:n=!1))}if(n){for(;s=2&&(e=`\\${e.slice(s)}`)}return BC.normalize(e)},relative(c,e){if(mm(c,"from"),mm(e,"to"),c===e)return"";const i=BC.resolve(c),n=BC.resolve(e);if(i===n||(c=i.toLowerCase(),e=n.toLowerCase(),c===e))return"";let s=0;for(;ss&&c.charCodeAt(l-1)===iw;)l--;const d=l-s;let f=0;for(;ff&&e.charCodeAt(g-1)===iw;)g--;const y=g-f,w=dw){if(e.charCodeAt(f+I)===iw)return n.slice(f+I+1);if(I===2)return n.slice(f+I)}d>w&&(c.charCodeAt(s+I)===iw?x=I:I===2&&(x=3)),x===-1&&(x=0)}let P="";for(I=s+x+1;I<=l;++I)(I===l||c.charCodeAt(I)===iw)&&(P+=P.length===0?"..":"\\..");return f+=x,P.length>0?`${P}${n.slice(f,g)}`:(n.charCodeAt(f)===iw&&++f,n.slice(f,g))},toNamespacedPath(c){if(typeof c!="string"||c.length===0)return c;const e=BC.resolve(c);if(e.length<=2)return c;if(e.charCodeAt(0)===iw){if(e.charCodeAt(1)===iw){const i=e.charCodeAt(2);if(i!==kii&&i!==FM)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(KO(e.charCodeAt(0))&&e.charCodeAt(1)===GO&&e.charCodeAt(2)===iw)return`\\\\?\\${e}`;return c},dirname(c){mm(c,"path");const e=c.length;if(e===0)return".";let i=-1,n=0;const s=c.charCodeAt(0);if(e===1)return ju(s)?c:".";if(ju(s)){if(i=n=1,ju(c.charCodeAt(1))){let f=2,g=f;for(;f2&&ju(c.charCodeAt(2))?3:2,n=i);let l=-1,d=!0;for(let f=e-1;f>=n;--f)if(ju(c.charCodeAt(f))){if(!d){l=f;break}}else d=!1;if(l===-1){if(i===-1)return".";l=i}return c.slice(0,l)},basename(c,e){e!==void 0&&mm(e,"ext"),mm(c,"path");let i=0,n=-1,s=!0,l;if(c.length>=2&&KO(c.charCodeAt(0))&&c.charCodeAt(1)===GO&&(i=2),e!==void 0&&e.length>0&&e.length<=c.length){if(e===c)return"";let d=e.length-1,f=-1;for(l=c.length-1;l>=i;--l){const g=c.charCodeAt(l);if(ju(g)){if(!s){i=l+1;break}}else f===-1&&(s=!1,f=l+1),d>=0&&(g===e.charCodeAt(d)?--d===-1&&(n=l):(d=-1,n=f))}return i===n?n=f:n===-1&&(n=c.length),c.slice(i,n)}for(l=c.length-1;l>=i;--l)if(ju(c.charCodeAt(l))){if(!s){i=l+1;break}}else n===-1&&(s=!1,n=l+1);return n===-1?"":c.slice(i,n)},extname(c){mm(c,"path");let e=0,i=-1,n=0,s=-1,l=!0,d=0;c.length>=2&&c.charCodeAt(1)===GO&&KO(c.charCodeAt(0))&&(e=n=2);for(let f=c.length-1;f>=e;--f){const g=c.charCodeAt(f);if(ju(g)){if(!l){n=f+1;break}continue}s===-1&&(l=!1,s=f+1),g===FM?i===-1?i=f:d!==1&&(d=1):i!==-1&&(d=-1)}return i===-1||s===-1||d===0||d===1&&i===s-1&&i===n+1?"":c.slice(i,s)},format:Fbt.bind(null,"\\"),parse(c){mm(c,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(c.length===0)return e;const i=c.length;let n=0,s=c.charCodeAt(0);if(i===1)return ju(s)?(e.root=e.dir=c,e):(e.base=e.name=c,e);if(ju(s)){if(n=1,ju(c.charCodeAt(1))){let x=2,I=x;for(;x0&&(e.root=c.slice(0,n));let l=-1,d=n,f=-1,g=!0,y=c.length-1,w=0;for(;y>=n;--y){if(s=c.charCodeAt(y),ju(s)){if(!g){d=y+1;break}continue}f===-1&&(g=!1,f=y+1),s===FM?l===-1?l=y:w!==1&&(w=1):l!==-1&&(w=-1)}return f!==-1&&(l===-1||w===0||w===1&&l===f-1&&l===d+1?e.base=e.name=c.slice(d,f):(e.name=c.slice(d,l),e.base=c.slice(d,f),e.ext=c.slice(l,f))),d>0&&d!==n?e.dir=c.slice(0,d-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},Dii=(()=>{if(kR){const c=/\\/g;return()=>{const e=I0e().replace(c,"/");return e.slice(e.indexOf("/"))}}return()=>I0e()})(),gp={resolve(...c){let e="",i=!1;for(let n=c.length-1;n>=-1&&!i;n--){const s=n>=0?c[n]:Dii();mm(s,"path"),s.length!==0&&(e=`${s}/${e}`,i=s.charCodeAt(0)===b1)}return e=N0e(e,!i,"/",BFe),i?`/${e}`:e.length>0?e:"."},normalize(c){if(mm(c,"path"),c.length===0)return".";const e=c.charCodeAt(0)===b1,i=c.charCodeAt(c.length-1)===b1;return c=N0e(c,!e,"/",BFe),c.length===0?e?"/":i?"./":".":(i&&(c+="/"),e?`/${c}`:c)},isAbsolute(c){return mm(c,"path"),c.length>0&&c.charCodeAt(0)===b1},join(...c){if(c.length===0)return".";let e;for(let i=0;i0&&(e===void 0?e=n:e+=`/${n}`)}return e===void 0?".":gp.normalize(e)},relative(c,e){if(mm(c,"from"),mm(e,"to"),c===e||(c=gp.resolve(c),e=gp.resolve(e),c===e))return"";const i=1,n=c.length,s=n-i,l=1,d=e.length-l,f=sf){if(e.charCodeAt(l+y)===b1)return e.slice(l+y+1);if(y===0)return e.slice(l+y)}else s>f&&(c.charCodeAt(i+y)===b1?g=y:y===0&&(g=0));let w="";for(y=i+g+1;y<=n;++y)(y===n||c.charCodeAt(y)===b1)&&(w+=w.length===0?"..":"/..");return`${w}${e.slice(l+g)}`},toNamespacedPath(c){return c},dirname(c){if(mm(c,"path"),c.length===0)return".";const e=c.charCodeAt(0)===b1;let i=-1,n=!0;for(let s=c.length-1;s>=1;--s)if(c.charCodeAt(s)===b1){if(!n){i=s;break}}else n=!1;return i===-1?e?"/":".":e&&i===1?"//":c.slice(0,i)},basename(c,e){e!==void 0&&mm(e,"ext"),mm(c,"path");let i=0,n=-1,s=!0,l;if(e!==void 0&&e.length>0&&e.length<=c.length){if(e===c)return"";let d=e.length-1,f=-1;for(l=c.length-1;l>=0;--l){const g=c.charCodeAt(l);if(g===b1){if(!s){i=l+1;break}}else f===-1&&(s=!1,f=l+1),d>=0&&(g===e.charCodeAt(d)?--d===-1&&(n=l):(d=-1,n=f))}return i===n?n=f:n===-1&&(n=c.length),c.slice(i,n)}for(l=c.length-1;l>=0;--l)if(c.charCodeAt(l)===b1){if(!s){i=l+1;break}}else n===-1&&(s=!1,n=l+1);return n===-1?"":c.slice(i,n)},extname(c){mm(c,"path");let e=-1,i=0,n=-1,s=!0,l=0;for(let d=c.length-1;d>=0;--d){const f=c.charCodeAt(d);if(f===b1){if(!s){i=d+1;break}continue}n===-1&&(s=!1,n=d+1),f===FM?e===-1?e=d:l!==1&&(l=1):e!==-1&&(l=-1)}return e===-1||n===-1||l===0||l===1&&e===n-1&&e===i+1?"":c.slice(e,n)},format:Fbt.bind(null,"/"),parse(c){mm(c,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(c.length===0)return e;const i=c.charCodeAt(0)===b1;let n;i?(e.root="/",n=1):n=0;let s=-1,l=0,d=-1,f=!0,g=c.length-1,y=0;for(;g>=n;--g){const w=c.charCodeAt(g);if(w===b1){if(!f){l=g+1;break}continue}d===-1&&(f=!1,d=g+1),w===FM?s===-1?s=g:y!==1&&(y=1):s!==-1&&(y=-1)}if(d!==-1){const w=l===0&&i?1:l;s===-1||y===0||y===1&&s===d-1&&s===l+1?e.base=e.name=c.slice(w,d):(e.name=c.slice(w,s),e.base=c.slice(w,d),e.ext=c.slice(s,d))}return l>0?e.dir=c.slice(0,l-1):i&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};gp.win32=BC.win32=BC;gp.posix=BC.posix=gp;const Bbt=kR?BC.normalize:gp.normalize,Eii=kR?BC.resolve:gp.resolve,Iii=kR?BC.relative:gp.relative,Wbt=kR?BC.dirname:gp.dirname,BM=kR?BC.basename:gp.basename,Nii=kR?BC.extname:gp.extname,vE=kR?BC.sep:gp.sep,Lii=/^\w[\w\d+.-]*$/,Pii=/^\//,Aii=/^\/\//;function Oii(c,e){if(!c.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${c.authority}", path: "${c.path}", query: "${c.query}", fragment: "${c.fragment}"}`);if(c.scheme&&!Lii.test(c.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(c.path){if(c.authority){if(!Pii.test(c.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(Aii.test(c.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Mii(c,e){return!c&&!e?"file":c}function Rii(c,e){switch(c){case"https":case"http":case"file":e?e[0]!==oE&&(e=oE+e):e=oE;break}return e}const X_="",oE="/",Fii=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class Oo{static isUri(e){return e instanceof Oo?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function":!1}constructor(e,i,n,s,l,d=!1){typeof e=="object"?(this.scheme=e.scheme||X_,this.authority=e.authority||X_,this.path=e.path||X_,this.query=e.query||X_,this.fragment=e.fragment||X_):(this.scheme=Mii(e,d),this.authority=i||X_,this.path=Rii(this.scheme,n||X_),this.query=s||X_,this.fragment=l||X_,Oii(this,d))}get fsPath(){return L0e(this,!1)}with(e){if(!e)return this;let{scheme:i,authority:n,path:s,query:l,fragment:d}=e;return i===void 0?i=this.scheme:i===null&&(i=X_),n===void 0?n=this.authority:n===null&&(n=X_),s===void 0?s=this.path:s===null&&(s=X_),l===void 0?l=this.query:l===null&&(l=X_),d===void 0?d=this.fragment:d===null&&(d=X_),i===this.scheme&&n===this.authority&&s===this.path&&l===this.query&&d===this.fragment?this:new gz(i,n,s,l,d)}static parse(e,i=!1){const n=Fii.exec(e);return n?new gz(n[2]||X_,_ge(n[4]||X_),_ge(n[5]||X_),_ge(n[7]||X_),_ge(n[9]||X_),i):new gz(X_,X_,X_,X_,X_)}static file(e){let i=X_;if(M0&&(e=e.replace(/\\/g,oE)),e[0]===oE&&e[1]===oE){const n=e.indexOf(oE,2);n===-1?(i=e.substring(2),e=oE):(i=e.substring(2,n),e=e.substring(n)||oE)}return new gz("file",i,e,X_,X_)}static from(e,i){return new gz(e.scheme,e.authority,e.path,e.query,e.fragment,i)}static joinPath(e,...i){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return M0&&e.scheme==="file"?n=Oo.file(BC.join(L0e(e,!0),...i)).path:n=gp.join(e.path,...i),e.with({path:n})}toString(e=!1){return WFe(this,e)}toJSON(){return this}static revive(e){var i,n;if(e){if(e instanceof Oo)return e;{const s=new gz(e);return s._formatted=(i=e.external)!==null&&i!==void 0?i:null,s._fsPath=e._sep===Vbt&&(n=e.fsPath)!==null&&n!==void 0?n:null,s}}else return e}}const Vbt=M0?1:void 0;let gz=class extends Oo{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=L0e(this,!1)),this._fsPath}toString(e=!1){return e?WFe(this,!0):(this._formatted||(this._formatted=WFe(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Vbt),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}};const Hbt={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function rgt(c,e,i){let n,s=-1;for(let l=0;l=97&&d<=122||d>=65&&d<=90||d>=48&&d<=57||d===45||d===46||d===95||d===126||e&&d===47||i&&d===91||i&&d===93||i&&d===58)s!==-1&&(n+=encodeURIComponent(c.substring(s,l)),s=-1),n!==void 0&&(n+=c.charAt(l));else{n===void 0&&(n=c.substr(0,l));const f=Hbt[d];f!==void 0?(s!==-1&&(n+=encodeURIComponent(c.substring(s,l)),s=-1),n+=f):s===-1&&(s=l)}}return s!==-1&&(n+=encodeURIComponent(c.substring(s))),n!==void 0?n:c}function Bii(c){let e;for(let i=0;i1&&c.scheme==="file"?i=`//${c.authority}${c.path}`:c.path.charCodeAt(0)===47&&(c.path.charCodeAt(1)>=65&&c.path.charCodeAt(1)<=90||c.path.charCodeAt(1)>=97&&c.path.charCodeAt(1)<=122)&&c.path.charCodeAt(2)===58?e?i=c.path.substr(1):i=c.path[1].toLowerCase()+c.path.substr(2):i=c.path,M0&&(i=i.replace(/\//g,"\\")),i}function WFe(c,e){const i=e?Bii:rgt;let n="",{scheme:s,authority:l,path:d,query:f,fragment:g}=c;if(s&&(n+=s,n+=":"),(l||s==="file")&&(n+=oE,n+=oE),l){let y=l.indexOf("@");if(y!==-1){const w=l.substr(0,y);l=l.substr(y+1),y=w.lastIndexOf(":"),y===-1?n+=i(w,!1,!1):(n+=i(w.substr(0,y),!1,!1),n+=":",n+=i(w.substr(y+1),!1,!0)),n+="@"}l=l.toLowerCase(),y=l.lastIndexOf(":"),y===-1?n+=i(l,!1,!0):(n+=i(l.substr(0,y),!1,!0),n+=l.substr(y))}if(d){if(d.length>=3&&d.charCodeAt(0)===47&&d.charCodeAt(2)===58){const y=d.charCodeAt(1);y>=65&&y<=90&&(d=`/${String.fromCharCode(y+32)}:${d.substr(3)}`)}else if(d.length>=2&&d.charCodeAt(1)===58){const y=d.charCodeAt(0);y>=65&&y<=90&&(d=`${String.fromCharCode(y+32)}:${d.substr(2)}`)}n+=i(d,!0,!1)}return f&&(n+="?",n+=i(f,!1,!1)),g&&(n+="#",n+=e?g:rgt(g,!1,!1)),n}function jbt(c){try{return decodeURIComponent(c)}catch{return c.length>3?c.substr(0,3)+jbt(c.substr(3)):c}}const sgt=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function _ge(c){return c.match(sgt)?c.replace(sgt,e=>jbt(e)):c}let yi=class k5{constructor(e,i){this.lineNumber=e,this.column=i}with(e=this.lineNumber,i=this.column){return e===this.lineNumber&&i===this.column?this:new k5(e,i)}delta(e=0,i=0){return this.with(this.lineNumber+e,this.column+i)}equals(e){return k5.equals(this,e)}static equals(e,i){return!e&&!i?!0:!!e&&!!i&&e.lineNumber===i.lineNumber&&e.column===i.column}isBefore(e){return k5.isBefore(this,e)}static isBefore(e,i){return e.lineNumbern||e===n&&i>s?(this.startLineNumber=n,this.startColumn=s,this.endLineNumber=e,this.endColumn=i):(this.startLineNumber=e,this.startColumn=i,this.endLineNumber=n,this.endColumn=s)}isEmpty(){return Xm.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return Xm.containsPosition(this,e)}static containsPosition(e,i){return!(i.lineNumbere.endLineNumber||i.lineNumber===e.startLineNumber&&i.columne.endColumn)}static strictContainsPosition(e,i){return!(i.lineNumbere.endLineNumber||i.lineNumber===e.startLineNumber&&i.column<=e.startColumn||i.lineNumber===e.endLineNumber&&i.column>=e.endColumn)}containsRange(e){return Xm.containsRange(this,e)}static containsRange(e,i){return!(i.startLineNumbere.endLineNumber||i.endLineNumber>e.endLineNumber||i.startLineNumber===e.startLineNumber&&i.startColumne.endColumn)}strictContainsRange(e){return Xm.strictContainsRange(this,e)}static strictContainsRange(e,i){return!(i.startLineNumbere.endLineNumber||i.endLineNumber>e.endLineNumber||i.startLineNumber===e.startLineNumber&&i.startColumn<=e.startColumn||i.endLineNumber===e.endLineNumber&&i.endColumn>=e.endColumn)}plusRange(e){return Xm.plusRange(this,e)}static plusRange(e,i){let n,s,l,d;return i.startLineNumbere.endLineNumber?(l=i.endLineNumber,d=i.endColumn):i.endLineNumber===e.endLineNumber?(l=i.endLineNumber,d=Math.max(i.endColumn,e.endColumn)):(l=e.endLineNumber,d=e.endColumn),new Xm(n,s,l,d)}intersectRanges(e){return Xm.intersectRanges(this,e)}static intersectRanges(e,i){let n=e.startLineNumber,s=e.startColumn,l=e.endLineNumber,d=e.endColumn;const f=i.startLineNumber,g=i.startColumn,y=i.endLineNumber,w=i.endColumn;return ny?(l=y,d=w):l===y&&(d=Math.min(d,w)),n>l||n===l&&s>d?null:new Xm(n,s,l,d)}equalsRange(e){return Xm.equalsRange(this,e)}static equalsRange(e,i){return!e&&!i?!0:!!e&&!!i&&e.startLineNumber===i.startLineNumber&&e.startColumn===i.startColumn&&e.endLineNumber===i.endLineNumber&&e.endColumn===i.endColumn}getEndPosition(){return Xm.getEndPosition(this)}static getEndPosition(e){return new yi(e.endLineNumber,e.endColumn)}getStartPosition(){return Xm.getStartPosition(this)}static getStartPosition(e){return new yi(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,i){return new Xm(this.startLineNumber,this.startColumn,e,i)}setStartPosition(e,i){return new Xm(e,i,this.endLineNumber,this.endColumn)}collapseToStart(){return Xm.collapseToStart(this)}static collapseToStart(e){return new Xm(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return Xm.collapseToEnd(this)}static collapseToEnd(e){return new Xm(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new Xm(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,i=e){return new Xm(e.lineNumber,e.column,i.lineNumber,i.column)}static lift(e){return e?new Xm(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,i){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}},Qs=class Q2 extends at{constructor(e,i,n,s){super(e,i,n,s),this.selectionStartLineNumber=e,this.selectionStartColumn=i,this.positionLineNumber=n,this.positionColumn=s}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return Q2.selectionsEqual(this,e)}static selectionsEqual(e,i){return e.selectionStartLineNumber===i.selectionStartLineNumber&&e.selectionStartColumn===i.selectionStartColumn&&e.positionLineNumber===i.positionLineNumber&&e.positionColumn===i.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,i){return this.getDirection()===0?new Q2(this.startLineNumber,this.startColumn,e,i):new Q2(e,i,this.startLineNumber,this.startColumn)}getPosition(){return new yi(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new yi(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,i){return this.getDirection()===0?new Q2(e,i,this.endLineNumber,this.endColumn):new Q2(this.endLineNumber,this.endColumn,e,i)}static fromPositions(e,i=e){return new Q2(e.lineNumber,e.column,i.lineNumber,i.column)}static fromRange(e,i){return i===0?new Q2(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new Q2(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new Q2(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,i){if(e&&!i||!e&&i)return!1;if(!e&&!i)return!0;if(e.length!==i.length)return!1;for(let n=0,s=e.length;n{this._tokenizationSupports.get(e)===i&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,i){var n;(n=this._factories.get(e))===null||n===void 0||n.dispose();const s=new jii(this,e,i);return this._factories.set(e,s),go(()=>{const l=this._factories.get(e);!l||l!==s||(this._factories.delete(e),l.dispose())})}async getOrCreate(e){const i=this.get(e);if(i)return i;const n=this._factories.get(e);return!n||n.isResolved?null:(await n.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;const n=this._factories.get(e);return!!(!n||n.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}};class jii extends Ii{get isResolved(){return this._isResolved}constructor(e,i,n){super(),this._registry=e,this._languageId=i,this._factory=n,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}let Pte=class{constructor(e,i,n){this.offset=e,this.type=i,this.language=n,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}};class xHe{constructor(e,i){this.tokens=e,this.endState=i,this._tokenizationResultBrand=void 0}}class M1e{constructor(e,i){this.tokens=e,this.endState=i,this._encodedTokenizationResultBrand=void 0}}var cw;(function(c){c[c.Increase=0]="Increase",c[c.Decrease=1]="Decrease"})(cw||(cw={}));var Ate;(function(c){const e=new Map;e.set(0,Dr.symbolMethod),e.set(1,Dr.symbolFunction),e.set(2,Dr.symbolConstructor),e.set(3,Dr.symbolField),e.set(4,Dr.symbolVariable),e.set(5,Dr.symbolClass),e.set(6,Dr.symbolStruct),e.set(7,Dr.symbolInterface),e.set(8,Dr.symbolModule),e.set(9,Dr.symbolProperty),e.set(10,Dr.symbolEvent),e.set(11,Dr.symbolOperator),e.set(12,Dr.symbolUnit),e.set(13,Dr.symbolValue),e.set(15,Dr.symbolEnum),e.set(14,Dr.symbolConstant),e.set(15,Dr.symbolEnum),e.set(16,Dr.symbolEnumMember),e.set(17,Dr.symbolKeyword),e.set(27,Dr.symbolSnippet),e.set(18,Dr.symbolText),e.set(19,Dr.symbolColor),e.set(20,Dr.symbolFile),e.set(21,Dr.symbolReference),e.set(22,Dr.symbolCustomColor),e.set(23,Dr.symbolFolder),e.set(24,Dr.symbolTypeParameter),e.set(25,Dr.account),e.set(26,Dr.issues);function i(l){let d=e.get(l);return d||(console.info("No codicon found for CompletionItemKind "+l),d=Dr.symbolProperty),d}c.toIcon=i;const n=new Map;n.set("method",0),n.set("function",1),n.set("constructor",2),n.set("field",3),n.set("variable",4),n.set("class",5),n.set("struct",6),n.set("interface",7),n.set("module",8),n.set("property",9),n.set("event",10),n.set("operator",11),n.set("unit",12),n.set("value",13),n.set("constant",14),n.set("enum",15),n.set("enum-member",16),n.set("enumMember",16),n.set("keyword",17),n.set("snippet",27),n.set("text",18),n.set("color",19),n.set("file",20),n.set("reference",21),n.set("customcolor",22),n.set("folder",23),n.set("type-parameter",24),n.set("typeParameter",24),n.set("account",25),n.set("issue",26);function s(l,d){let f=n.get(l);return typeof f>"u"&&!d&&(f=9),f}c.fromString=s})(Ate||(Ate={}));var M4;(function(c){c[c.Automatic=0]="Automatic",c[c.Explicit=1]="Explicit"})(M4||(M4={}));class Ubt{constructor(e,i,n,s){this.range=e,this.text=i,this.completionKind=n,this.isSnippetText=s}equals(e){return at.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}}var Ote;(function(c){c[c.Automatic=0]="Automatic",c[c.PasteAs=1]="PasteAs"})(Ote||(Ote={}));var sL;(function(c){c[c.Invoke=1]="Invoke",c[c.TriggerCharacter=2]="TriggerCharacter",c[c.ContentChange=3]="ContentChange"})(sL||(sL={}));var Mte;(function(c){c[c.Text=0]="Text",c[c.Read=1]="Read",c[c.Write=2]="Write"})(Mte||(Mte={}));function zii(c){return c&&Oo.isUri(c.uri)&&at.isIRange(c.range)&&(at.isIRange(c.originSelectionRange)||at.isIRange(c.targetSelectionRange))}const Uii={17:V("Array","array"),16:V("Boolean","boolean"),4:V("Class","class"),13:V("Constant","constant"),8:V("Constructor","constructor"),9:V("Enum","enumeration"),21:V("EnumMember","enumeration member"),23:V("Event","event"),7:V("Field","field"),0:V("File","file"),11:V("Function","function"),10:V("Interface","interface"),19:V("Key","key"),5:V("Method","method"),1:V("Module","module"),2:V("Namespace","namespace"),20:V("Null","null"),15:V("Number","number"),18:V("Object","object"),24:V("Operator","operator"),3:V("Package","package"),6:V("Property","property"),14:V("String","string"),22:V("Struct","struct"),25:V("TypeParameter","type parameter"),12:V("Variable","variable")};function qii(c,e){return V("symbolAriaLabel","{0} ({1})",c,Uii[e])}var P0e;(function(c){const e=new Map;e.set(0,Dr.symbolFile),e.set(1,Dr.symbolModule),e.set(2,Dr.symbolNamespace),e.set(3,Dr.symbolPackage),e.set(4,Dr.symbolClass),e.set(5,Dr.symbolMethod),e.set(6,Dr.symbolProperty),e.set(7,Dr.symbolField),e.set(8,Dr.symbolConstructor),e.set(9,Dr.symbolEnum),e.set(10,Dr.symbolInterface),e.set(11,Dr.symbolFunction),e.set(12,Dr.symbolVariable),e.set(13,Dr.symbolConstant),e.set(14,Dr.symbolString),e.set(15,Dr.symbolNumber),e.set(16,Dr.symbolBoolean),e.set(17,Dr.symbolArray),e.set(18,Dr.symbolObject),e.set(19,Dr.symbolKey),e.set(20,Dr.symbolNull),e.set(21,Dr.symbolEnumMember),e.set(22,Dr.symbolStruct),e.set(23,Dr.symbolEvent),e.set(24,Dr.symbolOperator),e.set(25,Dr.symbolTypeParameter);function i(n){let s=e.get(n);return s||(console.info("No codicon found for SymbolKind "+n),s=Dr.symbolProperty),s}c.toIcon=i})(P0e||(P0e={}));class by{static fromValue(e){switch(e){case"comment":return by.Comment;case"imports":return by.Imports;case"region":return by.Region}return new by(e)}constructor(e){this.value=e}}by.Comment=new by("comment");by.Imports=new by("imports");by.Region=new by("region");var HFe;(function(c){c[c.AIGenerated=1]="AIGenerated"})(HFe||(HFe={}));var Rte;(function(c){c[c.Invoke=0]="Invoke",c[c.Automatic=1]="Automatic"})(Rte||(Rte={}));var jFe;(function(c){function e(i){return!i||typeof i!="object"?!1:typeof i.id=="string"&&typeof i.title=="string"}c.is=e})(jFe||(jFe={}));var A0e;(function(c){c[c.Type=1]="Type",c[c.Parameter=2]="Parameter"})(A0e||(A0e={}));class $ii{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(e=>{e&&e.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}const Nh=new Hii;var O0e;(function(c){c[c.Invoke=0]="Invoke",c[c.Automatic=1]="Automatic"})(O0e||(O0e={}));var zFe;(function(c){c[c.Unknown=0]="Unknown",c[c.Disabled=1]="Disabled",c[c.Enabled=2]="Enabled"})(zFe||(zFe={}));var UFe;(function(c){c[c.Invoke=1]="Invoke",c[c.Auto=2]="Auto"})(UFe||(UFe={}));var qFe;(function(c){c[c.None=0]="None",c[c.KeepWhitespace=1]="KeepWhitespace",c[c.InsertAsSnippet=4]="InsertAsSnippet"})(qFe||(qFe={}));var $Fe;(function(c){c[c.Method=0]="Method",c[c.Function=1]="Function",c[c.Constructor=2]="Constructor",c[c.Field=3]="Field",c[c.Variable=4]="Variable",c[c.Class=5]="Class",c[c.Struct=6]="Struct",c[c.Interface=7]="Interface",c[c.Module=8]="Module",c[c.Property=9]="Property",c[c.Event=10]="Event",c[c.Operator=11]="Operator",c[c.Unit=12]="Unit",c[c.Value=13]="Value",c[c.Constant=14]="Constant",c[c.Enum=15]="Enum",c[c.EnumMember=16]="EnumMember",c[c.Keyword=17]="Keyword",c[c.Text=18]="Text",c[c.Color=19]="Color",c[c.File=20]="File",c[c.Reference=21]="Reference",c[c.Customcolor=22]="Customcolor",c[c.Folder=23]="Folder",c[c.TypeParameter=24]="TypeParameter",c[c.User=25]="User",c[c.Issue=26]="Issue",c[c.Snippet=27]="Snippet"})($Fe||($Fe={}));var JFe;(function(c){c[c.Deprecated=1]="Deprecated"})(JFe||(JFe={}));var GFe;(function(c){c[c.Invoke=0]="Invoke",c[c.TriggerCharacter=1]="TriggerCharacter",c[c.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(GFe||(GFe={}));var KFe;(function(c){c[c.EXACT=0]="EXACT",c[c.ABOVE=1]="ABOVE",c[c.BELOW=2]="BELOW"})(KFe||(KFe={}));var QFe;(function(c){c[c.NotSet=0]="NotSet",c[c.ContentFlush=1]="ContentFlush",c[c.RecoverFromMarkers=2]="RecoverFromMarkers",c[c.Explicit=3]="Explicit",c[c.Paste=4]="Paste",c[c.Undo=5]="Undo",c[c.Redo=6]="Redo"})(QFe||(QFe={}));var XFe;(function(c){c[c.LF=1]="LF",c[c.CRLF=2]="CRLF"})(XFe||(XFe={}));var ZFe;(function(c){c[c.Text=0]="Text",c[c.Read=1]="Read",c[c.Write=2]="Write"})(ZFe||(ZFe={}));var YFe;(function(c){c[c.None=0]="None",c[c.Keep=1]="Keep",c[c.Brackets=2]="Brackets",c[c.Advanced=3]="Advanced",c[c.Full=4]="Full"})(YFe||(YFe={}));var e5e;(function(c){c[c.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",c[c.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",c[c.accessibilitySupport=2]="accessibilitySupport",c[c.accessibilityPageSize=3]="accessibilityPageSize",c[c.ariaLabel=4]="ariaLabel",c[c.ariaRequired=5]="ariaRequired",c[c.autoClosingBrackets=6]="autoClosingBrackets",c[c.autoClosingComments=7]="autoClosingComments",c[c.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",c[c.autoClosingDelete=9]="autoClosingDelete",c[c.autoClosingOvertype=10]="autoClosingOvertype",c[c.autoClosingQuotes=11]="autoClosingQuotes",c[c.autoIndent=12]="autoIndent",c[c.automaticLayout=13]="automaticLayout",c[c.autoSurround=14]="autoSurround",c[c.bracketPairColorization=15]="bracketPairColorization",c[c.guides=16]="guides",c[c.codeLens=17]="codeLens",c[c.codeLensFontFamily=18]="codeLensFontFamily",c[c.codeLensFontSize=19]="codeLensFontSize",c[c.colorDecorators=20]="colorDecorators",c[c.colorDecoratorsLimit=21]="colorDecoratorsLimit",c[c.columnSelection=22]="columnSelection",c[c.comments=23]="comments",c[c.contextmenu=24]="contextmenu",c[c.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",c[c.cursorBlinking=26]="cursorBlinking",c[c.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",c[c.cursorStyle=28]="cursorStyle",c[c.cursorSurroundingLines=29]="cursorSurroundingLines",c[c.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",c[c.cursorWidth=31]="cursorWidth",c[c.disableLayerHinting=32]="disableLayerHinting",c[c.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",c[c.domReadOnly=34]="domReadOnly",c[c.dragAndDrop=35]="dragAndDrop",c[c.dropIntoEditor=36]="dropIntoEditor",c[c.emptySelectionClipboard=37]="emptySelectionClipboard",c[c.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",c[c.extraEditorClassName=39]="extraEditorClassName",c[c.fastScrollSensitivity=40]="fastScrollSensitivity",c[c.find=41]="find",c[c.fixedOverflowWidgets=42]="fixedOverflowWidgets",c[c.folding=43]="folding",c[c.foldingStrategy=44]="foldingStrategy",c[c.foldingHighlight=45]="foldingHighlight",c[c.foldingImportsByDefault=46]="foldingImportsByDefault",c[c.foldingMaximumRegions=47]="foldingMaximumRegions",c[c.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",c[c.fontFamily=49]="fontFamily",c[c.fontInfo=50]="fontInfo",c[c.fontLigatures=51]="fontLigatures",c[c.fontSize=52]="fontSize",c[c.fontWeight=53]="fontWeight",c[c.fontVariations=54]="fontVariations",c[c.formatOnPaste=55]="formatOnPaste",c[c.formatOnType=56]="formatOnType",c[c.glyphMargin=57]="glyphMargin",c[c.gotoLocation=58]="gotoLocation",c[c.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",c[c.hover=60]="hover",c[c.inDiffEditor=61]="inDiffEditor",c[c.inlineSuggest=62]="inlineSuggest",c[c.inlineEdit=63]="inlineEdit",c[c.letterSpacing=64]="letterSpacing",c[c.lightbulb=65]="lightbulb",c[c.lineDecorationsWidth=66]="lineDecorationsWidth",c[c.lineHeight=67]="lineHeight",c[c.lineNumbers=68]="lineNumbers",c[c.lineNumbersMinChars=69]="lineNumbersMinChars",c[c.linkedEditing=70]="linkedEditing",c[c.links=71]="links",c[c.matchBrackets=72]="matchBrackets",c[c.minimap=73]="minimap",c[c.mouseStyle=74]="mouseStyle",c[c.mouseWheelScrollSensitivity=75]="mouseWheelScrollSensitivity",c[c.mouseWheelZoom=76]="mouseWheelZoom",c[c.multiCursorMergeOverlapping=77]="multiCursorMergeOverlapping",c[c.multiCursorModifier=78]="multiCursorModifier",c[c.multiCursorPaste=79]="multiCursorPaste",c[c.multiCursorLimit=80]="multiCursorLimit",c[c.occurrencesHighlight=81]="occurrencesHighlight",c[c.overviewRulerBorder=82]="overviewRulerBorder",c[c.overviewRulerLanes=83]="overviewRulerLanes",c[c.padding=84]="padding",c[c.pasteAs=85]="pasteAs",c[c.parameterHints=86]="parameterHints",c[c.peekWidgetDefaultFocus=87]="peekWidgetDefaultFocus",c[c.definitionLinkOpensInPeek=88]="definitionLinkOpensInPeek",c[c.quickSuggestions=89]="quickSuggestions",c[c.quickSuggestionsDelay=90]="quickSuggestionsDelay",c[c.readOnly=91]="readOnly",c[c.readOnlyMessage=92]="readOnlyMessage",c[c.renameOnType=93]="renameOnType",c[c.renderControlCharacters=94]="renderControlCharacters",c[c.renderFinalNewline=95]="renderFinalNewline",c[c.renderLineHighlight=96]="renderLineHighlight",c[c.renderLineHighlightOnlyWhenFocus=97]="renderLineHighlightOnlyWhenFocus",c[c.renderValidationDecorations=98]="renderValidationDecorations",c[c.renderWhitespace=99]="renderWhitespace",c[c.revealHorizontalRightPadding=100]="revealHorizontalRightPadding",c[c.roundedSelection=101]="roundedSelection",c[c.rulers=102]="rulers",c[c.scrollbar=103]="scrollbar",c[c.scrollBeyondLastColumn=104]="scrollBeyondLastColumn",c[c.scrollBeyondLastLine=105]="scrollBeyondLastLine",c[c.scrollPredominantAxis=106]="scrollPredominantAxis",c[c.selectionClipboard=107]="selectionClipboard",c[c.selectionHighlight=108]="selectionHighlight",c[c.selectOnLineNumbers=109]="selectOnLineNumbers",c[c.showFoldingControls=110]="showFoldingControls",c[c.showUnused=111]="showUnused",c[c.snippetSuggestions=112]="snippetSuggestions",c[c.smartSelect=113]="smartSelect",c[c.smoothScrolling=114]="smoothScrolling",c[c.stickyScroll=115]="stickyScroll",c[c.stickyTabStops=116]="stickyTabStops",c[c.stopRenderingLineAfter=117]="stopRenderingLineAfter",c[c.suggest=118]="suggest",c[c.suggestFontSize=119]="suggestFontSize",c[c.suggestLineHeight=120]="suggestLineHeight",c[c.suggestOnTriggerCharacters=121]="suggestOnTriggerCharacters",c[c.suggestSelection=122]="suggestSelection",c[c.tabCompletion=123]="tabCompletion",c[c.tabIndex=124]="tabIndex",c[c.unicodeHighlighting=125]="unicodeHighlighting",c[c.unusualLineTerminators=126]="unusualLineTerminators",c[c.useShadowDOM=127]="useShadowDOM",c[c.useTabStops=128]="useTabStops",c[c.wordBreak=129]="wordBreak",c[c.wordSegmenterLocales=130]="wordSegmenterLocales",c[c.wordSeparators=131]="wordSeparators",c[c.wordWrap=132]="wordWrap",c[c.wordWrapBreakAfterCharacters=133]="wordWrapBreakAfterCharacters",c[c.wordWrapBreakBeforeCharacters=134]="wordWrapBreakBeforeCharacters",c[c.wordWrapColumn=135]="wordWrapColumn",c[c.wordWrapOverride1=136]="wordWrapOverride1",c[c.wordWrapOverride2=137]="wordWrapOverride2",c[c.wrappingIndent=138]="wrappingIndent",c[c.wrappingStrategy=139]="wrappingStrategy",c[c.showDeprecated=140]="showDeprecated",c[c.inlayHints=141]="inlayHints",c[c.editorClassName=142]="editorClassName",c[c.pixelRatio=143]="pixelRatio",c[c.tabFocusMode=144]="tabFocusMode",c[c.layoutInfo=145]="layoutInfo",c[c.wrappingInfo=146]="wrappingInfo",c[c.defaultColorDecorators=147]="defaultColorDecorators",c[c.colorDecoratorsActivatedOn=148]="colorDecoratorsActivatedOn",c[c.inlineCompletionsAccessibilityVerbose=149]="inlineCompletionsAccessibilityVerbose"})(e5e||(e5e={}));var t5e;(function(c){c[c.TextDefined=0]="TextDefined",c[c.LF=1]="LF",c[c.CRLF=2]="CRLF"})(t5e||(t5e={}));var i5e;(function(c){c[c.LF=0]="LF",c[c.CRLF=1]="CRLF"})(i5e||(i5e={}));var n5e;(function(c){c[c.Left=1]="Left",c[c.Center=2]="Center",c[c.Right=3]="Right"})(n5e||(n5e={}));var r5e;(function(c){c[c.Increase=0]="Increase",c[c.Decrease=1]="Decrease"})(r5e||(r5e={}));var s5e;(function(c){c[c.None=0]="None",c[c.Indent=1]="Indent",c[c.IndentOutdent=2]="IndentOutdent",c[c.Outdent=3]="Outdent"})(s5e||(s5e={}));var o5e;(function(c){c[c.Both=0]="Both",c[c.Right=1]="Right",c[c.Left=2]="Left",c[c.None=3]="None"})(o5e||(o5e={}));var a5e;(function(c){c[c.Type=1]="Type",c[c.Parameter=2]="Parameter"})(a5e||(a5e={}));var l5e;(function(c){c[c.Automatic=0]="Automatic",c[c.Explicit=1]="Explicit"})(l5e||(l5e={}));var c5e;(function(c){c[c.Invoke=0]="Invoke",c[c.Automatic=1]="Automatic"})(c5e||(c5e={}));var u5e;(function(c){c[c.DependsOnKbLayout=-1]="DependsOnKbLayout",c[c.Unknown=0]="Unknown",c[c.Backspace=1]="Backspace",c[c.Tab=2]="Tab",c[c.Enter=3]="Enter",c[c.Shift=4]="Shift",c[c.Ctrl=5]="Ctrl",c[c.Alt=6]="Alt",c[c.PauseBreak=7]="PauseBreak",c[c.CapsLock=8]="CapsLock",c[c.Escape=9]="Escape",c[c.Space=10]="Space",c[c.PageUp=11]="PageUp",c[c.PageDown=12]="PageDown",c[c.End=13]="End",c[c.Home=14]="Home",c[c.LeftArrow=15]="LeftArrow",c[c.UpArrow=16]="UpArrow",c[c.RightArrow=17]="RightArrow",c[c.DownArrow=18]="DownArrow",c[c.Insert=19]="Insert",c[c.Delete=20]="Delete",c[c.Digit0=21]="Digit0",c[c.Digit1=22]="Digit1",c[c.Digit2=23]="Digit2",c[c.Digit3=24]="Digit3",c[c.Digit4=25]="Digit4",c[c.Digit5=26]="Digit5",c[c.Digit6=27]="Digit6",c[c.Digit7=28]="Digit7",c[c.Digit8=29]="Digit8",c[c.Digit9=30]="Digit9",c[c.KeyA=31]="KeyA",c[c.KeyB=32]="KeyB",c[c.KeyC=33]="KeyC",c[c.KeyD=34]="KeyD",c[c.KeyE=35]="KeyE",c[c.KeyF=36]="KeyF",c[c.KeyG=37]="KeyG",c[c.KeyH=38]="KeyH",c[c.KeyI=39]="KeyI",c[c.KeyJ=40]="KeyJ",c[c.KeyK=41]="KeyK",c[c.KeyL=42]="KeyL",c[c.KeyM=43]="KeyM",c[c.KeyN=44]="KeyN",c[c.KeyO=45]="KeyO",c[c.KeyP=46]="KeyP",c[c.KeyQ=47]="KeyQ",c[c.KeyR=48]="KeyR",c[c.KeyS=49]="KeyS",c[c.KeyT=50]="KeyT",c[c.KeyU=51]="KeyU",c[c.KeyV=52]="KeyV",c[c.KeyW=53]="KeyW",c[c.KeyX=54]="KeyX",c[c.KeyY=55]="KeyY",c[c.KeyZ=56]="KeyZ",c[c.Meta=57]="Meta",c[c.ContextMenu=58]="ContextMenu",c[c.F1=59]="F1",c[c.F2=60]="F2",c[c.F3=61]="F3",c[c.F4=62]="F4",c[c.F5=63]="F5",c[c.F6=64]="F6",c[c.F7=65]="F7",c[c.F8=66]="F8",c[c.F9=67]="F9",c[c.F10=68]="F10",c[c.F11=69]="F11",c[c.F12=70]="F12",c[c.F13=71]="F13",c[c.F14=72]="F14",c[c.F15=73]="F15",c[c.F16=74]="F16",c[c.F17=75]="F17",c[c.F18=76]="F18",c[c.F19=77]="F19",c[c.F20=78]="F20",c[c.F21=79]="F21",c[c.F22=80]="F22",c[c.F23=81]="F23",c[c.F24=82]="F24",c[c.NumLock=83]="NumLock",c[c.ScrollLock=84]="ScrollLock",c[c.Semicolon=85]="Semicolon",c[c.Equal=86]="Equal",c[c.Comma=87]="Comma",c[c.Minus=88]="Minus",c[c.Period=89]="Period",c[c.Slash=90]="Slash",c[c.Backquote=91]="Backquote",c[c.BracketLeft=92]="BracketLeft",c[c.Backslash=93]="Backslash",c[c.BracketRight=94]="BracketRight",c[c.Quote=95]="Quote",c[c.OEM_8=96]="OEM_8",c[c.IntlBackslash=97]="IntlBackslash",c[c.Numpad0=98]="Numpad0",c[c.Numpad1=99]="Numpad1",c[c.Numpad2=100]="Numpad2",c[c.Numpad3=101]="Numpad3",c[c.Numpad4=102]="Numpad4",c[c.Numpad5=103]="Numpad5",c[c.Numpad6=104]="Numpad6",c[c.Numpad7=105]="Numpad7",c[c.Numpad8=106]="Numpad8",c[c.Numpad9=107]="Numpad9",c[c.NumpadMultiply=108]="NumpadMultiply",c[c.NumpadAdd=109]="NumpadAdd",c[c.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",c[c.NumpadSubtract=111]="NumpadSubtract",c[c.NumpadDecimal=112]="NumpadDecimal",c[c.NumpadDivide=113]="NumpadDivide",c[c.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",c[c.ABNT_C1=115]="ABNT_C1",c[c.ABNT_C2=116]="ABNT_C2",c[c.AudioVolumeMute=117]="AudioVolumeMute",c[c.AudioVolumeUp=118]="AudioVolumeUp",c[c.AudioVolumeDown=119]="AudioVolumeDown",c[c.BrowserSearch=120]="BrowserSearch",c[c.BrowserHome=121]="BrowserHome",c[c.BrowserBack=122]="BrowserBack",c[c.BrowserForward=123]="BrowserForward",c[c.MediaTrackNext=124]="MediaTrackNext",c[c.MediaTrackPrevious=125]="MediaTrackPrevious",c[c.MediaStop=126]="MediaStop",c[c.MediaPlayPause=127]="MediaPlayPause",c[c.LaunchMediaPlayer=128]="LaunchMediaPlayer",c[c.LaunchMail=129]="LaunchMail",c[c.LaunchApp2=130]="LaunchApp2",c[c.Clear=131]="Clear",c[c.MAX_VALUE=132]="MAX_VALUE"})(u5e||(u5e={}));var d5e;(function(c){c[c.Hint=1]="Hint",c[c.Info=2]="Info",c[c.Warning=4]="Warning",c[c.Error=8]="Error"})(d5e||(d5e={}));var f5e;(function(c){c[c.Unnecessary=1]="Unnecessary",c[c.Deprecated=2]="Deprecated"})(f5e||(f5e={}));var h5e;(function(c){c[c.Inline=1]="Inline",c[c.Gutter=2]="Gutter"})(h5e||(h5e={}));var _5e;(function(c){c[c.Normal=1]="Normal",c[c.Underlined=2]="Underlined"})(_5e||(_5e={}));var p5e;(function(c){c[c.UNKNOWN=0]="UNKNOWN",c[c.TEXTAREA=1]="TEXTAREA",c[c.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",c[c.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",c[c.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",c[c.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",c[c.CONTENT_TEXT=6]="CONTENT_TEXT",c[c.CONTENT_EMPTY=7]="CONTENT_EMPTY",c[c.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",c[c.CONTENT_WIDGET=9]="CONTENT_WIDGET",c[c.OVERVIEW_RULER=10]="OVERVIEW_RULER",c[c.SCROLLBAR=11]="SCROLLBAR",c[c.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",c[c.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(p5e||(p5e={}));var g5e;(function(c){c[c.AIGenerated=1]="AIGenerated"})(g5e||(g5e={}));var m5e;(function(c){c[c.Invoke=0]="Invoke",c[c.Automatic=1]="Automatic"})(m5e||(m5e={}));var v5e;(function(c){c[c.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",c[c.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",c[c.TOP_CENTER=2]="TOP_CENTER"})(v5e||(v5e={}));var y5e;(function(c){c[c.Left=1]="Left",c[c.Center=2]="Center",c[c.Right=4]="Right",c[c.Full=7]="Full"})(y5e||(y5e={}));var b5e;(function(c){c[c.Word=0]="Word",c[c.Line=1]="Line",c[c.Suggest=2]="Suggest"})(b5e||(b5e={}));var C5e;(function(c){c[c.Left=0]="Left",c[c.Right=1]="Right",c[c.None=2]="None",c[c.LeftOfInjectedText=3]="LeftOfInjectedText",c[c.RightOfInjectedText=4]="RightOfInjectedText"})(C5e||(C5e={}));var S5e;(function(c){c[c.Off=0]="Off",c[c.On=1]="On",c[c.Relative=2]="Relative",c[c.Interval=3]="Interval",c[c.Custom=4]="Custom"})(S5e||(S5e={}));var w5e;(function(c){c[c.None=0]="None",c[c.Text=1]="Text",c[c.Blocks=2]="Blocks"})(w5e||(w5e={}));var x5e;(function(c){c[c.Smooth=0]="Smooth",c[c.Immediate=1]="Immediate"})(x5e||(x5e={}));var k5e;(function(c){c[c.Auto=1]="Auto",c[c.Hidden=2]="Hidden",c[c.Visible=3]="Visible"})(k5e||(k5e={}));var T5e;(function(c){c[c.LTR=0]="LTR",c[c.RTL=1]="RTL"})(T5e||(T5e={}));var D5e;(function(c){c.Off="off",c.OnCode="onCode",c.On="on"})(D5e||(D5e={}));var E5e;(function(c){c[c.Invoke=1]="Invoke",c[c.TriggerCharacter=2]="TriggerCharacter",c[c.ContentChange=3]="ContentChange"})(E5e||(E5e={}));var I5e;(function(c){c[c.File=0]="File",c[c.Module=1]="Module",c[c.Namespace=2]="Namespace",c[c.Package=3]="Package",c[c.Class=4]="Class",c[c.Method=5]="Method",c[c.Property=6]="Property",c[c.Field=7]="Field",c[c.Constructor=8]="Constructor",c[c.Enum=9]="Enum",c[c.Interface=10]="Interface",c[c.Function=11]="Function",c[c.Variable=12]="Variable",c[c.Constant=13]="Constant",c[c.String=14]="String",c[c.Number=15]="Number",c[c.Boolean=16]="Boolean",c[c.Array=17]="Array",c[c.Object=18]="Object",c[c.Key=19]="Key",c[c.Null=20]="Null",c[c.EnumMember=21]="EnumMember",c[c.Struct=22]="Struct",c[c.Event=23]="Event",c[c.Operator=24]="Operator",c[c.TypeParameter=25]="TypeParameter"})(I5e||(I5e={}));var N5e;(function(c){c[c.Deprecated=1]="Deprecated"})(N5e||(N5e={}));var L5e;(function(c){c[c.Hidden=0]="Hidden",c[c.Blink=1]="Blink",c[c.Smooth=2]="Smooth",c[c.Phase=3]="Phase",c[c.Expand=4]="Expand",c[c.Solid=5]="Solid"})(L5e||(L5e={}));var P5e;(function(c){c[c.Line=1]="Line",c[c.Block=2]="Block",c[c.Underline=3]="Underline",c[c.LineThin=4]="LineThin",c[c.BlockOutline=5]="BlockOutline",c[c.UnderlineThin=6]="UnderlineThin"})(P5e||(P5e={}));var A5e;(function(c){c[c.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",c[c.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",c[c.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",c[c.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(A5e||(A5e={}));var O5e;(function(c){c[c.None=0]="None",c[c.Same=1]="Same",c[c.Indent=2]="Indent",c[c.DeepIndent=3]="DeepIndent"})(O5e||(O5e={}));let _ne=class{static chord(e,i){return qp(e,i)}};_ne.CtrlCmd=2048;_ne.Shift=1024;_ne.Alt=512;_ne.WinCtrl=256;function qbt(){return{editor:void 0,languages:void 0,CancellationTokenSource:uh,Emitter:ui,KeyCode:u5e,KeyMod:_ne,Position:yi,Range:at,Selection:Qs,SelectionDirection:T5e,MarkerSeverity:d5e,MarkerTag:f5e,Uri:Oo,Token:Pte}}function Jii(c,e){const i=c;typeof i.vscodeWindowId!="number"&&Object.defineProperty(i,"vscodeWindowId",{get:()=>e})}const ed=window;function $bt(c){return c}class Gii{constructor(e,i){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=$bt):(this._fn=i,this._computeKey=e.getCacheKey)}get(e){const i=this._computeKey(e);return this.lastArgKey!==i&&(this.lastArgKey=i,this.lastCache=this._fn(e)),this.lastCache}}class ogt{get cachedValues(){return this._map}constructor(e,i){this._map=new Map,this._map2=new Map,typeof e=="function"?(this._fn=e,this._computeKey=$bt):(this._fn=i,this._computeKey=e.getCacheKey)}get(e){const i=this._computeKey(e);if(this._map2.has(i))return this._map2.get(i);const n=this._fn(e);return this._map.set(e,n),this._map2.set(i,n),n}}class FE{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}var JU;function Jbt(c){return!c||typeof c!="string"?!0:c.trim().length===0}const Kii=/{(\d+)}/g;function p9(c,...e){return e.length===0?c:c.replace(Kii,function(i,n){const s=parseInt(n,10);return isNaN(s)||s<0||s>=e.length?i:e[s]})}function Qii(c){return c.replace(/[<>"'&]/g,e=>{switch(e){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return e})}function Gee(c){return c.replace(/[<>&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}function Cw(c){return c.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Xii(c,e=" "){const i=pne(c,e);return Gbt(i,e)}function pne(c,e){if(!c||!e)return c;const i=e.length;if(i===0||c.length===0)return c;let n=0;for(;c.indexOf(e,n)===n;)n=n+i;return c.substring(n)}function Gbt(c,e){if(!c||!e)return c;const i=e.length,n=c.length;if(i===0||n===0)return c;let s=n,l=-1;for(;l=c.lastIndexOf(e,s-1),!(l===-1||l+i!==s);){if(l===0)return"";s=l}return c.substring(0,s)}function Zii(c){return c.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function Yii(c){return c.replace(/\*/g,"")}function Kbt(c,e,i={}){if(!c)throw new Error("Cannot create regex from empty string");e||(c=Cw(c)),i.wholeWord&&(/\B/.test(c.charAt(0))||(c="\\b"+c),/\B/.test(c.charAt(c.length-1))||(c=c+"\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(c,n)}function eni(c){return c.source==="^"||c.source==="^$"||c.source==="$"||c.source==="^\\s*$"?!1:!!(c.exec("")&&c.lastIndex===0)}function wL(c){return c.split(/\r\n|\r|\n/)}function tni(c){var e;const i=[],n=c.split(/(\r\n|\r|\n)/);for(let s=0;s=0;i--){const n=c.charCodeAt(i);if(n!==32&&n!==9)return i}return-1}function Fte(c,e){return ce?1:0}function kHe(c,e,i=0,n=c.length,s=0,l=e.length){for(;iy)return 1}const d=n-i,f=l-s;return df?1:0}function M5e(c,e){return gne(c,e,0,c.length,0,e.length)}function gne(c,e,i=0,n=c.length,s=0,l=e.length){for(;i=128||y>=128)return kHe(c.toLowerCase(),e.toLowerCase(),i,n,s,l);bM(g)&&(g-=32),bM(y)&&(y-=32);const w=g-y;if(w!==0)return w}const d=n-i,f=l-s;return df?1:0}function pge(c){return c>=48&&c<=57}function bM(c){return c>=97&&c<=122}function WN(c){return c>=65&&c<=90}function Jz(c,e){return c.length===e.length&&gne(c,e)===0}function THe(c,e){const i=e.length;return e.length>c.length?!1:gne(c,e,0,i)===0}function YM(c,e){const i=Math.min(c.length,e.length);let n;for(n=0;n1){const n=c.charCodeAt(e-2);if(Bg(n))return DHe(n,i)}return i}class EHe{get offset(){return this._offset}constructor(e,i=0){this._str=e,this._len=e.length,this._offset=i}setOffset(e){this._offset=e}prevCodePoint(){const e=ini(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=R0e(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class F0e{get offset(){return this._iterator.offset}constructor(e,i=0){this._iterator=new EHe(e,i)}nextGraphemeLength(){const e=CM.getInstance(),i=this._iterator,n=i.offset;let s=e.getGraphemeBreakType(i.nextCodePoint());for(;!i.eol();){const l=i.offset,d=e.getGraphemeBreakType(i.nextCodePoint());if(agt(s,d)){i.setOffset(l);break}s=d}return i.offset-n}prevGraphemeLength(){const e=CM.getInstance(),i=this._iterator,n=i.offset;let s=e.getGraphemeBreakType(i.prevCodePoint());for(;i.offset>0;){const l=i.offset,d=e.getGraphemeBreakType(i.prevCodePoint());if(agt(d,s)){i.setOffset(l);break}s=d}return n-i.offset}eol(){return this._iterator.eol()}}function IHe(c,e){return new F0e(c,e).nextGraphemeLength()}function Qbt(c,e){return new F0e(c,e).prevGraphemeLength()}function nni(c,e){e>0&&g9(c.charCodeAt(e))&&e--;const i=e+IHe(c,e);return[i-Qbt(c,i),i]}let k8e;function rni(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function GU(c){return k8e||(k8e=rni()),k8e.test(c)}const sni=/^[\t\n\r\x20-\x7E]*$/;function mne(c){return sni.test(c)}const Xbt=/[\u2028\u2029]/;function Zbt(c){return Xbt.test(c)}function eR(c){return c>=11904&&c<=55215||c>=63744&&c<=64255||c>=65281&&c<=65374}function NHe(c){return c>=127462&&c<=127487||c===8986||c===8987||c===9200||c===9203||c>=9728&&c<=10175||c===11088||c===11093||c>=127744&&c<=128591||c>=128640&&c<=128764||c>=128992&&c<=129008||c>=129280&&c<=129535||c>=129648&&c<=129782}const oni="\uFEFF";function LHe(c){return!!(c&&c.length>0&&c.charCodeAt(0)===65279)}function ani(c,e=!1){return c?(e&&(c=c.replace(/\\./g,"")),c.toLowerCase()!==c):!1}function Ybt(c){return c=c%(2*26),c<26?String.fromCharCode(97+c):String.fromCharCode(65+c-26)}function agt(c,e){return c===0?e!==5&&e!==7:c===2&&e===3?!1:c===4||c===2||c===3||e===4||e===2||e===3?!0:!(c===8&&(e===8||e===9||e===11||e===12)||(c===11||c===9)&&(e===9||e===10)||(c===12||c===10)&&e===10||e===5||e===13||e===7||c===1||c===13&&e===14||c===6&&e===6)}class CM{static getInstance(){return CM._INSTANCE||(CM._INSTANCE=new CM),CM._INSTANCE}constructor(){this._data=lni()}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;const i=this._data,n=i.length/3;let s=1;for(;s<=n;)if(ei[3*s+1])s=2*s+1;else return i[3*s+2];return 0}}CM._INSTANCE=null;function lni(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function cni(c,e){if(c===0)return 0;const i=uni(c,e);if(i!==void 0)return i;const n=new EHe(e,c);return n.prevCodePoint(),n.offset}function uni(c,e){const i=new EHe(e,c);let n=i.prevCodePoint();for(;dni(n)||n===65039||n===8419;){if(i.offset===0)return;n=i.prevCodePoint()}if(!NHe(n))return;let s=i.offset;return s>0&&i.prevCodePoint()===8205&&(s=i.offset),s}function dni(c){return 127995<=c&&c<=127999}const eCt=" ";class m9{static getInstance(e){return JU.cache.get(Array.from(e))}static getLocales(){return JU._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}JU=m9;m9.ambiguousCharacterData=new FE(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'));m9.cache=new Gii({getCacheKey:JSON.stringify},c=>{function e(y){const w=new Map;for(let x=0;x!y.startsWith("_")&&y in s);l.length===0&&(l=["_default"]);let d;for(const y of l){const w=e(s[y]);d=n(d,w)}const f=e(s._common),g=i(f,d);return new JU(g)});m9._locales=new FE(()=>Object.keys(JU.ambiguousCharacterData.value).filter(c=>!c.startsWith("_")));class oL{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(oL.getRawData())),this._data}static isInvisibleCharacter(e){return oL.getData().has(e)}static get codePoints(){return oL.getData()}}oL._data=void 0;class R5e{constructor(){this.mapWindowIdToZoomFactor=new Map}getZoomFactor(e){var i;return(i=this.mapWindowIdToZoomFactor.get(this.getWindowId(e)))!==null&&i!==void 0?i:1}getWindowId(e){return e.vscodeWindowId}}R5e.INSTANCE=new R5e;function tCt(c,e,i){typeof e=="string"&&(e=c.matchMedia(e)),e.addEventListener("change",i)}function fni(c){return R5e.INSTANCE.getZoomFactor(c)}const Bq=navigator.userAgent,ok=Bq.indexOf("Firefox")>=0,e9=Bq.indexOf("AppleWebKit")>=0,vne=Bq.indexOf("Chrome")>=0,q4=!vne&&Bq.indexOf("Safari")>=0,iCt=!vne&&!q4&&e9;Bq.indexOf("Electron/")>=0;const lgt=Bq.indexOf("Android")>=0;let Vme=!1;if(typeof ed.matchMedia=="function"){const c=ed.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=ed.matchMedia("(display-mode: fullscreen)");Vme=c.matches,tCt(ed,c,({matches:i})=>{Vme&&e.matches||(Vme=i)})}function hni(){return Vme}const PHe={clipboard:{writeText:mE||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:mE||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:mE||hni()?0:navigator.keyboard||q4?1:2,touch:"ontouchstart"in ed||navigator.maxTouchPoints>0,pointerEvents:ed.PointerEvent&&("ontouchstart"in ed||navigator.maxTouchPoints>0)};function F5e(c,e){if(typeof c=="number"){if(c===0)return null;const i=(c&65535)>>>0,n=(c&4294901760)>>>16;return n!==0?new T8e([gge(i,e),gge(n,e)]):new T8e([gge(i,e)])}else{const i=[];for(let n=0;n{const d=e.token.onCancellationRequested(()=>{d.dispose(),l(new DE)});Promise.resolve(i).then(f=>{d.dispose(),e.dispose(),s(f)},f=>{d.dispose(),e.dispose(),l(f)})});return new class{cancel(){e.cancel(),e.dispose()}then(s,l){return n.then(s,l)}catch(s){return this.then(void 0,s)}finally(s){return n.finally(s)}}}function yne(c,e,i){return new Promise((n,s)=>{const l=e.onCancellationRequested(()=>{l.dispose(),n(i)});c.then(n,s).finally(()=>l.dispose())})}class wni{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const i=()=>{if(this.queuedPromise=null,this.isDisposed)return;const n=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,n};this.queuedPromise=new Promise(n=>{this.activePromise.then(i,i).then(n)})}return new Promise((i,n)=>{this.queuedPromise.then(i,n)})}return this.activePromise=e(),new Promise((i,n)=>{this.activePromise.then(s=>{this.activePromise=null,i(s)},s=>{this.activePromise=null,n(s)})})}dispose(){this.isDisposed=!0}}const xni=(c,e)=>{let i=!0;const n=setTimeout(()=>{i=!1,e()},c);return{isTriggered:()=>i,dispose:()=>{clearTimeout(n),i=!1}}},kni=c=>{let e=!0;return queueMicrotask(()=>{e&&(e=!1,c())}),{isTriggered:()=>e,dispose:()=>{e=!1}}};class hT{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,i=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((s,l)=>{this.doResolve=s,this.doReject=l}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const s=this.task;return this.task=null,s()}}));const n=()=>{var s;this.deferred=null,(s=this.doResolve)===null||s===void 0||s.call(this,null)};return this.deferred=i===nCt?kni(n):xni(i,n),this.completionPromise}isTriggered(){var e;return!!(!((e=this.deferred)===null||e===void 0)&&e.isTriggered())}cancel(){var e;this.cancelTimeout(),this.completionPromise&&((e=this.doReject)===null||e===void 0||e.call(this,new DE),this.completionPromise=null)}cancelTimeout(){var e;(e=this.deferred)===null||e===void 0||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class rCt{constructor(e){this.delayer=new hT(e),this.throttler=new wni}trigger(e,i){return this.delayer.trigger(()=>this.throttler.queue(e),i)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}function J4(c,e){return e?new Promise((i,n)=>{const s=setTimeout(()=>{l.dispose(),i()},c),l=e.onCancellationRequested(()=>{clearTimeout(s),l.dispose(),n(new DE)})}):Hg(i=>J4(c,i))}function tR(c,e=0,i){const n=setTimeout(()=>{c(),i&&s.dispose()},e),s=go(()=>{clearTimeout(n),i==null||i.deleteAndLeak(s)});return i==null||i.add(s),s}function AHe(c,e=n=>!!n,i=null){let n=0;const s=c.length,l=()=>{if(n>=s)return Promise.resolve(i);const d=c[n++];return Promise.resolve(d()).then(g=>e(g)?Promise.resolve(g):l())};return l()}class gT{constructor(e,i){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof i=="number"&&this.setIfNotSet(e,i)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,i){if(this._isDisposed)throw new Yu("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},i)}setIfNotSet(e,i){if(this._isDisposed)throw new Yu("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},i))}}class OHe{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){var e;(e=this.disposable)===null||e===void 0||e.dispose(),this.disposable=void 0}cancelAndSet(e,i,n=globalThis){if(this.isDisposed)throw new Yu("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();const s=n.setInterval(()=>{e()},i);this.disposable=go(()=>{n.clearInterval(s),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}}class id{constructor(e,i){this.timeoutToken=-1,this.runner=e,this.timeout=i,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){var e;(e=this.runner)===null||e===void 0||e.call(this)}}let sCt,Kee;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?Kee=(c,e)=>{xbt(()=>{if(i)return;const n=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,n-Date.now())}}))});let i=!1;return{dispose(){i||(i=!0)}}}:Kee=(c,e,i)=>{const n=c.requestIdleCallback(e,typeof i=="number"?{timeout:i}:void 0);let s=!1;return{dispose(){s||(s=!0,c.cancelIdleCallback(n))}}},sCt=c=>Kee(globalThis,c)})();class oCt{constructor(e,i){this._didRun=!1,this._executor=()=>{try{this._value=i()}catch(n){this._error=n}finally{this._didRun=!0}},this._handle=Kee(e,()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class Tni extends oCt{constructor(e){super(globalThis,e)}}class bne{get isRejected(){var e;return((e=this.outcome)===null||e===void 0?void 0:e.outcome)===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,i)=>{this.completeCallback=e,this.errorCallback=i})}complete(e){return new Promise(i=>{this.completeCallback(e),this.outcome={outcome:0,value:e},i()})}error(e){return new Promise(i=>{this.errorCallback(e),this.outcome={outcome:1,value:e},i()})}cancel(){return this.error(new DE)}}var W5e;(function(c){async function e(n){let s;const l=await Promise.all(n.map(d=>d.then(f=>f,f=>{s||(s=f)})));if(typeof s<"u")throw s;return l}c.settled=e;function i(n){return new Promise(async(s,l)=>{try{await n(s,l)}catch(d){l(d)}})}c.withAsyncBody=i})(W5e||(W5e={}));class pp{static fromArray(e){return new pp(i=>{i.emitMany(e)})}static fromPromise(e){return new pp(async i=>{i.emitMany(await e)})}static fromPromises(e){return new pp(async i=>{await Promise.all(e.map(async n=>i.emitOne(await n)))})}static merge(e){return new pp(async i=>{await Promise.all(e.map(async n=>{for await(const s of n)i.emitOne(s)}))})}constructor(e,i){this._state=0,this._results=[],this._error=null,this._onReturn=i,this._onStateChanged=new ui,queueMicrotask(async()=>{const n={emitOne:s=>this.emitOne(s),emitMany:s=>this.emitMany(s),reject:s=>this.reject(s)};try{await Promise.resolve(e(n)),this.resolve()}catch(s){this.reject(s)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e{var i;return(i=this._onReturn)===null||i===void 0||i.call(this),{done:!0,value:void 0}}}}static map(e,i){return new pp(async n=>{for await(const s of e)n.emitOne(i(s))})}map(e){return pp.map(this,e)}static filter(e,i){return new pp(async n=>{for await(const s of e)i(s)&&n.emitOne(s)})}filter(e){return pp.filter(this,e)}static coalesce(e){return pp.filter(e,i=>!!i)}coalesce(){return pp.coalesce(this)}static async toPromise(e){const i=[];for await(const n of e)i.push(n);return i}toPromise(){return pp.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}}pp.EMPTY=pp.fromArray([]);class Dni extends pp{constructor(e,i){super(i),this._source=e}cancel(){this._source.cancel()}}function Eni(c){const e=new uh,i=c(e.token);return new Dni(e,async n=>{const s=e.token.onCancellationRequested(()=>{s.dispose(),e.dispose(),n.reject(new DE)});try{for await(const l of i){if(e.token.isCancellationRequested)return;n.emitOne(l)}s.dispose(),e.dispose()}catch(l){s.dispose(),e.dispose(),n.reject(l)}})}/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */const{entries:aCt,setPrototypeOf:ugt,isFrozen:Ini,getPrototypeOf:Nni,getOwnPropertyDescriptor:Lni}=Object;let{freeze:jC,seal:EE,create:Pni}=Object,{apply:V5e,construct:H5e}=typeof Reflect<"u"&&Reflect;V5e||(V5e=function(e,i,n){return e.apply(i,n)});jC||(jC=function(e){return e});EE||(EE=function(e){return e});H5e||(H5e=function(e,i){return new e(...i)});const Ani=_T(Array.prototype.forEach),dgt=_T(Array.prototype.pop),UY=_T(Array.prototype.push),Hme=_T(String.prototype.toLowerCase),D8e=_T(String.prototype.toString),Oni=_T(String.prototype.match),GD=_T(String.prototype.replace),Mni=_T(String.prototype.indexOf),Rni=_T(String.prototype.trim),qx=_T(RegExp.prototype.test),qY=Fni(TypeError);function _T(c){return function(e){for(var i=arguments.length,n=new Array(i>1?i-1:0),s=1;s/gm),jni=EE(/\${[\w\W]*}/gm),zni=EE(/^data-[\-\w.\u00B7-\uFFFF]/),Uni=EE(/^aria-[\-\w]+$/),lCt=EE(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),qni=EE(/^(?:\w+script|data):/i),$ni=EE(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),cCt=EE(/^html$/i);var ggt=Object.freeze({__proto__:null,MUSTACHE_EXPR:Vni,ERB_EXPR:Hni,TMPLIT_EXPR:jni,DATA_ATTR:zni,ARIA_ATTR:Uni,IS_ALLOWED_URI:lCt,IS_SCRIPT_OR_DATA:qni,ATTR_WHITESPACE:$ni,DOCTYPE_NAME:cCt});const Jni=()=>typeof window>"u"?null:window,Gni=function(e,i){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const s="data-tt-policy-suffix";i&&i.hasAttribute(s)&&(n=i.getAttribute(s));const l="dompurify"+(n?"#"+n:"");try{return e.createPolicy(l,{createHTML(d){return d},createScriptURL(d){return d}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}};function uCt(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Jni();const e=Za=>uCt(Za);if(e.version="3.0.5",e.removed=[],!c||!c.document||c.document.nodeType!==9)return e.isSupported=!1,e;const i=c.document,n=i.currentScript;let{document:s}=c;const{DocumentFragment:l,HTMLTemplateElement:d,Node:f,Element:g,NodeFilter:y,NamedNodeMap:w=c.NamedNodeMap||c.MozNamedAttrMap,HTMLFormElement:x,DOMParser:I,trustedTypes:P}=c,O=g.prototype,W=mge(O,"cloneNode"),X=mge(O,"nextSibling"),Z=mge(O,"childNodes"),ee=mge(O,"parentNode");if(typeof d=="function"){const Za=s.createElement("template");Za.content&&Za.content.ownerDocument&&(s=Za.content.ownerDocument)}let he,we="";const{implementation:Te,createNodeIterator:Be,createDocumentFragment:Me,getElementsByTagName:vt}=s,{importNode:Nt}=i;let Ni={};e.isSupported=typeof aCt=="function"&&typeof ee=="function"&&Te&&Te.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ci,ERB_EXPR:Mt,TMPLIT_EXPR:pi,DATA_ATTR:gn,ARIA_ATTR:$n,IS_SCRIPT_OR_DATA:Ri,ATTR_WHITESPACE:ao}=ggt;let{IS_ALLOWED_URI:Xs}=ggt,Yt=null;const na=Xu({},[...fgt,...E8e,...I8e,...N8e,...hgt]);let Is=null;const zs=Xu({},[..._gt,...L8e,...pgt,...vge]);let Ln=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),bd=null,zg=null,s_=!0,Wc=!0,ns=!1,fh=!0,yp=!1,ka=!1,o_=!1,My=!1,F0=!1,Lw=!1,Rt=!1,Ry=!0,no=!1;const a$="user-content-";let mr=!0,Mn=!1,Nn={},jt=null;const ti=Xu({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Yi=null;const Ei=Xu({},["audio","video","img","source","image","track"]);let fr=null;const ys=Xu({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qs="http://www.w3.org/1998/Math/MathML",Mo="http://www.w3.org/2000/svg",ul="http://www.w3.org/1999/xhtml";let xi=ul,au=!1,Wu=null;const un=Xu({},[qs,Mo,ul],D8e);let Cc;const gu=["application/xhtml+xml","text/html"],Pb="text/html";let tc,Mh=null;const $p=s.createElement("form"),mk=function(Pn){return Pn instanceof RegExp||Pn instanceof Function},bp=function(Pn){if(!(Mh&&Mh===Pn)){if((!Pn||typeof Pn!="object")&&(Pn={}),Pn=mz(Pn),Cc=gu.indexOf(Pn.PARSER_MEDIA_TYPE)===-1?Cc=Pb:Cc=Pn.PARSER_MEDIA_TYPE,tc=Cc==="application/xhtml+xml"?D8e:Hme,Yt="ALLOWED_TAGS"in Pn?Xu({},Pn.ALLOWED_TAGS,tc):na,Is="ALLOWED_ATTR"in Pn?Xu({},Pn.ALLOWED_ATTR,tc):zs,Wu="ALLOWED_NAMESPACES"in Pn?Xu({},Pn.ALLOWED_NAMESPACES,D8e):un,fr="ADD_URI_SAFE_ATTR"in Pn?Xu(mz(ys),Pn.ADD_URI_SAFE_ATTR,tc):ys,Yi="ADD_DATA_URI_TAGS"in Pn?Xu(mz(Ei),Pn.ADD_DATA_URI_TAGS,tc):Ei,jt="FORBID_CONTENTS"in Pn?Xu({},Pn.FORBID_CONTENTS,tc):ti,bd="FORBID_TAGS"in Pn?Xu({},Pn.FORBID_TAGS,tc):{},zg="FORBID_ATTR"in Pn?Xu({},Pn.FORBID_ATTR,tc):{},Nn="USE_PROFILES"in Pn?Pn.USE_PROFILES:!1,s_=Pn.ALLOW_ARIA_ATTR!==!1,Wc=Pn.ALLOW_DATA_ATTR!==!1,ns=Pn.ALLOW_UNKNOWN_PROTOCOLS||!1,fh=Pn.ALLOW_SELF_CLOSE_IN_ATTR!==!1,yp=Pn.SAFE_FOR_TEMPLATES||!1,ka=Pn.WHOLE_DOCUMENT||!1,F0=Pn.RETURN_DOM||!1,Lw=Pn.RETURN_DOM_FRAGMENT||!1,Rt=Pn.RETURN_TRUSTED_TYPE||!1,My=Pn.FORCE_BODY||!1,Ry=Pn.SANITIZE_DOM!==!1,no=Pn.SANITIZE_NAMED_PROPS||!1,mr=Pn.KEEP_CONTENT!==!1,Mn=Pn.IN_PLACE||!1,Xs=Pn.ALLOWED_URI_REGEXP||lCt,xi=Pn.NAMESPACE||ul,Ln=Pn.CUSTOM_ELEMENT_HANDLING||{},Pn.CUSTOM_ELEMENT_HANDLING&&mk(Pn.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ln.tagNameCheck=Pn.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Pn.CUSTOM_ELEMENT_HANDLING&&mk(Pn.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ln.attributeNameCheck=Pn.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Pn.CUSTOM_ELEMENT_HANDLING&&typeof Pn.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Ln.allowCustomizedBuiltInElements=Pn.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),yp&&(Wc=!1),Lw&&(F0=!0),Nn&&(Yt=Xu({},[...hgt]),Is=[],Nn.html===!0&&(Xu(Yt,fgt),Xu(Is,_gt)),Nn.svg===!0&&(Xu(Yt,E8e),Xu(Is,L8e),Xu(Is,vge)),Nn.svgFilters===!0&&(Xu(Yt,I8e),Xu(Is,L8e),Xu(Is,vge)),Nn.mathMl===!0&&(Xu(Yt,N8e),Xu(Is,pgt),Xu(Is,vge))),Pn.ADD_TAGS&&(Yt===na&&(Yt=mz(Yt)),Xu(Yt,Pn.ADD_TAGS,tc)),Pn.ADD_ATTR&&(Is===zs&&(Is=mz(Is)),Xu(Is,Pn.ADD_ATTR,tc)),Pn.ADD_URI_SAFE_ATTR&&Xu(fr,Pn.ADD_URI_SAFE_ATTR,tc),Pn.FORBID_CONTENTS&&(jt===ti&&(jt=mz(jt)),Xu(jt,Pn.FORBID_CONTENTS,tc)),mr&&(Yt["#text"]=!0),ka&&Xu(Yt,["html","head","body"]),Yt.table&&(Xu(Yt,["tbody"]),delete bd.tbody),Pn.TRUSTED_TYPES_POLICY){if(typeof Pn.TRUSTED_TYPES_POLICY.createHTML!="function")throw qY('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Pn.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw qY('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');he=Pn.TRUSTED_TYPES_POLICY,we=he.createHTML("")}else he===void 0&&(he=Gni(P,n)),he!==null&&typeof we=="string"&&(we=he.createHTML(""));jC&&jC(Pn),Mh=Pn}},lu=Xu({},["mi","mo","mn","ms","mtext"]),Pw=Xu({},["foreignobject","desc","title","annotation-xml"]),ma=Xu({},["title","style","font","a","script"]),vT=Xu({},E8e);Xu(vT,I8e),Xu(vT,Bni);const Ql=Xu({},N8e);Xu(Ql,Wni);const La=function(Pn){let Fn=ee(Pn);(!Fn||!Fn.tagName)&&(Fn={namespaceURI:xi,tagName:"template"});const qo=Hme(Pn.tagName),Nf=Hme(Fn.tagName);return Wu[Pn.namespaceURI]?Pn.namespaceURI===Mo?Fn.namespaceURI===ul?qo==="svg":Fn.namespaceURI===qs?qo==="svg"&&(Nf==="annotation-xml"||lu[Nf]):!!vT[qo]:Pn.namespaceURI===qs?Fn.namespaceURI===ul?qo==="math":Fn.namespaceURI===Mo?qo==="math"&&Pw[Nf]:!!Ql[qo]:Pn.namespaceURI===ul?Fn.namespaceURI===Mo&&!Pw[Nf]||Fn.namespaceURI===qs&&!lu[Nf]?!1:!Ql[qo]&&(ma[qo]||!vT[qo]):!!(Cc==="application/xhtml+xml"&&Wu[Pn.namespaceURI]):!1},a_=function(Pn){UY(e.removed,{element:Pn});try{Pn.parentNode.removeChild(Pn)}catch{Pn.remove()}},zE=function(Pn,Fn){try{UY(e.removed,{attribute:Fn.getAttributeNode(Pn),from:Fn})}catch{UY(e.removed,{attribute:null,from:Fn})}if(Fn.removeAttribute(Pn),Pn==="is"&&!Is[Pn])if(F0||Lw)try{a_(Fn)}catch{}else try{Fn.setAttribute(Pn,"")}catch{}},ag=function(Pn){let Fn,qo;if(My)Pn=""+Pn;else{const By=Oni(Pn,/^[\r\n\t ]+/);qo=By&&By[0]}Cc==="application/xhtml+xml"&&xi===ul&&(Pn=''+Pn+"");const Nf=he?he.createHTML(Pn):Pn;if(xi===ul)try{Fn=new I().parseFromString(Nf,Cc)}catch{}if(!Fn||!Fn.documentElement){Fn=Te.createDocument(xi,"template",null);try{Fn.documentElement.innerHTML=au?we:Nf}catch{}}const P_=Fn.body||Fn.documentElement;return Pn&&qo&&P_.insertBefore(s.createTextNode(qo),P_.childNodes[0]||null),xi===ul?vt.call(Fn,ka?"html":"body")[0]:ka?Fn.documentElement:P_},IL=function(Pn){return Be.call(Pn.ownerDocument||Pn,Pn,y.SHOW_ELEMENT|y.SHOW_COMMENT|y.SHOW_TEXT,null,!1)},Fy=function(Pn){return Pn instanceof x&&(typeof Pn.nodeName!="string"||typeof Pn.textContent!="string"||typeof Pn.removeChild!="function"||!(Pn.attributes instanceof w)||typeof Pn.removeAttribute!="function"||typeof Pn.setAttribute!="function"||typeof Pn.namespaceURI!="string"||typeof Pn.insertBefore!="function"||typeof Pn.hasChildNodes!="function")},QC=function(Pn){return typeof f=="object"?Pn instanceof f:Pn&&typeof Pn=="object"&&typeof Pn.nodeType=="number"&&typeof Pn.nodeName=="string"},nd=function(Pn,Fn,qo){Ni[Pn]&&Ani(Ni[Pn],Nf=>{Nf.call(e,Fn,qo,Mh)})},Ab=function(Pn){let Fn;if(nd("beforeSanitizeElements",Pn,null),Fy(Pn))return a_(Pn),!0;const qo=tc(Pn.nodeName);if(nd("uponSanitizeElement",Pn,{tagName:qo,allowedTags:Yt}),Pn.hasChildNodes()&&!QC(Pn.firstElementChild)&&(!QC(Pn.content)||!QC(Pn.content.firstElementChild))&&qx(/<[/\w]/g,Pn.innerHTML)&&qx(/<[/\w]/g,Pn.textContent))return a_(Pn),!0;if(!Yt[qo]||bd[qo]){if(!bd[qo]&&u6(qo)&&(Ln.tagNameCheck instanceof RegExp&&qx(Ln.tagNameCheck,qo)||Ln.tagNameCheck instanceof Function&&Ln.tagNameCheck(qo)))return!1;if(mr&&!jt[qo]){const Nf=ee(Pn)||Pn.parentNode,P_=Z(Pn)||Pn.childNodes;if(P_&&Nf){const By=P_.length;for(let hh=By-1;hh>=0;--hh)Nf.insertBefore(W(P_[hh],!0),X(Pn))}}return a_(Pn),!0}return Pn instanceof g&&!La(Pn)||(qo==="noscript"||qo==="noembed"||qo==="noframes")&&qx(/<\/no(script|embed|frames)/i,Pn.innerHTML)?(a_(Pn),!0):(yp&&Pn.nodeType===3&&(Fn=Pn.textContent,Fn=GD(Fn,ci," "),Fn=GD(Fn,Mt," "),Fn=GD(Fn,pi," "),Pn.textContent!==Fn&&(UY(e.removed,{element:Pn.cloneNode()}),Pn.textContent=Fn)),nd("afterSanitizeElements",Pn,null),!1)},Vl=function(Pn,Fn,qo){if(Ry&&(Fn==="id"||Fn==="name")&&(qo in s||qo in $p))return!1;if(!(Wc&&!zg[Fn]&&qx(gn,Fn))){if(!(s_&&qx($n,Fn))){if(!Is[Fn]||zg[Fn]){if(!(u6(Pn)&&(Ln.tagNameCheck instanceof RegExp&&qx(Ln.tagNameCheck,Pn)||Ln.tagNameCheck instanceof Function&&Ln.tagNameCheck(Pn))&&(Ln.attributeNameCheck instanceof RegExp&&qx(Ln.attributeNameCheck,Fn)||Ln.attributeNameCheck instanceof Function&&Ln.attributeNameCheck(Fn))||Fn==="is"&&Ln.allowCustomizedBuiltInElements&&(Ln.tagNameCheck instanceof RegExp&&qx(Ln.tagNameCheck,qo)||Ln.tagNameCheck instanceof Function&&Ln.tagNameCheck(qo))))return!1}else if(!fr[Fn]){if(!qx(Xs,GD(qo,ao,""))){if(!((Fn==="src"||Fn==="xlink:href"||Fn==="href")&&Pn!=="script"&&Mni(qo,"data:")===0&&Yi[Pn])){if(!(ns&&!qx(Ri,GD(qo,ao,"")))){if(qo)return!1}}}}}}return!0},u6=function(Pn){return Pn.indexOf("-")>0},wm=function(Pn){let Fn,qo,Nf,P_;nd("beforeSanitizeAttributes",Pn,null);const{attributes:By}=Pn;if(!By)return;const hh={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Is};for(P_=By.length;P_--;){Fn=By[P_];const{name:xv,namespaceURI:d6}=Fn;if(qo=xv==="value"?Fn.value:Rni(Fn.value),Nf=tc(xv),hh.attrName=Nf,hh.attrValue=qo,hh.keepAttr=!0,hh.forceKeepAttr=void 0,nd("uponSanitizeAttribute",Pn,hh),qo=hh.attrValue,hh.forceKeepAttr||(zE(xv,Pn),!hh.keepAttr))continue;if(!fh&&qx(/\/>/i,qo)){zE(xv,Pn);continue}yp&&(qo=GD(qo,ci," "),qo=GD(qo,Mt," "),qo=GD(qo,pi," "));const fB=tc(Pn.nodeName);if(Vl(fB,Nf,qo)){if(no&&(Nf==="id"||Nf==="name")&&(zE(xv,Pn),qo=a$+qo),he&&typeof P=="object"&&typeof P.getAttributeType=="function"&&!d6)switch(P.getAttributeType(fB,Nf)){case"TrustedHTML":{qo=he.createHTML(qo);break}case"TrustedScriptURL":{qo=he.createScriptURL(qo);break}}try{d6?Pn.setAttributeNS(d6,xv,qo):Pn.setAttribute(xv,qo),dgt(e.removed)}catch{}}}nd("afterSanitizeAttributes",Pn,null)},ure=function Za(Pn){let Fn;const qo=IL(Pn);for(nd("beforeSanitizeShadowDOM",Pn,null);Fn=qo.nextNode();)nd("uponSanitizeShadowNode",Fn,null),!Ab(Fn)&&(Fn.content instanceof l&&Za(Fn.content),wm(Fn));nd("afterSanitizeShadowDOM",Pn,null)};return e.sanitize=function(Za){let Pn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Fn,qo,Nf,P_;if(au=!Za,au&&(Za=""),typeof Za!="string"&&!QC(Za))if(typeof Za.toString=="function"){if(Za=Za.toString(),typeof Za!="string")throw qY("dirty is not a string, aborting")}else throw qY("toString is not a function");if(!e.isSupported)return Za;if(o_||bp(Pn),e.removed=[],typeof Za=="string"&&(Mn=!1),Mn){if(Za.nodeName){const xv=tc(Za.nodeName);if(!Yt[xv]||bd[xv])throw qY("root node is forbidden and cannot be sanitized in-place")}}else if(Za instanceof f)Fn=ag(""),qo=Fn.ownerDocument.importNode(Za,!0),qo.nodeType===1&&qo.nodeName==="BODY"||qo.nodeName==="HTML"?Fn=qo:Fn.appendChild(qo);else{if(!F0&&!yp&&!ka&&Za.indexOf("<")===-1)return he&&Rt?he.createHTML(Za):Za;if(Fn=ag(Za),!Fn)return F0?null:Rt?we:""}Fn&&My&&a_(Fn.firstChild);const By=IL(Mn?Za:Fn);for(;Nf=By.nextNode();)Ab(Nf)||(Nf.content instanceof l&&ure(Nf.content),wm(Nf));if(Mn)return Za;if(F0){if(Lw)for(P_=Me.call(Fn.ownerDocument);Fn.firstChild;)P_.appendChild(Fn.firstChild);else P_=Fn;return(Is.shadowroot||Is.shadowrootmode)&&(P_=Nt.call(i,P_,!0)),P_}let hh=ka?Fn.outerHTML:Fn.innerHTML;return ka&&Yt["!doctype"]&&Fn.ownerDocument&&Fn.ownerDocument.doctype&&Fn.ownerDocument.doctype.name&&qx(cCt,Fn.ownerDocument.doctype.name)&&(hh=" +`+hh),yp&&(hh=GD(hh,ci," "),hh=GD(hh,Mt," "),hh=GD(hh,pi," ")),he&&Rt?he.createHTML(hh):hh},e.setConfig=function(Za){bp(Za),o_=!0},e.clearConfig=function(){Mh=null,o_=!1},e.isValidAttribute=function(Za,Pn,Fn){Mh||bp({});const qo=tc(Za),Nf=tc(Pn);return Vl(qo,Nf,Fn)},e.addHook=function(Za,Pn){typeof Pn=="function"&&(Ni[Za]=Ni[Za]||[],UY(Ni[Za],Pn))},e.removeHook=function(Za){if(Ni[Za])return dgt(Ni[Za])},e.removeHooks=function(Za){Ni[Za]&&(Ni[Za]=[])},e.removeAllHooks=function(){Ni={}},e}var xL=uCt();xL.version;xL.isSupported;const dCt=xL.sanitize;xL.setConfig;xL.clearConfig;xL.isValidAttribute;const fCt=xL.addHook,hCt=xL.removeHook;xL.removeHooks;xL.removeAllHooks;var wa;(function(c){c.inMemory="inmemory",c.vscode="vscode",c.internal="private",c.walkThrough="walkThrough",c.walkThroughSnippet="walkThroughSnippet",c.http="http",c.https="https",c.file="file",c.mailto="mailto",c.untitled="untitled",c.data="data",c.command="command",c.vscodeRemote="vscode-remote",c.vscodeRemoteResource="vscode-remote-resource",c.vscodeManagedRemoteResource="vscode-managed-remote-resource",c.vscodeUserData="vscode-userdata",c.vscodeCustomEditor="vscode-custom-editor",c.vscodeNotebookCell="vscode-notebook-cell",c.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",c.vscodeNotebookCellOutput="vscode-notebook-cell-output",c.vscodeInteractiveInput="vscode-interactive-input",c.vscodeSettings="vscode-settings",c.vscodeWorkspaceTrust="vscode-workspace-trust",c.vscodeTerminal="vscode-terminal",c.vscodeChatCodeBlock="vscode-chat-code-block",c.vscodeCopilotBackingChatCodeBlock="vscode-copilot-chat-code-block",c.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",c.vscodeChatSesssion="vscode-chat-editor",c.webviewPanel="webview-panel",c.vscodeWebview="vscode-webview",c.extension="extension",c.vscodeFileResource="vscode-file",c.tmp="tmp",c.vsls="vsls",c.vscodeSourceControl="vscode-scm",c.commentsInput="comment",c.codeSetting="code-setting"})(wa||(wa={}));function MHe(c,e){return Oo.isUri(c)?Jz(c.scheme,e):THe(c,e+":")}function j5e(c,...e){return e.some(i=>MHe(c,i))}const Kni="tkn";class Qni{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return gp.join(this._serverRootPath,wa.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(f){return Ba(f),e}const i=e.authority;let n=this._hosts[i];n&&n.indexOf(":")!==-1&&n.indexOf("[")===-1&&(n=`[${n}]`);const s=this._ports[i],l=this._connectionTokens[i];let d=`path=${encodeURIComponent(e.path)}`;return typeof l=="string"&&(d+=`&${Kni}=${encodeURIComponent(l)}`),Oo.from({scheme:xR?this._preferredWebSchema:wa.vscodeRemoteResource,authority:`${n}:${s}`,path:this._remoteResourcesPath,query:d})}}const _Ct=new Qni,Xni="vscode-app";class Bte{uriToBrowserUri(e){return e.scheme===wa.vscodeRemote?_Ct.rewrite(e):e.scheme===wa.file&&(mE||sti===`${wa.vscodeFileResource}://${Bte.FALLBACK_AUTHORITY}`)?e.with({scheme:wa.vscodeFileResource,authority:e.authority||Bte.FALLBACK_AUTHORITY,query:null,fragment:null}):e}}Bte.FALLBACK_AUTHORITY=Xni;const pCt=new Bte;var mgt;(function(c){const e=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);c.CoopAndCoep=Object.freeze(e.get("3"));const i="vscode-coi";function n(l){let d;typeof l=="string"?d=new URL(l).searchParams:l instanceof URL?d=l.searchParams:Oo.isUri(l)&&(d=new URL(l.toString(!0)).searchParams);const f=d==null?void 0:d.get(i);if(f)return e.get(f)}c.getHeadersFromQuery=n;function s(l,d,f){if(!globalThis.crossOriginIsolated)return;const g=d&&f?"3":f?"2":"1";l instanceof URLSearchParams?l.set(i,g):l[i]=g}c.addSearchParam=s})(mgt||(mgt={}));function R1e(c){return F1e(c,0)}function F1e(c,e){switch(typeof c){case"object":return c===null?v4(349,e):Array.isArray(c)?Yni(c,e):eri(c,e);case"string":return RHe(c,e);case"boolean":return Zni(c,e);case"number":return v4(c,e);case"undefined":return v4(937,e);default:return v4(617,e)}}function v4(c,e){return(e<<5)-e+c|0}function Zni(c,e){return v4(c?433:863,e)}function RHe(c,e){e=v4(149417,e);for(let i=0,n=c.length;iF1e(n,i),e)}function eri(c,e){return e=v4(181387,e),Object.keys(c).sort().reduce((i,n)=>(i=RHe(n,i),F1e(c[n],i)),e)}function P8e(c,e,i=32){const n=i-e,s=~((1<>>n)>>>0}function vgt(c,e=0,i=c.byteLength,n=0){for(let s=0;si.toString(16).padStart(2,"0")).join(""):tri((c>>>0).toString(16),e/4)}class B1e{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const i=e.length;if(i===0)return;const n=this._buff;let s=this._buffLen,l=this._leftoverHighSurrogate,d,f;for(l!==0?(d=l,f=-1,l=0):(d=e.charCodeAt(0),f=0);;){let g=d;if(Bg(d))if(f+1>>6,e[i++]=128|(n&63)>>>0):n<65536?(e[i++]=224|(n&61440)>>>12,e[i++]=128|(n&4032)>>>6,e[i++]=128|(n&63)>>>0):(e[i++]=240|(n&1835008)>>>18,e[i++]=128|(n&258048)>>>12,e[i++]=128|(n&4032)>>>6,e[i++]=128|(n&63)>>>0),i>=64&&(this._step(),i-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),i}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),$Y(this._h0)+$Y(this._h1)+$Y(this._h2)+$Y(this._h3)+$Y(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,vgt(this._buff,this._buffLen),this._buffLen>56&&(this._step(),vgt(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=B1e._bigBlock32,i=this._buffDV;for(let x=0;x<64;x+=4)e.setUint32(x,i.getUint32(x,!1),!1);for(let x=64;x<320;x+=4)e.setUint32(x,P8e(e.getUint32(x-12,!1)^e.getUint32(x-32,!1)^e.getUint32(x-56,!1)^e.getUint32(x-64,!1),1),!1);let n=this._h0,s=this._h1,l=this._h2,d=this._h3,f=this._h4,g,y,w;for(let x=0;x<80;x++)x<20?(g=s&l|~s&d,y=1518500249):x<40?(g=s^l^d,y=1859775393):x<60?(g=s&l|s&d|l&d,y=2400959708):(g=s^l^d,y=3395469782),w=P8e(n,5)+g+f+y+e.getUint32(x*4,!1)&4294967295,f=d,d=l,l=P8e(s,30),s=n,n=w;this._h0=this._h0+n&4294967295,this._h1=this._h1+s&4294967295,this._h2=this._h2+l&4294967295,this._h3=this._h3+d&4294967295,this._h4=this._h4+f&4294967295}}B1e._bigBlock32=new DataView(new ArrayBuffer(320));const{registerWindow:yAi,getWindow:Io,getDocument:bAi,getWindows:gCt,getWindowsCount:iri,getWindowId:B0e,getWindowById:ygt,hasWindow:CAi,onDidRegisterWindow:W1e,onWillUnregisterWindow:nri,onDidUnregisterWindow:rri}=function(){const c=new Map;Jii(ed,1);const e={window:ed,disposables:new On};c.set(ed.vscodeWindowId,e);const i=new ui,n=new ui,s=new ui;function l(d,f){const g=typeof d=="number"?c.get(d):void 0;return g??(f?e:void 0)}return{onDidRegisterWindow:i.event,onWillUnregisterWindow:s.event,onDidUnregisterWindow:n.event,registerWindow(d){if(c.has(d.vscodeWindowId))return Ii.None;const f=new On,g={window:d,disposables:f.add(new On)};return c.set(d.vscodeWindowId,g),f.add(go(()=>{c.delete(d.vscodeWindowId),n.fire(d)})),f.add(tn(d,yr.BEFORE_UNLOAD,()=>{s.fire(d)})),i.fire(g),f},getWindows(){return c.values()},getWindowsCount(){return c.size},getWindowId(d){return d.vscodeWindowId},hasWindow(d){return c.has(d)},getWindowById:l,getWindow(d){var f;const g=d;if(!((f=g==null?void 0:g.ownerDocument)===null||f===void 0)&&f.defaultView)return g.ownerDocument.defaultView.window;const y=d;return y!=null&&y.view?y.view.window:ed},getDocument(d){return Io(d).document}}}();function n0(c){for(;c.firstChild;)c.firstChild.remove()}class sri{constructor(e,i,n,s){this._node=e,this._type=i,this._handler=n,this._options=s||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function tn(c,e,i,n){return new sri(c,e,i,n)}function mCt(c,e){return function(i){return e(new sT(c,i))}}function ori(c){return function(e){return c(new Fd(e))}}const n_=function(e,i,n,s){let l=n;return i==="click"||i==="mousedown"||i==="contextmenu"?l=mCt(Io(e),n):(i==="keydown"||i==="keypress"||i==="keyup")&&(l=ori(n)),tn(e,i,l,s)},ari=function(e,i,n){const s=mCt(Io(e),i);return lri(e,s,n)};function lri(c,e,i){return tn(c,TE&&PHe.pointerEvents?yr.POINTER_DOWN:yr.MOUSE_DOWN,e,i)}function Cee(c,e,i){return Kee(c,e,i)}class A8e extends oCt{constructor(e,i){super(e,i)}}let W0e,zC;class FHe extends OHe{constructor(e){super(),this.defaultTarget=e&&Io(e)}cancelAndSet(e,i,n){return super.cancelAndSet(e,i,n??this.defaultTarget)}}class O8e{constructor(e,i=0){this._runner=e,this.priority=i,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){Ba(e)}}static sort(e,i){return i.priority-e.priority}}(function(){const c=new Map,e=new Map,i=new Map,n=new Map,s=l=>{var d;i.set(l,!1);const f=(d=c.get(l))!==null&&d!==void 0?d:[];for(e.set(l,f),c.set(l,[]),n.set(l,!0);f.length>0;)f.sort(O8e.sort),f.shift().execute();n.set(l,!1)};zC=(l,d,f=0)=>{const g=B0e(l),y=new O8e(d,f);let w=c.get(g);return w||(w=[],c.set(g,w)),w.push(y),i.get(g)||(i.set(g,!0),l.requestAnimationFrame(()=>s(g))),y},W0e=(l,d,f)=>{const g=B0e(l);if(n.get(g)){const y=new O8e(d,f);let w=e.get(g);return w||(w=[],e.set(g,w)),w.push(y),y}else return zC(l,d,f)}})();function V1e(c){return Io(c).getComputedStyle(c,null)}function iR(c,e){const i=Io(c),n=i.document;if(c!==n.body)return new eu(c.clientWidth,c.clientHeight);if(TE&&(i!=null&&i.visualViewport))return new eu(i.visualViewport.width,i.visualViewport.height);if(i!=null&&i.innerWidth&&i.innerHeight)return new eu(i.innerWidth,i.innerHeight);if(n.body&&n.body.clientWidth&&n.body.clientHeight)return new eu(n.body.clientWidth,n.body.clientHeight);if(n.documentElement&&n.documentElement.clientWidth&&n.documentElement.clientHeight)return new eu(n.documentElement.clientWidth,n.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class T_{static convertToPixels(e,i){return parseFloat(i)||0}static getDimension(e,i,n){const s=V1e(e),l=s?s.getPropertyValue(i):"0";return T_.convertToPixels(e,l)}static getBorderLeftWidth(e){return T_.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return T_.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return T_.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return T_.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return T_.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return T_.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return T_.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return T_.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return T_.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return T_.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return T_.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return T_.getDimension(e,"margin-bottom","marginBottom")}}class eu{constructor(e,i){this.width=e,this.height=i}with(e=this.width,i=this.height){return e!==this.width||i!==this.height?new eu(e,i):this}static is(e){return typeof e=="object"&&typeof e.height=="number"&&typeof e.width=="number"}static lift(e){return e instanceof eu?e:new eu(e.width,e.height)}static equals(e,i){return e===i?!0:!e||!i?!1:e.width===i.width&&e.height===i.height}}eu.None=new eu(0,0);function vCt(c){let e=c.offsetParent,i=c.offsetTop,n=c.offsetLeft;for(;(c=c.parentNode)!==null&&c!==c.ownerDocument.body&&c!==c.ownerDocument.documentElement;){i-=c.scrollTop;const s=bCt(c)?null:V1e(c);s&&(n-=s.direction!=="rtl"?c.scrollLeft:-c.scrollLeft),c===e&&(n+=T_.getBorderLeftWidth(c),i+=T_.getBorderTopWidth(c),i+=c.offsetTop,n+=c.offsetLeft,e=c.offsetParent)}return{left:n,top:i}}function cri(c,e,i){typeof e=="number"&&(c.style.width=`${e}px`),typeof i=="number"&&(c.style.height=`${i}px`)}function Y_(c){const e=c.getBoundingClientRect(),i=Io(c);return{left:e.left+i.scrollX,top:e.top+i.scrollY,width:e.width,height:e.height}}function yCt(c){let e=c,i=1;do{const n=V1e(e).zoom;n!=null&&n!=="1"&&(i*=n),e=e.parentElement}while(e!==null&&e!==e.ownerDocument.documentElement);return i}function OC(c){const e=T_.getMarginLeft(c)+T_.getMarginRight(c);return c.offsetWidth+e}function M8e(c){const e=T_.getBorderLeftWidth(c)+T_.getBorderRightWidth(c),i=T_.getPaddingLeft(c)+T_.getPaddingRight(c);return c.offsetWidth-e-i}function uri(c){const e=T_.getBorderTopWidth(c)+T_.getBorderBottomWidth(c),i=T_.getPaddingTop(c)+T_.getPaddingBottom(c);return c.offsetHeight-e-i}function y4(c){const e=T_.getMarginTop(c)+T_.getMarginBottom(c);return c.offsetHeight+e}function Wg(c,e){return!!(e!=null&&e.contains(c))}function dri(c,e,i){for(;c&&c.nodeType===c.ELEMENT_NODE;){if(c.classList.contains(e))return c;if(i){if(typeof i=="string"){if(c.classList.contains(i))return null}else if(c===i)return null}c=c.parentNode}return null}function R8e(c,e,i){return!!dri(c,e,i)}function bCt(c){return c&&!!c.host&&!!c.mode}function V0e(c){return!!y9(c)}function y9(c){for(var e;c.parentNode;){if(c===((e=c.ownerDocument)===null||e===void 0?void 0:e.body))return null;c=c.parentNode}return bCt(c)?c:null}function A0(){let c=Wq().activeElement;for(;c!=null&&c.shadowRoot;)c=c.shadowRoot.activeElement;return c}function H1e(c){return A0()===c}function CCt(c){return Wg(A0(),c)}function Wq(){var c;return iri()<=1?ed.document:(c=Array.from(gCt()).map(({window:i})=>i.document).find(i=>i.hasFocus()))!==null&&c!==void 0?c:ed.document}function jme(){var c,e;return(e=(c=Wq().defaultView)===null||c===void 0?void 0:c.window)!==null&&e!==void 0?e:ed}const BHe=new Map;function SCt(){return new fri}class fri{constructor(){this._currentCssStyle="",this._styleSheet=void 0}setStyle(e){e!==this._currentCssStyle&&(this._currentCssStyle=e,this._styleSheet?this._styleSheet.innerText=e:this._styleSheet=Sw(ed.document.head,i=>i.innerText=e))}dispose(){this._styleSheet&&(this._styleSheet.remove(),this._styleSheet=void 0)}}function Sw(c=ed.document.head,e,i){const n=document.createElement("style");if(n.type="text/css",n.media="screen",e==null||e(n),c.appendChild(n),i&&i.add(go(()=>c.removeChild(n))),c===ed.document.head){const s=new Set;BHe.set(n,s);for(const{window:l,disposables:d}of gCt()){if(l===ed)continue;const f=d.add(hri(n,s,l));i==null||i.add(f)}}return n}function hri(c,e,i){var n,s;const l=new On,d=c.cloneNode(!0);i.document.head.appendChild(d),l.add(go(()=>i.document.head.removeChild(d)));for(const f of xCt(c))(n=d.sheet)===null||n===void 0||n.insertRule(f.cssText,(s=d.sheet)===null||s===void 0?void 0:s.cssRules.length);return l.add(_ri.observe(c,l,{childList:!0})(()=>{d.textContent=c.textContent})),e.add(d),l.add(go(()=>e.delete(d))),l}const _ri=new class{constructor(){this.mutationObservers=new Map}observe(c,e,i){let n=this.mutationObservers.get(c);n||(n=new Map,this.mutationObservers.set(c,n));const s=R1e(i);let l=n.get(s);if(l)l.users+=1;else{const d=new ui,f=new MutationObserver(y=>d.fire(y));f.observe(c,i);const g=l={users:1,observer:f,onDidMutate:d.event};e.add(go(()=>{g.users-=1,g.users===0&&(d.dispose(),f.disconnect(),n==null||n.delete(s),(n==null?void 0:n.size)===0&&this.mutationObservers.delete(c))})),n.set(s,l)}return l.onDidMutate}};let F8e=null;function wCt(){return F8e||(F8e=Sw()),F8e}function xCt(c){var e,i;return!((e=c==null?void 0:c.sheet)===null||e===void 0)&&e.rules?c.sheet.rules:!((i=c==null?void 0:c.sheet)===null||i===void 0)&&i.cssRules?c.sheet.cssRules:[]}function H0e(c,e,i=wCt()){var n,s;if(!(!i||!e)){(n=i.sheet)===null||n===void 0||n.insertRule(`${c} {${e}}`,0);for(const l of(s=BHe.get(i))!==null&&s!==void 0?s:[])H0e(c,e,l)}}function z5e(c,e=wCt()){var i,n;if(!e)return;const s=xCt(e),l=[];for(let d=0;d=0;d--)(i=e.sheet)===null||i===void 0||i.deleteRule(l[d]);for(const d of(n=BHe.get(e))!==null&&n!==void 0?n:[])z5e(c,d)}function pri(c){return typeof c.selectorText=="string"}function Sm(c){return c instanceof HTMLElement||c instanceof Io(c).HTMLElement}function bgt(c){return c instanceof HTMLAnchorElement||c instanceof Io(c).HTMLAnchorElement}function WHe(c){return c instanceof MouseEvent||c instanceof Io(c).MouseEvent}function dM(c){return c instanceof KeyboardEvent||c instanceof Io(c).KeyboardEvent}const yr={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:e9?"webkitAnimationStart":"animationstart",ANIMATION_END:e9?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:e9?"webkitAnimationIteration":"animationiteration"};function gri(c){const e=c;return!!(e&&typeof e.preventDefault=="function"&&typeof e.stopPropagation=="function")}const nc={stop:(c,e)=>(c.preventDefault(),e&&c.stopPropagation(),c)};function mri(c){const e=[];for(let i=0;c&&c.nodeType===c.ELEMENT_NODE;i++)e[i]=c.scrollTop,c=c.parentNode;return e}function vri(c,e){for(let i=0;c&&c.nodeType===c.ELEMENT_NODE;i++)c.scrollTop!==e[i]&&(c.scrollTop=e[i]),c=c.parentNode}class j0e extends Ii{static hasFocusWithin(e){if(Sm(e)){const i=y9(e),n=i?i.activeElement:e.ownerDocument.activeElement;return Wg(n,e)}else{const i=e;return Wg(i.document.activeElement,i.document)}}constructor(e){super(),this._onDidFocus=this._register(new ui),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new ui),this.onDidBlur=this._onDidBlur.event;let i=j0e.hasFocusWithin(e),n=!1;const s=()=>{n=!1,i||(i=!0,this._onDidFocus.fire())},l=()=>{i&&(n=!0,(Sm(e)?Io(e):e).setTimeout(()=>{n&&(n=!1,i=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{j0e.hasFocusWithin(e)!==i&&(i?l():s())},this._register(tn(e,yr.FOCUS,s,!0)),this._register(tn(e,yr.BLUR,l,!0)),Sm(e)&&(this._register(tn(e,yr.FOCUS_IN,()=>this._refreshStateHandler())),this._register(tn(e,yr.FOCUS_OUT,()=>this._refreshStateHandler())))}}function IE(c){return new j0e(c)}function yri(c,e){return c.after(e),e}function zn(c,...e){if(c.append(...e),e.length===1&&typeof e[0]!="string")return e[0]}function VHe(c,e){return c.insertBefore(e,c.firstChild),e}function r0(c,...e){c.innerText="",zn(c,...e)}const bri=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var Wte;(function(c){c.HTML="http://www.w3.org/1999/xhtml",c.SVG="http://www.w3.org/2000/svg"})(Wte||(Wte={}));function kCt(c,e,i,...n){const s=bri.exec(e);if(!s)throw new Error("Bad use of emmet");const l=s[1]||"div";let d;return c!==Wte.HTML?d=document.createElementNS(c,l):d=document.createElement(l),s[3]&&(d.id=s[3]),s[4]&&(d.className=s[4].replace(/\./g," ").trim()),i&&Object.entries(i).forEach(([f,g])=>{typeof g>"u"||(/^on\w+$/.test(f)?d[f]=g:f==="selected"?g&&d.setAttribute(f,"true"):d.setAttribute(f,g))}),d.append(...n),d}function Sr(c,e,...i){return kCt(Wte.HTML,c,e,...i)}Sr.SVG=function(c,e,...i){return kCt(Wte.SVG,c,e,...i)};function Cri(c,...e){c?RC(...e):_y(...e)}function RC(...c){for(const e of c)e.style.display="",e.removeAttribute("aria-hidden")}function _y(...c){for(const e of c)e.style.display="none",e.setAttribute("aria-hidden","true")}function Cgt(c,e){const i=c.devicePixelRatio*e;return Math.max(1,Math.floor(i))/c.devicePixelRatio}function TCt(c){ed.open(c,"_blank","noopener")}function Sri(c,e){const i=()=>{e(),n=zC(c,i)};let n=zC(c,i);return go(()=>n.dispose())}_Ct.setPreferredWebSchema(/^https:/.test(ed.location.href)?"https":"http");function G4(c){return c?`url('${pCt.uriToBrowserUri(c).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function B8e(c){return`'${c.replace(/'/g,"%27")}'`}function R4(c,e){if(c!==void 0){const i=c.match(/^\s*var\((.+)\)$/);if(i){const n=i[1].split(",",2);return n.length===2&&(e=R4(n[1].trim(),e)),`var(${n[0]}, ${e})`}return c}return e}function wri(c,e=!1){const i=document.createElement("a");return fCt("afterSanitizeAttributes",n=>{for(const s of["href","src"])if(n.hasAttribute(s)){const l=n.getAttribute(s);if(s==="href"&&l.startsWith("#"))continue;if(i.href=l,!c.includes(i.protocol.replace(/:$/,""))){if(e&&s==="src"&&i.href.startsWith("data:"))continue;n.removeAttribute(s)}}}),go(()=>{hCt("afterSanitizeAttributes")})}const xri=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);class b4 extends ui{constructor(){super(),this._subscriptions=new On,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(Mr.runAndSubscribe(W1e,({window:e,disposables:i})=>this.registerListeners(e,i),{window:ed,disposables:this._subscriptions}))}registerListeners(e,i){i.add(tn(e,"keydown",n=>{if(n.defaultPrevented)return;const s=new Fd(n);if(!(s.keyCode===6&&n.repeat)){if(n.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(n.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(n.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(n.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(s.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=n.altKey,this._keyStatus.ctrlKey=n.ctrlKey,this._keyStatus.metaKey=n.metaKey,this._keyStatus.shiftKey=n.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=n,this.fire(this._keyStatus))}},!0)),i.add(tn(e,"keyup",n=>{n.defaultPrevented||(!n.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!n.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!n.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!n.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=n.altKey,this._keyStatus.ctrlKey=n.ctrlKey,this._keyStatus.metaKey=n.metaKey,this._keyStatus.shiftKey=n.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=n,this.fire(this._keyStatus)))},!0)),i.add(tn(e.document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),i.add(tn(e.document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),i.add(tn(e.document.body,"mousemove",n=>{n.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),i.add(tn(e,"blur",()=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return b4.instance||(b4.instance=new b4),b4.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}class kri extends Ii{constructor(e,i){super(),this.element=e,this.callbacks=i,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this.callbacks.onDragStart&&this._register(tn(this.element,yr.DRAG_START,e=>{var i,n;(n=(i=this.callbacks).onDragStart)===null||n===void 0||n.call(i,e)})),this.callbacks.onDrag&&this._register(tn(this.element,yr.DRAG,e=>{var i,n;(n=(i=this.callbacks).onDrag)===null||n===void 0||n.call(i,e)})),this._register(tn(this.element,yr.DRAG_ENTER,e=>{var i,n;this.counter++,this.dragStartTime=e.timeStamp,(n=(i=this.callbacks).onDragEnter)===null||n===void 0||n.call(i,e)})),this._register(tn(this.element,yr.DRAG_OVER,e=>{var i,n;e.preventDefault(),(n=(i=this.callbacks).onDragOver)===null||n===void 0||n.call(i,e,e.timeStamp-this.dragStartTime)})),this._register(tn(this.element,yr.DRAG_LEAVE,e=>{var i,n;this.counter--,this.counter===0&&(this.dragStartTime=0,(n=(i=this.callbacks).onDragLeave)===null||n===void 0||n.call(i,e))})),this._register(tn(this.element,yr.DRAG_END,e=>{var i,n;this.counter=0,this.dragStartTime=0,(n=(i=this.callbacks).onDragEnd)===null||n===void 0||n.call(i,e)})),this._register(tn(this.element,yr.DROP,e=>{var i,n;this.counter=0,this.dragStartTime=0,(n=(i=this.callbacks).onDrop)===null||n===void 0||n.call(i,e)}))}}const Tri=/(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/;function Yc(c,...e){let i,n;Array.isArray(e[0])?(i={},n=e[0]):(i=e[0]||{},n=e[1]);const s=Tri.exec(c);if(!s||!s.groups)throw new Error("Bad use of h");const l=s.groups.tag||"div",d=document.createElement(l);s.groups.id&&(d.id=s.groups.id);const f=[];if(s.groups.class)for(const y of s.groups.class.split("."))y!==""&&f.push(y);if(i.className!==void 0)for(const y of i.className.split("."))y!==""&&f.push(y);f.length>0&&(d.className=f.join(" "));const g={};if(s.groups.name&&(g[s.groups.name]=d),n)for(const y of n)Sm(y)?d.appendChild(y):typeof y=="string"?d.append(y):"root"in y&&(Object.assign(g,y),d.appendChild(y.root));for(const[y,w]of Object.entries(i))if(y!=="className")if(y==="style")for(const[x,I]of Object.entries(w))d.style.setProperty(Sgt(x),typeof I=="number"?I+"px":""+I);else y==="tabIndex"?d.tabIndex=w:d.setAttribute(Sgt(y),w.toString());return g.root=d,g}function Sgt(c){return c.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}class Dri extends Ii{constructor(e){super(),this._onDidChange=this._register(new ui),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(e,!0),this._mediaQueryList=null,this._handleChange(e,!1)}_handleChange(e,i){var n;(n=this._mediaQueryList)===null||n===void 0||n.removeEventListener("change",this._listener),this._mediaQueryList=e.matchMedia(`(resolution: ${e.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),i&&this._onDidChange.fire()}}class Eri extends Ii{get value(){return this._value}constructor(e){super(),this._onDidChange=this._register(new ui),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio(e);const i=this._register(new Dri(e));this._register(i.onDidChange(()=>{this._value=this._getPixelRatio(e),this._onDidChange.fire(this._value)}))}_getPixelRatio(e){const i=document.createElement("canvas").getContext("2d"),n=e.devicePixelRatio||1,s=i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1;return n/s}}class Iri{constructor(){this.mapWindowIdToPixelRatioMonitor=new Map}_getOrCreatePixelRatioMonitor(e){const i=B0e(e);let n=this.mapWindowIdToPixelRatioMonitor.get(i);return n||(n=new Eri(e),this.mapWindowIdToPixelRatioMonitor.set(i,n),Mr.once(rri)(({vscodeWindowId:s})=>{s===i&&(n==null||n.dispose(),this.mapWindowIdToPixelRatioMonitor.delete(i))})),n}getInstance(e){return this._getOrCreatePixelRatioMonitor(e)}}const Vte=new Iri;class DCt{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){const i=KD(e);this._maxWidth!==i&&(this._maxWidth=i,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){const i=KD(e);this._width!==i&&(this._width=i,this.domNode.style.width=this._width)}setHeight(e){const i=KD(e);this._height!==i&&(this._height=i,this.domNode.style.height=this._height)}setTop(e){const i=KD(e);this._top!==i&&(this._top=i,this.domNode.style.top=this._top)}setLeft(e){const i=KD(e);this._left!==i&&(this._left=i,this.domNode.style.left=this._left)}setBottom(e){const i=KD(e);this._bottom!==i&&(this._bottom=i,this.domNode.style.bottom=this._bottom)}setRight(e){const i=KD(e);this._right!==i&&(this._right=i,this.domNode.style.right=this._right)}setPaddingLeft(e){const i=KD(e);this._paddingLeft!==i&&(this._paddingLeft=i,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){const i=KD(e);this._fontSize!==i&&(this._fontSize=i,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){const i=KD(e);this._lineHeight!==i&&(this._lineHeight=i,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){const i=KD(e);this._letterSpacing!==i&&(this._letterSpacing=i,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,i){this.domNode.classList.toggle(e,i),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,i){this.domNode.setAttribute(e,i)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function KD(c){return typeof c=="number"?`${c}px`:c}function pu(c){return new DCt(c)}function s0(c,e){c instanceof DCt?(c.setFontFamily(e.getMassagedFontFamily()),c.setFontWeight(e.fontWeight),c.setFontSize(e.fontSize),c.setFontFeatureSettings(e.fontFeatureSettings),c.setFontVariationSettings(e.fontVariationSettings),c.setLineHeight(e.lineHeight),c.setLetterSpacing(e.letterSpacing)):(c.style.fontFamily=e.getMassagedFontFamily(),c.style.fontWeight=e.fontWeight,c.style.fontSize=e.fontSize+"px",c.style.fontFeatureSettings=e.fontFeatureSettings,c.style.fontVariationSettings=e.fontVariationSettings,c.style.lineHeight=e.lineHeight+"px",c.style.letterSpacing=e.letterSpacing+"px")}class Nri{constructor(e,i){this.chr=e,this.type=i,this.width=0}fulfill(e){this.width=e}}class HHe{constructor(e,i){this._bareFontInfo=e,this._requests=i,this._container=null,this._testElements=null}read(e){this._createDomElements(),e.document.body.appendChild(this._container),this._readFromDomElements(),e.document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const i=document.createElement("div");s0(i,this._bareFontInfo),e.appendChild(i);const n=document.createElement("div");s0(n,this._bareFontInfo),n.style.fontWeight="bold",e.appendChild(n);const s=document.createElement("div");s0(s,this._bareFontInfo),s.style.fontStyle="italic",e.appendChild(s);const l=[];for(const d of this._requests){let f;d.type===0&&(f=i),d.type===2&&(f=n),d.type===1&&(f=s),f.appendChild(document.createElement("br"));const g=document.createElement("span");HHe._render(g,d),f.appendChild(g),l.push(g)}this._container=e,this._testElements=l}static _render(e,i){if(i.chr===" "){let n=" ";for(let s=0;s<8;s++)n+=n;e.innerText=n}else{let n=i.chr;for(let s=0;s<8;s++)n+=n;e.textContent=n}}_readFromDomElements(){for(let e=0,i=this._requests.length;e{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings(e)},5e3))}_evictUntrustedReadings(e){const i=this._ensureCache(e),n=i.getValues();let s=!1;for(const l of n)l.isTrusted||(s=!0,i.remove(l));s&&this._onDidChange.fire()}readFontInfo(e,i){const n=this._ensureCache(e);if(!n.has(i)){let s=this._actualReadFontInfo(e,i);(s.typicalHalfwidthCharacterWidth<=2||s.typicalFullwidthCharacterWidth<=2||s.spaceWidth<=2||s.maxDigitWidth<=2)&&(s=new U5e({pixelRatio:Vte.getInstance(e).value,fontFamily:s.fontFamily,fontWeight:s.fontWeight,fontSize:s.fontSize,fontFeatureSettings:s.fontFeatureSettings,fontVariationSettings:s.fontVariationSettings,lineHeight:s.lineHeight,letterSpacing:s.letterSpacing,isMonospace:s.isMonospace,typicalHalfwidthCharacterWidth:Math.max(s.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(s.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:s.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(s.spaceWidth,5),middotWidth:Math.max(s.middotWidth,5),wsmiddotWidth:Math.max(s.wsmiddotWidth,5),maxDigitWidth:Math.max(s.maxDigitWidth,5)},!1)),this._writeToCache(e,i,s)}return n.get(i)}_createRequest(e,i,n,s){const l=new Nri(e,i);return n.push(l),s==null||s.push(l),l}_actualReadFontInfo(e,i){const n=[],s=[],l=this._createRequest("n",0,n,s),d=this._createRequest("m",0,n,null),f=this._createRequest(" ",0,n,s),g=this._createRequest("0",0,n,s),y=this._createRequest("1",0,n,s),w=this._createRequest("2",0,n,s),x=this._createRequest("3",0,n,s),I=this._createRequest("4",0,n,s),P=this._createRequest("5",0,n,s),O=this._createRequest("6",0,n,s),W=this._createRequest("7",0,n,s),X=this._createRequest("8",0,n,s),Z=this._createRequest("9",0,n,s),ee=this._createRequest("→",0,n,s),he=this._createRequest("→",0,n,null),we=this._createRequest("·",0,n,s),Te=this._createRequest("⸱",0,n,null),Be="|/-_ilm%";for(let ci=0,Mt=Be.length;ci.001){vt=!1;break}}let Ni=!0;return vt&&he.width!==Nt&&(Ni=!1),he.width>ee.width&&(Ni=!1),new U5e({pixelRatio:Vte.getInstance(e).value,fontFamily:i.fontFamily,fontWeight:i.fontWeight,fontSize:i.fontSize,fontFeatureSettings:i.fontFeatureSettings,fontVariationSettings:i.fontVariationSettings,lineHeight:i.lineHeight,letterSpacing:i.letterSpacing,isMonospace:vt,typicalHalfwidthCharacterWidth:l.width,typicalFullwidthCharacterWidth:d.width,canUseHalfwidthRightwardsArrow:Ni,spaceWidth:f.width,middotWidth:we.width,wsmiddotWidth:Te.width,maxDigitWidth:Me},!0)}}class Mri{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const i=e.getId();return!!this._values[i]}get(e){const i=e.getId();return this._values[i]}put(e,i){const n=e.getId();this._keys[n]=e,this._values[n]=i}remove(e){const i=e.getId();delete this._keys[i],delete this._values[i]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}}const q5e=new Ori;var _E;(function(c){c.serviceIds=new Map,c.DI_TARGET="$di$target",c.DI_DEPENDENCIES="$di$dependencies";function e(i){return i[c.DI_DEPENDENCIES]||[]}c.getServiceDependencies=e})(_E||(_E={}));const So=Kl("instantiationService");function Rri(c,e,i){e[_E.DI_TARGET]===e?e[_E.DI_DEPENDENCIES].push({id:c,index:i}):(e[_E.DI_DEPENDENCIES]=[{id:c,index:i}],e[_E.DI_TARGET]=e)}function Kl(c){if(_E.serviceIds.has(c))return _E.serviceIds.get(c);const e=function(i,n,s){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Rri(e,i,s)};return e.toString=()=>c,_E.serviceIds.set(c,e),e}const Oc=Kl("codeEditorService"),Qf=Kl("modelService"),Lb=Kl("textModelService");class WC extends Ii{constructor(e,i="",n="",s=!0,l){super(),this._onDidChange=this._register(new ui),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=i,this._cssClass=n,this._enabled=s,this._actionCallback=l}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}async run(e,i){this._actionCallback&&await this._actionCallback(e)}}class b9 extends Ii{constructor(){super(...arguments),this._onWillRun=this._register(new ui),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new ui),this.onDidRun=this._onDidRun.event}async run(e,i){if(!e.enabled)return;this._onWillRun.fire({action:e});let n;try{await this.runAction(e,i)}catch(s){n=s}this._onDidRun.fire({action:e,error:n})}async runAction(e,i){await e.run(i)}}class Up{constructor(){this.id=Up.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...e){let i=[];for(const n of e)n.length&&(i.length?i=[...i,new Up,...n]:i=n);return i}async run(){}}Up.ID="vs.actions.separator";class KU{get actions(){return this._actions}constructor(e,i,n,s){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=i,this.class=s,this._actions=n}async run(){}}class j1e extends WC{constructor(){super(j1e.ID,V("submenu.empty","(empty)"),void 0,!1)}}j1e.ID="vs.actions.empty";function i9(c){var e,i;return{id:c.id,label:c.label,tooltip:(e=c.tooltip)!==null&&e!==void 0?e:c.label,class:c.class,enabled:(i=c.enabled)!==null&&i!==void 0?i:!0,checked:c.checked,run:async(...n)=>c.run(...n)}}var $5e;(function(c){function e(i){return i&&typeof i=="object"&&typeof i.id=="string"}c.isThemeColor=e})($5e||($5e={}));var Uo;(function(c){c.iconNameSegment="[A-Za-z0-9]+",c.iconNameExpression="[A-Za-z0-9-]+",c.iconModifierExpression="~[A-Za-z]+",c.iconNameCharacter="[A-Za-z0-9~-]";const e=new RegExp(`^(${c.iconNameExpression})(${c.iconModifierExpression})?$`);function i(I){const P=e.exec(I.id);if(!P)return i(Dr.error);const[,O,W]=P,X=["codicon","codicon-"+O];return W&&X.push("codicon-modifier-"+W.substring(1)),X}c.asClassNameArray=i;function n(I){return i(I).join(" ")}c.asClassName=n;function s(I){return"."+i(I).join(".")}c.asCSSSelector=s;function l(I){return I&&typeof I=="object"&&typeof I.id=="string"&&(typeof I.color>"u"||$5e.isThemeColor(I.color))}c.isThemeIcon=l;const d=new RegExp(`^\\$\\((${c.iconNameExpression}(?:${c.iconModifierExpression})?)\\)$`);function f(I){const P=d.exec(I);if(!P)return;const[,O]=P;return{id:O}}c.fromString=f;function g(I){return{id:I}}c.fromId=g;function y(I,P){let O=I.id;const W=O.lastIndexOf("~");return W!==-1&&(O=O.substring(0,W)),P&&(O=`${O}~${P}`),{id:O}}c.modify=y;function w(I){const P=I.id.lastIndexOf("~");if(P!==-1)return I.id.substring(P+1)}c.getModifier=w;function x(I,P){var O,W;return I.id===P.id&&((O=I.color)===null||O===void 0?void 0:O.id)===((W=P.color)===null||W===void 0?void 0:W.id)}c.isEqual=x})(Uo||(Uo={}));const ff=Kl("commandService"),uc=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new ui,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(c,e){if(!c)throw new Error("invalid command");if(typeof c=="string"){if(!e)throw new Error("invalid command");return this.registerCommand({id:c,handler:e})}if(c.metadata&&Array.isArray(c.metadata.args)){const d=[];for(const g of c.metadata.args)d.push(g.constraint);const f=c.handler;c.handler=function(g,...y){return Kei(y,d),f(g,...y)}}const{id:i}=c;let n=this._commands.get(i);n||(n=new yy,this._commands.set(i,n));const s=n.unshift(c),l=go(()=>{s();const d=this._commands.get(i);d!=null&&d.isEmpty()&&this._commands.delete(i)});return this._onDidRegisterCommand.fire(i),l}registerCommandAlias(c,e){return uc.registerCommand(c,(i,...n)=>i.get(ff).executeCommand(e,...n))}getCommand(c){const e=this._commands.get(c);if(!(!e||e.isEmpty()))return cc.first(e)}getCommands(){const c=new Map;for(const e of this._commands.keys()){const i=this.getCommand(e);i&&c.set(e,i)}return c}};uc.registerCommand("noop",()=>{});function V8e(...c){switch(c.length){case 1:return V("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",c[0]);case 2:return V("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",c[0],c[1]);case 3:return V("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",c[0],c[1],c[2]);default:return}}const Fri=V("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),Bri=V("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");let P5=class J5e{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return e.lexeme;case 18:return e.lexeme;case 19:return e.lexeme;case 20:return"EOF";default:throw yHe(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const i=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:i})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const i=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:i})}else this._match(126)?this._addToken(9):this._error(V8e("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(V8e("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(V8e("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return this._isAtEnd()||this._input.charCodeAt(this._current)!==e?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const i=this._start,n=this._input.substring(this._start,this._current),s={type:19,offset:this._start,lexeme:n};this._errors.push({offset:i,lexeme:n,additionalInfo:e}),this._tokens.push(s)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const i=this._input.substring(this._start,this._current),n=J5e._keywords.get(i);n?this._addToken(n):this._tokens.push({type:17,lexeme:i,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(Fri);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let e=this._current,i=!1,n=!1;for(;;){if(e>=this._input.length){this._current=e,this._error(Bri);return}const l=this._input.charCodeAt(e);if(i)i=!1;else if(l===47&&!n){e++;break}else l===91?n=!0:l===92?i=!0:l===93&&(n=!1);e++}for(;e=this._input.length}};P5._regexFlags=new Set(["i","g","s","m","y","u"].map(c=>c.charCodeAt(0)));P5._keywords=new Map([["not",14],["in",13],["false",12],["true",11]]);const Cv=new Map;Cv.set("false",!1);Cv.set("true",!0);Cv.set("isMac",Wl);Cv.set("isLinux",Ty);Cv.set("isWindows",M0);Cv.set("isWeb",xR);Cv.set("isMacNative",Wl&&!xR);Cv.set("isEdge",uti);Cv.set("isFirefox",lti);Cv.set("isChrome",Tbt);Cv.set("isSafari",cti);const Wri=Object.prototype.hasOwnProperty,Vri={regexParsingWithErrorRecovery:!0},Hri=V("contextkey.parser.error.emptyString","Empty context key expression"),jri=V("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),zri=V("contextkey.parser.error.noInAfterNot","'in' after 'not'."),wgt=V("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),Uri=V("contextkey.parser.error.unexpectedToken","Unexpected token"),qri=V("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),$ri=V("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),Jri=V("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?");let ECt=class See{constructor(e=Vri){this._config=e,this._scanner=new P5,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(e===""){this._parsingErrors.push({message:Hri,offset:0,lexeme:"",additionalInfo:jri});return}this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const i=this._expr();if(!this._isAtEnd()){const n=this._peek(),s=n.type===17?qri:void 0;throw this._parsingErrors.push({message:Uri,offset:n.offset,lexeme:P5.getLexeme(n),additionalInfo:s}),See._parseError}return i}catch(i){if(i!==See._parseError)throw i;return}}_expr(){return this._or()}_or(){const e=[this._and()];for(;this._matchOne(16);){const i=this._and();e.push(i)}return e.length===1?e[0]:xn.or(...e)}_and(){const e=[this._term()];for(;this._matchOne(15);){const i=this._term();e.push(i)}return e.length===1?e[0]:xn.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),Dy.INSTANCE;case 12:return this._advance(),Db.INSTANCE;case 0:{this._advance();const i=this._expr();return this._consume(1,wgt),i==null?void 0:i.negate()}case 17:return this._advance(),Q9.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),xn.true();case 12:return this._advance(),xn.false();case 0:{this._advance();const i=this._expr();return this._consume(1,wgt),i}case 17:{const i=e.lexeme;if(this._advance(),this._matchOne(9)){const s=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),s.type!==10)throw this._errExpectedButGot("REGEX",s);const l=s.lexeme,d=l.lastIndexOf("/"),f=d===l.length-1?void 0:this._removeFlagsGY(l.substring(d+1));let g;try{g=new RegExp(l.substring(1,d),f)}catch{throw this._errExpectedButGot("REGEX",s)}return Hte.create(i,g)}switch(s.type){case 10:case 19:{const l=[s.lexeme];this._advance();let d=this._peek(),f=0;for(let I=0;I=0){const y=l.slice(f+1,g),w=l[g+1]==="i"?"i":"";try{d=new RegExp(y,w)}catch{throw this._errExpectedButGot("REGEX",s)}}}if(d===null)throw this._errExpectedButGot("REGEX",s);return Hte.create(i,d)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,zri);const s=this._value();return xn.notIn(i,s)}switch(this._peek().type){case 3:{this._advance();const s=this._value();if(this._previous().type===18)return xn.equals(i,s);switch(s){case"true":return xn.has(i);case"false":return xn.not(i);default:return xn.equals(i,s)}}case 4:{this._advance();const s=this._value();if(this._previous().type===18)return xn.notEquals(i,s);switch(s){case"true":return xn.not(i);case"false":return xn.has(i);default:return xn.notEquals(i,s)}}case 5:return this._advance(),K1e.create(i,this._value());case 6:return this._advance(),Q1e.create(i,this._value());case 7:return this._advance(),J1e.create(i,this._value());case 8:return this._advance(),G1e.create(i,this._value());case 13:return this._advance(),xn.in(i,this._value());default:return xn.has(i)}}case 20:throw this._parsingErrors.push({message:$ri,offset:e.offset,lexeme:"",additionalInfo:Jri}),See._parseError;default:throw this._errExpectedButGot(`true | false | KEY + | KEY '=~' REGEX + | KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return this._check(e)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,i){if(this._check(e))return this._advance();throw this._errExpectedButGot(i,this._peek())}_errExpectedButGot(e,i,n){const s=V("contextkey.parser.error.expectedButGot",`Expected: {0} +Received: '{1}'.`,e,P5.getLexeme(i)),l=i.offset,d=P5.getLexeme(i);return this._parsingErrors.push({message:s,offset:l,lexeme:d,additionalInfo:n}),See._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}};ECt._parseError=new Error;class xn{static false(){return Dy.INSTANCE}static true(){return Db.INSTANCE}static has(e){return K9.create(e)}static equals(e,i){return Vq.create(e,i)}static notEquals(e,i){return q1e.create(e,i)}static regex(e,i){return Hte.create(e,i)}static in(e,i){return z1e.create(e,i)}static notIn(e,i){return U1e.create(e,i)}static not(e){return Q9.create(e)}static and(...e){return z5.create(e,null,!0)}static or(...e){return f4.create(e,null,!0)}static deserialize(e){return e==null?void 0:this._parser.parse(e)}}xn._parser=new ECt({regexParsingWithErrorRecovery:!1});function Gri(c,e){const i=c?c.substituteConstants():void 0,n=e?e.substituteConstants():void 0;return!i&&!n?!0:!i||!n?!1:i.equals(n)}function Qee(c,e){return c.cmp(e)}class Dy{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return Db.INSTANCE}}Dy.INSTANCE=new Dy;class Db{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return Dy.INSTANCE}}Db.INSTANCE=new Db;class K9{static create(e,i=null){const n=Cv.get(e);return typeof n=="boolean"?n?Db.INSTANCE:Dy.INSTANCE:new K9(e,i)}constructor(e,i){this.key=e,this.negated=i,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:NCt(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=Cv.get(this.key);return typeof e=="boolean"?e?Db.INSTANCE:Dy.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=Q9.create(this.key,this)),this.negated}}class Vq{static create(e,i,n=null){if(typeof i=="boolean")return i?K9.create(e,n):Q9.create(e,n);const s=Cv.get(e);return typeof s=="boolean"?i===(s?"true":"false")?Db.INSTANCE:Dy.INSTANCE:new Vq(e,i,n)}constructor(e,i,n){this.key=e,this.value=i,this.negated=n,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:X9(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=Cv.get(this.key);if(typeof e=="boolean"){const i=e?"true":"false";return this.value===i?Db.INSTANCE:Dy.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=q1e.create(this.key,this.value,this)),this.negated}}class z1e{static create(e,i){return new z1e(e,i)}constructor(e,i){this.key=e,this.valueKey=i,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:X9(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type?this.key===e.key&&this.valueKey===e.valueKey:!1}substituteConstants(){return this}evaluate(e){const i=e.getValue(this.valueKey),n=e.getValue(this.key);return Array.isArray(i)?i.includes(n):typeof n=="string"&&typeof i=="object"&&i!==null?Wri.call(i,n):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=U1e.create(this.key,this.valueKey)),this.negated}}class U1e{static create(e,i){return new U1e(e,i)}constructor(e,i){this.key=e,this.valueKey=i,this.type=11,this._negated=z1e.create(e,i)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type?this._negated.equals(e._negated):!1}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class q1e{static create(e,i,n=null){if(typeof i=="boolean")return i?Q9.create(e,n):K9.create(e,n);const s=Cv.get(e);return typeof s=="boolean"?i===(s?"true":"false")?Dy.INSTANCE:Db.INSTANCE:new q1e(e,i,n)}constructor(e,i,n){this.key=e,this.value=i,this.negated=n,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:X9(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=Cv.get(this.key);if(typeof e=="boolean"){const i=e?"true":"false";return this.value===i?Dy.INSTANCE:Db.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Vq.create(this.key,this.value,this)),this.negated}}class Q9{static create(e,i=null){const n=Cv.get(e);return typeof n=="boolean"?n?Dy.INSTANCE:Db.INSTANCE:new Q9(e,i)}constructor(e,i){this.key=e,this.negated=i,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:NCt(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=Cv.get(this.key);return typeof e=="boolean"?e?Dy.INSTANCE:Db.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=K9.create(this.key,this)),this.negated}}function $1e(c,e){if(typeof c=="string"){const i=parseFloat(c);isNaN(i)||(c=i)}return typeof c=="string"||typeof c=="number"?e(c):Dy.INSTANCE}class J1e{static create(e,i,n=null){return $1e(i,s=>new J1e(e,s,n))}constructor(e,i,n){this.key=e,this.value=i,this.negated=n,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:X9(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Q1e.create(this.key,this.value,this)),this.negated}}class G1e{static create(e,i,n=null){return $1e(i,s=>new G1e(e,s,n))}constructor(e,i,n){this.key=e,this.value=i,this.negated=n,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:X9(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=K1e.create(this.key,this.value,this)),this.negated}}class K1e{static create(e,i,n=null){return $1e(i,s=>new K1e(e,s,n))}constructor(e,i,n){this.key=e,this.value=i,this.negated=n,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:X9(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))new Q1e(e,s,n))}constructor(e,i,n){this.key=e,this.value=i,this.negated=n,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:X9(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=J1e.create(this.key,this.value,this)),this.negated}}class Hte{static create(e,i){return new Hte(e,i)}constructor(e,i){this.key=e,this.regexp=i,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const i=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return in?1:0}equals(e){if(e.type===this.type){const i=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return this.key===e.key&&i===n}return!1}substituteConstants(){return this}evaluate(e){const i=e.getValue(this.key);return this.regexp?this.regexp.test(i):!1}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=jHe.create(this)),this.negated}}class jHe{static create(e){return new jHe(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type?this._actual.equals(e._actual):!1}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function ICt(c){let e=null;for(let i=0,n=c.length;ie.expr.length)return 1;for(let i=0,n=this.expr.length;i1;){const d=s[s.length-1];if(d.type!==9)break;s.pop();const f=s.pop(),g=s.length===0,y=f4.create(d.expr.map(w=>z5.create([w,f],null,n)),null,g);y&&(s.push(y),s.sort(Qee))}if(s.length===1)return s[0];if(n){for(let d=0;de.serialize()).join(" && ")}keys(){const e=[];for(const i of this.expr)e.push(...i.keys());return e}negate(){if(!this.negated){const e=[];for(const i of this.expr)e.push(i.negate());this.negated=f4.create(e,this,!0)}return this.negated}}class f4{static create(e,i,n){return f4._normalizeArr(e,i,n)}constructor(e,i){this.expr=e,this.negated=i,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let i=0,n=this.expr.length;ie.serialize()).join(" || ")}keys(){const e=[];for(const i of this.expr)e.push(...i.keys());return e}negate(){if(!this.negated){const e=[];for(const i of this.expr)e.push(i.negate());for(;e.length>1;){const i=e.shift(),n=e.shift(),s=[];for(const l of kgt(i))for(const d of kgt(n))s.push(z5.create([l,d],null,!1));e.unshift(f4.create(s,null,!1))}this.negated=f4.create(e,this,!0)}return this.negated}}class Xr extends K9{static all(){return Xr._info.values()}constructor(e,i,n){super(e,null),this._defaultValue=i,typeof n=="object"?Xr._info.push({...n,key:e}):n!==!0&&Xr._info.push({key:e,description:n,type:i!=null?typeof i:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return Vq.create(this.key,e)}}Xr._info=[];const Zo=Kl("contextKeyService");function NCt(c,e){return ce?1:0}function X9(c,e,i,n){return ci?1:en?1:0}function G5e(c,e){if(c.type===0||e.type===1)return!0;if(c.type===9)return e.type===9?xgt(c.expr,e.expr):!1;if(e.type===9){for(const i of e.expr)if(G5e(c,i))return!0;return!1}if(c.type===6){if(e.type===6)return xgt(e.expr,c.expr);for(const i of c.expr)if(G5e(i,e))return!0;return!1}return c.equals(e)}function xgt(c,e){let i=0,n=0;for(;i{f(),this._cachedMergedKeybindings=null})}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(Xri)),this._cachedMergedKeybindings.slice(0)}}const Ey=new UHe,Qri={EditorModes:"platform.keybindingsRegistry"};dh.add(Qri.EditorModes,Ey);function Xri(c,e){if(c.weight1!==e.weight1)return c.weight1-e.weight1;if(c.command&&e.command){if(c.commande.command)return 1}return c.weight2-e.weight2}var Zri=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Dgt=function(c,e){return function(i,n){e(i,n,c)}},zme;function Gz(c){return c.command!==void 0}function Yri(c){return c.submenu!==void 0}class _t{constructor(e){if(_t._instances.has(e))throw new TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);_t._instances.set(e,this),this.id=e}}_t._instances=new Map;_t.CommandPalette=new _t("CommandPalette");_t.DebugBreakpointsContext=new _t("DebugBreakpointsContext");_t.DebugCallStackContext=new _t("DebugCallStackContext");_t.DebugConsoleContext=new _t("DebugConsoleContext");_t.DebugVariablesContext=new _t("DebugVariablesContext");_t.NotebookVariablesContext=new _t("NotebookVariablesContext");_t.DebugHoverContext=new _t("DebugHoverContext");_t.DebugWatchContext=new _t("DebugWatchContext");_t.DebugToolBar=new _t("DebugToolBar");_t.DebugToolBarStop=new _t("DebugToolBarStop");_t.EditorContext=new _t("EditorContext");_t.SimpleEditorContext=new _t("SimpleEditorContext");_t.EditorContent=new _t("EditorContent");_t.EditorLineNumberContext=new _t("EditorLineNumberContext");_t.EditorContextCopy=new _t("EditorContextCopy");_t.EditorContextPeek=new _t("EditorContextPeek");_t.EditorContextShare=new _t("EditorContextShare");_t.EditorTitle=new _t("EditorTitle");_t.EditorTitleRun=new _t("EditorTitleRun");_t.EditorTitleContext=new _t("EditorTitleContext");_t.EditorTitleContextShare=new _t("EditorTitleContextShare");_t.EmptyEditorGroup=new _t("EmptyEditorGroup");_t.EmptyEditorGroupContext=new _t("EmptyEditorGroupContext");_t.EditorTabsBarContext=new _t("EditorTabsBarContext");_t.EditorTabsBarShowTabsSubmenu=new _t("EditorTabsBarShowTabsSubmenu");_t.EditorTabsBarShowTabsZenModeSubmenu=new _t("EditorTabsBarShowTabsZenModeSubmenu");_t.EditorActionsPositionSubmenu=new _t("EditorActionsPositionSubmenu");_t.ExplorerContext=new _t("ExplorerContext");_t.ExplorerContextShare=new _t("ExplorerContextShare");_t.ExtensionContext=new _t("ExtensionContext");_t.GlobalActivity=new _t("GlobalActivity");_t.CommandCenter=new _t("CommandCenter");_t.CommandCenterCenter=new _t("CommandCenterCenter");_t.LayoutControlMenuSubmenu=new _t("LayoutControlMenuSubmenu");_t.LayoutControlMenu=new _t("LayoutControlMenu");_t.MenubarMainMenu=new _t("MenubarMainMenu");_t.MenubarAppearanceMenu=new _t("MenubarAppearanceMenu");_t.MenubarDebugMenu=new _t("MenubarDebugMenu");_t.MenubarEditMenu=new _t("MenubarEditMenu");_t.MenubarCopy=new _t("MenubarCopy");_t.MenubarFileMenu=new _t("MenubarFileMenu");_t.MenubarGoMenu=new _t("MenubarGoMenu");_t.MenubarHelpMenu=new _t("MenubarHelpMenu");_t.MenubarLayoutMenu=new _t("MenubarLayoutMenu");_t.MenubarNewBreakpointMenu=new _t("MenubarNewBreakpointMenu");_t.PanelAlignmentMenu=new _t("PanelAlignmentMenu");_t.PanelPositionMenu=new _t("PanelPositionMenu");_t.ActivityBarPositionMenu=new _t("ActivityBarPositionMenu");_t.MenubarPreferencesMenu=new _t("MenubarPreferencesMenu");_t.MenubarRecentMenu=new _t("MenubarRecentMenu");_t.MenubarSelectionMenu=new _t("MenubarSelectionMenu");_t.MenubarShare=new _t("MenubarShare");_t.MenubarSwitchEditorMenu=new _t("MenubarSwitchEditorMenu");_t.MenubarSwitchGroupMenu=new _t("MenubarSwitchGroupMenu");_t.MenubarTerminalMenu=new _t("MenubarTerminalMenu");_t.MenubarViewMenu=new _t("MenubarViewMenu");_t.MenubarHomeMenu=new _t("MenubarHomeMenu");_t.OpenEditorsContext=new _t("OpenEditorsContext");_t.OpenEditorsContextShare=new _t("OpenEditorsContextShare");_t.ProblemsPanelContext=new _t("ProblemsPanelContext");_t.SCMInputBox=new _t("SCMInputBox");_t.SCMChangesSeparator=new _t("SCMChangesSeparator");_t.SCMIncomingChanges=new _t("SCMIncomingChanges");_t.SCMIncomingChangesContext=new _t("SCMIncomingChangesContext");_t.SCMIncomingChangesSetting=new _t("SCMIncomingChangesSetting");_t.SCMOutgoingChanges=new _t("SCMOutgoingChanges");_t.SCMOutgoingChangesContext=new _t("SCMOutgoingChangesContext");_t.SCMOutgoingChangesSetting=new _t("SCMOutgoingChangesSetting");_t.SCMIncomingChangesAllChangesContext=new _t("SCMIncomingChangesAllChangesContext");_t.SCMIncomingChangesHistoryItemContext=new _t("SCMIncomingChangesHistoryItemContext");_t.SCMOutgoingChangesAllChangesContext=new _t("SCMOutgoingChangesAllChangesContext");_t.SCMOutgoingChangesHistoryItemContext=new _t("SCMOutgoingChangesHistoryItemContext");_t.SCMChangeContext=new _t("SCMChangeContext");_t.SCMResourceContext=new _t("SCMResourceContext");_t.SCMResourceContextShare=new _t("SCMResourceContextShare");_t.SCMResourceFolderContext=new _t("SCMResourceFolderContext");_t.SCMResourceGroupContext=new _t("SCMResourceGroupContext");_t.SCMSourceControl=new _t("SCMSourceControl");_t.SCMSourceControlInline=new _t("SCMSourceControlInline");_t.SCMSourceControlTitle=new _t("SCMSourceControlTitle");_t.SCMTitle=new _t("SCMTitle");_t.SearchContext=new _t("SearchContext");_t.SearchActionMenu=new _t("SearchActionContext");_t.StatusBarWindowIndicatorMenu=new _t("StatusBarWindowIndicatorMenu");_t.StatusBarRemoteIndicatorMenu=new _t("StatusBarRemoteIndicatorMenu");_t.StickyScrollContext=new _t("StickyScrollContext");_t.TestItem=new _t("TestItem");_t.TestItemGutter=new _t("TestItemGutter");_t.TestMessageContext=new _t("TestMessageContext");_t.TestMessageContent=new _t("TestMessageContent");_t.TestPeekElement=new _t("TestPeekElement");_t.TestPeekTitle=new _t("TestPeekTitle");_t.TouchBarContext=new _t("TouchBarContext");_t.TitleBarContext=new _t("TitleBarContext");_t.TitleBarTitleContext=new _t("TitleBarTitleContext");_t.TunnelContext=new _t("TunnelContext");_t.TunnelPrivacy=new _t("TunnelPrivacy");_t.TunnelProtocol=new _t("TunnelProtocol");_t.TunnelPortInline=new _t("TunnelInline");_t.TunnelTitle=new _t("TunnelTitle");_t.TunnelLocalAddressInline=new _t("TunnelLocalAddressInline");_t.TunnelOriginInline=new _t("TunnelOriginInline");_t.ViewItemContext=new _t("ViewItemContext");_t.ViewContainerTitle=new _t("ViewContainerTitle");_t.ViewContainerTitleContext=new _t("ViewContainerTitleContext");_t.ViewTitle=new _t("ViewTitle");_t.ViewTitleContext=new _t("ViewTitleContext");_t.CommentEditorActions=new _t("CommentEditorActions");_t.CommentThreadTitle=new _t("CommentThreadTitle");_t.CommentThreadActions=new _t("CommentThreadActions");_t.CommentThreadAdditionalActions=new _t("CommentThreadAdditionalActions");_t.CommentThreadTitleContext=new _t("CommentThreadTitleContext");_t.CommentThreadCommentContext=new _t("CommentThreadCommentContext");_t.CommentTitle=new _t("CommentTitle");_t.CommentActions=new _t("CommentActions");_t.CommentsViewThreadActions=new _t("CommentsViewThreadActions");_t.InteractiveToolbar=new _t("InteractiveToolbar");_t.InteractiveCellTitle=new _t("InteractiveCellTitle");_t.InteractiveCellDelete=new _t("InteractiveCellDelete");_t.InteractiveCellExecute=new _t("InteractiveCellExecute");_t.InteractiveInputExecute=new _t("InteractiveInputExecute");_t.IssueReporter=new _t("IssueReporter");_t.NotebookToolbar=new _t("NotebookToolbar");_t.NotebookStickyScrollContext=new _t("NotebookStickyScrollContext");_t.NotebookCellTitle=new _t("NotebookCellTitle");_t.NotebookCellDelete=new _t("NotebookCellDelete");_t.NotebookCellInsert=new _t("NotebookCellInsert");_t.NotebookCellBetween=new _t("NotebookCellBetween");_t.NotebookCellListTop=new _t("NotebookCellTop");_t.NotebookCellExecute=new _t("NotebookCellExecute");_t.NotebookCellExecuteGoTo=new _t("NotebookCellExecuteGoTo");_t.NotebookCellExecutePrimary=new _t("NotebookCellExecutePrimary");_t.NotebookDiffCellInputTitle=new _t("NotebookDiffCellInputTitle");_t.NotebookDiffCellMetadataTitle=new _t("NotebookDiffCellMetadataTitle");_t.NotebookDiffCellOutputsTitle=new _t("NotebookDiffCellOutputsTitle");_t.NotebookOutputToolbar=new _t("NotebookOutputToolbar");_t.NotebookOutlineFilter=new _t("NotebookOutlineFilter");_t.NotebookOutlineActionMenu=new _t("NotebookOutlineActionMenu");_t.NotebookEditorLayoutConfigure=new _t("NotebookEditorLayoutConfigure");_t.NotebookKernelSource=new _t("NotebookKernelSource");_t.BulkEditTitle=new _t("BulkEditTitle");_t.BulkEditContext=new _t("BulkEditContext");_t.TimelineItemContext=new _t("TimelineItemContext");_t.TimelineTitle=new _t("TimelineTitle");_t.TimelineTitleContext=new _t("TimelineTitleContext");_t.TimelineFilterSubMenu=new _t("TimelineFilterSubMenu");_t.AccountsContext=new _t("AccountsContext");_t.SidebarTitle=new _t("SidebarTitle");_t.PanelTitle=new _t("PanelTitle");_t.AuxiliaryBarTitle=new _t("AuxiliaryBarTitle");_t.AuxiliaryBarHeader=new _t("AuxiliaryBarHeader");_t.TerminalInstanceContext=new _t("TerminalInstanceContext");_t.TerminalEditorInstanceContext=new _t("TerminalEditorInstanceContext");_t.TerminalNewDropdownContext=new _t("TerminalNewDropdownContext");_t.TerminalTabContext=new _t("TerminalTabContext");_t.TerminalTabEmptyAreaContext=new _t("TerminalTabEmptyAreaContext");_t.TerminalStickyScrollContext=new _t("TerminalStickyScrollContext");_t.WebviewContext=new _t("WebviewContext");_t.InlineCompletionsActions=new _t("InlineCompletionsActions");_t.InlineEditActions=new _t("InlineEditActions");_t.NewFile=new _t("NewFile");_t.MergeInput1Toolbar=new _t("MergeToolbar1Toolbar");_t.MergeInput2Toolbar=new _t("MergeToolbar2Toolbar");_t.MergeBaseToolbar=new _t("MergeBaseToolbar");_t.MergeInputResultToolbar=new _t("MergeToolbarResultToolbar");_t.InlineSuggestionToolbar=new _t("InlineSuggestionToolbar");_t.InlineEditToolbar=new _t("InlineEditToolbar");_t.ChatContext=new _t("ChatContext");_t.ChatCodeBlock=new _t("ChatCodeblock");_t.ChatCompareBlock=new _t("ChatCompareBlock");_t.ChatMessageTitle=new _t("ChatMessageTitle");_t.ChatExecute=new _t("ChatExecute");_t.ChatExecuteSecondary=new _t("ChatExecuteSecondary");_t.ChatInputSide=new _t("ChatInputSide");_t.AccessibleView=new _t("AccessibleView");_t.MultiDiffEditorFileToolbar=new _t("MultiDiffEditorFileToolbar");_t.DiffEditorHunkToolbar=new _t("DiffEditorHunkToolbar");_t.DiffEditorSelectionToolbar=new _t("DiffEditorSelectionToolbar");const Dw=Kl("menuService");class h4{static for(e){let i=this._all.get(e);return i||(i=new h4(e),this._all.set(e,i)),i}static merge(e){const i=new Set;for(const n of e)n instanceof h4&&i.add(n.id);return i}constructor(e){this.id=e,this.has=i=>i===e}}h4._all=new Map;const bm=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new gii({merge:h4.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(c){return this._commands.set(c.id,c),this._onDidChangeMenu.fire(h4.for(_t.CommandPalette)),go(()=>{this._commands.delete(c.id)&&this._onDidChangeMenu.fire(h4.for(_t.CommandPalette))})}getCommand(c){return this._commands.get(c)}getCommands(){const c=new Map;return this._commands.forEach((e,i)=>c.set(i,e)),c}appendMenuItem(c,e){let i=this._menuItems.get(c);i||(i=new yy,this._menuItems.set(c,i));const n=i.push(e);return this._onDidChangeMenu.fire(h4.for(c)),go(()=>{n(),this._onDidChangeMenu.fire(h4.for(c))})}appendMenuItems(c){const e=new On;for(const{id:i,item:n}of c)e.add(this.appendMenuItem(i,n));return e}getMenuItems(c){let e;return this._menuItems.has(c)?e=[...this._menuItems.get(c)]:e=[],c===_t.CommandPalette&&this._appendImplicitItems(e),e}_appendImplicitItems(c){const e=new Set;for(const i of c)Gz(i)&&(e.add(i.command.id),i.alt&&e.add(i.alt.id));this._commands.forEach((i,n)=>{e.has(n)||c.push({command:i})})}};class CU extends KU{constructor(e,i,n){super(`submenuitem.${e.submenu.id}`,typeof e.title=="string"?e.title:e.title.value,n,"submenu"),this.item=e,this.hideActions=i}}let VC=zme=class{static label(e,i){return i!=null&&i.renderShortTitle&&e.shortTitle?typeof e.shortTitle=="string"?e.shortTitle:e.shortTitle.value:typeof e.title=="string"?e.title:e.title.value}constructor(e,i,n,s,l,d,f){var g,y;this.hideActions=s,this.menuKeybinding=l,this._commandService=f,this.id=e.id,this.label=zme.label(e,n),this.tooltip=(y=typeof e.tooltip=="string"?e.tooltip:(g=e.tooltip)===null||g===void 0?void 0:g.value)!==null&&y!==void 0?y:"",this.enabled=!e.precondition||d.contextMatchesRules(e.precondition),this.checked=void 0;let w;if(e.toggled){const x=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=d.contextMatchesRules(x.condition),this.checked&&x.tooltip&&(this.tooltip=typeof x.tooltip=="string"?x.tooltip:x.tooltip.value),this.checked&&Uo.isThemeIcon(x.icon)&&(w=x.icon),this.checked&&x.title&&(this.label=typeof x.title=="string"?x.title:x.title.value)}w||(w=Uo.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=i?new zme(i,void 0,n,s,void 0,d,f):void 0,this._options=n,this.class=w&&Uo.asClassName(w)}run(...e){var i,n;let s=[];return!((i=this._options)===null||i===void 0)&&i.arg&&(s=[...s,this._options.arg]),!((n=this._options)===null||n===void 0)&&n.shouldForwardArgs&&(s=[...s,...e]),this._commandService.executeCommand(this.id,...s)}};VC=zme=Zri([Dgt(5,Zo),Dgt(6,ff)],VC);class Ny{constructor(e){this.desc=e}}function Bd(c){const e=[],i=new c,{f1:n,menu:s,keybinding:l,...d}=i.desc;if(uc.getCommand(d.id))throw new Error(`Cannot register two commands with the same id: ${d.id}`);if(e.push(uc.registerCommand({id:d.id,handler:(f,...g)=>i.run(f,...g),metadata:d.metadata})),Array.isArray(s))for(const f of s)e.push(bm.appendMenuItem(f.id,{command:{...d,precondition:f.precondition===null?void 0:d.precondition},...f}));else s&&e.push(bm.appendMenuItem(s.id,{command:{...d,precondition:s.precondition===null?void 0:d.precondition},...s}));if(n&&(e.push(bm.appendMenuItem(_t.CommandPalette,{command:d,when:d.precondition})),e.push(bm.addCommand(d))),Array.isArray(l))for(const f of l)e.push(Ey.registerKeybindingRule({...f,id:d.id,when:d.precondition?xn.and(d.precondition,f.when):f.when}));else l&&e.push(Ey.registerKeybindingRule({...l,id:d.id,when:d.precondition?xn.and(d.precondition,l.when):l.when}));return{dispose(){yd(e)}}}const R0=Kl("telemetryService"),Sv=Kl("logService");var L0;(function(c){c[c.Off=0]="Off",c[c.Trace=1]="Trace",c[c.Debug=2]="Debug",c[c.Info=3]="Info",c[c.Warning=4]="Warning",c[c.Error=5]="Error"})(L0||(L0={}));const LCt=L0.Info;class PCt extends Ii{constructor(){super(...arguments),this.level=LCt,this._onDidChangeLogLevel=this._register(new ui),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return this.level!==L0.Off&&this.level<=e}}class esi extends PCt{constructor(e=LCt,i=!0){super(),this.useColors=i,this.setLevel(e)}trace(e,...i){this.checkLogLevel(L0.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",e,...i):console.log(e,...i))}debug(e,...i){this.checkLogLevel(L0.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",e,...i):console.log(e,...i))}info(e,...i){this.checkLogLevel(L0.Info)&&(this.useColors?console.log("%c INFO","color: #33f",e,...i):console.log(e,...i))}warn(e,...i){this.checkLogLevel(L0.Warning)&&(this.useColors?console.log("%c WARN","color: #993",e,...i):console.log(e,...i))}error(e,...i){this.checkLogLevel(L0.Error)&&(this.useColors?console.log("%c ERR","color: #f33",e,...i):console.error(e,...i))}}class tsi extends PCt{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const i of this.loggers)i.setLevel(e);super.setLevel(e)}trace(e,...i){for(const n of this.loggers)n.trace(e,...i)}debug(e,...i){for(const n of this.loggers)n.debug(e,...i)}info(e,...i){for(const n of this.loggers)n.info(e,...i)}warn(e,...i){for(const n of this.loggers)n.warn(e,...i)}error(e,...i){for(const n of this.loggers)n.error(e,...i)}dispose(){for(const e of this.loggers)e.dispose();super.dispose()}}function isi(c){switch(c){case L0.Trace:return"trace";case L0.Debug:return"debug";case L0.Info:return"info";case L0.Warning:return"warn";case L0.Error:return"error";case L0.Off:return"off"}}new Xr("logLevel",isi(L0.Info));class Z1e{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this.metadata=e.metadata}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const i of e){let n=i.kbExpr;this.precondition&&(n?n=xn.and(n,this.precondition):n=this.precondition);const s={id:this.id,weight:i.weight,args:i.args,when:n,primary:i.primary,secondary:i.secondary,win:i.win,linux:i.linux,mac:i.mac};Ey.registerKeybindingRule(s)}}uc.registerCommand({id:this.id,handler:(e,i)=>this.runCommand(e,i),metadata:this.metadata})}_registerMenuItem(e){bm.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class Hq extends Z1e{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,i,n,s){return this._implementations.push({priority:e,name:i,implementation:n,when:s}),this._implementations.sort((l,d)=>d.priority-l.priority),{dispose:()=>{for(let l=0;l{if(f.get(Zo).contextMatchesRules(n??void 0))return s(f,d,i)})}runCommand(e,i){return sg.runEditorCommand(e,i,this.precondition,(n,s,l)=>this.runEditorCommand(n,s,l))}}class ms extends sg{static convertOptions(e){let i;Array.isArray(e.menuOpts)?i=e.menuOpts:e.menuOpts?i=[e.menuOpts]:i=[];function n(s){return s.menuId||(s.menuId=_t.EditorContext),s.title||(s.title=e.label),s.when=xn.and(e.precondition,s.when),s}return Array.isArray(e.contextMenuOpts)?i.push(...e.contextMenuOpts.map(n)):e.contextMenuOpts&&i.push(n(e.contextMenuOpts)),e.menuOpts=i,e}constructor(e){super(ms.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,i,n){return this.reportTelemetry(e,i),this.run(e,i,n||{})}reportTelemetry(e,i){e.get(R0).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class OCt extends ms{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,i){return this._implementations.push([e,i]),this._implementations.sort((n,s)=>s[0]-n[0]),{dispose:()=>{for(let n=0;n{var d,f;const g=l.get(Zo),y=l.get(Sv);if(!g.contextMatchesRules((d=this.desc.precondition)!==null&&d!==void 0?d:void 0)){y.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,(f=this.desc.precondition)===null||f===void 0?void 0:f.serialize());return}return this.runEditorCommand(l,s,...i)})}}function kL(c,e){uc.registerCommand(c,function(i,...n){const s=i.get(So),[l,d]=n;Ac(Oo.isUri(l)),Ac(yi.isIPosition(d));const f=i.get(Qf).getModel(l);if(f){const g=yi.lift(d);return s.invokeFunction(e,f,g,...n.slice(2))}return i.get(Lb).createModelReference(l).then(g=>new Promise((y,w)=>{try{const x=s.invokeFunction(e,g.object.textEditorModel,yi.lift(d),n.slice(2));y(x)}catch(x){w(x)}}).finally(()=>{g.dispose()}))})}function qr(c){return Qx.INSTANCE.registerEditorCommand(c),c}function hr(c){const e=new c;return Qx.INSTANCE.registerEditorAction(e),e}function MCt(c){return Qx.INSTANCE.registerEditorAction(c),c}function nsi(c){Qx.INSTANCE.registerEditorAction(c)}function Bc(c,e,i){Qx.INSTANCE.registerEditorContribution(c,e,i)}var SU;(function(c){function e(d){return Qx.INSTANCE.getEditorCommand(d)}c.getEditorCommand=e;function i(){return Qx.INSTANCE.getEditorActions()}c.getEditorActions=i;function n(){return Qx.INSTANCE.getEditorContributions()}c.getEditorContributions=n;function s(d){return Qx.INSTANCE.getEditorContributions().filter(f=>d.indexOf(f.id)>=0)}c.getSomeEditorContributions=s;function l(){return Qx.INSTANCE.getDiffEditorContributions()}c.getDiffEditorContributions=l})(SU||(SU={}));const rsi={EditorCommonContributions:"editor.contributions"};class Qx{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,i,n){this.editorContributions.push({id:e,ctor:i,instantiation:n})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}Qx.INSTANCE=new Qx;dh.add(rsi.EditorCommonContributions,Qx.INSTANCE);function Cne(c){return c.register(),c}const RCt=Cne(new Hq({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:_t.MenubarEditMenu,group:"1_do",title:V({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:_t.CommandPalette,group:"",title:V("undo","Undo"),order:1}]}));Cne(new ACt(RCt,{id:"default:undo",precondition:void 0}));const FCt=Cne(new Hq({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:_t.MenubarEditMenu,group:"1_do",title:V({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:_t.CommandPalette,group:"",title:V("redo","Redo"),order:1}]}));Cne(new ACt(FCt,{id:"default:redo",precondition:void 0}));const ssi=Cne(new Hq({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:_t.MenubarSelectionMenu,group:"1_basic",title:V({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:_t.CommandPalette,group:"",title:V("selectAll","Select All"),order:1}]})),osi="$initialize";let Egt=!1;function K5e(c){xR&&(Egt||(Egt=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(c.message))}class asi{constructor(e,i,n,s){this.vsWorker=e,this.req=i,this.method=n,this.args=s,this.type=0}}class Igt{constructor(e,i,n,s){this.vsWorker=e,this.seq=i,this.res=n,this.err=s,this.type=1}}class lsi{constructor(e,i,n,s){this.vsWorker=e,this.req=i,this.eventName=n,this.arg=s,this.type=2}}class csi{constructor(e,i,n){this.vsWorker=e,this.req=i,this.event=n,this.type=3}}class usi{constructor(e,i){this.vsWorker=e,this.req=i,this.type=4}}class dsi{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,i){const n=String(++this._lastSentReq);return new Promise((s,l)=>{this._pendingReplies[n]={resolve:s,reject:l},this._send(new asi(this._workerId,n,e,i))})}listen(e,i){let n=null;const s=new ui({onWillAddFirstListener:()=>{n=String(++this._lastSentReq),this._pendingEmitters.set(n,s),this._send(new lsi(this._workerId,n,e,i))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(n),this._send(new usi(this._workerId,n)),n=null}});return s.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}const i=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;e.err.$isError&&(n=new Error,n.name=e.err.name,n.message=e.err.message,n.stack=e.err.stack),i.reject(n);return}i.resolve(e.res)}_handleRequestMessage(e){const i=e.req;this._handler.handleMessage(e.method,e.args).then(s=>{this._send(new Igt(this._workerId,i,s,void 0))},s=>{s.detail instanceof Error&&(s.detail=egt(s.detail)),this._send(new Igt(this._workerId,i,void 0,egt(s)))})}_handleSubscribeEventMessage(e){const i=e.req,n=this._handler.handleEvent(e.eventName,e.arg)(s=>{this._send(new csi(this._workerId,i,s))});this._pendingEvents.set(i,n)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){const i=[];if(e.type===0)for(let n=0;n{this._protocol.handleMessage(w)},w=>{s==null||s(w)})),this._protocol=new dsi({sendMessage:(w,x)=>{this._worker.postMessage(w,x)},handleMessage:(w,x)=>{if(typeof n[w]!="function")return Promise.reject(new Error("Missing method "+w+" on main thread host."));try{return Promise.resolve(n[w].apply(n,x))}catch(I){return Promise.reject(I)}},handleEvent:(w,x)=>{if(WCt(w)){const I=n[w].call(n,x);if(typeof I!="function")throw new Error(`Missing dynamic event ${w} on main thread host.`);return I}if(BCt(w)){const I=n[w];if(typeof I!="function")throw new Error(`Missing event ${w} on main thread host.`);return I}throw new Error(`Malformed event name ${w}`)}}),this._protocol.setWorkerId(this._worker.getId());let l=null;const d=globalThis.require;typeof d<"u"&&typeof d.getConfig=="function"?l=d.getConfig():typeof globalThis.requirejs<"u"&&(l=globalThis.requirejs.s.contexts._.config);const f=_He(n);this._onModuleLoaded=this._protocol.sendMessage(osi,[this._worker.getId(),JSON.parse(JSON.stringify(l)),i,f]);const g=(w,x)=>this._request(w,x),y=(w,x)=>this._protocol.listen(w,x);this._lazyProxy=new Promise((w,x)=>{s=x,this._onModuleLoaded.then(I=>{w(hsi(I,g,y))},I=>{x(I),this._onError("Worker failed to load "+i,I)})})}getProxyObject(){return this._lazyProxy}_request(e,i){return new Promise((n,s)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(e,i).then(n,s)},s)})}_onError(e,i){console.error(e),console.info(i)}}function BCt(c){return c[0]==="o"&&c[1]==="n"&&WN(c.charCodeAt(2))}function WCt(c){return/^onDynamic/.test(c)&&WN(c.charCodeAt(9))}function hsi(c,e,i){const n=d=>function(){const f=Array.prototype.slice.call(arguments,0);return e(d,f)},s=d=>function(f){return i(d,f)},l={};for(const d of c){if(WCt(d)){l[d]=s(d);continue}if(BCt(d)){l[d]=i(d,void 0);continue}l[d]=n(d)}return l}function i6(c,e){var i;const n=globalThis.MonacoEnvironment;if(n!=null&&n.createTrustedTypesPolicy)try{return n.createTrustedTypesPolicy(c,e)}catch(s){Ba(s);return}try{return(i=ed.trustedTypes)===null||i===void 0?void 0:i.createPolicy(c,e)}catch(s){Ba(s);return}}const Ngt=i6("defaultWorkerFactory",{createScriptURL:c=>c});function _si(c){const e=globalThis.MonacoEnvironment;if(e){if(typeof e.getWorker=="function")return e.getWorker("workerMain.js",c);if(typeof e.getWorkerUrl=="function"){const i=e.getWorkerUrl("workerMain.js",c);return new Worker(Ngt?Ngt.createScriptURL(i):i,{name:c})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function psi(c){return typeof c.then=="function"}class gsi extends Ii{constructor(e,i,n,s,l){super(),this.id=i,this.label=n;const d=_si(n);psi(d)?this.worker=d:this.worker=Promise.resolve(d),this.postMessage(e,[]),this.worker.then(f=>{f.onmessage=function(g){s(g.data)},f.onmessageerror=l,typeof f.addEventListener=="function"&&f.addEventListener("error",l)}),this._register(go(()=>{var f;(f=this.worker)===null||f===void 0||f.then(g=>{g.onmessage=null,g.onmessageerror=null,g.removeEventListener("error",l),g.terminate()}),this.worker=null}))}getId(){return this.id}postMessage(e,i){var n;(n=this.worker)===null||n===void 0||n.then(s=>{try{s.postMessage(e,i)}catch(l){Ba(l),Ba(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:l}))}})}}class Y1e{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,i,n){const s=++Y1e.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new gsi(e,s,this._label||"anonymous"+s,i,l=>{K5e(l),this._webWorkerFailedBeforeError=l,n(l)})}}Y1e.LAST_WORKER_ID=0;var mp;(function(c){c[c.None=0]="None",c[c.Indent=1]="Indent",c[c.IndentOutdent=2]="IndentOutdent",c[c.Outdent=3]="Outdent"})(mp||(mp={}));class j8e{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let i=0,n=e.notIn.length;inew j8e(i)):e.brackets?this._autoClosingPairs=e.brackets.map(i=>new j8e({open:i[0],close:i[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const i=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new j8e({open:i.open,close:i.close||""}))}this._autoCloseBeforeForQuotes=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:QU.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:QU.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}QU.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=`;:.,=}])> + `;QU.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS=`'"\`;:.,=}])> + `;function U5(c,e){const i=c.getCount(),n=c.findTokenIndexAtOffset(e),s=c.getLanguageId(n);let l=n;for(;l+10&&c.getLanguageId(d-1)===s;)d--;return new vsi(c,s,d,l+1,c.getStartOffset(d),c.getEndOffset(l))}class vsi{constructor(e,i,n,s,l,d){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=i,this._firstTokenIndex=n,this._lastTokenIndex=s,this.firstCharOffset=l,this._lastCharOffset=d,this.languageIdCodec=e.languageIdCodec}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getLineLength(){return this._lastCharOffset-this.firstCharOffset}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}toIViewLineTokens(){return this._actual.sliceAndInflate(this.firstCharOffset,this._lastCharOffset,0)}}function NN(c){return(c&3)!==0}const Lgt=typeof Buffer<"u";let z8e;class eye{static wrap(e){return Lgt&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new eye(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return Lgt?this.buffer.toString():(z8e||(z8e=new TextDecoder),z8e.decode(this.buffer))}}function ysi(c,e){return c[e+0]<<0>>>0|c[e+1]<<8>>>0}function bsi(c,e,i){c[i+0]=e&255,e=e>>>8,c[i+1]=e&255}function tE(c,e){return c[e]*2**24+c[e+1]*2**16+c[e+2]*2**8+c[e+3]}function iE(c,e,i){c[i+3]=e,e=e>>>8,c[i+2]=e,e=e>>>8,c[i+1]=e,e=e>>>8,c[i]=e}function Pgt(c,e){return c[e]}function Agt(c,e,i){c[i]=e}let U8e;function VCt(){return U8e||(U8e=new TextDecoder("UTF-16LE")),U8e}let q8e;function Csi(){return q8e||(q8e=new TextDecoder("UTF-16BE")),q8e}let $8e;function HCt(){return $8e||($8e=kbt()?VCt():Csi()),$8e}function Ssi(c,e,i){const n=new Uint16Array(c.buffer,e,i);return i>0&&(n[0]===65279||n[0]===65534)?wsi(c,e,i):VCt().decode(n)}function wsi(c,e,i){const n=[];let s=0;for(let l=0;l=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let n=0;n[d[0].toLowerCase(),d[1].toLowerCase()]);const i=[];for(let d=0;d{const[g,y]=d,[w,x]=f;return g===w||g===x||y===w||y===x},s=(d,f)=>{const g=Math.min(d,f),y=Math.max(d,f);for(let w=0;w0&&l.push({open:f,close:g})}return l}class ksi{constructor(e,i){this._richEditBracketsBrand=void 0;const n=xsi(i);this.brackets=n.map((s,l)=>new z0e(e,l,s.open,s.close,Tsi(s.open,s.close,n,l),Dsi(s.open,s.close,n,l))),this.forwardRegex=Esi(this.brackets),this.reversedRegex=Isi(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const s of this.brackets){for(const l of s.open)this.textIsBracket[l]=s,this.textIsOpenBracket[l]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,l.length);for(const l of s.close)this.textIsBracket[l]=s,this.textIsOpenBracket[l]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,l.length)}}}function jCt(c,e,i,n){for(let s=0,l=e.length;s=0&&n.push(f);for(const f of d.close)f.indexOf(c)>=0&&n.push(f)}}function zCt(c,e){return c.length-e.length}function tye(c){if(c.length<=1)return c;const e=[],i=new Set;for(const n of c)i.has(n)||(e.push(n),i.add(n));return e}function Tsi(c,e,i,n){let s=[];s=s.concat(c),s=s.concat(e);for(let l=0,d=s.length;l=0;d--)s[l++]=n.charCodeAt(d);return HCt().decode(s)}let e=null,i=null;return function(s){return e!==s&&(e=s,i=c(e)),i}}();class X2{static _findPrevBracketInText(e,i,n,s){const l=n.match(e);if(!l)return null;const d=n.length-(l.index||0),f=l[0].length,g=s+d;return new at(i,g-f+1,i,g+1)}static findPrevBracketInRange(e,i,n,s,l){const f=qHe(n).substring(n.length-l,n.length-s);return this._findPrevBracketInText(e,i,f,s)}static findNextBracketInText(e,i,n,s){const l=n.match(e);if(!l)return null;const d=l.index||0,f=l[0].length;if(f===0)return null;const g=s+d;return new at(i,g+1,i,g+1+f)}static findNextBracketInRange(e,i,n,s,l){const d=n.substring(s,l);return this.findNextBracketInText(e,i,d,s)}}class Lsi{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const i of this._richEditBrackets.brackets)for(const n of i.close){const s=n.charAt(n.length-1);e.push(s)}return z4(e)}onElectricCharacter(e,i,n){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const s=i.findTokenIndexAtOffset(n-1);if(NN(i.getStandardTokenType(s)))return null;const l=this._richEditBrackets.reversedRegex,d=i.getLineContent().substring(0,n-1)+e,f=X2.findPrevBracketInRange(l,1,d,0,d.length);if(!f)return null;const g=d.substring(f.startColumn-1,f.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[g])return null;const w=i.getActualLineContentBefore(f.startColumn-1);return/^\s*$/.test(w)?{matchOpenBracket:g}:null}}function yge(c){return c.global&&(c.lastIndex=0),!0}class Psi{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&yge(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&yge(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&yge(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&yge(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let i=0;return this.shouldIncrease(e)&&(i+=1),this.shouldDecrease(e)&&(i+=2),this.shouldIndentNextLine(e)&&(i+=4),this.shouldIgnore(e)&&(i+=8),i}}class Kz{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(i=>{const n=Kz._createOpenBracketRegExp(i[0]),s=Kz._createCloseBracketRegExp(i[1]);n&&s&&this._brackets.push({open:i[0],openRegExp:n,close:i[1],closeRegExp:s})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,i,n,s){if(e>=3)for(let l=0,d=this._regExpRules.length;ly.reg?(y.reg.lastIndex=0,y.reg.test(y.text)):!0))return f.action}if(e>=2&&n.length>0&&s.length>0)for(let l=0,d=this._brackets.length;l=2&&n.length>0){for(let l=0,d=this._brackets.length;l"u"?i:l}function Osi(c){return c.replace(/[\[\]]/g,"")}const If=Kl("languageService");class aE{constructor(e,i=[],n=!1){this.ctor=e,this.staticArguments=i,this.supportsDelayedInstantiation=n}}const $Ct=[];function dc(c,e,i){e instanceof aE||(e=new aE(e,[],!!i)),$Ct.push([c,e])}function Mgt(){return $Ct}const i_=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"}),iye={JSONContribution:"base.contributions.json"};function Msi(c){return c.length>0&&c.charAt(c.length-1)==="#"?c.substring(0,c.length-1):c}class Rsi{constructor(){this._onDidChangeSchema=new ui,this.schemasById={}}registerSchema(e,i){this.schemasById[Msi(e)]=i,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}const Fsi=new Rsi;dh.add(iye.JSONContribution,Fsi);const WE={Configuration:"base.contributions.configuration"},GY="vscode://schemas/settings/resourceLanguage",Rgt=dh.as(iye.JSONContribution);class Bsi{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new ui,this._onDidUpdateConfiguration=new ui,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:V("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},Rgt.registerSchema(GY,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,i=!0){this.registerConfigurations([e],i)}registerConfigurations(e,i=!0){const n=new Set;this.doRegisterConfigurations(e,i,n),Rgt.registerSchema(GY,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n})}registerDefaultConfigurations(e){const i=new Set;this.doRegisterDefaultConfigurations(e,i),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,i){var n;const s=[];for(const{overrides:l,source:d}of e)for(const f in l)if(i.add(f),nR.test(f)){const g=this.configurationDefaultsOverrides.get(f),y=(n=g==null?void 0:g.valuesSources)!==null&&n!==void 0?n:new Map;if(d)for(const P of Object.keys(l[f]))y.set(P,d);const w={...(g==null?void 0:g.value)||{},...l[f]};this.configurationDefaultsOverrides.set(f,{source:d,value:w,valuesSources:y});const x=Osi(f),I={type:"object",default:w,description:V("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",x),$ref:GY,defaultDefaultValue:w,source:xy(d)?void 0:d,defaultValueSource:d};s.push(...U0e(f)),this.configurationProperties[f]=I,this.defaultLanguageConfigurationOverridesNode.properties[f]=I}else{this.configurationDefaultsOverrides.set(f,{value:l[f],source:d});const g=this.configurationProperties[f];g&&(this.updatePropertyDefaultValue(f,g),this.updateSchema(f,g))}this.doRegisterOverrideIdentifiers(s)}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const i of e)this.overrideIdentifiers.add(i);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,i,n){e.forEach(s=>{this.validateAndRegisterProperties(s,i,s.extensionInfo,s.restrictedProperties,void 0,n),this.configurationContributors.push(s),this.registerJSONConfiguration(s)})}validateAndRegisterProperties(e,i=!0,n,s,l=3,d){var f;l=dw(e.scope)?l:e.scope;const g=e.properties;if(g)for(const w in g){const x=g[w];if(i&&Hsi(w,x)){delete g[w];continue}if(x.source=n,x.defaultDefaultValue=g[w].default,this.updatePropertyDefaultValue(w,x),nR.test(w)?x.scope=void 0:(x.scope=dw(x.scope)?l:x.scope,x.restricted=dw(x.restricted)?!!(s!=null&&s.includes(w)):x.restricted),g[w].hasOwnProperty("included")&&!g[w].included){this.excludedConfigurationProperties[w]=g[w],delete g[w];continue}else this.configurationProperties[w]=g[w],!((f=g[w].policy)===null||f===void 0)&&f.name&&this.policyConfigurations.set(g[w].policy.name,w);!g[w].deprecationMessage&&g[w].markdownDeprecationMessage&&(g[w].deprecationMessage=g[w].markdownDeprecationMessage),d.add(w)}const y=e.allOf;if(y)for(const w of y)this.validateAndRegisterProperties(w,i,n,s,l,d)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const i=n=>{const s=n.properties;if(s)for(const d in s)this.updateSchema(d,s[d]);const l=n.allOf;l==null||l.forEach(i)};i(e)}updateSchema(e,i){switch(i.scope){case 1:break;case 2:break;case 6:break;case 3:break;case 4:break;case 5:this.resourceLanguageSettingsSchema.properties[e]=i;break}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const i=`[${e}]`,n={type:"object",description:V("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:V("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:GY};this.updatePropertyDefaultValue(i,n)}}registerOverridePropertyPatternKey(){V("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),V("overrideSettings.errorMessage","This setting does not support per-language configuration."),this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,i){const n=this.configurationDefaultsOverrides.get(e);let s=n==null?void 0:n.value,l=n==null?void 0:n.source;wb(s)&&(s=i.defaultDefaultValue,l=void 0),wb(s)&&(s=Vsi(i.type)),i.default=s,i.defaultValueSource=l}}const JCt="\\[([^\\]]+)\\]",Fgt=new RegExp(JCt,"g"),Wsi=`^(${JCt})+$`,nR=new RegExp(Wsi);function U0e(c){const e=[];if(nR.test(c)){let i=Fgt.exec(c);for(;i!=null&&i.length;){const n=i[1].trim();n&&e.push(n),i=Fgt.exec(c)}}return z4(e)}function Vsi(c){switch(Array.isArray(c)?c[0]:c){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const Ume=new Bsi;dh.add(WE.Configuration,Ume);function Hsi(c,e){var i,n,s,l;return c.trim()?nR.test(c)?V("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",c):Ume.getConfigurationProperties()[c]!==void 0?V("config.property.duplicate","Cannot register '{0}'. This property is already registered.",c):!((i=e.policy)===null||i===void 0)&&i.name&&Ume.getPolicyConfigurations().get((n=e.policy)===null||n===void 0?void 0:n.name)!==void 0?V("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",c,(s=e.policy)===null||s===void 0?void 0:s.name,Ume.getPolicyConfigurations().get((l=e.policy)===null||l===void 0?void 0:l.name)):null:V("config.property.empty","Cannot register an empty property")}const jsi={ModesRegistry:"editor.modesRegistry"};class zsi{constructor(){this._onDidChangeLanguages=new ui,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let i=0,n=this._languages.length;i{const g=new Set;return{info:new $si(this,f,g),closing:g}}),l=new ogt(f=>{const g=new Set,y=new Set;return{info:new Jsi(this,f,g,y),opening:g,openingColorized:y}});for(const[f,g]of n){const y=s.get(f),w=l.get(g);y.closing.add(w.info),w.opening.add(y.info)}const d=i.colorizedBracketPairs?Bgt(i.colorizedBracketPairs):n.filter(f=>!(f[0]==="<"&&f[1]===">"));for(const[f,g]of d){const y=s.get(f),w=l.get(g);y.closing.add(w.info),w.openingColorized.add(y.info),w.opening.add(y.info)}this._openingBrackets=new Map([...s.cachedValues].map(([f,g])=>[f,g.info])),this._closingBrackets=new Map([...l.cachedValues].map(([f,g])=>[f,g.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){const i=Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]);return Sne(i,e)}}function Bgt(c){return c.filter(([e,i])=>e!==""&&i!=="")}class GCt{constructor(e,i){this.config=e,this.bracketText=i}get languageId(){return this.config.languageId}}class $si extends GCt{constructor(e,i,n){super(e,i),this.openedBrackets=n,this.isOpeningBracket=!0}}class Jsi extends GCt{constructor(e,i,n,s){super(e,i),this.openingBrackets=n,this.openingColorizedBrackets=s,this.isOpeningBracket=!1}closes(e){return e.config!==this.config?!1:this.openingBrackets.has(e)}closesColorized(e){return e.config!==this.config?!1:this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var Gsi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Wgt=function(c,e){return function(i,n){e(i,n,c)}};class J8e{constructor(e){this.languageId=e}affects(e){return this.languageId?this.languageId===e:!0}}const Kd=Kl("languageConfigurationService");let X5e=class extends Ii{constructor(e,i){super(),this.configurationService=e,this.languageService=i,this._registry=this._register(new Zsi),this.onDidChangeEmitter=this._register(new ui),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const n=new Set(Object.values(Z5e));this._register(this.configurationService.onDidChangeConfiguration(s=>{const l=s.change.keys.some(f=>n.has(f)),d=s.change.overrides.filter(([f,g])=>g.some(y=>n.has(y))).map(([f])=>f);if(l)this.configurations.clear(),this.onDidChangeEmitter.fire(new J8e(void 0));else for(const f of d)this.languageService.isRegisteredLanguageId(f)&&(this.configurations.delete(f),this.onDidChangeEmitter.fire(new J8e(f)))})),this._register(this._registry.onDidChange(s=>{this.configurations.delete(s.languageId),this.onDidChangeEmitter.fire(new J8e(s.languageId))}))}register(e,i,n){return this._registry.register(e,i,n)}getLanguageConfiguration(e){let i=this.configurations.get(e);return i||(i=Ksi(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,i)),i}};X5e=Gsi([Wgt(0,El),Wgt(1,If)],X5e);function Ksi(c,e,i,n){let s=e.getLanguageConfiguration(c);if(!s){if(!n.isRegisteredLanguageId(c))return new wU(c,{});s=new wU(c,{})}const l=Qsi(s.languageId,i),d=QCt([s.underlyingConfig,l]);return new wU(s.languageId,d)}const Z5e={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function Qsi(c,e){const i=e.getValue(Z5e.brackets,{overrideIdentifier:c}),n=e.getValue(Z5e.colorizedBracketPairs,{overrideIdentifier:c});return{brackets:Vgt(i),colorizedBracketPairs:Vgt(n)}}function Vgt(c){if(Array.isArray(c))return c.map(e=>{if(!(!Array.isArray(e)||e.length!==2))return[e[0],e[1]]}).filter(e=>!!e)}function KCt(c,e,i){const n=c.getLineContent(e);let s=Md(n);return s.length>i-1&&(s=s.substring(0,i-1)),s}class Xsi{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,i){const n=new Hgt(e,i,++this._order);return this._entries.push(n),this._resolved=null,go(()=>{for(let s=0;se.configuration)))}}function QCt(c){let e={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const i of c)e={comments:i.comments||e.comments,brackets:i.brackets||e.brackets,wordPattern:i.wordPattern||e.wordPattern,indentationRules:i.indentationRules||e.indentationRules,onEnterRules:i.onEnterRules||e.onEnterRules,autoClosingPairs:i.autoClosingPairs||e.autoClosingPairs,surroundingPairs:i.surroundingPairs||e.surroundingPairs,autoCloseBefore:i.autoCloseBefore||e.autoCloseBefore,folding:i.folding||e.folding,colorizedBracketPairs:i.colorizedBracketPairs||e.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||e.__electricCharacterSupport};return e}class Hgt{constructor(e,i,n){this.configuration=e,this.priority=i,this.order=n}static cmp(e,i){return e.priority===i.priority?e.order-i.order:e.priority-i.priority}}class jgt{constructor(e){this.languageId=e}}class Zsi extends Ii{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new ui),this.onDidChange=this._onDidChange.event,this._register(this.register(yw,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,i,n=0){let s=this._entries.get(e);s||(s=new Xsi(e),this._entries.set(e,s));const l=s.register(i,n);return this._onDidChange.fire(new jgt(e)),go(()=>{l.dispose(),this._onDidChange.fire(new jgt(e))})}getLanguageConfiguration(e){const i=this._entries.get(e);return(i==null?void 0:i.getResolvedConfiguration())||null}}class wU{constructor(e,i){this.languageId=e,this.underlyingConfig=i,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new Kz(this.underlyingConfig):null,this.comments=wU._handleComments(this.underlyingConfig),this.characterPair=new QU(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||mHe,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new Psi(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new qsi(e,this.underlyingConfig)}getWordDefinition(){return vHe(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new ksi(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new Lsi(this.brackets)),this._electricCharacter}onEnter(e,i,n,s){return this._onEnterSupport?this._onEnterSupport.onEnter(e,i,n,s):null}getAutoClosingPairs(){return new msi(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const i=e.comments;if(!i)return null;const n={};if(i.lineComment&&(n.lineCommentToken=i.lineComment),i.blockComment){const[s,l]=i.blockComment;n.blockCommentStartToken=s,n.blockCommentEndToken=l}return n}}dc(Kd,X5e,1);class tM{constructor(e,i,n,s){this.originalStart=e,this.originalLength=i,this.modifiedStart=n,this.modifiedLength=s}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}class zgt{constructor(e){this.source=e}getElements(){const e=this.source,i=new Int32Array(e.length);for(let n=0,s=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new tM(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,i){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,i),this.m_originalCount++}AddModifiedElement(e,i){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,i),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class UN{constructor(e,i,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=i;const[s,l,d]=UN._getElements(e),[f,g,y]=UN._getElements(i);this._hasStrings=d&&y,this._originalStringElements=s,this._originalElementsOrHash=l,this._modifiedStringElements=f,this._modifiedElementsOrHash=g,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){const i=e.getElements();if(UN._isStringArray(i)){const n=new Int32Array(i.length);for(let s=0,l=i.length;s=e&&s>=n&&this.ElementsAreEqual(i,s);)i--,s--;if(e>i||n>s){let x;return n<=s?(vz.Assert(e===i+1,"originalStart should only be one more than originalEnd"),x=[new tM(e,0,n,s-n+1)]):e<=i?(vz.Assert(n===s+1,"modifiedStart should only be one more than modifiedEnd"),x=[new tM(e,i-e+1,n,0)]):(vz.Assert(e===i+1,"originalStart should only be one more than originalEnd"),vz.Assert(n===s+1,"modifiedStart should only be one more than modifiedEnd"),x=[]),x}const d=[0],f=[0],g=this.ComputeRecursionPoint(e,i,n,s,d,f,l),y=d[0],w=f[0];if(g!==null)return g;if(!l[0]){const x=this.ComputeDiffRecursive(e,y,n,w,l);let I=[];return l[0]?I=[new tM(y+1,i-(y+1)+1,w+1,s-(w+1)+1)]:I=this.ComputeDiffRecursive(y+1,i,w+1,s,l),this.ConcatenateChanges(x,I)}return[new tM(e,i-e+1,n,s-n+1)]}WALKTRACE(e,i,n,s,l,d,f,g,y,w,x,I,P,O,W,X,Z,ee){let he=null,we=null,Te=new Ugt,Be=i,Me=n,vt=P[0]-X[0]-s,Nt=-1073741824,Ni=this.m_forwardHistory.length-1;do{const ci=vt+e;ci===Be||ci=0&&(y=this.m_forwardHistory[Ni],e=y[0],Be=1,Me=y.length-1)}while(--Ni>=-1);if(he=Te.getReverseChanges(),ee[0]){let ci=P[0]+1,Mt=X[0]+1;if(he!==null&&he.length>0){const pi=he[he.length-1];ci=Math.max(ci,pi.getOriginalEnd()),Mt=Math.max(Mt,pi.getModifiedEnd())}we=[new tM(ci,I-ci+1,Mt,W-Mt+1)]}else{Te=new Ugt,Be=d,Me=f,vt=P[0]-X[0]-g,Nt=1073741824,Ni=Z?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const ci=vt+l;ci===Be||ci=w[ci+1]?(x=w[ci+1]-1,O=x-vt-g,x>Nt&&Te.MarkNextChange(),Nt=x+1,Te.AddOriginalElement(x+1,O+1),vt=ci+1-l):(x=w[ci-1],O=x-vt-g,x>Nt&&Te.MarkNextChange(),Nt=x,Te.AddModifiedElement(x+1,O+1),vt=ci-1-l),Ni>=0&&(w=this.m_reverseHistory[Ni],l=w[0],Be=1,Me=w.length-1)}while(--Ni>=-1);we=Te.getChanges()}return this.ConcatenateChanges(he,we)}ComputeRecursionPoint(e,i,n,s,l,d,f){let g=0,y=0,w=0,x=0,I=0,P=0;e--,n--,l[0]=0,d[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const O=i-e+(s-n),W=O+1,X=new Int32Array(W),Z=new Int32Array(W),ee=s-n,he=i-e,we=e-n,Te=i-s,Me=(he-ee)%2===0;X[ee]=e,Z[he]=i,f[0]=!1;for(let vt=1;vt<=O/2+1;vt++){let Nt=0,Ni=0;w=this.ClipDiagonalBound(ee-vt,vt,ee,W),x=this.ClipDiagonalBound(ee+vt,vt,ee,W);for(let Mt=w;Mt<=x;Mt+=2){Mt===w||MtNt+Ni&&(Nt=g,Ni=y),!Me&&Math.abs(Mt-he)<=vt-1&&g>=Z[Mt])return l[0]=g,d[0]=y,pi<=Z[Mt]&&vt<=1448?this.WALKTRACE(ee,w,x,we,he,I,P,Te,X,Z,g,i,l,y,s,d,Me,f):null}const ci=(Nt-e+(Ni-n)-vt)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(Nt,ci))return f[0]=!0,l[0]=Nt,d[0]=Ni,ci>0&&vt<=1448?this.WALKTRACE(ee,w,x,we,he,I,P,Te,X,Z,g,i,l,y,s,d,Me,f):(e++,n++,[new tM(e,i-e+1,n,s-n+1)]);I=this.ClipDiagonalBound(he-vt,vt,he,W),P=this.ClipDiagonalBound(he+vt,vt,he,W);for(let Mt=I;Mt<=P;Mt+=2){Mt===I||Mt=Z[Mt+1]?g=Z[Mt+1]-1:g=Z[Mt-1],y=g-(Mt-he)-Te;const pi=g;for(;g>e&&y>n&&this.ElementsAreEqual(g,y);)g--,y--;if(Z[Mt]=g,Me&&Math.abs(Mt-ee)<=vt&&g<=X[Mt])return l[0]=g,d[0]=y,pi>=X[Mt]&&vt<=1448?this.WALKTRACE(ee,w,x,we,he,I,P,Te,X,Z,g,i,l,y,s,d,Me,f):null}if(vt<=1447){let Mt=new Int32Array(x-w+2);Mt[0]=ee-w+1,yz.Copy2(X,w,Mt,1,x-w+1),this.m_forwardHistory.push(Mt),Mt=new Int32Array(P-I+2),Mt[0]=he-I+1,yz.Copy2(Z,I,Mt,1,P-I+1),this.m_reverseHistory.push(Mt)}}return this.WALKTRACE(ee,w,x,we,he,I,P,Te,X,Z,g,i,l,y,s,d,Me,f)}PrettifyChanges(e){for(let i=0;i0,f=n.modifiedLength>0;for(;n.originalStart+n.originalLength=0;i--){const n=e[i];let s=0,l=0;if(i>0){const x=e[i-1];s=x.originalStart+x.originalLength,l=x.modifiedStart+x.modifiedLength}const d=n.originalLength>0,f=n.modifiedLength>0;let g=0,y=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let x=1;;x++){const I=n.originalStart-x,P=n.modifiedStart-x;if(Iy&&(y=W,g=x)}n.originalStart-=g,n.modifiedStart-=g;const w=[null];if(i>0&&this.ChangesOverlap(e[i-1],e[i],w)){e[i-1]=w[0],e.splice(i,1),i++;continue}}if(this._hasStrings)for(let i=1,n=e.length;i0&&P>g&&(g=P,y=x,w=I)}return g>0?[y,w]:null}_contiguousSequenceScore(e,i,n){let s=0;for(let l=0;l=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,i){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(i>0){const n=e+i;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,i){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(i>0){const n=e+i;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,i,n,s){const l=this._OriginalRegionIsBoundary(e,i)?1:0,d=this._ModifiedRegionIsBoundary(n,s)?1:0;return l+d}ConcatenateChanges(e,i){const n=[];if(e.length===0||i.length===0)return i.length>0?i:e;if(this.ChangesOverlap(e[e.length-1],i[0],n)){const s=new Array(e.length+i.length-1);return yz.Copy(e,0,s,0,e.length-1),s[e.length-1]=n[0],yz.Copy(i,1,s,e.length,i.length-1),s}else{const s=new Array(e.length+i.length);return yz.Copy(e,0,s,0,e.length),yz.Copy(i,0,s,e.length,i.length),s}}ChangesOverlap(e,i,n){if(vz.Assert(e.originalStart<=i.originalStart,"Left change is not less than or equal to right change"),vz.Assert(e.modifiedStart<=i.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=i.originalStart||e.modifiedStart+e.modifiedLength>=i.modifiedStart){const s=e.originalStart;let l=e.originalLength;const d=e.modifiedStart;let f=e.modifiedLength;return e.originalStart+e.originalLength>=i.originalStart&&(l=i.originalStart+i.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=i.modifiedStart&&(f=i.modifiedStart+i.modifiedLength-e.modifiedStart),n[0]=new tM(s,l,d,f),!0}else return n[0]=null,!1}ClipDiagonalBound(e,i,n,s){if(e>=0&&e255?255:c|0}function bz(c){return c<0?0:c>4294967295?4294967295:c|0}class eoi{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,i){e=bz(e);const n=this.values,s=this.prefixSum,l=i.length;return l===0?!1:(this.values=new Uint32Array(n.length+l),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+l),this.values.set(i,e),e-1=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,i){return e=bz(e),i=bz(i),this.values[e]===i?!1:(this.values[e]=i,e-1=n.length)return!1;const l=n.length-e;return i>=l&&(i=l),i===0?!1:(this.values=new Uint32Array(n.length-i),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+i),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=bz(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let i=this.prefixSumValidIndex[0]+1;i===0&&(this.prefixSum[0]=this.values[0],i++),e>=this.values.length&&(e=this.values.length-1);for(let n=i;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let i=0,n=this.values.length-1,s=0,l=0,d=0;for(;i<=n;)if(s=i+(n-i)/2|0,l=this.prefixSum[s],d=l-this.values[s],e=l)i=s+1;else break;return new XCt(s,e-d)}}class toi{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),e===0?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const i=this._indexBySum[e],n=i>0?this._prefixSum[i-1]:0;return new XCt(i,e-n)}removeValues(e,i){this._values.splice(e,i),this._invalidate(e)}insertValues(e,i){this._values=N1e(this._values,e,i),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,i=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=s+n;for(let l=0;l=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class $0e{constructor(){this._actual=new zq(0)}add(e){this._actual.set(e,1)}has(e){return this._actual.get(e)===1}clear(){return this._actual.clear()}}class noi{constructor(e,i,n){const s=new Uint8Array(e*i);for(let l=0,d=e*i;li&&(i=g),f>n&&(n=f),y>n&&(n=y)}i++,n++;const s=new noi(n,i,0);for(let l=0,d=e.length;l=this._maxCharCode?0:this._states.get(e,i)}}let G8e=null;function soi(){return G8e===null&&(G8e=new roi([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),G8e}let KY=null;function ooi(){if(KY===null){KY=new zq(0);const c=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`;for(let i=0;is);if(s>0){const f=i.charCodeAt(s-1),g=i.charCodeAt(d);(f===40&&g===41||f===91&&g===93||f===123&&g===125)&&d--}return{range:{startLineNumber:n,startColumn:s+1,endLineNumber:n,endColumn:d+2},url:i.substring(s,d+1)}}static computeLinks(e,i=soi()){const n=ooi(),s=[];for(let l=1,d=e.getLineCount();l<=d;l++){const f=e.getLineContent(l),g=f.length;let y=0,w=0,x=0,I=1,P=!1,O=!1,W=!1,X=!1;for(;y=0?(s+=n?1:-1,s<0?s=e.length-1:s%=e.length,e[s]):null}}Y5e.INSTANCE=new Y5e;var qgt,$gt;class loi{constructor(e,i){this.uri=e,this.value=i}}function coi(c){return Array.isArray(c)}class E_{constructor(e,i){if(this[qgt]="ResourceMap",e instanceof E_)this.map=new Map(e.map),this.toKey=i??E_.defaultToKey;else if(coi(e)){this.map=new Map,this.toKey=i??E_.defaultToKey;for(const[n,s]of e)this.set(n,s)}else this.map=new Map,this.toKey=e??E_.defaultToKey}set(e,i){return this.map.set(this.toKey(e),new loi(e,i)),this}get(e){var i;return(i=this.map.get(this.toKey(e)))===null||i===void 0?void 0:i.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,i){typeof i<"u"&&(e=e.bind(i));for(const[n,s]of this.map)e(s.value,s.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(qgt=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}E_.defaultToKey=c=>c.toString();class uoi{constructor(){this[$gt]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return(e=this._head)===null||e===void 0?void 0:e.value}get last(){var e;return(e=this._tail)===null||e===void 0?void 0:e.value}has(e){return this._map.has(e)}get(e,i=0){const n=this._map.get(e);if(n)return i!==0&&this.touch(n,i),n.value}set(e,i,n=0){let s=this._map.get(e);if(s)s.value=i,n!==0&&this.touch(s,n);else{switch(s={key:e,value:i,next:void 0,previous:void 0},n){case 0:this.addItemLast(s);break;case 1:this.addItemFirst(s);break;case 2:this.addItemLast(s);break;default:this.addItemLast(s);break}this._map.set(e,s),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const i=this._map.get(e);if(i)return this._map.delete(e),this.removeItem(i),this._size--,i.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,i){const n=this._state;let s=this._head;for(;s;){if(i?e.bind(i)(s.value,s.key,this):e(s.value,s.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");s=s.next}}keys(){const e=this,i=this._state;let n=this._head;const s={[Symbol.iterator](){return s},next(){if(e._state!==i)throw new Error("LinkedMap got modified during iteration.");if(n){const l={value:n.key,done:!1};return n=n.next,l}else return{value:void 0,done:!0}}};return s}values(){const e=this,i=this._state;let n=this._head;const s={[Symbol.iterator](){return s},next(){if(e._state!==i)throw new Error("LinkedMap got modified during iteration.");if(n){const l={value:n.value,done:!1};return n=n.next,l}else return{value:void 0,done:!0}}};return s}entries(){const e=this,i=this._state;let n=this._head;const s={[Symbol.iterator](){return s},next(){if(e._state!==i)throw new Error("LinkedMap got modified during iteration.");if(n){const l={value:[n.key,n.value],done:!1};return n=n.next,l}else return{value:void 0,done:!0}}};return s}[($gt=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let i=this._head,n=this.size;for(;i&&n>e;)this._map.delete(i.key),i=i.next,n--;this._head=i,this._size=n,i&&(i.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let i=this._tail,n=this.size;for(;i&&n>e;)this._map.delete(i.key),i=i.previous,n--;this._tail=i,this._size=n,i&&(i.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const i=e.next,n=e.previous;if(!i||!n)throw new Error("Invalid list");i.previous=n,n.next=i}e.next=void 0,e.previous=void 0,this._state++}touch(e,i){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(i!==1&&i!==2)){if(i===1){if(e===this._head)return;const n=e.next,s=e.previous;e===this._tail?(s.next=void 0,this._tail=s):(n.previous=s,s.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(i===2){if(e===this._tail)return;const n=e.next,s=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=s,s.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){const e=[];return this.forEach((i,n)=>{e.push([n,i])}),e}fromJSON(e){this.clear();for(const[i,n]of e)this.set(i,n)}}class doi extends uoi{constructor(e,i=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,i),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,i=2){return super.get(e,i)}peek(e){return super.get(e,0)}set(e,i){return super.set(e,i,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class TL extends doi{constructor(e,i=1){super(e,i)}trim(e){this.trimOld(e)}set(e,i){return super.set(e,i),this.checkTrim(),this}}class foi{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[i,n]of e)this.set(i,n)}clear(){this._m1.clear(),this._m2.clear()}set(e,i){this._m1.set(e,i),this._m2.set(i,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const i=this._m1.get(e);return i===void 0?!1:(this._m1.delete(e),this._m2.delete(i),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class $He{constructor(){this.map=new Map}add(e,i){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(i)}delete(e,i){const n=this.map.get(e);n&&(n.delete(i),n.size===0&&this.map.delete(e))}forEach(e,i){const n=this.map.get(e);n&&n.forEach(i)}get(e){const i=this.map.get(e);return i||new Set}}class hoi extends zq{constructor(e,i){super(0),this._segmenter=null,this._cachedLine=null,this._cachedSegments=[],this.intlSegmenterLocales=i,this.intlSegmenterLocales.length>0?this._segmenter=new Intl.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let n=0,s=e.length;ni)break;n=s}return n}findNextIntlWordAtOrAfterOffset(e,i){for(const n of this._getIntlSegmenterWordsOnLine(e))if(!(n.index=0;let i=null;try{i=Kbt(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch{return null}if(!i)return null;let n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new poi(i,this.wordSeparators?ak(this.wordSeparators,[]):null,n?this.searchString:null)}}function voi(c){if(!c||c.length===0)return!1;for(let e=0,i=c.length;e=i)break;const s=c.charCodeAt(e);if(s===110||s===114||s===87)return!0}}return!1}function A5(c,e,i){if(!i)return new jte(c,null);const n=[];for(let s=0,l=e.length;s>0);i[l]>=e?s=l-1:i[l+1]>=e?(n=l,s=l):n=l+1}return n+1}}class bge{static findMatches(e,i,n,s,l){const d=i.parseSearchRequest();return d?d.regex.multiline?this._doFindMatchesMultiline(e,n,new Qz(d.wordSeparators,d.regex),s,l):this._doFindMatchesLineByLine(e,n,d,s,l):[]}static _getMultilineMatchRange(e,i,n,s,l,d){let f,g=0;s?(g=s.findLineFeedCountBeforeOffset(l),f=i+l+g):f=i+l;let y;if(s){const P=s.findLineFeedCountBeforeOffset(l+d.length)-g;y=f+d.length+P}else y=f+d.length;const w=e.getPositionAt(f),x=e.getPositionAt(y);return new at(w.lineNumber,w.column,x.lineNumber,x.column)}static _doFindMatchesMultiline(e,i,n,s,l){const d=e.getOffsetAt(i.getStartPosition()),f=e.getValueInRange(i,1),g=e.getEOL()===`\r +`?new Ggt(f):null,y=[];let w=0,x;for(n.reset(0);x=n.next(f);)if(y[w++]=A5(this._getMultilineMatchRange(e,d,f,g,x.index,x[0]),x,s),w>=l)return y;return y}static _doFindMatchesLineByLine(e,i,n,s,l){const d=[];let f=0;if(i.startLineNumber===i.endLineNumber){const y=e.getLineContent(i.startLineNumber).substring(i.startColumn-1,i.endColumn-1);return f=this._findMatchesInLine(n,y,i.startLineNumber,i.startColumn-1,f,d,s,l),d}const g=e.getLineContent(i.startLineNumber).substring(i.startColumn-1);f=this._findMatchesInLine(n,g,i.startLineNumber,i.startColumn-1,f,d,s,l);for(let y=i.startLineNumber+1;y=g))return l;return l}const w=new Qz(e.wordSeparators,e.regex);let x;w.reset(0);do if(x=w.next(i),x&&(d[l++]=A5(new at(n,x.index+1+s,n,x.index+1+x[0].length+s),x,f),l>=g))return l;while(x);return l}static findNextMatch(e,i,n,s){const l=i.parseSearchRequest();if(!l)return null;const d=new Qz(l.wordSeparators,l.regex);return l.regex.multiline?this._doFindNextMatchMultiline(e,n,d,s):this._doFindNextMatchLineByLine(e,n,d,s)}static _doFindNextMatchMultiline(e,i,n,s){const l=new yi(i.lineNumber,1),d=e.getOffsetAt(l),f=e.getLineCount(),g=e.getValueInRange(new at(l.lineNumber,l.column,f,e.getLineMaxColumn(f)),1),y=e.getEOL()===`\r +`?new Ggt(g):null;n.reset(i.column-1);const w=n.next(g);return w?A5(this._getMultilineMatchRange(e,d,g,y,w.index,w[0]),w,s):i.lineNumber!==1||i.column!==1?this._doFindNextMatchMultiline(e,new yi(1,1),n,s):null}static _doFindNextMatchLineByLine(e,i,n,s){const l=e.getLineCount(),d=i.lineNumber,f=e.getLineContent(d),g=this._findFirstMatchInLine(n,f,d,i.column,s);if(g)return g;for(let y=1;y<=l;y++){const w=(d+y-1)%l,x=e.getLineContent(w+1),I=this._findFirstMatchInLine(n,x,w+1,1,s);if(I)return I}return null}static _findFirstMatchInLine(e,i,n,s,l){e.reset(s-1);const d=e.next(i);return d?A5(new at(n,d.index+1,n,d.index+1+d[0].length),d,l):null}static findPreviousMatch(e,i,n,s){const l=i.parseSearchRequest();if(!l)return null;const d=new Qz(l.wordSeparators,l.regex);return l.regex.multiline?this._doFindPreviousMatchMultiline(e,n,d,s):this._doFindPreviousMatchLineByLine(e,n,d,s)}static _doFindPreviousMatchMultiline(e,i,n,s){const l=this._doFindMatchesMultiline(e,new at(1,1,i.lineNumber,i.column),n,s,10*moi);if(l.length>0)return l[l.length-1];const d=e.getLineCount();return i.lineNumber!==d||i.column!==e.getLineMaxColumn(d)?this._doFindPreviousMatchMultiline(e,new yi(d,e.getLineMaxColumn(d)),n,s):null}static _doFindPreviousMatchLineByLine(e,i,n,s){const l=e.getLineCount(),d=i.lineNumber,f=e.getLineContent(d).substring(0,i.column-1),g=this._findLastMatchInLine(n,f,d,s);if(g)return g;for(let y=1;y<=l;y++){const w=(l+d-y-1)%l,x=e.getLineContent(w+1),I=this._findLastMatchInLine(n,x,w+1,s);if(I)return I}return null}static _findLastMatchInLine(e,i,n,s){let l=null,d;for(e.reset(0);d=e.next(i);)l=A5(new at(n,d.index+1,n,d.index+1+d[0].length),d,s);return l}}function yoi(c,e,i,n,s){if(n===0)return!0;const l=e.charCodeAt(n-1);if(c.get(l)!==0||l===13||l===10)return!0;if(s>0){const d=e.charCodeAt(n);if(c.get(d)!==0)return!0}return!1}function boi(c,e,i,n,s){if(n+s===i)return!0;const l=e.charCodeAt(n+s);if(c.get(l)!==0||l===13||l===10)return!0;if(s>0){const d=e.charCodeAt(n+s-1);if(c.get(d)!==0)return!0}return!1}function JHe(c,e,i,n,s){return yoi(c,e,i,n,s)&&boi(c,e,i,n,s)}class Qz{constructor(e,i){this._wordSeparators=e,this._searchRegex=i,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const i=e.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===i||(n=this._searchRegex.exec(e),!n))return null;const s=n.index,l=n[0].length;if(s===this._prevMatchStartIndex&&l===this._prevMatchLength){if(l===0){R0e(e,i,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=s,this._prevMatchLength=l,!this._wordSeparators||JHe(this._wordSeparators,e,i,s,l))return n}while(n);return null}}class GHe{static computeUnicodeHighlights(e,i,n){const s=n?n.startLineNumber:1,l=n?n.endLineNumber:e.getLineCount(),d=new Kgt(i),f=d.getCandidateCodePoints();let g;f==="allNonBasicAscii"?g=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):g=new RegExp(`${Coi(Array.from(f))}`,"g");const y=new Qz(null,g),w=[];let x=!1,I,P=0,O=0,W=0;e:for(let X=s,Z=l;X<=Z;X++){const ee=e.getLineContent(X),he=ee.length;y.reset(0);do if(I=y.next(ee),I){let we=I.index,Te=I.index+I[0].length;if(we>0){const Nt=ee.charCodeAt(we-1);Bg(Nt)&&we--}if(Te+1=1e3){x=!0;break e}w.push(new at(X,we+1,X,Te+1))}}while(I)}return{ranges:w,hasMore:x,ambiguousCharacterCount:P,invisibleCharacterCount:O,nonBasicAsciiCharacterCount:W}}static computeUnicodeHighlightReason(e,i){const n=new Kgt(i);switch(n.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const l=e.codePointAt(0),d=n.ambiguousCharacters.getPrimaryConfusable(l),f=m9.getLocales().filter(g=>!m9.getInstance(new Set([...i.allowedLocales,g])).isAmbiguous(l));return{kind:0,confusableWith:String.fromCodePoint(d),notAmbiguousInLocales:f}}case 1:return{kind:2}}}}function Coi(c,e){return`[${Cw(c.map(n=>String.fromCodePoint(n)).join(""))}]`}class Kgt{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=m9.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const i of oL.codePoints)Qgt(String.fromCodePoint(i))||e.add(i);if(this.options.ambiguousCharacters)for(const i of this.ambiguousCharacters.getConfusableCodePoints())e.add(i);for(const i of this.allowedCodePoints)e.delete(i);return e}shouldHighlightNonBasicASCII(e,i){const n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let s=!1,l=!1;if(i)for(const d of i){const f=d.codePointAt(0),g=mne(d);s=s||g,!g&&!this.ambiguousCharacters.isAmbiguous(f)&&!oL.isInvisibleCharacter(f)&&(l=!0)}return!s&&l?0:this.options.invisibleCharacters&&!Qgt(e)&&oL.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}}function Qgt(c){return c===" "||c===` +`||c===" "}class $me{constructor(e,i,n){this.changes=e,this.moves=i,this.hitTimeout=n}}class YCt{constructor(e,i){this.lineRangeMapping=e,this.changes=i}}class gl{static addRange(e,i){let n=0;for(;ni))return new gl(e,i)}static ofLength(e){return new gl(0,e)}static ofStartAndLength(e,i){return new gl(e,e+i)}constructor(e,i){if(this.start=e,this.endExclusive=i,e>i)throw new Yu(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new gl(this.start+e,this.endExclusive+e)}deltaStart(e){return new gl(this.start+e,this.endExclusive)}deltaEnd(e){return new gl(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new Yu(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new Yu(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let i=this.start;ie.toString()).join(", ")}intersectsStrict(e){let i=0;for(;ie+i.length,0)}}function zte(c,e){const i=Soi(c,e);if(i!==-1)return c[i]}function Soi(c,e,i=c.length-1){for(let n=i;n>=0;n--){const s=c[n];if(e(s))return n}return-1}function ZU(c,e){const i=Ute(c,e);return i===-1?void 0:c[i]}function Ute(c,e,i=0,n=c.length){let s=i,l=n;for(;s0&&(i=s)}return i}function xoi(c,e){if(c.length===0)return;let i=c[0];for(let n=1;n=0&&(i=s)}return i}function koi(c,e){return QHe(c,(i,n)=>-e(i,n))}function Toi(c,e){if(c.length===0)return-1;let i=0;for(let n=1;n0&&(i=n)}return i}function Doi(c,e){for(const i of c){const n=e(i);if(n!==void 0)return n}}let cl=class e4{static fromRangeInclusive(e){return new e4(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(e.length===0)return[];let i=new Xx(e[0].slice());for(let n=1;ni)throw new Yu(`startLineNumber ${e} cannot be after endLineNumberExclusive ${i}`);this.startLineNumber=e,this.endLineNumberExclusive=i}contains(e){return this.startLineNumber<=e&&es.endLineNumberExclusive>=e.startLineNumber),n=Ute(this._normalizedRanges,s=>s.startLineNumber<=e.endLineNumberExclusive)+1;if(i===n)this._normalizedRanges.splice(i,0,e);else if(i===n-1){const s=this._normalizedRanges[i];this._normalizedRanges[i]=s.join(e)}else{const s=this._normalizedRanges[i].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(i,n-i,s)}}contains(e){const i=ZU(this._normalizedRanges,n=>n.startLineNumber<=e);return!!i&&i.endLineNumberExclusive>e}intersects(e){const i=ZU(this._normalizedRanges,n=>n.startLineNumbere.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;const i=[];let n=0,s=0,l=null;for(;n=d.startLineNumber?l=new cl(l.startLineNumber,Math.max(l.endLineNumberExclusive,d.endLineNumberExclusive)):(i.push(l),l=d)}return l!==null&&i.push(l),new Xx(i)}subtractFrom(e){const i=qte(this._normalizedRanges,d=>d.endLineNumberExclusive>=e.startLineNumber),n=Ute(this._normalizedRanges,d=>d.startLineNumber<=e.endLineNumberExclusive)+1;if(i===n)return new Xx([e]);const s=[];let l=e.startLineNumber;for(let d=i;dl&&s.push(new cl(l,f.startLineNumber)),l=f.endLineNumberExclusive}return le.toString()).join(", ")}getIntersection(e){const i=[];let n=0,s=0;for(;ni.delta(e)))}}class Cy{static betweenPositions(e,i){return e.lineNumber===i.lineNumber?new Cy(0,i.column-e.column):new Cy(i.lineNumber-e.lineNumber,i.column-1)}static ofRange(e){return Cy.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let i=0,n=0;for(const s of e)s===` +`?(i++,n=0):n++;return new Cy(i,n)}constructor(e,i){this.lineCount=e,this.columnCount=i}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}createRange(e){return this.lineCount===0?new at(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new at(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(e){return this.lineCount===0?new yi(e.lineNumber,e.column+this.columnCount):new yi(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}}Cy.zero=new Cy(0,0);class Eoi{constructor(e){this.text=e,this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let i=0;izHe(e,(i,n)=>i.range.getEndPosition().isBeforeOrEqual(n.range.getStartPosition())))}apply(e){let i="",n=new yi(1,1);for(const l of this.edits){const d=l.range,f=d.getStartPosition(),g=d.getEndPosition(),y=Xgt(n,f);y.isEmpty()||(i+=e.getValueOfRange(y)),i+=l.text,n=g}const s=Xgt(n,e.endPositionExclusive);return s.isEmpty()||(i+=e.getValueOfRange(s)),i}applyToString(e){const i=new Ioi(e);return this.apply(i)}getNewRanges(){const e=[];let i=0,n=0,s=0;for(const l of this.edits){const d=Cy.ofText(l.text),f=yi.lift({lineNumber:l.range.startLineNumber+n,column:l.range.startColumn+(l.range.startLineNumber===i?s:0)}),g=d.createRange(f);e.push(g),n=g.endLineNumber-l.range.endLineNumber,s=g.endColumn-l.range.endColumn,i=l.range.endLineNumber}return e}}class K4{constructor(e,i){this.range=e,this.text=i}}function Xgt(c,e){if(c.lineNumber===e.lineNumber&&c.column===Number.MAX_SAFE_INTEGER)return at.fromPositions(e,e);if(!c.isBeforeOrEqual(e))throw new Yu("start must be before end");return new at(c.lineNumber,c.column,e.lineNumber,e.column)}class eSt{get endPositionExclusive(){return this.length.addToPosition(new yi(1,1))}}class Ioi extends eSt{constructor(e){super(),this.value=e,this._t=new Eoi(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}}class my{static inverse(e,i,n){const s=[];let l=1,d=1;for(const g of e){const y=new my(new cl(l,g.original.startLineNumber),new cl(d,g.modified.startLineNumber));y.modified.isEmpty||s.push(y),l=g.original.endLineNumberExclusive,d=g.modified.endLineNumberExclusive}const f=new my(new cl(l,i+1),new cl(d,n+1));return f.modified.isEmpty||s.push(f),s}static clip(e,i,n){const s=[];for(const l of e){const d=l.original.intersect(i),f=l.modified.intersect(n);d&&!d.isEmpty&&f&&!f.isEmpty&&s.push(new my(d,f))}return s}constructor(e,i){this.original=e,this.modified=i}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new my(this.modified,this.original)}join(e){return new my(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),i=this.modified.toInclusiveRange();if(e&&i)return new bE(e,i);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new Yu("not a valid diff");return new bE(new at(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new at(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new bE(new at(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new at(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}}class bw extends my{static fromRangeMappings(e){const i=cl.join(e.map(s=>cl.fromRangeInclusive(s.originalRange))),n=cl.join(e.map(s=>cl.fromRangeInclusive(s.modifiedRange)));return new bw(i,n,e)}constructor(e,i,n){super(e,i),this.innerChanges=n}flip(){var e;return new bw(this.modified,this.original,(e=this.innerChanges)===null||e===void 0?void 0:e.map(i=>i.flip()))}withInnerChangesFromLineRanges(){return new bw(this.original,this.modified,[this.toRangeMapping()])}}class bE{constructor(e,i){this.originalRange=e,this.modifiedRange=i}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new bE(this.modifiedRange,this.originalRange)}toTextEdit(e){const i=e.getValueOfRange(this.modifiedRange);return new K4(this.originalRange,i)}}const Noi=3;class Loi{computeDiff(e,i,n){var s;const d=new Ooi(e,i,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),f=[];let g=null;for(const y of d.changes){let w;y.originalEndLineNumber===0?w=new cl(y.originalStartLineNumber+1,y.originalStartLineNumber+1):w=new cl(y.originalStartLineNumber,y.originalEndLineNumber+1);let x;y.modifiedEndLineNumber===0?x=new cl(y.modifiedStartLineNumber+1,y.modifiedStartLineNumber+1):x=new cl(y.modifiedStartLineNumber,y.modifiedEndLineNumber+1);let I=new bw(w,x,(s=y.charChanges)===null||s===void 0?void 0:s.map(P=>new bE(new at(P.originalStartLineNumber,P.originalStartColumn,P.originalEndLineNumber,P.originalEndColumn),new at(P.modifiedStartLineNumber,P.modifiedStartColumn,P.modifiedEndLineNumber,P.modifiedEndColumn))));g&&(g.modified.endLineNumberExclusive===I.modified.startLineNumber||g.original.endLineNumberExclusive===I.original.startLineNumber)&&(I=new bw(g.original.join(I.original),g.modified.join(I.modified),g.innerChanges&&I.innerChanges?g.innerChanges.concat(I.innerChanges):void 0),f.pop()),f.push(I),g=I}return C9(()=>zHe(f,(y,w)=>w.original.startLineNumber-y.original.endLineNumberExclusive===w.modified.startLineNumber-y.modified.endLineNumberExclusive&&y.original.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[i]},${this._columns[i]})`).join(", ")+"]"}_assertIndex(e,i){if(e<0||e>=i.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}}class xU{constructor(e,i,n,s,l,d,f,g){this.originalStartLineNumber=e,this.originalStartColumn=i,this.originalEndLineNumber=n,this.originalEndColumn=s,this.modifiedStartLineNumber=l,this.modifiedStartColumn=d,this.modifiedEndLineNumber=f,this.modifiedEndColumn=g}static createFromDiffChange(e,i,n){const s=i.getStartLineNumber(e.originalStart),l=i.getStartColumn(e.originalStart),d=i.getEndLineNumber(e.originalStart+e.originalLength-1),f=i.getEndColumn(e.originalStart+e.originalLength-1),g=n.getStartLineNumber(e.modifiedStart),y=n.getStartColumn(e.modifiedStart),w=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),x=n.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new xU(s,l,d,f,g,y,w,x)}}function Aoi(c){if(c.length<=1)return c;const e=[c[0]];let i=e[0];for(let n=1,s=c.length;n0&&i.originalLength<20&&i.modifiedLength>0&&i.modifiedLength<20&&l()){const P=n.createCharSequence(e,i.originalStart,i.originalStart+i.originalLength-1),O=s.createCharSequence(e,i.modifiedStart,i.modifiedStart+i.modifiedLength-1);if(P.getElements().length>0&&O.getElements().length>0){let W=tSt(P,O,l,!0).changes;f&&(W=Aoi(W)),I=[];for(let X=0,Z=W.length;X1&&W>1;){const X=I.charCodeAt(O-2),Z=P.charCodeAt(W-2);if(X!==Z)break;O--,W--}(O>1||W>1)&&this._pushTrimWhitespaceCharChange(s,l+1,1,O,d+1,1,W)}{let O=t9e(I,1),W=t9e(P,1);const X=I.length+1,Z=P.length+1;for(;O!0;const e=Date.now();return()=>Date.now()-e{n.push(Fg.fromOffsetPairs(s?s.getEndExclusives():Yx.zero,l?l.getStarts():new Yx(i,(s?s.seq2Range.endExclusive-s.seq1Range.endExclusive:0)+i)))}),n}static fromOffsetPairs(e,i){return new Fg(new gl(e.offset1,i.offset1),new gl(e.offset2,i.offset2))}constructor(e,i){this.seq1Range=e,this.seq2Range=i}swap(){return new Fg(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new Fg(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new Fg(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new Fg(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new Fg(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const i=this.seq1Range.intersect(e.seq1Range),n=this.seq2Range.intersect(e.seq2Range);if(!(!i||!n))return new Fg(i,n)}getStarts(){return new Yx(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new Yx(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class Yx{constructor(e,i){this.offset1=e,this.offset2=i}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return e===0?this:new Yx(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}}Yx.zero=new Yx(0,0);Yx.max=new Yx(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);class $te{isValid(){return!0}}$te.instance=new $te;class Moi{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new Yu("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime0&&W>0&&d.get(O-1,W-1)===3&&(ee+=f.get(O-1,W-1)),ee+=s?s(O,W):1):ee=-1;const he=Math.max(X,Z,ee);if(he===ee){const we=O>0&&W>0?f.get(O-1,W-1):0;f.set(O,W,we+1),d.set(O,W,3)}else he===X?(f.set(O,W,0),d.set(O,W,1)):he===Z&&(f.set(O,W,0),d.set(O,W,2));l.set(O,W,he)}const g=[];let y=e.length,w=i.length;function x(O,W){(O+1!==y||W+1!==w)&&g.push(new Fg(new gl(O+1,y),new gl(W+1,w))),y=O,w=W}let I=e.length-1,P=i.length-1;for(;I>=0&&P>=0;)d.get(I,P)===3?(x(I,P),I--,P--):d.get(I,P)===1?I--:P--;return x(-1,-1),g.reverse(),new F4(g,!1)}}class iSt{compute(e,i,n=$te.instance){if(e.length===0||i.length===0)return F4.trivial(e,i);const s=e,l=i;function d(W,X){for(;Ws.length||we>l.length)continue;const Te=d(he,we);g.set(w,Te);const Be=he===Z?y.get(w+1):y.get(w-1);if(y.set(w,Te!==he?new emt(Be,he,we,Te-he):Be),g.get(w)===s.length&&g.get(w)-w===l.length)break e}}let x=y.get(w);const I=[];let P=s.length,O=l.length;for(;;){const W=x?x.x+x.length:0,X=x?x.y+x.length:0;if((W!==P||X!==O)&&I.push(new Fg(new gl(W,P),new gl(X,O))),!x)break;P=x.x,O=x.y,x=x.prev}return I.reverse(),new F4(I,!1)}}class emt{constructor(e,i,n,s){this.prev=e,this.x=i,this.y=n,this.length=s}}class Foi{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,i){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const n=this.negativeArr;this.negativeArr=new Int32Array(n.length*2),this.negativeArr.set(n)}this.negativeArr[e]=i}else{if(e>=this.positiveArr.length){const n=this.positiveArr;this.positiveArr=new Int32Array(n.length*2),this.positiveArr.set(n)}this.positiveArr[e]=i}}}class Boi{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,i){e<0?(e=-e-1,this.negativeArr[e]=i):this.positiveArr[e]=i}}class G0e{constructor(e,i,n){this.lines=e,this.considerWhitespaceChanges=n,this.elements=[],this.firstCharOffsetByLine=[],this.additionalOffsetByLine=[];let s=!1;i.start>0&&i.endExclusive>=e.length&&(i=new gl(i.start-1,i.endExclusive),s=!0),this.lineRange=i,this.firstCharOffsetByLine[0]=0;for(let l=this.lineRange.start;lString.fromCharCode(i)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const i=imt(e>0?this.elements[e-1]:-1),n=imt(en<=e);return new yi(this.lineRange.start+i+1,e-this.firstCharOffsetByLine[i]+this.additionalOffsetByLine[i]+1)}translateRange(e){return at.fromPositions(this.translateOffset(e.start),this.translateOffset(e.endExclusive))}findWordContaining(e){if(e<0||e>=this.elements.length||!X8e(this.elements[e]))return;let i=e;for(;i>0&&X8e(this.elements[i-1]);)i--;let n=e;for(;nd<=e.start))!==null&&i!==void 0?i:0,l=(n=woi(this.firstCharOffsetByLine,d=>e.endExclusive<=d))!==null&&n!==void 0?n:this.elements.length;return new gl(s,l)}}function X8e(c){return c>=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57}const Woi={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function tmt(c){return Woi[c]}function imt(c){return c===10?8:c===13?7:i9e(c)?6:c>=97&&c<=122?0:c>=65&&c<=90?1:c>=48&&c<=57?2:c===-1?3:c===44||c===59?5:4}function Voi(c,e,i,n,s,l){let{moves:d,excludedChanges:f}=joi(c,e,i,l);if(!l.isValid())return[];const g=c.filter(w=>!f.has(w)),y=zoi(g,n,s,e,i,l);return PFe(d,y),d=Uoi(d),d=d.filter(w=>{const x=w.original.toOffsetRange().slice(e).map(P=>P.trim());return x.join(` +`).length>=15&&Hoi(x,P=>P.length>=2)>=2}),d=qoi(c,d),d}function Hoi(c,e){let i=0;for(const n of c)e(n)&&i++;return i}function joi(c,e,i,n){const s=[],l=c.filter(g=>g.modified.isEmpty&&g.original.length>=3).map(g=>new YU(g.original,e,g)),d=new Set(c.filter(g=>g.original.isEmpty&&g.modified.length>=3).map(g=>new YU(g.modified,i,g))),f=new Set;for(const g of l){let y=-1,w;for(const x of d){const I=g.computeSimilarity(x);I>y&&(y=I,w=x)}if(y>.9&&w&&(d.delete(w),s.push(new my(g.range,w.range)),f.add(g.source),f.add(w.source)),!n.isValid())return{moves:s,excludedChanges:f}}return{moves:s,excludedChanges:f}}function zoi(c,e,i,n,s,l){const d=[],f=new $He;for(const I of c)for(let P=I.original.startLineNumber;PI.modified.startLineNumber,uT));for(const I of c){let P=[];for(let O=I.modified.startLineNumber;O{for(const we of P)if(we.originalLineRange.endLineNumberExclusive+1===ee.endLineNumberExclusive&&we.modifiedLineRange.endLineNumberExclusive+1===X.endLineNumberExclusive){we.originalLineRange=new cl(we.originalLineRange.startLineNumber,ee.endLineNumberExclusive),we.modifiedLineRange=new cl(we.modifiedLineRange.startLineNumber,X.endLineNumberExclusive),Z.push(we);return}const he={modifiedLineRange:X,originalLineRange:ee};g.push(he),Z.push(he)}),P=Z}if(!l.isValid())return[]}g.sort(gbt(kb(I=>I.modifiedLineRange.length,uT)));const y=new Xx,w=new Xx;for(const I of g){const P=I.modifiedLineRange.startLineNumber-I.originalLineRange.startLineNumber,O=y.subtractFrom(I.modifiedLineRange),W=w.subtractFrom(I.originalLineRange).getWithDelta(P),X=O.getIntersection(W);for(const Z of X.ranges){if(Z.length<3)continue;const ee=Z,he=Z.delta(-P);d.push(new my(he,ee)),y.addRange(ee),w.addRange(he)}}d.sort(kb(I=>I.original.startLineNumber,uT));const x=new wne(c);for(let I=0;IBe.original.startLineNumber<=P.original.startLineNumber),W=ZU(c,Be=>Be.modified.startLineNumber<=P.modified.startLineNumber),X=Math.max(P.original.startLineNumber-O.original.startLineNumber,P.modified.startLineNumber-W.modified.startLineNumber),Z=x.findLastMonotonous(Be=>Be.original.startLineNumberBe.modified.startLineNumbern.length||Me>s.length||y.contains(Me)||w.contains(Be)||!nmt(n[Be-1],s[Me-1],l))break}we>0&&(w.addRange(new cl(P.original.startLineNumber-we,P.original.startLineNumber)),y.addRange(new cl(P.modified.startLineNumber-we,P.modified.startLineNumber)));let Te;for(Te=0;Ten.length||Me>s.length||y.contains(Me)||w.contains(Be)||!nmt(n[Be-1],s[Me-1],l))break}Te>0&&(w.addRange(new cl(P.original.endLineNumberExclusive,P.original.endLineNumberExclusive+Te)),y.addRange(new cl(P.modified.endLineNumberExclusive,P.modified.endLineNumberExclusive+Te))),(we>0||Te>0)&&(d[I]=new my(new cl(P.original.startLineNumber-we,P.original.endLineNumberExclusive+Te),new cl(P.modified.startLineNumber-we,P.modified.endLineNumberExclusive+Te)))}return d}function nmt(c,e,i){if(c.trim()===e.trim())return!0;if(c.length>300&&e.length>300)return!1;const s=new iSt().compute(new G0e([c],new gl(0,1),!1),new G0e([e],new gl(0,1),!1),i);let l=0;const d=Fg.invert(s.diffs,c.length);for(const w of d)w.seq1Range.forEach(x=>{i9e(c.charCodeAt(x))||l++});function f(w){let x=0;for(let I=0;Ie.length?c:e);return l/g>.6&&g>10}function Uoi(c){if(c.length===0)return c;c.sort(kb(i=>i.original.startLineNumber,uT));const e=[c[0]];for(let i=1;i=0&&d>=0&&l+d<=2){e[e.length-1]=n.join(s);continue}e.push(s)}return e}function qoi(c,e){const i=new wne(c);return e=e.filter(n=>{const s=i.findLastMonotonous(f=>f.original.startLineNumberf.modified.startLineNumber0&&(f=f.delta(y))}s.push(f)}return n.length>0&&s.push(n[n.length-1]),s}function $oi(c,e,i){if(!c.getBoundaryScore||!e.getBoundaryScore)return i;for(let n=0;n0?i[n-1]:void 0,l=i[n],d=n+1=n.start&&c.seq2Range.start-d>=s.start&&i.isStronglyEqual(c.seq2Range.start-d,c.seq2Range.endExclusive-d)&&d<100;)d++;d--;let f=0;for(;c.seq1Range.start+fy&&(y=O,g=w)}return c.delta(g)}function Joi(c,e,i){const n=[];for(const s of i){const l=n[n.length-1];if(!l){n.push(s);continue}s.seq1Range.start-l.seq1Range.endExclusive<=2||s.seq2Range.start-l.seq2Range.endExclusive<=2?n[n.length-1]=new Fg(l.seq1Range.join(s.seq1Range),l.seq2Range.join(s.seq2Range)):n.push(s)}return n}function Goi(c,e,i){const n=Fg.invert(i,c.length),s=[];let l=new Yx(0,0);function d(g,y){if(g.offset10;){const X=n[0];if(!(X.seq1Range.intersects(I.seq1Range)||X.seq2Range.intersects(I.seq2Range)))break;const ee=c.findWordContaining(X.seq1Range.start),he=e.findWordContaining(X.seq2Range.start),we=new Fg(ee,he),Te=we.intersect(X);if(O+=Te.seq1Range.length,W+=Te.seq2Range.length,I=I.join(we),I.seq1Range.endExclusive>=X.seq1Range.endExclusive)n.shift();else break}O+W<(I.seq1Range.length+I.seq2Range.length)*2/3&&s.push(I),l=I.getEndExclusives()}for(;n.length>0;){const g=n.shift();g.seq1Range.isEmpty||(d(g.getStarts(),g),d(g.getEndExclusives().delta(-1),g))}return Koi(i,s)}function Koi(c,e){const i=[];for(;c.length>0||e.length>0;){const n=c[0],s=e[0];let l;n&&(!s||n.seq1Range.start0&&i[i.length-1].seq1Range.endExclusive>=l.seq1Range.start?i[i.length-1]=i[i.length-1].join(l):i.push(l)}return i}function Qoi(c,e,i){let n=i;if(n.length===0)return n;let s=0,l;do{l=!1;const d=[n[0]];for(let f=1;f5||P.seq1Range.length+P.seq2Range.length>5)};const g=n[f],y=d[d.length-1];w(y,g)?(l=!0,d[d.length-1]=d[d.length-1].join(g)):d.push(g)}n=d}while(s++<10&&l);return n}function Xoi(c,e,i){let n=i;if(n.length===0)return n;let s=0,l;do{l=!1;const f=[n[0]];for(let g=1;g5||W.length>500)return!1;const Z=c.getText(W).trim();if(Z.length>20||Z.split(/\r\n|\r|\n/).length>1)return!1;const ee=c.countLinesIn(P.seq1Range),he=P.seq1Range.length,we=e.countLinesIn(P.seq2Range),Te=P.seq2Range.length,Be=c.countLinesIn(O.seq1Range),Me=O.seq1Range.length,vt=e.countLinesIn(O.seq2Range),Nt=O.seq2Range.length,Ni=2*40+50;function ci(Mt){return Math.min(Mt,Ni)}return Math.pow(Math.pow(ci(ee*40+he),1.5)+Math.pow(ci(we*40+Te),1.5),1.5)+Math.pow(Math.pow(ci(Be*40+Me),1.5)+Math.pow(ci(vt*40+Nt),1.5),1.5)>(Ni**1.5)**1.5*1.3};const y=n[g],w=f[f.length-1];x(w,y)?(l=!0,f[f.length-1]=f[f.length-1].join(y)):f.push(y)}n=f}while(s++<10&&l);const d=[];return Uei(n,(f,g,y)=>{let w=g;function x(Z){return Z.length>0&&Z.trim().length<=3&&g.seq1Range.length+g.seq2Range.length>100}const I=c.extendToFullLines(g.seq1Range),P=c.getText(new gl(I.start,g.seq1Range.start));x(P)&&(w=w.deltaStart(-P.length));const O=c.getText(new gl(g.seq1Range.endExclusive,I.endExclusive));x(O)&&(w=w.deltaEnd(O.length));const W=Fg.fromOffsetPairs(f?f.getEndExclusives():Yx.zero,y?y.getStarts():Yx.max),X=w.intersect(W);d.length>0&&X.getStarts().equals(d[d.length-1].getEndExclusives())?d[d.length-1]=d[d.length-1].join(X):d.push(X)}),d}class omt{constructor(e,i){this.trimmedHash=e,this.lines=i}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const i=e===0?0:amt(this.lines[e-1]),n=e===this.lines.length?0:amt(this.lines[e]);return 1e3-(i+n)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` +`)}isStronglyEqual(e,i){return this.lines[e]===this.lines[i]}}function amt(c){let e=0;for(;eTe===Be))return new $me([],[],!1);if(e.length===1&&e[0].length===0||i.length===1&&i[0].length===0)return new $me([new bw(new cl(1,e.length+1),new cl(1,i.length+1),[new bE(new at(1,1,e.length,e[e.length-1].length+1),new at(1,1,i.length,i[i.length-1].length+1))])],[],!1);const s=n.maxComputationTimeMs===0?$te.instance:new Moi(n.maxComputationTimeMs),l=!n.ignoreTrimWhitespace,d=new Map;function f(Te){let Be=d.get(Te);return Be===void 0&&(Be=d.size,d.set(Te,Be)),Be}const g=e.map(Te=>f(Te.trim())),y=i.map(Te=>f(Te.trim())),w=new omt(g,e),x=new omt(y,i),I=w.length+x.length<1700?this.dynamicProgrammingDiffing.compute(w,x,s,(Te,Be)=>e[Te]===i[Be]?i[Be].length===0?.1:1+Math.log(1+i[Be].length):.99):this.myersDiffingAlgorithm.compute(w,x,s);let P=I.diffs,O=I.hitTimeout;P=n9e(w,x,P),P=Qoi(w,x,P);const W=[],X=Te=>{if(l)for(let Be=0;BeTe.seq1Range.start-Z===Te.seq2Range.start-ee);const Be=Te.seq1Range.start-Z;X(Be),Z=Te.seq1Range.endExclusive,ee=Te.seq2Range.endExclusive;const Me=this.refineDiff(e,i,Te,s,l);Me.hitTimeout&&(O=!0);for(const vt of Me.mappings)W.push(vt)}X(e.length-Z);const he=lmt(W,e,i);let we=[];return n.computeMoves&&(we=this.computeMoves(he,e,i,g,y,s,l)),C9(()=>{function Te(Me,vt){if(Me.lineNumber<1||Me.lineNumber>vt.length)return!1;const Nt=vt[Me.lineNumber-1];return!(Me.column<1||Me.column>Nt.length+1)}function Be(Me,vt){return!(Me.startLineNumber<1||Me.startLineNumber>vt.length+1||Me.endLineNumberExclusive<1||Me.endLineNumberExclusive>vt.length+1)}for(const Me of he){if(!Me.innerChanges)return!1;for(const vt of Me.innerChanges)if(!(Te(vt.modifiedRange.getStartPosition(),i)&&Te(vt.modifiedRange.getEndPosition(),i)&&Te(vt.originalRange.getStartPosition(),e)&&Te(vt.originalRange.getEndPosition(),e)))return!1;if(!Be(Me.modified,i)||!Be(Me.original,e))return!1}return!0}),new $me(he,we,O)}computeMoves(e,i,n,s,l,d,f){return Voi(e,i,n,s,l,d).map(w=>{const x=this.refineDiff(i,n,new Fg(w.original.toOffsetRange(),w.modified.toOffsetRange()),d,f),I=lmt(x.mappings,i,n,!0);return new YCt(w,I)})}refineDiff(e,i,n,s,l){const d=new G0e(e,n.seq1Range,l),f=new G0e(i,n.seq2Range,l),g=d.length+f.length<500?this.dynamicProgrammingDiffing.compute(d,f,s):this.myersDiffingAlgorithm.compute(d,f,s);let y=g.diffs;return y=n9e(d,f,y),y=Goi(d,f,y),y=Joi(d,f,y),y=Xoi(d,f,y),{mappings:y.map(x=>new bE(d.translateRange(x.seq1Range),f.translateRange(x.seq2Range))),hitTimeout:g.hitTimeout}}}function lmt(c,e,i,n=!1){const s=[];for(const l of dHe(c.map(d=>Zoi(d,e,i)),(d,f)=>d.original.overlapOrTouch(f.original)||d.modified.overlapOrTouch(f.modified))){const d=l[0],f=l[l.length-1];s.push(new bw(d.original.join(f.original),d.modified.join(f.modified),l.map(g=>g.innerChanges[0])))}return C9(()=>!n&&s.length>0&&(s[0].modified.startLineNumber!==s[0].original.startLineNumber||i.length-s[s.length-1].modified.endLineNumberExclusive!==e.length-s[s.length-1].original.endLineNumberExclusive)?!1:zHe(s,(l,d)=>d.original.startLineNumber-l.original.endLineNumberExclusive===d.modified.startLineNumber-l.modified.endLineNumberExclusive&&l.original.endLineNumberExclusive=i[c.modifiedRange.startLineNumber-1].length&&c.originalRange.startColumn-1>=e[c.originalRange.startLineNumber-1].length&&c.originalRange.startLineNumber<=c.originalRange.endLineNumber+s&&c.modifiedRange.startLineNumber<=c.modifiedRange.endLineNumber+s&&(n=1);const l=new cl(c.originalRange.startLineNumber+n,c.originalRange.endLineNumber+1+s),d=new cl(c.modifiedRange.startLineNumber+n,c.modifiedRange.endLineNumber+1+s);return new bw(l,d,[c])}const cmt={getLegacy:()=>new Loi,getDefault:()=>new nSt};function WM(c,e){const i=Math.pow(10,e);return Math.round(c*i)/i}class bc{constructor(e,i,n,s=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,i))|0,this.b=Math.min(255,Math.max(0,n))|0,this.a=WM(Math.max(Math.min(1,s),0),3)}static equals(e,i){return e.r===i.r&&e.g===i.g&&e.b===i.b&&e.a===i.a}}class iT{constructor(e,i,n,s){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=WM(Math.max(Math.min(1,i),0),3),this.l=WM(Math.max(Math.min(1,n),0),3),this.a=WM(Math.max(Math.min(1,s),0),3)}static equals(e,i){return e.h===i.h&&e.s===i.s&&e.l===i.l&&e.a===i.a}static fromRGBA(e){const i=e.r/255,n=e.g/255,s=e.b/255,l=e.a,d=Math.max(i,n,s),f=Math.min(i,n,s);let g=0,y=0;const w=(f+d)/2,x=d-f;if(x>0){switch(y=Math.min(w<=.5?x/(2*w):x/(2-2*w),1),d){case i:g=(n-s)/x+(n1&&(n-=1),n<1/6?e+(i-e)*6*n:n<1/2?i:n<2/3?e+(i-e)*(2/3-n)*6:e}static toRGBA(e){const i=e.h/360,{s:n,l:s,a:l}=e;let d,f,g;if(n===0)d=f=g=s;else{const y=s<.5?s*(1+n):s+n-s*n,w=2*s-y;d=iT._hue2rgb(w,y,i+1/3),f=iT._hue2rgb(w,y,i),g=iT._hue2rgb(w,y,i-1/3)}return new bc(Math.round(d*255),Math.round(f*255),Math.round(g*255),l)}}class QN{constructor(e,i,n,s){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=WM(Math.max(Math.min(1,i),0),3),this.v=WM(Math.max(Math.min(1,n),0),3),this.a=WM(Math.max(Math.min(1,s),0),3)}static equals(e,i){return e.h===i.h&&e.s===i.s&&e.v===i.v&&e.a===i.a}static fromRGBA(e){const i=e.r/255,n=e.g/255,s=e.b/255,l=Math.max(i,n,s),d=Math.min(i,n,s),f=l-d,g=l===0?0:f/l;let y;return f===0?y=0:l===i?y=((n-s)/f%6+6)%6:l===n?y=(s-i)/f+2:y=(i-n)/f+4,new QN(Math.round(y*60),g,l,e.a)}static toRGBA(e){const{h:i,s:n,v:s,a:l}=e,d=s*n,f=d*(1-Math.abs(i/60%2-1)),g=s-d;let[y,w,x]=[0,0,0];return i<60?(y=d,w=f):i<120?(y=f,w=d):i<180?(w=d,x=f):i<240?(w=f,x=d):i<300?(y=f,x=d):i<=360&&(y=d,x=f),y=Math.round((y+g)*255),w=Math.round((w+g)*255),x=Math.round((x+g)*255),new bc(y,w,x,l)}}class Qi{static fromHex(e){return Qi.Format.CSS.parseHex(e)||Qi.red}static equals(e,i){return!e&&!i?!0:!e||!i?!1:e.equals(i)}get hsla(){return this._hsla?this._hsla:iT.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:QN.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof bc)this.rgba=e;else if(e instanceof iT)this._hsla=e,this.rgba=iT.toRGBA(e);else if(e instanceof QN)this._hsva=e,this.rgba=QN.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&bc.equals(this.rgba,e.rgba)&&iT.equals(this.hsla,e.hsla)&&QN.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=Qi._relativeLuminanceForComponent(this.rgba.r),i=Qi._relativeLuminanceForComponent(this.rgba.g),n=Qi._relativeLuminanceForComponent(this.rgba.b),s=.2126*e+.7152*i+.0722*n;return WM(s,4)}static _relativeLuminanceForComponent(e){const i=e/255;return i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const i=this.getRelativeLuminance(),n=e.getRelativeLuminance();return i>n}isDarkerThan(e){const i=this.getRelativeLuminance(),n=e.getRelativeLuminance();return i0)for(const s of n){const l=s.filter(y=>y!==void 0),d=l[1],f=l[2];if(!f)continue;let g;if(d==="rgb"){const y=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;g=umt(QY(c,s),XY(f,y),!1)}else if(d==="rgba"){const y=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;g=umt(QY(c,s),XY(f,y),!0)}else if(d==="hsl"){const y=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;g=dmt(QY(c,s),XY(f,y),!1)}else if(d==="hsla"){const y=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;g=dmt(QY(c,s),XY(f,y),!0)}else d==="#"&&(g=Yoi(QY(c,s),d+f));g&&e.push(g)}return e}function tai(c){return!c||typeof c.getValue!="function"||typeof c.positionAt!="function"?[]:eai(c)}const fmt=new RegExp("\\bMARK:\\s*(.*)$","d"),iai=/^-+|-+$/g;function nai(c,e){var i;let n=[];if(e.findRegionSectionHeaders&&(!((i=e.foldingRules)===null||i===void 0)&&i.markers)){const s=rai(c,e);n=n.concat(s)}if(e.findMarkSectionHeaders){const s=sai(c);n=n.concat(s)}return n}function rai(c,e){const i=[],n=c.getLineCount();for(let s=1;s<=n;s++){const l=c.getLineContent(s),d=l.match(e.foldingRules.markers.start);if(d){const f={startLineNumber:s,startColumn:d[0].length+1,endLineNumber:s,endColumn:l.length+1};if(f.endColumn>f.startColumn){const g={range:f,...sSt(l.substring(d[0].length)),shouldBeInComments:!1};(g.text||g.hasSeparatorLine)&&i.push(g)}}}return i}function sai(c){const e=[],i=c.getLineCount();for(let n=1;n<=i;n++){const s=c.getLineContent(n);oai(s,n,e)}return e}function oai(c,e,i){fmt.lastIndex=0;const n=fmt.exec(c);if(n){const s=n.indices[1][0]+1,l=n.indices[1][1]+1,d={startLineNumber:e,startColumn:s,endLineNumber:e,endColumn:l};if(d.endColumn>d.startColumn){const f={range:d,...sSt(n[1]),shouldBeInComments:!0};(f.text||f.hasSeparatorLine)&&i.push(f)}}}function sSt(c){c=c.trim();const e=c.startsWith("-");return c=c.replace(iai,""),{text:c,hasSeparatorLine:e}}class aai extends ioi{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const i=[];for(let n=0;nthis._lines.length)i=this._lines.length,n=this._lines[i-1].length+1,s=!0;else{const l=this._lines[i-1].length+1;n<1?(n=1,s=!0):n>l&&(n=l,s=!0)}return s?{lineNumber:i,column:n}:e}}class VM{constructor(e,i){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=i,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){const e=[];return Object.keys(this._models).forEach(i=>e.push(this._models[i])),e}acceptNewModel(e){this._models[e.url]=new aai(Oo.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,i){if(!this._models[e])return;this._models[e].onEvents(i)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}async computeUnicodeHighlights(e,i,n){const s=this._getModel(e);return s?GHe.computeUnicodeHighlights(s,i,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async findSectionHeaders(e,i){const n=this._getModel(e);return n?nai(n,i):[]}async computeDiff(e,i,n,s){const l=this._getModel(e),d=this._getModel(i);return!l||!d?null:VM.computeDiff(l,d,n,s)}static computeDiff(e,i,n,s){const l=s==="advanced"?cmt.getDefault():cmt.getLegacy(),d=e.getLinesContent(),f=i.getLinesContent(),g=l.computeDiff(d,f,n),y=g.changes.length>0?!1:this._modelsAreIdentical(e,i);function w(x){return x.map(I=>{var P;return[I.original.startLineNumber,I.original.endLineNumberExclusive,I.modified.startLineNumber,I.modified.endLineNumberExclusive,(P=I.innerChanges)===null||P===void 0?void 0:P.map(O=>[O.originalRange.startLineNumber,O.originalRange.startColumn,O.originalRange.endLineNumber,O.originalRange.endColumn,O.modifiedRange.startLineNumber,O.modifiedRange.startColumn,O.modifiedRange.endLineNumber,O.modifiedRange.endColumn])]})}return{identical:y,quitEarly:g.hitTimeout,changes:w(g.changes),moves:g.moves.map(x=>[x.lineRangeMapping.original.startLineNumber,x.lineRangeMapping.original.endLineNumberExclusive,x.lineRangeMapping.modified.startLineNumber,x.lineRangeMapping.modified.endLineNumberExclusive,w(x.changes)])}}static _modelsAreIdentical(e,i){const n=e.getLineCount(),s=i.getLineCount();if(n!==s)return!1;for(let l=1;l<=n;l++){const d=e.getLineContent(l),f=i.getLineContent(l);if(d!==f)return!1}return!0}async computeMoreMinimalEdits(e,i,n){const s=this._getModel(e);if(!s)return i;const l=[];let d;i=i.slice(0).sort((g,y)=>{if(g.range&&y.range)return at.compareRangesUsingStarts(g.range,y.range);const w=g.range?0:1,x=y.range?0:1;return w-x});let f=0;for(let g=1;gVM._diffLimit){l.push({range:g,text:y});continue}const I=Ysi(x,y,n),P=s.offsetAt(at.lift(g).getStartPosition());for(const O of I){const W=s.positionAt(P+O.originalStart),X=s.positionAt(P+O.originalStart+O.originalLength),Z={text:y.substr(O.modifiedStart,O.modifiedLength),range:{startLineNumber:W.lineNumber,startColumn:W.column,endLineNumber:X.lineNumber,endColumn:X.column}};s.getValueInRange(Z.range)!==Z.text&&l.push(Z)}}return typeof d=="number"&&l.push({eol:d,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),l}async computeLinks(e){const i=this._getModel(e);return i?aoi(i):null}async computeDefaultDocumentColors(e){const i=this._getModel(e);return i?tai(i):null}async textualSuggest(e,i,n,s){const l=new o0,d=new RegExp(n,s),f=new Set;e:for(const g of e){const y=this._getModel(g);if(y){for(const w of y.words(d))if(!(w===i||!isNaN(Number(w)))&&(f.add(w),f.size>VM._suggestionsLimit))break e}}return{words:Array.from(f),duration:l.elapsed()}}async computeWordRanges(e,i,n,s){const l=this._getModel(e);if(!l)return Object.create(null);const d=new RegExp(n,s),f=Object.create(null);for(let g=i.startLineNumber;gthis._host.fhr(f,g)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(d,i),Promise.resolve(_He(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,i){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,i))}catch(n){return Promise.reject(n)}}}VM._diffLimit=1e5;VM._suggestionsLimit=1e4;typeof importScripts=="function"&&(globalThis.monaco=qbt());const YHe=Kl("textResourceConfigurationService"),oSt=Kl("textResourcePropertiesService"),js=Kl("ILanguageFeaturesService");var lai=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},ZY=function(c,e){return function(i,n){e(i,n,c)}};const hmt=60*1e3,_mt=5*60*1e3;function O5(c,e){const i=c.getModel(e);return!(!i||i.isTooLargeForSyncing())}let r9e=class extends Ii{constructor(e,i,n,s,l){super(),this._modelService=e,this._workerManager=this._register(new uai(this._modelService,s)),this._logService=n,this._register(l.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(d,f)=>O5(this._modelService,d.uri)?this._workerManager.withWorker().then(g=>g.computeLinks(d.uri)).then(g=>g&&{links:g}):Promise.resolve({links:[]})})),this._register(l.completionProvider.register("*",new cai(this._workerManager,i,this._modelService,s)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return O5(this._modelService,e)}computedUnicodeHighlights(e,i,n){return this._workerManager.withWorker().then(s=>s.computedUnicodeHighlights(e,i,n))}async computeDiff(e,i,n,s){const l=await this._workerManager.withWorker().then(g=>g.computeDiff(e,i,n,s));if(!l)return null;return{identical:l.identical,quitEarly:l.quitEarly,changes:f(l.changes),moves:l.moves.map(g=>new YCt(new my(new cl(g[0],g[1]),new cl(g[2],g[3])),f(g[4])))};function f(g){return g.map(y=>{var w;return new bw(new cl(y[0],y[1]),new cl(y[2],y[3]),(w=y[4])===null||w===void 0?void 0:w.map(x=>new bE(new at(x[0],x[1],x[2],x[3]),new at(x[4],x[5],x[6],x[7]))))})}}computeMoreMinimalEdits(e,i,n=!1){if(bv(i)){if(!O5(this._modelService,e))return Promise.resolve(i);const s=o0.create(),l=this._workerManager.withWorker().then(d=>d.computeMoreMinimalEdits(e,i,n));return l.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),s.elapsed())),Promise.race([l,J4(1e3).then(()=>i)])}else return Promise.resolve(void 0)}canNavigateValueSet(e){return O5(this._modelService,e)}navigateValueSet(e,i,n){return this._workerManager.withWorker().then(s=>s.navigateValueSet(e,i,n))}canComputeWordRanges(e){return O5(this._modelService,e)}computeWordRanges(e,i){return this._workerManager.withWorker().then(n=>n.computeWordRanges(e,i))}findSectionHeaders(e,i){return this._workerManager.withWorker().then(n=>n.findSectionHeaders(e,i))}};r9e=lai([ZY(0,Qf),ZY(1,YHe),ZY(2,Sv),ZY(3,Kd),ZY(4,js)],r9e);class cai{constructor(e,i,n,s){this.languageConfigurationService=s,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=i,this._modelService=n}async provideCompletionItems(e,i){const n=this._configurationService.getValue(e.uri,i,"editor");if(n.wordBasedSuggestions==="off")return;const s=[];if(n.wordBasedSuggestions==="currentDocument")O5(this._modelService,e.uri)&&s.push(e.uri);else for(const x of this._modelService.getModels())O5(this._modelService,x.uri)&&(x===e?s.unshift(x.uri):(n.wordBasedSuggestions==="allDocuments"||x.getLanguageId()===e.getLanguageId())&&s.push(x.uri));if(s.length===0)return;const l=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),d=e.getWordAtPosition(i),f=d?new at(i.lineNumber,d.startColumn,i.lineNumber,d.endColumn):at.fromPositions(i),g=f.setEndPosition(i.lineNumber,i.column),w=await(await this._workerManager.withWorker()).textualSuggest(s,d==null?void 0:d.word,l);if(w)return{duration:w.duration,suggestions:w.words.map(x=>({kind:18,label:x,insertText:x,range:{insert:g,replace:f}}))}}}class uai extends Ii{constructor(e,i){super(),this.languageConfigurationService=i,this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new FHe).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(_mt/2),ed),this._register(this._modelService.onModelRemoved(s=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>_mt&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new eje(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class dai extends Ii{constructor(e,i,n){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=i,!n){const s=new OHe;s.cancelAndSet(()=>this._checkStopModelSync(),Math.round(hmt/2)),this._register(s)}}dispose(){for(const e in this._syncedModels)yd(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,i){for(const n of e){const s=n.toString();this._syncedModels[s]||this._beginModelSync(n,i),this._syncedModels[s]&&(this._syncedModelsLastUsedTime[s]=new Date().getTime())}}_checkStopModelSync(){const e=new Date().getTime(),i=[];for(const n in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[n]>hmt&&i.push(n);for(const n of i)this._stopModelSync(n)}_beginModelSync(e,i){const n=this._modelService.getModel(e);if(!n||!i&&n.isTooLargeForSyncing())return;const s=e.toString();this._proxy.acceptNewModel({url:n.uri.toString(),lines:n.getLinesContent(),EOL:n.getEOL(),versionId:n.getVersionId()});const l=new On;l.add(n.onDidChangeContent(d=>{this._proxy.acceptModelChanged(s.toString(),d)})),l.add(n.onWillDispose(()=>{this._stopModelSync(s)})),l.add(go(()=>{this._proxy.acceptRemovedModel(s)})),this._syncedModels[s]=l}_stopModelSync(e){const i=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],yd(i)}}class pmt{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class Z8e{constructor(e){this._workerClient=e}fhr(e,i){return this._workerClient.fhr(e,i)}}class eje extends Ii{constructor(e,i,n,s){super(),this.languageConfigurationService=s,this._disposed=!1,this._modelService=e,this._keepIdleModels=i,this._workerFactory=new Y1e(n),this._worker=null,this._modelManager=null}fhr(e,i){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new fsi(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new Z8e(this)))}catch(e){K5e(e),this._worker=new pmt(new VM(new Z8e(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,e=>(K5e(e),this._worker=new pmt(new VM(new Z8e(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new dai(e,this._modelService,this._keepIdleModels))),this._modelManager}async _withSyncedResources(e,i=!1){return this._disposed?Promise.reject(sii()):this._getProxy().then(n=>(this._getOrCreateModelManager(n).ensureSyncedResources(e,i),n))}computedUnicodeHighlights(e,i,n){return this._withSyncedResources([e]).then(s=>s.computeUnicodeHighlights(e.toString(),i,n))}computeDiff(e,i,n,s){return this._withSyncedResources([e,i],!0).then(l=>l.computeDiff(e.toString(),i.toString(),n,s))}computeMoreMinimalEdits(e,i,n){return this._withSyncedResources([e]).then(s=>s.computeMoreMinimalEdits(e.toString(),i,n))}computeLinks(e){return this._withSyncedResources([e]).then(i=>i.computeLinks(e.toString()))}computeDefaultDocumentColors(e){return this._withSyncedResources([e]).then(i=>i.computeDefaultDocumentColors(e.toString()))}async textualSuggest(e,i,n){const s=await this._withSyncedResources(e),l=n.source,d=n.flags;return s.textualSuggest(e.map(f=>f.toString()),i,l,d)}computeWordRanges(e,i){return this._withSyncedResources([e]).then(n=>{const s=this._modelService.getModel(e);if(!s)return Promise.resolve(null);const l=this.languageConfigurationService.getLanguageConfiguration(s.getLanguageId()).getWordDefinition(),d=l.source,f=l.flags;return n.computeWordRanges(e.toString(),i,d,f)})}navigateValueSet(e,i,n){return this._withSyncedResources([e]).then(s=>{const l=this._modelService.getModel(e);if(!l)return null;const d=this.languageConfigurationService.getLanguageConfiguration(l.getLanguageId()).getWordDefinition(),f=d.source,g=d.flags;return s.navigateValueSet(e.toString(),i,n,f,g)})}findSectionHeaders(e,i){return this._withSyncedResources([e]).then(n=>n.findSectionHeaders(e.toString(),i))}dispose(){super.dispose(),this._disposed=!0}}function fai(c,e,i){return new hai(c,e,i)}class hai extends eje{constructor(e,i,n){super(e,n.keepIdleModels||!1,n.label,i),this._foreignModuleId=n.moduleId,this._foreignModuleCreateData=n.createData||null,this._foreignModuleHost=n.host||null,this._foreignProxy=null}fhr(e,i){if(!this._foreignModuleHost||typeof this._foreignModuleHost[e]!="function")return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,i))}catch(n){return Promise.reject(n)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(e=>{const i=this._foreignModuleHost?_He(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,i).then(n=>{this._foreignModuleCreateData=null;const s=(f,g)=>e.fmr(f,g),l=(f,g)=>function(){const y=Array.prototype.slice.call(arguments,0);return g(f,y)},d={};for(const f of n)d[f]=l(f,s);return d})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then(i=>this.getProxy())}}const xne={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"},eq=new class{clone(){return this}equals(c){return this===c}};function tje(c,e){return new xHe([new Pte(0,"",c)],e)}function nye(c,e){const i=new Uint32Array(2);return i[0]=0,i[1]=(c<<0|0|0|32768|2<<24)>>>0,new M1e(i,e===null?eq:e)}class P0{static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static getClassNameFromMetadata(e){let n="mtk"+this.getForeground(e);const s=this.getFontStyle(e);return s&1&&(n+=" mtki"),s&2&&(n+=" mtkb"),s&4&&(n+=" mtku"),s&8&&(n+=" mtks"),n}static getInlineStyleFromMetadata(e,i){const n=this.getForeground(e),s=this.getFontStyle(e);let l=`color: ${i[n]};`;s&1&&(l+="font-style: italic;"),s&2&&(l+="font-weight: bold;");let d="";return s&4&&(d+=" underline"),s&8&&(d+=" line-through"),d&&(l+=`text-decoration:${d};`),l}static getPresentationFromMetadata(e){const i=this.getForeground(e),n=this.getFontStyle(e);return{foreground:i,italic:!!(n&1),bold:!!(n&2),underline:!!(n&4),strikethrough:!!(n&8)}}}class vp{static createEmpty(e,i){const n=vp.defaultTokenMetadata,s=new Uint32Array(2);return s[0]=e.length,s[1]=n,new vp(s,e,i)}static createFromTextAndMetadata(e,i){let n=0,s="";const l=new Array;for(const{text:d,metadata:f}of e)l.push(n+d.length,f),n+=d.length,s+=d;return new vp(new Uint32Array(l),s,i)}constructor(e,i,n){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=i,this.languageIdCodec=n}equals(e){return e instanceof vp?this.slicedEquals(e,0,this._tokensCount):!1}slicedEquals(e,i,n){if(this._text!==e._text||this._tokensCount!==e._tokensCount)return!1;const s=i<<1,l=s+(n<<1);for(let d=s;d0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[(e<<1)+1]}getLanguageId(e){const i=this._tokens[(e<<1)+1],n=P0.getLanguageId(i);return this.languageIdCodec.decodeLanguageId(n)}getStandardTokenType(e){const i=this._tokens[(e<<1)+1];return P0.getTokenType(i)}getForeground(e){const i=this._tokens[(e<<1)+1];return P0.getForeground(i)}getClassName(e){const i=this._tokens[(e<<1)+1];return P0.getClassNameFromMetadata(i)}getInlineStyle(e,i){const n=this._tokens[(e<<1)+1];return P0.getInlineStyleFromMetadata(n,i)}getPresentation(e){const i=this._tokens[(e<<1)+1];return P0.getPresentationFromMetadata(i)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return vp.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,i,n){return new ije(this,e,i,n)}static convertToEndOffset(e,i){const s=(e.length>>>1)-1;for(let l=0;l>>1)-1;for(;ni&&(s=l)}return n}withInserted(e){if(e.length===0)return this;let i=0,n=0,s="";const l=new Array;let d=0;for(;;){const f=id){s+=this._text.substring(d,g.offset);const y=this._tokens[(i<<1)+1];l.push(s.length,y),d=g.offset}s+=g.text,l.push(s.length,g.tokenMetadata),n++}else break}return new vp(new Uint32Array(l),s,this.languageIdCodec)}getTokenText(e){const i=this.getStartOffset(e),n=this.getEndOffset(e);return this._text.substring(i,n)}forEach(e){const i=this.getCount();for(let n=0;n>>0;class ije{constructor(e,i,n,s){this._source=e,this._startOffset=i,this._endOffset=n,this._deltaOffset=s,this._firstTokenIndex=e.findTokenIndexAtOffset(i),this.languageIdCodec=e.languageIdCodec,this._tokensCount=0;for(let l=this._firstTokenIndex,d=e.getCount();l=n);l++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof ije?this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getStandardTokenType(e){return this._source.getStandardTokenType(this._firstTokenIndex+e)}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const i=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,i)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,i){return this._source.getInlineStyle(this._firstTokenIndex+e,i)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}getTokenText(e){const i=this._firstTokenIndex+e,n=this._source.getStartOffset(i),s=this._source.getEndOffset(i);let l=this._source.getTokenText(i);return nthis._endOffset&&(l=l.substring(0,l.length-(s-this._endOffset))),l}forEach(e){for(let i=0;i=l||(f[g++]=new Sy(Math.max(1,y.startColumn-s+1),Math.min(d+1,y.endColumn-s+1),y.className,y.type));return f}static filter(e,i,n,s){if(e.length===0)return[];const l=[];let d=0;for(let f=0,g=e.length;fi||w.isEmpty()&&(y.type===0||y.type===3))continue;const x=w.startLineNumber===i?w.startColumn:n,I=w.endLineNumber===i?w.endColumn:s;l[d++]=new Sy(x,I,y.inlineClassName,y.type)}return l}static _typeCompare(e,i){const n=[2,0,1,3];return n[e]-n[i]}static compare(e,i){if(e.startColumn!==i.startColumn)return e.startColumn-i.startColumn;if(e.endColumn!==i.endColumn)return e.endColumn-i.endColumn;const n=Sy._typeCompare(e.type,i.type);return n!==0?n:e.className!==i.className?e.className0&&this.stopOffsets[0]0&&i=e){this.stopOffsets.splice(s,0,e),this.classNames.splice(s,0,i),this.metadata.splice(s,0,n);break}this.count++}}class pai{static normalize(e,i){if(i.length===0)return[];const n=[],s=new K0e;let l=0;for(let d=0,f=i.length;d1){const W=e.charCodeAt(y-2);Bg(W)&&y--}if(w>1){const W=e.charCodeAt(w-2);Bg(W)&&w--}const P=y-1,O=w-2;l=s.consumeLowerThan(P,l,n),s.count===0&&(l=P),s.insert(O,x,I)}return s.consumeLowerThan(1073741824,l,n),n}}class vm{constructor(e,i,n,s){this.endIndex=e,this.type=i,this.metadata=n,this.containsRTL=s,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}class aSt{constructor(e,i){this.startOffset=e,this.endOffset=i}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class TR{constructor(e,i,n,s,l,d,f,g,y,w,x,I,P,O,W,X,Z,ee,he){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=i,this.lineContent=n,this.continuesWithWrappedLine=s,this.isBasicASCII=l,this.containsRTL=d,this.fauxIndentLength=f,this.lineTokens=g,this.lineDecorations=y.sort(Sy.compare),this.tabSize=w,this.startVisibleColumn=x,this.spaceWidth=I,this.stopRenderingLineAfter=W,this.renderWhitespace=X==="all"?4:X==="boundary"?1:X==="selection"?2:X==="trailing"?3:0,this.renderControlCharacters=Z,this.fontLigatures=ee,this.selectionsOnLine=he&&he.sort((Be,Me)=>Be.startOffset>>16}static getCharIndex(e){return(e&65535)>>>0}constructor(e,i){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,i,n,s){const l=(i<<16|n<<0)>>>0;this._data[e-1]=l,this._horizontalOffset[e-1]=s}getHorizontalOffset(e){return this._horizontalOffset.length===0?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return this.length===0?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const i=this.charOffsetToPartData(e-1),n=VN.getPartIndex(i),s=VN.getCharIndex(i);return new lSt(n,s)}getColumn(e,i){return this.partDataToCharOffset(e.partIndex,i,e.charIndex)+1}partDataToCharOffset(e,i,n){if(this.length===0)return 0;const s=(e<<16|n<<0)>>>0;let l=0,d=this.length-1;for(;l+1>>1,X=this._data[W];if(X===s)return W;X>s?d=W:l=W}if(l===d)return l;const f=this._data[l],g=this._data[d];if(f===s)return l;if(g===s)return d;const y=VN.getPartIndex(f),w=VN.getCharIndex(f),x=VN.getPartIndex(g);let I;y!==x?I=i:I=VN.getCharIndex(g);const P=n-w,O=I-n;return P<=O?l:d}}class s9e{constructor(e,i,n){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=i,this.containsForeignElements=n}}function kne(c,e){if(c.lineContent.length===0){if(c.lineDecorations.length>0){e.appendString("");let i=0,n=0,s=0;for(const d of c.lineDecorations)(d.type===1||d.type===2)&&(e.appendString(''),d.type===1&&(s|=1,i++),d.type===2&&(s|=2,n++));e.appendString("");const l=new VN(1,i+n);return l.setColumnInfo(1,i,0,0),new s9e(l,!1,s)}return e.appendString(""),new s9e(new VN(0,0),!1,0)}return xai(vai(c),e)}class gai{constructor(e,i,n,s){this.characterMapping=e,this.html=i,this.containsRTL=n,this.containsForeignElements=s}}function rye(c){const e=new jq(1e4),i=kne(c,e);return new gai(i.characterMapping,e.build(),i.containsRTL,i.containsForeignElements)}class mai{constructor(e,i,n,s,l,d,f,g,y,w,x,I,P,O,W,X){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=i,this.lineContent=n,this.len=s,this.isOverflowing=l,this.overflowingCharCount=d,this.parts=f,this.containsForeignElements=g,this.fauxIndentLength=y,this.tabSize=w,this.startVisibleColumn=x,this.containsRTL=I,this.spaceWidth=P,this.renderSpaceCharCode=O,this.renderWhitespace=W,this.renderControlCharacters=X}}function vai(c){const e=c.lineContent;let i,n,s;c.stopRenderingLineAfter!==-1&&c.stopRenderingLineAfter0){for(let f=0,g=c.lineDecorations.length;f0&&(l[d++]=new vm(n,"",0,!1));let f=n;for(let g=0,y=i.getCount();g=s){const P=e?GU(c.substring(f,s)):!1;l[d++]=new vm(s,x,0,P);break}const I=e?GU(c.substring(f,w)):!1;l[d++]=new vm(w,x,0,I),f=w}return l}function bai(c,e,i){let n=0;const s=[];let l=0;if(i)for(let d=0,f=e.length;d=50&&(s[l++]=new vm(P+1,w,x,I),O=P+1,P=-1);O!==y&&(s[l++]=new vm(y,w,x,I))}else s[l++]=g;n=y}else for(let d=0,f=e.length;d50){const x=g.type,I=g.metadata,P=g.containsRTL,O=Math.ceil(w/50);for(let W=1;W=8234&&c<=8238||c>=8294&&c<=8297||c>=8206&&c<=8207||c===1564}function Cai(c,e){const i=[];let n=new vm(0,"",0,!1),s=0;for(const l of e){const d=l.endIndex;for(;sn.endIndex&&(n=new vm(s,l.type,l.metadata,l.containsRTL),i.push(n)),n=new vm(s+1,"mtkcontrol",l.metadata,!1),i.push(n))}s>n.endIndex&&(n=new vm(d,l.type,l.metadata,l.containsRTL),i.push(n))}return i}function Sai(c,e,i,n){const s=c.continuesWithWrappedLine,l=c.fauxIndentLength,d=c.tabSize,f=c.startVisibleColumn,g=c.useMonospaceOptimizations,y=c.selectionsOnLine,w=c.renderWhitespace===1,x=c.renderWhitespace===3,I=c.renderSpaceWidth!==c.spaceWidth,P=[];let O=0,W=0,X=n[W].type,Z=n[W].containsRTL,ee=n[W].endIndex;const he=n.length;let we=!1,Te=T1(e),Be;Te===-1?(we=!0,Te=i,Be=i):Be=yE(e);let Me=!1,vt=0,Nt=y&&y[vt],Ni=f%d;for(let Mt=l;Mt=Nt.endOffset&&(vt++,Nt=y&&y[vt]);let gn;if(MtBe)gn=!0;else if(pi===9)gn=!0;else if(pi===32)if(w)if(Me)gn=!0;else{const $n=Mt+1Mt),gn&&x&&(gn=we||Mt>Be),gn&&Z&&Mt>=Te&&Mt<=Be&&(gn=!1),Me){if(!gn||!g&&Ni>=d){if(I){const $n=O>0?P[O-1].endIndex:l;for(let Ri=$n+1;Ri<=Mt;Ri++)P[O++]=new vm(Ri,"mtkw",1,!1)}else P[O++]=new vm(Mt,"mtkw",1,!1);Ni=Ni%d}}else(Mt===ee||gn&&Mt>l)&&(P[O++]=new vm(Mt,X,0,Z),Ni=Ni%d);for(pi===9?Ni=d:eR(pi)?Ni+=2:Ni++,Me=gn;Mt===ee&&(W++,W0?e.charCodeAt(i-1):0,pi=i>1?e.charCodeAt(i-2):0;Mt===32&&pi!==32&&pi!==9||(ci=!0)}else ci=!0;if(ci)if(I){const Mt=O>0?P[O-1].endIndex:l;for(let pi=Mt+1;pi<=i;pi++)P[O++]=new vm(pi,"mtkw",1,!1)}else P[O++]=new vm(i,"mtkw",1,!1);else P[O++]=new vm(i,X,0,Z);return P}function wai(c,e,i,n){n.sort(Sy.compare);const s=pai.normalize(c,n),l=s.length;let d=0;const f=[];let g=0,y=0;for(let x=0,I=i.length;xy&&(y=ee.startOffset,f[g++]=new vm(y,W,X,Z)),ee.endOffset+1<=O)y=ee.endOffset+1,f[g++]=new vm(y,W+" "+ee.className,X|ee.metadata,Z),d++;else{y=O,f[g++]=new vm(y,W+" "+ee.className,X|ee.metadata,Z);break}}O>y&&(y=O,f[g++]=new vm(y,W,X,Z))}const w=i[i.length-1].endIndex;if(d'):e.appendString("");for(let Nt=0,Ni=y.length;Nt=w&&(na+=zs)}}for(Ri&&(e.appendString(' style="width:'),e.appendString(String(O*Xs)),e.appendString('px"')),e.appendASCIICharCode(62);we1?e.appendCharCode(8594):e.appendCharCode(65515);for(let zs=2;zs<=Is;zs++)e.appendCharCode(160)}else na=2,Is=1,e.appendCharCode(W),e.appendCharCode(8204);Be+=na,Me+=Is,we>=w&&(Te+=Is)}}else for(e.appendASCIICharCode(62);we=w&&(Te+=na)}ao?vt++:vt=0,we>=d&&!he&&ci.isPseudoAfter()&&(he=!0,ee.setColumnInfo(we+1,Nt,Be,Me)),e.appendString("")}return he||ee.setColumnInfo(d+1,y.length-1,Be,Me),f&&(e.appendString(''),e.appendString(V("showMore","Show more ({0})",Tai(g))),e.appendString("")),e.appendString(""),new s9e(ee,P,s)}function kai(c){return c.toString(16).toUpperCase().padStart(4,"0")}function Tai(c){return c<1024?V("overflow.chars","{0} chars",c):c<1024*1024?`${(c/1024).toFixed(1)} KB`:`${(c/1024/1024).toFixed(1)} MB`}class mmt{constructor(e,i,n,s){this._viewportBrand=void 0,this.top=e|0,this.left=i|0,this.width=n|0,this.height=s|0}}class Dai{constructor(e,i){this.tabSize=e,this.data=i}}class nje{constructor(e,i,n,s,l,d,f){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=i,this.minColumn=n,this.maxColumn=s,this.startVisibleColumn=l,this.tokens=d,this.inlineDecorations=f}}class xw{constructor(e,i,n,s,l,d,f,g,y,w){this.minColumn=e,this.maxColumn=i,this.content=n,this.continuesWithWrappedLine=s,this.isBasicASCII=xw.isBasicASCII(n,d),this.containsRTL=xw.containsRTL(n,this.isBasicASCII,l),this.tokens=f,this.inlineDecorations=g,this.tabSize=y,this.startVisibleColumn=w}static isBasicASCII(e,i){return i?mne(e):!0}static containsRTL(e,i,n){return!i&&n?GU(e):!1}}class Zee{constructor(e,i,n){this.range=e,this.inlineClassName=i,this.type=n}}class Eai{constructor(e,i,n,s){this.startOffset=e,this.endOffset=i,this.inlineClassName=n,this.inlineClassNameAffectsLetterSpacing=s}toInlineDecoration(e){return new Zee(new at(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class uSt{constructor(e,i){this._viewModelDecorationBrand=void 0,this.range=e,this.options=i}}class Jte{constructor(e,i,n){this.color=e,this.zIndex=i,this.data=n}static compareByRenderingProps(e,i){return e.zIndex===i.zIndex?e.colori.color?1:0:e.zIndex-i.zIndex}static equals(e,i){return e.color===i.color&&e.zIndex===i.zIndex&&ch(e.data,i.data)}static equalsArr(e,i){return ch(e,i,Jte.equals)}}function Iai(c){return Array.isArray(c)}function Nai(c){return!Iai(c)}function dSt(c){return typeof c=="string"}function vmt(c){return!dSt(c)}function M5(c){return!c}function B4(c,e){return c.ignoreCase&&e?e.toLowerCase():e}function ymt(c){return c.replace(/[&<>'"_]/g,"-")}function Lai(c,e){console.log(`${c.languageId}: ${e}`)}function vf(c,e){return new Error(`${c.languageId}: ${e}`)}function fM(c,e,i,n,s){const l=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let d=null;return e.replace(l,function(f,g,y,w,x,I,P,O,W){return M5(y)?M5(w)?!M5(x)&&x0;){const n=c.tokenizer[i];if(n)return n;const s=i.lastIndexOf(".");s<0?i=null:i=i.substr(0,s)}return null}function Aai(c,e){let i=e;for(;i&&i.length>0;){if(c.stateNames[i])return!0;const s=i.lastIndexOf(".");s<0?i=null:i=i.substr(0,s)}return!1}var Oai=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Mai=function(c,e){return function(i,n){e(i,n,c)}},o9e;const fSt=5;class Gte{static create(e,i){return this._INSTANCE.create(e,i)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,i){if(e!==null&&e.depth>=this._maxCacheDepth)return new kU(e,i);let n=kU.getStackElementId(e);n.length>0&&(n+="|"),n+=i;let s=this._entries[n];return s||(s=new kU(e,i),this._entries[n]=s,s)}}Gte._INSTANCE=new Gte(fSt);class kU{constructor(e,i){this.parent=e,this.state=i,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let i="";for(;e!==null;)i.length>0&&(i+="|"),i+=e.state,e=e.parent;return i}static _equals(e,i){for(;e!==null&&i!==null;){if(e===i)return!0;if(e.state!==i.state)return!1;e=e.parent,i=i.parent}return e===null&&i===null}equals(e){return kU._equals(this,e)}push(e){return Gte.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return Gte.create(this.parent,e)}}class Xz{constructor(e,i){this.languageId=e,this.state=i}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new Xz(this.languageId,this.state)}}class hM{static create(e,i){return this._INSTANCE.create(e,i)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,i){if(i!==null)return new Yee(e,i);if(e!==null&&e.depth>=this._maxCacheDepth)return new Yee(e,i);const n=kU.getStackElementId(e);let s=this._entries[n];return s||(s=new Yee(e,null),this._entries[n]=s,s)}}hM._INSTANCE=new hM(fSt);class Yee{constructor(e,i){this.stack=e,this.embeddedLanguageData=i}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:hM.create(this.stack,this.embeddedLanguageData)}equals(e){return!(e instanceof Yee)||!this.stack.equals(e.stack)?!1:this.embeddedLanguageData===null&&e.embeddedLanguageData===null?!0:this.embeddedLanguageData===null||e.embeddedLanguageData===null?!1:this.embeddedLanguageData.equals(e.embeddedLanguageData)}}class Rai{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,i){this._lastTokenType===i&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=i,this._lastTokenLanguage=this._languageId,this._tokens.push(new Pte(e,i,this._languageId)))}nestedLanguageTokenize(e,i,n,s){const l=n.languageId,d=n.state,f=Nh.get(l);if(!f)return this.enterLanguage(l),this.emit(s,""),d;const g=f.tokenize(e,i,d);if(s!==0)for(const y of g.tokens)this._tokens.push(new Pte(y.offset+s,y.type,y.language));else this._tokens=this._tokens.concat(g.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,g.endState}finalize(e){return new xHe(this._tokens,e)}}class Q0e{constructor(e,i){this._languageService=e,this._theme=i,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,i){const n=this._theme.match(this._currentLanguageId,i)|1024;this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))}static _merge(e,i,n){const s=e!==null?e.length:0,l=i.length,d=n!==null?n.length:0;if(s===0&&l===0&&d===0)return new Uint32Array(0);if(s===0&&l===0)return n;if(l===0&&d===0)return e;const f=new Uint32Array(s+l+d);e!==null&&f.set(e);for(let g=0;g{if(d)return;let g=!1;for(let y=0,w=f.changedLanguages.length;y{f.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))}))}getLoadStatus(){const e=[];for(const i in this._embeddedLanguages){const n=Nh.get(i);if(n){if(n instanceof o9e){const s=n.getLoadStatus();s.loaded===!1&&e.push(s.promise)}continue}Nh.isResolved(i)||e.push(Nh.getOrCreate(i))}return e.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(i=>{})}}getInitialState(){const e=Gte.create(null,this._lexer.start);return hM.create(e,null)}tokenize(e,i,n){if(e.length>=this._maxTokenizationLineLength)return tje(this._languageId,n);const s=new Rai,l=this._tokenize(e,i,n,s);return s.finalize(l)}tokenizeEncoded(e,i,n){if(e.length>=this._maxTokenizationLineLength)return nye(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),n);const s=new Q0e(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),l=this._tokenize(e,i,n,s);return s.finalize(l)}_tokenize(e,i,n,s){return n.embeddedLanguageData?this._nestedTokenize(e,i,n,0,s):this._myTokenize(e,i,n,0,s)}_findLeavingNestedLanguageOffset(e,i){let n=this._lexer.tokenizer[i.stack.state];if(!n&&(n=Cge(this._lexer,i.stack.state),!n))throw vf(this._lexer,"tokenizer state is not defined: "+i.stack.state);let s=-1,l=!1;for(const d of n){if(!vmt(d.action)||d.action.nextEmbedded!=="@pop")continue;l=!0;let f=d.resolveRegex(i.stack.state);const g=f.source;if(g.substr(0,4)==="^(?:"&&g.substr(g.length-1,1)===")"){const w=(f.ignoreCase?"i":"")+(f.unicode?"u":"");f=new RegExp(g.substr(4,g.length-5),w)}const y=e.search(f);y===-1||y!==0&&d.matchOnlyAtLineStart||(s===-1||y0&&l.nestedLanguageTokenize(f,!1,n.embeddedLanguageData,s);const g=e.substring(d);return this._myTokenize(g,i,n,s+d,l)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,i,n,s,l){l.enterLanguage(this._languageId);const d=e.length,f=i&&this._lexer.includeLF?e+` +`:e,g=f.length;let y=n.embeddedLanguageData,w=n.stack,x=0,I=null,P=!0;for(;P||x=g)break;P=!1;let Nt=this._lexer.tokenizer[Z];if(!Nt&&(Nt=Cge(this._lexer,Z),!Nt))throw vf(this._lexer,"tokenizer state is not defined: "+Z);const Ni=f.substr(x);for(const ci of Nt)if((x===0||!ci.matchOnlyAtLineStart)&&(ee=Ni.match(ci.resolveRegex(Z)),ee)){he=ee[0],we=ci.action;break}}if(ee||(ee=[""],he=""),we||(x=this._lexer.maxStack)throw vf(this._lexer,"maximum tokenizer stack size reached: ["+w.state+","+w.parent.state+",...]");w=w.push(Z)}else if(we.next==="@pop"){if(w.depth<=1)throw vf(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(Te));w=w.pop()}else if(we.next==="@popall")w=w.popall();else{let Nt=fM(this._lexer,we.next,he,ee,Z);if(Nt[0]==="@"&&(Nt=Nt.substr(1)),Cge(this._lexer,Nt))w=w.push(Nt);else throw vf(this._lexer,"trying to set a next state '"+Nt+"' that is undefined in rule: "+this._safeRuleName(Te))}}we.log&&typeof we.log=="string"&&Lai(this._lexer,this._lexer.languageId+": "+fM(this._lexer,we.log,he,ee,Z))}if(Me===null)throw vf(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(Te));const vt=Nt=>{const Ni=this._languageService.getLanguageIdByLanguageName(Nt)||this._languageService.getLanguageIdByMimeType(Nt)||Nt,ci=this._getNestedEmbeddedLanguageData(Ni);if(x0)throw vf(this._lexer,"groups cannot be nested: "+this._safeRuleName(Te));if(ee.length!==Me.length+1)throw vf(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(Te));let Nt=0;for(let Ni=1;Nic});class rje{static colorizeElement(e,i,n,s){s=s||{};const l=s.theme||"vs",d=s.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(!d)return console.error("Mode not detected"),Promise.resolve();const f=i.getLanguageIdByMimeType(d)||d;e.setTheme(l);const g=n.firstChild?n.firstChild.nodeValue:"";n.className+=" "+l;const y=w=>{var x;const I=(x=Y8e==null?void 0:Y8e.createHTML(w))!==null&&x!==void 0?x:w;n.innerHTML=I};return this.colorize(i,g||"",f,s).then(y,w=>console.error(w))}static async colorize(e,i,n,s){const l=e.languageIdCodec;let d=4;s&&typeof s.tabSize=="number"&&(d=s.tabSize),LHe(i)&&(i=i.substr(1));const f=wL(i);if(!e.isRegisteredLanguageId(n))return bmt(f,d,l);const g=await Nh.getOrCreate(n);return g?Bai(f,d,g,l):bmt(f,d,l)}static colorizeLine(e,i,n,s,l=4){const d=xw.isBasicASCII(e,i),f=xw.containsRTL(e,d,n);return rye(new TR(!1,!0,e,!1,d,f,0,s,[],l,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,i,n=4){const s=e.getLineContent(i);e.tokenization.forceTokenization(i);const d=e.tokenization.getLineTokens(i).inflate();return this.colorizeLine(s,e.mightContainNonBasicASCII(),e.mightContainRTL(),d,n)}}function Bai(c,e,i,n){return new Promise((s,l)=>{const d=()=>{const f=Wai(c,e,i,n);if(i instanceof Kte){const g=i.getLoadStatus();if(g.loaded===!1){g.promise.then(d,l);return}}s(f)};d()})}function bmt(c,e,i){let n=[];const l=new Uint32Array(2);l[0]=0,l[1]=33587200;for(let d=0,f=c.length;d")}return n.join("")}function Wai(c,e,i,n){let s=[],l=i.getInitialState();for(let d=0,f=c.length;d"),l=y.endState}return s.join("")}const Cmt=2e4;let R5,Jme,a9e,Gme,l9e;function Vai(c){R5=document.createElement("div"),R5.className="monaco-aria-container";const e=()=>{const n=document.createElement("div");return n.className="monaco-alert",n.setAttribute("role","alert"),n.setAttribute("aria-atomic","true"),R5.appendChild(n),n};Jme=e(),a9e=e();const i=()=>{const n=document.createElement("div");return n.className="monaco-status",n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),R5.appendChild(n),n};Gme=i(),l9e=i(),c.appendChild(R5)}function Eb(c){R5&&(Jme.textContent!==c?(n0(a9e),X0e(Jme,c)):(n0(Jme),X0e(a9e,c)))}function hL(c){R5&&(Gme.textContent!==c?(n0(l9e),X0e(Gme,c)):(n0(Gme),X0e(l9e,c)))}function X0e(c,e){n0(c),e.length>Cmt&&(e=e.substr(0,Cmt)),c.textContent=e,c.style.visibility="hidden",c.style.visibility="visible"}const sje=Kl("markerDecorationsService");var Hai=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},jai=function(c,e){return function(i,n){e(i,n,c)}};let Qte=class{constructor(e,i){}dispose(){}};Qte.ID="editor.contrib.markerDecorations";Qte=Hai([jai(1,sje)],Qte);Bc(Qte.ID,Qte,0);class hSt extends Ii{constructor(e,i){super(),this._onDidChange=this._register(new ui),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,i)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let e=null;const i=()=>{e?this.observe({width:e.width,height:e.height}):this.observe()};let n=!1,s=!1;const l=()=>{if(n&&!s)try{n=!1,s=!0,i()}finally{zC(Io(this._referenceDomElement),()=>{s=!1,l()})}};this._resizeObserver=new ResizeObserver(d=>{d&&d[0]&&d[0].contentRect?e={width:d[0].contentRect.width,height:d[0].contentRect.height}:e=null,n=!0,l()}),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,i){let n=0,s=0;i?(n=i.width,s=i.height):this._referenceDomElement&&(n=this._referenceDomElement.clientWidth,s=this._referenceDomElement.clientHeight),n=Math.max(5,n),s=Math.max(5,s),(this._width!==n||this._height!==s)&&(this._width=n,this._height=s,e&&this._onDidChange.fire())}}class HM{constructor(e,i){this.key=e,this.migrate=i}apply(e){const i=HM._read(e,this.key),n=l=>HM._read(e,l),s=(l,d)=>HM._write(e,l,d);this.migrate(i,n,s)}static _read(e,i){if(typeof e>"u")return;const n=i.indexOf(".");if(n>=0){const s=i.substring(0,n);return this._read(e[s],i.substring(n+1))}return e[i]}static _write(e,i,n){const s=i.indexOf(".");if(s>=0){const l=i.substring(0,s);e[l]=e[l]||{},this._write(e[l],i.substring(s+1),n);return}e[i]=n}}HM.items=[];function VE(c,e){HM.items.push(new HM(c,e))}function qC(c,e){VE(c,(i,n,s)=>{if(typeof i<"u"){for(const[l,d]of e)if(i===l){s(c,d);return}}})}function zai(c){HM.items.forEach(e=>e.apply(c))}qC("wordWrap",[[!0,"on"],[!1,"off"]]);qC("lineNumbers",[[!0,"on"],[!1,"off"]]);qC("cursorBlinking",[["visible","solid"]]);qC("renderWhitespace",[[!0,"boundary"],[!1,"none"]]);qC("renderLineHighlight",[[!0,"line"],[!1,"none"]]);qC("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]);qC("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]);qC("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);qC("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);qC("autoIndent",[[!1,"advanced"],[!0,"full"]]);qC("matchBrackets",[[!0,"always"],[!1,"never"]]);qC("renderFinalNewline",[[!0,"on"],[!1,"off"]]);qC("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]);qC("occurrencesHighlight",[[!0,"singleFile"],[!1,"off"]]);qC("wordBasedSuggestions",[[!0,"matchingDocuments"],[!1,"off"]]);VE("autoClosingBrackets",(c,e,i)=>{c===!1&&(i("autoClosingBrackets","never"),typeof e("autoClosingQuotes")>"u"&&i("autoClosingQuotes","never"),typeof e("autoSurround")>"u"&&i("autoSurround","never"))});VE("renderIndentGuides",(c,e,i)=>{typeof c<"u"&&(i("renderIndentGuides",void 0),typeof e("guides.indentation")>"u"&&i("guides.indentation",!!c))});VE("highlightActiveIndentGuide",(c,e,i)=>{typeof c<"u"&&(i("highlightActiveIndentGuide",void 0),typeof e("guides.highlightActiveIndentation")>"u"&&i("guides.highlightActiveIndentation",!!c))});const Uai={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};VE("suggest.filteredTypes",(c,e,i)=>{if(c&&typeof c=="object"){for(const n of Object.entries(Uai))c[n[0]]===!1&&typeof e(`suggest.${n[1]}`)>"u"&&i(`suggest.${n[1]}`,!1);i("suggest.filteredTypes",void 0)}});VE("quickSuggestions",(c,e,i)=>{if(typeof c=="boolean"){const n=c?"on":"off";i("quickSuggestions",{comments:n,strings:n,other:n})}});VE("experimental.stickyScroll.enabled",(c,e,i)=>{typeof c=="boolean"&&(i("experimental.stickyScroll.enabled",void 0),typeof e("stickyScroll.enabled")>"u"&&i("stickyScroll.enabled",c))});VE("experimental.stickyScroll.maxLineCount",(c,e,i)=>{typeof c=="number"&&(i("experimental.stickyScroll.maxLineCount",void 0),typeof e("stickyScroll.maxLineCount")>"u"&&i("stickyScroll.maxLineCount",c))});VE("codeActionsOnSave",(c,e,i)=>{if(c&&typeof c=="object"){let n=!1;const s={};for(const l of Object.entries(c))typeof l[1]=="boolean"?(n=!0,s[l[0]]=l[1]?"explicit":"never"):s[l[0]]=l[1];n&&i("codeActionsOnSave",s)}});VE("codeActionWidget.includeNearbyQuickfixes",(c,e,i)=>{typeof c=="boolean"&&(i("codeActionWidget.includeNearbyQuickfixes",void 0),typeof e("codeActionWidget.includeNearbyQuickFixes")>"u"&&i("codeActionWidget.includeNearbyQuickFixes",c))});VE("lightbulb.enabled",(c,e,i)=>{typeof c=="boolean"&&i("lightbulb.enabled",c?void 0:"off")});class qai{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new ui,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus)}}const tq=new qai,$C=Kl("accessibilityService"),Tne=new Xr("accessibilityModeEnabled",!1);var $ai=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Jai=function(c,e){return function(i,n){e(i,n,c)}};let c9e=class extends Ii{constructor(e,i,n,s,l){super(),this._accessibilityService=l,this._onDidChange=this._register(new ui),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new ui),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new Nbt,this.isSimpleWidget=e,this.contextMenuId=i,this._containerObserver=this._register(new hSt(s,n.dimension)),this._targetWindowId=Io(s).vscodeWindowId,this._rawOptions=Smt(n),this._validatedOptions=_M.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(Kx.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(tq.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(q5e.onDidChange(()=>this._recomputeOptions())),this._register(Vte.getInstance(Io(s)).onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const e=this._computeOptions(),i=_M.checkEquals(this.options,e);i!==null&&(this.options=e,this._onDidChangeFast.fire(i),this._onDidChange.fire(i))}_computeOptions(){const e=this._readEnvConfiguration(),i=t9.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),n=this._readFontInfo(i),s={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:n,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:tq.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return _M.computeOptions(this._validatedOptions,s)}_readEnvConfiguration(){return{extraEditorClassName:Kai(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:e9||ok,pixelRatio:Vte.getInstance(ygt(this._targetWindowId,!0).window).value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return q5e.readFontInfo(ygt(this._targetWindowId,!0).window,e)}getRawOptions(){return this._rawOptions}updateOptions(e){const i=Smt(e);_M.applyUpdate(this._rawOptions,i)&&(this._validatedOptions=_M.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const i=Gai(e);this._lineNumbersDigitCount!==i&&(this._lineNumbersDigitCount=i,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};c9e=$ai([Jai(4,$C)],c9e);function Gai(c){let e=0;for(;c;)c=Math.floor(c/10),e++;return e||1}function Kai(){let c="";return!q4&&!iCt&&(c+="no-user-select "),q4&&(c+="no-minimap-shadow ",c+="enable-user-select "),Wl&&(c+="mac "),c}class Qai{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,i){this._values[e]=i}}class Xai{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,i){this._values[e]=i}}class _M{static validateOptions(e){const i=new Qai;for(const n of $z){const s=n.name==="_never_"?void 0:e[n.name];i._write(n.id,n.validate(s))}return i}static computeOptions(e,i){const n=new Xai;for(const s of $z)n._write(s.id,s.compute(i,n,e._read(s.id)));return n}static _deepEquals(e,i){if(typeof e!="object"||typeof i!="object"||!e||!i)return e===i;if(Array.isArray(e)||Array.isArray(i))return Array.isArray(e)&&Array.isArray(i)?ch(e,i):!1;if(Object.keys(e).length!==Object.keys(i).length)return!1;for(const n in e)if(!_M._deepEquals(e[n],i[n]))return!1;return!0}static checkEquals(e,i){const n=[];let s=!1;for(const l of $z){const d=!_M._deepEquals(e._read(l.id),i._read(l.id));n[l.id]=d,d&&(s=!0)}return s?new Ibt(n):null}static applyUpdate(e,i){let n=!1;for(const s of $z)if(i.hasOwnProperty(s.name)){const l=s.applyUpdate(e[s.name],i[s.name]);e[s.name]=l.newValue,n=n||l.didChange}return n}}function Smt(c){const e=o4(c);return zai(e),e}var SM;(function(c){const e={total:0,min:Number.MAX_VALUE,max:0},i={...e},n={...e},s={...e};let l=0;const d={keydown:0,input:0,render:0};function f(){Z(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),d.keydown=1,queueMicrotask(g)}c.onKeyDown=f;function g(){d.keydown===1&&(performance.mark("keydown/end"),d.keydown=2)}function y(){performance.mark("input/start"),d.input=1,X()}c.onBeforeInput=y;function w(){d.input===0&&y(),queueMicrotask(x)}c.onInput=w;function x(){d.input===1&&(performance.mark("input/end"),d.input=2)}function I(){Z()}c.onKeyUp=I;function P(){Z()}c.onSelectionChange=P;function O(){d.keydown===2&&d.input===2&&d.render===0&&(performance.mark("render/start"),d.render=1,queueMicrotask(W),X())}c.onRenderStart=O;function W(){d.render===1&&(performance.mark("render/end"),d.render=2)}function X(){setTimeout(Z)}function Z(){d.keydown===2&&d.input===2&&d.render===2&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),ee("keydown",e),ee("input",i),ee("render",n),ee("inputlatency",s),l++,he())}function ee(Me,vt){const Nt=performance.getEntriesByName(Me)[0].duration;vt.total+=Nt,vt.min=Math.min(vt.min,Nt),vt.max=Math.max(vt.max,Nt)}function he(){performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),d.keydown=0,d.input=0,d.render=0}function we(){if(l===0)return;const Me={keydown:Te(e),input:Te(i),render:Te(n),total:Te(s),sampleCount:l};return Be(e),Be(i),Be(n),Be(s),l=0,Me}c.getAndClearMeasurements=we;function Te(Me){return{average:Me.total/l,max:Me.max,min:Me.min}}function Be(Me){Me.total=0,Me.min=Number.MAX_VALUE,Me.max=0}})(SM||(SM={}));class Uq{constructor(){this._hooks=new On,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,i){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const n=this._onStopCallback;this._onStopCallback=null,e&&n&&n(i)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,i,n,s,l){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=s,this._onStopCallback=l;let d=e;try{e.setPointerCapture(i),this._hooks.add(go(()=>{try{e.releasePointerCapture(i)}catch{}}))}catch{d=Io(e)}this._hooks.add(tn(d,yr.POINTER_MOVE,f=>{if(f.buttons!==n){this.stopMonitoring(!0);return}f.preventDefault(),this._pointerMoveCallback(f)})),this._hooks.add(tn(d,yr.POINTER_UP,f=>this.stopMonitoring(!0)))}}function oje(c){return`--vscode-${c.replace(/\./g,"-")}`}function vs(c){return`var(${oje(c)})`}function Zai(c,e){return`var(${oje(c)}, ${e})`}const _St={ColorContribution:"base.contributions.colors"};class Yai{constructor(){this._onDidChangeSchema=new ui,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,i,n,s=!1,l){const d={id:e,description:n,defaults:i,needsTransparency:s,deprecationMessage:l};this.colorsById[e]=d;const f={type:"string",description:n,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return l&&(f.deprecationMessage=l),s&&(f.pattern="^#(?:(?[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",f.patternErrorMessage="This color must be transparent or it will obscure content"),this.colorSchema.properties[e]=f,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map(e=>this.colorsById[e])}resolveDefaultColor(e,i){const n=this.colorsById[e];if(n&&n.defaults){const s=n.defaults[i.type];return XD(s,i)}}getColorSchema(){return this.colorSchema}toString(){const e=(i,n)=>{const s=i.indexOf(".")===-1?0:1,l=n.indexOf(".")===-1?0:1;return s!==l?s-l:i.localeCompare(n)};return Object.keys(this.colorsById).sort(e).map(i=>`- \`${i}\`: ${this.colorsById[i].description}`).join(` +`)}}const sye=new Yai;dh.add(_St.ColorContribution,sye);function Ft(c,e,i,n,s){return sye.registerColor(c,e,i,n,s)}function eli(c,e){var i,n,s,l;switch(c.op){case 0:return(i=XD(c.value,e))===null||i===void 0?void 0:i.darken(c.factor);case 1:return(n=XD(c.value,e))===null||n===void 0?void 0:n.lighten(c.factor);case 2:return(s=XD(c.value,e))===null||s===void 0?void 0:s.transparent(c.factor);case 3:{const d=XD(c.background,e);return d?(l=XD(c.value,e))===null||l===void 0?void 0:l.makeOpaque(d):XD(c.value,e)}case 4:for(const d of c.values){const f=XD(d,e);if(f)return f}return;case 6:return XD(e.defines(c.if)?c.then:c.else,e);case 5:{const d=XD(c.value,e);if(!d)return;const f=XD(c.background,e);return f?d.isDarkerThan(f)?Qi.getLighterColor(d,f,c.factor).transparent(c.transparency):Qi.getDarkerColor(d,f,c.factor).transparent(c.transparency):d.transparent(c.factor*c.transparency)}default:throw X1e()}}function Z9(c,e){return{op:0,value:c,factor:e}}function CE(c,e){return{op:1,value:c,factor:e}}function yo(c,e){return{op:2,value:c,factor:e}}function Xte(...c){return{op:4,values:c}}function tli(c,e,i){return{op:6,if:c,then:e,else:i}}function wmt(c,e,i,n){return{op:5,value:c,background:e,factor:i,transparency:n}}function XD(c,e){if(c!==null){if(typeof c=="string")return c[0]==="#"?Qi.fromHex(c):e.getColor(c);if(c instanceof Qi)return c;if(typeof c=="object")return eli(c,e)}}const pSt="vscode://schemas/workbench-colors",gSt=dh.as(iye.JSONContribution);gSt.registerSchema(pSt,sye.getColorSchema());const xmt=new id(()=>gSt.notifySchemaChanged(pSt),200);sye.onDidChangeSchema(()=>{xmt.isScheduled()||xmt.schedule()});const Or=Ft("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},V("foreground","Overall foreground color. This color is only used if not overridden by a component."));Ft("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},V("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component."));Ft("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},V("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component."));Ft("descriptionForeground",{light:"#717171",dark:yo(Or,.7),hcDark:yo(Or,.7),hcLight:yo(Or,.7)},V("descriptionForeground","Foreground color for description text providing additional information, for example for a label."));const XN=Ft("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},V("iconForeground","The default color for icons in the workbench.")),ek=Ft("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},V("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),ec=Ft("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},V("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),bf=Ft("contrastActiveBorder",{light:null,dark:null,hcDark:ek,hcLight:ek},V("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast."));Ft("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},V("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor."));const ili=Ft("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},V("textLinkForeground","Foreground color for links in text."));Ft("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},V("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover."));Ft("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:Qi.black,hcLight:"#292929"},V("textSeparatorForeground","Color for text separators."));Ft("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},V("textPreformatForeground","Foreground color for preformatted text segments."));Ft("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},V("textPreformatBackground","Background color for preformatted text segments."));Ft("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},V("textBlockQuoteBackground","Background color for block quotes in text."));Ft("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:Qi.white,hcLight:"#292929"},V("textBlockQuoteBorder","Border color for block quotes in text."));Ft("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:Qi.black,hcLight:"#F2F2F2"},V("textCodeBlockBackground","Background color for code blocks in text."));Ft("sash.hoverBorder",{dark:ek,light:ek,hcDark:ek,hcLight:ek},V("sashActiveBorder","Border color of active sashes."));const Kme=Ft("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:Qi.black,hcLight:"#0F4A85"},V("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),nli=Ft("badge.foreground",{dark:Qi.white,light:"#333",hcDark:Qi.white,hcLight:Qi.white},V("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),wee=Ft("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},V("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),xee=Ft("scrollbarSlider.background",{dark:Qi.fromHex("#797979").transparent(.4),light:Qi.fromHex("#646464").transparent(.4),hcDark:yo(ec,.6),hcLight:yo(ec,.4)},V("scrollbarSliderBackground","Scrollbar slider background color.")),kee=Ft("scrollbarSlider.hoverBackground",{dark:Qi.fromHex("#646464").transparent(.7),light:Qi.fromHex("#646464").transparent(.7),hcDark:yo(ec,.8),hcLight:yo(ec,.8)},V("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),Tee=Ft("scrollbarSlider.activeBackground",{dark:Qi.fromHex("#BFBFBF").transparent(.4),light:Qi.fromHex("#000000").transparent(.6),hcDark:ec,hcLight:ec},V("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),rli=Ft("progressBar.background",{dark:Qi.fromHex("#0E70C0"),light:Qi.fromHex("#0E70C0"),hcDark:ec,hcLight:ec},V("progressBarBackground","Background color of the progress bar that can show for long running operations.")),Vg=Ft("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:Qi.black,hcLight:Qi.white},V("editorBackground","Editor background color.")),tk=Ft("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:Qi.white,hcLight:Or},V("editorForeground","Editor default foreground color."));Ft("editorStickyScroll.background",{light:Vg,dark:Vg,hcDark:Vg,hcLight:Vg},V("editorStickyScrollBackground","Background color of sticky scroll in the editor"));Ft("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:Qi.fromHex("#0F4A85").transparent(.1)},V("editorStickyScrollHoverBackground","Background color of sticky scroll on hover in the editor"));Ft("editorStickyScroll.border",{dark:null,light:null,hcDark:ec,hcLight:ec},V("editorStickyScrollBorder","Border color of sticky scroll in the editor"));Ft("editorStickyScroll.shadow",{dark:wee,light:wee,hcDark:wee,hcLight:wee},V("editorStickyScrollShadow"," Shadow color of sticky scroll in the editor"));const I_=Ft("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:Qi.white},V("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),C4=Ft("editorWidget.foreground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),S4=Ft("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:ec,hcLight:ec},V("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget."));Ft("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},V("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget."));Ft("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},V("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);const ZN=Ft("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},V("editorError.foreground","Foreground color of error squigglies in the editor.")),sli=Ft("editorError.border",{dark:null,light:null,hcDark:Qi.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},V("errorBorder","If set, color of double underlines for errors in the editor.")),Sge=Ft("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},V("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),k1=Ft("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},V("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),Zte=Ft("editorWarning.border",{dark:null,light:null,hcDark:Qi.fromHex("#FFCC00").transparent(.8),hcLight:Qi.fromHex("#FFCC00").transparent(.8)},V("warningBorder","If set, color of double underlines for warnings in the editor."));Ft("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},V("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);const xb=Ft("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},V("editorInfo.foreground","Foreground color of info squigglies in the editor.")),Yte=Ft("editorInfo.border",{dark:null,light:null,hcDark:Qi.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},V("infoBorder","If set, color of double underlines for infos in the editor.")),oli=Ft("editorHint.foreground",{dark:Qi.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},V("editorHint.foreground","Foreground color of hint squigglies in the editor."));Ft("editorHint.border",{dark:null,light:null,hcDark:Qi.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},V("hintBorder","If set, color of double underlines for hints in the editor."));const ali=Ft("editorLink.activeForeground",{dark:"#4E94CE",light:Qi.blue,hcDark:Qi.cyan,hcLight:"#292929"},V("activeLinkForeground","Color of active links.")),wM=Ft("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},V("editorSelectionBackground","Color of the editor selection.")),lli=Ft("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:Qi.white},V("editorSelectionForeground","Color of the selected text for high contrast.")),mSt=Ft("editor.inactiveSelectionBackground",{light:yo(wM,.5),dark:yo(wM,.5),hcDark:yo(wM,.7),hcLight:yo(wM,.5)},V("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),aje=Ft("editor.selectionHighlightBackground",{light:wmt(wM,Vg,.3,.6),dark:wmt(wM,Vg,.3,.6),hcDark:null,hcLight:null},V("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0);Ft("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:bf,hcLight:bf},V("editorSelectionHighlightBorder","Border color for regions with the same content as the selection."));Ft("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},V("editorFindMatch","Color of the current search match."));const cli=Ft("editor.findMatchForeground",{light:null,dark:null,hcDark:null,hcLight:null},V("editorFindMatchForeground","Text color of the current search match.")),w4=Ft("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},V("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),uli=Ft("editor.findMatchHighlightForeground",{light:null,dark:null,hcDark:null,hcLight:null},V("findMatchHighlightForeground","Foreground color of the other search matches."),!0);Ft("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},V("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0);Ft("editor.findMatchBorder",{light:null,dark:null,hcDark:bf,hcLight:bf},V("editorFindMatchBorder","Border color of the current search match."));const xM=Ft("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:bf,hcLight:bf},V("findMatchHighlightBorder","Border color of the other search matches.")),dli=Ft("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:yo(bf,.4),hcLight:yo(bf,.4)},V("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0);Ft("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},V("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0);const Z0e=Ft("editorHoverWidget.background",{light:I_,dark:I_,hcDark:I_,hcLight:I_},V("hoverBackground","Background color of the editor hover."));Ft("editorHoverWidget.foreground",{light:C4,dark:C4,hcDark:C4,hcLight:C4},V("hoverForeground","Foreground color of the editor hover."));const vSt=Ft("editorHoverWidget.border",{light:S4,dark:S4,hcDark:S4,hcLight:S4},V("hoverBorder","Border color of the editor hover."));Ft("editorHoverWidget.statusBarBackground",{dark:CE(Z0e,.2),light:Z9(Z0e,.05),hcDark:I_,hcLight:I_},V("statusBarBackground","Background color of the editor hover status bar."));const x4=Ft("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:Qi.white,hcLight:Qi.black},V("editorInlayHintForeground","Foreground color of inline hints")),k4=Ft("editorInlayHint.background",{dark:yo(Kme,.1),light:yo(Kme,.1),hcDark:yo(Qi.white,.1),hcLight:yo(Kme,.1)},V("editorInlayHintBackground","Background color of inline hints")),fli=Ft("editorInlayHint.typeForeground",{dark:x4,light:x4,hcDark:x4,hcLight:x4},V("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),hli=Ft("editorInlayHint.typeBackground",{dark:k4,light:k4,hcDark:k4,hcLight:k4},V("editorInlayHintBackgroundTypes","Background color of inline hints for types")),_li=Ft("editorInlayHint.parameterForeground",{dark:x4,light:x4,hcDark:x4,hcLight:x4},V("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),pli=Ft("editorInlayHint.parameterBackground",{dark:k4,light:k4,hcDark:k4,hcLight:k4},V("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),wge=Ft("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},V("editorLightBulbForeground","The color used for the lightbulb actions icon."));Ft("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},V("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon."));Ft("editorLightBulbAi.foreground",{dark:wge,light:wge,hcDark:wge,hcLight:wge},V("editorLightBulbAiForeground","The color used for the lightbulb AI icon."));Ft("editor.snippetTabstopHighlightBackground",{dark:new Qi(new bc(124,124,124,.3)),light:new Qi(new bc(10,50,100,.2)),hcDark:new Qi(new bc(124,124,124,.3)),hcLight:new Qi(new bc(10,50,100,.2))},V("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop."));Ft("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},V("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop."));Ft("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},V("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet."));Ft("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new Qi(new bc(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},V("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet."));const u9e=new Qi(new bc(155,185,85,.2)),d9e=new Qi(new bc(255,0,0,.2)),gli=Ft("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},V("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),mli=Ft("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},V("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0);Ft("diffEditor.insertedLineBackground",{dark:u9e,light:u9e,hcDark:null,hcLight:null},V("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0);Ft("diffEditor.removedLineBackground",{dark:d9e,light:d9e,hcDark:null,hcLight:null},V("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0);Ft("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},V("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted."));Ft("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},V("diffEditorRemovedLineGutter","Background color for the margin where lines got removed."));const vli=Ft("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},V("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),yli=Ft("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},V("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content."));Ft("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},V("diffEditorInsertedOutline","Outline color for the text that got inserted."));Ft("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},V("diffEditorRemovedOutline","Outline color for text that got removed."));Ft("diffEditor.border",{dark:null,light:null,hcDark:ec,hcLight:ec},V("diffEditorBorder","Border color between the two text editors."));Ft("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},V("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views."));Ft("diffEditor.unchangedRegionBackground",{dark:"sideBar.background",light:"sideBar.background",hcDark:"sideBar.background",hcLight:"sideBar.background"},V("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor."));Ft("diffEditor.unchangedRegionForeground",{dark:"foreground",light:"foreground",hcDark:"foreground",hcLight:"foreground"},V("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor."));Ft("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},V("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor."));const T4=Ft("widget.shadow",{dark:yo(Qi.black,.36),light:yo(Qi.black,.16),hcDark:null,hcLight:null},V("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),ySt=Ft("widget.border",{dark:null,light:null,hcDark:ec,hcLight:ec},V("widgetBorder","Border color of widgets such as find/replace inside the editor.")),kmt=Ft("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},V("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse"));Ft("toolbar.hoverOutline",{dark:null,light:null,hcDark:bf,hcLight:bf},V("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse"));Ft("toolbar.activeBackground",{dark:CE(kmt,.1),light:Z9(kmt,.1),hcDark:null,hcLight:null},V("toolbarActiveBackground","Toolbar background when holding the mouse over actions"));const bli=Ft("breadcrumb.foreground",{light:yo(Or,.8),dark:yo(Or,.8),hcDark:yo(Or,.8),hcLight:yo(Or,.8)},V("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),Cli=Ft("breadcrumb.background",{light:Vg,dark:Vg,hcDark:Vg,hcLight:Vg},V("breadcrumbsBackground","Background color of breadcrumb items.")),Tmt=Ft("breadcrumb.focusForeground",{light:Z9(Or,.2),dark:CE(Or,.1),hcDark:CE(Or,.1),hcLight:CE(Or,.1)},V("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),Sli=Ft("breadcrumb.activeSelectionForeground",{light:Z9(Or,.2),dark:CE(Or,.1),hcDark:CE(Or,.1),hcLight:CE(Or,.1)},V("breadcrumbsSelectedForeground","Color of selected breadcrumb items."));Ft("breadcrumbPicker.background",{light:I_,dark:I_,hcDark:I_,hcLight:I_},V("breadcrumbsSelectedBackground","Background color of breadcrumb item picker."));const bSt=.5,Dmt=Qi.fromHex("#40C8AE").transparent(bSt),Emt=Qi.fromHex("#40A6FF").transparent(bSt),Imt=Qi.fromHex("#606060").transparent(.4),aT=.4,iq=1,Zz=Ft("merge.currentHeaderBackground",{dark:Dmt,light:Dmt,hcDark:null,hcLight:null},V("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);Ft("merge.currentContentBackground",{dark:yo(Zz,aT),light:yo(Zz,aT),hcDark:yo(Zz,aT),hcLight:yo(Zz,aT)},V("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const Yz=Ft("merge.incomingHeaderBackground",{dark:Emt,light:Emt,hcDark:null,hcLight:null},V("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);Ft("merge.incomingContentBackground",{dark:yo(Yz,aT),light:yo(Yz,aT),hcDark:yo(Yz,aT),hcLight:yo(Yz,aT)},V("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const eU=Ft("merge.commonHeaderBackground",{dark:Imt,light:Imt,hcDark:null,hcLight:null},V("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);Ft("merge.commonContentBackground",{dark:yo(eU,aT),light:yo(eU,aT),hcDark:yo(eU,aT),hcLight:yo(eU,aT)},V("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const nq=Ft("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},V("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."));Ft("editorOverviewRuler.currentContentForeground",{dark:yo(Zz,iq),light:yo(Zz,iq),hcDark:nq,hcLight:nq},V("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts."));Ft("editorOverviewRuler.incomingContentForeground",{dark:yo(Yz,iq),light:yo(Yz,iq),hcDark:nq,hcLight:nq},V("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts."));Ft("editorOverviewRuler.commonContentForeground",{dark:yo(eU,iq),light:yo(eU,iq),hcDark:nq,hcLight:nq},V("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts."));const lje=Ft("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},V("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),Dee=Ft("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},V("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),wli=Ft("problemsErrorIcon.foreground",{dark:ZN,light:ZN,hcDark:ZN,hcLight:ZN},V("problemsErrorIconForeground","The color used for the problems error icon.")),xli=Ft("problemsWarningIcon.foreground",{dark:k1,light:k1,hcDark:k1,hcLight:k1},V("problemsWarningIconForeground","The color used for the problems warning icon.")),kli=Ft("problemsInfoIcon.foreground",{dark:xb,light:xb,hcDark:xb,hcLight:xb},V("problemsInfoIconForeground","The color used for the problems info icon.")),tU=Ft("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},V("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),oye=Ft("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},V("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),Nmt=Ft("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},V("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),Tli=Ft("minimap.infoHighlight",{dark:xb,light:xb,hcDark:Yte,hcLight:Yte},V("minimapInfo","Minimap marker color for infos.")),Dli=Ft("minimap.warningHighlight",{dark:k1,light:k1,hcDark:Zte,hcLight:Zte},V("overviewRuleWarning","Minimap marker color for warnings.")),Eli=Ft("minimap.errorHighlight",{dark:new Qi(new bc(255,18,18,.7)),light:new Qi(new bc(255,18,18,.7)),hcDark:new Qi(new bc(255,50,50,1)),hcLight:"#B5200D"},V("minimapError","Minimap marker color for errors.")),Ili=Ft("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},V("minimapBackground","Minimap background color.")),Nli=Ft("minimap.foregroundOpacity",{dark:Qi.fromHex("#000f"),light:Qi.fromHex("#000f"),hcDark:Qi.fromHex("#000f"),hcLight:Qi.fromHex("#000f")},V("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.'));Ft("minimapSlider.background",{light:yo(xee,.5),dark:yo(xee,.5),hcDark:yo(xee,.5),hcLight:yo(xee,.5)},V("minimapSliderBackground","Minimap slider background color."));Ft("minimapSlider.hoverBackground",{light:yo(kee,.5),dark:yo(kee,.5),hcDark:yo(kee,.5),hcLight:yo(kee,.5)},V("minimapSliderHoverBackground","Minimap slider background color when hovering."));Ft("minimapSlider.activeBackground",{light:yo(Tee,.5),dark:yo(Tee,.5),hcDark:yo(Tee,.5),hcLight:yo(Tee,.5)},V("minimapSliderActiveBackground","Minimap slider background color when clicked on."));Ft("charts.foreground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("chartsForeground","The foreground color used in charts."));Ft("charts.lines",{dark:yo(Or,.5),light:yo(Or,.5),hcDark:yo(Or,.5),hcLight:yo(Or,.5)},V("chartsLines","The color used for horizontal lines in charts."));Ft("charts.red",{dark:ZN,light:ZN,hcDark:ZN,hcLight:ZN},V("chartsRed","The red color used in chart visualizations."));Ft("charts.blue",{dark:xb,light:xb,hcDark:xb,hcLight:xb},V("chartsBlue","The blue color used in chart visualizations."));Ft("charts.yellow",{dark:k1,light:k1,hcDark:k1,hcLight:k1},V("chartsYellow","The yellow color used in chart visualizations."));Ft("charts.orange",{dark:tU,light:tU,hcDark:tU,hcLight:tU},V("chartsOrange","The orange color used in chart visualizations."));Ft("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},V("chartsGreen","The green color used in chart visualizations."));Ft("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},V("chartsPurple","The purple color used in chart visualizations."));const f9e=Ft("input.background",{dark:"#3C3C3C",light:Qi.white,hcDark:Qi.black,hcLight:Qi.white},V("inputBoxBackground","Input box background.")),CSt=Ft("input.foreground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("inputBoxForeground","Input box foreground.")),SSt=Ft("input.border",{dark:null,light:null,hcDark:ec,hcLight:ec},V("inputBoxBorder","Input box border.")),cje=Ft("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:ec,hcLight:ec},V("inputBoxActiveOptionBorder","Border color of activated options in input fields."));Ft("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},V("inputOption.hoverBackground","Background color of activated options in input fields."));const q5=Ft("inputOption.activeBackground",{dark:yo(ek,.4),light:yo(ek,.2),hcDark:Qi.transparent,hcLight:Qi.transparent},V("inputOption.activeBackground","Background hover color of options in input fields.")),uje=Ft("inputOption.activeForeground",{dark:Qi.white,light:Qi.black,hcDark:Or,hcLight:Or},V("inputOption.activeForeground","Foreground color of activated options in input fields."));Ft("input.placeholderForeground",{light:yo(Or,.5),dark:yo(Or,.5),hcDark:yo(Or,.7),hcLight:yo(Or,.7)},V("inputPlaceholderForeground","Input box foreground color for placeholder text."));const Lli=Ft("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:Qi.black,hcLight:Qi.white},V("inputValidationInfoBackground","Input validation background color for information severity.")),Pli=Ft("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:Or},V("inputValidationInfoForeground","Input validation foreground color for information severity.")),Ali=Ft("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:ec,hcLight:ec},V("inputValidationInfoBorder","Input validation border color for information severity.")),Oli=Ft("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:Qi.black,hcLight:Qi.white},V("inputValidationWarningBackground","Input validation background color for warning severity.")),Mli=Ft("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:Or},V("inputValidationWarningForeground","Input validation foreground color for warning severity.")),Rli=Ft("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:ec,hcLight:ec},V("inputValidationWarningBorder","Input validation border color for warning severity.")),Fli=Ft("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:Qi.black,hcLight:Qi.white},V("inputValidationErrorBackground","Input validation background color for error severity.")),Bli=Ft("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:Or},V("inputValidationErrorForeground","Input validation foreground color for error severity.")),Wli=Ft("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:ec,hcLight:ec},V("inputValidationErrorBorder","Input validation border color for error severity.")),YN=Ft("dropdown.background",{dark:"#3C3C3C",light:Qi.white,hcDark:Qi.black,hcLight:Qi.white},V("dropdownBackground","Dropdown background.")),Vli=Ft("dropdown.listBackground",{dark:null,light:null,hcDark:Qi.black,hcLight:Qi.white},V("dropdownListBackground","Dropdown list background.")),D4=Ft("dropdown.foreground",{dark:"#F0F0F0",light:Or,hcDark:Qi.white,hcLight:Or},V("dropdownForeground","Dropdown foreground.")),iU=Ft("dropdown.border",{dark:YN,light:"#CECECE",hcDark:ec,hcLight:ec},V("dropdownBorder","Dropdown border.")),Eee=Ft("button.foreground",{dark:Qi.white,light:Qi.white,hcDark:Qi.white,hcLight:Qi.white},V("buttonForeground","Button foreground color.")),Hli=Ft("button.separator",{dark:yo(Eee,.4),light:yo(Eee,.4),hcDark:yo(Eee,.4),hcLight:yo(Eee,.4)},V("buttonSeparator","Button separator color.")),Iee=Ft("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},V("buttonBackground","Button background color.")),jli=Ft("button.hoverBackground",{dark:CE(Iee,.2),light:Z9(Iee,.2),hcDark:Iee,hcLight:Iee},V("buttonHoverBackground","Button background color when hovering.")),zli=Ft("button.border",{dark:ec,light:ec,hcDark:ec,hcLight:ec},V("buttonBorder","Button border color.")),Uli=Ft("button.secondaryForeground",{dark:Qi.white,light:Qi.white,hcDark:Qi.white,hcLight:Or},V("buttonSecondaryForeground","Secondary button foreground color.")),h9e=Ft("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:Qi.white},V("buttonSecondaryBackground","Secondary button background color.")),qli=Ft("button.secondaryHoverBackground",{dark:CE(h9e,.2),light:Z9(h9e,.2),hcDark:null,hcLight:null},V("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),$li=Ft("checkbox.background",{dark:YN,light:YN,hcDark:YN,hcLight:YN},V("checkbox.background","Background color of checkbox widget."));Ft("checkbox.selectBackground",{dark:I_,light:I_,hcDark:I_,hcLight:I_},V("checkbox.select.background","Background color of checkbox widget when the element it's in is selected."));const Jli=Ft("checkbox.foreground",{dark:D4,light:D4,hcDark:D4,hcLight:D4},V("checkbox.foreground","Foreground color of checkbox widget.")),Gli=Ft("checkbox.border",{dark:iU,light:iU,hcDark:iU,hcLight:iU},V("checkbox.border","Border color of checkbox widget."));Ft("checkbox.selectBorder",{dark:XN,light:XN,hcDark:XN,hcLight:XN},V("checkbox.select.border","Border color of checkbox widget when the element it's in is selected."));const Kli=Ft("keybindingLabel.background",{dark:new Qi(new bc(128,128,128,.17)),light:new Qi(new bc(221,221,221,.4)),hcDark:Qi.transparent,hcLight:Qi.transparent},V("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),Qli=Ft("keybindingLabel.foreground",{dark:Qi.fromHex("#CCCCCC"),light:Qi.fromHex("#555555"),hcDark:Qi.white,hcLight:Or},V("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),Xli=Ft("keybindingLabel.border",{dark:new Qi(new bc(51,51,51,.6)),light:new Qi(new bc(204,204,204,.4)),hcDark:new Qi(new bc(111,195,223)),hcLight:ec},V("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),Zli=Ft("keybindingLabel.bottomBorder",{dark:new Qi(new bc(68,68,68,.6)),light:new Qi(new bc(187,187,187,.4)),hcDark:new Qi(new bc(111,195,223)),hcLight:Or},V("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),Yli=Ft("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},V("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),eci=Ft("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},V("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tci=Ft("list.focusOutline",{dark:ek,light:ek,hcDark:bf,hcLight:bf},V("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),ici=Ft("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},V("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),E4=Ft("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:Qi.fromHex("#0F4A85").transparent(.1)},V("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),eL=Ft("list.activeSelectionForeground",{dark:Qi.white,light:Qi.white,hcDark:null,hcLight:null},V("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Nee=Ft("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},V("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),nci=Ft("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:Qi.fromHex("#0F4A85").transparent(.1)},V("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),rci=Ft("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},V("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),sci=Ft("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},V("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),oci=Ft("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},V("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),aci=Ft("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},V("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),wSt=Ft("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:Qi.white.transparent(.1),hcLight:Qi.fromHex("#0F4A85").transparent(.1)},V("listHoverBackground","List/Tree background when hovering over items using the mouse.")),xSt=Ft("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},V("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),lci=Ft("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},V("listDropBackground","List/Tree drag and drop background when moving items over other items when using the mouse.")),cci=Ft("list.dropBetweenBackground",{dark:XN,light:XN,hcDark:null,hcLight:null},V("listDropBetweenBackground","List/Tree drag and drop border color when moving items between items when using the mouse.")),lT=Ft("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:ek,hcLight:ek},V("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),xge=Ft("list.focusHighlightForeground",{dark:lT,light:tli(E4,lT,"#BBE7FF"),hcDark:lT,hcLight:lT},V("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));Ft("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},V("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer."));Ft("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},V("listErrorForeground","Foreground color of list items containing errors."));Ft("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},V("listWarningForeground","Foreground color of list items containing warnings."));const uci=Ft("listFilterWidget.background",{light:Z9(I_,0),dark:CE(I_,0),hcDark:I_,hcLight:I_},V("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),dci=Ft("listFilterWidget.outline",{dark:Qi.transparent,light:Qi.transparent,hcDark:"#f38518",hcLight:"#007ACC"},V("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),fci=Ft("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:ec,hcLight:ec},V("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),hci=Ft("listFilterWidget.shadow",{dark:T4,light:T4,hcDark:T4,hcLight:T4},V("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees."));Ft("list.filterMatchBackground",{dark:w4,light:w4,hcDark:null,hcLight:null},V("listFilterMatchHighlight","Background color of the filtered match."));Ft("list.filterMatchBorder",{dark:xM,light:xM,hcDark:ec,hcLight:bf},V("listFilterMatchHighlightBorder","Border color of the filtered match."));Ft("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},V("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized."));const Lee=Ft("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},V("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),_ci=Ft("tree.inactiveIndentGuidesStroke",{dark:yo(Lee,.4),light:yo(Lee,.4),hcDark:yo(Lee,.4),hcLight:yo(Lee,.4)},V("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),pci=Ft("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},V("tableColumnsBorder","Table border color between columns.")),gci=Ft("tree.tableOddRowsBackground",{dark:yo(Or,.04),light:yo(Or,.04),hcDark:null,hcLight:null},V("tableOddRowsBackgroundColor","Background color for odd table rows.")),mci=Ft("menu.border",{dark:null,light:null,hcDark:ec,hcLight:ec},V("menuBorder","Border color of menus.")),vci=Ft("menu.foreground",{dark:D4,light:D4,hcDark:D4,hcLight:D4},V("menuForeground","Foreground color of menu items.")),yci=Ft("menu.background",{dark:YN,light:YN,hcDark:YN,hcLight:YN},V("menuBackground","Background color of menu items.")),bci=Ft("menu.selectionForeground",{dark:eL,light:eL,hcDark:eL,hcLight:eL},V("menuSelectionForeground","Foreground color of the selected menu item in menus.")),Cci=Ft("menu.selectionBackground",{dark:E4,light:E4,hcDark:E4,hcLight:E4},V("menuSelectionBackground","Background color of the selected menu item in menus.")),Sci=Ft("menu.selectionBorder",{dark:null,light:null,hcDark:bf,hcLight:bf},V("menuSelectionBorder","Border color of the selected menu item in menus.")),wci=Ft("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:ec,hcLight:ec},V("menuSeparatorBackground","Color of a separator menu item in menus.")),Lmt=Ft("quickInput.background",{dark:I_,light:I_,hcDark:I_,hcLight:I_},V("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),xci=Ft("quickInput.foreground",{dark:C4,light:C4,hcDark:C4,hcLight:C4},V("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),kci=Ft("quickInputTitle.background",{dark:new Qi(new bc(255,255,255,.105)),light:new Qi(new bc(0,0,0,.06)),hcDark:"#000000",hcLight:Qi.white},V("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),kSt=Ft("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:Qi.white,hcLight:"#0F4A85"},V("pickerGroupForeground","Quick picker color for grouping labels.")),Tci=Ft("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:Qi.white,hcLight:"#0F4A85"},V("pickerGroupBorder","Quick picker color for grouping borders.")),Pmt=Ft("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,V("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),kM=Ft("quickInputList.focusForeground",{dark:eL,light:eL,hcDark:eL,hcLight:eL},V("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),nU=Ft("quickInputList.focusIconForeground",{dark:Nee,light:Nee,hcDark:Nee,hcLight:Nee},V("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),TM=Ft("quickInputList.focusBackground",{dark:Xte(Pmt,E4),light:Xte(Pmt,E4),hcDark:null,hcLight:null},V("quickInput.listFocusBackground","Quick picker background color for the focused item."));Ft("search.resultsInfoForeground",{light:Or,dark:yo(Or,.65),hcDark:Or,hcLight:Or},V("search.resultsInfoForeground","Color of the text in the search viewlet's completion message."));Ft("searchEditor.findMatchBackground",{light:yo(w4,.66),dark:yo(w4,.66),hcDark:w4,hcLight:w4},V("searchEditor.queryMatch","Color of the Search Editor query matches."));Ft("searchEditor.findMatchBorder",{light:yo(xM,.66),dark:yo(xM,.66),hcDark:xM,hcLight:xM},V("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."));class aye{constructor(e,i){this.x=e,this.y=i,this._pageCoordinatesBrand=void 0}toClientCoordinates(e){return new TSt(this.x-e.scrollX,this.y-e.scrollY)}}class TSt{constructor(e,i){this.clientX=e,this.clientY=i,this._clientCoordinatesBrand=void 0}toPageCoordinates(e){return new aye(this.clientX+e.scrollX,this.clientY+e.scrollY)}}class Dci{constructor(e,i,n,s){this.x=e,this.y=i,this.width=n,this.height=s,this._editorPagePositionBrand=void 0}}class Eci{constructor(e,i){this.x=e,this.y=i,this._positionRelativeToEditorBrand=void 0}}function dje(c){const e=Y_(c);return new Dci(e.left,e.top,e.width,e.height)}function fje(c,e,i){const n=e.width/c.offsetWidth,s=e.height/c.offsetHeight,l=(i.x-e.x)/n,d=(i.y-e.y)/s;return new Eci(l,d)}class rR extends sT{constructor(e,i,n){super(Io(n),e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=i,this.pos=new aye(this.posx,this.posy),this.editorPos=dje(n),this.relativePos=fje(n,this.editorPos,this.pos)}}class Ici{constructor(e){this._editorViewDomNode=e}_create(e){return new rR(e,!1,this._editorViewDomNode)}onContextMenu(e,i){return tn(e,"contextmenu",n=>{i(this._create(n))})}onMouseUp(e,i){return tn(e,"mouseup",n=>{i(this._create(n))})}onMouseDown(e,i){return tn(e,yr.MOUSE_DOWN,n=>{i(this._create(n))})}onPointerDown(e,i){return tn(e,yr.POINTER_DOWN,n=>{i(this._create(n),n.pointerId)})}onMouseLeave(e,i){return tn(e,yr.MOUSE_LEAVE,n=>{i(this._create(n))})}onMouseMove(e,i){return tn(e,"mousemove",n=>i(this._create(n)))}}class Nci{constructor(e){this._editorViewDomNode=e}_create(e){return new rR(e,!1,this._editorViewDomNode)}onPointerUp(e,i){return tn(e,"pointerup",n=>{i(this._create(n))})}onPointerDown(e,i){return tn(e,yr.POINTER_DOWN,n=>{i(this._create(n),n.pointerId)})}onPointerLeave(e,i){return tn(e,yr.POINTER_LEAVE,n=>{i(this._create(n))})}onPointerMove(e,i){return tn(e,"pointermove",n=>i(this._create(n)))}}class Lci extends Ii{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new Uq),this._keydownListener=null}startMonitoring(e,i,n,s,l){this._keydownListener=n_(e.ownerDocument,"keydown",d=>{d.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,d.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(e,i,n,d=>{s(new rR(d,!0,this._editorViewDomNode))},d=>{this._keydownListener.dispose(),l(d)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}class Dne{constructor(e){this._editor=e,this._instanceId=++Dne._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new id(()=>this.garbageCollect(),1e3)}createClassNameRef(e){const i=this.getOrCreateRule(e);return i.increaseRefCount(),{className:i.className,dispose:()=>{i.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){const i=this.computeUniqueKey(e);let n=this._rules.get(i);if(!n){const s=this._counter++;n=new Pci(i,`dyn-rule-${this._instanceId}-${s}`,V0e(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(i,n)}return n}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(const e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}}Dne._idPool=0;class Pci{constructor(e,i,n,s){this.key=e,this.className=i,this.properties=s,this._referenceCount=0,this._styleElementDisposables=new On,this._styleElement=Sw(n,void 0,this._styleElementDisposables),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,i){let n=`.${e} {`;for(const s in i){const l=i[s];let d;typeof l=="object"?d=vs(l.id):d=l;const f=Aci(s);n+=` + ${f}: ${d};`}return n+=` +}`,n}dispose(){this._styleElementDisposables.dispose(),this._styleElement=void 0}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function Aci(c){return c.replace(/(^[A-Z])/,([e])=>e.toLowerCase()).replace(/([A-Z])/g,([e])=>`-${e.toLowerCase()}`)}class Ene extends Ii{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let i=!1;for(let n=0,s=e.length;n=f.left?s.width=Math.max(s.width,f.left+f.width-s.left):(i[n++]=s,s=f)}return i[n++]=s,i}static _createHorizontalRangesFromClientRects(e,i,n){if(!e||e.length===0)return null;const s=[];for(let l=0,d=e.length;lg)return null;if(i=Math.min(g,Math.max(0,i)),s=Math.min(g,Math.max(0,s)),i===s&&n===l&&n===0&&!e.children[i].firstChild){const I=e.children[i].getClientRects();return d.markDidDomLayout(),this._createHorizontalRangesFromClientRects(I,d.clientRectDeltaLeft,d.clientRectScale)}i!==s&&s>0&&l===0&&(s--,l=1073741824);let y=e.children[i].firstChild,w=e.children[s].firstChild;if((!y||!w)&&(!y&&n===0&&i>0&&(y=e.children[i-1].firstChild,n=1073741824),!w&&l===0&&s>0&&(w=e.children[s-1].firstChild,l=1073741824)),!y||!w)return null;n=Math.min(y.textContent.length,Math.max(0,n)),l=Math.min(w.textContent.length,Math.max(0,l));const x=this._readClientRects(y,n,w,l,d.endNode);return d.markDidDomLayout(),this._createHorizontalRangesFromClientRects(x,d.clientRectDeltaLeft,d.clientRectScale)}}var ik;(function(c){c.DARK="dark",c.LIGHT="light",c.HIGH_CONTRAST_DARK="hcDark",c.HIGH_CONTRAST_LIGHT="hcLight"})(ik||(ik={}));function SE(c){return c===ik.HIGH_CONTRAST_DARK||c===ik.HIGH_CONTRAST_LIGHT}function rq(c){return c===ik.DARK||c===ik.HIGH_CONTRAST_DARK}const Bci=function(){return mE?!0:!(Ty||ok||q4)}();let TU=!0;class Omt{constructor(e,i){this.themeType=i;const n=e.options,s=n.get(50);n.get(38)==="off"?this.renderWhitespace=n.get(99):this.renderWhitespace="none",this.renderControlCharacters=n.get(94),this.spaceWidth=s.spaceWidth,this.middotWidth=s.middotWidth,this.wsmiddotWidth=s.wsmiddotWidth,this.useMonospaceOptimizations=s.isMonospace&&!n.get(33),this.canUseHalfwidthRightwardsArrow=s.canUseHalfwidthRightwardsArrow,this.lineHeight=n.get(67),this.stopRenderingLineAfter=n.get(117),this.fontLigatures=n.get(51)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class qN{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(this._renderedViewLine)this._renderedViewLine.domNode=pu(e);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return SE(this._options.themeType)||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(e,i,n,s,l){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const d=s.getViewLineRenderingData(e),f=this._options,g=Sy.filter(d.inlineDecorations,e,d.minColumn,d.maxColumn);let y=null;if(SE(f.themeType)||this._options.renderWhitespace==="selection"){const P=s.selections;for(const O of P){if(O.endLineNumbere)continue;const W=O.startLineNumber===e?O.startColumn:d.minColumn,X=O.endLineNumber===e?O.endColumn:d.maxColumn;W');const x=kne(w,l);l.appendString("");let I=null;return TU&&Bci&&d.isBasicASCII&&f.useMonospaceOptimizations&&x.containsForeignElements===0&&(I=new kge(this._renderedViewLine?this._renderedViewLine.domNode:null,w,x.characterMapping)),I||(I=ESt(this._renderedViewLine?this._renderedViewLine.domNode:null,w,x.characterMapping,x.containsRTL,x.containsForeignElements)),this._renderedViewLine=I,!0}layoutLine(e,i,n){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(i),this._renderedViewLine.domNode.setHeight(n))}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof kge:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof kge?this._renderedViewLine.monospaceAssumptionsAreValid():TU}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof kge&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,i,n,s){if(!this._renderedViewLine)return null;i=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,i)),n=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,n));const l=this._renderedViewLine.input.stopRenderingLineAfter;if(l!==-1&&i>l+1&&n>l+1)return new Amt(!0,[new n9(this.getWidth(s),0)]);l!==-1&&i>l+1&&(i=l+1),l!==-1&&n>l+1&&(n=l+1);const d=this._renderedViewLine.getVisibleRangesForRange(e,i,n,s);return d&&d.length>0?new Amt(!1,d):null}getColumnOfNodeOffset(e,i){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,i):1}}qN.CLASS_NAME="view-line";class kge{constructor(e,i,n){this._cachedWidth=-1,this.domNode=e,this.input=i;const s=Math.floor(i.lineContent.length/300);if(s>0){this._keyColumnPixelOffsetCache=new Float32Array(s);for(let l=0;l=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),TU=!1)}return TU}toSlowRenderedLine(){return ESt(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,i,n,s){const l=this._getColumnPixelOffset(e,i,s),d=this._getColumnPixelOffset(e,n,s);return[new n9(l,d-l)]}_getColumnPixelOffset(e,i,n){if(i<=300){const y=this._characterMapping.getHorizontalOffset(i);return this._charWidth*y}const s=Math.floor((i-1)/300)-1,l=(s+1)*300+1;let d=-1;if(this._keyColumnPixelOffsetCache&&(d=this._keyColumnPixelOffsetCache[s],d===-1&&(d=this._actualReadPixelOffset(e,l,n),this._keyColumnPixelOffsetCache[s]=d)),d===-1){const y=this._characterMapping.getHorizontalOffset(i);return this._charWidth*y}const f=this._characterMapping.getHorizontalOffset(l),g=this._characterMapping.getHorizontalOffset(i);return d+this._charWidth*(g-f)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,i,n){if(!this.domNode)return-1;const s=this._characterMapping.getDomPosition(i),l=Qme.readHorizontalRanges(this._getReadingTarget(this.domNode),s.partIndex,s.charIndex,s.partIndex,s.charIndex,n);return!l||l.length===0?-1:l[0].left}getColumnOfNodeOffset(e,i){return hje(this._characterMapping,e,i)}}class DSt{constructor(e,i,n,s,l){if(this.domNode=e,this.input=i,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(i.lineContent),this._containsForeignElements=l,this._cachedWidth=-1,this._pixelOffsetCache=null,!s||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let d=0,f=this._characterMapping.length;d<=f;d++)this._pixelOffsetCache[d]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,e==null||e.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(e,i,n,s){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const l=this._readPixelOffset(this.domNode,e,i,s);if(l===-1)return null;const d=this._readPixelOffset(this.domNode,e,n,s);return d===-1?null:[new n9(l,d-l)]}return this._readVisibleRangesForRange(this.domNode,e,i,n,s)}_readVisibleRangesForRange(e,i,n,s,l){if(n===s){const d=this._readPixelOffset(e,i,n,l);return d===-1?null:[new n9(d,0)]}else return this._readRawVisibleRangesForRange(e,n,s,l)}_readPixelOffset(e,i,n,s){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth(s);const l=this._getReadingTarget(e);return l.firstChild?(s.markDidDomLayout(),l.firstChild.offsetWidth):0}if(this._pixelOffsetCache!==null){const l=this._pixelOffsetCache[n];if(l!==-1)return l;const d=this._actualReadPixelOffset(e,i,n,s);return this._pixelOffsetCache[n]=d,d}return this._actualReadPixelOffset(e,i,n,s)}_actualReadPixelOffset(e,i,n,s){if(this._characterMapping.length===0){const g=Qme.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,s);return!g||g.length===0?-1:g[0].left}if(n===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth(s);const l=this._characterMapping.getDomPosition(n),d=Qme.readHorizontalRanges(this._getReadingTarget(e),l.partIndex,l.charIndex,l.partIndex,l.charIndex,s);if(!d||d.length===0)return-1;const f=d[0].left;if(this.input.isBasicASCII){const g=this._characterMapping.getHorizontalOffset(n),y=Math.round(this.input.spaceWidth*g);if(Math.abs(y-f)<=1)return y}return f}_readRawVisibleRangesForRange(e,i,n,s){if(i===1&&n===this._characterMapping.length)return[new n9(0,this.getWidth(s))];const l=this._characterMapping.getDomPosition(i),d=this._characterMapping.getDomPosition(n);return Qme.readHorizontalRanges(this._getReadingTarget(e),l.partIndex,l.charIndex,d.partIndex,d.charIndex,s)}getColumnOfNodeOffset(e,i){return hje(this._characterMapping,e,i)}}class Wci extends DSt{_readVisibleRangesForRange(e,i,n,s,l){const d=super._readVisibleRangesForRange(e,i,n,s,l);if(!d||d.length===0||n===s||n===1&&s===this._characterMapping.length)return d;if(!this.input.containsRTL){const f=this._readPixelOffset(e,i,s,l);if(f!==-1){const g=d[d.length-1];g.left=i){const x=i-d;return y-i=4&&e[0]===3&&e[3]===8}static isStrictChildOfViewLines(e){return e.length>4&&e[0]===3&&e[3]===8}static isChildOfScrollableElement(e){return e.length>=2&&e[0]===3&&e[1]===6}static isChildOfMinimap(e){return e.length>=2&&e[0]===3&&e[1]===9}static isChildOfContentWidgets(e){return e.length>=4&&e[0]===3&&e[3]===1}static isChildOfOverflowGuard(e){return e.length>=1&&e[0]===3}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&e[0]===2}static isChildOfOverlayWidgets(e){return e.length>=2&&e[0]===3&&e[1]===4}static isChildOfOverflowingOverlayWidgets(e){return e.length>=1&&e[0]===5}}class sq{constructor(e,i,n){this.viewModel=e.viewModel;const s=e.configuration.options;this.layoutInfo=s.get(145),this.viewDomNode=i.viewDomNode,this.lineHeight=s.get(67),this.stickyTabStops=s.get(116),this.typicalHalfwidthCharacterWidth=s.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=n,this._context=e,this._viewHelper=i}getZoneAtCoord(e){return sq.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,i){const n=e.viewLayout.getWhitespaceAtVerticalOffset(i);if(n){const s=n.verticalOffset+n.height/2,l=e.viewModel.getLineCount();let d=null,f,g=null;return n.afterLineNumber!==l&&(g=new yi(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(d=new yi(n.afterLineNumber,e.viewModel.getLineMaxColumn(n.afterLineNumber))),g===null?f=d:d===null?f=g:i=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,C1._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class Uci extends zci{get target(){return this._useHitTestTarget?this.hitTestResult.value.hitTarget:this._eventTarget}get targetPath(){return this._targetPathCacheElement!==this.target&&(this._targetPathCacheElement=this.target,this._targetPathCacheValue=NE.collect(this.target,this._ctx.viewDomNode)),this._targetPathCacheValue}constructor(e,i,n,s,l){super(e,i,n,s),this.hitTestResult=new FE(()=>C1.doHitTest(this._ctx,this)),this._targetPathCacheElement=null,this._targetPathCacheValue=new Uint8Array(0),this._ctx=e,this._eventTarget=l;const d=!!this._eventTarget;this._useHitTestTarget=!d}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset} + target: ${this.target?this.target.outerHTML:null}`}get wouldBenefitFromHitTestTargetSwitch(){return!this._useHitTestTarget&&this.hitTestResult.value.hitTarget!==null&&this.target!==this.hitTestResult.value.hitTarget}switchToHitTestTarget(){this._useHitTestTarget=!0}_getMouseColumn(e=null){return e&&e.columnd.contentLeft+d.width)continue;const f=e.getVerticalOffsetForLineNumber(d.position.lineNumber);if(f<=l&&l<=f+d.height)return i.fulfillContentText(d.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,i){const n=e.getZoneAtCoord(i.mouseVerticalOffset);if(n){const s=i.isInContentArea?8:5;return i.fulfillViewZone(s,n.position,n)}return null}static _hitTestTextArea(e,i){return uy.isTextArea(i.targetPath)?e.lastRenderData.lastTextareaPosition?i.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):i.fulfillTextarea():null}static _hitTestMargin(e,i){if(i.isInMarginArea){const n=e.getFullLineRangeAtCoord(i.mouseVerticalOffset),s=n.range.getStartPosition();let l=Math.abs(i.relativePos.x);const d={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:l};if(l-=e.layoutInfo.glyphMarginLeft,l<=e.layoutInfo.glyphMarginWidth){const f=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(n.range.getStartPosition()),g=e.viewModel.glyphLanes.getLanesAtLine(f.lineNumber);return d.glyphMarginLane=g[Math.floor(l/e.lineHeight)],i.fulfillMargin(2,s,n.range,d)}return l-=e.layoutInfo.glyphMarginWidth,l<=e.layoutInfo.lineNumbersWidth?i.fulfillMargin(3,s,n.range,d):(l-=e.layoutInfo.lineNumbersWidth,i.fulfillMargin(4,s,n.range,d))}return null}static _hitTestViewLines(e,i){if(!uy.isChildOfViewLines(i.targetPath))return null;if(e.isInTopPadding(i.mouseVerticalOffset))return i.fulfillContentEmpty(new yi(1,1),Mmt);if(e.isAfterLines(i.mouseVerticalOffset)||e.isInBottomPadding(i.mouseVerticalOffset)){const s=e.viewModel.getLineCount(),l=e.viewModel.getLineMaxColumn(s);return i.fulfillContentEmpty(new yi(s,l),Mmt)}if(uy.isStrictChildOfViewLines(i.targetPath)){const s=e.getLineNumberAtVerticalOffset(i.mouseVerticalOffset);if(e.viewModel.getLineLength(s)===0){const d=e.getLineWidth(s),f=e7e(i.mouseContentHorizontalOffset-d);return i.fulfillContentEmpty(new yi(s,1),f)}const l=e.getLineWidth(s);if(i.mouseContentHorizontalOffset>=l){const d=e7e(i.mouseContentHorizontalOffset-l),f=new yi(s,e.viewModel.getLineMaxColumn(s));return i.fulfillContentEmpty(f,d)}}const n=i.hitTestResult.value;return n.type===1?C1.createMouseTargetFromHitTestPosition(e,i,n.spanNode,n.position,n.injectedText):i.wouldBenefitFromHitTestTargetSwitch?(i.switchToHitTestTarget(),this._createMouseTarget(e,i)):i.fulfillUnknown()}static _hitTestMinimap(e,i){if(uy.isChildOfMinimap(i.targetPath)){const n=e.getLineNumberAtVerticalOffset(i.mouseVerticalOffset),s=e.viewModel.getLineMaxColumn(n);return i.fulfillScrollbar(new yi(n,s))}return null}static _hitTestScrollbarSlider(e,i){if(uy.isChildOfScrollableElement(i.targetPath)&&i.target&&i.target.nodeType===1){const n=i.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){const s=e.getLineNumberAtVerticalOffset(i.mouseVerticalOffset),l=e.viewModel.getLineMaxColumn(s);return i.fulfillScrollbar(new yi(s,l))}}return null}static _hitTestScrollbar(e,i){if(uy.isChildOfScrollableElement(i.targetPath)){const n=e.getLineNumberAtVerticalOffset(i.mouseVerticalOffset),s=e.viewModel.getLineMaxColumn(n);return i.fulfillScrollbar(new yi(n,s))}return null}getMouseColumn(e){const i=this._context.configuration.options,n=i.get(145),s=this._context.viewLayout.getCurrentScrollLeft()+e.x-n.contentLeft;return C1._getMouseColumn(s,i.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,i){return e<0?1:Math.round(e/i)+1}static createMouseTargetFromHitTestPosition(e,i,n,s,l){const d=s.lineNumber,f=s.column,g=e.getLineWidth(d);if(i.mouseContentHorizontalOffset>g){const Z=e7e(i.mouseContentHorizontalOffset-g);return i.fulfillContentEmpty(s,Z)}const y=e.visibleRangeForPosition(d,f);if(!y)return i.fulfillUnknown(s);const w=y.left;if(Math.abs(i.mouseContentHorizontalOffset-w)<1)return i.fulfillContentText(s,null,{mightBeForeignElement:!!l,injectedText:l});const x=[];if(x.push({offset:y.left,column:f}),f>1){const Z=e.visibleRangeForPosition(d,f-1);Z&&x.push({offset:Z.left,column:f-1})}const I=e.viewModel.getLineMaxColumn(d);if(fZ.offset-ee.offset);const P=i.pos.toClientCoordinates(Io(e.viewDomNode)),O=n.getBoundingClientRect(),W=O.left<=P.clientX&&P.clientX<=O.right;let X=null;for(let Z=1;Zl)){const f=Math.floor((s+l)/2);let g=i.pos.y+(f-i.mouseVerticalOffset);g<=i.editorPos.y&&(g=i.editorPos.y+1),g>=i.editorPos.y+i.editorPos.height&&(g=i.editorPos.y+i.editorPos.height-1);const y=new aye(i.pos.x,g),w=this._actualDoHitTestWithCaretRangeFromPoint(e,y.toClientCoordinates(Io(e.viewDomNode)));if(w.type===1)return w}return this._actualDoHitTestWithCaretRangeFromPoint(e,i.pos.toClientCoordinates(Io(e.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(e,i){const n=y9(e.viewDomNode);let s;if(n?typeof n.caretRangeFromPoint>"u"?s=qci(n,i.clientX,i.clientY):s=n.caretRangeFromPoint(i.clientX,i.clientY):s=e.viewDomNode.ownerDocument.caretRangeFromPoint(i.clientX,i.clientY),!s||!s.startContainer)return new iM;const l=s.startContainer;if(l.nodeType===l.TEXT_NODE){const d=l.parentNode,f=d?d.parentNode:null,g=f?f.parentNode:null;return(g&&g.nodeType===g.ELEMENT_NODE?g.className:null)===qN.CLASS_NAME?F5.createFromDOMInfo(e,d,s.startOffset):new iM(l.parentNode)}else if(l.nodeType===l.ELEMENT_NODE){const d=l.parentNode,f=d?d.parentNode:null;return(f&&f.nodeType===f.ELEMENT_NODE?f.className:null)===qN.CLASS_NAME?F5.createFromDOMInfo(e,l,l.textContent.length):new iM(l)}return new iM}static _doHitTestWithCaretPositionFromPoint(e,i){const n=e.viewDomNode.ownerDocument.caretPositionFromPoint(i.clientX,i.clientY);if(n.offsetNode.nodeType===n.offsetNode.TEXT_NODE){const s=n.offsetNode.parentNode,l=s?s.parentNode:null,d=l?l.parentNode:null;return(d&&d.nodeType===d.ELEMENT_NODE?d.className:null)===qN.CLASS_NAME?F5.createFromDOMInfo(e,n.offsetNode.parentNode,n.offset):new iM(n.offsetNode.parentNode)}if(n.offsetNode.nodeType===n.offsetNode.ELEMENT_NODE){const s=n.offsetNode.parentNode,l=s&&s.nodeType===s.ELEMENT_NODE?s.className:null,d=s?s.parentNode:null,f=d&&d.nodeType===d.ELEMENT_NODE?d.className:null;if(l===qN.CLASS_NAME){const g=n.offsetNode.childNodes[Math.min(n.offset,n.offsetNode.childNodes.length-1)];if(g)return F5.createFromDOMInfo(e,g,0)}else if(f===qN.CLASS_NAME)return F5.createFromDOMInfo(e,n.offsetNode,0)}return new iM(n.offsetNode)}static _snapToSoftTabBoundary(e,i){const n=i.getLineContent(e.lineNumber),{tabSize:s}=i.model.getOptions(),l=eie.atomicPosition(n,e.column-1,s,2);return l!==-1?new yi(e.lineNumber,l+1):e}static doHitTest(e,i){let n=new iM;if(typeof e.viewDomNode.ownerDocument.caretRangeFromPoint=="function"?n=this._doHitTestWithCaretRangeFromPoint(e,i):e.viewDomNode.ownerDocument.caretPositionFromPoint&&(n=this._doHitTestWithCaretPositionFromPoint(e,i.pos.toClientCoordinates(Io(e.viewDomNode)))),n.type===1){const s=e.viewModel.getInjectedTextAt(n.position),l=e.viewModel.normalizePosition(n.position,2);(s||!l.equals(n.position))&&(n=new ISt(l,n.spanNode,s))}return n}}function qci(c,e,i){const n=document.createRange();let s=c.elementFromPoint(e,i);if(s!==null){for(;s&&s.firstChild&&s.firstChild.nodeType!==s.firstChild.TEXT_NODE&&s.lastChild&&s.lastChild.firstChild;)s=s.lastChild;const l=s.getBoundingClientRect(),d=Io(s),f=d.getComputedStyle(s,null).getPropertyValue("font-style"),g=d.getComputedStyle(s,null).getPropertyValue("font-variant"),y=d.getComputedStyle(s,null).getPropertyValue("font-weight"),w=d.getComputedStyle(s,null).getPropertyValue("font-size"),x=d.getComputedStyle(s,null).getPropertyValue("line-height"),I=d.getComputedStyle(s,null).getPropertyValue("font-family"),P=`${f} ${g} ${y} ${w}/${x} ${I}`,O=s.innerText;let W=l.left,X=0,Z;if(e>l.left+l.width)X=O.length;else{const ee=$5.getInstance();for(let he=0;he=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Gd;(function(c){c.Tap="-monaco-gesturetap",c.Change="-monaco-gesturechange",c.Start="-monaco-gesturestart",c.End="-monaco-gesturesend",c.Contextmenu="-monaco-gesturecontextmenu"})(Gd||(Gd={}));class Jd extends Ii{constructor(){super(),this.dispatched=!1,this.targets=new yy,this.ignoreTargets=new yy,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(Mr.runAndSubscribe(W1e,({window:e,disposables:i})=>{i.add(tn(e.document,"touchstart",n=>this.onTouchStart(n),{passive:!1})),i.add(tn(e.document,"touchend",n=>this.onTouchEnd(e,n))),i.add(tn(e.document,"touchmove",n=>this.onTouchMove(n),{passive:!1}))},{window:ed,disposables:this._store}))}static addTarget(e){if(!Jd.isTouchDevice())return Ii.None;Jd.INSTANCE||(Jd.INSTANCE=new Jd);const i=Jd.INSTANCE.targets.push(e);return go(i)}static ignoreTarget(e){if(!Jd.isTouchDevice())return Ii.None;Jd.INSTANCE||(Jd.INSTANCE=new Jd);const i=Jd.INSTANCE.ignoreTargets.push(e);return go(i)}static isTouchDevice(){return"ontouchstart"in ed||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){const i=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,s=e.targetTouches.length;n=Jd.HOLD_DELAY&&Math.abs(g.initialPageX-Ux(g.rollingPageX))<30&&Math.abs(g.initialPageY-Ux(g.rollingPageY))<30){const w=this.newGestureEvent(Gd.Contextmenu,g.initialTarget);w.pageX=Ux(g.rollingPageX),w.pageY=Ux(g.rollingPageY),this.dispatchEvent(w)}else if(s===1){const w=Ux(g.rollingPageX),x=Ux(g.rollingPageY),I=Ux(g.rollingTimestamps)-g.rollingTimestamps[0],P=w-g.rollingPageX[0],O=x-g.rollingPageY[0],W=[...this.targets].filter(X=>g.initialTarget instanceof Node&&X.contains(g.initialTarget));this.inertia(e,W,n,Math.abs(P)/I,P>0?1:-1,w,Math.abs(O)/I,O>0?1:-1,x)}this.dispatchEvent(this.newGestureEvent(Gd.End,g.initialTarget)),delete this.activeTouches[f.identifier]}this.dispatched&&(i.preventDefault(),i.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,i){const n=document.createEvent("CustomEvent");return n.initEvent(e,!1,!0),n.initialTarget=i,n.tapCount=0,n}dispatchEvent(e){if(e.type===Gd.Tap){const i=new Date().getTime();let n=0;i-this._lastSetTapCountTime>Jd.CLEAR_TAP_COUNT_TIME?n=1:n=2,this._lastSetTapCountTime=i,e.tapCount=n}else(e.type===Gd.Change||e.type===Gd.Contextmenu)&&(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(const n of this.ignoreTargets)if(n.contains(e.initialTarget))return;const i=[];for(const n of this.targets)if(n.contains(e.initialTarget)){let s=0,l=e.initialTarget;for(;l&&l!==n;)s++,l=l.parentElement;i.push([s,n])}i.sort((n,s)=>n[0]-s[0]);for(const[n,s]of i)s.dispatchEvent(e),this.dispatched=!0}}inertia(e,i,n,s,l,d,f,g,y){this.handle=zC(e,()=>{const w=Date.now(),x=w-n;let I=0,P=0,O=!0;s+=Jd.SCROLL_FRICTION*x,f+=Jd.SCROLL_FRICTION*x,s>0&&(O=!1,I=l*s*x),f>0&&(O=!1,P=g*f*x);const W=this.newGestureEvent(Gd.Change);W.translationX=I,W.translationY=P,i.forEach(X=>X.dispatchEvent(W)),O||this.inertia(e,i,w,s,l,d+I,f,g,y+P)})}onTouchMove(e){const i=Date.now();for(let n=0,s=e.changedTouches.length;n3&&(d.rollingPageX.shift(),d.rollingPageY.shift(),d.rollingTimestamps.shift()),d.rollingPageX.push(l.pageX),d.rollingPageY.push(l.pageY),d.rollingTimestamps.push(i)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}Jd.SCROLL_FRICTION=-.005;Jd.HOLD_DELAY=700;Jd.CLEAR_TAP_COUNT_TIME=400;$ci([N_],Jd,"isTouchDevice",null);let Ew=class extends Ii{onclick(e,i){this._register(tn(e,yr.CLICK,n=>i(new sT(Io(e),n))))}onmousedown(e,i){this._register(tn(e,yr.MOUSE_DOWN,n=>i(new sT(Io(e),n))))}onmouseover(e,i){this._register(tn(e,yr.MOUSE_OVER,n=>i(new sT(Io(e),n))))}onmouseleave(e,i){this._register(tn(e,yr.MOUSE_LEAVE,n=>i(new sT(Io(e),n))))}onkeydown(e,i){this._register(tn(e,yr.KEY_DOWN,n=>i(new Fd(n))))}onkeyup(e,i){this._register(tn(e,yr.KEY_UP,n=>i(new Fd(n))))}oninput(e,i){this._register(tn(e,yr.INPUT,i))}onblur(e,i){this._register(tn(e,yr.BLUR,i))}onfocus(e,i){this._register(tn(e,yr.FOCUS,i))}ignoreGesture(e){return Jd.ignoreTarget(e)}};const oq=11;class Jci extends Ew{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...Uo.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width=oq+"px",this.domNode.style.height=oq+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new Uq),this._register(n_(this.bgDomNode,yr.POINTER_DOWN,i=>this._arrowPointerDown(i))),this._register(n_(this.domNode,yr.POINTER_DOWN,i=>this._arrowPointerDown(i))),this._pointerdownRepeatTimer=this._register(new FHe),this._pointerdownScheduleRepeatTimer=this._register(new gT)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const i=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,Io(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(i,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}}class Gci extends Ii{constructor(e,i,n){super(),this._visibility=e,this._visibleClassName=i,this._invisibleClassName=n,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new gT)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var e;(e=this._domNode)===null||e===void 0||e.setClassName(this._visibleClassName)},0))}_hide(e){var i;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(i=this._domNode)===null||i===void 0||i.setClassName(this._invisibleClassName+(e?" fade":"")))}}const Kci=140;class NSt extends Ew{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new Gci(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new Uq),this._shouldRender=!0,this.domNode=pu(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(tn(this.domNode.domNode,yr.POINTER_DOWN,i=>this._domNodePointerDown(i)))}_createArrow(e){const i=this._register(new Jci(e));this.domNode.domNode.appendChild(i.bgDomNode),this.domNode.domNode.appendChild(i.domNode)}_createSlider(e,i,n,s){this.slider=pu(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(i),typeof n=="number"&&this.slider.setWidth(n),typeof s=="number"&&this.slider.setHeight(s),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(tn(this.slider.domNode,yr.POINTER_DOWN,l=>{l.button===0&&(l.preventDefault(),this._sliderPointerDown(l))})),this.onclick(this.slider.domNode,l=>{l.leftButton&&l.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){const i=this.domNode.domNode.getClientRects()[0].top,n=i+this._scrollbarState.getSliderPosition(),s=i+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),l=this._sliderPointerPosition(e);n<=l&&l<=s?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let i,n;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")i=e.offsetX,n=e.offsetY;else{const l=Y_(this.domNode.domNode);i=e.pageX-l.left,n=e.pageY-l.top}const s=this._pointerDownRelativePosition(i,n);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(s):this._scrollbarState.getDesiredScrollPositionFromOffset(s)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const i=this._sliderPointerPosition(e),n=this._sliderOrthogonalPointerPosition(e),s=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,l=>{const d=this._sliderOrthogonalPointerPosition(l),f=Math.abs(d-n);if(M0&&f>Kci){this._setDesiredScrollPositionNow(s.getScrollPosition());return}const y=this._sliderPointerPosition(l)-i;this._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(y))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const i={};this.writeScrollPosition(i,e),this._scrollable.setScrollPositionNow(i)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}const Qci=20;class aq{constructor(e,i,n,s,l,d){this._scrollbarSize=Math.round(i),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=s,this._scrollSize=l,this._scrollPosition=d,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new aq(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const i=Math.round(e);return this._visibleSize!==i?(this._visibleSize=i,this._refreshComputedValues(),!0):!1}setScrollSize(e){const i=Math.round(e);return this._scrollSize!==i?(this._scrollSize=i,this._refreshComputedValues(),!0):!1}setScrollPosition(e){const i=Math.round(e);return this._scrollPosition!==i?(this._scrollPosition=i,this._refreshComputedValues(),!0):!1}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,i,n,s,l){const d=Math.max(0,n-e),f=Math.max(0,d-2*i),g=s>0&&s>n;if(!g)return{computedAvailableSize:Math.round(d),computedIsNeeded:g,computedSliderSize:Math.round(f),computedSliderRatio:0,computedSliderPosition:0};const y=Math.round(Math.max(Qci,Math.floor(n*f/s))),w=(f-y)/(s-n),x=l*w;return{computedAvailableSize:Math.round(d),computedIsNeeded:g,computedSliderSize:Math.round(y),computedSliderRatio:w,computedSliderPosition:Math.round(x)}}_refreshComputedValues(){const e=aq._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const i=e-this._arrowSize-this._computedSliderSize/2;return Math.round(i/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const i=e-this._arrowSize;let n=this._scrollPosition;return ithis._host.onMouseWheel(new v9(null,1,0))}),this._createArrow({className:"scra",icon:Dr.scrollbarButtonRight,top:f,left:void 0,bottom:void 0,right:d,bgWidth:i.arrowSize,bgHeight:i.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new v9(null,-1,0))})}this._createSlider(Math.floor((i.horizontalScrollbarSize-i.horizontalSliderSize)/2),0,void 0,i.horizontalSliderSize)}_updateSlider(e,i){this.slider.setWidth(e),this.slider.setLeft(i)}_renderDomNode(e,i){this.domNode.setWidth(e),this.domNode.setHeight(i),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,i){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,i){e.scrollLeft=i}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class Zci extends NSt{constructor(e,i,n){const s=e.getScrollDimensions(),l=e.getCurrentScrollPosition();if(super({lazyRender:i.lazyRender,host:n,scrollbarState:new aq(i.verticalHasArrows?i.arrowSize:0,i.vertical===2?0:i.verticalScrollbarSize,0,s.height,s.scrollHeight,l.scrollTop),visibility:i.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:i.scrollByPage}),i.verticalHasArrows){const d=(i.arrowSize-oq)/2,f=(i.verticalScrollbarSize-oq)/2;this._createArrow({className:"scra",icon:Dr.scrollbarButtonUp,top:d,left:f,bottom:void 0,right:void 0,bgWidth:i.verticalScrollbarSize,bgHeight:i.arrowSize,onActivate:()=>this._host.onMouseWheel(new v9(null,0,1))}),this._createArrow({className:"scra",icon:Dr.scrollbarButtonDown,top:void 0,left:f,bottom:d,right:void 0,bgWidth:i.verticalScrollbarSize,bgHeight:i.arrowSize,onActivate:()=>this._host.onMouseWheel(new v9(null,0,-1))})}this._createSlider(0,Math.floor((i.verticalScrollbarSize-i.verticalSliderSize)/2),i.verticalSliderSize,void 0)}_updateSlider(e,i){this.slider.setHeight(e),this.slider.setTop(i)}_renderDomNode(e,i){this.domNode.setWidth(i),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,i){return i}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,i){e.scrollTop=i}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}class Y0e{constructor(e,i,n,s,l,d,f){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(i=i|0,n=n|0,s=s|0,l=l|0,d=d|0,f=f|0),this.rawScrollLeft=s,this.rawScrollTop=f,i<0&&(i=0),s+i>n&&(s=n-i),s<0&&(s=0),l<0&&(l=0),f+l>d&&(f=d-l),f<0&&(f=0),this.width=i,this.scrollWidth=n,this.scrollLeft=s,this.height=l,this.scrollHeight=d,this.scrollTop=f}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,i){return new Y0e(this._forceIntegerValues,typeof e.width<"u"?e.width:this.width,typeof e.scrollWidth<"u"?e.scrollWidth:this.scrollWidth,i?this.rawScrollLeft:this.scrollLeft,typeof e.height<"u"?e.height:this.height,typeof e.scrollHeight<"u"?e.scrollHeight:this.scrollHeight,i?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new Y0e(this._forceIntegerValues,this.width,this.scrollWidth,typeof e.scrollLeft<"u"?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof e.scrollTop<"u"?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,i){const n=this.width!==e.width,s=this.scrollWidth!==e.scrollWidth,l=this.scrollLeft!==e.scrollLeft,d=this.height!==e.height,f=this.scrollHeight!==e.scrollHeight,g=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:i,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:s,scrollLeftChanged:l,heightChanged:d,scrollHeightChanged:f,scrollTopChanged:g}}}class qq extends Ii{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new ui),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new Y0e(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,i){var n;const s=this._state.withScrollDimensions(e,i);this._setState(s,!!this._smoothScrolling),(n=this._smoothScrolling)===null||n===void 0||n.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const i=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(i,!1)}setScrollPositionSmooth(e,i){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};const n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;let s;i?s=new tie(this._smoothScrolling.from,n,this._smoothScrolling.startTime,this._smoothScrolling.duration):s=this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=s}else{const n=this._state.withScrollPosition(e);this._smoothScrolling=tie.start(this._state,n,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),i=this._state.withScrollPosition(e);if(this._setState(i,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,i){const n=this._state;n.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(n,i)))}}class Rmt{constructor(e,i,n){this.scrollLeft=e,this.scrollTop=i,this.isDone=n}}function t7e(c,e){const i=e-c;return function(n){return c+i*tui(n)}}function Yci(c,e,i){return function(n){return n2.5*n){let l,d;return e0&&Math.abs(e.deltaY)>0)return 1;let n=.5;if((!this._isAlmostInt(e.deltaX)||!this._isAlmostInt(e.deltaY))&&(n+=.25),i){const s=Math.abs(e.deltaX),l=Math.abs(e.deltaY),d=Math.abs(i.deltaX),f=Math.abs(i.deltaY),g=Math.max(Math.min(s,d),1),y=Math.max(Math.min(l,f),1),w=Math.max(s,d),x=Math.max(l,f);w%g===0&&x%y===0&&(n-=.5)}return Math.min(Math.max(n,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}eve.INSTANCE=new eve;class _je extends Ew{get options(){return this._options}constructor(e,i,n){super(),this._onScroll=this._register(new ui),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new ui),e.style.overflow="hidden",this._options=rui(i),this._scrollable=n,this._register(this._scrollable.onScroll(l=>{this._onWillScroll.fire(l),this._onDidScroll(l),this._onScroll.fire(l)}));const s={onMouseWheel:l=>this._onMouseWheel(l),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new Zci(this._scrollable,this._options,s)),this._horizontalScrollbar=this._register(new Xci(this._scrollable,this._options,s)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=pu(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=pu(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=pu(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,l=>this._onMouseOver(l)),this.onmouseleave(this._listenOnDomNode,l=>this._onMouseLeave(l)),this._hideTimeout=this._register(new gT),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=yd(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,Wl&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new v9(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=yd(this._mouseWheelToDispose),e)){const n=s=>{this._onMouseWheel(new v9(s))};this._mouseWheelToDispose.push(tn(this._listenOnDomNode,yr.MOUSE_WHEEL,n,{passive:!1}))}}_onMouseWheel(e){var i;if(!((i=e.browserEvent)===null||i===void 0)&&i.defaultPrevented)return;const n=eve.INSTANCE;n.acceptStandardWheelEvent(e);let s=!1;if(e.deltaY||e.deltaX){let d=e.deltaY*this._options.mouseWheelScrollSensitivity,f=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&f+d===0?f=d=0:Math.abs(d)>=Math.abs(f)?f=0:d=0),this._options.flipAxes&&([d,f]=[f,d]);const g=!Wl&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||g)&&!f&&(f=d,d=0),e.browserEvent&&e.browserEvent.altKey&&(f=f*this._options.fastScrollSensitivity,d=d*this._options.fastScrollSensitivity);const y=this._scrollable.getFutureScrollPosition();let w={};if(d){const x=Fmt*d,I=y.scrollTop-(x<0?Math.floor(x):Math.ceil(x));this._verticalScrollbar.writeScrollPosition(w,I)}if(f){const x=Fmt*f,I=y.scrollLeft-(x<0?Math.floor(x):Math.ceil(x));this._horizontalScrollbar.writeScrollPosition(w,I)}w=this._scrollable.validateScrollPosition(w),(y.scrollLeft!==w.scrollLeft||y.scrollTop!==w.scrollTop)&&(this._options.mouseWheelSmoothScroll&&n.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(w):this._scrollable.setScrollPositionNow(w),s=!0)}let l=s;!l&&this._options.alwaysConsumeMouseWheel&&(l=!0),!l&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(l=!0),l&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),i=e.scrollTop>0,n=e.scrollLeft>0,s=n?" left":"",l=i?" top":"",d=n||i?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${s}`),this._topShadowDomNode.setClassName(`shadow${l}`),this._topLeftShadowDomNode.setClassName(`shadow${d}${l}${s}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),iui)}}class LSt extends _je{constructor(e,i){i=i||{},i.mouseWheelSmoothScroll=!1;const n=new qq({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:s=>zC(Io(e),s)});super(e,i,n),this._register(n)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class cye extends _je{constructor(e,i,n){super(e,i,n)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class Ine extends _je{constructor(e,i){i=i||{},i.mouseWheelSmoothScroll=!1;const n=new qq({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:s=>zC(Io(e),s)});super(e,i,n),this._register(n),this._element=e,this._register(this.onScroll(s=>{s.scrollTopChanged&&(this._element.scrollTop=s.scrollTop),s.scrollLeftChanged&&(this._element.scrollLeft=s.scrollLeft)})),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}function rui(c){const e={lazyRender:typeof c.lazyRender<"u"?c.lazyRender:!1,className:typeof c.className<"u"?c.className:"",useShadows:typeof c.useShadows<"u"?c.useShadows:!0,handleMouseWheel:typeof c.handleMouseWheel<"u"?c.handleMouseWheel:!0,flipAxes:typeof c.flipAxes<"u"?c.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof c.consumeMouseWheelIfScrollbarIsNeeded<"u"?c.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof c.alwaysConsumeMouseWheel<"u"?c.alwaysConsumeMouseWheel:!1,scrollYToX:typeof c.scrollYToX<"u"?c.scrollYToX:!1,mouseWheelScrollSensitivity:typeof c.mouseWheelScrollSensitivity<"u"?c.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof c.fastScrollSensitivity<"u"?c.fastScrollSensitivity:5,scrollPredominantAxis:typeof c.scrollPredominantAxis<"u"?c.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof c.mouseWheelSmoothScroll<"u"?c.mouseWheelSmoothScroll:!0,arrowSize:typeof c.arrowSize<"u"?c.arrowSize:11,listenOnDomNode:typeof c.listenOnDomNode<"u"?c.listenOnDomNode:null,horizontal:typeof c.horizontal<"u"?c.horizontal:1,horizontalScrollbarSize:typeof c.horizontalScrollbarSize<"u"?c.horizontalScrollbarSize:10,horizontalSliderSize:typeof c.horizontalSliderSize<"u"?c.horizontalSliderSize:0,horizontalHasArrows:typeof c.horizontalHasArrows<"u"?c.horizontalHasArrows:!1,vertical:typeof c.vertical<"u"?c.vertical:1,verticalScrollbarSize:typeof c.verticalScrollbarSize<"u"?c.verticalScrollbarSize:10,verticalHasArrows:typeof c.verticalHasArrows<"u"?c.verticalHasArrows:!1,verticalSliderSize:typeof c.verticalSliderSize<"u"?c.verticalSliderSize:0,scrollByPage:typeof c.scrollByPage<"u"?c.scrollByPage:!1};return e.horizontalSliderSize=typeof c.horizontalSliderSize<"u"?c.horizontalSliderSize:e.horizontalScrollbarSize,e.verticalSliderSize=typeof c.verticalSliderSize<"u"?c.verticalSliderSize:e.verticalScrollbarSize,Wl&&(e.className+=" mac"),e}class pje extends Ene{constructor(e,i,n){super(),this._mouseLeaveMonitor=null,this._context=e,this.viewController=i,this.viewHelper=n,this.mouseTargetFactory=new C1(this._context,n),this._mouseDownOperation=this._register(new sui(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(d,f)=>this._createMouseTarget(d,f),d=>this._getMouseColumn(d))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(145).height;const s=new Ici(this.viewHelper.viewDomNode);this._register(s.onContextMenu(this.viewHelper.viewDomNode,d=>this._onContextMenu(d,!0))),this._register(s.onMouseMove(this.viewHelper.viewDomNode,d=>{this._onMouseMove(d),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=tn(this.viewHelper.viewDomNode.ownerDocument,"mousemove",f=>{this.viewHelper.viewDomNode.contains(f.target)||this._onMouseLeave(new rR(f,!1,this.viewHelper.viewDomNode))}))})),this._register(s.onMouseUp(this.viewHelper.viewDomNode,d=>this._onMouseUp(d))),this._register(s.onMouseLeave(this.viewHelper.viewDomNode,d=>this._onMouseLeave(d)));let l=0;this._register(s.onPointerDown(this.viewHelper.viewDomNode,(d,f)=>{l=f})),this._register(tn(this.viewHelper.viewDomNode,yr.POINTER_UP,d=>{this._mouseDownOperation.onPointerUp()})),this._register(s.onMouseDown(this.viewHelper.viewDomNode,d=>this._onMouseDown(d,l))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const e=eve.INSTANCE;let i=0,n=Kx.getZoomLevel(),s=!1,l=0;const d=g=>{if(this.viewController.emitMouseWheel(g),!this._context.configuration.options.get(76))return;const y=new v9(g);if(e.acceptStandardWheelEvent(y),e.isPhysicalMouseWheel()){if(f(g)){const w=Kx.getZoomLevel(),x=y.deltaY>0?1:-1;Kx.setZoomLevel(w+x),y.preventDefault(),y.stopPropagation()}}else Date.now()-i>50&&(n=Kx.getZoomLevel(),s=f(g),l=0),i=Date.now(),l+=y.deltaY,s&&(Kx.setZoomLevel(n+l/5),y.preventDefault(),y.stopPropagation())};this._register(tn(this.viewHelper.viewDomNode,yr.MOUSE_WHEEL,d,{capture:!0,passive:!1}));function f(g){return Wl?(g.metaKey||g.ctrlKey)&&!g.shiftKey&&!g.altKey:g.ctrlKey&&!g.metaKey&&!g.shiftKey&&!g.altKey}}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(145)){const i=this._context.configuration.options.get(145).height;this._height!==i&&(this._height=i,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,i){const s=new TSt(e,i).toPageCoordinates(Io(this.viewHelper.viewDomNode)),l=dje(this.viewHelper.viewDomNode);if(s.yl.y+l.height||s.xl.x+l.width)return null;const d=fje(this.viewHelper.viewDomNode,l,s);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),l,s,d,null)}_createMouseTarget(e,i){let n=e.target;if(!this.viewHelper.viewDomNode.contains(n)){const s=y9(this.viewHelper.viewDomNode);s&&(n=s.elementsFromPoint(e.posx,e.posy).find(l=>this.viewHelper.viewDomNode.contains(l)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,i?n:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,i){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,i)})}_onMouseMove(e){this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),!(this._mouseDownOperation.isActive()||e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(w&&(s||d&&f))x(),this._mouseDownOperation.start(n.type,e,i);else if(l)e.preventDefault();else if(g){const I=n.detail;w&&this.viewHelper.shouldSuppressMouseDownOnViewZone(I.viewZoneId)&&(x(),this._mouseDownOperation.start(n.type,e,i),e.preventDefault())}else y&&this.viewHelper.shouldSuppressMouseDownOnWidget(n.detail)&&(x(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:n})}}class sui extends Ii{constructor(e,i,n,s,l,d){super(),this._context=e,this._viewController=i,this._viewHelper=n,this._mouseTargetFactory=s,this._createMouseTarget=l,this._getMouseColumn=d,this._mouseMoveMonitor=this._register(new Lci(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new oui(this._context,this._viewHelper,this._mouseTargetFactory,(f,g,y)=>this._dispatchMouse(f,g,y))),this._mouseState=new uye,this._currentSelection=new Qs(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const i=this._findMousePosition(e,!1);i&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:i}):i.type===13&&(i.outsidePosition==="above"||i.outsidePosition==="below")?this._topBottomDragScrolling.start(i,e):(this._topBottomDragScrolling.stop(),this._dispatchMouse(i,!0,1)))}start(e,i,n){this._lastMouseEvent=i,this._mouseState.setStartedOnLineNumbers(e===3),this._mouseState.setStartButtons(i),this._mouseState.setModifiers(i);const s=this._findMousePosition(i,!0);if(!s||!s.position)return;this._mouseState.trySetCount(i.detail,s.position),i.detail=this._mouseState.count;const l=this._context.configuration.options;if(!l.get(91)&&l.get(35)&&!l.get(22)&&!this._mouseState.altKey&&i.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&s.type===6&&s.position&&this._currentSelection.containsPosition(s.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,n,i.buttons,d=>this._onMouseDownThenMove(d),d=>{const f=this._findMousePosition(this._lastMouseEvent,!1);dM(d)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:f?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(s,i.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,n,i.buttons,d=>this._onMouseDownThenMove(d),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const i=e.editorPos,n=this._context.viewModel,s=this._context.viewLayout,l=this._getMouseColumn(e);if(e.posyi.y+i.height){const f=e.posy-i.y-i.height,g=s.getCurrentScrollTop()+e.relativePos.y,y=sq.getZoneAtCoord(this._context,g);if(y){const x=this._helpPositionJumpOverViewZone(y);if(x)return w1.createOutsideEditor(l,x,"below",f)}const w=s.getLineNumberAtVerticalOffset(g);return w1.createOutsideEditor(l,new yi(w,n.getLineMaxColumn(w)),"below",f)}const d=s.getLineNumberAtVerticalOffset(s.getCurrentScrollTop()+e.relativePos.y);if(e.posxi.x+i.width){const f=e.posx-i.x-i.width;return w1.createOutsideEditor(l,new yi(d,n.getLineMaxColumn(d)),"right",f)}return null}_findMousePosition(e,i){const n=this._getPositionOutsideEditor(e);if(n)return n;const s=this._createMouseTarget(e,i);if(!s.position)return null;if(s.type===8||s.type===5){const d=this._helpPositionJumpOverViewZone(s.detail);if(d)return w1.createViewZone(s.type,s.element,s.mouseColumn,d,s.detail)}return s}_helpPositionJumpOverViewZone(e){const i=new yi(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,s=e.positionAfter;return n&&s?n.isBefore(i)?n:s:null}_dispatchMouse(e,i,n){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:n,inSelectionMode:i,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:e.type===6&&e.detail.injectedText!==null})}}class oui extends Ii{constructor(e,i,n,s){super(),this._context=e,this._viewHelper=i,this._mouseTargetFactory=n,this._dispatchMouse=s,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,i){this._operation?this._operation.setPosition(e,i):this._operation=new aui(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,i)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class aui extends Ii{constructor(e,i,n,s,l,d){super(),this._context=e,this._viewHelper=i,this._mouseTargetFactory=n,this._dispatchMouse=s,this._position=l,this._mouseEvent=d,this._lastTime=Date.now(),this._animationFrameDisposable=zC(Io(d.browserEvent),()=>this._execute())}dispose(){this._animationFrameDisposable.dispose(),super.dispose()}setPosition(e,i){this._position=e,this._mouseEvent=i}_tick(){const e=Date.now(),i=e-this._lastTime;return this._lastTime=e,i}_getScrollSpeed(){const e=this._context.configuration.options.get(67),i=this._context.configuration.options.get(145).height/e,n=this._position.outsideDistance/e;return n<=1.5?Math.max(30,i*(1+n)):n<=3?Math.max(60,i*(2+n)):Math.max(200,i*(7+n))}_execute(){const e=this._context.configuration.options.get(67),i=this._getScrollSpeed(),n=this._tick(),s=i*(n/1e3)*e,l=this._position.outsidePosition==="above"?-s:s;this._context.viewModel.viewLayout.deltaScrollNow(0,l),this._viewHelper.renderNow();const d=this._context.viewLayout.getLinesViewportData(),f=this._position.outsidePosition==="above"?d.startLineNumber:d.endLineNumber;let g;{const y=dje(this._viewHelper.viewDomNode),w=this._context.configuration.options.get(145).horizontalScrollbarHeight,x=new aye(this._mouseEvent.pos.x,y.y+y.height-w-.1),I=fje(this._viewHelper.viewDomNode,y,x);g=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),y,x,I,null)}(!g.position||g.position.lineNumber!==f)&&(this._position.outsidePosition==="above"?g=w1.createOutsideEditor(this._position.mouseColumn,new yi(f,1),"above",this._position.outsideDistance):g=w1.createOutsideEditor(this._position.mouseColumn,new yi(f,this._context.viewModel.getLineMaxColumn(f)),"below",this._position.outsideDistance)),this._dispatchMouse(g,!0,2),this._animationFrameDisposable=zC(Io(g.element),()=>this._execute())}}class uye{get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,i){const n=new Date().getTime();n-this._lastSetMouseDownCountTime>uye.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=n,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(i)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=i,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}uye.CLEAR_MOUSE_DOWN_COUNT_TIME=400;class Yl{get event(){return this.emitter.event}constructor(e,i,n){const s=l=>this.emitter.fire(l);this.emitter=new ui({onWillAddFirstListener:()=>e.addEventListener(i,s,n),onDidRemoveLastListener:()=>e.removeEventListener(i,s,n)})}dispose(){this.emitter.dispose()}}class Ym{constructor(e,i,n,s,l){this.value=e,this.selectionStart=i,this.selectionEnd=n,this.selection=s,this.newlineCountBeforeSelection=l}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,i){const n=e.getValue(),s=e.getSelectionStart(),l=e.getSelectionEnd();let d;if(i){const f=n.substring(0,s),g=i.value.substring(0,i.selectionStart);f===g&&(d=i.newlineCountBeforeSelection)}return new Ym(n,s,l,null,d)}collapseSelection(){return this.selectionStart===this.value.length?this:new Ym(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,i,n){i.setValue(e,this.value),n&&i.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){var i,n,s,l,d,f,g,y;if(e<=this.selectionStart){const I=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition((n=(i=this.selection)===null||i===void 0?void 0:i.getStartPosition())!==null&&n!==void 0?n:null,I,-1)}if(e>=this.selectionEnd){const I=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition((l=(s=this.selection)===null||s===void 0?void 0:s.getEndPosition())!==null&&l!==void 0?l:null,I,1)}const w=this.value.substring(this.selectionStart,e);if(w.indexOf("…")===-1)return this._finishDeduceEditorPosition((f=(d=this.selection)===null||d===void 0?void 0:d.getStartPosition())!==null&&f!==void 0?f:null,w,1);const x=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition((y=(g=this.selection)===null||g===void 0?void 0:g.getEndPosition())!==null&&y!==void 0?y:null,x,-1)}_finishDeduceEditorPosition(e,i,n){let s=0,l=-1;for(;(l=i.indexOf(` +`,l+1))!==-1;)s++;return[e,n*i.length,s]}static deduceInput(e,i,n){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const s=Math.min(YM(e.value,i.value),e.selectionStart,i.selectionStart),l=Math.min(M0e(e.value,i.value),e.value.length-e.selectionEnd,i.value.length-i.selectionEnd);e.value.substring(s,e.value.length-l);const d=i.value.substring(s,i.value.length-l),f=e.selectionStart-s,g=e.selectionEnd-s,y=i.selectionStart-s,w=i.selectionEnd-s;if(y===w){const I=e.selectionStart-s;return{text:d,replacePrevCharCnt:I,replaceNextCharCnt:0,positionDelta:0}}const x=g-f;return{text:d,replacePrevCharCnt:x,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===i.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:i.selectionEnd-e.selectionEnd};const n=Math.min(YM(e.value,i.value),e.selectionEnd),s=Math.min(M0e(e.value,i.value),e.value.length-e.selectionEnd),l=e.value.substring(n,e.value.length-s),d=i.value.substring(n,i.value.length-s);e.selectionStart-n;const f=e.selectionEnd-n;i.selectionStart-n;const g=i.selectionEnd-n;return{text:d,replacePrevCharCnt:f,replaceNextCharCnt:l.length-f,positionDelta:g-d.length}}}Ym.EMPTY=new Ym("",0,0,null,void 0);class rU{static _getPageOfLine(e,i){return Math.floor((e-1)/i)}static _getRangeForPage(e,i){const n=e*i,s=n+1,l=n+i;return new at(s,1,l+1,1)}static fromEditorSelection(e,i,n,s){const d=rU._getPageOfLine(i.startLineNumber,n),f=rU._getRangeForPage(d,n),g=rU._getPageOfLine(i.endLineNumber,n),y=rU._getRangeForPage(g,n);let w=f.intersectRanges(new at(1,1,i.startLineNumber,i.startColumn));if(s&&e.getValueLengthInRange(w,1)>500){const Z=e.modifyPosition(w.getEndPosition(),-500);w=at.fromPositions(Z,w.getEndPosition())}const x=e.getValueInRange(w,1),I=e.getLineCount(),P=e.getLineMaxColumn(I);let O=y.intersectRanges(new at(i.endLineNumber,i.endColumn,I,P));if(s&&e.getValueLengthInRange(O,1)>500){const Z=e.modifyPosition(O.getStartPosition(),500);O=at.fromPositions(O.getStartPosition(),Z)}const W=e.getValueInRange(O,1);let X;if(d===g||d+1===g)X=e.getValueInRange(i,1);else{const Z=f.intersectRanges(i),ee=y.intersectRanges(i);X=e.getValueInRange(Z,1)+"…"+e.getValueInRange(ee,1)}return s&&X.length>2*500&&(X=X.substring(0,500)+"…"+X.substring(X.length-500,X.length)),new Ym(x+X+W,x.length,x.length+X.length,i,w.endLineNumber-w.startLineNumber)}}var lui=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Bmt=function(c,e){return function(i,n){e(i,n,c)}},tve;(function(c){c.Tap="-monaco-textarea-synthetic-tap"})(tve||(tve={}));const _9e={forceCopyWithSyntaxHighlighting:!1};class iie{constructor(){this._lastState=null}set(e,i){this._lastState={lastCopiedValue:e,data:i}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}iie.INSTANCE=new iie;class cui{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){e=e||"";const i={text:e,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,i}}let p9e=class extends Ii{get textAreaState(){return this._textAreaState}constructor(e,i,n,s,l,d){super(),this._host=e,this._textArea=i,this._OS=n,this._browser=s,this._accessibilityService=l,this._logService=d,this._onFocus=this._register(new ui),this.onFocus=this._onFocus.event,this._onBlur=this._register(new ui),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new ui),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new ui),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new ui),this.onCut=this._onCut.event,this._onPaste=this._register(new ui),this.onPaste=this._onPaste.event,this._onType=this._register(new ui),this.onType=this._onType.event,this._onCompositionStart=this._register(new ui),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new ui),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new ui),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new ui),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new jg),this._asyncTriggerCut=this._register(new id(()=>this._onCut.fire(),0)),this._textAreaState=Ym.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(Mr.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=this._register(new id(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)):this._asyncFocusGainWriteScreenReaderContent.clear()})),this._hasFocus=!1,this._currentComposition=null;let f=null;this._register(this._textArea.onKeyDown(g=>{const y=new Fd(g);(y.keyCode===114||this._currentComposition&&y.keyCode===1)&&y.stopPropagation(),y.equals(9)&&y.preventDefault(),f=y,this._onKeyDown.fire(y)})),this._register(this._textArea.onKeyUp(g=>{const y=new Fd(g);this._onKeyUp.fire(y)})),this._register(this._textArea.onCompositionStart(g=>{const y=new cui;if(this._currentComposition){this._currentComposition=y;return}if(this._currentComposition=y,this._OS===2&&f&&f.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===g.data&&(f.code==="ArrowRight"||f.code==="ArrowLeft")){y.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:g.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:g.data});return}this._onCompositionStart.fire({data:g.data})})),this._register(this._textArea.onCompositionUpdate(g=>{const y=this._currentComposition;if(!y)return;if(this._browser.isAndroid){const x=Ym.readFromTextArea(this._textArea,this._textAreaState),I=Ym.deduceAndroidCompositionInput(this._textAreaState,x);this._textAreaState=x,this._onType.fire(I),this._onCompositionUpdate.fire(g);return}const w=y.handleCompositionUpdate(g.data);this._textAreaState=Ym.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(w),this._onCompositionUpdate.fire(g)})),this._register(this._textArea.onCompositionEnd(g=>{const y=this._currentComposition;if(!y)return;if(this._currentComposition=null,this._browser.isAndroid){const x=Ym.readFromTextArea(this._textArea,this._textAreaState),I=Ym.deduceAndroidCompositionInput(this._textAreaState,x);this._textAreaState=x,this._onType.fire(I),this._onCompositionEnd.fire();return}const w=y.handleCompositionUpdate(g.data);this._textAreaState=Ym.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(w),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(g=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const y=Ym.readFromTextArea(this._textArea,this._textAreaState),w=Ym.deduceInput(this._textAreaState,y,this._OS===2);w.replacePrevCharCnt===0&&w.text.length===1&&(Bg(w.text.charCodeAt(0))||w.text.charCodeAt(0)===127)||(this._textAreaState=y,(w.text!==""||w.replacePrevCharCnt!==0||w.replaceNextCharCnt!==0||w.positionDelta!==0)&&this._onType.fire(w))})),this._register(this._textArea.onCut(g=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(g),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(g=>{this._ensureClipboardGetsEditorSelection(g)})),this._register(this._textArea.onPaste(g=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),g.preventDefault(),!g.clipboardData)return;let[y,w]=g9e.getTextData(g.clipboardData);y&&(w=w||iie.INSTANCE.get(y),this._onPaste.fire({text:y,metadata:w}))})),this._register(this._textArea.onFocus(()=>{const g=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!g&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new id(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let e=0;return tn(this._textArea.ownerDocument,"selectionchange",i=>{if(SM.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;const n=Date.now(),s=n-e;if(e=n,s<5)return;const l=n-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),l<100||!this._textAreaState.selection)return;const d=this._textArea.getValue();if(this._textAreaState.value!==d)return;const f=this._textArea.getSelectionStart(),g=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===f&&this._textAreaState.selectionEnd===g)return;const y=this._textAreaState.deduceEditorPosition(f),w=this._host.deduceModelPosition(y[0],y[1],y[2]),x=this._textAreaState.deduceEditorPosition(g),I=this._host.deduceModelPosition(x[0],x[1],x[2]),P=new Qs(w.lineNumber,w.column,I.lineNumber,I.column);this._onSelectionChangeRequest.fire(P)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,i){this._hasFocus||(i=i.collapseSelection()),i.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=i}writeNativeTextAreaContent(e){!this._accessibilityService.isScreenReaderOptimized()&&e==="render"||this._currentComposition||(this._logService.trace(`writeTextAreaState(reason: ${e})`),this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent()))}_ensureClipboardGetsEditorSelection(e){const i=this._host.getDataToCopy(),n={version:1,isFromEmptySelection:i.isFromEmptySelection,multicursorText:i.multicursorText,mode:i.mode};iie.INSTANCE.set(this._browser.isFirefox?i.text.replace(/\r\n/g,` +`):i.text,n),e.preventDefault(),e.clipboardData&&g9e.setTextData(e.clipboardData,i.text,i.html,n)}};p9e=lui([Bmt(4,$C),Bmt(5,Sv)],p9e);const g9e={getTextData(c){const e=c.getData(i_.text);let i=null;const n=c.getData("vscode-editor-data");if(typeof n=="string")try{i=JSON.parse(n),i.version!==1&&(i=null)}catch{}return e.length===0&&i===null&&c.files.length>0?[Array.prototype.slice.call(c.files,0).map(l=>l.name).join(` +`),null]:[e,i]},setTextData(c,e,i,n){c.setData(i_.text,e),typeof i=="string"&&c.setData("text/html",i),c.setData("vscode-editor-data",JSON.stringify(n))}};class uui extends Ii{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new Yl(this._actual,"keydown")).event,this.onKeyUp=this._register(new Yl(this._actual,"keyup")).event,this.onCompositionStart=this._register(new Yl(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new Yl(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new Yl(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new Yl(this._actual,"beforeinput")).event,this.onInput=this._register(new Yl(this._actual,"input")).event,this.onCut=this._register(new Yl(this._actual,"cut")).event,this.onCopy=this._register(new Yl(this._actual,"copy")).event,this.onPaste=this._register(new Yl(this._actual,"paste")).event,this.onFocus=this._register(new Yl(this._actual,"focus")).event,this.onBlur=this._register(new Yl(this._actual,"blur")).event,this._onSyntheticTap=this._register(new ui),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown(()=>SM.onKeyDown())),this._register(this.onBeforeInput(()=>SM.onBeforeInput())),this._register(this.onInput(()=>SM.onInput())),this._register(this.onKeyUp(()=>SM.onKeyUp())),this._register(tn(this._actual,tve.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const e=y9(this._actual);return e?e.activeElement===this._actual:this._actual.isConnected?A0()===this._actual:!1}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,i){const n=this._actual;n.value!==i&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=i)}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,i,n){const s=this._actual;let l=null;const d=y9(s);d?l=d.activeElement:l=A0();const f=Io(l),g=l===s,y=s.selectionStart,w=s.selectionEnd;if(g&&y===i&&w===n){ok&&f.parent!==f&&s.focus();return}if(g){this.setIgnoreSelectionChangeTime("setSelectionRange"),s.setSelectionRange(i,n),ok&&f.parent!==f&&s.focus();return}try{const x=mri(s);this.setIgnoreSelectionChangeTime("setSelectionRange"),s.focus(),s.setSelectionRange(i,n),vri(s,x)}catch{}}}class dui extends pje{constructor(e,i,n){super(e,i,n),this._register(Jd.addTarget(this.viewHelper.linesContentDomNode)),this._register(tn(this.viewHelper.linesContentDomNode,Gd.Tap,l=>this.onTap(l))),this._register(tn(this.viewHelper.linesContentDomNode,Gd.Change,l=>this.onChange(l))),this._register(tn(this.viewHelper.linesContentDomNode,Gd.Contextmenu,l=>this._onContextMenu(new rR(l,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(tn(this.viewHelper.linesContentDomNode,"pointerdown",l=>{const d=l.pointerType;if(d==="mouse"){this._lastPointerType="mouse";return}else d==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const s=new Nci(this.viewHelper.viewDomNode);this._register(s.onPointerMove(this.viewHelper.viewDomNode,l=>this._onMouseMove(l))),this._register(s.onPointerUp(this.viewHelper.viewDomNode,l=>this._onMouseUp(l))),this._register(s.onPointerLeave(this.viewHelper.viewDomNode,l=>this._onMouseLeave(l))),this._register(s.onPointerDown(this.viewHelper.viewDomNode,(l,d)=>this._onMouseDown(l,d)))}onTap(e){!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget)||(e.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(e,!1))}onChange(e){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY),this._lastPointerType==="pen"&&this._dispatchGesture(e,!0)}_dispatchGesture(e,i){const n=this._createMouseTarget(new rR(e,!1,this.viewHelper.viewDomNode),!1);n.position&&this.viewController.dispatchMouse({position:n.position,mouseColumn:n.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:i,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:n.type===6&&n.detail.injectedText!==null})}_onMouseDown(e,i){e.browserEvent.pointerType!=="touch"&&super._onMouseDown(e,i)}}class fui extends pje{constructor(e,i,n){super(e,i,n),this._register(Jd.addTarget(this.viewHelper.linesContentDomNode)),this._register(tn(this.viewHelper.linesContentDomNode,Gd.Tap,s=>this.onTap(s))),this._register(tn(this.viewHelper.linesContentDomNode,Gd.Change,s=>this.onChange(s))),this._register(tn(this.viewHelper.linesContentDomNode,Gd.Contextmenu,s=>this._onContextMenu(new rR(s,!1,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const i=this._createMouseTarget(new rR(e,!1,this.viewHelper.viewDomNode),!1);if(i.position){const n=document.createEvent("CustomEvent");n.initEvent(tve.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(n),this.viewController.moveTo(i.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class hui extends Ii{constructor(e,i,n){super(),(TE||dti&&wbt)&&PHe.pointerEvents?this.handler=this._register(new dui(e,i,n)):ed.TouchEvent?this.handler=this._register(new fui(e,i,n)):this.handler=this._register(new pje(e,i,n))}getTargetAtClientPoint(e,i){return this.handler.getTargetAtClientPoint(e,i)}}class Y9 extends Ene{}const og=Kl("themeService");function Lh(c){return{id:c}}function m9e(c){switch(c){case ik.DARK:return"vs-dark";case ik.HIGH_CONTRAST_DARK:return"hc-black";case ik.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}const PSt={ThemingContribution:"base.contributions.theming"};class _ui{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new ui}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),go(()=>{const i=this.themingParticipants.indexOf(e);this.themingParticipants.splice(i,1)})}getThemingParticipants(){return this.themingParticipants}}const ASt=new _ui;dh.add(PSt.ThemingContribution,ASt);function dk(c){return ASt.onColorThemeChange(c)}class pui extends Ii{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(i=>this.onThemeChange(i)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}const OSt=Ft("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},V("lineHighlight","Background color for the highlight of line at the cursor position.")),Wmt=Ft("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:ec},V("lineHighlightBorderBox","Background color for the border around the line at the cursor position."));Ft("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},V("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0);Ft("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:bf,hcLight:bf},V("rangeHighlightBorder","Background color of the border around highlighted ranges."));Ft("editor.symbolHighlightBackground",{dark:w4,light:w4,hcDark:null,hcLight:null},V("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0);Ft("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:bf,hcLight:bf},V("symbolHighlightBorder","Background color of the border around highlighted symbols."));const tL=Ft("editorCursor.foreground",{dark:"#AEAFAD",light:Qi.black,hcDark:Qi.white,hcLight:"#0F4A85"},V("caret","Color of the editor cursor.")),I4=Ft("editorCursor.background",null,V("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),MSt=Ft("editorMultiCursor.primary.foreground",{dark:tL,light:tL,hcDark:tL,hcLight:tL},V("editorMultiCursorPrimaryForeground","Color of the primary editor cursor when multiple cursors are present.")),gui=Ft("editorMultiCursor.primary.background",{dark:I4,light:I4,hcDark:I4,hcLight:I4},V("editorMultiCursorPrimaryBackground","The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),RSt=Ft("editorMultiCursor.secondary.foreground",{dark:tL,light:tL,hcDark:tL,hcLight:tL},V("editorMultiCursorSecondaryForeground","Color of secondary editor cursors when multiple cursors are present.")),mui=Ft("editorMultiCursor.secondary.background",{dark:I4,light:I4,hcDark:I4,hcLight:I4},V("editorMultiCursorSecondaryBackground","The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),N4=Ft("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},V("editorWhitespaces","Color of whitespace characters in the editor.")),vui=Ft("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:Qi.white,hcLight:"#292929"},V("editorLineNumbers","Color of editor line numbers.")),Tge=Ft("editorIndentGuide.background",{dark:N4,light:N4,hcDark:N4,hcLight:N4},V("editorIndentGuides","Color of the editor indentation guides."),!1,V("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),Dge=Ft("editorIndentGuide.activeBackground",{dark:N4,light:N4,hcDark:N4,hcLight:N4},V("editorActiveIndentGuide","Color of the active editor indentation guides."),!1,V("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),Nne=Ft("editorIndentGuide.background1",{dark:Tge,light:Tge,hcDark:Tge,hcLight:Tge},V("editorIndentGuides1","Color of the editor indentation guides (1).")),yui=Ft("editorIndentGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorIndentGuides2","Color of the editor indentation guides (2).")),bui=Ft("editorIndentGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorIndentGuides3","Color of the editor indentation guides (3).")),Cui=Ft("editorIndentGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorIndentGuides4","Color of the editor indentation guides (4).")),Sui=Ft("editorIndentGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorIndentGuides5","Color of the editor indentation guides (5).")),wui=Ft("editorIndentGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorIndentGuides6","Color of the editor indentation guides (6).")),Lne=Ft("editorIndentGuide.activeBackground1",{dark:Dge,light:Dge,hcDark:Dge,hcLight:Dge},V("editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),xui=Ft("editorIndentGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),kui=Ft("editorIndentGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),Tui=Ft("editorIndentGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),Dui=Ft("editorIndentGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),Eui=Ft("editorIndentGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),Ege=Ft("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:bf,hcLight:bf},V("editorActiveLineNumber","Color of editor active line number"),!1,V("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead."));Ft("editorLineNumber.activeForeground",{dark:Ege,light:Ege,hcDark:Ege,hcLight:Ege},V("editorActiveLineNumber","Color of editor active line number"));const Iui=Ft("editorLineNumber.dimmedForeground",{dark:null,light:null,hcDark:null,hcLight:null},V("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed."));Ft("editorRuler.foreground",{dark:"#5A5A5A",light:Qi.lightgrey,hcDark:Qi.white,hcLight:"#292929"},V("editorRuler","Color of the editor rulers."));Ft("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},V("editorCodeLensForeground","Foreground color of editor CodeLens"));Ft("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},V("editorBracketMatchBackground","Background color behind matching brackets"));Ft("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:ec,hcLight:ec},V("editorBracketMatchBorder","Color for matching brackets boxes"));const Nui=Ft("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},V("editorOverviewRulerBorder","Color of the overview ruler border.")),Lui=Ft("editorOverviewRuler.background",null,V("editorOverviewRulerBackground","Background color of the editor overview ruler."));Ft("editorGutter.background",{dark:Vg,light:Vg,hcDark:Vg,hcLight:Vg},V("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers."));Ft("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:Qi.fromHex("#fff").transparent(.8),hcLight:ec},V("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor."));const Pui=Ft("editorUnnecessaryCode.opacity",{dark:Qi.fromHex("#000a"),light:Qi.fromHex("#0007"),hcDark:null,hcLight:null},V("unnecessaryCodeOpacity",`Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.`));Ft("editorGhostText.border",{dark:null,light:null,hcDark:Qi.fromHex("#fff").transparent(.8),hcLight:Qi.fromHex("#292929").transparent(.8)},V("editorGhostTextBorder","Border color of ghost text in the editor."));Ft("editorGhostText.foreground",{dark:Qi.fromHex("#ffffff56"),light:Qi.fromHex("#0007"),hcDark:null,hcLight:null},V("editorGhostTextForeground","Foreground color of the ghost text in the editor."));Ft("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},V("editorGhostTextBackground","Background color of the ghost text in the editor."));const Ige=new Qi(new bc(0,122,204,.6)),FSt=Ft("editorOverviewRuler.rangeHighlightForeground",{dark:Ige,light:Ige,hcDark:Ige,hcLight:Ige},V("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Aui=Ft("editorOverviewRuler.errorForeground",{dark:new Qi(new bc(255,18,18,.7)),light:new Qi(new bc(255,18,18,.7)),hcDark:new Qi(new bc(255,50,50,1)),hcLight:"#B5200D"},V("overviewRuleError","Overview ruler marker color for errors.")),Oui=Ft("editorOverviewRuler.warningForeground",{dark:k1,light:k1,hcDark:Zte,hcLight:Zte},V("overviewRuleWarning","Overview ruler marker color for warnings.")),Mui=Ft("editorOverviewRuler.infoForeground",{dark:xb,light:xb,hcDark:Yte,hcLight:Yte},V("overviewRuleInfo","Overview ruler marker color for infos.")),BSt=Ft("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},V("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),WSt=Ft("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},V("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),VSt=Ft("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},V("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),HSt=Ft("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),jSt=Ft("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),zSt=Ft("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),Rui=Ft("editorBracketHighlight.unexpectedBracket.foreground",{dark:new Qi(new bc(255,18,18,.8)),light:new Qi(new bc(255,18,18,.8)),hcDark:new Qi(new bc(255,50,50,1)),hcLight:""},V("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),Fui=Ft("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),Bui=Ft("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),Wui=Ft("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),Vui=Ft("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),Hui=Ft("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),jui=Ft("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),zui=Ft("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),Uui=Ft("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),qui=Ft("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),$ui=Ft("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),Jui=Ft("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),Gui=Ft("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},V("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));Ft("editorUnicodeHighlight.border",{dark:k1,light:k1,hcDark:k1,hcLight:k1},V("editorUnicodeHighlight.border","Border color used to highlight unicode characters."));Ft("editorUnicodeHighlight.background",{dark:Sge,light:Sge,hcDark:Sge,hcLight:Sge},V("editorUnicodeHighlight.background","Background color used to highlight unicode characters."));dk((c,e)=>{const i=c.getColor(Vg),n=c.getColor(OSt),s=n&&!n.isTransparent()?n:i;s&&e.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${s}; }`)});class Pne extends Y9{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new yi(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(67);const i=e.get(68);this._renderLineNumbers=i.renderType,this._renderCustomLineNumbers=i.renderFn,this._renderFinalNewline=e.get(95);const n=e.get(145);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const i=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(i);let n=!1;return this._activeLineNumber!==i.lineNumber&&(this._activeLineNumber=i.lineNumber,n=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(n=!0),n}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return e.affectsLineNumber}_getLineRenderLineNumber(e){const i=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new yi(e,1));if(i.column!==1)return"";const n=i.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(this._renderLineNumbers===2){const s=Math.abs(this._lastCursorModelPosition.lineNumber-n);return s===0?''+n+"":String(s)}if(this._renderLineNumbers===3){if(this._lastCursorModelPosition.lineNumber===n||n%10===0)return String(n);const s=this._context.viewModel.getLineCount();return n===s?String(n):""}return String(n)}prepareRender(e){if(this._renderLineNumbers===0){this._renderResult=null;return}const i=Ty?this._lineHeight%2===0?" lh-even":" lh-odd":"",n=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,l=this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter(y=>!!y.options.lineNumberClassName);l.sort((y,w)=>at.compareRangesUsingEnds(y.range,w.range));let d=0;const f=this._context.viewModel.getLineCount(),g=[];for(let y=n;y<=s;y++){const w=y-n;let x=this._getLineRenderLineNumber(y),I="";for(;d${x}`}this._renderResult=g}render(e,i){if(!this._renderResult)return"";const n=i-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}Pne.CLASS_NAME="line-numbers";dk((c,e)=>{const i=c.getColor(vui),n=c.getColor(Iui);n?e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):i&&e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i.transparent(.4)}; }`)});class S9 extends JC{constructor(e){super(e);const i=this._context.configuration.options,n=i.get(145);this._canUseLayerHinting=!i.get(32),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,this._domNode=pu(document.createElement("div")),this._domNode.setClassName(S9.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=pu(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(S9.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const i=this._context.configuration.options,n=i.get(145);return this._canUseLayerHinting=!i.get(32),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const i=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-i);const n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n)}}S9.CLASS_NAME="glyph-margin";S9.OUTER_CLASS_NAME="margin";const DU="monaco-mouse-cursor-text";class Kui{constructor(){this._onDidChange=new ui,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}}const ete=new Kui,ou=Kl("keybindingService");var Qui=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Vmt=function(c,e){return function(i,n){e(i,n,c)}};class Xui{constructor(e,i,n,s,l){this._context=e,this.modelLineNumber=i,this.distanceToModelLineStart=n,this.widthOfHiddenLineTextBefore=s,this.distanceToModelLineEnd=l,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const i=new yi(this.modelLineNumber,this.distanceToModelLineStart+1),n=new yi(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(e?this._previousPresentation=e:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const i7e=ok;let v9e=class extends JC{constructor(e,i,n,s,l){super(e),this._keybindingService=s,this._instantiationService=l,this._primaryCursorPosition=new yi(1,1),this._primaryCursorVisibleRange=null,this._viewController=i,this._visibleRangeProvider=n,this._scrollLeft=0,this._scrollTop=0;const d=this._context.configuration.options,f=d.get(145);this._setAccessibilityOptions(d),this._contentLeft=f.contentLeft,this._contentWidth=f.contentWidth,this._contentHeight=f.height,this._fontInfo=d.get(50),this._lineHeight=d.get(67),this._emptySelectionClipboard=d.get(37),this._copyWithSyntaxHighlighting=d.get(25),this._visibleTextArea=null,this._selections=[new Qs(1,1,1,1)],this._modelSelections=[new Qs(1,1,1,1)],this._lastRenderPosition=null,this.textArea=pu(document.createElement("textarea")),NE.write(this.textArea,7),this.textArea.setClassName(`inputarea ${DU}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:g}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${g*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(d)),this.textArea.setAttribute("aria-required",d.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(d.get(124))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",V("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",d.get(91)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=pu(document.createElement("div")),this.textAreaCover.setPosition("absolute");const y={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:I=>this._context.viewModel.getLineMaxColumn(I),getValueInRange:(I,P)=>this._context.viewModel.getValueInRange(I,P),getValueLengthInRange:(I,P)=>this._context.viewModel.getValueLengthInRange(I,P),modifyPosition:(I,P)=>this._context.viewModel.modifyPosition(I,P)},w={getDataToCopy:()=>{const I=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,M0),P=this._context.viewModel.model.getEOL(),O=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),W=Array.isArray(I)?I:null,X=Array.isArray(I)?I.join(P):I;let Z,ee=null;if(_9e.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&X.length<65536){const he=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);he&&(Z=he.html,ee=he.mode)}return{isFromEmptySelection:O,multicursorText:W,text:X,html:Z,mode:ee}},getScreenReaderContent:()=>{if(this._accessibilitySupport===1){const I=this._selections[0];if(Wl&&I.isEmpty()){const O=I.getStartPosition();let W=this._getWordBeforePosition(O);if(W.length===0&&(W=this._getCharacterBeforePosition(O)),W.length>0)return new Ym(W,W.length,W.length,at.fromPositions(O),0)}if(Wl&&!I.isEmpty()&&y.getValueLengthInRange(I,0)<500){const O=y.getValueInRange(I,0);return new Ym(O,0,O.length,I,0)}if(q4&&!I.isEmpty()){const O="vscode-placeholder";return new Ym(O,0,O.length,null,void 0)}return Ym.EMPTY}if(lgt){const I=this._selections[0];if(I.isEmpty()){const P=I.getStartPosition(),[O,W]=this._getAndroidWordAtPosition(P);if(O.length>0)return new Ym(O,W,W,at.fromPositions(P),0)}return Ym.EMPTY}return rU.fromEditorSelection(y,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(I,P,O)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(I,P,O)},x=this._register(new uui(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(p9e,w,x,FC,{isAndroid:lgt,isChrome:vne,isFirefox:ok,isSafari:q4})),this._register(this._textAreaInput.onKeyDown(I=>{this._viewController.emitKeyDown(I)})),this._register(this._textAreaInput.onKeyUp(I=>{this._viewController.emitKeyUp(I)})),this._register(this._textAreaInput.onPaste(I=>{let P=!1,O=null,W=null;I.metadata&&(P=this._emptySelectionClipboard&&!!I.metadata.isFromEmptySelection,O=typeof I.metadata.multicursorText<"u"?I.metadata.multicursorText:null,W=I.metadata.mode),this._viewController.paste(I.text,P,O,W)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(I=>{I.replacePrevCharCnt||I.replaceNextCharCnt||I.positionDelta?this._viewController.compositionType(I.text,I.replacePrevCharCnt,I.replaceNextCharCnt,I.positionDelta):this._viewController.type(I.text)})),this._register(this._textAreaInput.onSelectionChangeRequest(I=>{this._viewController.setSelection(I)})),this._register(this._textAreaInput.onCompositionStart(I=>{const P=this.textArea.domNode,O=this._modelSelections[0],{distanceToModelLineStart:W,widthOfHiddenTextBefore:X}=(()=>{const ee=P.value.substring(0,Math.min(P.selectionStart,P.selectionEnd)),he=ee.lastIndexOf(` +`),we=ee.substring(he+1),Te=we.lastIndexOf(" "),Be=we.length-Te-1,Me=O.getStartPosition(),vt=Math.min(Me.column-1,Be),Nt=Me.column-1-vt,Ni=we.substring(0,we.length-vt),{tabSize:ci}=this._context.viewModel.model.getOptions(),Mt=Zui(this.textArea.domNode.ownerDocument,Ni,this._fontInfo,ci);return{distanceToModelLineStart:Nt,widthOfHiddenTextBefore:Mt}})(),{distanceToModelLineEnd:Z}=(()=>{const ee=P.value.substring(Math.max(P.selectionStart,P.selectionEnd)),he=ee.indexOf(` +`),we=he===-1?ee:ee.substring(0,he),Te=we.indexOf(" "),Be=Te===-1?we.length:we.length-Te-1,Me=O.getEndPosition(),vt=Math.min(this._context.viewModel.model.getLineMaxColumn(Me.lineNumber)-Me.column,Be);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(Me.lineNumber)-Me.column-vt}})();this._context.viewModel.revealRange("keyboard",!0,at.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new Xui(this._context,O.startLineNumber,W,X,Z),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${DU} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(I=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${DU}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)})),this._register(ete.onDidChange(()=>{this._ensureReadOnlyAttribute()}))}writeScreenReaderContent(e){this._textAreaInput.writeNativeTextAreaContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const i='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',n=this._context.viewModel.getLineContent(e.lineNumber),s=ak(i,[]);let l=!0,d=e.column,f=!0,g=e.column,y=0;for(;y<50&&(l||f);){if(l&&d<=1&&(l=!1),l){const w=n.charCodeAt(d-2);s.get(w)!==0?l=!1:d--}if(f&&g>n.length&&(f=!1),f){const w=n.charCodeAt(g-1);s.get(w)!==0?f=!1:g++}y++}return[n.substring(d-1,g-1),e.column-d]}_getWordBeforePosition(e){const i=this._context.viewModel.getLineContent(e.lineNumber),n=ak(this._context.configuration.options.get(131),[]);let s=e.column,l=0;for(;s>1;){const d=i.charCodeAt(s-2);if(n.get(d)!==0||l>50)return i.substring(s-1,e.column-1);l++,s--}return i.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const n=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!Bg(n.charCodeAt(0)))return n}return""}_getAriaLabel(e){var i,n,s;if(e.get(2)===1){const d=(i=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode"))===null||i===void 0?void 0:i.getAriaLabel(),f=(n=this._keybindingService.lookupKeybinding("workbench.action.showCommands"))===null||n===void 0?void 0:n.getAriaLabel(),g=(s=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings"))===null||s===void 0?void 0:s.getAriaLabel(),y=V("accessibilityModeOff","The editor is not accessible at this time.");return d?V("accessibilityOffAriaLabel","{0} To enable screen reader optimized mode, use {1}",y,d):f?V("accessibilityOffAriaLabelNoKb","{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",y,f):g?V("accessibilityOffAriaLabelNoKbs","{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",y,g):y}return e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const i=e.get(3);this._accessibilitySupport===2&&i===RE.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=i;const s=e.get(145).wrappingColumn;if(s!==-1&&this._accessibilitySupport!==1){const l=e.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(s*l.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=i7e?0:1}onConfigurationChanged(e){const i=this._context.configuration.options,n=i.get(145);this._setAccessibilityOptions(i),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._contentHeight=n.height,this._fontInfo=i.get(50),this._lineHeight=i.get(67),this._emptySelectionClipboard=i.get(37),this._copyWithSyntaxHighlighting=i.get(25),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:s}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${s*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",this._getAriaLabel(i)),this.textArea.setAttribute("aria-required",i.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(i.get(124))),(e.hasChanged(34)||e.hasChanged(91))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeNativeTextAreaContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeNativeTextAreaContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){const e=this._context.configuration.options;!ete.enabled||e.get(34)&&e.get(91)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){var i;this._primaryCursorPosition=new yi(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),(i=this._visibleTextArea)===null||i===void 0||i.prepareRender(e)}render(e){this._textAreaInput.writeNativeTextAreaContent("render"),this._render()}_render(){var e;if(this._visibleTextArea){const s=this._visibleTextArea.visibleTextareaStart,l=this._visibleTextArea.visibleTextareaEnd,d=this._visibleTextArea.startPosition,f=this._visibleTextArea.endPosition;if(d&&f&&s&&l&&l.left>=this._scrollLeft&&s.left<=this._scrollLeft+this._contentWidth){const g=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,y=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let w=this._visibleTextArea.widthOfHiddenLineTextBefore,x=this._contentLeft+s.left-this._scrollLeft,I=l.left-s.left+1;if(xthis._contentWidth&&(I=this._contentWidth);const P=this._context.viewModel.getViewLineData(d.lineNumber),O=P.tokens.findTokenIndexAtOffset(d.column-1),W=P.tokens.findTokenIndexAtOffset(f.column-1),X=O===W,Z=this._visibleTextArea.definePresentation(X?P.tokens.getPresentation(O):null);this.textArea.domNode.scrollTop=y*this._lineHeight,this.textArea.domNode.scrollLeft=w,this._doRender({lastRenderPosition:null,top:g,left:x,width:I,height:this._lineHeight,useCover:!1,color:(Nh.getColorMap()||[])[Z.foreground],italic:Z.italic,bold:Z.bold,underline:Z.underline,strikethrough:Z.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const i=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ithis._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const n=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(n<0||n>this._contentHeight){this._renderAtTopLeft();return}if(Wl||this._accessibilitySupport===2){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:n,left:this._textAreaWrapping?this._contentLeft:i,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const s=(e=this._textAreaInput.textAreaState.newlineCountBeforeSelection)!==null&&e!==void 0?e:this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=s*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:n,left:this._textAreaWrapping?this._contentLeft:i,width:this._textAreaWidth,height:i7e?0:1,useCover:!1})}_newlinecount(e){let i=0,n=-1;do{if(n=e.indexOf(` +`,n+1),n===-1)break;i++}while(!0);return i}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:i7e?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const i=this.textArea,n=this.textAreaCover;s0(i,this._fontInfo),i.setTop(e.top),i.setLeft(e.left),i.setWidth(e.width),i.setHeight(e.height),i.setColor(e.color?Qi.Format.CSS.formatHex(e.color):""),i.setFontStyle(e.italic?"italic":""),e.bold&&i.setFontWeight("bold"),i.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),n.setTop(e.useCover?e.top:0),n.setLeft(e.useCover?e.left:0),n.setWidth(e.useCover?e.width:0),n.setHeight(e.useCover?e.height:0);const s=this._context.configuration.options;s.get(57)?n.setClassName("monaco-editor-background textAreaCover "+S9.OUTER_CLASS_NAME):s.get(68).renderType!==0?n.setClassName("monaco-editor-background textAreaCover "+Pne.CLASS_NAME):n.setClassName("monaco-editor-background textAreaCover")}};v9e=Qui([Vmt(3,ou),Vmt(4,So)],v9e);function Zui(c,e,i,n){if(e.length===0)return 0;const s=c.createElement("div");s.style.position="absolute",s.style.top="-50000px",s.style.width="50000px";const l=c.createElement("span");s0(l,i),l.style.whiteSpace="pre",l.style.tabSize=`${n*i.spaceWidth}px`,l.append(e),s.appendChild(l),c.body.appendChild(s);const d=l.offsetWidth;return c.body.removeChild(s),d}function Yui(c,e,i){let n=0;for(let l=0;l!0,tdi=()=>!1,idi=c=>c===" "||c===" ";class Cz{static shouldRecreate(e){return e.hasChanged(145)||e.hasChanged(131)||e.hasChanged(37)||e.hasChanged(77)||e.hasChanged(79)||e.hasChanged(80)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(9)||e.hasChanged(10)||e.hasChanged(14)||e.hasChanged(128)||e.hasChanged(50)||e.hasChanged(91)||e.hasChanged(130)}constructor(e,i,n,s){var l;this.languageConfigurationService=s,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const d=n.options,f=d.get(145),g=d.get(50);this.readOnly=d.get(91),this.tabSize=i.tabSize,this.indentSize=i.indentSize,this.insertSpaces=i.insertSpaces,this.stickyTabStops=d.get(116),this.lineHeight=g.lineHeight,this.typicalHalfwidthCharacterWidth=g.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(f.height/this.lineHeight)-2),this.useTabStops=d.get(128),this.wordSeparators=d.get(131),this.emptySelectionClipboard=d.get(37),this.copyWithSyntaxHighlighting=d.get(25),this.multiCursorMergeOverlapping=d.get(77),this.multiCursorPaste=d.get(79),this.multiCursorLimit=d.get(80),this.autoClosingBrackets=d.get(6),this.autoClosingComments=d.get(7),this.autoClosingQuotes=d.get(11),this.autoClosingDelete=d.get(9),this.autoClosingOvertype=d.get(10),this.autoSurround=d.get(14),this.autoIndent=d.get(12),this.wordSegmenterLocales=d.get(130),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(e,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const y=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(y)for(const x of y)this.surroundingPairs[x.open]=x.close;const w=this.languageConfigurationService.getLanguageConfiguration(e).comments;this.blockCommentStartToken=(l=w==null?void 0:w.blockCommentStartToken)!==null&&l!==void 0?l:null}get electricChars(){var e;if(!this._electricChars){this._electricChars={};const i=(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)===null||e===void 0?void 0:e.getElectricCharacters();if(i)for(const n of i)this._electricChars[n]=!0}return this._electricChars}onElectricCharacter(e,i,n){const s=U5(i,n-1),l=this.languageConfigurationService.getLanguageConfiguration(s.languageId).electricCharacter;return l?l.onElectricCharacter(e,s,n-s.firstCharOffset):null}normalizeIndentation(e){return gje(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,i,n){switch(i){case"beforeWhitespace":return idi;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,n);case"always":return edi;case"never":return tdi}}_getLanguageDefinedShouldAutoClose(e,i){const n=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(i);return s=>n.indexOf(s)!==-1}visibleColumnFromColumn(e,i){return ng.visibleColumnFromColumn(e.getLineContent(i.lineNumber),i.column,this.tabSize)}columnFromVisibleColumn(e,i,n){const s=ng.columnFromVisibleColumn(e.getLineContent(i),n,this.tabSize),l=e.getLineMinColumn(i);if(sd?d:s}}let Pc=class USt{static fromModelState(e){return new ndi(e)}static fromViewState(e){return new rdi(e)}static fromModelSelection(e){const i=Qs.liftSelection(e),n=new e0(at.fromPositions(i.getSelectionStart()),0,0,i.getPosition(),0);return USt.fromModelState(n)}static fromModelSelections(e){const i=[];for(let n=0,s=e.length;nl,y=s>d,w=sd||Zs||X0&&s--,B5.columnSelect(e,i,n.fromViewLineNumber,n.fromViewVisualColumn,n.toViewLineNumber,s)}static columnSelectRight(e,i,n){let s=0;const l=Math.min(n.fromViewLineNumber,n.toViewLineNumber),d=Math.max(n.fromViewLineNumber,n.toViewLineNumber);for(let g=l;g<=d;g++){const y=i.getLineMaxColumn(g),w=e.visibleColumnFromColumn(i,new yi(g,y));s=Math.max(s,w)}let f=n.toViewVisualColumn;return fe.getLineMinColumn(i.lineNumber))return i.delta(void 0,-Qbt(e.getLineContent(i.lineNumber),i.column-1));if(i.lineNumber>1){const n=i.lineNumber-1;return new yi(n,e.getLineMaxColumn(n))}else return i}static leftPositionAtomicSoftTabs(e,i,n){if(i.column<=e.getLineIndentColumn(i.lineNumber)){const s=e.getLineMinColumn(i.lineNumber),l=e.getLineContent(i.lineNumber),d=eie.atomicPosition(l,i.column-1,n,0);if(d!==-1&&d+1>=s)return new yi(i.lineNumber,d+1)}return this.leftPosition(e,i)}static left(e,i,n){const s=e.stickyTabStops?Nu.leftPositionAtomicSoftTabs(i,n,e.tabSize):Nu.leftPosition(i,n);return new n7e(s.lineNumber,s.column,0)}static moveLeft(e,i,n,s,l){let d,f;if(n.hasSelection()&&!s)d=n.selection.startLineNumber,f=n.selection.startColumn;else{const g=n.position.delta(void 0,-(l-1)),y=i.normalizePosition(Nu.clipPositionColumn(g,i),0),w=Nu.left(e,i,y);d=w.lineNumber,f=w.column}return n.move(s,d,f,0)}static clipPositionColumn(e,i){return new yi(e.lineNumber,Nu.clipRange(e.column,i.getLineMinColumn(e.lineNumber),i.getLineMaxColumn(e.lineNumber)))}static clipRange(e,i,n){return en?n:e}static rightPosition(e,i,n){return nw?(n=w,f?s=i.getLineMaxColumn(n):s=Math.min(i.getLineMaxColumn(n),s)):s=e.columnFromVisibleColumn(i,n,y),P?l=0:l=y-ng.visibleColumnFromColumn(i.getLineContent(n),s,e.tabSize),g!==void 0){const O=new yi(n,s),W=i.normalizePosition(O,g);l=l+(s-W.column),n=W.lineNumber,s=W.column}return new n7e(n,s,l)}static down(e,i,n,s,l,d,f){return this.vertical(e,i,n,s,l,n+d,f,4)}static moveDown(e,i,n,s,l){let d,f;n.hasSelection()&&!s?(d=n.selection.endLineNumber,f=n.selection.endColumn):(d=n.position.lineNumber,f=n.position.column);let g=0,y;do if(y=Nu.down(e,i,d+g,f,n.leftoverVisibleColumns,l,!0),i.normalizePosition(new yi(y.lineNumber,y.column),2).lineNumber>d)break;while(g++<10&&d+g1&&this._isBlankLine(i,l);)l--;for(;l>1&&!this._isBlankLine(i,l);)l--;return n.move(s,l,i.getLineMinColumn(l),0)}static moveToNextBlankLine(e,i,n,s){const l=i.getLineCount();let d=n.position.lineNumber;for(;d=I.length+1)return!1;const P=I.charAt(x.column-2),O=s.get(P);if(!O)return!1;if(nM(P)){if(n==="never")return!1}else if(i==="never")return!1;const W=I.charAt(x.column-1);let X=!1;for(const Z of O)Z.open===P&&Z.close===W&&(X=!0);if(!X)return!1;if(e==="auto"){let Z=!1;for(let ee=0,he=f.length;ee1){const l=i.getLineContent(s.lineNumber),d=T1(l),f=d===-1?l.length+1:d+1;if(s.column<=f){const g=n.visibleColumnFromColumn(i,s),y=ng.prevIndentTabStop(g,n.indentSize),w=n.columnFromVisibleColumn(i,s.lineNumber,y);return new at(s.lineNumber,w,s.lineNumber,s.column)}}return at.fromPositions(w9.getPositionAfterDeleteLeft(s,i),s)}static getPositionAfterDeleteLeft(e,i){if(e.column>1){const n=cni(e.column-1,i.getLineContent(e.lineNumber));return e.with(void 0,n+1)}else if(e.lineNumber>1){const n=e.lineNumber-1;return new yi(n,i.getLineMaxColumn(n))}else return e}static cut(e,i,n){const s=[];let l=null;n.sort((d,f)=>yi.compare(d.getStartPosition(),f.getEndPosition()));for(let d=0,f=n.length;d1&&(l==null?void 0:l.endLineNumber)!==y.lineNumber?(w=y.lineNumber-1,x=i.getLineMaxColumn(y.lineNumber-1),I=y.lineNumber,P=i.getLineMaxColumn(y.lineNumber)):(w=y.lineNumber,x=1,I=y.lineNumber,P=i.getLineMaxColumn(y.lineNumber));const O=new at(w,x,I,P);l=O,O.isEmpty()?s[d]=null:s[d]=new I0(O,"")}else s[d]=null;else s[d]=new I0(g,"")}return new mb(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class _u{static _createWord(e,i,n,s,l){return{start:s,end:l,wordType:i,nextCharClass:n}}static _createIntlWord(e,i){return{start:e.index,end:e.index+e.segment.length,wordType:1,nextCharClass:i}}static _findPreviousWordOnLine(e,i,n){const s=i.getLineContent(n.lineNumber);return this._doFindPreviousWordOnLine(s,e,n)}static _doFindPreviousWordOnLine(e,i,n){let s=0;const l=i.findPrevIntlWordBeforeOrAtOffset(e,n.column-2);for(let d=n.column-2;d>=0;d--){const f=e.charCodeAt(d),g=i.get(f);if(l&&d===l.index)return this._createIntlWord(l,g);if(g===0){if(s===2)return this._createWord(e,s,g,d+1,this._findEndOfWord(e,i,s,d+1));s=1}else if(g===2){if(s===1)return this._createWord(e,s,g,d+1,this._findEndOfWord(e,i,s,d+1));s=2}else if(g===1&&s!==0)return this._createWord(e,s,g,d+1,this._findEndOfWord(e,i,s,d+1))}return s!==0?this._createWord(e,s,1,0,this._findEndOfWord(e,i,s,0)):null}static _findEndOfWord(e,i,n,s){const l=i.findNextIntlWordAtOrAfterOffset(e,s),d=e.length;for(let f=s;f=0;d--){const f=e.charCodeAt(d),g=i.get(f);if(l&&d===l.index)return d;if(g===1||n===1&&g===2||n===2&&g===0)return d+1}return 0}static moveWordLeft(e,i,n,s){let l=n.lineNumber,d=n.column;d===1&&l>1&&(l=l-1,d=i.getLineMaxColumn(l));let f=_u._findPreviousWordOnLine(e,i,new yi(l,d));if(s===0)return new yi(l,f?f.start+1:1);if(s===1)return f&&f.wordType===2&&f.end-f.start===1&&f.nextCharClass===0&&(f=_u._findPreviousWordOnLine(e,i,new yi(l,f.start+1))),new yi(l,f?f.start+1:1);if(s===3){for(;f&&f.wordType===2;)f=_u._findPreviousWordOnLine(e,i,new yi(l,f.start+1));return new yi(l,f?f.start+1:1)}return f&&d<=f.end+1&&(f=_u._findPreviousWordOnLine(e,i,new yi(l,f.start+1))),new yi(l,f?f.end+1:1)}static _moveWordPartLeft(e,i){const n=i.lineNumber,s=e.getLineMaxColumn(n);if(i.column===1)return n>1?new yi(n-1,e.getLineMaxColumn(n-1)):i;const l=e.getLineContent(n);for(let d=i.column-1;d>1;d--){const f=l.charCodeAt(d-2),g=l.charCodeAt(d-1);if(f===95&&g!==95)return new yi(n,d);if(f===45&&g!==45)return new yi(n,d);if((bM(f)||pge(f))&&WN(g))return new yi(n,d);if(WN(f)&&WN(g)&&d+1=g.start+1&&(g=_u._findNextWordOnLine(e,i,new yi(l,g.end+1))),g?d=g.start+1:d=i.getLineMaxColumn(l);return new yi(l,d)}static _moveWordPartRight(e,i){const n=i.lineNumber,s=e.getLineMaxColumn(n);if(i.column===s)return n1?y=1:(g--,y=s.getLineMaxColumn(g)):(w&&y<=w.end+1&&(w=_u._findPreviousWordOnLine(n,s,new yi(g,w.start+1))),w?y=w.end+1:y>1?y=1:(g--,y=s.getLineMaxColumn(g))),new at(g,y,f.lineNumber,f.column)}static deleteInsideWord(e,i,n){if(!n.isEmpty())return n;const s=new yi(n.positionLineNumber,n.positionColumn),l=this._deleteInsideWordWhitespace(i,s);return l||this._deleteInsideWordDetermineDeleteRange(e,i,s)}static _charAtIsWhitespace(e,i){const n=e.charCodeAt(i);return n===32||n===9}static _deleteInsideWordWhitespace(e,i){const n=e.getLineContent(i.lineNumber),s=n.length;if(s===0)return null;let l=Math.max(i.column-2,0);if(!this._charAtIsWhitespace(n,l))return null;let d=Math.min(i.column-1,s-1);if(!this._charAtIsWhitespace(n,d))return null;for(;l>0&&this._charAtIsWhitespace(n,l-1);)l--;for(;d+11?new at(n.lineNumber-1,i.getLineMaxColumn(n.lineNumber-1),n.lineNumber,1):n.lineNumberx.start+1<=n.column&&n.column<=x.end+1,f=(x,I)=>(x=Math.min(x,n.column),I=Math.max(I,n.column),new at(n.lineNumber,x,n.lineNumber,I)),g=x=>{let I=x.start+1,P=x.end+1,O=!1;for(;P-11&&this._charAtIsWhitespace(s,I-2);)I--;return f(I,P)},y=_u._findPreviousWordOnLine(e,i,n);if(y&&d(y))return g(y);const w=_u._findNextWordOnLine(e,i,n);return w&&d(w)?g(w):y&&w?f(y.end+1,w.start+1):y?f(y.start+1,y.end+1):w?f(w.start+1,w.end+1):f(1,l+1)}static _deleteWordPartLeft(e,i){if(!i.isEmpty())return i;const n=i.getPosition(),s=_u._moveWordPartLeft(e,n);return new at(n.lineNumber,n.column,s.lineNumber,s.column)}static _findFirstNonWhitespaceChar(e,i){const n=e.length;for(let s=i;s=I.start+1&&(I=_u._findNextWordOnLine(n,s,new yi(g,I.end+1))),I?y=I.start+1:y!!e)}class Zm{static addCursorDown(e,i,n){const s=[];let l=0;for(let d=0,f=i.length;dy&&(w=y,x=e.model.getLineMaxColumn(w)),Pc.fromModelState(new e0(new at(d.lineNumber,1,w,x),2,0,new yi(w,x),0))}const g=i.modelState.selectionStart.getStartPosition().lineNumber;if(d.lineNumberg){const y=e.getLineCount();let w=f.lineNumber+1,x=1;return w>y&&(w=y,x=e.getLineMaxColumn(w)),Pc.fromViewState(i.viewState.move(!0,w,x,0))}else{const y=i.modelState.selectionStart.getEndPosition();return Pc.fromModelState(i.modelState.move(!0,y.lineNumber,y.column,0))}}static word(e,i,n,s){const l=e.model.validatePosition(s);return Pc.fromModelState(_u.word(e.cursorConfig,e.model,i.modelState,n,l))}static cancelSelection(e,i){if(!i.modelState.hasSelection())return new Pc(i.modelState,i.viewState);const n=i.viewState.position.lineNumber,s=i.viewState.position.column;return Pc.fromViewState(new e0(new at(n,s,n,s),0,0,new yi(n,s),0))}static moveTo(e,i,n,s,l){if(n){if(i.modelState.selectionStartKind===1)return this.word(e,i,n,s);if(i.modelState.selectionStartKind===2)return this.line(e,i,n,s,l)}const d=e.model.validatePosition(s),f=l?e.coordinatesConverter.validateViewPosition(new yi(l.lineNumber,l.column),d):e.coordinatesConverter.convertModelPositionToViewPosition(d);return Pc.fromViewState(i.viewState.move(n,f.lineNumber,f.column,0))}static simpleMove(e,i,n,s,l,d){switch(n){case 0:return d===4?this._moveHalfLineLeft(e,i,s):this._moveLeft(e,i,s,l);case 1:return d===4?this._moveHalfLineRight(e,i,s):this._moveRight(e,i,s,l);case 2:return d===2?this._moveUpByViewLines(e,i,s,l):this._moveUpByModelLines(e,i,s,l);case 3:return d===2?this._moveDownByViewLines(e,i,s,l):this._moveDownByModelLines(e,i,s,l);case 4:return d===2?i.map(f=>Pc.fromViewState(Nu.moveToPrevBlankLine(e.cursorConfig,e,f.viewState,s))):i.map(f=>Pc.fromModelState(Nu.moveToPrevBlankLine(e.cursorConfig,e.model,f.modelState,s)));case 5:return d===2?i.map(f=>Pc.fromViewState(Nu.moveToNextBlankLine(e.cursorConfig,e,f.viewState,s))):i.map(f=>Pc.fromModelState(Nu.moveToNextBlankLine(e.cursorConfig,e.model,f.modelState,s)));case 6:return this._moveToViewMinColumn(e,i,s);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,i,s);case 8:return this._moveToViewCenterColumn(e,i,s);case 9:return this._moveToViewMaxColumn(e,i,s);case 10:return this._moveToViewLastNonWhitespaceColumn(e,i,s);default:return null}}static viewportMove(e,i,n,s,l){const d=e.getCompletelyVisibleViewRange(),f=e.coordinatesConverter.convertViewRangeToModelRange(d);switch(n){case 11:{const g=this._firstLineNumberInRange(e.model,f,l),y=e.model.getLineFirstNonWhitespaceColumn(g);return[this._moveToModelPosition(e,i[0],s,g,y)]}case 13:{const g=this._lastLineNumberInRange(e.model,f,l),y=e.model.getLineFirstNonWhitespaceColumn(g);return[this._moveToModelPosition(e,i[0],s,g,y)]}case 12:{const g=Math.round((f.startLineNumber+f.endLineNumber)/2),y=e.model.getLineFirstNonWhitespaceColumn(g);return[this._moveToModelPosition(e,i[0],s,g,y)]}case 14:{const g=[];for(let y=0,w=i.length;yn.endLineNumber-1?d=n.endLineNumber-1:lPc.fromViewState(Nu.moveLeft(e.cursorConfig,e,l.viewState,n,s)))}static _moveHalfLineLeft(e,i,n){const s=[];for(let l=0,d=i.length;lPc.fromViewState(Nu.moveRight(e.cursorConfig,e,l.viewState,n,s)))}static _moveHalfLineRight(e,i,n){const s=[];for(let l=0,d=i.length;l{this.model.tokenization.forceTokenization(P);const O=this.model.tokenization.getLineTokens(P),W=this.model.getLineMaxColumn(P)-1;return U5(O,W)};this.model.tokenization.forceTokenization(e.startLineNumber);const n=this.model.tokenization.getLineTokens(e.startLineNumber),s=U5(n,e.startColumn-1),l=vp.createEmpty("",s.languageIdCodec),d=e.startLineNumber-1;if(d===0||!(s.firstCharOffset===0))return l;const y=i(d);if(!(s.languageId===y.languageId))return l;const x=y.toIViewLineTokens();return this.indentationLineProcessor.getProcessedTokens(x)}}class qSt{constructor(e,i){this.model=e,this.languageConfigurationService=i}getProcessedLine(e,i){var n,s;const l=(g,y)=>{const w=Md(g);return y+g.substring(w.length)};(s=(n=this.model.tokenization).forceTokenization)===null||s===void 0||s.call(n,e);const d=this.model.tokenization.getLineTokens(e);let f=this.getProcessedTokens(d).getLineContent();return i!==void 0&&(f=l(f,i)),f}getProcessedTokens(e){const i=g=>g===2||g===3||g===1,n=e.getLanguageId(0),l=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew.getBracketRegExp({global:!0}),d=[];return e.forEach(g=>{const y=e.getStandardTokenType(g);let w=e.getTokenText(g);i(y)&&(w=w.replace(l,""));const x=e.getMetadata(g);d.push({text:w,metadata:x})}),vp.createFromTextAndMetadata(d,e.languageIdCodec)}}function bje(c,e){c.tokenization.forceTokenization(e.lineNumber);const i=c.tokenization.getLineTokens(e.lineNumber),n=U5(i,e.column-1),s=n.firstCharOffset===0,l=i.getLanguageId(0)===n.languageId;return!s&&!l}function EU(c,e,i,n){e.tokenization.forceTokenization(i.startLineNumber);const s=e.getLanguageIdAtPosition(i.startLineNumber,i.startColumn),l=n.getLanguageConfiguration(s);if(!l)return null;const f=new yje(e,n).getProcessedTokenContextAroundRange(i),g=f.previousLineProcessedTokens.getLineContent(),y=f.beforeRangeProcessedTokens.getLineContent(),w=f.afterRangeProcessedTokens.getLineContent(),x=l.onEnter(c,g,y,w);if(!x)return null;const I=x.indentAction;let P=x.appendText;const O=x.removeText||0;P?I===mp.Indent&&(P=" "+P):I===mp.Indent||I===mp.IndentOutdent?P=" ":P="";let W=KCt(e,i.startLineNumber,i.startColumn);return O&&(W=W.substring(0,W.length-O)),{indentAction:I,appendText:P,removeText:O,indentation:W}}var odi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},adi=function(c,e){return function(i,n){e(i,n,c)}},Zme;const r7e=Object.create(null);function h5(c,e){if(e<=0)return"";r7e[c]||(r7e[c]=["",c]);const i=r7e[c];for(let n=i.length;n<=e;n++)i[n]=i[n-1]+c;return i[e]}let Zx=Zme=class{static unshiftIndent(e,i,n,s,l){const d=ng.visibleColumnFromColumn(e,i,n);if(l){const f=h5(" ",s),y=ng.prevIndentTabStop(d,s)/s;return h5(f,y)}else{const f=" ",y=ng.prevRenderTabStop(d,n)/n;return h5(f,y)}}static shiftIndent(e,i,n,s,l){const d=ng.visibleColumnFromColumn(e,i,n);if(l){const f=h5(" ",s),y=ng.nextIndentTabStop(d,s)/s;return h5(f,y)}else{const f=" ",y=ng.nextRenderTabStop(d,n)/n;return h5(f,y)}}constructor(e,i,n){this._languageConfigurationService=n,this._opts=i,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,i,n){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(i,n):e.addEditOperation(i,n)}getEditOperations(e,i){const n=this._selection.startLineNumber;let s=this._selection.endLineNumber;this._selection.endColumn===1&&n!==s&&(s=s-1);const{tabSize:l,indentSize:d,insertSpaces:f}=this._opts,g=n===s;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(n))&&(this._useLastEditRangeForCursorEndPosition=!0);let y=0,w=0;for(let x=n;x<=s;x++,y=w){w=0;const I=e.getLineContent(x);let P=T1(I);if(this._opts.isUnshift&&(I.length===0||P===0)||!g&&!this._opts.isUnshift&&I.length===0)continue;if(P===-1&&(P=I.length),x>1&&ng.visibleColumnFromColumn(I,P+1,l)%d!==0&&e.tokenization.isCheapToTokenize(x-1)){const X=EU(this._opts.autoIndent,e,new at(x-1,e.getLineMaxColumn(x-1),x-1,e.getLineMaxColumn(x-1)),this._languageConfigurationService);if(X){if(w=y,X.appendText)for(let Z=0,ee=X.appendText.length;Z1){let s,l=-1;for(s=e-1;s>=1;s--){if(c.tokenization.getLanguageIdAtPosition(s,0)!==n)return l;const d=c.getLineContent(s);if(i.shouldIgnore(s)||/^\s+$/.test(d)||d===""){l=s;continue}return s}}return-1}function fye(c,e,i,n=!0,s){if(c<4)return null;const l=s.getLanguageConfiguration(e.tokenization.getLanguageId()).indentRulesSupport;if(!l)return null;const d=new vje(e,l,s);if(i<=1)return{indentation:"",action:null};for(let g=i-1;g>0&&e.getLineContent(g)==="";g--)if(g===1)return{indentation:"",action:null};const f=udi(e,i,d);if(f<0)return null;if(f<1)return{indentation:"",action:null};if(d.shouldIncrease(f)||d.shouldIndentNextLine(f)){const g=e.getLineContent(f);return{indentation:Md(g),action:mp.Indent,line:f}}else if(d.shouldDecrease(f)){const g=e.getLineContent(f);return{indentation:Md(g),action:null,line:f}}else{if(f===1)return{indentation:Md(e.getLineContent(f)),action:null,line:f};const g=f-1,y=l.getIndentMetadata(e.getLineContent(g));if(!(y&3)&&y&4){let w=0;for(let x=g-1;x>0;x--)if(!d.shouldIndentNextLine(x)){w=x;break}return{indentation:Md(e.getLineContent(w+1)),action:null,line:w+1}}if(n)return{indentation:Md(e.getLineContent(f)),action:null,line:f};for(let w=f;w>0;w--){if(d.shouldIncrease(w))return{indentation:Md(e.getLineContent(w)),action:mp.Indent,line:w};if(d.shouldIndentNextLine(w)){let x=0;for(let I=w-1;I>0;I--)if(!d.shouldIndentNextLine(w)){x=I;break}return{indentation:Md(e.getLineContent(x+1)),action:null,line:x+1}}else if(d.shouldDecrease(w))return{indentation:Md(e.getLineContent(w)),action:null,line:w}}return{indentation:Md(e.getLineContent(1)),action:null,line:1}}}function tte(c,e,i,n,s,l){if(c<4)return null;const d=l.getLanguageConfiguration(i);if(!d)return null;const f=l.getLanguageConfiguration(i).indentRulesSupport;if(!f)return null;const g=new vje(e,f,l),y=fye(c,e,n,void 0,l);if(y){const w=y.line;if(w!==void 0){let x=!0;for(let I=w;Ic.getLineCount()?null:n.getIndentMetadata(c.getLineContent(e))}function hdi(c,e,i){return{tokenization:{getLineTokens:s=>s===e?i:c.tokenization.getLineTokens(s),getLanguageId:()=>c.getLanguageId(),getLanguageIdAtPosition:(s,l)=>c.getLanguageIdAtPosition(s,l)},getLineContent:s=>s===e?i.getLineContent():c.getLineContent(s)}}class lh{static indent(e,i,n){if(i===null||n===null)return[];const s=[];for(let l=0,d=n.length;l1){let f;for(f=n-1;f>=1;f--){const w=i.getLineContent(f);if(yE(w)>=0)break}if(f<1)return null;const g=i.getLineMaxColumn(f),y=EU(e.autoIndent,i,new at(f,g,f,g),e.languageConfigurationService);y&&(l=y.indentation+y.appendText)}return s&&(s===mp.Indent&&(l=lh.shiftIndent(e,l)),s===mp.Outdent&&(l=lh.unshiftIndent(e,l)),l=e.normalizeIndentation(l)),l||null}static _replaceJumpToNextIndent(e,i,n,s){let l="";const d=n.getStartPosition();if(e.insertSpaces){const f=e.visibleColumnFromColumn(i,d),g=e.indentSize,y=g-f%g;for(let w=0;wthis._compositionType(n,w,l,d,f,g));return new mb(4,y,{shouldPushStackElementBefore:Pge(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,i,n,s,l,d){if(!i.isEmpty())return null;const f=i.getPosition(),g=Math.max(1,f.column-s),y=Math.min(e.getLineMaxColumn(f.lineNumber),f.column+l),w=new at(f.lineNumber,g,f.lineNumber,y);return e.getValueInRange(w)===n&&d===0?null:new Xme(w,n,0,d)}static _typeCommand(e,i,n){return n?new Nge(e,i,!0):new I0(e,i,!0)}static _enter(e,i,n,s){if(e.autoIndent===0)return lh._typeCommand(s,` +`,n);if(!i.tokenization.isCheapToTokenize(s.getStartPosition().lineNumber)||e.autoIndent===1){const g=i.getLineContent(s.startLineNumber),y=Md(g).substring(0,s.startColumn-1);return lh._typeCommand(s,` +`+e.normalizeIndentation(y),n)}const l=EU(e.autoIndent,i,s,e.languageConfigurationService);if(l){if(l.indentAction===mp.None)return lh._typeCommand(s,` +`+e.normalizeIndentation(l.indentation+l.appendText),n);if(l.indentAction===mp.Indent)return lh._typeCommand(s,` +`+e.normalizeIndentation(l.indentation+l.appendText),n);if(l.indentAction===mp.IndentOutdent){const g=e.normalizeIndentation(l.indentation),y=e.normalizeIndentation(l.indentation+l.appendText),w=` +`+y+` +`+g;return n?new Nge(s,w,!0):new Xme(s,w,-1,y.length-g.length,!0)}else if(l.indentAction===mp.Outdent){const g=lh.unshiftIndent(e,l.indentation);return lh._typeCommand(s,` +`+e.normalizeIndentation(g+l.appendText),n)}}const d=i.getLineContent(s.startLineNumber),f=Md(d).substring(0,s.startColumn-1);if(e.autoIndent>=4){const g=ddi(e.autoIndent,i,s,{unshiftIndent:y=>lh.unshiftIndent(e,y),shiftIndent:y=>lh.shiftIndent(e,y),normalizeIndentation:y=>e.normalizeIndentation(y)},e.languageConfigurationService);if(g){let y=e.visibleColumnFromColumn(i,s.getEndPosition());const w=s.endColumn,x=i.getLineContent(s.endLineNumber),I=T1(x);if(I>=0?s=s.setEndPosition(s.endLineNumber,Math.max(s.endColumn,I+1)):s=s.setEndPosition(s.endLineNumber,i.getLineMaxColumn(s.endLineNumber)),n)return new Nge(s,` +`+e.normalizeIndentation(g.afterEnter),!0);{let P=0;return w<=I+1&&(e.insertSpaces||(y=Math.ceil(y/e.indentSize)),P=Math.min(y+1-e.normalizeIndentation(g.afterEnter).length-1,0)),new Xme(s,` +`+e.normalizeIndentation(g.afterEnter),0,P,!0)}}}return lh._typeCommand(s,` +`+e.normalizeIndentation(f),n)}static _isAutoIndentType(e,i,n){if(e.autoIndent<4)return!1;for(let s=0,l=n.length;slh.shiftIndent(e,f),unshiftIndent:f=>lh.unshiftIndent(e,f)},e.languageConfigurationService);if(d===null)return null;if(d!==e.normalizeIndentation(l)){const f=i.getLineFirstNonWhitespaceColumn(n.startLineNumber);return f===0?lh._typeCommand(new at(n.startLineNumber,1,n.endLineNumber,n.endColumn),e.normalizeIndentation(d)+s,!1):lh._typeCommand(new at(n.startLineNumber,1,n.endLineNumber,n.endColumn),e.normalizeIndentation(d)+i.getLineContent(n.startLineNumber).substring(f-1,n.startColumn-1)+s,!1)}return null}static _isAutoClosingOvertype(e,i,n,s,l){if(e.autoClosingOvertype==="never"||!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(l))return!1;for(let d=0,f=n.length;d2?w.charCodeAt(y.column-2):0)===92&&I)return!1;if(e.autoClosingOvertype==="auto"){let O=!1;for(let W=0,X=s.length;Wi.startsWith(g.open)),f=l.some(g=>i.startsWith(g.close));return!d&&f}static _findAutoClosingPairOpen(e,i,n,s){const l=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(s);if(!l)return null;let d=null;for(const f of l)if(d===null||f.open.length>d.open.length){let g=!0;for(const y of n)if(i.getValueInRange(new at(y.lineNumber,y.column-f.open.length+1,y.lineNumber,y.column))+s!==f.open){g=!1;break}g&&(d=f)}return d}static _findContainedAutoClosingPair(e,i){if(i.open.length<=1)return null;const n=i.close.charAt(i.close.length-1),s=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(n)||[];let l=null;for(const d of s)d.open!==i.open&&i.open.includes(d.open)&&i.close.endsWith(d.close)&&(!l||d.open.length>l.open.length)&&(l=d);return l}static _getAutoClosingPairClose(e,i,n,s,l){for(const O of n)if(!O.isEmpty())return null;const d=n.map(O=>{const W=O.getPosition();return l?{lineNumber:W.lineNumber,beforeColumn:W.column-s.length,afterColumn:W.column}:{lineNumber:W.lineNumber,beforeColumn:W.column,afterColumn:W.column}}),f=this._findAutoClosingPairOpen(e,i,d.map(O=>new yi(O.lineNumber,O.beforeColumn)),s);if(!f)return null;let g,y;if(nM(s)?(g=e.autoClosingQuotes,y=e.shouldAutoCloseBefore.quote):(e.blockCommentStartToken?f.open.includes(e.blockCommentStartToken):!1)?(g=e.autoClosingComments,y=e.shouldAutoCloseBefore.comment):(g=e.autoClosingBrackets,y=e.shouldAutoCloseBefore.bracket),g==="never")return null;const x=this._findContainedAutoClosingPair(e,f),I=x?x.close:"";let P=!0;for(const O of d){const{lineNumber:W,beforeColumn:X,afterColumn:Z}=O,ee=i.getLineContent(W),he=ee.substring(0,X-1),we=ee.substring(Z-1);if(we.startsWith(I)||(P=!1),we.length>0){const vt=we.charAt(0);if(!lh._isBeforeClosingBrace(e,we)&&!y(vt))return null}if(f.open.length===1&&(s==="'"||s==='"')&&g!=="always"){const vt=ak(e.wordSeparators,[]);if(he.length>0){const Nt=he.charCodeAt(he.length-1);if(vt.get(Nt)===0)return null}}if(!i.tokenization.isCheapToTokenize(W))return null;i.tokenization.forceTokenization(W);const Te=i.tokenization.getLineTokens(W),Be=U5(Te,X-1);if(!f.shouldAutoClose(Be,X-Be.firstCharOffset))return null;const Me=f.findNeutralCharacter();if(Me){const vt=i.tokenization.getTokenTypeIfInsertingCharacter(W,X,Me);if(!f.isOK(vt))return null}}return P?f.close.substring(0,f.close.length-I.length):f.close}static _runAutoClosingOpenCharType(e,i,n,s,l,d,f){const g=[];for(let y=0,w=s.length;ynew I0(new at(I.positionLineNumber,I.positionColumn,I.positionLineNumber,I.positionColumn+1),"",!1));return new mb(4,x,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const w=this._getAutoClosingPairClose(i,n,l,g,!0);return w!==null?this._runAutoClosingOpenCharType(e,i,n,l,g,!0,w):null}static typeWithInterceptors(e,i,n,s,l,d,f){if(!e&&f===` +`){const w=[];for(let x=0,I=l.length;x{const s=i.get(Oc).getFocusedCodeEditor();return s&&s.hasTextFocus()?this._runEditorCommand(i,s,n):!1}),e.addImplementation(1e3,"generic-dom-input-textarea",(i,n)=>{const s=A0();return s&&["input","textarea"].indexOf(s.tagName.toLowerCase())>=0?(this.runDOMCommand(s),!0):!1}),e.addImplementation(0,"generic-dom",(i,n)=>{const s=i.get(Oc).getActiveCodeEditor();return s?(s.focus(),this._runEditorCommand(i,s,n)):!1})}_runEditorCommand(e,i,n){const s=this.runEditorCommand(e,i,n);return s||!0}}var pm;(function(c){class e extends e_{constructor(ee){super(ee),this._inSelectionMode=ee.inSelectionMode}runCoreEditorCommand(ee,he){if(!he.position)return;ee.model.pushStackElement(),ee.setCursorStates(he.source,3,[Zm.moveTo(ee,ee.getPrimaryCursorState(),this._inSelectionMode,he.position,he.viewPosition)])&&he.revealType!==2&&ee.revealAllCursors(he.source,!0,!0)}}c.MoveTo=qr(new e({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),c.MoveToSelect=qr(new e({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class i extends e_{runCoreEditorCommand(ee,he){ee.model.pushStackElement();const we=this._getColumnSelectResult(ee,ee.getPrimaryCursorState(),ee.getCursorColumnSelectData(),he);we!==null&&(ee.setCursorStates(he.source,3,we.viewStates.map(Te=>Pc.fromViewState(Te))),ee.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:we.fromLineNumber,fromViewVisualColumn:we.fromVisualColumn,toViewLineNumber:we.toLineNumber,toViewVisualColumn:we.toVisualColumn}),we.reversed?ee.revealTopMostCursor(he.source):ee.revealBottomMostCursor(he.source))}}c.ColumnSelect=qr(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(Z,ee,he,we){if(typeof we.position>"u"||typeof we.viewPosition>"u"||typeof we.mouseColumn>"u")return null;const Te=Z.model.validatePosition(we.position),Be=Z.coordinatesConverter.validateViewPosition(new yi(we.viewPosition.lineNumber,we.viewPosition.column),Te),Me=we.doColumnSelect?he.fromViewLineNumber:Be.lineNumber,vt=we.doColumnSelect?he.fromViewVisualColumn:we.mouseColumn-1;return B5.columnSelect(Z.cursorConfig,Z,Me,vt,Be.lineNumber,we.mouseColumn-1)}}),c.CursorColumnSelectLeft=qr(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(Z,ee,he,we){return B5.columnSelectLeft(Z.cursorConfig,Z,he)}}),c.CursorColumnSelectRight=qr(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(Z,ee,he,we){return B5.columnSelectRight(Z.cursorConfig,Z,he)}});class n extends i{constructor(ee){super(ee),this._isPaged=ee.isPaged}_getColumnSelectResult(ee,he,we,Te){return B5.columnSelectUp(ee.cursorConfig,ee,we,this._isPaged)}}c.CursorColumnSelectUp=qr(new n({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:3600,linux:{primary:0}}})),c.CursorColumnSelectPageUp=qr(new n({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:3595,linux:{primary:0}}}));class s extends i{constructor(ee){super(ee),this._isPaged=ee.isPaged}_getColumnSelectResult(ee,he,we,Te){return B5.columnSelectDown(ee.cursorConfig,ee,we,this._isPaged)}}c.CursorColumnSelectDown=qr(new s({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:3602,linux:{primary:0}}})),c.CursorColumnSelectPageDown=qr(new s({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:3596,linux:{primary:0}}}));class l extends e_{constructor(){super({id:"cursorMove",precondition:void 0,metadata:ive.metadata})}runCoreEditorCommand(ee,he){const we=ive.parse(he);we&&this._runCursorMove(ee,he.source,we)}_runCursorMove(ee,he,we){ee.model.pushStackElement(),ee.setCursorStates(he,3,l._move(ee,ee.getCursorStates(),we)),ee.revealAllCursors(he,!0)}static _move(ee,he,we){const Te=we.select,Be=we.value;switch(we.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return Zm.simpleMove(ee,he,we.direction,Te,Be,we.unit);case 11:case 13:case 12:case 14:return Zm.viewportMove(ee,he,we.direction,Te,Be);default:return null}}}c.CursorMoveImpl=l,c.CursorMove=qr(new l);class d extends e_{constructor(ee){super(ee),this._staticArgs=ee.args}runCoreEditorCommand(ee,he){let we=this._staticArgs;this._staticArgs.value===-1&&(we={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:he.pageSize||ee.cursorConfig.pageSize}),ee.model.pushStackElement(),ee.setCursorStates(he.source,3,Zm.simpleMove(ee,ee.getCursorStates(),we.direction,we.select,we.value,we.unit)),ee.revealAllCursors(he.source,!0)}}c.CursorLeft=qr(new d({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),c.CursorLeftSelect=qr(new d({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:1039}})),c.CursorRight=qr(new d({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),c.CursorRightSelect=qr(new d({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:1041}})),c.CursorUp=qr(new d({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),c.CursorUpSelect=qr(new d({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),c.CursorPageUp=qr(new d({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:11}})),c.CursorPageUpSelect=qr(new d({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:1035}})),c.CursorDown=qr(new d({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),c.CursorDownSelect=qr(new d({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),c.CursorPageDown=qr(new d({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:12}})),c.CursorPageDownSelect=qr(new d({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:1036}})),c.CreateCursor=qr(new class extends e_{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(Z,ee){if(!ee.position)return;let he;ee.wholeLine?he=Zm.line(Z,Z.getPrimaryCursorState(),!1,ee.position,ee.viewPosition):he=Zm.moveTo(Z,Z.getPrimaryCursorState(),!1,ee.position,ee.viewPosition);const we=Z.getCursorStates();if(we.length>1){const Te=he.modelState?he.modelState.position:null,Be=he.viewState?he.viewState.position:null;for(let Me=0,vt=we.length;MeBe&&(Te=Be);const Me=new at(Te,1,Te,Z.model.getLineMaxColumn(Te));let vt=0;if(he.at)switch(he.at){case sU.RawAtArgument.Top:vt=3;break;case sU.RawAtArgument.Center:vt=1;break;case sU.RawAtArgument.Bottom:vt=4;break}const Nt=Z.coordinatesConverter.convertModelRangeToViewRange(Me);Z.revealRange(ee.source,!1,Nt,vt,0)}}),c.SelectAll=new class extends y9e{constructor(){super(ssi)}runDOMCommand(Z){ok&&(Z.focus(),Z.select()),Z.ownerDocument.execCommand("selectAll")}runEditorCommand(Z,ee,he){const we=ee._getViewModel();we&&this.runCoreEditorCommand(we,he)}runCoreEditorCommand(Z,ee){Z.model.pushStackElement(),Z.setCursorStates("keyboard",3,[Zm.selectAll(Z,Z.getPrimaryCursorState())])}},c.SetSelection=qr(new class extends e_{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(Z,ee){ee.selection&&(Z.model.pushStackElement(),Z.setCursorStates(ee.source,3,[Pc.fromModelSelection(ee.selection)]))}})})(pm||(pm={}));const pdi=xn.and(Lt.textInputFocus,Lt.columnSelection);function $q(c,e){Ey.registerKeybindingRule({id:c,primary:e,when:pdi,weight:su+1})}$q(pm.CursorColumnSelectLeft.id,1039);$q(pm.CursorColumnSelectRight.id,1041);$q(pm.CursorColumnSelectUp.id,1040);$q(pm.CursorColumnSelectPageUp.id,1035);$q(pm.CursorColumnSelectDown.id,1042);$q(pm.CursorColumnSelectPageDown.id,1036);function zmt(c){return c.register(),c}var IU;(function(c){class e extends sg{runEditorCommand(n,s,l){const d=s._getViewModel();d&&this.runCoreEditingCommand(s,d,l||{})}}c.CoreEditingCommand=e,c.LineBreakInsert=qr(new class extends e{constructor(){super({id:"lineBreakInsert",precondition:Lt.writable,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(i,n,s){i.pushUndoStop(),i.executeCommands(this.id,lh.lineBreakInsert(n.cursorConfig,n.model,n.getCursorStates().map(l=>l.modelState.selection)))}}),c.Outdent=qr(new class extends e{constructor(){super({id:"outdent",precondition:Lt.writable,kbOpts:{weight:su,kbExpr:xn.and(Lt.editorTextFocus,Lt.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(i,n,s){i.pushUndoStop(),i.executeCommands(this.id,lh.outdent(n.cursorConfig,n.model,n.getCursorStates().map(l=>l.modelState.selection))),i.pushUndoStop()}}),c.Tab=qr(new class extends e{constructor(){super({id:"tab",precondition:Lt.writable,kbOpts:{weight:su,kbExpr:xn.and(Lt.editorTextFocus,Lt.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(i,n,s){i.pushUndoStop(),i.executeCommands(this.id,lh.tab(n.cursorConfig,n.model,n.getCursorStates().map(l=>l.modelState.selection))),i.pushUndoStop()}}),c.DeleteLeft=qr(new class extends e{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(i,n,s){const[l,d]=w9.deleteLeft(n.getPrevEditOperationType(),n.cursorConfig,n.model,n.getCursorStates().map(f=>f.modelState.selection),n.getCursorAutoClosedCharacters());l&&i.pushUndoStop(),i.executeCommands(this.id,d),n.setPrevEditOperationType(2)}}),c.DeleteRight=qr(new class extends e{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:su,kbExpr:Lt.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(i,n,s){const[l,d]=w9.deleteRight(n.getPrevEditOperationType(),n.cursorConfig,n.model,n.getCursorStates().map(f=>f.modelState.selection));l&&i.pushUndoStop(),i.executeCommands(this.id,d),n.setPrevEditOperationType(3)}}),c.Undo=new class extends y9e{constructor(){super(RCt)}runDOMCommand(i){i.ownerDocument.execCommand("undo")}runEditorCommand(i,n,s){if(!(!n.hasModel()||n.getOption(91)===!0))return n.getModel().undo()}},c.Redo=new class extends y9e{constructor(){super(FCt)}runDOMCommand(i){i.ownerDocument.execCommand("redo")}runEditorCommand(i,n,s){if(!(!n.hasModel()||n.getOption(91)===!0))return n.getModel().redo()}}})(IU||(IU={}));class Umt extends Z1e{constructor(e,i,n){super({id:e,precondition:void 0,metadata:n}),this._handlerId=i}runCommand(e,i){const n=e.get(Oc).getFocusedCodeEditor();n&&n.trigger("keyboard",this._handlerId,i)}}function eB(c,e){zmt(new Umt("default:"+c,c)),zmt(new Umt(c,c,e))}eB("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]});eB("replacePreviousChar");eB("compositionType");eB("compositionStart");eB("compositionEnd");eB("paste");eB("cut");class gdi{constructor(e,i,n,s){this.configuration=e,this.viewModel=i,this.userInputEvents=n,this.commandDelegate=s}paste(e,i,n,s){this.commandDelegate.paste(e,i,n,s)}type(e){this.commandDelegate.type(e)}compositionType(e,i,n,s){this.commandDelegate.compositionType(e,i,n,s)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){pm.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const i=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():e.mouseDownCount===3?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):e.mouseDownCount===2?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):s?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,i){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:i}}moveTo(e,i){pm.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,i))}_moveToSelect(e,i){pm.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,i))}_columnSelect(e,i,n){e=this._validateViewColumn(e),pm.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:i,doColumnSelect:n})}_createCursor(e,i){e=this._validateViewColumn(e),pm.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:i})}_lastCursorMoveToSelect(e,i){pm.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,i))}_wordSelect(e,i){pm.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,i))}_wordSelectDrag(e,i){pm.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,i))}_lastCursorWordSelect(e,i){pm.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,i))}_lineSelect(e,i){pm.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,i))}_lineSelectDrag(e,i){pm.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,i))}_lastCursorLineSelect(e,i){pm.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,i))}_lastCursorLineSelectDrag(e,i){pm.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,i))}_selectAll(){pm.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class GSt{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,i){this._lines=i,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const i=e-this._rendLineNumberStart;if(i<0||i>=this._lines.length)throw new Yu("Illegal value for lineNumber");return this._lines[i]}onLinesDeleted(e,i){if(this.getCount()===0)return null;const n=this.getStartLineNumber(),s=this.getEndLineNumber();if(is)return null;let l=0,d=0;for(let g=n;g<=s;g++){const y=g-this._rendLineNumberStart;e<=g&&g<=i&&(d===0?(l=y,d=1):d++)}if(e=s&&f<=l&&(this._lines[f-this._rendLineNumberStart].onContentChanged(),d=!0);return d}onLinesInserted(e,i){if(this.getCount()===0)return null;const n=i-e+1,s=this.getStartLineNumber(),l=this.getEndLineNumber();if(e<=s)return this._rendLineNumberStart+=n,null;if(e>l)return null;if(n+e>l)return this._lines.splice(e-this._rendLineNumberStart,l-e+1);const d=[];for(let x=0;xn)continue;const g=Math.max(i,f.fromLineNumber),y=Math.min(n,f.toLineNumber);for(let w=g;w<=y;w++){const x=w-this._rendLineNumberStart;this._lines[x].onTokensChanged(),s=!0}}return s}}class KSt{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new GSt(()=>this._host.createVisibleLine())}_createDomNode(){const e=pu(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(145)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){const i=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(i)for(let n=0,s=i.length;ni){const d=i,f=Math.min(n,l.rendLineNumberStart-1);d<=f&&(this._insertLinesBefore(l,d,f,s,i),l.linesLength+=f-d+1)}else if(l.rendLineNumberStart0&&(this._removeLinesBefore(l,d),l.linesLength-=d)}if(l.rendLineNumberStart=i,l.rendLineNumberStart+l.linesLength-1n){const d=Math.max(0,n-l.rendLineNumberStart+1),g=l.linesLength-1-d+1;g>0&&(this._removeLinesAfter(l,g),l.linesLength-=g)}return this._finishRendering(l,!1,s),l}_renderUntouchedLines(e,i,n,s,l){const d=e.rendLineNumberStart,f=e.lines;for(let g=i;g<=n;g++){const y=d+g;f[g].layoutLine(y,s[y-l],this.viewportData.lineHeight)}}_insertLinesBefore(e,i,n,s,l){const d=[];let f=0;for(let g=i;g<=n;g++)d[f++]=this.host.createVisibleLine();e.lines=d.concat(e.lines)}_removeLinesBefore(e,i){for(let n=0;n=0;f--){const g=e.lines[f];s[f]&&(g.setDomNode(d),d=d.previousSibling)}}_finishRenderingInvalidLines(e,i,n){const s=document.createElement("div");_4._ttPolicy&&(i=_4._ttPolicy.createHTML(i)),s.innerHTML=i;for(let l=0;lc});_4._sb=new jq(1e5);class QSt extends JC{constructor(e){super(e),this._visibleLines=new KSt(this),this.domNode=this._visibleLines.domNode;const n=this._context.configuration.options.get(50);s0(this.domNode,n),this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,i=this._dynamicOverlays.length;en.shouldRender());for(let n=0,s=i.length;n'),l.appendString(d),l.appendString(""),!0)}layoutLine(e,i,n){this._domNode&&(this._domNode.setTop(i),this._domNode.setHeight(n))}}class vdi extends QSt{constructor(e){super(e);const n=this._context.configuration.options.get(145);this._contentWidth=n.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const n=this._context.configuration.options.get(145);return this._contentWidth=n.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class ydi extends QSt{constructor(e){super(e);const i=this._context.configuration.options,n=i.get(145);this._contentLeft=n.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),s0(this.domNode,i.get(50))}onConfigurationChanged(e){const i=this._context.configuration.options;s0(this.domNode,i.get(50));const n=i.get(145);return this._contentLeft=n.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const i=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(i),this.domNode.setWidth(this._contentLeft)}}class hye{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){var i;(i=this.onKeyDown)===null||i===void 0||i.call(this,e)}emitKeyUp(e){var i;(i=this.onKeyUp)===null||i===void 0||i.call(this,e)}emitContextMenu(e){var i;(i=this.onContextMenu)===null||i===void 0||i.call(this,this._convertViewToModelMouseEvent(e))}emitMouseMove(e){var i;(i=this.onMouseMove)===null||i===void 0||i.call(this,this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){var i;(i=this.onMouseLeave)===null||i===void 0||i.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDown(e){var i;(i=this.onMouseDown)===null||i===void 0||i.call(this,this._convertViewToModelMouseEvent(e))}emitMouseUp(e){var i;(i=this.onMouseUp)===null||i===void 0||i.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){var i;(i=this.onMouseDrag)===null||i===void 0||i.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){var i;(i=this.onMouseDrop)===null||i===void 0||i.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){var e;(e=this.onMouseDropCanceled)===null||e===void 0||e.call(this)}emitMouseWheel(e){var i;(i=this.onMouseWheel)===null||i===void 0||i.call(this,e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return hye.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,i){const n={...e};return n.position&&(n.position=i.convertViewPositionToModelPosition(n.position)),n.range&&(n.range=i.convertViewRangeToModelRange(n.range)),(n.type===5||n.type===8)&&(n.detail=this.convertViewToModelViewZoneData(n.detail,i)),n}static convertViewToModelViewZoneData(e,i){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?i.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?i.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:i.convertViewPositionToModelPosition(e.position),afterLineNumber:i.convertViewPositionToModelPosition(new yi(e.afterLineNumber,1)).lineNumber}}}class bdi extends JC{constructor(e){super(e),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=pu(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let e=!1;const n=this._context.configuration.options.get(145),s=n.contentWidth-n.verticalScrollbarWidth;this.contentWidth!==s&&(this.contentWidth=s,e=!0);const l=n.contentLeft;return this.contentLeft!==l&&(this.contentLeft=l,e=!0),e}dispose(){super.dispose()}onConfigurationChanged(e){return this.update()}onScrollChanged(e){return e.scrollTopChanged||e.scrollLeftChanged}onDecorationsChanged(e){return!0}onZonesChanged(e){return!0}prepareRender(e){}render(e){var i;let n=0;const s=e.getDecorationsInViewport();for(const l of s){if(!l.options.blockClassName)continue;let d=this.blocks[n];d||(d=this.blocks[n]=pu(document.createElement("div")),this.domNode.appendChild(d));let f,g;l.options.blockIsAfterEnd?(f=e.getVerticalOffsetAfterLineNumber(l.range.endLineNumber,!1),g=e.getVerticalOffsetAfterLineNumber(l.range.endLineNumber,!0)):(f=e.getVerticalOffsetForLineNumber(l.range.startLineNumber,!0),g=l.range.isEmpty()&&!l.options.blockDoesNotCollapse?e.getVerticalOffsetForLineNumber(l.range.startLineNumber,!1):e.getVerticalOffsetAfterLineNumber(l.range.endLineNumber,!0));const[y,w,x,I]=(i=l.options.blockPadding)!==null&&i!==void 0?i:[0,0,0,0];d.setClassName("blockDecorations-block "+l.options.blockClassName),d.setLeft(this.contentLeft-I),d.setWidth(this.contentWidth+I+w),d.setTop(f-e.scrollTop-y),d.setHeight(g-f+y+x),n++}for(let l=n;l0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,i,n,s){const l=e.top,d=l,f=e.top+e.height,g=s.viewportHeight-f,y=l-n,w=d>=n,x=f,I=g>=n;let P=e.left;return P+i>s.scrollLeft+s.viewportWidth&&(P=s.scrollLeft+s.viewportWidth-i),Py){const P=I-(y-s);I-=P,n-=P}if(I=Z,we=P+n<=O.height-ee;return this._fixedOverflowWidgets?{fitsAbove:he,aboveTop:Math.max(I,Z),fitsBelow:we,belowTop:P,left:X}:{fitsAbove:he,aboveTop:f,fitsBelow:we,belowTop:g,left:W}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new eee(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){var i,n;const s=f(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),l=((i=this._secondaryAnchor.viewPosition)===null||i===void 0?void 0:i.lineNumber)===((n=this._primaryAnchor.viewPosition)===null||n===void 0?void 0:n.lineNumber)?this._secondaryAnchor.viewPosition:null,d=f(l,this._affinity,this._lineHeight);return{primary:s,secondary:d};function f(g,y,w){if(!g)return null;const x=e.visibleRangeForPosition(g);if(!x)return null;const I=g.column===1&&y===3?0:x.left,P=e.getVerticalOffsetForLineNumber(g.lineNumber)-e.scrollTop;return new qmt(P,I,w)}}_reduceAnchorCoordinates(e,i,n){if(!i)return e;const s=this._context.configuration.options.get(50);let l=i.left;return le.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){var i;if(!this._renderData||this._renderData.kind==="offViewport"){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,((i=this._renderData)===null||i===void 0?void 0:i.kind)==="offViewport"&&this._renderData.preserveFocus?this.domNode.setTop(-1e3):this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&o7e(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&o7e(this._actual.afterRender,this._actual,this._renderData.position)}}class YY{constructor(e,i){this.modelPosition=e,this.viewPosition=i}}class eee{constructor(e,i){this.top=e,this.left=i,this._coordinateBrand=void 0}}class qmt{constructor(e,i,n){this.top=e,this.left=i,this.height=n,this._anchorCoordinateBrand=void 0}}function o7e(c,e,...i){try{return c.call(e,...i)}catch{return null}}class XSt extends Y9{constructor(e){super(),this._context=e;const i=this._context.configuration.options,n=i.get(145);this._renderLineHighlight=i.get(96),this._renderLineHighlightOnlyWhenFocus=i.get(97),this._wordWrap=n.isViewportWrapping,this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new Qs(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const i=new Set;for(const l of this._selections)i.add(l.positionLineNumber);const n=Array.from(i);n.sort((l,d)=>l-d),ch(this._cursorLineNumbers,n)||(this._cursorLineNumbers=n,e=!0);const s=this._selections.every(l=>l.isEmpty());return this._selectionIsEmpty!==s&&(this._selectionIsEmpty=s,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const i=this._context.configuration.options,n=i.get(145);return this._renderLineHighlight=i.get(96),this._renderLineHighlightOnlyWhenFocus=i.get(97),this._wordWrap=n.isViewportWrapping,this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return this._renderLineHighlightOnlyWhenFocus?(this._focused=e.isFocused,!0):!1}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}const i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=[];for(let d=i;d<=n;d++){const f=d-i;s[f]=""}if(this._wordWrap){const d=this._renderOne(e,!1);for(const f of this._cursorLineNumbers){const g=this._context.viewModel.coordinatesConverter,y=g.convertViewPositionToModelPosition(new yi(f,1)).lineNumber,w=g.convertModelPositionToViewPosition(new yi(y,1)).lineNumber,x=g.convertModelPositionToViewPosition(new yi(y,this._context.viewModel.model.getLineMaxColumn(y))).lineNumber,I=Math.max(w,i),P=Math.min(x,n);for(let O=I;O<=P;O++){const W=O-i;s[W]=d}}}const l=this._renderOne(e,!0);for(const d of this._cursorLineNumbers){if(dn)continue;const f=d-i;s[f]=l}this._renderData=s}render(e,i){if(!this._renderData)return"";const n=i-e;return n>=this._renderData.length?"":this._renderData[n]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class wdi extends XSt{_renderOne(e,i){return`
`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class xdi extends XSt{_renderOne(e,i){return`
`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}dk((c,e)=>{const i=c.getColor(OSt);if(i&&(e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||c.defines(Wmt)){const n=c.getColor(Wmt);n&&(e.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${n}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${n}; }`),SE(c.type)&&(e.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}});class kdi extends Y9{constructor(e){super(),this._context=e;const i=this._context.configuration.options;this._typicalHalfwidthCharacterWidth=i.get(50).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const i=this._context.configuration.options;return this._typicalHalfwidthCharacterWidth=i.get(50).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const i=e.getDecorationsInViewport();let n=[],s=0;for(let g=0,y=i.length;g{if(g.options.zIndexy.options.zIndex)return 1;const w=g.options.className,x=y.options.className;return wx?1:at.compareRangesUsingStarts(g.range,y.range)});const l=e.visibleRange.startLineNumber,d=e.visibleRange.endLineNumber,f=[];for(let g=l;g<=d;g++){const y=g-l;f[y]=""}this._renderWholeLineDecorations(e,n,f),this._renderNormalDecorations(e,n,f),this._renderResult=f}_renderWholeLineDecorations(e,i,n){const s=e.visibleRange.startLineNumber,l=e.visibleRange.endLineNumber;for(let d=0,f=i.length;d',w=Math.max(g.range.startLineNumber,s),x=Math.min(g.range.endLineNumber,l);for(let I=w;I<=x;I++){const P=I-s;n[P]+=y}}}_renderNormalDecorations(e,i,n){var s;const l=e.visibleRange.startLineNumber;let d=null,f=!1,g=null,y=!1;for(let w=0,x=i.length;w';f[I]+=Z}}}render(e,i){if(!this._renderResult)return"";const n=i-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}class Tdi extends JC{constructor(e,i,n,s){super(e);const l=this._context.configuration.options,d=l.get(103),f=l.get(75),g=l.get(40),y=l.get(106),w={listenOnDomNode:n.domNode,className:"editor-scrollable "+m9e(e.theme.type),useShadows:!1,lazyRender:!0,vertical:d.vertical,horizontal:d.horizontal,verticalHasArrows:d.verticalHasArrows,horizontalHasArrows:d.horizontalHasArrows,verticalScrollbarSize:d.verticalScrollbarSize,verticalSliderSize:d.verticalSliderSize,horizontalScrollbarSize:d.horizontalScrollbarSize,horizontalSliderSize:d.horizontalSliderSize,handleMouseWheel:d.handleMouseWheel,alwaysConsumeMouseWheel:d.alwaysConsumeMouseWheel,arrowSize:d.arrowSize,mouseWheelScrollSensitivity:f,fastScrollSensitivity:g,scrollPredominantAxis:y,scrollByPage:d.scrollByPage};this.scrollbar=this._register(new cye(i.domNode,w,this._context.viewLayout.getScrollable())),NE.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=pu(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const x=(I,P,O)=>{const W={};{const X=I.scrollTop;X&&(W.scrollTop=this._context.viewLayout.getCurrentScrollTop()+X,I.scrollTop=0)}if(O){const X=I.scrollLeft;X&&(W.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+X,I.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(W,1)};this._register(tn(n.domNode,"scroll",I=>x(n.domNode,!0,!0))),this._register(tn(i.domNode,"scroll",I=>x(i.domNode,!0,!1))),this._register(tn(s.domNode,"scroll",I=>x(s.domNode,!0,!1))),this._register(tn(this.scrollbarDomNode.domNode,"scroll",I=>x(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,i=e.get(145);this.scrollbarDomNode.setLeft(i.contentLeft),e.get(73).side==="right"?this.scrollbarDomNode.setWidth(i.contentWidth+i.minimap.minimapWidth):this.scrollbarDomNode.setWidth(i.contentWidth),this.scrollbarDomNode.setHeight(i.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(103)||e.hasChanged(75)||e.hasChanged(40)){const i=this._context.configuration.options,n=i.get(103),s=i.get(75),l=i.get(40),d=i.get(106),f={vertical:n.vertical,horizontal:n.horizontal,verticalScrollbarSize:n.verticalScrollbarSize,horizontalScrollbarSize:n.horizontalScrollbarSize,scrollByPage:n.scrollByPage,handleMouseWheel:n.handleMouseWheel,mouseWheelScrollSensitivity:s,fastScrollSensitivity:l,scrollPredominantAxis:d};this.scrollbar.updateOptions(f)}return e.hasChanged(145)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+m9e(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}class b9e{constructor(e,i,n,s,l){this.startLineNumber=e,this.endLineNumber=i,this.className=n,this.tooltip=s,this._decorationToRenderBrand=void 0,this.zIndex=l??0}}class Ddi{constructor(e,i,n){this.className=e,this.zIndex=i,this.tooltip=n}}class Edi{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class ZSt extends Y9{_render(e,i,n){const s=[];for(let f=e;f<=i;f++){const g=f-e;s[g]=new Edi}if(n.length===0)return s;n.sort((f,g)=>f.className===g.className?f.startLineNumber===g.startLineNumber?f.endLineNumber-g.endLineNumber:f.startLineNumber-g.startLineNumber:f.classNames)continue;const y=Math.max(f,n),w=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new yi(y,0)),x=this._context.viewModel.glyphLanes.getLanesAtLine(w.lineNumber).indexOf(l.preference.lane);i.push(new Ldi(y,x,l.preference.zIndex,l))}}_collectSortedGlyphRenderRequests(e){const i=[];return this._collectDecorationBasedGlyphRenderRequest(e,i),this._collectWidgetBasedGlyphRenderRequest(e,i),i.sort((n,s)=>n.lineNumber===s.lineNumber?n.laneIndex===s.laneIndex?n.zIndex===s.zIndex?s.type===n.type?n.type===0&&s.type===0?n.className0;){const s=i.peek();if(!s)break;const l=i.takeWhile(f=>f.lineNumber===s.lineNumber&&f.laneIndex===s.laneIndex);if(!l||l.length===0)break;const d=l[0];if(d.type===0){const f=[];for(const g of l){if(g.zIndex!==d.zIndex||g.type!==d.type)break;(f.length===0||f[f.length-1]!==g.className)&&f.push(g.className)}n.push(d.accept(f.join(" ")))}else d.widget.renderInfo={lineNumber:d.lineNumber,laneIndex:d.laneIndex}}this._decorationGlyphsToRender=n}render(e){if(!this._glyphMargin){for(const n of Object.values(this._widgets))n.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){const n=this._managedDomNodes.pop();n==null||n.domNode.remove()}return}const i=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const n of Object.values(this._widgets))if(!n.renderInfo)n.domNode.setDisplay("none");else{const s=e.viewportData.relativeVerticalOffset[n.renderInfo.lineNumber-e.viewportData.startLineNumber],l=this._glyphMarginLeft+n.renderInfo.laneIndex*this._lineHeight;n.domNode.setDisplay("block"),n.domNode.setTop(s),n.domNode.setLeft(l),n.domNode.setWidth(i),n.domNode.setHeight(this._lineHeight)}for(let n=0;nthis._decorationGlyphsToRender.length;){const n=this._managedDomNodes.pop();n==null||n.domNode.remove()}}}class Ndi{constructor(e,i,n,s){this.lineNumber=e,this.laneIndex=i,this.zIndex=n,this.className=s,this.type=0}accept(e){return new Pdi(this.lineNumber,this.laneIndex,e)}}class Ldi{constructor(e,i,n,s){this.lineNumber=e,this.laneIndex=i,this.zIndex=n,this.widget=s,this.type=1}}class Pdi{constructor(e,i,n){this.lineNumber=e,this.laneIndex=i,this.combinedClassName=n}}class YSt extends Ii{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function _ye(c,e){let i=0,n=0;const s=c.length;for(;ns)throw new Yu("Illegal value for lineNumber");const l=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,d=!!(l&&l.offSide);let f=-2,g=-1,y=-2,w=-1;const x=Me=>{if(f!==-1&&(f===-2||f>Me-1)){f=-1,g=-1;for(let vt=Me-2;vt>=0;vt--){const Nt=this._computeIndentLevel(vt);if(Nt>=0){f=vt,g=Nt;break}}}if(y===-2){y=-1,w=-1;for(let vt=Me;vt=0){y=vt,w=Nt;break}}}};let I=-2,P=-1,O=-2,W=-1;const X=Me=>{if(I===-2){I=-1,P=-1;for(let vt=Me-2;vt>=0;vt--){const Nt=this._computeIndentLevel(vt);if(Nt>=0){I=vt,P=Nt;break}}}if(O!==-1&&(O===-2||O=0){O=vt,W=Nt;break}}}};let Z=0,ee=!0,he=0,we=!0,Te=0,Be=0;for(let Me=0;ee||we;Me++){const vt=e-Me,Nt=e+Me;Me>1&&(vt<1||vt1&&(Nt>s||Nt>n)&&(we=!1),Me>5e4&&(ee=!1,we=!1);let Ni=-1;if(ee&&vt>=1){const Mt=this._computeIndentLevel(vt-1);Mt>=0?(y=vt-1,w=Mt,Ni=Math.ceil(Mt/this.textModel.getOptions().indentSize)):(x(vt),Ni=this._getIndentLevelForWhitespaceLine(d,g,w))}let ci=-1;if(we&&Nt<=s){const Mt=this._computeIndentLevel(Nt-1);Mt>=0?(I=Nt-1,P=Mt,ci=Math.ceil(Mt/this.textModel.getOptions().indentSize)):(X(Nt),ci=this._getIndentLevelForWhitespaceLine(d,P,W))}if(Me===0){Be=Ni;continue}if(Me===1){if(Nt<=s&&ci>=0&&Be+1===ci){ee=!1,Z=Nt,he=Nt,Te=ci;continue}if(vt>=1&&Ni>=0&&Ni-1===Be){we=!1,Z=vt,he=vt,Te=Ni;continue}if(Z=e,he=e,Te=Be,Te===0)return{startLineNumber:Z,endLineNumber:he,indent:Te}}ee&&(Ni>=Te?Z=vt:ee=!1),we&&(ci>=Te?he=Nt:we=!1)}return{startLineNumber:Z,endLineNumber:he,indent:Te}}getLinesBracketGuides(e,i,n,s){var l;const d=[];for(let I=e;I<=i;I++)d.push([]);const f=!0,g=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new at(e,1,i,this.textModel.getLineMaxColumn(i))).toArray();let y;if(n&&g.length>0){const I=(e<=n.lineNumber&&n.lineNumber<=i?g:this.textModel.bracketPairs.getBracketPairsInRange(at.fromPositions(n)).toArray()).filter(P=>at.strictContainsPosition(P.range,n));y=(l=zte(I,P=>f))===null||l===void 0?void 0:l.range}const w=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,x=new ewt;for(const I of g){if(!I.closingBracketRange)continue;const P=y&&I.range.equalsRange(y);if(!P&&!s.includeInactive)continue;const O=x.getInlineClassName(I.nestingLevel,I.nestingLevelOfEqualBracketType,w)+(s.highlightActive&&P?" "+x.activeClassName:""),W=I.openingBracketRange.getStartPosition(),X=I.closingBracketRange.getStartPosition(),Z=s.horizontalGuides===r9.Enabled||s.horizontalGuides===r9.EnabledForActive&&P;if(I.range.startLineNumber===I.range.endLineNumber){Z&&d[I.range.startLineNumber-e].push(new J5(-1,I.openingBracketRange.getEndPosition().column,O,new ite(!1,X.column),-1,-1));continue}const ee=this.getVisibleColumnFromPosition(X),he=this.getVisibleColumnFromPosition(I.openingBracketRange.getStartPosition()),we=Math.min(he,ee,I.minVisibleColumnIndentation+1);let Te=!1;T1(this.textModel.getLineContent(I.closingBracketRange.startLineNumber))=e&&he>we&&d[W.lineNumber-e].push(new J5(we,-1,O,new ite(!1,W.column),-1,-1)),X.lineNumber<=i&&ee>we&&d[X.lineNumber-e].push(new J5(we,-1,O,new ite(!Te,X.column),-1,-1)))}for(const I of d)I.sort((P,O)=>P.visibleColumn-O.visibleColumn);return d}getVisibleColumnFromPosition(e){return ng.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,i){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(i<1||i>n)throw new Error("Illegal value for endLineNumber");const s=this.textModel.getOptions(),l=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,d=!!(l&&l.offSide),f=new Array(i-e+1);let g=-2,y=-1,w=-2,x=-1;for(let I=e;I<=i;I++){const P=I-e,O=this._computeIndentLevel(I-1);if(O>=0){g=I-1,y=O,f[P]=Math.ceil(O/s.indentSize);continue}if(g===-2){g=-1,y=-1;for(let W=I-2;W>=0;W--){const X=this._computeIndentLevel(W);if(X>=0){g=W,y=X;break}}}if(w!==-1&&(w===-2||w=0){w=W,x=X;break}}}f[P]=this._getIndentLevelForWhitespaceLine(d,y,x)}return f}_getIndentLevelForWhitespaceLine(e,i,n){const s=this.textModel.getOptions();return i===-1||n===-1?0:ig||this._maxIndentLeft>0&&ee>this._maxIndentLeft)break;const he=Z.horizontalLine?Z.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",we=Z.horizontalLine?((l=(s=e.visibleRangeForPosition(new yi(I,Z.horizontalLine.endColumn)))===null||s===void 0?void 0:s.left)!==null&&l!==void 0?l:ee+this._spaceWidth)-ee:this._spaceWidth;W+=`
`}x[P]=W}this._renderResult=x}getGuidesByLine(e,i,n){const s=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(e,i,n,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?r9.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?r9.EnabledForActive:r9.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,l=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,i):null;let d=0,f=0,g=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&n){const x=this._context.viewModel.getActiveIndentGuide(n.lineNumber,e,i);d=x.startLineNumber,f=x.endLineNumber,g=x.indent}const{indentSize:y}=this._context.viewModel.model.getOptions(),w=[];for(let x=e;x<=i;x++){const I=new Array;w.push(I);const P=s?s[x-e]:[],O=new U4(P),W=l?l[x-e]:0;for(let X=1;X<=W;X++){const Z=(X-1)*y+1,ee=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||P.length===0)&&d<=x&&x<=f&&X===g;I.push(...O.takeWhile(we=>we.visibleColumn!0)||[])}return w}render(e,i){if(!this._renderResult)return"";const n=i-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}function Sz(c){if(!(c&&c.isTransparent()))return c}dk((c,e)=>{const i=[{bracketColor:BSt,guideColor:Fui,guideColorActive:zui},{bracketColor:WSt,guideColor:Bui,guideColorActive:Uui},{bracketColor:VSt,guideColor:Wui,guideColorActive:qui},{bracketColor:HSt,guideColor:Vui,guideColorActive:$ui},{bracketColor:jSt,guideColor:Hui,guideColorActive:Jui},{bracketColor:zSt,guideColor:jui,guideColorActive:Gui}],n=new ewt,s=[{indentColor:Nne,indentColorActive:Lne},{indentColor:yui,indentColorActive:xui},{indentColor:bui,indentColorActive:kui},{indentColor:Cui,indentColorActive:Tui},{indentColor:Sui,indentColorActive:Dui},{indentColor:wui,indentColorActive:Eui}],l=i.map(f=>{var g,y;const w=c.getColor(f.bracketColor),x=c.getColor(f.guideColor),I=c.getColor(f.guideColorActive),P=Sz((g=Sz(x))!==null&&g!==void 0?g:w==null?void 0:w.transparent(.3)),O=Sz((y=Sz(I))!==null&&y!==void 0?y:w);if(!(!P||!O))return{guideColor:P,guideColorActive:O}}).filter(rL),d=s.map(f=>{const g=c.getColor(f.indentColor),y=c.getColor(f.indentColorActive),w=Sz(g),x=Sz(y);if(!(!w||!x))return{indentColor:w,indentColorActive:x}}).filter(rL);if(l.length>0){for(let f=0;f<30;f++){const g=l[f%l.length];e.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(f).replace(/ /g,".")} { --guide-color: ${g.guideColor}; --guide-color-active: ${g.guideColorActive}; }`)}e.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),e.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),e.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),e.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),e.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),e.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(d.length>0){for(let f=0;f<30;f++){const g=d[f%d.length];e.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${f} { --indent-color: ${g.indentColor}; --indent-color-active: ${g.indentColorActive}; }`)}e.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),e.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}});class a7e{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,i){this._domNode=e,this.endNode=i,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class Mdi{constructor(){this._currentVisibleRange=new at(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class Rdi{constructor(e,i,n,s,l,d,f){this.minimalReveal=e,this.lineNumber=i,this.startColumn=n,this.endColumn=s,this.startScrollTop=l,this.stopScrollTop=d,this.scrollType=f,this.type="range",this.minLineNumber=i,this.maxLineNumber=i}}class Fdi{constructor(e,i,n,s,l){this.minimalReveal=e,this.selections=i,this.startScrollTop=n,this.stopScrollTop=s,this.scrollType=l,this.type="selections";let d=i[0].startLineNumber,f=i[0].endLineNumber;for(let g=1,y=i.length;g{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new id(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new Mdi,this._horizontalRevealRequest=null,this._stickyScrollEnabled=s.get(115).enabled,this._maxNumberStickyLines=s.get(115).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new qN(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(146)&&(this._maxLineWidth=0);const i=this._context.configuration.options,n=i.get(50),s=i.get(146);return this._lineHeight=i.get(67),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._isViewportWrapping=s.isViewportWrapping,this._revealHorizontalRightPadding=i.get(100),this._cursorSurroundingLines=i.get(29),this._cursorSurroundingLinesStyle=i.get(30),this._canUseLayerHinting=!i.get(32),this._stickyScrollEnabled=i.get(115).enabled,this._maxNumberStickyLines=i.get(115).maxLineCount,s0(this.domNode,n),this._onOptionsMaybeChanged(),e.hasChanged(145)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,i=new Omt(e,this._context.theme.type);if(!this._viewLineOptions.equals(i)){this._viewLineOptions=i;const n=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();for(let l=n;l<=s;l++)this._visibleLines.getVisibleLine(l).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let s=!1;for(let l=i;l<=n;l++)s=this._visibleLines.getVisibleLine(l).onSelectionChanged()||s;return s}onDecorationsChanged(e){{const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++)this._visibleLines.getVisibleLine(s).onDecorationsChanged()}return!0}onFlushed(e){const i=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,i}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const i=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(i===-1)return!1;let n=this._context.viewLayout.validateScrollPosition({scrollTop:i});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new Rdi(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new Fdi(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const l=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(n,l),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const i=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopn)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,i){const n=this._getViewLineDomNode(e);if(n===null)return null;const s=this._getLineNumberFor(n);if(s===-1||s<1||s>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(s)===1)return new yi(s,1);const l=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();if(sd)return null;let f=this._visibleLines.getVisibleLine(s).getColumnOfNodeOffset(e,i);const g=this._context.viewModel.getLineMinColumn(s);return fn)return-1;const s=new a7e(this.domNode.domNode,this._textRangeRestingSpot),l=this._visibleLines.getVisibleLine(e).getWidth(s);return this._updateLineWidthsSlowIfDomDidLayout(s),l}linesVisibleRangesForRange(e,i){if(this.shouldRender())return null;const n=e.endLineNumber,s=at.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!s)return null;const l=[];let d=0;const f=new a7e(this.domNode.domNode,this._textRangeRestingSpot);let g=0;i&&(g=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new yi(s.startLineNumber,1)).lineNumber);const y=this._visibleLines.getStartLineNumber(),w=this._visibleLines.getEndLineNumber();for(let x=s.startLineNumber;x<=s.endLineNumber;x++){if(xw)continue;const I=x===s.startLineNumber?s.startColumn:1,P=x!==s.endLineNumber,O=P?this._context.viewModel.getLineMaxColumn(x):s.endColumn,W=this._visibleLines.getVisibleLine(x).getVisibleRangesForRange(x,I,O,f);if(W){if(i&&xthis._visibleLines.getEndLineNumber())return null;const s=new a7e(this.domNode.domNode,this._textRangeRestingSpot),l=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,i,n,s);return this._updateLineWidthsSlowIfDomDidLayout(s),l}visibleRangeForPosition(e){const i=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return i?new Fci(i.outsideRenderedLine,i.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let s=1,l=!0;for(let d=i;d<=n;d++){const f=this._visibleLines.getVisibleLine(d);if(e&&!f.getWidthIsFast()){l=!1;continue}s=Math.max(s,f.getWidth(null))}return l&&i===1&&n===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(s),l}_checkMonospaceFontAssumptions(){let e=-1,i=-1;const n=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();for(let l=n;l<=s;l++){const d=this._visibleLines.getVisibleLine(l);if(d.needsMonospaceFontCheck()){const f=d.getWidth(null);f>i&&(i=f,e=l)}}if(e!==-1&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let l=n;l<=s;l++)this._visibleLines.getVisibleLine(l).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const n=this._horizontalRevealRequest;if(e.startLineNumber<=n.minLineNumber&&n.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const s=this._computeScrollLeftToReveal(n);s&&(this._isViewportWrapping||this._ensureMaxLineWidth(s.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:s.scrollLeft},n.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),Ty&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const n=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();for(let l=n;l<=s;l++)if(this._visibleLines.getVisibleLine(l).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const i=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-i),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const i=Math.ceil(e);this._maxLineWidth0){let Z=l[0].startLineNumber,ee=l[0].endLineNumber;for(let he=1,we=l.length;heg){if(!w)return-1;X=x}else if(d===5||d===6)if(d===6&&f<=x&&I<=y)X=f;else{const Z=Math.max(5*this._lineHeight,g*.2),ee=x-Z,he=I-g;X=Math.max(he,ee)}else if(d===1||d===2)if(d===2&&f<=x&&I<=y)X=f;else{const Z=(x+I)/2;X=Math.max(0,Z-g/2)}else X=this._computeMinimumScrolling(f,y,x,I,d===3,d===4);return X}_computeScrollLeftToReveal(e){const i=this._context.viewLayout.getCurrentViewport(),n=this._context.configuration.options.get(145),s=i.left,l=s+i.width-n.verticalScrollbarWidth;let d=1073741824,f=0;if(e.type==="range"){const y=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!y)return null;for(const w of y.ranges)d=Math.min(d,Math.round(w.left)),f=Math.max(f,Math.round(w.left+w.width))}else for(const y of e.selections){if(y.startLineNumber!==y.endLineNumber)return null;const w=this._visibleRangesForLineRange(y.startLineNumber,y.startColumn,y.endColumn);if(!w)return null;for(const x of w.ranges)d=Math.min(d,Math.round(x.left)),f=Math.max(f,Math.round(x.left+x.width))}return e.minimalReveal||(d=Math.max(0,d-pye.HORIZONTAL_EXTRA_PX),f+=this._revealHorizontalRightPadding),e.type==="selections"&&f-d>i.width?null:{scrollLeft:this._computeMinimumScrolling(s,l,d,f),maxHorizontalOffset:f}}_computeMinimumScrolling(e,i,n,s,l,d){e=e|0,i=i|0,n=n|0,s=s|0,l=!!l,d=!!d;const f=i-e;if(s-ni)return Math.max(0,s-f)}else return n;return e}}pye.HORIZONTAL_EXTRA_PX=30;class Bdi extends ZSt{constructor(e){super(),this._context=e;const n=this._context.configuration.options.get(145);this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const n=this._context.configuration.options.get(145);return this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){var i,n;const s=e.getDecorationsInViewport(),l=[];let d=0;for(let f=0,g=s.length;f',g=[];for(let y=i;y<=n;y++){const w=y-i,x=s[w].getDecorations();let I="";for(const P of x){let O='
';l[f]=y}this._renderResult=l}render(e,i){return this._renderResult?this._renderResult[i-e]:""}}class gw{constructor(e,i,n,s){this._rgba8Brand=void 0,this.r=gw._clamp(e),this.g=gw._clamp(i),this.b=gw._clamp(n),this.a=gw._clamp(s)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:e|0}}gw.Empty=new gw(0,0,0,0);class Ane extends Ii{static getInstance(){return this._INSTANCE||(this._INSTANCE=new Ane),this._INSTANCE}constructor(){super(),this._onDidChange=new ui,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Nh.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){const e=Nh.getColorMap();if(!e){this._colors=[gw.Empty],this._backgroundIsLight=!0;return}this._colors=[gw.Empty];for(let n=1;n=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}Ane._INSTANCE=null;const Vdi=(()=>{const c=[];for(let e=32;e<=126;e++)c.push(e);return c.push(65533),c})(),Hdi=(c,e)=>(c-=32,c<0||c>96?e<=2?(c+96)%96:95:c);class nie{constructor(e,i){this.scale=i,this._minimapCharRendererBrand=void 0,this.charDataNormal=nie.soften(e,12/15),this.charDataLight=nie.soften(e,50/60)}static soften(e,i){const n=new Uint8ClampedArray(e.length);for(let s=0,l=e.length;se.width||n+O>e.height){console.warn("bad render request outside image data");return}const W=w?this.charDataLight:this.charDataNormal,X=Hdi(s,y),Z=e.width*4,ee=f.r,he=f.g,we=f.b,Te=l.r-ee,Be=l.g-he,Me=l.b-we,vt=Math.max(d,g),Nt=e.data;let Ni=X*I*P,ci=n*Z+i*4;for(let Mt=0;Mte.width||n+x>e.height){console.warn("bad render request outside image data");return}const I=e.width*4,P=.5*(l/255),O=d.r,W=d.g,X=d.b,Z=s.r-O,ee=s.g-W,he=s.b-X,we=O+Z*P,Te=W+ee*P,Be=X+he*P,Me=Math.max(l,f),vt=e.data;let Nt=n*I+i*4;for(let Ni=0;Ni{const e=new Uint8ClampedArray(c.length/2);for(let i=0;i>1]=$mt[c[i]]<<4|$mt[c[i+1]]&15;return e},Gmt={1:ZM(()=>Jmt("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:ZM(()=>Jmt("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class nte{static create(e,i){if(this.lastCreated&&e===this.lastCreated.scale&&i===this.lastFontFamily)return this.lastCreated;let n;return Gmt[e]?n=new nie(Gmt[e](),e):n=nte.createFromSampleData(nte.createSampleData(i).data,e),this.lastFontFamily=i,this.lastCreated=n,n}static createSampleData(e){const i=document.createElement("canvas"),n=i.getContext("2d");i.style.height="16px",i.height=16,i.width=96*10,i.style.width=96*10+"px",n.fillStyle="#ffffff",n.font=`bold 16px ${e}`,n.textBaseline="middle";let s=0;for(const l of Vdi)n.fillText(String.fromCharCode(l),s,16/2),s+=10;return n.getImageData(0,0,96*10,16)}static createFromSampleData(e,i){if(e.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const s=nte._downsample(e,i);return new nie(s,i)}static _downsampleChar(e,i,n,s,l){const d=1*l,f=2*l;let g=s,y=0;for(let w=0;w0){const y=255/g;for(let w=0;wnte.create(this.fontScale,g.fontFamily)),this.defaultBackgroundColor=n.getColor(2),this.backgroundColor=NU._getMinimapBackground(i,this.defaultBackgroundColor),this.foregroundAlpha=NU._getMinimapForegroundOpacity(i)}static _getMinimapBackground(e,i){const n=e.getColor(Ili);return n?new gw(n.rgba.r,n.rgba.g,n.rgba.b,Math.round(255*n.rgba.a)):i}static _getMinimapForegroundOpacity(e){const i=e.getColor(Nli);return i?gw._clamp(Math.round(255*i.rgba.a)):255}static _getSectionHeaderColor(e,i){const n=e.getColor(tk);return n?new gw(n.rgba.r,n.rgba.g,n.rgba.b,Math.round(255*n.rgba.a)):i}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.sectionHeaderFontSize===e.sectionHeaderFontSize&&this.sectionHeaderLetterSpacing===e.sectionHeaderLetterSpacing&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class rte{constructor(e,i,n,s,l,d,f,g,y){this.scrollTop=e,this.scrollHeight=i,this.sliderNeeded=n,this._computedSliderRatio=s,this.sliderTop=l,this.sliderHeight=d,this.topPaddingLineCount=f,this.startLineNumber=g,this.endLineNumber=y}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){const i=Math.max(this.startLineNumber,e.startLineNumber),n=Math.min(this.endLineNumber,e.endLineNumber);return i>n?null:[i,n]}getYForLineNumber(e,i){return+(e-this.startLineNumber+this.topPaddingLineCount)*i}static create(e,i,n,s,l,d,f,g,y,w,x){const I=e.pixelRatio,P=e.minimapLineHeight,O=Math.floor(e.canvasInnerHeight/P),W=e.lineHeight;if(e.minimapHeightIsEditorHeight){let Be=g*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(Be+=Math.max(0,l-e.lineHeight-e.paddingBottom));const Me=Math.max(1,Math.floor(l*l/Be)),vt=Math.max(0,e.minimapHeight-Me),Nt=vt/(w-l),Ni=y*Nt,ci=vt>0,Mt=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),pi=Math.floor(e.paddingTop/e.lineHeight);return new rte(y,w,ci,Nt,Ni,Me,pi,1,Math.min(f,Mt))}let X;if(d&&n!==f){const Be=n-i+1;X=Math.floor(Be*P/I)}else{const Be=l/W;X=Math.floor(Be*P/I)}const Z=Math.floor(e.paddingTop/W);let ee=Math.floor(e.paddingBottom/W);if(e.scrollBeyondLastLine){const Be=l/W;ee=Math.max(ee,Be-1)}let he;if(ee>0){const Be=l/W;he=(Z+f+ee-Be-1)*P/I}else he=Math.max(0,(Z+f)*P/I-X);he=Math.min(e.minimapHeight-X,he);const we=he/(w-l),Te=y*we;if(O>=Z+f+ee){const Be=he>0;return new rte(y,w,Be,we,Te,X,Z,1,f)}else{let Be;i>1?Be=i+Z:Be=Math.max(1,y/W);let Me,vt=Math.max(1,Math.floor(Be-Te*I/P));vty&&(vt=Math.min(vt,x.startLineNumber),Me=Math.max(Me,x.topPaddingLineCount)),x.scrollTop=e.paddingTop?ci=(i-vt+Me+Ni)*P/I:ci=y/e.paddingTop*(Me+Ni)*P/I,new rte(y,w,!0,we,ci,X,Me,vt,Nt)}}}class nve{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}nve.INVALID=new nve(-1);class Kmt{constructor(e,i,n){this.renderedLayout=e,this._imageData=i,this._renderedLines=new GSt(()=>nve.INVALID),this._renderedLines._set(e.startLineNumber,n)}linesEquals(e){if(!this.scrollEquals(e))return!1;const n=this._renderedLines._get().lines;for(let s=0,l=n.length;s1){for(let Z=0,ee=s-1;Z0&&this.minimapLines[n-1]>=e;)n--;let s=this.modelLineToMinimapLine(i)-1;for(;s+1i)return null}return[n+1,s+1]}decorationLineRangeToMinimapLineRange(e,i){let n=this.modelLineToMinimapLine(e),s=this.modelLineToMinimapLine(i);return e!==i&&s===n&&(s===this.minimapLines.length?n>1&&n--:s++),[n,s]}onLinesDeleted(e){const i=e.toLineNumber-e.fromLineNumber+1;let n=this.minimapLines.length,s=0;for(let l=this.minimapLines.length-1;l>=0&&!(this.minimapLines[l]=0&&!(this.minimapLines[n]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:i,viewportEndLineNumber:n,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(i),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(s)}_recreateLineSampling(){this._minimapSelections=null;const e=!!this._samplingState,[i,n]=rie.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=i,e&&this._samplingState)for(const s of n)switch(s.type){case"deleted":this._actual.onLinesDeleted(s.deleteFromLineNumber,s.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(s.insertFromLineNumber,s.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,i,n){if(this._samplingState){const s=[];for(let l=0,d=i-e+1;l{var l;return!(!((l=s.options.minimap)===null||l===void 0)&&l.sectionHeaderStyle)});if(this._samplingState){const s=[];for(const l of n){if(!l.options.minimap)continue;const d=l.range,f=this._samplingState.modelLineToMinimapLine(d.startLineNumber),g=this._samplingState.modelLineToMinimapLine(d.endLineNumber);s.push(new uSt(new at(f,d.startColumn,g,d.endColumn),l.options))}return s}return n}getSectionHeaderDecorationsInViewport(e,i){const n=this.options.minimapLineHeight,l=this.options.sectionHeaderFontSize/n;return e=Math.floor(Math.max(1,e-l)),this._getMinimapDecorationsInViewport(e,i).filter(d=>{var f;return!!(!((f=d.options.minimap)===null||f===void 0)&&f.sectionHeaderStyle)})}_getMinimapDecorationsInViewport(e,i){let n;if(this._samplingState){const s=this._samplingState.minimapLines[e-1],l=this._samplingState.minimapLines[i-1];n=new at(s,1,l,this._context.viewModel.getLineMaxColumn(l))}else n=new at(e,1,i,this._context.viewModel.getLineMaxColumn(i));return this._context.viewModel.getMinimapDecorationsInRange(n)}getSectionHeaderText(e,i){var n;const s=(n=e.options.minimap)===null||n===void 0?void 0:n.sectionHeaderText;if(!s)return null;const l=this._sectionHeaderCache.get(s);if(l)return l;const d=i(s);return this._sectionHeaderCache.set(s,d),d}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.viewModel.revealRange("mouse",!1,new at(e,1,e,1),1,0)}setScrollTop(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e},1)}}class oU extends Ii{constructor(e,i){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=e,this._model=i,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(Nmt),this._domNode=pu(document.createElement("div")),NE.write(this._domNode,9),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=pu(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=pu(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=pu(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=pu(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=pu(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._pointerDownListener=n_(this._domNode.domNode,yr.POINTER_DOWN,n=>{if(n.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(n.button===0&&this._lastRenderData){const y=Y_(this._slider.domNode),w=y.top+y.height/2;this._startSliderDragging(n,w,this._lastRenderData.renderedLayout)}return}const l=this._model.options.minimapLineHeight,d=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*n.offsetY;let g=Math.floor(d/l)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;g=Math.min(g,this._model.getLineCount()),this._model.revealLineNumber(g)}),this._sliderPointerMoveMonitor=new Uq,this._sliderPointerDownListener=n_(this._slider.domNode,yr.POINTER_DOWN,n=>{n.preventDefault(),n.stopPropagation(),n.button===0&&this._lastRenderData&&this._startSliderDragging(n,n.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=Jd.addTarget(this._domNode.domNode),this._sliderTouchStartListener=tn(this._domNode.domNode,Gd.Start,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(n))},{passive:!1}),this._sliderTouchMoveListener=tn(this._domNode.domNode,Gd.Change,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(n)},{passive:!1}),this._sliderTouchEndListener=n_(this._domNode.domNode,Gd.End,n=>{n.preventDefault(),n.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,i,n){if(!e.target||!(e.target instanceof Element))return;const s=e.pageX;this._slider.toggleClassName("active",!0);const l=(d,f)=>{const g=Y_(this._domNode.domNode),y=Math.min(Math.abs(f-s),Math.abs(f-g.left),Math.abs(f-g.left-g.width));if(M0&&y>zdi){this._model.setScrollTop(n.scrollTop);return}const w=d-i;this._model.setScrollTop(n.getDesiredScrollTopFromDelta(w))};e.pageY!==i&&l(e.pageY,s),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,d=>l(d.pageY,d.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){const i=this._domNode.domNode.getBoundingClientRect().top,n=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-i);this._model.setScrollTop(n)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const e=["minimap"];return this._model.options.showSlider==="always"?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new Cje(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,i){return this._lastRenderData?this._lastRenderData.onLinesChanged(e,i):!1}onLinesDeleted(e,i){var n;return(n=this._lastRenderData)===null||n===void 0||n.onLinesDeleted(e,i),!0}onLinesInserted(e,i){var n;return(n=this._lastRenderData)===null||n===void 0||n.onLinesInserted(e,i),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(Nmt),this._renderDecorations=!0,!0}onTokensChanged(e){return this._lastRenderData?this._lastRenderData.onTokensChanged(e):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const n=rte.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(n.sliderNeeded?"block":"none"),this._slider.setTop(n.sliderTop),this._slider.setHeight(n.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(n.sliderHeight),this.renderDecorations(n),this._lastRenderData=this.renderLines(n)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const i=this._model.getSelections();i.sort(at.compareRangesUsingStarts);const n=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);n.sort((I,P)=>(I.options.zIndex||0)-(P.options.zIndex||0));const{canvasInnerWidth:s,canvasInnerHeight:l}=this._model.options,d=this._model.options.minimapLineHeight,f=this._model.options.minimapCharWidth,g=this._model.getOptions().tabSize,y=this._decorationsCanvas.domNode.getContext("2d");y.clearRect(0,0,s,l);const w=new Qmt(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(y,i,w,e,d),this._renderDecorationsLineHighlights(y,n,w,e,d);const x=new Qmt(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(y,i,x,e,d,g,f,s),this._renderDecorationsHighlights(y,n,x,e,d,g,f,s),this._renderSectionHeaders(e)}}_renderSelectionLineHighlights(e,i,n,s,l){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let d=0,f=0;for(const g of i){const y=s.intersectWithViewport(g);if(!y)continue;const[w,x]=y;for(let O=w;O<=x;O++)n.set(O,!0);const I=s.getYForLineNumber(w,l),P=s.getYForLineNumber(x,l);f>=I||(f>d&&e.fillRect(IN,d,e.canvas.width,f-d),d=I),f=P}f>d&&e.fillRect(IN,d,e.canvas.width,f-d)}_renderDecorationsLineHighlights(e,i,n,s,l){const d=new Map;for(let f=i.length-1;f>=0;f--){const g=i[f],y=g.options.minimap;if(!y||y.position!==1)continue;const w=s.intersectWithViewport(g.range);if(!w)continue;const[x,I]=w,P=y.getColor(this._theme.value);if(!P||P.isTransparent())continue;let O=d.get(P.toString());O||(O=P.transparent(.5).toString(),d.set(P.toString(),O)),e.fillStyle=O;for(let W=x;W<=I;W++){if(n.has(W))continue;n.set(W,!0);const X=s.getYForLineNumber(x,l);e.fillRect(IN,X,e.canvas.width,l)}}}_renderSelectionsHighlights(e,i,n,s,l,d,f,g){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const y of i){const w=s.intersectWithViewport(y);if(!w)continue;const[x,I]=w;for(let P=x;P<=I;P++)this.renderDecorationOnLine(e,n,y,this._selectionColor,s,P,l,l,d,f,g)}}_renderDecorationsHighlights(e,i,n,s,l,d,f,g){for(const y of i){const w=y.options.minimap;if(!w)continue;const x=s.intersectWithViewport(y.range);if(!x)continue;const[I,P]=x,O=w.getColor(this._theme.value);if(!(!O||O.isTransparent()))for(let W=I;W<=P;W++)switch(w.position){case 1:this.renderDecorationOnLine(e,n,y.range,O,s,W,l,l,d,f,g);continue;case 2:{const X=s.getYForLineNumber(W,l);this.renderDecoration(e,O,2,X,Udi,l);continue}}}}renderDecorationOnLine(e,i,n,s,l,d,f,g,y,w,x){const I=l.getYForLineNumber(d,g);if(I+f<0||I>this._model.options.canvasInnerHeight)return;const{startLineNumber:P,endLineNumber:O}=n,W=P===d?n.startColumn:1,X=O===d?n.endColumn:this._model.getLineMaxColumn(d),Z=this.getXOffsetForPosition(i,d,W,y,w,x),ee=this.getXOffsetForPosition(i,d,X,y,w,x);this.renderDecoration(e,s,Z,I,ee-Z,f)}getXOffsetForPosition(e,i,n,s,l,d){if(n===1)return IN;if((n-1)*l>=d)return d;let g=e.get(i);if(!g){const y=this._model.getLineContent(i);g=[IN];let w=IN;for(let x=1;x=d){g[x]=d;break}g[x]=O,w=O}e.set(i,g)}return n-1X.range.startLineNumber-Z.range.startLineNumber);const W=oU._fitSectionHeader.bind(null,P,f-IN);for(const X of O){const Z=e.getYForLineNumber(X.range.startLineNumber,n)+s,ee=Z-s,he=ee+2,we=this._model.getSectionHeaderText(X,W);oU._renderSectionLabel(P,we,((i=X.options.minimap)===null||i===void 0?void 0:i.sectionHeaderStyle)===2,y,x,f,ee,d,Z,he)}}static _fitSectionHeader(e,i,n){if(!n)return n;const s="…",l=e.measureText(n).width,d=e.measureText(s).width;if(l<=i||l<=d)return n;const f=n.length,g=l/n.length,y=Math.floor((i-d)/g)-1;let w=Math.ceil(y/2);for(;w>0&&/\s/.test(n[w-1]);)--w;return n.substring(0,w)+s+n.substring(f-(y-w))}static _renderSectionLabel(e,i,n,s,l,d,f,g,y,w){i&&(e.fillStyle=s,e.fillRect(0,f,d,g),e.fillStyle=l,e.fillText(i,IN,y)),n&&(e.beginPath(),e.moveTo(0,w),e.lineTo(d,w),e.closePath(),e.stroke())}renderLines(e){const i=e.startLineNumber,n=e.endLineNumber,s=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const $n=this._lastRenderData._get();return new Kmt(e,$n.imageData,$n.lines)}const l=this._getBuffer();if(!l)return null;const[d,f,g]=oU._renderUntouchedLines(l,e.topPaddingLineCount,i,n,s,this._lastRenderData),y=this._model.getMinimapLinesRenderingData(i,n,g),w=this._model.getOptions().tabSize,x=this._model.options.defaultBackgroundColor,I=this._model.options.backgroundColor,P=this._model.options.foregroundAlpha,O=this._model.tokensColorTracker,W=O.backgroundIsLight(),X=this._model.options.renderMinimap,Z=this._model.options.charRenderer(),ee=this._model.options.fontScale,he=this._model.options.minimapCharWidth,Te=(X===1?2:3)*ee,Be=s>Te?Math.floor((s-Te)/2):0,Me=I.a/255,vt=new gw(Math.round((I.r-x.r)*Me+x.r),Math.round((I.g-x.g)*Me+x.g),Math.round((I.b-x.b)*Me+x.b),255);let Nt=e.topPaddingLineCount*s;const Ni=[];for(let $n=0,Ri=n-i+1;$n=0&&ciee)return;const Mt=X.charCodeAt(Te);if(Mt===9){const pi=I-(Te+Be)%I;Be+=pi-1,we+=pi*d}else if(Mt===32)we+=d;else{const pi=eR(Mt)?2:1;for(let gn=0;gnee)return}}}}}class Qmt{constructor(e,i,n){this._startLineNumber=e,this._endLineNumber=i,this._defaultValue=n,this._values=[];for(let s=0,l=this._endLineNumber-this._startLineNumber+1;sthis._endLineNumber||(this._values[e-this._startLineNumber]=i)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}class $di extends JC{constructor(e,i){super(e),this._viewDomNode=i;const s=this._context.configuration.options.get(145);this._widgets={},this._verticalScrollbarWidth=s.verticalScrollbarWidth,this._minimapWidth=s.minimap.minimapWidth,this._horizontalScrollbarHeight=s.horizontalScrollbarHeight,this._editorHeight=s.height,this._editorWidth=s.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=pu(document.createElement("div")),NE.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=pu(document.createElement("div")),NE.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const n=this._context.configuration.options.get(145);return this._verticalScrollbarWidth=n.verticalScrollbarWidth,this._minimapWidth=n.minimap.minimapWidth,this._horizontalScrollbarHeight=n.horizontalScrollbarHeight,this._editorHeight=n.height,this._editorWidth=n.width,!0}addWidget(e){const i=pu(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:i},i.setPosition("absolute"),i.setAttribute("widgetId",e.getId()),e.allowEditorOverflow?this.overflowingOverlayWidgetsDomNode.appendChild(i):this._domNode.appendChild(i),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,i){const n=this._widgets[e.getId()],s=i?i.preference:null,l=i==null?void 0:i.stackOridinal;return n.preference===s&&n.stack===l?(this._updateMaxMinWidth(),!1):(n.preference=s,n.stack=l,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){const i=e.getId();if(this._widgets.hasOwnProperty(i)){const s=this._widgets[i].domNode.domNode;delete this._widgets[i],s.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){var e,i;let n=0;const s=Object.keys(this._widgets);for(let l=0,d=s.length;l0);i.sort((s,l)=>(this._widgets[s].stack||0)-(this._widgets[l].stack||0));for(let s=0,l=i.length;s=3){const l=Math.floor(s/3),d=Math.floor(s/3),f=s-l-d,g=e,y=g+l,w=g+l+f;return[[0,g,y,g,w,g,y,g],[0,l,f,l+f,d,l+f+d,f+d,l+f+d]]}else if(n===2){const l=Math.floor(s/2),d=s-l,f=e,g=f+l;return[[0,f,f,f,g,f,f,f],[0,l,l,l,d,l+d,l+d,l+d]]}else{const l=e,d=s;return[[0,l,l,l,l,l,l,l],[0,d,d,d,d,d,d,d]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColorSingle===e.cursorColorSingle&&this.cursorColorPrimary===e.cursorColorPrimary&&this.cursorColorSecondary===e.cursorColorSecondary&&this.themeType===e.themeType&&Qi.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class Gdi extends JC{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=pu(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Nh.onDidChange(i=>{i.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[{position:new yi(1,1),color:this._settings.cursorColorSingle}]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const i=new Jdi(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(i)?!1:(this._settings=i,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}onCursorStateChanged(e){this._cursorPositions=[];for(let i=0,n=e.selections.length;i1&&(s=i===0?this._settings.cursorColorPrimary:this._settings.cursorColorSecondary),this._cursorPositions.push({position:e.selections[i].getPosition(),color:s})}return this._cursorPositions.sort((i,n)=>yi.compare(i.position,n.position)),this._markRenderingIsMaybeNeeded()}onDecorationsChanged(e){return e.affectsOverviewRuler?this._markRenderingIsMaybeNeeded():!1}onFlushed(e){return this._markRenderingIsNeeded()}onScrollChanged(e){return e.scrollHeightChanged?this._markRenderingIsNeeded():!1}onZonesChanged(e){return this._markRenderingIsNeeded()}onThemeChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render(),this._actualShouldRender=0}_render(){const e=this._settings.backgroundColor;if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(e?Qi.Format.CSS.formatHexA(e):""),this._domNode.setDisplay("none");return}const i=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme);if(i.sort(Jte.compareByRenderingProps),this._actualShouldRender===1&&!Jte.equalsArr(this._renderedDecorations,i)&&(this._actualShouldRender=2),this._actualShouldRender===1&&!ch(this._renderedCursorPositions,this._cursorPositions,(O,W)=>O.position.lineNumber===W.position.lineNumber&&O.color===W.color)&&(this._actualShouldRender=2),this._actualShouldRender===1)return;this._renderedDecorations=i,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");const n=this._settings.canvasWidth,s=this._settings.canvasHeight,l=this._settings.lineHeight,d=this._context.viewLayout,f=this._context.viewLayout.getScrollHeight(),g=s/f,y=6*this._settings.pixelRatio|0,w=y/2|0,x=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(x.fillStyle=Qi.Format.CSS.formatHexA(e),x.fillRect(0,0,n,s)):(x.clearRect(0,0,n,s),x.fillStyle=Qi.Format.CSS.formatHexA(e),x.fillRect(0,0,n,s)):x.clearRect(0,0,n,s);const I=this._settings.x,P=this._settings.w;for(const O of i){const W=O.color,X=O.data;x.fillStyle=W;let Z=0,ee=0,he=0;for(let we=0,Te=X.length/3;wes&&(Mt=s-w),Nt=Mt-w,Ni=Mt+w}Nt>he+1||Be!==Z?(we!==0&&x.fillRect(I[Z],ee,P[Z],he-ee),Z=Be,ee=Nt,he=Ni):Ni>he&&(he=Ni)}x.fillRect(I[Z],ee,P[Z],he-ee)}if(!this._settings.hideCursor){const O=2*this._settings.pixelRatio|0,W=O/2|0,X=this._settings.x[7],Z=this._settings.w[7];let ee=-100,he=-100,we=null;for(let Te=0,Be=this._cursorPositions.length;Tes&&(Nt=s-W);const Ni=Nt-W,ci=Ni+O;Ni>he+1||Me!==we?(Te!==0&&we&&x.fillRect(X,ee,Z,he-ee),ee=Ni,he=ci):ci>he&&(he=ci),we=Me,x.fillStyle=Me}we&&x.fillRect(X,ee,Z,he-ee)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(x.beginPath(),x.lineWidth=1,x.strokeStyle=this._settings.borderColor,x.moveTo(0,0),x.lineTo(0,s),x.stroke(),x.moveTo(0,0),x.lineTo(n,0),x.stroke())}}class Xmt{constructor(e,i,n){this._colorZoneBrand=void 0,this.from=e|0,this.to=i|0,this.colorId=n|0}static compare(e,i){return e.colorId===i.colorId?e.from===i.from?e.to-i.to:e.from-i.from:e.colorId-i.colorId}}class twt{constructor(e,i,n,s){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=i,this.heightInLines=n,this.color=s,this._colorZone=null}static compare(e,i){return e.color===i.color?e.startLineNumber===i.startLineNumber?e.heightInLines===i.heightInLines?e.endLineNumber-i.endLineNumber:e.heightInLines-i.heightInLines:e.startLineNumber-i.startLineNumber:e.colorn&&(W=n-X);const Z=w.color;let ee=this._color2Id[Z];ee||(ee=++this._lastAssignedId,this._color2Id[Z]=ee,this._id2Color[ee]=Z);const he=new Xmt(W-X,W+X,ee);w.setColorZone(he),f.push(he)}return this._colorZonesInvalid=!1,f.sort(Xmt.compare),f}}class Qdi extends Ene{constructor(e,i){super(),this._context=e;const n=this._context.configuration.options;this._domNode=pu(document.createElement("canvas")),this._domNode.setClassName(i),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new Kdi(s=>this._context.viewLayout.getVerticalOffsetForLineNumber(s)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(n.get(67)),this._zoneManager.setPixelRatio(n.get(143)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const i=this._context.configuration.options;return e.hasChanged(67)&&(this._zoneManager.setLineHeight(i.get(67)),this._render()),e.hasChanged(143)&&(this._zoneManager.setPixelRatio(i.get(143)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let i=!1;i=this._zoneManager.setDOMWidth(e.width)||i,i=this._zoneManager.setDOMHeight(e.height)||i,i&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const e=this._zoneManager.getCanvasWidth(),i=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),s=this._zoneManager.getId2Color(),l=this._domNode.domNode.getContext("2d");return l.clearRect(0,0,e,i),n.length>0&&this._renderOneLane(l,n,s,e),!0}_renderOneLane(e,i,n,s){let l=0,d=0,f=0;for(const g of i){const y=g.colorId,w=g.from,x=g.to;y!==l?(e.fillRect(0,d,s,f-d),l=y,e.fillStyle=n[l],d=w,f=x):f>=w?f=Math.max(f,x):(e.fillRect(0,d,s,f-d),d=w,f=x)}e.fillRect(0,d,s,f-d)}}class Xdi extends JC{constructor(e){super(e),this.domNode=pu(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const i=this._context.configuration.options;this._rulers=i.get(102),this._typicalHalfwidthCharacterWidth=i.get(50).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const i=this._context.configuration.options;return this._rulers=i.get(102),this._typicalHalfwidthCharacterWidth=i.get(50).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,i=this._rulers.length;if(e===i)return;if(e0;){const f=pu(document.createElement("div"));f.setClassName("view-ruler"),f.setWidth(l),this.domNode.appendChild(f),this._renderedRulers.push(f),d--}return}let n=e-i;for(;n>0;){const s=this._renderedRulers.pop();this.domNode.removeChild(s),n--}}render(e){this._ensureRulersCount();for(let i=0,n=this._rulers.length;i0;return this._shouldShow!==e?(this._shouldShow=e,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const i=this._context.configuration.options.get(145);i.minimap.renderMinimap===0||i.minimap.minimapWidth>0&&i.minimap.minimapLeft===0?this._width=i.width:this._width=i.width-i.verticalScrollbarWidth}onConfigurationChanged(e){const n=this._context.configuration.options.get(103);return this._useShadows=n.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}class Ydi{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class efi{constructor(e,i){this.lineNumber=e,this.ranges=i}}function tfi(c){return new Ydi(c)}function ifi(c){return new efi(c.lineNumber,c.ranges.map(tfi))}class k_ extends Y9{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const i=this._context.configuration.options;this._roundedSelection=i.get(101),this._typicalHalfwidthCharacterWidth=i.get(50).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const i=this._context.configuration.options;return this._roundedSelection=i.get(101),this._typicalHalfwidthCharacterWidth=i.get(50).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let i=0,n=e.length;i1)return!0;return!1}_enrichVisibleRangesWithStyle(e,i,n){const s=this._typicalHalfwidthCharacterWidth/4;let l=null,d=null;if(n&&n.length>0&&i.length>0){const f=i[0].lineNumber;if(f===e.startLineNumber)for(let y=0;!l&&y=0;y--)n[y].lineNumber===g&&(d=n[y].ranges[0]);l&&!l.startStyle&&(l=null),d&&!d.startStyle&&(d=null)}for(let f=0,g=i.length;f0){const O=i[f-1].ranges[0].left,W=i[f-1].ranges[0].left+i[f-1].ranges[0].width;Age(w-O)O&&(I.top=1),Age(x-W)'}_actualRenderOneSelection(e,i,n,s){if(s.length===0)return;const l=!!s[0].ranges[0].startStyle,d=s[0].lineNumber,f=s[s.length-1].lineNumber;for(let g=0,y=s.length;g1,y)}this._previousFrameVisibleRangesWithStyle=l,this._renderResult=i.map(([d,f])=>d+f)}render(e,i){if(!this._renderResult)return"";const n=i-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}k_.SELECTION_CLASS_NAME="selected-text";k_.SELECTION_TOP_LEFT="top-left-radius";k_.SELECTION_BOTTOM_LEFT="bottom-left-radius";k_.SELECTION_TOP_RIGHT="top-right-radius";k_.SELECTION_BOTTOM_RIGHT="bottom-right-radius";k_.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background";k_.ROUNDED_PIECE_WIDTH=10;dk((c,e)=>{const i=c.getColor(lli);i&&!i.isTransparent()&&e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${i}; }`)});function Age(c){return c<0?-c:c}class Zmt{constructor(e,i,n,s,l,d,f){this.top=e,this.left=i,this.paddingLeft=n,this.width=s,this.height=l,this.textContent=d,this.textContentClassName=f}}var L4;(function(c){c[c.Single=0]="Single",c[c.MultiPrimary=1]="MultiPrimary",c[c.MultiSecondary=2]="MultiSecondary"})(L4||(L4={}));class Ymt{constructor(e,i){this._context=e;const n=this._context.configuration.options,s=n.get(50);this._cursorStyle=n.get(28),this._lineHeight=n.get(67),this._typicalHalfwidthCharacterWidth=s.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(n.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=pu(document.createElement("div")),this._domNode.setClassName(`cursor ${DU}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),s0(this._domNode,s),this._domNode.setDisplay("none"),this._position=new yi(1,1),this._pluralityClass="",this.setPlurality(i),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}setPlurality(e){switch(e){default:case L4.Single:this._pluralityClass="";break;case L4.MultiPrimary:this._pluralityClass="cursor-primary";break;case L4.MultiSecondary:this._pluralityClass="cursor-secondary";break}}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const i=this._context.configuration.options,n=i.get(50);return this._cursorStyle=i.get(28),this._lineHeight=i.get(67),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(i.get(31),this._typicalHalfwidthCharacterWidth),s0(this._domNode,n),!0}onCursorPositionChanged(e,i){return i?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:i}=this._position,n=this._context.viewModel.getLineContent(e),[s,l]=nni(n,i-1);return[new yi(e,s+1),n.substring(s,l)]}_prepareRender(e){let i="",n="";const[s,l]=this._getGraphemeAwarePosition();if(this._cursorStyle===t0.Line||this._cursorStyle===t0.LineThin){const I=e.visibleRangeForPosition(s);if(!I||I.outsideRenderedLine)return null;const P=Io(this._domNode.domNode);let O;this._cursorStyle===t0.Line?(O=Cgt(P,this._lineCursorWidth>0?this._lineCursorWidth:2),O>2&&(i=l,n=this._getTokenClassName(s))):O=Cgt(P,1);let W=I.left,X=0;O>=2&&W>=1&&(X=1,W-=X);const Z=e.getVerticalOffsetForLineNumber(s.lineNumber)-e.bigNumbersDelta;return new Zmt(Z,W,X,O,this._lineHeight,i,n)}const d=e.linesVisibleRangesForRange(new at(s.lineNumber,s.column,s.lineNumber,s.column+l.length),!1);if(!d||d.length===0)return null;const f=d[0];if(f.outsideRenderedLine||f.ranges.length===0)return null;const g=f.ranges[0],y=l===" "?this._typicalHalfwidthCharacterWidth:g.width<1?this._typicalHalfwidthCharacterWidth:g.width;this._cursorStyle===t0.Block&&(i=l,n=this._getTokenClassName(s));let w=e.getVerticalOffsetForLineNumber(s.lineNumber)-e.bigNumbersDelta,x=this._lineHeight;return(this._cursorStyle===t0.Underline||this._cursorStyle===t0.UnderlineThin)&&(w+=this._lineHeight-2,x=2),new Zmt(w,g.left,0,y,x,i,n)}_getTokenClassName(e){const i=this._context.viewModel.getViewLineData(e.lineNumber),n=i.tokens.findTokenIndexAtOffset(e.column-1);return i.tokens.getClassName(n)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${this._pluralityClass} ${DU} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class sie extends JC{constructor(e){super(e);const i=this._context.configuration.options;this._readOnly=i.get(91),this._cursorBlinking=i.get(26),this._cursorStyle=i.get(28),this._cursorSmoothCaretAnimation=i.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new Ymt(this._context,L4.Single),this._secondaryCursors=[],this._renderData=[],this._domNode=pu(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new gT,this._cursorFlatBlinkInterval=new FHe,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const i=this._context.configuration.options;this._readOnly=i.get(91),this._cursorBlinking=i.get(26),this._cursorStyle=i.get(28),this._cursorSmoothCaretAnimation=i.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let n=0,s=this._secondaryCursors.length;ni.length){const l=this._secondaryCursors.length-i.length;for(let d=0;d{for(let s=0,l=e.ranges.length;s{this._isVisible?this._hide():this._show()},sie.BLINK_INTERVAL,Io(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},sie.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case t0.Line:e+=" cursor-line-style";break;case t0.Block:e+=" cursor-block-style";break;case t0.Underline:e+=" cursor-underline-style";break;case t0.LineThin:e+=" cursor-line-thin-style";break;case t0.BlockOutline:e+=" cursor-block-outline-style";break;case t0.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return(this._cursorSmoothCaretAnimation==="on"||this._cursorSmoothCaretAnimation==="explicit")&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,i=this._secondaryCursors.length;e{const i=[{class:".cursor",foreground:tL,background:I4},{class:".cursor-primary",foreground:MSt,background:gui},{class:".cursor-secondary",foreground:RSt,background:mui}];for(const n of i){const s=c.getColor(n.foreground);if(s){let l=c.getColor(n.background);l||(l=s.opposite()),e.addRule(`.monaco-editor .cursors-layer ${n.class} { background-color: ${s}; border-color: ${s}; color: ${l}; }`),SE(c.type)&&e.addRule(`.monaco-editor .cursors-layer.has-selection ${n.class} { border-left: 1px solid ${l}; border-right: 1px solid ${l}; }`)}}});const l7e=()=>{throw new Error("Invalid change accessor")};class nfi extends JC{constructor(e){super(e);const i=this._context.configuration.options,n=i.get(145);this._lineHeight=i.get(67),this._contentWidth=n.contentWidth,this._contentLeft=n.contentLeft,this.domNode=pu(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=pu(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),i=new Map;for(const s of e)i.set(s.id,s);let n=!1;return this._context.viewModel.changeWhitespace(s=>{const l=Object.keys(this._zones);for(let d=0,f=l.length;d{const s={addZone:l=>(i=!0,this._addZone(n,l)),removeZone:l=>{l&&(i=this._removeZone(n,l)||i)},layoutZone:l=>{l&&(i=this._layoutZone(n,l)||i)}};rfi(e,s),s.addZone=l7e,s.removeZone=l7e,s.layoutZone=l7e}),i}_addZone(e,i){const n=this._computeWhitespaceProps(i),l={whitespaceId:e.insertWhitespace(n.afterViewLineNumber,this._getZoneOrdinal(i),n.heightInPx,n.minWidthInPx),delegate:i,isInHiddenArea:n.isInHiddenArea,isVisible:!1,domNode:pu(i.domNode),marginDomNode:i.marginDomNode?pu(i.marginDomNode):null};return this._safeCallOnComputedHeight(l.delegate,n.heightInPx),l.domNode.setPosition("absolute"),l.domNode.domNode.style.width="100%",l.domNode.setDisplay("none"),l.domNode.setAttribute("monaco-view-zone",l.whitespaceId),this.domNode.appendChild(l.domNode),l.marginDomNode&&(l.marginDomNode.setPosition("absolute"),l.marginDomNode.domNode.style.width="100%",l.marginDomNode.setDisplay("none"),l.marginDomNode.setAttribute("monaco-view-zone",l.whitespaceId),this.marginDomNode.appendChild(l.marginDomNode)),this._zones[l.whitespaceId]=l,this.setShouldRender(),l.whitespaceId}_removeZone(e,i){if(this._zones.hasOwnProperty(i)){const n=this._zones[i];return delete this._zones[i],e.removeWhitespace(n.whitespaceId),n.domNode.removeAttribute("monaco-visible-view-zone"),n.domNode.removeAttribute("monaco-view-zone"),n.domNode.domNode.parentNode.removeChild(n.domNode.domNode),n.marginDomNode&&(n.marginDomNode.removeAttribute("monaco-visible-view-zone"),n.marginDomNode.removeAttribute("monaco-view-zone"),n.marginDomNode.domNode.parentNode.removeChild(n.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,i){if(this._zones.hasOwnProperty(i)){const n=this._zones[i],s=this._computeWhitespaceProps(n.delegate);return n.isInHiddenArea=s.isInHiddenArea,e.changeOneWhitespace(n.whitespaceId,s.afterViewLineNumber,s.heightInPx),this._safeCallOnComputedHeight(n.delegate,s.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){return this._zones.hasOwnProperty(e)?!!this._zones[e].delegate.suppressMouseDown:!1}_heightInPixels(e){return typeof e.heightInPx=="number"?e.heightInPx:typeof e.heightInLines=="number"?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return typeof e.minWidthInPx=="number"?e.minWidthInPx:0}_safeCallOnComputedHeight(e,i){if(typeof e.onComputedHeight=="function")try{e.onComputedHeight(i)}catch(n){Ba(n)}}_safeCallOnDomNodeTop(e,i){if(typeof e.onDomNodeTop=="function")try{e.onDomNodeTop(i)}catch(n){Ba(n)}}prepareRender(e){}render(e){const i=e.viewportData.whitespaceViewportData,n={};let s=!1;for(const d of i)this._zones[d.id].isInHiddenArea||(n[d.id]=d,s=!0);const l=Object.keys(this._zones);for(let d=0,f=l.length;df)continue;const P=I.startLineNumber===f?I.startColumn:y.minColumn,O=I.endLineNumber===f?I.endColumn:y.maxColumn;P=Ni.endOffset&&(Nt++,Ni=n&&n[Nt]),pi!==9&&pi!==32||I&&!Be&&Mt<=vt)continue;if(x&&Mt>=Me&&Mt<=vt&&pi===32){const $n=Mt-1>=0?f.charCodeAt(Mt-1):0,Ri=Mt+1=0?f.charCodeAt(Mt-1):0;if(pi===32&&$n!==32&&$n!==9)continue}if(n&&(!Ni||Ni.startOffset>Mt||Ni.endOffset<=Mt))continue;const gn=e.visibleRangeForPosition(new yi(i,Mt+1));gn&&(d?(ci=Math.max(ci,gn.left),pi===9?Te+=this._renderArrow(P,X,gn.left):Te+=``):pi===9?Te+=`
${we?"→":"→"}
`:Te+=`
${String.fromCharCode(he)}
`)}return d?(ci=Math.round(ci+X),``+Te+""):Te}_renderArrow(e,i,n){const s=i/7,l=i,d=e/2,f=n,g={x:0,y:s/2},y={x:100/125*l,y:g.y},w={x:y.x-.2*y.x,y:y.y+.2*y.x},x={x:w.x+.1*y.x,y:w.y+.1*y.x},I={x:x.x+.35*y.x,y:x.y-.35*y.x},P={x:I.x,y:-I.y},O={x:x.x,y:-x.y},W={x:w.x,y:-w.y},X={x:y.x,y:-y.y},Z={x:g.x,y:-g.y};return``}render(e,i){if(!this._renderResult)return"";const n=i-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}class e0t{constructor(e){const i=e.options,n=i.get(50),s=i.get(38);s==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):s==="svg"?(this.renderWhitespace=i.get(99),this.renderWithSVG=!0):(this.renderWhitespace=i.get(99),this.renderWithSVG=!1),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(67),this.stopRenderingLineAfter=i.get(117)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}class ofi{constructor(e,i,n,s){this.selections=e,this.startLineNumber=i.startLineNumber|0,this.endLineNumber=i.endLineNumber|0,this.relativeVerticalOffset=i.relativeVerticalOffset,this.bigNumbersDelta=i.bigNumbersDelta|0,this.lineHeight=i.lineHeight|0,this.whitespaceViewportData=n,this._model=s,this.visibleRange=new at(i.startLineNumber,this._model.getLineMinColumn(i.startLineNumber),i.endLineNumber,this._model.getLineMaxColumn(i.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewportViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class afi{get type(){return this._theme.type}get value(){return this._theme}constructor(e){this._theme=e}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class lfi{constructor(e,i,n){this.configuration=e,this.theme=new afi(i),this.viewModel=n,this.viewLayout=n.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}var cfi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},ufi=function(c,e){return function(i,n){e(i,n,c)}};let C9e=class extends Ene{constructor(e,i,n,s,l,d,f){super(),this._instantiationService=f,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new Qs(1,1,1,1)],this._renderAnimationFrame=null;const g=new gdi(i,s,l,e);this._context=new lfi(i,n,s),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(v9e,this._context,g,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=pu(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=pu(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=pu(document.createElement("div")),NE.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new Tdi(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new pye(this._context,this._linesContent),this._viewZones=new nfi(this._context),this._viewParts.push(this._viewZones);const y=new Gdi(this._context);this._viewParts.push(y);const w=new Zdi(this._context);this._viewParts.push(w);const x=new vdi(this._context);this._viewParts.push(x),x.addDynamicOverlay(new wdi(this._context)),x.addDynamicOverlay(new k_(this._context)),x.addDynamicOverlay(new Odi(this._context)),x.addDynamicOverlay(new kdi(this._context)),x.addDynamicOverlay(new sfi(this._context));const I=new ydi(this._context);this._viewParts.push(I),I.addDynamicOverlay(new xdi(this._context)),I.addDynamicOverlay(new Wdi(this._context)),I.addDynamicOverlay(new Bdi(this._context)),I.addDynamicOverlay(new Pne(this._context)),this._glyphMarginWidgets=new Idi(this._context),this._viewParts.push(this._glyphMarginWidgets);const P=new S9(this._context);P.getDomNode().appendChild(this._viewZones.marginDomNode),P.getDomNode().appendChild(I.getDomNode()),P.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(P),this._contentWidgets=new Cdi(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new sie(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new $di(this._context,this.domNode),this._viewParts.push(this._overlayWidgets);const O=new Xdi(this._context);this._viewParts.push(O);const W=new bdi(this._context);this._viewParts.push(W);const X=new qdi(this._context);if(this._viewParts.push(X),y){const Z=this._scrollbar.getOverviewRulerLayoutInfo();Z.parent.insertBefore(y.getDomNode(),Z.insertBefore)}this._linesContent.appendChild(x.getDomNode()),this._linesContent.appendChild(O.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(P.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(w.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(X.getDomNode()),this._overflowGuardContainer.appendChild(W.domNode),this.domNode.appendChild(this._overflowGuardContainer),d?(d.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode),d.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode)):(this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this.domNode.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode)),this._applyLayout(),this._pointerHandler=this._register(new hui(this._context,g,this._createPointerHandlerHelper()))}_computeGlyphMarginLanes(){const e=this._context.viewModel.model,i=this._context.viewModel.glyphLanes;let n=[],s=0;n=n.concat(e.getAllMarginDecorations().map(l=>{var d,f,g;const y=(f=(d=l.options.glyphMargin)===null||d===void 0?void 0:d.position)!==null&&f!==void 0?f:fL.Center;return s=Math.max(s,l.range.endLineNumber),{range:l.range,lane:y,persist:(g=l.options.glyphMargin)===null||g===void 0?void 0:g.persistLane}})),n=n.concat(this._glyphMarginWidgets.getWidgets().map(l=>{const d=e.validateRange(l.preference.range);return s=Math.max(s,d.endLineNumber),{range:d,lane:l.preference.lane}})),n.sort((l,d)=>at.compareRangesUsingStarts(l.range,d.range)),i.reset(s);for(const l of n)i.push(l.lane,l.range,l.persist);return i}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],i=this._textAreaHandler.getLastRenderData();return new jci(e,i)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,i)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,i)),visibleRangeForPosition:(e,i)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new yi(e,i))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const i=this._context.configuration.options.get(145);this.domNode.setWidth(i.width),this.domNode.setHeight(i.height),this._overflowGuardContainer.setWidth(i.width),this._overflowGuardContainer.setHeight(i.height),this._linesContent.setWidth(16777216),this._linesContent.setHeight(16777216)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(142)+" "+m9e(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){if(this._store.isDisposed)throw new Yu;if(this._renderAnimationFrame===null){const e=this._createCoordinatedRendering();this._renderAnimationFrame=S9e.INSTANCE.scheduleCoordinatedRendering({window:Io(this.domNode.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new Yu;try{return e.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:()=>{if(this._store.isDisposed)throw new Yu;return e.renderText()},prepareRender:(i,n)=>{if(this._store.isDisposed)throw new Yu;return e.prepareRender(i,n)},render:(i,n)=>{if(this._store.isDisposed)throw new Yu;return e.render(i,n)}})}}_flushAccumulatedAndRenderNow(){const e=this._createCoordinatedRendering();DM(()=>e.prepareRenderText());const i=DM(()=>e.renderText());if(i){const[n,s]=i;DM(()=>e.prepareRender(n,s)),DM(()=>e.render(n,s))}}_getViewPartsToRender(){const e=[];let i=0;for(const n of this._viewParts)n.shouldRender()&&(e[i++]=n);return e}_createCoordinatedRendering(){return{prepareRenderText:()=>{if(this._shouldRecomputeGlyphMarginLanes){this._shouldRecomputeGlyphMarginLanes=!1;const e=this._computeGlyphMarginLanes();this._context.configuration.setGlyphMarginDecorationLaneCount(e.requiredLanes)}SM.onRenderStart()},renderText:()=>{if(!this.domNode.domNode.isConnected)return null;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&e.length===0)return null;const i=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(i.startLineNumber,i.endLineNumber,i.centeredLineNumber);const n=new ofi(this._selections,i,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);return this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(n),this._viewLines.shouldRender()&&(this._viewLines.renderText(n),this._viewLines.onDidRender(),e=this._getViewPartsToRender()),[e,new Mci(this._context.viewLayout,n,this._viewLines)]},prepareRender:(e,i)=>{for(const n of e)n.prepareRender(i)},render:(e,i)=>{for(const n of e)n.render(i),n.onDidRender()}}}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,i){const n=this._context.viewModel.model.validatePosition({lineNumber:e,column:i}),s=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n);this._flushAccumulatedAndRenderNow();const l=this._viewLines.visibleRangeForPosition(new yi(s.lineNumber,s.column));return l?l.left:-1}getTargetAtClientPoint(e,i){const n=this._pointerHandler.getTargetAtClientPoint(e,i);return n?hye.convertViewToModelMouseTarget(n,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new Qdi(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,i){if(i){this._viewLines.forceShouldRender();for(const n of this._viewParts)n.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){var i,n,s,l,d,f,g,y;this._contentWidgets.setWidgetPosition(e.widget,(n=(i=e.position)===null||i===void 0?void 0:i.position)!==null&&n!==void 0?n:null,(l=(s=e.position)===null||s===void 0?void 0:s.secondaryPosition)!==null&&l!==void 0?l:null,(f=(d=e.position)===null||d===void 0?void 0:d.preference)!==null&&f!==void 0?f:null,(y=(g=e.position)===null||g===void 0?void 0:g.positionAffinity)!==null&&y!==void 0?y:null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){this._overlayWidgets.setWidgetPosition(e.widget,e.position)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){const i=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,i)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};C9e=cfi([ufi(6,So)],C9e);function DM(c){try{return c()}catch(e){return Ba(e),null}}class S9e{constructor(){this._coordinatedRenderings=[],this._animationFrameRunners=new Map}scheduleCoordinatedRendering(e){return this._coordinatedRenderings.push(e),this._scheduleRender(e.window),{dispose:()=>{const i=this._coordinatedRenderings.indexOf(e);if(i!==-1&&(this._coordinatedRenderings.splice(i,1),this._coordinatedRenderings.length===0)){for(const[n,s]of this._animationFrameRunners)s.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(e){if(!this._animationFrameRunners.has(e)){const i=()=>{this._animationFrameRunners.delete(e),this._onRenderScheduled()};this._animationFrameRunners.set(e,W0e(e,i,100))}}_onRenderScheduled(){const e=this._coordinatedRenderings.slice(0);this._coordinatedRenderings=[];for(const n of e)DM(()=>n.prepareRenderText());const i=[];for(let n=0,s=e.length;nl.renderText())}for(let n=0,s=e.length;nl.prepareRender(f,g))}for(let n=0,s=e.length;nl.render(f,g))}}}S9e.INSTANCE=new S9e;class ste{constructor(e,i,n,s,l){this.injectionOffsets=e,this.injectionOptions=i,this.breakOffsets=n,this.breakOffsetsVisibleColumn=s,this.wrappedTextIndentLength=l}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){const i=e>0?this.breakOffsets[e-1]:0;let s=this.breakOffsets[e]-i;return e>0&&(s+=this.wrappedTextIndentLength),s}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,i){e>0&&(i=Math.max(0,i-this.wrappedTextIndentLength));let s=e===0?i:this.breakOffsets[e-1]+i;if(this.injectionOffsets!==null)for(let l=0;lthis.injectionOffsets[l];l++)s0?this.breakOffsets[l-1]:0,i===0)if(e<=d)s=l-1;else if(e>g)n=l+1;else break;else if(e=g)n=l+1;else break}let f=e-d;return l>0&&(f+=this.wrappedTextIndentLength),new Oge(l,f)}normalizeOutputPosition(e,i,n){if(this.injectionOffsets!==null){const s=this.outputPositionToOffsetInInputWithInjections(e,i),l=this.normalizeOffsetInInputWithInjectionsAroundInjections(s,n);if(l!==s)return this.offsetInInputWithInjectionsToOutputPosition(l,n)}if(n===0){if(e>0&&i===this.getMinOutputOffset(e))return new Oge(e-1,this.getMaxOutputOffset(e-1))}else if(n===1){const s=this.getOutputLineCount()-1;if(e0&&(i=Math.max(0,i-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+i}normalizeOffsetInInputWithInjectionsAroundInjections(e,i){const n=this.getInjectedTextAtOffset(e);if(!n)return e;if(i===2){if(e===n.offsetInInputWithInjections+n.length&&t0t(this.injectionOptions[n.injectedTextIndex].cursorStops))return n.offsetInInputWithInjections+n.length;{let s=n.offsetInInputWithInjections;if(i0t(this.injectionOptions[n.injectedTextIndex].cursorStops))return s;let l=n.injectedTextIndex-1;for(;l>=0&&this.injectionOffsets[l]===this.injectionOffsets[n.injectedTextIndex]&&!(t0t(this.injectionOptions[l].cursorStops)||(s-=this.injectionOptions[l].content.length,i0t(this.injectionOptions[l].cursorStops)));)l--;return s}}else if(i===1||i===4){let s=n.offsetInInputWithInjections+n.length,l=n.injectedTextIndex;for(;l+1=0&&this.injectionOffsets[l-1]===this.injectionOffsets[l];)s-=this.injectionOptions[l-1].content.length,l--;return s}X1e()}getInjectedText(e,i){const n=this.outputPositionToOffsetInInputWithInjections(e,i),s=this.getInjectedTextAtOffset(n);return s?{options:this.injectionOptions[s.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const i=this.injectionOffsets,n=this.injectionOptions;if(i!==null){let s=0;for(let l=0;le)break;if(e<=g)return{injectedTextIndex:l,offsetInInputWithInjections:f,length:d};s+=d}}}}function t0t(c){return c==null?!0:c===oT.Right||c===oT.Both}function i0t(c){return c==null?!0:c===oT.Left||c===oT.Both}class Oge{constructor(e,i){this.outputLineIndex=e,this.outputOffset=i}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new yi(e+this.outputLineIndex,this.outputOffset+1)}}class dfi{constructor(){this.changeType=1}}class LE{static applyInjectedText(e,i){if(!i||i.length===0)return e;let n="",s=0;for(const l of i)n+=e.substring(s,l.column-1),s=l.column-1,n+=l.options.content;return n+=e.substring(s),n}static fromDecorations(e){const i=[];for(const n of e)n.options.before&&n.options.before.content.length>0&&i.push(new LE(n.ownerId,n.range.startLineNumber,n.range.startColumn,n.options.before,0)),n.options.after&&n.options.after.content.length>0&&i.push(new LE(n.ownerId,n.range.endLineNumber,n.range.endColumn,n.options.after,1));return i.sort((n,s)=>n.lineNumber===s.lineNumber?n.column===s.column?n.order-s.order:n.column-s.column:n.lineNumber-s.lineNumber),i}constructor(e,i,n,s,l){this.ownerId=e,this.lineNumber=i,this.column=n,this.options=s,this.order=l}}class n0t{constructor(e,i,n){this.changeType=2,this.lineNumber=e,this.detail=i,this.injectedText=n}}class ffi{constructor(e,i){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=i}}class hfi{constructor(e,i,n,s){this.changeType=4,this.injectedTexts=s,this.fromLineNumber=e,this.toLineNumber=i,this.detail=n}}class _fi{constructor(){this.changeType=5}}class LU{constructor(e,i,n,s){this.changes=e,this.versionId=i,this.isUndoing=n,this.isRedoing=s,this.resultingSelection=null}containsEvent(e){for(let i=0,n=this.changes.length;ic});class Sje{static create(e){return new Sje(new WeakRef(e))}constructor(e){this.targetWindow=e}createLineBreaksComputer(e,i,n,s,l){const d=[],f=[];return{addRequest:(g,y,w)=>{d.push(g),f.push(y)},finalize:()=>pfi(yM(this.targetWindow.deref()),d,e,i,n,s,l,f)}}}function pfi(c,e,i,n,s,l,d,f){var g;function y(Ni){const ci=f[Ni];if(ci){const Mt=LE.applyInjectedText(e[Ni],ci),pi=ci.map($n=>$n.options),gn=ci.map($n=>$n.column-1);return new ste(gn,pi,[Mt.length],[],0)}else return null}if(s===-1){const Ni=[];for(let ci=0,Mt=e.length;ciw?(Mt=0,pi=0):gn=w-ao}const $n=ci.substr(Mt),Ri=gfi($n,pi,n,gn,W,P);X[Ni]=Mt,Z[Ni]=pi,ee[Ni]=$n,he[Ni]=Ri[0],we[Ni]=Ri[1]}const Te=W.build(),Be=(g=c7e==null?void 0:c7e.createHTML(Te))!==null&&g!==void 0?g:Te;O.innerHTML=Be,O.style.position="absolute",O.style.top="10000",d==="keepAll"?(O.style.wordBreak="keep-all",O.style.overflowWrap="anywhere"):(O.style.wordBreak="inherit",O.style.overflowWrap="break-word"),c.document.body.appendChild(O);const Me=document.createRange(),vt=Array.prototype.slice.call(O.children,0),Nt=[];for(let Ni=0;Nina.options),Xs=Yt.map(na=>na.column-1)):(ao=null,Xs=null),Nt[Ni]=new ste(Xs,ao,Mt,Ri,gn)}return c.document.body.removeChild(O),Nt}function gfi(c,e,i,n,s,l){if(l!==0){const I=String(l);s.appendString('
');const d=c.length;let f=e,g=0;const y=[],w=[];let x=0");for(let I=0;I"),y[I]=g,w[I]=f;const P=x;x=I+1"),y[c.length]=g,w[c.length]=f,s.appendString("
"),[y,w]}function mfi(c,e,i,n){if(i.length<=1)return null;const s=Array.prototype.slice.call(e.children,0),l=[];try{w9e(c,s,n,0,null,i.length-1,null,l)}catch(d){return console.log(d),null}return l.length===0?null:(l.push(i.length),l)}function w9e(c,e,i,n,s,l,d,f){if(n===l||(s=s||u7e(c,e,i[n],i[n+1]),d=d||u7e(c,e,i[l],i[l+1]),Math.abs(s[0].top-d[0].top)<=.1))return;if(n+1===l){f.push(l);return}const g=n+(l-n)/2|0,y=u7e(c,e,i[g],i[g+1]);w9e(c,e,i,n,s,g,y,f),w9e(c,e,i,g,y,l,d,f)}function u7e(c,e,i,n){return c.setStart(e[i/16384|0].firstChild,i%16384),c.setEnd(e[n/16384|0].firstChild,n%16384),c.getClientRects()}class vfi extends Ii{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new bHe),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,i,n){this._editor=e,this._instantiationService=n;for(const s of i){if(this._pending.has(s.id)){Ba(new Error(`Cannot have two contributions with the same id ${s.id}`));continue}this._pending.set(s.id,s)}this._instantiateSome(0),this._register(Cee(Io(this._editor.getDomNode()),()=>{this._instantiateSome(1)})),this._register(Cee(Io(this._editor.getDomNode()),()=>{this._instantiateSome(2)})),this._register(Cee(Io(this._editor.getDomNode()),()=>{this._instantiateSome(3)},5e3))}saveViewState(){const e={};for(const[i,n]of this._instances)typeof n.saveViewState=="function"&&(e[i]=n.saveViewState());return e}restoreViewState(e){for(const[i,n]of this._instances)typeof n.restoreViewState=="function"&&n.restoreViewState(e[i])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){var e;return Cee(Io((e=this._editor)===null||e===void 0?void 0:e.getDomNode()),()=>{this._instantiateSome(1)},50)}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;const i=this._findPendingContributionsByInstantiation(e);for(const n of i)this._instantiateById(n.id)}_findPendingContributionsByInstantiation(e){const i=[];for(const[,n]of this._pending)n.instantiation===e&&i.push(n);return i}_instantiateById(e){const i=this._pending.get(e);if(i){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const n=this._instantiationService.createInstance(i.ctor,this._editor);this._instances.set(i.id,n),typeof n.restoreViewState=="function"&&i.instantiation!==0&&console.warn(`Editor contribution '${i.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(n){Ba(n)}}}}class nwt{constructor(e,i,n,s,l,d,f){this.id=e,this.label=i,this.alias=n,this.metadata=s,this._precondition=l,this._run=d,this._contextKeyService=f}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}function sR(c){let e=0,i=0,n=0,s=0;for(let l=0,d=c.length;l=mw&&(i=i-c%mw),i}function wfi(c,e){return c.reduce((i,n)=>Ph(i,e(n)),wy)}function rwt(c,e){return c===e}function oie(c,e){const i=c,n=e;if(n-i<=0)return wy;const l=Math.floor(i/mw),d=Math.floor(n/mw),f=n-d*mw;if(l===d){const g=i-l*mw;return Z_(0,f-g)}else return Z_(d-l,f)}function PU(c,e){return c=e}function aU(c){return Z_(c.lineNumber-1,c.column-1)}function o9(c,e){const i=c,n=Math.floor(i/mw),s=i-n*mw,l=e,d=Math.floor(l/mw),f=l-d*mw;return new at(n+1,s+1,d+1,f+1)}function xfi(c){const e=wL(c);return Z_(e.length-1,e[e.length-1].length)}class P4{static fromModelContentChanges(e){return e.map(n=>{const s=at.lift(n.range);return new P4(aU(s.getStartPosition()),aU(s.getEndPosition()),xfi(n.text))}).reverse()}constructor(e,i,n){this.startOffset=e,this.endOffset=i,this.newLength=n}toString(){return`[${rk(this.startOffset)}...${rk(this.endOffset)}) -> ${rk(this.newLength)}`}}class kfi{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(i=>wje.from(i))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const i=this.edits[this.nextEditIdx],n=i?this.translateOldToCur(i.offsetObj):null;return n===null?null:oie(e,n)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?Z_(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):Z_(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const i=rk(e);return i.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?Z_(i.lineCount-this.deltaOldToNewLineCount,i.columnCount-this.deltaOldToNewColumnCount):Z_(i.lineCount-this.deltaOldToNewLineCount,i.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx>5;if(s===0){const d=1<this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,i=this.lineCharOffset;let n=0;for(;;){const l=this.lineTokens,d=l.getCount();let f=null;if(this.lineTokenOffset1e3))break;if(n>1500)break}const s=Cfi(e,i,this.lineIdx,this.lineCharOffset);return new pM(s,0,-1,zp.getEmpty(),new W5(s))}}class Lfi{constructor(e,i){this.text=e,this._offset=wy,this.idx=0;const n=i.getRegExpStr(),s=n?new RegExp(n+`| +`,"gi"):null,l=[];let d,f=0,g=0,y=0,w=0;const x=[];for(let O=0;O<60;O++)x.push(new pM(Z_(0,O),0,-1,zp.getEmpty(),new W5(Z_(0,O))));const I=[];for(let O=0;O<60;O++)I.push(new pM(Z_(1,O),0,-1,zp.getEmpty(),new W5(Z_(1,O))));if(s)for(s.lastIndex=0;(d=s.exec(e))!==null;){const O=d.index,W=d[0];if(W===` +`)f++,g=O+1;else{if(y!==O){let X;if(w===f){const Z=O-y;if(ZPfi(i)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[i,n]of this.map)if(n.kind===2&&n.bracketIds.intersects(e))return i}get isEmpty(){return this.map.size===0}}function Pfi(c){let e=Cw(c);return/^[\w ]+/.test(c)&&(e=`\\b${e}`),/[\w ]+$/.test(c)&&(e=`${e}\\b`),e}class awt{constructor(e,i){this.denseKeyProvider=e,this.getLanguageConfiguration=i,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let i=this.languageIdToBracketTokens.get(e);return i||(i=Tje.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,i)),i}}function Afi(c){if(c.length===0)return null;if(c.length===1)return c[0];let e=0;function i(){if(e>=c.length)return null;const d=e,f=c[d].listHeight;for(e++;e=2?lwt(d===0&&e===c.length?c:c.slice(d,e),!1):c[d]}let n=i(),s=i();if(!s)return n;for(let d=i();d;d=i())o0t(n,s)<=o0t(s,d)?(n=d7e(n,s),s=d):s=d7e(s,d);return d7e(n,s)}function lwt(c,e=!1){if(c.length===0)return null;if(c.length===1)return c[0];let i=c.length;for(;i>3;){const n=i>>1;for(let s=0;s=3?c[2]:null,e)}function o0t(c,e){return Math.abs(c.listHeight-e.listHeight)}function d7e(c,e){return c.listHeight===e.listHeight?_L.create23(c,e,null,!1):c.listHeight>e.listHeight?Ofi(c,e):Mfi(e,c)}function Ofi(c,e){c=c.toMutable();let i=c;const n=[];let s;for(;;){if(e.listHeight===i.listHeight){s=e;break}if(i.kind!==4)throw new Error("unexpected");n.push(i),i=i.makeLastElementMutable()}for(let l=n.length-1;l>=0;l--){const d=n[l];s?d.childrenLength>=3?s=_L.create23(d.unappendChild(),s,null,!1):(d.appendChildOfSameHeight(s),s=void 0):d.handleChildrenChanged()}return s?_L.create23(c,s,null,!1):c}function Mfi(c,e){c=c.toMutable();let i=c;const n=[];for(;e.listHeight!==i.listHeight;){if(i.kind!==4)throw new Error("unexpected");n.push(i),i=i.makeFirstElementMutable()}let s=e;for(let l=n.length-1;l>=0;l--){const d=n[l];s?d.childrenLength>=3?s=_L.create23(s,d.unprependChild(),null,!1):(d.prependChildOfSameHeight(s),s=void 0):d.handleChildrenChanged()}return s?_L.create23(s,c,null,!1):c}class Rfi{constructor(e){this.lastOffset=wy,this.nextNodes=[e],this.offsets=[wy],this.idxs=[]}readLongestNodeAt(e,i){if(PU(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const n=tee(this.nextNodes);if(!n)return;const s=tee(this.offsets);if(PU(e,s))return;if(PU(s,e))if(Ph(s,n.length)<=e)this.nextNodeAfterCurrent();else{const l=f7e(n);l!==-1?(this.nextNodes.push(n.getChild(l)),this.offsets.push(s),this.idxs.push(l)):this.nextNodeAfterCurrent()}else{if(i(n))return this.nextNodeAfterCurrent(),n;{const l=f7e(n);if(l===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(n.getChild(l)),this.offsets.push(s),this.idxs.push(l)}}}}nextNodeAfterCurrent(){for(;;){const e=tee(this.offsets),i=tee(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const n=tee(this.nextNodes),s=f7e(n,this.idxs[this.idxs.length-1]);if(s!==-1){this.nextNodes.push(n.getChild(s)),this.offsets.push(Ph(e,i.length)),this.idxs[this.idxs.length-1]=s;break}else this.idxs.pop()}}}function f7e(c,e=-1){for(;;){if(e++,e>=c.childrenLength)return-1;if(c.getChild(e))return e}}function tee(c){return c.length>0?c[c.length-1]:void 0}function x9e(c,e,i,n){return new Ffi(c,e,i,n).parseDocument()}class Ffi{constructor(e,i,n,s){if(this.tokenizer=e,this.createImmutableLists=s,this._itemsConstructed=0,this._itemsFromCache=0,n&&s)throw new Error("Not supported");this.oldNodeReader=n?new Rfi(n):void 0,this.positionMapper=new kfi(i)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(zp.getEmpty(),0);return e||(e=_L.getEmpty()),e}parseList(e,i){const n=[];for(;;){let l=this.tryReadChildFromCache(e);if(!l){const d=this.tokenizer.peek();if(!d||d.kind===2&&d.bracketIds.intersects(e))break;l=this.parseChild(e,i+1)}l.kind===4&&l.childrenLength===0||n.push(l)}return this.oldNodeReader?Afi(n):lwt(n,this.createImmutableLists)}tryReadChildFromCache(e){if(this.oldNodeReader){const i=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(i===null||!rve(i)){const n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),s=>i!==null&&!PU(s.length,i)?!1:s.canBeReused(e));if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}}parseChild(e,i){this._itemsConstructed++;const n=this.tokenizer.read();switch(n.kind){case 2:return new Ifi(n.bracketIds,n.length);case 0:return n.astNode;case 1:{if(i>300)return new W5(n.length);const s=e.merge(n.bracketIds),l=this.parseList(s,i+1),d=this.tokenizer.peek();return d&&d.kind===2&&(d.bracketId===n.bracketId||d.bracketIds.intersects(n.bracketIds))?(this.tokenizer.read(),aie.create(n.astNode,l,d.astNode)):aie.create(n.astNode,l,null)}default:throw new Error("unexpected")}}}function ave(c,e){if(c.length===0)return e;if(e.length===0)return c;const i=new U4(a0t(c)),n=a0t(e);n.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let s=i.dequeue();function l(y){if(y===void 0){const x=i.takeWhile(I=>!0)||[];return s&&x.unshift(s),x}const w=[];for(;s&&!rve(y);){const[x,I]=s.splitAt(y);w.push(x),y=oie(x.lengthAfter,y),s=I??i.dequeue()}return rve(y)||w.push(new EM(!1,y,y)),w}const d=[];function f(y,w,x){if(d.length>0&&rwt(d[d.length-1].endOffset,y)){const I=d[d.length-1];d[d.length-1]=new P4(I.startOffset,w,Ph(I.newLength,x))}else d.push({startOffset:y,endOffset:w,newLength:x})}let g=wy;for(const y of n){const w=l(y.lengthBefore);if(y.modified){const x=wfi(w,P=>P.lengthBefore),I=Ph(g,x);f(g,I,y.lengthAfter),g=I}else for(const x of w){const I=g;g=Ph(g,x.lengthBefore),x.modified&&f(I,g,x.lengthAfter)}}return d}class EM{constructor(e,i,n){this.modified=e,this.lengthBefore=i,this.lengthAfter=n}splitAt(e){const i=oie(e,this.lengthAfter);return rwt(i,wy)?[this,void 0]:this.modified?[new EM(this.modified,this.lengthBefore,e),new EM(this.modified,wy,i)]:[new EM(this.modified,e,e),new EM(this.modified,i,i)]}toString(){return`${this.modified?"M":"U"}:${rk(this.lengthBefore)} -> ${rk(this.lengthAfter)}`}}function a0t(c){const e=[];let i=wy;for(const n of c){const s=oie(i,n.startOffset);rve(s)||e.push(new EM(!1,s,s));const l=oie(n.startOffset,n.endOffset);e.push(new EM(!0,l,n.newLength)),i=n.endOffset}return e}class Bfi extends Ii{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,i){if(super(),this.textModel=e,this.getLanguageConfiguration=i,this.didChangeEmitter=new ui,this.denseKeyProvider=new swt,this.brackets=new awt(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)e.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const n=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),s=new Lfi(this.textModel.getValue(),n);this.initialAstWithoutTokens=x9e(s,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){const e=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const i=e.map(n=>new P4(Z_(n.fromLineNumber-1,0),Z_(n.toLineNumber,0),Z_(n.toLineNumber-n.fromLineNumber+1,0)));this.handleEdits(i,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const i=P4.fromModelContentChanges(e.changes);this.handleEdits(i,!1)}handleEdits(e,i){const n=ave(this.queuedTextEdits,e);this.queuedTextEdits=n,this.initialAstWithoutTokens&&!i&&(this.queuedTextEditsForInitialAstWithoutTokens=ave(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,i,n){const s=i,l=new owt(this.textModel,this.brackets);return x9e(l,e,s,n)}getBracketsInRange(e,i){this.flushQueue();const n=Z_(e.startLineNumber-1,e.startColumn-1),s=Z_(e.endLineNumber-1,e.endColumn-1);return new nL(l=>{const d=this.initialAstWithoutTokens||this.astWithTokens;k9e(d,wy,d.length,n,s,l,0,0,new Map,i)})}getBracketPairsInRange(e,i){this.flushQueue();const n=aU(e.getStartPosition()),s=aU(e.getEndPosition());return new nL(l=>{const d=this.initialAstWithoutTokens||this.astWithTokens,f=new Wfi(l,i,this.textModel);T9e(d,wy,d.length,n,s,f,0,new Map)})}getFirstBracketAfter(e){this.flushQueue();const i=this.initialAstWithoutTokens||this.astWithTokens;return uwt(i,wy,i.length,aU(e))}getFirstBracketBefore(e){this.flushQueue();const i=this.initialAstWithoutTokens||this.astWithTokens;return cwt(i,wy,i.length,aU(e))}}function cwt(c,e,i,n){if(c.kind===4||c.kind===2){const s=[];for(const l of c.children)i=Ph(e,l.length),s.push({nodeOffsetStart:e,nodeOffsetEnd:i}),e=i;for(let l=s.length-1;l>=0;l--){const{nodeOffsetStart:d,nodeOffsetEnd:f}=s[l];if(PU(d,n)){const g=cwt(c.children[l],d,f,n);if(g)return g}}return null}else{if(c.kind===3)return null;if(c.kind===1){const s=o9(e,i);return{bracketInfo:c.bracketInfo,range:s}}}return null}function uwt(c,e,i,n){if(c.kind===4||c.kind===2){for(const s of c.children){if(i=Ph(e,s.length),PU(n,i)){const l=uwt(s,e,i,n);if(l)return l}e=i}return null}else{if(c.kind===3)return null;if(c.kind===1){const s=o9(e,i);return{bracketInfo:c.bracketInfo,range:s}}}return null}function k9e(c,e,i,n,s,l,d,f,g,y,w=!1){if(d>200)return!0;e:for(;;)switch(c.kind){case 4:{const x=c.childrenLength;for(let I=0;I200)return!0;let y=!0;if(c.kind===2){let w=0;if(f){let P=f.get(c.openingBracket.text);P===void 0&&(P=0),w=P,P++,f.set(c.openingBracket.text,P)}const x=Ph(e,c.openingBracket.length);let I=-1;if(l.includeMinIndentation&&(I=c.computeMinIndentation(e,l.textModel)),y=l.push(new bfi(o9(e,i),o9(e,x),c.closingBracket?o9(Ph(x,((g=c.child)===null||g===void 0?void 0:g.length)||wy),i):void 0,d,w,c,I)),e=x,y&&c.child){const P=c.child;if(i=Ph(e,P.length),AU(e,s)&&Pee(i,n)&&(y=T9e(P,e,i,n,s,l,d+1,f),!y))return!1}f==null||f.set(c.openingBracket.text,w)}else{let w=e;for(const x of c.children){const I=w;if(w=Ph(w,x.length),AU(I,s)&&AU(n,w)&&(y=T9e(x,I,w,n,s,l,d,f),!y))return!1}}return y}class Vfi extends Ii{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,i){super(),this.textModel=e,this.languageConfigurationService=i,this.bracketPairsTree=this._register(new jg),this.onDidChangeEmitter=new ui,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(n=>{var s;(!n.languageId||!((s=this.bracketPairsTree.value)===null||s===void 0)&&s.object.didLanguageChange(n.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var i;(i=this.bracketPairsTree.value)===null||i===void 0||i.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;(e=this.bracketPairsTree.value)===null||e===void 0||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var i;(i=this.bracketPairsTree.value)===null||i===void 0||i.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const e=new On;this.bracketPairsTree.value=Hfi(e.add(new Bfi(this.textModel,i=>this.languageConfigurationService.getLanguageConfiguration(i))),e),e.add(this.bracketPairsTree.value.object.onDidChange(i=>this.onDidChangeEmitter.fire(i))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){var i;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((i=this.bracketPairsTree.value)===null||i===void 0?void 0:i.object.getBracketPairsInRange(e,!1))||nL.empty}getBracketPairsInRangeWithMinIndentation(e){var i;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((i=this.bracketPairsTree.value)===null||i===void 0?void 0:i.object.getBracketPairsInRange(e,!0))||nL.empty}getBracketsInRange(e,i=!1){var n;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((n=this.bracketPairsTree.value)===null||n===void 0?void 0:n.object.getBracketsInRange(e,i))||nL.empty}findMatchingBracketUp(e,i,n){const s=this.textModel.validatePosition(i),l=this.textModel.getLanguageIdAtPosition(s.lineNumber,s.column);if(this.canBuildAST){const d=this.languageConfigurationService.getLanguageConfiguration(l).bracketsNew.getClosingBracketInfo(e);if(!d)return null;const f=this.getBracketPairsInRange(at.fromPositions(i,i)).findLast(g=>d.closes(g.openingBracketInfo));return f?f.openingBracketRange:null}else{const d=e.toLowerCase(),f=this.languageConfigurationService.getLanguageConfiguration(l).brackets;if(!f)return null;const g=f.textIsBracket[d];return g?Mge(this._findMatchingBracketUp(g,s,h7e(n))):null}}matchBracket(e,i){if(this.canBuildAST){const n=this.getBracketPairsInRange(at.fromPositions(e,e)).filter(s=>s.closingBracketRange!==void 0&&(s.openingBracketRange.containsPosition(e)||s.closingBracketRange.containsPosition(e))).findLastMaxBy(kb(s=>s.openingBracketRange.containsPosition(e)?s.openingBracketRange:s.closingBracketRange,at.compareRangesUsingStarts));return n?[n.openingBracketRange,n.closingBracketRange]:null}else{const n=h7e(i);return this._matchBracket(this.textModel.validatePosition(e),n)}}_establishBracketSearchOffsets(e,i,n,s){const l=i.getCount(),d=i.getLanguageId(s);let f=Math.max(0,e.column-1-n.maxBracketLength);for(let y=s-1;y>=0;y--){const w=i.getEndOffset(y);if(w<=f)break;if(NN(i.getStandardTokenType(y))||i.getLanguageId(y)!==d){f=w;break}}let g=Math.min(i.getLineContent().length,e.column-1+n.maxBracketLength);for(let y=s+1;y=g)break;if(NN(i.getStandardTokenType(y))||i.getLanguageId(y)!==d){g=w;break}}return{searchStartOffset:f,searchEndOffset:g}}_matchBracket(e,i){const n=e.lineNumber,s=this.textModel.tokenization.getLineTokens(n),l=this.textModel.getLineContent(n),d=s.findTokenIndexAtOffset(e.column-1);if(d<0)return null;const f=this.languageConfigurationService.getLanguageConfiguration(s.getLanguageId(d)).brackets;if(f&&!NN(s.getStandardTokenType(d))){let{searchStartOffset:g,searchEndOffset:y}=this._establishBracketSearchOffsets(e,s,f,d),w=null;for(;;){const x=X2.findNextBracketInRange(f.forwardRegex,n,l,g,y);if(!x)break;if(x.startColumn<=e.column&&e.column<=x.endColumn){const I=l.substring(x.startColumn-1,x.endColumn-1).toLowerCase(),P=this._matchFoundBracket(x,f.textIsBracket[I],f.textIsOpenBracket[I],i);if(P){if(P instanceof a4)return null;w=P}}g=x.endColumn-1}if(w)return w}if(d>0&&s.getStartOffset(d)===e.column-1){const g=d-1,y=this.languageConfigurationService.getLanguageConfiguration(s.getLanguageId(g)).brackets;if(y&&!NN(s.getStandardTokenType(g))){const{searchStartOffset:w,searchEndOffset:x}=this._establishBracketSearchOffsets(e,s,y,g),I=X2.findPrevBracketInRange(y.reversedRegex,n,l,w,x);if(I&&I.startColumn<=e.column&&e.column<=I.endColumn){const P=l.substring(I.startColumn-1,I.endColumn-1).toLowerCase(),O=this._matchFoundBracket(I,y.textIsBracket[P],y.textIsOpenBracket[P],i);if(O)return O instanceof a4?null:O}}}return null}_matchFoundBracket(e,i,n,s){if(!i)return null;const l=n?this._findMatchingBracketDown(i,e.getEndPosition(),s):this._findMatchingBracketUp(i,e.getStartPosition(),s);return l?l instanceof a4?l:[e,l]:null}_findMatchingBracketUp(e,i,n){const s=e.languageId,l=e.reversedRegex;let d=-1,f=0;const g=(y,w,x,I)=>{for(;;){if(n&&++f%100===0&&!n())return a4.INSTANCE;const P=X2.findPrevBracketInRange(l,y,w,x,I);if(!P)break;const O=w.substring(P.startColumn-1,P.endColumn-1).toLowerCase();if(e.isOpen(O)?d++:e.isClose(O)&&d--,d===0)return P;I=P.startColumn-1}return null};for(let y=i.lineNumber;y>=1;y--){const w=this.textModel.tokenization.getLineTokens(y),x=w.getCount(),I=this.textModel.getLineContent(y);let P=x-1,O=I.length,W=I.length;y===i.lineNumber&&(P=w.findTokenIndexAtOffset(i.column-1),O=i.column-1,W=i.column-1);let X=!0;for(;P>=0;P--){const Z=w.getLanguageId(P)===s&&!NN(w.getStandardTokenType(P));if(Z)X?O=w.getStartOffset(P):(O=w.getStartOffset(P),W=w.getEndOffset(P));else if(X&&O!==W){const ee=g(y,I,O,W);if(ee)return ee}X=Z}if(X&&O!==W){const Z=g(y,I,O,W);if(Z)return Z}}return null}_findMatchingBracketDown(e,i,n){const s=e.languageId,l=e.forwardRegex;let d=1,f=0;const g=(w,x,I,P)=>{for(;;){if(n&&++f%100===0&&!n())return a4.INSTANCE;const O=X2.findNextBracketInRange(l,w,x,I,P);if(!O)break;const W=x.substring(O.startColumn-1,O.endColumn-1).toLowerCase();if(e.isOpen(W)?d++:e.isClose(W)&&d--,d===0)return O;I=O.endColumn-1}return null},y=this.textModel.getLineCount();for(let w=i.lineNumber;w<=y;w++){const x=this.textModel.tokenization.getLineTokens(w),I=x.getCount(),P=this.textModel.getLineContent(w);let O=0,W=0,X=0;w===i.lineNumber&&(O=x.findTokenIndexAtOffset(i.column-1),W=i.column-1,X=i.column-1);let Z=!0;for(;O=1;f--){const g=this.textModel.tokenization.getLineTokens(f),y=g.getCount(),w=this.textModel.getLineContent(f);let x=y-1,I=w.length,P=w.length;if(f===n.lineNumber){x=g.findTokenIndexAtOffset(n.column-1),I=n.column-1,P=n.column-1;const W=g.getLanguageId(x);s!==W&&(s=W,l=this.languageConfigurationService.getLanguageConfiguration(s).brackets,d=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew)}let O=!0;for(;x>=0;x--){const W=g.getLanguageId(x);if(s!==W){if(l&&d&&O&&I!==P){const Z=X2.findPrevBracketInRange(l.reversedRegex,f,w,I,P);if(Z)return this._toFoundBracket(d,Z);O=!1}s=W,l=this.languageConfigurationService.getLanguageConfiguration(s).brackets,d=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew}const X=!!l&&!NN(g.getStandardTokenType(x));if(X)O?I=g.getStartOffset(x):(I=g.getStartOffset(x),P=g.getEndOffset(x));else if(d&&l&&O&&I!==P){const Z=X2.findPrevBracketInRange(l.reversedRegex,f,w,I,P);if(Z)return this._toFoundBracket(d,Z)}O=X}if(d&&l&&O&&I!==P){const W=X2.findPrevBracketInRange(l.reversedRegex,f,w,I,P);if(W)return this._toFoundBracket(d,W)}}return null}findNextBracket(e){var i;const n=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((i=this.bracketPairsTree.value)===null||i===void 0?void 0:i.object.getFirstBracketAfter(n))||null;const s=this.textModel.getLineCount();let l=null,d=null,f=null;for(let g=n.lineNumber;g<=s;g++){const y=this.textModel.tokenization.getLineTokens(g),w=y.getCount(),x=this.textModel.getLineContent(g);let I=0,P=0,O=0;if(g===n.lineNumber){I=y.findTokenIndexAtOffset(n.column-1),P=n.column-1,O=n.column-1;const X=y.getLanguageId(I);l!==X&&(l=X,d=this.languageConfigurationService.getLanguageConfiguration(l).brackets,f=this.languageConfigurationService.getLanguageConfiguration(l).bracketsNew)}let W=!0;for(;IW.closingBracketRange!==void 0&&W.range.strictContainsRange(P));return O?[O.openingBracketRange,O.closingBracketRange]:null}const s=h7e(i),l=this.textModel.getLineCount(),d=new Map;let f=[];const g=(P,O)=>{if(!d.has(P)){const W=[];for(let X=0,Z=O?O.brackets.length:0;X{for(;;){if(s&&++y%100===0&&!s())return a4.INSTANCE;const ee=X2.findNextBracketInRange(P.forwardRegex,O,W,X,Z);if(!ee)break;const he=W.substring(ee.startColumn-1,ee.endColumn-1).toLowerCase(),we=P.textIsBracket[he];if(we&&(we.isOpen(he)?f[we.index]++:we.isClose(he)&&f[we.index]--,f[we.index]===-1))return this._matchFoundBracket(ee,we,!1,s);X=ee.endColumn-1}return null};let x=null,I=null;for(let P=n.lineNumber;P<=l;P++){const O=this.textModel.tokenization.getLineTokens(P),W=O.getCount(),X=this.textModel.getLineContent(P);let Z=0,ee=0,he=0;if(P===n.lineNumber){Z=O.findTokenIndexAtOffset(n.column-1),ee=n.column-1,he=n.column-1;const Te=O.getLanguageId(Z);x!==Te&&(x=Te,I=this.languageConfigurationService.getLanguageConfiguration(x).brackets,g(x,I))}let we=!0;for(;Ze==null?void 0:e.dispose()}}function h7e(c){if(typeof c>"u")return()=>!0;{const e=Date.now();return()=>Date.now()-e<=c}}class a4{constructor(){this._searchCanceledBrand=void 0}}a4.INSTANCE=new a4;function Mge(c){return c instanceof a4?null:c}class jfi extends Ii{constructor(e){super(),this.textModel=e,this.colorProvider=new dwt,this.onDidChangeEmitter=new ui,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange(i=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,i,n,s){return s?[]:i===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map(d=>({id:`bracket${d.range.toString()}-${d.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(d,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:d.range})).toArray():[]}getAllDecorations(e,i){return e===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new at(1,1,this.textModel.getLineCount(),1),e,i):[]}}class dwt{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,i){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(i?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}}dk((c,e)=>{const i=[BSt,WSt,VSt,HSt,jSt,zSt],n=new dwt;e.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${c.getColor(Rui)}; }`);const s=i.map(l=>c.getColor(l)).filter(l=>!!l).filter(l=>!l.isTransparent());for(let l=0;l<30;l++){const d=s[l%s.length];e.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(l)} { color: ${d}; }`)}});function Rge(c){return c.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class N0{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,i,n,s){this.oldPosition=e,this.oldText=i,this.newPosition=n,this.newText=s}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${Rge(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${Rge(this.oldText)}")`:`(replace@${this.oldPosition} "${Rge(this.oldText)}" with "${Rge(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,i,n){const s=i.length;iE(e,s,n),n+=4;for(let l=0;lc.length)return!1;if(i){if(!THe(c,e))return!1;if(e.length===c.length)return!0;let l=e.length;return e.charAt(e.length-1)===n&&l--,c.charAt(l)===n}return e.charAt(e.length-1)!==n&&(e+=n),c.indexOf(e)===0}function hwt(c){return c>=65&&c<=90||c>=97&&c<=122}function qfi(c,e=M0){return e?hwt(c.charCodeAt(0))&&c.charCodeAt(1)===58:!1}function LN(c){return L0e(c,!0)}class $fi{constructor(e){this._ignorePathCasing=e}compare(e,i,n=!1){return e===i?0:Fte(this.getComparisonKey(e,n),this.getComparisonKey(i,n))}isEqual(e,i,n=!1){return e===i?!0:!e||!i?!1:this.getComparisonKey(e,n)===this.getComparisonKey(i,n)}getComparisonKey(e,i=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:i?null:void 0}).toString()}isEqualOrParent(e,i,n=!1){if(e.scheme===i.scheme){if(e.scheme===wa.file)return D9e(LN(e),LN(i),this._ignorePathCasing(e))&&e.query===i.query&&(n||e.fragment===i.fragment);if(u0t(e.authority,i.authority))return D9e(e.path,i.path,this._ignorePathCasing(e),"/")&&e.query===i.query&&(n||e.fragment===i.fragment)}return!1}joinPath(e,...i){return Oo.joinPath(e,...i)}basenameOrAuthority(e){return lk(e)||e.authority}basename(e){return gp.basename(e.path)}extname(e){return gp.extname(e.path)}dirname(e){if(e.path.length===0)return e;let i;return e.scheme===wa.file?i=Oo.file(Wbt(LN(e))).path:(i=gp.dirname(e.path),e.authority&&i.length&&i.charCodeAt(0)!==47&&(console.error(`dirname("${e.toString})) resulted in a relative path`),i="/")),e.with({path:i})}normalizePath(e){if(!e.path.length)return e;let i;return e.scheme===wa.file?i=Oo.file(Bbt(LN(e))).path:i=gp.normalize(e.path),e.with({path:i})}relativePath(e,i){if(e.scheme!==i.scheme||!u0t(e.authority,i.authority))return;if(e.scheme===wa.file){const l=Iii(LN(e),LN(i));return M0?fwt(l):l}let n=e.path||"/";const s=i.path||"/";if(this._ignorePathCasing(e)){let l=0;for(const d=Math.min(n.length,s.length);ll0t(n).length&&n[n.length-1]===i}else{const n=e.path;return n.length>1&&n.charCodeAt(n.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,i=vE){return d0t(e,i)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,i=vE){let n=!1;if(e.scheme===wa.file){const s=LN(e);n=s!==void 0&&s.length===l0t(s).length&&s[s.length-1]===i}else{i="/";const s=e.path;n=s.length===1&&s.charCodeAt(s.length-1)===47}return!n&&!d0t(e,i)?e.with({path:e.path+"/"}):e}}const Cf=new $fi(()=>!1),Dje=Cf.isEqual.bind(Cf);Cf.isEqualOrParent.bind(Cf);Cf.getComparisonKey.bind(Cf);const Jfi=Cf.basenameOrAuthority.bind(Cf),lk=Cf.basename.bind(Cf),Gfi=Cf.extname.bind(Cf),gye=Cf.dirname.bind(Cf),Kfi=Cf.joinPath.bind(Cf),Qfi=Cf.normalizePath.bind(Cf),Xfi=Cf.relativePath.bind(Cf),c0t=Cf.resolvePath.bind(Cf);Cf.isAbsolutePath.bind(Cf);const u0t=Cf.isEqualAuthority.bind(Cf),d0t=Cf.hasTrailingPathSeparator.bind(Cf);Cf.removeTrailingPathSeparator.bind(Cf);Cf.addTrailingPathSeparator.bind(Cf);var oR;(function(c){c.META_DATA_LABEL="label",c.META_DATA_DESCRIPTION="description",c.META_DATA_SIZE="size",c.META_DATA_MIME="mime";function e(i){const n=new Map;i.path.substring(i.path.indexOf(";")+1,i.path.lastIndexOf(";")).split(";").forEach(d=>{const[f,g]=d.split(":");f&&g&&n.set(f,g)});const l=i.path.substring(0,i.path.indexOf(";"));return l&&n.set(c.META_DATA_MIME,l),n}c.parseMetaData=e})(oR||(oR={}));function wz(c){return c.toString()}class gm{static create(e,i){const n=e.getAlternativeVersionId(),s=E9e(e);return new gm(n,n,s,s,i,i,[])}constructor(e,i,n,s,l,d,f){this.beforeVersionId=e,this.afterVersionId=i,this.beforeEOL=n,this.afterEOL=s,this.beforeCursorState=l,this.afterCursorState=d,this.changes=f}append(e,i,n,s,l){i.length>0&&(this.changes=zfi(this.changes,i)),this.afterEOL=n,this.afterVersionId=s,this.afterCursorState=l}static _writeSelectionsSize(e){return 4+4*4*(e?e.length:0)}static _writeSelections(e,i,n){if(iE(e,i?i.length:0,n),n+=4,i)for(const s of i)iE(e,s.selectionStartLineNumber,n),n+=4,iE(e,s.selectionStartColumn,n),n+=4,iE(e,s.positionLineNumber,n),n+=4,iE(e,s.positionColumn,n),n+=4;return n}static _readSelections(e,i,n){const s=tE(e,i);i+=4;for(let l=0;li.toString()).join(", ")}matchesResource(e){return(Oo.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof gm}append(e,i,n,s,l){this._data instanceof gm&&this._data.append(e,i,n,s,l)}close(){this._data instanceof gm&&(this._data=this._data.serialize())}open(){this._data instanceof gm||(this._data=gm.deserialize(this._data))}undo(){if(Oo.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof gm&&(this._data=this._data.serialize());const e=gm.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(Oo.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof gm&&(this._data=this._data.serialize());const e=gm.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof gm&&(this._data=this._data.serialize()),this._data.byteLength+168}}class Zfi{get resources(){return this._editStackElementsArr.map(e=>e.resource)}constructor(e,i,n){this.label=e,this.code=i,this.type=1,this._isOpen=!0,this._editStackElementsArr=n.slice(0),this._editStackElementsMap=new Map;for(const s of this._editStackElementsArr){const l=wz(s.resource);this._editStackElementsMap.set(l,s)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const i=wz(e);return this._editStackElementsMap.has(i)}setModel(e){const i=wz(Oo.isUri(e)?e:e.uri);this._editStackElementsMap.has(i)&&this._editStackElementsMap.get(i).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const i=wz(e.uri);return this._editStackElementsMap.has(i)?this._editStackElementsMap.get(i).canAppend(e):!1}append(e,i,n,s,l){const d=wz(e.uri);this._editStackElementsMap.get(d).append(e,i,n,s,l)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const i=wz(e);return this._editStackElementsMap.has(i)?this._editStackElementsMap.get(i).heapSize():0}split(){return this._editStackElementsArr}toString(){const e=[];for(const i of this._editStackElementsArr)e.push(`${lk(i.resource)}: ${i}`);return`{${e.join(", ")}}`}}function E9e(c){return c.getEOL()===` +`?0:1}function l4(c){return c?c instanceof _wt||c instanceof Zfi:!1}class Eje{constructor(e,i){this._model=e,this._undoRedoService=i}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);l4(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);l4(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,i){const n=this._undoRedoService.getLastElement(this._model.uri);if(l4(n)&&n.canAppend(this._model))return n;const s=new _wt(V("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(s,i),s}pushEOL(e){const i=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),i.append(this._model,[],E9e(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,i,n,s){const l=this._getOrCreateEditStackElement(e,s),d=this._model.applyEdits(i,!0),f=Eje._computeCursorState(n,d),g=d.map((y,w)=>({index:w,textChange:y.textChange}));return g.sort((y,w)=>y.textChange.oldPosition===w.textChange.oldPosition?y.index-w.index:y.textChange.oldPosition-w.textChange.oldPosition),l.append(this._model,g.map(y=>y.textChange),E9e(this._model),this._model.getAlternativeVersionId(),f),f}static _computeCursorState(e,i){try{return e?e(i):null}catch(n){return Ba(n),null}}}class Yfi{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function ehi(c,e,i,n,s){s.spacesDiff=0,s.looksLikeAlignment=!1;let l;for(l=0;l0&&f>0||g>0&&y>0)return;const w=Math.abs(f-y),x=Math.abs(d-g);if(w===0){s.spacesDiff=x,x>0&&0<=g-1&&g-10?s++:we>1&&l++,ehi(d,f,X,he,x),x.looksLikeAlignment&&!(i&&e===x.spacesDiff)))continue;const Be=x.spacesDiff;Be<=y&&w[Be]++,d=X,f=he}let I=i;s!==l&&(I=s{const X=w[W];X>O&&(O=X,P=W)}),P===4&&w[4]>0&&w[2]>0&&w[2]>=w[4]/2&&(P=2)}return{insertSpaces:I,tabSize:P}}function vb(c){return(c.metadata&1)>>>0}function mf(c,e){c.metadata=c.metadata&254|e<<0}function O0(c){return(c.metadata&2)>>>1===1}function uf(c,e){c.metadata=c.metadata&253|(e?1:0)<<1}function pwt(c){return(c.metadata&4)>>>2===1}function h0t(c,e){c.metadata=c.metadata&251|(e?1:0)<<2}function gwt(c){return(c.metadata&64)>>>6===1}function _0t(c,e){c.metadata=c.metadata&191|(e?1:0)<<6}function thi(c){return(c.metadata&24)>>>3}function p0t(c,e){c.metadata=c.metadata&231|e<<3}function ihi(c){return(c.metadata&32)>>>5===1}function g0t(c,e){c.metadata=c.metadata&223|(e?1:0)<<5}class mwt{constructor(e,i,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,mf(this,1),this.start=i,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,h0t(this,!1),_0t(this,!1),p0t(this,1),g0t(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=i,this.cachedAbsoluteEnd=n,this.range=null,uf(this,!1)}reset(e,i,n,s){this.start=i,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=i,this.cachedAbsoluteEnd=n,this.range=s}setOptions(e){this.options=e;const i=this.options.className;h0t(this,i==="squiggly-error"||i==="squiggly-warning"||i==="squiggly-info"),_0t(this,this.options.glyphMarginClassName!==null),p0t(this,this.options.stickiness),g0t(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,i,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=i}detach(){this.parent=null,this.left=null,this.right=null}}const Bl=new mwt(null,0,0);Bl.parent=Bl;Bl.left=Bl;Bl.right=Bl;mf(Bl,0);class _7e{constructor(){this.root=Bl,this.requestNormalizeDelta=!1}intervalSearch(e,i,n,s,l,d){return this.root===Bl?[]:uhi(this,e,i,n,s,l,d)}search(e,i,n,s){return this.root===Bl?[]:chi(this,e,i,n,s)}collectNodesFromOwner(e){return ahi(this,e)}collectNodesPostOrder(){return lhi(this)}insert(e){m0t(this,e),this._normalizeDeltaIfNecessary()}delete(e){v0t(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,i){const n=e;let s=0;for(;e!==this.root;)e===e.parent.right&&(s+=e.parent.delta),e=e.parent;const l=n.start+s,d=n.end+s;n.setCachedOffsets(l,d,i)}acceptReplace(e,i,n,s){const l=shi(this,e,e+i);for(let d=0,f=l.length;di||n===1?!1:n===2?!0:e}function rhi(c,e,i,n,s){const l=thi(c),d=l===0||l===2,f=l===1||l===2,g=i-e,y=n,w=Math.min(g,y),x=c.start;let I=!1;const P=c.end;let O=!1;e<=x&&P<=i&&ihi(c)&&(c.start=e,I=!0,c.end=e,O=!0);{const X=s?1:g>0?2:0;!I&&xz(x,d,e,X)&&(I=!0),!O&&xz(P,f,e,X)&&(O=!0)}if(w>0&&!s){const X=g>y?2:0;!I&&xz(x,d,e+w,X)&&(I=!0),!O&&xz(P,f,e+w,X)&&(O=!0)}{const X=s?1:0;!I&&xz(x,d,i,X)&&(c.start=e+y,I=!0),!O&&xz(P,f,i,X)&&(c.end=e+y,O=!0)}const W=y-g;I||(c.start=Math.max(0,x+W)),O||(c.end=Math.max(0,P+W)),c.start>c.end&&(c.end=c.start)}function shi(c,e,i){let n=c.root,s=0,l=0,d=0,f=0;const g=[];let y=0;for(;n!==Bl;){if(O0(n)){uf(n.left,!1),uf(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),n=n.parent;continue}if(!O0(n.left)){if(l=s+n.maxEnd,li){uf(n,!0);continue}if(f=s+n.end,f>=e&&(n.setCachedOffsets(d,f,0),g[y++]=n),uf(n,!0),n.right!==Bl&&!O0(n.right)){s+=n.delta,n=n.right;continue}}return uf(c.root,!1),g}function ohi(c,e,i,n){let s=c.root,l=0,d=0,f=0;const g=n-(i-e);for(;s!==Bl;){if(O0(s)){uf(s.left,!1),uf(s.right,!1),s===s.parent.right&&(l-=s.parent.delta),aR(s),s=s.parent;continue}if(!O0(s.left)){if(d=l+s.maxEnd,di){s.start+=g,s.end+=g,s.delta+=g,(s.delta<-1073741824||s.delta>1073741824)&&(c.requestNormalizeDelta=!0),uf(s,!0);continue}if(uf(s,!0),s.right!==Bl&&!O0(s.right)){l+=s.delta,s=s.right;continue}}uf(c.root,!1)}function ahi(c,e){let i=c.root;const n=[];let s=0;for(;i!==Bl;){if(O0(i)){uf(i.left,!1),uf(i.right,!1),i=i.parent;continue}if(i.left!==Bl&&!O0(i.left)){i=i.left;continue}if(i.ownerId===e&&(n[s++]=i),uf(i,!0),i.right!==Bl&&!O0(i.right)){i=i.right;continue}}return uf(c.root,!1),n}function lhi(c){let e=c.root;const i=[];let n=0;for(;e!==Bl;){if(O0(e)){uf(e.left,!1),uf(e.right,!1),e=e.parent;continue}if(e.left!==Bl&&!O0(e.left)){e=e.left;continue}if(e.right!==Bl&&!O0(e.right)){e=e.right;continue}i[n++]=e,uf(e,!0)}return uf(c.root,!1),i}function chi(c,e,i,n,s){let l=c.root,d=0,f=0,g=0;const y=[];let w=0;for(;l!==Bl;){if(O0(l)){uf(l.left,!1),uf(l.right,!1),l===l.parent.right&&(d-=l.parent.delta),l=l.parent;continue}if(l.left!==Bl&&!O0(l.left)){l=l.left;continue}f=d+l.start,g=d+l.end,l.setCachedOffsets(f,g,n);let x=!0;if(e&&l.ownerId&&l.ownerId!==e&&(x=!1),i&&pwt(l)&&(x=!1),s&&!gwt(l)&&(x=!1),x&&(y[w++]=l),uf(l,!0),l.right!==Bl&&!O0(l.right)){d+=l.delta,l=l.right;continue}}return uf(c.root,!1),y}function uhi(c,e,i,n,s,l,d){let f=c.root,g=0,y=0,w=0,x=0;const I=[];let P=0;for(;f!==Bl;){if(O0(f)){uf(f.left,!1),uf(f.right,!1),f===f.parent.right&&(g-=f.parent.delta),f=f.parent;continue}if(!O0(f.left)){if(y=g+f.maxEnd,yi){uf(f,!0);continue}if(x=g+f.end,x>=e){f.setCachedOffsets(w,x,l);let O=!0;n&&f.ownerId&&f.ownerId!==n&&(O=!1),s&&pwt(f)&&(O=!1),d&&!gwt(f)&&(O=!1),O&&(I[P++]=f)}if(uf(f,!0),f.right!==Bl&&!O0(f.right)){g+=f.delta,f=f.right;continue}}return uf(c.root,!1),I}function m0t(c,e){if(c.root===Bl)return e.parent=Bl,e.left=Bl,e.right=Bl,mf(e,0),c.root=e,c.root;dhi(c,e),rM(e.parent);let i=e;for(;i!==c.root&&vb(i.parent)===1;)if(i.parent===i.parent.parent.left){const n=i.parent.parent.right;vb(n)===1?(mf(i.parent,0),mf(n,0),mf(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,ote(c,i)),mf(i.parent,0),mf(i.parent.parent,1),ate(c,i.parent.parent))}else{const n=i.parent.parent.left;vb(n)===1?(mf(i.parent,0),mf(n,0),mf(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,ate(c,i)),mf(i.parent,0),mf(i.parent.parent,1),ote(c,i.parent.parent))}return mf(c.root,0),e}function dhi(c,e){let i=0,n=c.root;const s=e.start,l=e.end;for(;;)if(hhi(s,l,n.start+i,n.end+i)<0)if(n.left===Bl){e.start-=i,e.end-=i,e.maxEnd-=i,n.left=e;break}else n=n.left;else if(n.right===Bl){e.start-=i+n.delta,e.end-=i+n.delta,e.maxEnd-=i+n.delta,n.right=e;break}else i+=n.delta,n=n.right;e.parent=n,e.left=Bl,e.right=Bl,mf(e,1)}function v0t(c,e){let i,n;if(e.left===Bl?(i=e.right,n=e,i.delta+=e.delta,(i.delta<-1073741824||i.delta>1073741824)&&(c.requestNormalizeDelta=!0),i.start+=e.delta,i.end+=e.delta):e.right===Bl?(i=e.left,n=e):(n=fhi(e.right),i=n.right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(c.requestNormalizeDelta=!0),n.start+=e.delta,n.end+=e.delta,n.delta=e.delta,(n.delta<-1073741824||n.delta>1073741824)&&(c.requestNormalizeDelta=!0)),n===c.root){c.root=i,mf(i,0),e.detach(),p7e(),aR(i),c.root.parent=Bl;return}const s=vb(n)===1;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===e?i.parent=n.parent:(n.parent===e?i.parent=n:i.parent=n.parent,n.left=e.left,n.right=e.right,n.parent=e.parent,mf(n,vb(e)),e===c.root?c.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left!==Bl&&(n.left.parent=n),n.right!==Bl&&(n.right.parent=n)),e.detach(),s){rM(i.parent),n!==e&&(rM(n),rM(n.parent)),p7e();return}rM(i),rM(i.parent),n!==e&&(rM(n),rM(n.parent));let l;for(;i!==c.root&&vb(i)===0;)i===i.parent.left?(l=i.parent.right,vb(l)===1&&(mf(l,0),mf(i.parent,1),ote(c,i.parent),l=i.parent.right),vb(l.left)===0&&vb(l.right)===0?(mf(l,1),i=i.parent):(vb(l.right)===0&&(mf(l.left,0),mf(l,1),ate(c,l),l=i.parent.right),mf(l,vb(i.parent)),mf(i.parent,0),mf(l.right,0),ote(c,i.parent),i=c.root)):(l=i.parent.left,vb(l)===1&&(mf(l,0),mf(i.parent,1),ate(c,i.parent),l=i.parent.left),vb(l.left)===0&&vb(l.right)===0?(mf(l,1),i=i.parent):(vb(l.left)===0&&(mf(l.right,0),mf(l,1),ote(c,l),l=i.parent.left),mf(l,vb(i.parent)),mf(i.parent,0),mf(l.left,0),ate(c,i.parent),i=c.root));mf(i,0),p7e()}function fhi(c){for(;c.left!==Bl;)c=c.left;return c}function p7e(){Bl.parent=Bl,Bl.delta=0,Bl.start=0,Bl.end=0}function ote(c,e){const i=e.right;i.delta+=e.delta,(i.delta<-1073741824||i.delta>1073741824)&&(c.requestNormalizeDelta=!0),i.start+=e.delta,i.end+=e.delta,e.right=i.left,i.left!==Bl&&(i.left.parent=e),i.parent=e.parent,e.parent===Bl?c.root=i:e===e.parent.left?e.parent.left=i:e.parent.right=i,i.left=e,e.parent=i,aR(e),aR(i)}function ate(c,e){const i=e.left;e.delta-=i.delta,(e.delta<-1073741824||e.delta>1073741824)&&(c.requestNormalizeDelta=!0),e.start-=i.delta,e.end-=i.delta,e.left=i.right,i.right!==Bl&&(i.right.parent=e),i.parent=e.parent,e.parent===Bl?c.root=i:e===e.parent.right?e.parent.right=i:e.parent.left=i,i.right=e,e.parent=i,aR(e),aR(i)}function vwt(c){let e=c.end;if(c.left!==Bl){const i=c.left.maxEnd;i>e&&(e=i)}if(c.right!==Bl){const i=c.right.maxEnd+c.delta;i>e&&(e=i)}return e}function aR(c){c.maxEnd=vwt(c)}function rM(c){for(;c!==Bl;){const e=vwt(c);if(c.maxEnd===e)return;c.maxEnd=e,c=c.parent}}function hhi(c,e,i,n){return c===i?e-n:c-i}class I9e{constructor(e,i){this.piece=e,this.color=i,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==tl)return Ije(this.right);let e=this;for(;e.parent!==tl&&e.parent.left!==e;)e=e.parent;return e.parent===tl?tl:e.parent}prev(){if(this.left!==tl)return ywt(this.left);let e=this;for(;e.parent!==tl&&e.parent.right!==e;)e=e.parent;return e.parent===tl?tl:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const tl=new I9e(null,0);tl.parent=tl;tl.left=tl;tl.right=tl;tl.color=0;function Ije(c){for(;c.left!==tl;)c=c.left;return c}function ywt(c){for(;c.right!==tl;)c=c.right;return c}function Nje(c){return c===tl?0:c.size_left+c.piece.length+Nje(c.right)}function Lje(c){return c===tl?0:c.lf_left+c.piece.lineFeedCnt+Lje(c.right)}function g7e(){tl.parent=tl}function lte(c,e){const i=e.right;i.size_left+=e.size_left+(e.piece?e.piece.length:0),i.lf_left+=e.lf_left+(e.piece?e.piece.lineFeedCnt:0),e.right=i.left,i.left!==tl&&(i.left.parent=e),i.parent=e.parent,e.parent===tl?c.root=i:e.parent.left===e?e.parent.left=i:e.parent.right=i,i.left=e,e.parent=i}function cte(c,e){const i=e.left;e.left=i.right,i.right!==tl&&(i.right.parent=e),i.parent=e.parent,e.size_left-=i.size_left+(i.piece?i.piece.length:0),e.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),e.parent===tl?c.root=i:e===e.parent.right?e.parent.right=i:e.parent.left=i,i.right=e,e.parent=i}function Fge(c,e){let i,n;if(e.left===tl?(n=e,i=n.right):e.right===tl?(n=e,i=n.left):(n=Ije(e.right),i=n.right),n===c.root){c.root=i,i.color=0,e.detach(),g7e(),c.root.parent=tl;return}const s=n.color===1;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===e?(i.parent=n.parent,Aee(c,i)):(n.parent===e?i.parent=n:i.parent=n.parent,Aee(c,i),n.left=e.left,n.right=e.right,n.parent=e.parent,n.color=e.color,e===c.root?c.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left!==tl&&(n.left.parent=n),n.right!==tl&&(n.right.parent=n),n.size_left=e.size_left,n.lf_left=e.lf_left,Aee(c,n)),e.detach(),i.parent.left===i){const d=Nje(i),f=Lje(i);if(d!==i.parent.size_left||f!==i.parent.lf_left){const g=d-i.parent.size_left,y=f-i.parent.lf_left;i.parent.size_left=d,i.parent.lf_left=f,t4(c,i.parent,g,y)}}if(Aee(c,i.parent),s){g7e();return}let l;for(;i!==c.root&&i.color===0;)i===i.parent.left?(l=i.parent.right,l.color===1&&(l.color=0,i.parent.color=1,lte(c,i.parent),l=i.parent.right),l.left.color===0&&l.right.color===0?(l.color=1,i=i.parent):(l.right.color===0&&(l.left.color=0,l.color=1,cte(c,l),l=i.parent.right),l.color=i.parent.color,i.parent.color=0,l.right.color=0,lte(c,i.parent),i=c.root)):(l=i.parent.left,l.color===1&&(l.color=0,i.parent.color=1,cte(c,i.parent),l=i.parent.left),l.left.color===0&&l.right.color===0?(l.color=1,i=i.parent):(l.left.color===0&&(l.right.color=0,l.color=1,lte(c,l),l=i.parent.left),l.color=i.parent.color,i.parent.color=0,l.left.color=0,cte(c,i.parent),i=c.root));i.color=0,g7e()}function y0t(c,e){for(Aee(c,e);e!==c.root&&e.parent.color===1;)if(e.parent===e.parent.parent.left){const i=e.parent.parent.right;i.color===1?(e.parent.color=0,i.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.right&&(e=e.parent,lte(c,e)),e.parent.color=0,e.parent.parent.color=1,cte(c,e.parent.parent))}else{const i=e.parent.parent.left;i.color===1?(e.parent.color=0,i.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.left&&(e=e.parent,cte(c,e)),e.parent.color=0,e.parent.parent.color=1,lte(c,e.parent.parent))}c.root.color=0}function t4(c,e,i,n){for(;e!==c.root&&e!==tl;)e.parent.left===e&&(e.parent.size_left+=i,e.parent.lf_left+=n),e=e.parent}function Aee(c,e){let i=0,n=0;if(e!==c.root){for(;e!==c.root&&e===e.parent.right;)e=e.parent;if(e!==c.root)for(e=e.parent,i=Nje(e.left)-e.size_left,n=Lje(e.left)-e.lf_left,e.size_left+=i,e.lf_left+=n;e!==c.root&&(i!==0||n!==0);)e.parent.left===e&&(e.parent.size_left+=i,e.parent.lf_left+=n),e=e.parent}}const JA=65535;function bwt(c){let e;return c[c.length-1]<65536?e=new Uint16Array(c.length):e=new Uint32Array(c.length),e.set(c,0),e}class _hi{constructor(e,i,n,s,l){this.lineStarts=e,this.cr=i,this.lf=n,this.crlf=s,this.isBasicASCII=l}}function i4(c,e=!0){const i=[0];let n=1;for(let s=0,l=c.length;s126)&&(d=!1)}const f=new _hi(bwt(c),n,s,l,d);return c.length=0,f}class LC{constructor(e,i,n,s,l){this.bufferIndex=e,this.start=i,this.end=n,this.lineFeedCnt=s,this.length=l}}class V5{constructor(e,i){this.buffer=e,this.lineStarts=i}}class ghi{constructor(e,i){this._pieces=[],this._tree=e,this._BOM=i,this._index=0,e.root!==tl&&e.iterate(e.root,n=>(n!==tl&&this._pieces.push(n.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class mhi{constructor(e){this._limit=e,this._cache=[]}get(e){for(let i=this._cache.length-1;i>=0;i--){const n=this._cache[i];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null}get2(e){for(let i=this._cache.length-1;i>=0;i--){const n=this._cache[i];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let i=!1;const n=this._cache;for(let s=0;s=e){n[s]=null,i=!0;continue}}if(i){const s=[];for(const l of n)l!==null&&s.push(l);this._cache=s}}}class vhi{constructor(e,i,n){this.create(e,i,n)}create(e,i,n){this._buffers=[new V5("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=tl,this._lineCnt=1,this._length=0,this._EOL=i,this._EOLLength=i.length,this._EOLNormalized=n;let s=null;for(let l=0,d=e.length;l0){e[l].lineStarts||(e[l].lineStarts=i4(e[l].buffer));const f=new LC(l+1,{line:0,column:0},{line:e[l].lineStarts.length-1,column:e[l].buffer.length-e[l].lineStarts[e[l].lineStarts.length-1]},e[l].lineStarts.length-1,e[l].buffer.length);this._buffers.push(e[l]),s=this.rbInsertRight(s,f)}this._searchCache=new mhi(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const i=JA,n=i-Math.floor(i/3),s=n*2;let l="",d=0;const f=[];if(this.iterate(this.root,g=>{const y=this.getNodeContent(g),w=y.length;if(d<=n||d+w0){const g=l.replace(/\r\n|\r|\n/g,e);f.push(new V5(g,i4(g)))}this.create(f,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new ghi(this,e)}getOffsetAt(e,i){let n=0,s=this.root;for(;s!==tl;)if(s.left!==tl&&s.lf_left+1>=e)s=s.left;else if(s.lf_left+s.piece.lineFeedCnt+1>=e){n+=s.size_left;const l=this.getAccumulatedValue(s,e-s.lf_left-2);return n+=l+i-1}else e-=s.lf_left+s.piece.lineFeedCnt,n+=s.size_left+s.piece.length,s=s.right;return n}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let i=this.root,n=0;const s=e;for(;i!==tl;)if(i.size_left!==0&&i.size_left>=e)i=i.left;else if(i.size_left+i.piece.length>=e){const l=this.getIndexOf(i,e-i.size_left);if(n+=i.lf_left+l.index,l.index===0){const d=this.getOffsetAt(n+1,1),f=s-d;return new yi(n+1,f+1)}return new yi(n+1,l.remainder+1)}else if(e-=i.size_left+i.piece.length,n+=i.lf_left+i.piece.lineFeedCnt,i.right===tl){const l=this.getOffsetAt(n+1,1),d=s-e-l;return new yi(n+1,d+1)}else i=i.right;return new yi(1,1)}getValueInRange(e,i){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const n=this.nodeAt2(e.startLineNumber,e.startColumn),s=this.nodeAt2(e.endLineNumber,e.endColumn),l=this.getValueInRange2(n,s);return i?i!==this._EOL||!this._EOLNormalized?l.replace(/\r\n|\r|\n/g,i):i===this.getEOL()&&this._EOLNormalized?l:l.replace(/\r\n|\r|\n/g,i):l}getValueInRange2(e,i){if(e.node===i.node){const f=e.node,g=this._buffers[f.piece.bufferIndex].buffer,y=this.offsetInBuffer(f.piece.bufferIndex,f.piece.start);return g.substring(y+e.remainder,y+i.remainder)}let n=e.node;const s=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);let d=s.substring(l+e.remainder,l+n.piece.length);for(n=n.next();n!==tl;){const f=this._buffers[n.piece.bufferIndex].buffer,g=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(n===i.node){d+=f.substring(g,g+i.remainder);break}else d+=f.substr(g,n.piece.length);n=n.next()}return d}getLinesContent(){const e=[];let i=0,n="",s=!1;return this.iterate(this.root,l=>{if(l===tl)return!0;const d=l.piece;let f=d.length;if(f===0)return!0;const g=this._buffers[d.bufferIndex].buffer,y=this._buffers[d.bufferIndex].lineStarts,w=d.start.line,x=d.end.line;let I=y[w]+d.start.column;if(s&&(g.charCodeAt(I)===10&&(I++,f--),e[i++]=n,n="",s=!1,f===0))return!0;if(w===x)return!this._EOLNormalized&&g.charCodeAt(I+f-1)===13?(s=!0,n+=g.substr(I,f-1)):n+=g.substr(I,f),!0;n+=this._EOLNormalized?g.substring(I,Math.max(I,y[w+1]-this._EOLLength)):g.substring(I,y[w+1]).replace(/(\r\n|\r|\n)$/,""),e[i++]=n;for(let P=w+1;Pwe+O,i.reset(0)):(ee=I.buffer,he=we=>we,i.reset(O));do if(X=i.next(ee),X){if(he(X.index)>=W)return w;this.positionInBuffer(e,he(X.index)-P,Z);const we=this.getLineFeedCnt(e.piece.bufferIndex,l,Z),Te=Z.line===l.line?Z.column-l.column+s:Z.column+1,Be=Te+X[0].length;if(x[w++]=A5(new at(n+we,Te,n+we,Be),X,g),he(X.index)+X[0].length>=W||w>=y)return w}while(X);return w}findMatchesLineByLine(e,i,n,s){const l=[];let d=0;const f=new Qz(i.wordSeparators,i.regex);let g=this.nodeAt2(e.startLineNumber,e.startColumn);if(g===null)return[];const y=this.nodeAt2(e.endLineNumber,e.endColumn);if(y===null)return[];let w=this.positionInBuffer(g.node,g.remainder);const x=this.positionInBuffer(y.node,y.remainder);if(g.node===y.node)return this.findMatchesInNode(g.node,f,e.startLineNumber,e.startColumn,w,x,i,n,s,d,l),l;let I=e.startLineNumber,P=g.node;for(;P!==y.node;){const W=this.getLineFeedCnt(P.piece.bufferIndex,w,P.piece.end);if(W>=1){const Z=this._buffers[P.piece.bufferIndex].lineStarts,ee=this.offsetInBuffer(P.piece.bufferIndex,P.piece.start),he=Z[w.line+W],we=I===e.startLineNumber?e.startColumn:1;if(d=this.findMatchesInNode(P,f,I,we,w,this.positionInBuffer(P,he-ee),i,n,s,d,l),d>=s)return l;I+=W}const X=I===e.startLineNumber?e.startColumn-1:0;if(I===e.endLineNumber){const Z=this.getLineContent(I).substring(X,e.endColumn-1);return d=this._findMatchesInLine(i,f,Z,e.endLineNumber,X,d,l,n,s),l}if(d=this._findMatchesInLine(i,f,this.getLineContent(I).substr(X),I,X,d,l,n,s),d>=s)return l;I++,g=this.nodeAt2(I,1),P=g.node,w=this.positionInBuffer(g.node,g.remainder)}if(I===e.endLineNumber){const W=I===e.startLineNumber?e.startColumn-1:0,X=this.getLineContent(I).substring(W,e.endColumn-1);return d=this._findMatchesInLine(i,f,X,e.endLineNumber,W,d,l,n,s),l}const O=I===e.startLineNumber?e.startColumn:1;return d=this.findMatchesInNode(y.node,f,I,O,w,x,i,n,s,d,l),l}_findMatchesInLine(e,i,n,s,l,d,f,g,y){const w=e.wordSeparators;if(!g&&e.simpleSearch){const I=e.simpleSearch,P=I.length,O=n.length;let W=-P;for(;(W=n.indexOf(I,W+P))!==-1;)if((!w||JHe(w,n,O,W,P))&&(f[d++]=new jte(new at(s,W+1+l,s,W+1+P+l),null),d>=y))return d;return d}let x;i.reset(0);do if(x=i.next(n),x&&(f[d++]=A5(new at(s,x.index+1+l,s,x.index+1+x[0].length+l),x,g),d>=y))return d;while(x);return d}insert(e,i,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==tl){const{node:s,remainder:l,nodeStartOffset:d}=this.nodeAt(e),f=s.piece,g=f.bufferIndex,y=this.positionInBuffer(s,l);if(s.piece.bufferIndex===0&&f.end.line===this._lastChangeBufferPos.line&&f.end.column===this._lastChangeBufferPos.column&&d+f.length===e&&i.lengthe){const w=[];let x=new LC(f.bufferIndex,y,f.end,this.getLineFeedCnt(f.bufferIndex,y,f.end),this.offsetInBuffer(g,f.end)-this.offsetInBuffer(g,y));if(this.shouldCheckCRLF()&&this.endWithCR(i)&&this.nodeCharCodeAt(s,l)===10){const W={line:x.start.line+1,column:0};x=new LC(x.bufferIndex,W,x.end,this.getLineFeedCnt(x.bufferIndex,W,x.end),x.length-1),i+=` +`}if(this.shouldCheckCRLF()&&this.startWithLF(i))if(this.nodeCharCodeAt(s,l-1)===13){const W=this.positionInBuffer(s,l-1);this.deleteNodeTail(s,W),i="\r"+i,s.piece.length===0&&w.push(s)}else this.deleteNodeTail(s,y);else this.deleteNodeTail(s,y);const I=this.createNewPieces(i);x.length>0&&this.rbInsertRight(s,x);let P=s;for(let O=0;O=0;d--)l=this.rbInsertLeft(l,s[d]);this.validateCRLFWithPrevNode(l),this.deleteNodes(n)}insertContentToNodeRight(e,i){this.adjustCarriageReturnFromNext(e,i)&&(e+=` +`);const n=this.createNewPieces(e),s=this.rbInsertRight(i,n[0]);let l=s;for(let d=1;d=I)y=x+1;else break;return n?(n.line=x,n.column=g-P,null):{line:x,column:g-P}}getLineFeedCnt(e,i,n){if(n.column===0)return n.line-i.line;const s=this._buffers[e].lineStarts;if(n.line===s.length-1)return n.line-i.line;const l=s[n.line+1],d=s[n.line]+n.column;if(l>d+1)return n.line-i.line;const f=d-1;return this._buffers[e].buffer.charCodeAt(f)===13?n.line-i.line+1:n.line-i.line}offsetInBuffer(e,i){return this._buffers[e].lineStarts[i.line]+i.column}deleteNodes(e){for(let i=0;iJA){const w=[];for(;e.length>JA;){const I=e.charCodeAt(JA-1);let P;I===13||I>=55296&&I<=56319?(P=e.substring(0,JA-1),e=e.substring(JA-1)):(P=e.substring(0,JA),e=e.substring(JA));const O=i4(P);w.push(new LC(this._buffers.length,{line:0,column:0},{line:O.length-1,column:P.length-O[O.length-1]},O.length-1,P.length)),this._buffers.push(new V5(P,O))}const x=i4(e);return w.push(new LC(this._buffers.length,{line:0,column:0},{line:x.length-1,column:e.length-x[x.length-1]},x.length-1,e.length)),this._buffers.push(new V5(e,x)),w}let i=this._buffers[0].buffer.length;const n=i4(e,!1);let s=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===i&&i!==0&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},s=this._lastChangeBufferPos;for(let w=0;w=e-1)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt>e-1){const g=this.getAccumulatedValue(n,e-n.lf_left-2),y=this.getAccumulatedValue(n,e-n.lf_left-1),w=this._buffers[n.piece.bufferIndex].buffer,x=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return d+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:d,nodeStartLineNumber:f-(e-1-n.lf_left)}),w.substring(x+g,x+y-i)}else if(n.lf_left+n.piece.lineFeedCnt===e-1){const g=this.getAccumulatedValue(n,e-n.lf_left-2),y=this._buffers[n.piece.bufferIndex].buffer,w=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);s=y.substring(w+g,w+n.piece.length);break}else e-=n.lf_left+n.piece.lineFeedCnt,d+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==tl;){const d=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){const f=this.getAccumulatedValue(n,0),g=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return s+=d.substring(g,g+f-i),s}else{const f=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);s+=d.substr(f,n.piece.length)}n=n.next()}return s}computeBufferMetadata(){let e=this.root,i=1,n=0;for(;e!==tl;)i+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=i,this._length=n,this._searchCache.validate(this._length)}getIndexOf(e,i){const n=e.piece,s=this.positionInBuffer(e,i),l=s.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===i){const d=this.getLineFeedCnt(e.piece.bufferIndex,n.start,s);if(d!==l)return{index:d,remainder:0}}return{index:l,remainder:s.column}}getAccumulatedValue(e,i){if(i<0)return 0;const n=e.piece,s=this._buffers[n.bufferIndex].lineStarts,l=n.start.line+i+1;return l>n.end.line?s[n.end.line]+n.end.column-s[n.start.line]-n.start.column:s[l]-s[n.start.line]-n.start.column}deleteNodeTail(e,i){const n=e.piece,s=n.lineFeedCnt,l=this.offsetInBuffer(n.bufferIndex,n.end),d=i,f=this.offsetInBuffer(n.bufferIndex,d),g=this.getLineFeedCnt(n.bufferIndex,n.start,d),y=g-s,w=f-l,x=n.length+w;e.piece=new LC(n.bufferIndex,n.start,d,g,x),t4(this,e,w,y)}deleteNodeHead(e,i){const n=e.piece,s=n.lineFeedCnt,l=this.offsetInBuffer(n.bufferIndex,n.start),d=i,f=this.getLineFeedCnt(n.bufferIndex,d,n.end),g=this.offsetInBuffer(n.bufferIndex,d),y=f-s,w=l-g,x=n.length+w;e.piece=new LC(n.bufferIndex,d,n.end,f,x),t4(this,e,w,y)}shrinkNode(e,i,n){const s=e.piece,l=s.start,d=s.end,f=s.length,g=s.lineFeedCnt,y=i,w=this.getLineFeedCnt(s.bufferIndex,s.start,y),x=this.offsetInBuffer(s.bufferIndex,i)-this.offsetInBuffer(s.bufferIndex,l);e.piece=new LC(s.bufferIndex,s.start,y,w,x),t4(this,e,x-f,w-g);const I=new LC(s.bufferIndex,n,d,this.getLineFeedCnt(s.bufferIndex,n,d),this.offsetInBuffer(s.bufferIndex,d)-this.offsetInBuffer(s.bufferIndex,n)),P=this.rbInsertRight(e,I);this.validateCRLFWithPrevNode(P)}appendToNode(e,i){this.adjustCarriageReturnFromNext(i,e)&&(i+=` +`);const n=this.shouldCheckCRLF()&&this.startWithLF(i)&&this.endWithCR(e),s=this._buffers[0].buffer.length;this._buffers[0].buffer+=i;const l=i4(i,!1);for(let P=0;Pe)i=i.left;else if(i.size_left+i.piece.length>=e){s+=i.size_left;const l={node:i,remainder:e-i.size_left,nodeStartOffset:s};return this._searchCache.set(l),l}else e-=i.size_left+i.piece.length,s+=i.size_left+i.piece.length,i=i.right;return null}nodeAt2(e,i){let n=this.root,s=0;for(;n!==tl;)if(n.left!==tl&&n.lf_left>=e-1)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt>e-1){const l=this.getAccumulatedValue(n,e-n.lf_left-2),d=this.getAccumulatedValue(n,e-n.lf_left-1);return s+=n.size_left,{node:n,remainder:Math.min(l+i-1,d),nodeStartOffset:s}}else if(n.lf_left+n.piece.lineFeedCnt===e-1){const l=this.getAccumulatedValue(n,e-n.lf_left-2);if(l+i-1<=n.piece.length)return{node:n,remainder:l+i-1,nodeStartOffset:s};i-=n.piece.length-l;break}else e-=n.lf_left+n.piece.lineFeedCnt,s+=n.size_left+n.piece.length,n=n.right;for(n=n.next();n!==tl;){if(n.piece.lineFeedCnt>0){const l=this.getAccumulatedValue(n,0),d=this.offsetOfNode(n);return{node:n,remainder:Math.min(i-1,l),nodeStartOffset:d}}else if(n.piece.length>=i-1){const l=this.offsetOfNode(n);return{node:n,remainder:i-1,nodeStartOffset:l}}else i-=n.piece.length;n=n.next()}return null}nodeCharCodeAt(e,i){if(e.piece.lineFeedCnt<1)return-1;const n=this._buffers[e.piece.bufferIndex],s=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+i;return n.buffer.charCodeAt(s)}offsetOfNode(e){if(!e)return 0;let i=e.size_left;for(;e!==this.root;)e.parent.right===e&&(i+=e.parent.size_left+e.parent.piece.length),e=e.parent;return i}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===` +`)}startWithLF(e){if(typeof e=="string")return e.charCodeAt(0)===10;if(e===tl||e.piece.lineFeedCnt===0)return!1;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,s=i.start.line,l=n[s]+i.start.column;return s===n.length-1||n[s+1]>l+1?!1:this._buffers[i.bufferIndex].buffer.charCodeAt(l)===10}endWithCR(e){return typeof e=="string"?e.charCodeAt(e.length-1)===13:e===tl||e.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(e,e.piece.length-1)===13}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const i=e.prev();this.endWithCR(i)&&this.fixCRLF(i,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const i=e.next();this.startWithLF(i)&&this.fixCRLF(e,i)}}fixCRLF(e,i){const n=[],s=this._buffers[e.piece.bufferIndex].lineStarts;let l;e.piece.end.column===0?l={line:e.piece.end.line-1,column:s[e.piece.end.line]-s[e.piece.end.line-1]-1}:l={line:e.piece.end.line,column:e.piece.end.column-1};const d=e.piece.length-1,f=e.piece.lineFeedCnt-1;e.piece=new LC(e.piece.bufferIndex,e.piece.start,l,f,d),t4(this,e,-1,-1),e.piece.length===0&&n.push(e);const g={line:i.piece.start.line+1,column:0},y=i.piece.length-1,w=this.getLineFeedCnt(i.piece.bufferIndex,g,i.piece.end);i.piece=new LC(i.piece.bufferIndex,g,i.piece.end,w,y),t4(this,i,-1,-1),i.piece.length===0&&n.push(i);const x=this.createNewPieces(`\r +`);this.rbInsertRight(e,x[0]);for(let I=0;IX.sortIndex-Z.sortIndex)}this._mightContainRTL=s,this._mightContainUnusualLineTerminators=l,this._mightContainNonBasicASCII=d;const P=this._doApplyEdits(g);let O=null;if(i&&x.length>0){x.sort((W,X)=>X.lineNumber-W.lineNumber),O=[];for(let W=0,X=x.length;W0&&x[W-1].lineNumber===Z)continue;const ee=x[W].oldContent,he=this.getLineContent(Z);he.length===0||he===ee||T1(he)!==-1||O.push(Z)}}return this._onDidChangeContent.fire(),new goi(I,P,O)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let i=!1;const n=e[0].range,s=e[e.length-1].range,l=new at(n.startLineNumber,n.startColumn,s.endLineNumber,s.endColumn);let d=n.startLineNumber,f=n.startColumn;const g=[];for(let P=0,O=e.length;P0&&g.push(W.text),d=X.endLineNumber,f=X.endColumn}const y=g.join(""),[w,x,I]=sR(y);return{sortIndex:0,identifier:e[0].identifier,range:l,rangeOffset:this.getOffsetAt(l.startLineNumber,l.startColumn),rangeLength:this.getValueLengthInRange(l,0),text:y,eolCount:w,firstLineLength:x,lastLineLength:I,forceMoveMarkers:i,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(OU._sortOpsDescending);const i=[];for(let n=0;n0){const I=g.eolCount+1;I===1?x=new at(y,w,y,w+g.firstLineLength):x=new at(y,w,y+I-1,g.lastLineLength+1)}else x=new at(y,w,y,w);n=x.endLineNumber,s=x.endColumn,i.push(x),l=g}return i}static _sortOpsAscending(e,i){const n=at.compareRangesUsingEnds(e.range,i.range);return n===0?e.sortIndex-i.sortIndex:n}static _sortOpsDescending(e,i){const n=at.compareRangesUsingEnds(e.range,i.range);return n===0?i.sortIndex-e.sortIndex:-n}}class yhi{constructor(e,i,n,s,l,d,f,g,y){this._chunks=e,this._bom=i,this._cr=n,this._lf=s,this._crlf=l,this._containsRTL=d,this._containsUnusualLineTerminators=f,this._isBasicASCII=g,this._normalizeEOL=y}_getEOL(e){const i=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return i===0?e===1?` +`:`\r +`:n>i/2?`\r +`:` +`}create(e){const i=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&(i===`\r +`&&(this._cr>0||this._lf>0)||i===` +`&&(this._cr>0||this._crlf>0)))for(let l=0,d=n.length;l=55296&&i<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=i):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=i)}_acceptChunk1(e,i){!i&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const i=phi(this._tmpLineStarts,e);this.chunks.push(new V5(e,i.lineStarts)),this.cr+=i.cr,this.lf+=i.lf,this.crlf+=i.crlf,i.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=GU(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=Zbt(e)))}finish(e=!0){return this._finish(),new yhi(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const i=i4(e.buffer);e.lineStarts=i,this._previousChar===13&&this.cr++}}}class bhi{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=i}replace(e,i,n){if(e>=this._store.length)return;if(i===0){this.insert(e,n);return}else if(n===0){this.delete(e,i);return}const s=this._store.slice(0,e),l=this._store.slice(e+i),d=Chi(n,this._default);this._store=s.concat(d,l)}delete(e,i){i===0||e>=this._store.length||this._store.splice(e,i)}insert(e,i){if(i===0||e>=this._store.length)return;const n=[];for(let s=0;s0){const n=this._tokens[this._tokens.length-1];if(n.endLineNumber+1===e){n.appendLineTokens(i);return}}this._tokens.push(new Shi(e,[i]))}finalize(){return this._tokens}}class whi{constructor(e,i){this.tokenizationSupport=i,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new L9e(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}}class xhi extends whi{constructor(e,i,n,s){super(e,i),this._textModel=n,this._languageIdCodec=s}updateTokensUntilLine(e,i){const n=this._textModel.getLanguageId();for(;;){const s=this.getFirstInvalidLine();if(!s||s.lineNumber>i)break;const l=this._textModel.getLineContent(s.lineNumber),d=iee(this._languageIdCodec,n,this.tokenizationSupport,l,!0,s.startState);e.add(s.lineNumber,d.tokens),this.store.setEndState(s.lineNumber,d.endState)}}getTokenTypeIfInsertingCharacter(e,i){const n=this.getStartState(e.lineNumber);if(!n)return 0;const s=this._textModel.getLanguageId(),l=this._textModel.getLineContent(e.lineNumber),d=l.substring(0,e.column-1)+i+l.substring(e.column-1),f=iee(this._languageIdCodec,s,this.tokenizationSupport,d,!0,n),g=new vp(f.tokens,d,this._languageIdCodec);if(g.getCount()===0)return 0;const y=g.findTokenIndexAtOffset(e.column-1);return g.getStandardTokenType(y)}tokenizeLineWithEdit(e,i,n){const s=e.lineNumber,l=e.column,d=this.getStartState(s);if(!d)return null;const f=this._textModel.getLineContent(s),g=f.substring(0,l-1)+n+f.substring(l-1+i),y=this._textModel.getLanguageIdAtPosition(s,0),w=iee(this._languageIdCodec,y,this.tokenizationSupport,g,!0,d);return new vp(w.tokens,g,this._languageIdCodec)}hasAccurateTokensForLine(e){const i=this.store.getFirstInvalidEndStateLineNumberOrMax();return e1&&f>=1;f--){const g=this._textModel.getLineFirstNonWhitespaceColumn(f);if(g!==0&&g0&&n>0&&(n--,i--),this._lineEndStates.replace(e.startLineNumber,n,i)}}class Thi{constructor(){this._ranges=[]}get min(){return this._ranges.length===0?null:this._ranges[0].start}delete(e){const i=this._ranges.findIndex(n=>n.contains(e));if(i!==-1){const n=this._ranges[i];n.start===e?n.endExclusive===e+1?this._ranges.splice(i,1):this._ranges[i]=new gl(e+1,n.endExclusive):n.endExclusive===e+1?this._ranges[i]=new gl(n.start,e):this._ranges.splice(i,1,new gl(n.start,e),new gl(e+1,n.endExclusive))}}addRange(e){gl.addRange(e,this._ranges)}addRangeAndResize(e,i){let n=0;for(;!(n>=this._ranges.length||e.start<=this._ranges[n].endExclusive);)n++;let s=n;for(;!(s>=this._ranges.length||e.endExclusivee.toString()).join(" + ")}}function iee(c,e,i,n,s,l){let d=null;if(i)try{d=i.tokenizeEncoded(n,s,l.clone())}catch(f){Ba(f)}return d||(d=nye(c.encodeLanguageId(e),l)),vp.convertToEndOffset(d.tokens,n.length),d}class Dhi{constructor(e,i){this._tokenizerWithStateStore=e,this._backgroundTokenStore=i,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,sCt(e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)}))}_backgroundTokenizeWithDeadline(e){const i=Date.now()+e.timeRemaining(),n=()=>{this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()1||this._tokenizeOneInvalidLine(i)>=e)break;while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(i.finalize()),this.checkFinished()}_hasLinesToTokenize(){return this._tokenizerWithStateStore?!this._tokenizerWithStateStore.store.allStatesValid():!1}_tokenizeOneInvalidLine(e){var i;const n=(i=this._tokenizerWithStateStore)===null||i===void 0?void 0:i.getFirstInvalidLine();return n?(this._tokenizerWithStateStore.updateTokensUntilLine(e,n.lineNumber),n.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,i){this._tokenizerWithStateStore.store.invalidateEndStateRange(new cl(e,i))}}const n4=new Uint32Array(0).buffer;class FN{static deleteBeginning(e,i){return e===null||e===n4?e:FN.delete(e,0,i)}static deleteEnding(e,i){if(e===null||e===n4)return e;const n=p4(e),s=n[n.length-2];return FN.delete(e,i,s)}static delete(e,i,n){if(e===null||e===n4||i===n)return e;const s=p4(e),l=s.length>>>1;if(i===0&&s[s.length-2]===n)return n4;const d=vp.findIndexInTokensArray(s,i),f=d>0?s[d-1<<1]:0,g=s[d<<1];if(nw&&(s[y++]=O,s[y++]=s[(P<<1)+1],w=O)}if(y===s.length)return e;const I=new Uint32Array(y);return I.set(s.subarray(0,y),0),I.buffer}static append(e,i){if(i===n4)return e;if(e===n4)return i;if(e===null)return e;if(i===null)return null;const n=p4(e),s=p4(i),l=s.length>>>1,d=new Uint32Array(n.length+s.length);d.set(n,0);let f=n.length;const g=n[n.length-2];for(let y=0;y>>1;let d=vp.findIndexInTokensArray(s,i);d>0&&s[d-1<<1]===i&&d--;for(let f=d;f0}getTokens(e,i,n){let s=null;if(i1&&(l=P0.getLanguageId(s[1])!==e),!l)return n4}if(!s||s.length===0){const l=new Uint32Array(2);return l[0]=i,l[1]=b0t(e),l.buffer}return s[s.length-2]=i,s.byteOffset===0&&s.byteLength===s.buffer.byteLength?s.buffer:s}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,i){i!==0&&(e+i>this._len&&(i=this._len-e),this._lineTokens.splice(e,i),this._len-=i)}_insertLines(e,i){if(i===0)return;const n=[];for(let s=0;s=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[i]=FN.delete(this._lineTokens[i],e.startColumn-1,e.endColumn-1);return}this._lineTokens[i]=FN.deleteEnding(this._lineTokens[i],e.startColumn-1);const n=e.endLineNumber-1;let s=null;n=this._len)){if(i===0){this._lineTokens[s]=FN.insert(this._lineTokens[s],e.column-1,n);return}this._lineTokens[s]=FN.deleteEnding(this._lineTokens[s],e.column-1),this._lineTokens[s]=FN.insert(this._lineTokens[s],e.column-1,n),this._insertLines(e.lineNumber,i)}}setMultilineTokens(e,i){if(e.length===0)return{changes:[]};const n=[];for(let s=0,l=e.length;s>>0}class Pje{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(e,i){this._pieces=e||[],this._isComplete=i}setPartial(e,i){let n=e;if(i.length>0){const l=i[0].getRange(),d=i[i.length-1].getRange();if(!l||!d)return e;n=e.plusRange(l).plusRange(d)}let s=null;for(let l=0,d=this._pieces.length;ln.endLineNumber){s=s||{index:l};break}if(f.removeTokens(n),f.isEmpty()){this._pieces.splice(l,1),l--,d--;continue}if(f.endLineNumbern.endLineNumber){s=s||{index:l};continue}const[g,y]=f.split(n);if(g.isEmpty()){s=s||{index:l};continue}y.isEmpty()||(this._pieces.splice(l,1,g,y),l++,d++,s=s||{index:l})}return s=s||{index:this._pieces.length},i.length>0&&(this._pieces=N1e(this._pieces,s.index,i)),n}isComplete(){return this._isComplete}addSparseTokens(e,i){if(i.getLineContent().length===0)return i;const n=this._pieces;if(n.length===0)return i;const s=Pje._findFirstPieceWithLine(n,e),l=n[s].getLineTokens(e);if(!l)return i;const d=i.getCount(),f=l.getCount();let g=0;const y=[];let w=0,x=0;const I=(P,O)=>{P!==x&&(x=P,y[w++]=P,y[w++]=O)};for(let P=0;P>>0,ee=~Z>>>0;for(;gi)s=l-1;else{for(;l>n&&e[l-1].startLineNumber<=i&&i<=e[l-1].endLineNumber;)l--;return l}}return n}acceptEdit(e,i,n,s,l){for(const d of this._pieces)d.acceptEdit(e,i,n,s,l)}}class lve extends YSt{constructor(e,i,n,s,l,d){super(),this._languageService=e,this._languageConfigurationService=i,this._textModel=n,this._bracketPairsTextModelPart=s,this._languageId=l,this._attachedViews=d,this._semanticTokens=new Pje(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new ui),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new ui),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new ui),this.onDidChangeTokens=this._onDidChangeTokens.event,this.grammarTokens=this._register(new Ehi(this._languageService.languageIdCodec,this._textModel,()=>this._languageId,this._attachedViews)),this._register(this._languageConfigurationService.onDidChange(f=>{f.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._register(this.grammarTokens.onDidChangeTokens(f=>{this._emitModelTokensChangedEvent(f)})),this._register(this.grammarTokens.onDidChangeBackgroundTokenizationState(f=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const i of e.changes){const[n,s,l]=sR(i.text);this._semanticTokens.acceptEdit(i.range,n,s,l,i.text.length>0?i.text.charCodeAt(0):0)}this.grammarTokens.handleDidChangeContent(e)}handleDidChangeAttached(){this.grammarTokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const i=this.grammarTokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,i)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new Yu("Illegal value for lineNumber")}get hasTokens(){return this.grammarTokens.hasTokens}resetTokenization(){this.grammarTokens.resetTokenization()}get backgroundTokenizationState(){return this.grammarTokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this.grammarTokens.forceTokenization(e)}hasAccurateTokensForLine(e){return this.validateLineNumber(e),this.grammarTokens.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this.grammarTokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this.grammarTokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,i,n){return this.grammarTokens.getTokenTypeIfInsertingCharacter(e,i,n)}tokenizeLineWithEdit(e,i,n){return this.grammarTokens.tokenizeLineWithEdit(e,i,n)}setSemanticTokens(e,i){this._semanticTokens.set(e,i),this._emitModelTokensChangedEvent({semanticTokensApplied:e!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,i){if(this.hasCompleteSemanticTokens())return;const n=this._textModel.validateRange(this._semanticTokens.setPartial(e,i));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const i=this._textModel.validatePosition(e),n=this._textModel.getLineContent(i.lineNumber),s=this.getLineTokens(i.lineNumber),l=s.findTokenIndexAtOffset(i.column-1),[d,f]=lve._findLanguageBoundaries(s,l),g=Lte(i.column,this.getLanguageConfiguration(s.getLanguageId(l)).getWordDefinition(),n.substring(d,f),d);if(g&&g.startColumn<=e.column&&e.column<=g.endColumn)return g;if(l>0&&d===i.column-1){const[y,w]=lve._findLanguageBoundaries(s,l-1),x=Lte(i.column,this.getLanguageConfiguration(s.getLanguageId(l-1)).getWordDefinition(),n.substring(y,w),y);if(x&&x.startColumn<=e.column&&e.column<=x.endColumn)return x}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,i){const n=e.getLanguageId(i);let s=0;for(let d=i;d>=0&&e.getLanguageId(d)===n;d--)s=e.getStartOffset(d);let l=e.getLineContent().length;for(let d=i,f=e.getCount();d{const d=this.getLanguageId();l.changedLanguages.indexOf(d)!==-1&&this.resetTokenization()})),this.resetTokenization(),this._register(s.onDidChangeVisibleRanges(({view:l,state:d})=>{if(d){let f=this._attachedViewStates.get(l);f||(f=new Ihi(()=>this.refreshRanges(f.lineRanges)),this._attachedViewStates.set(l,f)),f.handleStateChange(d)}else this._attachedViewStates.deleteAndDispose(l)}))}resetTokenization(e=!0){var i;this._tokens.flush(),(i=this._debugBackgroundTokens)===null||i===void 0||i.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new L9e(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const n=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const d=Nh.get(this.getLanguageId());if(!d)return[null,null];let f;try{f=d.getInitialState()}catch(g){return Ba(g),[null,null]}return[d,f]},[s,l]=n();if(s&&l?this._tokenizer=new xhi(this._textModel.getLineCount(),s,this._textModel,this._languageIdCodec):this._tokenizer=null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const d={setTokens:f=>{this.setTokens(f)},backgroundTokenizationFinished:()=>{if(this._backgroundTokenizationState===2)return;const f=2;this._backgroundTokenizationState=f,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(f,g)=>{var y;if(!this._tokenizer)return;const w=this._tokenizer.store.getFirstInvalidEndStateLineNumber();w!==null&&f>=w&&((y=this._tokenizer)===null||y===void 0||y.store.setEndState(f,g))}};s&&s.createBackgroundTokenizer&&!s.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=s.createBackgroundTokenizer(this._textModel,d)),!this._backgroundTokenizer.value&&!this._textModel.isTooLargeForTokenization()&&(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new Dhi(this._tokenizer,d),this._defaultBackgroundTokenizer.handleChanges()),s!=null&&s.backgroundTokenizerShouldOnlyVerifyTokens&&s.createBackgroundTokenizer?(this._debugBackgroundTokens=new cie(this._languageIdCodec),this._debugBackgroundStates=new L9e(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=s.createBackgroundTokenizer(this._textModel,{setTokens:f=>{var g;(g=this._debugBackgroundTokens)===null||g===void 0||g.setMultilineTokens(f,this._textModel)},backgroundTokenizationFinished(){},setEndState:(f,g)=>{var y;(y=this._debugBackgroundStates)===null||y===void 0||y.setEndState(f,g)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){var e;(e=this._defaultBackgroundTokenizer)===null||e===void 0||e.handleChanges()}handleDidChangeContent(e){var i,n,s;if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const l of e.changes){const[d,f]=sR(l.text);this._tokens.acceptEdit(l.range,d,f),(i=this._debugBackgroundTokens)===null||i===void 0||i.acceptEdit(l.range,d,f)}(n=this._debugBackgroundStates)===null||n===void 0||n.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),(s=this._defaultBackgroundTokenizer)===null||s===void 0||s.handleChanges()}}setTokens(e){const{changes:i}=this._tokens.setMultilineTokens(e,this._textModel);return i.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:i}),{changes:i}}refreshAllVisibleLineTokens(){const e=cl.joinMany([...this._attachedViewStates].map(([i,n])=>n.lineRanges));this.refreshRanges(e)}refreshRanges(e){for(const i of e)this.refreshRange(i.startLineNumber,i.endLineNumberExclusive-1)}refreshRange(e,i){var n,s;if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),i=Math.min(this._textModel.getLineCount(),i);const l=new N9e,{heuristicTokens:d}=this._tokenizer.tokenizeHeuristically(l,e,i),f=this.setTokens(l.finalize());if(d)for(const g of f.changes)(n=this._backgroundTokenizer.value)===null||n===void 0||n.requestTokens(g.fromLineNumber,g.toLineNumber+1);(s=this._defaultBackgroundTokenizer)===null||s===void 0||s.checkFinished()}forceTokenization(e){var i,n;const s=new N9e;(i=this._tokenizer)===null||i===void 0||i.updateTokensUntilLine(s,e),this.setTokens(s.finalize()),(n=this._defaultBackgroundTokenizer)===null||n===void 0||n.checkFinished()}hasAccurateTokensForLine(e){return this._tokenizer?this._tokenizer.hasAccurateTokensForLine(e):!0}isCheapToTokenize(e){return this._tokenizer?this._tokenizer.isCheapToTokenize(e):!0}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){var i;const n=this._textModel.getLineContent(e),s=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,n);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const l=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,n);!s.equals(l)&&(!((i=this._debugBackgroundTokenizer.value)===null||i===void 0)&&i.reportMismatchingTokens)&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return s}getTokenTypeIfInsertingCharacter(e,i,n){if(!this._tokenizer)return 0;const s=this._textModel.validatePosition(new yi(e,i));return this.forceTokenization(s.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(s,n)}tokenizeLineWithEdit(e,i,n){if(!this._tokenizer)return null;const s=this._textModel.validatePosition(e);return this.forceTokenization(s.lineNumber),this._tokenizer.tokenizeLineWithEdit(s,i,n)}get hasTokens(){return this._tokens.hasTokens}}class Ihi extends Ii{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new id(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){ch(this._computedLineRanges,this._lineRanges,(e,i)=>e.equals(i))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}const mye=Kl("undoRedoService");class Swt{constructor(e,i){this.resource=e,this.elements=i}}class lq{constructor(){this.id=lq._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}lq._ID=0;lq.None=new lq;class $N{constructor(){this.id=$N._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}$N._ID=0;$N.None=new $N;var Nhi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},m7e=function(c,e){return function(i,n){e(i,n,c)}},D5;function Lhi(c){const e=new Cwt;return e.acceptChunk(c),e.finish()}function Phi(c){const e=new Cwt;let i;for(;typeof(i=c.read())=="string";)e.acceptChunk(i);return e.finish()}function C0t(c,e){let i;return typeof c=="string"?i=Lhi(c):_oi(c)?i=Phi(c):i=c,i.create(e)}let Bge=0;const Ahi=999,Ohi=1e4;class Mhi{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let i=0,n=0;do{const s=this._source.read();if(s===null)return this._eos=!0,i===0?null:e.join("");if(s.length>0&&(e[i++]=s,n+=s.length),n>=64*1024)return e.join("")}while(!0)}}const nee=()=>{throw new Error("Invalid change accessor")};let pL=D5=class extends Ii{static resolveOptions(e,i){if(i.detectIndentation){const n=f0t(e,i.tabSize,i.insertSpaces);return new qme({tabSize:n.tabSize,indentSize:"tabSize",insertSpaces:n.insertSpaces,trimAutoWhitespace:i.trimAutoWhitespace,defaultEOL:i.defaultEOL,bracketPairColorizationOptions:i.bracketPairColorizationOptions})}return new qme(i)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent(i=>e(i.contentChangedEvent))}onDidChangeContentOrInjectedText(e){return dT(this._eventEmitter.fastEvent(i=>e(i)),this._onDidChangeInjectedText.event(i=>e(i)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,i,n,s=null,l,d,f){super(),this._undoRedoService=l,this._languageService=d,this._languageConfigurationService=f,this._onWillDispose=this._register(new ui),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Hhi(P=>this.handleBeforeFireDecorationsChangedEvent(P))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new ui),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new ui),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new ui),this._eventEmitter=this._register(new jhi),this._languageSelectionListener=this._register(new jg),this._deltaDecorationCallCnt=0,this._attachedViews=new zhi,Bge++,this.id="$model"+Bge,this.isForSimpleWidget=n.isForSimpleWidget,typeof s>"u"||s===null?this._associatedResource=Oo.parse("inmemory://model/"+Bge):this._associatedResource=s,this._attachedEditorCount=0;const{textBuffer:g,disposable:y}=C0t(e,n.defaultEOL);this._buffer=g,this._bufferDisposable=y,this._options=D5.resolveOptions(this._buffer,n);const w=typeof i=="string"?i:i.languageId;typeof i!="string"&&(this._languageSelectionListener.value=i.onDidChange(()=>this._setLanguage(i.languageId))),this._bracketPairs=this._register(new Vfi(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new Adi(this,this._languageConfigurationService)),this._decorationProvider=this._register(new jfi(this)),this._tokenizationTextModelPart=new lve(this._languageService,this._languageConfigurationService,this,this._bracketPairs,w,this._attachedViews);const x=this._buffer.getLineCount(),I=this._buffer.getValueLengthInRange(new at(1,1,x,this._buffer.getLineLength(x)+1),0);n.largeFileOptimizations?(this._isTooLargeForTokenization=I>D5.LARGE_FILE_SIZE_THRESHOLD||x>D5.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=I>D5.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=I>D5._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=Ybt(Bge),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new S0t,this._commandManager=new Eje(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})),this._languageService.requestRichLanguageFeatures(w)}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new OU([],"",` +`,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=Ii.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,i){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(i),this._bracketPairs.handleDidChangeContent(i),this._eventEmitter.fire(new s9(e,i)))}setValue(e){if(this._assertNotDisposed(),e==null)throw nk();const{textBuffer:i,disposable:n}=C0t(e,this._options.defaultEOL);this._setValueFromTextBuffer(i,n)}_createContentChanged2(e,i,n,s,l,d,f,g){return{changes:[{range:e,rangeOffset:i,rangeLength:n,text:s}],eol:this._buffer.getEOL(),isEolChange:g,versionId:this.getVersionId(),isUndoing:l,isRedoing:d,isFlush:f}}_setValueFromTextBuffer(e,i){this._assertNotDisposed();const n=this.getFullModelRange(),s=this.getValueLengthInRange(n),l=this.getLineCount(),d=this.getLineMaxColumn(l);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=i,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new S0t,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new LU([new dfi],this._versionId,!1,!1),this._createContentChanged2(new at(1,1,l,d),0,s,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const i=e===1?`\r +`:` +`;if(this._buffer.getEOL()===i)return;const n=this.getFullModelRange(),s=this.getValueLengthInRange(n),l=this.getLineCount(),d=this.getLineMaxColumn(l);this._onBeforeEOLChange(),this._buffer.setEOL(i),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new LU([new _fi],this._versionId,!1,!1),this._createContentChanged2(new at(1,1,l,d),0,s,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),i=this._decorationsTree.collectNodesPostOrder();for(let n=0,s=i.length;n0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,i=0;const n=this._buffer.getLineCount();for(let s=1;s<=n;s++){const l=this._buffer.getLineLength(s);l>=Ohi?i+=l:e+=l}return i>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const i=typeof e.tabSize<"u"?e.tabSize:this._options.tabSize,n=typeof e.indentSize<"u"?e.indentSize:this._options.originalIndentSize,s=typeof e.insertSpaces<"u"?e.insertSpaces:this._options.insertSpaces,l=typeof e.trimAutoWhitespace<"u"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,d=typeof e.bracketColorizationOptions<"u"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,f=new qme({tabSize:i,indentSize:n,insertSpaces:s,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:l,bracketPairColorizationOptions:d});if(this._options.equals(f))return;const g=this._options.createChangeEvent(f);this._options=f,this._bracketPairs.handleDidChangeOptions(g),this._decorationProvider.handleDidChangeOptions(g),this._onDidChangeOptions.fire(g)}detectIndentation(e,i){this._assertNotDisposed();const n=f0t(this._buffer,i,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),gje(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const i=this.findMatches(Xbt.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,i.map(n=>({range:n.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const i=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(i.lineNumber,i.column)}getPositionAt(e){this._assertNotDisposed();const i=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(i)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,i=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new Yu("Operation would exceed heap memory limits");const n=this.getFullModelRange(),s=this.getValueInRange(n,e);return i?this._buffer.getBOM()+s:s}createSnapshot(e=!1){return new Mhi(this._buffer.createSnapshot(e))}getValueLength(e,i=!1){this._assertNotDisposed();const n=this.getFullModelRange(),s=this.getValueLengthInRange(n,e);return i?this._buffer.getBOM().length+s:s}getValueInRange(e,i=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),i)}getValueLengthInRange(e,i=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),i)}getCharacterCountInRange(e,i=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),i)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Yu("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Yu("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new Yu("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===` +`?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Yu("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Yu("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Yu("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const i=this._buffer.getLineCount(),n=e.startLineNumber,s=e.startColumn;let l=Math.floor(typeof n=="number"&&!isNaN(n)?n:1),d=Math.floor(typeof s=="number"&&!isNaN(s)?s:1);if(l<1)l=1,d=1;else if(l>i)l=i,d=this.getLineMaxColumn(l);else if(d<=1)d=1;else{const x=this.getLineMaxColumn(l);d>=x&&(d=x)}const f=e.endLineNumber,g=e.endColumn;let y=Math.floor(typeof f=="number"&&!isNaN(f)?f:1),w=Math.floor(typeof g=="number"&&!isNaN(g)?g:1);if(y<1)y=1,w=1;else if(y>i)y=i,w=this.getLineMaxColumn(y);else if(w<=1)w=1;else{const x=this.getLineMaxColumn(y);w>=x&&(w=x)}return n===l&&s===d&&f===y&&g===w&&e instanceof at&&!(e instanceof Qs)?e:new at(l,d,y,w)}_isValidPosition(e,i,n){if(typeof e!="number"||typeof i!="number"||isNaN(e)||isNaN(i)||e<1||i<1||(e|0)!==e||(i|0)!==i)return!1;const s=this._buffer.getLineCount();if(e>s)return!1;if(i===1)return!0;const l=this.getLineMaxColumn(e);if(i>l)return!1;if(n===1){const d=this._buffer.getLineCharCode(e,i-2);if(Bg(d))return!1}return!0}_validatePosition(e,i,n){const s=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),l=Math.floor(typeof i=="number"&&!isNaN(i)?i:1),d=this._buffer.getLineCount();if(s<1)return new yi(1,1);if(s>d)return new yi(d,this.getLineMaxColumn(d));if(l<=1)return new yi(s,1);const f=this.getLineMaxColumn(s);if(l>=f)return new yi(s,f);if(n===1){const g=this._buffer.getLineCharCode(s,l-2);if(Bg(g))return new yi(s,l-1)}return new yi(s,l)}validatePosition(e){return this._assertNotDisposed(),e instanceof yi&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,i){const n=e.startLineNumber,s=e.startColumn,l=e.endLineNumber,d=e.endColumn;if(!this._isValidPosition(n,s,0)||!this._isValidPosition(l,d,0))return!1;if(i===1){const f=s>1?this._buffer.getLineCharCode(n,s-2):0,g=d>1&&d<=this._buffer.getLineLength(l)?this._buffer.getLineCharCode(l,d-2):0,y=Bg(f),w=Bg(g);return!y&&!w}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof at&&!(e instanceof Qs)&&this._isValidRange(e,1))return e;const n=this._validatePosition(e.startLineNumber,e.startColumn,0),s=this._validatePosition(e.endLineNumber,e.endColumn,0),l=n.lineNumber,d=n.column,f=s.lineNumber,g=s.column;{const y=d>1?this._buffer.getLineCharCode(l,d-2):0,w=g>1&&g<=this._buffer.getLineLength(f)?this._buffer.getLineCharCode(f,g-2):0,x=Bg(y),I=Bg(w);return!x&&!I?new at(l,d,f,g):l===f&&d===g?new at(l,d-1,f,g-1):x&&I?new at(l,d-1,f,g+1):x?new at(l,d-1,f,g):new at(l,d,f,g+1)}}modifyPosition(e,i){this._assertNotDisposed();const n=this.getOffsetAt(e)+i;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new at(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,i,n,s){return this._buffer.findMatchesLineByLine(e,i,n,s)}findMatches(e,i,n,s,l,d,f=Ahi){this._assertNotDisposed();let g=null;i!==null&&(Array.isArray(i)||(i=[i]),i.every(x=>at.isIRange(x))&&(g=i.map(x=>this.validateRange(x)))),g===null&&(g=[this.getFullModelRange()]),g=g.sort((x,I)=>x.startLineNumber-I.startLineNumber||x.startColumn-I.startColumn);const y=[];y.push(g.reduce((x,I)=>at.areIntersecting(x,I)?x.plusRange(I):(y.push(x),I)));let w;if(!n&&e.indexOf(` +`)<0){const I=new T5(e,n,s,l).parseSearchRequest();if(!I)return[];w=P=>this.findMatchesLineByLine(P,I,d,f)}else w=x=>bge.findMatches(this,new T5(e,n,s,l),x,d,f);return y.map(w).reduce((x,I)=>x.concat(I),[])}findNextMatch(e,i,n,s,l,d){this._assertNotDisposed();const f=this.validatePosition(i);if(!n&&e.indexOf(` +`)<0){const y=new T5(e,n,s,l).parseSearchRequest();if(!y)return null;const w=this.getLineCount();let x=new at(f.lineNumber,f.column,w,this.getLineMaxColumn(w)),I=this.findMatchesLineByLine(x,y,d,1);return bge.findNextMatch(this,new T5(e,n,s,l),f,d),I.length>0||(x=new at(1,1,f.lineNumber,this.getLineMaxColumn(f.lineNumber)),I=this.findMatchesLineByLine(x,y,d,1),I.length>0)?I[0]:null}return bge.findNextMatch(this,new T5(e,n,s,l),f,d)}findPreviousMatch(e,i,n,s,l,d){this._assertNotDisposed();const f=this.validatePosition(i);return bge.findPreviousMatch(this,new T5(e,n,s,l),f,d)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if((this.getEOL()===` +`?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof K8e?e:new K8e(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const i=[];for(let n=0,s=e.length;n({range:this.validateRange(f.range),text:f.text}));let d=!0;if(e)for(let f=0,g=e.length;fy.endLineNumber,W=y.startLineNumber>P.endLineNumber;if(!O&&!W){w=!0;break}}if(!w){d=!1;break}}if(d)for(let f=0,g=this._trimAutoWhitespaceLines.length;fO.endLineNumber)&&!(y===O.startLineNumber&&O.startColumn===w&&O.isEmpty()&&W&&W.length>0&&W.charAt(0)===` +`)&&!(y===O.startLineNumber&&O.startColumn===1&&O.isEmpty()&&W&&W.length>0&&W.charAt(W.length-1)===` +`)){x=!1;break}}if(x){const I=new at(y,1,y,w);i.push(new K8e(null,I,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,i,n,s)}_applyUndo(e,i,n,s){const l=e.map(d=>{const f=this.getPositionAt(d.newPosition),g=this.getPositionAt(d.newEnd);return{range:new at(f.lineNumber,f.column,g.lineNumber,g.column),text:d.oldText}});this._applyUndoRedoEdits(l,i,!0,!1,n,s)}_applyRedo(e,i,n,s){const l=e.map(d=>{const f=this.getPositionAt(d.oldPosition),g=this.getPositionAt(d.oldEnd);return{range:new at(f.lineNumber,f.column,g.lineNumber,g.column),text:d.newText}});this._applyUndoRedoEdits(l,i,!1,!0,n,s)}_applyUndoRedoEdits(e,i,n,s,l,d){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=s,this.applyEdits(e,!1),this.setEOL(i),this._overwriteAlternativeVersionId(l)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(d),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,i=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const n=this._validateEditOperations(e);return this._doApplyEdits(n,i)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,i){const n=this._buffer.getLineCount(),s=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,i),l=this._buffer.getLineCount(),d=s.changes;if(this._trimAutoWhitespaceLines=s.trimAutoWhitespaceLineNumbers,d.length!==0){for(let y=0,w=d.length;y=0;Nt--){const Ni=P+Nt,ci=he+Nt;vt.takeFromEndWhile(pi=>pi.lineNumber>ci);const Mt=vt.takeFromEndWhile(pi=>pi.lineNumber===ci);f.push(new n0t(Ni,this.getLineContent(ci),Mt))}if(Zao.lineNumberao.lineNumber===Ri)}f.push(new hfi(Ni+1,P+X,gn,pi))}g+=ee}this._emitContentChangedEvent(new LU(f,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:d,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return s.reverseEdits===null?void 0:s.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(e===null||e.size===0)return;const n=Array.from(e).map(s=>new n0t(s,this.getLineContent(s),this._getInjectedTextInLine(s)));this._onDidChangeInjectedText.fire(new iwt(n))}changeDecorations(e,i=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(i,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,i){const n={addDecoration:(l,d)=>this._deltaDecorationsImpl(e,[],[{range:l,options:d}])[0],changeDecoration:(l,d)=>{this._changeDecorationImpl(l,d)},changeDecorationOptions:(l,d)=>{this._changeDecorationOptionsImpl(l,x0t(d))},removeDecoration:l=>{this._deltaDecorationsImpl(e,[l],[])},deltaDecorations:(l,d)=>l.length===0&&d.length===0?[]:this._deltaDecorationsImpl(e,l,d)};let s=null;try{s=i(n)}catch(l){Ba(l)}return n.addDecoration=nee,n.changeDecoration=nee,n.changeDecorationOptions=nee,n.removeDecoration=nee,n.deltaDecorations=nee,s}deltaDecorations(e,i,n=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&i.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),Ba(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,i)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,i,n){const s=e?this._decorations[e]:null;if(!s)return i?this._deltaDecorationsImpl(0,[],[{range:i,options:w0t[n]}],!0)[0]:null;if(!i)return this._decorationsTree.delete(s),delete this._decorations[s.id],null;const l=this._validateRangeRelaxedNoAllocations(i),d=this._buffer.getOffsetAt(l.startLineNumber,l.startColumn),f=this._buffer.getOffsetAt(l.endLineNumber,l.endColumn);return this._decorationsTree.delete(s),s.reset(this.getVersionId(),d,f,l),s.setOptions(w0t[n]),this._decorationsTree.insert(s),s.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const i=this._decorationsTree.collectNodesFromOwner(e);for(let n=0,s=i.length;nthis.getLineCount()?[]:this.getLinesDecorations(e,e,i,n)}getLinesDecorations(e,i,n=0,s=!1,l=!1){const d=this.getLineCount(),f=Math.min(d,Math.max(1,e)),g=Math.min(d,Math.max(1,i)),y=this.getLineMaxColumn(g),w=new at(f,1,g,y),x=this._getDecorationsInRange(w,n,s,l);return PFe(x,this._decorationProvider.getDecorationsInRange(w,n,s)),x}getDecorationsInRange(e,i=0,n=!1,s=!1,l=!1){const d=this.validateRange(e),f=this._getDecorationsInRange(d,i,n,l);return PFe(f,this._decorationProvider.getDecorationsInRange(d,i,n,s)),f}getOverviewRulerDecorations(e=0,i=!1){return this._decorationsTree.getAll(this,e,i,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const i=this._buffer.getOffsetAt(e,1),n=i+this._buffer.getLineLength(e),s=this._decorationsTree.getInjectedTextInInterval(this,i,n,0);return LE.fromDecorations(s).filter(l=>l.lineNumber===e)}getAllDecorations(e=0,i=!1){let n=this._decorationsTree.getAll(this,e,i,!1,!1);return n=n.concat(this._decorationProvider.getAllDecorations(e,i)),n}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,i,n,s){const l=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),d=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,l,d,i,n,s)}getRangeAt(e,i){return this._buffer.getRangeAt(e,i-e)}_changeDecorationImpl(e,i){const n=this._decorations[e];if(!n)return;if(n.options.after){const f=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(f.endLineNumber)}if(n.options.before){const f=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(f.startLineNumber)}const s=this._validateRangeRelaxedNoAllocations(i),l=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),d=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),l,d,s),this._decorationsTree.insert(n),this._onDidChangeDecorations.checkAffectedAndFire(n.options),n.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(s.endLineNumber),n.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(s.startLineNumber)}_changeDecorationOptionsImpl(e,i){const n=this._decorations[e];if(!n)return;const s=!!(n.options.overviewRuler&&n.options.overviewRuler.color),l=!!(i.overviewRuler&&i.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(n.options),this._onDidChangeDecorations.checkAffectedAndFire(i),n.options.after||i.after){const g=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(g.endLineNumber)}if(n.options.before||i.before){const g=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(g.startLineNumber)}const d=s!==l,f=Fhi(i)!==e0e(n);d||f?(this._decorationsTree.delete(n),n.setOptions(i),this._decorationsTree.insert(n)):n.setOptions(i)}_deltaDecorationsImpl(e,i,n,s=!1){const l=this.getVersionId(),d=i.length;let f=0;const g=n.length;let y=0;this._onDidChangeDecorations.beginDeferredEmit();try{const w=new Array(g);for(;fthis._setLanguage(e.languageId,i)),this._setLanguage(e.languageId,i))}_setLanguage(e,i){this.tokenization.setLanguageId(e,i),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,i){return this.tokenization.getLanguageIdAtPosition(e,i)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,i){return e}getLineIndentColumn(e){return Rhi(this.getLineContent(e))+1}};pL._MODEL_SYNC_LIMIT=50*1024*1024;pL.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024;pL.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3;pL.LARGE_FILE_HEAP_OPERATION_THRESHOLD=256*1024*1024;pL.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:mv.tabSize,indentSize:mv.indentSize,insertSpaces:mv.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:mv.trimAutoWhitespace,largeFileOptimizations:mv.largeFileOptimizations,bracketPairColorizationOptions:mv.bracketPairColorizationOptions};pL=D5=Nhi([m7e(4,mye),m7e(5,If),m7e(6,Kd)],pL);function Rhi(c){let e=0;for(const i of c)if(i===" "||i===" ")e++;else break;return e}function v7e(c){return!!(c.options.overviewRuler&&c.options.overviewRuler.color)}function Fhi(c){return!!c.after||!!c.before}function e0e(c){return!!c.options.after||!!c.options.before}class S0t{constructor(){this._decorationsTree0=new _7e,this._decorationsTree1=new _7e,this._injectedTextDecorationsTree=new _7e}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,i){for(const n of i)n.range===null&&(n.range=e.getRangeAt(n.cachedAbsoluteStart,n.cachedAbsoluteEnd));return i}getAllInInterval(e,i,n,s,l,d){const f=e.getVersionId(),g=this._intervalSearch(i,n,s,l,f,d);return this._ensureNodesHaveRanges(e,g)}_intervalSearch(e,i,n,s,l,d){const f=this._decorationsTree0.intervalSearch(e,i,n,s,l,d),g=this._decorationsTree1.intervalSearch(e,i,n,s,l,d),y=this._injectedTextDecorationsTree.intervalSearch(e,i,n,s,l,d);return f.concat(g).concat(y)}getInjectedTextInInterval(e,i,n,s){const l=e.getVersionId(),d=this._injectedTextDecorationsTree.intervalSearch(i,n,s,!1,l,!1);return this._ensureNodesHaveRanges(e,d).filter(f=>f.options.showIfCollapsed||!f.range.isEmpty())}getAllInjectedText(e,i){const n=e.getVersionId(),s=this._injectedTextDecorationsTree.search(i,!1,n,!1);return this._ensureNodesHaveRanges(e,s).filter(l=>l.options.showIfCollapsed||!l.range.isEmpty())}getAll(e,i,n,s,l){const d=e.getVersionId(),f=this._search(i,n,s,d,l);return this._ensureNodesHaveRanges(e,f)}_search(e,i,n,s,l){if(n)return this._decorationsTree1.search(e,i,s,l);{const d=this._decorationsTree0.search(e,i,s,l),f=this._decorationsTree1.search(e,i,s,l),g=this._injectedTextDecorationsTree.search(e,i,s,l);return d.concat(f).concat(g)}}collectNodesFromOwner(e){const i=this._decorationsTree0.collectNodesFromOwner(e),n=this._decorationsTree1.collectNodesFromOwner(e),s=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return i.concat(n).concat(s)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),i=this._decorationsTree1.collectNodesPostOrder(),n=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(i).concat(n)}insert(e){e0e(e)?this._injectedTextDecorationsTree.insert(e):v7e(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){e0e(e)?this._injectedTextDecorationsTree.delete(e):v7e(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,i){const n=e.getVersionId();return i.cachedVersionId!==n&&this._resolveNode(i,n),i.range===null&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd)),i.range}_resolveNode(e,i){e0e(e)?this._injectedTextDecorationsTree.resolveNode(e,i):v7e(e)?this._decorationsTree1.resolveNode(e,i):this._decorationsTree0.resolveNode(e,i)}acceptReplace(e,i,n,s){this._decorationsTree0.acceptReplace(e,i,n,s),this._decorationsTree1.acceptReplace(e,i,n,s),this._injectedTextDecorationsTree.acceptReplace(e,i,n,s)}}function SN(c){return c.replace(/[^a-z0-9\-_]/gi," ")}class wwt{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class Bhi extends wwt{constructor(e){super(e),this._resolvedColor=null,this.position=typeof e.position=="number"?e.position:ww.Center}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,i){if(typeof e=="string")return e;const n=e?i.getColor(e.id):null;return n?n.toString():""}}class Whi{constructor(e){var i;this.position=(i=e==null?void 0:e.position)!==null&&i!==void 0?i:fL.Center,this.persistLane=e==null?void 0:e.persistLane}}class Vhi extends wwt{constructor(e){var i,n;super(e),this.position=e.position,this.sectionHeaderStyle=(i=e.sectionHeaderStyle)!==null&&i!==void 0?i:null,this.sectionHeaderText=(n=e.sectionHeaderText)!==null&&n!==void 0?n:null}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,i){return typeof e=="string"?Qi.fromHex(e):i.getColor(e.id)}}class lR{static from(e){return e instanceof lR?e:new lR(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class Xa{static register(e){return new Xa(e)}static createDynamic(e){return new Xa(e)}constructor(e){var i,n,s,l,d,f;this.description=e.description,this.blockClassName=e.blockClassName?SN(e.blockClassName):null,this.blockDoesNotCollapse=(i=e.blockDoesNotCollapse)!==null&&i!==void 0?i:null,this.blockIsAfterEnd=(n=e.blockIsAfterEnd)!==null&&n!==void 0?n:null,this.blockPadding=(s=e.blockPadding)!==null&&s!==void 0?s:null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?SN(e.className):null,this.shouldFillLineOnLineBreak=(l=e.shouldFillLineOnLineBreak)!==null&&l!==void 0?l:null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new Bhi(e.overviewRuler):null,this.minimap=e.minimap?new Vhi(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new Whi(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?SN(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?SN(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?SN(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?Qii(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?SN(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?SN(e.marginClassName):null,this.inlineClassName=e.inlineClassName?SN(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?SN(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?SN(e.afterContentClassName):null,this.after=e.after?lR.from(e.after):null,this.before=e.before?lR.from(e.before):null,this.hideInCommentTokens=(d=e.hideInCommentTokens)!==null&&d!==void 0?d:!1,this.hideInStringTokens=(f=e.hideInStringTokens)!==null&&f!==void 0?f:!1}}Xa.EMPTY=Xa.register({description:"empty"});const w0t=[Xa.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Xa.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Xa.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Xa.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function x0t(c){return c instanceof Xa?c:Xa.createDynamic(c)}class Hhi extends Ii{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new ui),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;this._deferredCnt--,this._deferredCnt===0&&(this._shouldFireDeferred&&this.doFire(),(e=this._affectedInjectedTextLines)===null||e===void 0||e.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){var i,n;this._affectsMinimap||(this._affectsMinimap=!!(!((i=e.minimap)===null||i===void 0)&&i.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(!((n=e.overviewRuler)===null||n===void 0)&&n.color)),this._affectsGlyphMargin||(this._affectsGlyphMargin=!!e.glyphMarginClassName),this._affectsLineNumber||(this._affectsLineNumber=!!e.lineNumberClassName),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){this._deferredCnt===0?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class jhi extends Ii{constructor(){super(),this._fastEmitter=this._register(new ui),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new ui),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const i=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(i),this._slowEmitter.fire(i)}}fire(e){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e;return}this._fastEmitter.fire(e),this._slowEmitter.fire(e)}}class zhi{constructor(){this._onDidChangeVisibleRanges=new ui,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new Uhi(i=>{this._onDidChangeVisibleRanges.fire({view:e,state:i})});return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class Uhi{constructor(e){this.handleStateChange=e}setVisibleLines(e,i){const n=e.map(s=>new cl(s.startLineNumber,s.endLineNumber+1));this.handleStateChange({visibleLineRanges:n,stabilized:i})}}class Aje{static create(e){return new Aje(e.get(134),e.get(133))}constructor(e,i){this.classifier=new qhi(e,i)}createLineBreaksComputer(e,i,n,s,l){const d=[],f=[],g=[];return{addRequest:(y,w,x)=>{d.push(y),f.push(w),g.push(x)},finalize:()=>{const y=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,w=[];for(let x=0,I=d.length;x=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let P9e=[],A9e=[];function $hi(c,e,i,n,s,l,d,f){if(s===-1)return null;const g=i.length;if(g<=1)return null;const y=f==="keepAll",w=e.breakOffsets,x=e.breakOffsetsVisibleColumn,I=xwt(i,n,s,l,d),P=s-I,O=P9e,W=A9e;let X=0,Z=0,ee=0,he=s;const we=w.length;let Te=0;if(Te>=0){let Be=Math.abs(x[Te]-he);for(;Te+1=Be)break;Be=Me,Te++}}for(;TeBe&&(Be=Z,Me=ee);let vt=0,Nt=0,Ni=0,ci=0;if(Me<=he){let pi=Me,gn=Be===0?0:i.charCodeAt(Be-1),$n=Be===0?0:c.get(gn),Ri=!0;for(let ao=Be;aoZ&&O9e(gn,$n,Yt,na,y)&&(vt=Xs,Nt=pi),pi+=Is,pi>he){Xs>Z?(Ni=Xs,ci=pi-Is):(Ni=ao+1,ci=pi),pi-Nt>P&&(vt=0),Ri=!1;break}gn=Yt,$n=na}if(Ri){X>0&&(O[X]=w[w.length-1],W[X]=x[w.length-1],X++);break}}if(vt===0){let pi=Me,gn=i.charCodeAt(Be),$n=c.get(gn),Ri=!1;for(let ao=Be-1;ao>=Z;ao--){const Xs=ao+1,Yt=i.charCodeAt(ao);if(Yt===9){Ri=!0;break}let na,Is;if(g9(Yt)?(ao--,na=0,Is=2):(na=c.get(Yt),Is=eR(Yt)?l:1),pi<=he){if(Ni===0&&(Ni=Xs,ci=pi),pi<=he-P)break;if(O9e(Yt,na,gn,$n,y)){vt=Xs,Nt=pi;break}}pi-=Is,gn=Yt,$n=na}if(vt!==0){const ao=P-(ci-Nt);if(ao<=n){const Xs=i.charCodeAt(Ni);let Yt;Bg(Xs)?Yt=2:Yt=ute(Xs,ci,n,l),ao-Yt<0&&(vt=0)}}if(Ri){Te--;continue}}if(vt===0&&(vt=Ni,Nt=ci),vt<=Z){const pi=i.charCodeAt(Z);Bg(pi)?(vt=Z+2,Nt=ee+2):(vt=Z+1,Nt=ee+ute(pi,ee,n,l))}for(Z=vt,O[X]=vt,ee=Nt,W[X]=Nt,X++,he=Nt+P;Te<0||Te=Mt)break;Mt=pi,Te++}}return X===0?null:(O.length=X,W.length=X,P9e=e.breakOffsets,A9e=e.breakOffsetsVisibleColumn,e.breakOffsets=O,e.breakOffsetsVisibleColumn=W,e.wrappedTextIndentLength=I,e)}function Jhi(c,e,i,n,s,l,d,f){const g=LE.applyInjectedText(e,i);let y,w;if(i&&i.length>0?(y=i.map(Nt=>Nt.options),w=i.map(Nt=>Nt.column-1)):(y=null,w=null),s===-1)return y?new ste(w,y,[g.length],[],0):null;const x=g.length;if(x<=1)return y?new ste(w,y,[g.length],[],0):null;const I=f==="keepAll",P=xwt(g,n,s,l,d),O=s-P,W=[],X=[];let Z=0,ee=0,he=0,we=s,Te=g.charCodeAt(0),Be=c.get(Te),Me=ute(Te,0,n,l),vt=1;Bg(Te)&&(Me+=1,Te=g.charCodeAt(1),Be=c.get(Te),vt++);for(let Nt=vt;Ntwe&&((ee===0||Me-he>O)&&(ee=Ni,he=Me-pi),W[Z]=ee,X[Z]=he,Z++,we=he+O,ee=0),Te=ci,Be=Mt}return Z===0&&(!i||i.length===0)?null:(W[Z]=x,X[Z]=Me,new ste(w,y,W,X,P))}function ute(c,e,i,n){return c===9?i-e%i:eR(c)||c<32?n:1}function k0t(c,e){return e-c%e}function O9e(c,e,i,n,s){return i!==32&&(e===2&&n!==2||e!==1&&n===1||!s&&e===3&&n!==2||!s&&n===3&&e!==1)}function xwt(c,e,i,n,s){let l=0;if(s!==0){const d=T1(c);if(d!==-1){for(let g=0;gi&&(l=0)}}return l}class cve{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new e0(new at(1,1,1,1),0,0,new yi(1,1),0),new e0(new at(1,1,1,1),0,0,new yi(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new Pc(this.modelState,this.viewState)}readSelectionFromMarkers(e){const i=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!i.isEmpty()?Qs.fromRange(i.collapseToEnd(),this.modelState.selection.getDirection()):Qs.fromRange(i,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,i,n){this._setState(e,i,n)}static _validatePositionWithCache(e,i,n,s){return i.equals(n)?s:e.normalizePosition(i,2)}static _validateViewState(e,i){const n=i.position,s=i.selectionStart.getStartPosition(),l=i.selectionStart.getEndPosition(),d=e.normalizePosition(n,2),f=this._validatePositionWithCache(e,s,n,d),g=this._validatePositionWithCache(e,l,s,f);return n.equals(d)&&s.equals(f)&&l.equals(g)?i:new e0(at.fromPositions(f,g),i.selectionStartKind,i.selectionStartLeftoverVisibleColumns+s.column-f.column,d,i.leftoverVisibleColumns+n.column-d.column)}_setState(e,i,n){if(n&&(n=cve._validateViewState(e.viewModel,n)),i){const s=e.model.validateRange(i.selectionStart),l=i.selectionStart.equalsRange(s)?i.selectionStartLeftoverVisibleColumns:0,d=e.model.validatePosition(i.position),f=i.position.equals(d)?i.leftoverVisibleColumns:0;i=new e0(s,i.selectionStartKind,l,d,f)}else{if(!n)return;const s=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(n.selectionStart)),l=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(n.position));i=new e0(s,n.selectionStartKind,n.selectionStartLeftoverVisibleColumns,l,n.leftoverVisibleColumns)}if(n){const s=e.coordinatesConverter.validateViewRange(n.selectionStart,i.selectionStart),l=e.coordinatesConverter.validateViewPosition(n.position,i.position);n=new e0(s,i.selectionStartKind,i.selectionStartLeftoverVisibleColumns,l,i.leftoverVisibleColumns)}else{const s=e.coordinatesConverter.convertModelPositionToViewPosition(new yi(i.selectionStart.startLineNumber,i.selectionStart.startColumn)),l=e.coordinatesConverter.convertModelPositionToViewPosition(new yi(i.selectionStart.endLineNumber,i.selectionStart.endColumn)),d=new at(s.lineNumber,s.column,l.lineNumber,l.column),f=e.coordinatesConverter.convertModelPositionToViewPosition(i.position);n=new e0(d,i.selectionStartKind,i.selectionStartLeftoverVisibleColumns,f,i.leftoverVisibleColumns)}this.modelState=i,this.viewState=n,this._updateTrackedRange(e)}}class T0t{constructor(e){this.context=e,this.cursors=[new cve(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(e=>e.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(e=>e.asCursorState())}getViewPositions(){return this.cursors.map(e=>e.viewState.position)}getTopMostViewPosition(){return koi(this.cursors,kb(e=>e.viewState.position,yi.compare)).viewState.position}getBottomMostViewPosition(){return xoi(this.cursors,kb(e=>e.viewState.position,yi.compare)).viewState.position}getSelections(){return this.cursors.map(e=>e.modelState.selection)}getViewSelections(){return this.cursors.map(e=>e.viewState.selection)}setSelections(e){this.setStates(Pc.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){e!==null&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const i=this.cursors.length-1,n=e.length;if(in){const s=i-n;for(let l=0;l=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(this.cursors.length===1)return;const e=this.cursors.slice(0),i=[];for(let n=0,s=e.length;nn.selection,at.compareRangesUsingStarts));for(let n=0;nx&&W.index--;e.splice(x,1),i.splice(w,1),this._removeSecondaryCursor(x-1),n--}}}}class D0t{constructor(e,i,n,s){this._cursorContextBrand=void 0,this.model=e,this.viewModel=i,this.coordinatesConverter=n,this.cursorConfig=s}}class Ghi{constructor(){this.type=0}}class Khi{constructor(){this.type=1}}class Qhi{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class Xhi{constructor(e,i,n){this.selections=e,this.modelSelections=i,this.reason=n,this.type=3}}class _5{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin,this.affectsLineNumber=e.affectsLineNumber):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0,this.affectsLineNumber=!0)}}class Wge{constructor(){this.type=5}}class Zhi{constructor(e){this.type=6,this.isFocused=e}}class Yhi{constructor(){this.type=7}}class Vge{constructor(){this.type=8}}class kwt{constructor(e,i){this.fromLineNumber=e,this.count=i,this.type=9}}class M9e{constructor(e,i){this.type=10,this.fromLineNumber=e,this.toLineNumber=i}}class R9e{constructor(e,i){this.type=11,this.fromLineNumber=e,this.toLineNumber=i}}class dte{constructor(e,i,n,s,l,d,f){this.source=e,this.minimalReveal=i,this.range=n,this.selections=s,this.verticalType=l,this.revealHorizontal=d,this.scrollType=f,this.type=12}}class e_i{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class t_i{constructor(e){this.theme=e,this.type=14}}class i_i{constructor(e){this.type=15,this.ranges=e}}class n_i{constructor(){this.type=16}}let r_i=class{constructor(){this.type=17}};class s_i extends Ii{constructor(){super(),this._onEvent=this._register(new ui),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let i=0,n=this._outgoingEvents.length;i0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let i=0,n=this._eventHandlers.length;i0&&this._emitMany(i)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const i=this._eventHandlers.slice(0);for(const n of i)n.handleEvents(e)}}}class o_i{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class Oje{constructor(e,i,n,s){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=i,this.contentWidth=n,this.contentHeight=s,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new Oje(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class Mje{constructor(e,i){this.kind=1,this.oldHasFocus=e,this.hasFocus=i}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new Mje(this.oldHasFocus,e.hasFocus)}}class Rje{constructor(e,i,n,s,l,d,f,g){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=i,this._oldScrollHeight=n,this._oldScrollTop=s,this.scrollWidth=l,this.scrollLeft=d,this.scrollHeight=f,this.scrollTop=g,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(e){return e.kind!==this.kind?null:new Rje(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class a_i{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class l_i{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class uve{constructor(e,i,n,s,l,d,f){this.kind=6,this.oldSelections=e,this.selections=i,this.oldModelVersionId=n,this.modelVersionId=s,this.source=l,this.reason=d,this.reachedMaxCursorCount=f}static _selectionsAreEqual(e,i){if(!e&&!i)return!0;if(!e||!i)return!1;const n=e.length,s=i.length;if(n!==s)return!1;for(let l=0;l0){const e=this._cursors.getSelections();for(let i=0;id&&(s=s.slice(0,d),l=!0);const f=fte.from(this._model,this);return this._cursors.setStates(s),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,i,n,f,l)}setCursorColumnSelectData(e){this._columnSelectData=e}revealAll(e,i,n,s,l,d){const f=this._cursors.getViewPositions();let g=null,y=null;f.length>1?y=this._cursors.getViewSelections():g=at.fromPositions(f[0],f[0]),e.emitViewEvent(new dte(i,n,g,y,s,l,d))}revealPrimary(e,i,n,s,l,d){const g=[this._cursors.getPrimaryCursor().viewState.selection];e.emitViewEvent(new dte(i,n,null,g,s,l,d))}saveState(){const e=[],i=this._cursors.getSelections();for(let n=0,s=i.length;n0){const l=Pc.fromModelSelections(n.resultingSelection);this.setStates(e,"modelChange",n.isUndoing?5:n.isRedoing?6:2,l)&&this.revealAll(e,"modelChange",!1,0,!0,0)}else{const l=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,Pc.fromModelSelections(l))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),i=e.viewState.selectionStart.getStartPosition(),n=e.viewState.position;return{isReal:!1,fromViewLineNumber:i.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i),toViewLineNumber:n.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,n)}}getSelections(){return this._cursors.getSelections()}setSelections(e,i,n,s){this.setStates(e,i,s,Pc.fromModelSelections(n))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,i){const n=[],s=[];for(let f=0,g=e.length;f0&&this._pushAutoClosedAction(n,s),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){(!e||e.length===0)&&(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,i,n,s,l){const d=fte.from(this._model,this);if(d.equals(s))return!1;const f=this._cursors.getSelections(),g=this._cursors.getViewSelections();if(e.emitViewEvent(new Xhi(g,f,n)),!s||s.cursorState.length!==d.cursorState.length||d.cursorState.some((y,w)=>!y.modelState.equals(s.cursorState[w].modelState))){const y=s?s.cursorState.map(x=>x.modelState.selection):null,w=s?s.modelVersionId:0;e.emitOutgoingEvent(new uve(y,f,w,d.modelVersionId,i||"keyboard",n,l))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const i=[];for(let n=0,s=e.length;n=0)return null;const d=l.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!d)return null;const f=d[1],g=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(f);if(!g||g.length!==1)return null;const y=g[0].open,w=l.text.length-d[2].length-1,x=l.text.lastIndexOf(y,w-1);if(x===-1)return null;i.push([x,w])}return i}executeEdits(e,i,n,s){let l=null;i==="snippet"&&(l=this._findAutoClosingPairs(n)),l&&(n[0]._isTracked=!0);const d=[],f=[],g=this._model.pushEditOperations(this.getSelections(),n,y=>{if(l)for(let x=0,I=l.length;x0&&this._pushAutoClosedAction(d,f)}_executeEdit(e,i,n,s=0){if(this.context.cursorConfig.readOnly)return;const l=fte.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(d){Ba(d)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(i,n,s,l,!1)&&this.revealAll(i,n,!1,0,!0,0)}getAutoClosedCharacters(){return E0t.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new hte(this._model,this.getSelections())}endComposition(e,i){const n=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{i==="keyboard"&&this._executeEditOperation(lh.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,n,this.getSelections(),this.getAutoClosedCharacters()))},e,i)}type(e,i,n){this._executeEdit(()=>{if(n==="keyboard"){const s=i.length;let l=0;for(;l{const y=g.getPosition();return new Qs(y.lineNumber,y.column+l,y.lineNumber,y.column+l)});this.setSelections(e,d,f,0)}return}this._executeEdit(()=>{this._executeEditOperation(lh.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),i,n,s,l))},e,d)}paste(e,i,n,s,l){this._executeEdit(()=>{this._executeEditOperation(lh.paste(this.context.cursorConfig,this._model,this.getSelections(),i,n,s||[]))},e,l,4)}cut(e,i){this._executeEdit(()=>{this._executeEditOperation(w9.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,i)}executeCommand(e,i,n){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new mb(0,[i],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}executeCommands(e,i,n){this._executeEdit(()=>{this._executeEditOperation(new mb(0,i,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}}class fte{static from(e,i){return new fte(e.getVersionId(),i.getCursorStates())}constructor(e,i){this.modelVersionId=e,this.cursorState=i}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let i=0,n=this.cursorState.length;i=i.length||!i[n].strictContainsRange(e[n]))return!1;return!0}}class m_i{static executeCommands(e,i,n){const s={model:e,selectionsBefore:i,trackedRanges:[],trackedRangesDirection:[]},l=this._innerExecuteCommands(s,n);for(let d=0,f=s.trackedRanges.length;d0&&(d[0]._isTracked=!0);let f=e.model.pushEditOperations(e.selectionsBefore,d,y=>{const w=[];for(let P=0;PP.identifier.minor-O.identifier.minor,I=[];for(let P=0;P0?(w[P].sort(x),I[P]=i[P].computeCursorState(e.model,{getInverseEditOperations:()=>w[P],getTrackedSelection:O=>{const W=parseInt(O,10),X=e.model._getTrackedRange(e.trackedRanges[W]);return e.trackedRangesDirection[W]===0?new Qs(X.startLineNumber,X.startColumn,X.endLineNumber,X.endColumn):new Qs(X.endLineNumber,X.endColumn,X.startLineNumber,X.startColumn)}})):I[P]=e.selectionsBefore[P];return I});f||(f=e.selectionsBefore);const g=[];for(const y in l)l.hasOwnProperty(y)&&g.push(parseInt(y,10));g.sort((y,w)=>w-y);for(const y of g)f.splice(y,1);return f}static _arrayIsEmpty(e){for(let i=0,n=e.length;i{at.isEmpty(x)&&I===""||s.push({identifier:{major:i,minor:l++},range:x,text:I,forceMoveMarkers:P,isAutoWhitespaceEdit:n.insertsAutoWhitespace})};let f=!1;const w={addEditOperation:d,addTrackedEditOperation:(x,I,P)=>{f=!0,d(x,I,P)},trackSelection:(x,I)=>{const P=Qs.liftSelection(x);let O;if(P.isEmpty())if(typeof I=="boolean")I?O=2:O=3;else{const Z=e.model.getLineMaxColumn(P.startLineNumber);P.startColumn===Z?O=2:O=3}else O=1;const W=e.trackedRanges.length,X=e.model._setTrackedRange(null,P,O);return e.trackedRanges[W]=X,e.trackedRangesDirection[W]=P.getDirection(),W.toString()}};try{n.getEditOperations(e.model,w)}catch(x){return Ba(x),{operations:[],hadTrackedEditOperation:!1}}return{operations:s,hadTrackedEditOperation:f}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((n,s)=>-at.compareRangesUsingEnds(n.range,s.range));const i={};for(let n=1;nl.identifier.major?d=s.identifier.major:d=l.identifier.major,i[d.toString()]=!0;for(let f=0;f0&&n--}}return i}}class v_i{constructor(e,i,n){this.text=e,this.startSelection=i,this.endSelection=n}}class hte{static _capture(e,i){const n=[];for(const s of i){if(s.startLineNumber!==s.endLineNumber)return null;n.push(new v_i(e.getLineContent(s.startLineNumber),s.startColumn-1,s.endColumn-1))}return n}constructor(e,i){this._original=hte._capture(e,i)}deduceOutcome(e,i){if(!this._original)return null;const n=hte._capture(e,i);if(!n||this._original.length!==n.length)return null;const s=[];for(let l=0,d=this._original.length;leq,tokenizeEncoded:(c,e,i)=>nye(0,i)};async function y_i(c,e,i){if(!i)return N0t(e,c.languageIdCodec,I0t);const n=await Nh.getOrCreate(i);return N0t(e,c.languageIdCodec,n||I0t)}function b_i(c,e,i,n,s,l,d){let f="
",g=n,y=0,w=!0;for(let x=0,I=e.getCount();x0;)d&&w?(O+=" ",w=!1):(O+=" ",w=!0),X--;break}case 60:O+="<",w=!1;break;case 62:O+=">",w=!1;break;case 38:O+="&",w=!1;break;case 0:O+="�",w=!1;break;case 65279:case 8232:case 8233:case 133:O+="�",w=!1;break;case 13:O+="​",w=!1;break;case 32:d&&w?(O+=" ",w=!1):(O+=" ",w=!0);break;default:O+=String.fromCharCode(W),w=!1}}if(f+=`${O}`,P>s||g>=s)break}return f+="
",f}function N0t(c,e,i){let n='
';const s=wL(c);let l=i.getInitialState();for(let d=0,f=s.length;d0&&(n+="
");const y=i.tokenizeEncoded(g,!0,l);vp.convertToEndOffset(y.tokens,g.length);const x=new vp(y.tokens,g,e).inflate();let I=0;for(let P=0,O=x.getCount();P${Gee(g.substring(I,X))}`,I=X}l=y.endState}return n+="
",n}class C_i{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const i=this._inserts,n=this._changes,s=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(i,n,s)}}class S_i{constructor(e,i,n,s,l){this.id=e,this.afterLineNumber=i,this.ordinal=n,this.height=s,this.minWidth=l,this.prefixSum=0}}let Twt=class F9e{constructor(e,i,n,s){this._instanceId=Ybt(++F9e.INSTANCE_COUNT),this._pendingChanges=new C_i,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=i,this._paddingTop=n,this._paddingBottom=s}static findInsertionIndex(e,i,n){let s=0,l=e.length;for(;s>>1;i===e[d].afterLineNumber?n{i=!0,s=s|0,l=l|0,d=d|0,f=f|0;const g=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new S_i(g,s,l,d,f)),g},changeOneWhitespace:(s,l,d)=>{i=!0,l=l|0,d=d|0,this._pendingChanges.change({id:s,newAfterLineNumber:l,newHeight:d})},removeWhitespace:s=>{i=!0,this._pendingChanges.remove({id:s})}})}finally{this._pendingChanges.commit(this)}return i}_commitPendingChanges(e,i,n){if((e.length>0||n.length>0)&&(this._minWidth=-1),e.length+i.length+n.length<=1){for(const g of e)this._insertWhitespace(g);for(const g of i)this._changeOneWhitespace(g.id,g.newAfterLineNumber,g.newHeight);for(const g of n){const y=this._findWhitespaceIndex(g.id);y!==-1&&this._removeWhitespace(y)}return}const s=new Set;for(const g of n)s.add(g.id);const l=new Map;for(const g of i)l.set(g.id,g);const d=g=>{const y=[];for(const w of g)if(!s.has(w.id)){if(l.has(w.id)){const x=l.get(w.id);w.afterLineNumber=x.newAfterLineNumber,w.height=x.newHeight}y.push(w)}return y},f=d(this._arr).concat(d(e));f.sort((g,y)=>g.afterLineNumber===y.afterLineNumber?g.ordinal-y.ordinal:g.afterLineNumber-y.afterLineNumber),this._arr=f,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const i=F9e.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(i,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,i-1)}_findWhitespaceIndex(e){const i=this._arr;for(let n=0,s=i.length;ni&&(this._arr[n].afterLineNumber-=i-e+1)}}onLinesInserted(e,i){this._checkPendingChanges(),e=e|0,i=i|0,this._lineCount+=i-e+1;for(let n=0,s=this._arr.length;n=i.length||i[f+1].afterLineNumber>=e)return f;n=f+1|0}else s=f-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e=e|0;const n=this._findLastWhitespaceBeforeLineNumber(e)+1;return n1?n=this._lineHeight*(e-1):n=0;const s=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(i?1:0));return n+s+this._paddingTop}getVerticalOffsetAfterLineNumber(e,i=!1){this._checkPendingChanges(),e=e|0;const n=this._lineHeight*e,s=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(i?1:0));return n+s+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let e=0;for(let i=0,n=this._arr.length;ii}isInTopPadding(e){return this._paddingTop===0?!1:(this._checkPendingChanges(),e=i-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e=e|0,e<0)return 1;const i=this._lineCount|0,n=this._lineHeight;let s=1,l=i;for(;s=f+n)s=d+1;else{if(e>=f)return d;l=d}}return s>i?i:s}getLinesViewportData(e,i){this._checkPendingChanges(),e=e|0,i=i|0;const n=this._lineHeight,s=this.getLineNumberAtOrAfterVerticalOffset(e)|0,l=this.getVerticalOffsetForLineNumber(s)|0;let d=this._lineCount|0,f=this.getFirstWhitespaceIndexAfterLineNumber(s)|0;const g=this.getWhitespacesCount()|0;let y,w;f===-1?(f=g,w=d+1,y=0):(w=this.getAfterLineNumberForWhitespaceIndex(f)|0,y=this.getHeightForWhitespaceIndex(f)|0);let x=l,I=x;const P=5e5;let O=0;l>=P&&(O=Math.floor(l/P)*P,O=Math.floor(O/n)*n,I-=O);const W=[],X=e+(i-e)/2;let Z=-1;for(let Te=s;Te<=d;Te++){if(Z===-1){const Be=x,Me=x+n;(Be<=X&&XX)&&(Z=Te)}for(x+=n,W[Te-s]=I,I+=n;w===Te;)I+=y,x+=y,f++,f>=g?w=d+1:(w=this.getAfterLineNumberForWhitespaceIndex(f)|0,y=this.getHeightForWhitespaceIndex(f)|0);if(x>=i){d=Te;break}}Z===-1&&(Z=d);const ee=this.getVerticalOffsetForLineNumber(d)|0;let he=s,we=d;return hei&&we--,{bigNumbersDelta:O,startLineNumber:s,endLineNumber:d,relativeVerticalOffset:W,centeredLineNumber:Z,completelyVisibleStartLineNumber:he,completelyVisibleEndLineNumber:we,lineHeight:this._lineHeight}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e=e|0;const i=this.getAfterLineNumberForWhitespaceIndex(e);let n;i>=1?n=this._lineHeight*i:n=0;let s;return e>0?s=this.getWhitespacesAccumulatedHeight(e-1):s=0,n+s+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e=e|0;let i=0,n=this.getWhitespacesCount()-1;if(n<0)return-1;const s=this.getVerticalOffsetForWhitespaceIndex(n),l=this.getHeightForWhitespaceIndex(n);if(e>=s+l)return-1;for(;i=f+g)i=d+1;else{if(e>=f)return d;n=d}}return i}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e=e|0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(i<0||i>=this.getWhitespacesCount())return null;const n=this.getVerticalOffsetForWhitespaceIndex(i);if(n>e)return null;const s=this.getHeightForWhitespaceIndex(i),l=this.getIdForWhitespaceIndex(i),d=this.getAfterLineNumberForWhitespaceIndex(i);return{id:l,afterLineNumber:d,verticalOffset:n,height:s}}getWhitespaceViewportData(e,i){this._checkPendingChanges(),e=e|0,i=i|0;const n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),s=this.getWhitespacesCount()-1;if(n<0)return[];const l=[];for(let d=n;d<=s;d++){const f=this.getVerticalOffsetForWhitespaceIndex(d),g=this.getHeightForWhitespaceIndex(d);if(f>=i)break;l.push({id:this.getIdForWhitespaceIndex(d),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(d),verticalOffset:f,height:g})}return l}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].height}};Twt.INSTANCE_COUNT=0;const w_i=125;class Oee{constructor(e,i,n,s){e=e|0,i=i|0,n=n|0,s=s|0,e<0&&(e=0),i<0&&(i=0),n<0&&(n=0),s<0&&(s=0),this.width=e,this.contentWidth=i,this.scrollWidth=Math.max(e,i),this.height=n,this.contentHeight=s,this.scrollHeight=Math.max(n,s)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class x_i extends Ii{constructor(e,i){super(),this._onDidContentSizeChange=this._register(new ui),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new Oee(0,0,0,0),this._scrollable=this._register(new qq({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:i})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const i=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const n=i.contentWidth!==e.contentWidth,s=i.contentHeight!==e.contentHeight;(n||s)&&this._onDidContentSizeChange.fire(new Oje(i.contentWidth,i.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class k_i extends Ii{constructor(e,i,n){super(),this._configuration=e;const s=this._configuration.options,l=s.get(145),d=s.get(84);this._linesLayout=new Twt(i,s.get(67),d.top,d.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new x_i(0,n)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new Oee(l.contentWidth,0,l.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(114)?w_i:0)}onConfigurationChanged(e){const i=this._configuration.options;if(e.hasChanged(67)&&this._linesLayout.setLineHeight(i.get(67)),e.hasChanged(84)){const n=i.get(84);this._linesLayout.setPadding(n.top,n.bottom)}if(e.hasChanged(145)){const n=i.get(145),s=n.contentWidth,l=n.height,d=this._scrollable.getScrollDimensions(),f=d.contentWidth;this._scrollable.setScrollDimensions(new Oee(s,d.contentWidth,l,this._getContentHeight(s,l,f)))}else this._updateHeight();e.hasChanged(114)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,i){this._linesLayout.onLinesDeleted(e,i)}onLinesInserted(e,i){this._linesLayout.onLinesInserted(e,i)}_getHorizontalScrollbarHeight(e,i){const s=this._configuration.options.get(103);return s.horizontal===2||e>=i?0:s.horizontalScrollbarSize}_getContentHeight(e,i,n){const s=this._configuration.options;let l=this._linesLayout.getLinesTotalHeight();return s.get(105)?l+=Math.max(0,i-s.get(67)-s.get(84).bottom):s.get(103).ignoreHorizontalScrollbarInContentHeight||(l+=this._getHorizontalScrollbarHeight(e,n)),l}_updateHeight(){const e=this._scrollable.getScrollDimensions(),i=e.width,n=e.height,s=e.contentWidth;this._scrollable.setScrollDimensions(new Oee(i,e.contentWidth,n,this._getContentHeight(i,n,s)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),i=this._scrollable.getCurrentScrollPosition();return new mmt(i.scrollTop,i.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),i=this._scrollable.getFutureScrollPosition();return new mmt(i.scrollTop,i.scrollLeft,e.width,e.height)}_computeContentWidth(){const e=this._configuration.options,i=this._maxLineWidth,n=e.get(146),s=e.get(50),l=e.get(145);if(n.isViewportWrapping){const d=e.get(73);return i>l.contentWidth+s.typicalHalfwidthCharacterWidth&&d.enabled&&d.side==="right"?i+l.verticalScrollbarWidth:i}else{const d=e.get(104)*s.typicalHalfwidthCharacterWidth,f=this._linesLayout.getWhitespaceMinWidth();return Math.max(i+d+l.verticalScrollbarWidth,f,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){const e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new Oee(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),i=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(i),s=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n);return{scrollTop:i,scrollTopWithoutViewZones:i-s,scrollLeft:e.scrollLeft}}changeWhitespace(e){const i=this._linesLayout.changeWhitespace(e);return i&&this.onHeightMaybeChanged(),i}getVerticalOffsetForLineNumber(e,i=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,i)}getVerticalOffsetAfterLineNumber(e,i=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,i)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const i=this._scrollable.getScrollDimensions();return e+i.height>i.scrollHeight&&(e=i.scrollHeight-i.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+i.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,i){i===1?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,i){const n=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+i})}}class T_i{constructor(e,i,n,s,l){this.editorId=e,this.model=i,this.configuration=n,this._linesCollection=s,this._coordinatesConverter=l,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const i=e.id;let n=this._decorationsCache[i];if(!n){const s=e.range,l=e.options;let d;if(l.isWholeLine){const f=this._coordinatesConverter.convertModelPositionToViewPosition(new yi(s.startLineNumber,1),0,!1,!0),g=this._coordinatesConverter.convertModelPositionToViewPosition(new yi(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber)),1);d=new at(f.lineNumber,f.column,g.lineNumber,g.column)}else d=this._coordinatesConverter.convertModelRangeToViewRange(s,1);n=new uSt(d,l),this._decorationsCache[i]=n}return n}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let i=this._cachedModelDecorationsResolver!==null;return i=i&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),i||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,i=!1,n=!1){const s=new at(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(s,i,n).inlineDecorations[0]}_getDecorationsInRange(e,i,n){const s=this._linesCollection.getDecorationsInRange(e,this.editorId,D0e(this.configuration.options),i,n),l=e.startLineNumber,d=e.endLineNumber,f=[];let g=0;const y=[];for(let w=l;w<=d;w++)y[w-l]=[];for(let w=0,x=s.length;wi===1)}function Wje(c,e){return Dwt(c,e.range,i=>i===2)}function Dwt(c,e,i){for(let n=e.startLineNumber;n<=e.endLineNumber;n++){const s=c.tokenization.getLineTokens(n),l=n===e.startLineNumber,d=n===e.endLineNumber;let f=l?s.findTokenIndexAtOffset(e.startColumn-1):0;for(;fe.endColumn-1);){if(!i(s.getStandardTokenType(f)))return!1;f++}}return!0}function y7e(c,e){return c===null?e?dve.INSTANCE:fve.INSTANCE:new D_i(c,e)}class D_i{constructor(e,i){this._projectionData=e,this._isVisible=i}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,i,n){this._assertVisible();const s=n>0?this._projectionData.breakOffsets[n-1]:0,l=this._projectionData.breakOffsets[n];let d;if(this._projectionData.injectionOffsets!==null){const f=this._projectionData.injectionOffsets.map((y,w)=>new LE(0,0,y+1,this._projectionData.injectionOptions[w],0));d=LE.applyInjectedText(e.getLineContent(i),f).substring(s,l)}else d=e.getValueInRange({startLineNumber:i,startColumn:s+1,endLineNumber:i,endColumn:l+1});return n>0&&(d=L0t(this._projectionData.wrappedTextIndentLength)+d),d}getViewLineLength(e,i,n){return this._assertVisible(),this._projectionData.getLineLength(n)}getViewLineMinColumn(e,i,n){return this._assertVisible(),this._projectionData.getMinOutputOffset(n)+1}getViewLineMaxColumn(e,i,n){return this._assertVisible(),this._projectionData.getMaxOutputOffset(n)+1}getViewLineData(e,i,n){const s=new Array;return this.getViewLinesData(e,i,n,1,0,[!0],s),s[0]}getViewLinesData(e,i,n,s,l,d,f){this._assertVisible();const g=this._projectionData,y=g.injectionOffsets,w=g.injectionOptions;let x=null;if(y){x=[];let P=0,O=0;for(let W=0;W0?g.breakOffsets[W-1]:0,ee=g.breakOffsets[W];for(;Oee)break;if(Z0?g.wrappedTextIndentLength:0,vt=Me+Math.max(we-Z,0),Nt=Me+Math.min(Te-Z,ee-Z);vt!==Nt&&X.push(new Eai(vt,Nt,Be.inlineClassName,Be.inlineClassNameAffectsLetterSpacing))}}if(Te<=ee)P+=he,O++;else break}}}let I;y?I=e.tokenization.getLineTokens(i).withInserted(y.map((P,O)=>({offset:P,text:w[O].content,tokenMetadata:vp.defaultTokenMetadata}))):I=e.tokenization.getLineTokens(i);for(let P=n;P0?s.wrappedTextIndentLength:0,d=n>0?s.breakOffsets[n-1]:0,f=s.breakOffsets[n],g=e.sliceAndInflate(d,f,l);let y=g.getLineContent();n>0&&(y=L0t(s.wrappedTextIndentLength)+y);const w=this._projectionData.getMinOutputOffset(n)+1,x=y.length+1,I=n+1=b7e.length)for(let e=1;e<=c;e++)b7e[e]=E_i(e);return b7e[c]}function E_i(c){return new Array(c+1).join(" ")}class I_i{constructor(e,i,n,s,l,d,f,g,y,w){this._editorId=e,this.model=i,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=n,this._monospaceLineBreaksComputerFactory=s,this.fontInfo=l,this.tabSize=d,this.wrappingStrategy=f,this.wrappingColumn=g,this.wrappingIndent=y,this.wordBreak=w,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new L_i(this)}_constructLines(e,i){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const n=this.model.getLinesContent(),s=this.model.getInjectedTextDecorations(this._editorId),l=n.length,d=this.createLineBreaksComputer(),f=new U4(LE.fromDecorations(s));for(let W=0;WZ.lineNumber===W+1);d.addRequest(n[W],X,i?i[W]:null)}const g=d.finalize(),y=[],w=this.hiddenAreasDecorationIds.map(W=>this.model.getDecorationRange(W)).sort(at.compareRangesUsingStarts);let x=1,I=0,P=-1,O=P+1=x&&X<=I,ee=y7e(g[W],!Z);y[W]=ee.getViewLineCount(),this.modelLineProjections[W]=ee}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new toi(y)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(e=>this.model.getDecorationRange(e))}setHiddenAreas(e){const i=e.map(I=>this.model.validateRange(I)),n=N_i(i),s=this.hiddenAreasDecorationIds.map(I=>this.model.getDecorationRange(I)).sort(at.compareRangesUsingStarts);if(n.length===s.length){let I=!1;for(let P=0;P({range:I,options:Xa.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,l);const d=n;let f=1,g=0,y=-1,w=y+1=f&&P<=g?this.modelLineProjections[I].isVisible()&&(this.modelLineProjections[I]=this.modelLineProjections[I].setVisible(!1),O=!0):(x=!0,this.modelLineProjections[I].isVisible()||(this.modelLineProjections[I]=this.modelLineProjections[I].setVisible(!0),O=!0)),O){const W=this.modelLineProjections[I].getViewLineCount();this.projectedModelLineLineCounts.setValue(I,W)}}return x||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,i){return e<1||e>this.modelLineProjections.length?!1:this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize===e?!1:(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,i,n,s,l){const d=this.fontInfo.equals(e),f=this.wrappingStrategy===i,g=this.wrappingColumn===n,y=this.wrappingIndent===s,w=this.wordBreak===l;if(d&&f&&g&&y&&w)return!1;const x=d&&f&&!g&&y&&w;this.fontInfo=e,this.wrappingStrategy=i,this.wrappingColumn=n,this.wrappingIndent=s,this.wordBreak=l;let I=null;if(x){I=[];for(let P=0,O=this.modelLineProjections.length;P2&&!this.modelLineProjections[i-2].isVisible(),d=i===1?1:this.projectedModelLineLineCounts.getPrefixSum(i-1)+1;let f=0;const g=[],y=[];for(let w=0,x=s.length;wg?(w=this.projectedModelLineLineCounts.getPrefixSum(i-1)+1,x=w+g-1,O=x+1,W=O+(l-g)-1,y=!0):li?i:e|0}getActiveIndentGuide(e,i,n){e=this._toValidViewLineNumber(e),i=this._toValidViewLineNumber(i),n=this._toValidViewLineNumber(n);const s=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),l=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),d=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),f=this.model.guides.getActiveIndentGuide(s.lineNumber,l.lineNumber,d.lineNumber),g=this.convertModelPositionToViewPosition(f.startLineNumber,1),y=this.convertModelPositionToViewPosition(f.endLineNumber,this.model.getLineMaxColumn(f.endLineNumber));return{startLineNumber:g.lineNumber,endLineNumber:y.lineNumber,indent:f.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const i=this.projectedModelLineLineCounts.getIndexOf(e-1),n=i.index,s=i.remainder;return new P0t(n+1,s)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const i=this.modelLineProjections[e.modelLineNumber-1],n=i.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),s=i.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new yi(e.modelLineNumber,s)}getModelEndPositionOfViewLine(e){const i=this.modelLineProjections[e.modelLineNumber-1],n=i.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),s=i.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new yi(e.modelLineNumber,s)}getViewLineInfosGroupedByModelRanges(e,i){const n=this.getViewLineInfo(e),s=this.getViewLineInfo(i),l=new Array;let d=this.getModelStartPositionOfViewLine(n),f=new Array;for(let g=n.modelLineNumber;g<=s.modelLineNumber;g++){const y=this.modelLineProjections[g-1];if(y.isVisible()){const w=g===n.modelLineNumber?n.modelLineWrappedLineIdx:0,x=g===s.modelLineNumber?s.modelLineWrappedLineIdx+1:y.getViewLineCount();for(let I=w;I{if(P.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[w.modelLineNumber-1].getViewPositionOfModelPosition(0,P.forWrappedLinesAfterColumn).lineNumber>=w.modelLineWrappedLineIdx||P.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[w.modelLineNumber-1].getViewPositionOfModelPosition(0,P.forWrappedLinesBeforeOrAtColumn).lineNumberw.modelLineWrappedLineIdx)return}const W=this.convertModelPositionToViewPosition(w.modelLineNumber,P.horizontalLine.endColumn),X=this.modelLineProjections[w.modelLineNumber-1].getViewPositionOfModelPosition(0,P.horizontalLine.endColumn);return X.lineNumber===w.modelLineWrappedLineIdx?new J5(P.visibleColumn,O,P.className,new ite(P.horizontalLine.top,W.column),-1,-1):X.lineNumber!!P))}}return d}getViewLinesIndentGuides(e,i){e=this._toValidViewLineNumber(e),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),s=this.convertViewPositionToModelPosition(i,this.getViewLineMaxColumn(i));let l=[];const d=[],f=[],g=n.lineNumber-1,y=s.lineNumber-1;let w=null;for(let O=g;O<=y;O++){const W=this.modelLineProjections[O];if(W.isVisible()){const X=W.getViewLineNumberOfModelPosition(0,O===g?n.column:1),Z=W.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(O+1)),ee=Z-X+1;let he=0;ee>1&&W.getViewLineMinColumn(this.model,O+1,Z)===1&&(he=X===0?1:2),d.push(ee),f.push(he),w===null&&(w=new yi(O+1,0))}else w!==null&&(l=l.concat(this.model.guides.getLinesIndentGuides(w.lineNumber,O)),w=null)}w!==null&&(l=l.concat(this.model.guides.getLinesIndentGuides(w.lineNumber,s.lineNumber)),w=null);const x=i-e+1,I=new Array(x);let P=0;for(let O=0,W=l.length;Oi&&(O=!0,P=i-l+1),x.getViewLinesData(this.model,y+1,I,P,l-e,n,g),l+=P,O)break}return g}validateViewPosition(e,i,n){e=this._toValidViewLineNumber(e);const s=this.projectedModelLineLineCounts.getIndexOf(e-1),l=s.index,d=s.remainder,f=this.modelLineProjections[l],g=f.getViewLineMinColumn(this.model,l+1,d),y=f.getViewLineMaxColumn(this.model,l+1,d);iy&&(i=y);const w=f.getModelColumnOfViewPosition(d,i);return this.model.validatePosition(new yi(l+1,w)).equals(n)?new yi(e,i):this.convertModelPositionToViewPosition(n.lineNumber,n.column)}validateViewRange(e,i){const n=this.validateViewPosition(e.startLineNumber,e.startColumn,i.getStartPosition()),s=this.validateViewPosition(e.endLineNumber,e.endColumn,i.getEndPosition());return new at(n.lineNumber,n.column,s.lineNumber,s.column)}convertViewPositionToModelPosition(e,i){const n=this.getViewLineInfo(e),s=this.modelLineProjections[n.modelLineNumber-1].getModelColumnOfViewPosition(n.modelLineWrappedLineIdx,i);return this.model.validatePosition(new yi(n.modelLineNumber,s))}convertViewRangeToModelRange(e){const i=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new at(i.lineNumber,i.column,n.lineNumber,n.column)}convertModelPositionToViewPosition(e,i,n=2,s=!1,l=!1){const d=this.model.validatePosition(new yi(e,i)),f=d.lineNumber,g=d.column;let y=f-1,w=!1;if(l)for(;y0&&!this.modelLineProjections[y].isVisible();)y--,w=!0;if(y===0&&!this.modelLineProjections[y].isVisible())return new yi(s?0:1,1);const x=1+this.projectedModelLineLineCounts.getPrefixSum(y);let I;return w?l?I=this.modelLineProjections[y].getViewPositionOfModelPosition(x,1,n):I=this.modelLineProjections[y].getViewPositionOfModelPosition(x,this.model.getLineMaxColumn(y+1),n):I=this.modelLineProjections[f-1].getViewPositionOfModelPosition(x,g,n),I}convertModelRangeToViewRange(e,i=0){if(e.isEmpty()){const n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,i);return at.fromPositions(n)}else{const n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),s=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new at(n.lineNumber,n.column,s.lineNumber,s.column)}}getViewLineNumberOfModelPosition(e,i){let n=e-1;if(this.modelLineProjections[n].isVisible()){const l=1+this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections[n].getViewLineNumberOfModelPosition(l,i)}for(;n>0&&!this.modelLineProjections[n].isVisible();)n--;if(n===0&&!this.modelLineProjections[n].isVisible())return 1;const s=1+this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections[n].getViewLineNumberOfModelPosition(s,this.model.getLineMaxColumn(n+1))}getDecorationsInRange(e,i,n,s,l){const d=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),f=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(f.lineNumber-d.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new at(d.lineNumber,1,f.lineNumber,f.column),i,n,s,l);let g=[];const y=d.lineNumber-1,w=f.lineNumber-1;let x=null;for(let W=y;W<=w;W++)if(this.modelLineProjections[W].isVisible())x===null&&(x=new yi(W+1,W===y?d.column:1));else if(x!==null){const Z=this.model.getLineMaxColumn(W);g=g.concat(this.model.getDecorationsInRange(new at(x.lineNumber,x.column,W,Z),i,n,s)),x=null}x!==null&&(g=g.concat(this.model.getDecorationsInRange(new at(x.lineNumber,x.column,f.lineNumber,f.column),i,n,s)),x=null),g.sort((W,X)=>{const Z=at.compareRangesUsingStarts(W.range,X.range);return Z===0?W.idX.id?1:0:Z});const I=[];let P=0,O=null;for(const W of g){const X=W.id;O!==X&&(O=X,I[P++]=W)}return I}getInjectedTextAt(e){const i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].getInjectedTextAt(i.modelLineWrappedLineIdx,e.column)}normalizePosition(e,i){const n=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[n.modelLineNumber-1].normalizePosition(n.modelLineWrappedLineIdx,e,i)}getLineIndentColumn(e){const i=this.getViewLineInfo(e);return i.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(i.modelLineNumber):0}}function N_i(c){if(c.length===0)return[];const e=c.slice();e.sort(at.compareRangesUsingStarts);const i=[];let n=e[0].startLineNumber,s=e[0].endLineNumber;for(let l=1,d=e.length;ls+1?(i.push(new at(n,1,s,1)),n=f.startLineNumber,s=f.endLineNumber):f.endLineNumber>s&&(s=f.endLineNumber)}return i.push(new at(n,1,s,1)),i}class P0t{constructor(e,i){this.modelLineNumber=e,this.modelLineWrappedLineIdx=i}}class A0t{constructor(e,i){this.modelRange=e,this.viewLines=i}}class L_i{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,i){return this._lines.validateViewPosition(e.lineNumber,e.column,i)}validateViewRange(e,i){return this._lines.validateViewRange(e,i)}convertModelPositionToViewPosition(e,i,n,s){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,i,n,s)}convertModelRangeToViewRange(e,i){return this._lines.convertModelRangeToViewRange(e,i)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,i){return this._lines.getViewLineNumberOfModelPosition(e,i)}}class P_i{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new A_i(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,i,n,s){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(i,n,s)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,i,n){return new M9e(i,n)}onModelLinesInserted(e,i,n,s){return new R9e(i,n)}onModelLineChanged(e,i,n){return[!1,new kwt(i,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,i,n){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,i,n){return new Array(i-e+1).fill([])}getViewLinesIndentGuides(e,i){const n=i-e+1,s=new Array(n);for(let l=0;li)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,i){return e}}const p5=fL.Right;class O_i{constructor(e){this.persist=0,this._requiredLanes=1,this.lanes=new Uint8Array(Math.ceil((e+1)*p5/8))}reset(e){const i=Math.ceil((e+1)*p5/8);this.lanes.length>>3]|=1<>>3]&1<>>3]&1<this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=Vje.create(this.model),this.glyphLanes=new O_i(0),this.model.isTooLargeForTokenization())this._lines=new P_i(this.model);else{const w=this._configuration.options,x=w.get(50),I=w.get(139),P=w.get(146),O=w.get(138),W=w.get(129);this._lines=new I_i(this._editorId,this.model,s,l,x,this.model.getOptions().tabSize,I,P.wrappingColumn,O,W)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new g_i(n,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new k_i(this._configuration,this.getLineCount(),d)),this._register(this.viewLayout.onDidScroll(w=>{w.scrollTopChanged&&this._handleVisibleLinesChanged(),w.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new e_i(w)),this._eventDispatcher.emitOutgoingEvent(new Rje(w.oldScrollWidth,w.oldScrollLeft,w.oldScrollHeight,w.oldScrollTop,w.scrollWidth,w.scrollLeft,w.scrollHeight,w.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(w=>{this._eventDispatcher.emitOutgoingEvent(w)})),this._decorations=new T_i(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(w=>{try{const x=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(x,w)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(Ane.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new n_i)})),this._register(this._themeService.onDidColorThemeChange(w=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new t_i(w))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const e=this.viewLayout.getLinesViewportData(),i=new at(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(i)}visibleLinesStabilized(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new Zhi(e)),this._eventDispatcher.emitOutgoingEvent(new Mje(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new Ghi)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new Khi)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const e=new yi(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),i=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new M0t(i,this._viewportStart.startLineDelta)}return new M0t(null,0)}_onConfigurationChanged(e,i){const n=this._captureStableViewport(),s=this._configuration.options,l=s.get(50),d=s.get(139),f=s.get(146),g=s.get(138),y=s.get(129);this._lines.setWrappingSettings(l,d,f.wrappingColumn,g,y)&&(e.emitViewEvent(new Wge),e.emitViewEvent(new Vge),e.emitViewEvent(new _5(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),i.hasChanged(91)&&(this._decorations.reset(),e.emitViewEvent(new _5(null))),i.hasChanged(98)&&(this._decorations.reset(),e.emitViewEvent(new _5(null))),e.emitViewEvent(new Qhi(i)),this.viewLayout.onConfigurationChanged(i),n.recoverViewportStart(this.coordinatesConverter,this.viewLayout),Cz.shouldRecreate(i)&&(this.cursorConfig=new Cz(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(e=>{try{const n=this._eventDispatcher.beginEmitViewEvents();let s=!1,l=!1;const d=e instanceof s9?e.rawContentChangedEvent.changes:e.changes,f=e instanceof s9?e.rawContentChangedEvent.versionId:null,g=this._lines.createLineBreaksComputer();for(const x of d)switch(x.changeType){case 4:{for(let I=0;I!W.ownerId||W.ownerId===this._editorId)),g.addRequest(P,O,null)}break}case 2:{let I=null;x.injectedText&&(I=x.injectedText.filter(P=>!P.ownerId||P.ownerId===this._editorId)),g.addRequest(x.detail,I,null);break}}const y=g.finalize(),w=new U4(y);for(const x of d)switch(x.changeType){case 1:{this._lines.onModelFlushed(),n.emitViewEvent(new Wge),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),s=!0;break}case 3:{const I=this._lines.onModelLinesDeleted(f,x.fromLineNumber,x.toLineNumber);I!==null&&(n.emitViewEvent(I),this.viewLayout.onLinesDeleted(I.fromLineNumber,I.toLineNumber)),s=!0;break}case 4:{const I=w.takeCount(x.detail.length),P=this._lines.onModelLinesInserted(f,x.fromLineNumber,x.toLineNumber,I);P!==null&&(n.emitViewEvent(P),this.viewLayout.onLinesInserted(P.fromLineNumber,P.toLineNumber)),s=!0;break}case 2:{const I=w.dequeue(),[P,O,W,X]=this._lines.onModelLineChanged(f,x.lineNumber,I);l=P,O&&n.emitViewEvent(O),W&&(n.emitViewEvent(W),this.viewLayout.onLinesInserted(W.fromLineNumber,W.toLineNumber)),X&&(n.emitViewEvent(X),this.viewLayout.onLinesDeleted(X.fromLineNumber,X.toLineNumber));break}case 5:break}f!==null&&this._lines.acceptVersionId(f),this.viewLayout.onHeightMaybeChanged(),!s&&l&&(n.emitViewEvent(new Vge),n.emitViewEvent(new _5(null)),this._cursor.onLineMappingChanged(n),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const i=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&i){const n=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(n){const s=this.coordinatesConverter.convertModelPositionToViewPosition(n.getStartPosition()),l=this.viewLayout.getVerticalOffsetForLineNumber(s.lineNumber);this.viewLayout.setScrollPosition({scrollTop:l+this._viewportStart.startLineDelta},1)}}try{const n=this._eventDispatcher.beginEmitViewEvents();e instanceof s9&&n.emitOutgoingEvent(new h_i(e.contentChangedEvent)),this._cursor.onModelContentChanged(n,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})),this._register(this.model.onDidChangeTokens(e=>{const i=[];for(let n=0,s=e.ranges.length;n{this._eventDispatcher.emitSingleViewEvent(new Yhi),this.cursorConfig=new Cz(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new f_i(e))})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new Cz(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new d_i(e))})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const i=this._eventDispatcher.beginEmitViewEvents();i.emitViewEvent(new Wge),i.emitViewEvent(new Vge),i.emitViewEvent(new _5(null)),this._cursor.onLineMappingChanged(i),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new Cz(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new __i(e))})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new _5(e)),this._eventDispatcher.emitOutgoingEvent(new u_i(e))}))}setHiddenAreas(e,i){var n;this.hiddenAreasModel.setHiddenAreas(i,e);const s=this.hiddenAreasModel.getMergedRanges();if(s===this.previousHiddenAreas)return;this.previousHiddenAreas=s;const l=this._captureStableViewport();let d=!1;try{const f=this._eventDispatcher.beginEmitViewEvents();d=this._lines.setHiddenAreas(s),d&&(f.emitViewEvent(new Wge),f.emitViewEvent(new Vge),f.emitViewEvent(new _5(null)),this._cursor.onLineMappingChanged(f),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged());const g=(n=l.viewportStartModelPosition)===null||n===void 0?void 0:n.lineNumber;g&&s.some(w=>w.startLineNumber<=g&&g<=w.endLineNumber)||l.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),d&&this._eventDispatcher.emitOutgoingEvent(new l_i)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(145),i=this._configuration.options.get(67),n=Math.max(20,Math.round(e.height/i)),s=this.viewLayout.getLinesViewportData(),l=Math.max(1,s.completelyVisibleStartLineNumber-n),d=Math.min(this.getLineCount(),s.completelyVisibleEndLineNumber+n);return this._toModelVisibleRanges(new at(l,this.getLineMinColumn(l),d,this.getLineMaxColumn(d)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){const i=this.coordinatesConverter.convertViewRangeToModelRange(e),n=this._lines.getHiddenAreas();if(n.length===0)return[i];const s=[];let l=0,d=i.startLineNumber,f=i.startColumn;const g=i.endLineNumber,y=i.endColumn;for(let w=0,x=n.length;wg||(d"u")return this._reduceRestoreStateCompatibility(e);const i=this.model.validatePosition(e.firstPosition),n=this.coordinatesConverter.convertModelPositionToViewPosition(i),s=this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:s}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,i,n){this._viewportStart.update(this,e)}getActiveIndentGuide(e,i,n){return this._lines.getActiveIndentGuide(e,i,n)}getLinesIndentGuides(e,i){return this._lines.getViewLinesIndentGuides(e,i)}getBracketGuidesInRangeByLine(e,i,n,s){return this._lines.getViewLinesBracketGuides(e,i,n,s)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){const i=T1(this.getLineContent(e));return i===-1?0:i+1}getLineLastNonWhitespaceColumn(e){const i=yE(this.getLineContent(e));return i===-1?0:i+2}getMinimapDecorationsInRange(e){return this._decorations.getMinimapDecorationsInRange(e)}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewportViewLineRenderingData(e,i){const s=this._decorations.getDecorationsViewportData(e).inlineDecorations[i-e.startLineNumber];return this._getViewLineRenderingData(i,s)}getViewLineRenderingData(e){const i=this._decorations.getInlineDecorationsOnLine(e);return this._getViewLineRenderingData(e,i)}_getViewLineRenderingData(e,i){const n=this.model.mightContainRTL(),s=this.model.mightContainNonBasicASCII(),l=this.getTabSize(),d=this._lines.getViewLineData(e);return d.inlineDecorations&&(i=[...i,...d.inlineDecorations.map(f=>f.toInlineDecoration(e))]),new xw(d.minColumn,d.maxColumn,d.content,d.continuesWithWrappedLine,n,s,d.tokens,i,l,d.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,i,n){const s=this._lines.getViewLinesData(e,i,n);return new Dai(this.getTabSize(),s)}getAllOverviewRulerDecorations(e){const i=this.model.getOverviewRulerDecorations(this._editorId,D0e(this._configuration.options)),n=new R_i;for(const s of i){const l=s.options,d=l.overviewRuler;if(!d)continue;const f=d.position;if(f===0)continue;const g=d.getColor(e.value),y=this.coordinatesConverter.getViewLineNumberOfModelPosition(s.range.startLineNumber,s.range.startColumn),w=this.coordinatesConverter.getViewLineNumberOfModelPosition(s.range.endLineNumber,s.range.endColumn);n.accept(g,l.zIndex,y,w,f)}return n.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const i of e){const n=i.options.overviewRuler;n==null||n.invalidateCachedColor();const s=i.options.minimap;s==null||s.invalidateCachedColor()}}getValueInRange(e,i){const n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(n,i)}getValueLengthInRange(e,i){const n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(n,i)}modifyPosition(e,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e),s=this.model.modifyPosition(n,i);return this.coordinatesConverter.convertModelPositionToViewPosition(s)}deduceModelPositionRelativeToViewPosition(e,i,n){const s=this.coordinatesConverter.convertViewPositionToModelPosition(e);this.model.getEOL().length===2&&(i<0?i-=n:i+=n);const d=this.model.getOffsetAt(s)+i;return this.model.getPositionAt(d)}getPlainTextToCopy(e,i,n){const s=n?`\r +`:this.model.getEOL();e=e.slice(0),e.sort(at.compareRangesUsingStarts);let l=!1,d=!1;for(const g of e)g.isEmpty()?l=!0:d=!0;if(!d){if(!i)return"";const g=e.map(w=>w.startLineNumber);let y="";for(let w=0;w0&&g[w-1]===g[w]||(y+=this.model.getLineContent(g[w])+s);return y}if(l&&i){const g=[];let y=0;for(const w of e){const x=w.startLineNumber;w.isEmpty()?x!==y&&g.push(this.model.getLineContent(x)):g.push(this.model.getValueInRange(w,n?2:0)),y=x}return g.length===1?g[0]:g}const f=[];for(const g of e)g.isEmpty()||f.push(this.model.getValueInRange(g,n?2:0));return f.length===1?f[0]:f}getRichTextToCopy(e,i){const n=this.model.getLanguageId();if(n===yw||e.length!==1)return null;let s=e[0];if(s.isEmpty()){if(!i)return null;const w=s.startLineNumber;s=new at(w,this.model.getLineMinColumn(w),w,this.model.getLineMaxColumn(w))}const l=this._configuration.options.get(50),d=this._getColorMap(),g=/[:;\\\/<>]/.test(l.fontFamily)||l.fontFamily===Tb.fontFamily;let y;return g?y=Tb.fontFamily:(y=l.fontFamily,y=y.replace(/"/g,"'"),/[,']/.test(y)||/[+ ]/.test(y)&&(y=`'${y}'`),y=`${y}, ${Tb.fontFamily}`),{mode:n,html:`
`+this._getHTMLToCopy(s,d)+"
"}}_getHTMLToCopy(e,i){const n=e.startLineNumber,s=e.startColumn,l=e.endLineNumber,d=e.endColumn,f=this.getTabSize();let g="";for(let y=n;y<=l;y++){const w=this.model.tokenization.getLineTokens(y),x=w.getLineContent(),I=y===n?s-1:0,P=y===l?d-1:x.length;x===""?g+="
":g+=b_i(x,w.inflate(),i,I,P,f,M0)}return g}_getColorMap(){const e=Nh.getColorMap(),i=["#000000"];if(e)for(let n=1,s=e.length;nthis._cursor.setStates(s,e,i,n))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,i,n=0){this._withViewEventsCollector(s=>this._cursor.setSelections(s,e,i,n))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(i=>this._cursor.restoreState(i,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new c_i);return}this._withViewEventsCollector(e)}executeEdits(e,i,n){this._executeCursorEdit(s=>this._cursor.executeEdits(s,e,i,n))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(i=>this._cursor.endComposition(i,e))}type(e,i){this._executeCursorEdit(n=>this._cursor.type(n,e,i))}compositionType(e,i,n,s,l){this._executeCursorEdit(d=>this._cursor.compositionType(d,e,i,n,s,l))}paste(e,i,n,s){this._executeCursorEdit(l=>this._cursor.paste(l,e,i,n,s))}cut(e){this._executeCursorEdit(i=>this._cursor.cut(i,e))}executeCommand(e,i){this._executeCursorEdit(n=>this._cursor.executeCommand(n,e,i))}executeCommands(e,i){this._executeCursorEdit(n=>this._cursor.executeCommands(n,e,i))}revealAllCursors(e,i,n=!1){this._withViewEventsCollector(s=>this._cursor.revealAll(s,e,n,0,i,0))}revealPrimaryCursor(e,i,n=!1){this._withViewEventsCollector(s=>this._cursor.revealPrimary(s,e,n,0,i,0))}revealTopMostCursor(e){const i=this._cursor.getTopMostViewPosition(),n=new at(i.lineNumber,i.column,i.lineNumber,i.column);this._withViewEventsCollector(s=>s.emitViewEvent(new dte(e,!1,n,null,0,!0,0)))}revealBottomMostCursor(e){const i=this._cursor.getBottomMostViewPosition(),n=new at(i.lineNumber,i.column,i.lineNumber,i.column);this._withViewEventsCollector(s=>s.emitViewEvent(new dte(e,!1,n,null,0,!0,0)))}revealRange(e,i,n,s,l){this._withViewEventsCollector(d=>d.emitViewEvent(new dte(e,!1,n,null,s,i,l)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new r_i),this._eventDispatcher.emitOutgoingEvent(new a_i))}_withViewEventsCollector(e){try{const i=this._eventDispatcher.beginEmitViewEvents();return e(i)}finally{this._eventDispatcher.endEmitViewEvents()}}batchEvents(e){this._withViewEventsCollector(()=>{e()})}normalizePosition(e,i){return this._lines.normalizePosition(e,i)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}};class Vje{static create(e){const i=e._setTrackedRange(null,new at(1,1,1,1),1);return new Vje(e,1,!1,i,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,i,n,s,l){this._model=e,this._viewLineNumber=i,this._isValid=n,this._modelTrackedRange=s,this._startLineDelta=l}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,i){const n=e.coordinatesConverter.convertViewPositionToModelPosition(new yi(i,e.getLineMinColumn(i))),s=e.model._setTrackedRange(this._modelTrackedRange,new at(n.lineNumber,n.column,n.lineNumber,n.column),1),l=e.viewLayout.getVerticalOffsetForLineNumber(i),d=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=i,this._isValid=!0,this._modelTrackedRange=s,this._startLineDelta=d-l}invalidate(){this._isValid=!1}}class R_i{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,i,n,s,l){const d=this._asMap[e];if(d){const f=d.data,g=f[f.length-3],y=f[f.length-1];if(g===l&&y+1>=n){s>y&&(f[f.length-1]=s);return}f.push(l,n,s)}else{const f=new Jte(e,i,[l,n,s]);this._asMap[e]=f,this.asArray.push(f)}}}class F_i{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,i){const n=this.hiddenAreas.get(e);n&&O0t(n,i)||(this.hiddenAreas.set(e,i),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const e=Array.from(this.hiddenAreas.values()).reduce((i,n)=>B_i(i,n),[]);return O0t(this.ranges,e)?this.ranges:(this.ranges=e,this.ranges)}}function B_i(c,e){const i=[];let n=0,s=0;for(;n=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},GA=function(c,e){return function(i,n){e(i,n,c)}},E5;let cq=E5=class extends Ii{get isSimpleWidget(){return this._configuration.isSimpleWidget}get contextMenuId(){return this._configuration.contextMenuId}constructor(e,i,n,s,l,d,f,g,y,w,x,I){var P,O;super(),this.languageConfigurationService=x,this._deliveryQueue=pii(),this._contributions=this._register(new vfi),this._onDidDispose=this._register(new ui),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new ui({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new ui({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new ui({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new ui({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new ui({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new ui({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new ui({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onWillChangeModel=this._register(new ui({deliveryQueue:this._deliveryQueue})),this.onWillChangeModel=this._onWillChangeModel.event,this._onDidChangeModel=this._register(new ui({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new ui({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new ui({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new v1(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new ui({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new R0t({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new R0t({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new v1(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new v1(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new v1(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new v1(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new v1(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new v1(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new v1(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new v1(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new v1(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new v1(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new v1(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new v1(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new v1(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new v1(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new v1(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new v1(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new v1(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new ui({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new ui({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new ui({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new ui({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._updateCounter=0,this._onBeginUpdate=this._register(new ui),this.onBeginUpdate=this._onBeginUpdate.event,this._onEndUpdate=this._register(new ui),this.onEndUpdate=this._onEndUpdate.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),l.willCreateCodeEditor();const W={...i};this._domElement=e,this._overflowWidgetsDomNode=W.overflowWidgetsDomNode,delete W.overflowWidgetsDomNode,this._id=++H_i,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=n.telemetryData,this._configuration=this._register(this._createConfiguration(n.isSimpleWidget||!1,(P=n.contextMenuId)!==null&&P!==void 0?P:n.isSimpleWidget?_t.SimpleEditorContext:_t.EditorContext,W,w)),this._register(this._configuration.onDidChange(ee=>{this._onDidChangeConfiguration.fire(ee);const he=this._configuration.options;if(ee.hasChanged(145)){const we=he.get(145);this._onDidLayoutChange.fire(we)}})),this._contextKeyService=this._register(f.createScoped(this._domElement)),this._notificationService=y,this._codeEditorService=l,this._commandService=d,this._themeService=g,this._register(new z_i(this,this._contextKeyService)),this._register(new U_i(this,this._contextKeyService,I)),this._instantiationService=this._register(s.createChild(new One([Zo,this._contextKeyService]))),this._modelData=null,this._focusTracker=new q_i(e,this._overflowWidgetsDomNode),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={};let X;Array.isArray(n.contributions)?X=n.contributions:X=SU.getEditorContributions(),this._contributions.initialize(this,X,this._instantiationService);for(const ee of SU.getEditorActions()){if(this._actions.has(ee.id)){Ba(new Error(`Cannot have two actions with the same id ${ee.id}`));continue}const he=new nwt(ee.id,ee.label,ee.alias,ee.metadata,(O=ee.precondition)!==null&&O!==void 0?O:void 0,we=>this._instantiationService.invokeFunction(Te=>Promise.resolve(ee.runEditorCommand(Te,this,we))),this._contextKeyService);this._actions.set(he.id,he)}const Z=()=>!this._configuration.options.get(91)&&this._configuration.options.get(36).enabled;this._register(new kri(this._domElement,{onDragOver:ee=>{if(!Z())return;const he=this.getTargetAtClientPoint(ee.clientX,ee.clientY);he!=null&&he.position&&this.showDropIndicatorAt(he.position)},onDrop:async ee=>{if(!Z()||(this.removeDropIndicator(),!ee.dataTransfer))return;const he=this.getTargetAtClientPoint(ee.clientX,ee.clientY);he!=null&&he.position&&this._onDropIntoEditor.fire({position:he.position,event:ee})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){var i;(i=this._modelData)===null||i===void 0||i.view.writeScreenReaderContent(e)}_createConfiguration(e,i,n,s){return new c9e(e,i,n,this._domElement,s)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return xne.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?_u.getWordAtPosition(this._modelData.model,this._configuration.options.get(131),this._configuration.options.get(130),e):null}getValue(e=null){if(!this._modelData)return"";const i=!!(e&&e.preserveBOM);let n=0;return e&&e.lineEnding&&e.lineEnding===` +`?n=1:e&&e.lineEnding&&e.lineEnding===`\r +`&&(n=2),this._modelData.model.getValue(n,i)}setValue(e){try{if(this._beginUpdate(),!this._modelData)return;this._modelData.model.setValue(e)}finally{this._endUpdate()}}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){var i;try{this._beginUpdate();const n=e;if(this._modelData===null&&n===null||this._modelData&&this._modelData.model===n)return;const s={oldModelUrl:((i=this._modelData)===null||i===void 0?void 0:i.model.uri)||null,newModelUrl:(n==null?void 0:n.uri)||null};this._onWillChangeModel.fire(s);const l=this.hasTextFocus(),d=this._detachModel();this._attachModel(n),l&&this.hasModel()&&this.focus(),this._removeDecorationTypes(),this._onDidChangeModel.fire(s),this._postDetachModelCleanup(d),this._contributionsDisposable=this._contributions.onAfterModelAttached()}finally{this._endUpdate()}}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const i=this._decorationTypeSubtypes[e];for(const n in i)this._removeDecorationType(e+"-"+n)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,i,n,s){const l=e.model.validatePosition({lineNumber:i,column:n}),d=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(l);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(d.lineNumber,s)}getTopForLineNumber(e,i=!1){return this._modelData?E5._getVerticalOffsetForPosition(this._modelData,e,1,i):-1}getTopForPosition(e,i){return this._modelData?E5._getVerticalOffsetForPosition(this._modelData,e,i,!1):-1}static _getVerticalOffsetForPosition(e,i,n,s=!1){const l=e.model.validatePosition({lineNumber:i,column:n}),d=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(l);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(d.lineNumber,s)}getBottomForLineNumber(e,i=!1){return this._modelData?E5._getVerticalOffsetAfterPosition(this._modelData,e,1,i):-1}setHiddenAreas(e,i){var n;(n=this._modelData)===null||n===void 0||n.viewModel.setHiddenAreas(e.map(s=>at.lift(s)),i)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const i=this._modelData.model.validatePosition(e),n=this._modelData.model.getOptions().tabSize;return ng.visibleColumnFromColumn(this._modelData.model.getLineContent(i.lineNumber),i.column,n)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,i="api"){if(this._modelData){if(!yi.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(i,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,i,n,s){if(!this._modelData)return;if(!at.isIRange(e))throw new Error("Invalid arguments");const l=this._modelData.model.validateRange(e),d=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(l);this._modelData.viewModel.revealRange("api",n,d,i,s)}revealLine(e,i=0){this._revealLine(e,0,i)}revealLineInCenter(e,i=0){this._revealLine(e,1,i)}revealLineInCenterIfOutsideViewport(e,i=0){this._revealLine(e,2,i)}revealLineNearTop(e,i=0){this._revealLine(e,5,i)}_revealLine(e,i,n){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new at(e,1,e,1),i,!1,n)}revealPosition(e,i=0){this._revealPosition(e,0,!0,i)}revealPositionInCenter(e,i=0){this._revealPosition(e,1,!0,i)}revealPositionInCenterIfOutsideViewport(e,i=0){this._revealPosition(e,2,!0,i)}revealPositionNearTop(e,i=0){this._revealPosition(e,5,!0,i)}_revealPosition(e,i,n,s){if(!yi.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new at(e.lineNumber,e.column,e.lineNumber,e.column),i,n,s)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,i="api"){const n=Qs.isISelection(e),s=at.isIRange(e);if(!n&&!s)throw new Error("Invalid arguments");if(n)this._setSelectionImpl(e,i);else if(s){const l={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(l,i)}}_setSelectionImpl(e,i){if(!this._modelData)return;const n=new Qs(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(i,[n])}revealLines(e,i,n=0){this._revealLines(e,i,0,n)}revealLinesInCenter(e,i,n=0){this._revealLines(e,i,1,n)}revealLinesInCenterIfOutsideViewport(e,i,n=0){this._revealLines(e,i,2,n)}revealLinesNearTop(e,i,n=0){this._revealLines(e,i,5,n)}_revealLines(e,i,n,s){if(typeof e!="number"||typeof i!="number")throw new Error("Invalid arguments");this._sendRevealRange(new at(e,1,i,1),n,!1,s)}revealRange(e,i=0,n=!1,s=!0){this._revealRange(e,n?1:0,s,i)}revealRangeInCenter(e,i=0){this._revealRange(e,1,!0,i)}revealRangeInCenterIfOutsideViewport(e,i=0){this._revealRange(e,2,!0,i)}revealRangeNearTop(e,i=0){this._revealRange(e,5,!0,i)}revealRangeNearTopIfOutsideViewport(e,i=0){this._revealRange(e,6,!0,i)}revealRangeAtTop(e,i=0){this._revealRange(e,3,!0,i)}_revealRange(e,i,n,s){if(!at.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(at.lift(e),i,n,s)}setSelections(e,i="api",n=0){if(this._modelData){if(!e||e.length===0)throw new Error("Invalid arguments");for(let s=0,l=e.length;s0&&this._modelData.viewModel.restoreCursorState(n):this._modelData.viewModel.restoreCursorState([n]),this._contributions.restoreViewState(i.contributionsState||{});const s=this._modelData.viewModel.reduceRestoreState(i.viewState);this._modelData.view.restoreState(s)}}handleInitialized(){var e;(e=this._getViewModel())===null||e===void 0||e.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter(i=>i.isSupported()),e}getAction(e){return this._actions.get(e)||null}trigger(e,i,n){n=n||{};try{switch(this._beginUpdate(),i){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{const l=n;this._type(e,l.text||"");return}case"replacePreviousChar":{const l=n;this._compositionType(e,l.text||"",l.replaceCharCnt||0,0,0);return}case"compositionType":{const l=n;this._compositionType(e,l.text||"",l.replacePrevCharCnt||0,l.replaceNextCharCnt||0,l.positionDelta||0);return}case"paste":{const l=n;this._paste(e,l.text||"",l.pasteOnNewLine||!1,l.multicursorText||null,l.mode||null,l.clipboardEvent);return}case"cut":this._cut(e);return}const s=this.getAction(i);if(s){Promise.resolve(s.run(n)).then(void 0,Ba);return}if(!this._modelData||this._triggerEditorCommand(e,i,n))return;this._triggerCommand(i,n)}finally{this._endUpdate()}}_triggerCommand(e,i){this._commandService.executeCommand(e,i)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,i){!this._modelData||i.length===0||(e==="keyboard"&&this._onWillType.fire(i),this._modelData.viewModel.type(i,e),e==="keyboard"&&this._onDidType.fire(i))}_compositionType(e,i,n,s,l){this._modelData&&this._modelData.viewModel.compositionType(i,n,s,l,e)}_paste(e,i,n,s,l,d){if(!this._modelData)return;const f=this._modelData.viewModel,g=f.getSelection().getStartPosition();f.paste(i,n,s,e);const y=f.getSelection().getStartPosition();e==="keyboard"&&this._onDidPaste.fire({clipboardEvent:d,range:new at(g.lineNumber,g.column,y.lineNumber,y.column),languageId:l})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,i,n){const s=SU.getEditorCommand(i);return s?(n=n||{},n.source=e,this._instantiationService.invokeFunction(l=>{Promise.resolve(s.runEditorCommand(l,this,n)).then(void 0,Ba)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(91)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(91)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(e,i,n){if(!this._modelData||this._configuration.options.get(91))return!1;let s;return n?Array.isArray(n)?s=()=>n:s=n:s=()=>null,this._modelData.viewModel.executeEdits(e,i,s),!0}executeCommand(e,i){this._modelData&&this._modelData.viewModel.executeCommand(i,e)}executeCommands(e,i){this._modelData&&this._modelData.viewModel.executeCommands(i,e)}createDecorationsCollection(e){return new $_i(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,D0e(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,D0e(this._configuration.options)):null}deltaDecorations(e,i){return this._modelData?e.length===0&&i.length===0?e:this._modelData.model.deltaDecorations(e,i,this._id):[]}removeDecorations(e){!this._modelData||e.length===0||this._modelData.model.changeDecorations(i=>{i.deltaDecorations(e,[])})}removeDecorationsByType(e){const i=this._decorationTypeKeysToIds[e];i&&this.changeDecorations(n=>n.deltaDecorations(i,[])),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(145)}createOverviewRuler(e){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(e)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e,i=!1){this._configuration.observeContainer(e),i||this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const i={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id:"+e.getId()),this._contentWidgets[e.getId()]=i,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(i)}layoutContentWidget(e){const i=e.getId();if(this._contentWidgets.hasOwnProperty(i)){const n=this._contentWidgets[i];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(n)}}removeContentWidget(e){const i=e.getId();if(this._contentWidgets.hasOwnProperty(i)){const n=this._contentWidgets[i];delete this._contentWidgets[i],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(n)}}addOverlayWidget(e){const i={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=i,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(i)}layoutOverlayWidget(e){const i=e.getId();if(this._overlayWidgets.hasOwnProperty(i)){const n=this._overlayWidgets[i];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(n)}}removeOverlayWidget(e){const i=e.getId();if(this._overlayWidgets.hasOwnProperty(i)){const n=this._overlayWidgets[i];delete this._overlayWidgets[i],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(n)}}addGlyphMarginWidget(e){const i={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=i,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(i)}layoutGlyphMarginWidget(e){const i=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(i)){const n=this._glyphMarginWidgets[i];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(n)}}removeGlyphMarginWidget(e){const i=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(i)){const n=this._glyphMarginWidgets[i];delete this._glyphMarginWidgets[i],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(n)}}changeViewZones(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(e)}getTargetAtClientPoint(e,i){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(e,i)}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const i=this._modelData.model.validatePosition(e),n=this._configuration.options,s=n.get(145),l=E5._getVerticalOffsetForPosition(this._modelData,i.lineNumber,i.column)-this.getScrollTop(),d=this._modelData.view.getOffsetForColumn(i.lineNumber,i.column)+s.glyphMarginWidth+s.lineNumbersWidth+s.decorationsWidth-this.getScrollLeft();return{top:l,left:d,height:n.get(67)}}getOffsetForColumn(e,i){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(e,i)}render(e=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.viewModel.batchEvents(()=>{this._modelData.view.render(!0,e)})}setAriaOptions(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(e)}applyFontInfo(e){s0(e,this._configuration.options.get(50))}setBanner(e,i){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=e,this._configuration.setReservedHeight(e?i:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e){this._modelData=null;return}const i=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());const n=e.onBeforeAttached(),s=new M_i(this._id,this._configuration,e,Sje.create(Io(this._domElement)),Aje.create(this._configuration.options),f=>zC(Io(this._domElement),f),this.languageConfigurationService,this._themeService,n);i.push(e.onWillDispose(()=>this.setModel(null))),i.push(s.onEvent(f=>{switch(f.kind){case 0:this._onDidContentSizeChange.fire(f);break;case 1:this._editorTextFocus.setValue(f.hasFocus);break;case 2:this._onDidScrollChange.fire(f);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(f.reachedMaxCursorCount){const x=this.getOption(80),I=V("cursors.maximum","The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",x);this._notificationService.prompt(vye.Warning,I,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:V("goToSetting","Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const g=[];for(let x=0,I=f.selections.length;x{this._paste("keyboard",l,d,f,g)},type:l=>{this._type("keyboard",l)},compositionType:(l,d,f,g)=>{this._compositionType("keyboard",l,d,f,g)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:i={paste:(l,d,f,g)=>{const y={text:l,pasteOnNewLine:d,multicursorText:f,mode:g};this._commandService.executeCommand("paste",y)},type:l=>{const d={text:l};this._commandService.executeCommand("type",d)},compositionType:(l,d,f,g)=>{if(f||g){const y={text:l,replacePrevCharCnt:d,replaceNextCharCnt:f,positionDelta:g};this._commandService.executeCommand("compositionType",y)}else{const y={text:l,replaceCharCnt:d};this._commandService.executeCommand("replacePreviousChar",y)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const n=new hye(e.coordinatesConverter);return n.onKeyDown=l=>this._onKeyDown.fire(l),n.onKeyUp=l=>this._onKeyUp.fire(l),n.onContextMenu=l=>this._onContextMenu.fire(l),n.onMouseMove=l=>this._onMouseMove.fire(l),n.onMouseLeave=l=>this._onMouseLeave.fire(l),n.onMouseDown=l=>this._onMouseDown.fire(l),n.onMouseUp=l=>this._onMouseUp.fire(l),n.onMouseDrag=l=>this._onMouseDrag.fire(l),n.onMouseDrop=l=>this._onMouseDrop.fire(l),n.onMouseDropCanceled=l=>this._onMouseDropCanceled.fire(l),n.onMouseWheel=l=>this._onMouseWheel.fire(l),[new C9e(i,this._configuration,this._themeService.getColorTheme(),e,n,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(e){e==null||e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){var e;if((e=this._contributionsDisposable)===null||e===void 0||e.dispose(),this._contributionsDisposable=void 0,!this._modelData)return null;const i=this._modelData.model,n=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),n&&this._domElement.contains(n)&&this._domElement.removeChild(n),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),i}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return this._modelData!==null}showDropIndicatorAt(e){const i=[{range:new at(e.lineNumber,e.column,e.lineNumber,e.column),options:E5.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(i),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(e,i){this._contextKeyService.createKey(e,i)}_beginUpdate(){this._updateCounter++,this._updateCounter===1&&this._onBeginUpdate.fire()}_endUpdate(){this._updateCounter--,this._updateCounter===0&&this._onEndUpdate.fire()}};cq.dropIntoEditorDecorationOptions=Xa.register({description:"workbench-dnd-target",className:"dnd-target"});cq=E5=V_i([GA(3,So),GA(4,Oc),GA(5,ff),GA(6,Zo),GA(7,og),GA(8,L_),GA(9,$C),GA(10,Kd),GA(11,js)],cq);let H_i=0,j_i=class{constructor(e,i,n,s,l,d){this.model=e,this.viewModel=i,this.view=n,this.hasRealView=s,this.listenersToRemove=l,this.attachedView=d}dispose(){yd(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}};class R0t extends Ii{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new ui(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new ui(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const i=e?2:1;this._value!==i&&(this._value=i,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}class v1 extends ui{constructor(e,i){super({deliveryQueue:i}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}}class z_i extends Ii{constructor(e,i){super(),this._editor=e,i.createKey("editorId",e.getId()),this._editorSimpleInput=Lt.editorSimpleInput.bindTo(i),this._editorFocus=Lt.focus.bindTo(i),this._textInputFocus=Lt.textInputFocus.bindTo(i),this._editorTextFocus=Lt.editorTextFocus.bindTo(i),this._tabMovesFocus=Lt.tabMovesFocus.bindTo(i),this._editorReadonly=Lt.readOnly.bindTo(i),this._inDiffEditor=Lt.inDiffEditor.bindTo(i),this._editorColumnSelection=Lt.columnSelection.bindTo(i),this._hasMultipleSelections=Lt.hasMultipleSelections.bindTo(i),this._hasNonEmptySelection=Lt.hasNonEmptySelection.bindTo(i),this._canUndo=Lt.canUndo.bindTo(i),this._canRedo=Lt.canRedo.bindTo(i),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._register(tq.onDidChangeTabFocus(n=>this._tabMovesFocus.set(n))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._tabMovesFocus.set(tq.getTabFocusMode()),this._editorReadonly.set(e.get(91)),this._inDiffEditor.set(e.get(61)),this._editorColumnSelection.set(e.get(22))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(i=>!i.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(!!(e&&e.canUndo())),this._canRedo.set(!!(e&&e.canRedo()))}}class U_i extends Ii{constructor(e,i,n){super(),this._editor=e,this._contextKeyService=i,this._languageFeaturesService=n,this._langId=Lt.languageId.bindTo(i),this._hasCompletionItemProvider=Lt.hasCompletionItemProvider.bindTo(i),this._hasCodeActionsProvider=Lt.hasCodeActionsProvider.bindTo(i),this._hasCodeLensProvider=Lt.hasCodeLensProvider.bindTo(i),this._hasDefinitionProvider=Lt.hasDefinitionProvider.bindTo(i),this._hasDeclarationProvider=Lt.hasDeclarationProvider.bindTo(i),this._hasImplementationProvider=Lt.hasImplementationProvider.bindTo(i),this._hasTypeDefinitionProvider=Lt.hasTypeDefinitionProvider.bindTo(i),this._hasHoverProvider=Lt.hasHoverProvider.bindTo(i),this._hasDocumentHighlightProvider=Lt.hasDocumentHighlightProvider.bindTo(i),this._hasDocumentSymbolProvider=Lt.hasDocumentSymbolProvider.bindTo(i),this._hasReferenceProvider=Lt.hasReferenceProvider.bindTo(i),this._hasRenameProvider=Lt.hasRenameProvider.bindTo(i),this._hasSignatureHelpProvider=Lt.hasSignatureHelpProvider.bindTo(i),this._hasInlayHintsProvider=Lt.hasInlayHintsProvider.bindTo(i),this._hasDocumentFormattingProvider=Lt.hasDocumentFormattingProvider.bindTo(i),this._hasDocumentSelectionFormattingProvider=Lt.hasDocumentSelectionFormattingProvider.bindTo(i),this._hasMultipleDocumentFormattingProvider=Lt.hasMultipleDocumentFormattingProvider.bindTo(i),this._hasMultipleDocumentSelectionFormattingProvider=Lt.hasMultipleDocumentSelectionFormattingProvider.bindTo(i),this._isInEmbeddedEditor=Lt.isInEmbeddedEditor.bindTo(i);const s=()=>this._update();this._register(e.onDidChangeModel(s)),this._register(e.onDidChangeModelLanguage(s)),this._register(n.completionProvider.onDidChange(s)),this._register(n.codeActionProvider.onDidChange(s)),this._register(n.codeLensProvider.onDidChange(s)),this._register(n.definitionProvider.onDidChange(s)),this._register(n.declarationProvider.onDidChange(s)),this._register(n.implementationProvider.onDidChange(s)),this._register(n.typeDefinitionProvider.onDidChange(s)),this._register(n.hoverProvider.onDidChange(s)),this._register(n.documentHighlightProvider.onDidChange(s)),this._register(n.documentSymbolProvider.onDidChange(s)),this._register(n.referenceProvider.onDidChange(s)),this._register(n.renameProvider.onDidChange(s)),this._register(n.documentFormattingEditProvider.onDidChange(s)),this._register(n.documentRangeFormattingEditProvider.onDidChange(s)),this._register(n.signatureHelpProvider.onDidChange(s)),this._register(n.inlayHintsProvider.onDidChange(s)),s()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInEmbeddedEditor.reset()})}_update(){const e=this._editor.getModel();if(!e){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInEmbeddedEditor.set(e.uri.scheme===wa.walkThroughSnippet||e.uri.scheme===wa.vscodeChatCodeBlock)})}}class q_i extends Ii{constructor(e,i){super(),this._onChange=this._register(new ui),this.onChange=this._onChange.event,this._hadFocus=void 0,this._hasDomElementFocus=!1,this._domFocusTracker=this._register(IE(e)),this._overflowWidgetsDomNodeHasFocus=!1,this._register(this._domFocusTracker.onDidFocus(()=>{this._hasDomElementFocus=!0,this._update()})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasDomElementFocus=!1,this._update()})),i&&(this._overflowWidgetsDomNode=this._register(IE(i)),this._register(this._overflowWidgetsDomNode.onDidFocus(()=>{this._overflowWidgetsDomNodeHasFocus=!0,this._update()})),this._register(this._overflowWidgetsDomNode.onDidBlur(()=>{this._overflowWidgetsDomNodeHasFocus=!1,this._update()})))}_update(){const e=this._hasDomElementFocus||this._overflowWidgetsDomNodeHasFocus;this._hadFocus!==e&&(this._hadFocus=e,this._onChange.fire(void 0))}hasFocus(){var e;return(e=this._hadFocus)!==null&&e!==void 0?e:!1}}class $_i{get length(){return this._decorationIds.length}constructor(e,i){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(i)&&i.length>0&&this.set(i)}onDidChange(e,i,n){return this._editor.onDidChangeModelDecorations(s=>{this._isChangingDecorations||e.call(i,s)},n)}getRange(e){return!this._editor.hasModel()||e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e])}getRanges(){if(!this._editor.hasModel())return[];const e=this._editor.getModel(),i=[];for(const n of this._decorationIds){const s=e.getDecorationRange(n);s&&i.push(s)}return i}has(e){return this._decorationIds.includes(e.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations(i=>{this._decorationIds=i.deltaDecorations(this._decorationIds,e)})}finally{this._isChangingDecorations=!1}return this._decorationIds}append(e){let i=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations(n=>{i=n.deltaDecorations([],e),this._decorationIds=this._decorationIds.concat(i)})}finally{this._isChangingDecorations=!1}return i}}const J_i=encodeURIComponent("");function C7e(c){return J_i+encodeURIComponent(c.toString())+G_i}const K_i=encodeURIComponent('');function X_i(c){return K_i+encodeURIComponent(c.toString())+Q_i}dk((c,e)=>{const i=c.getColor(ZN);i&&e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${C7e(i)}") repeat-x bottom left; }`);const n=c.getColor(k1);n&&e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${C7e(n)}") repeat-x bottom left; }`);const s=c.getColor(xb);s&&e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${C7e(s)}") repeat-x bottom left; }`);const l=c.getColor(oli);l&&e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${X_i(l)}") no-repeat bottom left; }`);const d=c.getColor(Pui);d&&e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${d.rgba.a}; }`)});var Z_i=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Y_i=function(c,e){return function(i,n){e(i,n,c)}};let B9e=class extends Ii{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new ui),this._onCodeEditorAdd=this._register(new ui),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new ui),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new ui),this._onDiffEditorAdd=this._register(new ui),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new ui),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new yy,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null;const i=this.listCodeEditors();for(const n of i){if(n.hasTextFocus())return n;n.hasWidgetFocus()&&(e=n)}return e}removeDecorationType(e){const i=this._decorationOptionProviders.get(e);i&&(i.refCount--,i.refCount<=0&&(this._decorationOptionProviders.delete(e),i.dispose(),this.listCodeEditors().forEach(n=>n.removeDecorationsByType(e))))}setModelProperty(e,i,n){const s=e.toString();let l;this._modelProperties.has(s)?l=this._modelProperties.get(s):(l=new Map,this._modelProperties.set(s,l)),l.set(i,n)}getModelProperty(e,i){const n=e.toString();if(this._modelProperties.has(n))return this._modelProperties.get(n).get(i)}async openCodeEditor(e,i,n){for(const s of this._codeEditorOpenHandlers){const l=await s(e,i,n);if(l!==null)return l}return null}registerCodeEditorOpenHandler(e){const i=this._codeEditorOpenHandlers.unshift(e);return go(i)}};B9e=Z_i([Y_i(0,og)],B9e);var epi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},F0t=function(c,e){return function(i,n){e(i,n,c)}};let hve=class extends B9e{constructor(e,i){super(i),this._register(this.onCodeEditorAdd(()=>this._checkContextKey())),this._register(this.onCodeEditorRemove(()=>this._checkContextKey())),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler(async(n,s,l)=>s?this.doOpenEditor(s,n):null))}_checkContextKey(){let e=!1;for(const i of this.listCodeEditors())if(!i.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,i){if(!this.findModel(e,i.resource)){if(i.resource){const l=i.resource.scheme;if(l===wa.http||l===wa.https)return TCt(i.resource.toString()),e}return null}const s=i.options?i.options.selection:null;if(s)if(typeof s.endLineNumber=="number"&&typeof s.endColumn=="number")e.setSelection(s),e.revealRangeInCenter(s,1);else{const l={lineNumber:s.startLineNumber,column:s.startColumn};e.setPosition(l),e.revealPositionInCenter(l,1)}return e}findModel(e,i){const n=e.getModel();return n&&n.uri.toString()!==i.toString()?null:n}};hve=epi([F0t(0,Zo),F0t(1,og)],hve);dc(Oc,hve,0);const DR=Kl("layoutService");var Ewt=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Iwt=function(c,e){return function(i,n){e(i,n,c)}};let _ve=class{get mainContainer(){var e,i;return(i=(e=fHe(this._codeEditorService.listCodeEditors()))===null||e===void 0?void 0:e.getContainerDomNode())!==null&&i!==void 0?i:ed.document.body}get activeContainer(){var e,i;const n=(e=this._codeEditorService.getFocusedCodeEditor())!==null&&e!==void 0?e:this._codeEditorService.getActiveCodeEditor();return(i=n==null?void 0:n.getContainerDomNode())!==null&&i!==void 0?i:this.mainContainer}get mainContainerDimension(){return iR(this.mainContainer)}get activeContainerDimension(){return iR(this.activeContainer)}get containers(){return kE(this._codeEditorService.listCodeEditors().map(e=>e.getContainerDomNode()))}getContainer(){return this.activeContainer}whenContainerStylesLoaded(){}focus(){var e;(e=this._codeEditorService.getFocusedCodeEditor())===null||e===void 0||e.focus()}constructor(e){this._codeEditorService=e,this.onDidLayoutMainContainer=Mr.None,this.onDidLayoutActiveContainer=Mr.None,this.onDidLayoutContainer=Mr.None,this.onDidChangeActiveContainer=Mr.None,this.onDidAddContainer=Mr.None,this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};_ve=Ewt([Iwt(0,Oc)],_ve);let W9e=class extends _ve{get mainContainer(){return this._container}constructor(e,i){super(i),this._container=e}};W9e=Ewt([Iwt(1,Oc)],W9e);dc(DR,_ve,1);const Mne=Kl("dialogService");var tpi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},B0t=function(c,e){return function(i,n){e(i,n,c)}};function Hge(c){return c.scheme===wa.file?c.fsPath:c.path}let Nwt=0;class jge{constructor(e,i,n,s,l,d,f){this.id=++Nwt,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=i,this.strResource=n,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=s,this.groupOrder=l,this.sourceId=d,this.sourceOrder=f,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class W0t{constructor(e,i){this.resourceLabel=e,this.reason=i}}class V0t{constructor(){this.elements=new Map}createMessage(){const e=[],i=[];for(const[,s]of this.elements)(s.reason===0?e:i).push(s.resourceLabel);const n=[];return e.length>0&&n.push(V({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),i.length>0&&n.push(V({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",i.join(", "))),n.join(` +`)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,i){this.elements.set(e,i)}delete(e){return this.elements.delete(e)}}class ipi{constructor(e,i,n,s,l,d,f){this.id=++Nwt,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=i,this.strResources=n,this.groupId=s,this.groupOrder=l,this.sourceId=d,this.sourceOrder=f,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,i,n){this.removedResources||(this.removedResources=new V0t),this.removedResources.has(i)||this.removedResources.set(i,new W0t(e,n))}setValid(e,i,n){n?this.invalidatedResources&&(this.invalidatedResources.delete(i),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new V0t),this.invalidatedResources.has(i)||this.invalidatedResources.set(i,new W0t(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class Lwt{constructor(e,i){this.resourceLabel=e,this.strResource=i,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let i=0;i=0;i--)e.push(` * [REDO] ${this._future[i]}`);return e.join(` +`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,i){e.type===1?e.setValid(this.resourceLabel,this.strResource,i):e.setValid(i)}setElementsValidFlag(e,i){for(const n of this._past)i(n.actual)&&this._setElementValidFlag(n,e);for(const n of this._future)i(n.actual)&&this._setElementValidFlag(n,e)}pushElement(e){for(const i of this._future)i.type===1&&i.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const i=[];for(let n=0,s=this._past.length;n=0;n--)i.push(this._future[n].id);return new Swt(e,i)}restoreSnapshot(e){const i=e.elements.length;let n=!0,s=0,l=-1;for(let f=0,g=this._past.length;f=i||y.id!==e.elements[s])&&(n=!1,l=0),!n&&y.type===1&&y.removeResource(this.resourceLabel,this.strResource,0)}let d=-1;for(let f=this._future.length-1;f>=0;f--,s++){const g=this._future[f];n&&(s>=i||g.id!==e.elements[s])&&(n=!1,d=f),!n&&g.type===1&&g.removeResource(this.resourceLabel,this.strResource,0)}l!==-1&&(this._past=this._past.slice(0,l)),d!==-1&&(this._future=this._future.slice(d+1)),this.versionId++}getElements(){const e=[],i=[];for(const n of this._past)e.push(n.actual);for(const n of this._future)i.push(n.actual);return{past:e,future:i}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,i){for(let n=this._past.length-1;n>=0;n--)if(this._past[n]===e){i.has(this.strResource)?this._past[n]=i.get(this.strResource):this._past.splice(n,1);break}this.versionId++}splitFutureWorkspaceElement(e,i){for(let n=this._future.length-1;n>=0;n--)if(this._future[n]===e){i.has(this.strResource)?this._future[n]=i.get(this.strResource):this._future.splice(n,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class S7e{constructor(e){this.editStacks=e,this._versionIds=[];for(let i=0,n=this.editStacks.length;ii.sourceOrder)&&(i=d,n=s)}return[i,n]}canUndo(e){if(e instanceof $N){const[,n]=this._findClosestUndoElementWithSource(e.id);return!!n}const i=this.getUriComparisonKey(e);return this._editStacks.has(i)?this._editStacks.get(i).hasPastElements():!1}_onError(e,i){Ba(e);for(const n of i.strResources)this.removeElements(n);this._notificationService.error(e)}_acquireLocks(e){for(const i of e.editStacks)if(i.locked)throw new Error("Cannot acquire edit stack lock");for(const i of e.editStacks)i.locked=!0;return()=>{for(const i of e.editStacks)i.locked=!1}}_safeInvokeWithLocks(e,i,n,s,l){const d=this._acquireLocks(n);let f;try{f=i()}catch(g){return d(),s.dispose(),this._onError(g,e)}return f?f.then(()=>(d(),s.dispose(),l()),g=>(d(),s.dispose(),this._onError(g,e))):(d(),s.dispose(),l())}async _invokeWorkspacePrepare(e){if(typeof e.actual.prepareUndoRedo>"u")return Ii.None;const i=e.actual.prepareUndoRedo();return typeof i>"u"?Ii.None:i}_invokeResourcePrepare(e,i){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return i(Ii.None);const n=e.actual.prepareUndoRedo();return n?A1e(n)?i(n):n.then(s=>i(s)):i(Ii.None)}_getAffectedEditStacks(e){const i=[];for(const n of e.strResources)i.push(this._editStacks.get(n)||Pwt);return new S7e(i)}_tryToSplitAndUndo(e,i,n,s){if(i.canSplit())return this._splitPastWorkspaceElement(i,n),this._notificationService.warn(s),new zge(this._undo(e,0,!0));for(const l of i.strResources)this.removeElements(l);return this._notificationService.warn(s),new zge}_checkWorkspaceUndo(e,i,n,s){if(i.removedResources)return this._tryToSplitAndUndo(e,i,i.removedResources,V({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",i.label,i.removedResources.createMessage()));if(s&&i.invalidatedResources)return this._tryToSplitAndUndo(e,i,i.invalidatedResources,V({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",i.label,i.invalidatedResources.createMessage()));const l=[];for(const f of n.editStacks)f.getClosestPastElement()!==i&&l.push(f.resourceLabel);if(l.length>0)return this._tryToSplitAndUndo(e,i,null,V({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",i.label,l.join(", ")));const d=[];for(const f of n.editStacks)f.locked&&d.push(f.resourceLabel);return d.length>0?this._tryToSplitAndUndo(e,i,null,V({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",i.label,d.join(", "))):n.isValid()?null:this._tryToSplitAndUndo(e,i,null,V({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",i.label))}_workspaceUndo(e,i,n){const s=this._getAffectedEditStacks(i),l=this._checkWorkspaceUndo(e,i,s,!1);return l?l.returnValue:this._confirmAndExecuteWorkspaceUndo(e,i,s,n)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,i]of this._editStacks){const n=i.getClosestPastElement();if(n){if(n===e){const s=i.getSecondClosestPastElement();if(s&&s.groupId===e.groupId)return!0}if(n.groupId===e.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(e,i,n,s){if(i.canSplit()&&!this._isPartOfUndoGroup(i)){let f;(function(w){w[w.All=0]="All",w[w.This=1]="This",w[w.Cancel=2]="Cancel"})(f||(f={}));const{result:g}=await this._dialogService.prompt({type:D_.Info,message:V("confirmWorkspace","Would you like to undo '{0}' across all files?",i.label),buttons:[{label:V({key:"ok",comment:["{0} denotes a number that is > 1, && denotes a mnemonic"]},"&&Undo in {0} Files",n.editStacks.length),run:()=>f.All},{label:V({key:"nok",comment:["&& denotes a mnemonic"]},"Undo this &&File"),run:()=>f.This}],cancelButton:{run:()=>f.Cancel}});if(g===f.Cancel)return;if(g===f.This)return this._splitPastWorkspaceElement(i,null),this._undo(e,0,!0);const y=this._checkWorkspaceUndo(e,i,n,!1);if(y)return y.returnValue;s=!0}let l;try{l=await this._invokeWorkspacePrepare(i)}catch(f){return this._onError(f,i)}const d=this._checkWorkspaceUndo(e,i,n,!0);if(d)return l.dispose(),d.returnValue;for(const f of n.editStacks)f.moveBackward(i);return this._safeInvokeWithLocks(i,()=>i.actual.undo(),n,l,()=>this._continueUndoInGroup(i.groupId,s))}_resourceUndo(e,i,n){if(!i.isValid){e.flushAllElements();return}if(e.locked){const s=V({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",i.label);this._notificationService.warn(s);return}return this._invokeResourcePrepare(i,s=>(e.moveBackward(i),this._safeInvokeWithLocks(i,()=>i.actual.undo(),new S7e([e]),s,()=>this._continueUndoInGroup(i.groupId,n))))}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let i=null,n=null;for(const[s,l]of this._editStacks){const d=l.getClosestPastElement();d&&d.groupId===e&&(!i||d.groupOrder>i.groupOrder)&&(i=d,n=s)}return[i,n]}_continueUndoInGroup(e,i){if(!e)return;const[,n]=this._findClosestUndoElementInGroup(e);if(n)return this._undo(n,0,i)}undo(e){if(e instanceof $N){const[,i]=this._findClosestUndoElementWithSource(e.id);return i?this._undo(i,e.id,!1):void 0}return typeof e=="string"?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,i=0,n){if(!this._editStacks.has(e))return;const s=this._editStacks.get(e),l=s.getClosestPastElement();if(!l)return;if(l.groupId){const[f,g]=this._findClosestUndoElementInGroup(l.groupId);if(l!==f&&g)return this._undo(g,i,n)}if((l.sourceId!==i||l.confirmBeforeUndo)&&!n)return this._confirmAndContinueUndo(e,i,l);try{return l.type===1?this._workspaceUndo(e,l,n):this._resourceUndo(s,l,n)}finally{}}async _confirmAndContinueUndo(e,i,n){if((await this._dialogService.confirm({message:V("confirmDifferentSource","Would you like to undo '{0}'?",n.label),primaryButton:V({key:"confirmDifferentSource.yes",comment:["&& denotes a mnemonic"]},"&&Yes"),cancelButton:V("confirmDifferentSource.no","No")})).confirmed)return this._undo(e,i,!0)}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let i=null,n=null;for(const[s,l]of this._editStacks){const d=l.getClosestFutureElement();d&&d.sourceId===e&&(!i||d.sourceOrder0)return this._tryToSplitAndRedo(e,i,null,V({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",i.label,l.join(", ")));const d=[];for(const f of n.editStacks)f.locked&&d.push(f.resourceLabel);return d.length>0?this._tryToSplitAndRedo(e,i,null,V({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",i.label,d.join(", "))):n.isValid()?null:this._tryToSplitAndRedo(e,i,null,V({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",i.label))}_workspaceRedo(e,i){const n=this._getAffectedEditStacks(i),s=this._checkWorkspaceRedo(e,i,n,!1);return s?s.returnValue:this._executeWorkspaceRedo(e,i,n)}async _executeWorkspaceRedo(e,i,n){let s;try{s=await this._invokeWorkspacePrepare(i)}catch(d){return this._onError(d,i)}const l=this._checkWorkspaceRedo(e,i,n,!0);if(l)return s.dispose(),l.returnValue;for(const d of n.editStacks)d.moveForward(i);return this._safeInvokeWithLocks(i,()=>i.actual.redo(),n,s,()=>this._continueRedoInGroup(i.groupId))}_resourceRedo(e,i){if(!i.isValid){e.flushAllElements();return}if(e.locked){const n=V({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",i.label);this._notificationService.warn(n);return}return this._invokeResourcePrepare(i,n=>(e.moveForward(i),this._safeInvokeWithLocks(i,()=>i.actual.redo(),new S7e([e]),n,()=>this._continueRedoInGroup(i.groupId))))}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let i=null,n=null;for(const[s,l]of this._editStacks){const d=l.getClosestFutureElement();d&&d.groupId===e&&(!i||d.groupOrder=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},H0t=function(c,e){return function(i,n){e(i,n,c)}};const fk=Kl("ILanguageFeatureDebounceService");var pve;(function(c){const e=new WeakMap;let i=0;function n(s){let l=e.get(s);return l===void 0&&(l=++i,e.set(s,l)),l}c.of=n})(pve||(pve={}));class spi{constructor(e){this._default=e}get(e){return this._default}update(e,i){return this._default}default(){return this._default}}class opi{constructor(e,i,n,s,l,d){this._logService=e,this._name=i,this._registry=n,this._default=s,this._min=l,this._max=d,this._cache=new TL(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((i,n)=>F1e(pve.of(n),i),0)}get(e){const i=this._key(e),n=this._cache.get(i);return n?fy(n.value,this._min,this._max):this.default()}update(e,i){const n=this._key(e);let s=this._cache.get(n);s||(s=new npi(6),this._cache.set(n,s));const l=fy(s.update(i),this._min,this._max);return MHe(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${l}ms`),l}_overall(){const e=new Awt;for(const[,i]of this._cache)e.update(i.value);return e.value}default(){const e=this._overall()|0||this._default;return fy(e,this._min,this._max)}}let H9e=class{constructor(e,i){this._logService=e,this._data=new Map,this._isDev=i.isExtensionDevelopment||!i.isBuilt}for(e,i,n){var s,l,d;const f=(s=n==null?void 0:n.min)!==null&&s!==void 0?s:50,g=(l=n==null?void 0:n.max)!==null&&l!==void 0?l:f**2,y=(d=n==null?void 0:n.key)!==null&&d!==void 0?d:void 0,w=`${pve.of(e)},${f}${y?","+y:""}`;let x=this._data.get(w);return x||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${i}] is disabled in developed mode`),x=new spi(f*1.5)):x=new opi(this._logService,i,e,this._overallAverage()|0||f*1.5,f,g),this._data.set(w,x)),x}_overallAverage(){const e=new Awt;for(const i of this._data.values())e.update(i.default());return e.value}};H9e=rpi([H0t(0,Sv),H0t(1,Hje)],H9e);dc(fk,H9e,1);class _te{static create(e,i){return new _te(e,new gve(i))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,i){this._startLineNumber=e,this._tokens=i,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e&&new at(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn)}removeTokens(e){const i=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(i,e.startColumn-1,n,e.endColumn-1),this._updateEndLineNumber()}split(e){const i=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber,[s,l,d]=this._tokens.split(i,e.startColumn-1,n,e.endColumn-1);return[new _te(this._startLineNumber,s),new _te(this._startLineNumber+d,l)]}applyEdit(e,i){const[n,s,l]=sR(i);this.acceptEdit(e,n,s,l,i.length>0?i.charCodeAt(0):0)}acceptEdit(e,i,n,s,l){this._acceptDeleteRange(e),this._acceptInsertText(new yi(e.startLineNumber,e.startColumn),i,n,s,l),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const i=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;if(n<0){const l=n-i;this._startLineNumber-=l;return}const s=this._tokens.getMaxDeltaLine();if(!(i>=s+1)){if(i<0&&n>=s+1){this._startLineNumber=0,this._tokens.clear();return}if(i<0){const l=-i;this._startLineNumber-=l,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,i,e.startColumn-1,n,e.endColumn-1)}}_acceptInsertText(e,i,n,s,l){if(i===0&&n===0)return;const d=e.lineNumber-this._startLineNumber;if(d<0){this._startLineNumber+=i;return}const f=this._tokens.getMaxDeltaLine();d>=f+1||this._tokens.acceptInsertText(d,e.column-1,i,n,s,l)}}class gve{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const i=[];for(let n=0;ne)n=s-1;else{let d=s;for(;d>i&&this._getDeltaLine(d-1)===e;)d--;let f=s;for(;fe||I===e&&O>=i)&&(Ie||O===e&&X>=i){if(Ol?W-=l-n:W=n;else if(P===i&&O===n)if(P===s&&W>l)W-=l-n;else{w=!0;continue}else if(Pl)P=i,O=n,W=O+(W-l);else{w=!0;continue}else if(P>s){if(g===0&&!w){y=f;break}P-=g}else if(P===s&&O>=l)e&&P===0&&(O+=e,W+=e),P-=g,O-=l-n,W-=l-n;else throw new Error("Not possible!");const Z=4*y;d[Z]=P,d[Z+1]=O,d[Z+2]=W,d[Z+3]=X,y++}this._tokenCount=y}acceptInsertText(e,i,n,s,l,d){const f=n===0&&s===1&&(d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122),g=this._tokens,y=this._tokenCount;for(let w=0;w=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},w7e=function(c,e){return function(i,n){e(i,n,c)}};let j9e=class{constructor(e,i,n,s){this._legend=e,this._themeService=i,this._languageService=n,this._logService=s,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new c4}getMetadata(e,i,n){const s=this._languageService.languageIdCodec.encodeLanguageId(n),l=this._hashTable.get(e,i,s);let d;if(l)d=l.metadata,this._logService.getLevel()===L0.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${i}: foreground ${P0.getForeground(d)}, fontStyle ${P0.getFontStyle(d).toString(2)}`);else{let f=this._legend.tokenTypes[e];const g=[];if(f){let y=i;for(let x=0;y>0&&x>1;y>0&&this._logService.getLevel()===L0.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${i.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),g.push("not-in-legend"));const w=this._themeService.getColorTheme().getTokenStyleMetadata(f,g,n);if(typeof w>"u")d=2147483647;else{if(d=0,typeof w.italic<"u"){const x=(w.italic?1:0)<<11;d|=x|1}if(typeof w.bold<"u"){const x=(w.bold?2:0)<<11;d|=x|2}if(typeof w.underline<"u"){const x=(w.underline?4:0)<<11;d|=x|4}if(typeof w.strikethrough<"u"){const x=(w.strikethrough?8:0)<<11;d|=x|8}if(w.foreground){const x=w.foreground<<15;d|=x|16}d===0&&(d=2147483647)}}else this._logService.getLevel()===L0.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),d=2147483647,f="not-in-legend";this._hashTable.add(e,i,s,d),this._logService.getLevel()===L0.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${f}) / ${i} (${g.join(" ")}): foreground ${P0.getForeground(d)}, fontStyle ${P0.getFontStyle(d).toString(2)}`)}return d}warnOverlappingSemanticTokens(e,i){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${i}`))}warnInvalidLengthSemanticTokens(e,i){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${i}`))}warnInvalidEditStart(e,i,n,s,l){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${i}) at edit #${n}: The provided start offset ${s} is outside the previous data (length ${l}).`))}};j9e=api([w7e(1,og),w7e(2,If),w7e(3,Sv)],j9e);function Owt(c,e,i){const n=c.data,s=c.data.length/5|0,l=Math.max(Math.ceil(s/1024),400),d=[];let f=0,g=1,y=0;for(;fw&&n[5*ee]===0;)ee--;if(ee-1===w){let he=x;for(;he+1Be)e.warnOverlappingSemanticTokens(Te,Be+1);else{const ci=e.getMetadata(Nt,Ni,i);ci!==2147483647&&(O===0&&(O=Te),I[P]=Te-O,I[P+1]=Be,I[P+2]=vt,I[P+3]=ci,P+=4,W=Te,X=vt)}g=Te,y=Be,f++}P!==I.length&&(I=I.subarray(0,P));const Z=_te.create(O,I);d.push(Z)}return d}class lpi{constructor(e,i,n,s){this.tokenTypeIndex=e,this.tokenModifierSet=i,this.languageId=n,this.metadata=s,this.next=null}}class c4{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=c4._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const l=this._elements;this._currentLengthIndex++,this._currentLength=c4._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},x7e=function(c,e){return function(i,n){e(i,n,c)}};let z9e=class extends Ii{constructor(e,i,n){super(),this._themeService=e,this._logService=i,this._languageService=n,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new j9e(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};z9e=cpi([x7e(0,og),x7e(1,Sv),x7e(2,If)],z9e);dc(yye,z9e,1);const Uge="**",z0t="/",t0e="[/\\\\]",i0e="[^/\\\\]",upi=/\//g;function U0t(c,e){switch(c){case 0:return"";case 1:return`${i0e}*?`;default:return`(?:${t0e}|${i0e}+${t0e}${e?`|${t0e}${i0e}+`:""})*?`}}function q0t(c,e){if(!c)return[];const i=[];let n=!1,s=!1,l="";for(const d of c){switch(d){case e:if(!n&&!s){i.push(l),l="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":s=!0;break;case"]":s=!1;break}l+=d}return l&&i.push(l),i}function Mwt(c){if(!c)return"";let e="";const i=q0t(c,z0t);if(i.every(n=>n===Uge))e=".*";else{let n=!1;i.forEach((s,l)=>{if(s===Uge){if(n)return;e+=U0t(2,l===i.length-1)}else{let d=!1,f="",g=!1,y="";for(const w of s){if(w!=="}"&&d){f+=w;continue}if(g&&(w!=="]"||!y)){let x;w==="-"?x=w:(w==="^"||w==="!")&&!y?x="^":w===z0t?x="":x=Cw(w),y+=x;continue}switch(w){case"{":d=!0;continue;case"[":g=!0;continue;case"}":{const I=`(?:${q0t(f,",").map(P=>Mwt(P)).join("|")})`;e+=I,d=!1,f="";break}case"]":{e+="["+y+"]",g=!1,y="";break}case"?":e+=i0e;continue;case"*":e+=U0t(1);continue;default:e+=Cw(w)}}ljje(f,e)).filter(f=>f!==aL),c),n=i.length;if(!n)return aL;if(n===1)return i[0];const s=function(f,g){for(let y=0,w=i.length;y!!f.allBasenames);l&&(s.allBasenames=l.allBasenames);const d=i.reduce((f,g)=>g.allPaths?f.concat(g.allPaths):f,[]);return d.length&&(s.allPaths=d),s}function K0t(c,e,i){const n=vE===gp.sep,s=n?c:c.replace(upi,vE),l=vE+s,d=gp.sep+c;let f;return i?f=function(g,y){return typeof g=="string"&&(g===s||g.endsWith(l)||!n&&(g===c||g.endsWith(d)))?e:null}:f=function(g,y){return typeof g=="string"&&(g===s||!n&&g===c)?e:null},f.allPaths=[(i?"*/":"./")+c],f}function bpi(c){try{const e=new RegExp(`^${Mwt(c)}$`);return function(i){return e.lastIndex=0,typeof i=="string"&&e.test(i)?c:null}}catch{return aL}}function Cpi(c,e,i){return!c||typeof e!="string"?!1:Rwt(c)(e,void 0,i)}function Rwt(c,e={}){if(!c)return J0t;if(typeof c=="string"||Spi(c)){const i=jje(c,e);if(i===aL)return J0t;const n=function(s,l){return!!i(s,l)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return wpi(c,e)}function Spi(c){const e=c;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}function wpi(c,e){const i=Fwt(Object.getOwnPropertyNames(c).map(f=>xpi(f,c[f],e)).filter(f=>f!==aL)),n=i.length;if(!n)return aL;if(!i.some(f=>!!f.requiresSiblings)){if(n===1)return i[0];const f=function(w,x){let I;for(let P=0,O=i.length;P{for(const P of I){const O=await P;if(typeof O=="string")return O}return null})():null},g=i.find(w=>!!w.allBasenames);g&&(f.allBasenames=g.allBasenames);const y=i.reduce((w,x)=>x.allPaths?w.concat(x.allPaths):w,[]);return y.length&&(f.allPaths=y),f}const s=function(f,g,y){let w,x;for(let I=0,P=i.length;I{for(const I of x){const P=await I;if(typeof P=="string")return P}return null})():null},l=i.find(f=>!!f.allBasenames);l&&(s.allBasenames=l.allBasenames);const d=i.reduce((f,g)=>g.allPaths?f.concat(g.allPaths):f,[]);return d.length&&(s.allPaths=d),s}function xpi(c,e,i){if(e===!1)return aL;const n=jje(c,i);if(n===aL)return aL;if(typeof e=="boolean")return n;if(e){const s=e.when;if(typeof s=="string"){const l=(d,f,g,y)=>{if(!y||!n(d,f))return null;const w=s.replace("$(basename)",()=>g),x=y(w);return B5e(x)?x.then(I=>I?c:null):x?c:null};return l.requiresSiblings=!0,l}}return n}function Fwt(c,e){const i=c.filter(f=>!!f.basenames);if(i.length<2)return c;const n=i.reduce((f,g)=>{const y=g.basenames;return y?f.concat(y):f},[]);let s;if(e){s=[];for(let f=0,g=n.length;f{const y=g.patterns;return y?f.concat(y):f},[]);const l=function(f,g){if(typeof f!="string")return null;if(!g){let w;for(w=f.length;w>0;w--){const x=f.charCodeAt(w-1);if(x===47||x===92)break}g=f.substr(w)}const y=n.indexOf(g);return y!==-1?s[y]:null};l.basenames=n,l.patterns=s,l.allBasenames=n;const d=c.filter(f=>!f.basenames);return d.push(l),d}function zje(c,e,i,n,s,l){if(Array.isArray(c)){let d=0;for(const f of c){const g=zje(f,e,i,n,s,l);if(g===10)return g;g>d&&(d=g)}return d}else{if(typeof c=="string")return n?c==="*"?5:c===i?10:0:0;if(c){const{language:d,pattern:f,scheme:g,hasAccessToAllModels:y,notebookType:w}=c;if(!n&&!y)return 0;w&&s&&(e=s);let x=0;if(g)if(g===e.scheme)x=10;else if(g==="*")x=5;else return 0;if(d)if(d===i)x=10;else if(d==="*")x=Math.max(x,5);else return 0;if(w)if(w===l)x=10;else if(w==="*"&&l!==void 0)x=Math.max(x,5);else return 0;if(f){let I;if(typeof f=="string"?I=f:I={...f,base:Bbt(f.base)},I===e.fsPath||Cpi(I,e.fsPath))x=10;else return 0}return x}else return 0}}function Bwt(c){return typeof c=="string"?!1:Array.isArray(c)?c.every(Bwt):!!c.exclusive}class Q0t{constructor(e,i,n,s){this.uri=e,this.languageId=i,this.notebookUri=n,this.notebookType=s}equals(e){var i,n;return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&((i=this.notebookUri)===null||i===void 0?void 0:i.toString())===((n=e.notebookUri)===null||n===void 0?void 0:n.toString())}}class Gf{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new ui,this.onDidChange=this._onDidChange.event}register(e,i){let n={selector:e,provider:i,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),go(()=>{if(n){const s=this._entries.indexOf(n);s>=0&&(this._entries.splice(s,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const i=[];for(const n of this._entries)n._score>0&&i.push(n.provider);return i}ordered(e){const i=[];return this._orderedForEach(e,n=>i.push(n.provider)),i}orderedGroups(e){const i=[];let n,s;return this._orderedForEach(e,l=>{n&&s===l._score?n.push(l.provider):(s=l._score,n=[l.provider],i.push(n))}),i}_orderedForEach(e,i){this._updateScores(e);for(const n of this._entries)n._score>0&&i(n)}_updateScores(e){var i,n;const s=(i=this._notebookInfoResolver)===null||i===void 0?void 0:i.call(this,e.uri),l=s?new Q0t(e.uri,e.getLanguageId(),s.uri,s.type):new Q0t(e.uri,e.getLanguageId(),void 0,void 0);if(!(!((n=this._lastCandidate)===null||n===void 0)&&n.equals(l))){this._lastCandidate=l;for(const d of this._entries)if(d._score=zje(d.selector,l.uri,l.languageId,ZCt(e),l.notebookUri,l.notebookType),Bwt(d.selector)&&d._score>0){for(const f of this._entries)f._score=0;d._score=1e3;break}this._entries.sort(Gf._compareByScoreAndTime)}}static _compareByScoreAndTime(e,i){return e._scorei._score?-1:Mee(e.selector)&&!Mee(i.selector)?1:!Mee(e.selector)&&Mee(i.selector)?-1:e._timei._time?-1:0}}function Mee(c){return typeof c=="string"?!1:Array.isArray(c)?c.some(Mee):!!c.isBuiltin}class kpi{constructor(){this.referenceProvider=new Gf(this._score.bind(this)),this.renameProvider=new Gf(this._score.bind(this)),this.newSymbolNamesProvider=new Gf(this._score.bind(this)),this.codeActionProvider=new Gf(this._score.bind(this)),this.definitionProvider=new Gf(this._score.bind(this)),this.typeDefinitionProvider=new Gf(this._score.bind(this)),this.declarationProvider=new Gf(this._score.bind(this)),this.implementationProvider=new Gf(this._score.bind(this)),this.documentSymbolProvider=new Gf(this._score.bind(this)),this.inlayHintsProvider=new Gf(this._score.bind(this)),this.colorProvider=new Gf(this._score.bind(this)),this.codeLensProvider=new Gf(this._score.bind(this)),this.documentFormattingEditProvider=new Gf(this._score.bind(this)),this.documentRangeFormattingEditProvider=new Gf(this._score.bind(this)),this.onTypeFormattingEditProvider=new Gf(this._score.bind(this)),this.signatureHelpProvider=new Gf(this._score.bind(this)),this.hoverProvider=new Gf(this._score.bind(this)),this.documentHighlightProvider=new Gf(this._score.bind(this)),this.multiDocumentHighlightProvider=new Gf(this._score.bind(this)),this.selectionRangeProvider=new Gf(this._score.bind(this)),this.foldingRangeProvider=new Gf(this._score.bind(this)),this.linkProvider=new Gf(this._score.bind(this)),this.inlineCompletionsProvider=new Gf(this._score.bind(this)),this.inlineEditProvider=new Gf(this._score.bind(this)),this.completionProvider=new Gf(this._score.bind(this)),this.linkedEditingRangeProvider=new Gf(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new Gf(this._score.bind(this)),this.documentSemanticTokensProvider=new Gf(this._score.bind(this)),this.documentDropEditProvider=new Gf(this._score.bind(this)),this.documentPasteEditProvider=new Gf(this._score.bind(this))}_score(e){var i;return(i=this._notebookTypeResolver)===null||i===void 0?void 0:i.call(this,e)}}dc(js,kpi,1);var Tpi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},X0t=function(c,e){return function(i,n){e(i,n,c)}};const DL=Kl("hoverService");let uq=class extends Ii{get delay(){return this.isInstantlyHovering()?0:this._delay}constructor(e,i,n={},s,l){super(),this.placement=e,this.instantHover=i,this.overrideOptions=n,this.configurationService=s,this.hoverService=l,this.lastHoverHideTime=0,this.timeLimit=200,this.hoverDisposables=this._register(new On),this._delay=this.configurationService.getValue("workbench.hover.delay"),this._register(this.configurationService.onDidChangeConfiguration(d=>{d.affectsConfiguration("workbench.hover.delay")&&(this._delay=this.configurationService.getValue("workbench.hover.delay"))}))}showHover(e,i){const n=typeof this.overrideOptions=="function"?this.overrideOptions(e,i):this.overrideOptions;this.hoverDisposables.clear();const s=Sm(e.target)?[e.target]:e.target.targetElements;for(const d of s)this.hoverDisposables.add(n_(d,"keydown",f=>{f.equals(9)&&this.hoverService.hideHover()}));const l=Sm(e.content)?void 0:e.content.toString();return this.hoverService.showHover({...e,...n,persistence:{hideOnKeyDown:!0,...n.persistence},id:l,appearance:{...e.appearance,compact:!0,skipFadeInAnimation:this.isInstantlyHovering(),...n.appearance}},i)}isInstantlyHovering(){return this.instantHover&&Date.now()-this.lastHoverHideTime{n.stopPropagation(),n.preventDefault(),i(e)}))}}class Hwt extends Ii{constructor(e,i,n){super(),this._register(tn(e,yr.KEY_DOWN,s=>{const l=new Fd(s);n.some(d=>l.equals(d))&&(s.stopPropagation(),s.preventDefault(),i(e))}))}}const KC=Kl("openerService");function Dpi(c){let e;const i=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(c.fragment);return i&&(e={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1,endLineNumber:i[4]?parseInt(i[4]):void 0,endColumn:i[4]?i[5]?parseInt(i[5]):1:void 0},c=c.with({fragment:""})),{selection:e,uri:c}}function Epi(c,e={}){const i=qje(e);return i.textContent=c,i}function Ipi(c,e={}){const i=qje(e);return jwt(i,Lpi(c,!!e.renderCodeSegments),e.actionHandler,e.renderCodeSegments),i}function qje(c){const e=c.inline?"span":"div",i=document.createElement(e);return c.className&&(i.className=c.className),i}class Npi{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function jwt(c,e,i,n){let s;if(e.type===2)s=document.createTextNode(e.content||"");else if(e.type===3)s=document.createElement("b");else if(e.type===4)s=document.createElement("i");else if(e.type===7&&n)s=document.createElement("code");else if(e.type===5&&i){const l=document.createElement("a");i.disposables.add(n_(l,"click",d=>{i.callback(String(e.index),d)})),s=l}else e.type===8?s=document.createElement("br"):e.type===1&&(s=c);s&&c!==s&&c.appendChild(s),s&&Array.isArray(e.children)&&e.children.forEach(l=>{jwt(s,l,i,n)})}function Lpi(c,e){const i={type:1,children:[]};let n=0,s=i;const l=[],d=new Npi(c);for(;!d.eos();){let f=d.next();const g=f==="\\"&&U9e(d.peek(),e)!==0;if(g&&(f=d.next()),!g&&Ppi(f,e)&&f===d.peek()){d.advance(),s.type===2&&(s=l.pop());const y=U9e(f,e);if(s.type===y||s.type===5&&y===6)s=l.pop();else{const w={type:y,children:[]};y===5&&(w.index=n,n++),s.children.push(w),l.push(s),s=w}}else if(f===` +`)s.type===2&&(s=l.pop()),s.children.push({type:8});else if(s.type!==2){const y={type:2,content:f};s.children.push(y),l.push(s),s=y}else s.content+=f}return s.type===2&&(s=l.pop()),i}function Ppi(c,e){return U9e(c,e)!==0}function U9e(c,e){switch(c){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return e?7:0;default:return 0}}const Api=new RegExp(`(\\\\)?\\$\\((${Uo.iconNameExpression}(?:${Uo.iconModifierExpression})?)\\)`,"g");function jM(c){const e=new Array;let i,n=0,s=0;for(;(i=Api.exec(c))!==null;){s=i.index||0,n0)return new Uint32Array(e)}let rw=0;const gM=new Uint32Array(10);function Mpi(c){if(rw=0,wN(c,T7e,4352),rw>0||(wN(c,D7e,4449),rw>0)||(wN(c,E7e,4520),rw>0)||(wN(c,g5,12593),rw))return gM.subarray(0,rw);if(c>=44032&&c<=55203){const e=c-44032,i=e%588,n=Math.floor(e/588),s=Math.floor(i/28),l=i%28-1;if(n=0&&(l0)return gM.subarray(0,rw)}}function wN(c,e,i){c>=i&&c>8&&(gM[rw++]=c>>8&255),c>>16&&(gM[rw++]=c>>16&255))}const T7e=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),D7e=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),E7e=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),g5=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]);function $je(...c){return function(e,i){for(let n=0,s=c.length;n0?[{start:0,end:e.length}]:[]:null}function Uwt(c,e){const i=e.toLowerCase().indexOf(c.toLowerCase());return i===-1?null:[{start:i,end:i+c.length}]}function qwt(c,e){return q9e(c.toLowerCase(),e.toLowerCase(),0,0)}function q9e(c,e,i,n){if(i===c.length)return[];if(n===e.length)return null;if(c[i]===e[n]){let s=null;return(s=q9e(c,e,i+1,n+1))?Kje({start:n,end:n+1},s):null}return q9e(c,e,i,n+1)}function Jje(c){return 97<=c&&c<=122}function Cye(c){return 65<=c&&c<=90}function Gje(c){return 48<=c&&c<=57}function $wt(c){return c===32||c===9||c===10||c===13}const Jwt=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(c=>Jwt.add(c.charCodeAt(0)));function mve(c){return $wt(c)||Jwt.has(c)}function Z0t(c,e){return c===e||mve(c)&&mve(e)}const I7e=new Map;function Y0t(c){if(I7e.has(c))return I7e.get(c);let e;const i=Opi(c);return i&&(e=i),I7e.set(c,e),e}function Gwt(c){return Jje(c)||Cye(c)||Gje(c)}function Kje(c,e){return e.length===0?e=[c]:c.end===e[0].start?e[0].start=c.start:e.unshift(c),e}function Kwt(c,e){for(let i=e;i0&&!Gwt(c.charCodeAt(i-1)))return i}return c.length}function $9e(c,e,i,n){if(i===c.length)return[];if(n===e.length)return null;if(c[i]!==e[n].toLowerCase())return null;{let s=null,l=n+1;for(s=$9e(c,e,i+1,n+1);!s&&(l=Kwt(e,l)).6}function Wpi(c){const{upperPercent:e,lowerPercent:i,alphaPercent:n,numericPercent:s}=c;return i>.2&&e<.8&&n>.6&&s<.2}function Vpi(c){let e=0,i=0,n=0,s=0;for(let l=0;l60&&(e=e.substring(0,60));const i=Fpi(e);if(!Wpi(i)){if(!Bpi(i))return null;e=e.toLowerCase()}let n=null,s=0;for(c=c.toLowerCase();s0&&mve(c.charCodeAt(i-1)))return i;return c.length}const jpi=$je(die,Qwt,Uwt),zpi=$je(die,Qwt,qwt),evt=new TL(1e4);function tvt(c,e,i=!1){if(typeof c!="string"||typeof e!="string")return null;let n=evt.get(c);n||(n=new RegExp(Zii(c),"i"),evt.set(c,n));const s=n.exec(e);return s?[{start:s.index,end:s.index+s[0].length}]:i?zpi(c,e):jpi(c,e)}function Upi(c,e){const i=k9(c,c.toLowerCase(),0,e,e.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return i?Rne(i):null}function qpi(c,e,i,n,s,l){const d=Math.min(13,c.length);for(;i"u")return[];const e=[],i=c[1];for(let n=c.length-1;n>1;n--){const s=c[n]+i,l=e[e.length-1];l&&l.end===s?l.end=s+1:e.push({start:s,end:s+1})}return e}const IM=128;function Qje(){const c=[],e=[];for(let i=0;i<=IM;i++)e[i]=0;for(let i=0;i<=IM;i++)c.push(e.slice(0));return c}function Zwt(c){const e=[];for(let i=0;i<=c;i++)e[i]=0;return e}const Ywt=Zwt(2*IM),G9e=Zwt(2*IM),KA=Qje(),m5=Qje(),$ge=Qje();function Jge(c,e){if(e<0||e>=c.length)return!1;const i=c.codePointAt(e);switch(i){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!NHe(i)}}function ivt(c,e){if(e<0||e>=c.length)return!1;switch(c.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}function n0e(c,e,i){return e[c]!==i[c]}function $pi(c,e,i,n,s,l,d=!1){for(;eIM?IM:c.length,g=n.length>IM?IM:n.length;if(i>=f||l>=g||f-i>g-l||!$pi(e,i,f,s,l,g,!0))return;Jpi(f,g,i,l,e,s);let y=1,w=1,x=i,I=l;const P=[!1];for(y=1,x=i;xee,Nt=vt?m5[y][w-1]+(KA[y][w-1]>0?-5:0):0,Ni=I>ee+1&&KA[y][w-1]>0,ci=Ni?m5[y][w-2]+(KA[y][w-2]>0?-5:0):0;if(Ni&&(!vt||ci>=Nt)&&(!Be||ci>=Me))m5[y][w]=ci,$ge[y][w]=3,KA[y][w]=0;else if(vt&&(!Be||Nt>=Me))m5[y][w]=Nt,$ge[y][w]=2,KA[y][w]=0;else if(Be)m5[y][w]=Me,$ge[y][w]=1,KA[y][w]=KA[y-1][w-1]+1;else throw new Error("not possible")}}if(!P[0]&&!d.firstMatchCanBeWeak)return;y--,w--;const O=[m5[y][w],l];let W=0,X=0;for(;y>=1;){let ee=w;do{const he=$ge[y][ee];if(he===3)ee=ee-2;else if(he===2)ee=ee-1;else break}while(ee>=1);W>1&&e[i+y-1]===s[l+w-1]&&!n0e(ee+l-1,n,s)&&W+1>KA[y][ee]&&(ee=w),ee===w?W++:W=1,X||(X=ee),y--,w=ee-1,O.push(w)}g-l===f&&d.boostFullMatch&&(O[0]+=2);const Z=X-f;return O[0]-=Z,O}function Jpi(c,e,i,n,s,l){let d=c-1,f=e-1;for(;d>=i&&f>=n;)s[d]===l[f]&&(G9e[d]=f,d--),f--}function Gpi(c,e,i,n,s,l,d,f,g,y,w){if(e[i]!==l[d])return Number.MIN_SAFE_INTEGER;let x=1,I=!1;return d===i-n?x=c[i]===s[d]?7:5:n0e(d,s,l)&&(d===0||!n0e(d-1,s,l))?(x=c[i]===s[d]?7:5,I=!0):Jge(l,d)&&(d===0||!Jge(l,d-1))?x=5:(Jge(l,d-1)||ivt(l,d-1))&&(x=5,I=!0),x>1&&i===n&&(w[0]=!0),I||(I=n0e(d,s,l)||Jge(l,d-1)||ivt(l,d-1)),i===n?d>g&&(x-=I?3:5):y?x+=I?2:0:x+=I?0:1,d+1===f&&(x-=I?3:5),x}function Kpi(c,e,i,n,s,l,d){return Qpi(c,e,i,n,s,l,!0,d)}function Qpi(c,e,i,n,s,l,d,f){let g=k9(c,e,i,n,s,l,f);if(g&&!d)return g;if(c.length>=3){const y=Math.min(7,c.length-1);for(let w=i+1;wg[0])&&(g=I))}}}return g}function Xpi(c,e){if(e+1>=c.length)return;const i=c[e],n=c[e+1];if(i!==n)return c.slice(0,e)+n+i+c.slice(e+2)}const Zpi="$(",Xje=new RegExp(`\\$\\(${Uo.iconNameExpression}(?:${Uo.iconModifierExpression})?\\)`,"g"),Ypi=new RegExp(`(\\\\)?${Xje.source}`,"g");function egi(c){return c.replace(Ypi,(e,i)=>i?e:`\\${e}`)}const tgi=new RegExp(`\\\\${Xje.source}`,"g");function igi(c){return c.replace(tgi,e=>`\\${e}`)}const ngi=new RegExp(`(\\s)?(\\\\)?${Xje.source}(\\s)?`,"g");function Zje(c){return c.indexOf(Zpi)===-1?c:c.replace(ngi,(e,i,n,s)=>n?e:i||s||"")}function rgi(c){return c?c.replace(/\$\((.*?)\)/g,(e,i)=>` ${i} `).trim():""}const N7e=new RegExp(`\\$\\(${Uo.iconNameCharacter}+\\)`,"g");function Ree(c){N7e.lastIndex=0;let e="";const i=[];let n=0;for(;;){const s=N7e.lastIndex,l=N7e.exec(c),d=c.substring(s,l==null?void 0:l.index);if(d.length>0){e+=d;for(let f=0;f" ".repeat(s.length)).replace(/\>/gm,"\\>").replace(/\n/g,i===1?`\\ +`:` + +`),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,i){return this.value+=` +${agi(i,e)} +`,this}appendLink(e,i,n){return this.value+="[",this.value+=this._escape(i,"]"),this.value+="](",this.value+=this._escape(String(e),")"),n&&(this.value+=` "${this._escape(this._escape(n,'"'),")")}"`),this.value+=")",this}_escape(e,i){const n=new RegExp(Cw(i),"g");return e.replace(n,(s,l)=>e.charAt(l-1)!=="\\"?`\\${s}`:s)}}function dq(c){return xE(c)?!c.value:Array.isArray(c)?c.every(dq):!0}function xE(c){return c instanceof vv?!0:c&&typeof c=="object"?typeof c.value=="string"&&(typeof c.isTrusted=="boolean"||typeof c.isTrusted=="object"||c.isTrusted===void 0)&&(typeof c.supportThemeIcons=="boolean"||c.supportThemeIcons===void 0):!1}function sgi(c,e){return c===e?!0:!c||!e?!1:c.value===e.value&&c.isTrusted===e.isTrusted&&c.supportThemeIcons===e.supportThemeIcons&&c.supportHtml===e.supportHtml&&(c.baseUri===e.baseUri||!!c.baseUri&&!!e.baseUri&&Dje(Oo.from(c.baseUri),Oo.from(e.baseUri)))}function ogi(c){return c.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}function agi(c,e){var i,n;const s=(n=(i=c.match(/^`+/gm))===null||i===void 0?void 0:i.reduce((d,f)=>d.length>f.length?d:f).length)!==null&&n!==void 0?n:0,l=s>=3?s+1:3;return[`${"`".repeat(l)}${e}`,c,`${"`".repeat(l)}`].join(` +`)}function Gge(c){return c.replace(/"/g,""")}function P7e(c){return c&&c.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}function lgi(c){const e=[],i=c.split("|").map(s=>s.trim());c=i[0];const n=i[1];if(n){const s=/height=(\d+)/.exec(n),l=/width=(\d+)/.exec(n),d=s?s[1]:"",f=l?l[1]:"",g=isFinite(parseInt(f)),y=isFinite(parseInt(d));g&&e.push(`width="${f}"`),y&&e.push(`height="${d}"`)}return{href:c,dimensions:e}}class Yje{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const K9e=new Yje("id#");let Ly={};(function(){function c(e,i){i(Ly)}c.amd=!0,function(e,i){typeof c=="function"&&c.amd?c(["exports"],i):typeof exports=="object"&&typeof module<"u"?i(exports):(e=typeof globalThis<"u"?globalThis:e||self,i(e.marked={}))}(this,function(e){function i(mr,Mn){for(var Nn=0;Nnmr.length)&&(Mn=mr.length);for(var Nn=0,jt=new Array(Mn);Nn=mr.length?{done:!0}:{done:!1,value:mr[jt++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.defaults=f();function g(mr){e.defaults=mr}var y=/[&<>"']/,w=/[&<>"']/g,x=/[<>"']|&(?!#?\w+;)/,I=/[<>"']|&(?!#?\w+;)/g,P={"&":"&","<":"<",">":">",'"':""","'":"'"},O=function(Mn){return P[Mn]};function W(mr,Mn){if(Mn){if(y.test(mr))return mr.replace(w,O)}else if(x.test(mr))return mr.replace(I,O);return mr}var X=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Z(mr){return mr.replace(X,function(Mn,Nn){return Nn=Nn.toLowerCase(),Nn==="colon"?":":Nn.charAt(0)==="#"?Nn.charAt(1)==="x"?String.fromCharCode(parseInt(Nn.substring(2),16)):String.fromCharCode(+Nn.substring(1)):""})}var ee=/(^|[^\[])\^/g;function he(mr,Mn){mr=typeof mr=="string"?mr:mr.source,Mn=Mn||"";var Nn={replace:function(ti,Yi){return Yi=Yi.source||Yi,Yi=Yi.replace(ee,"$1"),mr=mr.replace(ti,Yi),Nn},getRegex:function(){return new RegExp(mr,Mn)}};return Nn}var we=/[^\w:]/g,Te=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Be(mr,Mn,Nn){if(mr){var jt;try{jt=decodeURIComponent(Z(Nn)).replace(we,"").toLowerCase()}catch{return null}if(jt.indexOf("javascript:")===0||jt.indexOf("vbscript:")===0||jt.indexOf("data:")===0)return null}Mn&&!Te.test(Nn)&&(Nn=ci(Mn,Nn));try{Nn=encodeURI(Nn).replace(/%25/g,"%")}catch{return null}return Nn}var Me={},vt=/^[^:]+:\/*[^/]*$/,Nt=/^([^:]+:)[\s\S]*$/,Ni=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ci(mr,Mn){Me[" "+mr]||(vt.test(mr)?Me[" "+mr]=mr+"/":Me[" "+mr]=$n(mr,"/",!0)),mr=Me[" "+mr];var Nn=mr.indexOf(":")===-1;return Mn.substring(0,2)==="//"?Nn?Mn:mr.replace(Nt,"$1")+Mn:Mn.charAt(0)==="/"?Nn?Mn:mr.replace(Ni,"$1")+Mn:mr+Mn}var Mt={exec:function(){}};function pi(mr){for(var Mn=1,Nn,jt;Mn=0&&fr[qs]==="\\";)ys=!ys;return ys?"|":" |"}),jt=Nn.split(/ \|/),ti=0;if(jt[0].trim()||jt.shift(),jt.length>0&&!jt[jt.length-1].trim()&&jt.pop(),jt.length>Mn)jt.splice(Mn);else for(;jt.length1;)Mn&1&&(Nn+=mr),Mn>>=1,mr+=mr;return Nn+mr}function Yt(mr,Mn,Nn,jt){var ti=Mn.href,Yi=Mn.title?W(Mn.title):null,Ei=mr[1].replace(/\\([\[\]])/g,"$1");if(mr[0].charAt(0)!=="!"){jt.state.inLink=!0;var fr={type:"link",raw:Nn,href:ti,title:Yi,text:Ei,tokens:jt.inlineTokens(Ei)};return jt.state.inLink=!1,fr}return{type:"image",raw:Nn,href:ti,title:Yi,text:W(Ei)}}function na(mr,Mn){var Nn=mr.match(/^(\s+)(?:```)/);if(Nn===null)return Mn;var jt=Nn[1];return Mn.split(` +`).map(function(ti){var Yi=ti.match(/^\s+/);if(Yi===null)return ti;var Ei=Yi[0];return Ei.length>=jt.length?ti.slice(jt.length):ti}).join(` +`)}var Is=function(){function mr(Nn){this.options=Nn||e.defaults}var Mn=mr.prototype;return Mn.space=function(jt){var ti=this.rules.block.newline.exec(jt);if(ti&&ti[0].length>0)return{type:"space",raw:ti[0]}},Mn.code=function(jt){var ti=this.rules.block.code.exec(jt);if(ti){var Yi=ti[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:ti[0],codeBlockStyle:"indented",text:this.options.pedantic?Yi:$n(Yi,` +`)}}},Mn.fences=function(jt){var ti=this.rules.block.fences.exec(jt);if(ti){var Yi=ti[0],Ei=na(Yi,ti[3]||"");return{type:"code",raw:Yi,lang:ti[2]?ti[2].trim():ti[2],text:Ei}}},Mn.heading=function(jt){var ti=this.rules.block.heading.exec(jt);if(ti){var Yi=ti[2].trim();if(/#$/.test(Yi)){var Ei=$n(Yi,"#");(this.options.pedantic||!Ei||/ $/.test(Ei))&&(Yi=Ei.trim())}return{type:"heading",raw:ti[0],depth:ti[1].length,text:Yi,tokens:this.lexer.inline(Yi)}}},Mn.hr=function(jt){var ti=this.rules.block.hr.exec(jt);if(ti)return{type:"hr",raw:ti[0]}},Mn.blockquote=function(jt){var ti=this.rules.block.blockquote.exec(jt);if(ti){var Yi=ti[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:ti[0],tokens:this.lexer.blockTokens(Yi,[]),text:Yi}}},Mn.list=function(jt){var ti=this.rules.block.list.exec(jt);if(ti){var Yi,Ei,fr,ys,qs,Mo,ul,xi,au,Wu,un,Cc,gu=ti[1].trim(),Pb=gu.length>1,tc={type:"list",raw:"",ordered:Pb,start:Pb?+gu.slice(0,-1):"",loose:!1,items:[]};gu=Pb?"\\d{1,9}\\"+gu.slice(-1):"\\"+gu,this.options.pedantic&&(gu=Pb?gu:"[*+-]");for(var Mh=new RegExp("^( {0,3}"+gu+")((?:[ ][^\\n]*)?(?:\\n|$))");jt&&(Cc=!1,!(!(ti=Mh.exec(jt))||this.rules.block.hr.test(jt)));){if(Yi=ti[0],jt=jt.substring(Yi.length),xi=ti[2].split(` +`,1)[0],au=jt.split(` +`,1)[0],this.options.pedantic?(ys=2,un=xi.trimLeft()):(ys=ti[2].search(/[^ ]/),ys=ys>4?1:ys,un=xi.slice(ys),ys+=ti[1].length),Mo=!1,!xi&&/^ *$/.test(au)&&(Yi+=au+` +`,jt=jt.substring(au.length+1),Cc=!0),!Cc)for(var $p=new RegExp("^ {0,"+Math.min(3,ys-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),mk=new RegExp("^ {0,"+Math.min(3,ys-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),bp=new RegExp("^ {0,"+Math.min(3,ys-1)+"}(?:```|~~~)"),lu=new RegExp("^ {0,"+Math.min(3,ys-1)+"}#");jt&&(Wu=jt.split(` +`,1)[0],xi=Wu,this.options.pedantic&&(xi=xi.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(bp.test(xi)||lu.test(xi)||$p.test(xi)||mk.test(jt)));){if(xi.search(/[^ ]/)>=ys||!xi.trim())un+=` +`+xi.slice(ys);else if(!Mo)un+=` +`+xi;else break;!Mo&&!xi.trim()&&(Mo=!0),Yi+=Wu+` +`,jt=jt.substring(Wu.length+1)}tc.loose||(ul?tc.loose=!0:/\n *\n *$/.test(Yi)&&(ul=!0)),this.options.gfm&&(Ei=/^\[[ xX]\] /.exec(un),Ei&&(fr=Ei[0]!=="[ ] ",un=un.replace(/^\[[ xX]\] +/,""))),tc.items.push({type:"list_item",raw:Yi,task:!!Ei,checked:fr,loose:!1,text:un}),tc.raw+=Yi}tc.items[tc.items.length-1].raw=Yi.trimRight(),tc.items[tc.items.length-1].text=un.trimRight(),tc.raw=tc.raw.trimRight();var Pw=tc.items.length;for(qs=0;qs1)return!0}return!1});!tc.loose&&ma.length&&vT&&(tc.loose=!0,tc.items[qs].loose=!0)}return tc}},Mn.html=function(jt){var ti=this.rules.block.html.exec(jt);if(ti){var Yi={type:"html",raw:ti[0],pre:!this.options.sanitizer&&(ti[1]==="pre"||ti[1]==="script"||ti[1]==="style"),text:ti[0]};if(this.options.sanitize){var Ei=this.options.sanitizer?this.options.sanitizer(ti[0]):W(ti[0]);Yi.type="paragraph",Yi.text=Ei,Yi.tokens=this.lexer.inline(Ei)}return Yi}},Mn.def=function(jt){var ti=this.rules.block.def.exec(jt);if(ti){ti[3]&&(ti[3]=ti[3].substring(1,ti[3].length-1));var Yi=ti[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:Yi,raw:ti[0],href:ti[2],title:ti[3]}}},Mn.table=function(jt){var ti=this.rules.block.table.exec(jt);if(ti){var Yi={type:"table",header:gn(ti[1]).map(function(ul){return{text:ul}}),align:ti[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:ti[3]&&ti[3].trim()?ti[3].replace(/\n[ \t]*$/,"").split(` +`):[]};if(Yi.header.length===Yi.align.length){Yi.raw=ti[0];var Ei=Yi.align.length,fr,ys,qs,Mo;for(fr=0;fr/i.test(ti[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(ti[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ti[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:ti[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ti[0]):W(ti[0]):ti[0]}},Mn.link=function(jt){var ti=this.rules.inline.link.exec(jt);if(ti){var Yi=ti[2].trim();if(!this.options.pedantic&&/^$/.test(Yi))return;var Ei=$n(Yi.slice(0,-1),"\\");if((Yi.length-Ei.length)%2===0)return}else{var fr=Ri(ti[2],"()");if(fr>-1){var ys=ti[0].indexOf("!")===0?5:4,qs=ys+ti[1].length+fr;ti[2]=ti[2].substring(0,fr),ti[0]=ti[0].substring(0,qs).trim(),ti[3]=""}}var Mo=ti[2],ul="";if(this.options.pedantic){var xi=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Mo);xi&&(Mo=xi[1],ul=xi[3])}else ul=ti[3]?ti[3].slice(1,-1):"";return Mo=Mo.trim(),/^$/.test(Yi)?Mo=Mo.slice(1):Mo=Mo.slice(1,-1)),Yt(ti,{href:Mo&&Mo.replace(this.rules.inline._escapes,"$1"),title:ul&&ul.replace(this.rules.inline._escapes,"$1")},ti[0],this.lexer)}},Mn.reflink=function(jt,ti){var Yi;if((Yi=this.rules.inline.reflink.exec(jt))||(Yi=this.rules.inline.nolink.exec(jt))){var Ei=(Yi[2]||Yi[1]).replace(/\s+/g," ");if(Ei=ti[Ei.toLowerCase()],!Ei||!Ei.href){var fr=Yi[0].charAt(0);return{type:"text",raw:fr,text:fr}}return Yt(Yi,Ei,Yi[0],this.lexer)}},Mn.emStrong=function(jt,ti,Yi){Yi===void 0&&(Yi="");var Ei=this.rules.inline.emStrong.lDelim.exec(jt);if(Ei&&!(Ei[3]&&Yi.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var fr=Ei[1]||Ei[2]||"";if(!fr||fr&&(Yi===""||this.rules.inline.punctuation.exec(Yi))){var ys=Ei[0].length-1,qs,Mo,ul=ys,xi=0,au=Ei[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(au.lastIndex=0,ti=ti.slice(-1*jt.length+ys);(Ei=au.exec(ti))!=null;)if(qs=Ei[1]||Ei[2]||Ei[3]||Ei[4]||Ei[5]||Ei[6],!!qs){if(Mo=qs.length,Ei[3]||Ei[4]){ul+=Mo;continue}else if((Ei[5]||Ei[6])&&ys%3&&!((ys+Mo)%3)){xi+=Mo;continue}if(ul-=Mo,!(ul>0)){if(Mo=Math.min(Mo,Mo+ul+xi),Math.min(ys,Mo)%2){var Wu=jt.slice(1,ys+Ei.index+Mo);return{type:"em",raw:jt.slice(0,ys+Ei.index+Mo+1),text:Wu,tokens:this.lexer.inlineTokens(Wu)}}var un=jt.slice(2,ys+Ei.index+Mo-1);return{type:"strong",raw:jt.slice(0,ys+Ei.index+Mo+1),text:un,tokens:this.lexer.inlineTokens(un)}}}}}},Mn.codespan=function(jt){var ti=this.rules.inline.code.exec(jt);if(ti){var Yi=ti[2].replace(/\n/g," "),Ei=/[^ ]/.test(Yi),fr=/^ /.test(Yi)&&/ $/.test(Yi);return Ei&&fr&&(Yi=Yi.substring(1,Yi.length-1)),Yi=W(Yi,!0),{type:"codespan",raw:ti[0],text:Yi}}},Mn.br=function(jt){var ti=this.rules.inline.br.exec(jt);if(ti)return{type:"br",raw:ti[0]}},Mn.del=function(jt){var ti=this.rules.inline.del.exec(jt);if(ti)return{type:"del",raw:ti[0],text:ti[2],tokens:this.lexer.inlineTokens(ti[2])}},Mn.autolink=function(jt,ti){var Yi=this.rules.inline.autolink.exec(jt);if(Yi){var Ei,fr;return Yi[2]==="@"?(Ei=W(this.options.mangle?ti(Yi[1]):Yi[1]),fr="mailto:"+Ei):(Ei=W(Yi[1]),fr=Ei),{type:"link",raw:Yi[0],text:Ei,href:fr,tokens:[{type:"text",raw:Ei,text:Ei}]}}},Mn.url=function(jt,ti){var Yi;if(Yi=this.rules.inline.url.exec(jt)){var Ei,fr;if(Yi[2]==="@")Ei=W(this.options.mangle?ti(Yi[0]):Yi[0]),fr="mailto:"+Ei;else{var ys;do ys=Yi[0],Yi[0]=this.rules.inline._backpedal.exec(Yi[0])[0];while(ys!==Yi[0]);Ei=W(Yi[0]),Yi[1]==="www."?fr="http://"+Ei:fr=Ei}return{type:"link",raw:Yi[0],text:Ei,href:fr,tokens:[{type:"text",raw:Ei,text:Ei}]}}},Mn.inlineText=function(jt,ti){var Yi=this.rules.inline.text.exec(jt);if(Yi){var Ei;return this.lexer.state.inRawBlock?Ei=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Yi[0]):W(Yi[0]):Yi[0]:Ei=W(this.options.smartypants?ti(Yi[0]):Yi[0]),{type:"text",raw:Yi[0],text:Ei}}},mr}(),zs={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Mt,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};zs._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,zs._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,zs.def=he(zs.def).replace("label",zs._label).replace("title",zs._title).getRegex(),zs.bullet=/(?:[*+-]|\d{1,9}[.)])/,zs.listItemStart=he(/^( *)(bull) */).replace("bull",zs.bullet).getRegex(),zs.list=he(zs.list).replace(/bull/g,zs.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+zs.def.source+")").getRegex(),zs._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",zs._comment=/|$)/,zs.html=he(zs.html,"i").replace("comment",zs._comment).replace("tag",zs._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),zs.paragraph=he(zs._paragraph).replace("hr",zs.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",zs._tag).getRegex(),zs.blockquote=he(zs.blockquote).replace("paragraph",zs.paragraph).getRegex(),zs.normal=pi({},zs),zs.gfm=pi({},zs.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),zs.gfm.table=he(zs.gfm.table).replace("hr",zs.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",zs._tag).getRegex(),zs.gfm.paragraph=he(zs._paragraph).replace("hr",zs.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",zs.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",zs._tag).getRegex(),zs.pedantic=pi({},zs.normal,{html:he(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",zs._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Mt,paragraph:he(zs.normal._paragraph).replace("hr",zs.hr).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",zs.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Ln={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Mt,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Mt,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",Ln.punctuation=he(Ln.punctuation).replace(/punctuation/g,Ln._punctuation).getRegex(),Ln.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Ln.escapedEmSt=/\\\*|\\_/g,Ln._comment=he(zs._comment).replace("(?:-->|$)","-->").getRegex(),Ln.emStrong.lDelim=he(Ln.emStrong.lDelim).replace(/punct/g,Ln._punctuation).getRegex(),Ln.emStrong.rDelimAst=he(Ln.emStrong.rDelimAst,"g").replace(/punct/g,Ln._punctuation).getRegex(),Ln.emStrong.rDelimUnd=he(Ln.emStrong.rDelimUnd,"g").replace(/punct/g,Ln._punctuation).getRegex(),Ln._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Ln._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Ln._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Ln.autolink=he(Ln.autolink).replace("scheme",Ln._scheme).replace("email",Ln._email).getRegex(),Ln._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Ln.tag=he(Ln.tag).replace("comment",Ln._comment).replace("attribute",Ln._attribute).getRegex(),Ln._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ln._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Ln._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Ln.link=he(Ln.link).replace("label",Ln._label).replace("href",Ln._href).replace("title",Ln._title).getRegex(),Ln.reflink=he(Ln.reflink).replace("label",Ln._label).replace("ref",zs._label).getRegex(),Ln.nolink=he(Ln.nolink).replace("ref",zs._label).getRegex(),Ln.reflinkSearch=he(Ln.reflinkSearch,"g").replace("reflink",Ln.reflink).replace("nolink",Ln.nolink).getRegex(),Ln.normal=pi({},Ln),Ln.pedantic=pi({},Ln.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:he(/^!?\[(label)\]\((.*?)\)/).replace("label",Ln._label).getRegex(),reflink:he(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ln._label).getRegex()}),Ln.gfm=pi({},Ln.normal,{escape:he(Ln.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5&&(jt="x"+jt.toString(16)),Mn+="&#"+jt+";";return Mn}var s_=function(){function mr(Nn){this.tokens=[],this.tokens.links=Object.create(null),this.options=Nn||e.defaults,this.options.tokenizer=this.options.tokenizer||new Is,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var jt={block:zs.normal,inline:Ln.normal};this.options.pedantic?(jt.block=zs.pedantic,jt.inline=Ln.pedantic):this.options.gfm&&(jt.block=zs.gfm,this.options.breaks?jt.inline=Ln.breaks:jt.inline=Ln.gfm),this.tokenizer.rules=jt}mr.lex=function(jt,ti){var Yi=new mr(ti);return Yi.lex(jt)},mr.lexInline=function(jt,ti){var Yi=new mr(ti);return Yi.inlineTokens(jt)};var Mn=mr.prototype;return Mn.lex=function(jt){jt=jt.replace(/\r\n|\r/g,` +`),this.blockTokens(jt,this.tokens);for(var ti;ti=this.inlineQueue.shift();)this.inlineTokens(ti.src,ti.tokens);return this.tokens},Mn.blockTokens=function(jt,ti){var Yi=this;ti===void 0&&(ti=[]),this.options.pedantic?jt=jt.replace(/\t/g," ").replace(/^ +$/gm,""):jt=jt.replace(/^( *)(\t+)/gm,function(ul,xi,au){return xi+" ".repeat(au.length)});for(var Ei,fr,ys,qs;jt;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(ul){return(Ei=ul.call({lexer:Yi},jt,ti))?(jt=jt.substring(Ei.raw.length),ti.push(Ei),!0):!1}))){if(Ei=this.tokenizer.space(jt)){jt=jt.substring(Ei.raw.length),Ei.raw.length===1&&ti.length>0?ti[ti.length-1].raw+=` +`:ti.push(Ei);continue}if(Ei=this.tokenizer.code(jt)){jt=jt.substring(Ei.raw.length),fr=ti[ti.length-1],fr&&(fr.type==="paragraph"||fr.type==="text")?(fr.raw+=` +`+Ei.raw,fr.text+=` +`+Ei.text,this.inlineQueue[this.inlineQueue.length-1].src=fr.text):ti.push(Ei);continue}if(Ei=this.tokenizer.fences(jt)){jt=jt.substring(Ei.raw.length),ti.push(Ei);continue}if(Ei=this.tokenizer.heading(jt)){jt=jt.substring(Ei.raw.length),ti.push(Ei);continue}if(Ei=this.tokenizer.hr(jt)){jt=jt.substring(Ei.raw.length),ti.push(Ei);continue}if(Ei=this.tokenizer.blockquote(jt)){jt=jt.substring(Ei.raw.length),ti.push(Ei);continue}if(Ei=this.tokenizer.list(jt)){jt=jt.substring(Ei.raw.length),ti.push(Ei);continue}if(Ei=this.tokenizer.html(jt)){jt=jt.substring(Ei.raw.length),ti.push(Ei);continue}if(Ei=this.tokenizer.def(jt)){jt=jt.substring(Ei.raw.length),fr=ti[ti.length-1],fr&&(fr.type==="paragraph"||fr.type==="text")?(fr.raw+=` +`+Ei.raw,fr.text+=` +`+Ei.raw,this.inlineQueue[this.inlineQueue.length-1].src=fr.text):this.tokens.links[Ei.tag]||(this.tokens.links[Ei.tag]={href:Ei.href,title:Ei.title});continue}if(Ei=this.tokenizer.table(jt)){jt=jt.substring(Ei.raw.length),ti.push(Ei);continue}if(Ei=this.tokenizer.lheading(jt)){jt=jt.substring(Ei.raw.length),ti.push(Ei);continue}if(ys=jt,this.options.extensions&&this.options.extensions.startBlock&&function(){var ul=1/0,xi=jt.slice(1),au=void 0;Yi.options.extensions.startBlock.forEach(function(Wu){au=Wu.call({lexer:this},xi),typeof au=="number"&&au>=0&&(ul=Math.min(ul,au))}),ul<1/0&&ul>=0&&(ys=jt.substring(0,ul+1))}(),this.state.top&&(Ei=this.tokenizer.paragraph(ys))){fr=ti[ti.length-1],qs&&fr.type==="paragraph"?(fr.raw+=` +`+Ei.raw,fr.text+=` +`+Ei.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=fr.text):ti.push(Ei),qs=ys.length!==jt.length,jt=jt.substring(Ei.raw.length);continue}if(Ei=this.tokenizer.text(jt)){jt=jt.substring(Ei.raw.length),fr=ti[ti.length-1],fr&&fr.type==="text"?(fr.raw+=` +`+Ei.raw,fr.text+=` +`+Ei.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=fr.text):ti.push(Ei);continue}if(jt){var Mo="Infinite loop on byte: "+jt.charCodeAt(0);if(this.options.silent){console.error(Mo);break}else throw new Error(Mo)}}return this.state.top=!0,ti},Mn.inline=function(jt,ti){return ti===void 0&&(ti=[]),this.inlineQueue.push({src:jt,tokens:ti}),ti},Mn.inlineTokens=function(jt,ti){var Yi=this;ti===void 0&&(ti=[]);var Ei,fr,ys,qs=jt,Mo,ul,xi;if(this.tokens.links){var au=Object.keys(this.tokens.links);if(au.length>0)for(;(Mo=this.tokenizer.rules.inline.reflinkSearch.exec(qs))!=null;)au.includes(Mo[0].slice(Mo[0].lastIndexOf("[")+1,-1))&&(qs=qs.slice(0,Mo.index)+"["+Xs("a",Mo[0].length-2)+"]"+qs.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Mo=this.tokenizer.rules.inline.blockSkip.exec(qs))!=null;)qs=qs.slice(0,Mo.index)+"["+Xs("a",Mo[0].length-2)+"]"+qs.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Mo=this.tokenizer.rules.inline.escapedEmSt.exec(qs))!=null;)qs=qs.slice(0,Mo.index)+"++"+qs.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;jt;)if(ul||(xi=""),ul=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(un){return(Ei=un.call({lexer:Yi},jt,ti))?(jt=jt.substring(Ei.raw.length),ti.push(Ei),!0):!1}))){if(Ei=this.tokenizer.escape(jt)){jt=jt.substring(Ei.raw.length),ti.push(Ei);continue}if(Ei=this.tokenizer.tag(jt)){jt=jt.substring(Ei.raw.length),fr=ti[ti.length-1],fr&&Ei.type==="text"&&fr.type==="text"?(fr.raw+=Ei.raw,fr.text+=Ei.text):ti.push(Ei);continue}if(Ei=this.tokenizer.link(jt)){jt=jt.substring(Ei.raw.length),ti.push(Ei);continue}if(Ei=this.tokenizer.reflink(jt,this.tokens.links)){jt=jt.substring(Ei.raw.length),fr=ti[ti.length-1],fr&&Ei.type==="text"&&fr.type==="text"?(fr.raw+=Ei.raw,fr.text+=Ei.text):ti.push(Ei);continue}if(Ei=this.tokenizer.emStrong(jt,qs,xi)){jt=jt.substring(Ei.raw.length),ti.push(Ei);continue}if(Ei=this.tokenizer.codespan(jt)){jt=jt.substring(Ei.raw.length),ti.push(Ei);continue}if(Ei=this.tokenizer.br(jt)){jt=jt.substring(Ei.raw.length),ti.push(Ei);continue}if(Ei=this.tokenizer.del(jt)){jt=jt.substring(Ei.raw.length),ti.push(Ei);continue}if(Ei=this.tokenizer.autolink(jt,zg)){jt=jt.substring(Ei.raw.length),ti.push(Ei);continue}if(!this.state.inLink&&(Ei=this.tokenizer.url(jt,zg))){jt=jt.substring(Ei.raw.length),ti.push(Ei);continue}if(ys=jt,this.options.extensions&&this.options.extensions.startInline&&function(){var un=1/0,Cc=jt.slice(1),gu=void 0;Yi.options.extensions.startInline.forEach(function(Pb){gu=Pb.call({lexer:this},Cc),typeof gu=="number"&&gu>=0&&(un=Math.min(un,gu))}),un<1/0&&un>=0&&(ys=jt.substring(0,un+1))}(),Ei=this.tokenizer.inlineText(ys,bd)){jt=jt.substring(Ei.raw.length),Ei.raw.slice(-1)!=="_"&&(xi=Ei.raw.slice(-1)),ul=!0,fr=ti[ti.length-1],fr&&fr.type==="text"?(fr.raw+=Ei.raw,fr.text+=Ei.text):ti.push(Ei);continue}if(jt){var Wu="Infinite loop on byte: "+jt.charCodeAt(0);if(this.options.silent){console.error(Wu);break}else throw new Error(Wu)}}return ti},n(mr,null,[{key:"rules",get:function(){return{block:zs,inline:Ln}}}]),mr}(),Wc=function(){function mr(Nn){this.options=Nn||e.defaults}var Mn=mr.prototype;return Mn.code=function(jt,ti,Yi){var Ei=(ti||"").match(/\S*/)[0];if(this.options.highlight){var fr=this.options.highlight(jt,Ei);fr!=null&&fr!==jt&&(Yi=!0,jt=fr)}return jt=jt.replace(/\n$/,"")+` +`,Ei?'
'+(Yi?jt:W(jt,!0))+`
+`:"
"+(Yi?jt:W(jt,!0))+`
+`},Mn.blockquote=function(jt){return`
+`+jt+`
+`},Mn.html=function(jt){return jt},Mn.heading=function(jt,ti,Yi,Ei){if(this.options.headerIds){var fr=this.options.headerPrefix+Ei.slug(Yi);return"'+jt+" +`}return""+jt+" +`},Mn.hr=function(){return this.options.xhtml?`
+`:`
+`},Mn.list=function(jt,ti,Yi){var Ei=ti?"ol":"ul",fr=ti&&Yi!==1?' start="'+Yi+'"':"";return"<"+Ei+fr+`> +`+jt+" +`},Mn.listitem=function(jt){return"
  • "+jt+`
  • +`},Mn.checkbox=function(jt){return" "},Mn.paragraph=function(jt){return"

    "+jt+`

    +`},Mn.table=function(jt,ti){return ti&&(ti=""+ti+""),` + +`+jt+` +`+ti+`
    +`},Mn.tablerow=function(jt){return` +`+jt+` +`},Mn.tablecell=function(jt,ti){var Yi=ti.header?"th":"td",Ei=ti.align?"<"+Yi+' align="'+ti.align+'">':"<"+Yi+">";return Ei+jt+(" +`)},Mn.strong=function(jt){return""+jt+""},Mn.em=function(jt){return""+jt+""},Mn.codespan=function(jt){return""+jt+""},Mn.br=function(){return this.options.xhtml?"
    ":"
    "},Mn.del=function(jt){return""+jt+""},Mn.link=function(jt,ti,Yi){if(jt=Be(this.options.sanitize,this.options.baseUrl,jt),jt===null)return Yi;var Ei='",Ei},Mn.image=function(jt,ti,Yi){if(jt=Be(this.options.sanitize,this.options.baseUrl,jt),jt===null)return Yi;var Ei=''+Yi+'":">",Ei},Mn.text=function(jt){return jt},mr}(),ns=function(){function mr(){}var Mn=mr.prototype;return Mn.strong=function(jt){return jt},Mn.em=function(jt){return jt},Mn.codespan=function(jt){return jt},Mn.del=function(jt){return jt},Mn.html=function(jt){return jt},Mn.text=function(jt){return jt},Mn.link=function(jt,ti,Yi){return""+Yi},Mn.image=function(jt,ti,Yi){return""+Yi},Mn.br=function(){return""},mr}(),fh=function(){function mr(){this.seen={}}var Mn=mr.prototype;return Mn.serialize=function(jt){return jt.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Mn.getNextSafeSlug=function(jt,ti){var Yi=jt,Ei=0;if(this.seen.hasOwnProperty(Yi)){Ei=this.seen[jt];do Ei++,Yi=jt+"-"+Ei;while(this.seen.hasOwnProperty(Yi))}return ti||(this.seen[jt]=Ei,this.seen[Yi]=0),Yi},Mn.slug=function(jt,ti){ti===void 0&&(ti={});var Yi=this.serialize(jt);return this.getNextSafeSlug(Yi,ti.dryrun)},mr}(),yp=function(){function mr(Nn){this.options=Nn||e.defaults,this.options.renderer=this.options.renderer||new Wc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ns,this.slugger=new fh}mr.parse=function(jt,ti){var Yi=new mr(ti);return Yi.parse(jt)},mr.parseInline=function(jt,ti){var Yi=new mr(ti);return Yi.parseInline(jt)};var Mn=mr.prototype;return Mn.parse=function(jt,ti){ti===void 0&&(ti=!0);var Yi="",Ei,fr,ys,qs,Mo,ul,xi,au,Wu,un,Cc,gu,Pb,tc,Mh,$p,mk,bp,lu,Pw=jt.length;for(Ei=0;Ei0&&Mh.tokens[0].type==="paragraph"?(Mh.tokens[0].text=bp+" "+Mh.tokens[0].text,Mh.tokens[0].tokens&&Mh.tokens[0].tokens.length>0&&Mh.tokens[0].tokens[0].type==="text"&&(Mh.tokens[0].tokens[0].text=bp+" "+Mh.tokens[0].tokens[0].text)):Mh.tokens.unshift({type:"text",text:bp}):tc+=bp),tc+=this.parse(Mh.tokens,Pb),Wu+=this.renderer.listitem(tc,mk,$p);Yi+=this.renderer.list(Wu,Cc,gu);continue}case"html":{Yi+=this.renderer.html(un.text);continue}case"paragraph":{Yi+=this.renderer.paragraph(this.parseInline(un.tokens));continue}case"text":{for(Wu=un.tokens?this.parseInline(un.tokens):un.text;Ei+1"u"||mr===null)throw new Error("marked(): input parameter is undefined or null");if(typeof mr!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(mr)+", string expected");if(typeof Mn=="function"&&(Nn=Mn,Mn=null),Mn=pi({},ka.defaults,Mn||{}),ao(Mn),Nn){var jt=Mn.highlight,ti;try{ti=s_.lex(mr,Mn)}catch(qs){return Nn(qs)}var Yi=function(Mo){var ul;if(!Mo)try{Mn.walkTokens&&ka.walkTokens(ti,Mn.walkTokens),ul=yp.parse(ti,Mn)}catch(xi){Mo=xi}return Mn.highlight=jt,Mo?Nn(Mo):Nn(null,ul)};if(!jt||jt.length<3||(delete Mn.highlight,!ti.length))return Yi();var Ei=0;ka.walkTokens(ti,function(qs){qs.type==="code"&&(Ei++,setTimeout(function(){jt(qs.text,qs.lang,function(Mo,ul){if(Mo)return Yi(Mo);ul!=null&&ul!==qs.text&&(qs.text=ul,qs.escaped=!0),Ei--,Ei===0&&Yi()})},0))}),Ei===0&&Yi();return}function fr(qs){if(qs.message+=` +Please report this to https://github.com/markedjs/marked.`,Mn.silent)return"

    An error occurred:

    "+W(qs.message+"",!0)+"
    ";throw qs}try{var ys=s_.lex(mr,Mn);if(Mn.walkTokens){if(Mn.async)return Promise.all(ka.walkTokens(ys,Mn.walkTokens)).then(function(){return yp.parse(ys,Mn)}).catch(fr);ka.walkTokens(ys,Mn.walkTokens)}return yp.parse(ys,Mn)}catch(qs){fr(qs)}}ka.options=ka.setOptions=function(mr){return pi(ka.defaults,mr),g(ka.defaults),ka},ka.getDefaults=f,ka.defaults=e.defaults,ka.use=function(){for(var mr=arguments.length,Mn=new Array(mr),Nn=0;Nn"u"||mr===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof mr!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(mr)+", string expected");Mn=pi({},ka.defaults,Mn||{}),ao(Mn);try{var Nn=s_.lexInline(mr,Mn);return Mn.walkTokens&&ka.walkTokens(Nn,Mn.walkTokens),yp.parseInline(Nn,Mn)}catch(jt){if(jt.message+=` +Please report this to https://github.com/markedjs/marked.`,Mn.silent)return"

    An error occurred:

    "+W(jt.message+"",!0)+"
    ";throw jt}},ka.Parser=yp,ka.parser=yp.parse,ka.Renderer=Wc,ka.TextRenderer=ns,ka.Lexer=s_,ka.lexer=s_.lex,ka.Tokenizer=Is,ka.Slugger=fh,ka.parse=ka;var o_=ka.options,My=ka.setOptions,F0=ka.use,Lw=ka.walkTokens,Rt=ka.parseInline,Ry=ka,no=yp.parse,a$=s_.lex;e.Lexer=s_,e.Parser=yp,e.Renderer=Wc,e.Slugger=fh,e.TextRenderer=ns,e.Tokenizer=Is,e.getDefaults=f,e.lexer=a$,e.marked=ka,e.options=o_,e.parse=Ry,e.parseInline=Rt,e.parser=no,e.setOptions=My,e.use=F0,e.walkTokens=Lw,Object.defineProperty(e,"__esModule",{value:!0})})})();Ly.Lexer||exports.Lexer;Ly.Parser||exports.Parser;Ly.Renderer||exports.Renderer;Ly.Slugger||exports.Slugger;Ly.TextRenderer||exports.TextRenderer;Ly.Tokenizer||exports.Tokenizer;Ly.getDefaults||exports.getDefaults;Ly.lexer||exports.lexer;var fE=Ly.marked||exports.marked;Ly.options||exports.options;Ly.parse||exports.parse;Ly.parseInline||exports.parseInline;Ly.parser||exports.parser;Ly.setOptions||exports.setOptions;Ly.use||exports.use;Ly.walkTokens||exports.walkTokens;function cgi(c){return JSON.stringify(c,ugi)}function Q9e(c){let e=JSON.parse(c);return e=X9e(e),e}function ugi(c,e){return e instanceof RegExp?{$mid:2,source:e.source,flags:e.flags}:e}function X9e(c,e=0){if(!c||e>200)return c;if(typeof c=="object"){switch(c.$mid){case 1:return Oo.revive(c);case 2:return new RegExp(c.source,c.flags);case 17:return new Date(c.source)}if(c instanceof eye||c instanceof Uint8Array)return c;if(Array.isArray(c))for(let i=0;i{let n=[],s=[];return c&&({href:c,dimensions:n}=lgi(c),s.push(`src="${Gge(c)}"`)),i&&s.push(`alt="${Gge(i)}"`),e&&s.push(`title="${Gge(e)}"`),n.length&&(s=s.concat(n)),""},paragraph:c=>`

    ${c}

    `,link:(c,e,i)=>typeof c!="string"?"":(c===i&&(i=P7e(i)),e=typeof e=="string"?Gge(P7e(e)):"",c=P7e(c),c=c.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),`
    ${i}`)});function wye(c,e={},i={}){var n,s;const l=new On;let d=!1;const f=qje(e),g=function(Z){let ee;try{ee=Q9e(decodeURIComponent(Z))}catch{}return ee?(ee=ybt(ee,he=>{if(c.uris&&c.uris[he])return Oo.revive(c.uris[he])}),encodeURIComponent(JSON.stringify(ee))):Z},y=function(Z,ee){const he=c.uris&&c.uris[Z];let we=Oo.revive(he);return ee?Z.startsWith(wa.data+":")?Z:(we||(we=Oo.parse(Z)),pCt.uriToBrowserUri(we).toString(!0)):!we||Oo.parse(Z).toString()===we.toString()?Z:(we.query&&(we=we.with({query:g(we.query)})),we.toString())},w=new fE.Renderer;w.image=A7e.image,w.link=A7e.link,w.paragraph=A7e.paragraph;const x=[],I=[];if(e.codeBlockRendererSync?w.code=(Z,ee)=>{const he=K9e.nextId(),we=e.codeBlockRendererSync(nvt(ee),Z);return I.push([he,we]),`
    ${Gee(Z)}
    `}:e.codeBlockRenderer&&(w.code=(Z,ee)=>{const he=K9e.nextId(),we=e.codeBlockRenderer(nvt(ee),Z);return x.push(we.then(Te=>[he,Te])),`
    ${Gee(Z)}
    `}),e.actionHandler){const Z=function(we){let Te=we.target;if(!(Te.tagName!=="A"&&(Te=Te.parentElement,!Te||Te.tagName!=="A")))try{let Be=Te.dataset.href;Be&&(c.baseUri&&(Be=O7e(Oo.from(c.baseUri),Be)),e.actionHandler.callback(Be,we))}catch(Be){Ba(Be)}finally{we.preventDefault()}},ee=e.actionHandler.disposables.add(new Yl(f,"click")),he=e.actionHandler.disposables.add(new Yl(f,"auxclick"));e.actionHandler.disposables.add(Mr.any(ee.event,he.event)(we=>{const Te=new sT(Io(f),we);!Te.leftButton&&!Te.middleButton||Z(Te)})),e.actionHandler.disposables.add(tn(f,"keydown",we=>{const Te=new Fd(we);!Te.equals(10)&&!Te.equals(3)||Z(Te)}))}c.supportHtml||(i.sanitizer=Z=>{var ee;return!((ee=e.sanitizerOptions)===null||ee===void 0)&&ee.replaceWithPlaintext?Gee(Z):(c.isTrusted?Z.match(/^(]+>)|(<\/\s*span>)$/):void 0)?Z:""},i.sanitize=!0,i.silent=!0),i.renderer=w;let P=(n=c.value)!==null&&n!==void 0?n:"";P.length>1e5&&(P=`${P.substr(0,1e5)}…`),c.supportThemeIcons&&(P=igi(P));let O;if(e.fillInIncompleteTokens){const Z={...fE.defaults,...i},ee=fE.lexer(P,Z),he=wgi(ee);O=fE.parser(he,Z)}else O=fE.parse(P,i);c.supportThemeIcons&&(O=jM(O).map(ee=>typeof ee=="string"?ee:ee.outerHTML).join(""));const X=new DOMParser().parseFromString(Z9e({isTrusted:c.isTrusted,...e.sanitizerOptions},O),"text/html");if(X.body.querySelectorAll("img, audio, video, source").forEach(Z=>{const ee=Z.getAttribute("src");if(ee){let he=ee;try{c.baseUri&&(he=O7e(Oo.from(c.baseUri),he))}catch{}if(Z.setAttribute("src",y(he,!0)),e.remoteImageIsAllowed){const we=Oo.parse(he);we.scheme!==wa.file&&we.scheme!==wa.data&&!e.remoteImageIsAllowed(we)&&Z.replaceWith(Sr("",void 0,Z.outerHTML))}}}),X.body.querySelectorAll("a").forEach(Z=>{const ee=Z.getAttribute("href");if(Z.setAttribute("href",""),!ee||/^data:|javascript:/i.test(ee)||/^command:/i.test(ee)&&!c.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(ee))Z.replaceWith(...Z.childNodes);else{let he=y(ee,!1);c.baseUri&&(he=O7e(Oo.from(c.baseUri),ee)),Z.dataset.href=he}}),f.innerHTML=Z9e({isTrusted:c.isTrusted,...e.sanitizerOptions},X.body.innerHTML),x.length>0)Promise.all(x).then(Z=>{var ee,he;if(d)return;const we=new Map(Z),Te=f.querySelectorAll("div[data-code]");for(const Be of Te){const Me=we.get((ee=Be.dataset.code)!==null&&ee!==void 0?ee:"");Me&&r0(Be,Me)}(he=e.asyncRenderCallback)===null||he===void 0||he.call(e)});else if(I.length>0){const Z=new Map(I),ee=f.querySelectorAll("div[data-code]");for(const he of ee){const we=Z.get((s=he.dataset.code)!==null&&s!==void 0?s:"");we&&r0(he,we)}}if(e.asyncRenderCallback)for(const Z of f.getElementsByTagName("img")){const ee=l.add(tn(Z,"load",()=>{ee.dispose(),e.asyncRenderCallback()}))}return{element:f,dispose:()=>{d=!0,l.dispose()}}}function nvt(c){if(!c)return"";const e=c.split(/[\s+|:|,|\{|\?]/,1);return e.length?e[0]:c}function O7e(c,e){return/^\w[\w\d+.-]*:/.test(e)?e:c.path.endsWith("/")?c0t(c,e).toString():c0t(gye(c),e).toString()}const dgi=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function Z9e(c,e){const{config:i,allowedSchemes:n}=hgi(c),s=new On;s.add(rvt("uponSanitizeAttribute",(l,d)=>{var f;if(d.attrName==="style"||d.attrName==="class"){if(l.tagName==="SPAN"){if(d.attrName==="style"){d.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?$/.test(d.attrValue);return}else if(d.attrName==="class"){d.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(d.attrValue);return}}d.keepAttr=!1;return}else if(l.tagName==="INPUT"&&((f=l.attributes.getNamedItem("type"))===null||f===void 0?void 0:f.value)==="checkbox"){if(d.attrName==="type"&&d.attrValue==="checkbox"||d.attrName==="disabled"||d.attrName==="checked"){d.keepAttr=!0;return}d.keepAttr=!1}})),s.add(rvt("uponSanitizeElement",(l,d)=>{var f,g;if(d.tagName==="input"&&(((f=l.attributes.getNamedItem("type"))===null||f===void 0?void 0:f.value)==="checkbox"?l.setAttribute("disabled",""):c.replaceWithPlaintext||(g=l.parentElement)===null||g===void 0||g.removeChild(l)),c.replaceWithPlaintext&&!d.allowedTags[d.tagName]&&d.tagName!=="body"&&l.parentElement){let y,w;if(d.tagName==="#comment")y=``;else{const O=dgi.includes(d.tagName),W=l.attributes.length?" "+Array.from(l.attributes).map(X=>`${X.name}="${X.value}"`).join(" "):"";y=`<${d.tagName}${W}>`,O||(w=``)}const x=document.createDocumentFragment(),I=l.parentElement.ownerDocument.createTextNode(y);x.appendChild(I);const P=w?l.parentElement.ownerDocument.createTextNode(w):void 0;for(;l.firstChild;)x.appendChild(l.firstChild);P&&x.appendChild(P),l.parentElement.replaceChild(x,l)}})),s.add(wri(n));try{return dCt(e,{...i,RETURN_TRUSTED_TYPE:!0})}finally{s.dispose()}}const fgi=["align","autoplay","alt","checked","class","controls","data-code","data-href","disabled","draggable","height","href","loop","muted","playsinline","poster","src","style","target","title","type","width","start"];function hgi(c){var e;const i=[wa.http,wa.https,wa.mailto,wa.data,wa.file,wa.vscodeFileResource,wa.vscodeRemote,wa.vscodeRemoteResource];return c.isTrusted&&i.push(wa.command),{config:{ALLOWED_TAGS:(e=c.allowedTags)!==null&&e!==void 0?e:[...xri],ALLOWED_ATTR:fgi,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:i}}function _gi(c){return typeof c=="string"?c:pgi(c)}function pgi(c,e){var i;let n=(i=c.value)!==null&&i!==void 0?i:"";n.length>1e5&&(n=`${n.substr(0,1e5)}…`);const s=fE.parse(n,{renderer:vgi.value}).replace(/&(#\d+|[a-zA-Z]+);/g,l=>{var d;return(d=ggi.get(l))!==null&&d!==void 0?d:l});return Z9e({isTrusted:!1},s).toString()}const ggi=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]);function mgi(){const c=new fE.Renderer;return c.code=e=>e,c.blockquote=e=>e,c.html=e=>"",c.heading=(e,i,n)=>e+` +`,c.hr=()=>"",c.list=(e,i)=>e,c.listitem=e=>e+` +`,c.paragraph=e=>e+` +`,c.table=(e,i)=>e+i+` +`,c.tablerow=e=>e,c.tablecell=(e,i)=>e+" ",c.strong=e=>e,c.em=e=>e,c.codespan=e=>e,c.br=()=>` +`,c.del=e=>e,c.image=(e,i,n)=>"",c.text=e=>e,c.link=(e,i,n)=>n,c}const vgi=new FE(c=>mgi());function fie(c){let e="";return c.forEach(i=>{e+=i.raw}),e}function ext(c){var e,i;if(c.tokens)for(let n=c.tokens.length-1;n>=0;n--){const s=c.tokens[n];if(s.type==="text"){const l=s.raw.split(` +`),d=l[l.length-1];if(d.includes("`"))return Tgi(c);if(d.includes("**"))return Pgi(c);if(d.match(/\*\w/))return Dgi(c);if(d.match(/(^|\s)__\w/))return Agi(c);if(d.match(/(^|\s)_\w/))return Egi(c);if(ygi(d)||bgi(d)&&c.tokens.slice(0,n).some(f=>f.type==="text"&&f.raw.match(/\[[^\]]*$/))){const f=c.tokens.slice(n+1);return((e=f[0])===null||e===void 0?void 0:e.type)==="link"&&((i=f[1])===null||i===void 0?void 0:i.type)==="text"&&f[1].raw.match(/^ *"[^"]*$/)||d.match(/^[^"]* +"[^"]*$/)?Ngi(c):Igi(c)}else if(d.match(/(^|\s)\[\w*/))return Lgi(c)}}}function ygi(c){return!!c.match(/(^|\s)\[.*\]\(\w*/)}function bgi(c){return!!c.match(/^[^\[]*\]\([^\)]*$/)}function Cgi(c){var e;const i=c.items[c.items.length-1],n=i.tokens?i.tokens[i.tokens.length-1]:void 0;let s;if((n==null?void 0:n.type)==="text"&&!("inRawBlock"in i)&&(s=ext(n)),!s||s.type!=="paragraph")return;const l=fie(c.items.slice(0,-1)),d=(e=i.raw.match(/^(\s*(-|\d+\.) +)/))===null||e===void 0?void 0:e[0];if(!d)return;const f=d+fie(i.tokens.slice(0,-1))+s.raw,g=fE.lexer(l+f)[0];if(g.type==="list")return g}const Sgi=3;function wgi(c){for(let e=0;e"u"&&d.match(/^\s*\|/)){const f=d.match(/(\|[^\|]+)(?=\||$)/g);f&&(n=f.length)}else if(typeof n=="number")if(d.match(/^\s*\|/)){if(l!==i.length-1)return;s=!0}else return}if(typeof n=="number"&&n>0){const l=s?i.slice(0,-1).join(` +`):e,d=!!l.match(/\|\s*$/),f=l+(d?"":"|")+` +|${" --- |".repeat(n)}`;return fE.lexer(f)}}function rvt(c,e){return fCt(c,e),go(()=>hCt(c))}var Mgi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},svt=function(c,e){return function(i,n){e(i,n,c)}},Y9e;let gL=Y9e=class{constructor(e,i,n){this._options=e,this._languageService=i,this._openerService=n,this._onDidRenderAsync=new ui,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,i,n){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const s=new On,l=s.add(wye(e,{...this._getRenderOptions(e,s),...i},n));return l.element.classList.add("rendered-markdown"),{element:l.element,dispose:()=>s.dispose()}}_getRenderOptions(e,i){return{codeBlockRenderer:async(n,s)=>{var l,d,f;let g;n?g=this._languageService.getLanguageIdByLanguageName(n):this._options.editor&&(g=(l=this._options.editor.getModel())===null||l===void 0?void 0:l.getLanguageId()),g||(g=yw);const y=await y_i(this._languageService,s,g),w=document.createElement("span");if(w.innerHTML=(f=(d=Y9e._ttpTokenizer)===null||d===void 0?void 0:d.createHTML(y))!==null&&f!==void 0?f:y,this._options.editor){const x=this._options.editor.getOption(50);s0(w,x)}else this._options.codeBlockFontFamily&&(w.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(w.style.fontSize=this._options.codeBlockFontSize),w},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:n=>eze(this._openerService,n,e.isTrusted),disposables:i}}}};gL._ttpTokenizer=i6("tokenizeToString",{createHTML(c){return c}});gL=Y9e=Mgi([svt(1,If),svt(2,KC)],gL);async function eze(c,e,i){try{return await c.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:Rgi(i)})}catch(n){return Ba(n),!1}}function Rgi(c){return c===!0?!0:c&&Array.isArray(c.enabledCommands)?c.enabledCommands:!1}var Fgi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},ree=function(c,e){return function(i,n){e(i,n,c)}};const xN=Sr;let eBe=class extends Ew{get _targetWindow(){return Io(this._target.targetElements[0])}get _targetDocumentElement(){return Io(this._target.targetElements[0]).document.documentElement}get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return this._hoverPosition===2?0:1}get x(){return this._x}get y(){return this._y}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this._hoverContainer.classList.toggle("locked",this._isLocked))}constructor(e,i,n,s,l,d){var f,g,y,w,x,I,P,O;super(),this._keybindingService=i,this._configurationService=n,this._openerService=s,this._instantiationService=l,this._accessibilityService=d,this._messageListeners=new On,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._onDispose=this._register(new ui),this._onRequestLayout=this._register(new ui),this._linkHandler=e.linkHandler||(we=>eze(this._openerService,we,xE(e.content)?e.content.isTrusted:void 0)),this._target="targetElements"in e.target?e.target:new Bgi(e.target),this._hoverPointer=!((f=e.appearance)===null||f===void 0)&&f.showPointer?xN("div.workbench-hover-pointer"):void 0,this._hover=this._register(new Uje),this._hover.containerDomNode.classList.add("workbench-hover","fadeIn"),!((g=e.appearance)===null||g===void 0)&&g.compact&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),!((y=e.appearance)===null||y===void 0)&&y.skipFadeInAnimation&&this._hover.containerDomNode.classList.add("skip-fade-in"),e.additionalClasses&&this._hover.containerDomNode.classList.add(...e.additionalClasses),!((w=e.position)===null||w===void 0)&&w.forcePosition&&(this._forcePosition=!0),e.trapFocus&&(this._enableFocusTraps=!0),this._hoverPosition=(I=(x=e.position)===null||x===void 0?void 0:x.hoverPosition)!==null&&I!==void 0?I:3,this.onmousedown(this._hover.containerDomNode,we=>we.stopPropagation()),this.onkeydown(this._hover.containerDomNode,we=>{we.equals(9)&&this.dispose()}),this._register(tn(this._targetWindow,"blur",()=>this.dispose()));const W=xN("div.hover-row.markdown-hover"),X=xN("div.hover-contents");if(typeof e.content=="string")X.textContent=e.content,X.style.whiteSpace="pre-wrap";else if(Sm(e.content))X.appendChild(e.content),X.classList.add("html-hover-contents");else{const we=e.content,Te=this._instantiationService.createInstance(gL,{codeBlockFontFamily:this._configurationService.getValue("editor").fontFamily||Tb.fontFamily}),{element:Be}=Te.render(we,{actionHandler:{callback:Me=>this._linkHandler(Me),disposables:this._messageListeners},asyncRenderCallback:()=>{X.classList.add("code-hover-contents"),this.layout(),this._onRequestLayout.fire()}});X.appendChild(Be)}if(W.appendChild(X),this._hover.contentsDomNode.appendChild(W),e.actions&&e.actions.length>0){const we=xN("div.hover-row.status-bar"),Te=xN("div.actions");e.actions.forEach(Be=>{const Me=this._keybindingService.lookupKeybinding(Be.commandId),vt=Me?Me.getLabel():null;bye.render(Te,{label:Be.label,commandId:Be.commandId,run:Nt=>{Be.run(Nt),this.dispose()},iconClass:Be.iconClass},vt)}),we.appendChild(Te),this._hover.containerDomNode.appendChild(we)}this._hoverContainer=xN("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode);let Z;if(e.actions&&e.actions.length>0?Z=!1:((P=e.persistence)===null||P===void 0?void 0:P.hideOnHover)===void 0?Z=typeof e.content=="string"||xE(e.content)&&!e.content.value.includes("](")&&!e.content.value.includes(""):Z=e.persistence.hideOnHover,Z&&(!((O=e.appearance)===null||O===void 0)&&O.showHoverHint)){const we=xN("div.hover-row.status-bar"),Te=xN("div.info");Te.textContent=V("hoverhint","Hold {0} key to mouse over",Wl?"Option":"Alt"),we.appendChild(Te),this._hover.containerDomNode.appendChild(we)}const ee=[...this._target.targetElements];Z||ee.push(this._hoverContainer);const he=this._register(new ovt(ee));if(this._register(he.onMouseOut(()=>{this._isLocked||this.dispose()})),Z){const we=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new ovt(we)),this._register(this._lockMouseTracker.onMouseOut(()=>{this._isLocked||this.dispose()}))}else this._lockMouseTracker=he}addFocusTrap(){if(!this._enableFocusTraps||this._addedFocusTrap)return;this._addedFocusTrap=!0;const e=this._hover.containerDomNode,i=this.findLastFocusableChild(this._hover.containerDomNode);if(i){const n=VHe(this._hoverContainer,xN("div")),s=zn(this._hoverContainer,xN("div"));n.tabIndex=0,s.tabIndex=0,this._register(tn(s,"focus",l=>{e.focus(),l.preventDefault()})),this._register(tn(n,"focus",l=>{i.focus(),l.preventDefault()}))}}findLastFocusableChild(e){if(e.hasChildNodes())for(let i=0;i=0)return l}const s=this.findLastFocusableChild(n);if(s)return s}}render(e){var i;e.appendChild(this._hoverContainer);const s=this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement)&&Wwt(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(i=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))===null||i===void 0?void 0:i.getAriaLabel());s&&hL(s),this.layout(),this.addFocusTrap()}layout(){this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";const e=w=>{const x=yCt(w),I=w.getBoundingClientRect();return{top:I.top*x,bottom:I.bottom*x,right:I.right*x,left:I.left*x}},i=this._target.targetElements.map(w=>e(w)),{top:n,right:s,bottom:l,left:d}=i[0],f=s-d,g=l-n,y={top:n,right:s,bottom:l,left:d,width:f,height:g,center:{x:d+f/2,y:n+g/2}};if(this.adjustHorizontalHoverPosition(y),this.adjustVerticalHoverPosition(y),this.adjustHoverMaxHeight(y),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:y.left+=3,y.right+=3,this._hoverContainer.style.paddingLeft="3px",this._hoverContainer.style.marginLeft="-3px";break;case 0:y.left-=3,y.right-=3,this._hoverContainer.style.paddingRight="3px",this._hoverContainer.style.marginRight="-3px";break;case 2:y.top+=3,y.bottom+=3,this._hoverContainer.style.paddingTop="3px",this._hoverContainer.style.marginTop="-3px";break;case 3:y.top-=3,y.bottom-=3,this._hoverContainer.style.paddingBottom="3px",this._hoverContainer.style.marginBottom="-3px";break}y.center.x=y.left+f/2,y.center.y=y.top+g/2}this.computeXCordinate(y),this.computeYCordinate(y),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(y)),this._hover.onContentsChanged()}computeXCordinate(e){const i=this._hover.containerDomNode.clientWidth+2;this._target.x!==void 0?this._x=this._target.x:this._hoverPosition===1?this._x=e.right:this._hoverPosition===0?this._x=e.left-i:(this._hoverPointer?this._x=e.center.x-this._hover.containerDomNode.clientWidth/2:this._x=e.left,this._x+i>=this._targetDocumentElement.clientWidth&&(this._hover.containerDomNode.classList.add("right-aligned"),this._x=Math.max(this._targetDocumentElement.clientWidth-i-2,this._targetDocumentElement.clientLeft))),this._xthis._targetWindow.innerHeight&&(this._y=e.bottom)}adjustHorizontalHoverPosition(e){if(this._target.x!==void 0)return;const i=this._hoverPointer?3:0;if(this._forcePosition){const n=i+2;this._hoverPosition===1?this._hover.containerDomNode.style.maxWidth=`${this._targetDocumentElement.clientWidth-e.right-n}px`:this._hoverPosition===0&&(this._hover.containerDomNode.style.maxWidth=`${e.left-n}px`);return}this._hoverPosition===1?this._targetDocumentElement.clientWidth-e.right=this._hover.containerDomNode.clientWidth+i?this._hoverPosition=0:this._hoverPosition=2):this._hoverPosition===0&&(e.left=this._hover.containerDomNode.clientWidth+i?this._hoverPosition=1:this._hoverPosition=2),e.left-this._hover.containerDomNode.clientWidth-i<=this._targetDocumentElement.clientLeft&&(this._hoverPosition=1))}adjustVerticalHoverPosition(e){if(this._target.y!==void 0||this._forcePosition)return;const i=this._hoverPointer?3:0;this._hoverPosition===3?e.top-this._hover.containerDomNode.clientHeight-i<0&&(this._hoverPosition=2):this._hoverPosition===2&&e.bottom+this._hover.containerDomNode.clientHeight+i>this._targetWindow.innerHeight&&(this._hoverPosition=3)}adjustHoverMaxHeight(e){let i=this._targetWindow.innerHeight/2;if(this._forcePosition){const n=(this._hoverPointer?3:0)+2;this._hoverPosition===3?i=Math.min(i,e.top-n):this._hoverPosition===2&&(i=Math.min(i,this._targetWindow.innerHeight-e.bottom-n))}if(this._hover.containerDomNode.style.maxHeight=`${i}px`,this._hover.contentsDomNode.clientHeighte.height?this._hoverPointer.style.top=`${e.center.y-(this._y-i)-3}px`:this._hoverPointer.style.top=`${Math.round(i/2)-3}px`;break}case 3:case 2:{this._hoverPointer.classList.add(this._hoverPosition===3?"bottom":"top");const i=this._hover.containerDomNode.clientWidth;let n=Math.round(i/2)-3;const s=this._x+n;(se.right)&&(n=e.center.x-this._x-3),this._hoverPointer.style.left=`${n}px`;break}}}focus(){this._hover.containerDomNode.focus()}dispose(){this._isDisposed||(this._onDispose.fire(),this._hoverContainer.remove(),this._messageListeners.dispose(),this._target.dispose(),super.dispose()),this._isDisposed=!0}};eBe=Fgi([ree(1,ou),ree(2,El),ree(3,KC),ree(4,So),ree(5,$C)],eBe);class ovt extends Ew{get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(e){super(),this._elements=e,this._isMouseIn=!0,this._onMouseOut=this._register(new ui),this._elements.forEach(i=>this.onmouseover(i,()=>this._onTargetMouseOver(i))),this._elements.forEach(i=>this.onmouseleave(i,()=>this._onTargetMouseLeave(i)))}_onTargetMouseOver(e){this._isMouseIn=!0,this._clearEvaluateMouseStateTimeout(e)}_onTargetMouseLeave(e){this._isMouseIn=!1,this._evaluateMouseState(e)}_evaluateMouseState(e){this._clearEvaluateMouseStateTimeout(e),this._mouseTimeout=Io(e).setTimeout(()=>this._fireIfMouseOutside(),0)}_clearEvaluateMouseStateTimeout(e){this._mouseTimeout&&(Io(e).clearTimeout(this._mouseTimeout),this._mouseTimeout=void 0)}_fireIfMouseOutside(){this._isMouseIn||this._onMouseOut.fire()}}class Bgi{constructor(e){this._element=e,this.targetElements=[this._element]}dispose(){}}var pv;(function(c){function e(l,d){if(l.start>=d.end||d.start>=l.end)return{start:0,end:0};const f=Math.max(l.start,d.start),g=Math.min(l.end,d.end);return g-f<=0?{start:0,end:0}:{start:f,end:g}}c.intersect=e;function i(l){return l.end-l.start<=0}c.isEmpty=i;function n(l,d){return!i(e(l,d))}c.intersects=n;function s(l,d){const f=[],g={start:l.start,end:Math.min(d.start,l.end)},y={start:Math.max(d.end,l.start),end:l.end};return i(g)||f.push(g),i(y)||f.push(y),f}c.relativeComplement=s})(pv||(pv={}));function Wgi(c){const e=c;return!!e&&typeof e.x=="number"&&typeof e.y=="number"}var NM;(function(c){c[c.AVOID=0]="AVOID",c[c.ALIGN=1]="ALIGN"})(NM||(NM={}));function lU(c,e,i){const n=i.mode===NM.ALIGN?i.offset:i.offset+i.size,s=i.mode===NM.ALIGN?i.offset+i.size:i.offset;return i.position===0?e<=c-n?n:e<=s?s-e:Math.max(c-e,0):e<=s?s-e:e<=c-n?n:0}class fq extends Ii{constructor(e,i){super(),this.container=null,this.useFixedPosition=!1,this.useShadowDOM=!1,this.delegate=null,this.toDisposeOnClean=Ii.None,this.toDisposeOnSetContainer=Ii.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=Sr(".context-view"),_y(this.view),this.setContainer(e,i),this._register(go(()=>this.setContainer(null,1)))}setContainer(e,i){var n;this.useFixedPosition=i!==1;const s=this.useShadowDOM;if(this.useShadowDOM=i===3,!(e===this.container&&s===this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(n=this.shadowRootHostElement)===null||n===void 0||n.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e)){if(this.container=e,this.useShadowDOM){this.shadowRootHostElement=Sr(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const d=document.createElement("style");d.textContent=Vgi,this.shadowRoot.appendChild(d),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(Sr("slot"))}else this.container.appendChild(this.view);const l=new On;fq.BUBBLE_UP_EVENTS.forEach(d=>{l.add(n_(this.container,d,f=>{this.onDOMEvent(f,!1)}))}),fq.BUBBLE_DOWN_EVENTS.forEach(d=>{l.add(n_(this.container,d,f=>{this.onDOMEvent(f,!0)},!0))}),this.toDisposeOnSetContainer=l}}show(e){var i,n,s;this.isVisible()&&this.hide(),n0(this.view),this.view.className="context-view monaco-component",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex=`${2575+((i=e.layer)!==null&&i!==void 0?i:0)}`,this.view.style.position=this.useFixedPosition?"fixed":"absolute",RC(this.view),this.toDisposeOnClean=e.render(this.view)||Ii.None,this.delegate=e,this.doLayout(),(s=(n=this.delegate).focus)===null||s===void 0||s.call(n)}getViewElement(){return this.view}layout(){var e,i;if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(TE&&PHe.pointerEvents)){this.hide();return}(i=(e=this.delegate)===null||e===void 0?void 0:e.layout)===null||i===void 0||i.call(e),this.doLayout()}}doLayout(){if(!this.isVisible())return;const e=this.delegate.getAnchor();let i;if(Sm(e)){const I=Y_(e),P=yCt(e);i={top:I.top*P,left:I.left*P,width:I.width*P,height:I.height*P}}else Wgi(e)?i={top:e.y,left:e.x,width:e.width||1,height:e.height||2}:i={top:e.posy,left:e.posx,width:2,height:2};const n=OC(this.view),s=y4(this.view),l=this.delegate.anchorPosition||0,d=this.delegate.anchorAlignment||0,f=this.delegate.anchorAxisAlignment||0;let g,y;const w=jme();if(f===0){const I={offset:i.top-w.pageYOffset,size:i.height,position:l===0?0:1},P={offset:i.left,size:i.width,position:d===0?0:1,mode:NM.ALIGN};g=lU(w.innerHeight,s,I)+w.pageYOffset,pv.intersects({start:g,end:g+s},{start:I.offset,end:I.offset+I.size})&&(P.mode=NM.AVOID),y=lU(w.innerWidth,n,P)}else{const I={offset:i.left,size:i.width,position:d===0?0:1},P={offset:i.top,size:i.height,position:l===0?0:1,mode:NM.ALIGN};y=lU(w.innerWidth,n,I),pv.intersects({start:y,end:y+n},{start:I.offset,end:I.offset+I.size})&&(P.mode=NM.AVOID),g=lU(w.innerHeight,s,P)+w.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(l===0?"bottom":"top"),this.view.classList.add(d===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const x=Y_(this.container);this.view.style.top=`${g-(this.useFixedPosition?Y_(this.view).top:x.top)}px`,this.view.style.left=`${y-(this.useFixedPosition?Y_(this.view).left:x.left)}px`,this.view.style.width="initial"}hide(e){const i=this.delegate;this.delegate=null,i!=null&&i.onHide&&i.onHide(e),this.toDisposeOnClean.dispose(),_y(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,i){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,Io(e).document.activeElement):i&&!Wg(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}fq.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"];fq.BUBBLE_DOWN_EVENTS=["click"];const Vgi=` + :host { + all: initial; /* 1st rule so subsequent properties are reset. */ + } + + .codicon[class*='codicon-'] { + font: normal normal normal 16px/1 codicon; + display: inline-block; + text-decoration: none; + text-rendering: auto; + text-align: center; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + } + + :host { + font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif; + } + + :host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; } + :host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; } + :host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; } + :host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; } + :host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; } + + :host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; } + :host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; } + :host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; } + :host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; } + :host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; } + + :host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; } + :host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; } + :host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; } + :host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; } + :host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; } +`;var Hgi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},jgi=function(c,e){return function(i,n){e(i,n,c)}};let vve=class extends Ii{constructor(e){super(),this.layoutService=e,this.contextView=this._register(new fq(this.layoutService.mainContainer,1)),this.layout(),this._register(e.onDidLayoutContainer(()=>this.layout()))}showContextView(e,i,n){let s;i?i===this.layoutService.getContainer(Io(i))?s=1:n?s=3:s=2:s=1,this.contextView.setContainer(i??this.layoutService.activeContainer,s),this.contextView.show(e);const l={close:()=>{this.openContextView===l&&this.hideContextView()}};return this.openContextView=l,l}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e),this.openContextView=void 0}};vve=Hgi([jgi(0,DR)],vve);class txt extends vve{getContextViewElement(){return this.contextView.getViewElement()}}class zgi{constructor(e,i,n){this.hoverDelegate=e,this.target=i,this.fadeInAnimation=n}async update(e,i,n){var s;if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let l;if(e===void 0||xy(e)||Sm(e))l=e;else if(!Nte(e.markdown))l=(s=e.markdown)!==null&&s!==void 0?s:e.markdownNotSupportedFallback;else{this._hoverWidget||this.show(V("iconLabel.loading","Loading..."),i,n),this._cancellationTokenSource=new uh;const d=this._cancellationTokenSource.token;if(l=await e.markdown(d),l===void 0&&(l=e.markdownNotSupportedFallback),this.isDisposed||d.isCancellationRequested)return}this.show(l,i,n)}show(e,i,n){const s=this._hoverWidget;if(this.hasContent(e)){const l={content:e,target:this.target,appearance:{showPointer:this.hoverDelegate.placement==="element",skipFadeInAnimation:!this.fadeInAnimation||!!s},position:{hoverPosition:2},...n};this._hoverWidget=this.hoverDelegate.showHover(l,i)}s==null||s.dispose()}hasContent(e){return e?xE(e)?!!e.value:!0:!1}get isDisposed(){var e;return(e=this._hoverWidget)===null||e===void 0?void 0:e.isDisposed}dispose(){var e,i;(e=this._hoverWidget)===null||e===void 0||e.dispose(),(i=this._cancellationTokenSource)===null||i===void 0||i.dispose(!0),this._cancellationTokenSource=void 0}}var Ugi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},see=function(c,e){return function(i,n){e(i,n,c)}};let tBe=class extends Ii{constructor(e,i,n,s,l){super(),this._instantiationService=e,this._keybindingService=n,this._layoutService=s,this._accessibilityService=l,this._existingHovers=new Map,i.onDidShowContextMenu(()=>this.hideHover()),this._contextViewHandler=this._register(new vve(this._layoutService))}showHover(e,i,n){var s,l,d,f;if(avt(this._currentHoverOptions)===avt(e)||this._currentHover&&(!((l=(s=this._currentHoverOptions)===null||s===void 0?void 0:s.persistence)===null||l===void 0)&&l.sticky))return;this._currentHoverOptions=e,this._lastHoverOptions=e;const g=e.trapFocus||this._accessibilityService.isScreenReaderOptimized(),y=A0();n||(g&&y?y.classList.contains("monaco-hover")||(this._lastFocusedElementBeforeOpen=y):this._lastFocusedElementBeforeOpen=void 0);const w=new On,x=this._instantiationService.createInstance(eBe,e);if(!((d=e.persistence)===null||d===void 0)&&d.sticky&&(x.isLocked=!0),x.onDispose(()=>{var I,P;((I=this._currentHover)===null||I===void 0?void 0:I.domNode)&&CCt(this._currentHover.domNode)&&((P=this._lastFocusedElementBeforeOpen)===null||P===void 0||P.focus()),this._currentHoverOptions===e&&(this._currentHoverOptions=void 0),w.dispose()},void 0,w),!e.container){const I=Sm(e.target)?e.target:e.target.targetElements[0];e.container=this._layoutService.getContainer(Io(I))}if(this._contextViewHandler.showContextView(new qgi(x,i),e.container),x.onRequestLayout(()=>this._contextViewHandler.layout(),void 0,w),!((f=e.persistence)===null||f===void 0)&&f.sticky)w.add(tn(Io(e.container).document,yr.MOUSE_DOWN,I=>{Wg(I.target,x.domNode)||this.doHideHover()}));else{if("targetElements"in e.target)for(const P of e.target.targetElements)w.add(tn(P,yr.CLICK,()=>this.hideHover()));else w.add(tn(e.target,yr.CLICK,()=>this.hideHover()));const I=A0();if(I){const P=Io(I).document;w.add(tn(I,yr.KEY_DOWN,O=>{var W;return this._keyDown(O,x,!!(!((W=e.persistence)===null||W===void 0)&&W.hideOnKeyDown))})),w.add(tn(P,yr.KEY_DOWN,O=>{var W;return this._keyDown(O,x,!!(!((W=e.persistence)===null||W===void 0)&&W.hideOnKeyDown))})),w.add(tn(I,yr.KEY_UP,O=>this._keyUp(O,x))),w.add(tn(P,yr.KEY_UP,O=>this._keyUp(O,x)))}}if("IntersectionObserver"in ed){const I=new IntersectionObserver(O=>this._intersectionChange(O,x),{threshold:0}),P="targetElements"in e.target?e.target.targetElements[0]:e.target;I.observe(P),w.add(go(()=>I.disconnect()))}return this._currentHover=x,x}hideHover(){var e;!((e=this._currentHover)===null||e===void 0)&&e.isLocked||!this._currentHoverOptions||this.doHideHover()}doHideHover(){this._currentHover=void 0,this._currentHoverOptions=void 0,this._contextViewHandler.hideContextView()}_intersectionChange(e,i){e[e.length-1].isIntersecting||i.dispose()}showAndFocusLastHover(){this._lastHoverOptions&&this.showHover(this._lastHoverOptions,!0,!0)}_keyDown(e,i,n){var s,l;if(e.key==="Alt"){i.isLocked=!0;return}const d=new Fd(e);this._keybindingService.resolveKeyboardEvent(d).getSingleModifierDispatchChords().some(g=>!!g)||this._keybindingService.softDispatch(d,d.target).kind!==0||n&&(!(!((s=this._currentHoverOptions)===null||s===void 0)&&s.trapFocus)||e.key!=="Tab")&&(this.hideHover(),(l=this._lastFocusedElementBeforeOpen)===null||l===void 0||l.focus())}_keyUp(e,i){var n;e.key==="Alt"&&(i.isLocked=!1,i.isMouseIn||(this.hideHover(),(n=this._lastFocusedElementBeforeOpen)===null||n===void 0||n.focus()))}setupUpdatableHover(e,i,n,s){i.setAttribute("custom-hover","true"),i.title!==""&&(console.warn("HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute."),console.trace("Stack trace:",i.title),i.title="");let l,d;const f=(he,we)=>{var Te;const Be=d!==void 0;he&&(d==null||d.dispose(),d=void 0),we&&(l==null||l.dispose(),l=void 0),Be&&((Te=e.onDidHideHover)===null||Te===void 0||Te.call(e),d=void 0)},g=(he,we,Te,Be)=>new gT(async()=>{(!d||d.isDisposed)&&(d=new zgi(e,Te||i,he>0),await d.update(typeof n=="function"?n():n,we,{...s,trapFocus:Be}))},he);let y=!1;const w=tn(i,yr.MOUSE_DOWN,()=>{y=!0,f(!0,!0)},!0),x=tn(i,yr.MOUSE_UP,()=>{y=!1},!0),I=tn(i,yr.MOUSE_LEAVE,he=>{y=!1,f(!1,he.fromElement===i)},!0),P=he=>{if(l)return;const we=new On,Te={targetElements:[i],dispose:()=>{}};if(e.placement===void 0||e.placement==="mouse"){const Be=Me=>{Te.x=Me.x+10,Sm(Me.target)&&lvt(Me.target,i)!==i&&f(!0,!0)};we.add(tn(i,yr.MOUSE_MOVE,Be,!0))}l=we,!(Sm(he.target)&&lvt(he.target,i)!==i)&&we.add(g(e.delay,!1,Te))},O=tn(i,yr.MOUSE_OVER,P,!0),W=()=>{if(y||l)return;const he={targetElements:[i],dispose:()=>{}},we=new On,Te=()=>f(!0,!0);we.add(tn(i,yr.BLUR,Te,!0)),we.add(g(e.delay,!1,he)),l=we};let X;const Z=i.tagName.toLowerCase();Z!=="input"&&Z!=="textarea"&&(X=tn(i,yr.FOCUS,W,!0));const ee={show:he=>{f(!1,!0),g(0,he,void 0,he)},hide:()=>{f(!0,!0)},update:async(he,we)=>{n=he,await(d==null?void 0:d.update(n,void 0,we))},dispose:()=>{this._existingHovers.delete(i),O.dispose(),I.dispose(),w.dispose(),x.dispose(),X==null||X.dispose(),f(!0,!0)}};return this._existingHovers.set(i,ee),ee}triggerUpdatableHover(e){const i=this._existingHovers.get(e);i&&i.show(!0)}dispose(){this._existingHovers.forEach(e=>e.dispose()),super.dispose()}};tBe=Ugi([see(0,So),see(1,GC),see(2,ou),see(3,DR),see(4,$C)],tBe);function avt(c){var e;if(c!==void 0)return(e=c==null?void 0:c.id)!==null&&e!==void 0?e:c}class qgi{get anchorPosition(){return this._hover.anchor}constructor(e,i=!1){this._hover=e,this._focus=i,this.layer=1}render(e){return this._hover.render(e),this._focus&&this._hover.focus(),this._hover}getAnchor(){return{x:this._hover.x,y:this._hover.y}}layout(){this._hover.layout()}}function lvt(c,e){for(e=e??Io(c).document.body;!c.hasAttribute("custom-hover")&&c!==e;)c=c.parentElement;return c}dc(DL,tBe,1);dk((c,e)=>{const i=c.getColor(vSt);i&&(e.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),e.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`))});const Fne=Kl("IWorkspaceEditService");class tze{constructor(e){this.metadata=e}static convert(e){return e.edits.map(i=>{if(zM.is(i))return zM.lift(i);if(MU.is(i))return MU.lift(i);throw new Error("Unsupported edit")})}}class zM extends tze{static is(e){return e instanceof zM?!0:vy(e)&&Oo.isUri(e.resource)&&vy(e.textEdit)}static lift(e){return e instanceof zM?e:new zM(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,i,n=void 0,s){super(s),this.resource=e,this.textEdit=i,this.versionId=n}}class MU extends tze{static is(e){return e instanceof MU?!0:vy(e)&&(!!e.newResource||!!e.oldResource)}static lift(e){return e instanceof MU?e:new MU(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,i,n={},s){super(s),this.oldResource=e,this.newResource=i,this.options=n}}const _v={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,renderGutterMenu:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0},xye=Object.freeze({id:"editor",order:5,type:"object",title:V("editorConfigurationTitle","Editor"),scope:5}),yve={...xye,properties:{"editor.tabSize":{type:"number",default:mv.tabSize,minimum:1,markdownDescription:V("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:V("indentSize",'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:mv.insertSpaces,markdownDescription:V("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:mv.detectIndentation,markdownDescription:V("detectIndentation","Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:mv.trimAutoWhitespace,description:V("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:mv.largeFileOptimizations,description:V("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{enum:["off","currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[V("wordBasedSuggestions.off","Turn off Word Based Suggestions."),V("wordBasedSuggestions.currentDocument","Only suggest words from the active document."),V("wordBasedSuggestions.matchingDocuments","Suggest words from all open documents of the same language."),V("wordBasedSuggestions.allDocuments","Suggest words from all open documents.")],description:V("wordBasedSuggestions","Controls whether completions should be computed based on words in the document and from which documents they are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[V("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),V("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),V("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:V("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:V("stablePeek","Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:V("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!1,description:V("editor.experimental.asyncTokenization","Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:V("editor.experimental.asyncTokenizationLogging","Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:V("editor.experimental.asyncTokenizationVerification","Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:V("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:V("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:V("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:V("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:V("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:V("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:_v.maxComputationTime,description:V("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:_v.maxFileSize,description:V("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:_v.renderSideBySide,description:V("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:_v.renderSideBySideInlineBreakpoint,description:V("renderSideBySideInlineBreakpoint","If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:_v.useInlineViewWhenSpaceIsLimited,description:V("useInlineViewWhenSpaceIsLimited","If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:_v.renderMarginRevertIcon,description:V("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.renderGutterMenu":{type:"boolean",default:_v.renderGutterMenu,description:V("renderGutterMenu","When enabled, the diff editor shows a special gutter for revert and stage actions.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:_v.ignoreTrimWhitespace,description:V("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:_v.renderIndicators,description:V("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:_v.diffCodeLens,description:V("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:_v.diffWordWrap,markdownEnumDescriptions:[V("wordWrap.off","Lines will never wrap."),V("wordWrap.on","Lines will wrap at the viewport width."),V("wordWrap.inherit","Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:_v.diffAlgorithm,markdownEnumDescriptions:[V("diffAlgorithm.legacy","Uses the legacy diffing algorithm."),V("diffAlgorithm.advanced","Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:_v.hideUnchangedRegions.enabled,markdownDescription:V("hideUnchangedRegions.enabled","Controls whether the diff editor shows unchanged regions.")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:_v.hideUnchangedRegions.revealLineCount,markdownDescription:V("hideUnchangedRegions.revealLineCount","Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:_v.hideUnchangedRegions.minimumLineCount,markdownDescription:V("hideUnchangedRegions.minimumLineCount","Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:_v.hideUnchangedRegions.contextLineCount,markdownDescription:V("hideUnchangedRegions.contextLineCount","Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:_v.experimental.showMoves,markdownDescription:V("showMoves","Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:_v.experimental.showEmptyDecorations,description:V("showEmptyDecorations","Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")}}};function $gi(c){return typeof c.type<"u"||typeof c.anyOf<"u"}for(const c of $z){const e=c.schema;if(typeof e<"u")if($gi(e))yve.properties[`editor.${c.name}`]=e;else for(const i in e)Object.hasOwnProperty.call(e,i)&&(yve.properties[i]=e[i])}let Kge=null;function ixt(){return Kge===null&&(Kge=Object.create(null),Object.keys(yve.properties).forEach(c=>{Kge[c]=!0})),Kge}function Jgi(c){return ixt()[`editor.${c}`]||!1}function Ggi(c){return ixt()[`diffEditor.${c}`]||!1}const Kgi=dh.as(WE.Configuration);Kgi.registerConfiguration(yve);class Kf{static insert(e,i){return{range:new at(e.lineNumber,e.column,e.lineNumber,e.column),text:i,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,i){return{range:e,text:i}}static replaceMove(e,i){return{range:e,text:i,forceMoveMarkers:!0}}}function Qge(c){return Object.isFrozen(c)?c:Xei(c)}class i0{static createEmptyModel(e){return new i0({},[],[],void 0,e)}constructor(e,i,n,s,l){this._contents=e,this._keys=i,this._overrides=n,this.raw=s,this.logService=l,this.overrideConfigurations=new Map}get rawConfiguration(){var e;if(!this._rawConfiguration)if(!((e=this.raw)===null||e===void 0)&&e.length){const i=this.raw.map(n=>{if(n instanceof i0)return n;const s=new Qgi("",this.logService);return s.parseRaw(n),s.configurationModel});this._rawConfiguration=i.reduce((n,s)=>s===n?s:n.merge(s),i[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?Ogt(this.contents,e):this.contents}inspect(e,i){const n=this;return{get value(){return Qge(n.rawConfiguration.getValue(e))},get override(){return i?Qge(n.rawConfiguration.getOverrideValue(e,i)):void 0},get merged(){return Qge(i?n.rawConfiguration.override(i).getValue(e):n.rawConfiguration.getValue(e))},get overrides(){const s=[];for(const{contents:l,identifiers:d,keys:f}of n.rawConfiguration.overrides){const g=new i0(l,f,[],void 0,n.logService).getValue(e);g!==void 0&&s.push({identifiers:d,value:g})}return s.length?Qge(s):void 0}}}getOverrideValue(e,i){const n=this.getContentsForOverrideIdentifer(i);return n?e?Ogt(n,e):n:void 0}override(e){let i=this.overrideConfigurations.get(e);return i||(i=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,i)),i}merge(...e){var i,n;const s=o4(this.contents),l=o4(this.overrides),d=[...this.keys],f=!((i=this.raw)===null||i===void 0)&&i.length?[...this.raw]:[this];for(const g of e)if(f.push(...!((n=g.raw)===null||n===void 0)&&n.length?g.raw:[g]),!g.isEmpty()){this.mergeContents(s,g.contents);for(const y of g.overrides){const[w]=l.filter(x=>ch(x.identifiers,y.identifiers));w?(this.mergeContents(w.contents,y.contents),w.keys.push(...y.keys),w.keys=z4(w.keys)):l.push(o4(y))}for(const y of g.keys)d.indexOf(y)===-1&&d.push(y)}return new i0(s,d,l,f.every(g=>g instanceof i0)?void 0:f,this.logService)}createOverrideConfigurationModel(e){const i=this.getContentsForOverrideIdentifer(e);if(!i||typeof i!="object"||!Object.keys(i).length)return this;const n={};for(const s of z4([...Object.keys(this.contents),...Object.keys(i)])){let l=this.contents[s];const d=i[s];d&&(typeof l=="object"&&typeof d=="object"?(l=o4(l),this.mergeContents(l,d)):l=d),n[s]=l}return new i0(n,this.keys,this.overrides,void 0,this.logService)}mergeContents(e,i){for(const n of Object.keys(i)){if(n in e&&vy(e[n])&&vy(i[n])){this.mergeContents(e[n],i[n]);continue}e[n]=o4(i[n])}}getContentsForOverrideIdentifer(e){let i=null,n=null;const s=l=>{l&&(n?this.mergeContents(n,l):n=o4(l))};for(const l of this.overrides)l.identifiers.length===1&&l.identifiers[0]===e?i=l.contents:l.identifiers.includes(e)&&s(l.contents);return s(i),n}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(e,i){this.updateValue(e,i,!0)}setValue(e,i){this.updateValue(e,i,!1)}removeValue(e){const i=this.keys.indexOf(e);i!==-1&&(this.keys.splice(i,1),Asi(this.contents,e),nR.test(e)&&this.overrides.splice(this.overrides.findIndex(n=>ch(n.identifiers,U0e(e))),1))}updateValue(e,i,n){UCt(this.contents,e,i,s=>this.logService.error(s)),n=n||this.keys.indexOf(e)===-1,n&&this.keys.push(e),nR.test(e)&&this.overrides.push({identifiers:U0e(e),keys:Object.keys(this.contents[e]),contents:Q5e(this.contents[e],s=>this.logService.error(s))})}}class Qgi{constructor(e,i){this._name=e,this.logService=i,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||i0.createEmptyModel(this.logService)}parseRaw(e,i){this._raw=e;const{contents:n,keys:s,overrides:l,restricted:d,hasExcludedProperties:f}=this.doParseRaw(e,i);this._configurationModel=new i0(n,s,l,f?[e]:void 0,this.logService),this._restrictedConfigurations=d||[]}doParseRaw(e,i){const n=dh.as(WE.Configuration).getConfigurationProperties(),s=this.filter(e,n,!0,i);e=s.raw;const l=Q5e(e,g=>this.logService.error(`Conflict in settings file ${this._name}: ${g}`)),d=Object.keys(e),f=this.toOverrides(e,g=>this.logService.error(`Conflict in settings file ${this._name}: ${g}`));return{contents:l,keys:d,overrides:f,restricted:s.restricted,hasExcludedProperties:s.hasExcludedProperties}}filter(e,i,n,s){var l,d,f;let g=!1;if(!(s!=null&&s.scopes)&&!(s!=null&&s.skipRestricted)&&!(!((l=s==null?void 0:s.exclude)===null||l===void 0)&&l.length))return{raw:e,restricted:[],hasExcludedProperties:g};const y={},w=[];for(const x in e)if(nR.test(x)&&n){const I=this.filter(e[x],i,!1,s);y[x]=I.raw,g=g||I.hasExcludedProperties,w.push(...I.restricted)}else{const I=i[x],P=I?typeof I.scope<"u"?I.scope:3:void 0;I!=null&&I.restricted&&w.push(x),!(!((d=s.exclude)===null||d===void 0)&&d.includes(x))&&(!((f=s.include)===null||f===void 0)&&f.includes(x)||(P===void 0||s.scopes===void 0||s.scopes.includes(P))&&!(s.skipRestricted&&(I!=null&&I.restricted)))?y[x]=e[x]:g=!0}return{raw:y,restricted:w,hasExcludedProperties:g}}toOverrides(e,i){const n=[];for(const s of Object.keys(e))if(nR.test(s)){const l={};for(const d in e[s])l[d]=e[s][d];n.push({identifiers:U0e(s),keys:Object.keys(l),contents:Q5e(l,i)})}return n}}class Xgi{constructor(e,i,n,s,l,d,f,g,y,w,x,I,P){this.key=e,this.overrides=i,this._value=n,this.overrideIdentifiers=s,this.defaultConfiguration=l,this.policyConfiguration=d,this.applicationConfiguration=f,this.userConfiguration=g,this.localUserConfiguration=y,this.remoteUserConfiguration=w,this.workspaceConfiguration=x,this.folderConfigurationModel=I,this.memoryConfigurationModel=P}toInspectValue(e){return(e==null?void 0:e.value)!==void 0||(e==null?void 0:e.override)!==void 0||(e==null?void 0:e.overrides)!==void 0?e:void 0}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.toInspectValue(this.userInspectValue)}}class kye{constructor(e,i,n,s,l,d,f,g,y,w){this._defaultConfiguration=e,this._policyConfiguration=i,this._applicationConfiguration=n,this._localUserConfiguration=s,this._remoteUserConfiguration=l,this._workspaceConfiguration=d,this._folderConfigurations=f,this._memoryConfiguration=g,this._memoryConfigurationByResource=y,this.logService=w,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new E_,this._userConfiguration=null}getValue(e,i,n){return this.getConsolidatedConfigurationModel(e,i,n).getValue(e)}updateValue(e,i,n={}){let s;n.resource?(s=this._memoryConfigurationByResource.get(n.resource),s||(s=i0.createEmptyModel(this.logService),this._memoryConfigurationByResource.set(n.resource,s))):s=this._memoryConfiguration,i===void 0?s.removeValue(e):s.setValue(e,i),n.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,i,n){const s=this.getConsolidatedConfigurationModel(e,i,n),l=this.getFolderConfigurationModelForResource(i.resource,n),d=i.resource?this._memoryConfigurationByResource.get(i.resource)||this._memoryConfiguration:this._memoryConfiguration,f=new Set;for(const g of s.overrides)for(const y of g.identifiers)s.getOverrideValue(e,y)!==void 0&&f.add(y);return new Xgi(e,i,s.getValue(e),f.size?[...f]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,n?this._workspaceConfiguration:void 0,l||void 0,d)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,i,n){let s=this.getConsolidatedConfigurationModelForResource(i,n);return i.overrideIdentifier&&(s=s.override(i.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(e)!==void 0&&(s=s.merge(this._policyConfiguration)),s}getConsolidatedConfigurationModelForResource({resource:e},i){let n=this.getWorkspaceConsolidatedConfiguration();if(i&&e){const s=i.getFolder(e);s&&(n=this.getFolderConsolidatedConfiguration(s.uri)||n);const l=this._memoryConfigurationByResource.get(e);l&&(n=n.merge(l))}return n}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let i=this._foldersConsolidatedConfigurations.get(e);if(!i){const n=this.getWorkspaceConsolidatedConfiguration(),s=this._folderConfigurations.get(e);s?(i=n.merge(s),this._foldersConsolidatedConfigurations.set(e,i)):i=n}return i}getFolderConfigurationModelForResource(e,i){if(i&&e){const n=i.getFolder(e);if(n)return this._folderConfigurations.get(n.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,i)=>{const{contents:n,overrides:s,keys:l}=this._folderConfigurations.get(i);return e.push([i,{contents:n,overrides:s,keys:l}]),e},[])}}static parse(e,i){const n=this.parseConfigurationModel(e.defaults,i),s=this.parseConfigurationModel(e.policy,i),l=this.parseConfigurationModel(e.application,i),d=this.parseConfigurationModel(e.user,i),f=this.parseConfigurationModel(e.workspace,i),g=e.folders.reduce((y,w)=>(y.set(Oo.revive(w[0]),this.parseConfigurationModel(w[1],i)),y),new E_);return new kye(n,s,l,d,i0.createEmptyModel(i),f,g,i0.createEmptyModel(i),new E_,i)}static parseConfigurationModel(e,i){return new i0(e.contents,e.keys,e.overrides,void 0,i)}}class Zgi{constructor(e,i,n,s,l){this.change=e,this.previous=i,this.currentConfiguraiton=n,this.currentWorkspace=s,this.logService=l,this._marker=` +`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=46,this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const d of e.keys)this.affectedKeys.add(d);for(const[,d]of e.overrides)for(const f of d)this.affectedKeys.add(f);this._affectsConfigStr=this._marker;for(const d of this.affectedKeys)this._affectsConfigStr+=d+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=kye.parse(this.previous.data,this.logService)),this._previousConfiguration}affectsConfiguration(e,i){var n;const s=this._marker+e,l=this._affectsConfigStr.indexOf(s);if(l<0)return!1;const d=l+s.length;if(d>=this._affectsConfigStr.length)return!1;const f=this._affectsConfigStr.charCodeAt(d);if(f!==this._markerCode1&&f!==this._markerCode2)return!1;if(i){const g=this.previousConfiguration?this.previousConfiguration.getValue(e,i,(n=this.previous)===null||n===void 0?void 0:n.workspace):void 0,y=this.currentConfiguraiton.getValue(e,i,this.currentWorkspace);return!vw(g,y)}return!0}}const bve={kind:0},Ygi={kind:1};function emi(c,e,i){return{kind:2,commandId:c,commandArgs:e,isBubble:i}}class pte{constructor(e,i,n){var s;this._log=n,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const l of e){const d=l.command;d&&d.charAt(0)!=="-"&&this._defaultBoundCommands.set(d,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=pte.handleRemovals([].concat(e).concat(i));for(let l=0,d=this._keybindings.length;l"u"){this._map.set(e,[i]),this._addToLookupMap(i);return}for(let s=n.length-1;s>=0;s--){const l=n[s];if(l.command===i.command)continue;let d=!0;for(let f=1;f"u"?(i=[e],this._lookupMap.set(e.command,i)):i.push(e)}_removeFromLookupMap(e){if(!e.command)return;const i=this._lookupMap.get(e.command);if(!(typeof i>"u")){for(let n=0,s=i.length;n"u"||n.length===0)return null;if(n.length===1)return n[0];for(let s=n.length-1;s>=0;s--){const l=n[s];if(i.contextMatchesRules(l.when))return l}return n[n.length-1]}resolve(e,i,n){const s=[...i,n];this._log(`| Resolving ${s}`);const l=this._map.get(s[0]);if(l===void 0)return this._log("\\ No keybinding entries."),bve;let d=null;if(s.length<2)d=l;else{d=[];for(let g=0,y=l.length;gw.chords.length)continue;let x=!0;for(let I=1;I=0;n--){const s=i[n];if(pte._contextMatchesRules(e,s.when))return s}return null}static _contextMatchesRules(e,i){return i?i.evaluate(e):!0}}function cvt(c){return c?`${c.serialize()}`:"no when condition"}function uvt(c){return c.extensionId?c.isBuiltinExtension?`built-in extension ${c.extensionId}`:`user extension ${c.extensionId}`:c.isDefault?"built-in":"user"}const tmi=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class imi extends Ii{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:Mr.None}get inChordMode(){return this._currentChords.length>0}constructor(e,i,n,s,l){super(),this._contextKeyService=e,this._commandService=i,this._telemetryService=n,this._notificationService=s,this._logService=l,this._onDidUpdateKeybindings=this._register(new ui),this._currentChords=[],this._currentChordChecker=new OHe,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=cU.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new gT,this._currentlyDispatchingCommandId=null,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,i){const n=this._getResolver().lookupPrimaryKeybinding(e,i||this._contextKeyService);if(n)return n.resolvedKeybinding}dispatchEvent(e,i){return this._dispatch(e,i)}softDispatch(e,i){this._log("/ Soft dispatching keyboard event");const n=this.resolveKeyboardEvent(e);if(n.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),bve;const[s]=n.getDispatchChords();if(s===null)return this._log("\\ Keyboard event cannot be dispatched"),bve;const l=this._contextKeyService.getContext(i),d=this._currentChords.map(({keypress:f})=>f);return this._getResolver().resolve(l,d,s)}_scheduleLeaveChordMode(){const e=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-e>5e3&&this._leaveChordMode()},500)}_expectAnotherChord(e,i){switch(this._currentChords.push({keypress:e,label:i}),this._currentChords.length){case 0:throw yHe("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(V("first.chord","({0}) was pressed. Waiting for second key of chord...",i));break;default:{const n=this._currentChords.map(({label:s})=>s).join(", ");this._currentChordStatusMessage=this._notificationService.status(V("next.chord","({0}) was pressed. Waiting for next key of chord...",n))}}this._scheduleLeaveChordMode(),ete.enabled&&ete.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],ete.enable()}_dispatch(e,i){return this._doDispatch(this.resolveKeyboardEvent(e),i,!1)}_singleModifierDispatch(e,i){const n=this.resolveKeyboardEvent(e),[s]=n.getSingleModifierDispatchChords();if(s)return this._ignoreSingleModifiers.has(s)?(this._log(`+ Ignoring single modifier ${s} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=cU.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=cU.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${s}.`),this._currentSingleModifier=s,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):s===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${s} ${s}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(n,i,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${s}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[l]=n.getChords();return this._ignoreSingleModifiers=new cU(l),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,i,n=!1){var s;let l=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let d=null,f=null;if(n){const[x]=e.getSingleModifierDispatchChords();d=x,f=x?[x]:[]}else[d]=e.getDispatchChords(),f=this._currentChords.map(({keypress:x})=>x);if(d===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),l;const g=this._contextKeyService.getContext(i),y=e.getLabel(),w=this._getResolver().resolve(g,f,d);switch(w.kind){case 0:{if(this._logService.trace("KeybindingService#dispatch",y,"[ No matching keybinding ]"),this.inChordMode){const x=this._currentChords.map(({label:I})=>I).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${x}, ${y}".`),this._notificationService.status(V("missing.chord","The key combination ({0}, {1}) is not a command.",x,y),{hideAfter:10*1e3}),this._leaveChordMode(),l=!0}return l}case 1:return this._logService.trace("KeybindingService#dispatch",y,"[ Several keybindings match - more chords needed ]"),l=!0,this._expectAnotherChord(d,y),this._log(this._currentChords.length===1?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),l;case 2:{if(this._logService.trace("KeybindingService#dispatch",y,`[ Will dispatch command ${w.commandId} ]`),w.commandId===null||w.commandId===""){if(this.inChordMode){const x=this._currentChords.map(({label:I})=>I).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${x}, ${y}".`),this._notificationService.status(V("missing.chord","The key combination ({0}, {1}) is not a command.",x,y),{hideAfter:10*1e3}),this._leaveChordMode(),l=!0}}else{this.inChordMode&&this._leaveChordMode(),w.isBubble||(l=!0),this._log(`+ Invoking command ${w.commandId}.`),this._currentlyDispatchingCommandId=w.commandId;try{typeof w.commandArgs>"u"?this._commandService.executeCommand(w.commandId).then(void 0,x=>this._notificationService.warn(x)):this._commandService.executeCommand(w.commandId,w.commandArgs).then(void 0,x=>this._notificationService.warn(x))}finally{this._currentlyDispatchingCommandId=null}tmi.test(w.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:w.commandId,from:"keybinding",detail:(s=e.getUserSettingsLabel())!==null&&s!==void 0?s:void 0})}return l}}}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}}class cU{constructor(e){this._ctrlKey=e?e.ctrlKey:!1,this._shiftKey=e?e.shiftKey:!1,this._altKey=e?e.altKey:!1,this._metaKey=e?e.metaKey:!1}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}cU.EMPTY=new cU(null);class dvt{constructor(e,i,n,s,l,d,f){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?iBe(e.getDispatchChords()):[],e&&this.chords.length===0&&(this.chords=iBe(e.getSingleModifierDispatchChords())),this.bubble=i?i.charCodeAt(0)===94:!1,this.command=this.bubble?i.substr(1):i,this.commandArgs=n,this.when=s,this.isDefault=l,this.extensionId=d,this.isBuiltinExtension=f}}function iBe(c){const e=[];for(let i=0,n=c.length;ithis._getLabel(e))}getAriaLabel(){return nmi.toLabel(this._os,this._chords,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:rmi.toLabel(this._os,this._chords,e=>this._getElectronAccelerator(e))}getUserSettingsLabel(){return smi.toLabel(this._os,this._chords,e=>this._getUserSettingsLabel(e))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map(e=>this._getChord(e))}_getChord(e){return new _ni(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map(e=>this._getChordDispatch(e))}getSingleModifierDispatchChords(){return this._chords.map(e=>this._getSingleModifierChordDispatch(e))}}class hie extends ami{constructor(e,i){super(i,e)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return d4.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":d4.toString(e.keyCode)}_getElectronAccelerator(e){return d4.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";const i=d4.toUserSettingsUS(e.keyCode);return i&&i.toLowerCase()}_getChordDispatch(e){return hie.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let i="";return e.ctrlKey&&(i+="ctrl+"),e.shiftKey&&(i+="shift+"),e.altKey&&(i+="alt+"),e.metaKey&&(i+="meta+"),i+=d4.toString(e.keyCode),i}_getSingleModifierChordDispatch(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}static _scanCodeToKeyCode(e){const i=wHe[e];if(i!==-1)return i;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof $4)return e;const i=this._scanCodeToKeyCode(e.scanCode);return i===0?null:new $4(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,i)}static resolveKeybinding(e,i){const n=iBe(e.chords.map(s=>this._toKeyCodeChord(s)));return n.length>0?[new hie(n,i)]:[]}}const hq=Kl("labelService"),nxt=Kl("progressService");class W4{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}W4.None=Object.freeze({report(){}});const IR=Kl("editorProgressService");class lmi{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;i--,this._valueLen--){const n=this._value.charCodeAt(i);if(!(n===47||this._splitOnBackslash&&n===92))break}return this.next()}hasNext(){return this._to!1,i=()=>!1){return new RU(new dmi(e,i))}static forStrings(){return new RU(new lmi)}static forConfigKeys(){return new RU(new cmi)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,i){const n=this._iter.reset(e);let s;this._root||(this._root=new Xge,this._root.segment=n.value());const l=[];for(s=this._root;;){const f=n.cmp(s.segment);if(f>0)s.left||(s.left=new Xge,s.left.segment=n.value()),l.push([-1,s]),s=s.left;else if(f<0)s.right||(s.right=new Xge,s.right.segment=n.value()),l.push([1,s]),s=s.right;else if(n.hasNext())n.next(),s.mid||(s.mid=new Xge,s.mid.segment=n.value()),l.push([0,s]),s=s.mid;else break}const d=s.value;s.value=i,s.key=e;for(let f=l.length-1;f>=0;f--){const g=l[f][1];g.updateHeight();const y=g.balanceFactor();if(y<-1||y>1){const w=l[f][0],x=l[f+1][0];if(w===1&&x===1)l[f][1]=g.rotateLeft();else if(w===-1&&x===-1)l[f][1]=g.rotateRight();else if(w===1&&x===-1)g.right=l[f+1][1]=l[f+1][1].rotateRight(),l[f][1]=g.rotateLeft();else if(w===-1&&x===1)g.left=l[f+1][1]=l[f+1][1].rotateLeft(),l[f][1]=g.rotateRight();else throw new Error;if(f>0)switch(l[f-1][0]){case-1:l[f-1][1].left=l[f][1];break;case 1:l[f-1][1].right=l[f][1];break;case 0:l[f-1][1].mid=l[f][1];break}else this._root=l[0][1]}}return d}get(e){var i;return(i=this._getNode(e))===null||i===void 0?void 0:i.value}_getNode(e){const i=this._iter.reset(e);let n=this._root;for(;n;){const s=i.cmp(n.segment);if(s>0)n=n.left;else if(s<0)n=n.right;else if(i.hasNext())i.next(),n=n.mid;else break}return n}has(e){const i=this._getNode(e);return!((i==null?void 0:i.value)===void 0&&(i==null?void 0:i.mid)===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,i){var n;const s=this._iter.reset(e),l=[];let d=this._root;for(;d;){const f=s.cmp(d.segment);if(f>0)l.push([-1,d]),d=d.left;else if(f<0)l.push([1,d]),d=d.right;else if(s.hasNext())s.next(),l.push([0,d]),d=d.mid;else break}if(d){if(i?(d.left=void 0,d.mid=void 0,d.right=void 0,d.height=1):(d.key=void 0,d.value=void 0),!d.mid&&!d.value)if(d.left&&d.right){const f=this._min(d.right);if(f.key){const{key:g,value:y,segment:w}=f;this._delete(f.key,!1),d.key=g,d.value=y,d.segment=w}}else{const f=(n=d.left)!==null&&n!==void 0?n:d.right;if(l.length>0){const[g,y]=l[l.length-1];switch(g){case-1:y.left=f;break;case 0:y.mid=f;break;case 1:y.right=f;break}}else this._root=f}for(let f=l.length-1;f>=0;f--){const g=l[f][1];g.updateHeight();const y=g.balanceFactor();if(y>1?(g.right.balanceFactor()>=0||(g.right=g.right.rotateRight()),l[f][1]=g.rotateLeft()):y<-1&&(g.left.balanceFactor()<=0||(g.left=g.left.rotateLeft()),l[f][1]=g.rotateRight()),f>0)switch(l[f-1][0]){case-1:l[f-1][1].left=l[f][1];break;case 1:l[f-1][1].right=l[f][1];break;case 0:l[f-1][1].mid=l[f][1];break}else this._root=l[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const i=this._iter.reset(e);let n=this._root,s;for(;n;){const l=i.cmp(n.segment);if(l>0)n=n.left;else if(l<0)n=n.right;else if(i.hasNext())i.next(),s=n.value||s,n=n.mid;else break}return n&&n.value||s}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,i){const n=this._iter.reset(e);let s=this._root;for(;s;){const l=n.cmp(s.segment);if(l>0)s=s.left;else if(l<0)s=s.right;else if(n.hasNext())n.next(),s=s.mid;else return s.mid?this._entries(s.mid):i?s.value:void 0}}forEach(e){for(const[i,n]of this)e(n,i)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){const i=[];return this._dfsEntries(e,i),i[Symbol.iterator]()}_dfsEntries(e,i){e&&(e.left&&this._dfsEntries(e.left,i),e.value&&i.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,i),e.right&&this._dfsEntries(e.right,i))}}const T9=Kl("contextService");function nBe(c){const e=c;return typeof(e==null?void 0:e.id)=="string"&&Oo.isUri(e.uri)}function fmi(c){const e=c;return typeof(e==null?void 0:e.id)=="string"&&!nBe(c)&&!pmi(c)}const hmi={id:"empty-window"};function _mi(c,e){if(typeof c=="string"||typeof c>"u")return typeof c=="string"?{id:BM(c)}:hmi;const i=c;return i.configuration?{id:i.id,configPath:i.configuration}:i.folders.length===1?{id:i.id,uri:i.folders[0].uri}:{id:i.id}}function pmi(c){const e=c;return typeof(e==null?void 0:e.id)=="string"&&Oo.isUri(e.configPath)}class gmi{constructor(e,i){this.raw=i,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}const rBe="code-workspace";V("codeWorkspace","Code Workspace");const rxt="4064f6ec-cb38-4ad0-af64-ee6467e63c82";function mmi(c){return c.id===rxt}var sBe;(function(c){c.inspectTokensAction=V("inspectTokens","Developer: Inspect Tokens")})(sBe||(sBe={}));var Cve;(function(c){c.gotoLineActionLabel=V("gotoLineActionLabel","Go to Line/Column...")})(Cve||(Cve={}));var oBe;(function(c){c.helpQuickAccessActionLabel=V("helpQuickAccess","Show all Quick Access Providers")})(oBe||(oBe={}));var Sve;(function(c){c.quickCommandActionLabel=V("quickCommandActionLabel","Command Palette"),c.quickCommandHelp=V("quickCommandActionHelp","Show And Run Commands")})(Sve||(Sve={}));var _ie;(function(c){c.quickOutlineActionLabel=V("quickOutlineActionLabel","Go to Symbol..."),c.quickOutlineByCategoryActionLabel=V("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(_ie||(_ie={}));var wve;(function(c){c.editorViewAccessibleLabel=V("editorViewAccessibleLabel","Editor content"),c.accessibilityHelpMessage=V("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")})(wve||(wve={}));var aBe;(function(c){c.toggleHighContrast=V("toggleHighContrast","Toggle High Contrast Theme")})(aBe||(aBe={}));var lBe;(function(c){c.bulkEditServiceSummary=V("bulkEditServiceSummary","Made {0} edits in {1} files")})(lBe||(lBe={}));const sxt=Kl("workspaceTrustManagementService");let _q=[],nze=[],oxt=[];function Zge(c,e=!1){vmi(c,!1,e)}function vmi(c,e,i){const n=ymi(c,e);_q.push(n),n.userConfigured?oxt.push(n):nze.push(n),i&&!n.userConfigured&&_q.forEach(s=>{s.mime===n.mime||s.userConfigured||(n.extension&&s.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&s.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&s.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&s.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))})}function ymi(c,e){return{id:c.id,mime:c.mime,filename:c.filename,extension:c.extension,filepattern:c.filepattern,firstline:c.firstline,userConfigured:e,filenameLowercase:c.filename?c.filename.toLowerCase():void 0,extensionLowercase:c.extension?c.extension.toLowerCase():void 0,filepatternLowercase:c.filepattern?Rwt(c.filepattern.toLowerCase()):void 0,filepatternOnPath:c.filepattern?c.filepattern.indexOf(gp.sep)>=0:!1}}function bmi(){_q=_q.filter(c=>c.userConfigured),nze=[]}function Cmi(c,e){return Smi(c,e).map(i=>i.id)}function Smi(c,e){let i;if(c)switch(c.scheme){case wa.file:i=c.fsPath;break;case wa.data:{i=oR.parseMetaData(c).get(oR.META_DATA_LABEL);break}case wa.vscodeNotebookCell:i=void 0;break;default:i=c.path}if(!i)return[{id:"unknown",mime:i_.unknown}];i=i.toLowerCase();const n=BM(i),s=fvt(i,n,oxt);if(s)return[s,{id:yw,mime:i_.text}];const l=fvt(i,n,nze);if(l)return[l,{id:yw,mime:i_.text}];if(e){const d=wmi(e);if(d)return[d,{id:yw,mime:i_.text}]}return[{id:"unknown",mime:i_.unknown}]}function fvt(c,e,i){var n;let s,l,d;for(let f=i.length-1;f>=0;f--){const g=i[f];if(e===g.filenameLowercase){s=g;break}if(g.filepattern&&(!l||g.filepattern.length>l.filepattern.length)){const y=g.filepatternOnPath?c:e;!((n=g.filepatternLowercase)===null||n===void 0)&&n.call(g,y)&&(l=g)}g.extension&&(!d||g.extension.length>d.extension.length)&&e.endsWith(g.extensionLowercase)&&(d=g)}if(s)return s;if(l)return l;if(d)return d}function wmi(c){if(LHe(c)&&(c=c.substr(1)),c.length>0)for(let e=_q.length-1;e>=0;e--){const i=_q[e];if(!i.firstline)continue;const n=c.match(i.firstline);if(n&&n.length>0)return i}}const Yge=Object.prototype.hasOwnProperty,hvt="vs.editor.nullLanguage";class xmi{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(hvt,0),this._register(yw,1),this._nextLanguageId=2}_register(e,i){this._languageIdToLanguage[i]=e,this._languageToLanguageId.set(e,i)}register(e){if(this._languageToLanguageId.has(e))return;const i=this._nextLanguageId++;this._register(e,i)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||hvt}}class pie extends Ii{constructor(e=!0,i=!1){super(),this._onDidChange=this._register(new ui),this.onDidChange=this._onDidChange.event,pie.instanceCount++,this._warnOnOverwrite=i,this.languageIdCodec=new xmi,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(XU.onDidChangeLanguages(n=>{this._initializeFromRegistry()})))}dispose(){pie.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},bmi();const e=[].concat(XU.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const i of e)this._registerLanguage(i);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(i=>{const n=this._languages[i];n.name&&(this._nameMap[n.name]=n.identifier),n.aliases.forEach(s=>{this._lowercaseNameMap[s.toLowerCase()]=n.identifier}),n.mimetypes.forEach(s=>{this._mimeTypesMap[s]=n.identifier})}),dh.as(WE.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const i=e.id;let n;Yge.call(this._languages,i)?n=this._languages[i]:(this.languageIdCodec.register(i),n={identifier:i,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[i]=n),this._mergeLanguage(n,e)}_mergeLanguage(e,i){const n=i.id;let s=null;if(Array.isArray(i.mimetypes)&&i.mimetypes.length>0&&(e.mimetypes.push(...i.mimetypes),s=i.mimetypes[0]),s||(s=`text/x-${n}`,e.mimetypes.push(s)),Array.isArray(i.extensions)){i.configuration?e.extensions=i.extensions.concat(e.extensions):e.extensions=e.extensions.concat(i.extensions);for(const f of i.extensions)Zge({id:n,mime:s,extension:f},this._warnOnOverwrite)}if(Array.isArray(i.filenames))for(const f of i.filenames)Zge({id:n,mime:s,filename:f},this._warnOnOverwrite),e.filenames.push(f);if(Array.isArray(i.filenamePatterns))for(const f of i.filenamePatterns)Zge({id:n,mime:s,filepattern:f},this._warnOnOverwrite);if(typeof i.firstLine=="string"&&i.firstLine.length>0){let f=i.firstLine;f.charAt(0)!=="^"&&(f="^"+f);try{const g=new RegExp(f);eni(g)||Zge({id:n,mime:s,firstline:g},this._warnOnOverwrite)}catch(g){console.warn(`[${i.id}]: Invalid regular expression \`${f}\`: `,g)}}e.aliases.push(n);let l=null;if(typeof i.aliases<"u"&&Array.isArray(i.aliases)&&(i.aliases.length===0?l=[null]:l=i.aliases),l!==null)for(const f of l)!f||f.length===0||e.aliases.push(f);const d=l!==null&&l.length>0;if(!(d&&l[0]===null)){const f=(d?l[0]:null)||n;(d||!e.name)&&(e.name=f)}i.configuration&&e.configurationFiles.push(i.configuration),i.icon&&e.icons.push(i.icon)}isRegisteredLanguageId(e){return e?Yge.call(this._languages,e):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const i=e.toLowerCase();return Yge.call(this._lowercaseNameMap,i)?this._lowercaseNameMap[i]:null}getLanguageIdByMimeType(e){return e&&Yge.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,i){return!e&&!i?[]:Cmi(e,i)}}pie.instanceCount=0;class gie extends Ii{constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new ui),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new ui),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new ui({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,gie.instanceCount++,this._registry=this._register(new pie(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){gie.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,i){const n=this._registry.guessLanguageIdByFilepathOrFirstLine(e,i);return fHe(n,null)}createById(e){return new _vt(this.onDidChange,()=>this._createAndGetLanguageIdentifier(e))}createByFilepathOrFirstLine(e,i){return new _vt(this.onDidChange,()=>{const n=this.guessLanguageIdByFilepathOrFirstLine(e,i);return this._createAndGetLanguageIdentifier(n)})}_createAndGetLanguageIdentifier(e){return(!e||!this.isRegisteredLanguageId(e))&&(e=yw),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),Nh.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}}gie.instanceCount=0;class _vt{constructor(e,i){this._onDidChangeLanguages=e,this._selector=i,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages(()=>this._evaluate())),this._emitter||(this._emitter=new ui({onDidRemoveLastListener:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var e;const i=this._selector();i!==this.languageId&&(this.languageId=i,(e=this._emitter)===null||e===void 0||e.fire(this.languageId))}}const mie={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:i_.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"},kmi=()=>({get delay(){return-1},dispose:()=>{},showHover:()=>{}});let Dye=kmi;const Tmi=new FE(()=>Dye("mouse",!1)),Dmi=new FE(()=>Dye("element",!1));function Emi(c){Dye=c}function Py(c){return c==="element"?Dmi.value:Tmi.value}function pq(){return Dye("element",!0)}let axt={showHover:()=>{},hideHover:()=>{},showAndFocusLastHover:()=>{},setupUpdatableHover:()=>null,triggerUpdatableHover:()=>{}};function Imi(c){axt=c}function HE(){return axt}class Nmi{constructor(e){this.spliceables=e}splice(e,i,n){this.spliceables.forEach(s=>s.splice(e,i,n))}}class v5 extends Error{constructor(e,i){super(`ListError [${e}] ${i}`)}}function pvt(c,e){const i=[];for(const n of e){if(c.start>=n.range.end)continue;if(c.ende.concat(i),[]))}class Ami{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=e??0,this._size=this._paddingTop}splice(e,i,n=[]){const s=n.length-i,l=pvt({start:0,end:e},this.groups),d=pvt({start:e+i,end:Number.POSITIVE_INFINITY},this.groups).map(g=>({range:cBe(g.range,s),size:g.size})),f=n.map((g,y)=>({range:{start:e+y,end:e+y+1},size:g.size}));this.groups=Pmi(l,f,d),this._size=this._paddingTop+this.groups.reduce((g,y)=>g+y.size*(y.range.end-y.range.start),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e{for(const n of e)this.getRenderer(i).disposeTemplate(n.templateData),n.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){const i=this.renderers.get(e);if(!i)throw new Error(`No renderer found for ${e}`);return i}}var r6=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};const y5={CurrentDragAndDropData:void 0},kN={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(c){return[c]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class Bne{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class Rmi{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class Fmi{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let i=0;is,e!=null&&e.getPosInSet?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(i,n)=>n+1,e!=null&&e.getRole?this.getRole=e.getRole.bind(e):this.getRole=i=>"listitem",e!=null&&e.isChecked?this.isChecked=e.isChecked.bind(e):this.isChecked=i=>{}}}class hk{get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const i of this.items)this.measureItemWidth(i);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:M8e(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,i,n,s=kN){var l,d,f,g,y,w,x,I,P,O,W,X,Z;if(this.virtualDelegate=i,this.domId=`list_id_${++hk.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new hT(50),this.splicing=!1,this.dragOverAnimationStopDisposable=Ii.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=Ii.None,this.onDragLeaveTimeout=Ii.None,this.disposables=new On,this._onDidChangeContentHeight=new ui,this._onDidChangeContentWidth=new ui,this.onDidChangeContentHeight=Mr.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this._horizontalScrolling=!1,s.horizontalScrolling&&s.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=this.createRangeMap((l=s.paddingTop)!==null&&l!==void 0?l:0);for(const he of n)this.renderers.set(he.templateId,he);this.cache=this.disposables.add(new Mmi(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof s.mouseSupport=="boolean"?s.mouseSupport:!0),this._horizontalScrolling=(d=s.horizontalScrolling)!==null&&d!==void 0?d:kN.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=typeof s.paddingBottom>"u"?0:s.paddingBottom,this.accessibilityProvider=new Wmi(s.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",((f=s.transformOptimization)!==null&&f!==void 0?f:kN.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(Jd.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new qq({forceIntegerValues:!0,smoothScrollDuration:(g=s.smoothScrolling)!==null&&g!==void 0&&g?125:0,scheduleAtNextAnimationFrame:he=>zC(Io(this.domNode),he)})),this.scrollableElement=this.disposables.add(new cye(this.rowsContainer,{alwaysConsumeMouseWheel:(y=s.alwaysConsumeMouseWheel)!==null&&y!==void 0?y:kN.alwaysConsumeMouseWheel,horizontal:1,vertical:(w=s.verticalScrollMode)!==null&&w!==void 0?w:kN.verticalScrollMode,useShadows:(x=s.useShadows)!==null&&x!==void 0?x:kN.useShadows,mouseWheelScrollSensitivity:s.mouseWheelScrollSensitivity,fastScrollSensitivity:s.fastScrollSensitivity,scrollByPage:s.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(tn(this.rowsContainer,Gd.Change,he=>this.onTouchChange(he))),this.disposables.add(tn(this.scrollableElement.getDomNode(),"scroll",he=>he.target.scrollTop=0)),this.disposables.add(tn(this.domNode,"dragover",he=>this.onDragOver(this.toDragEvent(he)))),this.disposables.add(tn(this.domNode,"drop",he=>this.onDrop(this.toDragEvent(he)))),this.disposables.add(tn(this.domNode,"dragleave",he=>this.onDragLeave(this.toDragEvent(he)))),this.disposables.add(tn(this.domNode,"dragend",he=>this.onDragEnd(he))),this.setRowLineHeight=(I=s.setRowLineHeight)!==null&&I!==void 0?I:kN.setRowLineHeight,this.setRowHeight=(P=s.setRowHeight)!==null&&P!==void 0?P:kN.setRowHeight,this.supportDynamicHeights=(O=s.supportDynamicHeights)!==null&&O!==void 0?O:kN.supportDynamicHeights,this.dnd=(W=s.dnd)!==null&&W!==void 0?W:this.disposables.add(kN.dnd),this.layout((X=s.initialSize)===null||X===void 0?void 0:X.height,(Z=s.initialSize)===null||Z===void 0?void 0:Z.width)}updateOptions(e){e.paddingBottom!==void 0&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),e.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),e.horizontalScrolling!==void 0&&(this.horizontalScrolling=e.horizontalScrolling);let i;if(e.scrollByPage!==void 0&&(i={...i??{},scrollByPage:e.scrollByPage}),e.mouseWheelScrollSensitivity!==void 0&&(i={...i??{},mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),e.fastScrollSensitivity!==void 0&&(i={...i??{},fastScrollSensitivity:e.fastScrollSensitivity}),i&&this.scrollableElement.updateOptions(i),e.paddingTop!==void 0&&e.paddingTop!==this.rangeMap.paddingTop){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),s=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(n,Math.max(0,this.lastRenderTop+s),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}createRangeMap(e){return new Ami(e)}splice(e,i,n=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,i,n)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,i,n=[]){const s=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),l={start:e,end:e+i},d=pv.intersect(s,l),f=new Map;for(let Te=d.end-1;Te>=d.start;Te--){const Be=this.items[Te];if(Be.dragStartDisposable.dispose(),Be.checkedDisposable.dispose(),Be.row){let Me=f.get(Be.templateId);Me||(Me=[],f.set(Be.templateId,Me));const vt=this.renderers.get(Be.templateId);vt&&vt.disposeElement&&vt.disposeElement(Be.element,Te,Be.row.templateData,Be.size),Me.unshift(Be.row)}Be.row=null,Be.stale=!0}const g={start:e+i,end:this.items.length},y=pv.intersect(g,s),w=pv.relativeComplement(g,s),x=n.map(Te=>({id:String(this.itemId++),element:Te,templateId:this.virtualDelegate.getTemplateId(Te),size:this.virtualDelegate.getHeight(Te),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(Te),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:Ii.None,checkedDisposable:Ii.None,stale:!1}));let I;e===0&&i>=this.items.length?(this.rangeMap=this.createRangeMap(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,x),I=this.items,this.items=x):(this.rangeMap.splice(e,i,x),I=this.items.splice(e,i,...x));const P=n.length-i,O=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),W=cBe(y,P),X=pv.intersect(O,W);for(let Te=X.start;TecBe(Te,P)),we=[{start:e,end:e+n.length},...ee].map(Te=>pv.intersect(O,Te)).reverse();for(const Te of we)for(let Be=Te.end-1;Be>=Te.start;Be--){const Me=this.items[Be],vt=f.get(Me.templateId),Nt=vt==null?void 0:vt.pop();this.insertItemInDOM(Be,Nt)}for(const Te of f.values())for(const Be of Te)this.cache.release(Be);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),I.map(Te=>Te.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=zC(Io(this.domNode),()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const i of this.items)typeof i.width<"u"&&(e=Math.max(e,i.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:e===0?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){return this.getRenderRange(this.lastRenderTop,this.lastRenderHeight).start}element(e){return this.items[e].element}indexOf(e){return this.items.findIndex(i=>i.element===e)}domElement(e){const i=this.items[e].row;return i&&i.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,i){const n={height:typeof e=="number"?e:uri(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,n.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(n),typeof i<"u"&&(this.renderWidth=i,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof i=="number"?i:M8e(this.domNode)})}render(e,i,n,s,l,d=!1){const f=this.getRenderRange(i,n),g=pv.relativeComplement(f,e).reverse(),y=pv.relativeComplement(e,f);if(d){const w=pv.intersect(e,f);for(let x=w.start;x{for(const w of y)for(let x=w.start;x=w.start;x--)this.insertItemInDOM(x)}),s!==void 0&&(this.rowsContainer.style.left=`-${s}px`),this.rowsContainer.style.top=`-${i}px`,this.horizontalScrolling&&l!==void 0&&(this.rowsContainer.style.width=`${Math.max(l,this.renderWidth)}px`),this.lastRenderTop=i,this.lastRenderHeight=n}insertItemInDOM(e,i){var n,s,l;const d=this.items[e];if(!d.row)if(i)d.row=i,d.stale=!0;else{const x=this.cache.alloc(d.templateId);d.row=x.row,d.stale||(d.stale=x.isReusingConnectedDomNode)}const f=this.accessibilityProvider.getRole(d.element)||"listitem";d.row.domNode.setAttribute("role",f);const g=this.accessibilityProvider.isChecked(d.element);if(typeof g=="boolean")d.row.domNode.setAttribute("aria-checked",String(!!g));else if(g){const x=I=>d.row.domNode.setAttribute("aria-checked",String(!!I));x(g.value),d.checkedDisposable=g.onDidChange(()=>x(g.value))}if(d.stale||!d.row.domNode.parentElement){const x=(l=(s=(n=this.items.at(e+1))===null||n===void 0?void 0:n.row)===null||s===void 0?void 0:s.domNode)!==null&&l!==void 0?l:null;(d.row.domNode.parentElement!==this.rowsContainer||d.row.domNode.nextElementSibling!==x)&&this.rowsContainer.insertBefore(d.row.domNode,x),d.stale=!1}this.updateItemInDOM(d,e);const y=this.renderers.get(d.templateId);if(!y)throw new Error(`No renderer found for template id ${d.templateId}`);y==null||y.renderElement(d.element,e,d.row.templateData,d.size);const w=this.dnd.getDragURI(d.element);d.dragStartDisposable.dispose(),d.row.domNode.draggable=!!w,w&&(d.dragStartDisposable=tn(d.row.domNode,"dragstart",x=>this.onDragStart(d.element,w,x))),this.horizontalScrolling&&(this.measureItemWidth(d),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=M8e(e.row.domNode);const i=Io(e.row.domNode).getComputedStyle(e.row.domNode);i.paddingLeft&&(e.width+=parseFloat(i.paddingLeft)),i.paddingRight&&(e.width+=parseFloat(i.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,i){e.row.domNode.style.top=`${this.elementTop(i)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${i}`),e.row.domNode.setAttribute("data-last-element",i===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",i%2===0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,i,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,i))),e.row.domNode.setAttribute("id",this.getElementDomId(i)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const i=this.items[e];if(i.dragStartDisposable.dispose(),i.checkedDisposable.dispose(),i.row){const n=this.renderers.get(i.templateId);n&&n.disposeElement&&n.disposeElement(i.element,e,i.row.templateData,i.size),this.cache.release(i.row),i.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,i){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:i})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return Mr.map(this.disposables.add(new Yl(this.domNode,"click")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseDblClick(){return Mr.map(this.disposables.add(new Yl(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseMiddleClick(){return Mr.filter(Mr.map(this.disposables.add(new Yl(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e),this.disposables),e=>e.browserEvent.button===1,this.disposables)}get onMouseDown(){return Mr.map(this.disposables.add(new Yl(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOver(){return Mr.map(this.disposables.add(new Yl(this.domNode,"mouseover")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOut(){return Mr.map(this.disposables.add(new Yl(this.domNode,"mouseout")).event,e=>this.toMouseEvent(e),this.disposables)}get onContextMenu(){return Mr.any(Mr.map(this.disposables.add(new Yl(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e),this.disposables),Mr.map(this.disposables.add(new Yl(this.domNode,Gd.Contextmenu)).event,e=>this.toGestureEvent(e),this.disposables))}get onTouchStart(){return Mr.map(this.disposables.add(new Yl(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e),this.disposables)}get onTap(){return Mr.map(this.disposables.add(new Yl(this.rowsContainer,Gd.Tap)).event,e=>this.toGestureEvent(e),this.disposables)}toMouseEvent(e){const i=this.getItemIndexFromEventTarget(e.target||null),n=typeof i>"u"?void 0:this.items[i],s=n&&n.element;return{browserEvent:e,index:i,element:s}}toTouchEvent(e){const i=this.getItemIndexFromEventTarget(e.target||null),n=typeof i>"u"?void 0:this.items[i],s=n&&n.element;return{browserEvent:e,index:i,element:s}}toGestureEvent(e){const i=this.getItemIndexFromEventTarget(e.initialTarget||null),n=typeof i>"u"?void 0:this.items[i],s=n&&n.element;return{browserEvent:e,index:i,element:s}}toDragEvent(e){const i=this.getItemIndexFromEventTarget(e.target||null),n=typeof i>"u"?void 0:this.items[i],s=n&&n.element,l=this.getTargetSector(e,i);return{browserEvent:e,index:i,element:s,sector:l}}onScroll(e){try{const i=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(i,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(i){throw console.error("Got bad scroll event:",e),i}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,i,n){var s,l;if(!n.dataTransfer)return;const d=this.dnd.getDragElements(e);if(n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setData(mie.TEXT,i),n.dataTransfer.setDragImage){let f;this.dnd.getDragLabel&&(f=this.dnd.getDragLabel(d,n)),typeof f>"u"&&(f=String(d.length));const g=Sr(".monaco-drag-image");g.textContent=f;const w=(x=>{for(;x&&!x.classList.contains("monaco-workbench");)x=x.parentElement;return x||this.domNode.ownerDocument})(this.domNode);w.appendChild(g),n.dataTransfer.setDragImage(g,-10,-10),setTimeout(()=>w.removeChild(g),0)}this.domNode.classList.add("dragging"),this.currentDragData=new Bne(d),y5.CurrentDragAndDropData=new Rmi(d),(l=(s=this.dnd).onDragStart)===null||l===void 0||l.call(s,this.currentDragData,n)}onDragOver(e){var i,n;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),y5.CurrentDragAndDropData&&y5.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(y5.CurrentDragAndDropData)this.currentDragData=y5.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new Fmi}const s=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.sector,e.browserEvent);if(this.canDrop=typeof s=="boolean"?s:s.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect=typeof s!="boolean"&&((i=s.effect)===null||i===void 0?void 0:i.type)===0?"copy":"move";let l;typeof s!="boolean"&&s.feedback?l=s.feedback:typeof e.index>"u"?l=[-1]:l=[e.index],l=z4(l).filter(f=>f>=-1&&ff-g),l=l[0]===-1?[-1]:l;let d=typeof s!="boolean"&&s.effect&&s.effect.position?s.effect.position:"drop-target";if(Bmi(this.currentDragFeedback,l)&&this.currentDragFeedbackPosition===d)return!0;if(this.currentDragFeedback=l,this.currentDragFeedbackPosition=d,this.currentDragFeedbackDisposable.dispose(),l[0]===-1)this.domNode.classList.add(d),this.rowsContainer.classList.add(d),this.currentDragFeedbackDisposable=go(()=>{this.domNode.classList.remove(d),this.rowsContainer.classList.remove(d)});else{if(l.length>1&&d!=="drop-target")throw new Error("Can't use multiple feedbacks with position different than 'over'");d==="drop-target-after"&&l[0]{var f;for(const g of l){const y=this.items[g];y.dropTarget=!1,(f=y.row)===null||f===void 0||f.domNode.classList.remove(d)}})}return!0}onDragLeave(e){var i,n;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=tR(()=>this.clearDragOverFeedback(),100,this.disposables),this.currentDragData&&((n=(i=this.dnd).onDragLeave)===null||n===void 0||n.call(i,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const i=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,y5.CurrentDragAndDropData=void 0,!(!i||!e.browserEvent.dataTransfer)&&(e.browserEvent.preventDefault(),i.update(e.browserEvent.dataTransfer),this.dnd.drop(i,e.element,e.index,e.sector,e.browserEvent))}onDragEnd(e){var i,n;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,y5.CurrentDragAndDropData=void 0,(n=(i=this.dnd).onDragEnd)===null||n===void 0||n.call(i,e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackPosition=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=Ii.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const i=vCt(this.domNode).top;this.dragOverAnimationDisposable=Sri(Io(this.domNode),this.animateDragAndDropScrollTop.bind(this,i))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=tR(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(this.dragOverMouseY===void 0)return;const i=this.dragOverMouseY-e,n=this.renderHeight-35;i<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(i-35))):i>n&&(this.scrollTop+=Math.min(14,Math.floor(.3*(i-n))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getTargetSector(e,i){if(i===void 0)return;const n=e.offsetY/this.items[i].size,s=Math.floor(n/.25);return fy(s,0,3)}getItemIndexFromEventTarget(e){const i=this.scrollableElement.getDomNode();let n=e;for(;Sm(n)&&n!==this.rowsContainer&&i.contains(n);){const s=n.getAttribute("data-index");if(s){const l=Number(s);if(!isNaN(l))return l}n=n.parentElement}}getRenderRange(e,i){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+i-1)}}_rerender(e,i,n){const s=this.getRenderRange(e,i);let l,d;e===this.elementTop(s.start)?(l=s.start,d=0):s.end-s.start>1&&(l=s.start+1,d=this.elementTop(l)-e);let f=0;for(;;){const g=this.getRenderRange(e,i);let y=!1;for(let w=g.start;w=I.start;P--)this.insertItemInDOM(P);for(let I=g.start;Ic===e;function uBe(c=PE){return(e,i)=>ch(e,i,c)}function lxt(){return(c,e)=>c.equals(e)}function Vmi(c,e,i){return!c||!e?c===e:i(c,e)}class Ib{constructor(e,i,n){this.owner=e,this.debugNameSource=i,this.referenceFn=n}getDebugName(e){return Hmi(e,this)}}const gvt=new Map,dBe=new WeakMap;function Hmi(c,e){var i;const n=dBe.get(c);if(n)return n;const s=jmi(c,e);if(s){let l=(i=gvt.get(s))!==null&&i!==void 0?i:0;l++,gvt.set(s,l);const d=l===1?s:`${s}#${l}`;return dBe.set(c,d),d}}function jmi(c,e){const i=dBe.get(c);if(i)return i;const n=e.owner?Umi(e.owner)+".":"";let s;const l=e.debugNameSource;if(l!==void 0)if(typeof l=="function"){if(s=l(),s!==void 0)return n+s}else return n+l;const d=e.referenceFn;if(d!==void 0&&(s=Eye(d),s!==void 0))return n+s;if(e.owner!==void 0){const f=zmi(e.owner,c);if(f!==void 0)return n+f}}function zmi(c,e){for(const i in c)if(c[i]===e)return i}const mvt=new Map,vvt=new WeakMap;function Umi(c){var e;const i=vvt.get(c);if(i)return i;const n=qmi(c);let s=(e=mvt.get(n))!==null&&e!==void 0?e:0;s++,mvt.set(n,s);const l=s===1?n:`${n}#${s}`;return vvt.set(c,l),l}function qmi(c){const e=c.constructor;return e?e.name:"Object"}function Eye(c){const e=c.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(e),s=n?n[1]:void 0;return s==null?void 0:s.trim()}let $mi;function lL(){return $mi}let cxt;function Jmi(c){cxt=c}let uxt;function Gmi(c){uxt=c}class dxt{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,i){const n=i===void 0?void 0:e,s=i===void 0?e:i;return uxt({owner:n,debugName:()=>{const l=Eye(s);if(l!==void 0)return l;const f=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(s.toString());if(f)return`${this.debugName}.${f[2]}`;if(!n)return`${this.debugName} (mapped)`},debugReferenceFn:s},l=>s(this.read(l),l))}recomputeInitiallyAndOnChange(e,i){return e.add(cxt(this,i)),this}}class Wne extends dxt{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const i=this.observers.size;this.observers.add(e),i===0&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function Rd(c,e){const i=new Iye(c,e);try{c(i)}finally{i.finish()}}let eme;function r0e(c){if(eme)c(eme);else{const e=new Iye(c,void 0);eme=e;try{c(e)}finally{e.finish(),eme=void 0}}}async function Kmi(c,e){const i=new Iye(c,e);try{await c(i)}finally{i.finish()}}function vie(c,e,i){c?e(c):Rd(e,i)}class Iye{constructor(e,i){var n;this._fn=e,this._getDebugName=i,this.updatingObservers=[],(n=lL())===null||n===void 0||n.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():Eye(this._fn)}updateObserver(e,i){this.updatingObservers.push({observer:e,observable:i}),e.beginUpdate(i)}finish(){var e;const i=this.updatingObservers;for(let n=0;n{},()=>`Setting ${this.debugName}`));try{const d=this._value;this._setValue(e),(s=lL())===null||s===void 0||s.handleObservableChanged(this,{oldValue:d,newValue:e,change:n,didChange:!0,hadValue:!0});for(const f of this.observers)i.updateObserver(f,this),f.handleChange(this,n)}finally{l&&l.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function yie(c,e){let i;return typeof c=="string"?i=new Ib(void 0,c,void 0):i=new Ib(c,void 0,void 0),new Xmi(i,e,PE)}class Xmi extends rze{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){var e;(e=this._value)===null||e===void 0||e.dispose()}}function Ma(c,e){return e!==void 0?new D9(new Ib(c,void 0,e),e,void 0,void 0,void 0,PE):new D9(new Ib(void 0,void 0,c),c,void 0,void 0,void 0,PE)}function fxt(c,e,i){return new Ymi(new Ib(c,void 0,e),e,void 0,void 0,void 0,PE,i)}function g4(c,e){var i;return new D9(new Ib(c.owner,c.debugName,c.debugReferenceFn),e,void 0,void 0,c.onLastObserverRemoved,(i=c.equalsFn)!==null&&i!==void 0?i:PE)}Gmi(g4);function Zmi(c,e){var i;return new D9(new Ib(c.owner,c.debugName,void 0),e,c.createEmptyChangeSummary,c.handleChange,void 0,(i=c.equalityComparer)!==null&&i!==void 0?i:PE)}function tB(c,e){let i,n;e===void 0?(i=c,n=void 0):(n=c,i=e);const s=new On;return new D9(new Ib(n,void 0,i),l=>(s.clear(),i(l,s)),void 0,void 0,()=>s.dispose(),PE)}function MN(c,e){let i,n;e===void 0?(i=c,n=void 0):(n=c,i=e);const s=new On;return new D9(new Ib(n,void 0,i),l=>{s.clear();const d=i(l);return d&&s.add(d),d},void 0,void 0,()=>s.dispose(),PE)}class D9 extends Wne{get debugName(){var e;return(e=this._debugNameData.getDebugName(this))!==null&&e!==void 0?e:"(anonymous)"}constructor(e,i,n,s,l=void 0,d){var f,g;super(),this._debugNameData=e,this._computeFn=i,this.createChangeSummary=n,this._handleChange=s,this._handleLastObserverRemoved=l,this._equalityComparator=d,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=(f=this.createChangeSummary)===null||f===void 0?void 0:f.call(this),(g=lL())===null||g===void 0||g.handleDerivedCreated(this)}onLastObserverRemoved(){var e;this.state=0,this.value=void 0;for(const i of this.dependencies)i.removeObserver(this);this.dependencies.clear(),(e=this._handleLastObserverRemoved)===null||e===void 0||e.call(this)}get(){var e;if(this.observers.size===0){const i=this._computeFn(this,(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this));return this.onLastObserverRemoved(),i}else{do{if(this.state===1){for(const i of this.dependencies)if(i.reportChanges(),this.state===2)break}this.state===1&&(this.state=3),this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){var e,i;if(this.state===3)return;const n=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=n;const s=this.state!==0,l=this.value;this.state=3;const d=this.changeSummary;this.changeSummary=(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this);try{this.value=this._computeFn(this,d)}finally{for(const g of this.dependenciesToBeRemoved)g.removeObserver(this);this.dependenciesToBeRemoved.clear()}const f=s&&!this._equalityComparator(l,this.value);if((i=lL())===null||i===void 0||i.handleDerivedRecomputed(this,{oldValue:l,newValue:this.value,change:void 0,didChange:f,hadValue:s}),f)for(const g of this.observers)g.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;const i=this.updateCount===1;if(this.state===3&&(this.state=1,!i))for(const n of this.observers)n.handlePossibleChange(this);if(i)for(const n of this.observers)n.beginUpdate(this)}endUpdate(e){if(this.updateCount--,this.updateCount===0){const i=[...this.observers];for(const n of i)n.endUpdate(this)}C9(()=>this.updateCount>=0)}handlePossibleChange(e){if(this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const i of this.observers)i.handlePossibleChange(this)}}handleChange(e,i){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const n=this._handleChange?this._handleChange({changedObservable:e,change:i,didChange:l=>l===e},this.changeSummary):!0,s=this.state===3;if(n&&(this.state===1||s)&&(this.state=2,s))for(const l of this.observers)l.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const i=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),i}addObserver(e){const i=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),i&&e.beginUpdate(this)}removeObserver(e){const i=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),i&&e.endUpdate(this)}}class Ymi extends D9{constructor(e,i,n,s,l=void 0,d,f){super(e,i,n,s,l,d),this.set=f}}function Cl(c){return new Lye(new Ib(void 0,void 0,c),c,void 0,void 0)}function Nye(c,e){var i;return new Lye(new Ib(c.owner,c.debugName,(i=c.debugReferenceFn)!==null&&i!==void 0?i:e),e,void 0,void 0)}function Vne(c,e){var i;return new Lye(new Ib(c.owner,c.debugName,(i=c.debugReferenceFn)!==null&&i!==void 0?i:e),e,c.createEmptyChangeSummary,c.handleChange)}function ck(c){const e=new On,i=Nye({owner:void 0,debugName:void 0,debugReferenceFn:c},n=>{e.clear(),c(n,e)});return go(()=>{i.dispose(),e.dispose()})}class Lye{get debugName(){var e;return(e=this._debugNameData.getDebugName(this))!==null&&e!==void 0?e:"(anonymous)"}constructor(e,i,n,s){var l,d;this._debugNameData=e,this._runFn=i,this.createChangeSummary=n,this._handleChange=s,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=(l=this.createChangeSummary)===null||l===void 0?void 0:l.call(this),(d=lL())===null||d===void 0||d.handleAutorunCreated(this),this._runIfNeeded()}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear()}_runIfNeeded(){var e,i,n;if(this.state===3)return;const s=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=s,this.state=3;const l=this.disposed;try{if(!l){(e=lL())===null||e===void 0||e.handleAutorunTriggered(this);const d=this.changeSummary;this.changeSummary=(i=this.createChangeSummary)===null||i===void 0?void 0:i.call(this),this._runFn(this,d)}}finally{l||(n=lL())===null||n===void 0||n.handleAutorunFinished(this);for(const d of this.dependenciesToBeRemoved)d.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){this.state===3&&(this.state=1),this.updateCount++}endUpdate(){if(this.updateCount===1)do{if(this.state===1){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--,C9(()=>this.updateCount>=0)}handlePossibleChange(e){this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,i){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(!this._handleChange||this._handleChange({changedObservable:e,change:i,didChange:s=>s===e},this.changeSummary))&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const i=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),i}}(function(c){c.Observer=Lye})(Cl||(Cl={}));function pE(c){return new e0i(c)}class e0i extends dxt{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function Zu(c,e){return new G5(c,e)}class G5 extends Wne{constructor(e,i){super(),this.event=e,this._getValue=i,this.hasValue=!1,this.handleEvent=n=>{var s;const l=this._getValue(n),d=this.value,f=!this.hasValue||d!==l;let g=!1;f&&(this.value=l,this.hasValue&&(g=!0,vie(G5.globalTransaction,y=>{var w;(w=lL())===null||w===void 0||w.handleFromEventObservableTriggered(this,{oldValue:d,newValue:l,change:void 0,didChange:f,hadValue:this.hasValue});for(const x of this.observers)y.updateObserver(x,this),x.handleChange(this,void 0)},()=>{const y=this.getDebugName();return"Event fired"+(y?`: ${y}`:"")})),this.hasValue=!0),g||(s=lL())===null||s===void 0||s.handleFromEventObservableTriggered(this,{oldValue:d,newValue:l,change:void 0,didChange:f,hadValue:this.hasValue})}}getDebugName(){return Eye(this._getValue)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}}(function(c){c.Observer=G5;function e(i,n){let s=!1;G5.globalTransaction===void 0&&(G5.globalTransaction=i,s=!0);try{n()}finally{s&&(G5.globalTransaction=void 0)}}c.batchEventsGlobally=e})(Zu||(Zu={}));function yv(c,e){return new t0i(c,e)}class t0i extends Wne{constructor(e,i){super(),this.debugName=e,this.event=i,this.handleEvent=()=>{Rd(n=>{for(const s of this.observers)n.updateObserver(s,this),s.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function Pye(c){return typeof c=="string"?new yvt(c):new yvt(void 0,c)}class yvt extends Wne{get debugName(){var e;return(e=new Ib(this._owner,this._debugName,void 0).getDebugName(this))!==null&&e!==void 0?e:"Observable Signal"}constructor(e,i){super(),this._debugName=e,this._owner=i}trigger(e,i){if(!e){Rd(n=>{this.trigger(n,i)},()=>`Trigger signal ${this.debugName}`);return}for(const n of this.observers)e.updateObserver(n,this),n.handleChange(this,i)}get(){}}function Hne(c,e){const i=new i0i(!0,e);return c.addObserver(i),e?e(c.get()):c.reportChanges(),go(()=>{c.removeObserver(i)})}Jmi(Hne);class i0i{constructor(e,i){this._forceRecompute=e,this._handleValue=i,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,this._counter===0&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,i){}}function n0i(c,e){let i;return Ma(c,s=>(i=e(s,i),i))}function r0i(c,e,i,n){let s=new bvt(i,n);return g4({debugReferenceFn:i,owner:c,onLastObserverRemoved:()=>{s.dispose(),s=new bvt(i)}},d=>(s.setItems(e.read(d)),s.getItems()))}class bvt{constructor(e,i){this._map=e,this._keySelector=i,this._cache=new Map,this._items=[]}dispose(){this._cache.forEach(e=>e.store.dispose()),this._cache.clear()}setItems(e){const i=[],n=new Set(this._cache.keys());for(const s of e){const l=this._keySelector?this._keySelector(s):s;let d=this._cache.get(l);if(d)n.delete(l);else{const f=new On;d={out:this._map(s,f),store:f},this._cache.set(l,d)}i.push(d.out)}for(const s of n)this._cache.get(s).store.dispose(),this._cache.delete(s);this._items=i}getItems(){return this._items}}function hxt(c,e,i,n){return e||(e=s=>s!=null),new Promise((s,l)=>{let d=!0,f=!1;const g=c.map(w=>({isFinished:e(w),error:i?i(w):!1,state:w})),y=Cl(w=>{const{isFinished:x,error:I,state:P}=g.read(w);(x||I)&&(d?f=!0:y.dispose(),I?l(I===!0?P:I):s(P))});if(n){const w=n.onCancellationRequested(()=>{y.dispose(),w.dispose(),l(new DE)});if(n.isCancellationRequested){y.dispose(),w.dispose(),l(new DE);return}}d=!1,f&&y.dispose()})}var NR=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};class s0i{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,i,n){const s=this.renderedElements.findIndex(l=>l.templateData===n);if(s>=0){const l=this.renderedElements[s];this.trait.unrender(n),l.index=i}else{const l={index:i,templateData:n};this.renderedElements.push(l)}this.trait.renderIndex(i,n)}splice(e,i,n){const s=[];for(const l of this.renderedElements)l.index=e+i&&s.push({index:l.index+n-i,templateData:l.templateData});this.renderedElements=s}renderIndexes(e){for(const{index:i,templateData:n}of this.renderedElements)e.indexOf(i)>-1&&this.trait.renderIndex(i,n)}disposeTemplate(e){const i=this.renderedElements.findIndex(n=>n.templateData===e);i<0||this.renderedElements.splice(i,1)}}let xve=class{get name(){return this._trait}get renderer(){return new s0i(this)}constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new ui,this.onChange=this._onChange.event}splice(e,i,n){const s=n.length-i,l=e+i,d=[];let f=0;for(;f=l;)d.push(this.sortedIndexes[f++]+s);this.renderer.splice(e,i,n.length),this._set(d,d)}renderIndex(e,i){i.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,i){return this._set(e,[...e].sort(Svt),i)}_set(e,i,n){const s=this.indexes,l=this.sortedIndexes;this.indexes=e,this.sortedIndexes=i;const d=fBe(l,e);return this.renderer.renderIndexes(d),this._onChange.fire({indexes:e,browserEvent:n}),s}get(){return this.indexes}contains(e){return Ete(this.sortedIndexes,e,Svt)>=0}dispose(){yd(this._onChange)}};NR([N_],xve.prototype,"renderer",null);class o0i extends xve{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,i){super.renderIndex(e,i),this.setAriaSelected&&(this.contains(e)?i.setAttribute("aria-selected","true"):i.setAttribute("aria-selected","false"))}}class M7e{constructor(e,i,n){this.trait=e,this.view=i,this.identityProvider=n}splice(e,i,n){if(!this.identityProvider)return this.trait.splice(e,i,new Array(n.length).fill(!1));const s=this.trait.get().map(f=>this.identityProvider.getId(this.view.element(f)).toString());if(s.length===0)return this.trait.splice(e,i,new Array(n.length).fill(!1));const l=new Set(s),d=n.map(f=>l.has(this.identityProvider.getId(f).toString()));this.trait.splice(e,i,d)}}function UM(c){return c.tagName==="INPUT"||c.tagName==="TEXTAREA"}function jne(c,e){return c.classList.contains(e)?!0:c.classList.contains("monaco-list")||!c.parentElement?!1:jne(c.parentElement,e)}function Fee(c){return jne(c,"monaco-editor")}function a0i(c){return jne(c,"monaco-custom-toggle")}function l0i(c){return jne(c,"action-item")}function gte(c){return jne(c,"monaco-tree-sticky-row")}function bie(c){return c.classList.contains("monaco-tree-sticky-container")}function _xt(c){return c.tagName==="A"&&c.classList.contains("monaco-button")||c.tagName==="DIV"&&c.classList.contains("monaco-button-dropdown")?!0:c.classList.contains("monaco-list")||!c.parentElement?!1:_xt(c.parentElement)}class pxt{get onKeyDown(){return Mr.chain(this.disposables.add(new Yl(this.view.domNode,"keydown")).event,e=>e.filter(i=>!UM(i.target)).map(i=>new Fd(i)))}constructor(e,i,n){this.list=e,this.view=i,this.disposables=new On,this.multipleSelectionDisposables=new On,this.multipleSelectionSupport=n.multipleSelectionSupport,this.disposables.add(this.onKeyDown(s=>{switch(s.keyCode){case 3:return this.onEnter(s);case 16:return this.onUpArrow(s);case 18:return this.onDownArrow(s);case 11:return this.onPageUpArrow(s);case 12:return this.onPageDownArrow(s);case 9:return this.onEscape(s);case 31:this.multipleSelectionSupport&&(Wl?s.metaKey:s.ctrlKey)&&this.onCtrlA(s)}}))}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const i=this.list.getFocus()[0];this.list.setAnchor(i),this.list.reveal(i),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const i=this.list.getFocus()[0];this.list.setAnchor(i),this.list.reveal(i),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const i=this.list.getFocus()[0];this.list.setAnchor(i),this.list.reveal(i),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const i=this.list.getFocus()[0];this.list.setAnchor(i),this.list.reveal(i),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(yb(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}NR([N_],pxt.prototype,"onKeyDown",null);var JN;(function(c){c[c.Automatic=0]="Automatic",c[c.Trigger=1]="Trigger"})(JN||(JN={}));var uU;(function(c){c[c.Idle=0]="Idle",c[c.Typing=1]="Typing"})(uU||(uU={}));const c0i=new class{mightProducePrintableCharacter(c){return c.ctrlKey||c.metaKey||c.altKey?!1:c.keyCode>=31&&c.keyCode<=56||c.keyCode>=21&&c.keyCode<=30||c.keyCode>=98&&c.keyCode<=107||c.keyCode>=85&&c.keyCode<=95}};class u0i{constructor(e,i,n,s,l){this.list=e,this.view=i,this.keyboardNavigationLabelProvider=n,this.keyboardNavigationEventFilter=s,this.delegate=l,this.enabled=!1,this.state=uU.Idle,this.mode=JN.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new On,this.disposables=new On,this.updateOptions(e.options)}updateOptions(e){var i,n;!((i=e.typeNavigationEnabled)!==null&&i!==void 0)||i?this.enable():this.disable(),this.mode=(n=e.typeNavigationMode)!==null&&n!==void 0?n:JN.Automatic}enable(){if(this.enabled)return;let e=!1;const i=Mr.chain(this.enabledDisposables.add(new Yl(this.view.domNode,"keydown")).event,l=>l.filter(d=>!UM(d.target)).filter(()=>this.mode===JN.Automatic||this.triggered).map(d=>new Fd(d)).filter(d=>e||this.keyboardNavigationEventFilter(d)).filter(d=>this.delegate.mightProducePrintableCharacter(d)).forEach(d=>nc.stop(d,!0)).map(d=>d.browserEvent.key)),n=Mr.debounce(i,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);Mr.reduce(Mr.any(i,n),(l,d)=>d===null?null:(l||"")+d,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),n(this.onClear,this,this.enabledDisposables),i(()=>e=!0,void 0,this.enabledDisposables),n(()=>e=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const i=this.list.getFocus();if(i.length>0&&i[0]===this.previouslyFocused){const n=(e=this.list.options.accessibilityProvider)===null||e===void 0?void 0:e.getAriaLabel(this.list.element(i[0]));typeof n=="string"?Eb(n):n&&Eb(n.get())}this.previouslyFocused=-1}onInput(e){if(!e){this.state=uU.Idle,this.triggered=!1;return}const i=this.list.getFocus(),n=i.length>0?i[0]:0,s=this.state===uU.Idle?1:0;this.state=uU.Typing;for(let l=0;l1&&y.length===1){this.previouslyFocused=n,this.list.setFocus([d]),this.list.reveal(d);return}}}else if(typeof g>"u"||die(e,g)){this.previouslyFocused=n,this.list.setFocus([d]),this.list.reveal(d);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class d0i{constructor(e,i){this.list=e,this.view=i,this.disposables=new On;const n=Mr.chain(this.disposables.add(new Yl(i.domNode,"keydown")).event,l=>l.filter(d=>!UM(d.target)).map(d=>new Fd(d)));Mr.chain(n,l=>l.filter(d=>d.keyCode===2&&!d.ctrlKey&&!d.metaKey&&!d.shiftKey&&!d.altKey))(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const i=this.list.getFocus();if(i.length===0)return;const n=this.view.domElement(i[0]);if(!n)return;const s=n.querySelector("[tabIndex]");if(!s||!Sm(s)||s.tabIndex===-1)return;const l=Io(s).getComputedStyle(s);l.visibility==="hidden"||l.display==="none"||(e.preventDefault(),e.stopPropagation(),s.focus())}dispose(){this.disposables.dispose()}}function gxt(c){return Wl?c.browserEvent.metaKey:c.browserEvent.ctrlKey}function mxt(c){return c.browserEvent.shiftKey}function f0i(c){return WHe(c)&&c.button===2}const Cvt={isSelectionSingleChangeEvent:gxt,isSelectionRangeChangeEvent:mxt};class vxt{constructor(e){this.list=e,this.disposables=new On,this._onPointer=new ui,this.onPointer=this._onPointer.event,e.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||Cvt),this.mouseSupport=typeof e.options.mouseSupport>"u"||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(Jd.addTarget(e.getHTMLElement()))),Mr.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||Cvt))}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):!1}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):!1}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){Fee(e.browserEvent.target)||A0()!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(UM(e.browserEvent.target)||Fee(e.browserEvent.target))return;const i=typeof e.index>"u"?[]:[e.index];this.list.setFocus(i,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport||UM(e.browserEvent.target)||Fee(e.browserEvent.target)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const i=e.index;if(typeof i>"u"){this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionChangeEvent(e))return this.changeSelection(e);this.list.setFocus([i],e.browserEvent),this.list.setAnchor(i),f0i(e.browserEvent)||this.list.setSelection([i],e.browserEvent),this._onPointer.fire(e)}onDoubleClick(e){if(UM(e.browserEvent.target)||Fee(e.browserEvent.target)||this.isSelectionChangeEvent(e)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const i=this.list.getFocus();this.list.setSelection(i,e.browserEvent)}changeSelection(e){const i=e.index;let n=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(typeof n>"u"){const w=this.list.getFocus()[0];n=w??i,this.list.setAnchor(n)}const s=Math.min(n,i),l=Math.max(n,i),d=yb(s,l+1),f=this.list.getSelection(),g=p0i(fBe(f,[n]),n);if(g.length===0)return;const y=fBe(d,g0i(f,g));this.list.setSelection(y,e.browserEvent),this.list.setFocus([i],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const s=this.list.getSelection(),l=s.filter(d=>d!==i);this.list.setFocus([i]),this.list.setAnchor(i),s.length===l.length?this.list.setSelection([...l,i],e.browserEvent):this.list.setSelection(l,e.browserEvent)}}dispose(){this.disposables.dispose()}}class yxt{constructor(e,i){this.styleElement=e,this.selectorSuffix=i}style(e){var i,n;const s=this.selectorSuffix&&`.${this.selectorSuffix}`,l=[];e.listBackground&&l.push(`.monaco-list${s} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(l.push(`.monaco-list${s}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),l.push(`.monaco-list${s}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&l.push(`.monaco-list${s}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(l.push(`.monaco-list${s}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),l.push(`.monaco-list${s}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&l.push(`.monaco-list${s}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&l.push(`.monaco-list${s}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&l.push(` + .monaco-drag-image, + .monaco-list${s}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; } + `),e.listFocusAndSelectionForeground&&l.push(` + .monaco-drag-image, + .monaco-list${s}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; } + `),e.listInactiveFocusForeground&&(l.push(`.monaco-list${s} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),l.push(`.monaco-list${s} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&l.push(`.monaco-list${s} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(l.push(`.monaco-list${s} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),l.push(`.monaco-list${s} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(l.push(`.monaco-list${s} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),l.push(`.monaco-list${s} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&l.push(`.monaco-list${s} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&l.push(`.monaco-list${s}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&l.push(`.monaco-list${s}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`);const d=R4(e.listFocusAndSelectionOutline,R4(e.listSelectionOutline,(i=e.listFocusOutline)!==null&&i!==void 0?i:""));d&&l.push(`.monaco-list${s}:focus .monaco-list-row.focused.selected { outline: 1px solid ${d}; outline-offset: -1px;}`),e.listFocusOutline&&l.push(` + .monaco-drag-image, + .monaco-list${s}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; } + .monaco-workbench.context-menu-visible .monaco-list${s}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; } + `);const f=R4(e.listSelectionOutline,(n=e.listInactiveFocusOutline)!==null&&n!==void 0?n:"");f&&l.push(`.monaco-list${s} .monaco-list-row.focused.selected { outline: 1px dotted ${f}; outline-offset: -1px; }`),e.listSelectionOutline&&l.push(`.monaco-list${s} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&l.push(`.monaco-list${s} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&l.push(`.monaco-list${s} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropOverBackground&&l.push(` + .monaco-list${s}.drop-target, + .monaco-list${s} .monaco-list-rows.drop-target, + .monaco-list${s} .monaco-list-row.drop-target { background-color: ${e.listDropOverBackground} !important; color: inherit !important; } + `),e.listDropBetweenBackground&&(l.push(` + .monaco-list${s} .monaco-list-rows.drop-target-before .monaco-list-row:first-child::before, + .monaco-list${s} .monaco-list-row.drop-target-before::before { + content: ""; position: absolute; top: 0px; left: 0px; width: 100%; height: 1px; + background-color: ${e.listDropBetweenBackground}; + }`),l.push(` + .monaco-list${s} .monaco-list-rows.drop-target-after .monaco-list-row:last-child::after, + .monaco-list${s} .monaco-list-row.drop-target-after::after { + content: ""; position: absolute; bottom: 0px; left: 0px; width: 100%; height: 1px; + background-color: ${e.listDropBetweenBackground}; + }`)),e.tableColumnsBorder&&l.push(` + .monaco-table > .monaco-split-view2, + .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before, + .monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2, + .monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before { + border-color: ${e.tableColumnsBorder}; + } + + .monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2, + .monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before { + border-color: transparent; + } + `),e.tableOddRowsBackgroundColor&&l.push(` + .monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr, + .monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr, + .monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr { + background-color: ${e.tableOddRowsBackgroundColor}; + } + `),this.styleElement.textContent=l.join(` +`)}}const h0i={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:Qi.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:Qi.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:Qi.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},_0i={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};function p0i(c,e){const i=c.indexOf(e);if(i===-1)return[];const n=[];let s=i-1;for(;s>=0&&c[s]===e-(i-s);)n.push(c[s--]);for(n.reverse(),s=i;s=c.length)i.push(e[s++]);else if(s>=e.length)i.push(c[n++]);else if(c[n]===e[s]){i.push(c[n]),n++,s++;continue}else c[n]=c.length)i.push(e[s++]);else if(s>=e.length)i.push(c[n++]);else if(c[n]===e[s]){n++,s++;continue}else c[n]c-e;class m0i{constructor(e,i){this._templateId=e,this.renderers=i}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(i=>i.renderTemplate(e))}renderElement(e,i,n,s){let l=0;for(const d of this.renderers)d.renderElement(e,i,n[l++],s)}disposeElement(e,i,n,s){var l;let d=0;for(const f of this.renderers)(l=f.disposeElement)===null||l===void 0||l.call(f,e,i,n[d],s),d+=1}disposeTemplate(e){let i=0;for(const n of this.renderers)n.disposeTemplate(e[i++])}}class v0i{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return{container:e,disposables:new On}}renderElement(e,i,n){const s=this.accessibilityProvider.getAriaLabel(e),l=s&&typeof s!="string"?s:pE(s);n.disposables.add(Cl(f=>{this.setAriaLabel(f.readObservable(l),n.container)}));const d=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof d=="number"?n.container.setAttribute("aria-level",`${d}`):n.container.removeAttribute("aria-level")}setAriaLabel(e,i){e?i.setAttribute("aria-label",e):i.removeAttribute("aria-label")}disposeElement(e,i,n,s){n.disposables.clear()}disposeTemplate(e){e.disposables.dispose()}}class y0i{constructor(e,i){this.list=e,this.dnd=i}getDragElements(e){const i=this.list.getSelectedElements();return i.indexOf(e)>-1?i:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,i){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,i)}onDragStart(e,i){var n,s;(s=(n=this.dnd).onDragStart)===null||s===void 0||s.call(n,e,i)}onDragOver(e,i,n,s,l){return this.dnd.onDragOver(e,i,n,s,l)}onDragLeave(e,i,n,s){var l,d;(d=(l=this.dnd).onDragLeave)===null||d===void 0||d.call(l,e,i,n,s)}onDragEnd(e){var i,n;(n=(i=this.dnd).onDragEnd)===null||n===void 0||n.call(i,e)}drop(e,i,n,s,l){this.dnd.drop(e,i,n,s,l)}dispose(){this.dnd.dispose()}}class Iw{get onDidChangeFocus(){return Mr.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return Mr.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const i=Mr.chain(this.disposables.add(new Yl(this.view.domNode,"keydown")).event,l=>l.map(d=>new Fd(d)).filter(d=>e=d.keyCode===58||d.shiftKey&&d.keyCode===68).map(d=>nc.stop(d,!0)).filter(()=>!1)),n=Mr.chain(this.disposables.add(new Yl(this.view.domNode,"keyup")).event,l=>l.forEach(()=>e=!1).map(d=>new Fd(d)).filter(d=>d.keyCode===58||d.shiftKey&&d.keyCode===68).map(d=>nc.stop(d,!0)).map(({browserEvent:d})=>{const f=this.getFocus(),g=f.length?f[0]:void 0,y=typeof g<"u"?this.view.element(g):void 0,w=typeof g<"u"?this.view.domElement(g):this.view.domNode;return{index:g,element:y,anchor:w,browserEvent:d}})),s=Mr.chain(this.view.onContextMenu,l=>l.filter(d=>!e).map(({element:d,index:f,browserEvent:g})=>({element:d,index:f,anchor:new sT(Io(this.view.domNode),g),browserEvent:g})));return Mr.any(i,n,s)}get onKeyDown(){return this.disposables.add(new Yl(this.view.domNode,"keydown")).event}get onDidFocus(){return Mr.signal(this.disposables.add(new Yl(this.view.domNode,"focus",!0)).event)}get onDidBlur(){return Mr.signal(this.disposables.add(new Yl(this.view.domNode,"blur",!0)).event)}constructor(e,i,n,s,l=_0i){var d,f,g,y;this.user=e,this._options=l,this.focus=new xve("focused"),this.anchor=new xve("anchor"),this.eventBufferer=new O1e,this._ariaLabel="",this.disposables=new On,this._onDidDispose=new ui,this.onDidDispose=this._onDidDispose.event;const w=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(d=this._options.accessibilityProvider)===null||d===void 0?void 0:d.getWidgetRole():"list";this.selection=new o0i(w!=="listbox");const x=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=l.accessibilityProvider,this.accessibilityProvider&&(x.push(new v0i(this.accessibilityProvider)),(g=(f=this.accessibilityProvider).onDidChangeActiveDescendant)===null||g===void 0||g.call(f,this.onDidChangeActiveDescendant,this,this.disposables)),s=s.map(P=>new m0i(P.templateId,[...x,P]));const I={...l,dnd:l.dnd&&new y0i(this,l.dnd)};if(this.view=this.createListView(i,n,s,I),this.view.domNode.setAttribute("role",w),l.styleController)this.styleController=l.styleController(this.view.domId);else{const P=Sw(this.view.domNode);this.styleController=new yxt(P,this.view.domId)}if(this.spliceable=new Nmi([new M7e(this.focus,this.view,l.identityProvider),new M7e(this.selection,this.view,l.identityProvider),new M7e(this.anchor,this.view,l.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new d0i(this,this.view)),(typeof l.keyboardSupport!="boolean"||l.keyboardSupport)&&(this.keyboardController=new pxt(this,this.view,l),this.disposables.add(this.keyboardController)),l.keyboardNavigationLabelProvider){const P=l.keyboardNavigationDelegate||c0i;this.typeNavigationController=new u0i(this,this.view,l.keyboardNavigationLabelProvider,(y=l.keyboardNavigationEventFilter)!==null&&y!==void 0?y:()=>!0,P),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(l),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,i,n,s){return new hk(e,i,n,s)}createMouseController(e){return new vxt(this)}updateOptions(e={}){var i,n;this._options={...this._options,...e},(i=this.typeNavigationController)===null||i===void 0||i.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),(n=this.keyboardController)===null||n===void 0||n.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,i,n=[]){if(e<0||e>this.view.length)throw new v5(this.user,`Invalid start index: ${e}`);if(i<0)throw new v5(this.user,`Invalid delete count: ${i}`);i===0&&n.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,i,n))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}indexOf(e){return this.view.indexOf(e)}indexAt(e){return this.view.indexAt(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,i){this.view.layout(e,i)}setSelection(e,i){for(const n of e)if(n<0||n>=this.length)throw new v5(this.user,`Invalid index ${n}`);this.selection.set(e,i)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setAnchor(e){if(typeof e>"u"){this.anchor.set([]);return}if(e<0||e>=this.length)throw new v5(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return fHe(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return typeof e>"u"?void 0:this.element(e)}setFocus(e,i){for(const n of e)if(n<0||n>=this.length)throw new v5(this.user,`Invalid index ${n}`);this.focus.set(e,i)}focusNext(e=1,i=!1,n,s){if(this.length===0)return;const l=this.focus.get(),d=this.findNextIndex(l.length>0?l[0]+e:0,i,s);d>-1&&this.setFocus([d],n)}focusPrevious(e=1,i=!1,n,s){if(this.length===0)return;const l=this.focus.get(),d=this.findPreviousIndex(l.length>0?l[0]-e:0,i,s);d>-1&&this.setFocus([d],n)}async focusNextPage(e,i){let n=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);n=n===0?0:n-1;const s=this.getFocus()[0];if(s!==n&&(s===void 0||n>s)){const l=this.findPreviousIndex(n,!1,i);l>-1&&s!==l?this.setFocus([l],e):this.setFocus([n],e)}else{const l=this.view.getScrollTop();let d=l+this.view.renderHeight;n>s&&(d-=this.view.elementHeight(n)),this.view.setScrollTop(d),this.view.getScrollTop()!==l&&(this.setFocus([]),await J4(0),await this.focusNextPage(e,i))}}async focusPreviousPage(e,i,n=()=>0){let s;const l=n(),d=this.view.getScrollTop()+l;d===0?s=this.view.indexAt(d):s=this.view.indexAfter(d-1);const f=this.getFocus()[0];if(f!==s&&(f===void 0||f>=s)){const g=this.findNextIndex(s,!1,i);g>-1&&f!==g?this.setFocus([g],e):this.setFocus([s],e)}else{const g=d;this.view.setScrollTop(d-this.view.renderHeight-l),this.view.getScrollTop()+n()!==g&&(this.setFocus([]),await J4(0),await this.focusPreviousPage(e,i,n))}}focusLast(e,i){if(this.length===0)return;const n=this.findPreviousIndex(this.length-1,!1,i);n>-1&&this.setFocus([n],e)}focusFirst(e,i){this.focusNth(0,e,i)}focusNth(e,i,n){if(this.length===0)return;const s=this.findNextIndex(e,!1,n);s>-1&&this.setFocus([s],i)}findNextIndex(e,i=!1,n){for(let s=0;s=this.length&&!i)return-1;if(e=e%this.length,!n||n(this.element(e)))return e;e++}return-1}findPreviousIndex(e,i=!1,n){for(let s=0;sthis.view.element(e))}reveal(e,i,n=0){if(e<0||e>=this.length)throw new v5(this.user,`Invalid index ${e}`);const s=this.view.getScrollTop(),l=this.view.elementTop(e),d=this.view.elementHeight(e);if(XM(i)){const f=d-this.view.renderHeight+n;this.view.setScrollTop(f*fy(i,0,1)+l-n)}else{const f=l+d,g=s+this.view.renderHeight;l=g||(l=g&&d>=this.view.renderHeight?this.view.setScrollTop(l-n):f>=g&&this.view.setScrollTop(f-this.view.renderHeight))}}getRelativeTop(e,i=0){if(e<0||e>=this.length)throw new v5(this.user,`Invalid index ${e}`);const n=this.view.getScrollTop(),s=this.view.elementTop(e),l=this.view.elementHeight(e);if(sn+this.view.renderHeight)return null;const d=l-this.view.renderHeight+i;return Math.abs((n+i-s)/d)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(e){return this.view.getElementDomId(e)}getElementTop(e){return this.view.elementTop(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:i}){return{indexes:e,elements:e.map(n=>this.view.element(n)),browserEvent:i}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const i=this.focus.get();if(i.length>0){let n;!((e=this.accessibilityProvider)===null||e===void 0)&&e.getActiveDescendantId&&(n=this.accessibilityProvider.getActiveDescendantId(this.view.element(i[0]))),this.view.domNode.setAttribute("aria-activedescendant",n||this.view.getElementDomId(i[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",e.length===0),this.view.domNode.classList.toggle("selection-single",e.length===1),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}NR([N_],Iw.prototype,"onDidChangeFocus",null);NR([N_],Iw.prototype,"onDidChangeSelection",null);NR([N_],Iw.prototype,"onContextMenu",null);NR([N_],Iw.prototype,"onKeyDown",null);NR([N_],Iw.prototype,"onDidFocus",null);NR([N_],Iw.prototype,"onDidBlur",null);const K5=Sr,bxt="selectOption.entry.template";class b0i{get templateId(){return bxt}renderTemplate(e){const i=Object.create(null);return i.root=e,i.text=zn(e,K5(".option-text")),i.detail=zn(e,K5(".option-detail")),i.decoratorRight=zn(e,K5(".option-decorator-right")),i}renderElement(e,i,n){const s=n,l=e.text,d=e.detail,f=e.decoratorRight,g=e.isDisabled;s.text.textContent=l,s.detail.textContent=d||"",s.decoratorRight.innerText=f||"",g?s.root.classList.add("option-disabled"):s.root.classList.remove("option-disabled")}disposeTemplate(e){}}class GN extends Ii{constructor(e,i,n,s,l){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=s,this.selectBoxOptions=l||Object.create(null),typeof this.selectBoxOptions.minBottomMargin!="number"?this.selectBoxOptions.minBottomMargin=GN.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new ui,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(n),this.selected=i||0,e&&this.setOptions(e,i),this.initStyleSheet()}setTitle(e){!this._hover&&e?this._hover=this._register(HE().setupUpdatableHover(Py("mouse"),this.selectElement,e)):this._hover&&this._hover.update(e)}getHeight(){return 22}getTemplateId(){return bxt}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=Sr(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=zn(this.selectDropDownContainer,K5(".select-box-details-pane"));const i=zn(this.selectDropDownContainer,K5(".select-box-dropdown-container-width-control")),n=zn(i,K5(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",zn(n,this.widthControlElement),this._dropDownPosition=0,this.styleElement=Sw(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(tn(this.selectDropDownContainer,yr.DRAG_START,s=>{nc.stop(s,!0)}))}registerListeners(){this._register(n_(this.selectElement,"change",i=>{this.selected=i.target.selectedIndex,this._onDidSelect.fire({index:i.target.selectedIndex,selected:i.target.value}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)})),this._register(tn(this.selectElement,yr.CLICK,i=>{nc.stop(i),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(tn(this.selectElement,yr.MOUSE_DOWN,i=>{nc.stop(i)}));let e;this._register(tn(this.selectElement,"touchstart",i=>{e=this._isVisible})),this._register(tn(this.selectElement,"touchend",i=>{nc.stop(i),e?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(tn(this.selectElement,yr.KEY_DOWN,i=>{const n=new Fd(i);let s=!1;Wl?(n.keyCode===18||n.keyCode===16||n.keyCode===10||n.keyCode===3)&&(s=!0):(n.keyCode===18&&n.altKey||n.keyCode===16&&n.altKey||n.keyCode===10||n.keyCode===3)&&(s=!0),s&&(this.showSelectDropDown(),nc.stop(i,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,i){ch(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((n,s)=>{this.selectElement.add(this.createOption(n.text,s,n.isDisabled)),typeof n.description=="string"&&(this._hasDetails=!0)})),i!==void 0&&(this.select(i),this._currentSelection=this.selected)}setOptionsList(){var e;(e=this.selectList)===null||e===void 0||e.splice(0,this.selectList.length,this.options)}select(e){e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join(` +`)}styleSelectElement(){var e,i,n;const s=(e=this.styles.selectBackground)!==null&&e!==void 0?e:"",l=(i=this.styles.selectForeground)!==null&&i!==void 0?i:"",d=(n=this.styles.selectBorder)!==null&&n!==void 0?n:"";this.selectElement.style.backgroundColor=s,this.selectElement.style.color=l,this.selectElement.style.borderColor=d}styleList(){var e,i;const n=(e=this.styles.selectBackground)!==null&&e!==void 0?e:"",s=R4(this.styles.selectListBackground,n);this.selectDropDownListContainer.style.backgroundColor=s,this.selectionDetailsPane.style.backgroundColor=s;const l=(i=this.styles.focusBorder)!==null&&i!==void 0?i:"";this.selectDropDownContainer.style.outlineColor=l,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,i,n){const s=document.createElement("option");return s.value=e,s.text=e,s.disabled=!!n,s}showSelectDropDown(){this.selectionDetailsPane.innerText="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,i){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(i),{dispose:()=>{try{e.removeChild(this.selectDropDownContainer)}catch{}}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach((i,n)=>{this.updateDetail(n),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)}),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const i=Io(this.selectElement),n=Y_(this.selectElement),s=Io(this.selectElement).getComputedStyle(this.selectElement),l=parseFloat(s.getPropertyValue("--dropdown-padding-top"))+parseFloat(s.getPropertyValue("--dropdown-padding-bottom")),d=i.innerHeight-n.top-n.height-(this.selectBoxOptions.minBottomMargin||0),f=n.top-GN.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,g=this.selectElement.offsetWidth,y=this.setWidthControlElement(this.widthControlElement),w=Math.max(y,Math.round(g)).toString()+"px";this.selectDropDownContainer.style.width=w,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let x=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const I=this._hasDetails?this._cachedMaxDetailsHeight:0,P=x+l+I,O=Math.floor((d-l-I)/this.getHeight()),W=Math.floor((f-l-I)/this.getHeight());if(e)return n.top+n.height>i.innerHeight-22||n.topO&&this.options.length>O?(this._dropDownPosition=1,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(n.top+n.height>i.innerHeight-22||n.topd&&(x=O*this.getHeight())}else P>f&&(x=W*this.getHeight());return this.selectList.layout(x),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=x+l+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=x+l+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=w,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}else return!1}setWidthControlElement(e){let i=0;if(e){let n=0,s=0;this.options.forEach((l,d)=>{const f=l.detail?l.detail.length:0,g=l.decoratorRight?l.decoratorRight.length:0,y=l.text.length+f+g;y>s&&(n=d,s=y)}),e.textContent=this.options[n].text+(this.options[n].decoratorRight?this.options[n].decoratorRight+" ":""),i=OC(e)}return i}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=zn(e,K5(".select-box-dropdown-list-container")),this.listRenderer=new b0i,this.selectList=new Iw("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:s=>{let l=s.text;return s.detail&&(l+=`. ${s.detail}`),s.decoratorRight&&(l+=`. ${s.decoratorRight}`),s.description&&(l+=`. ${s.description}`),l},getWidgetAriaLabel:()=>V({key:"selectBox",comment:["Behave like native select dropdown element."]},"Select Box"),getRole:()=>Wl?"":"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const i=this._register(new Yl(this.selectDropDownListContainer,"keydown")),n=Mr.chain(i.event,s=>s.filter(()=>this.selectList.length>0).map(l=>new Fd(l)));this._register(Mr.chain(n,s=>s.filter(l=>l.keyCode===3))(this.onEnter,this)),this._register(Mr.chain(n,s=>s.filter(l=>l.keyCode===2))(this.onEnter,this)),this._register(Mr.chain(n,s=>s.filter(l=>l.keyCode===9))(this.onEscape,this)),this._register(Mr.chain(n,s=>s.filter(l=>l.keyCode===16))(this.onUpArrow,this)),this._register(Mr.chain(n,s=>s.filter(l=>l.keyCode===18))(this.onDownArrow,this)),this._register(Mr.chain(n,s=>s.filter(l=>l.keyCode===12))(this.onPageDown,this)),this._register(Mr.chain(n,s=>s.filter(l=>l.keyCode===11))(this.onPageUp,this)),this._register(Mr.chain(n,s=>s.filter(l=>l.keyCode===14))(this.onHome,this)),this._register(Mr.chain(n,s=>s.filter(l=>l.keyCode===13))(this.onEnd,this)),this._register(Mr.chain(n,s=>s.filter(l=>l.keyCode>=21&&l.keyCode<=56||l.keyCode>=85&&l.keyCode<=113))(this.onCharacter,this)),this._register(tn(this.selectList.getHTMLElement(),yr.POINTER_UP,s=>this.onPointerUp(s))),this._register(this.selectList.onMouseOver(s=>typeof s.index<"u"&&this.selectList.setFocus([s.index]))),this._register(this.selectList.onDidChangeFocus(s=>this.onListFocus(s))),this._register(tn(this.selectDropDownContainer,yr.FOCUS_OUT,s=>{!this._isVisible||Wg(s.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;nc.stop(e);const i=e.target;if(!i||i.classList.contains("slider"))return;const n=i.closest(".monaco-list-row");if(!n)return;const s=Number(n.getAttribute("data-index")),l=n.classList.contains("option-disabled");s>=0&&s{for(let d=0;dthis.selected+2)this.selected+=2;else{if(i)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){this.selected>0&&(nc.stop(e,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(e){nc.stop(e),this.selectList.focusPreviousPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onHome(e){nc.stop(e),!(this.options.length<2)&&(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){nc.stop(e),!(this.options.length<2)&&(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){const i=d4.toString(e.keyCode);let n=-1;for(let s=0;s{this._register(tn(this.selectElement,e,i=>{this.selectElement.focus()}))}),this._register(n_(this.selectElement,"click",e=>{nc.stop(e,!0)})),this._register(n_(this.selectElement,"change",e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})})),this._register(n_(this.selectElement,"keydown",e=>{let i=!1;Wl?(e.keyCode===18||e.keyCode===16||e.keyCode===10)&&(i=!0):(e.keyCode===18&&e.altKey||e.keyCode===10||e.keyCode===3)&&(i=!0),i&&e.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,i){(!this.options||!ch(this.options,e))&&(this.options=e,this.selectElement.options.length=0,this.options.forEach((n,s)=>{this.selectElement.add(this.createOption(n.text,s,n.isDisabled))})),i!==void 0&&this.select(i)}select(e){this.options.length===0?this.selected=0:e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected{this.element&&this.handleActionChangeEvent(s)}))}handleActionChangeEvent(e){e.enabled!==void 0&&this.updateEnabled(),e.checked!==void 0&&this.updateChecked(),e.class!==void 0&&this.updateClass(),e.label!==void 0&&(this.updateLabel(),this.updateTooltip()),e.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new b9)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const i=this.element=e;this._register(Jd.addTarget(e));const n=this.options&&this.options.draggable;n&&(e.draggable=!0,ok&&this._register(tn(e,yr.DRAG_START,s=>{var l;return(l=s.dataTransfer)===null||l===void 0?void 0:l.setData(mie.TEXT,this._action.label)}))),this._register(tn(i,Gd.Tap,s=>this.onClick(s,!0))),this._register(tn(i,yr.MOUSE_DOWN,s=>{n||nc.stop(s,!0),this._action.enabled&&s.button===0&&i.classList.add("active")})),Wl&&this._register(tn(i,yr.CONTEXT_MENU,s=>{s.button===0&&s.ctrlKey===!0&&this.onClick(s)})),this._register(tn(i,yr.CLICK,s=>{nc.stop(s,!0),this.options&&this.options.isMenu||this.onClick(s)})),this._register(tn(i,yr.DBLCLICK,s=>{nc.stop(s,!0)})),[yr.MOUSE_UP,yr.MOUSE_OUT].forEach(s=>{this._register(tn(i,s,l=>{nc.stop(l),i.classList.remove("active")}))})}onClick(e,i=!1){var n;nc.stop(e,!0);const s=dw(this._context)?!((n=this.options)===null||n===void 0)&&n.useEventAsContext?e:{preserveFocus:i}:this._context;this.actionRunner.run(this._action,s)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getClass(){return this.action.class}getTooltip(){return this.action.tooltip}updateTooltip(){var e,i,n;if(!this.element)return;const s=(e=this.getTooltip())!==null&&e!==void 0?e:"";if(this.updateAriaLabel(),!((i=this.options.hoverDelegate)===null||i===void 0)&&i.showNativeHover)this.element.title=s;else if(!this.customHover&&s!==""){const l=(n=this.options.hoverDelegate)!==null&&n!==void 0?n:Py("element");this.customHover=this._store.add(HE().setupUpdatableHover(l,this.element,s))}else this.customHover&&this.customHover.update(s)}updateAriaLabel(){var e;if(this.element){const i=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.element.setAttribute("aria-label",i)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class gq extends lE{constructor(e,i,n){super(e,i,n),this.options=n,this.options.icon=n.icon!==void 0?n.icon:!1,this.options.label=n.label!==void 0?n.label:!0,this.cssClass=""}render(e){super.render(e),Ac(this.element);const i=document.createElement("a");if(i.classList.add("action-label"),i.setAttribute("role",this.getDefaultAriaRole()),this.label=i,this.element.appendChild(i),this.options.label&&this.options.keybinding){const n=document.createElement("span");n.classList.add("keybinding"),n.textContent=this.options.keybinding,this.element.appendChild(n)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===Up.ID?"presentation":this.options.isMenu?"menuitem":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=V({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e??void 0}updateClass(){var e;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getClass(),this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):(e=this.label)===null||e===void 0||e.classList.remove("codicon")}updateEnabled(){var e,i;this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),(e=this.element)===null||e===void 0||e.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),(i=this.element)===null||i===void 0||i.classList.add("disabled"))}updateAriaLabel(){var e;if(this.label){const i=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.label.setAttribute("aria-label",i)}}updateChecked(){this.label&&(this.action.checked!==void 0?(this.label.classList.toggle("checked",this.action.checked),this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox")):(this.label.classList.remove("checked"),this.label.removeAttribute("aria-checked"),this.label.setAttribute("role",this.getDefaultAriaRole())))}}class w0i extends lE{constructor(e,i,n,s,l,d,f){super(e,i),this.selectBox=new S0i(n,s,l,d,f),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect(e=>this.runAction(e.selected,e.index)))}runAction(e,i){this.actionRunner.run(this._action,this.getActionContext(e,i))}getActionContext(e,i){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){var e;(e=this.selectBox)===null||e===void 0||e.focus()}blur(){var e;(e=this.selectBox)===null||e===void 0||e.blur()}render(e){this.selectBox.render(e)}}class x0i extends b9{constructor(e,i){super(),this._onDidChangeVisibility=this._register(new ui),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=zn(e,Sr(".monaco-dropdown")),this._label=zn(this._element,Sr(".dropdown-label"));let n=i.labelRenderer;n||(n=l=>(l.textContent=i.label||"",null));for(const l of[yr.CLICK,yr.MOUSE_DOWN,Gd.Tap])this._register(tn(this.element,l,d=>nc.stop(d,!0)));for(const l of[yr.MOUSE_DOWN,Gd.Tap])this._register(tn(this._label,l,d=>{WHe(d)&&(d.detail>1||d.button!==0)||(this.visible?this.hide():this.show())}));this._register(tn(this._label,yr.KEY_UP,l=>{const d=new Fd(l);(d.equals(3)||d.equals(10))&&(nc.stop(l,!0),this.visible?this.hide():this.show())}));const s=n(this._label);s&&this._register(s),this._register(Jd.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class k0i extends x0i{constructor(e,i){super(e,i),this._options=i,this._actions=[],this.actions=i.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,i)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,i):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class kve extends lE{constructor(e,i,n,s=Object.create(null)){super(null,e,s),this.actionItem=null,this._onDidChangeVisibility=this._register(new ui),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=i,this.contextMenuProvider=n,this.options=s,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const i=l=>{var d;this.element=zn(l,Sr("a.action-label"));let f=[];return typeof this.options.classNames=="string"?f=this.options.classNames.split(/\s+/g).filter(g=>!!g):this.options.classNames&&(f=this.options.classNames),f.find(g=>g==="icon")||f.push("codicon"),this.element.classList.add(...f),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this._action.label&&this._register(HE().setupUpdatableHover((d=this.options.hoverDelegate)!==null&&d!==void 0?d:Py("mouse"),this.element,this._action.label)),this.element.ariaLabel=this._action.label||"",null},n=Array.isArray(this.menuActionsOrProvider),s={contextMenuProvider:this.contextMenuProvider,labelRenderer:i,menuAsChild:this.options.menuAsChild,actions:n?this.menuActionsOrProvider:void 0,actionProvider:n?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new k0i(e,s)),this._register(this.dropdownMenu.onDidChangeVisibility(l=>{var d;(d=this.element)===null||d===void 0||d.setAttribute("aria-expanded",`${l}`),this._onDidChangeVisibility.fire(l)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const l=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return l.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),e??void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){var e;(e=this.dropdownMenu)===null||e===void 0||e.show()}updateEnabled(){var e,i;const n=!this.action.enabled;(e=this.actionItem)===null||e===void 0||e.classList.toggle("disabled",n),(i=this.element)===null||i===void 0||i.classList.toggle("disabled",n)}}function T0i(c){return c&&typeof c=="object"&&typeof c.original=="string"&&typeof c.value=="string"}function D0i(c){return c?c.condition!==void 0:!1}var FU;(function(c){c[c.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",c[c.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(FU||(FU={}));var dU;(function(c){c[c.None=0]="None",c[c.Initialized=1]="Initialized",c[c.Closed=2]="Closed"})(dU||(dU={}));class BU extends Ii{constructor(e,i=Object.create(null)){super(),this.database=e,this.options=i,this._onDidChangeStorage=this._register(new _9),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=dU.None,this.cache=new Map,this.flushDelayer=this._register(new rCt(BU.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){var i,n;this._onDidChangeStorage.pause();try{(i=e.changed)===null||i===void 0||i.forEach((s,l)=>this.acceptExternal(l,s)),(n=e.deleted)===null||n===void 0||n.forEach(s=>this.acceptExternal(s,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,i){if(this.state===dU.Closed)return;let n=!1;dw(i)?n=this.cache.delete(e):this.cache.get(e)!==i&&(this.cache.set(e,i),n=!0),n&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,i){const n=this.cache.get(e);return dw(n)?i:n}getBoolean(e,i){const n=this.get(e);return dw(n)?i:n==="true"}getNumber(e,i){const n=this.get(e);return dw(n)?i:parseInt(n,10)}async set(e,i,n=!1){if(this.state===dU.Closed)return;if(dw(i))return this.delete(e,n);const s=vy(i)||Array.isArray(i)?cgi(i):String(i);if(this.cache.get(e)!==s)return this.cache.set(e,s),this.pendingInserts.set(e,s),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:n}),this.doFlush()}async delete(e,i=!1){if(!(this.state===dU.Closed||!this.cache.delete(e)))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:i}),this.doFlush()}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{var i;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(i=this.whenFlushedCallbacks.pop())===null||i===void 0||i()})}async doFlush(e){return this.options.hint===FU.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger(()=>this.flushPending(),e)}}BU.DEFAULT_FLUSH_DELAY=100;class R7e{constructor(){this.onDidChangeItemsExternal=Mr.None,this.items=new Map}async updateItems(e){var i,n;(i=e.insert)===null||i===void 0||i.forEach((s,l)=>this.items.set(l,s)),(n=e.delete)===null||n===void 0||n.forEach(s=>this.items.delete(s))}}const s0e="__$__targetStorageMarker",mT=Kl("storageService");var Cie;(function(c){c[c.NONE=0]="NONE",c[c.SHUTDOWN=1]="SHUTDOWN"})(Cie||(Cie={}));function E0i(c){const e=c.get(s0e);if(e)try{return JSON.parse(e)}catch{}return Object.create(null)}class Aye extends Ii{constructor(e={flushInterval:Aye.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new _9),this._onDidChangeTarget=this._register(new _9),this._onWillSaveState=this._register(new ui),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(e,i,n){return Mr.filter(this._onDidChangeValue.event,s=>s.scope===e&&(i===void 0||s.key===i),n)}emitDidChangeValue(e,i){const{key:n,external:s}=i;if(n===s0e){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:n,target:this.getKeyTargets(e)[n],external:s})}get(e,i,n){var s;return(s=this.getStorage(i))===null||s===void 0?void 0:s.get(e,n)}getBoolean(e,i,n){var s;return(s=this.getStorage(i))===null||s===void 0?void 0:s.getBoolean(e,n)}getNumber(e,i,n){var s;return(s=this.getStorage(i))===null||s===void 0?void 0:s.getNumber(e,n)}store(e,i,n,s,l=!1){if(dw(i)){this.remove(e,n,l);return}this.withPausedEmitters(()=>{var d;this.updateKeyTarget(e,n,s),(d=this.getStorage(n))===null||d===void 0||d.set(e,i,l)})}remove(e,i,n=!1){this.withPausedEmitters(()=>{var s;this.updateKeyTarget(e,i,void 0),(s=this.getStorage(i))===null||s===void 0||s.delete(e,n)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,i,n,s=!1){var l,d;const f=this.getKeyTargets(i);typeof n=="number"?f[e]!==n&&(f[e]=n,(l=this.getStorage(i))===null||l===void 0||l.set(s0e,JSON.stringify(f),s)):typeof f[e]=="number"&&(delete f[e],(d=this.getStorage(i))===null||d===void 0||d.set(s0e,JSON.stringify(f),s))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){const i=this.getStorage(e);return i?E0i(i):Object.create(null)}}Aye.DEFAULT_FLUSH_INTERVAL=60*1e3;class I0i extends Aye{constructor(){super(),this.applicationStorage=this._register(new BU(new R7e,{hint:FU.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new BU(new R7e,{hint:FU.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new BU(new R7e,{hint:FU.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.profileStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e))),this._register(this.applicationStorage.onDidChangeStorage(e=>this.emitDidChangeValue(-1,e)))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}function N0i(c,e){const i={...e};for(const n in c){const s=c[n];i[n]=s!==void 0?vs(s):void 0}return i}const L0i={keybindingLabelBackground:vs(Kli),keybindingLabelForeground:vs(Qli),keybindingLabelBorder:vs(Xli),keybindingLabelBottomBorder:vs(Zli),keybindingLabelShadow:vs(T4)},P0i={buttonForeground:vs(Eee),buttonSeparator:vs(Hli),buttonBackground:vs(Iee),buttonHoverBackground:vs(jli),buttonSecondaryForeground:vs(Uli),buttonSecondaryBackground:vs(h9e),buttonSecondaryHoverBackground:vs(qli),buttonBorder:vs(zli)},A0i={progressBarBackground:vs(rli)},Tve={inputActiveOptionBorder:vs(cje),inputActiveOptionForeground:vs(uje),inputActiveOptionBackground:vs(q5)};vs($li),vs(Gli),vs(Jli);vs(I_),vs(C4),vs(T4),vs(ec),vs(wli),vs(xli),vs(kli),vs(ili);const Dve={inputBackground:vs(f9e),inputForeground:vs(CSt),inputBorder:vs(SSt),inputValidationInfoBorder:vs(Ali),inputValidationInfoBackground:vs(Lli),inputValidationInfoForeground:vs(Pli),inputValidationWarningBorder:vs(Rli),inputValidationWarningBackground:vs(Oli),inputValidationWarningForeground:vs(Mli),inputValidationErrorBorder:vs(Wli),inputValidationErrorBackground:vs(Fli),inputValidationErrorForeground:vs(Bli)},O0i={listFilterWidgetBackground:vs(uci),listFilterWidgetOutline:vs(dci),listFilterWidgetNoMatchesOutline:vs(fci),listFilterWidgetShadow:vs(hci),inputBoxStyles:Dve,toggleStyles:Tve},Cxt={badgeBackground:vs(Kme),badgeForeground:vs(nli),badgeBorder:vs(ec)};vs(Cli),vs(bli),vs(Tmt),vs(Tmt),vs(Sli);const iB={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:vs(Yli),listFocusForeground:vs(eci),listFocusOutline:vs(tci),listActiveSelectionBackground:vs(E4),listActiveSelectionForeground:vs(eL),listActiveSelectionIconForeground:vs(Nee),listFocusAndSelectionOutline:vs(ici),listFocusAndSelectionBackground:vs(E4),listFocusAndSelectionForeground:vs(eL),listInactiveSelectionBackground:vs(nci),listInactiveSelectionIconForeground:vs(sci),listInactiveSelectionForeground:vs(rci),listInactiveFocusBackground:vs(oci),listInactiveFocusOutline:vs(aci),listHoverBackground:vs(wSt),listHoverForeground:vs(xSt),listDropOverBackground:vs(lci),listDropBetweenBackground:vs(cci),listSelectionOutline:vs(bf),listHoverOutline:vs(bf),treeIndentGuidesStroke:vs(Lee),treeInactiveIndentGuidesStroke:vs(_ci),treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0,tableColumnsBorder:vs(pci),tableOddRowsBackgroundColor:vs(gci)};function nB(c){return N0i(c,iB)}const M0i={selectBackground:vs(YN),selectListBackground:vs(Vli),selectForeground:vs(D4),decoratorRightForeground:vs(kSt),selectBorder:vs(iU),focusBorder:vs(ek),listFocusBackground:vs(TM),listInactiveSelectionIconForeground:vs(nU),listFocusForeground:vs(kM),listFocusOutline:Zai(bf,Qi.transparent.toString()),listHoverBackground:vs(wSt),listHoverForeground:vs(xSt),listHoverOutline:vs(bf),selectListBorder:vs(S4),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropOverBackground:void 0,listDropBetweenBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},R0i={shadowColor:vs(T4),borderColor:vs(mci),foregroundColor:vs(vci),backgroundColor:vs(yci),selectionForegroundColor:vs(bci),selectionBackgroundColor:vs(Cci),selectionBorderColor:vs(Sci),separatorColor:vs(wci),scrollbarShadow:vs(wee),scrollbarSliderBackground:vs(xee),scrollbarSliderHoverBackground:vs(kee),scrollbarSliderActiveBackground:vs(Tee)};var Oye=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Sb=function(c,e){return function(i,n){e(i,n,c)}};function F0i(c,e,i,n){const s=c.getActions(e),l=b4.getInstance(),d=l.keyStatus.altKey||(M0||Ty)&&l.keyStatus.shiftKey;Sxt(s,i,d,f=>f==="navigation")}function Mye(c,e,i,n,s,l){const d=c.getActions(e);Sxt(d,i,!1,typeof n=="string"?g=>g===n:n,s,l)}function Sxt(c,e,i,n=d=>d==="navigation",s=()=>!1,l=!1){let d,f;Array.isArray(e)?(d=e,f=e):(d=e.primary,f=e.secondary);const g=new Set;for(const[y,w]of c){let x;n(y)?(x=d,x.length>0&&l&&x.push(new Up)):(x=f,x.length>0&&x.push(new Up));for(let I of w){i&&(I=I instanceof VC&&I.alt?I.alt:I);const P=x.push(I);I instanceof KU&&g.add({group:y,action:I,index:P-1})}}for(const{group:y,action:w,index:x}of g){const I=n(y)?d:f,P=w.actions;s(w,y,I.length)&&I.splice(x,1,...P)}}let cR=class extends gq{constructor(e,i,n,s,l,d,f,g){super(void 0,e,{icon:!!(e.class||e.item.icon),label:!e.class&&!e.item.icon,draggable:i==null?void 0:i.draggable,keybinding:i==null?void 0:i.keybinding,hoverDelegate:i==null?void 0:i.hoverDelegate}),this._keybindingService=n,this._notificationService=s,this._contextKeyService=l,this._themeService=d,this._contextMenuService=f,this._accessibilityService=g,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new jg),this._altKey=b4.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(e){e.preventDefault(),e.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(i){this._notificationService.error(i)}}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let i=!1;const n=()=>{var s;const l=!!(!((s=this._menuItemAction.alt)===null||s===void 0)&&s.enabled)&&(!this._accessibilityService.isMotionReduced()||i)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&i);l!==this._wantsAltCommand&&(this._wantsAltCommand=l,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(n)),this._register(tn(e,"mouseleave",s=>{i=!1,n()})),this._register(tn(e,"mouseenter",s=>{i=!0,n()})),n()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var e;const i=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),n=i&&i.getLabel(),s=this._commandAction.tooltip||this._commandAction.label;let l=n?V("titleAndKb","{0} ({1})",s,n):s;if(!this._wantsAltCommand&&(!((e=this._menuItemAction.alt)===null||e===void 0)&&e.enabled)){const d=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,f=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),g=f&&f.getLabel(),y=g?V("titleAndKb","{0} ({1})",d,g):d;l=V("titleAndKbAndAlt",`{0} +[{1}] {2}`,l,ize.modifierLabels[FC].altKey,y)}return l}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:i,label:n}=this;if(!i||!n)return;const s=this._commandAction.checked&&D0i(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(s)if(Uo.isThemeIcon(s)){const l=Uo.asClassNameArray(s);n.classList.add(...l),this._itemClassDispose.value=go(()=>{n.classList.remove(...l)})}else n.style.backgroundImage=rq(this._themeService.getColorTheme().type)?G4(s.dark):G4(s.light),n.classList.add("icon"),this._itemClassDispose.value=dT(go(()=>{n.style.backgroundImage="",n.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};cR=Oye([Sb(2,ou),Sb(3,L_),Sb(4,Zo),Sb(5,og),Sb(6,GC),Sb(7,$C)],cR);let hBe=class extends kve{constructor(e,i,n,s,l){var d,f,g;const y={...i,menuAsChild:(d=i==null?void 0:i.menuAsChild)!==null&&d!==void 0?d:!1,classNames:(f=i==null?void 0:i.classNames)!==null&&f!==void 0?f:Uo.isThemeIcon(e.item.icon)?Uo.asClassName(e.item.icon):void 0,keybindingProvider:(g=i==null?void 0:i.keybindingProvider)!==null&&g!==void 0?g:w=>n.lookupKeybinding(w.id)};super(e,{getActions:()=>e.actions},s,y),this._keybindingService=n,this._contextMenuService=s,this._themeService=l}render(e){super.render(e),Ac(this.element),e.classList.add("menu-entry");const i=this._action,{icon:n}=i.item;if(n&&!Uo.isThemeIcon(n)){this.element.classList.add("icon");const s=()=>{this.element&&(this.element.style.backgroundImage=rq(this._themeService.getColorTheme().type)?G4(n.dark):G4(n.light))};s(),this._register(this._themeService.onDidColorThemeChange(()=>{s()}))}}};hBe=Oye([Sb(2,ou),Sb(3,GC),Sb(4,og)],hBe);let _Be=class extends lE{constructor(e,i,n,s,l,d,f,g){var y,w,x;super(null,e),this._keybindingService=n,this._notificationService=s,this._contextMenuService=l,this._menuService=d,this._instaService=f,this._storageService=g,this._container=null,this._options=i,this._storageKey=`${e.item.submenu.id}_lastActionId`;let I;const P=i!=null&&i.persistLastActionId?g.get(this._storageKey,1):void 0;P&&(I=e.actions.find(W=>P===W.id)),I||(I=e.actions[0]),this._defaultAction=this._instaService.createInstance(cR,I,{keybinding:this._getDefaultActionKeybindingLabel(I)});const O={keybindingProvider:W=>this._keybindingService.lookupKeybinding(W.id),...i,menuAsChild:(y=i==null?void 0:i.menuAsChild)!==null&&y!==void 0?y:!0,classNames:(w=i==null?void 0:i.classNames)!==null&&w!==void 0?w:["codicon","codicon-chevron-down"],actionRunner:(x=i==null?void 0:i.actionRunner)!==null&&x!==void 0?x:new b9};this._dropdown=new kve(e,e.actions,this._contextMenuService,O),this._register(this._dropdown.actionRunner.onDidRun(W=>{W.action instanceof VC&&this.update(W.action)}))}update(e){var i;!((i=this._options)===null||i===void 0)&&i.persistLastActionId&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(cR,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends b9{async runAction(n,s){await n.run(void 0)}},this._container&&this._defaultAction.render(VHe(this._container,Sr(".action-container")))}_getDefaultActionKeybindingLabel(e){var i;let n;if(!((i=this._options)===null||i===void 0)&&i.renderKeybindingWithDefaultActionLabel){const s=this._keybindingService.lookupKeybinding(e.id);s&&(n=`(${s.getLabel()})`)}return n}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const i=Sr(".action-container");this._defaultAction.render(zn(this._container,i)),this._register(tn(i,yr.KEY_DOWN,s=>{const l=new Fd(s);l.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),l.stopPropagation())}));const n=Sr(".dropdown-action-container");this._dropdown.render(zn(this._container,n)),this._register(tn(n,yr.KEY_DOWN,s=>{var l;const d=new Fd(s);d.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(l=this._defaultAction.element)===null||l===void 0||l.focus(),d.stopPropagation())}))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};_Be=Oye([Sb(2,ou),Sb(3,L_),Sb(4,GC),Sb(5,Dw),Sb(6,So),Sb(7,mT)],_Be);let pBe=class extends w0i{constructor(e,i){super(null,e,e.actions.map(n=>({text:n.id===Up.ID?"─────────":n.label,isDisabled:!n.enabled})),0,i,M0i,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex(n=>n.checked)))}render(e){super.render(e),e.style.borderColor=vs(iU)}runAction(e,i){const n=this.action.actions[i];n&&this.actionRunner.run(n)}};pBe=Oye([Sb(1,n6)],pBe);function wxt(c,e,i){return e instanceof VC?c.createInstance(cR,e,i):e instanceof CU?e.item.isSelection?c.createInstance(pBe,e):e.item.rememberDefaultAction?c.createInstance(_Be,e,{...i,persistLastActionId:!0}):c.createInstance(hBe,e,i):void 0}class uk extends Ii{constructor(e,i={}){var n,s,l,d,f,g,y;super(),this._actionRunnerDisposables=this._register(new On),this.viewItemDisposables=this._register(new bHe),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new ui),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new ui({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new ui),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new ui),this.onWillRun=this._onWillRun.event,this.options=i,this._context=(n=i.context)!==null&&n!==void 0?n:null,this._orientation=(s=this.options.orientation)!==null&&s!==void 0?s:0,this._triggerKeys={keyDown:(d=(l=this.options.triggerKeys)===null||l===void 0?void 0:l.keyDown)!==null&&d!==void 0?d:!1,keys:(g=(f=this.options.triggerKeys)===null||f===void 0?void 0:f.keys)!==null&&g!==void 0?g:[3,10]},this._hoverDelegate=(y=i.hoverDelegate)!==null&&y!==void 0?y:this._register(pq()),this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new b9,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(I=>this._onDidRun.fire(I))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(I=>this._onWillRun.fire(I))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar";let w,x;switch(this._orientation){case 0:w=[15],x=[17];break;case 1:w=[16],x=[18],this.domNode.className+=" vertical";break}this._register(tn(this.domNode,yr.KEY_DOWN,I=>{const P=new Fd(I);let O=!0;const W=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;w&&(P.equals(w[0])||P.equals(w[1]))?O=this.focusPrevious():x&&(P.equals(x[0])||P.equals(x[1]))?O=this.focusNext():P.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():P.equals(14)?O=this.focusFirst():P.equals(13)?O=this.focusLast():P.equals(2)&&W instanceof lE&&W.trapsArrowNavigation?O=this.focusNext():this.isTriggerKeyEvent(P)?this._triggerKeys.keyDown?this.doTrigger(P):this.triggerKeyDown=!0:O=!1,O&&(P.preventDefault(),P.stopPropagation())})),this._register(tn(this.domNode,yr.KEY_UP,I=>{const P=new Fd(I);this.isTriggerKeyEvent(P)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(P)),P.preventDefault(),P.stopPropagation()):(P.equals(2)||P.equals(1026)||P.equals(16)||P.equals(18)||P.equals(15)||P.equals(17))&&this.updateFocusedItem()})),this.focusTracker=this._register(IE(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(A0()===this.domNode||!Wg(A0(),this.domNode))&&(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const i=this.viewItems.find(n=>n instanceof lE&&n.isEnabled());i instanceof lE&&i.setFocusable(!0)}else this.viewItems.forEach(i=>{i instanceof lE&&i.setFocusable(!1)})}isTriggerKeyEvent(e){let i=!1;return this._triggerKeys.keys.forEach(n=>{i=i||e.equals(n)}),i}updateFocusedItem(){var e,i;for(let n=0;ni.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(i=>this._onDidRun.fire(i))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(i=>this._onWillRun.fire(i))),this.viewItems.forEach(i=>i.actionRunner=e)}getContainer(){return this.domNode}getAction(e){var i;if(typeof e=="number")return(i=this.viewItems[e])===null||i===void 0?void 0:i.action;if(Sm(e)){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let n=0;n{const d=document.createElement("li");d.className="action-item",d.setAttribute("role","presentation");let f;const g={hoverDelegate:this._hoverDelegate,...i};this.options.actionViewItemProvider&&(f=this.options.actionViewItemProvider(l,g)),f||(f=new gq(this.context,l,g)),this.options.allowContextMenu||this.viewItemDisposables.set(f,tn(d,yr.CONTEXT_MENU,y=>{nc.stop(y,!0)})),f.actionRunner=this._actionRunner,f.setActionContext(this.context),f.render(d),this.focusable&&f instanceof lE&&this.viewItems.length===0&&f.setFocusable(!0),s===null||s<0||s>=this.actionsList.children.length?(this.actionsList.appendChild(d),this.viewItems.push(f)):(this.actionsList.insertBefore(d,this.actionsList.children[s]),this.viewItems.splice(s,0,f),s++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=yd(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),n0(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return this.viewItems.length===0}focus(e){let i=!1,n;if(e===void 0?i=!0:typeof e=="number"?n=e:typeof e=="boolean"&&(i=e),i&&typeof this.focusedItem>"u"){const s=this.viewItems.findIndex(l=>l.isEnabled());this.focusedItem=s===-1?void 0:s,this.updateFocus(void 0,void 0,!0)}else n!==void 0&&(this.focusedItem=n),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const i=this.focusedItem;let n;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=i,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,n=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===Up.ID));return this.updateFocus(),!0}focusPrevious(e){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const i=this.focusedItem;let n;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=i,!1;this.focusedItem=this.viewItems.length-1}n=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===Up.ID));return this.updateFocus(!0),!0}updateFocus(e,i,n=!1){var s,l;typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:i}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((s=this.viewItems[this.previouslyFocusedItem])===null||s===void 0||s.blur());const d=this.focusedItem!==void 0?this.viewItems[this.focusedItem]:void 0;if(d){let f=!0;Nte(d.focus)||(f=!1),this.options.focusOnlyEnabledItems&&Nte(d.isEnabled)&&!d.isEnabled()&&(f=!1),d.action.id===Up.ID&&(f=!1),f?(n||this.previouslyFocusedItem!==this.focusedItem)&&(d.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:i}),this.previouslyFocusedItem=void 0),f&&((l=d.showHover)===null||l===void 0||l.call(d))}}doTrigger(e){if(typeof this.focusedItem>"u")return;const i=this.viewItems[this.focusedItem];if(i instanceof lE){const n=i._context===null||i._context===void 0?e:i._context;this.run(i._action,n)}}async run(e,i){await this._actionRunner.run(e,i)}dispose(){this._context=void 0,this.viewItems=yd(this.viewItems),this.getContainer().remove(),super.dispose()}}const gBe=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,F7e=/(&)?(&)([^\s&])/g;var Eve;(function(c){c[c.Right=0]="Right",c[c.Left=1]="Left"})(Eve||(Eve={}));var mBe;(function(c){c[c.Above=0]="Above",c[c.Below=1]="Below"})(mBe||(mBe={}));class WU extends uk{constructor(e,i,n,s){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const l=document.createElement("div");l.classList.add("monaco-menu"),l.setAttribute("role","presentation"),super(l,{orientation:1,actionViewItemProvider:y=>this.doGetActionViewItem(y,n,d),context:n.context,actionRunner:n.actionRunner,ariaLabel:n.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...Wl||Ty?[10]:[]],keyDown:!0}}),this.menuStyles=s,this.menuElement=l,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(e,s),this._register(Jd.addTarget(l)),this._register(tn(l,yr.KEY_DOWN,y=>{new Fd(y).equals(2)&&y.preventDefault()})),n.enableMnemonics&&this._register(tn(l,yr.KEY_DOWN,y=>{const w=y.key.toLocaleLowerCase();if(this.mnemonics.has(w)){nc.stop(y,!0);const x=this.mnemonics.get(w);if(x.length===1&&(x[0]instanceof wvt&&x[0].container&&this.focusItemByElement(x[0].container),x[0].onClick(y)),x.length>1){const I=x.shift();I&&I.container&&(this.focusItemByElement(I.container),x.push(I)),this.mnemonics.set(w,x)}}})),Ty&&this._register(tn(l,yr.KEY_DOWN,y=>{const w=new Fd(y);w.equals(14)||w.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),nc.stop(y,!0)):(w.equals(13)||w.equals(12))&&(this.focusedItem=0,this.focusPrevious(),nc.stop(y,!0))})),this._register(tn(this.domNode,yr.MOUSE_OUT,y=>{const w=y.relatedTarget;Wg(w,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),y.stopPropagation())})),this._register(tn(this.actionsList,yr.MOUSE_OVER,y=>{let w=y.target;if(!(!w||!Wg(w,this.actionsList)||w===this.actionsList)){for(;w.parentElement!==this.actionsList&&w.parentElement!==null;)w=w.parentElement;if(w.classList.contains("action-item")){const x=this.focusedItem;this.setFocusedItem(w),x!==this.focusedItem&&this.updateFocus()}}})),this._register(Jd.addTarget(this.actionsList)),this._register(tn(this.actionsList,Gd.Tap,y=>{let w=y.initialTarget;if(!(!w||!Wg(w,this.actionsList)||w===this.actionsList)){for(;w.parentElement!==this.actionsList&&w.parentElement!==null;)w=w.parentElement;if(w.classList.contains("action-item")){const x=this.focusedItem;this.setFocusedItem(w),x!==this.focusedItem&&this.updateFocus()}}}));const d={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new Ine(l,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const f=this.scrollableElement.getDomNode();f.style.position="",this.styleScrollElement(f,s),this._register(tn(l,Gd.Change,y=>{nc.stop(y,!0);const w=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:w-y.translationY})})),this._register(tn(f,yr.MOUSE_UP,y=>{y.preventDefault()}));const g=Io(e);l.style.maxHeight=`${Math.max(10,g.innerHeight-e.getBoundingClientRect().top-35)}px`,i=i.filter((y,w)=>{var x;return!((x=n.submenuIds)===null||x===void 0)&&x.has(y.id)?(console.warn(`Found submenu cycle: ${y.id}`),!1):!(y instanceof Up&&(w===i.length-1||w===0||i[w-1]instanceof Up))}),this.push(i,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(y=>!(y instanceof xvt)).forEach((y,w,x)=>{y.updatePositionInSet(w+1,x.length)})}initializeOrUpdateStyleSheet(e,i){this.styleSheet||(V0e(e)?this.styleSheet=Sw(e):(WU.globalStyleSheet||(WU.globalStyleSheet=Sw()),this.styleSheet=WU.globalStyleSheet)),this.styleSheet.textContent=W0i(i,V0e(e))}styleScrollElement(e,i){var n,s;const l=(n=i.foregroundColor)!==null&&n!==void 0?n:"",d=(s=i.backgroundColor)!==null&&s!==void 0?s:"",f=i.borderColor?`1px solid ${i.borderColor}`:"",g="5px",y=i.shadowColor?`0 2px 8px ${i.shadowColor}`:"";e.style.outline=f,e.style.borderRadius=g,e.style.color=l,e.style.backgroundColor=d,e.style.boxShadow=y}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const i=this.focusedItem;this.setFocusedItem(e),i!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let i=0;i{this.element&&(this._register(tn(this.element,yr.MOUSE_UP,l=>{if(nc.stop(l,!0),ok){if(new sT(Io(this.element),l).rightButton)return;this.onClick(l)}else setTimeout(()=>{this.onClick(l)},0)})),this._register(tn(this.element,yr.CONTEXT_MENU,l=>{nc.stop(l,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=zn(this.element,Sr("a.action-menu-item")),this._action.id===Up.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=zn(this.item,Sr("span.menu-item-check"+Uo.asCSSSelector(Dr.menuSelection))),this.check.setAttribute("role","none"),this.label=zn(this.item,Sr("span.action-label")),this.options.label&&this.options.keybinding&&(zn(this.item,Sr("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){var e;super.focus(),(e=this.item)===null||e===void 0||e.focus(),this.applyStyle()}updatePositionInSet(e,i){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${i}`))}updateLabel(){var e;if(this.label&&this.options.label){n0(this.label);let i=Zje(this.action.label);if(i){const n=B0i(i);this.options.enableMnemonics||(i=n),this.label.setAttribute("aria-label",n.replace(/&&/g,"&"));const s=gBe.exec(i);if(s){i=Gee(i),F7e.lastIndex=0;let l=F7e.exec(i);for(;l&&l[1];)l=F7e.exec(i);const d=f=>f.replace(/&&/g,"&");l?this.label.append(pne(d(i.substr(0,l.index))," "),Sr("u",{"aria-hidden":"true"},l[3]),Gbt(d(i.substr(l.index+l[0].length))," ")):this.label.innerText=d(i).trim(),(e=this.item)===null||e===void 0||e.setAttribute("aria-keyshortcuts",(s[1]?s[1]:s[3]).toLocaleLowerCase())}else this.label.innerText=i.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.action.checked;this.item.classList.toggle("checked",!!e),e!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const e=this.element&&this.element.classList.contains("focused"),i=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,n=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,s=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",l=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=i??"",this.item.style.backgroundColor=n??"",this.item.style.outline=s,this.item.style.outlineOffset=l),this.check&&(this.check.style.color=i??"")}}class wvt extends xxt{constructor(e,i,n,s,l){super(e,e,s,l),this.submenuActions=i,this.parentData=n,this.submenuOptions=s,this.mysubmenu=null,this.submenuDisposables=this._register(new On),this.mouseOver=!1,this.expandDirection=s&&s.expandDirection!==void 0?s.expandDirection:{horizontal:Eve.Right,vertical:mBe.Below},this.showScheduler=new id(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new id(()=>{this.element&&!Wg(A0(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=zn(this.item,Sr("span.submenu-indicator"+Uo.asCSSSelector(Dr.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(tn(this.element,yr.KEY_UP,i=>{const n=new Fd(i);(n.equals(17)||n.equals(3))&&(nc.stop(i,!0),this.createSubmenu(!0))})),this._register(tn(this.element,yr.KEY_DOWN,i=>{const n=new Fd(i);A0()===this.item&&(n.equals(17)||n.equals(3))&&nc.stop(i,!0)})),this._register(tn(this.element,yr.MOUSE_OVER,i=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(tn(this.element,yr.MOUSE_LEAVE,i=>{this.mouseOver=!1})),this._register(tn(this.element,yr.FOCUS_OUT,i=>{this.element&&!Wg(A0(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}onClick(e){nc.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,i,n,s){const l={top:0,left:0};return l.left=lU(e.width,i.width,{position:s.horizontal===Eve.Right?0:1,offset:n.left,size:n.width}),l.left>=n.left&&l.left{new Fd(w).equals(15)&&(nc.stop(w,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(tn(this.submenuContainer,yr.KEY_DOWN,w=>{new Fd(w).equals(15)&&nc.stop(w,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var i;this.item&&((i=this.item)===null||i===void 0||i.setAttribute("aria-expanded",e))}applyStyle(){super.applyStyle();const i=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=i??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class xvt extends gq{constructor(e,i,n,s){super(e,i,n),this.menuStyles=s}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function B0i(c){const e=gBe,i=e.exec(c);if(!i)return c;const n=!i[1];return c.replace(e,n?"$2$3":"").trim()}function kvt(c){const e=zbt()[c.id];return`.codicon-${c.id}:before { content: '\\${e.toString(16)}'; }`}function W0i(c,e){let i=` +.monaco-menu { + font-size: 13px; + border-radius: 5px; + min-width: 160px; +} + +${kvt(Dr.menuSelection)} +${kvt(Dr.menuSubmenu)} + +.monaco-menu .monaco-action-bar { + text-align: right; + overflow: hidden; + white-space: nowrap; +} + +.monaco-menu .monaco-action-bar .actions-container { + display: flex; + margin: 0 auto; + padding: 0; + width: 100%; + justify-content: flex-end; +} + +.monaco-menu .monaco-action-bar.vertical .actions-container { + display: inline-block; +} + +.monaco-menu .monaco-action-bar.reverse .actions-container { + flex-direction: row-reverse; +} + +.monaco-menu .monaco-action-bar .action-item { + cursor: pointer; + display: inline-block; + transition: transform 50ms ease; + position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */ +} + +.monaco-menu .monaco-action-bar .action-item.disabled { + cursor: default; +} + +.monaco-menu .monaco-action-bar .action-item .icon, +.monaco-menu .monaco-action-bar .action-item .codicon { + display: inline-block; +} + +.monaco-menu .monaco-action-bar .action-item .codicon { + display: flex; + align-items: center; +} + +.monaco-menu .monaco-action-bar .action-label { + font-size: 11px; + margin-right: 4px; +} + +.monaco-menu .monaco-action-bar .action-item.disabled .action-label, +.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover { + color: var(--vscode-disabledForeground); +} + +/* Vertical actions */ + +.monaco-menu .monaco-action-bar.vertical { + text-align: left; +} + +.monaco-menu .monaco-action-bar.vertical .action-item { + display: block; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + display: block; + border-bottom: 1px solid var(--vscode-menu-separatorBackground); + padding-top: 1px; + padding: 30px; +} + +.monaco-menu .secondary-actions .monaco-action-bar .action-label { + margin-left: 6px; +} + +/* Action Items */ +.monaco-menu .monaco-action-bar .action-item.select-container { + overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */ + flex: 1; + max-width: 170px; + min-width: 60px; + display: flex; + align-items: center; + justify-content: center; + margin-right: 10px; +} + +.monaco-menu .monaco-action-bar.vertical { + margin-left: 0; + overflow: visible; +} + +.monaco-menu .monaco-action-bar.vertical .actions-container { + display: block; +} + +.monaco-menu .monaco-action-bar.vertical .action-item { + padding: 0; + transform: none; + display: flex; +} + +.monaco-menu .monaco-action-bar.vertical .action-item.active { + transform: none; +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item { + flex: 1 1 auto; + display: flex; + height: 2em; + align-items: center; + position: relative; + margin: 0 4px; + border-radius: 4px; +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding, +.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding { + opacity: unset; +} + +.monaco-menu .monaco-action-bar.vertical .action-label { + flex: 1 1 auto; + text-decoration: none; + padding: 0 1em; + background: none; + font-size: 12px; + line-height: 1; +} + +.monaco-menu .monaco-action-bar.vertical .keybinding, +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + display: inline-block; + flex: 2 1 auto; + padding: 0 1em; + text-align: right; + font-size: 12px; + line-height: 1; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + height: 100%; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon { + font-size: 16px !important; + display: flex; + align-items: center; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before { + margin-left: auto; + margin-right: -20px; +} + +.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding, +.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator { + opacity: 0.4; +} + +.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) { + display: inline-block; + box-sizing: border-box; + margin: 0; +} + +.monaco-menu .monaco-action-bar.vertical .action-item { + position: static; + overflow: visible; +} + +.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu { + position: absolute; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + width: 100%; + height: 0px !important; + opacity: 1; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator.text { + padding: 0.7em 1em 0.1em 1em; + font-weight: bold; + opacity: 1; +} + +.monaco-menu .monaco-action-bar.vertical .action-label:hover { + color: inherit; +} + +.monaco-menu .monaco-action-bar.vertical .menu-item-check { + position: absolute; + visibility: hidden; + width: 1em; + height: 100%; +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check { + visibility: visible; + display: flex; + align-items: center; + justify-content: center; +} + +/* Context Menu */ + +.context-view.monaco-menu-container { + outline: 0; + border: none; + animation: fadeIn 0.083s linear; + -webkit-app-region: no-drag; +} + +.context-view.monaco-menu-container :focus, +.context-view.monaco-menu-container .monaco-action-bar.vertical:focus, +.context-view.monaco-menu-container .monaco-action-bar.vertical :focus { + outline: 0; +} + +.hc-black .context-view.monaco-menu-container, +.hc-light .context-view.monaco-menu-container, +:host-context(.hc-black) .context-view.monaco-menu-container, +:host-context(.hc-light) .context-view.monaco-menu-container { + box-shadow: none; +} + +.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused, +.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused, +:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused, +:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused { + background: none; +} + +/* Vertical Action Bar Styles */ + +.monaco-menu .monaco-action-bar.vertical { + padding: 4px 0; +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item { + height: 2em; +} + +.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator), +.monaco-menu .monaco-action-bar.vertical .keybinding { + font-size: inherit; + padding: 0 2em; + max-height: 100%; +} + +.monaco-menu .monaco-action-bar.vertical .menu-item-check { + font-size: inherit; + width: 2em; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + font-size: inherit; + margin: 5px 0 !important; + padding: 0; + border-radius: 0; +} + +.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator, +:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator { + margin-left: 0; + margin-right: 0; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + font-size: 60%; + padding: 0 1.8em; +} + +.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator, +:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator { + height: 100%; + mask-size: 10px 10px; + -webkit-mask-size: 10px 10px; +} + +.monaco-menu .action-item { + cursor: default; +}`;if(e){i+=` + /* Arrows */ + .monaco-scrollable-element > .scrollbar > .scra { + cursor: pointer; + font-size: 11px !important; + } + + .monaco-scrollable-element > .visible { + opacity: 1; + + /* Background rule added for IE9 - to allow clicks on dom node */ + background:rgba(0,0,0,0); + + transition: opacity 100ms linear; + } + .monaco-scrollable-element > .invisible { + opacity: 0; + pointer-events: none; + } + .monaco-scrollable-element > .invisible.fade { + transition: opacity 800ms linear; + } + + /* Scrollable Content Inset Shadow */ + .monaco-scrollable-element > .shadow { + position: absolute; + display: none; + } + .monaco-scrollable-element > .shadow.top { + display: block; + top: 0; + left: 3px; + height: 3px; + width: 100%; + } + .monaco-scrollable-element > .shadow.left { + display: block; + top: 3px; + left: 0; + height: 100%; + width: 3px; + } + .monaco-scrollable-element > .shadow.top-left-corner { + display: block; + top: 0; + left: 0; + height: 3px; + width: 3px; + } + `;const n=c.scrollbarShadow;n&&(i+=` + .monaco-scrollable-element > .shadow.top { + box-shadow: ${n} 0 6px 6px -6px inset; + } + + .monaco-scrollable-element > .shadow.left { + box-shadow: ${n} 6px 0 6px -6px inset; + } + + .monaco-scrollable-element > .shadow.top.left { + box-shadow: ${n} 6px 6px 6px -6px inset; + } + `);const s=c.scrollbarSliderBackground;s&&(i+=` + .monaco-scrollable-element > .scrollbar > .slider { + background: ${s}; + } + `);const l=c.scrollbarSliderHoverBackground;l&&(i+=` + .monaco-scrollable-element > .scrollbar > .slider:hover { + background: ${l}; + } + `);const d=c.scrollbarSliderActiveBackground;d&&(i+=` + .monaco-scrollable-element > .scrollbar > .slider.active { + background: ${d}; + } + `)}return i}class V0i{constructor(e,i,n,s){this.contextViewService=e,this.telemetryService=i,this.notificationService=n,this.keybindingService=s,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const i=e.getActions();if(!i.length)return;this.focusToReturn=A0();let n;const s=Sm(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:l=>{var d;this.lastContainer=l;const f=e.getMenuClassName?e.getMenuClassName():"";f&&(l.className+=" "+f),this.options.blockMouse&&(this.block=l.appendChild(Sr(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",(d=this.blockDisposable)===null||d===void 0||d.dispose(),this.blockDisposable=tn(this.block,yr.MOUSE_DOWN,x=>x.stopPropagation()));const g=new On,y=e.actionRunner||new b9;y.onWillRun(x=>this.onActionRun(x,!e.skipTelemetry),this,g),y.onDidRun(this.onDidActionRun,this,g),n=new WU(l,i,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:y,getKeyBinding:e.getKeyBinding?e.getKeyBinding:x=>this.keybindingService.lookupKeybinding(x.id)},R0i),n.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,g),n.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,g);const w=Io(l);return g.add(tn(w,yr.BLUR,()=>this.contextViewService.hideContextView(!0))),g.add(tn(w,yr.MOUSE_DOWN,x=>{if(x.defaultPrevented)return;const I=new sT(w,x);let P=I.target;if(!I.rightButton){for(;P;){if(P===l)return;P=P.parentElement}this.contextViewService.hideContextView(!0)}})),dT(g,n)},focus:()=>{n==null||n.focus(!!e.autoSelectFirstItem)},onHide:l=>{var d,f,g;(d=e.onHide)===null||d===void 0||d.call(e,!!l),this.block&&(this.block.remove(),this.block=null),(f=this.blockDisposable)===null||f===void 0||f.dispose(),this.blockDisposable=null,this.lastContainer&&(A0()===this.lastContainer||Wg(A0(),this.lastContainer))&&((g=this.focusToReturn)===null||g===void 0||g.focus()),this.lastContainer=null}},s,!!s)}onActionRun(e,i){i&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!pT(e.error)&&this.notificationService.error(e.error)}}var H0i=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},kz=function(c,e){return function(i,n){e(i,n,c)}};let vBe=class extends Ii{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new V0i(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,i,n,s,l,d){super(),this.telemetryService=e,this.notificationService=i,this.contextViewService=n,this.keybindingService=s,this.menuService=l,this.contextKeyService=d,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new ui),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new ui)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=yBe.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...e,onHide:i=>{var n;(n=e.onHide)===null||n===void 0||n.call(e,i),this._onDidHideContextMenu.fire()}}),b4.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};vBe=H0i([kz(0,R0),kz(1,L_),kz(2,n6),kz(3,ou),kz(4,Dw),kz(5,Zo)],vBe);var yBe;(function(c){function e(n){return n&&n.menuId instanceof _t}function i(n,s,l){if(!e(n))return n;const{menuId:d,menuActionOptions:f,contextKeyService:g}=n;return{...n,getActions:()=>{const y=[];if(d){const w=s.createMenu(d,g??l);F0i(w,f,y),w.dispose()}return n.getActions?Up.join(n.getActions(),y):y}}}c.transform=i})(yBe||(yBe={}));var Ive;(function(c){c[c.API=0]="API",c[c.USER=1]="USER"})(Ive||(Ive={}));var sze=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Nve=function(c,e){return function(i,n){e(i,n,c)}};let bBe=class{constructor(e){this._commandService=e}async open(e,i){if(!MHe(e,wa.command))return!1;if(!(i!=null&&i.allowCommands)||(typeof e=="string"&&(e=Oo.parse(e)),Array.isArray(i.allowCommands)&&!i.allowCommands.includes(e.path)))return!0;let n=[];try{n=Q9e(decodeURIComponent(e.query))}catch{try{n=Q9e(e.query)}catch{}}return Array.isArray(n)||(n=[n]),await this._commandService.executeCommand(e.path,...n),!0}};bBe=sze([Nve(0,ff)],bBe);let CBe=class{constructor(e){this._editorService=e}async open(e,i){typeof e=="string"&&(e=Oo.parse(e));const{selection:n,uri:s}=Dpi(e);return e=s,e.scheme===wa.file&&(e=Qfi(e)),await this._editorService.openCodeEditor({resource:e,options:{selection:n,source:i!=null&&i.fromUserGesture?Ive.USER:Ive.API,...i==null?void 0:i.editorOptions}},this._editorService.getFocusedCodeEditor(),i==null?void 0:i.openToSide),!0}};CBe=sze([Nve(0,Oc)],CBe);let SBe=class{constructor(e,i){this._openers=new yy,this._validators=new yy,this._resolvers=new yy,this._resolvedUriTargets=new E_(n=>n.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new yy,this._defaultExternalOpener={openExternal:async n=>(j5e(n,wa.http,wa.https)?TCt(n):ed.location.href=n,!0)},this._openers.push({open:async(n,s)=>s!=null&&s.openExternal||j5e(n,wa.mailto,wa.http,wa.https,wa.vsls)?(await this._doOpenExternal(n,s),!0):!1}),this._openers.push(new bBe(i)),this._openers.push(new CBe(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}async open(e,i){var n;const s=typeof e=="string"?Oo.parse(e):e,l=(n=this._resolvedUriTargets.get(s))!==null&&n!==void 0?n:e;for(const d of this._validators)if(!await d.shouldOpen(l,i))return!1;for(const d of this._openers)if(await d.open(e,i))return!0;return!1}async resolveExternalUri(e,i){for(const n of this._resolvers)try{const s=await n.resolveExternalUri(e,i);if(s)return this._resolvedUriTargets.has(s.resolved)||this._resolvedUriTargets.set(s.resolved,e),s}catch{}throw new Error("Could not resolve external URI: "+e.toString())}async _doOpenExternal(e,i){const n=typeof e=="string"?Oo.parse(e):e;let s;try{s=(await this.resolveExternalUri(n,i)).resolved}catch{s=n}let l;if(typeof e=="string"&&n.toString()===s.toString()?l=e:l=encodeURI(s.toString(!0)),i!=null&&i.allowContributedOpeners){const d=typeof(i==null?void 0:i.allowContributedOpeners)=="string"?i==null?void 0:i.allowContributedOpeners:void 0;for(const f of this._externalOpeners)if(await f.openExternal(l,{sourceUri:n,preferredOpenerId:d},Gl.None))return!0}return this._defaultExternalOpener.openExternal(l,{sourceUri:n},Gl.None)}dispose(){this._validators.clear()}};SBe=sze([Nve(0,Oc),Nve(1,ff)],SBe);const _k=Kl("editorWorkerService");var Ah;(function(c){c[c.Hint=1]="Hint",c[c.Info=2]="Info",c[c.Warning=4]="Warning",c[c.Error=8]="Error"})(Ah||(Ah={}));(function(c){function e(d,f){return f-d}c.compare=e;const i=Object.create(null);i[c.Error]=V("sev.error","Error"),i[c.Warning]=V("sev.warning","Warning"),i[c.Info]=V("sev.info","Info");function n(d){return i[d]||""}c.toString=n;function s(d){switch(d){case D_.Error:return c.Error;case D_.Warning:return c.Warning;case D_.Info:return c.Info;case D_.Ignore:return c.Hint}}c.fromSeverity=s;function l(d){switch(d){case c.Error:return D_.Error;case c.Warning:return D_.Warning;case c.Info:return D_.Info;case c.Hint:return D_.Ignore}}c.toSeverity=l})(Ah||(Ah={}));var Lve;(function(c){const e="";function i(s){return n(s,!0)}c.makeKey=i;function n(s,l){const d=[e];return s.source?d.push(s.source.replace("¦","\\¦")):d.push(e),s.code?typeof s.code=="string"?d.push(s.code.replace("¦","\\¦")):d.push(s.code.value.replace("¦","\\¦")):d.push(e),s.severity!==void 0&&s.severity!==null?d.push(Ah.toString(s.severity)):d.push(e),s.message&&l?d.push(s.message.replace("¦","\\¦")):d.push(e),s.startLineNumber!==void 0&&s.startLineNumber!==null?d.push(s.startLineNumber.toString()):d.push(e),s.startColumn!==void 0&&s.startColumn!==null?d.push(s.startColumn.toString()):d.push(e),s.endLineNumber!==void 0&&s.endLineNumber!==null?d.push(s.endLineNumber.toString()):d.push(e),s.endColumn!==void 0&&s.endColumn!==null?d.push(s.endColumn.toString()):d.push(e),d.push(e),d.join("¦")}c.makeKeyOptionalMessage=n})(Lve||(Lve={}));const EL=Kl("markerService");function j0i(c,e){const i=[],n=[];for(const s of c)e.has(s)||i.push(s);for(const s of e)c.has(s)||n.push(s);return{removed:i,added:n}}function z0i(c,e){const i=new Set;for(const n of e)c.has(n)&&i.add(n);return i}var U0i=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Tvt=function(c,e){return function(i,n){e(i,n,c)}};let wBe=class extends Ii{constructor(e,i){super(),this._markerService=i,this._onDidChangeMarker=this._register(new ui),this._markerDecorations=new E_,e.getModels().forEach(n=>this._onModelAdded(n)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,i){const n=this._markerDecorations.get(e);return n&&n.getMarker(i)||null}_handleMarkerChange(e){e.forEach(i=>{const n=this._markerDecorations.get(i);n&&this._updateDecorations(n)})}_onModelAdded(e){const i=new q0i(e);this._markerDecorations.set(e.uri,i),this._updateDecorations(i)}_onModelRemoved(e){var i;const n=this._markerDecorations.get(e.uri);n&&(n.dispose(),this._markerDecorations.delete(e.uri)),(e.uri.scheme===wa.inMemory||e.uri.scheme===wa.internal||e.uri.scheme===wa.vscode)&&((i=this._markerService)===null||i===void 0||i.read({resource:e.uri}).map(s=>s.owner).forEach(s=>this._markerService.remove(s,[e.uri])))}_updateDecorations(e){const i=this._markerService.read({resource:e.model.uri,take:500});e.update(i)&&this._onDidChangeMarker.fire(e.model)}};wBe=U0i([Tvt(0,Qf),Tvt(1,EL)],wBe);class q0i extends Ii{constructor(e){super(),this.model=e,this._map=new foi,this._register(go(()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()}))}update(e){const{added:i,removed:n}=j0i(new Set(this._map.keys()),new Set(e));if(i.length===0&&n.length===0)return!1;const s=n.map(f=>this._map.get(f)),l=i.map(f=>({range:this._createDecorationRange(this.model,f),options:this._createDecorationOption(f)})),d=this.model.deltaDecorations(s,l);for(const f of n)this._map.delete(f);for(let f=0;f=s)return n;const l=e.getWordAtPosition(n.getStartPosition());l&&(n=new at(n.startLineNumber,l.startColumn,n.endLineNumber,l.endColumn))}else if(i.endColumn===Number.MAX_VALUE&&i.startColumn===1&&n.startLineNumber===n.endLineNumber){const s=e.getLineFirstNonWhitespaceColumn(i.startLineNumber);s=0:!1}}var $0i=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},oee=function(c,e){return function(i,n){e(i,n,c)}},Fz;function b5(c){return c.toString()}class J0i{constructor(e,i,n){this.model=e,this._modelEventListeners=new On,this.model=e,this._modelEventListeners.add(e.onWillDispose(()=>i(e))),this._modelEventListeners.add(e.onDidChangeLanguage(s=>n(e,s)))}dispose(){this._modelEventListeners.dispose()}}const G0i=Ty||Wl?1:2;class K0i{constructor(e,i,n,s,l,d,f,g){this.uri=e,this.initialUndoRedoSnapshot=i,this.time=n,this.sharesUndoRedoStack=s,this.heapSize=l,this.sha1=d,this.versionId=f,this.alternativeVersionId=g}}let Pve=Fz=class extends Ii{constructor(e,i,n,s,l){super(),this._configurationService=e,this._resourcePropertiesService=i,this._undoRedoService=n,this._languageService=s,this._languageConfigurationService=l,this._onModelAdded=this._register(new ui),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new ui),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new ui),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration(d=>this._updateModelOptions(d))),this._updateModelOptions(void 0)}static _readModelOptions(e,i){var n;let s=mv.tabSize;if(e.editor&&typeof e.editor.tabSize<"u"){const P=parseInt(e.editor.tabSize,10);isNaN(P)||(s=P),s<1&&(s=1)}let l="tabSize";if(e.editor&&typeof e.editor.indentSize<"u"&&e.editor.indentSize!=="tabSize"){const P=parseInt(e.editor.indentSize,10);isNaN(P)||(l=Math.max(P,1))}let d=mv.insertSpaces;e.editor&&typeof e.editor.insertSpaces<"u"&&(d=e.editor.insertSpaces==="false"?!1:!!e.editor.insertSpaces);let f=G0i;const g=e.eol;g===`\r +`?f=2:g===` +`&&(f=1);let y=mv.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace<"u"&&(y=e.editor.trimAutoWhitespace==="false"?!1:!!e.editor.trimAutoWhitespace);let w=mv.detectIndentation;e.editor&&typeof e.editor.detectIndentation<"u"&&(w=e.editor.detectIndentation==="false"?!1:!!e.editor.detectIndentation);let x=mv.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations<"u"&&(x=e.editor.largeFileOptimizations==="false"?!1:!!e.editor.largeFileOptimizations);let I=mv.bracketPairColorizationOptions;return!((n=e.editor)===null||n===void 0)&&n.bracketPairColorization&&typeof e.editor.bracketPairColorization=="object"&&(I={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:i,tabSize:s,indentSize:l,insertSpaces:d,detectIndentation:w,defaultEOL:f,trimAutoWhitespace:y,largeFileOptimizations:x,bracketPairColorizationOptions:I}}_getEOL(e,i){if(e)return this._resourcePropertiesService.getEOL(e,i);const n=this._configurationService.getValue("files.eol",{overrideIdentifier:i});return n&&typeof n=="string"&&n!=="auto"?n:FC===3||FC===2?` +`:`\r +`}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,i,n){const s=typeof e=="string"?e:e.languageId;let l=this._modelCreationOptionsByLanguageAndResource[s+i];if(!l){const d=this._configurationService.getValue("editor",{overrideIdentifier:s,resource:i}),f=this._getEOL(i,s);l=Fz._readModelOptions({editor:d,eol:f},n),this._modelCreationOptionsByLanguageAndResource[s+i]=l}return l}_updateModelOptions(e){const i=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const n=Object.keys(this._models);for(let s=0,l=n.length;se){const i=[];for(this._disposedModels.forEach(n=>{n.sharesUndoRedoStack||i.push(n)}),i.sort((n,s)=>n.time-s.time);i.length>0&&this._disposedModelsHeapSize>e;){const n=i.shift();this._removeDisposedModel(n.uri),n.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(n.initialUndoRedoSnapshot)}}}_createModelData(e,i,n,s){const l=this.getCreationOptions(i,n,s),d=new pL(e,i,l,n,this._undoRedoService,this._languageService,this._languageConfigurationService);if(n&&this._disposedModels.has(b5(n))){const y=this._removeDisposedModel(n),w=this._undoRedoService.getElements(n),x=this._getSHA1Computer(),I=x.canComputeSHA1(d)?x.computeSHA1(d)===y.sha1:!1;if(I||y.sharesUndoRedoStack){for(const P of w.past)l4(P)&&P.matchesResource(n)&&P.setModel(d);for(const P of w.future)l4(P)&&P.matchesResource(n)&&P.setModel(d);this._undoRedoService.setElementsValidFlag(n,!0,P=>l4(P)&&P.matchesResource(n)),I&&(d._overwriteVersionId(y.versionId),d._overwriteAlternativeVersionId(y.alternativeVersionId),d._overwriteInitialUndoRedoSnapshot(y.initialUndoRedoSnapshot))}else y.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(y.initialUndoRedoSnapshot)}const f=b5(d.uri);if(this._models[f])throw new Error("ModelService: Cannot add model because it already exists!");const g=new J0i(d,y=>this._onWillDispose(y),(y,w)=>this._onDidChangeLanguage(y,w));return this._models[f]=g,g}createModel(e,i,n,s=!1){let l;return i?l=this._createModelData(e,i,n,s):l=this._createModelData(e,yw,n,s),this._onModelAdded.fire(l.model),l.model}getModels(){const e=[],i=Object.keys(this._models);for(let n=0,s=i.length;n0||y.future.length>0){for(const w of y.past)l4(w)&&w.matchesResource(e.uri)&&(l=!0,d+=w.heapSize(e.uri),w.setModel(e.uri));for(const w of y.future)l4(w)&&w.matchesResource(e.uri)&&(l=!0,d+=w.heapSize(e.uri),w.setModel(e.uri))}}const f=Fz.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,g=this._getSHA1Computer();if(l)if(!s&&(d>f||!g.canComputeSHA1(e))){const y=n.model.getInitialUndoRedoSnapshot();y!==null&&this._undoRedoService.restoreSnapshot(y)}else this._ensureDisposedModelsHeapSize(f-d),this._undoRedoService.setElementsValidFlag(e.uri,!1,y=>l4(y)&&y.matchesResource(e.uri)),this._insertDisposedModel(new K0i(e.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),s,d,g.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!s){const y=n.model.getInitialUndoRedoSnapshot();y!==null&&this._undoRedoService.restoreSnapshot(y)}delete this._models[i],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,i){const n=i.oldLanguage,s=e.getLanguageId(),l=this.getCreationOptions(n,e.uri,e.isForSimpleWidget),d=this.getCreationOptions(s,e.uri,e.isForSimpleWidget);Fz._setModelOptionsForModel(e,d,l),this._onModelModeChanged.fire({model:e,oldLanguageId:n})}_getSHA1Computer(){return new Rye}};Pve.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024;Pve=Fz=$0i([oee(0,El),oee(1,oSt),oee(2,mye),oee(3,If),oee(4,Kd)],Pve);class Rye{canComputeSHA1(e){return e.getValueLength()<=Rye.MAX_MODEL_SIZE}computeSHA1(e){const i=new B1e,n=e.createSnapshot();let s;for(;s=n.read();)i.update(s);return i.digest()}}Rye.MAX_MODEL_SIZE=10*1024*1024;var xBe;(function(c){c[c.PRESERVE=0]="PRESERVE",c[c.LAST=1]="LAST"})(xBe||(xBe={}));const rB={Quickaccess:"workbench.contributions.quickaccess"};class Q0i{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return e.prefix.length===0?this.defaultProvider=e:this.providers.push(e),this.providers.sort((i,n)=>n.prefix.length-i.prefix.length),go(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return kE([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(n=>e.startsWith(n.prefix))||void 0||this.defaultProvider}}dh.add(rB.Quickaccess,new Q0i);const X0i={ctrlCmd:!1,alt:!1};var mq;(function(c){c[c.Blur=1]="Blur",c[c.Gesture=2]="Gesture",c[c.Other=3]="Other"})(mq||(mq={}));var nE;(function(c){c[c.NONE=0]="NONE",c[c.FIRST=1]="FIRST",c[c.SECOND=2]="SECOND",c[c.LAST=3]="LAST"})(nE||(nE={}));var lf;(function(c){c[c.First=1]="First",c[c.Second=2]="Second",c[c.Last=3]="Last",c[c.Next=4]="Next",c[c.Previous=5]="Previous",c[c.NextPage=6]="NextPage",c[c.PreviousPage=7]="PreviousPage",c[c.NextSeparator=8]="NextSeparator",c[c.PreviousSeparator=9]="PreviousSeparator"})(lf||(lf={}));const pk=Kl("quickInputService");var Z0i=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Dvt=function(c,e){return function(i,n){e(i,n,c)}};let kBe=class extends Ii{constructor(e,i){super(),this.quickInputService=e,this.instantiationService=i,this.registry=dh.as(rB.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",i){this.doShowOrPick(e,!1,i)}doShowOrPick(e,i,n){var s,l,d,f;const[g,y]=this.getOrInstantiateProvider(e,n==null?void 0:n.enabledProviderPrefixes),w=this.visibleQuickAccess,x=w==null?void 0:w.descriptor;if(w&&y&&x===y){e!==y.prefix&&!(n!=null&&n.preserveValue)&&(w.picker.value=e),this.adjustValueSelection(w.picker,y,n);return}if(y&&!(n!=null&&n.preserveValue)){let ee;if(w&&x&&x!==y){const he=w.value.substr(x.prefix.length);he&&(ee=`${y.prefix}${he}`)}if(!ee){const he=g==null?void 0:g.defaultFilterValue;he===xBe.LAST?ee=this.lastAcceptedPickerValues.get(y):typeof he=="string"&&(ee=`${y.prefix}${he}`)}typeof ee=="string"&&(e=ee)}const I=(s=w==null?void 0:w.picker)===null||s===void 0?void 0:s.valueSelection,P=(l=w==null?void 0:w.picker)===null||l===void 0?void 0:l.value,O=new On,W=O.add(this.quickInputService.createQuickPick());W.value=e,this.adjustValueSelection(W,y,n),W.placeholder=(d=n==null?void 0:n.placeholder)!==null&&d!==void 0?d:y==null?void 0:y.placeholder,W.quickNavigate=n==null?void 0:n.quickNavigateConfiguration,W.hideInput=!!W.quickNavigate&&!w,(typeof(n==null?void 0:n.itemActivation)=="number"||n!=null&&n.quickNavigateConfiguration)&&(W.itemActivation=(f=n==null?void 0:n.itemActivation)!==null&&f!==void 0?f:nE.SECOND),W.contextKey=y==null?void 0:y.contextKey,W.filterValue=ee=>ee.substring(y?y.prefix.length:0);let X;i&&(X=new bne,O.add(Mr.once(W.onWillAccept)(ee=>{ee.veto(),W.hide()}))),O.add(this.registerPickerListeners(W,g,y,e,n));const Z=O.add(new uh);if(g&&O.add(g.provide(W,Z.token,n==null?void 0:n.providerOptions)),Mr.once(W.onDidHide)(()=>{W.selectedItems.length===0&&Z.cancel(),O.dispose(),X==null||X.complete(W.selectedItems.slice(0))}),W.show(),I&&P===e&&(W.valueSelection=I),i)return X==null?void 0:X.p}adjustValueSelection(e,i,n){var s;let l;n!=null&&n.preserveValue?l=[e.value.length,e.value.length]:l=[(s=i==null?void 0:i.prefix.length)!==null&&s!==void 0?s:0,e.value.length],e.valueSelection=l}registerPickerListeners(e,i,n,s,l){const d=new On,f=this.visibleQuickAccess={picker:e,descriptor:n,value:s};return d.add(go(()=>{f===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),d.add(e.onDidChangeValue(g=>{const[y]=this.getOrInstantiateProvider(g,l==null?void 0:l.enabledProviderPrefixes);y!==i?this.show(g,{enabledProviderPrefixes:l==null?void 0:l.enabledProviderPrefixes,preserveValue:!0,providerOptions:l==null?void 0:l.providerOptions}):f.value=g})),n&&d.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(n,e.value)})),d}getOrInstantiateProvider(e,i){const n=this.registry.getQuickAccessProvider(e);if(!n||i&&!(i!=null&&i.includes(n.prefix)))return[void 0,void 0];let s=this.mapProviderToDescriptor.get(n);return s||(s=this.instantiationService.createInstance(n.ctor),this.mapProviderToDescriptor.set(n,s)),[s,n]}};kBe=Z0i([Dvt(0,pk),Dvt(1,So)],kBe);class Jq extends Ew{constructor(e){var i;super(),this._onChange=this._register(new ui),this.onChange=this._onChange.event,this._onKeyDown=this._register(new ui),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;const n=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,n.push(...Uo.asClassNameArray(this._icon))),this._opts.actionClassName&&n.push(...this._opts.actionClassName.split(" ")),this._checked&&n.push("checked"),this.domNode=document.createElement("div"),this._hover=this._register(HE().setupUpdatableHover((i=e.hoverDelegate)!==null&&i!==void 0?i:Py("mouse"),this.domNode,this._opts.title)),this.domNode.classList.add(...n),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,s=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),s.preventDefault())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,s=>{if(s.keyCode===10||s.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),s.preventDefault(),s.stopPropagation();return}this._onKeyDown.fire(s)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}var Y0i=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};class kxt{constructor(e){this.nodes=e}toString(){return this.nodes.map(e=>typeof e=="string"?e:e.label).join("")}}Y0i([N_],kxt.prototype,"toString",null);const evi=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi;function tvi(c){const e=[];let i=0,n;for(;n=evi.exec(c);){n.index-i>0&&e.push(c.substring(i,n.index));const[,s,l,,d]=n;d?e.push({label:s,href:l,title:d}):e.push({label:s,href:l}),i=n.index+n[0].length}return i{gri(P)&&nc.stop(P,!0),i.callback(l.href)},y=i.disposables.add(new Yl(f,yr.CLICK)).event,w=i.disposables.add(new Yl(f,yr.KEY_DOWN)).event,x=Mr.chain(w,P=>P.filter(O=>{const W=new Fd(O);return W.equals(10)||W.equals(3)}));i.disposables.add(Jd.addTarget(f));const I=i.disposables.add(new Yl(f,Gd.Tap)).event;Mr.any(y,I,x)(g,null,i.disposables),e.appendChild(f)}}var svi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Evt=function(c,e){return function(i,n){e(i,n,c)}};const Txt="inQuickInput",ovi=new Xr(Txt,!1,V("inQuickInput","Whether keyboard focus is inside the quick input control")),avi=xn.has(Txt),Dxt="quickInputType",lvi=new Xr(Dxt,void 0,V("quickInputType","The type of the currently visible quick input")),Ext="cursorAtEndOfQuickInputBox",cvi=new Xr(Ext,!1,V("cursorAtEndOfQuickInputBox","Whether the cursor in the quick input is at the end of the input box")),uvi=xn.has(Ext),TBe={iconClass:Uo.asClassName(Dr.quickInputBack),tooltip:V("quickInput.back","Back"),handle:-1};class zne extends Ii{constructor(e){super(),this.ui=e,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=zne.noPromptMessage,this._severity=D_.Ignore,this.onDidTriggerButtonEmitter=this._register(new ui),this.onDidHideEmitter=this._register(new ui),this.onWillHideEmitter=this._register(new ui),this.onDisposeEmitter=this._register(new ui),this.visibleDisposables=this._register(new On),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const i=this._ignoreFocusOut!==e&&!TE;this._ignoreFocusOut=e&&!TE,i&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=e??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=mq.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}willHide(e=mq.Other){this.onWillHideEmitter.fire({reason:e})}update(){var e,i;if(!this.visible)return;const n=this.getTitle();n&&this.ui.title.textContent!==n?this.ui.title.textContent=n:!n&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText=" ");const s=this.getDescription();if(this.ui.description1.textContent!==s&&(this.ui.description1.textContent=s),this.ui.description2.textContent!==s&&(this.ui.description2.textContent=s),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?r0(this.ui.widget,this._widget):r0(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new gT,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const d=this.buttons.filter(g=>g===TBe).map((g,y)=>Ave(g,`id-${y}`,async()=>this.onDidTriggerButtonEmitter.fire(g)));this.ui.leftActionBar.push(d,{icon:!0,label:!1}),this.ui.rightActionBar.clear();const f=this.buttons.filter(g=>g!==TBe).map((g,y)=>Ave(g,`id-${y}`,async()=>this.onDidTriggerButtonEmitter.fire(g)));this.ui.rightActionBar.push(f,{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const d=(i=(e=this.toggles)===null||e===void 0?void 0:e.filter(f=>f instanceof Jq))!==null&&i!==void 0?i:[];this.ui.inputBox.toggles=d}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const l=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==l&&(this._lastValidationMessage=l,r0(this.ui.message),rvi(l,this.ui.message,{callback:d=>{this.ui.linkOpenerDelegate(d)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?V("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==D_.Ignore){const i=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=i.foreground?`${i.foreground}`:"",this.ui.message.style.backgroundColor=i.background?`${i.background}`:"",this.ui.message.style.border=i.border?`1px solid ${i.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}zne.noPromptMessage=V("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class Sie extends zne{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new ui),this.onWillAcceptEmitter=this._register(new ui),this.onDidAcceptEmitter=this._register(new ui),this.onDidCustomEmitter=this._register(new ui),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._keepScrollPosition=!1,this._itemActivation=nE.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new ui),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new ui),this.onDidTriggerItemButtonEmitter=this._register(new ui),this.onDidTriggerSeparatorButtonEmitter=this._register(new ui),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this._focusEventBufferer=new O1e,this.type="quickPick",this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,i){this._value!==e&&(this._value=e,i||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?X0i:this.ui.keyMods}get valueSelection(){const e=this.ui.inputBox.getSelection();if(e)return[e.start,e.end]}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.canSelectMany||this.ui.list.focus(lf.First)}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{this.doSetValue(e,!0)})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this._focusEventBufferer.wrapEvent(this.ui.list.onDidChangeFocus,(e,i)=>i)(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&ch(e,this._activeItems,(i,n)=>i===n)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:i})=>{if(this.canSelectMany){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&ch(e,this._selectedItems,(n,s)=>n===s)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(WHe(i)&&i.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&ch(e,this._selectedItems,(i,n)=>i===n)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered(e=>this.onDidTriggerSeparatorButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let i=!1;this.onWillAcceptEmitter.fire({veto:()=>i=!0}),i||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return tn(this.ui.container,yr.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const i=new Fd(e),n=i.keyCode;this._quickNavigate.keybindings.some(d=>{const f=d.getChords();return f.length>1?!1:f[0].shiftKey&&n===4?!(i.ctrlKey||i.altKey||i.metaKey):!!(f[0].altKey&&n===6||f[0].ctrlKey&&n===5||f[0].metaKey&&n===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,i=!!this.description,n={title:!!this.title||!!this.step||!!this.buttons.length,description:i,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||i,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(n),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let s=this.ariaLabel;!s&&n.inputBox&&(s=this.placeholder||Sie.DEFAULT_ARIA_LABEL,this.title&&(s+=` - ${this.title}`)),this.ui.list.ariaLabel!==s&&(this.ui.list.ariaLabel=s??null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated&&(this.itemsUpdated=!1,this._focusEventBufferer.bufferEvents(()=>{switch(this.ui.list.setElements(this.items),this.ui.list.shouldLoop=!this.canSelectMany,this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case nE.NONE:this._itemActivation=nE.FIRST;break;case nE.SECOND:this.ui.list.focus(lf.Second),this._itemActivation=nE.FIRST;break;case nE.LAST:this.ui.list.focus(lf.Last),this._itemActivation=nE.FIRST;break;default:this.trySelectFirst();break}})),this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",n.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(lf.First)),this.keepScrollPosition&&(this.scrollTop=e)}focus(e){this.ui.list.focus(e),this.canSelectMany&&this.ui.list.domFocus()}accept(e){e&&!this._canAcceptInBackground||this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(e??!1))}}Sie.DEFAULT_ARIA_LABEL=V("quickInputBox.ariaLabel","Type to narrow down results.");let dvi=class extends zne{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new ui),this.onDidAcceptEmitter=this._register(new ui),this.type="inputBox",this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const e={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}},DBe=class extends uq{constructor(e,i){super("element",!1,n=>this.getOverrideOptions(n),e,i)}getOverrideOptions(e){var i;const n=(Sm(e.content)?(i=e.content.textContent)!==null&&i!==void 0?i:"":typeof e.content=="string"?e.content:e.content.value).includes(` +`);return{persistence:{hideOnKeyDown:!1},appearance:{showHoverHint:n,skipFadeInAnimation:!0}}}};DBe=svi([Evt(0,El),Evt(1,DL)],DBe);Qi.white.toString(),Qi.white.toString();class Ove extends Ii{get onDidClick(){return this._onDidClick.event}constructor(e,i){super(),this._label="",this._onDidClick=this._register(new ui),this._onDidEscape=this._register(new ui),this.options=i,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!i.secondary);const n=i.secondary?i.buttonSecondaryBackground:i.buttonBackground,s=i.secondary?i.buttonSecondaryForeground:i.buttonForeground;this._element.style.color=s||"",this._element.style.backgroundColor=n||"",i.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),typeof i.title=="string"&&this.setTitle(i.title),typeof i.ariaLabel=="string"&&this._element.setAttribute("aria-label",i.ariaLabel),e.appendChild(this._element),this._register(Jd.addTarget(this._element)),[yr.CLICK,Gd.Tap].forEach(l=>{this._register(tn(this._element,l,d=>{if(!this.enabled){nc.stop(d);return}this._onDidClick.fire(d)}))}),this._register(tn(this._element,yr.KEY_DOWN,l=>{const d=new Fd(l);let f=!1;this.enabled&&(d.equals(3)||d.equals(10))?(this._onDidClick.fire(l),f=!0):d.equals(9)&&(this._onDidEscape.fire(l),this._element.blur(),f=!0),f&&nc.stop(d,!0)})),this._register(tn(this._element,yr.MOUSE_OVER,l=>{this._element.classList.contains("disabled")||this.updateBackground(!0)})),this._register(tn(this._element,yr.MOUSE_OUT,l=>{this.updateBackground(!1)})),this.focusTracker=this._register(IE(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateBackground(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateBackground(!1)}))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){const i=[];for(let n of jM(e))if(typeof n=="string"){if(n=n.trim(),n==="")continue;const s=document.createElement("span");s.textContent=n,i.push(s)}else i.push(n);return i}updateBackground(e){let i;this.options.secondary?i=e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:i=e?this.options.buttonHoverBackground:this.options.buttonBackground,i&&(this._element.style.backgroundColor=i)}get element(){return this._element}set label(e){var i;if(this._label===e||xE(this._label)&&xE(e)&&sgi(this._label,e))return;this._element.classList.add("monaco-text-button");const n=this.options.supportShortLabel?this._labelElement:this._element;if(xE(e)){const l=wye(e,{inline:!0});l.dispose();const d=(i=l.element.querySelector("p"))===null||i===void 0?void 0:i.innerHTML;if(d){const f=dCt(d,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});n.innerHTML=f}else r0(n)}else this.options.supportIcons?r0(n,...this.getContentElements(e)):n.textContent=e;let s="";typeof this.options.title=="string"?s=this.options.title:this.options.title&&(s=_gi(e)),this.setTitle(s),typeof this.options.ariaLabel=="string"?this._element.setAttribute("aria-label",this.options.ariaLabel):this.options.ariaLabel&&this._element.setAttribute("aria-label",s),this._label=e}get label(){return this._label}set icon(e){this._element.classList.add(...Uo.asClassNameArray(e))}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}setTitle(e){var i;!this._hover&&e!==""?this._hover=this._register(HE().setupUpdatableHover((i=this.options.hoverDelegate)!==null&&i!==void 0?i:Py("mouse"),this._element,e)):this._hover&&this._hover.update(e)}}class EBe{constructor(e,i,n){this.options=i,this.styles=n,this.count=0,this.element=zn(e,Sr(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){var e,i;this.element.textContent=p9(this.countFormat,this.count),this.element.title=p9(this.titleFormat,this.count),this.element.style.backgroundColor=(e=this.styles.badgeBackground)!==null&&e!==void 0?e:"",this.element.style.color=(i=this.styles.badgeForeground)!==null&&i!==void 0?i:"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}const Ivt="done",Nvt="active",W7e="infinite",V7e="infinite-long-running",Lvt="discrete";class Fye extends Ii{constructor(e,i){super(),this.progressSignal=this._register(new jg),this.workedVal=0,this.showDelayedScheduler=this._register(new id(()=>RC(this.element),0)),this.longRunningScheduler=this._register(new id(()=>this.infiniteLongRunning(),Fye.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,i)}create(e,i){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=(i==null?void 0:i.progressBarBackground)||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(Nvt,W7e,V7e,Lvt),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel(),this.progressSignal.clear()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(Ivt),this.element.classList.contains(W7e)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(Lvt,Ivt,V7e),this.element.classList.add(Nvt,W7e),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(V7e)}getContainer(){return this.element}}Fye.LONG_RUNNING_INFINITE_THRESHOLD=1e4;const fvi=V("caseDescription","Match Case"),hvi=V("wordsDescription","Match Whole Word"),_vi=V("regexDescription","Use Regular Expression");class Ixt extends Jq{constructor(e){var i;super({icon:Dr.caseSensitive,title:fvi+e.appendTitle,isChecked:e.isChecked,hoverDelegate:(i=e.hoverDelegate)!==null&&i!==void 0?i:Py("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class Nxt extends Jq{constructor(e){var i;super({icon:Dr.wholeWord,title:hvi+e.appendTitle,isChecked:e.isChecked,hoverDelegate:(i=e.hoverDelegate)!==null&&i!==void 0?i:Py("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class Lxt extends Jq{constructor(e){var i;super({icon:Dr.regex,title:_vi+e.appendTitle,isChecked:e.isChecked,hoverDelegate:(i=e.hoverDelegate)!==null&&i!==void 0?i:Py("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class pvi{constructor(e,i=0,n=e.length,s=i-1){this.items=e,this.start=i,this.end=n,this.index=s}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class gvi{constructor(e=[],i=10){this._initialize(e),this._limit=i,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new pvi(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const i of e)this._history.add(i)}get _elements(){const e=[];return this._history.forEach(i=>e.push(i)),e}}const aee=Sr;class mvi extends Ew{constructor(e,i,n){var s;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new ui),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new ui),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=i,this.options=n,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(s=this.options.tooltip)!==null&&s!==void 0?s:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=zn(e,aee(".monaco-inputbox.idle"));const l=this.options.flexibleHeight?"textarea":"input",d=zn(this.element,aee(".ibwrapper"));if(this.input=zn(d,aee(l+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=zn(d,aee("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new LSt(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),zn(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(y=>this.input.scrollTop=y.scrollTop));const f=this._register(new Yl(e.ownerDocument,"selectionchange")),g=Mr.filter(f.event,()=>{const y=e.ownerDocument.getSelection();return(y==null?void 0:y.anchorNode)===d});this._register(g(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this._register(this.ignoreGesture(this.input)),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new uk(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.hover?this.hover.update(e):this.hover=this._register(HE().setupUpdatableHover(Py("mouse"),this.input,e))}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:y4(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return H1e(this.input)}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}getSelection(){var e;const i=this.input.selectionStart;if(i===null)return null;const n=(e=this.input.selectionEnd)!==null&&e!==void 0?e:i;return{start:i,end:n}}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const e=this.cachedContentHeight,i=this.cachedHeight,n=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:i}),this.scrollableElement.setScrollPosition({scrollTop:n})}showMessage(e,i){if(this.state==="open"&&vw(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const n=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${R4(n.border,"transparent")}`,this.message.content&&(this.hasFocus()||i)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e==null?void 0:e.type}stylesForType(e){const i=this.options.inputBoxStyles;switch(e){case 1:return{border:i.inputValidationInfoBorder,background:i.inputValidationInfoBackground,foreground:i.inputValidationInfoForeground};case 2:return{border:i.inputValidationWarningBorder,background:i.inputValidationWarningBackground,foreground:i.inputValidationWarningForeground};default:return{border:i.inputValidationErrorBorder,background:i.inputValidationErrorBackground,foreground:i.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e;const i=()=>e.style.width=OC(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:s=>{var l,d;if(!this.message)return null;e=zn(s,aee(".monaco-inputbox-container")),i();const f={inline:!0,className:"monaco-inputbox-message"},g=this.message.formatContent?Ipi(this.message.content,f):Epi(this.message.content,f);g.classList.add(this.classForType(this.message.type));const y=this.stylesForType(this.message.type);return g.style.backgroundColor=(l=y.background)!==null&&l!==void 0?l:"",g.style.color=(d=y.foreground)!==null&&d!==void 0?d:"",g.style.border=y.border?`1px solid ${y.border}`:"",zn(e,g),null},onHide:()=>{this.state="closed"},layout:i});let n;this.message.type===3?n=V("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?n=V("alertWarningMessage","Warning: {0}",this.message.content):n=V("alertInfoMessage","Info: {0}",this.message.content),Eb(n),this.state="open"}_hideMessage(){this.contextViewProvider&&(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,n=e.charCodeAt(e.length-1)===10?" ":"";(e+n).replace(/\u000c/g,"")?this.mirror.textContent=e+n:this.mirror.innerText=" ",this.layout()}applyStyles(){var e,i,n;const s=this.options.inputBoxStyles,l=(e=s.inputBackground)!==null&&e!==void 0?e:"",d=(i=s.inputForeground)!==null&&i!==void 0?i:"",f=(n=s.inputBorder)!==null&&n!==void 0?n:"";this.element.style.backgroundColor=l,this.element.style.color=d,this.input.style.backgroundColor="inherit",this.input.style.color=d,this.element.style.border=`1px solid ${R4(f,"transparent")}`}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=y4(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const i=this.inputElement,n=i.selectionStart,s=i.selectionEnd,l=i.value;n!==null&&s!==null&&(this.value=l.substr(0,n)+e+l.substr(s),i.setSelectionRange(n+1,n+1),this.layout())}dispose(){var e;this._hideMessage(),this.message=null,(e=this.actionbar)===null||e===void 0||e.dispose(),super.dispose()}}class Pxt extends mvi{constructor(e,i,n){const s=V({key:"history.inputbox.hint.suffix.noparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field ends in a closing parenthesis ")", for example "Filter (e.g. text, !exclude)". The character inserted into the final string is ⇅ to represent the up and down arrow keys.']}," or {0} for history","⇅"),l=V({key:"history.inputbox.hint.suffix.inparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field does NOT end in a closing parenthesis (eg. "Find"). The character inserted into the final string is ⇅ to represent the up and down arrow keys.']}," ({0} for history)","⇅");super(e,i,n),this._onDidFocus=this._register(new ui),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new ui),this.onDidBlur=this._onDidBlur.event,this.history=new gvi(n.history,100);const d=()=>{if(n.showHistoryHint&&n.showHistoryHint()&&!this.placeholder.endsWith(s)&&!this.placeholder.endsWith(l)&&this.history.getHistory().length){const f=this.placeholder.endsWith(")")?s:l,g=this.placeholder+f;n.showPlaceholderOnFocus&&!H1e(this.input)?this.placeholder=g:this.setPlaceHolder(g)}};this.observer=new MutationObserver((f,g)=>{f.forEach(y=>{y.target.textContent||d()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>d()),this.onblur(this.input,()=>{const f=g=>{if(this.placeholder.endsWith(g)){const y=this.placeholder.slice(0,this.placeholder.length-g.length);return n.showPlaceholderOnFocus?this.placeholder=y:this.setPlaceHolder(y),!0}else return!1};f(l)||f(s)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=e??"",hL(this.value?this.value:V("clearedInput","Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,hL(this.value))}setPlaceHolder(e){super.setPlaceHolder(e),this.setTooltip(e)}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}const vvi=V("defaultLabel","input");class Axt extends Ew{constructor(e,i,n){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new jg),this.additionalToggles=[],this._onDidOptionChange=this._register(new ui),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new ui),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new ui),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new ui),this._onKeyUp=this._register(new ui),this._onCaseSensitiveKeyDown=this._register(new ui),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new ui),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||vvi,this.showCommonFindToggles=!!n.showCommonFindToggles;const s=n.appendCaseSensitiveLabel||"",l=n.appendWholeWordsLabel||"",d=n.appendRegexLabel||"",f=n.history||[],g=!!n.flexibleHeight,y=!!n.flexibleWidth,w=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new Pxt(this.domNode,i,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:f,showHistoryHint:n.showHistoryHint,flexibleHeight:g,flexibleWidth:y,flexibleMaxHeight:w,inputBoxStyles:n.inputBoxStyles}));const x=this._register(pq());if(this.showCommonFindToggles){this.regex=this._register(new Lxt({appendTitle:d,isChecked:!1,hoverDelegate:x,...n.toggleStyles})),this._register(this.regex.onChange(P=>{this._onDidOptionChange.fire(P),!P&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(P=>{this._onRegexKeyDown.fire(P)})),this.wholeWords=this._register(new Nxt({appendTitle:l,isChecked:!1,hoverDelegate:x,...n.toggleStyles})),this._register(this.wholeWords.onChange(P=>{this._onDidOptionChange.fire(P),!P&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new Ixt({appendTitle:s,isChecked:!1,hoverDelegate:x,...n.toggleStyles})),this._register(this.caseSensitive.onChange(P=>{this._onDidOptionChange.fire(P),!P&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(P=>{this._onCaseSensitiveKeyDown.fire(P)}));const I=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,P=>{if(P.equals(15)||P.equals(17)||P.equals(9)){const O=I.indexOf(this.domNode.ownerDocument.activeElement);if(O>=0){let W=-1;P.equals(17)?W=(O+1)%I.length:P.equals(15)&&(O===0?W=I.length-1:W=O-1),P.equals(9)?(I[O].blur(),this.inputBox.focus()):W>=0&&I[W].focus(),nc.stop(P,!0)}}})}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(n==null?void 0:n.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),e==null||e.appendChild(this.domNode),this._register(tn(this.inputBox.inputElement,"compositionstart",I=>{this.imeSessionInProgress=!0})),this._register(tn(this.inputBox.inputElement,"compositionend",I=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,I=>this._onKeyDown.fire(I)),this.onkeyup(this.inputBox.inputElement,I=>this._onKeyUp.fire(I)),this.oninput(this.inputBox.inputElement,I=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,I=>this._onMouseDown.fire(I))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){var e,i,n;this.domNode.classList.remove("disabled"),this.inputBox.enable(),(e=this.regex)===null||e===void 0||e.enable(),(i=this.wholeWords)===null||i===void 0||i.enable(),(n=this.caseSensitive)===null||n===void 0||n.enable();for(const s of this.additionalToggles)s.enable()}disable(){var e,i,n;this.domNode.classList.add("disabled"),this.inputBox.disable(),(e=this.regex)===null||e===void 0||e.disable(),(i=this.wholeWords)===null||i===void 0||i.disable(),(n=this.caseSensitive)===null||n===void 0||n.disable();for(const s of this.additionalToggles)s.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(const i of this.additionalToggles)i.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new On;for(const i of e??[])this.additionalTogglesDisposables.value.add(i),this.controls.appendChild(i.domNode),this.additionalTogglesDisposables.value.add(i.onChange(n=>{this._onDidOptionChange.fire(n),!n&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(i);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){var i,n,s,l,d,f;e?this.inputBox.paddingRight=0:this.inputBox.paddingRight=((n=(i=this.caseSensitive)===null||i===void 0?void 0:i.width())!==null&&n!==void 0?n:0)+((l=(s=this.wholeWords)===null||s===void 0?void 0:s.width())!==null&&l!==void 0?l:0)+((f=(d=this.regex)===null||d===void 0?void 0:d.width())!==null&&f!==void 0?f:0)+this.additionalToggles.reduce((g,y)=>g+y.width(),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){var e,i;return(i=(e=this.caseSensitive)===null||e===void 0?void 0:e.checked)!==null&&i!==void 0?i:!1}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){var e,i;return(i=(e=this.wholeWords)===null||e===void 0?void 0:e.checked)!==null&&i!==void 0?i:!1}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){var e,i;return(i=(e=this.regex)===null||e===void 0?void 0:e.checked)!==null&&i!==void 0?i:!1}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){var e;(e=this.caseSensitive)===null||e===void 0||e.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}const yvi=Sr;class bvi extends Ii{constructor(e,i,n){super(),this.parent=e,this.onKeyDown=l=>n_(this.findInput.inputBox.inputElement,yr.KEY_DOWN,l),this.onDidChange=l=>this.findInput.onDidChange(l),this.container=zn(this.parent,yvi(".quick-input-box")),this.findInput=this._register(new Axt(this.container,void 0,{label:"",inputBoxStyles:i,toggleStyles:n}));const s=this.findInput.inputBox.inputElement;s.role="combobox",s.ariaHasPopup="menu",s.ariaAutoComplete="list",s.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}getSelection(){return this.findInput.inputBox.getSelection()}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}setAttribute(e,i){this.findInput.inputBox.inputElement.setAttribute(e,i)}showDecoration(e){e===D_.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===D_.Info?1:e===D_.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===D_.Info?1:e===D_.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}class Cvi{get templateId(){return this.renderer.templateId}constructor(e,i){this.renderer=e,this.modelProvider=i}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:Ii.None}}renderElement(e,i,n,s){var l;if((l=n.disposable)===null||l===void 0||l.dispose(),!n.data)return;const d=this.modelProvider();if(d.isResolved(e))return this.renderer.renderElement(d.get(e),e,n.data,s);const f=new uh,g=d.resolve(e,f.token);n.disposable={dispose:()=>f.cancel()},this.renderer.renderPlaceholder(e,n.data),g.then(y=>this.renderer.renderElement(y,e,n.data,s))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class Svi{constructor(e,i){this.modelProvider=e,this.accessibilityProvider=i}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const i=this.modelProvider();return i.isResolved(e)?this.accessibilityProvider.getAriaLabel(i.get(e)):null}}function wvi(c,e){return{...e,accessibilityProvider:e.accessibilityProvider&&new Svi(c,e.accessibilityProvider)}}class xvi{constructor(e,i,n,s,l={}){const d=()=>this.model,f=s.map(g=>new Cvi(g,d));this.list=new Iw(e,i,n,f,wvi(d,l))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return Mr.map(this.list.onMouseDblClick,({element:e,index:i,browserEvent:n})=>({element:e===void 0?void 0:this._model.get(e),index:i,browserEvent:n}))}get onPointer(){return Mr.map(this.list.onPointer,({element:e,index:i,browserEvent:n})=>({element:e===void 0?void 0:this._model.get(e),index:i,browserEvent:n}))}get onDidChangeSelection(){return Mr.map(this.list.onDidChangeSelection,({elements:e,indexes:i,browserEvent:n})=>({elements:e.map(s=>this._model.get(s)),indexes:i,browserEvent:n}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,yb(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(e=>this.model.get(e))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}var Gq=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};const kvi=!1;var Mve;(function(c){c.North="north",c.South="south",c.East="east",c.West="west"})(Mve||(Mve={}));let Tvi=4;const Dvi=new ui;let Evi=300;const Ivi=new ui;class oze{constructor(e){this.el=e,this.disposables=new On}get onPointerMove(){return this.disposables.add(new Yl(Io(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new Yl(Io(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}}Gq([N_],oze.prototype,"onPointerMove",null);Gq([N_],oze.prototype,"onPointerUp",null);class aze{get onPointerMove(){return this.disposables.add(new Yl(this.el,Gd.Change)).event}get onPointerUp(){return this.disposables.add(new Yl(this.el,Gd.End)).event}constructor(e){this.el=e,this.disposables=new On}dispose(){this.disposables.dispose()}}Gq([N_],aze.prototype,"onPointerMove",null);Gq([N_],aze.prototype,"onPointerUp",null);class Rve{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}Gq([N_],Rve.prototype,"onPointerMove",null);Gq([N_],Rve.prototype,"onPointerUp",null);const Pvt="pointer-events-disabled";class gv extends Ii{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",e===0),this.el.classList.toggle("minimum",e===1),this.el.classList.toggle("maximum",e===2),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const i=n=>{this.orthogonalStartDragHandleDisposables.clear(),n!==0&&(this._orthogonalStartDragHandle=zn(this.el,Sr(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(go(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new Yl(this._orthogonalStartDragHandle,"mouseenter")).event(()=>gv.onMouseEnter(e),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new Yl(this._orthogonalStartDragHandle,"mouseleave")).event(()=>gv.onMouseLeave(e),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(i,this)),i(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const i=n=>{this.orthogonalEndDragHandleDisposables.clear(),n!==0&&(this._orthogonalEndDragHandle=zn(this.el,Sr(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(go(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new Yl(this._orthogonalEndDragHandle,"mouseenter")).event(()=>gv.onMouseEnter(e),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new Yl(this._orthogonalEndDragHandle,"mouseleave")).event(()=>gv.onMouseLeave(e),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(i,this)),i(e.state)}this._orthogonalEndSash=e}}constructor(e,i,n){super(),this.hoverDelay=Evi,this.hoverDelayer=this._register(new hT(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new ui),this._onDidStart=this._register(new ui),this._onDidChange=this._register(new ui),this._onDidReset=this._register(new ui),this._onDidEnd=this._register(new ui),this.orthogonalStartSashDisposables=this._register(new On),this.orthogonalStartDragHandleDisposables=this._register(new On),this.orthogonalEndSashDisposables=this._register(new On),this.orthogonalEndDragHandleDisposables=this._register(new On),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=zn(e,Sr(".monaco-sash")),n.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${n.orthogonalEdge}`),Wl&&this.el.classList.add("mac");const s=this._register(new Yl(this.el,"mousedown")).event;this._register(s(x=>this.onPointerStart(x,new oze(e)),this));const l=this._register(new Yl(this.el,"dblclick")).event;this._register(l(this.onPointerDoublePress,this));const d=this._register(new Yl(this.el,"mouseenter")).event;this._register(d(()=>gv.onMouseEnter(this)));const f=this._register(new Yl(this.el,"mouseleave")).event;this._register(f(()=>gv.onMouseLeave(this))),this._register(Jd.addTarget(this.el));const g=this._register(new Yl(this.el,Gd.Start)).event;this._register(g(x=>this.onPointerStart(x,new aze(this.el)),this));const y=this._register(new Yl(this.el,Gd.Tap)).event;let w;this._register(y(x=>{if(w){clearTimeout(w),w=void 0,this.onPointerDoublePress(x);return}clearTimeout(w),w=setTimeout(()=>w=void 0,250)},this)),typeof n.size=="number"?(this.size=n.size,n.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=Tvi,this._register(Dvi.event(x=>{this.size=x,this.layout()}))),this._register(Ivi.event(x=>this.hoverDelay=x)),this.layoutProvider=i,this.orthogonalStartSash=n.orthogonalStartSash,this.orthogonalEndSash=n.orthogonalEndSash,this.orientation=n.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",kvi),this.layout()}onPointerStart(e,i){nc.stop(e);let n=!1;if(!e.__orthogonalSashEvent){const O=this.getOrthogonalSash(e);O&&(n=!0,e.__orthogonalSashEvent=!0,O.onPointerStart(e,new Rve(i)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new Rve(i))),!this.state)return;const s=this.el.ownerDocument.getElementsByTagName("iframe");for(const O of s)O.classList.add(Pvt);const l=e.pageX,d=e.pageY,f=e.altKey,g={startX:l,currentX:l,startY:d,currentY:d,altKey:f};this.el.classList.add("active"),this._onDidStart.fire(g);const y=Sw(this.el),w=()=>{let O="";n?O="all-scroll":this.orientation===1?this.state===1?O="s-resize":this.state===2?O="n-resize":O=Wl?"row-resize":"ns-resize":this.state===1?O="e-resize":this.state===2?O="w-resize":O=Wl?"col-resize":"ew-resize",y.textContent=`* { cursor: ${O} !important; }`},x=new On;w(),n||this.onDidEnablementChange.event(w,null,x);const I=O=>{nc.stop(O,!1);const W={startX:l,currentX:O.pageX,startY:d,currentY:O.pageY,altKey:f};this._onDidChange.fire(W)},P=O=>{nc.stop(O,!1),this.el.removeChild(y),this.el.classList.remove("active"),this._onDidEnd.fire(),x.dispose();for(const W of s)W.classList.remove(Pvt)};i.onPointerMove(I,null,x),i.onPointerUp(P,null,x),x.add(i)}onPointerDoublePress(e){const i=this.getOrthogonalSash(e);i&&i._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,i=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!i&&e.linkedSash&&gv.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,i=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!i&&e.linkedSash&&gv.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){gv.onMouseLeave(this)}layout(){if(this.orientation===0){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){var i;const n=(i=e.initialTarget)!==null&&i!==void 0?i:e.target;if(!(!n||!Sm(n))&&n.classList.contains("orthogonal-drag-handle"))return n.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}const Nvi={separatorBorder:Qi.transparent};class Oxt{set size(e){this._size=e}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(e,i){var n,s;if(e!==this.visible){e?(this.size=fy(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof i=="number"?i:this.size,this.size=0),this.container.classList.toggle("visible",e);try{(s=(n=this.view).setVisible)===null||s===void 0||s.call(n,e)}catch(l){console.error("Splitview: Failed to set visible view"),console.error(l)}}}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){var e;return(e=this.view.proportionalLayout)!==null&&e!==void 0?e:!0}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,i,n,s){this.container=e,this.view=i,this.disposable=s,this._cachedVisibleSize=void 0,typeof n=="number"?(this._size=n,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=n.cachedVisibleSize)}layout(e,i){this.layoutContainer(e);try{this.view.layout(this.size,e,i)}catch(n){console.error("Splitview: Failed to layout view"),console.error(n)}}dispose(){this.disposable.dispose()}}class Lvi extends Oxt{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class Pvi extends Oxt{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var r4;(function(c){c[c.Idle=0]="Idle",c[c.Busy=1]="Busy"})(r4||(r4={}));var Fve;(function(c){c.Distribute={type:"distribute"};function e(s){return{type:"split",index:s}}c.Split=e;function i(s){return{type:"auto",index:s}}c.Auto=i;function n(s){return{type:"invisible",cachedVisibleSize:s}}c.Invisible=n})(Fve||(Fve={}));class Mxt extends Ii{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(const i of this.sashItems)i.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(const i of this.sashItems)i.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,i={}){var n,s,l,d,f;super(),this.size=0,this._contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=r4.Idle,this._onDidSashChange=this._register(new ui),this._onDidSashReset=this._register(new ui),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=(n=i.orientation)!==null&&n!==void 0?n:0,this.inverseAltBehavior=(s=i.inverseAltBehavior)!==null&&s!==void 0?s:!1,this.proportionalLayout=(l=i.proportionalLayout)!==null&&l!==void 0?l:!0,this.getSashOrthogonalSize=i.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=zn(this.el,Sr(".sash-container")),this.viewContainer=Sr(".split-view-container"),this.scrollable=this._register(new qq({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:y=>zC(Io(this.el),y)})),this.scrollableElement=this._register(new cye(this.viewContainer,{vertical:this.orientation===0?(d=i.scrollbarVisibility)!==null&&d!==void 0?d:1:2,horizontal:this.orientation===1?(f=i.scrollbarVisibility)!==null&&f!==void 0?f:1:2},this.scrollable));const g=this._register(new Yl(this.viewContainer,"scroll")).event;this._register(g(y=>{const w=this.scrollableElement.getScrollPosition(),x=Math.abs(this.viewContainer.scrollLeft-w.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,I=Math.abs(this.viewContainer.scrollTop-w.scrollTop)<=1?void 0:this.viewContainer.scrollTop;(x!==void 0||I!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:x,scrollTop:I})})),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(y=>{y.scrollTopChanged&&(this.viewContainer.scrollTop=y.scrollTop),y.scrollLeftChanged&&(this.viewContainer.scrollLeft=y.scrollLeft)})),zn(this.el,this.scrollableElement.getDomNode()),this.style(i.styles||Nvi),i.descriptor&&(this.size=i.descriptor.size,i.descriptor.views.forEach((y,w)=>{const x=wb(y.visible)||y.visible?y.size:{type:"invisible",cachedVisibleSize:y.size},I=y.view;this.doAddView(I,x,w,!0)}),this._contentSize=this.viewItems.reduce((y,w)=>y+w.size,0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,i,n=this.viewItems.length,s){this.doAddView(e,i,n,s)}layout(e,i){const n=Math.max(this.size,this._contentSize);if(this.size=e,this.layoutContext=i,this.proportions){let s=0;for(let l=0;l0&&(d.size=fy(Math.round(f*e/s),d.minimumSize,d.maximumSize))}}else{const s=yb(this.viewItems.length),l=s.filter(f=>this.viewItems[f].priority===1),d=s.filter(f=>this.viewItems[f].priority===2);this.resize(this.viewItems.length-1,e-n,void 0,l,d)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this._contentSize>0&&(this.proportions=this.viewItems.map(e=>e.proportionalLayout&&e.visible?e.size/this._contentSize:void 0))}onSashStart({sash:e,start:i,alt:n}){for(const f of this.viewItems)f.enabled=!1;const s=this.sashItems.findIndex(f=>f.sash===e),l=dT(tn(this.el.ownerDocument.body,"keydown",f=>d(this.sashDragState.current,f.altKey)),tn(this.el.ownerDocument.body,"keyup",()=>d(this.sashDragState.current,!1))),d=(f,g)=>{const y=this.viewItems.map(O=>O.size);let w=Number.NEGATIVE_INFINITY,x=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(g=!g),g)if(s===this.sashItems.length-1){const W=this.viewItems[s];w=(W.minimumSize-W.size)/2,x=(W.maximumSize-W.size)/2}else{const W=this.viewItems[s+1];w=(W.size-W.maximumSize)/2,x=(W.size-W.minimumSize)/2}let I,P;if(!g){const O=yb(s,-1),W=yb(s+1,this.viewItems.length),X=O.reduce((vt,Nt)=>vt+(this.viewItems[Nt].minimumSize-y[Nt]),0),Z=O.reduce((vt,Nt)=>vt+(this.viewItems[Nt].viewMaximumSize-y[Nt]),0),ee=W.length===0?Number.POSITIVE_INFINITY:W.reduce((vt,Nt)=>vt+(y[Nt]-this.viewItems[Nt].minimumSize),0),he=W.length===0?Number.NEGATIVE_INFINITY:W.reduce((vt,Nt)=>vt+(y[Nt]-this.viewItems[Nt].viewMaximumSize),0),we=Math.max(X,he),Te=Math.min(ee,Z),Be=this.findFirstSnapIndex(O),Me=this.findFirstSnapIndex(W);if(typeof Be=="number"){const vt=this.viewItems[Be],Nt=Math.floor(vt.viewMinimumSize/2);I={index:Be,limitDelta:vt.visible?we-Nt:we+Nt,size:vt.size}}if(typeof Me=="number"){const vt=this.viewItems[Me],Nt=Math.floor(vt.viewMinimumSize/2);P={index:Me,limitDelta:vt.visible?Te+Nt:Te-Nt,size:vt.size}}}this.sashDragState={start:f,current:f,index:s,sizes:y,minDelta:w,maxDelta:x,alt:g,snapBefore:I,snapAfter:P,disposable:l}};d(i,n)}onSashChange({current:e}){const{index:i,start:n,sizes:s,alt:l,minDelta:d,maxDelta:f,snapBefore:g,snapAfter:y}=this.sashDragState;this.sashDragState.current=e;const w=e-n,x=this.resize(i,w,s,void 0,void 0,d,f,g,y);if(l){const I=i===this.sashItems.length-1,P=this.viewItems.map(he=>he.size),O=I?i:i+1,W=this.viewItems[O],X=W.size-W.maximumSize,Z=W.size-W.minimumSize,ee=I?i-1:i+1;this.resize(ee,-x,P,void 0,void 0,X,Z)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const i of this.viewItems)i.enabled=!0}onViewChange(e,i){const n=this.viewItems.indexOf(e);n<0||n>=this.viewItems.length||(i=typeof i=="number"?i:e.size,i=fy(i,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&n>0?(this.resize(n-1,Math.floor((e.size-i)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=i,this.relayout([n],void 0)))}resizeView(e,i){if(!(e<0||e>=this.viewItems.length)){if(this.state!==r4.Idle)throw new Error("Cant modify splitview");this.state=r4.Busy;try{const n=yb(this.viewItems.length).filter(f=>f!==e),s=[...n.filter(f=>this.viewItems[f].priority===1),e],l=n.filter(f=>this.viewItems[f].priority===2),d=this.viewItems[e];i=Math.round(i),i=fy(i,d.minimumSize,Math.min(d.maximumSize,this.size)),d.size=i,this.relayout(s,l)}finally{this.state=r4.Idle}}}distributeViewSizes(){const e=[];let i=0;for(const f of this.viewItems)f.maximumSize-f.minimumSize>0&&(e.push(f),i+=f.size);const n=Math.floor(i/e.length);for(const f of e)f.size=fy(n,f.minimumSize,f.maximumSize);const s=yb(this.viewItems.length),l=s.filter(f=>this.viewItems[f].priority===1),d=s.filter(f=>this.viewItems[f].priority===2);this.relayout(l,d)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,i,n=this.viewItems.length,s){if(this.state!==r4.Idle)throw new Error("Cant modify splitview");this.state=r4.Busy;try{const l=Sr(".split-view-view");n===this.viewItems.length?this.viewContainer.appendChild(l):this.viewContainer.insertBefore(l,this.viewContainer.children.item(n));const d=e.onDidChange(I=>this.onViewChange(w,I)),f=go(()=>this.viewContainer.removeChild(l)),g=dT(d,f);let y;typeof i=="number"?y=i:(i.type==="auto"&&(this.areViewsDistributed()?i={type:"distribute"}:i={type:"split",index:i.index}),i.type==="split"?y=this.getViewSize(i.index)/2:i.type==="invisible"?y={cachedVisibleSize:i.cachedVisibleSize}:y=e.minimumSize);const w=this.orientation===0?new Lvi(l,e,y,g):new Pvi(l,e,y,g);if(this.viewItems.splice(n,0,w),this.viewItems.length>1){const I={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},P=this.orientation===0?new gv(this.sashContainer,{getHorizontalSashTop:vt=>this.getSashPosition(vt),getHorizontalSashWidth:this.getSashOrthogonalSize},{...I,orientation:1}):new gv(this.sashContainer,{getVerticalSashLeft:vt=>this.getSashPosition(vt),getVerticalSashHeight:this.getSashOrthogonalSize},{...I,orientation:0}),O=this.orientation===0?vt=>({sash:P,start:vt.startY,current:vt.currentY,alt:vt.altKey}):vt=>({sash:P,start:vt.startX,current:vt.currentX,alt:vt.altKey}),X=Mr.map(P.onDidStart,O)(this.onSashStart,this),ee=Mr.map(P.onDidChange,O)(this.onSashChange,this),we=Mr.map(P.onDidEnd,()=>this.sashItems.findIndex(vt=>vt.sash===P))(this.onSashEnd,this),Te=P.onDidReset(()=>{const vt=this.sashItems.findIndex(pi=>pi.sash===P),Nt=yb(vt,-1),Ni=yb(vt+1,this.viewItems.length),ci=this.findFirstSnapIndex(Nt),Mt=this.findFirstSnapIndex(Ni);typeof ci=="number"&&!this.viewItems[ci].visible||typeof Mt=="number"&&!this.viewItems[Mt].visible||this._onDidSashReset.fire(vt)}),Be=dT(X,ee,we,Te,P),Me={sash:P,disposable:Be};this.sashItems.splice(n-1,0,Me)}l.appendChild(e.element);let x;typeof i!="number"&&i.type==="split"&&(x=[i.index]),s||this.relayout([n],x),!s&&typeof i!="number"&&i.type==="distribute"&&this.distributeViewSizes()}finally{this.state=r4.Idle}}relayout(e,i){const n=this.viewItems.reduce((s,l)=>s+l.size,0);this.resize(this.viewItems.length-1,this.size-n,void 0,e,i),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,i,n=this.viewItems.map(w=>w.size),s,l,d=Number.NEGATIVE_INFINITY,f=Number.POSITIVE_INFINITY,g,y){if(e<0||e>=this.viewItems.length)return 0;const w=yb(e,-1),x=yb(e+1,this.viewItems.length);if(l)for(const Me of l)b8e(w,Me),b8e(x,Me);if(s)for(const Me of s)dge(w,Me),dge(x,Me);const I=w.map(Me=>this.viewItems[Me]),P=w.map(Me=>n[Me]),O=x.map(Me=>this.viewItems[Me]),W=x.map(Me=>n[Me]),X=w.reduce((Me,vt)=>Me+(this.viewItems[vt].minimumSize-n[vt]),0),Z=w.reduce((Me,vt)=>Me+(this.viewItems[vt].maximumSize-n[vt]),0),ee=x.length===0?Number.POSITIVE_INFINITY:x.reduce((Me,vt)=>Me+(n[vt]-this.viewItems[vt].minimumSize),0),he=x.length===0?Number.NEGATIVE_INFINITY:x.reduce((Me,vt)=>Me+(n[vt]-this.viewItems[vt].maximumSize),0),we=Math.max(X,he,d),Te=Math.min(ee,Z,f);let Be=!1;if(g){const Me=this.viewItems[g.index],vt=i>=g.limitDelta;Be=vt!==Me.visible,Me.setVisible(vt,g.size)}if(!Be&&y){const Me=this.viewItems[y.index],vt=if+g.size,0);let n=this.size-i;const s=yb(this.viewItems.length-1,-1),l=s.filter(f=>this.viewItems[f].priority===1),d=s.filter(f=>this.viewItems[f].priority===2);for(const f of d)b8e(s,f);for(const f of l)dge(s,f);typeof e=="number"&&dge(s,e);for(let f=0;n!==0&&fi+n.size,0);let e=0;for(const i of this.viewItems)i.layout(e,this.layoutContext),e+=i.size;this.sashItems.forEach(i=>i.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this._contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this._contentSize})}updateSashEnablement(){let e=!1;const i=this.viewItems.map(g=>e=g.size-g.minimumSize>0||e);e=!1;const n=this.viewItems.map(g=>e=g.maximumSize-g.size>0||e),s=[...this.viewItems].reverse();e=!1;const l=s.map(g=>e=g.size-g.minimumSize>0||e).reverse();e=!1;const d=s.map(g=>e=g.maximumSize-g.size>0||e).reverse();let f=0;for(let g=0;g0||this.startSnappingEnabled)?y.state=1:ee&&i[g]&&(f0)return;if(!n.visible&&n.snap)return i}}areViewsDistributed(){let e,i;for(const n of this.viewItems)if(e=e===void 0?n.size:Math.min(e,n.size),i=i===void 0?n.size:Math.max(i,n.size),i-e>2)return!1;return!0}dispose(){var e;(e=this.sashDragState)===null||e===void 0||e.disposable.dispose(),yd(this.viewItems),this.viewItems=[],this.sashItems.forEach(i=>i.disposable.dispose()),this.sashItems=[],super.dispose()}}class Une{constructor(e,i,n){this.columns=e,this.getColumnSize=n,this.templateId=Une.TemplateId,this.renderedTemplates=new Set;const s=new Map(i.map(l=>[l.templateId,l]));this.renderers=[];for(const l of e){const d=s.get(l.templateId);if(!d)throw new Error(`Table cell renderer for template id ${l.templateId} not found.`);this.renderers.push(d)}}renderTemplate(e){const i=zn(e,Sr(".monaco-table-tr")),n=[],s=[];for(let d=0;dthis.disposables.add(new Ovi(w,x))),g={size:f.reduce((w,x)=>w+x.column.weight,0),views:f.map(w=>({size:w.column.weight,view:w}))};this.splitview=this.disposables.add(new Mxt(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:g})),this.splitview.el.style.height=`${n.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${n.headerRowHeight}px`;const y=new Une(s,l,w=>this.splitview.getViewSize(w));this.list=this.disposables.add(new Iw(e,this.domNode,Avi(n),[y],d)),Mr.any(...f.map(w=>w.onDidLayout))(([w,x])=>y.layoutColumn(w,x),null,this.disposables),this.splitview.onDidSashReset(w=>{const x=s.reduce((P,O)=>P+O.weight,0),I=s[w].weight/x*this.cachedWidth;this.splitview.resizeView(w,I)},null,this.disposables),this.styleElement=Sw(this.domNode),this.style(h0i)}updateOptions(e){this.list.updateOptions(e)}splice(e,i,n=[]){this.list.splice(e,i,n)}getHTMLElement(){return this.domNode}style(e){const i=[];i.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before { + top: ${this.virtualDelegate.headerRowHeight+1}px; + height: calc(100% - ${this.virtualDelegate.headerRowHeight}px); + }`),this.styleElement.textContent=i.join(` +`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}Bye.InstanceCount=0;var aw;(function(c){c[c.Expanded=0]="Expanded",c[c.Collapsed=1]="Collapsed",c[c.PreserveOrExpanded=2]="PreserveOrExpanded",c[c.PreserveOrCollapsed=3]="PreserveOrCollapsed"})(aw||(aw={}));var Q5;(function(c){c[c.Unknown=0]="Unknown",c[c.Twistie=1]="Twistie",c[c.Element=2]="Element",c[c.Filter=3]="Filter"})(Q5||(Q5={}));class hw extends Error{constructor(e,i){super(`TreeError [${e}] ${i}`)}}class lze{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let i=this._map.get(e);return i||(i=this.fn(e),this._map.set(e,i)),i}}function cze(c){return typeof c=="object"&&"visibility"in c&&"data"in c}function wie(c){switch(c){case!0:return 1;case!1:return 0;default:return c}}function H7e(c){return typeof c.collapsible=="boolean"}class Mvi{constructor(e,i,n,s={}){var l;this.user=e,this.list=i,this.rootRef=[],this.eventBufferer=new O1e,this._onDidChangeCollapseState=new ui,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new ui,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new ui,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new hT(nCt),this.collapseByDefault=typeof s.collapseByDefault>"u"?!1:s.collapseByDefault,this.allowNonCollapsibleParents=(l=s.allowNonCollapsibleParents)!==null&&l!==void 0?l:!1,this.filter=s.filter,this.autoExpandSingleChildren=typeof s.autoExpandSingleChildren>"u"?!1:s.autoExpandSingleChildren,this.root={parent:void 0,element:n,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,i,n=cc.empty(),s={}){if(e.length===0)throw new hw(this.user,"Invalid tree location");s.diffIdentityProvider?this.spliceSmart(s.diffIdentityProvider,e,i,n,s):this.spliceSimple(e,i,n,s)}spliceSmart(e,i,n,s,l,d){var f;s===void 0&&(s=cc.empty()),d===void 0&&(d=(f=l.diffDepth)!==null&&f!==void 0?f:0);const{parentNode:g}=this.getParentNodeWithListIndex(i);if(!g.lastDiffIds)return this.spliceSimple(i,n,s,l);const y=[...s],w=i[i.length-1],x=new UN({getElements:()=>g.lastDiffIds},{getElements:()=>[...g.children.slice(0,w),...y,...g.children.slice(w+n)].map(X=>e.getId(X.element).toString())}).ComputeDiff(!1);if(x.quitEarly)return g.lastDiffIds=void 0,this.spliceSimple(i,n,y,l);const I=i.slice(0,-1),P=(X,Z,ee)=>{if(d>0)for(let he=0;heee.originalStart-Z.originalStart))P(O,W,O-(X.originalStart+X.originalLength)),O=X.originalStart,W=X.modifiedStart-w,this.spliceSimple([...I,O],X.originalLength,cc.slice(y,W,W+X.modifiedLength),l);P(O,W,O)}spliceSimple(e,i,n=cc.empty(),{onDidCreateNode:s,onDidDeleteNode:l,diffIdentityProvider:d}){const{parentNode:f,listIndex:g,revealed:y,visible:w}=this.getParentNodeWithListIndex(e),x=[],I=cc.map(n,Te=>this.createTreeNode(Te,f,f.visible?1:0,y,x,s)),P=e[e.length-1];let O=0;for(let Te=P;Te>=0&&Ted.getId(Te.element).toString())):f.lastDiffIds=f.children.map(Te=>d.getId(Te.element).toString()):f.lastDiffIds=void 0;let he=0;for(const Te of ee)Te.visible&&he++;if(he!==0)for(let Te=P+W.length;TeBe+(Me.visible?Me.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(f,Z-Te),this.list.splice(g,Te,x)}if(ee.length>0&&l){const Te=Be=>{l(Be),Be.children.forEach(Te)};ee.forEach(Te)}this._onDidSplice.fire({insertedNodes:W,deletedNodes:ee});let we=f;for(;we;){if(we.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}we=we.parent}}rerender(e){if(e.length===0)throw new hw(this.user,"Invalid tree location");const{node:i,listIndex:n,revealed:s}=this.getTreeNodeWithListIndex(e);i.visible&&s&&this.list.splice(n,1,[i])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:i,visible:n,revealed:s}=this.getTreeNodeWithListIndex(e);return n&&s?i:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,i){const n=this.getTreeNode(e);typeof i>"u"&&(i=!n.collapsible);const s={collapsible:i};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,s))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,i,n){const s=this.getTreeNode(e);typeof i>"u"&&(i=!s.collapsed);const l={collapsed:i,recursive:n||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,l))}_setCollapseState(e,i){const{node:n,listIndex:s,revealed:l}=this.getTreeNodeWithListIndex(e),d=this._setListNodeCollapseState(n,s,l,i);if(n!==this.root&&this.autoExpandSingleChildren&&d&&!H7e(i)&&n.collapsible&&!n.collapsed&&!i.recursive){let f=-1;for(let g=0;g-1){f=-1;break}else f=g;f>-1&&this._setCollapseState([...e,f],i)}return d}_setListNodeCollapseState(e,i,n,s){const l=this._setNodeCollapseState(e,s,!1);if(!n||!e.visible||!l)return l;const d=e.renderNodeCount,f=this.updateNodeAfterCollapseChange(e),g=d-(i===-1?0:1);return this.list.splice(i+1,g,f.slice(1)),l}_setNodeCollapseState(e,i,n){let s;if(e===this.root?s=!1:(H7e(i)?(s=e.collapsible!==i.collapsible,e.collapsible=i.collapsible):e.collapsible?(s=e.collapsed!==i.collapsed,e.collapsed=i.collapsed):s=!1,s&&this._onDidChangeCollapseState.fire({node:e,deep:n})),!H7e(i)&&i.recursive)for(const l of e.children)s=this._setNodeCollapseState(l,i,!0)||s;return s}expandTo(e){this.eventBufferer.bufferEvents(()=>{let i=this.getTreeNode(e);for(;i.parent;)i=i.parent,e=e.slice(0,e.length-1),i.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){const e=this.root.renderNodeCount,i=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,i),this.refilterDelayer.cancel()}createTreeNode(e,i,n,s,l,d){const f={parent:i,element:e.element,children:[],depth:i.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof e.collapsible=="boolean"?e.collapsible:typeof e.collapsed<"u",collapsed:typeof e.collapsed>"u"?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},g=this._filterNode(f,n);f.visibility=g,s&&l.push(f);const y=e.children||cc.empty(),w=s&&g!==0&&!f.collapsed;let x=0,I=1;for(const P of y){const O=this.createTreeNode(P,f,g,w,l,d);f.children.push(O),I+=O.renderNodeCount,O.visible&&(O.visibleChildIndex=x++)}return this.allowNonCollapsibleParents||(f.collapsible=f.collapsible||f.children.length>0),f.visibleChildrenCount=x,f.visible=g===2?x>0:g===1,f.visible?f.collapsed||(f.renderNodeCount=I):(f.renderNodeCount=0,s&&l.pop()),d==null||d(f),f}updateNodeAfterCollapseChange(e){const i=e.renderNodeCount,n=[];return this._updateNodeAfterCollapseChange(e,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-i),n}_updateNodeAfterCollapseChange(e,i){if(e.visible===!1)return 0;if(i.push(e),e.renderNodeCount=1,!e.collapsed)for(const n of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(n,i);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const i=e.renderNodeCount,n=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-i),n}_updateNodeAfterFilterChange(e,i,n,s=!0){let l;if(e!==this.root){if(l=this._filterNode(e,i),l===0)return e.visible=!1,e.renderNodeCount=0,!1;s&&n.push(e)}const d=n.length;e.renderNodeCount=e===this.root?0:1;let f=!1;if(!e.collapsed||l!==0){let g=0;for(const y of e.children)f=this._updateNodeAfterFilterChange(y,l,n,s&&!e.collapsed)||f,y.visible&&(y.visibleChildIndex=g++);e.visibleChildrenCount=g}else e.visibleChildrenCount=0;return e!==this.root&&(e.visible=l===2?f:l===1,e.visibility=l),e.visible?e.collapsed||(e.renderNodeCount+=n.length-d):(e.renderNodeCount=0,s&&n.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,i){if(i!==0)for(;e;)e.renderNodeCount+=i,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,i){const n=this.filter?this.filter.filter(e.element,i):1;return typeof n=="boolean"?(e.filterData=void 0,n?1:0):cze(n)?(e.filterData=n.data,wie(n.visibility)):(e.filterData=void 0,wie(n))}hasTreeNode(e,i=this.root){if(!e||e.length===0)return!0;const[n,...s]=e;return n<0||n>i.children.length?!1:this.hasTreeNode(s,i.children[n])}getTreeNode(e,i=this.root){if(!e||e.length===0)return i;const[n,...s]=e;if(n<0||n>i.children.length)throw new hw(this.user,"Invalid tree location");return this.getTreeNode(s,i.children[n])}getTreeNodeWithListIndex(e){if(e.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:i,listIndex:n,revealed:s,visible:l}=this.getParentNodeWithListIndex(e),d=e[e.length-1];if(d<0||d>i.children.length)throw new hw(this.user,"Invalid tree location");const f=i.children[d];return{node:f,listIndex:n,revealed:s,visible:l&&f.visible}}getParentNodeWithListIndex(e,i=this.root,n=0,s=!0,l=!0){const[d,...f]=e;if(d<0||d>i.children.length)throw new hw(this.user,"Invalid tree location");for(let g=0;gi.element)),this.data=e}}function j7e(c){return c instanceof Bne?new Rvi(c):c}class Fvi{constructor(e,i){this.modelProvider=e,this.dnd=i,this.autoExpandDisposable=Ii.None,this.disposables=new On}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,i){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(n=>n.element),i)}onDragStart(e,i){var n,s;(s=(n=this.dnd).onDragStart)===null||s===void 0||s.call(n,j7e(e),i)}onDragOver(e,i,n,s,l,d=!0){const f=this.dnd.onDragOver(j7e(e),i&&i.element,n,s,l),g=this.autoExpandNode!==i;if(g&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=i),typeof i>"u")return f;if(g&&typeof f!="boolean"&&f.autoExpand&&(this.autoExpandDisposable=tR(()=>{const P=this.modelProvider(),O=P.getNodeLocation(i);P.isCollapsed(O)&&P.setCollapsed(O,!1),this.autoExpandNode=void 0},500,this.disposables)),typeof f=="boolean"||!f.accept||typeof f.bubble>"u"||f.feedback){if(!d){const P=typeof f=="boolean"?f:f.accept,O=typeof f=="boolean"?void 0:f.effect;return{accept:P,effect:O,feedback:[n]}}return f}if(f.bubble===1){const P=this.modelProvider(),O=P.getNodeLocation(i),W=P.getParentNodeLocation(O),X=P.getNode(W),Z=W&&P.getListIndex(W);return this.onDragOver(e,X,Z,s,l,!1)}const y=this.modelProvider(),w=y.getNodeLocation(i),x=y.getListIndex(w),I=y.getListRenderCount(w);return{...f,feedback:yb(x,x+I)}}drop(e,i,n,s,l){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(j7e(e),i&&i.element,n,s,l)}onDragEnd(e){var i,n;(n=(i=this.dnd).onDragEnd)===null||n===void 0||n.call(i,e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}function Bvi(c,e){return e&&{...e,identityProvider:e.identityProvider&&{getId(i){return e.identityProvider.getId(i.element)}},dnd:e.dnd&&new Fvi(c,e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(i){return e.multipleSelectionController.isSelectionSingleChangeEvent({...i,element:i.element})},isSelectionRangeChangeEvent(i){return e.multipleSelectionController.isSelectionRangeChangeEvent({...i,element:i.element})}},accessibilityProvider:e.accessibilityProvider&&{...e.accessibilityProvider,getSetSize(i){const n=c(),s=n.getNodeLocation(i),l=n.getParentNodeLocation(s);return n.getNode(l).visibleChildrenCount},getPosInSet(i){return i.visibleChildIndex+1},isChecked:e.accessibilityProvider&&e.accessibilityProvider.isChecked?i=>e.accessibilityProvider.isChecked(i.element):void 0,getRole:e.accessibilityProvider&&e.accessibilityProvider.getRole?i=>e.accessibilityProvider.getRole(i.element):()=>"treeitem",getAriaLabel(i){return e.accessibilityProvider.getAriaLabel(i.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider&&e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider&&e.accessibilityProvider.getAriaLevel?i=>e.accessibilityProvider.getAriaLevel(i.element):i=>i.depth,getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(i=>e.accessibilityProvider.getActiveDescendantId(i.element))},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(i){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i.element)}}}}class uze{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,i){var n,s;(s=(n=this.delegate).setDynamicHeight)===null||s===void 0||s.call(n,e.element,i)}}var vq;(function(c){c.None="none",c.OnHover="onHover",c.Always="always"})(vq||(vq={}));class Wvi{get elements(){return this._elements}constructor(e,i=[]){this._elements=i,this.disposables=new On,this.onDidChange=Mr.forEach(e,n=>this._elements=n,this.disposables)}dispose(){this.disposables.dispose()}}class xie{constructor(e,i,n,s,l,d={}){var f;this.renderer=e,this.modelProvider=i,this.activeNodes=s,this.renderedIndentGuides=l,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=xie.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=Ii.None,this.disposables=new On,this.templateId=e.templateId,this.updateOptions(d),Mr.map(n,g=>g.node)(this.onDidChangeNodeTwistieState,this,this.disposables),(f=e.onDidChangeTwistieState)===null||f===void 0||f.call(e,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(typeof e.indent<"u"){const i=fy(e.indent,0,40);if(i!==this.indent){this.indent=i;for(const[n,s]of this.renderedNodes)this.renderTreeElement(n,s)}}if(typeof e.renderIndentGuides<"u"){const i=e.renderIndentGuides!==vq.None;if(i!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=i;for(const[n,s]of this.renderedNodes)this._renderIndentGuides(n,s);if(this.indentGuidesDisposable.dispose(),i){const n=new On;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,n),this.indentGuidesDisposable=n,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof e.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const i=zn(e,Sr(".monaco-tl-row")),n=zn(i,Sr(".monaco-tl-indent")),s=zn(i,Sr(".monaco-tl-twistie")),l=zn(i,Sr(".monaco-tl-contents")),d=this.renderer.renderTemplate(l);return{container:e,indent:n,twistie:s,indentGuidesDisposable:Ii.None,templateData:d}}renderElement(e,i,n,s){this.renderedNodes.set(e,n),this.renderedElements.set(e.element,e),this.renderTreeElement(e,n),this.renderer.renderElement(e,i,n.templateData,s)}disposeElement(e,i,n,s){var l,d;n.indentGuidesDisposable.dispose(),(d=(l=this.renderer).disposeElement)===null||d===void 0||d.call(l,e,i,n.templateData,s),typeof s=="number"&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const i=this.renderedElements.get(e);i&&this.onDidChangeNodeTwistieState(i)}onDidChangeNodeTwistieState(e){const i=this.renderedNodes.get(e);i&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,i))}renderTreeElement(e,i){const n=xie.DefaultIndent+(e.depth-1)*this.indent;i.twistie.style.paddingLeft=`${n}px`,i.indent.style.width=`${n+this.indent-16}px`,e.collapsible?i.container.setAttribute("aria-expanded",String(!e.collapsed)):i.container.removeAttribute("aria-expanded"),i.twistie.classList.remove(...Uo.asClassNameArray(Dr.treeItemExpanded));let s=!1;this.renderer.renderTwistie&&(s=this.renderer.renderTwistie(e.element,i.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(s||i.twistie.classList.add(...Uo.asClassNameArray(Dr.treeItemExpanded)),i.twistie.classList.add("collapsible"),i.twistie.classList.toggle("collapsed",e.collapsed)):i.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,i)}_renderIndentGuides(e,i){if(n0(i.indent),i.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const n=new On,s=this.modelProvider();for(;;){const l=s.getNodeLocation(e),d=s.getParentNodeLocation(l);if(!d)break;const f=s.getNode(d),g=Sr(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(f)&&g.classList.add("active"),i.indent.childElementCount===0?i.indent.appendChild(g):i.indent.insertBefore(g,i.indent.firstElementChild),this.renderedIndentGuides.add(f,g),n.add(go(()=>this.renderedIndentGuides.delete(f,g))),e=f}i.indentGuidesDisposable=n}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const i=new Set,n=this.modelProvider();e.forEach(s=>{const l=n.getNodeLocation(s);try{const d=n.getParentNodeLocation(l);s.collapsible&&s.children.length>0&&!s.collapsed?i.add(s):d&&i.add(n.getNode(d))}catch{}}),this.activeIndentNodes.forEach(s=>{i.has(s)||this.renderedIndentGuides.forEach(s,l=>l.classList.remove("active"))}),i.forEach(s=>{this.activeIndentNodes.has(s)||this.renderedIndentGuides.forEach(s,l=>l.classList.add("active"))}),this.activeIndentNodes=i}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),yd(this.disposables)}}xie.DefaultIndent=8;class Vvi{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,i,n){this.tree=e,this.keyboardNavigationLabelProvider=i,this._filter=n,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new On,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,i){let n=1;if(this._filter){const d=this._filter.filter(e,i);if(typeof d=="boolean"?n=d?1:0:cze(d)?n=wie(d.visibility):n=d,n===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:wE.Default,visibility:n};const s=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),l=Array.isArray(s)?s:[s];for(const d of l){const f=d&&d.toString();if(typeof f>"u")return{data:wE.Default,visibility:n};let g;if(this.tree.findMatchType===E9.Contiguous){const y=f.toLowerCase().indexOf(this._lowercasePattern);if(y>-1){g=[Number.MAX_SAFE_INTEGER,0];for(let w=this._lowercasePattern.length;w>0;w--)g.push(y+w-1)}}else g=k9(this._pattern,this._lowercasePattern,0,f,f.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(g)return this._matchCount++,l.length===1?{data:g,visibility:n}:{data:{label:f,score:g},visibility:n}}return this.tree.findMode===A4.Filter?typeof this.tree.options.defaultFindVisibility=="number"?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:wE.Default,visibility:n}}reset(){this._totalCount=0,this._matchCount=0}dispose(){yd(this.disposables)}}var A4;(function(c){c[c.Highlight=0]="Highlight",c[c.Filter=1]="Filter"})(A4||(A4={}));var E9;(function(c){c[c.Fuzzy=0]="Fuzzy",c[c.Contiguous=1]="Contiguous"})(E9||(E9={}));let Hvi=class{get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,i,n,s,l,d={}){var f,g;this.tree=e,this.view=n,this.filter=s,this.contextViewProvider=l,this.options=d,this._pattern="",this.width=0,this._onDidChangeMode=new ui,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new ui,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new ui,this._onDidChangeOpenState=new ui,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new On,this.disposables=new On,this._mode=(f=e.options.defaultFindMode)!==null&&f!==void 0?f:A4.Highlight,this._matchType=(g=e.options.defaultFindMatchType)!==null&&g!==void 0?g:E9.Fuzzy,i.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){e.defaultFindMode!==void 0&&(this.mode=e.defaultFindMode),e.defaultFindMatchType!==void 0&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){var e,i,n,s;const l=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&l?!((e=this.tree.options.showNotFoundMessage)!==null&&e!==void 0)||e?(i=this.widget)===null||i===void 0||i.showMessage({type:2,content:V("not found","No elements found.")}):(n=this.widget)===null||n===void 0||n.showMessage({type:2}):(s=this.widget)===null||s===void 0||s.clearMessage()}shouldAllowFocus(e){return!this.widget||!this.pattern||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!wE.isDefault(e.filterData)}layout(e){var i;this.width=e,(i=this.widget)===null||i===void 0||i.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}};function jvi(c,e){return c.position===e.position&&Rxt(c,e)}function Rxt(c,e){return c.node.element===e.node.element&&c.startIndex===e.startIndex&&c.height===e.height&&c.endIndex===e.endIndex}class zvi{constructor(e=[]){this.stickyNodes=e}get count(){return this.stickyNodes.length}equal(e){return ch(this.stickyNodes,e.stickyNodes,jvi)}lastNodePartiallyVisible(){if(this.count===0)return!1;const e=this.stickyNodes[this.count-1];if(this.count===1)return e.position!==0;const i=this.stickyNodes[this.count-2];return i.position+i.height!==e.position}animationStateChanged(e){if(!ch(this.stickyNodes,e.stickyNodes,Rxt)||this.count===0)return!1;const i=this.stickyNodes[this.count-1],n=e.stickyNodes[e.count-1];return i.position!==n.position}}class Uvi{constrainStickyScrollNodes(e,i,n){for(let s=0;sn||s>=i)return e.slice(0,s)}return e}}let Avt=class extends Ii{constructor(e,i,n,s,l,d={}){var f;super(),this.tree=e,this.model=i,this.view=n,this.treeDelegate=l,this.maxWidgetViewRatio=.4;const g=this.validateStickySettings(d);this.stickyScrollMaxItemCount=g.stickyScrollMaxItemCount,this.stickyScrollDelegate=(f=d.stickyScrollDelegate)!==null&&f!==void 0?f:new Uvi,this._widget=this._register(new qvi(n.getScrollableElement(),n,e,s,l,d.accessibilityProvider)),this.onDidChangeHasFocus=this._widget.onDidChangeHasFocus,this.onContextMenu=this._widget.onContextMenu,this._register(n.onDidScroll(()=>this.update())),this._register(n.onDidChangeContentHeight(()=>this.update())),this._register(e.onDidChangeCollapseState(()=>this.update())),this.update()}get height(){return this._widget.height}getNodeAtHeight(e){let i;if(e===0?i=this.view.firstVisibleIndex:i=this.view.indexAt(e+this.view.scrollTop),!(i<0||i>=this.view.length))return this.view.element(i)}update(){const e=this.getNodeAtHeight(0);if(!e||this.tree.scrollTop===0){this._widget.setState(void 0);return}const i=this.findStickyState(e);this._widget.setState(i)}findStickyState(e){const i=[];let n=e,s=0,l=this.getNextStickyNode(n,void 0,s);for(;l&&(i.push(l),s+=l.height,!(i.length<=this.stickyScrollMaxItemCount&&(n=this.getNextVisibleNode(l),!n)));)l=this.getNextStickyNode(n,l.node,s);const d=this.constrainStickyNodes(i);return d.length?new zvi(d):void 0}getNextVisibleNode(e){return this.getNodeAtHeight(e.position+e.height)}getNextStickyNode(e,i,n){const s=this.getAncestorUnderPrevious(e,i);if(s&&!(s===e&&(!this.nodeIsUncollapsedParent(e)||this.nodeTopAlignsWithStickyNodesBottom(e,n))))return this.createStickyScrollNode(s,n)}nodeTopAlignsWithStickyNodesBottom(e,i){const n=this.getNodeIndex(e),s=this.view.getElementTop(n),l=i;return this.view.scrollTop===s-l}createStickyScrollNode(e,i){const n=this.treeDelegate.getHeight(e),{startIndex:s,endIndex:l}=this.getNodeRange(e),d=this.calculateStickyNodePosition(l,i,n);return{node:e,position:d,height:n,startIndex:s,endIndex:l}}getAncestorUnderPrevious(e,i=void 0){let n=e,s=this.getParentNode(n);for(;s;){if(s===i)return n;n=s,s=this.getParentNode(n)}if(i===void 0)return n}calculateStickyNodePosition(e,i,n){let s=this.view.getRelativeTop(e);if(s===null&&this.view.firstVisibleIndex===e&&e+1g&&i<=g?g-n:i}constrainStickyNodes(e){if(e.length===0)return[];const i=this.view.renderHeight*this.maxWidgetViewRatio,n=e[e.length-1];if(e.length<=this.stickyScrollMaxItemCount&&n.position+n.height<=i)return e;const s=this.stickyScrollDelegate.constrainStickyScrollNodes(e,this.stickyScrollMaxItemCount,i);if(!s.length)return[];const l=s[s.length-1];if(s.length>this.stickyScrollMaxItemCount||l.position+l.height>i)throw new Error("stickyScrollDelegate violates constraints");return s}getParentNode(e){const i=this.model.getNodeLocation(e),n=this.model.getParentNodeLocation(i);return n?this.model.getNode(n):void 0}nodeIsUncollapsedParent(e){const i=this.model.getNodeLocation(e);return this.model.getListRenderCount(i)>1}getNodeIndex(e){const i=this.model.getNodeLocation(e);return this.model.getListIndex(i)}getNodeRange(e){const i=this.model.getNodeLocation(e),n=this.model.getListIndex(i);if(n<0)throw new Error("Node not found in tree");const s=this.model.getListRenderCount(i),l=n+s-1;return{startIndex:n,endIndex:l}}nodePositionTopBelowWidget(e){const i=[];let n=this.getParentNode(e);for(;n;)i.push(n),n=this.getParentNode(n);let s=0;for(let l=0;l0,n=!!e&&e.count>0;if(!i&&!n||i&&n&&this._previousState.equal(e))return;if(i!==n&&this.setVisible(n),!n){this._previousState=void 0,this._previousElements=[],this._previousStateDisposables.clear();return}const s=e.stickyNodes[e.count-1];if(this._previousState&&e.animationStateChanged(this._previousState))this._previousElements[this._previousState.count-1].style.top=`${s.position}px`;else{this._previousStateDisposables.clear();const l=Array(e.count);for(let d=e.count-1;d>=0;d--){const f=e.stickyNodes[d],{element:g,disposable:y}=this.createElement(f,d,e.count);l[d]=g,this._rootDomNode.appendChild(g),this._previousStateDisposables.add(y)}this.stickyScrollFocus.updateElements(l,e),this._previousElements=l}this._previousState=e,this._rootDomNode.style.height=`${s.position+s.height}px`}createElement(e,i,n){const s=e.startIndex,l=document.createElement("div");l.style.top=`${e.position}px`,this.tree.options.setRowHeight!==!1&&(l.style.height=`${e.height}px`),this.tree.options.setRowLineHeight!==!1&&(l.style.lineHeight=`${e.height}px`),l.classList.add("monaco-tree-sticky-row"),l.classList.add("monaco-list-row"),l.setAttribute("data-index",`${s}`),l.setAttribute("data-parity",s%2===0?"even":"odd"),l.setAttribute("id",this.view.getElementID(s));const d=this.setAccessibilityAttributes(l,e.node.element,i,n),f=this.treeDelegate.getTemplateId(e.node),g=this.treeRenderers.find(I=>I.templateId===f);if(!g)throw new Error(`No renderer found for template id ${f}`);let y=e.node;y===this.tree.getNode(this.tree.getNodeLocation(e.node))&&(y=new Proxy(e.node,{}));const w=g.renderTemplate(l);g.renderElement(y,e.startIndex,w,e.height);const x=go(()=>{d.dispose(),g.disposeElement(y,e.startIndex,w,e.height),g.disposeTemplate(w),l.remove()});return{element:l,disposable:x}}setAccessibilityAttributes(e,i,n,s){var l;if(!this.accessibilityProvider)return Ii.None;this.accessibilityProvider.getSetSize&&e.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(i,n,s))),this.accessibilityProvider.getPosInSet&&e.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(i,n))),this.accessibilityProvider.getRole&&e.setAttribute("role",(l=this.accessibilityProvider.getRole(i))!==null&&l!==void 0?l:"treeitem");const d=this.accessibilityProvider.getAriaLabel(i),f=d&&typeof d!="string"?d:pE(d),g=Cl(w=>{const x=w.readObservable(f);x?e.setAttribute("aria-label",x):e.removeAttribute("aria-label")});typeof d=="string"||d&&e.setAttribute("aria-label",d.get());const y=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(i);return typeof y=="number"&&e.setAttribute("aria-level",`${y}`),e.setAttribute("aria-selected",String(!1)),g}setVisible(e){this._rootDomNode.classList.toggle("empty",!e),e||this.stickyScrollFocus.updateElements([],void 0)}domFocus(){this.stickyScrollFocus.domFocus()}focusedLast(){return this.stickyScrollFocus.focusedLast()}dispose(){this.stickyScrollFocus.dispose(),this._previousStateDisposables.dispose(),this._rootDomNode.remove()}};class $vi extends Ii{get domHasFocus(){return this._domHasFocus}set domHasFocus(e){e!==this._domHasFocus&&(this._onDidChangeHasFocus.fire(e),this._domHasFocus=e)}constructor(e,i){super(),this.container=e,this.view=i,this.focusedIndex=-1,this.elements=[],this._onDidChangeHasFocus=new ui,this.onDidChangeHasFocus=this._onDidChangeHasFocus.event,this._onContextMenu=new ui,this.onContextMenu=this._onContextMenu.event,this._domHasFocus=!1,this.container.addEventListener("focus",()=>this.onFocus()),this.container.addEventListener("blur",()=>this.onBlur()),this._register(this.view.onDidFocus(()=>this.toggleStickyScrollFocused(!1))),this._register(this.view.onKeyDown(n=>this.onKeyDown(n))),this._register(this.view.onMouseDown(n=>this.onMouseDown(n))),this._register(this.view.onContextMenu(n=>this.handleContextMenu(n)))}handleContextMenu(e){const i=e.browserEvent.target;if(!bie(i)&&!gte(i)){this.focusedLast()&&this.view.domFocus();return}if(!dM(e.browserEvent)){if(!this.state)throw new Error("Context menu should not be triggered when state is undefined");const d=this.state.stickyNodes.findIndex(f=>{var g;return f.node.element===((g=e.element)===null||g===void 0?void 0:g.element)});if(d===-1)throw new Error("Context menu should not be triggered when element is not in sticky scroll widget");this.container.focus(),this.setFocus(d);return}if(!this.state||this.focusedIndex<0)throw new Error("Context menu key should not be triggered when focus is not in sticky scroll widget");const s=this.state.stickyNodes[this.focusedIndex].node.element,l=this.elements[this.focusedIndex];this._onContextMenu.fire({element:s,anchor:l,browserEvent:e.browserEvent,isStickyScroll:!0})}onKeyDown(e){if(this.domHasFocus&&this.state){if(e.key==="ArrowUp")this.setFocusedElement(Math.max(0,this.focusedIndex-1)),e.preventDefault(),e.stopPropagation();else if(e.key==="ArrowDown"||e.key==="ArrowRight"){if(this.focusedIndex>=this.state.count-1){const i=this.state.stickyNodes[this.state.count-1].startIndex+1;this.view.domFocus(),this.view.setFocus([i]),this.scrollNodeUnderWidget(i,this.state)}else this.setFocusedElement(this.focusedIndex+1);e.preventDefault(),e.stopPropagation()}}}onMouseDown(e){const i=e.browserEvent.target;!bie(i)&&!gte(i)||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation())}updateElements(e,i){if(i&&i.count===0)throw new Error("Sticky scroll state must be undefined when there are no sticky nodes");if(i&&i.count!==e.length)throw new Error("Sticky scroll focus received illigel state");const n=this.focusedIndex;if(this.removeFocus(),this.elements=e,this.state=i,i){const s=fy(n,0,i.count-1);this.setFocus(s)}else this.domHasFocus&&this.view.domFocus();this.container.tabIndex=i?0:-1}setFocusedElement(e){const i=this.state;if(!i)throw new Error("Cannot set focus when state is undefined");if(this.setFocus(e),!(e1?i.stickyNodes[i.count-2]:void 0,l=this.view.getElementTop(e),d=s?s.position+s.height+n.height:n.height;this.view.scrollTop=l-d}domFocus(){if(!this.state)throw new Error("Cannot focus when state is undefined");this.container.focus()}focusedLast(){return this.state?this.view.getHTMLElement().classList.contains("sticky-scroll-focused"):!1}removeFocus(){this.focusedIndex!==-1&&(this.toggleElementFocus(this.elements[this.focusedIndex],!1),this.focusedIndex=-1)}setFocus(e){if(0>e)throw new Error("addFocus() can not remove focus");if(!this.state&&e>=0)throw new Error("Cannot set focus index when state is undefined");if(this.state&&e>=this.state.count)throw new Error("Cannot set focus index to an index that does not exist");const i=this.focusedIndex;i>=0&&this.toggleElementFocus(this.elements[i],!1),e>=0&&this.toggleElementFocus(this.elements[e],!0),this.focusedIndex=e}toggleElementFocus(e,i){this.toggleElementActiveFocus(e,i&&this.domHasFocus),this.toggleElementPassiveFocus(e,i)}toggleCurrentElementActiveFocus(e){this.focusedIndex!==-1&&this.toggleElementActiveFocus(this.elements[this.focusedIndex],e)}toggleElementActiveFocus(e,i){e.classList.toggle("focused",i)}toggleElementPassiveFocus(e,i){e.classList.toggle("passive-focused",i)}toggleStickyScrollFocused(e){this.view.getHTMLElement().classList.toggle("sticky-scroll-focused",e)}onFocus(){if(!this.state||this.elements.length===0)throw new Error("Cannot focus when state is undefined or elements are empty");this.domHasFocus=!0,this.toggleStickyScrollFocused(!0),this.toggleCurrentElementActiveFocus(!0),this.focusedIndex===-1&&this.setFocus(0)}onBlur(){this.domHasFocus=!1,this.toggleCurrentElementActiveFocus(!1)}dispose(){this.toggleStickyScrollFocused(!1),this._onDidChangeHasFocus.fire(!1),super.dispose()}}function tme(c){let e=Q5.Unknown;return R8e(c.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?e=Q5.Twistie:R8e(c.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?e=Q5.Element:R8e(c.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(e=Q5.Filter),{browserEvent:c.browserEvent,element:c.element?c.element.element:null,target:e}}function Jvi(c){const e=bie(c.browserEvent.target);return{element:c.element?c.element.element:null,browserEvent:c.browserEvent,anchor:c.anchor,isStickyScroll:e}}function o0e(c,e){e(c),c.children.forEach(i=>o0e(i,e))}class z7e{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,i){this.getFirstViewElementWithTrait=e,this.identityProvider=i,this.nodes=[],this._onDidChange=new ui,this.onDidChange=this._onDidChange.event}set(e,i){!(i!=null&&i.__forceEvent)&&ch(this.nodes,e)||this._set(e,!1,i)}_set(e,i,n){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!i){const s=this;this._onDidChange.fire({get elements(){return s.get()},browserEvent:n})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:i}){if(!this.identityProvider){const g=this.createNodeSet(),y=w=>g.delete(w);i.forEach(w=>o0e(w,y)),this.set([...g.values()]);return}const n=new Set,s=g=>n.add(this.identityProvider.getId(g.element).toString());i.forEach(g=>o0e(g,s));const l=new Map,d=g=>l.set(this.identityProvider.getId(g.element).toString(),g);e.forEach(g=>o0e(g,d));const f=[];for(const g of this.nodes){const y=this.identityProvider.getId(g.element).toString();if(!n.has(y))f.push(g);else{const x=l.get(y);x&&x.visible&&f.push(x)}}if(this.nodes.length>0&&f.length===0){const g=this.getFirstViewElementWithTrait();g&&f.push(g)}this._set(f,!0)}createNodeSet(){const e=new Set;for(const i of this.nodes)e.add(i);return e}}class Gvi extends vxt{constructor(e,i,n){super(e),this.tree=i,this.stickyScrollProvider=n}onViewPointer(e){if(_xt(e.browserEvent.target)||UM(e.browserEvent.target)||Fee(e.browserEvent.target)||e.browserEvent.isHandledByList)return;const i=e.element;if(!i)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const n=e.browserEvent.target,s=n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,l=gte(e.browserEvent.target);let d=!1;if(l?d=!0:typeof this.tree.expandOnlyOnTwistieClick=="function"?d=this.tree.expandOnlyOnTwistieClick(i.element):d=!!this.tree.expandOnlyOnTwistieClick,l)this.handleStickyScrollMouseEvent(e,i);else{if(d&&!s&&e.browserEvent.detail!==2)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&e.browserEvent.detail===2)return super.onViewPointer(e)}if(i.collapsible&&(!l||s)){const f=this.tree.getNodeLocation(i),g=e.browserEvent.altKey;if(this.tree.setFocus([f]),this.tree.toggleCollapsed(f,g),s){e.browserEvent.isHandledByList=!0;return}}l||super.onViewPointer(e)}handleStickyScrollMouseEvent(e,i){if(a0i(e.browserEvent.target)||l0i(e.browserEvent.target))return;const n=this.stickyScrollProvider();if(!n)throw new Error("Sticky scroll controller not found");const s=this.list.indexOf(i),l=this.list.getElementTop(s),d=n.nodePositionTopBelowWidget(i);this.tree.scrollTop=l-d,this.list.domFocus(),this.list.setFocus([s]),this.list.setSelection([s])}onDoubleClick(e){e.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||e.browserEvent.isHandledByList||super.onDoubleClick(e)}onMouseDown(e){const i=e.browserEvent.target;if(!bie(i)&&!gte(i)){super.onMouseDown(e);return}}onContextMenu(e){const i=e.browserEvent.target;if(!bie(i)&&!gte(i)){super.onContextMenu(e);return}}}class Kvi extends Iw{constructor(e,i,n,s,l,d,f,g){super(e,i,n,s,g),this.focusTrait=l,this.selectionTrait=d,this.anchorTrait=f}createMouseController(e){return new Gvi(this,e.tree,e.stickyScrollProvider)}splice(e,i,n=[]){if(super.splice(e,i,n),n.length===0)return;const s=[],l=[];let d;n.forEach((f,g)=>{this.focusTrait.has(f)&&s.push(e+g),this.selectionTrait.has(f)&&l.push(e+g),this.anchorTrait.has(f)&&(d=e+g)}),s.length>0&&super.setFocus(z4([...super.getFocus(),...s])),l.length>0&&super.setSelection(z4([...super.getSelection(),...l])),typeof d=="number"&&super.setAnchor(d)}setFocus(e,i,n=!1){super.setFocus(e,i),n||this.focusTrait.set(e.map(s=>this.element(s)),i)}setSelection(e,i,n=!1){super.setSelection(e,i),n||this.selectionTrait.set(e.map(s=>this.element(s)),i)}setAnchor(e,i=!1){super.setAnchor(e),i||(typeof e>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class Fxt{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return Mr.filter(Mr.map(this.view.onMouseDblClick,tme),e=>e.target!==Q5.Filter)}get onMouseOver(){return Mr.map(this.view.onMouseOver,tme)}get onMouseOut(){return Mr.map(this.view.onMouseOut,tme)}get onContextMenu(){var e,i;return Mr.any(Mr.filter(Mr.map(this.view.onContextMenu,Jvi),n=>!n.isStickyScroll),(i=(e=this.stickyScrollController)===null||e===void 0?void 0:e.onContextMenu)!==null&&i!==void 0?i:Mr.None)}get onPointer(){return Mr.map(this.view.onPointer,tme)}get onKeyDown(){return this.view.onKeyDown}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return Mr.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var e,i;return(i=(e=this.findController)===null||e===void 0?void 0:e.mode)!==null&&i!==void 0?i:A4.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){var e,i;return(i=(e=this.findController)===null||e===void 0?void 0:e.matchType)!==null&&i!==void 0?i:E9.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,i,n,s,l={}){var d;this._user=e,this._options=l,this.eventBufferer=new O1e,this.onDidChangeFindOpenState=Mr.None,this.onDidChangeStickyScrollFocused=Mr.None,this.disposables=new On,this._onWillRefilter=new ui,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new ui,this.treeDelegate=new uze(n);const f=new tgt,g=new tgt,y=this.disposables.add(new Wvi(g.event)),w=new $He;this.renderers=s.map(W=>new xie(W,()=>this.model,f.event,y,w,l));for(const W of this.renderers)this.disposables.add(W);let x;l.keyboardNavigationLabelProvider&&(x=new Vvi(this,l.keyboardNavigationLabelProvider,l.filter),l={...l,filter:x},this.disposables.add(x)),this.focus=new z7e(()=>this.view.getFocusedElements()[0],l.identityProvider),this.selection=new z7e(()=>this.view.getSelectedElements()[0],l.identityProvider),this.anchor=new z7e(()=>this.view.getAnchorElement(),l.identityProvider),this.view=new Kvi(e,i,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...Bvi(()=>this.model,l),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.model=this.createModel(e,this.view,l),f.input=this.model.onDidChangeCollapseState;const I=Mr.forEach(this.model.onDidSplice,W=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(W),this.selection.onDidModelSplice(W)})},this.disposables);I(()=>null,null,this.disposables);const P=this.disposables.add(new ui),O=this.disposables.add(new hT(0));if(this.disposables.add(Mr.any(I,this.focus.onDidChange,this.selection.onDidChange)(()=>{O.trigger(()=>{const W=new Set;for(const X of this.focus.getNodes())W.add(X);for(const X of this.selection.getNodes())W.add(X);P.fire([...W.values()])})})),g.input=P.event,l.keyboardSupport!==!1){const W=Mr.chain(this.view.onKeyDown,X=>X.filter(Z=>!UM(Z.target)).map(Z=>new Fd(Z)));Mr.chain(W,X=>X.filter(Z=>Z.keyCode===15))(this.onLeftArrow,this,this.disposables),Mr.chain(W,X=>X.filter(Z=>Z.keyCode===17))(this.onRightArrow,this,this.disposables),Mr.chain(W,X=>X.filter(Z=>Z.keyCode===10))(this.onSpace,this,this.disposables)}if((!((d=l.findWidgetEnabled)!==null&&d!==void 0)||d)&&l.keyboardNavigationLabelProvider&&l.contextViewProvider){const W=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new Hvi(this,this.model,this.view,x,l.contextViewProvider,W),this.focusNavigationFilter=X=>this.findController.shouldAllowFocus(X),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=Mr.None,this.onDidChangeFindMatchType=Mr.None;l.enableStickyScroll&&(this.stickyScrollController=new Avt(this,this.model,this.view,this.renderers,this.treeDelegate,l),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus),this.styleElement=Sw(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===vq.Always)}updateOptions(e={}){var i;this._options={...this._options,...e};for(const n of this.renderers)n.updateOptions(e);this.view.updateOptions(this._options),(i=this.findController)===null||i===void 0||i.updateOptions(e),this.updateStickyScroll(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===vq.Always)}get options(){return this._options}updateStickyScroll(e){var i;!this.stickyScrollController&&this._options.enableStickyScroll?(this.stickyScrollController=new Avt(this,this.model,this.view,this.renderers,this.treeDelegate,this._options),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.onDidChangeStickyScrollFocused=Mr.None,this.stickyScrollController.dispose(),this.stickyScrollController=void 0),(i=this.stickyScrollController)===null||i===void 0||i.updateOptions(e)}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get ariaLabel(){return this.view.ariaLabel}set ariaLabel(e){this.view.ariaLabel=e}domFocus(){var e;!((e=this.stickyScrollController)===null||e===void 0)&&e.focusedLast()?this.stickyScrollController.domFocus():this.view.domFocus()}layout(e,i){var n;this.view.layout(e,i),XM(i)&&((n=this.findController)===null||n===void 0||n.layout(i))}style(e){var i,n;const s=`.${this.view.domId}`,l=[];e.treeIndentGuidesStroke&&(l.push(`.monaco-list${s}:hover .monaco-tl-indent > .indent-guide, .monaco-list${s}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),l.push(`.monaco-list${s} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`));const d=(i=e.treeStickyScrollBackground)!==null&&i!==void 0?i:e.listBackground;d&&(l.push(`.monaco-list${s} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${d}; }`),l.push(`.monaco-list${s} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${d}; }`)),e.treeStickyScrollBorder&&l.push(`.monaco-list${s} .monaco-scrollable-element .monaco-tree-sticky-container { border-bottom: 1px solid ${e.treeStickyScrollBorder}; }`),e.treeStickyScrollShadow&&l.push(`.monaco-list${s} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow { box-shadow: ${e.treeStickyScrollShadow} 0 6px 6px -6px inset; height: 3px; }`),e.listFocusForeground&&(l.push(`.monaco-list${s}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),l.push(`.monaco-list${s}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`));const f=R4(e.listFocusAndSelectionOutline,R4(e.listSelectionOutline,(n=e.listFocusOutline)!==null&&n!==void 0?n:""));f&&(l.push(`.monaco-list${s}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${f}; outline-offset: -1px;}`),l.push(`.monaco-list${s}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`)),e.listFocusOutline&&(l.push(`.monaco-list${s}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),l.push(`.monaco-list${s}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`),l.push(`.monaco-workbench.context-menu-visible .monaco-list${s}.last-focused.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.passive-focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),l.push(`.monaco-workbench.context-menu-visible .monaco-list${s}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`),l.push(`.monaco-workbench.context-menu-visible .monaco-list${s}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`)),this.styleElement.textContent=l.join(` +`),this.view.style(e)}getParentElement(e){const i=this.model.getParentNodeLocation(e);return this.model.getNode(i).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,i=!1){return this.model.setCollapsed(e,!0,i)}expand(e,i=!1){return this.model.setCollapsed(e,!1,i)}toggleCollapsed(e,i=!1){return this.model.setCollapsed(e,void 0,i)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,i){return this.model.setCollapsible(e,i)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,i){this.eventBufferer.bufferEvents(()=>{const n=e.map(l=>this.model.getNode(l));this.selection.set(n,i);const s=e.map(l=>this.model.getListIndex(l)).filter(l=>l>-1);this.view.setSelection(s,i,!0)})}getSelection(){return this.selection.get()}setFocus(e,i){this.eventBufferer.bufferEvents(()=>{const n=e.map(l=>this.model.getNode(l));this.focus.set(n,i);const s=e.map(l=>this.model.getListIndex(l)).filter(l=>l>-1);this.view.setFocus(s,i,!0)})}focusNext(e=1,i=!1,n,s=dM(n)&&n.altKey?void 0:this.focusNavigationFilter){this.view.focusNext(e,i,n,s)}focusPrevious(e=1,i=!1,n,s=dM(n)&&n.altKey?void 0:this.focusNavigationFilter){this.view.focusPrevious(e,i,n,s)}focusNextPage(e,i=dM(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusNextPage(e,i)}focusPreviousPage(e,i=dM(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusPreviousPage(e,i,()=>{var n,s;return(s=(n=this.stickyScrollController)===null||n===void 0?void 0:n.height)!==null&&s!==void 0?s:0})}focusFirst(e,i=dM(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusFirst(e,i)}getFocus(){return this.focus.get()}reveal(e,i){this.model.expandTo(e);const n=this.model.getListIndex(e);if(n!==-1)if(!this.stickyScrollController)this.view.reveal(n,i);else{const s=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(n,i,s)}}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const i=this.view.getFocusedElements();if(i.length===0)return;const n=i[0],s=this.model.getNodeLocation(n);if(!this.model.setCollapsed(s,!0)){const d=this.model.getParentNodeLocation(s);if(!d)return;const f=this.model.getListIndex(d);this.view.reveal(f),this.view.setFocus([f])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const i=this.view.getFocusedElements();if(i.length===0)return;const n=i[0],s=this.model.getNodeLocation(n);if(!this.model.setCollapsed(s,!1)){if(!n.children.some(g=>g.visible))return;const[d]=this.view.getFocus(),f=d+1;this.view.reveal(f),this.view.setFocus([f])}}onSpace(e){e.preventDefault(),e.stopPropagation();const i=this.view.getFocusedElements();if(i.length===0)return;const n=i[0],s=this.model.getNodeLocation(n),l=e.browserEvent.altKey;this.model.setCollapsed(s,void 0,l)}dispose(){var e;yd(this.disposables),(e=this.stickyScrollController)===null||e===void 0||e.dispose(),this.view.dispose()}}class dze{constructor(e,i,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new Mvi(e,i,null,n),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,n.sorter&&(this.sorter={compare(s,l){return n.sorter.compare(s.element,l.element)}}),this.identityProvider=n.identityProvider}setChildren(e,i=cc.empty(),n={}){const s=this.getElementLocation(e);this._setChildren(s,this.preserveCollapseState(i),n)}_setChildren(e,i=cc.empty(),n){const s=new Set,l=new Set,d=g=>{var y;if(g.element===null)return;const w=g;if(s.add(w.element),this.nodes.set(w.element,w),this.identityProvider){const x=this.identityProvider.getId(w.element).toString();l.add(x),this.nodesByIdentity.set(x,w)}(y=n.onDidCreateNode)===null||y===void 0||y.call(n,w)},f=g=>{var y;if(g.element===null)return;const w=g;if(s.has(w.element)||this.nodes.delete(w.element),this.identityProvider){const x=this.identityProvider.getId(w.element).toString();l.has(x)||this.nodesByIdentity.delete(x)}(y=n.onDidDeleteNode)===null||y===void 0||y.call(n,w)};this.model.splice([...e,0],Number.MAX_VALUE,i,{...n,onDidCreateNode:d,onDidDeleteNode:f})}preserveCollapseState(e=cc.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),cc.map(e,i=>{let n=this.nodes.get(i.element);if(!n&&this.identityProvider){const d=this.identityProvider.getId(i.element).toString();n=this.nodesByIdentity.get(d)}if(!n){let d;return typeof i.collapsed>"u"?d=void 0:i.collapsed===aw.Collapsed||i.collapsed===aw.PreserveOrCollapsed?d=!0:i.collapsed===aw.Expanded||i.collapsed===aw.PreserveOrExpanded?d=!1:d=!!i.collapsed,{...i,children:this.preserveCollapseState(i.children),collapsed:d}}const s=typeof i.collapsible=="boolean"?i.collapsible:n.collapsible;let l;return typeof i.collapsed>"u"||i.collapsed===aw.PreserveOrCollapsed||i.collapsed===aw.PreserveOrExpanded?l=n.collapsed:i.collapsed===aw.Collapsed?l=!0:i.collapsed===aw.Expanded?l=!1:l=!!i.collapsed,{...i,collapsible:s,collapsed:l,children:this.preserveCollapseState(i.children)}})}rerender(e){const i=this.getElementLocation(e);this.model.rerender(i)}getFirstElementChild(e=null){const i=this.getElementLocation(e);return this.model.getFirstElementChild(i)}has(e){return this.nodes.has(e)}getListIndex(e){const i=this.getElementLocation(e);return this.model.getListIndex(i)}getListRenderCount(e){const i=this.getElementLocation(e);return this.model.getListRenderCount(i)}isCollapsible(e){const i=this.getElementLocation(e);return this.model.isCollapsible(i)}setCollapsible(e,i){const n=this.getElementLocation(e);return this.model.setCollapsible(n,i)}isCollapsed(e){const i=this.getElementLocation(e);return this.model.isCollapsed(i)}setCollapsed(e,i,n){const s=this.getElementLocation(e);return this.model.setCollapsed(s,i,n)}expandTo(e){const i=this.getElementLocation(e);this.model.expandTo(i)}refilter(){this.model.refilter()}getNode(e=null){if(e===null)return this.model.getNode(this.model.rootRef);const i=this.nodes.get(e);if(!i)throw new hw(this.user,`Tree element not found: ${e}`);return i}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(e===null)throw new hw(this.user,"Invalid getParentNodeLocation call");const i=this.nodes.get(e);if(!i)throw new hw(this.user,`Tree element not found: ${e}`);const n=this.model.getNodeLocation(i),s=this.model.getParentNodeLocation(n);return this.model.getNode(s).element}getElementLocation(e){if(e===null)return[];const i=this.nodes.get(e);if(!i)throw new hw(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(i)}}function a0e(c){const e=[c.element],i=c.incompressible||!1;return{element:{elements:e,incompressible:i},children:cc.map(cc.from(c.children),a0e),collapsible:c.collapsible,collapsed:c.collapsed}}function l0e(c){const e=[c.element],i=c.incompressible||!1;let n,s;for(;[s,n]=cc.consume(cc.from(c.children),2),!(s.length!==1||s[0].incompressible);)c=s[0],e.push(c.element);return{element:{elements:e,incompressible:i},children:cc.map(cc.concat(s,n),l0e),collapsible:c.collapsible,collapsed:c.collapsed}}function IBe(c,e=0){let i;return eIBe(n,0)),e===0&&c.element.incompressible?{element:c.element.elements[e],children:i,incompressible:!0,collapsible:c.collapsible,collapsed:c.collapsed}:{element:c.element.elements[e],children:i,collapsible:c.collapsible,collapsed:c.collapsed}}function Ovt(c){return IBe(c,0)}function Bxt(c,e,i){return c.element===e?{...c,children:i}:{...c,children:cc.map(cc.from(c.children),n=>Bxt(n,e,i))}}const Qvi=c=>({getId(e){return e.elements.map(i=>c.getId(i).toString()).join("\0")}});class Xvi{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,i,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new dze(e,i,n),this.enabled=typeof n.compressionEnabled>"u"?!0:n.compressionEnabled,this.identityProvider=n.identityProvider}setChildren(e,i=cc.empty(),n){const s=n.diffIdentityProvider&&Qvi(n.diffIdentityProvider);if(e===null){const O=cc.map(i,this.enabled?l0e:a0e);this._setChildren(null,O,{diffIdentityProvider:s,diffDepth:1/0});return}const l=this.nodes.get(e);if(!l)throw new hw(this.user,"Unknown compressed tree node");const d=this.model.getNode(l),f=this.model.getParentNodeLocation(l),g=this.model.getNode(f),y=Ovt(d),w=Bxt(y,e,i),x=(this.enabled?l0e:a0e)(w),I=n.diffIdentityProvider?(O,W)=>n.diffIdentityProvider.getId(O)===n.diffIdentityProvider.getId(W):void 0;if(ch(x.element.elements,d.element.elements,I)){this._setChildren(l,x.children||cc.empty(),{diffIdentityProvider:s,diffDepth:1});return}const P=g.children.map(O=>O===d?x:O);this._setChildren(g.element,P,{diffIdentityProvider:s,diffDepth:d.depth-g.depth})}isCompressionEnabled(){return this.enabled}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const n=this.model.getNode().children,s=cc.map(n,Ovt),l=cc.map(s,e?l0e:a0e);this._setChildren(null,l,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,i,n){const s=new Set,l=f=>{for(const g of f.element.elements)s.add(g),this.nodes.set(g,f.element)},d=f=>{for(const g of f.element.elements)s.has(g)||this.nodes.delete(g)};this.model.setChildren(e,i,{...n,onDidCreateNode:l,onDidDeleteNode:d})}has(e){return this.nodes.has(e)}getListIndex(e){const i=this.getCompressedNode(e);return this.model.getListIndex(i)}getListRenderCount(e){const i=this.getCompressedNode(e);return this.model.getListRenderCount(i)}getNode(e){if(typeof e>"u")return this.model.getNode();const i=this.getCompressedNode(e);return this.model.getNode(i)}getNodeLocation(e){const i=this.model.getNodeLocation(e);return i===null?null:i.elements[i.elements.length-1]}getParentNodeLocation(e){const i=this.getCompressedNode(e),n=this.model.getParentNodeLocation(i);return n===null?null:n.elements[n.elements.length-1]}getFirstElementChild(e){const i=this.getCompressedNode(e);return this.model.getFirstElementChild(i)}isCollapsible(e){const i=this.getCompressedNode(e);return this.model.isCollapsible(i)}setCollapsible(e,i){const n=this.getCompressedNode(e);return this.model.setCollapsible(n,i)}isCollapsed(e){const i=this.getCompressedNode(e);return this.model.isCollapsed(i)}setCollapsed(e,i,n){const s=this.getCompressedNode(e);return this.model.setCollapsed(s,i,n)}expandTo(e){const i=this.getCompressedNode(e);this.model.expandTo(i)}rerender(e){const i=this.getCompressedNode(e);this.model.rerender(i)}refilter(){this.model.refilter()}getCompressedNode(e){if(e===null)return null;const i=this.nodes.get(e);if(!i)throw new hw(this.user,`Tree element not found: ${e}`);return i}}const Zvi=c=>c[c.length-1];class fze{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new fze(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,i){this.unwrapper=e,this.node=i}}function Yvi(c,e){return{splice(i,n,s){e.splice(i,n,s.map(l=>c.map(l)))},updateElementHeight(i,n){e.updateElementHeight(i,n)}}}function e1i(c,e){return{...e,identityProvider:e.identityProvider&&{getId(i){return e.identityProvider.getId(c(i))}},sorter:e.sorter&&{compare(i,n){return e.sorter.compare(i.elements[0],n.elements[0])}},filter:e.filter&&{filter(i,n){return e.filter.filter(c(i),n)}}}}class t1i{get onDidSplice(){return Mr.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:i})=>({insertedNodes:e.map(n=>this.nodeMapper.map(n)),deletedNodes:i.map(n=>this.nodeMapper.map(n))}))}get onDidChangeCollapseState(){return Mr.map(this.model.onDidChangeCollapseState,({node:e,deep:i})=>({node:this.nodeMapper.map(e),deep:i}))}get onDidChangeRenderNodeCount(){return Mr.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}constructor(e,i,n={}){this.rootRef=null,this.elementMapper=n.elementMapper||Zvi;const s=l=>this.elementMapper(l.elements);this.nodeMapper=new lze(l=>new fze(s,l)),this.model=new Xvi(e,Yvi(this.nodeMapper,i),e1i(s,n))}setChildren(e,i=cc.empty(),n={}){this.model.setChildren(e,i,n)}isCompressionEnabled(){return this.model.isCompressionEnabled()}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const i=this.model.getFirstElementChild(e);return i===null||typeof i>"u"?i:this.elementMapper(i.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,i){return this.model.setCollapsible(e,i)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,i,n){return this.model.setCollapsed(e,i,n)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var i1i=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};class hze extends Fxt{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,i,n,s,l={}){super(e,i,n,s,l),this.user=e}setChildren(e,i=cc.empty(),n){this.model.setChildren(e,i,n)}rerender(e){if(e===void 0){this.view.rerender();return}this.model.rerender(e)}hasElement(e){return this.model.has(e)}createModel(e,i,n){return new dze(e,i,n)}}class Wxt{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,i,n){this._compressedTreeNodeProvider=e,this.stickyScrollDelegate=i,this.renderer=n,this.templateId=n.templateId,n.onDidChangeTwistieState&&(this.onDidChangeTwistieState=n.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,i,n,s){let l=this.stickyScrollDelegate.getCompressedNode(e);l||(l=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element)),l.element.elements.length===1?(n.compressedTreeNode=void 0,this.renderer.renderElement(e,i,n.data,s)):(n.compressedTreeNode=l,this.renderer.renderCompressedElements(l,i,n.data,s))}disposeElement(e,i,n,s){var l,d,f,g;n.compressedTreeNode?(d=(l=this.renderer).disposeCompressedElements)===null||d===void 0||d.call(l,n.compressedTreeNode,i,n.data,s):(g=(f=this.renderer).disposeElement)===null||g===void 0||g.call(f,e,i,n.data,s)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,i){return this.renderer.renderTwistie?this.renderer.renderTwistie(e,i):!1}}i1i([N_],Wxt.prototype,"compressedTreeNodeProvider",null);class n1i{constructor(e){this.modelProvider=e,this.compressedStickyNodes=new Map}getCompressedNode(e){return this.compressedStickyNodes.get(e)}constrainStickyScrollNodes(e,i,n){if(this.compressedStickyNodes.clear(),e.length===0)return[];for(let s=0;sn||s>=i-1&&ithis,f=new n1i(()=>this.model),g=s.map(y=>new Wxt(d,f,y));super(e,i,n,g,{...r1i(d,l),stickyScrollDelegate:f})}setChildren(e,i=cc.empty(),n){this.model.setChildren(e,i,n)}createModel(e,i,n){return new t1i(e,i,n)}updateOptions(e={}){super.updateOptions(e),typeof e.compressionEnabled<"u"&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}function U7e(c){return{...c,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function NBe(c,e){return e.parent?e.parent===c?!0:NBe(c,e.parent):!1}function s1i(c,e){return c===e||NBe(c,e)||NBe(e,c)}class _ze{get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new _ze(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class o1i{constructor(e,i,n){this.renderer=e,this.nodeMapper=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,i,n,s){this.renderer.renderElement(this.nodeMapper.map(e),i,n.templateData,s)}renderTwistie(e,i){return e.slow?(i.classList.add(...Uo.asClassNameArray(Dr.treeItemLoading)),!0):(i.classList.remove(...Uo.asClassNameArray(Dr.treeItemLoading)),!1)}disposeElement(e,i,n,s){var l,d;(d=(l=this.renderer).disposeElement)===null||d===void 0||d.call(l,this.nodeMapper.map(e),i,n.templateData,s)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function Mvt(c){return{browserEvent:c.browserEvent,elements:c.elements.map(e=>e.element)}}function Rvt(c){return{browserEvent:c.browserEvent,element:c.element&&c.element.element,target:c.target}}class a1i extends Bne{constructor(e){super(e.elements.map(i=>i.element)),this.data=e}}function q7e(c){return c instanceof Bne?new a1i(c):c}class l1i{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,i){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(n=>n.element),i)}onDragStart(e,i){var n,s;(s=(n=this.dnd).onDragStart)===null||s===void 0||s.call(n,q7e(e),i)}onDragOver(e,i,n,s,l,d=!0){return this.dnd.onDragOver(q7e(e),i&&i.element,n,s,l)}drop(e,i,n,s,l){this.dnd.drop(q7e(e),i&&i.element,n,s,l)}onDragEnd(e){var i,n;(n=(i=this.dnd).onDragEnd)===null||n===void 0||n.call(i,e)}dispose(){this.dnd.dispose()}}function Hxt(c){return c&&{...c,collapseByDefault:!0,identityProvider:c.identityProvider&&{getId(e){return c.identityProvider.getId(e.element)}},dnd:c.dnd&&new l1i(c.dnd),multipleSelectionController:c.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return c.multipleSelectionController.isSelectionSingleChangeEvent({...e,element:e.element})},isSelectionRangeChangeEvent(e){return c.multipleSelectionController.isSelectionRangeChangeEvent({...e,element:e.element})}},accessibilityProvider:c.accessibilityProvider&&{...c.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:c.accessibilityProvider.getRole?e=>c.accessibilityProvider.getRole(e.element):()=>"treeitem",isChecked:c.accessibilityProvider.isChecked?e=>{var i;return!!(!((i=c.accessibilityProvider)===null||i===void 0)&&i.isChecked(e.element))}:void 0,getAriaLabel(e){return c.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return c.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:c.accessibilityProvider.getWidgetRole?()=>c.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:c.accessibilityProvider.getAriaLevel&&(e=>c.accessibilityProvider.getAriaLevel(e.element)),getActiveDescendantId:c.accessibilityProvider.getActiveDescendantId&&(e=>c.accessibilityProvider.getActiveDescendantId(e.element))},filter:c.filter&&{filter(e,i){return c.filter.filter(e.element,i)}},keyboardNavigationLabelProvider:c.keyboardNavigationLabelProvider&&{...c.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(e){return c.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}},sorter:void 0,expandOnlyOnTwistieClick:typeof c.expandOnlyOnTwistieClick>"u"?void 0:typeof c.expandOnlyOnTwistieClick!="function"?c.expandOnlyOnTwistieClick:e=>c.expandOnlyOnTwistieClick(e.element),defaultFindVisibility:e=>e.hasChildren&&e.stale?1:typeof c.defaultFindVisibility=="number"?c.defaultFindVisibility:typeof c.defaultFindVisibility>"u"?2:c.defaultFindVisibility(e.element)}}function LBe(c,e){e(c),c.children.forEach(i=>LBe(i,e))}class jxt{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return Mr.map(this.tree.onDidChangeFocus,Mvt)}get onDidChangeSelection(){return Mr.map(this.tree.onDidChangeSelection,Mvt)}get onMouseDblClick(){return Mr.map(this.tree.onMouseDblClick,Rvt)}get onPointer(){return Mr.map(this.tree.onPointer,Rvt)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidChangeStickyScrollFocused(){return this.tree.onDidChangeStickyScrollFocused}get onDidDispose(){return this.tree.onDidDispose}constructor(e,i,n,s,l,d={}){this.user=e,this.dataSource=l,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new ui,this._onDidChangeNodeSlowState=new ui,this.nodeMapper=new lze(f=>new _ze(f)),this.disposables=new On,this.identityProvider=d.identityProvider,this.autoExpandSingleChildren=typeof d.autoExpandSingleChildren>"u"?!1:d.autoExpandSingleChildren,this.sorter=d.sorter,this.getDefaultCollapseState=f=>d.collapseByDefault?d.collapseByDefault(f)?aw.PreserveOrCollapsed:aw.PreserveOrExpanded:void 0,this.tree=this.createTree(e,i,n,s,d),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.onDidChangeFindMatchType=this.tree.onDidChangeFindMatchType,this.root=U7e({element:void 0,parent:null,hasChildren:!0,defaultCollapseState:void 0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(e,i,n,s,l){const d=new uze(n),f=s.map(y=>new o1i(y,this.nodeMapper,this._onDidChangeNodeSlowState.event)),g=Hxt(l)||{};return new hze(e,i,d,f,g)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,i){this.tree.layout(e,i)}style(e){this.tree.style(e)}getInput(){return this.root.element}async setInput(e,i){this.refreshPromises.forEach(s=>s.cancel()),this.refreshPromises.clear(),this.root.element=e;const n=i&&{viewState:i,focus:[],selection:[]};await this._updateChildren(e,!0,!1,n),n&&(this.tree.setFocus(n.focus),this.tree.setSelection(n.selection)),i&&typeof i.scrollTop=="number"&&(this.scrollTop=i.scrollTop)}async _updateChildren(e=this.root.element,i=!0,n=!1,s,l){if(typeof this.root.element>"u")throw new hw(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await Mr.toPromise(this._onDidRender.event));const d=this.getDataNode(e);if(await this.refreshAndRenderNode(d,i,s,l),n)try{this.tree.rerender(d)}catch{}}rerender(e){if(e===void 0||e===this.root.element){this.tree.rerender();return}const i=this.getDataNode(e);this.tree.rerender(i)}getNode(e=this.root.element){const i=this.getDataNode(e),n=this.tree.getNode(i===this.root?null:i);return this.nodeMapper.map(n)}collapse(e,i=!1){const n=this.getDataNode(e);return this.tree.collapse(n===this.root?null:n,i)}async expand(e,i=!1){if(typeof this.root.element>"u")throw new hw(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await Mr.toPromise(this._onDidRender.event));const n=this.getDataNode(e);if(this.tree.hasElement(n)&&!this.tree.isCollapsible(n)||(n.refreshPromise&&(await this.root.refreshPromise,await Mr.toPromise(this._onDidRender.event)),n!==this.root&&!n.refreshPromise&&!this.tree.isCollapsed(n)))return!1;const s=this.tree.expand(n===this.root?null:n,i);return n.refreshPromise&&(await this.root.refreshPromise,await Mr.toPromise(this._onDidRender.event)),s}setSelection(e,i){const n=e.map(s=>this.getDataNode(s));this.tree.setSelection(n,i)}getSelection(){return this.tree.getSelection().map(i=>i.element)}setFocus(e,i){const n=e.map(s=>this.getDataNode(s));this.tree.setFocus(n,i)}getFocus(){return this.tree.getFocus().map(i=>i.element)}reveal(e,i){this.tree.reveal(this.getDataNode(e),i)}getParentElement(e){const i=this.tree.getParentElement(this.getDataNode(e));return i&&i.element}getFirstElementChild(e=this.root.element){const i=this.getDataNode(e),n=this.tree.getFirstElementChild(i===this.root?null:i);return n&&n.element}getDataNode(e){const i=this.nodes.get(e===this.root.element?null:e);if(!i)throw new hw(this.user,`Data tree node not found: ${e}`);return i}async refreshAndRenderNode(e,i,n,s){await this.refreshNode(e,i,n),!this.disposables.isDisposed&&this.render(e,n,s)}async refreshNode(e,i,n){let s;if(this.subTreeRefreshPromises.forEach((l,d)=>{!s&&s1i(d,e)&&(s=l.then(()=>this.refreshNode(e,i,n)))}),s)return s;if(e!==this.root&&this.tree.getNode(e).collapsed){e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0,this.setChildren(e,[],i,n);return}return this.doRefreshSubTree(e,i,n)}async doRefreshSubTree(e,i,n){let s;e.refreshPromise=new Promise(l=>s=l),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{const l=await this.doRefreshNode(e,i,n);e.stale=!1,await W5e.settled(l.map(d=>this.doRefreshSubTree(d,i,n)))}finally{s()}}async doRefreshNode(e,i,n){e.hasChildren=!!this.dataSource.hasChildren(e.element);let s;if(!e.hasChildren)s=Promise.resolve(cc.empty());else{const l=this.doGetChildren(e);if(Kpt(l))s=Promise.resolve(l);else{const d=J4(800);d.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},f=>null),s=l.finally(()=>d.cancel())}}try{const l=await s;return this.setChildren(e,l,i,n)}catch(l){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),pT(l))return[];throw l}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}doGetChildren(e){let i=this.refreshPromises.get(e);if(i)return i;const n=this.dataSource.getChildren(e.element);return Kpt(n)?this.processChildren(n):(i=Hg(async()=>this.processChildren(await n)),this.refreshPromises.set(e,i),i.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:i}){e.element!==null&&!e.collapsed&&e.element.stale&&(i?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(Ba))}setChildren(e,i,n,s){const l=[...i];if(e.children.length===0&&l.length===0)return[];const d=new Map,f=new Map;for(const w of e.children)d.set(w.element,w),this.identityProvider&&f.set(w.id,{node:w,collapsed:this.tree.hasElement(w)&&this.tree.isCollapsed(w)});const g=[],y=l.map(w=>{const x=!!this.dataSource.hasChildren(w);if(!this.identityProvider){const W=U7e({element:w,parent:e,hasChildren:x,defaultCollapseState:this.getDefaultCollapseState(w)});return x&&W.defaultCollapseState===aw.PreserveOrExpanded&&g.push(W),W}const I=this.identityProvider.getId(w).toString(),P=f.get(I);if(P){const W=P.node;return d.delete(W.element),this.nodes.delete(W.element),this.nodes.set(w,W),W.element=w,W.hasChildren=x,n?P.collapsed?(W.children.forEach(X=>LBe(X,Z=>this.nodes.delete(Z.element))),W.children.splice(0,W.children.length),W.stale=!0):g.push(W):x&&!P.collapsed&&g.push(W),W}const O=U7e({element:w,parent:e,id:I,hasChildren:x,defaultCollapseState:this.getDefaultCollapseState(w)});return s&&s.viewState.focus&&s.viewState.focus.indexOf(I)>-1&&s.focus.push(O),s&&s.viewState.selection&&s.viewState.selection.indexOf(I)>-1&&s.selection.push(O),(s&&s.viewState.expanded&&s.viewState.expanded.indexOf(I)>-1||x&&O.defaultCollapseState===aw.PreserveOrExpanded)&&g.push(O),O});for(const w of d.values())LBe(w,x=>this.nodes.delete(x.element));for(const w of y)this.nodes.set(w.element,w);return e.children.splice(0,e.children.length,...y),e!==this.root&&this.autoExpandSingleChildren&&y.length===1&&g.length===0&&(y[0].forceExpanded=!0,g.push(y[0])),g}render(e,i,n){const s=e.children.map(d=>this.asTreeElement(d,i)),l=n&&{...n,diffIdentityProvider:n.diffIdentityProvider&&{getId(d){return n.diffIdentityProvider.getId(d.element)}}};this.tree.setChildren(e===this.root?null:e,s,l),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,i){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let n;return i&&i.viewState.expanded&&e.id&&i.viewState.expanded.indexOf(e.id)>-1?n=!1:e.forceExpanded?(n=!1,e.forceExpanded=!1):n=e.defaultCollapseState,{element:e,children:e.hasChildren?cc.map(e.children,s=>this.asTreeElement(s,i)):[],collapsible:e.hasChildren,collapsed:n}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose(),this.tree.dispose()}}class pze{get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new pze(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class c1i{constructor(e,i,n,s){this.renderer=e,this.nodeMapper=i,this.compressibleNodeMapperProvider=n,this.onDidChangeTwistieState=s,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,i,n,s){this.renderer.renderElement(this.nodeMapper.map(e),i,n.templateData,s)}renderCompressedElements(e,i,n,s){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),i,n.templateData,s)}renderTwistie(e,i){return e.slow?(i.classList.add(...Uo.asClassNameArray(Dr.treeItemLoading)),!0):(i.classList.remove(...Uo.asClassNameArray(Dr.treeItemLoading)),!1)}disposeElement(e,i,n,s){var l,d;(d=(l=this.renderer).disposeElement)===null||d===void 0||d.call(l,this.nodeMapper.map(e),i,n.templateData,s)}disposeCompressedElements(e,i,n,s){var l,d;(d=(l=this.renderer).disposeCompressedElements)===null||d===void 0||d.call(l,this.compressibleNodeMapperProvider().map(e),i,n.templateData,s)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=yd(this.disposables)}}function u1i(c){const e=c&&Hxt(c);return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(i){return c.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(i.map(n=>n.element))}}}}class d1i extends jxt{constructor(e,i,n,s,l,d,f={}){super(e,i,n,l,d,f),this.compressionDelegate=s,this.compressibleNodeMapper=new lze(g=>new pze(g)),this.filter=f.filter}createTree(e,i,n,s,l){const d=new uze(n),f=s.map(y=>new c1i(y,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),g=u1i(l)||{};return new Vxt(e,i,d,f,g)}asTreeElement(e,i){return{incompressible:this.compressionDelegate.isIncompressible(e.element),...super.asTreeElement(e,i)}}updateOptions(e={}){this.tree.updateOptions(e)}render(e,i,n){if(!this.identityProvider)return super.render(e,i);const s=P=>this.identityProvider.getId(P).toString(),l=P=>{const O=new Set;for(const W of P){const X=this.tree.getCompressedTreeNode(W===this.root?null:W);if(X.element)for(const Z of X.element.elements)O.add(s(Z.element))}return O},d=l(this.tree.getSelection()),f=l(this.tree.getFocus());super.render(e,i,n);const g=this.getSelection();let y=!1;const w=this.getFocus();let x=!1;const I=P=>{const O=P.element;if(O)for(let W=0;W{const n=this.filter.filter(i,1),s=f1i(n);if(s===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return s===1})),super.processChildren(e)}}function f1i(c){return typeof c=="boolean"?c?1:0:cze(c)?wie(c.visibility):wie(c)}class h1i extends Fxt{constructor(e,i,n,s,l,d={}){super(e,i,n,s,d),this.user=e,this.dataSource=l,this.identityProvider=d.identityProvider}createModel(e,i,n){return new dze(e,i,n)}}new Xr("isMac",Wl,V("isMac","Whether the operating system is macOS"));new Xr("isLinux",Ty,V("isLinux","Whether the operating system is Linux"));const Wye=new Xr("isWindows",M0,V("isWindows","Whether the operating system is Windows")),zxt=new Xr("isWeb",xR,V("isWeb","Whether the platform is a web browser"));new Xr("isMacNative",Wl&&!xR,V("isMacNative","Whether the operating system is macOS on a non-browser platform"));new Xr("isIOS",TE,V("isIOS","Whether the operating system is iOS"));new Xr("isMobile",wbt,V("isMobile","Whether the platform is a mobile web browser"));new Xr("isDevelopment",!1,!0);new Xr("productQualityType","",V("productQualityType","Quality type of VS Code"));const Uxt="inputFocus",qxt=new Xr(Uxt,!1,V("inputFocus","Whether keyboard focus is inside an input box"));var s6=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},df=function(c,e){return function(i,n){e(i,n,c)}};const gk=Kl("listService");class _1i{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new On,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){var i,n;e!==this._lastFocusedWidget&&((i=this._lastFocusedWidget)===null||i===void 0||i.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,(n=this._lastFocusedWidget)===null||n===void 0||n.getHTMLElement().classList.add("last-focused"))}register(e,i){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new yxt(Sw(),"").style(iB)),this.lists.some(s=>s.widget===e))throw new Error("Cannot register the same widget multiple times");const n={widget:e,extraContextKeys:i};return this.lists.push(n),H1e(e.getHTMLElement())&&this.setLastFocusedList(e),dT(e.onDidFocus(()=>this.setLastFocusedList(e)),go(()=>this.lists.splice(this.lists.indexOf(n),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(s=>s!==n),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}}const kie=new Xr("listScrollAtBoundary","none");xn.or(kie.isEqualTo("top"),kie.isEqualTo("both"));xn.or(kie.isEqualTo("bottom"),kie.isEqualTo("both"));const $xt=new Xr("listFocus",!0),Jxt=new Xr("treestickyScrollFocused",!1),Vye=new Xr("listSupportsMultiselect",!0),Gxt=xn.and($xt,xn.not(Uxt),Jxt.negate()),gze=new Xr("listHasSelectionOrFocus",!1),mze=new Xr("listDoubleSelection",!1),vze=new Xr("listMultiSelection",!1),Hye=new Xr("listSelectionNavigation",!1),p1i=new Xr("listSupportsFind",!0),yze=new Xr("treeElementCanCollapse",!1),g1i=new Xr("treeElementHasParent",!1),bze=new Xr("treeElementCanExpand",!1),m1i=new Xr("treeElementHasChild",!1),v1i=new Xr("treeFindOpen",!1),Kxt="listTypeNavigationMode",Qxt="listAutomaticKeyboardNavigation";function jye(c,e){const i=c.createScoped(e.getHTMLElement());return $xt.bindTo(i),i}function zye(c,e){const i=kie.bindTo(c),n=()=>{const s=e.scrollTop===0,l=e.scrollHeight-e.renderHeight-e.scrollTop<1;s&&l?i.set("both"):s?i.set("top"):l?i.set("bottom"):i.set("none")};return n(),e.onDidScroll(n)}const sB="workbench.list.multiSelectModifier",c0e="workbench.list.openMode",sk="workbench.list.horizontalScrolling",Cze="workbench.list.defaultFindMode",Sze="workbench.list.typeNavigationMode",Bve="workbench.list.keyboardNavigation",AE="workbench.list.scrollByPage",wze="workbench.list.defaultFindMatchType",Tie="workbench.tree.indent",Wve="workbench.tree.renderIndentGuides",OE="workbench.list.smoothScrolling",mL="workbench.list.mouseWheelScrollSensitivity",vL="workbench.list.fastScrollSensitivity",Vve="workbench.tree.expandMode",Hve="workbench.tree.enableStickyScroll",jve="workbench.tree.stickyScrollMaxItemCount";function yL(c){return c.getValue(sB)==="alt"}class y1i extends Ii{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=yL(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(sB)&&(this.useAltAsMultipleSelectionModifier=yL(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:gxt(e)}isSelectionRangeChangeEvent(e){return mxt(e)}}function Uye(c,e){var i;const n=c.get(El),s=c.get(ou),l=new On;return[{...e,keyboardNavigationDelegate:{mightProducePrintableCharacter(f){return s.mightProducePrintableCharacter(f)}},smoothScrolling:!!n.getValue(OE),mouseWheelScrollSensitivity:n.getValue(mL),fastScrollSensitivity:n.getValue(vL),multipleSelectionController:(i=e.multipleSelectionController)!==null&&i!==void 0?i:l.add(new y1i(n)),keyboardNavigationEventFilter:S1i(s),scrollByPage:!!n.getValue(AE)},l]}let Fvt=class extends Iw{constructor(e,i,n,s,l,d,f,g,y){const w=typeof l.horizontalScrolling<"u"?l.horizontalScrolling:!!g.getValue(sk),[x,I]=y.invokeFunction(Uye,l);super(e,i,n,s,{keyboardSupport:!1,...x,horizontalScrolling:w}),this.disposables.add(I),this.contextKeyService=jye(d,this),this.disposables.add(zye(this.contextKeyService,this)),this.listSupportsMultiSelect=Vye.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(l.multipleSelectionSupport!==!1),Hye.bindTo(this.contextKeyService).set(!!l.selectionNavigation),this.listHasSelectionOrFocus=gze.bindTo(this.contextKeyService),this.listDoubleSelection=mze.bindTo(this.contextKeyService),this.listMultiSelection=vze.bindTo(this.contextKeyService),this.horizontalScrolling=l.horizontalScrolling,this._useAltAsMultipleSelectionModifier=yL(g),this.disposables.add(this.contextKeyService),this.disposables.add(f.register(this)),this.updateStyles(l.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const O=this.getSelection(),W=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(O.length>0||W.length>0),this.listMultiSelection.set(O.length>1),this.listDoubleSelection.set(O.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const O=this.getSelection(),W=this.getFocus();this.listHasSelectionOrFocus.set(O.length>0||W.length>0)})),this.disposables.add(g.onDidChangeConfiguration(O=>{O.affectsConfiguration(sB)&&(this._useAltAsMultipleSelectionModifier=yL(g));let W={};if(O.affectsConfiguration(sk)&&this.horizontalScrolling===void 0){const X=!!g.getValue(sk);W={...W,horizontalScrolling:X}}if(O.affectsConfiguration(AE)){const X=!!g.getValue(AE);W={...W,scrollByPage:X}}if(O.affectsConfiguration(OE)){const X=!!g.getValue(OE);W={...W,smoothScrolling:X}}if(O.affectsConfiguration(mL)){const X=g.getValue(mL);W={...W,mouseWheelScrollSensitivity:X}}if(O.affectsConfiguration(vL)){const X=g.getValue(vL);W={...W,fastScrollSensitivity:X}}Object.keys(W).length>0&&this.updateOptions(W)})),this.navigator=new Xxt(this,{configurationService:g,...l}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?nB(e):iB)}};Fvt=s6([df(5,Zo),df(6,gk),df(7,El),df(8,So)],Fvt);let Bvt=class extends xvi{constructor(e,i,n,s,l,d,f,g,y){const w=typeof l.horizontalScrolling<"u"?l.horizontalScrolling:!!g.getValue(sk),[x,I]=y.invokeFunction(Uye,l);super(e,i,n,s,{keyboardSupport:!1,...x,horizontalScrolling:w}),this.disposables=new On,this.disposables.add(I),this.contextKeyService=jye(d,this),this.disposables.add(zye(this.contextKeyService,this.widget)),this.horizontalScrolling=l.horizontalScrolling,this.listSupportsMultiSelect=Vye.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(l.multipleSelectionSupport!==!1),Hye.bindTo(this.contextKeyService).set(!!l.selectionNavigation),this._useAltAsMultipleSelectionModifier=yL(g),this.disposables.add(this.contextKeyService),this.disposables.add(f.register(this)),this.updateStyles(l.overrideStyles),this.disposables.add(g.onDidChangeConfiguration(O=>{O.affectsConfiguration(sB)&&(this._useAltAsMultipleSelectionModifier=yL(g));let W={};if(O.affectsConfiguration(sk)&&this.horizontalScrolling===void 0){const X=!!g.getValue(sk);W={...W,horizontalScrolling:X}}if(O.affectsConfiguration(AE)){const X=!!g.getValue(AE);W={...W,scrollByPage:X}}if(O.affectsConfiguration(OE)){const X=!!g.getValue(OE);W={...W,smoothScrolling:X}}if(O.affectsConfiguration(mL)){const X=g.getValue(mL);W={...W,mouseWheelScrollSensitivity:X}}if(O.affectsConfiguration(vL)){const X=g.getValue(vL);W={...W,fastScrollSensitivity:X}}Object.keys(W).length>0&&this.updateOptions(W)})),this.navigator=new Xxt(this,{configurationService:g,...l}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?nB(e):iB)}dispose(){this.disposables.dispose(),super.dispose()}};Bvt=s6([df(5,Zo),df(6,gk),df(7,El),df(8,So)],Bvt);let Wvt=class extends Bye{constructor(e,i,n,s,l,d,f,g,y,w){const x=typeof d.horizontalScrolling<"u"?d.horizontalScrolling:!!y.getValue(sk),[I,P]=w.invokeFunction(Uye,d);super(e,i,n,s,l,{keyboardSupport:!1,...I,horizontalScrolling:x}),this.disposables.add(P),this.contextKeyService=jye(f,this),this.disposables.add(zye(this.contextKeyService,this)),this.listSupportsMultiSelect=Vye.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(d.multipleSelectionSupport!==!1),Hye.bindTo(this.contextKeyService).set(!!d.selectionNavigation),this.listHasSelectionOrFocus=gze.bindTo(this.contextKeyService),this.listDoubleSelection=mze.bindTo(this.contextKeyService),this.listMultiSelection=vze.bindTo(this.contextKeyService),this.horizontalScrolling=d.horizontalScrolling,this._useAltAsMultipleSelectionModifier=yL(y),this.disposables.add(this.contextKeyService),this.disposables.add(g.register(this)),this.updateStyles(d.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const W=this.getSelection(),X=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(W.length>0||X.length>0),this.listMultiSelection.set(W.length>1),this.listDoubleSelection.set(W.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const W=this.getSelection(),X=this.getFocus();this.listHasSelectionOrFocus.set(W.length>0||X.length>0)})),this.disposables.add(y.onDidChangeConfiguration(W=>{W.affectsConfiguration(sB)&&(this._useAltAsMultipleSelectionModifier=yL(y));let X={};if(W.affectsConfiguration(sk)&&this.horizontalScrolling===void 0){const Z=!!y.getValue(sk);X={...X,horizontalScrolling:Z}}if(W.affectsConfiguration(AE)){const Z=!!y.getValue(AE);X={...X,scrollByPage:Z}}if(W.affectsConfiguration(OE)){const Z=!!y.getValue(OE);X={...X,smoothScrolling:Z}}if(W.affectsConfiguration(mL)){const Z=y.getValue(mL);X={...X,mouseWheelScrollSensitivity:Z}}if(W.affectsConfiguration(vL)){const Z=y.getValue(vL);X={...X,fastScrollSensitivity:Z}}Object.keys(X).length>0&&this.updateOptions(X)})),this.navigator=new b1i(this,{configurationService:y,...d}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?nB(e):iB)}dispose(){this.disposables.dispose(),super.dispose()}};Wvt=s6([df(6,Zo),df(7,gk),df(8,El),df(9,So)],Wvt);class xze extends Ii{constructor(e,i){var n;super(),this.widget=e,this._onDidOpen=this._register(new ui),this.onDidOpen=this._onDidOpen.event,this._register(Mr.filter(this.widget.onDidChangeSelection,s=>dM(s.browserEvent))(s=>this.onSelectionFromKeyboard(s))),this._register(this.widget.onPointer(s=>this.onPointer(s.element,s.browserEvent))),this._register(this.widget.onMouseDblClick(s=>this.onMouseDblClick(s.element,s.browserEvent))),typeof(i==null?void 0:i.openOnSingleClick)!="boolean"&&(i!=null&&i.configurationService)?(this.openOnSingleClick=(i==null?void 0:i.configurationService.getValue(c0e))!=="doubleClick",this._register(i==null?void 0:i.configurationService.onDidChangeConfiguration(s=>{s.affectsConfiguration(c0e)&&(this.openOnSingleClick=(i==null?void 0:i.configurationService.getValue(c0e))!=="doubleClick")}))):this.openOnSingleClick=(n=i==null?void 0:i.openOnSingleClick)!==null&&n!==void 0?n:!0}onSelectionFromKeyboard(e){if(e.elements.length!==1)return;const i=e.browserEvent,n=typeof i.preserveFocus=="boolean"?i.preserveFocus:!0,s=typeof i.pinned=="boolean"?i.pinned:!n;this._open(this.getSelectedElement(),n,s,!1,e.browserEvent)}onPointer(e,i){if(!this.openOnSingleClick||i.detail===2)return;const s=i.button===1,l=!0,d=s,f=i.ctrlKey||i.metaKey||i.altKey;this._open(e,l,d,f,i)}onMouseDblClick(e,i){if(!i)return;const n=i.target;if(n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&i.offsetX<16)return;const l=!1,d=!0,f=i.ctrlKey||i.metaKey||i.altKey;this._open(e,l,d,f,i)}_open(e,i,n,s,l){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:i,pinned:n,revealIfVisible:!0},sideBySide:s,element:e,browserEvent:l})}}class Xxt extends xze{constructor(e,i){super(e,i),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class b1i extends xze{constructor(e,i){super(e,i)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class C1i extends xze{constructor(e,i){super(e,i)}getSelectedElement(){var e;return(e=this.widget.getSelection()[0])!==null&&e!==void 0?e:void 0}}function S1i(c){let e=!1;return i=>{if(i.toKeyCodeChord().isModifierKey())return!1;if(e)return e=!1,!1;const n=c.softDispatch(i,i.target);return n.kind===1?(e=!0,!1):(e=!1,n.kind===0)}}let PBe=class extends hze{constructor(e,i,n,s,l,d,f,g,y){const{options:w,getTypeNavigationMode:x,disposable:I}=d.invokeFunction(qne,l);super(e,i,n,s,w),this.disposables.add(I),this.internals=new I9(this,l,x,l.overrideStyles,f,g,y),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};PBe=s6([df(5,So),df(6,Zo),df(7,gk),df(8,El)],PBe);let Vvt=class extends Vxt{constructor(e,i,n,s,l,d,f,g,y){const{options:w,getTypeNavigationMode:x,disposable:I}=d.invokeFunction(qne,l);super(e,i,n,s,w),this.disposables.add(I),this.internals=new I9(this,l,x,l.overrideStyles,f,g,y),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Vvt=s6([df(5,So),df(6,Zo),df(7,gk),df(8,El)],Vvt);let Hvt=class extends h1i{constructor(e,i,n,s,l,d,f,g,y,w){const{options:x,getTypeNavigationMode:I,disposable:P}=f.invokeFunction(qne,d);super(e,i,n,s,l,x),this.disposables.add(P),this.internals=new I9(this,d,I,d.overrideStyles,g,y,w),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles!==void 0&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Hvt=s6([df(6,So),df(7,Zo),df(8,gk),df(9,El)],Hvt);let ABe=class extends jxt{get onDidOpen(){return this.internals.onDidOpen}constructor(e,i,n,s,l,d,f,g,y,w){const{options:x,getTypeNavigationMode:I,disposable:P}=f.invokeFunction(qne,d);super(e,i,n,s,l,x),this.disposables.add(P),this.internals=new I9(this,d,I,d.overrideStyles,g,y,w),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};ABe=s6([df(6,So),df(7,Zo),df(8,gk),df(9,El)],ABe);let jvt=class extends d1i{constructor(e,i,n,s,l,d,f,g,y,w,x){const{options:I,getTypeNavigationMode:P,disposable:O}=g.invokeFunction(qne,f);super(e,i,n,s,l,d,I),this.disposables.add(O),this.internals=new I9(this,f,P,f.overrideStyles,y,w,x),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};jvt=s6([df(7,So),df(8,Zo),df(9,gk),df(10,El)],jvt);function Zxt(c){const e=c.getValue(Cze);if(e==="highlight")return A4.Highlight;if(e==="filter")return A4.Filter;const i=c.getValue(Bve);if(i==="simple"||i==="highlight")return A4.Highlight;if(i==="filter")return A4.Filter}function Yxt(c){const e=c.getValue(wze);if(e==="fuzzy")return E9.Fuzzy;if(e==="contiguous")return E9.Contiguous}function qne(c,e){var i;const n=c.get(El),s=c.get(n6),l=c.get(Zo),d=c.get(So),f=()=>{const P=l.getContextKeyValue(Kxt);if(P==="automatic")return JN.Automatic;if(P==="trigger"||l.getContextKeyValue(Qxt)===!1)return JN.Trigger;const W=n.getValue(Sze);if(W==="automatic")return JN.Automatic;if(W==="trigger")return JN.Trigger},g=e.horizontalScrolling!==void 0?e.horizontalScrolling:!!n.getValue(sk),[y,w]=d.invokeFunction(Uye,e),x=e.paddingBottom,I=e.renderIndentGuides!==void 0?e.renderIndentGuides:n.getValue(Wve);return{getTypeNavigationMode:f,disposable:w,options:{keyboardSupport:!1,...y,indent:typeof n.getValue(Tie)=="number"?n.getValue(Tie):void 0,renderIndentGuides:I,smoothScrolling:!!n.getValue(OE),defaultFindMode:Zxt(n),defaultFindMatchType:Yxt(n),horizontalScrolling:g,scrollByPage:!!n.getValue(AE),paddingBottom:x,hideTwistiesOfChildlessElements:e.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(i=e.expandOnlyOnTwistieClick)!==null&&i!==void 0?i:n.getValue(Vve)==="doubleClick",contextViewProvider:s,findWidgetStyles:O0i,enableStickyScroll:!!n.getValue(Hve),stickyScrollMaxItemCount:Number(n.getValue(jve))}}}let I9=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,i,n,s,l,d,f){var g;this.tree=e,this.disposables=[],this.contextKeyService=jye(l,e),this.disposables.push(zye(this.contextKeyService,e)),this.listSupportsMultiSelect=Vye.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(i.multipleSelectionSupport!==!1),Hye.bindTo(this.contextKeyService).set(!!i.selectionNavigation),this.listSupportFindWidget=p1i.bindTo(this.contextKeyService),this.listSupportFindWidget.set((g=i.findWidgetEnabled)!==null&&g!==void 0?g:!0),this.hasSelectionOrFocus=gze.bindTo(this.contextKeyService),this.hasDoubleSelection=mze.bindTo(this.contextKeyService),this.hasMultiSelection=vze.bindTo(this.contextKeyService),this.treeElementCanCollapse=yze.bindTo(this.contextKeyService),this.treeElementHasParent=g1i.bindTo(this.contextKeyService),this.treeElementCanExpand=bze.bindTo(this.contextKeyService),this.treeElementHasChild=m1i.bindTo(this.contextKeyService),this.treeFindOpen=v1i.bindTo(this.contextKeyService),this.treeStickyScrollFocused=Jxt.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=yL(f),this.updateStyleOverrides(s);const w=()=>{const I=e.getFocus()[0];if(!I)return;const P=e.getNode(I);this.treeElementCanCollapse.set(P.collapsible&&!P.collapsed),this.treeElementHasParent.set(!!e.getParentElement(I)),this.treeElementCanExpand.set(P.collapsible&&P.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(I))},x=new Set;x.add(Kxt),x.add(Qxt),this.disposables.push(this.contextKeyService,d.register(e),e.onDidChangeSelection(()=>{const I=e.getSelection(),P=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(I.length>0||P.length>0),this.hasMultiSelection.set(I.length>1),this.hasDoubleSelection.set(I.length===2)})}),e.onDidChangeFocus(()=>{const I=e.getSelection(),P=e.getFocus();this.hasSelectionOrFocus.set(I.length>0||P.length>0),w()}),e.onDidChangeCollapseState(w),e.onDidChangeModel(w),e.onDidChangeFindOpenState(I=>this.treeFindOpen.set(I)),e.onDidChangeStickyScrollFocused(I=>this.treeStickyScrollFocused.set(I)),f.onDidChangeConfiguration(I=>{let P={};if(I.affectsConfiguration(sB)&&(this._useAltAsMultipleSelectionModifier=yL(f)),I.affectsConfiguration(Tie)){const O=f.getValue(Tie);P={...P,indent:O}}if(I.affectsConfiguration(Wve)&&i.renderIndentGuides===void 0){const O=f.getValue(Wve);P={...P,renderIndentGuides:O}}if(I.affectsConfiguration(OE)){const O=!!f.getValue(OE);P={...P,smoothScrolling:O}}if(I.affectsConfiguration(Cze)||I.affectsConfiguration(Bve)){const O=Zxt(f);P={...P,defaultFindMode:O}}if(I.affectsConfiguration(Sze)||I.affectsConfiguration(Bve)){const O=n();P={...P,typeNavigationMode:O}}if(I.affectsConfiguration(wze)){const O=Yxt(f);P={...P,defaultFindMatchType:O}}if(I.affectsConfiguration(sk)&&i.horizontalScrolling===void 0){const O=!!f.getValue(sk);P={...P,horizontalScrolling:O}}if(I.affectsConfiguration(AE)){const O=!!f.getValue(AE);P={...P,scrollByPage:O}}if(I.affectsConfiguration(Vve)&&i.expandOnlyOnTwistieClick===void 0&&(P={...P,expandOnlyOnTwistieClick:f.getValue(Vve)==="doubleClick"}),I.affectsConfiguration(Hve)){const O=f.getValue(Hve);P={...P,enableStickyScroll:O}}if(I.affectsConfiguration(jve)){const O=Math.max(1,f.getValue(jve));P={...P,stickyScrollMaxItemCount:O}}if(I.affectsConfiguration(mL)){const O=f.getValue(mL);P={...P,mouseWheelScrollSensitivity:O}}if(I.affectsConfiguration(vL)){const O=f.getValue(vL);P={...P,fastScrollSensitivity:O}}Object.keys(P).length>0&&e.updateOptions(P)}),this.contextKeyService.onDidChangeContext(I=>{I.affectsSome(x)&&e.updateOptions({typeNavigationMode:n()})})),this.navigator=new C1i(e,{configurationService:f,...i}),this.disposables.push(this.navigator)}updateOptions(e){e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?nB(e):iB)}dispose(){this.disposables=yd(this.disposables)}};I9=s6([df(4,Zo),df(5,gk),df(6,El)],I9);const w1i=dh.as(WE.Configuration);w1i.registerConfiguration({id:"workbench",order:7,title:V("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[sB]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[V("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),V("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:V({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[c0e]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:V({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[sk]:{type:"boolean",default:!1,description:V("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[AE]:{type:"boolean",default:!1,description:V("list.scrollByPage","Controls whether clicks in the scrollbar scroll page by page.")},[Tie]:{type:"number",default:8,minimum:4,maximum:40,description:V("tree indent setting","Controls tree indentation in pixels.")},[Wve]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:V("render tree indent guides","Controls whether the tree should render indent guides.")},[OE]:{type:"boolean",default:!1,description:V("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[mL]:{type:"number",default:1,markdownDescription:V("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[vL]:{type:"number",default:5,markdownDescription:V("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[Cze]:{type:"string",enum:["highlight","filter"],enumDescriptions:[V("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),V("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:V("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[Bve]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[V("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),V("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),V("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:V("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:V("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' and 'workbench.list.typeNavigationMode' instead.")},[wze]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[V("defaultFindMatchTypeSettingKey.fuzzy","Use fuzzy matching when searching."),V("defaultFindMatchTypeSettingKey.contiguous","Use contiguous matching when searching.")],default:"fuzzy",description:V("defaultFindMatchTypeSettingKey","Controls the type of matching used when searching lists and trees in the workbench.")},[Vve]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:V("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[Hve]:{type:"boolean",default:!0,description:V("sticky scroll","Controls whether sticky scrolling is enabled in trees.")},[jve]:{type:"number",minimum:1,default:7,markdownDescription:V("sticky scroll maximum items","Controls the number of sticky elements displayed in the tree when `#workbench.tree.enableStickyScroll#` is enabled.")},[Sze]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:V("typeNavigationMode2","Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}});class qM extends Ii{constructor(e,i){var n;super(),this.options=i,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=(n=i==null?void 0:i.supportIcons)!==null&&n!==void 0?n:!1,this.domNode=zn(e,Sr("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,i=[],n="",s){e||(e=""),s&&(e=qM.escapeNewLines(e,i)),!(this.didEverRender&&this.text===e&&this.title===n&&vw(this.highlights,i))&&(this.text=e,this.title=n,this.highlights=i,this.render())}render(){var e,i,n,s;const l=[];let d=0;for(const f of this.highlights){if(f.end===f.start)continue;if(d{s=l===`\r +`?-1:0,d+=n;for(const f of i)f.end<=d||(f.start>=d&&(f.start+=s),f.end>=d&&(f.end+=s));return n+=s,"⏎"})}}class lee{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class zve extends Ii{constructor(e,i){var n;super(),this.customHovers=new Map,this.creationOptions=i,this.domNode=this._register(new lee(zn(e,Sr(".monaco-icon-label")))),this.labelContainer=zn(this.domNode.element,Sr(".monaco-icon-label-container")),this.nameContainer=zn(this.labelContainer,Sr("span.monaco-icon-name-container")),i!=null&&i.supportHighlights||i!=null&&i.supportIcons?this.nameNode=this._register(new T1i(this.nameContainer,!!i.supportIcons)):this.nameNode=new x1i(this.nameContainer),this.hoverDelegate=(n=i==null?void 0:i.hoverDelegate)!==null&&n!==void 0?n:Py("mouse")}get element(){return this.domNode.element}setLabel(e,i,n){var s;const l=["monaco-icon-label"],d=["monaco-icon-label-container"];let f="";n&&(n.extraClasses&&l.push(...n.extraClasses),n.italic&&l.push("italic"),n.strikethrough&&l.push("strikethrough"),n.disabledCommand&&d.push("disabled"),n.title&&(typeof n.title=="string"?f+=n.title:f+=e));const g=this.domNode.element.querySelector(".monaco-icon-label-iconpath");if(n!=null&&n.iconPath){let y;!g||!Sm(g)?(y=Sr(".monaco-icon-label-iconpath"),this.domNode.element.prepend(y)):y=g,y.style.backgroundImage=G4(n==null?void 0:n.iconPath)}else g&&g.remove();if(this.domNode.className=l.join(" "),this.domNode.element.setAttribute("aria-label",f),this.labelContainer.className=d.join(" "),this.setupHover(n!=null&&n.descriptionTitle?this.labelContainer:this.element,n==null?void 0:n.title),this.nameNode.setLabel(e,n),i||this.descriptionNode){const y=this.getOrCreateDescriptionNode();y instanceof qM?(y.set(i||"",n?n.descriptionMatches:void 0,void 0,n==null?void 0:n.labelEscapeNewLines),this.setupHover(y.element,n==null?void 0:n.descriptionTitle)):(y.textContent=i&&(n!=null&&n.labelEscapeNewLines)?qM.escapeNewLines(i,[]):i||"",this.setupHover(y.element,(n==null?void 0:n.descriptionTitle)||""),y.empty=!i)}if(n!=null&&n.suffix||this.suffixNode){const y=this.getOrCreateSuffixNode();y.textContent=(s=n==null?void 0:n.suffix)!==null&&s!==void 0?s:""}}setupHover(e,i){const n=this.customHovers.get(e);if(n&&(n.dispose(),this.customHovers.delete(e)),!i){e.removeAttribute("title");return}if(this.hoverDelegate.showNativeHover)(function(l,d){xy(d)?l.title=Zje(d):d!=null&&d.markdownNotSupportedFallback?l.title=d.markdownNotSupportedFallback:l.removeAttribute("title")})(e,i);else{const s=HE().setupUpdatableHover(this.hoverDelegate,e,i);s&&this.customHovers.set(e,s)}}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){const e=this._register(new lee(yri(this.nameContainer,Sr("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new lee(zn(e.element,Sr("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){var e;if(!this.descriptionNode){const i=this._register(new lee(zn(this.labelContainer,Sr("span.monaco-icon-description-container"))));!((e=this.creationOptions)===null||e===void 0)&&e.supportDescriptionHighlights?this.descriptionNode=this._register(new qM(zn(i.element,Sr("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons})):this.descriptionNode=this._register(new lee(zn(i.element,Sr("span.label-description"))))}return this.descriptionNode}}class x1i{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,i){if(!(this.label===e&&vw(this.options,i)))if(this.label=e,this.options=i,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=zn(this.container,Sr("a.label-name",{id:i==null?void 0:i.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let n=0;n{const l={start:n,end:n+s.length},d=i.map(f=>pv.intersect(l,f)).filter(f=>!pv.isEmpty(f)).map(({start:f,end:g})=>({start:f-n,end:g-n}));return n=l.end+e.length,d})}class T1i extends Ii{constructor(e,i){super(),this.container=e,this.supportIcons=i,this.label=void 0,this.singleLabel=void 0}setLabel(e,i){if(!(this.label===e&&vw(this.options,i)))if(this.label=e,this.options=i,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=this._register(new qM(zn(this.container,Sr("a.label-name",{id:i==null?void 0:i.domId})),{supportIcons:this.supportIcons}))),this.singleLabel.set(e,i==null?void 0:i.matches,void 0,i==null?void 0:i.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const n=(i==null?void 0:i.separator)||"/",s=k1i(e,n,i==null?void 0:i.matches);for(let l=0;l{const c=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:c,collatorIsNumeric:c.resolvedOptions().numeric}});function D1i(c,e,i=!1){const n=c||"",s=e||"",l=zvt.value.collator.compare(n,s);return zvt.value.collatorIsNumeric&&l===0&&n!==s?ns.length)return 1}return 0}var qye=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},OBe=function(c,e){return function(i,n){e(i,n,c)}},MBe;const ZD=Sr;class tkt{constructor(e,i,n){this.index=e,this.hasCheckbox=i,this._hidden=!1,this._init=new FE(()=>{var s;const l=(s=n.label)!==null&&s!==void 0?s:"",d=Ree(l).text.trim(),f=n.ariaLabel||[l,this.saneDescription,this.saneDetail].map(g=>rgi(g)).filter(g=>!!g).join(", ");return{saneLabel:l,saneSortLabel:d,saneAriaLabel:f}}),this._saneDescription=n.description,this._saneTooltip=n.tooltip}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get saneDescription(){return this._saneDescription}set saneDescription(e){this._saneDescription=e}get saneDetail(){return this._saneDetail}set saneDetail(e){this._saneDetail=e}get saneTooltip(){return this._saneTooltip}set saneTooltip(e){this._saneTooltip=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}}class y1 extends tkt{constructor(e,i,n,s,l,d){var f,g,y;super(e,i,l),this.fireButtonTriggered=n,this._onChecked=s,this.item=l,this._separator=d,this._checked=!1,this.onChecked=i?Mr.map(Mr.filter(this._onChecked.event,w=>w.element===this),w=>w.checked):Mr.None,this._saneDetail=l.detail,this._labelHighlights=(f=l.highlights)===null||f===void 0?void 0:f.label,this._descriptionHighlights=(g=l.highlights)===null||g===void 0?void 0:g.description,this._detailHighlights=(y=l.highlights)===null||y===void 0?void 0:y.detail}get separator(){return this._separator}set separator(e){this._separator=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({element:this,checked:e}))}get checkboxDisabled(){return!!this.item.disabled}}var BN;(function(c){c[c.NONE=0]="NONE",c[c.MOUSE_HOVER=1]="MOUSE_HOVER",c[c.ACTIVE_ITEM=2]="ACTIVE_ITEM"})(BN||(BN={}));class sM extends tkt{constructor(e,i,n){super(e,!1,n),this.fireSeparatorButtonTriggered=i,this.separator=n,this.children=new Array,this.focusInsideSeparator=BN.NONE}}class N1i{getHeight(e){return e instanceof sM?30:e.saneDetail?44:22}getTemplateId(e){return e instanceof y1?Die.ID:$ne.ID}}class L1i{getWidgetAriaLabel(){return V("quickInput","Quick Input")}getAriaLabel(e){var i;return!((i=e.separator)===null||i===void 0)&&i.label?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(!(!e.hasCheckbox||!(e instanceof y1)))return{get value(){return e.checked},onDidChange:i=>e.onChecked(()=>i())}}}class ikt{constructor(e){this.hoverDelegate=e}renderTemplate(e){const i=Object.create(null);i.toDisposeElement=new On,i.toDisposeTemplate=new On,i.entry=zn(e,ZD(".quick-input-list-entry"));const n=zn(i.entry,ZD("label.quick-input-list-label"));i.toDisposeTemplate.add(n_(n,yr.CLICK,y=>{i.checkbox.offsetParent||y.preventDefault()})),i.checkbox=zn(n,ZD("input.quick-input-list-checkbox")),i.checkbox.type="checkbox";const s=zn(n,ZD(".quick-input-list-rows")),l=zn(s,ZD(".quick-input-list-row")),d=zn(s,ZD(".quick-input-list-row"));i.label=new zve(l,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),i.toDisposeTemplate.add(i.label),i.icon=VHe(i.label.element,ZD(".quick-input-list-icon"));const f=zn(l,ZD(".quick-input-list-entry-keybinding"));i.keybinding=new Kq(f,FC),i.toDisposeTemplate.add(i.keybinding);const g=zn(d,ZD(".quick-input-list-label-meta"));return i.detail=new zve(g,{supportHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),i.toDisposeTemplate.add(i.detail),i.separator=zn(i.entry,ZD(".quick-input-list-separator")),i.actionBar=new uk(i.entry,this.hoverDelegate?{hoverDelegate:this.hoverDelegate}:void 0),i.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),i.toDisposeTemplate.add(i.actionBar),i}disposeTemplate(e){e.toDisposeElement.dispose(),e.toDisposeTemplate.dispose()}disposeElement(e,i,n){n.toDisposeElement.clear(),n.actionBar.clear()}}let Die=MBe=class extends ikt{constructor(e,i){super(e),this.themeService=i,this._itemsWithSeparatorsFrequency=new Map}get templateId(){return MBe.ID}renderTemplate(e){const i=super.renderTemplate(e);return i.toDisposeTemplate.add(n_(i.checkbox,yr.CHANGE,n=>{i.element.checked=i.checkbox.checked})),i}renderElement(e,i,n){var s,l,d;const f=e.element;n.element=f,f.element=(s=n.entry)!==null&&s!==void 0?s:void 0;const g=f.item;n.checkbox.checked=f.checked,n.toDisposeElement.add(f.onChecked(W=>n.checkbox.checked=W)),n.checkbox.disabled=f.checkboxDisabled;const{labelHighlights:y,descriptionHighlights:w,detailHighlights:x}=f;if(g.iconPath){const W=rq(this.themeService.getColorTheme().type)?g.iconPath.dark:(l=g.iconPath.light)!==null&&l!==void 0?l:g.iconPath.dark,X=Oo.revive(W);n.icon.className="quick-input-list-icon",n.icon.style.backgroundImage=G4(X)}else n.icon.style.backgroundImage="",n.icon.className=g.iconClass?`quick-input-list-icon ${g.iconClass}`:"";let I;!f.saneTooltip&&f.saneDescription&&(I={markdown:{value:f.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:f.saneDescription});const P={matches:y||[],descriptionTitle:I,descriptionMatches:w||[],labelEscapeNewLines:!0};if(P.extraClasses=g.iconClasses,P.italic=g.italic,P.strikethrough=g.strikethrough,n.entry.classList.remove("quick-input-list-separator-as-item"),n.label.setLabel(f.saneLabel,f.saneDescription,P),n.keybinding.set(g.keybinding),f.saneDetail){let W;f.saneTooltip||(W={markdown:{value:f.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:f.saneDetail}),n.detail.element.style.display="",n.detail.setLabel(f.saneDetail,void 0,{matches:x,title:W,labelEscapeNewLines:!0})}else n.detail.element.style.display="none";!((d=f.separator)===null||d===void 0)&&d.label?(n.separator.textContent=f.separator.label,n.separator.style.display="",this.addItemWithSeparator(f)):n.separator.style.display="none",n.entry.classList.toggle("quick-input-list-separator-border",!!f.separator);const O=g.buttons;O&&O.length?(n.actionBar.push(O.map((W,X)=>Ave(W,`id-${X}`,()=>f.fireButtonTriggered({button:W,item:f.item}))),{icon:!0,label:!1}),n.entry.classList.add("has-actions")):n.entry.classList.remove("has-actions")}disposeElement(e,i,n){this.removeItemWithSeparator(e.element),super.disposeElement(e,i,n)}isItemWithSeparatorVisible(e){return this._itemsWithSeparatorsFrequency.has(e)}addItemWithSeparator(e){this._itemsWithSeparatorsFrequency.set(e,(this._itemsWithSeparatorsFrequency.get(e)||0)+1)}removeItemWithSeparator(e){const i=this._itemsWithSeparatorsFrequency.get(e)||0;i>1?this._itemsWithSeparatorsFrequency.set(e,i-1):this._itemsWithSeparatorsFrequency.delete(e)}};Die.ID="quickpickitem";Die=MBe=qye([OBe(1,og)],Die);class $ne extends ikt{constructor(){super(...arguments),this._visibleSeparatorsFrequency=new Map}get templateId(){return $ne.ID}get visibleSeparators(){return[...this._visibleSeparatorsFrequency.keys()]}isSeparatorVisible(e){return this._visibleSeparatorsFrequency.has(e)}renderElement(e,i,n){var s;const l=e.element;n.element=l,l.element=(s=n.entry)!==null&&s!==void 0?s:void 0,l.element.classList.toggle("focus-inside",!!l.focusInsideSeparator);const d=l.separator,{labelHighlights:f,descriptionHighlights:g,detailHighlights:y}=l;n.icon.style.backgroundImage="",n.icon.className="";let w;!l.saneTooltip&&l.saneDescription&&(w={markdown:{value:l.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:l.saneDescription});const x={matches:f||[],descriptionTitle:w,descriptionMatches:g||[],labelEscapeNewLines:!0};if(n.entry.classList.add("quick-input-list-separator-as-item"),n.label.setLabel(l.saneLabel,l.saneDescription,x),l.saneDetail){let P;l.saneTooltip||(P={markdown:{value:l.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:l.saneDetail}),n.detail.element.style.display="",n.detail.setLabel(l.saneDetail,void 0,{matches:y,title:P,labelEscapeNewLines:!0})}else n.detail.element.style.display="none";n.separator.style.display="none",n.entry.classList.add("quick-input-list-separator-border");const I=d.buttons;I&&I.length?(n.actionBar.push(I.map((P,O)=>Ave(P,`id-${O}`,()=>l.fireSeparatorButtonTriggered({button:P,separator:l.separator}))),{icon:!0,label:!1}),n.entry.classList.add("has-actions")):n.entry.classList.remove("has-actions"),this.addSeparator(l)}disposeElement(e,i,n){var s;this.removeSeparator(e.element),this.isSeparatorVisible(e.element)||(s=e.element.element)===null||s===void 0||s.classList.remove("focus-inside"),super.disposeElement(e,i,n)}addSeparator(e){this._visibleSeparatorsFrequency.set(e,(this._visibleSeparatorsFrequency.get(e)||0)+1)}removeSeparator(e){const i=this._visibleSeparatorsFrequency.get(e)||0;i>1?this._visibleSeparatorsFrequency.set(e,i-1):this._visibleSeparatorsFrequency.delete(e)}}$ne.ID="quickpickseparator";let Eie=class extends Ii{constructor(e,i,n,s,l,d){super(),this.parent=e,this.hoverDelegate=i,this.linkOpenerDelegate=n,this.accessibilityService=d,this._onKeyDown=new ui,this._onLeave=new ui,this.onLeave=this._onLeave.event,this._onChangedAllVisibleChecked=new ui,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new ui,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new ui,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new ui,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new ui,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new ui,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._elementChecked=new ui,this._inputElements=new Array,this._elementTree=new Array,this._itemElements=new Array,this._elementDisposable=this._register(new On),this._shouldFireCheckedEvents=!0,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._shouldLoop=!0,this._container=zn(this.parent,ZD(".quick-input-list")),this._separatorRenderer=new $ne(i),this._itemRenderer=l.createInstance(Die,i),this._tree=this._register(l.createInstance(PBe,"QuickInput",this._container,new N1i,[this._itemRenderer,this._separatorRenderer],{accessibilityProvider:new L1i,setRowLineHeight:!1,multipleSelectionSupport:!1,hideTwistiesOfChildlessElements:!0,renderIndentGuides:vq.None,findWidgetEnabled:!1,indent:0,horizontalScrolling:!1,allowNonCollapsibleParents:!0,alwaysConsumeMouseWheel:!0})),this._tree.getHTMLElement().id=s,this._registerListeners()}get onDidChangeFocus(){return Mr.map(this._tree.onDidChangeFocus,e=>e.elements.filter(i=>i instanceof y1).map(i=>i.item))}get onDidChangeSelection(){return Mr.map(this._tree.onDidChangeSelection,e=>({items:e.elements.filter(i=>i instanceof y1).map(i=>i.item),event:e.browserEvent}))}get scrollTop(){return this._tree.scrollTop}set scrollTop(e){this._tree.scrollTop=e}get ariaLabel(){return this._tree.ariaLabel}set ariaLabel(e){this._tree.ariaLabel=e??""}set enabled(e){this._tree.getHTMLElement().style.pointerEvents=e?"":"none"}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e}get shouldLoop(){return this._shouldLoop}set shouldLoop(e){this._shouldLoop=e}_registerListeners(){this._registerOnKeyDown(),this._registerOnContainerClick(),this._registerOnMouseMiddleClick(),this._registerOnElementChecked(),this._registerOnContextMenu(),this._registerHoverListeners(),this._registerSelectionChangeListener(),this._registerSeparatorActionShowingListeners()}_registerOnKeyDown(){this._register(this._tree.onKeyDown(e=>{const i=new Fd(e);switch(i.keyCode){case 10:this.toggleCheckbox();break}this._onKeyDown.fire(i)}))}_registerOnContainerClick(){this._register(tn(this._container,yr.CLICK,e=>{(e.x||e.y)&&this._onLeave.fire()}))}_registerOnMouseMiddleClick(){this._register(tn(this._container,yr.AUXCLICK,e=>{e.button===1&&this._onLeave.fire()}))}_registerOnElementChecked(){this._register(this._elementChecked.event(e=>this._fireCheckedEvents()))}_registerOnContextMenu(){this._register(this._tree.onContextMenu(e=>{e.element&&(e.browserEvent.preventDefault(),this._tree.setSelection([e.element]))}))}_registerHoverListeners(){const e=this._register(new rCt(this.hoverDelegate.delay));this._register(this._tree.onMouseOver(async i=>{var n;if(bgt(i.browserEvent.target)){e.cancel();return}if(!(!bgt(i.browserEvent.relatedTarget)&&Wg(i.browserEvent.relatedTarget,(n=i.element)===null||n===void 0?void 0:n.element)))try{await e.trigger(async()=>{i.element instanceof y1&&this.showHover(i.element)})}catch(s){if(!pT(s))throw s}})),this._register(this._tree.onMouseOut(i=>{var n;Wg(i.browserEvent.relatedTarget,(n=i.element)===null||n===void 0?void 0:n.element)||e.cancel()}))}_registerSeparatorActionShowingListeners(){this._register(this._tree.onDidChangeFocus(e=>{const i=e.elements[0]?this._tree.getParentElement(e.elements[0]):null;for(const n of this._separatorRenderer.visibleSeparators){const s=n===i;!!(n.focusInsideSeparator&BN.ACTIVE_ITEM)!==s&&(s?n.focusInsideSeparator|=BN.ACTIVE_ITEM:n.focusInsideSeparator&=~BN.ACTIVE_ITEM,this._tree.rerender(n))}})),this._register(this._tree.onMouseOver(e=>{const i=e.element?this._tree.getParentElement(e.element):null;for(const n of this._separatorRenderer.visibleSeparators){if(n!==i)continue;!!(n.focusInsideSeparator&BN.MOUSE_HOVER)||(n.focusInsideSeparator|=BN.MOUSE_HOVER,this._tree.rerender(n))}})),this._register(this._tree.onMouseOut(e=>{const i=e.element?this._tree.getParentElement(e.element):null;for(const n of this._separatorRenderer.visibleSeparators){if(n!==i)continue;!!(n.focusInsideSeparator&BN.MOUSE_HOVER)&&(n.focusInsideSeparator&=~BN.MOUSE_HOVER,this._tree.rerender(n))}}))}_registerSelectionChangeListener(){this._register(this._tree.onDidChangeSelection(e=>{const i=e.elements.filter(n=>n instanceof y1);i.length!==e.elements.length&&(e.elements.length===1&&e.elements[0]instanceof sM&&(this._tree.setFocus([e.elements[0].children[0]]),this._tree.reveal(e.elements[0],0)),this._tree.setSelection(i))}))}getAllVisibleChecked(){return this._allVisibleChecked(this._itemElements,!1)}getCheckedCount(){return this._itemElements.filter(e=>e.checked).length}getVisibleCount(){return this._itemElements.filter(e=>!e.hidden).length}setAllVisibleChecked(e){try{this._shouldFireCheckedEvents=!1,this._itemElements.forEach(i=>{!i.hidden&&!i.checkboxDisabled&&(i.checked=e)})}finally{this._shouldFireCheckedEvents=!0,this._fireCheckedEvents()}}setElements(e){this._elementDisposable.clear(),this._inputElements=e;const i=this.parent.classList.contains("show-checkboxes");let n;this._itemElements=new Array,this._elementTree=e.reduce((d,f,g)=>{let y;if(f.type==="separator"){if(!f.buttons)return d;n=new sM(g,w=>this.fireSeparatorButtonTriggered(w),f),y=n}else{const w=g>0?e[g-1]:void 0;let x;w&&w.type==="separator"&&!w.buttons&&(n=void 0,x=w);const I=new y1(g,i,P=>this.fireButtonTriggered(P),this._elementChecked,f,x);if(this._itemElements.push(I),n)return n.children.push(I),d;y=I}return d.push(y),d},new Array);const s=new Array;let l=0;for(const d of this._elementTree)d instanceof sM?(s.push({element:d,collapsible:!1,collapsed:!1,children:d.children.map(f=>({element:f,collapsible:!1,collapsed:!1}))}),l+=d.children.length+1):(s.push({element:d,collapsible:!1,collapsed:!1}),l++);this._tree.setChildren(null,s),this._onChangedVisibleCount.fire(l),this.accessibilityService.isScreenReaderOptimized()&&setTimeout(()=>{const d=this._tree.getHTMLElement().querySelector(".monaco-list-row.focused"),f=d==null?void 0:d.parentNode;if(d&&f){const g=d.nextSibling;f.removeChild(d),f.insertBefore(d,g)}},0)}setFocusedElements(e){const i=e.map(n=>this._itemElements.find(s=>s.item===n)).filter(n=>!!n);if(this._tree.setFocus(i),e.length>0){const n=this._tree.getFocus()[0];n&&this._tree.reveal(n)}}getActiveDescendant(){return this._tree.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){const i=e.map(n=>this._itemElements.find(s=>s.item===n)).filter(n=>!!n);this._tree.setSelection(i)}getCheckedElements(){return this._itemElements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){try{this._shouldFireCheckedEvents=!1;const i=new Set;for(const n of e)i.add(n);for(const n of this._itemElements)n.checked=i.has(n.item)}finally{this._shouldFireCheckedEvents=!0,this._fireCheckedEvents()}}focus(e){var i;if(this._itemElements.length)switch(e===lf.Second&&this._itemElements.length<2&&(e=lf.First),e){case lf.First:this._tree.scrollTop=0,this._tree.focusFirst(void 0,n=>n.element instanceof y1);break;case lf.Second:this._tree.scrollTop=0,this._tree.setFocus([this._itemElements[1]]);break;case lf.Last:this._tree.scrollTop=this._tree.scrollHeight,this._tree.setFocus([this._itemElements[this._itemElements.length-1]]);break;case lf.Next:{const n=this._tree.getFocus();this._tree.focusNext(void 0,this._shouldLoop,void 0,l=>l.element instanceof y1?(this._tree.reveal(l.element),!0):!1);const s=this._tree.getFocus();n.length&&n[0]===s[0]&&n[0]===this._itemElements[this._itemElements.length-1]&&this._onLeave.fire();break}case lf.Previous:{const n=this._tree.getFocus();this._tree.focusPrevious(void 0,this._shouldLoop,void 0,l=>{if(!(l.element instanceof y1))return!1;const d=this._tree.getParentElement(l.element);return d===null||d.children[0]!==l.element?this._tree.reveal(l.element):this._tree.reveal(d),!0});const s=this._tree.getFocus();n.length&&n[0]===s[0]&&n[0]===this._itemElements[0]&&this._onLeave.fire();break}case lf.NextPage:this._tree.focusNextPage(void 0,n=>n.element instanceof y1?(this._tree.reveal(n.element),!0):!1);break;case lf.PreviousPage:this._tree.focusPreviousPage(void 0,n=>{if(!(n.element instanceof y1))return!1;const s=this._tree.getParentElement(n.element);return s===null||s.children[0]!==n.element?this._tree.reveal(n.element):this._tree.reveal(s),!0});break;case lf.NextSeparator:{let n=!1;const s=this._tree.getFocus()[0];this._tree.focusNext(void 0,!0,void 0,d=>{if(n)return!0;if(d.element instanceof sM)n=!0,this._separatorRenderer.isSeparatorVisible(d.element)?this._tree.reveal(d.element.children[0]):this._tree.reveal(d.element,0);else if(d.element instanceof y1){if(d.element.separator)return this._itemRenderer.isItemWithSeparatorVisible(d.element)?this._tree.reveal(d.element):this._tree.reveal(d.element,0),!0;if(d.element===this._elementTree[0])return this._tree.reveal(d.element,0),!0}return!1});const l=this._tree.getFocus()[0];s===l&&(this._tree.scrollTop=this._tree.scrollHeight,this._tree.setFocus([this._itemElements[this._itemElements.length-1]]));break}case lf.PreviousSeparator:{let n,s=!!(!((i=this._tree.getFocus()[0])===null||i===void 0)&&i.separator);this._tree.focusPrevious(void 0,!0,void 0,l=>{if(l.element instanceof sM)s?n||(this._separatorRenderer.isSeparatorVisible(l.element)?this._tree.reveal(l.element):this._tree.reveal(l.element,0),n=l.element.children[0]):s=!0;else if(l.element instanceof y1&&!n){if(l.element.separator)this._itemRenderer.isItemWithSeparatorVisible(l.element)?this._tree.reveal(l.element):this._tree.reveal(l.element,0),n=l.element;else if(l.element===this._elementTree[0])return this._tree.reveal(l.element,0),!0}return!1}),n&&this._tree.setFocus([n]);break}}}clearFocus(){this._tree.setFocus([])}domFocus(){this._tree.domFocus()}layout(e){this._tree.getHTMLElement().style.maxHeight=e?`${Math.floor(e/44)*44+6}px`:"",this._tree.layout()}filter(e){if(!(this._sortByLabel||this._matchOnLabel||this._matchOnDescription||this._matchOnDetail))return this._tree.layout(),!1;const i=e;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this._itemElements.forEach(f=>{f.labelHighlights=void 0,f.descriptionHighlights=void 0,f.detailHighlights=void 0,f.hidden=!1;const g=f.index&&this._inputElements[f.index-1];f.item&&(f.separator=g&&g.type==="separator"&&!g.buttons?g:void 0)});else{let f;this._elementTree.forEach(g=>{var y,w,x,I;let P;this.matchOnLabelMode==="fuzzy"?P=this.matchOnLabel&&(y=L7e(e,Ree(g.saneLabel)))!==null&&y!==void 0?y:void 0:P=this.matchOnLabel&&(w=P1i(i,Ree(g.saneLabel)))!==null&&w!==void 0?w:void 0;const O=this.matchOnDescription&&(x=L7e(e,Ree(g.saneDescription||"")))!==null&&x!==void 0?x:void 0,W=this.matchOnDetail&&(I=L7e(e,Ree(g.saneDetail||"")))!==null&&I!==void 0?I:void 0;if(P||O||W?(g.labelHighlights=P,g.descriptionHighlights=O,g.detailHighlights=W,g.hidden=!1):(g.labelHighlights=void 0,g.descriptionHighlights=void 0,g.detailHighlights=void 0,g.hidden=g.item?!g.item.alwaysShow:!0),g.item?g.separator=void 0:g.separator&&(g.hidden=!0),!this.sortByLabel){const X=g.index&&this._inputElements[g.index-1];f=X&&X.type==="separator"?X:f,f&&!g.hidden&&(g.separator=f,f=void 0)}})}const n=this._elementTree.filter(f=>!f.hidden);if(this.sortByLabel&&e){const f=e.toLowerCase();n.sort((g,y)=>A1i(g,y,f))}let s;const l=n.reduce((f,g,y)=>(g instanceof y1?s?s.children.push(g):f.push(g):g instanceof sM&&(g.children=[],s=g,f.push(g)),f),new Array),d=new Array;for(const f of l)f instanceof sM?d.push({element:f,collapsible:!1,collapsed:!1,children:f.children.map(g=>({element:g,collapsible:!1,collapsed:!1}))}):d.push({element:f,collapsible:!1,collapsed:!1});return this._tree.setChildren(null,d),this._tree.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(n.length),!0}toggleCheckbox(){try{this._shouldFireCheckedEvents=!1;const e=this._tree.getFocus().filter(n=>n instanceof y1),i=this._allVisibleChecked(e);for(const n of e)n.checkboxDisabled||(n.checked=!i)}finally{this._shouldFireCheckedEvents=!0,this._fireCheckedEvents()}}display(e){this._container.style.display=e?"":"none"}isDisplayed(){return this._container.style.display!=="none"}style(e){this._tree.style(e)}toggleHover(){const e=this._tree.getFocus()[0];if(!(e!=null&&e.saneTooltip)||!(e instanceof y1))return;if(this._lastHover&&!this._lastHover.isDisposed){this._lastHover.dispose();return}this.showHover(e);const i=new On;i.add(this._tree.onDidChangeFocus(n=>{n.elements[0]instanceof y1&&this.showHover(n.elements[0])})),this._lastHover&&i.add(this._lastHover),this._elementDisposable.add(i)}_allVisibleChecked(e,i=!0){for(let n=0,s=e.length;n{this.linkOpenerDelegate(l)},appearance:{showPointer:!0},container:this._container,position:{hoverPosition:1}},!1))}};qye([N_],Eie.prototype,"onDidChangeFocus",null);qye([N_],Eie.prototype,"onDidChangeSelection",null);Eie=qye([OBe(4,So),OBe(5,$C)],Eie);function P1i(c,e){const{text:i,iconOffsets:n}=e;if(!n||n.length===0)return Uvt(c,i);const s=pne(i," "),l=i.length-s.length,d=Uvt(c,s);if(d)for(const f of d){const g=n[f.start+l]+l;f.start+=g,f.end+=g}return d}function Uvt(c,e){const i=e.toLowerCase().indexOf(c.toLowerCase());return i!==-1?[{start:i,end:i+c.length}]:null}function A1i(c,e,i){const n=c.labelHighlights||[],s=e.labelHighlights||[];return n.length&&!s.length?-1:!n.length&&s.length?1:n.length===0&&s.length===0?0:E1i(c.saneSortLabel,e.saneSortLabel,i)}const nkt={weight:200,when:xn.and(xn.equals(Dxt,"quickPick"),avi),metadata:{description:V("quickPick","Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")}};function MC(c,e={}){var i;Ey.registerCommandAndKeybindingRule({...nkt,...c,secondary:O1i(c.primary,(i=c.secondary)!==null&&i!==void 0?i:[],e)})}const Uve=Wl?256:2048;function O1i(c,e,i={}){return i.withAltMod&&e.push(512+c),i.withCtrlMod&&(e.push(Uve+c),i.withAltMod&&e.push(512+Uve+c)),i.withCmdMod&&Wl&&(e.push(2048+c),i.withCtrlMod&&e.push(2304+c),i.withAltMod&&(e.push(2560+c),i.withCtrlMod&&e.push(2816+c))),e}function lw(c,e){return i=>{const n=i.get(pk).currentQuickInput;if(n)return e&&n.quickNavigate?n.focus(e):n.focus(c)}}MC({id:"quickInput.pageNext",primary:12,handler:lw(lf.NextPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});MC({id:"quickInput.pagePrevious",primary:11,handler:lw(lf.PreviousPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});MC({id:"quickInput.first",primary:Uve+14,handler:lw(lf.First)},{withAltMod:!0,withCmdMod:!0});MC({id:"quickInput.last",primary:Uve+13,handler:lw(lf.Last)},{withAltMod:!0,withCmdMod:!0});MC({id:"quickInput.next",primary:18,handler:lw(lf.Next)},{withCtrlMod:!0});MC({id:"quickInput.previous",primary:16,handler:lw(lf.Previous)},{withCtrlMod:!0});const qvt=V("quickInput.nextSeparatorWithQuickAccessFallback","If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator."),$vt=V("quickInput.previousSeparatorWithQuickAccessFallback","If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");Wl?(MC({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:2066,handler:lw(lf.NextSeparator,lf.Next),metadata:{description:qvt}}),MC({id:"quickInput.nextSeparator",primary:2578,secondary:[2322],handler:lw(lf.NextSeparator)},{withCtrlMod:!0}),MC({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:2064,handler:lw(lf.PreviousSeparator,lf.Previous),metadata:{description:$vt}}),MC({id:"quickInput.previousSeparator",primary:2576,secondary:[2320],handler:lw(lf.PreviousSeparator)},{withCtrlMod:!0})):(MC({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:530,handler:lw(lf.NextSeparator,lf.Next),metadata:{description:qvt}}),MC({id:"quickInput.nextSeparator",primary:2578,handler:lw(lf.NextSeparator)}),MC({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:528,handler:lw(lf.PreviousSeparator,lf.Previous),metadata:{description:$vt}}),MC({id:"quickInput.previousSeparator",primary:2576,handler:lw(lf.PreviousSeparator)}));MC({id:"quickInput.acceptInBackground",when:xn.and(nkt.when,xn.or(qxt.negate(),uvi)),primary:17,weight:250,handler:c=>{const e=c.get(pk).currentQuickInput;e==null||e.accept(!0)}},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});var M1i=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},$7e=function(c,e){return function(i,n){e(i,n,c)}},RBe;const PC=Sr;let qve=RBe=class extends Ii{get currentQuickInput(){var e;return(e=this.controller)!==null&&e!==void 0?e:void 0}get container(){return this._container}constructor(e,i,n,s){super(),this.options=e,this.layoutService=i,this.instantiationService=n,this.contextKeyService=s,this.enabled=!0,this.onDidAcceptEmitter=this._register(new ui),this.onDidCustomEmitter=this._register(new ui),this.onDidTriggerButtonEmitter=this._register(new ui),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new ui),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new ui),this.onHide=this.onHideEmitter.event,this.inQuickInputContext=ovi.bindTo(this.contextKeyService),this.quickInputTypeContext=lvi.bindTo(this.contextKeyService),this.endOfQuickInputBoxContext=cvi.bindTo(this.contextKeyService),this.idPrefix=e.idPrefix,this._container=e.container,this.styles=e.styles,this._register(Mr.runAndSubscribe(W1e,({window:l,disposables:d})=>this.registerKeyModsListeners(l,d),{window:ed,disposables:this._store})),this._register(nri(l=>{this.ui&&Io(this.ui.container)===l&&(this.reparentUI(this.layoutService.mainContainer),this.layout(this.layoutService.mainContainerDimension,this.layoutService.mainContainerOffset.quickPickTop))}))}registerKeyModsListeners(e,i){const n=s=>{this.keyMods.ctrlCmd=s.ctrlKey||s.metaKey,this.keyMods.alt=s.altKey};for(const s of[yr.KEY_DOWN,yr.KEY_UP,yr.MOUSE_DOWN])i.add(tn(e,s,n,!0))}getUI(e){if(this.ui)return e&&Io(this._container)!==Io(this.layoutService.activeContainer)&&(this.reparentUI(this.layoutService.activeContainer),this.layout(this.layoutService.activeContainerDimension,this.layoutService.activeContainerOffset.quickPickTop)),this.ui;const i=zn(this._container,PC(".quick-input-widget.show-file-icons"));i.tabIndex=-1,i.style.display="none";const n=Sw(i),s=zn(i,PC(".quick-input-titlebar")),l=this._register(new uk(s,{hoverDelegate:this.options.hoverDelegate}));l.domNode.classList.add("quick-input-left-action-bar");const d=zn(s,PC(".quick-input-title")),f=this._register(new uk(s,{hoverDelegate:this.options.hoverDelegate}));f.domNode.classList.add("quick-input-right-action-bar");const g=zn(i,PC(".quick-input-header")),y=zn(g,PC("input.quick-input-check-all"));y.type="checkbox",y.setAttribute("aria-label",V("quickInput.checkAll","Toggle all checkboxes")),this._register(n_(y,yr.CHANGE,pi=>{const gn=y.checked;ci.setAllVisibleChecked(gn)})),this._register(tn(y,yr.CLICK,pi=>{(pi.x||pi.y)&&P.setFocus()}));const w=zn(g,PC(".quick-input-description")),x=zn(g,PC(".quick-input-and-message")),I=zn(x,PC(".quick-input-filter")),P=this._register(new bvi(I,this.styles.inputBox,this.styles.toggle));P.setAttribute("aria-describedby",`${this.idPrefix}message`);const O=zn(I,PC(".quick-input-visible-count"));O.setAttribute("aria-live","polite"),O.setAttribute("aria-atomic","true");const W=new EBe(O,{countFormat:V({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")},this.styles.countBadge),X=zn(I,PC(".quick-input-count"));X.setAttribute("aria-live","polite");const Z=new EBe(X,{countFormat:V({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")},this.styles.countBadge),ee=zn(g,PC(".quick-input-action")),he=this._register(new Ove(ee,this.styles.button));he.label=V("ok","OK"),this._register(he.onDidClick(pi=>{this.onDidAcceptEmitter.fire()}));const we=zn(g,PC(".quick-input-action")),Te=this._register(new Ove(we,{...this.styles.button,supportIcons:!0}));Te.label=V("custom","Custom"),this._register(Te.onDidClick(pi=>{this.onDidCustomEmitter.fire()}));const Be=zn(x,PC(`#${this.idPrefix}message.quick-input-message`)),Me=this._register(new Fye(i,this.styles.progressBar));Me.getContainer().classList.add("quick-input-progress");const vt=zn(i,PC(".quick-input-html-widget"));vt.tabIndex=-1;const Nt=zn(i,PC(".quick-input-description")),Ni=this.idPrefix+"list",ci=this._register(this.instantiationService.createInstance(Eie,i,this.options.hoverDelegate,this.options.linkOpenerDelegate,Ni));P.setAttribute("aria-controls",Ni),this._register(ci.onDidChangeFocus(()=>{var pi;P.setAttribute("aria-activedescendant",(pi=ci.getActiveDescendant())!==null&&pi!==void 0?pi:"")})),this._register(ci.onChangedAllVisibleChecked(pi=>{y.checked=pi})),this._register(ci.onChangedVisibleCount(pi=>{W.setCount(pi)})),this._register(ci.onChangedCheckedCount(pi=>{Z.setCount(pi)})),this._register(ci.onLeave(()=>{setTimeout(()=>{this.controller&&(P.setFocus(),this.controller instanceof Sie&&this.controller.canSelectMany&&ci.clearFocus())},0)}));const Mt=IE(i);return this._register(Mt),this._register(tn(i,yr.FOCUS,pi=>{const gn=this.getUI();if(Wg(pi.relatedTarget,gn.inputContainer)){const $n=gn.inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==$n&&this.endOfQuickInputBoxContext.set($n)}Wg(pi.relatedTarget,gn.container)||(this.inQuickInputContext.set(!0),this.previousFocusElement=Sm(pi.relatedTarget)?pi.relatedTarget:void 0)},!0)),this._register(Mt.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(mq.Blur),this.inQuickInputContext.set(!1),this.endOfQuickInputBoxContext.set(!1),this.previousFocusElement=void 0})),this._register(P.onKeyDown(pi=>{const gn=this.getUI().inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==gn&&this.endOfQuickInputBoxContext.set(gn)})),this._register(tn(i,yr.FOCUS,pi=>{P.setFocus()})),this._register(n_(i,yr.KEY_DOWN,pi=>{if(!Wg(pi.target,vt))switch(pi.keyCode){case 3:nc.stop(pi,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:nc.stop(pi,!0),this.hide(mq.Gesture);break;case 2:if(!pi.altKey&&!pi.ctrlKey&&!pi.metaKey){const gn=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(i.classList.contains("show-checkboxes")?gn.push("input"):gn.push("input[type=text]"),this.getUI().list.isDisplayed()&&gn.push(".monaco-list"),this.getUI().message&&gn.push(".quick-input-message a"),this.getUI().widget){if(Wg(pi.target,this.getUI().widget))break;gn.push(".quick-input-html-widget")}const $n=i.querySelectorAll(gn.join(", "));pi.shiftKey&&pi.target===$n[0]?(nc.stop(pi,!0),ci.clearFocus()):!pi.shiftKey&&Wg(pi.target,$n[$n.length-1])&&(nc.stop(pi,!0),$n[0].focus())}break;case 10:pi.ctrlKey&&(nc.stop(pi,!0),this.getUI().list.toggleHover());break}})),this.ui={container:i,styleSheet:n,leftActionBar:l,titleBar:s,title:d,description1:Nt,description2:w,widget:vt,rightActionBar:f,checkAll:y,inputContainer:x,filterContainer:I,inputBox:P,visibleCountContainer:O,visibleCount:W,countContainer:X,count:Z,okContainer:ee,ok:he,message:Be,customButtonContainer:we,customButton:Te,list:ci,progressBar:Me,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:pi=>this.show(pi),hide:()=>this.hide(),setVisibilities:pi=>this.setVisibilities(pi),setEnabled:pi=>this.setEnabled(pi),setContextKey:pi=>this.options.setContextKey(pi),linkOpenerDelegate:pi=>this.options.linkOpenerDelegate(pi)},this.updateStyles(),this.ui}reparentUI(e){this.ui&&(this._container=e,zn(this._container,this.ui.container))}pick(e,i={},n=Gl.None){return new Promise((s,l)=>{let d=w=>{var x;d=s,(x=i.onKeyMods)===null||x===void 0||x.call(i,f.keyMods),s(w)};if(n.isCancellationRequested){d(void 0);return}const f=this.createQuickPick();let g;const y=[f,f.onDidAccept(()=>{if(f.canSelectMany)d(f.selectedItems.slice()),f.hide();else{const w=f.activeItems[0];w&&(d(w),f.hide())}}),f.onDidChangeActive(w=>{const x=w[0];x&&i.onDidFocus&&i.onDidFocus(x)}),f.onDidChangeSelection(w=>{if(!f.canSelectMany){const x=w[0];x&&(d(x),f.hide())}}),f.onDidTriggerItemButton(w=>i.onDidTriggerItemButton&&i.onDidTriggerItemButton({...w,removeItem:()=>{const x=f.items.indexOf(w.item);if(x!==-1){const I=f.items.slice(),P=I.splice(x,1),O=f.activeItems.filter(X=>X!==P[0]),W=f.keepScrollPosition;f.keepScrollPosition=!0,f.items=I,O&&(f.activeItems=O),f.keepScrollPosition=W}}})),f.onDidTriggerSeparatorButton(w=>{var x;return(x=i.onDidTriggerSeparatorButton)===null||x===void 0?void 0:x.call(i,w)}),f.onDidChangeValue(w=>{g&&!w&&(f.activeItems.length!==1||f.activeItems[0]!==g)&&(f.activeItems=[g])}),n.onCancellationRequested(()=>{f.hide()}),f.onDidHide(()=>{yd(y),d(void 0)})];f.title=i.title,f.canSelectMany=!!i.canPickMany,f.placeholder=i.placeHolder,f.ignoreFocusOut=!!i.ignoreFocusLost,f.matchOnDescription=!!i.matchOnDescription,f.matchOnDetail=!!i.matchOnDetail,f.matchOnLabel=i.matchOnLabel===void 0||i.matchOnLabel,f.quickNavigate=i.quickNavigate,f.hideInput=!!i.hideInput,f.contextKey=i.contextKey,f.busy=!0,Promise.all([e,i.activeItem]).then(([w,x])=>{g=x,f.busy=!1,f.items=w,f.canSelectMany&&(f.selectedItems=w.filter(I=>I.type!=="separator"&&I.picked)),g&&(f.activeItems=[g])}),f.show(),Promise.resolve(e).then(void 0,w=>{l(w),f.hide()})})}createQuickPick(){const e=this.getUI(!0);return new Sie(e)}createInputBox(){const e=this.getUI(!0);return new dvi(e)}show(e){const i=this.getUI(!0);this.onShowEmitter.fire();const n=this.controller;this.controller=e,n==null||n.didHide(),this.setEnabled(!0),i.leftActionBar.clear(),i.title.textContent="",i.description1.textContent="",i.description2.textContent="",r0(i.widget),i.rightActionBar.clear(),i.checkAll.checked=!1,i.inputBox.placeholder="",i.inputBox.password=!1,i.inputBox.showDecoration(D_.Ignore),i.visibleCount.setCount(0),i.count.setCount(0),r0(i.message),i.progressBar.stop(),i.list.setElements([]),i.list.matchOnDescription=!1,i.list.matchOnDetail=!1,i.list.matchOnLabel=!0,i.list.sortByLabel=!0,i.ignoreFocusOut=!1,i.inputBox.toggles=void 0;const s=this.options.backKeybindingLabel();TBe.tooltip=s?V("quickInput.backWithKeybinding","Back ({0})",s):V("quickInput.back","Back"),i.container.style.display="",this.updateLayout(),i.inputBox.setFocus(),this.quickInputTypeContext.set(e.type)}isVisible(){return!!this.ui&&this.ui.container.style.display!=="none"}setVisibilities(e){const i=this.getUI();i.title.style.display=e.title?"":"none",i.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",i.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",i.checkAll.style.display=e.checkAll?"":"none",i.inputContainer.style.display=e.inputBox?"":"none",i.filterContainer.style.display=e.inputBox?"":"none",i.visibleCountContainer.style.display=e.visibleCount?"":"none",i.countContainer.style.display=e.count?"":"none",i.okContainer.style.display=e.ok?"":"none",i.customButtonContainer.style.display=e.customButton?"":"none",i.message.style.display=e.message?"":"none",i.progressBar.getContainer().style.display=e.progressBar?"":"none",i.list.display(!!e.list),i.container.classList.toggle("show-checkboxes",!!e.checkBox),i.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const i of this.getUI().leftActionBar.viewItems)i.action.enabled=e;for(const i of this.getUI().rightActionBar.viewItems)i.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var i,n;const s=this.controller;if(!s)return;s.willHide(e);const l=(i=this.ui)===null||i===void 0?void 0:i.container,d=l&&!CCt(l);if(this.controller=null,this.onHideEmitter.fire(),l&&(l.style.display="none"),!d){let f=this.previousFocusElement;for(;f&&!f.offsetParent;)f=(n=f.parentElement)!==null&&n!==void 0?n:void 0;f!=null&&f.offsetParent?(f.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}s.didHide(e)}layout(e,i){this.dimension=e,this.titleBarOffset=i,this.updateLayout()}updateLayout(){if(this.ui&&this.isVisible()){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,i=Math.min(this.dimension.width*.62,RBe.MAX_WIDTH);e.width=i+"px",e.marginLeft="-"+i/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:i,quickInputForeground:n,widgetBorder:s,widgetShadow:l}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e??"",this.ui.container.style.backgroundColor=i??"",this.ui.container.style.color=n??"",this.ui.container.style.border=s?`1px solid ${s}`:"",this.ui.container.style.boxShadow=l?`0 0 8px 2px ${l}`:"",this.ui.list.style(this.styles.list);const d=[];this.styles.pickerGroup.pickerGroupBorder&&d.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&d.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&d.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(d.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&d.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&d.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&d.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&d.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&d.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),d.push("}"));const f=d.join(` +`);f!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=f)}}};qve.MAX_WIDTH=600;qve=RBe=M1i([$7e(1,DR),$7e(2,So),$7e(3,Zo)],qve);var R1i=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},cee=function(c,e){return function(i,n){e(i,n,c)}};let FBe=class extends pui{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get currentQuickInput(){return this.controller.currentQuickInput}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(kBe))),this._quickAccess}constructor(e,i,n,s,l){super(n),this.instantiationService=e,this.contextKeyService=i,this.layoutService=s,this.configurationService=l,this._onShow=this._register(new ui),this._onHide=this._register(new ui),this.contexts=new Map}createController(e=this.layoutService,i){const n={idPrefix:"quickInput_",container:e.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:l=>this.setContextKey(l),linkOpenerDelegate:l=>{this.instantiationService.invokeFunction(d=>{d.get(KC).open(l,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>e.focus(),styles:this.computeStyles(),hoverDelegate:this._register(this.instantiationService.createInstance(DBe))},s=this._register(this.instantiationService.createInstance(qve,{...n,...i}));return s.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop),this._register(e.onDidLayoutActiveContainer(l=>{Io(e.activeContainer)===Io(s.container)&&s.layout(l,e.activeContainerOffset.quickPickTop)})),this._register(e.onDidChangeActiveContainer(()=>{s.isVisible()||s.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop)})),this._register(s.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(s.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),s}setContextKey(e){let i;e&&(i=this.contexts.get(e),i||(i=new Xr(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,i))),!(i&&i.get())&&(this.resetContextKeys(),i==null||i.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,i={},n=Gl.None){return this.controller.pick(e,i,n)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:vs(Lmt),quickInputForeground:vs(xci),quickInputTitleBackground:vs(kci),widgetBorder:vs(ySt),widgetShadow:vs(T4)},inputBox:Dve,toggle:Tve,countBadge:Cxt,button:P0i,progressBar:A0i,keybindingLabel:L0i,list:nB({listBackground:Lmt,listFocusBackground:TM,listFocusForeground:kM,listInactiveFocusForeground:kM,listInactiveSelectionIconForeground:nU,listInactiveFocusBackground:TM,listFocusOutline:bf,listInactiveFocusOutline:bf}),pickerGroup:{pickerGroupBorder:vs(Tci),pickerGroupForeground:vs(kSt)}}}};FBe=R1i([cee(0,So),cee(1,Zo),cee(2,og),cee(3,DR),cee(4,El)],FBe);var rkt=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},H5=function(c,e){return function(i,n){e(i,n,c)}};let BBe=class extends FBe{constructor(e,i,n,s,l,d){super(i,n,s,new W9e(e.getContainerDomNode(),l),d),this.host=void 0;const f=yq.get(e);if(f){const g=f.widget;this.host={_serviceBrand:void 0,get mainContainer(){return g.getDomNode()},getContainer(){return g.getDomNode()},whenContainerStylesLoaded(){},get containers(){return[g.getDomNode()]},get activeContainer(){return g.getDomNode()},get mainContainerDimension(){return e.getLayoutInfo()},get activeContainerDimension(){return e.getLayoutInfo()},get onDidLayoutMainContainer(){return e.onDidLayoutChange},get onDidLayoutActiveContainer(){return e.onDidLayoutChange},get onDidLayoutContainer(){return Mr.map(e.onDidLayoutChange,y=>({container:g.getDomNode(),dimension:y}))},get onDidChangeActiveContainer(){return Mr.None},get onDidAddContainer(){return Mr.None},get mainContainerOffset(){return{top:0,quickPickTop:0}},get activeContainerOffset(){return{top:0,quickPickTop:0}},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};BBe=rkt([H5(1,So),H5(2,Zo),H5(3,og),H5(4,Oc),H5(5,El)],BBe);let WBe=class{get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let i=this.mapEditorToService.get(e);if(!i){const n=i=this.instantiationService.createInstance(BBe,e);this.mapEditorToService.set(e,i),ZM(e.onDidDispose)(()=>{n.dispose(),this.mapEditorToService.delete(e)})}return i}get currentQuickInput(){return this.activeService.currentQuickInput}get quickAccess(){return this.activeService.quickAccess}constructor(e,i){this.instantiationService=e,this.codeEditorService=i,this.mapEditorToService=new Map}pick(e,i={},n=Gl.None){return this.activeService.pick(e,i,n)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};WBe=rkt([H5(0,So),H5(1,Oc)],WBe);class yq{static get(e){return e.getContribution(yq.ID)}constructor(e){this.editor=e,this.widget=new $ye(this.editor)}dispose(){this.widget.dispose()}}yq.ID="editor.controller.quickInput";class $ye{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return $ye.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}$ye.ID="editor.contrib.quickInputWidget";Bc(yq.ID,yq,4);class F1i{constructor(e,i,n,s,l){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=i,this.fontStyle=n,this.foreground=s,this.background=l}}function B1i(c){if(!c||!Array.isArray(c))return[];const e=[];let i=0;for(let n=0,s=c.length;n{const I=U1i(w.token,x.token);return I!==0?I:w.index-x.index});let i=0,n="000000",s="ffffff";for(;c.length>=1&&c[0].token==="";){const w=c.shift();w.fontStyle!==-1&&(i=w.fontStyle),w.foreground!==null&&(n=w.foreground),w.background!==null&&(s=w.background)}const l=new H1i;for(const w of e)l.getId(w);const d=l.getId(n),f=l.getId(s),g=new kze(i,d,f),y=new Tze(g);for(let w=0,x=c.length;w"u"){const s=this._match(i),l=z1i(i);n=(s.metadata|l<<8)>>>0,this._cache.set(i,n)}return(n|e<<0)>>>0}}const j1i=/\b(comment|string|regex|regexp)\b/;function z1i(c){const e=c.match(j1i);if(!e)return 0;switch(e[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}function U1i(c,e){return ce?1:0}class kze{constructor(e,i,n){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=i,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new kze(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,i,n){e!==-1&&(this._fontStyle=e),i!==0&&(this._foreground=i),n!==0&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class Tze{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;const i=e.indexOf(".");let n,s;i===-1?(n=e,s=""):(n=e.substring(0,i),s=e.substring(i+1));const l=this._children.get(n);return typeof l<"u"?l.match(s):this._mainRule}insert(e,i,n,s){if(e===""){this._mainRule.acceptOverwrite(i,n,s);return}const l=e.indexOf(".");let d,f;l===-1?(d=e,f=""):(d=e.substring(0,l),f=e.substring(l+1));let g=this._children.get(d);typeof g>"u"&&(g=new Tze(this._mainRule.clone()),this._children.set(d,g)),g.insert(f,i,n,s)}}function q1i(c){const e=[];for(let i=1,n=c.length;i({format:s.format,location:s.location.toString()}))}}c.toJSONObject=e;function i(n){const s=l=>xy(l)?l:void 0;if(n&&Array.isArray(n.src)&&n.src.every(l=>xy(l.format)&&xy(l.location)))return{weight:s(n.weight),style:s(n.style),src:n.src.map(l=>({format:l.format,location:Oo.parse(l.location)}))}}c.fromJSONObject=i})(Gvt||(Gvt={}));class X1i{constructor(){this._onDidChange=new ui,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:V("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:V("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${Uo.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,i,n,s){const l=this.iconsById[e];if(l){if(n&&!l.description){l.description=n,this.iconSchema.properties[e].markdownDescription=`${n} $(${e})`;const g=this.iconReferenceSchema.enum.indexOf(e);g!==-1&&(this.iconReferenceSchema.enumDescriptions[g]=n),this._onDidChange.fire()}return l}const d={id:e,description:n,defaults:i,deprecationMessage:s};this.iconsById[e]=d;const f={$ref:"#/definitions/icons"};return s&&(f.deprecationMessage=s),n&&(f.markdownDescription=`${n}: $(${e})`),this.iconSchema.properties[e]=f,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(n||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){const e=(l,d)=>l.id.localeCompare(d.id),i=l=>{for(;Uo.isThemeIcon(l.defaults);)l=this.iconsById[l.defaults.id];return`codicon codicon-${l?l.id:""}`},n=[];n.push("| preview | identifier | default codicon ID | description"),n.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const s=Object.keys(this.iconsById).map(l=>this.iconsById[l]);for(const l of s.filter(d=>!!d.description).sort(e))n.push(`||${l.id}|${Uo.isThemeIcon(l.defaults)?l.defaults.id:l.id}|${l.description||""}|`);n.push("| preview | identifier "),n.push("| ----------- | --------------------------------- |");for(const l of s.filter(d=>!Uo.isThemeIcon(d.defaults)).sort(e))n.push(`||${l.id}|`);return n.join(` +`)}}const oB=new X1i;dh.add(Q1i.IconContribution,oB);function Oh(c,e,i,n){return oB.registerIcon(c,e,i,n)}function okt(){return oB}function Z1i(){const c=zbt();for(const e in c){const i="\\"+c[e].toString(16);oB.registerIcon(e,{fontCharacter:i})}}Z1i();const akt="vscode://schemas/icons",lkt=dh.as(iye.JSONContribution);lkt.registerSchema(akt,oB.getIconSchema());const Kvt=new id(()=>lkt.notifySchemaChanged(akt),200);oB.onDidChange(()=>{Kvt.isScheduled()||Kvt.schedule()});const ckt=Oh("widget-close",Dr.close,V("widgetClose","Icon for the close action in widgets."));Oh("goto-previous-location",Dr.arrowUp,V("previousChangeIcon","Icon for goto previous editor location."));Oh("goto-next-location",Dr.arrowDown,V("nextChangeIcon","Icon for goto next editor location."));Uo.modify(Dr.sync,"spin");Uo.modify(Dr.loading,"spin");function Y1i(c){const e=new On,i=e.add(new ui),n=okt();return e.add(n.onDidChange(()=>i.fire())),c&&e.add(c.onDidProductIconThemeChange(()=>i.fire())),{dispose:()=>e.dispose(),onDidChange:i.event,getCSS(){const s=c?c.getProductIconTheme():new ukt,l={},d=[],f=[];for(const g of n.getIcons()){const y=s.getIcon(g);if(!y)continue;const w=y.font,x=`--vscode-icon-${g.id}-font-family`,I=`--vscode-icon-${g.id}-content`;w?(l[w.id]=w.definition,f.push(`${x}: ${B8e(w.id)};`,`${I}: '${y.fontCharacter}';`),d.push(`.codicon-${g.id}:before { content: '${y.fontCharacter}'; font-family: ${B8e(w.id)}; }`)):(f.push(`${I}: '${y.fontCharacter}'; ${x}: 'codicon';`),d.push(`.codicon-${g.id}:before { content: '${y.fontCharacter}'; }`))}for(const g in l){const y=l[g],w=y.weight?`font-weight: ${y.weight};`:"",x=y.style?`font-style: ${y.style};`:"",I=y.src.map(P=>`${G4(P.location)} format('${P.format}')`).join(", ");d.push(`@font-face { src: ${I}; font-family: ${B8e(g)};${w}${x} font-display: block; }`)}return d.push(`:root { ${f.join(" ")} }`),d.join(` +`)}}}class ukt{getIcon(e){const i=okt();let n=e.defaults;for(;Uo.isThemeIcon(n);){const s=i.getIcon(n.id);if(!s)return;n=s.defaults}return n}}const m4="vs",VU="vs-dark",a9="hc-black",l9="hc-light",dkt=dh.as(_St.ColorContribution),eyi=dh.as(PSt.ThemingContribution);class fkt{constructor(e,i){this.semanticHighlighting=!1,this.themeData=i;const n=i.base;e.length>0?(u0e(e)?this.id=e:this.id=n+" "+e,this.themeName=e):(this.id=n,this.themeName=n),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const i in this.themeData.colors)e.set(i,Qi.fromHex(this.themeData.colors[i]));if(this.themeData.inherit){const i=VBe(this.themeData.base);for(const n in i.colors)e.has(n)||e.set(n,Qi.fromHex(i.colors[n]))}this.colors=e}return this.colors}getColor(e,i){const n=this.getColors().get(e);if(n)return n;if(i!==!1)return this.getDefault(e)}getDefault(e){let i=this.defaultColors[e];return i||(i=dkt.resolveDefaultColor(e,this),this.defaultColors[e]=i,i)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case m4:return ik.LIGHT;case a9:return ik.HIGH_CONTRAST_DARK;case l9:return ik.HIGH_CONTRAST_LIGHT;default:return ik.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],i=[];if(this.themeData.inherit){const l=VBe(this.themeData.base);e=l.rules,l.encodedTokensColors&&(i=l.encodedTokensColors)}const n=this.themeData.colors["editor.foreground"],s=this.themeData.colors["editor.background"];if(n||s){const l={token:""};n&&(l.foreground=n),s&&(l.background=s),e.push(l)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(i=this.themeData.encodedTokensColors),this._tokenTheme=skt.createFromRawTokenTheme(e,i)}return this._tokenTheme}getTokenStyleMetadata(e,i,n){const l=this.tokenTheme._match([e].concat(i).join(".")).metadata,d=P0.getForeground(l),f=P0.getFontStyle(l);return{foreground:d,italic:!!(f&1),bold:!!(f&2),underline:!!(f&4),strikethrough:!!(f&8)}}}function u0e(c){return c===m4||c===VU||c===a9||c===l9}function VBe(c){switch(c){case m4:return $1i;case VU:return J1i;case a9:return G1i;case l9:return K1i}}function nme(c){const e=VBe(c);return new fkt(c,e)}class tyi extends Ii{constructor(){super(),this._onColorThemeChange=this._register(new ui),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new ui),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new ukt,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(m4,nme(m4)),this._knownThemes.set(VU,nme(VU)),this._knownThemes.set(a9,nme(a9)),this._knownThemes.set(l9,nme(l9));const e=this._register(Y1i(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS} +${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(m4),this._onOSSchemeChanged(),this._register(e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),tCt(ed,"(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return V0e(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=Sw(void 0,e=>{e.className="monaco-colors",e.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),Ii.None}_registerShadowDomContainer(e){const i=Sw(e,n=>{n.className="monaco-colors",n.textContent=this._allCSS});return this._styleElements.push(i),{dispose:()=>{for(let n=0;n{n.base===e&&n.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let i;this._knownThemes.has(e)?i=this._knownThemes.get(e):i=this._knownThemes.get(m4),this._updateActualTheme(i)}_updateActualTheme(e){!e||this._theme===e||(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=ed.matchMedia("(forced-colors: active)").matches;if(e!==SE(this._theme.type)){let i;rq(this._theme.type)?i=e?a9:VU:i=e?l9:m4,this._updateActualTheme(this._knownThemes.get(i))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],i={},n={addRule:d=>{i[d]||(e.push(d),i[d]=!0)}};eyi.getThemingParticipants().forEach(d=>d(this._theme,n,this._environment));const s=[];for(const d of dkt.getColors()){const f=this._theme.getColor(d.id,!0);f&&s.push(`${oje(d.id)}: ${f.toString()};`)}n.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${s.join(` +`)} }`);const l=this._colorMapOverride||this._theme.tokenTheme.getColorMap();n.addRule(q1i(l)),this._themeCSS=e.join(` +`),this._updateCSS(),Nh.setColorMap(l),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS} +${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}const Nw=Kl("themeService");var iyi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},J7e=function(c,e){return function(i,n){e(i,n,c)}};let HBe=class extends Ii{constructor(e,i,n){super(),this._contextKeyService=e,this._layoutService=i,this._configurationService=n,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new ui,this._onDidChangeReducedMotion=new ui,this._accessibilityModeEnabledContext=Tne.bindTo(this._contextKeyService);const s=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(d=>{d.affectsConfiguration("editor.accessibilitySupport")&&(s(),this._onDidChangeScreenReaderOptimized.fire()),d.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),s(),this._register(this.onDidChangeScreenReaderOptimized(()=>s()));const l=ed.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=l.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(l)}initReducedMotionListeners(e){this._register(tn(e,"change",()=>{this._systemMotionReduced=e.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));const i=()=>{const n=this.isMotionReduced();this._layoutService.mainContainer.classList.toggle("reduce-motion",n),this._layoutService.mainContainer.classList.toggle("enable-motion",!n)};i(),this._register(this.onDidChangeReducedMotion(()=>i()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return e==="on"||e==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return e==="on"||e==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};HBe=iyi([J7e(0,Zo),J7e(1,DR),J7e(2,El)],HBe);var Jye=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},cL=function(c,e){return function(i,n){e(i,n,c)}},Bz,oM;let jBe=class{constructor(e,i,n){this._commandService=e,this._keybindingService=i,this._hiddenStates=new $ve(n)}createMenu(e,i,n){return new UBe(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...n},this._commandService,this._keybindingService,i)}resetHiddenStates(e){this._hiddenStates.reset(e)}};jBe=Jye([cL(0,ff),cL(1,ou),cL(2,mT)],jBe);let $ve=Bz=class{constructor(e){this._storageService=e,this._disposables=new On,this._onDidChange=new ui,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const i=e.get(Bz._key,0,"{}");this._data=JSON.parse(i)}catch{this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,Bz._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{const i=e.get(Bz._key,0,"{}");this._data=JSON.parse(i)}catch(i){console.log("FAILED to read storage after UPDATE",i)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,i){var n;return(n=this._hiddenByDefaultCache.get(`${e.id}/${i}`))!==null&&n!==void 0?n:!1}setDefaultState(e,i,n){this._hiddenByDefaultCache.set(`${e.id}/${i}`,n)}isHidden(e,i){var n,s;const l=this._isHiddenByDefault(e,i),d=(s=(n=this._data[e.id])===null||n===void 0?void 0:n.includes(i))!==null&&s!==void 0?s:!1;return l?!d:d}updateHidden(e,i,n){this._isHiddenByDefault(e,i)&&(n=!n);const l=this._data[e.id];if(n)l?l.indexOf(i)<0&&l.push(i):this._data[e.id]=[i];else if(l){const d=l.indexOf(i);d>=0&&jei(l,d),l.length===0&&delete this._data[e.id]}this._persist()}reset(e){if(e===void 0)this._data=Object.create(null),this._persist();else{for(const{id:i}of e)this._data[i]&&delete this._data[i];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const e=JSON.stringify(this._data);this._storageService.store(Bz._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};$ve._key="menu.hiddenCommands";$ve=Bz=Jye([cL(0,mT)],$ve);let zBe=oM=class{constructor(e,i,n,s,l,d){this._id=e,this._hiddenStates=i,this._collectContextKeysForSubmenus=n,this._commandService=s,this._keybindingService=l,this._contextKeyService=d,this._menuGroups=[],this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const e=bm.getMenuItems(this._id);let i;e.sort(oM._compareMenuItems);for(const n of e){const s=n.group||"";(!i||i[0]!==s)&&(i=[s,[]],this._menuGroups.push(i)),i[1].push(n),this._collectContextKeys(n)}}_collectContextKeys(e){if(oM._fillInKbExprKeys(e.when,this._structureContextKeys),Gz(e)){if(e.command.precondition&&oM._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){const i=e.command.toggled.condition||e.command.toggled;oM._fillInKbExprKeys(i,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&bm.getMenuItems(e.submenu).forEach(this._collectContextKeys,this)}createActionGroups(e){const i=[];for(const n of this._menuGroups){const[s,l]=n;let d;for(const f of l)if(this._contextKeyService.contextMatchesRules(f.when)){const g=Gz(f);g&&this._hiddenStates.setDefaultState(this._id,f.command.id,!!f.isHiddenByDefault);const y=nyi(this._id,g?f.command:f,this._hiddenStates);if(g){const w=hkt(f.command.id,f.when,this._commandService,this._keybindingService);(d??(d=[])).push(new VC(f.command,f.alt,e,y,w,this._contextKeyService,this._commandService))}else{const w=new oM(f.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._keybindingService,this._contextKeyService).createActionGroups(e),x=Up.join(...w.map(I=>I[1]));x.length>0&&(d??(d=[])).push(new CU(f,y,x))}}d&&d.length>0&&i.push([s,d])}return i}static _fillInKbExprKeys(e,i){if(e)for(const n of e.keys())i.add(n)}static _compareMenuItems(e,i){const n=e.group,s=i.group;if(n!==s){if(n){if(!s)return-1}else return 1;if(n==="navigation")return-1;if(s==="navigation")return 1;const f=n.localeCompare(s);if(f!==0)return f}const l=e.order||0,d=i.order||0;return ld?1:oM._compareTitles(Gz(e)?e.command.title:e.title,Gz(i)?i.command.title:i.title)}static _compareTitles(e,i){const n=typeof e=="string"?e:e.original,s=typeof i=="string"?i:i.original;return n.localeCompare(s)}};zBe=oM=Jye([cL(3,ff),cL(4,ou),cL(5,Zo)],zBe);let UBe=class{constructor(e,i,n,s,l,d){this._disposables=new On,this._menuInfo=new zBe(e,i,n.emitEventsForSubmenuChanges,s,l,d);const f=new id(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},n.eventDebounceDelay);this._disposables.add(f),this._disposables.add(bm.onDidChangeMenu(x=>{x.has(e)&&f.schedule()}));const g=this._disposables.add(new On),y=x=>{let I=!1,P=!1,O=!1;for(const W of x)if(I=I||W.isStructuralChange,P=P||W.isEnablementChange,O=O||W.isToggleChange,I&&P&&O)break;return{menu:this,isStructuralChange:I,isEnablementChange:P,isToggleChange:O}},w=()=>{g.add(d.onDidChangeContext(x=>{const I=x.affectsSome(this._menuInfo.structureContextKeys),P=x.affectsSome(this._menuInfo.preconditionContextKeys),O=x.affectsSome(this._menuInfo.toggledContextKeys);(I||P||O)&&this._onDidChange.fire({menu:this,isStructuralChange:I,isEnablementChange:P,isToggleChange:O})})),g.add(i.onDidChange(x=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new Abt({onWillAddFirstListener:w,onDidRemoveLastListener:g.clear.bind(g),delay:n.eventDebounceDelay,merge:y}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};UBe=Jye([cL(3,ff),cL(4,ou),cL(5,Zo)],UBe);function nyi(c,e,i){const n=Yri(e)?e.submenu.id:e.id,s=typeof e.title=="string"?e.title:e.title.value,l=i9({id:`hide/${c.id}/${n}`,label:V("hide.label","Hide '{0}'",s),run(){i.updateHidden(c,n,!0)}}),d=i9({id:`toggle/${c.id}/${n}`,label:s,get checked(){return!i.isHidden(c,n)},run(){i.updateHidden(c,n,!!this.checked)}});return{hide:l,toggle:d,get isHidden(){return!d.checked}}}function hkt(c,e=void 0,i,n){return i9({id:`configureKeybinding/${c}`,label:V("configure keybinding","Configure Keybinding"),run(){const l=!!!n.lookupKeybinding(c)&&e?e.serialize():void 0;i.executeCommand("workbench.action.openGlobalKeybindings",`@command:${c}`+(l?` +when:${l}`:""))}})}var ryi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Qvt=function(c,e){return function(i,n){e(i,n,c)}},qBe;let Jve=qBe=class extends Ii{constructor(e,i){super(),this.layoutService=e,this.logService=i,this.mapTextToType=new Map,this.findText="",this.resources=[],this.resourcesStateHash=void 0,(q4||iCt)&&this.installWebKitWriteTextWorkaround(),this._register(Mr.runAndSubscribe(W1e,({window:n,disposables:s})=>{s.add(tn(n.document,"copy",()=>this.clearResources()))},{window:ed,disposables:this._store}))}installWebKitWriteTextWorkaround(){const e=()=>{const i=new bne;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=i,jme().navigator.clipboard.write([new ClipboardItem({"text/plain":i.p})]).catch(async n=>{(!(n instanceof Error)||n.name!=="NotAllowedError"||!i.isRejected)&&this.logService.error(n)})};this._register(Mr.runAndSubscribe(this.layoutService.onDidAddContainer,({container:i,disposables:n})=>{n.add(tn(i,"click",e)),n.add(tn(i,"keydown",e))},{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(e,i){if(this.writeResources([]),i){this.mapTextToType.set(i,e);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return await jme().navigator.clipboard.writeText(e)}catch(n){console.error(n)}this.fallbackWriteText(e)}fallbackWriteText(e){const i=Wq(),n=i.activeElement,s=i.body.appendChild(Sr("textarea",{"aria-hidden":!0}));s.style.height="1px",s.style.width="1px",s.style.position="absolute",s.value=e,s.focus(),s.select(),i.execCommand("copy"),Sm(n)&&n.focus(),i.body.removeChild(s)}async readText(e){if(e)return this.mapTextToType.get(e)||"";try{return await jme().navigator.clipboard.readText()}catch(i){console.error(i)}return""}async readFindText(){return this.findText}async writeFindText(e){this.findText=e}async writeResources(e){e.length===0?this.clearResources():(this.resources=e,this.resourcesStateHash=await this.computeResourcesStateHash())}async readResources(){const e=await this.computeResourcesStateHash();return this.resourcesStateHash!==e&&this.clearResources(),this.resources}async computeResourcesStateHash(){if(this.resources.length===0)return;const e=await this.readText();return R1e(e.substring(0,qBe.MAX_RESOURCE_STATE_SOURCE_LENGTH))}clearResources(){this.resources=[],this.resourcesStateHash=void 0}};Jve.MAX_RESOURCE_STATE_SOURCE_LENGTH=1e3;Jve=qBe=ryi([Qvt(0,DR),Qvt(1,Sv)],Jve);const o6=Kl("clipboardService");var syi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},oyi=function(c,e){return function(i,n){e(i,n,c)}};const mte="data-keybinding-context";let Dze=class{constructor(e,i){this._id=e,this._parent=i,this._value=Object.create(null),this._value._contextId=e}get value(){return{...this._value}}setValue(e,i){return this._value[e]!==i?(this._value[e]=i,!0):!1}removeValue(e){return e in this._value?(delete this._value[e],!0):!1}getValue(e){const i=this._value[e];return typeof i>"u"&&this._parent?this._parent.getValue(e):i}};class bq extends Dze{constructor(){super(-1,null)}setValue(e,i){return!1}removeValue(e){return!1}getValue(e){}}bq.INSTANCE=new bq;class Iie extends Dze{constructor(e,i,n){super(e,null),this._configurationService=i,this._values=RU.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(s=>{if(s.source===7){const l=Array.from(this._values,([d])=>d);this._values.clear(),n.fire(new Zvt(l))}else{const l=[];for(const d of s.affectedKeys){const f=`config.${d}`,g=this._values.findSuperstr(f);g!==void 0&&(l.push(...cc.map(g,([y])=>y)),this._values.deleteSuperstr(f)),this._values.has(f)&&(l.push(f),this._values.delete(f))}n.fire(new Zvt(l))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(Iie._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);const i=e.substr(Iie._keyPrefix.length),n=this._configurationService.getValue(i);let s;switch(typeof n){case"number":case"boolean":case"string":s=n;break;default:Array.isArray(n)?s=JSON.stringify(n):s=n}return this._values.set(e,s),s}setValue(e,i){return super.setValue(e,i)}removeValue(e){return super.removeValue(e)}}Iie._keyPrefix="config.";class ayi{constructor(e,i,n){this._service=e,this._key=i,this._defaultValue=n,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class Xvt{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}}class Zvt{constructor(e){this.keys=e}affectsSome(e){for(const i of this.keys)if(e.has(i))return!0;return!1}allKeysContainedIn(e){return this.keys.every(i=>e.has(i))}}class lyi{constructor(e){this.events=e}affectsSome(e){for(const i of this.events)if(i.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every(i=>i.allKeysContainedIn(e))}}function cyi(c,e){return c.allKeysContainedIn(new Set(Object.keys(e)))}class _kt extends Ii{constructor(e){super(),this._onDidChangeContext=this._register(new _9({merge:i=>new lyi(i)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,i){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new ayi(this,e,i)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new uyi(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const i=this.getContextValuesContainer(this._myContextId);return e?e.evaluate(i):!0}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,i){if(this._isDisposed)return;const n=this.getContextValuesContainer(this._myContextId);n&&n.setValue(e,i)&&this._onDidChangeContext.fire(new Xvt(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new Xvt(e))}getContext(e){return this._isDisposed?bq.INSTANCE:this.getContextValuesContainer(dyi(e))}dispose(){super.dispose(),this._isDisposed=!0}}let $Be=class extends _kt{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0;const i=this._register(new Iie(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,i)}getContextValuesContainer(e){return this._isDisposed?bq.INSTANCE:this._contexts.get(e)||bq.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const i=++this._lastContextId;return this._contexts.set(i,new Dze(i,this.getContextValuesContainer(e))),i}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};$Be=syi([oyi(0,El)],$Be);class uyi extends _kt{constructor(e,i){if(super(e.createChildContext()),this._parentChangeListener=this._register(new jg),this._parent=e,this._updateParentChangeListener(),this._domNode=i,this._domNode.hasAttribute(mte)){let n="";this._domNode.classList&&(n=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${n?": "+n:""}`)}this._domNode.setAttribute(mte,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(e=>{const n=this._parent.getContextValuesContainer(this._myContextId).value;cyi(e,n)||this._onDidChangeContext.fire(e)})}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(mte),super.dispose())}getContextValuesContainer(e){return this._isDisposed?bq.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}function dyi(c){for(;c;){if(c.hasAttribute(mte)){const e=c.getAttribute(mte);return e?parseInt(e,10):NaN}c=c.parentElement}return 0}function fyi(c,e,i){c.get(Zo).createKey(String(e),hyi(i))}function hyi(c){return ybt(c,e=>{if(typeof e=="object"&&e.$mid===1)return Oo.revive(e).toString();if(e instanceof Oo)return e.toString()})}uc.registerCommand("_setContext",fyi);uc.registerCommand({id:"getContextKeyInfo",handler(){return[...Xr.all()].sort((c,e)=>c.key.localeCompare(e.key))},metadata:{description:V("getContextKeyInfo","A command that returns information about context keys"),args:[]}});uc.registerCommand("_generateContextKeyInfo",function(){const c=[],e=new Set;for(const i of Xr.all())e.has(i.key)||(e.add(i.key),c.push(i));c.sort((i,n)=>i.key.localeCompare(n.key)),console.log(JSON.stringify(c,void 0,2))});let _yi=class{constructor(e,i){this.key=e,this.data=i,this.incoming=new Map,this.outgoing=new Map}};class Yvt{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(const i of this._nodes.values())i.outgoing.size===0&&e.push(i);return e}insertEdge(e,i){const n=this.lookupOrInsertNode(e),s=this.lookupOrInsertNode(i);n.outgoing.set(s.key,s),s.incoming.set(n.key,n)}removeNode(e){const i=this._hashFn(e);this._nodes.delete(i);for(const n of this._nodes.values())n.outgoing.delete(i),n.incoming.delete(i)}lookupOrInsertNode(e){const i=this._hashFn(e);let n=this._nodes.get(i);return n||(n=new _yi(i,e),this._nodes.set(i,n)),n}isEmpty(){return this._nodes.size===0}toString(){const e=[];for(const[i,n]of this._nodes)e.push(`${i} + (-> incoming)[${[...n.incoming.keys()].join(", ")}] + (outgoing ->)[${[...n.outgoing.keys()].join(",")}] +`);return e.join(` +`)}findCycleSlow(){for(const[e,i]of this._nodes){const n=new Set([e]),s=this._findCycle(i,n);if(s)return s}}_findCycle(e,i){for(const[n,s]of e.outgoing){if(i.has(n))return[...i,n].join(" -> ");i.add(n);const l=this._findCycle(s,i);if(l)return l;i.delete(n)}}}const pyi=!1;class e1t extends Error{constructor(e){var i;super("cyclic dependency between services"),this.message=(i=e.findCycleSlow())!==null&&i!==void 0?i:`UNABLE to detect cycle, dumping graph: +${e.toString()}`}}class Gve{constructor(e=new One,i=!1,n,s=pyi){var l;this._services=e,this._strict=i,this._parent=n,this._enableTracing=s,this._isDisposed=!1,this._servicesToMaybeDispose=new Set,this._children=new Set,this._activeInstantiations=new Set,this._services.set(So,this),this._globalGraph=s?(l=n==null?void 0:n._globalGraph)!==null&&l!==void 0?l:new Yvt(d=>d):void 0}dispose(){if(!this._isDisposed){this._isDisposed=!0,yd(this._children),this._children.clear();for(const e of this._servicesToMaybeDispose)A1e(e)&&e.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(e,i){this._throwIfDisposed();const n=this,s=new class extends Gve{dispose(){n._children.delete(s),super.dispose()}}(e,this._strict,this,this._enableTracing);return this._children.add(s),i==null||i.add(s),s}invokeFunction(e,...i){this._throwIfDisposed();const n=bb.traceInvocation(this._enableTracing,e);let s=!1;try{return e({get:d=>{if(s)throw yHe("service accessor is only valid during the invocation of its target method");const f=this._getOrCreateServiceInstance(d,n);if(!f)throw new Error(`[invokeFunction] unknown service '${d}'`);return f}},...i)}finally{s=!0,n.stop()}}createInstance(e,...i){this._throwIfDisposed();let n,s;return e instanceof aE?(n=bb.traceCreation(this._enableTracing,e.ctor),s=this._createInstance(e.ctor,e.staticArguments.concat(i),n)):(n=bb.traceCreation(this._enableTracing,e),s=this._createInstance(e,i,n)),n.stop(),s}_createInstance(e,i=[],n){const s=_E.getServiceDependencies(e).sort((f,g)=>f.index-g.index),l=[];for(const f of s){const g=this._getOrCreateServiceInstance(f.id,n);g||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${f.id}.`,!1),l.push(g)}const d=s.length>0?s[0].index:i.length;if(i.length!==d){console.trace(`[createInstance] First service dependency of ${e.name} at position ${d+1} conflicts with ${i.length} static arguments`);const f=d-i.length;f>0?i=i.concat(new Array(f)):i=i.slice(0,d)}return Reflect.construct(e,i.concat(l))}_setCreatedServiceInstance(e,i){if(this._services.get(e)instanceof aE)this._services.set(e,i);else if(this._parent)this._parent._setCreatedServiceInstance(e,i);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){const i=this._services.get(e);return!i&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):i}_getOrCreateServiceInstance(e,i){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));const n=this._getServiceInstanceOrDescriptor(e);return n instanceof aE?this._safeCreateAndCacheServiceInstance(e,n,i.branch(e,!0)):(i.branch(e,!1),n)}_safeCreateAndCacheServiceInstance(e,i,n){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,i,n)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,i,n){var s;const l=new Yvt(g=>g.id.toString());let d=0;const f=[{id:e,desc:i,_trace:n}];for(;f.length;){const g=f.pop();if(l.lookupOrInsertNode(g),d++>1e3)throw new e1t(l);for(const y of _E.getServiceDependencies(g.desc.ctor)){const w=this._getServiceInstanceOrDescriptor(y.id);if(w||this._throwIfStrict(`[createInstance] ${e} depends on ${y.id} which is NOT registered.`,!0),(s=this._globalGraph)===null||s===void 0||s.insertEdge(String(g.id),String(y.id)),w instanceof aE){const x={id:y.id,desc:w,_trace:g._trace.branch(y.id,!0)};l.insertEdge(g,x),f.push(x)}}}for(;;){const g=l.roots();if(g.length===0){if(!l.isEmpty())throw new e1t(l);break}for(const{data:y}of g){if(this._getServiceInstanceOrDescriptor(y.id)instanceof aE){const x=this._createServiceInstanceWithOwner(y.id,y.desc.ctor,y.desc.staticArguments,y.desc.supportsDelayedInstantiation,y._trace);this._setCreatedServiceInstance(y.id,x)}l.removeNode(y)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,i,n=[],s,l){if(this._services.get(e)instanceof aE)return this._createServiceInstance(e,i,n,s,l,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,i,n,s,l);throw new Error(`illegalState - creating UNKNOWN service instance ${i.name}`)}_createServiceInstance(e,i,n=[],s,l,d){if(s){const f=new Gve(void 0,this._strict,this,this._enableTracing);f._globalGraphImplicitDependency=String(e);const g=new Map,y=new Tni(()=>{const w=f._createInstance(i,n,l);for(const[x,I]of g){const P=w[x];if(typeof P=="function")for(const O of I)O.disposable=P.apply(w,O.listener)}return g.clear(),d.add(w),w});return new Proxy(Object.create(null),{get(w,x){if(!y.isInitialized&&typeof x=="string"&&(x.startsWith("onDid")||x.startsWith("onWill"))){let O=g.get(x);return O||(O=new yy,g.set(x,O)),(X,Z,ee)=>{if(y.isInitialized)return y.value[x](X,Z,ee);{const he={listener:[X,Z,ee],disposable:void 0},we=O.push(he);return go(()=>{var Be;we(),(Be=he.disposable)===null||Be===void 0||Be.dispose()})}}}if(x in w)return w[x];const I=y.value;let P=I[x];return typeof P!="function"||(P=P.bind(I),w[x]=P),P},set(w,x,I){return y.value[x]=I,!0},getPrototypeOf(w){return i.prototype}})}else{const f=this._createInstance(i,n,l);return d.add(f),f}}_throwIfStrict(e,i){if(i&&console.warn(e),this._strict)throw new Error(e)}}class bb{static traceInvocation(e,i){return e?new bb(2,i.name||new Error().stack.split(` +`).slice(3,4).join(` +`)):bb._None}static traceCreation(e,i){return e?new bb(1,i.name):bb._None}constructor(e,i){this.type=e,this.name=i,this._start=Date.now(),this._dep=[]}branch(e,i){const n=new bb(3,e.toString());return this._dep.push([e,i,n]),n}stop(){const e=Date.now()-this._start;bb._totals+=e;let i=!1;function n(l,d){const f=[],g=new Array(l+1).join(" ");for(const[y,w,x]of d._dep)if(w&&x){i=!0,f.push(`${g}CREATES -> ${y}`);const I=n(l+1,x);I&&f.push(I)}else f.push(`${g}uses -> ${y}`);return f.join(` +`)}const s=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${n(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${bb._totals.toFixed(2)}ms)`];(e>2||i)&&bb.all.add(s.join(` +`))}}bb.all=new Set;bb._None=new class extends bb{constructor(){super(0,null)}stop(){}branch(){return this}};bb._totals=0;const gyi=new Set([wa.inMemory,wa.vscodeSourceControl,wa.walkThrough,wa.walkThroughSnippet,wa.vscodeChatCodeBlock,wa.vscodeCopilotBackingChatCodeBlock]);class myi{constructor(){this._byResource=new E_,this._byOwner=new Map}set(e,i,n){let s=this._byResource.get(e);s||(s=new Map,this._byResource.set(e,s)),s.set(i,n);let l=this._byOwner.get(i);l||(l=new E_,this._byOwner.set(i,l)),l.set(e,n)}get(e,i){const n=this._byResource.get(e);return n==null?void 0:n.get(i)}delete(e,i){let n=!1,s=!1;const l=this._byResource.get(e);l&&(n=l.delete(i));const d=this._byOwner.get(i);if(d&&(s=d.delete(e)),n!==s)throw new Error("illegal state");return n&&s}values(e){var i,n,s,l;return typeof e=="string"?(n=(i=this._byOwner.get(e))===null||i===void 0?void 0:i.values())!==null&&n!==void 0?n:cc.empty():Oo.isUri(e)?(l=(s=this._byResource.get(e))===null||s===void 0?void 0:s.values())!==null&&l!==void 0?l:cc.empty():cc.map(cc.concat(...this._byOwner.values()),d=>d[1])}}class vyi{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new E_,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const i of e){const n=this._data.get(i);n&&this._substract(n);const s=this._resourceStats(i);this._add(s),this._data.set(i,s)}}_resourceStats(e){const i={errors:0,warnings:0,infos:0,unknowns:0};if(gyi.has(e.scheme))return i;for(const{severity:n}of this._service.read({resource:e}))n===Ah.Error?i.errors+=1:n===Ah.Warning?i.warnings+=1:n===Ah.Info?i.infos+=1:i.unknowns+=1;return i}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class cM{constructor(){this._onMarkerChanged=new Abt({delay:0,merge:cM._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new myi,this._stats=new vyi(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,i){for(const n of i||[])this.changeOne(e,n,[])}changeOne(e,i,n){if(_bt(n))this._data.delete(i,e)&&this._onMarkerChanged.fire([i]);else{const s=[];for(const l of n){const d=cM._toMarker(e,i,l);d&&s.push(d)}this._data.set(i,e,s),this._onMarkerChanged.fire([i])}}static _toMarker(e,i,n){let{code:s,severity:l,message:d,source:f,startLineNumber:g,startColumn:y,endLineNumber:w,endColumn:x,relatedInformation:I,tags:P}=n;if(d)return g=g>0?g:1,y=y>0?y:1,w=w>=g?w:g,x=x>0?x:y,{resource:i,owner:e,code:s,severity:l,message:d,source:f,startLineNumber:g,startColumn:y,endLineNumber:w,endColumn:x,relatedInformation:I,tags:P}}changeAll(e,i){const n=[],s=this._data.values(e);if(s)for(const l of s){const d=cc.first(l);d&&(n.push(d.resource),this._data.delete(d.resource,e))}if(bv(i)){const l=new E_;for(const{resource:d,marker:f}of i){const g=cM._toMarker(e,d,f);if(!g)continue;const y=l.get(d);y?y.push(g):(l.set(d,[g]),n.push(d))}for(const[d,f]of l)this._data.set(d,e,f)}n.length>0&&this._onMarkerChanged.fire(n)}read(e=Object.create(null)){let{owner:i,resource:n,severities:s,take:l}=e;if((!l||l<0)&&(l=-1),i&&n){const d=this._data.get(n,i);if(d){const f=[];for(const g of d)if(cM._accept(g,s)){const y=f.push(g);if(l>0&&y===l)break}return f}else return[]}else if(!i&&!n){const d=[];for(const f of this._data.values())for(const g of f)if(cM._accept(g,s)){const y=d.push(g);if(l>0&&y===l)return d}return d}else{const d=this._data.values(n??i),f=[];for(const g of d)for(const y of g)if(cM._accept(y,s)){const w=f.push(y);if(l>0&&w===l)return f}return f}}static _accept(e,i){return i===void 0||(i&e.severity)===e.severity}static _merge(e){const i=new E_;for(const n of e)for(const s of n)i.set(s,!0);return Array.from(i.keys())}}class yyi extends Ii{get configurationModel(){return this._configurationModel}constructor(e){super(),this.logService=e,this._configurationModel=i0.createEmptyModel(this.logService)}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=i0.createEmptyModel(this.logService);const e=dh.as(WE.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,i){const n=this.getConfigurationDefaultOverrides();for(const s of e){const l=n[s],d=i[s];l!==void 0?this._configurationModel.addValue(s,l):d?this._configurationModel.addValue(s,d.default):this._configurationModel.removeValue(s)}}}const LR=Kl("accessibilitySignalService");class ia{static register(e){return new ia(e.fileName)}constructor(e){this.fileName=e}}ia.error=ia.register({fileName:"error.mp3"});ia.warning=ia.register({fileName:"warning.mp3"});ia.success=ia.register({fileName:"success.mp3"});ia.foldedArea=ia.register({fileName:"foldedAreas.mp3"});ia.break=ia.register({fileName:"break.mp3"});ia.quickFixes=ia.register({fileName:"quickFixes.mp3"});ia.taskCompleted=ia.register({fileName:"taskCompleted.mp3"});ia.taskFailed=ia.register({fileName:"taskFailed.mp3"});ia.terminalBell=ia.register({fileName:"terminalBell.mp3"});ia.diffLineInserted=ia.register({fileName:"diffLineInserted.mp3"});ia.diffLineDeleted=ia.register({fileName:"diffLineDeleted.mp3"});ia.diffLineModified=ia.register({fileName:"diffLineModified.mp3"});ia.chatRequestSent=ia.register({fileName:"chatRequestSent.mp3"});ia.chatResponseReceived1=ia.register({fileName:"chatResponseReceived1.mp3"});ia.chatResponseReceived2=ia.register({fileName:"chatResponseReceived2.mp3"});ia.chatResponseReceived3=ia.register({fileName:"chatResponseReceived3.mp3"});ia.chatResponseReceived4=ia.register({fileName:"chatResponseReceived4.mp3"});ia.clear=ia.register({fileName:"clear.mp3"});ia.save=ia.register({fileName:"save.mp3"});ia.format=ia.register({fileName:"format.mp3"});ia.voiceRecordingStarted=ia.register({fileName:"voiceRecordingStarted.mp3"});ia.voiceRecordingStopped=ia.register({fileName:"voiceRecordingStopped.mp3"});ia.progress=ia.register({fileName:"progress.mp3"});class byi{constructor(e){this.randomOneOf=e}}class Na{constructor(e,i,n,s,l,d,f){this.sound=e,this.name=i,this.legacySoundSettingsKey=n,this.settingsKey=s,this.legacyAnnouncementSettingsKey=l,this.announcementMessage=d,this.delaySettingsKey=f}static register(e){const i=new byi("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),n=new Na(i,e.name,e.legacySoundSettingsKey,e.settingsKey,e.legacyAnnouncementSettingsKey,e.announcementMessage,e.delaySettingsKey);return Na._signals.add(n),n}}Na._signals=new Set;Na.errorAtPosition=Na.register({name:V("accessibilitySignals.positionHasError.name","Error at Position"),sound:ia.error,announcementMessage:V("accessibility.signals.positionHasError","Error"),settingsKey:"accessibility.signals.positionHasError",delaySettingsKey:"accessibility.signalOptions.delays.errorAtPosition"});Na.warningAtPosition=Na.register({name:V("accessibilitySignals.positionHasWarning.name","Warning at Position"),sound:ia.warning,announcementMessage:V("accessibility.signals.positionHasWarning","Warning"),settingsKey:"accessibility.signals.positionHasWarning",delaySettingsKey:"accessibility.signalOptions.delays.warningAtPosition"});Na.errorOnLine=Na.register({name:V("accessibilitySignals.lineHasError.name","Error on Line"),sound:ia.error,legacySoundSettingsKey:"audioCues.lineHasError",legacyAnnouncementSettingsKey:"accessibility.alert.error",announcementMessage:V("accessibility.signals.lineHasError","Error on Line"),settingsKey:"accessibility.signals.lineHasError"});Na.warningOnLine=Na.register({name:V("accessibilitySignals.lineHasWarning.name","Warning on Line"),sound:ia.warning,legacySoundSettingsKey:"audioCues.lineHasWarning",legacyAnnouncementSettingsKey:"accessibility.alert.warning",announcementMessage:V("accessibility.signals.lineHasWarning","Warning on Line"),settingsKey:"accessibility.signals.lineHasWarning"});Na.foldedArea=Na.register({name:V("accessibilitySignals.lineHasFoldedArea.name","Folded Area on Line"),sound:ia.foldedArea,legacySoundSettingsKey:"audioCues.lineHasFoldedArea",legacyAnnouncementSettingsKey:"accessibility.alert.foldedArea",announcementMessage:V("accessibility.signals.lineHasFoldedArea","Folded"),settingsKey:"accessibility.signals.lineHasFoldedArea"});Na.break=Na.register({name:V("accessibilitySignals.lineHasBreakpoint.name","Breakpoint on Line"),sound:ia.break,legacySoundSettingsKey:"audioCues.lineHasBreakpoint",legacyAnnouncementSettingsKey:"accessibility.alert.breakpoint",announcementMessage:V("accessibility.signals.lineHasBreakpoint","Breakpoint"),settingsKey:"accessibility.signals.lineHasBreakpoint"});Na.inlineSuggestion=Na.register({name:V("accessibilitySignals.lineHasInlineSuggestion.name","Inline Suggestion on Line"),sound:ia.quickFixes,legacySoundSettingsKey:"audioCues.lineHasInlineSuggestion",settingsKey:"accessibility.signals.lineHasInlineSuggestion"});Na.terminalQuickFix=Na.register({name:V("accessibilitySignals.terminalQuickFix.name","Terminal Quick Fix"),sound:ia.quickFixes,legacySoundSettingsKey:"audioCues.terminalQuickFix",legacyAnnouncementSettingsKey:"accessibility.alert.terminalQuickFix",announcementMessage:V("accessibility.signals.terminalQuickFix","Quick Fix"),settingsKey:"accessibility.signals.terminalQuickFix"});Na.onDebugBreak=Na.register({name:V("accessibilitySignals.onDebugBreak.name","Debugger Stopped on Breakpoint"),sound:ia.break,legacySoundSettingsKey:"audioCues.onDebugBreak",legacyAnnouncementSettingsKey:"accessibility.alert.onDebugBreak",announcementMessage:V("accessibility.signals.onDebugBreak","Breakpoint"),settingsKey:"accessibility.signals.onDebugBreak"});Na.noInlayHints=Na.register({name:V("accessibilitySignals.noInlayHints","No Inlay Hints on Line"),sound:ia.error,legacySoundSettingsKey:"audioCues.noInlayHints",legacyAnnouncementSettingsKey:"accessibility.alert.noInlayHints",announcementMessage:V("accessibility.signals.noInlayHints","No Inlay Hints"),settingsKey:"accessibility.signals.noInlayHints"});Na.taskCompleted=Na.register({name:V("accessibilitySignals.taskCompleted","Task Completed"),sound:ia.taskCompleted,legacySoundSettingsKey:"audioCues.taskCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.taskCompleted",announcementMessage:V("accessibility.signals.taskCompleted","Task Completed"),settingsKey:"accessibility.signals.taskCompleted"});Na.taskFailed=Na.register({name:V("accessibilitySignals.taskFailed","Task Failed"),sound:ia.taskFailed,legacySoundSettingsKey:"audioCues.taskFailed",legacyAnnouncementSettingsKey:"accessibility.alert.taskFailed",announcementMessage:V("accessibility.signals.taskFailed","Task Failed"),settingsKey:"accessibility.signals.taskFailed"});Na.terminalCommandFailed=Na.register({name:V("accessibilitySignals.terminalCommandFailed","Terminal Command Failed"),sound:ia.error,legacySoundSettingsKey:"audioCues.terminalCommandFailed",legacyAnnouncementSettingsKey:"accessibility.alert.terminalCommandFailed",announcementMessage:V("accessibility.signals.terminalCommandFailed","Command Failed"),settingsKey:"accessibility.signals.terminalCommandFailed"});Na.terminalCommandSucceeded=Na.register({name:V("accessibilitySignals.terminalCommandSucceeded","Terminal Command Succeeded"),sound:ia.success,announcementMessage:V("accessibility.signals.terminalCommandSucceeded","Command Succeeded"),settingsKey:"accessibility.signals.terminalCommandSucceeded"});Na.terminalBell=Na.register({name:V("accessibilitySignals.terminalBell","Terminal Bell"),sound:ia.terminalBell,legacySoundSettingsKey:"audioCues.terminalBell",legacyAnnouncementSettingsKey:"accessibility.alert.terminalBell",announcementMessage:V("accessibility.signals.terminalBell","Terminal Bell"),settingsKey:"accessibility.signals.terminalBell"});Na.notebookCellCompleted=Na.register({name:V("accessibilitySignals.notebookCellCompleted","Notebook Cell Completed"),sound:ia.taskCompleted,legacySoundSettingsKey:"audioCues.notebookCellCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellCompleted",announcementMessage:V("accessibility.signals.notebookCellCompleted","Notebook Cell Completed"),settingsKey:"accessibility.signals.notebookCellCompleted"});Na.notebookCellFailed=Na.register({name:V("accessibilitySignals.notebookCellFailed","Notebook Cell Failed"),sound:ia.taskFailed,legacySoundSettingsKey:"audioCues.notebookCellFailed",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellFailed",announcementMessage:V("accessibility.signals.notebookCellFailed","Notebook Cell Failed"),settingsKey:"accessibility.signals.notebookCellFailed"});Na.diffLineInserted=Na.register({name:V("accessibilitySignals.diffLineInserted","Diff Line Inserted"),sound:ia.diffLineInserted,legacySoundSettingsKey:"audioCues.diffLineInserted",settingsKey:"accessibility.signals.diffLineInserted"});Na.diffLineDeleted=Na.register({name:V("accessibilitySignals.diffLineDeleted","Diff Line Deleted"),sound:ia.diffLineDeleted,legacySoundSettingsKey:"audioCues.diffLineDeleted",settingsKey:"accessibility.signals.diffLineDeleted"});Na.diffLineModified=Na.register({name:V("accessibilitySignals.diffLineModified","Diff Line Modified"),sound:ia.diffLineModified,legacySoundSettingsKey:"audioCues.diffLineModified",settingsKey:"accessibility.signals.diffLineModified"});Na.chatRequestSent=Na.register({name:V("accessibilitySignals.chatRequestSent","Chat Request Sent"),sound:ia.chatRequestSent,legacySoundSettingsKey:"audioCues.chatRequestSent",legacyAnnouncementSettingsKey:"accessibility.alert.chatRequestSent",announcementMessage:V("accessibility.signals.chatRequestSent","Chat Request Sent"),settingsKey:"accessibility.signals.chatRequestSent"});Na.chatResponseReceived=Na.register({name:V("accessibilitySignals.chatResponseReceived","Chat Response Received"),legacySoundSettingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[ia.chatResponseReceived1,ia.chatResponseReceived2,ia.chatResponseReceived3,ia.chatResponseReceived4]},settingsKey:"accessibility.signals.chatResponseReceived"});Na.progress=Na.register({name:V("accessibilitySignals.progress","Progress"),sound:ia.progress,legacySoundSettingsKey:"audioCues.chatResponsePending",legacyAnnouncementSettingsKey:"accessibility.alert.progress",announcementMessage:V("accessibility.signals.progress","Progress"),settingsKey:"accessibility.signals.progress"});Na.clear=Na.register({name:V("accessibilitySignals.clear","Clear"),sound:ia.clear,legacySoundSettingsKey:"audioCues.clear",legacyAnnouncementSettingsKey:"accessibility.alert.clear",announcementMessage:V("accessibility.signals.clear","Clear"),settingsKey:"accessibility.signals.clear"});Na.save=Na.register({name:V("accessibilitySignals.save","Save"),sound:ia.save,legacySoundSettingsKey:"audioCues.save",legacyAnnouncementSettingsKey:"accessibility.alert.save",announcementMessage:V("accessibility.signals.save","Save"),settingsKey:"accessibility.signals.save"});Na.format=Na.register({name:V("accessibilitySignals.format","Format"),sound:ia.format,legacySoundSettingsKey:"audioCues.format",legacyAnnouncementSettingsKey:"accessibility.alert.format",announcementMessage:V("accessibility.signals.format","Format"),settingsKey:"accessibility.signals.format"});Na.voiceRecordingStarted=Na.register({name:V("accessibilitySignals.voiceRecordingStarted","Voice Recording Started"),sound:ia.voiceRecordingStarted,legacySoundSettingsKey:"audioCues.voiceRecordingStarted",settingsKey:"accessibility.signals.voiceRecordingStarted"});Na.voiceRecordingStopped=Na.register({name:V("accessibilitySignals.voiceRecordingStopped","Voice Recording Stopped"),sound:ia.voiceRecordingStopped,legacySoundSettingsKey:"audioCues.voiceRecordingStopped",settingsKey:"accessibility.signals.voiceRecordingStopped"});class Cyi extends Ii{constructor(e,i=[]){super(),this.logger=new tsi([e,...i]),this._register(e.onDidChangeLogLevel(n=>this.setLevel(n)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...i){this.logger.trace(e,...i)}debug(e,...i){this.logger.debug(e,...i)}info(e,...i){this.logger.info(e,...i)}warn(e,...i){this.logger.warn(e,...i)}error(e,...i){this.logger.error(e,...i)}}const pkt=[];function Jne(c){pkt.push(c)}function Syi(){return pkt.slice(0)}var a6=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},ym=function(c,e){return function(i,n){e(i,n,c)}};class wyi{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new ui}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let JBe=class{constructor(e){this.modelService=e}createModelReference(e){const i=this.modelService.getModel(e);return i?Promise.resolve(new lii(new wyi(i))):Promise.reject(new Error("Model not found"))}};JBe=a6([ym(0,Qf)],JBe);class Gye{show(){return Gye.NULL_PROGRESS_RUNNER}async showWhile(e,i){await e}}Gye.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class xyi{withProgress(e,i,n){return i({report:()=>{}})}}class kyi{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}}class Tyi{async confirm(e){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}doConfirm(e,i){let n=e;return i&&(n=n+` + +`+i),ed.confirm(n)}async prompt(e){var i,n;let s;if(this.doConfirm(e.message,e.detail)){const d=[...(i=e.buttons)!==null&&i!==void 0?i:[]];e.cancelButton&&typeof e.cancelButton!="string"&&typeof e.cancelButton!="boolean"&&d.push(e.cancelButton),s=await((n=d[0])===null||n===void 0?void 0:n.run({checkboxChecked:!1}))}return{result:s}}async error(e,i){await this.prompt({type:D_.Error,message:e,detail:i})}}class Nie{info(e){return this.notify({severity:D_.Info,message:e})}warn(e){return this.notify({severity:D_.Warning,message:e})}error(e){return this.notify({severity:D_.Error,message:e})}notify(e){switch(e.severity){case D_.Error:console.error(e.message);break;case D_.Warning:console.warn(e.message);break;default:console.log(e.message);break}return Nie.NO_OP}prompt(e,i,n,s){return Nie.NO_OP}status(e,i){return Ii.None}}Nie.NO_OP=new W_i;let GBe=class{constructor(e){this._onWillExecuteCommand=new ui,this._onDidExecuteCommand=new ui,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...i){const n=uc.getCommand(e);if(!n)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:i});const s=this._instantiationService.invokeFunction.apply(this._instantiationService,[n.handler,...i]);return this._onDidExecuteCommand.fire({commandId:e,args:i}),Promise.resolve(s)}catch(s){return Promise.reject(s)}}};GBe=a6([ym(0,So)],GBe);let Cq=class extends imi{constructor(e,i,n,s,l,d){super(e,i,n,s,l),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const f=P=>{const O=new On;O.add(tn(P,yr.KEY_DOWN,W=>{const X=new Fd(W);this._dispatch(X,X.target)&&(X.preventDefault(),X.stopPropagation())})),O.add(tn(P,yr.KEY_UP,W=>{const X=new Fd(W);this._singleModifierDispatch(X,X.target)&&X.preventDefault()})),this._domNodeListeners.push(new Dyi(P,O))},g=P=>{for(let O=0;O{P.getOption(61)||f(P.getContainerDomNode())},w=P=>{P.getOption(61)||g(P.getContainerDomNode())};this._register(d.onCodeEditorAdd(y)),this._register(d.onCodeEditorRemove(w)),d.listCodeEditors().forEach(y);const x=P=>{f(P.getContainerDomNode())},I=P=>{g(P.getContainerDomNode())};this._register(d.onDiffEditorAdd(x)),this._register(d.onDiffEditorRemove(I)),d.listDiffEditors().forEach(x)}addDynamicKeybinding(e,i,n,s){return dT(uc.registerCommand(e,n),this.addDynamicKeybindings([{keybinding:i,command:e,when:s}]))}addDynamicKeybindings(e){const i=e.map(n=>{var s;return{keybinding:F5e(n.keybinding,FC),command:(s=n.command)!==null&&s!==void 0?s:null,commandArgs:n.commandArgs,when:n.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}});return this._dynamicKeybindings=this._dynamicKeybindings.concat(i),this.updateResolver(),go(()=>{for(let n=0;nthis._log(n))}return this._cachedResolver}_documentHasFocus(){return ed.document.hasFocus()}_toNormalizedKeybindingItems(e,i){const n=[];let s=0;for(const l of e){const d=l.when||void 0,f=l.keybinding;if(!f)n[s++]=new dvt(void 0,l.command,l.commandArgs,d,i,null,!1);else{const g=hie.resolveKeybinding(f,FC);for(const y of g)n[s++]=new dvt(y,l.command,l.commandArgs,d,i,null,!1)}}return n}resolveKeyboardEvent(e){const i=new $4(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new hie([i],FC)}};Cq=a6([ym(0,Zo),ym(1,ff),ym(2,R0),ym(3,L_),ym(4,Sv),ym(5,Oc)],Cq);class Dyi extends Ii{constructor(e,i){super(),this.domNode=e,this._register(i)}}function t1t(c){return c&&typeof c=="object"&&(!c.overrideIdentifier||typeof c.overrideIdentifier=="string")&&(!c.resource||c.resource instanceof Oo)}let Kve=class{constructor(e){this.logService=e,this._onDidChangeConfiguration=new ui,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const i=new yyi(e);this._configuration=new kye(i.reload(),i0.createEmptyModel(e),i0.createEmptyModel(e),i0.createEmptyModel(e),i0.createEmptyModel(e),i0.createEmptyModel(e),new E_,i0.createEmptyModel(e),new E_,e),i.dispose()}getValue(e,i){const n=typeof e=="string"?e:void 0,s=t1t(e)?e:t1t(i)?i:{};return this._configuration.getValue(n,s,void 0)}updateValues(e){const i={data:this._configuration.toData()},n=[];for(const s of e){const[l,d]=s;this.getValue(l)!==d&&(this._configuration.updateValue(l,d),n.push(l))}if(n.length>0){const s=new Zgi({keys:n,overrides:[]},i,this._configuration,void 0,this.logService);s.source=8,this._onDidChangeConfiguration.fire(s)}return Promise.resolve()}updateValue(e,i,n,s){return this.updateValues([[e,i]])}inspect(e,i={}){return this._configuration.inspect(e,i,void 0)}};Kve=a6([ym(0,Sv)],Kve);let KBe=class{constructor(e,i,n){this.configurationService=e,this.modelService=i,this.languageService=n,this._onDidChangeConfiguration=new ui,this.configurationService.onDidChangeConfiguration(s=>{this._onDidChangeConfiguration.fire({affectedKeys:s.affectedKeys,affectsConfiguration:(l,d)=>s.affectsConfiguration(d)})})}getValue(e,i,n){const s=yi.isIPosition(i)?i:null,l=s?typeof n=="string"?n:void 0:typeof i=="string"?i:void 0,d=e?this.getLanguage(e,s):void 0;return typeof l>"u"?this.configurationService.getValue({resource:e,overrideIdentifier:d}):this.configurationService.getValue(l,{resource:e,overrideIdentifier:d})}getLanguage(e,i){const n=this.modelService.getModel(e);return n?i?n.getLanguageIdAtPosition(i.lineNumber,i.column):n.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};KBe=a6([ym(0,El),ym(1,Qf),ym(2,If)],KBe);let QBe=class{constructor(e){this.configurationService=e}getEOL(e,i){const n=this.configurationService.getValue("files.eol",{overrideIdentifier:i,resource:e});return n&&typeof n=="string"&&n!=="auto"?n:Ty||Wl?` +`:`\r +`}};QBe=a6([ym(0,El)],QBe);class Eyi{publicLog2(){}}class Lie{constructor(){const e=Oo.from({scheme:Lie.SCHEME,authority:"model",path:"/"});this.workspace={id:rxt,folders:[new gmi({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===Lie.SCHEME?this.workspace.folders[0]:null}}Lie.SCHEME="inmemory";function Qve(c,e,i){if(!e||!(c instanceof Kve))return;const n=[];Object.keys(e).forEach(s=>{Jgi(s)&&n.push([`editor.${s}`,e[s]]),i&&Ggi(s)&&n.push([`diffEditor.${s}`,e[s]])}),n.length>0&&c.updateValues(n)}let XBe=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,i){const n=Array.isArray(e)?e:tze.convert(e),s=new Map;for(const f of n){if(!(f instanceof zM))throw new Error("bad edit - only text edits are supported");const g=this._modelService.getModel(f.resource);if(!g)throw new Error("bad edit - model not found");if(typeof f.versionId=="number"&&g.getVersionId()!==f.versionId)throw new Error("bad state - model changed in the meantime");let y=s.get(g);y||(y=[],s.set(g,y)),y.push(Kf.replaceMove(at.lift(f.textEdit.range),f.textEdit.text))}let l=0,d=0;for(const[f,g]of s)f.pushStackElement(),f.pushEditOperations([],g,()=>[]),f.pushStackElement(),d+=1,l+=g.length;return{ariaSummary:p9(lBe.bulkEditServiceSummary,l,d),isApplied:l>0}}};XBe=a6([ym(0,Qf)],XBe);class Iyi{getUriLabel(e,i){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return lk(e)}}let ZBe=class extends txt{constructor(e,i){super(e),this._codeEditorService=i}showContextView(e,i,n){if(!i){const s=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();s&&(i=s.getContainerDomNode())}return super.showContextView(e,i,n)}};ZBe=a6([ym(0,DR),ym(1,Oc)],ZBe);class Nyi{constructor(){this._neverEmitter=new ui,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class Lyi extends gie{constructor(){super()}}class Pyi extends Cyi{constructor(){super(new esi)}}let YBe=class extends vBe{constructor(e,i,n,s,l,d){super(e,i,n,s,l,d),this.configure({blockMouse:!1})}};YBe=a6([ym(0,R0),ym(1,L_),ym(2,n6),ym(3,ou),ym(4,Dw),ym(5,Zo)],YBe);class Ayi{async playSignal(e,i){}}dc(Sv,Pyi,0);dc(El,Kve,0);dc(YHe,KBe,0);dc(oSt,QBe,0);dc(T9,Lie,0);dc(hq,Iyi,0);dc(R0,Eyi,0);dc(Mne,Tyi,0);dc(Hje,kyi,0);dc(L_,Nie,0);dc(EL,cM,0);dc(If,Lyi,0);dc(Nw,tyi,0);dc(Qf,Pve,0);dc(sje,wBe,0);dc(Zo,$Be,0);dc(nxt,xyi,0);dc(IR,Gye,0);dc(mT,I0i,0);dc(_k,r9e,0);dc(Fne,XBe,0);dc(sxt,Nyi,0);dc(Lb,JBe,0);dc($C,HBe,0);dc(gk,_1i,0);dc(ff,GBe,0);dc(ou,Cq,0);dc(pk,WBe,0);dc(n6,ZBe,0);dc(KC,SBe,0);dc(o6,Jve,0);dc(GC,YBe,0);dc(Dw,jBe,0);dc(LR,Ayi,0);var Xo;(function(c){const e=new One;for(const[g,y]of Mgt())e.set(g,y);const i=new Gve(e,!0);e.set(So,i);function n(g){s||d({});const y=e.get(g);if(!y)throw new Error("Missing service "+g);return y instanceof aE?i.invokeFunction(w=>w.get(g)):y}c.get=n;let s=!1;const l=new ui;function d(g){if(s)return i;s=!0;for(const[w,x]of Mgt())e.get(w)||e.set(w,x);for(const w in g)if(g.hasOwnProperty(w)){const x=Kl(w);e.get(x)instanceof aE&&e.set(x,g[w])}const y=Syi();for(const w of y)try{i.createInstance(w)}catch(x){Ba(x)}return l.fire(),i}c.initialize=d;function f(g){if(s)return g();const y=new On,w=y.add(l.event(()=>{w.dispose(),y.add(g())}));return y}c.withServices=f})(Xo||(Xo={}));class ME{static capture(e){if(e.getScrollTop()===0||e.hasPendingScrollAnimation())return new ME(e.getScrollTop(),e.getContentHeight(),null,0,null);let i=null,n=0;const s=e.getVisibleRanges();if(s.length>0){i=s[0].getStartPosition();const l=e.getTopForPosition(i.lineNumber,i.column);n=e.getScrollTop()-l}return new ME(e.getScrollTop(),e.getContentHeight(),i,n,e.getPosition())}constructor(e,i,n,s,l){this._initialScrollTop=e,this._initialContentHeight=i,this._visiblePosition=n,this._visiblePositionScrollDelta=s,this._cursorPosition=l}restore(e){if(!(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())&&this._visiblePosition){const i=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(i+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;const i=e.getPosition();if(!this._cursorPosition||!i)return;const n=e.getTopForLineNumber(i.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+n,1)}}function Eze(){return FFe&&!!FFe.VSCODE_DEV}function gkt(c){if(Eze()){const e=Oyi();return e.add(c),{dispose(){e.delete(c)}}}else return{dispose(){}}}function Oyi(){rme||(rme=new Set);const c=globalThis;return c.$hotReload_applyNewExports||(c.$hotReload_applyNewExports=e=>{const i={config:{mode:void 0},...e};for(const n of rme){const s=n(i);if(s)return s}}),rme}let rme;Eze()&&gkt(({oldExports:c,newSrc:e,config:i})=>{if(i.mode==="patch-prototype")return n=>{var s,l;for(const d in n){const f=n[d];if(console.log(`[hot-reload] Patching prototype methods of '${d}'`,{exportedItem:f}),typeof f=="function"&&f.prototype){const g=c[d];if(g){for(const y of Object.getOwnPropertyNames(f.prototype)){const w=Object.getOwnPropertyDescriptor(f.prototype,y),x=Object.getOwnPropertyDescriptor(g.prototype,y);((s=w==null?void 0:w.value)===null||s===void 0?void 0:s.toString())!==((l=x==null?void 0:x.value)===null||l===void 0?void 0:l.toString())&&console.log(`[hot-reload] Patching prototype method '${d}.${y}'`),Object.defineProperty(g.prototype,y,w)}n[d]=g}}}return!0}});function Myi(c,e,i,n){if(c.length===0)return e;if(e.length===0)return c;const s=[];let l=0,d=0;for(;lw?(s.push(g),d++):(s.push(n(f,g)),l++,d++)}for(;l`Apply decorations from ${e.debugName}`},s=>{const l=e.read(s);n.set(l)})),i.add({dispose:()=>{n.clear()}}),i}function Bee(c,e){return c.appendChild(e),go(()=>{c.removeChild(e)})}function Ryi(c,e){return c.prepend(e),go(()=>{c.removeChild(e)})}class mkt extends Ii{get width(){return this._width}get height(){return this._height}get automaticLayout(){return this._automaticLayout}constructor(e,i){super(),this._automaticLayout=!1,this.elementSizeObserver=this._register(new hSt(e,i)),this._width=yc(this,this.elementSizeObserver.getWidth()),this._height=yc(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(n=>Rd(s=>{this._width.set(this.elementSizeObserver.getWidth(),s),this._height.set(this.elementSizeObserver.getHeight(),s)})))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){this._automaticLayout=e,e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}function i1t(c,e,i){let n=e.get(),s=n,l=n;const d=yc("animatedValue",n);let f=-1;const g=300;let y;i.add(Vne({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(x,I)=>(x.didChange(e)&&(I.animate=I.animate||x.change),!0)},(x,I)=>{y!==void 0&&(c.cancelAnimationFrame(y),y=void 0),s=l,n=e.read(x),f=Date.now()-(I.animate?0:g),w()}));function w(){const x=Date.now()-f;l=Math.floor(Fyi(x,s,n-s,g)),x{this._actualTop.set(n,void 0)},this.onComputedHeight=n=>{this._actualHeight.set(n,void 0)}}}class Kye{constructor(e,i){this._editor=e,this._domElement=i,this._overlayWidgetId=`managedOverlayWidget-${Kye._counter++}`,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}}Kye._counter=0;function uR(c,e){return Cl(i=>{for(let[n,s]of Object.entries(e))s&&typeof s=="object"&&"read"in s&&(s=s.read(i)),typeof s=="number"&&(s=`${s}px`),n=n.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c.style[n]=s})}function eT(c,e){return Byi([c],e),c}function Byi(c,e){Eze()&&yv("reload",n=>gkt(({oldExports:s})=>{if([...Object.values(s)].some(l=>c.includes(l)))return l=>(n(void 0),!0)})).read(e)}function Yve(c,e,i,n){const s=new On,l=[];return s.add(ck((d,f)=>{const g=e.read(d),y=new Map,w=new Map;i&&i(!0),c.changeViewZones(x=>{for(const I of l)x.removeZone(I),n==null||n.delete(I);l.length=0;for(const I of g){const P=x.addZone(I);I.setZoneId&&I.setZoneId(P),l.push(P),n==null||n.add(P),y.set(I,P)}}),i&&i(!1),f.add(Vne({createEmptyChangeSummary(){return{zoneIds:[]}},handleChange(x,I){const P=w.get(x.changedObservable);return P!==void 0&&I.zoneIds.push(P),!0}},(x,I)=>{for(const P of g)P.onChange&&(w.set(P.onChange,y.get(P)),P.onChange.read(x));i&&i(!0),c.changeViewZones(P=>{for(const O of I.zoneIds)P.layoutZone(O)}),i&&i(!1)}))})),s.add({dispose(){i&&i(!0),c.changeViewZones(d=>{for(const f of l)d.removeZone(f)}),n==null||n.clear(),i&&i(!1)}}),s}class Wyi extends uh{dispose(){super.dispose(!0)}}function n1t(c,e){const i=zte(e,s=>s.original.startLineNumber<=c.lineNumber);if(!i)return at.fromPositions(c);if(i.original.endLineNumberExclusive<=c.lineNumber){const s=c.lineNumber-i.original.endLineNumberExclusive+i.modified.endLineNumberExclusive;return at.fromPositions(new yi(s,c.column))}if(!i.innerChanges)return at.fromPositions(new yi(i.modified.startLineNumber,1));const n=zte(i.innerChanges,s=>s.originalRange.getStartPosition().isBeforeOrEqual(c));if(!n){const s=c.lineNumber-i.original.startLineNumber+i.modified.startLineNumber;return at.fromPositions(new yi(s,c.column))}if(n.originalRange.containsPosition(c))return n.modifiedRange;{const s=Vyi(n.originalRange.getEndPosition(),c);return at.fromPositions(s.addToPosition(n.modifiedRange.getEndPosition()))}}function Vyi(c,e){return c.lineNumber===e.lineNumber?new Cy(0,e.column-c.column):new Cy(e.lineNumber-c.lineNumber,e.column-1)}function Hyi(c,e){let i;return c.filter(n=>{const s=e(n,i);return i=n,s})}var Ize=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Nze=function(c,e){return function(i,n){e(i,n,c)}};const jyi=Oh("diff-review-insert",Dr.add,V("accessibleDiffViewerInsertIcon","Icon for 'Insert' in accessible diff viewer.")),zyi=Oh("diff-review-remove",Dr.remove,V("accessibleDiffViewerRemoveIcon","Icon for 'Remove' in accessible diff viewer.")),Uyi=Oh("diff-review-close",Dr.close,V("accessibleDiffViewerCloseIcon","Icon for 'Close' in accessible diff viewer."));let LM=class extends Ii{constructor(e,i,n,s,l,d,f,g,y){super(),this._parentNode=e,this._visible=i,this._setVisible=n,this._canClose=s,this._width=l,this._height=d,this._diffs=f,this._models=g,this._instantiationService=y,this._state=tB(this,(w,x)=>{const I=this._visible.read(w);if(this._parentNode.style.visibility=I?"visible":"hidden",!I)return null;const P=x.add(this._instantiationService.createInstance(eWe,this._diffs,this._models,this._setVisible,this._canClose)),O=x.add(this._instantiationService.createInstance(tWe,this._parentNode,P,this._width,this._height,this._models));return{model:P,view:O}}).recomputeInitiallyAndOnChange(this._store)}next(){Rd(e=>{const i=this._visible.get();this._setVisible(!0,e),i&&this._state.get().model.nextGroup(e)})}prev(){Rd(e=>{this._setVisible(!0,e),this._state.get().model.previousGroup(e)})}close(){Rd(e=>{this._setVisible(!1,e)})}};LM._ttPolicy=i6("diffReview",{createHTML:c=>c});LM=Ize([Nze(8,So)],LM);let eWe=class extends Ii{constructor(e,i,n,s,l){super(),this._diffs=e,this._models=i,this._setVisible=n,this.canClose=s,this._accessibilitySignalService=l,this._groups=yc(this,[]),this._currentGroupIdx=yc(this,0),this._currentElementIdx=yc(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map((d,f)=>this._groups.read(f)[d]),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map((d,f)=>{var g;return(g=this.currentGroup.read(f))===null||g===void 0?void 0:g.lines[d]}),this._register(Cl(d=>{const f=this._diffs.read(d);if(!f){this._groups.set([],void 0);return}const g=qyi(f,this._models.getOriginalModel().getLineCount(),this._models.getModifiedModel().getLineCount());Rd(y=>{const w=this._models.getModifiedPosition();if(w){const x=g.findIndex(I=>(w==null?void 0:w.lineNumber){const f=this.currentElement.read(d);(f==null?void 0:f.type)===py.Deleted?this._accessibilitySignalService.playSignal(Na.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):(f==null?void 0:f.type)===py.Added&&this._accessibilitySignalService.playSignal(Na.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})})),this._register(Cl(d=>{var f;const g=this.currentElement.read(d);if(g&&g.type!==py.Header){const y=(f=g.modifiedLineNumber)!==null&&f!==void 0?f:g.diff.modified.startLineNumber;this._models.modifiedSetSelection(at.fromPositions(new yi(y,1)))}}))}_goToGroupDelta(e,i){const n=this.groups.get();!n||n.length<=1||vie(i,s=>{this._currentGroupIdx.set(gl.ofLength(n.length).clipCyclic(this._currentGroupIdx.get()+e),s),this._currentElementIdx.set(0,s)})}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){const i=this.currentGroup.get();!i||i.lines.length<=1||Rd(n=>{this._currentElementIdx.set(gl.ofLength(i.lines.length).clip(this._currentElementIdx.get()+e),n)})}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){const i=this.currentGroup.get();if(!i)return;const n=i.lines.indexOf(e);n!==-1&&Rd(s=>{this._currentElementIdx.set(n,s)})}revealCurrentElementInEditor(){if(!this.canClose.get())return;this._setVisible(!1,void 0);const e=this.currentElement.get();e&&(e.type===py.Deleted?this._models.originalReveal(at.fromPositions(new yi(e.originalLineNumber,1))):this._models.modifiedReveal(e.type!==py.Header?at.fromPositions(new yi(e.modifiedLineNumber,1)):void 0))}close(){this.canClose.get()&&(this._setVisible(!1,void 0),this._models.modifiedFocus())}};eWe=Ize([Nze(4,LR)],eWe);const uee=3;function qyi(c,e,i){const n=[];for(const s of dHe(c,(l,d)=>d.modified.startLineNumber-l.modified.endLineNumberExclusive<2*uee)){const l=[];l.push(new Jyi);const d=new cl(Math.max(1,s[0].original.startLineNumber-uee),Math.min(s[s.length-1].original.endLineNumberExclusive+uee,e+1)),f=new cl(Math.max(1,s[0].modified.startLineNumber-uee),Math.min(s[s.length-1].modified.endLineNumberExclusive+uee,i+1));hbt(s,(w,x)=>{const I=new cl(w?w.original.endLineNumberExclusive:d.startLineNumber,x?x.original.startLineNumber:d.endLineNumberExclusive),P=new cl(w?w.modified.endLineNumberExclusive:f.startLineNumber,x?x.modified.startLineNumber:f.endLineNumberExclusive);I.forEach(O=>{l.push(new Qyi(O,P.startLineNumber+(O-I.startLineNumber)))}),x&&(x.original.forEach(O=>{l.push(new Gyi(x,O))}),x.modified.forEach(O=>{l.push(new Kyi(x,O))}))});const g=s[0].modified.join(s[s.length-1].modified),y=s[0].original.join(s[s.length-1].original);n.push(new $yi(new my(g,y),l))}return n}var py;(function(c){c[c.Header=0]="Header",c[c.Unchanged=1]="Unchanged",c[c.Deleted=2]="Deleted",c[c.Added=3]="Added"})(py||(py={}));class $yi{constructor(e,i){this.range=e,this.lines=i}}class Jyi{constructor(){this.type=py.Header}}class Gyi{constructor(e,i){this.diff=e,this.originalLineNumber=i,this.type=py.Deleted,this.modifiedLineNumber=void 0}}class Kyi{constructor(e,i){this.diff=e,this.modifiedLineNumber=i,this.type=py.Added,this.originalLineNumber=void 0}}class Qyi{constructor(e,i){this.originalLineNumber=e,this.modifiedLineNumber=i,this.type=py.Unchanged}}let tWe=class extends Ii{constructor(e,i,n,s,l,d){super(),this._element=e,this._model=i,this._width=n,this._height=s,this._models=l,this._languageService=d,this.domNode=this._element,this.domNode.className="monaco-component diff-review monaco-editor-background";const f=document.createElement("div");f.className="diff-review-actions",this._actionBar=this._register(new uk(f)),this._register(Cl(g=>{this._actionBar.clear(),this._model.canClose.read(g)&&this._actionBar.push(new WC("diffreview.close",V("label.close","Close"),"close-diff-review "+Uo.asClassName(Uyi),!0,async()=>i.close()),{label:!1,icon:!0})})),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new Ine(this._content,{})),r0(this.domNode,this._scrollbar.getDomNode(),f),this._register(Cl(g=>{this._height.read(g),this._width.read(g),this._scrollbar.scanDomNode()})),this._register(go(()=>{r0(this.domNode)})),this._register(uR(this.domNode,{width:this._width,height:this._height})),this._register(uR(this._content,{width:this._width,height:this._height})),this._register(ck((g,y)=>{this._model.currentGroup.read(g),this._render(y)})),this._register(n_(this.domNode,"keydown",g=>{(g.equals(18)||g.equals(2066)||g.equals(530))&&(g.preventDefault(),this._model.goToNextLine()),(g.equals(16)||g.equals(2064)||g.equals(528))&&(g.preventDefault(),this._model.goToPreviousLine()),(g.equals(9)||g.equals(2057)||g.equals(521)||g.equals(1033))&&(g.preventDefault(),this._model.close()),(g.equals(10)||g.equals(3))&&(g.preventDefault(),this._model.revealCurrentElementInEditor())}))}_render(e){const i=this._models.getOriginalOptions(),n=this._models.getModifiedOptions(),s=document.createElement("div");s.className="diff-review-table",s.setAttribute("role","list"),s.setAttribute("aria-label",V("ariaLabel","Accessible Diff Viewer. Use arrow up and down to navigate.")),s0(s,n.get(50)),r0(this._content,s);const l=this._models.getOriginalModel(),d=this._models.getModifiedModel();if(!l||!d)return;const f=l.getOptions(),g=d.getOptions(),y=n.get(67),w=this._model.currentGroup.get();for(const x of(w==null?void 0:w.lines)||[]){if(!w)break;let I;if(x.type===py.Header){const O=document.createElement("div");O.className="diff-review-row",O.setAttribute("role","listitem");const W=w.range,X=this._model.currentGroupIndex.get(),Z=this._model.groups.get().length,ee=Be=>Be===0?V("no_lines_changed","no lines changed"):Be===1?V("one_line_changed","1 line changed"):V("more_lines_changed","{0} lines changed",Be),he=ee(W.original.length),we=ee(W.modified.length);O.setAttribute("aria-label",V({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",X+1,Z,W.original.startLineNumber,he,W.modified.startLineNumber,we));const Te=document.createElement("div");Te.className="diff-review-cell diff-review-summary",Te.appendChild(document.createTextNode(`${X+1}/${Z}: @@ -${W.original.startLineNumber},${W.original.length} +${W.modified.startLineNumber},${W.modified.length} @@`)),O.appendChild(Te),I=O}else I=this._createRow(x,y,this._width.get(),i,l,f,n,d,g);s.appendChild(I);const P=Ma(O=>this._model.currentElement.read(O)===x);e.add(Cl(O=>{const W=P.read(O);I.tabIndex=W?0:-1,W&&I.focus()})),e.add(tn(I,"focus",()=>{this._model.goToLine(x)}))}this._scrollbar.scanDomNode()}_createRow(e,i,n,s,l,d,f,g,y){const w=s.get(145),x=w.glyphMarginWidth+w.lineNumbersWidth,I=f.get(145),P=10+I.glyphMarginWidth+I.lineNumbersWidth;let O="diff-review-row",W="";const X="diff-review-spacer";let Z=null;switch(e.type){case py.Added:O="diff-review-row line-insert",W=" char-insert",Z=jyi;break;case py.Deleted:O="diff-review-row line-delete",W=" char-delete",Z=zyi;break}const ee=document.createElement("div");ee.style.minWidth=n+"px",ee.className=O,ee.setAttribute("role","listitem"),ee.ariaLevel="";const he=document.createElement("div");he.className="diff-review-cell",he.style.height=`${i}px`,ee.appendChild(he);const we=document.createElement("span");we.style.width=x+"px",we.style.minWidth=x+"px",we.className="diff-review-line-number"+W,e.originalLineNumber!==void 0?we.appendChild(document.createTextNode(String(e.originalLineNumber))):we.innerText=" ",he.appendChild(we);const Te=document.createElement("span");Te.style.width=P+"px",Te.style.minWidth=P+"px",Te.style.paddingRight="10px",Te.className="diff-review-line-number"+W,e.modifiedLineNumber!==void 0?Te.appendChild(document.createTextNode(String(e.modifiedLineNumber))):Te.innerText=" ",he.appendChild(Te);const Be=document.createElement("span");if(Be.className=X,Z){const Nt=document.createElement("span");Nt.className=Uo.asClassName(Z),Nt.innerText="  ",Be.appendChild(Nt)}else Be.innerText="  ";he.appendChild(Be);let Me;if(e.modifiedLineNumber!==void 0){let Nt=this._getLineHtml(g,f,y.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);LM._ttPolicy&&(Nt=LM._ttPolicy.createHTML(Nt)),he.insertAdjacentHTML("beforeend",Nt),Me=g.getLineContent(e.modifiedLineNumber)}else{let Nt=this._getLineHtml(l,s,d.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);LM._ttPolicy&&(Nt=LM._ttPolicy.createHTML(Nt)),he.insertAdjacentHTML("beforeend",Nt),Me=l.getLineContent(e.originalLineNumber)}Me.length===0&&(Me=V("blankLine","blank"));let vt="";switch(e.type){case py.Unchanged:e.originalLineNumber===e.modifiedLineNumber?vt=V({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",Me,e.originalLineNumber):vt=V("equalLine","{0} original line {1} modified line {2}",Me,e.originalLineNumber,e.modifiedLineNumber);break;case py.Added:vt=V("insertLine","+ {0} modified line {1}",Me,e.modifiedLineNumber);break;case py.Deleted:vt=V("deleteLine","- {0} original line {1}",Me,e.originalLineNumber);break}return ee.setAttribute("aria-label",vt),ee}_getLineHtml(e,i,n,s,l){const d=e.getLineContent(s),f=i.get(50),g=vp.createEmpty(d,l),y=xw.isBasicASCII(d,e.mightContainNonBasicASCII()),w=xw.containsRTL(d,y,e.mightContainRTL());return rye(new TR(f.isMonospace&&!i.get(33),f.canUseHalfwidthRightwardsArrow,d,!1,y,w,0,g,[],n,0,f.spaceWidth,f.middotWidth,f.wsmiddotWidth,i.get(117),i.get(99),i.get(94),i.get(51)!==fw.OFF,null)).html}};tWe=Ize([Nze(5,If)],tWe);class Xyi{constructor(e){this.editors=e}getOriginalModel(){return this.editors.original.getModel()}getOriginalOptions(){return this.editors.original.getOptions()}originalReveal(e){this.editors.original.revealRange(e),this.editors.original.setSelection(e),this.editors.original.focus()}getModifiedModel(){return this.editors.modified.getModel()}getModifiedOptions(){return this.editors.modified.getOptions()}modifiedReveal(e){e&&(this.editors.modified.revealRange(e),this.editors.modified.setSelection(e)),this.editors.modified.focus()}modifiedSetSelection(e){this.editors.modified.setSelection(e)}modifiedFocus(){this.editors.modified.focus()}getModifiedPosition(){var e;return(e=this.editors.modified.getPosition())!==null&&e!==void 0?e:void 0}}class $M extends Ii{constructor(e,i,n,s,l){super(),this._rootElement=e,this._diffModel=i,this._originalEditorLayoutInfo=n,this._modifiedEditorLayoutInfo=s,this._editors=l,this._originalScrollTop=Zu(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=Zu(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._viewZonesChanged=yv("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=yc(this,0),this._modifiedViewZonesChangedSignal=yv("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=yv("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=tB(this,(w,x)=>{var I;this._element.replaceChildren();const P=this._diffModel.read(w),O=(I=P==null?void 0:P.diff.read(w))===null||I===void 0?void 0:I.movedTexts;if(!O||O.length===0){this.width.set(0,void 0);return}this._viewZonesChanged.read(w);const W=this._originalEditorLayoutInfo.read(w),X=this._modifiedEditorLayoutInfo.read(w);if(!W||!X){this.width.set(0,void 0);return}this._modifiedViewZonesChangedSignal.read(w),this._originalViewZonesChangedSignal.read(w);const Z=O.map(vt=>{function Nt(Xs,Yt){const na=Yt.getTopForLineNumber(Xs.startLineNumber,!0),Is=Yt.getTopForLineNumber(Xs.endLineNumberExclusive,!0);return(na+Is)/2}const Ni=Nt(vt.lineRangeMapping.original,this._editors.original),ci=this._originalScrollTop.read(w),Mt=Nt(vt.lineRangeMapping.modified,this._editors.modified),pi=this._modifiedScrollTop.read(w),gn=Ni-ci,$n=Mt-pi,Ri=Math.min(Ni,Mt),ao=Math.max(Ni,Mt);return{range:new gl(Ri,ao),from:gn,to:$n,fromWithoutScroll:Ni,toWithoutScroll:Mt,move:vt}});Z.sort($ei(kb(vt=>vt.fromWithoutScroll>vt.toWithoutScroll,Jei),kb(vt=>vt.fromWithoutScroll>vt.toWithoutScroll?vt.fromWithoutScroll:-vt.toWithoutScroll,uT)));const ee=Lze.compute(Z.map(vt=>vt.range)),he=10,we=W.verticalScrollbarWidth,Te=(ee.getTrackCount()-1)*10+he*2,Be=we+Te+(X.contentLeft-$M.movedCodeBlockPadding);let Me=0;for(const vt of Z){const Nt=ee.getTrack(Me),Ni=we+he+Nt*10,ci=15,Mt=15,pi=Be,gn=X.glyphMarginWidth+X.lineNumbersWidth,$n=18,Ri=document.createElementNS("http://www.w3.org/2000/svg","rect");Ri.classList.add("arrow-rectangle"),Ri.setAttribute("x",`${pi-gn}`),Ri.setAttribute("y",`${vt.to-$n/2}`),Ri.setAttribute("width",`${gn}`),Ri.setAttribute("height",`${$n}`),this._element.appendChild(Ri);const ao=document.createElementNS("http://www.w3.org/2000/svg","g"),Xs=document.createElementNS("http://www.w3.org/2000/svg","path");Xs.setAttribute("d",`M 0 ${vt.from} L ${Ni} ${vt.from} L ${Ni} ${vt.to} L ${pi-Mt} ${vt.to}`),Xs.setAttribute("fill","none"),ao.appendChild(Xs);const Yt=document.createElementNS("http://www.w3.org/2000/svg","polygon");Yt.classList.add("arrow"),x.add(Cl(na=>{Xs.classList.toggle("currentMove",vt.move===P.activeMovedText.read(na)),Yt.classList.toggle("currentMove",vt.move===P.activeMovedText.read(na))})),Yt.setAttribute("points",`${pi-Mt},${vt.to-ci/2} ${pi},${vt.to} ${pi-Mt},${vt.to+ci/2}`),ao.appendChild(Yt),this._element.appendChild(ao),Me++}this.width.set(Te,void 0)}),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register(go(()=>this._element.remove())),this._register(Cl(w=>{const x=this._originalEditorLayoutInfo.read(w),I=this._modifiedEditorLayoutInfo.read(w);!x||!I||(this._element.style.left=`${x.width-x.verticalScrollbarWidth}px`,this._element.style.height=`${x.height}px`,this._element.style.width=`${x.verticalScrollbarWidth+x.contentLeft-$M.movedCodeBlockPadding+this.width.read(w)}px`)})),this._register(Hne(this._state));const d=Ma(w=>{const x=this._diffModel.read(w),I=x==null?void 0:x.diff.read(w);return I?I.movedTexts.map(P=>({move:P,original:new Zve(pE(P.lineRangeMapping.original.startLineNumber-1),18),modified:new Zve(pE(P.lineRangeMapping.modified.startLineNumber-1),18)})):[]});this._register(Yve(this._editors.original,d.map(w=>w.map(x=>x.original)))),this._register(Yve(this._editors.modified,d.map(w=>w.map(x=>x.modified)))),this._register(ck((w,x)=>{const I=d.read(w);for(const P of I)x.add(new r1t(this._editors.original,P.original,P.move,"original",this._diffModel.get())),x.add(new r1t(this._editors.modified,P.modified,P.move,"modified",this._diffModel.get()))}));const f=yv("original.onDidFocusEditorWidget",w=>this._editors.original.onDidFocusEditorWidget(()=>setTimeout(()=>w(void 0),0))),g=yv("modified.onDidFocusEditorWidget",w=>this._editors.modified.onDidFocusEditorWidget(()=>setTimeout(()=>w(void 0),0)));let y="modified";this._register(Vne({createEmptyChangeSummary:()=>{},handleChange:(w,x)=>(w.didChange(f)&&(y="original"),w.didChange(g)&&(y="modified"),!0)},w=>{f.read(w),g.read(w);const x=this._diffModel.read(w);if(!x)return;const I=x.diff.read(w);let P;if(I&&y==="original"){const O=this._editors.originalCursor.read(w);O&&(P=I.movedTexts.find(W=>W.lineRangeMapping.original.contains(O.lineNumber)))}if(I&&y==="modified"){const O=this._editors.modifiedCursor.read(w);O&&(P=I.movedTexts.find(W=>W.lineRangeMapping.modified.contains(O.lineNumber)))}P!==x.movedTextToCompare.get()&&x.movedTextToCompare.set(void 0,void 0),x.setActiveMovedText(P)}))}}$M.movedCodeBlockPadding=4;class Lze{static compute(e){const i=[],n=[];for(const s of e){let l=i.findIndex(d=>!d.intersectsStrict(s));l===-1&&(i.length>=6?l=Toi(i,kb(f=>f.intersectWithRangeLength(s),uT)):(l=i.length,i.push(new KHe))),i[l].addRange(s),n.push(l)}return new Lze(i.length,n)}constructor(e,i){this._trackCount=e,this.trackPerLineIdx=i}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}}class r1t extends vkt{constructor(e,i,n,s,l){const d=Yc("div.diff-hidden-lines-widget");super(e,i,d.root),this._editor=e,this._move=n,this._kind=s,this._diffModel=l,this._nodes=Yc("div.diff-moved-code-block",{style:{marginRight:"4px"}},[Yc("div.text-content@textContent"),Yc("div.action-bar@actionBar")]),d.root.appendChild(this._nodes.root);const f=Zu(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._register(uR(this._nodes.root,{paddingRight:f.map(I=>I.verticalScrollbarWidth)}));let g;n.changes.length>0?g=this._kind==="original"?V("codeMovedToWithChanges","Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):V("codeMovedFromWithChanges","Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):g=this._kind==="original"?V("codeMovedTo","Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):V("codeMovedFrom","Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);const y=this._register(new uk(this._nodes.actionBar,{highlightToggledItems:!0})),w=new WC("",g,"",!1);y.push(w,{icon:!1,label:!0});const x=new WC("","Compare",Uo.asClassName(Dr.compareChanges),!0,()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===n?void 0:this._move,void 0)});this._register(Cl(I=>{const P=this._diffModel.movedTextToCompare.read(I)===n;x.checked=P})),y.push(x,{icon:!1,label:!0})}}Ft("diffEditor.move.border",{dark:"#8b8b8b9c",light:"#8b8b8b9c",hcDark:"#8b8b8b9c",hcLight:"#8b8b8b9c"},V("diffEditor.move.border","The border color for text that got moved in the diff editor."));Ft("diffEditor.moveActive.border",{dark:"#FFA500",light:"#FFA500",hcDark:"#FFA500",hcLight:"#FFA500"},V("diffEditor.moveActive.border","The active border color for text that got moved in the diff editor."));Ft("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},V("diffEditor.unchangedRegionShadow","The color of the shadow around unchanged region widgets."));const Zyi=Oh("diff-insert",Dr.add,V("diffInsertIcon","Line decoration for inserts in the diff editor.")),ykt=Oh("diff-remove",Dr.remove,V("diffRemoveIcon","Line decoration for removals in the diff editor.")),s1t=Xa.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+Uo.asClassName(Zyi),marginClassName:"gutter-insert"}),o1t=Xa.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+Uo.asClassName(ykt),marginClassName:"gutter-delete"}),a1t=Xa.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),l1t=Xa.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),c1t=Xa.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),Yyi=Xa.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),ebi=Xa.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),iWe=Xa.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),tbi=Xa.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),ibi=Xa.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"});class nbi extends Ii{constructor(e,i,n,s){super(),this._editors=e,this._diffModel=i,this._options=n,this._decorations=Ma(this,l=>{var d;const f=(d=this._diffModel.read(l))===null||d===void 0?void 0:d.diff.read(l);if(!f)return null;const g=this._diffModel.read(l).movedTextToCompare.read(l),y=this._options.renderIndicators.read(l),w=this._options.showEmptyDecorations.read(l),x=[],I=[];if(!g)for(const O of f.mappings)if(O.lineRangeMapping.original.isEmpty||x.push({range:O.lineRangeMapping.original.toInclusiveRange(),options:y?o1t:l1t}),O.lineRangeMapping.modified.isEmpty||I.push({range:O.lineRangeMapping.modified.toInclusiveRange(),options:y?s1t:a1t}),O.lineRangeMapping.modified.isEmpty||O.lineRangeMapping.original.isEmpty)O.lineRangeMapping.original.isEmpty||x.push({range:O.lineRangeMapping.original.toInclusiveRange(),options:tbi}),O.lineRangeMapping.modified.isEmpty||I.push({range:O.lineRangeMapping.modified.toInclusiveRange(),options:Yyi});else for(const W of O.lineRangeMapping.innerChanges||[])O.lineRangeMapping.original.contains(W.originalRange.startLineNumber)&&x.push({range:W.originalRange,options:W.originalRange.isEmpty()&&w?ibi:iWe}),O.lineRangeMapping.modified.contains(W.modifiedRange.startLineNumber)&&I.push({range:W.modifiedRange,options:W.modifiedRange.isEmpty()&&w?ebi:c1t});if(g)for(const O of g.changes){const W=O.original.toInclusiveRange();W&&x.push({range:W,options:y?o1t:l1t});const X=O.modified.toInclusiveRange();X&&I.push({range:X,options:y?s1t:a1t});for(const Z of O.innerChanges||[])x.push({range:Z.originalRange,options:iWe}),I.push({range:Z.modifiedRange,options:c1t})}const P=this._diffModel.read(l).activeMovedText.read(l);for(const O of f.movedTexts)x.push({range:O.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(O===P?" currentMove":""),blockPadding:[$M.movedCodeBlockPadding,0,$M.movedCodeBlockPadding,$M.movedCodeBlockPadding]}}),I.push({range:O.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(O===P?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:x,modifiedDecorations:I}}),this._register(Xve(this._editors.original,this._decorations.map(l=>(l==null?void 0:l.originalDecorations)||[]))),this._register(Xve(this._editors.modified,this._decorations.map(l=>(l==null?void 0:l.modifiedDecorations)||[])))}}class rbi{resetSash(){this._sashRatio.set(void 0,void 0)}constructor(e,i){this._options=e,this.dimensions=i,this.sashLeft=fxt(this,n=>{var s;const l=(s=this._sashRatio.read(n))!==null&&s!==void 0?s:this._options.splitViewDefaultRatio.read(n);return this._computeSashLeft(l,n)},(n,s)=>{const l=this.dimensions.width.get();this._sashRatio.set(n/l,s)}),this._sashRatio=yc(this,void 0)}_computeSashLeft(e,i){const n=this.dimensions.width.read(i),s=Math.floor(this._options.splitViewDefaultRatio.read(i)*n),l=this._options.enableSplitViewResizing.read(i)?Math.floor(e*n):s,d=100;return n<=d*2?s:ln-d?n-d:l}}class bkt extends Ii{constructor(e,i,n,s,l,d){super(),this._domNode=e,this._dimensions=i,this._enabled=n,this._boundarySashes=s,this.sashLeft=l,this._resetSash=d,this._sash=this._register(new gv(this._domNode,{getVerticalSashTop:f=>0,getVerticalSashLeft:f=>this.sashLeft.get(),getVerticalSashHeight:f=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart(()=>{this._startSashPosition=this.sashLeft.get()})),this._register(this._sash.onDidChange(f=>{this.sashLeft.set(this._startSashPosition+(f.currentX-f.startX),void 0)})),this._register(this._sash.onDidEnd(()=>this._sash.layout())),this._register(this._sash.onDidReset(()=>this._resetSash())),this._register(Cl(f=>{const g=this._boundarySashes.read(f);g&&(this._sash.orthogonalEndSash=g.bottom)})),this._register(Cl(f=>{const g=this._enabled.read(f);this._sash.state=g?3:0,this.sashLeft.read(f),this._dimensions.height.read(f),this._sash.layout()}))}}var Ckt=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},nWe=function(c,e){return function(i,n){e(i,n,c)}},I5;const Skt=Kl("diffProviderFactoryService");let rWe=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(e1e,e)}};rWe=Ckt([nWe(0,So)],rWe);dc(Skt,rWe,1);let e1e=I5=class{constructor(e,i,n){this.editorWorkerService=i,this.telemetryService=n,this.onDidChangeEventEmitter=new ui,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){var e;(e=this.diffAlgorithmOnDidChangeSubscription)===null||e===void 0||e.dispose()}async computeDiff(e,i,n,s){var l,d;if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(e,i,n,s);if(e.isDisposed()||i.isDisposed())return{changes:[],identical:!0,quitEarly:!1,moves:[]};if(e.getLineCount()===1&&e.getLineMaxColumn(1)===1)return i.getLineCount()===1&&i.getLineMaxColumn(1)===1?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new bw(new cl(1,2),new cl(1,i.getLineCount()+1),[new bE(e.getFullModelRange(),i.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const f=JSON.stringify([e.uri.toString(),i.uri.toString()]),g=JSON.stringify([e.id,i.id,e.getAlternativeVersionId(),i.getAlternativeVersionId(),JSON.stringify(n)]),y=I5.diffCache.get(f);if(y&&y.context===g)return y.result;const w=o0.create(),x=await this.editorWorkerService.computeDiff(e.uri,i.uri,n,this.diffAlgorithm),I=w.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:I,timedOut:(l=x==null?void 0:x.quitEarly)!==null&&l!==void 0?l:!0,detectedMoves:n.computeMoves?(d=x==null?void 0:x.moves.length)!==null&&d!==void 0?d:0:-1}),s.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!x)throw new Error("no diff result available");return I5.diffCache.size>10&&I5.diffCache.delete(I5.diffCache.keys().next().value),I5.diffCache.set(f,{result:x,context:g}),x}setOptions(e){var i;let n=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&((i=this.diffAlgorithmOnDidChangeSubscription)===null||i===void 0||i.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,typeof e.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),n=!0),n&&this.onDidChangeEventEmitter.fire()}};e1e.diffCache=new Map;e1e=I5=Ckt([nWe(1,_k),nWe(2,R0)],e1e);var sbi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},obi=function(c,e){return function(i,n){e(i,n,c)}};let sWe=class extends Ii{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,i,n){super(),this.model=e,this._options=i,this._diffProviderFactoryService=n,this._isDiffUpToDate=yc(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=yc(this,void 0),this.diff=this._diff,this._unchangedRegions=yc(this,void 0),this.unchangedRegions=Ma(this,f=>{var g,y;return this._options.hideUnchangedRegions.read(f)?(y=(g=this._unchangedRegions.read(f))===null||g===void 0?void 0:g.regions)!==null&&y!==void 0?y:[]:(Rd(w=>{var x;for(const I of((x=this._unchangedRegions.get())===null||x===void 0?void 0:x.regions)||[])I.collapseAll(w)}),[])}),this.movedTextToCompare=yc(this,void 0),this._activeMovedText=yc(this,void 0),this._hoveredMovedText=yc(this,void 0),this.activeMovedText=Ma(this,f=>{var g,y;return(y=(g=this.movedTextToCompare.read(f))!==null&&g!==void 0?g:this._hoveredMovedText.read(f))!==null&&y!==void 0?y:this._activeMovedText.read(f)}),this._cancellationTokenSource=new uh,this._diffProvider=Ma(this,f=>{const g=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(f)}),y=yv("onDidChange",g.onDidChange);return{diffProvider:g,onChangeSignal:y}}),this._register(go(()=>this._cancellationTokenSource.cancel()));const s=Pye("contentChangedSignal"),l=this._register(new id(()=>s.trigger(void 0),200));this._register(Cl(f=>{const g=this._unchangedRegions.read(f);if(!g||g.regions.some(O=>O.isDragged.read(f)))return;const y=g.originalDecorationIds.map(O=>e.original.getDecorationRange(O)).map(O=>O?cl.fromRangeInclusive(O):void 0),w=g.modifiedDecorationIds.map(O=>e.modified.getDecorationRange(O)).map(O=>O?cl.fromRangeInclusive(O):void 0),x=g.regions.map((O,W)=>!y[W]||!w[W]?void 0:new PM(y[W].startLineNumber,w[W].startLineNumber,y[W].length,O.visibleLineCountTop.read(f),O.visibleLineCountBottom.read(f))).filter(rL),I=[];let P=!1;for(const O of dHe(x,(W,X)=>W.getHiddenModifiedRange(f).endLineNumberExclusive===X.getHiddenModifiedRange(f).startLineNumber))if(O.length>1){P=!0;const W=O.reduce((Z,ee)=>Z+ee.lineCount,0),X=new PM(O[0].originalLineNumber,O[0].modifiedLineNumber,W,O[0].visibleLineCountTop.get(),O[O.length-1].visibleLineCountBottom.get());I.push(X)}else I.push(O[0]);if(P){const O=e.original.deltaDecorations(g.originalDecorationIds,I.map(X=>({range:X.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),W=e.modified.deltaDecorations(g.modifiedDecorationIds,I.map(X=>({range:X.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));Rd(X=>{this._unchangedRegions.set({regions:I,originalDecorationIds:O,modifiedDecorationIds:W},X)})}}));const d=(f,g,y)=>{const w=PM.fromDiffs(f.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(y),this._options.hideUnchangedRegionsContextLineCount.read(y));let x;const I=this._unchangedRegions.get();if(I){const X=I.originalDecorationIds.map(we=>e.original.getDecorationRange(we)).map(we=>we?cl.fromRangeInclusive(we):void 0),Z=I.modifiedDecorationIds.map(we=>e.modified.getDecorationRange(we)).map(we=>we?cl.fromRangeInclusive(we):void 0);let he=Hyi(I.regions.map((we,Te)=>{if(!X[Te]||!Z[Te])return;const Be=X[Te].length;return new PM(X[Te].startLineNumber,Z[Te].startLineNumber,Be,Math.min(we.visibleLineCountTop.get(),Be),Math.min(we.visibleLineCountBottom.get(),Be-we.visibleLineCountTop.get()))}).filter(rL),(we,Te)=>!Te||we.modifiedLineNumber>=Te.modifiedLineNumber+Te.lineCount&&we.originalLineNumber>=Te.originalLineNumber+Te.lineCount).map(we=>new my(we.getHiddenOriginalRange(y),we.getHiddenModifiedRange(y)));he=my.clip(he,cl.ofLength(1,e.original.getLineCount()),cl.ofLength(1,e.modified.getLineCount())),x=my.inverse(he,e.original.getLineCount(),e.modified.getLineCount())}const P=[];if(x)for(const X of w){const Z=x.filter(ee=>ee.original.intersectsStrict(X.originalUnchangedRange)&&ee.modified.intersectsStrict(X.modifiedUnchangedRange));P.push(...X.setVisibleRanges(Z,g))}else P.push(...w);const O=e.original.deltaDecorations((I==null?void 0:I.originalDecorationIds)||[],P.map(X=>({range:X.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),W=e.modified.deltaDecorations((I==null?void 0:I.modifiedDecorationIds)||[],P.map(X=>({range:X.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));this._unchangedRegions.set({regions:P,originalDecorationIds:O,modifiedDecorationIds:W},g)};this._register(e.modified.onDidChangeContent(f=>{if(this._diff.get()){const y=P4.fromModelContentChanges(f.changes);this._lastDiff,e.original,e.modified}this._isDiffUpToDate.set(!1,void 0),l.schedule()})),this._register(e.original.onDidChangeContent(f=>{if(this._diff.get()){const y=P4.fromModelContentChanges(f.changes);this._lastDiff,e.original,e.modified}this._isDiffUpToDate.set(!1,void 0),l.schedule()})),this._register(ck(async(f,g)=>{var y,w;this._options.hideUnchangedRegionsMinimumLineCount.read(f),this._options.hideUnchangedRegionsContextLineCount.read(f),l.cancel(),s.read(f);const x=this._diffProvider.read(f);x.onChangeSignal.read(f),eT(nSt,f),eT(n9e,f),this._isDiffUpToDate.set(!1,void 0);let I=[];g.add(e.original.onDidChangeContent(W=>{const X=P4.fromModelContentChanges(W.changes);I=ave(I,X)}));let P=[];g.add(e.modified.onDidChangeContent(W=>{const X=P4.fromModelContentChanges(W.changes);P=ave(P,X)}));let O=await x.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(f),maxComputationTimeMs:this._options.maxComputationTimeMs.read(f),computeMoves:this._options.showMoves.read(f)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||e.original.isDisposed()||e.modified.isDisposed()||(O=abi(O,e.original,e.modified),O=(y=(e.original,e.modified,void 0))!==null&&y!==void 0?y:O,O=(w=(e.original,e.modified,void 0))!==null&&w!==void 0?w:O,Rd(W=>{d(O,W),this._lastDiff=O;const X=Pze.fromDiffResult(O);this._diff.set(X,W),this._isDiffUpToDate.set(!0,W);const Z=this.movedTextToCompare.get();this.movedTextToCompare.set(Z?this._lastDiff.moves.find(ee=>ee.lineRangeMapping.modified.intersect(Z.lineRangeMapping.modified)):void 0,W)}))}))}ensureModifiedLineIsVisible(e,i,n){var s,l;if(((s=this.diff.get())===null||s===void 0?void 0:s.mappings.length)===0)return;const d=((l=this._unchangedRegions.get())===null||l===void 0?void 0:l.regions)||[];for(const f of d)if(f.getHiddenModifiedRange(void 0).contains(e)){f.showModifiedLine(e,i,n);return}}ensureOriginalLineIsVisible(e,i,n){var s,l;if(((s=this.diff.get())===null||s===void 0?void 0:s.mappings.length)===0)return;const d=((l=this._unchangedRegions.get())===null||l===void 0?void 0:l.regions)||[];for(const f of d)if(f.getHiddenOriginalRange(void 0).contains(e)){f.showOriginalLine(e,i,n);return}}async waitForDiff(){await hxt(this.isDiffUpToDate,e=>e)}serializeState(){const e=this._unchangedRegions.get();return{collapsedRegions:e==null?void 0:e.regions.map(i=>({range:i.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(e){var i;const n=(i=e.collapsedRegions)===null||i===void 0?void 0:i.map(l=>cl.deserialize(l.range)),s=this._unchangedRegions.get();!s||!n||Rd(l=>{for(const d of s.regions)for(const f of n)if(d.modifiedUnchangedRange.intersect(f)){d.setHiddenModifiedRange(f,l);break}})}};sWe=sbi([obi(2,Skt)],sWe);function abi(c,e,i){return{changes:c.changes.map(n=>new bw(n.original,n.modified,n.innerChanges?n.innerChanges.map(s=>lbi(s,e,i)):void 0)),moves:c.moves,identical:c.identical,quitEarly:c.quitEarly}}function lbi(c,e,i){let n=c.originalRange,s=c.modifiedRange;return(n.endColumn!==1||s.endColumn!==1)&&n.endColumn===e.getLineMaxColumn(n.endLineNumber)&&s.endColumn===i.getLineMaxColumn(s.endLineNumber)&&n.endLineNumbernew wkt(i)),e.moves||[],e.identical,e.quitEarly)}constructor(e,i,n,s){this.mappings=e,this.movedTexts=i,this.identical=n,this.quitEarly=s}}class wkt{constructor(e){this.lineRangeMapping=e}}class PM{static fromDiffs(e,i,n,s,l){const d=bw.inverse(e,i,n),f=[];for(const g of d){let y=g.original.startLineNumber,w=g.modified.startLineNumber,x=g.original.length;const I=y===1&&w===1,P=y+x===i+1&&w+x===n+1;(I||P)&&x>=l+s?(I&&!P&&(x-=l),P&&!I&&(y+=l,w+=l,x-=l),f.push(new PM(y,w,x,0,0))):x>=l*2+s&&(y+=l,w+=l,x-=l*2,f.push(new PM(y,w,x,0,0)))}return f}get originalUnchangedRange(){return cl.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return cl.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,i,n,s,l){this.originalLineNumber=e,this.modifiedLineNumber=i,this.lineCount=n,this._visibleLineCountTop=yc(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=yc(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=Ma(this,g=>this.visibleLineCountTop.read(g)+this.visibleLineCountBottom.read(g)===this.lineCount&&!this.isDragged.read(g)),this.isDragged=yc(this,void 0);const d=Math.max(Math.min(s,this.lineCount),0),f=Math.max(Math.min(l,this.lineCount-s),0);Tgt(s===d),Tgt(l===f),this._visibleLineCountTop.set(d,void 0),this._visibleLineCountBottom.set(f,void 0)}setVisibleRanges(e,i){const n=[],s=new Xx(e.map(g=>g.modified)).subtractFrom(this.modifiedUnchangedRange);let l=this.originalLineNumber,d=this.modifiedLineNumber;const f=this.modifiedLineNumber+this.lineCount;if(s.ranges.length===0)this.showAll(i),n.push(this);else{let g=0;for(const y of s.ranges){const w=g===s.ranges.length-1;g++;const x=(w?f:y.endLineNumberExclusive)-d,I=new PM(l,d,x,0,0);I.setHiddenModifiedRange(y,i),n.push(I),l=I.originalUnchangedRange.endLineNumberExclusive,d=I.modifiedUnchangedRange.endLineNumberExclusive}}return n}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return cl.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return cl.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,i){const n=e.startLineNumber-this.modifiedLineNumber,s=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(n,s,i)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,i){const n=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,n),i)}showMoreBelow(e=10,i){const n=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,n),i)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,i,n){const s=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),l=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;i===0&&s{var X;this._contextMenuService.showContextMenu({domForShadowRoot:I&&(X=n.getDomNode())!==null&&X!==void 0?X:void 0,getAnchor:()=>({x:O,y:W}),getActions:()=>{const Z=[],ee=s.modified.isEmpty;return Z.push(new WC("diff.clipboard.copyDeletedContent",ee?s.original.length>1?V("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):V("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):s.original.length>1?V("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):V("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,async()=>{const we=this._originalTextModel.getValueInRange(s.original.toExclusiveRange());await this._clipboardService.writeText(we)})),s.original.length>1&&Z.push(new WC("diff.clipboard.copyDeletedLineContent",ee?V("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",s.original.startLineNumber+x):V("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",s.original.startLineNumber+x),void 0,!0,async()=>{let we=this._originalTextModel.getLineContent(s.original.startLineNumber+x);we===""&&(we=this._originalTextModel.getEndOfLineSequence()===0?` +`:`\r +`),await this._clipboardService.writeText(we)})),n.getOption(91)||Z.push(new WC("diff.inline.revertChange",V("diff.inline.revertChange.label","Revert this change"),void 0,!0,async()=>{this._editor.revert(this._diff)})),Z},autoSelectFirstItem:!0})};this._register(n_(this._diffActions,"mousedown",O=>{if(!O.leftButton)return;const{top:W,height:X}=Y_(this._diffActions),Z=Math.floor(w/3);O.preventDefault(),P(O.posx,W+X+Z)})),this._register(n.onMouseMove(O=>{(O.target.type===8||O.target.type===5)&&O.target.detail.viewZoneId===this._getViewZoneId()?(x=this._updateLightBulbPosition(this._marginDomNode,O.event.browserEvent.y,w),this.visibility=!0):this.visibility=!1})),this._register(n.onMouseDown(O=>{O.event.leftButton&&(O.target.type===8||O.target.type===5)&&O.target.detail.viewZoneId===this._getViewZoneId()&&(O.event.preventDefault(),x=this._updateLightBulbPosition(this._marginDomNode,O.event.browserEvent.y,w),P(O.event.posx,O.event.posy+w))}))}_updateLightBulbPosition(e,i,n){const{top:s}=Y_(e),l=i-s,d=Math.floor(l/n),f=d*n;if(this._diffActions.style.top=`${f}px`,this._viewLineCounts){let g=0;for(let y=0;yc});function ubi(c,e,i,n){s0(n,e.fontInfo);const s=i.length>0,l=new jq(1e4);let d=0,f=0;const g=[];for(let I=0;I');const g=e.getLineContent(),y=xw.isBasicASCII(g,s),w=xw.containsRTL(g,y,l),x=kne(new TR(d.fontInfo.isMonospace&&!d.disableMonospaceOptimizations,d.fontInfo.canUseHalfwidthRightwardsArrow,g,!1,y,w,0,e,i,d.tabSize,0,d.fontInfo.spaceWidth,d.fontInfo.middotWidth,d.fontInfo.wsmiddotWidth,d.stopRenderingLineAfter,d.renderWhitespace,d.renderControlCharacters,d.fontLigatures!==fw.OFF,null),f);return f.appendString(""),x.characterMapping.getHorizontalOffset(x.characterMapping.length)}var fbi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},f1t=function(c,e){return function(i,n){e(i,n,c)}};let oWe=class extends Ii{constructor(e,i,n,s,l,d,f,g,y,w){super(),this._targetWindow=e,this._editors=i,this._diffModel=n,this._options=s,this._diffEditorWidget=l,this._canIgnoreViewZoneUpdateEvent=d,this._origViewZonesToIgnore=f,this._modViewZonesToIgnore=g,this._clipboardService=y,this._contextMenuService=w,this._originalTopPadding=yc(this,0),this._originalScrollOffset=yc(this,0),this._originalScrollOffsetAnimated=i1t(this._targetWindow,this._originalScrollOffset,this._store),this._modifiedTopPadding=yc(this,0),this._modifiedScrollOffset=yc(this,0),this._modifiedScrollOffsetAnimated=i1t(this._targetWindow,this._modifiedScrollOffset,this._store);const x=yc("invalidateAlignmentsState",0),I=this._register(new id(()=>{x.set(x.get()+1,void 0)},0));this._register(this._editors.original.onDidChangeViewZones(he=>{this._canIgnoreViewZoneUpdateEvent()||I.schedule()})),this._register(this._editors.modified.onDidChangeViewZones(he=>{this._canIgnoreViewZoneUpdateEvent()||I.schedule()})),this._register(this._editors.original.onDidChangeConfiguration(he=>{(he.hasChanged(146)||he.hasChanged(67))&&I.schedule()})),this._register(this._editors.modified.onDidChangeConfiguration(he=>{(he.hasChanged(146)||he.hasChanged(67))&&I.schedule()}));const P=this._diffModel.map(he=>he?Zu(he.model.original.onDidChangeTokens,()=>he.model.original.tokenization.backgroundTokenizationState===2):void 0).map((he,we)=>he==null?void 0:he.read(we)),O=Ma(he=>{const we=this._diffModel.read(he),Te=we==null?void 0:we.diff.read(he);if(!we||!Te)return null;x.read(he);const Me=this._options.renderSideBySide.read(he);return h1t(this._editors.original,this._editors.modified,Te.mappings,this._origViewZonesToIgnore,this._modViewZonesToIgnore,Me)}),W=Ma(he=>{var we;const Te=(we=this._diffModel.read(he))===null||we===void 0?void 0:we.movedTextToCompare.read(he);if(!Te)return null;x.read(he);const Be=Te.changes.map(Me=>new wkt(Me));return h1t(this._editors.original,this._editors.modified,Be,this._origViewZonesToIgnore,this._modViewZonesToIgnore,!0)});function X(){const he=document.createElement("div");return he.className="diagonal-fill",he}const Z=this._register(new On);this.viewZones=tB(this,(he,we)=>{var Te,Be,Me,vt,Nt,Ni,ci,Mt;Z.clear();const pi=O.read(he)||[],gn=[],$n=[],Ri=this._modifiedTopPadding.read(he);Ri>0&&$n.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:Ri,showInHiddenAreas:!0,suppressMouseDown:!0});const ao=this._originalTopPadding.read(he);ao>0&&gn.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:ao,showInHiddenAreas:!0,suppressMouseDown:!0});const Xs=this._options.renderSideBySide.read(he),Yt=Xs||(Te=this._editors.modified._getViewModel())===null||Te===void 0?void 0:Te.createLineBreaksComputer();if(Yt){const Wc=this._editors.original.getModel();for(const ns of pi)if(ns.diff)for(let fh=ns.originalRange.startLineNumber;fhWc.getLineCount())return{orig:gn,mod:$n};Yt==null||Yt.addRequest(Wc.getLineContent(fh),null,null)}}const na=(Be=Yt==null?void 0:Yt.finalize())!==null&&Be!==void 0?Be:[];let Is=0;const zs=this._editors.modified.getOption(67),Ln=(Me=this._diffModel.read(he))===null||Me===void 0?void 0:Me.movedTextToCompare.read(he),bd=(Nt=(vt=this._editors.original.getModel())===null||vt===void 0?void 0:vt.mightContainNonBasicASCII())!==null&&Nt!==void 0?Nt:!1,zg=(ci=(Ni=this._editors.original.getModel())===null||Ni===void 0?void 0:Ni.mightContainRTL())!==null&&ci!==void 0?ci:!1,s_=Aze.fromEditor(this._editors.modified);for(const Wc of pi)if(Wc.diff&&!Xs){if(!Wc.originalRange.isEmpty){P.read(he);const fh=document.createElement("div");fh.classList.add("view-lines","line-delete","monaco-mouse-cursor-text");const yp=this._editors.original.getModel();if(Wc.originalRange.endLineNumberExclusive-1>yp.getLineCount())return{orig:gn,mod:$n};const ka=new dbi(Wc.originalRange.mapToLineArray(Rt=>yp.tokenization.getLineTokens(Rt)),Wc.originalRange.mapToLineArray(Rt=>na[Is++]),bd,zg),o_=[];for(const Rt of Wc.diff.innerChanges||[])o_.push(new Zee(Rt.originalRange.delta(-(Wc.diff.original.startLineNumber-1)),iWe.className,0));const My=ubi(ka,s_,o_,fh),F0=document.createElement("div");if(F0.className="inline-deleted-margin-view-zone",s0(F0,s_.fontInfo),this._options.renderIndicators.read(he))for(let Rt=0;RtyM(Lw),F0,this._editors.modified,Wc.diff,this._diffEditorWidget,My.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let Rt=0;Rt1&&gn.push({afterLineNumber:Wc.originalRange.startLineNumber+Rt,domNode:X(),heightInPx:(Ry-1)*zs,showInHiddenAreas:!0,suppressMouseDown:!0})}$n.push({afterLineNumber:Wc.modifiedRange.startLineNumber-1,domNode:fh,heightInPx:My.heightInLines*zs,minWidthInPx:My.minWidthInPx,marginDomNode:F0,setZoneId(Rt){Lw=Rt},showInHiddenAreas:!0,suppressMouseDown:!0})}const ns=document.createElement("div");ns.className="gutter-delete",gn.push({afterLineNumber:Wc.originalRange.endLineNumberExclusive-1,domNode:X(),heightInPx:Wc.modifiedHeightInPx,marginDomNode:ns,showInHiddenAreas:!0,suppressMouseDown:!0})}else{const ns=Wc.modifiedHeightInPx-Wc.originalHeightInPx;if(ns>0){if(Ln!=null&&Ln.lineRangeMapping.original.delta(-1).deltaLength(2).contains(Wc.originalRange.endLineNumberExclusive-1))continue;gn.push({afterLineNumber:Wc.originalRange.endLineNumberExclusive-1,domNode:X(),heightInPx:ns,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let fh=function(){const ka=document.createElement("div");return ka.className="arrow-revert-change "+Uo.asClassName(Dr.arrowRight),we.add(tn(ka,"mousedown",o_=>o_.stopPropagation())),we.add(tn(ka,"click",o_=>{o_.stopPropagation(),l.revert(Wc.diff)})),Sr("div",{},ka)};if(Ln!=null&&Ln.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(Wc.modifiedRange.endLineNumberExclusive-1))continue;let yp;Wc.diff&&Wc.diff.modified.isEmpty&&this._options.shouldRenderOldRevertArrows.read(he)&&(yp=fh()),$n.push({afterLineNumber:Wc.modifiedRange.endLineNumberExclusive-1,domNode:X(),heightInPx:-ns,marginDomNode:yp,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(const Wc of(Mt=W.read(he))!==null&&Mt!==void 0?Mt:[]){if(!(Ln!=null&&Ln.lineRangeMapping.original.intersect(Wc.originalRange))||!(Ln!=null&&Ln.lineRangeMapping.modified.intersect(Wc.modifiedRange)))continue;const ns=Wc.modifiedHeightInPx-Wc.originalHeightInPx;ns>0?gn.push({afterLineNumber:Wc.originalRange.endLineNumberExclusive-1,domNode:X(),heightInPx:ns,showInHiddenAreas:!0,suppressMouseDown:!0}):$n.push({afterLineNumber:Wc.modifiedRange.endLineNumberExclusive-1,domNode:X(),heightInPx:-ns,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:gn,mod:$n}});let ee=!1;this._register(this._editors.original.onDidScrollChange(he=>{he.scrollLeftChanged&&!ee&&(ee=!0,this._editors.modified.setScrollLeft(he.scrollLeft),ee=!1)})),this._register(this._editors.modified.onDidScrollChange(he=>{he.scrollLeftChanged&&!ee&&(ee=!0,this._editors.original.setScrollLeft(he.scrollLeft),ee=!1)})),this._originalScrollTop=Zu(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=Zu(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._register(Cl(he=>{const we=this._originalScrollTop.read(he)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(he))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(he));we!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(we,1)})),this._register(Cl(he=>{const we=this._modifiedScrollTop.read(he)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(he))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(he));we!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(we,1)})),this._register(Cl(he=>{var we;const Te=(we=this._diffModel.read(he))===null||we===void 0?void 0:we.movedTextToCompare.read(he);let Be=0;if(Te){const Me=this._editors.original.getTopForLineNumber(Te.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();Be=this._editors.modified.getTopForLineNumber(Te.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-Me}Be>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(Be,void 0)):Be<0?(this._modifiedTopPadding.set(-Be,void 0),this._originalTopPadding.set(0,void 0)):setTimeout(()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)},400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-Be,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+Be,void 0,!0)}))}};oWe=fbi([f1t(8,o6),f1t(9,GC)],oWe);function h1t(c,e,i,n,s,l){const d=new U4(_1t(c,n)),f=new U4(_1t(e,s)),g=c.getOption(67),y=e.getOption(67),w=[];let x=0,I=0;function P(O,W){for(;;){let X=d.peek(),Z=f.peek();if(X&&X.lineNumber>=O&&(X=void 0),Z&&Z.lineNumber>=W&&(Z=void 0),!X&&!Z)break;const ee=X?X.lineNumber-x:Number.MAX_VALUE,he=Z?Z.lineNumber-I:Number.MAX_VALUE;eehe?(f.dequeue(),X={lineNumber:Z.lineNumber-I+x,heightInPx:0}):(d.dequeue(),f.dequeue()),w.push({originalRange:cl.ofLength(X.lineNumber,1),modifiedRange:cl.ofLength(Z.lineNumber,1),originalHeightInPx:g+X.heightInPx,modifiedHeightInPx:y+Z.heightInPx,diff:void 0})}}for(const O of i){let he=function(we,Te){var Be,Me,vt,Nt;if(wegn.lineNumbergn+$n.heightInPx,0))!==null&&Me!==void 0?Me:0,pi=(Nt=(vt=f.takeWhile(gn=>gn.lineNumbergn+$n.heightInPx,0))!==null&&Nt!==void 0?Nt:0;w.push({originalRange:Ni,modifiedRange:ci,originalHeightInPx:Ni.length*g+Mt,modifiedHeightInPx:ci.length*y+pi,diff:O.lineRangeMapping}),ee=we,Z=Te};const W=O.lineRangeMapping;P(W.original.startLineNumber,W.modified.startLineNumber);let X=!0,Z=W.modified.startLineNumber,ee=W.original.startLineNumber;if(l)for(const we of W.innerChanges||[]){we.originalRange.startColumn>1&&we.modifiedRange.startColumn>1&&he(we.originalRange.startLineNumber,we.modifiedRange.startLineNumber);const Te=c.getModel(),Be=we.originalRange.endLineNumber<=Te.getLineCount()?Te.getLineMaxColumn(we.originalRange.endLineNumber):Number.MAX_SAFE_INTEGER;we.originalRange.endColumn1&&n.push({lineNumber:g,heightInPx:d*(y-1)})}for(const g of c.getWhitespaces()){if(e.has(g.id))continue;const y=g.afterLineNumber===0?0:l.convertViewPositionToModelPosition(new yi(g.afterLineNumber,1)).lineNumber;i.push({lineNumber:y,heightInPx:g.height})}return Myi(i,n,g=>g.lineNumber,(g,y)=>({lineNumber:g.lineNumber,heightInPx:g.heightInPx+y.heightInPx}))}class hbi extends Ii{constructor(e,i,n){super(),this._editor=e,this._domNode=i,this.itemProvider=n,this.scrollTop=Zu(this._editor.onDidScrollChange,d=>this._editor.getScrollTop()),this.isScrollTopZero=this.scrollTop.map(d=>d===0),this.modelAttached=Zu(this._editor.onDidChangeModel,d=>this._editor.hasModel()),this.editorOnDidChangeViewZones=yv("onDidChangeViewZones",this._editor.onDidChangeViewZones),this.editorOnDidContentSizeChange=yv("onDidContentSizeChange",this._editor.onDidContentSizeChange),this.domNodeSizeChanged=Pye("domNodeSizeChanged"),this.views=new Map,this._domNode.className="gutter monaco-editor";const s=this._domNode.appendChild(Yc("div.scroll-decoration",{role:"presentation",ariaHidden:"true",style:{width:"100%"}}).root),l=new ResizeObserver(()=>{Rd(d=>{this.domNodeSizeChanged.trigger(d)})});l.observe(this._domNode),this._register(go(()=>l.disconnect())),this._register(Cl(d=>{s.className=this.isScrollTopZero.read(d)?"":"scroll-decoration"})),this._register(Cl(d=>this.render(d)))}dispose(){super.dispose(),r0(this._domNode)}render(e){if(!this.modelAttached.read(e))return;this.domNodeSizeChanged.read(e),this.editorOnDidChangeViewZones.read(e),this.editorOnDidContentSizeChange.read(e);const i=this.scrollTop.read(e),n=this._editor.getVisibleRanges(),s=new Set(this.views.keys()),l=gl.ofStartAndLength(0,this._domNode.clientHeight);if(!l.isEmpty)for(const d of n){const f=new cl(d.startLineNumber,d.endLineNumber+1),g=this.itemProvider.getIntersectingGutterItems(f,e);Rd(y=>{for(const w of g){if(!w.range.intersect(f))continue;s.delete(w.id);let x=this.views.get(w.id);if(x)x.item.set(w,y);else{const W=document.createElement("div");this._domNode.appendChild(W);const X=yc("item",w),Z=this.itemProvider.createView(X,W);x=new _bi(X,Z,W),this.views.set(w.id,x)}const I=w.range.startLineNumber<=this._editor.getModel().getLineCount()?this._editor.getTopForLineNumber(w.range.startLineNumber,!0)-i:this._editor.getBottomForLineNumber(w.range.startLineNumber-1,!1)-i,O=(w.range.isEmpty?I:this._editor.getBottomForLineNumber(w.range.endLineNumberExclusive-1,!0)-i)-I;x.domNode.style.top=`${I}px`,x.domNode.style.height=`${O}px`,x.gutterItemView.layout(gl.ofStartAndLength(I,O),l)}})}for(const d of s){const f=this.views.get(d);f.gutterItemView.dispose(),this._domNode.removeChild(f.domNode),this.views.delete(d)}}}class _bi{constructor(e,i,n){this.item=e,this.gutterItemView=i,this.domNode=n}}class xkt extends b9{constructor(e){super(),this._getContext=e}runAction(e,i){const n=this._getContext();return super.runAction(e,n)}}class p1t extends eSt{constructor(e){super(),this._textModel=e}getValueOfRange(e){return this._textModel.getValueInRange(e)}get length(){const e=this._textModel.getLineCount(),i=this._textModel.getLineLength(e);return new Cy(e-1,i)}}class pbi extends Ii{constructor(e,i,n={orientation:0}){var s;super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new mii),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new On),n.hoverDelegate=(s=n.hoverDelegate)!==null&&s!==void 0?s:this._register(pq()),this.options=n,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new Sq(()=>{var l;return(l=this.toggleMenuActionViewItem)===null||l===void 0?void 0:l.show()},n.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new uk(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,highlightToggledItems:n.highlightToggledItems,hoverDelegate:n.hoverDelegate,actionViewItemProvider:(l,d)=>{var f;if(l.id===Sq.ID)return this.toggleMenuActionViewItem=new kve(l,l.menuActions,i,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:Uo.asClassNameArray((f=n.moreIcon)!==null&&f!==void 0?f:Dr.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0,hoverDelegate:this.options.hoverDelegate}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(n.actionViewItemProvider){const g=n.actionViewItemProvider(l,d);if(g)return g}if(l instanceof KU){const g=new kve(l,l.actions,i,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:l.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,hoverDelegate:this.options.hoverDelegate});return g.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(g),this.disposables.add(this._onDidChangeDropdownVisibility.add(g.onDidChangeVisibility)),g}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,i){this.clear();const n=e?e.slice(0):[];this.hasSecondaryActions=!!(i&&i.length>0),this.hasSecondaryActions&&i&&(this.toggleMenuAction.menuActions=i.slice(0),n.push(this.toggleMenuAction)),n.forEach(s=>{this.actionBar.push(s,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(s)})})}getKeybindingLabel(e){var i,n,s;const l=this.lookupKeybindings?(n=(i=this.options).getKeyBinding)===null||n===void 0?void 0:n.call(i,e):void 0;return(s=l==null?void 0:l.getLabel())!==null&&s!==void 0?s:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}class Sq extends WC{constructor(e,i){i=i||V("moreActions","More Actions..."),super(Sq.ID,i,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}Sq.ID="toolbar.toggle.more";var kkt=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},nT=function(c,e){return function(i,n){e(i,n,c)}};let Pie=class extends pbi{constructor(e,i,n,s,l,d,f,g){super(e,l,{getKeyBinding:w=>{var x;return(x=d.lookupKeybinding(w.id))!==null&&x!==void 0?x:void 0},...i,allowContextMenu:!0,skipTelemetry:typeof(i==null?void 0:i.telemetrySource)=="string"}),this._options=i,this._menuService=n,this._contextKeyService=s,this._contextMenuService=l,this._keybindingService=d,this._commandService=f,this._sessionDisposables=this._store.add(new On);const y=i==null?void 0:i.telemetrySource;y&&this._store.add(this.actionBar.onDidRun(w=>g.publicLog2("workbenchActionExecuted",{id:w.action.id,from:y})))}setActions(e,i=[],n){var s,l,d;this._sessionDisposables.clear();const f=e.slice(),g=i.slice(),y=[];let w=0;const x=[];let I=!1;if(((s=this._options)===null||s===void 0?void 0:s.hiddenItemStrategy)!==-1)for(let P=0;PX==null?void 0:X.id)),O=this._options.overflowBehavior.maxItems-P.size;let W=0;for(let X=0;X=O&&(f[X]=void 0,x[X]=Z))}}Jpt(f),Jpt(x),super.setActions(f,Up.join(x,g)),(y.length>0||f.length>0)&&this._sessionDisposables.add(tn(this.getElement(),"contextmenu",P=>{var O,W,X,Z,ee;const he=new sT(Io(this.getElement()),P),we=this.getItemAction(he.target);if(!we)return;he.preventDefault(),he.stopPropagation();const Te=[];if(we instanceof VC&&we.menuKeybinding?Te.push(we.menuKeybinding):we instanceof CU||we instanceof Sq||Te.push(hkt(we.id,void 0,this._commandService,this._keybindingService)),y.length>0){let Me=!1;if(w===1&&((O=this._options)===null||O===void 0?void 0:O.hiddenItemStrategy)===0){Me=!0;for(let vt=0;vtthis._menuService.resetHiddenStates(n)}))),Be.length!==0&&this._contextMenuService.showContextMenu({getAnchor:()=>he,getActions:()=>Be,menuId:(X=this._options)===null||X===void 0?void 0:X.contextMenu,menuActionOptions:{renderShortTitle:!0,...(Z=this._options)===null||Z===void 0?void 0:Z.menuOptions},skipTelemetry:typeof((ee=this._options)===null||ee===void 0?void 0:ee.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};Pie=kkt([nT(2,Dw),nT(3,Zo),nT(4,GC),nT(5,ou),nT(6,ff),nT(7,R0)],Pie);let t1e=class extends Pie{constructor(e,i,n,s,l,d,f,g,y){super(e,{resetMenu:i,...n},s,l,d,f,g,y),this._onDidChangeMenuItems=this._store.add(new ui),this.onDidChangeMenuItems=this._onDidChangeMenuItems.event;const w=this._store.add(s.createMenu(i,l,{emitEventsForSubmenuChanges:!0})),x=()=>{var I,P,O;const W=[],X=[];Mye(w,n==null?void 0:n.menuOptions,{primary:W,secondary:X},(I=n==null?void 0:n.toolbarOptions)===null||I===void 0?void 0:I.primaryGroup,(P=n==null?void 0:n.toolbarOptions)===null||P===void 0?void 0:P.shouldInlineSubmenu,(O=n==null?void 0:n.toolbarOptions)===null||O===void 0?void 0:O.useSeparatorsInPrimaryActions),e.classList.toggle("has-no-actions",W.length===0&&X.length===0),super.setActions(W,X)};this._store.add(w.onDidChange(()=>{x(),this._onDidChangeMenuItems.fire(this)})),x()}setActions(){throw new Yu("This toolbar is populated from a menu.")}};t1e=kkt([nT(3,Dw),nT(4,Zo),nT(5,GC),nT(6,ou),nT(7,ff),nT(8,R0)],t1e);var Tkt=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},d0e=function(c,e){return function(i,n){e(i,n,c)}};const G7e=[],sme=35;let aWe=class extends Ii{constructor(e,i,n,s,l,d,f,g,y){super(),this._diffModel=i,this._editors=n,this._options=s,this._sashLayout=l,this._boundarySashes=d,this._instantiationService=f,this._contextKeyService=g,this._menuService=y,this._menu=this._register(this._menuService.createMenu(_t.DiffEditorHunkToolbar,this._contextKeyService)),this._actions=Zu(this._menu.onDidChange,()=>this._menu.getActions()),this._hasActions=this._actions.map(w=>w.length>0),this._showSash=Ma(this,w=>this._options.renderSideBySide.read(w)&&this._hasActions.read(w)),this.width=Ma(this,w=>this._hasActions.read(w)?sme:0),this.elements=Yc("div.gutter@gutter",{style:{position:"absolute",height:"100%",width:sme+"px"}},[]),this._currentDiff=Ma(this,w=>{var x;const I=this._diffModel.read(w);if(!I)return;const P=(x=I.diff.read(w))===null||x===void 0?void 0:x.mappings,O=this._editors.modifiedCursor.read(w);if(O)return P==null?void 0:P.find(W=>W.lineRangeMapping.modified.contains(O.lineNumber))}),this._selectedDiffs=Ma(this,w=>{const x=this._diffModel.read(w),I=x==null?void 0:x.diff.read(w);if(!I)return G7e;const P=this._editors.modifiedSelections.read(w);if(P.every(Z=>Z.isEmpty()))return G7e;const O=new Xx(P.map(Z=>cl.fromRangeInclusive(Z))),X=I.mappings.filter(Z=>Z.lineRangeMapping.innerChanges&&O.intersects(Z.lineRangeMapping.modified)).map(Z=>({mapping:Z,rangeMappings:Z.lineRangeMapping.innerChanges.filter(ee=>P.some(he=>at.areIntersecting(ee.modifiedRange,he)))}));return X.length===0||X.every(Z=>Z.rangeMappings.length===0)?G7e:X}),this._register(Ryi(e,this.elements.root)),this._register(tn(this.elements.root,"click",()=>{this._editors.modified.focus()})),this._register(uR(this.elements.root,{display:this._hasActions.map(w=>w?"block":"none")})),MN(this,w=>this._showSash.read(w)?new bkt(e,this._sashLayout.dimensions,this._options.enableSplitViewResizing,this._boundarySashes,fxt(this,I=>this._sashLayout.sashLeft.read(I)-sme,(I,P)=>this._sashLayout.sashLeft.set(I+sme,P)),()=>this._sashLayout.resetSash()):void 0).recomputeInitiallyAndOnChange(this._store),this._register(new hbi(this._editors.modified,this.elements.root,{getIntersectingGutterItems:(w,x)=>{const I=this._diffModel.read(x);if(!I)return[];const P=I.diff.read(x);if(!P)return[];const O=this._selectedDiffs.read(x);if(O.length>0){const X=bw.fromRangeMappings(O.flatMap(Z=>Z.rangeMappings));return[new g1t(X,!0,_t.DiffEditorSelectionToolbar,void 0,I.model.original.uri,I.model.modified.uri)]}const W=this._currentDiff.read(x);return P.mappings.map(X=>new g1t(X.lineRangeMapping.withInnerChangesFromLineRanges(),X.lineRangeMapping===(W==null?void 0:W.lineRangeMapping),_t.DiffEditorHunkToolbar,void 0,I.model.original.uri,I.model.modified.uri))},createView:(w,x)=>this._instantiationService.createInstance(lWe,w,x,this)})),this._register(tn(this.elements.gutter,yr.MOUSE_WHEEL,w=>{this._editors.modified.getOption(103).handleMouseWheel&&this._editors.modified.delegateScrollFromMouseWheelEvent(w)},{passive:!1}))}computeStagedValue(e){var i;const n=(i=e.innerChanges)!==null&&i!==void 0?i:[],s=new p1t(this._editors.modifiedModel.get()),l=new p1t(this._editors.original.getModel());return new XHe(n.map(g=>g.toTextEdit(s))).apply(l)}layout(e){this.elements.gutter.style.left=e+"px"}};aWe=Tkt([d0e(6,So),d0e(7,Zo),d0e(8,Dw)],aWe);class g1t{constructor(e,i,n,s,l,d){this.mapping=e,this.showAlways=i,this.menuId=n,this.rangeOverride=s,this.originalUri=l,this.modifiedUri=d}get id(){return this.mapping.modified.toString()}get range(){var e;return(e=this.rangeOverride)!==null&&e!==void 0?e:this.mapping.modified}}let lWe=class extends Ii{constructor(e,i,n,s){super(),this._item=e,this._elements=Yc("div.gutterItem",{style:{height:"20px",width:"34px"}},[Yc("div.background@background",{},[]),Yc("div.buttons@buttons",{},[])]),this._showAlways=this._item.map(this,d=>d.showAlways),this._menuId=this._item.map(this,d=>d.menuId),this._isSmall=yc(this,!1),this._lastItemRange=void 0,this._lastViewRange=void 0;const l=this._register(s.createInstance(uq,"element",!0,{position:{hoverPosition:1}}));this._register(Bee(i,this._elements.root)),this._register(Cl(d=>{const f=this._showAlways.read(d);this._elements.root.classList.toggle("noTransition",!0),this._elements.root.classList.toggle("showAlways",f),setTimeout(()=>{this._elements.root.classList.toggle("noTransition",!1)},0)})),this._register(ck((d,f)=>{this._elements.buttons.replaceChildren();const g=f.add(s.createInstance(t1e,this._elements.buttons,this._menuId.read(d),{orientation:1,hoverDelegate:l,toolbarOptions:{primaryGroup:y=>y.startsWith("primary")},overflowBehavior:{maxItems:this._isSmall.read(d)?1:3},hiddenItemStrategy:0,actionRunner:new xkt(()=>{const y=this._item.get(),w=y.mapping;return{mapping:w,originalWithModifiedChanges:n.computeStagedValue(w),originalUri:y.originalUri,modifiedUri:y.modifiedUri}}),menuOptions:{shouldForwardArgs:!0}}));f.add(g.onDidChangeMenuItems(()=>{this._lastItemRange&&this.layout(this._lastItemRange,this._lastViewRange)}))}))}layout(e,i){this._lastItemRange=e,this._lastViewRange=i;let n=this._elements.buttons.clientHeight;this._isSmall.set(this._item.get().mapping.original.startLineNumber===1&&e.length<30,void 0),n=this._elements.buttons.clientHeight;const s=e.length/2-n/2,l=n;let d=e.start+s;const f=gl.tryCreate(l,i.endExclusive-l-n),g=gl.tryCreate(e.start+l,e.endExclusive-n-l);g&&f&&g.start=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},mbi=function(c,e){return function(i,n){e(i,n,c)}},cWe;let Aie=cWe=class extends Ii{static setBreadcrumbsSourceFactory(e){this._breadcrumbsSourceFactory.set(e,void 0)}get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(e,i,n,s){super(),this._editors=e,this._diffModel=i,this._options=n,this._instantiationService=s,this._modifiedOutlineSource=MN(this,g=>{const y=this._editors.modifiedModel.read(g),w=cWe._breadcrumbsSourceFactory.read(g);return!y||!w?void 0:w(y,this._instantiationService)}),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition(g=>{if(g.reason===1)return;const y=this._diffModel.get();Rd(w=>{for(const x of this._editors.original.getSelections()||[])y==null||y.ensureOriginalLineIsVisible(x.getStartPosition().lineNumber,0,w),y==null||y.ensureOriginalLineIsVisible(x.getEndPosition().lineNumber,0,w)})})),this._register(this._editors.modified.onDidChangeCursorPosition(g=>{if(g.reason===1)return;const y=this._diffModel.get();Rd(w=>{for(const x of this._editors.modified.getSelections()||[])y==null||y.ensureModifiedLineIsVisible(x.getStartPosition().lineNumber,0,w),y==null||y.ensureModifiedLineIsVisible(x.getEndPosition().lineNumber,0,w)})}));const l=this._diffModel.map((g,y)=>{var w,x;const I=(w=g==null?void 0:g.unchangedRegions.read(y))!==null&&w!==void 0?w:[];return I.length===1&&I[0].modifiedLineNumber===1&&I[0].lineCount===((x=this._editors.modifiedModel.read(y))===null||x===void 0?void 0:x.getLineCount())?[]:I});this.viewZones=tB(this,(g,y)=>{const w=this._modifiedOutlineSource.read(g);if(!w)return{origViewZones:[],modViewZones:[]};const x=[],I=[],P=this._options.renderSideBySide.read(g),O=l.read(g);for(const W of O)if(!W.shouldHideControls(g)){{const X=Ma(this,ee=>W.getHiddenOriginalRange(ee).startLineNumber-1),Z=new Zve(X,24);x.push(Z),y.add(new m1t(this._editors.original,Z,W,W.originalUnchangedRange,!P,w,ee=>this._diffModel.get().ensureModifiedLineIsVisible(ee,2,void 0),this._options))}{const X=Ma(this,ee=>W.getHiddenModifiedRange(ee).startLineNumber-1),Z=new Zve(X,24);I.push(Z),y.add(new m1t(this._editors.modified,Z,W,W.modifiedUnchangedRange,!1,w,ee=>this._diffModel.get().ensureModifiedLineIsVisible(ee,2,void 0),this._options))}}return{origViewZones:x,modViewZones:I}});const d={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},f={description:"Fold Unchanged",glyphMarginHoverMessage:new vv(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(V("foldUnchanged","Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+Uo.asClassName(Dr.fold),zIndex:10001};this._register(Xve(this._editors.original,Ma(this,g=>{const y=l.read(g),w=y.map(x=>({range:x.originalUnchangedRange.toInclusiveRange(),options:d}));for(const x of y)x.shouldHideControls(g)&&w.push({range:at.fromPositions(new yi(x.originalLineNumber,1)),options:f});return w}))),this._register(Xve(this._editors.modified,Ma(this,g=>{const y=l.read(g),w=y.map(x=>({range:x.modifiedUnchangedRange.toInclusiveRange(),options:d}));for(const x of y)x.shouldHideControls(g)&&w.push({range:cl.ofLength(x.modifiedLineNumber,1).toInclusiveRange(),options:f});return w}))),this._register(Cl(g=>{const y=l.read(g);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(y.map(w=>w.getHiddenOriginalRange(g).toInclusiveRange()).filter(rL)),this._editors.modified.setHiddenAreas(y.map(w=>w.getHiddenModifiedRange(g).toInclusiveRange()).filter(rL))}finally{this._isUpdatingHiddenAreas=!1}})),this._register(this._editors.modified.onMouseUp(g=>{var y;if(!g.event.rightButton&&g.target.position&&(!((y=g.target.element)===null||y===void 0)&&y.className.includes("fold-unchanged"))){const w=g.target.position.lineNumber,x=this._diffModel.get();if(!x)return;const I=x.unchangedRegions.get().find(P=>P.modifiedUnchangedRange.includes(w));if(!I)return;I.collapseAll(void 0),g.event.stopPropagation(),g.event.preventDefault()}})),this._register(this._editors.original.onMouseUp(g=>{var y;if(!g.event.rightButton&&g.target.position&&(!((y=g.target.element)===null||y===void 0)&&y.className.includes("fold-unchanged"))){const w=g.target.position.lineNumber,x=this._diffModel.get();if(!x)return;const I=x.unchangedRegions.get().find(P=>P.originalUnchangedRange.includes(w));if(!I)return;I.collapseAll(void 0),g.event.stopPropagation(),g.event.preventDefault()}}))}};Aie._breadcrumbsSourceFactory=yc("breadcrumbsSourceFactory",void 0);Aie=cWe=gbi([mbi(3,So)],Aie);class m1t extends vkt{constructor(e,i,n,s,l,d,f,g){const y=Yc("div.diff-hidden-lines-widget");super(e,i,y.root),this._editor=e,this._unchangedRegion=n,this._unchangedRegionRange=s,this._hide=l,this._modifiedOutlineSource=d,this._revealModifiedHiddenLine=f,this._options=g,this._nodes=Yc("div.diff-hidden-lines",[Yc("div.top@top",{title:V("diff.hiddenLines.top","Click or drag to show more above")}),Yc("div.center@content",{style:{display:"flex"}},[Yc("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[Sr("a",{title:V("showUnchangedRegion","Show Unchanged Region"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...jM("$(unfold)"))]),Yc("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),Yc("div.bottom@bottom",{title:V("diff.bottom","Click or drag to show more below"),role:"button"})]),y.root.appendChild(this._nodes.root);const w=Zu(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._hide?r0(this._nodes.first):this._register(uR(this._nodes.first,{width:w.map(I=>I.contentLeft)})),this._register(Cl(I=>{const P=this._unchangedRegion.visibleLineCountTop.read(I)+this._unchangedRegion.visibleLineCountBottom.read(I)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!P),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(I)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(I)>0),this._nodes.top.classList.toggle("canMoveBottom",!P);const O=this._unchangedRegion.isDragged.read(I),W=this._editor.getDomNode();W&&(W.classList.toggle("draggingUnchangedRegion",!!O),O==="top"?(W.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(I)>0),W.classList.toggle("canMoveBottom",!P)):O==="bottom"?(W.classList.toggle("canMoveTop",!P),W.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(I)>0)):(W.classList.toggle("canMoveTop",!1),W.classList.toggle("canMoveBottom",!1)))}));const x=this._editor;this._register(tn(this._nodes.top,"mousedown",I=>{if(I.button!==0)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),I.preventDefault();const P=I.clientY;let O=!1;const W=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);const X=Io(this._nodes.top),Z=tn(X,"mousemove",he=>{const Te=he.clientY-P;O=O||Math.abs(Te)>2;const Be=Math.round(Te/x.getOption(67)),Me=Math.max(0,Math.min(W+Be,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(Me,void 0)}),ee=tn(X,"mouseup",he=>{O||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(void 0,void 0),Z.dispose(),ee.dispose()})})),this._register(tn(this._nodes.bottom,"mousedown",I=>{if(I.button!==0)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),I.preventDefault();const P=I.clientY;let O=!1;const W=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);const X=Io(this._nodes.bottom),Z=tn(X,"mousemove",he=>{const Te=he.clientY-P;O=O||Math.abs(Te)>2;const Be=Math.round(Te/x.getOption(67)),Me=Math.max(0,Math.min(W-Be,this._unchangedRegion.getMaxVisibleLineCountBottom())),vt=this._unchangedRegionRange.endLineNumberExclusive>x.getModel().getLineCount()?x.getContentHeight():x.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(Me,void 0);const Nt=this._unchangedRegionRange.endLineNumberExclusive>x.getModel().getLineCount()?x.getContentHeight():x.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);x.setScrollTop(x.getScrollTop()+(Nt-vt))}),ee=tn(X,"mouseup",he=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!O){const we=x.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const Te=x.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);x.setScrollTop(x.getScrollTop()+(Te-we))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),Z.dispose(),ee.dispose()})})),this._register(Cl(I=>{const P=[];if(!this._hide){const O=n.getHiddenModifiedRange(I).length,W=V("hiddenLines","{0} hidden lines",O),X=Sr("span",{title:V("diff.hiddenLines.expandAll","Double click to unfold")},W);X.addEventListener("dblclick",he=>{he.button===0&&(he.preventDefault(),this._unchangedRegion.showAll(void 0))}),P.push(X);const Z=this._unchangedRegion.getHiddenModifiedRange(I),ee=this._modifiedOutlineSource.getBreadcrumbItems(Z,I);if(ee.length>0){P.push(Sr("span",void 0,"  |  "));for(let he=0;he{this._revealModifiedHiddenLine(we.startLineNumber)}}}}r0(this._nodes.others,...P)}))}}var vbi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},ybi=function(c,e){return function(i,n){e(i,n,c)}},Z2;let N9=Z2=class extends Ii{constructor(e,i,n,s,l,d,f){super(),this._editors=e,this._rootElement=i,this._diffModel=n,this._rootWidth=s,this._rootHeight=l,this._modifiedEditorLayoutInfo=d,this._themeService=f,this.width=Z2.ENTIRE_DIFF_OVERVIEW_WIDTH;const g=Zu(this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme()),y=Ma(I=>{const P=g.read(I),O=P.getColor(vli)||(P.getColor(gli)||u9e).transparent(2),W=P.getColor(yli)||(P.getColor(mli)||d9e).transparent(2);return{insertColor:O,removeColor:W}}),w=pu(document.createElement("div"));w.setClassName("diffViewport"),w.setPosition("absolute");const x=Yc("div.diffOverview",{style:{position:"absolute",top:"0px",width:Z2.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;this._register(Bee(x,w.domNode)),this._register(n_(x,yr.POINTER_DOWN,I=>{this._editors.modified.delegateVerticalScrollbarPointerDown(I)})),this._register(tn(x,yr.MOUSE_WHEEL,I=>{this._editors.modified.delegateScrollFromMouseWheelEvent(I)},{passive:!1})),this._register(Bee(this._rootElement,x)),this._register(ck((I,P)=>{const O=this._diffModel.read(I),W=this._editors.original.createOverviewRuler("original diffOverviewRuler");W&&(P.add(W),P.add(Bee(x,W.getDomNode())));const X=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(X&&(P.add(X),P.add(Bee(x,X.getDomNode()))),!W||!X)return;const Z=yv("viewZoneChanged",this._editors.original.onDidChangeViewZones),ee=yv("viewZoneChanged",this._editors.modified.onDidChangeViewZones),he=yv("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),we=yv("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);P.add(Cl(Te=>{var Be;Z.read(Te),ee.read(Te),he.read(Te),we.read(Te);const Me=y.read(Te),vt=(Be=O==null?void 0:O.diff.read(Te))===null||Be===void 0?void 0:Be.mappings;function Nt(Mt,pi,gn){const $n=gn._getViewModel();return $n?Mt.filter(Ri=>Ri.length>0).map(Ri=>{const ao=$n.coordinatesConverter.convertModelPositionToViewPosition(new yi(Ri.startLineNumber,1)),Xs=$n.coordinatesConverter.convertModelPositionToViewPosition(new yi(Ri.endLineNumberExclusive,1)),Yt=Xs.lineNumber-ao.lineNumber;return new twt(ao.lineNumber,Xs.lineNumber,Yt,pi.toString())}):[]}const Ni=Nt((vt||[]).map(Mt=>Mt.lineRangeMapping.original),Me.removeColor,this._editors.original),ci=Nt((vt||[]).map(Mt=>Mt.lineRangeMapping.modified),Me.insertColor,this._editors.modified);W==null||W.setZones(Ni),X==null||X.setZones(ci)})),P.add(Cl(Te=>{const Be=this._rootHeight.read(Te),Me=this._rootWidth.read(Te),vt=this._modifiedEditorLayoutInfo.read(Te);if(vt){const Nt=Z2.ENTIRE_DIFF_OVERVIEW_WIDTH-2*Z2.ONE_OVERVIEW_WIDTH;W.setLayout({top:0,height:Be,right:Nt+Z2.ONE_OVERVIEW_WIDTH,width:Z2.ONE_OVERVIEW_WIDTH}),X.setLayout({top:0,height:Be,right:0,width:Z2.ONE_OVERVIEW_WIDTH});const Ni=this._editors.modifiedScrollTop.read(Te),ci=this._editors.modifiedScrollHeight.read(Te),Mt=this._editors.modified.getOption(103),pi=new aq(Mt.verticalHasArrows?Mt.arrowSize:0,Mt.verticalScrollbarSize,0,vt.height,ci,Ni);w.setTop(pi.getSliderPosition()),w.setHeight(pi.getSliderSize())}else w.setTop(0),w.setHeight(0);x.style.height=Be+"px",x.style.left=Me-Z2.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",w.setWidth(Z2.ENTIRE_DIFF_OVERVIEW_WIDTH)}))}))}};N9.ONE_OVERVIEW_WIDTH=15;N9.ENTIRE_DIFF_OVERVIEW_WIDTH=Z2.ONE_OVERVIEW_WIDTH*2;N9=Z2=vbi([ybi(6,og)],N9);const K7e=[];class bbi extends Ii{constructor(e,i,n,s){super(),this._editors=e,this._diffModel=i,this._options=n,this._widget=s,this._selectedDiffs=Ma(this,l=>{const d=this._diffModel.read(l),f=d==null?void 0:d.diff.read(l);if(!f)return K7e;const g=this._editors.modifiedSelections.read(l);if(g.every(I=>I.isEmpty()))return K7e;const y=new Xx(g.map(I=>cl.fromRangeInclusive(I))),x=f.mappings.filter(I=>I.lineRangeMapping.innerChanges&&y.intersects(I.lineRangeMapping.modified)).map(I=>({mapping:I,rangeMappings:I.lineRangeMapping.innerChanges.filter(P=>g.some(O=>at.areIntersecting(P.modifiedRange,O)))}));return x.length===0||x.every(I=>I.rangeMappings.length===0)?K7e:x}),this._register(ck((l,d)=>{if(!this._options.shouldRenderOldRevertArrows.read(l))return;const f=this._diffModel.read(l),g=f==null?void 0:f.diff.read(l);if(!f||!g||f.movedTextToCompare.read(l))return;const y=[],w=this._selectedDiffs.read(l),x=new Set(w.map(I=>I.mapping));if(w.length>0){const I=this._editors.modifiedSelections.read(l),P=d.add(new Oie(I[I.length-1].positionLineNumber,this._widget,w.flatMap(O=>O.rangeMappings),!0));this._editors.modified.addGlyphMarginWidget(P),y.push(P)}for(const I of g.mappings)if(!x.has(I)&&!I.lineRangeMapping.modified.isEmpty&&I.lineRangeMapping.innerChanges){const P=d.add(new Oie(I.lineRangeMapping.modified.startLineNumber,this._widget,I.lineRangeMapping,!1));this._editors.modified.addGlyphMarginWidget(P),y.push(P)}d.add(go(()=>{for(const I of y)this._editors.modified.removeGlyphMarginWidget(I)}))}))}}class Oie extends Ii{getId(){return this._id}constructor(e,i,n,s){super(),this._lineNumber=e,this._widget=i,this._diffs=n,this._revertSelection=s,this._id=`revertButton${Oie.counter++}`,this._domNode=Yc("div.revertButton",{title:this._revertSelection?V("revertSelectedChanges","Revert Selected Changes"):V("revertChange","Revert Change")},[x9(Dr.arrowRight)]).root,this._register(tn(this._domNode,yr.MOUSE_DOWN,l=>{l.button!==2&&(l.stopPropagation(),l.preventDefault())})),this._register(tn(this._domNode,yr.MOUSE_UP,l=>{l.stopPropagation(),l.preventDefault()})),this._register(tn(this._domNode,yr.CLICK,l=>{this._diffs instanceof my?this._widget.revert(this._diffs):this._widget.revertRangeMappings(this._diffs),l.stopPropagation(),l.preventDefault()}))}getDomNode(){return this._domNode}getPosition(){return{lane:fL.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}}Oie.counter=0;function QA(c,e,i){const n=c.bindTo(e);return Nye({debugName:()=>`Set Context Key "${c.key}"`},s=>{n.set(i(s))})}function Cbi(c){return X5.get(c)}class X5{static get(e){let i=X5._map.get(e);if(!i){i=new X5(e),X5._map.set(e,i);const n=e.onDidDispose(()=>{X5._map.delete(e),n.dispose()})}return i}constructor(e){this.editor=e,this.model=Zu(this.editor.onDidChangeModel,()=>this.editor.getModel())}}X5._map=new Map;var Sbi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},v1t=function(c,e){return function(i,n){e(i,n,c)}};let uWe=class extends Ii{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(e,i,n,s,l,d,f){super(),this.originalEditorElement=e,this.modifiedEditorElement=i,this._options=n,this._argCodeEditorWidgetOptions=s,this._createInnerEditor=l,this._instantiationService=d,this._keybindingService=f,this.original=this._register(this._createLeftHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.modifiedEditor||{})),this._onDidContentSizeChange=this._register(new ui),this.modifiedScrollTop=Zu(this.modified.onDidScrollChange,()=>this.modified.getScrollTop()),this.modifiedScrollHeight=Zu(this.modified.onDidScrollChange,()=>this.modified.getScrollHeight()),this.modifiedModel=Cbi(this.modified).model,this.modifiedSelections=Zu(this.modified.onDidChangeCursorSelection,()=>{var g;return(g=this.modified.getSelections())!==null&&g!==void 0?g:[]}),this.modifiedCursor=g4({owner:this,equalsFn:yi.equals},g=>{var y,w;return(w=(y=this.modifiedSelections.read(g)[0])===null||y===void 0?void 0:y.getPosition())!==null&&w!==void 0?w:new yi(1,1)}),this.originalCursor=Zu(this.original.onDidChangeCursorPosition,()=>{var g;return(g=this.original.getPosition())!==null&&g!==void 0?g:new yi(1,1)}),this._argCodeEditorWidgetOptions=null,this._register(Vne({createEmptyChangeSummary:()=>({}),handleChange:(g,y)=>(g.didChange(n.editorOptions)&&Object.assign(y,g.change.changedOptions),!0)},(g,y)=>{n.editorOptions.read(g),this._options.renderSideBySide.read(g),this.modified.updateOptions(this._adjustOptionsForRightHandSide(g,y)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(g,y))}))}_createLeftHandSideEditor(e,i){const n=this._adjustOptionsForLeftHandSide(void 0,e),s=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,n,i);return s.setContextValue("isInDiffLeftEditor",!0),s}_createRightHandSideEditor(e,i){const n=this._adjustOptionsForRightHandSide(void 0,e),s=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,n,i);return s.setContextValue("isInDiffRightEditor",!0),s}_constructInnerEditor(e,i,n,s){const l=this._createInnerEditor(e,i,n,s);return this._register(l.onDidContentSizeChange(d=>{const f=this.original.getContentWidth()+this.modified.getContentWidth()+N9.ENTIRE_DIFF_OVERVIEW_WIDTH,g=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:g,contentWidth:f,contentHeightChanged:d.contentHeightChanged,contentWidthChanged:d.contentWidthChanged})})),l}_adjustOptionsForLeftHandSide(e,i){const n=this._adjustOptionsForSubEditor(i);return this._options.renderSideBySide.get()?(n.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},n.wordWrapOverride1=this._options.diffWordWrap.get()):(n.wordWrapOverride1="off",n.wordWrapOverride2="off",n.stickyScroll={enabled:!1},n.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),n.glyphMargin=this._options.renderSideBySide.get(),i.originalAriaLabel&&(n.ariaLabel=i.originalAriaLabel),n.ariaLabel=this._updateAriaLabel(n.ariaLabel),n.readOnly=!this._options.originalEditable.get(),n.dropIntoEditor={enabled:!n.readOnly},n.extraEditorClassName="original-in-monaco-diff-editor",n}_adjustOptionsForRightHandSide(e,i){const n=this._adjustOptionsForSubEditor(i);return i.modifiedAriaLabel&&(n.ariaLabel=i.modifiedAriaLabel),n.ariaLabel=this._updateAriaLabel(n.ariaLabel),n.wordWrapOverride1=this._options.diffWordWrap.get(),n.revealHorizontalRightPadding=RE.revealHorizontalRightPadding.defaultValue+N9.ENTIRE_DIFF_OVERVIEW_WIDTH,n.scrollbar.verticalHasArrows=!1,n.extraEditorClassName="modified-in-monaco-diff-editor",n}_adjustOptionsForSubEditor(e){const i={...e,dimension:{height:0,width:0}};return i.inDiffEditor=!0,i.automaticLayout=!1,i.scrollbar={...i.scrollbar||{}},i.folding=!1,i.codeLens=this._options.diffCodeLens.get(),i.fixedOverflowWidgets=!0,i.minimap={...i.minimap||{}},i.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?i.stickyScroll={enabled:!1}:i.stickyScroll=this._options.editorOptions.get().stickyScroll,i}_updateAriaLabel(e){var i;e||(e="");const n=V("diff-aria-navigation-tip"," use {0} to open the accessibility help.",(i=this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp"))===null||i===void 0?void 0:i.getAriaLabel());return this._options.accessibilityVerbose.get()?e+n:e?e.replaceAll(n,""):""}};uWe=Sbi([v1t(5,So),v1t(6,ou)],uWe);class Qye extends Ii{constructor(){super(...arguments),this._id=++Qye.idCounter,this._onDidDispose=this._register(new ui),this.onDidDispose=this._onDidDispose.event}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,i="api"){this._targetEditor.setPosition(e,i)}revealLine(e,i=0){this._targetEditor.revealLine(e,i)}revealLineInCenter(e,i=0){this._targetEditor.revealLineInCenter(e,i)}revealLineInCenterIfOutsideViewport(e,i=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,i)}revealLineNearTop(e,i=0){this._targetEditor.revealLineNearTop(e,i)}revealPosition(e,i=0){this._targetEditor.revealPosition(e,i)}revealPositionInCenter(e,i=0){this._targetEditor.revealPositionInCenter(e,i)}revealPositionInCenterIfOutsideViewport(e,i=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,i)}revealPositionNearTop(e,i=0){this._targetEditor.revealPositionNearTop(e,i)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,i="api"){this._targetEditor.setSelection(e,i)}setSelections(e,i="api"){this._targetEditor.setSelections(e,i)}revealLines(e,i,n=0){this._targetEditor.revealLines(e,i,n)}revealLinesInCenter(e,i,n=0){this._targetEditor.revealLinesInCenter(e,i,n)}revealLinesInCenterIfOutsideViewport(e,i,n=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,i,n)}revealLinesNearTop(e,i,n=0){this._targetEditor.revealLinesNearTop(e,i,n)}revealRange(e,i=0,n=!1,s=!0){this._targetEditor.revealRange(e,i,n,s)}revealRangeInCenter(e,i=0){this._targetEditor.revealRangeInCenter(e,i)}revealRangeInCenterIfOutsideViewport(e,i=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,i)}revealRangeNearTop(e,i=0){this._targetEditor.revealRangeNearTop(e,i)}revealRangeNearTopIfOutsideViewport(e,i=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,i)}revealRangeAtTop(e,i=0){this._targetEditor.revealRangeAtTop(e,i)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,i,n){this._targetEditor.trigger(e,i,n)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}}Qye.idCounter=0;var wbi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},xbi=function(c,e){return function(i,n){e(i,n,c)}};let dWe=class{get editorOptions(){return this._options}constructor(e,i){this._accessibilityService=i,this._diffEditorWidth=yc(this,0),this._screenReaderMode=Zu(this._accessibilityService.onDidChangeScreenReaderOptimized,()=>this._accessibilityService.isScreenReaderOptimized()),this.couldShowInlineViewBecauseOfSize=Ma(this,s=>this._options.read(s).renderSideBySide&&this._diffEditorWidth.read(s)<=this._options.read(s).renderSideBySideInlineBreakpoint),this.renderOverviewRuler=Ma(this,s=>this._options.read(s).renderOverviewRuler),this.renderSideBySide=Ma(this,s=>this._options.read(s).renderSideBySide&&!(this._options.read(s).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(s)&&!this._screenReaderMode.read(s))),this.readOnly=Ma(this,s=>this._options.read(s).readOnly),this.shouldRenderOldRevertArrows=Ma(this,s=>!(!this._options.read(s).renderMarginRevertIcon||!this.renderSideBySide.read(s)||this.readOnly.read(s)||this.shouldRenderGutterMenu.read(s))),this.shouldRenderGutterMenu=Ma(this,s=>this._options.read(s).renderGutterMenu),this.renderIndicators=Ma(this,s=>this._options.read(s).renderIndicators),this.enableSplitViewResizing=Ma(this,s=>this._options.read(s).enableSplitViewResizing),this.splitViewDefaultRatio=Ma(this,s=>this._options.read(s).splitViewDefaultRatio),this.ignoreTrimWhitespace=Ma(this,s=>this._options.read(s).ignoreTrimWhitespace),this.maxComputationTimeMs=Ma(this,s=>this._options.read(s).maxComputationTime),this.showMoves=Ma(this,s=>this._options.read(s).experimental.showMoves&&this.renderSideBySide.read(s)),this.isInEmbeddedEditor=Ma(this,s=>this._options.read(s).isInEmbeddedEditor),this.diffWordWrap=Ma(this,s=>this._options.read(s).diffWordWrap),this.originalEditable=Ma(this,s=>this._options.read(s).originalEditable),this.diffCodeLens=Ma(this,s=>this._options.read(s).diffCodeLens),this.accessibilityVerbose=Ma(this,s=>this._options.read(s).accessibilityVerbose),this.diffAlgorithm=Ma(this,s=>this._options.read(s).diffAlgorithm),this.showEmptyDecorations=Ma(this,s=>this._options.read(s).experimental.showEmptyDecorations),this.onlyShowAccessibleDiffViewer=Ma(this,s=>this._options.read(s).onlyShowAccessibleDiffViewer),this.hideUnchangedRegions=Ma(this,s=>this._options.read(s).hideUnchangedRegions.enabled),this.hideUnchangedRegionsRevealLineCount=Ma(this,s=>this._options.read(s).hideUnchangedRegions.revealLineCount),this.hideUnchangedRegionsContextLineCount=Ma(this,s=>this._options.read(s).hideUnchangedRegions.contextLineCount),this.hideUnchangedRegionsMinimumLineCount=Ma(this,s=>this._options.read(s).hideUnchangedRegions.minimumLineCount);const n={...e,...y1t(e,_v)};this._options=yc(this,n)}updateOptions(e){const i=y1t(e,this._options.get()),n={...this._options.get(),...e,...i};this._options.set(n,void 0,{changedOptions:e})}setWidth(e){this._diffEditorWidth.set(e,void 0)}};dWe=wbi([xbi(1,$C)],dWe);function y1t(c,e){var i,n,s,l,d,f,g,y;return{enableSplitViewResizing:oo(c.enableSplitViewResizing,e.enableSplitViewResizing),splitViewDefaultRatio:_ti(c.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:oo(c.renderSideBySide,e.renderSideBySide),renderMarginRevertIcon:oo(c.renderMarginRevertIcon,e.renderMarginRevertIcon),maxComputationTime:x5(c.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:x5(c.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:oo(c.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:oo(c.renderIndicators,e.renderIndicators),originalEditable:oo(c.originalEditable,e.originalEditable),diffCodeLens:oo(c.diffCodeLens,e.diffCodeLens),renderOverviewRuler:oo(c.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:t_(c.diffWordWrap,e.diffWordWrap,["off","on","inherit"]),diffAlgorithm:t_(c.diffAlgorithm,e.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:oo(c.accessibilityVerbose,e.accessibilityVerbose),experimental:{showMoves:oo((i=c.experimental)===null||i===void 0?void 0:i.showMoves,e.experimental.showMoves),showEmptyDecorations:oo((n=c.experimental)===null||n===void 0?void 0:n.showEmptyDecorations,e.experimental.showEmptyDecorations)},hideUnchangedRegions:{enabled:oo((l=(s=c.hideUnchangedRegions)===null||s===void 0?void 0:s.enabled)!==null&&l!==void 0?l:(d=c.experimental)===null||d===void 0?void 0:d.collapseUnchangedRegions,e.hideUnchangedRegions.enabled),contextLineCount:x5((f=c.hideUnchangedRegions)===null||f===void 0?void 0:f.contextLineCount,e.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:x5((g=c.hideUnchangedRegions)===null||g===void 0?void 0:g.minimumLineCount,e.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:x5((y=c.hideUnchangedRegions)===null||y===void 0?void 0:y.revealLineCount,e.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:oo(c.isInEmbeddedEditor,e.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:oo(c.onlyShowAccessibleDiffViewer,e.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:x5(c.renderSideBySideInlineBreakpoint,e.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:oo(c.useInlineViewWhenSpaceIsLimited,e.useInlineViewWhenSpaceIsLimited),renderGutterMenu:oo(c.renderGutterMenu,e.renderGutterMenu)}}var kbi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},dee=function(c,e){return function(i,n){e(i,n,c)}};let Q4=class extends Qye{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(e,i,n,s,l,d,f,g){var y;super(),this._domElement=e,this._parentContextKeyService=s,this._parentInstantiationService=l,this._accessibilitySignalService=f,this._editorProgressService=g,this.elements=Yc("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[Yc("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),Yc("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),Yc("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModel=yc(this,void 0),this._shouldDisposeDiffModel=!1,this.onDidChangeModel=Mr.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new One([Zo,this._contextKeyService]))),this._boundarySashes=yc(this,void 0),this._accessibleDiffViewerShouldBeVisible=yc(this,!1),this._accessibleDiffViewerVisible=Ma(this,Te=>this._options.onlyShowAccessibleDiffViewer.read(Te)?!0:this._accessibleDiffViewerShouldBeVisible.read(Te)),this._movedBlocksLinesPart=yc(this,void 0),this._layoutInfo=Ma(this,Te=>{var Be,Me,vt,Nt,Ni;const ci=this._rootSizeObserver.width.read(Te),Mt=this._rootSizeObserver.height.read(Te);this._rootSizeObserver.automaticLayout?this.elements.root.style.height="100%":this.elements.root.style.height=Mt+"px";const pi=this._sash.read(Te),gn=this._gutter.read(Te),$n=(Be=gn==null?void 0:gn.width.read(Te))!==null&&Be!==void 0?Be:0,Ri=(vt=(Me=this._overviewRulerPart.read(Te))===null||Me===void 0?void 0:Me.width)!==null&&vt!==void 0?vt:0;let ao,Xs,Yt,na,Is;if(!!pi){const Ln=pi.sashLeft.read(Te),bd=(Ni=(Nt=this._movedBlocksLinesPart.read(Te))===null||Nt===void 0?void 0:Nt.width.read(Te))!==null&&Ni!==void 0?Ni:0;ao=0,Xs=Ln-$n-bd,Is=Ln-$n,Yt=Ln,na=ci-Yt-Ri}else Is=0,ao=$n,Xs=Math.max(5,this._editors.original.getLayoutInfo().decorationsLeft),Yt=$n+Xs,na=ci-Yt-Ri;return this.elements.original.style.left=ao+"px",this.elements.original.style.width=Xs+"px",this._editors.original.layout({width:Xs,height:Mt},!0),gn==null||gn.layout(Is),this.elements.modified.style.left=Yt+"px",this.elements.modified.style.width=na+"px",this._editors.modified.layout({width:na,height:Mt},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((Te,Be)=>Te==null?void 0:Te.diff.read(Be)),this.onDidUpdateDiff=Mr.fromObservableLight(this._diffValue),d.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register(go(()=>this._domElement.removeChild(this.elements.root))),this._rootSizeObserver=this._register(new mkt(this.elements.root,i.dimension)),this._rootSizeObserver.setAutomaticLayout((y=i.automaticLayout)!==null&&y!==void 0?y:!1),this._options=this._instantiationService.createInstance(dWe,i),this._register(Cl(Te=>{this._options.setWidth(this._rootSizeObserver.width.read(Te))})),this._contextKeyService.createKey(Lt.isEmbeddedDiffEditor.key,!1),this._register(QA(Lt.isEmbeddedDiffEditor,this._contextKeyService,Te=>this._options.isInEmbeddedEditor.read(Te))),this._register(QA(Lt.comparingMovedCode,this._contextKeyService,Te=>{var Be;return!!(!((Be=this._diffModel.read(Te))===null||Be===void 0)&&Be.movedTextToCompare.read(Te))})),this._register(QA(Lt.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,Te=>this._options.couldShowInlineViewBecauseOfSize.read(Te))),this._register(QA(Lt.diffEditorInlineMode,this._contextKeyService,Te=>!this._options.renderSideBySide.read(Te))),this._register(QA(Lt.hasChanges,this._contextKeyService,Te=>{var Be,Me,vt;return((vt=(Me=(Be=this._diffModel.read(Te))===null||Be===void 0?void 0:Be.diff.read(Te))===null||Me===void 0?void 0:Me.mappings.length)!==null&&vt!==void 0?vt:0)>0})),this._editors=this._register(this._instantiationService.createInstance(uWe,this.elements.original,this.elements.modified,this._options,n,(Te,Be,Me,vt)=>this._createInnerEditor(Te,Be,Me,vt))),this._register(QA(Lt.diffEditorOriginalWritable,this._contextKeyService,Te=>this._options.originalEditable.read(Te))),this._register(QA(Lt.diffEditorModifiedWritable,this._contextKeyService,Te=>!this._options.readOnly.read(Te))),this._register(QA(Lt.diffEditorOriginalUri,this._contextKeyService,Te=>{var Be,Me;return(Me=(Be=this._diffModel.read(Te))===null||Be===void 0?void 0:Be.model.original.uri.toString())!==null&&Me!==void 0?Me:""})),this._register(QA(Lt.diffEditorModifiedUri,this._contextKeyService,Te=>{var Be,Me;return(Me=(Be=this._diffModel.read(Te))===null||Be===void 0?void 0:Be.model.modified.uri.toString())!==null&&Me!==void 0?Me:""})),this._overviewRulerPart=MN(this,Te=>this._options.renderOverviewRuler.read(Te)?this._instantiationService.createInstance(eT(N9,Te),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map(Be=>Be.modifiedEditor)):void 0).recomputeInitiallyAndOnChange(this._store);const w={height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((Te,Be)=>{var Me,vt;return Te-((vt=(Me=this._overviewRulerPart.read(Be))===null||Me===void 0?void 0:Me.width)!==null&&vt!==void 0?vt:0)})};this._sashLayout=new rbi(this._options,w),this._sash=MN(this,Te=>{const Be=this._options.renderSideBySide.read(Te);return this.elements.root.classList.toggle("side-by-side",Be),Be?new bkt(this.elements.root,w,this._options.enableSplitViewResizing,this._boundarySashes,this._sashLayout.sashLeft,()=>this._sashLayout.resetSash()):void 0}).recomputeInitiallyAndOnChange(this._store);const x=MN(this,Te=>this._instantiationService.createInstance(eT(Aie,Te),this._editors,this._diffModel,this._options)).recomputeInitiallyAndOnChange(this._store);MN(this,Te=>this._instantiationService.createInstance(eT(nbi,Te),this._editors,this._diffModel,this._options,this)).recomputeInitiallyAndOnChange(this._store);const I=new Set,P=new Set;let O=!1;const W=MN(this,Te=>this._instantiationService.createInstance(eT(oWe,Te),Io(this._domElement),this._editors,this._diffModel,this._options,this,()=>O||x.get().isUpdatingHiddenAreas,I,P)).recomputeInitiallyAndOnChange(this._store),X=Ma(this,Te=>{const Be=W.read(Te).viewZones.read(Te).orig,Me=x.read(Te).viewZones.read(Te).origViewZones;return Be.concat(Me)}),Z=Ma(this,Te=>{const Be=W.read(Te).viewZones.read(Te).mod,Me=x.read(Te).viewZones.read(Te).modViewZones;return Be.concat(Me)});this._register(Yve(this._editors.original,X,Te=>{O=Te},I));let ee;this._register(Yve(this._editors.modified,Z,Te=>{O=Te,O?ee=ME.capture(this._editors.modified):(ee==null||ee.restore(this._editors.modified),ee=void 0)},P)),this._accessibleDiffViewer=MN(this,Te=>this._instantiationService.createInstance(eT(LM,Te),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,(Be,Me)=>this._accessibleDiffViewerShouldBeVisible.set(Be,Me),this._options.onlyShowAccessibleDiffViewer.map(Be=>!Be),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map((Be,Me)=>{var vt;return(vt=Be==null?void 0:Be.diff.read(Me))===null||vt===void 0?void 0:vt.mappings.map(Nt=>Nt.lineRangeMapping)}),new Xyi(this._editors))).recomputeInitiallyAndOnChange(this._store);const he=this._accessibleDiffViewerVisible.map(Te=>Te?"hidden":"visible");this._register(uR(this.elements.modified,{visibility:he})),this._register(uR(this.elements.original,{visibility:he})),this._createDiffEditorContributions(),d.addDiffEditor(this),this._gutter=MN(this,Te=>this._options.shouldRenderGutterMenu.read(Te)?this._instantiationService.createInstance(eT(aWe,Te),this.elements.root,this._diffModel,this._editors,this._options,this._sashLayout,this._boundarySashes):void 0),this._register(Hne(this._layoutInfo)),MN(this,Te=>new(eT($M,Te))(this.elements.root,this._diffModel,this._layoutInfo.map(Be=>Be.originalEditor),this._layoutInfo.map(Be=>Be.modifiedEditor),this._editors)).recomputeInitiallyAndOnChange(this._store,Te=>{this._movedBlocksLinesPart.set(Te,void 0)}),this._register(Mr.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,Te=>this._handleCursorPositionChange(Te,!0))),this._register(Mr.runAndSubscribe(this._editors.original.onDidChangeCursorPosition,Te=>this._handleCursorPositionChange(Te,!1)));const we=this._diffModel.map(this,(Te,Be)=>{if(Te)return Te.diff.read(Be)===void 0&&!Te.isDiffUpToDate.read(Be)});this._register(ck((Te,Be)=>{if(we.read(Te)===!0){const Me=this._editorProgressService.show(!0,1e3);Be.add(go(()=>Me.done()))}})),this._register(go(()=>{var Te;this._shouldDisposeDiffModel&&((Te=this._diffModel.get())===null||Te===void 0||Te.dispose())})),this._register(ck((Te,Be)=>{Be.add(new(eT(bbi,Te))(this._editors,this._diffModel,this._options,this))}))}_createInnerEditor(e,i,n,s){return e.createInstance(cq,i,n,s)}_createDiffEditorContributions(){const e=SU.getDiffEditorContributions();for(const i of e)try{this._register(this._instantiationService.createInstance(i.ctor,this))}catch(n){Ba(n)}}get _targetEditor(){return this._editors.modified}getEditorType(){return xne.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){var e;const i=this._editors.original.saveViewState(),n=this._editors.modified.saveViewState();return{original:i,modified:n,modelState:(e=this._diffModel.get())===null||e===void 0?void 0:e.serializeState()}}restoreViewState(e){var i;if(e&&e.original&&e.modified){const n=e;this._editors.original.restoreViewState(n.original),this._editors.modified.restoreViewState(n.modified),n.modelState&&((i=this._diffModel.get())===null||i===void 0||i.restoreSerializedState(n.modelState))}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(e){return this._instantiationService.createInstance(sWe,e,this._options)}getModel(){var e,i;return(i=(e=this._diffModel.get())===null||e===void 0?void 0:e.model)!==null&&i!==void 0?i:null}setModel(e,i){!e&&this._diffModel.get()&&this._accessibleDiffViewer.get().close();const n=e?"model"in e?{model:e,shouldDispose:!1}:{model:this.createViewModel(e),shouldDispose:!0}:void 0;this._diffModel.get()!==(n==null?void 0:n.model)&&vie(i,s=>{var l;Zu.batchEventsGlobally(s,()=>{this._editors.original.setModel(n?n.model.model.original:null),this._editors.modified.setModel(n?n.model.model.modified:null)});const d=this._diffModel.get(),f=this._shouldDisposeDiffModel;this._shouldDisposeDiffModel=(l=n==null?void 0:n.shouldDispose)!==null&&l!==void 0?l:!1,this._diffModel.set(n==null?void 0:n.model,s),f&&(d==null||d.dispose())})}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){var e;const i=(e=this._diffModel.get())===null||e===void 0?void 0:e.diff.get();return i?Tbi(i):null}revert(e){const i=this._diffModel.get();!i||!i.isDiffUpToDate.get()||this._editors.modified.executeEdits("diffEditor",[{range:e.modified.toExclusiveRange(),text:i.model.original.getValueInRange(e.original.toExclusiveRange())}])}revertRangeMappings(e){const i=this._diffModel.get();if(!i||!i.isDiffUpToDate.get())return;const n=e.map(s=>({range:s.modifiedRange,text:i.model.original.getValueInRange(s.originalRange)}));this._editors.modified.executeEdits("diffEditor",n)}_goTo(e){this._editors.modified.setPosition(new yi(e.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(e.lineRangeMapping.modified.toExclusiveRange())}goToDiff(e){var i,n,s,l;const d=(n=(i=this._diffModel.get())===null||i===void 0?void 0:i.diff.get())===null||n===void 0?void 0:n.mappings;if(!d||d.length===0)return;const f=this._editors.modified.getPosition().lineNumber;let g;e==="next"?g=(s=d.find(y=>y.lineRangeMapping.modified.startLineNumber>f))!==null&&s!==void 0?s:d[0]:g=(l=zte(d,y=>y.lineRangeMapping.modified.startLineNumber{var i;const n=(i=e.diff.get())===null||i===void 0?void 0:i.mappings;!n||n.length===0||this._goTo(n[0])})}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){const e=this._diffModel.get();e&&await e.waitForDiff()}mapToOtherSide(){var e,i;const n=this._editors.modified.hasWidgetFocus(),s=n?this._editors.modified:this._editors.original,l=n?this._editors.original:this._editors.modified;let d;const f=s.getSelection();if(f){const g=(i=(e=this._diffModel.get())===null||e===void 0?void 0:e.diff.get())===null||i===void 0?void 0:i.mappings.map(y=>n?y.lineRangeMapping.flip():y.lineRangeMapping);if(g){const y=n1t(f.getStartPosition(),g),w=n1t(f.getEndPosition(),g);d=at.plusRange(y,w)}}return{destination:l,destinationSelection:d}}switchSide(){const{destination:e,destinationSelection:i}=this.mapToOtherSide();e.focus(),i&&e.setSelection(i)}exitCompareMove(){const e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){var e;const i=(e=this._diffModel.get())===null||e===void 0?void 0:e.unchangedRegions.get();i&&Rd(n=>{for(const s of i)s.collapseAll(n)})}showAllUnchangedRegions(){var e;const i=(e=this._diffModel.get())===null||e===void 0?void 0:e.unchangedRegions.get();i&&Rd(n=>{for(const s of i)s.showAll(n)})}_handleCursorPositionChange(e,i){var n,s;if((e==null?void 0:e.reason)===3){const l=(s=(n=this._diffModel.get())===null||n===void 0?void 0:n.diff.get())===null||s===void 0?void 0:s.mappings.find(d=>i?d.lineRangeMapping.modified.contains(e.position.lineNumber):d.lineRangeMapping.original.contains(e.position.lineNumber));l!=null&&l.lineRangeMapping.modified.isEmpty?this._accessibilitySignalService.playSignal(Na.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):l!=null&&l.lineRangeMapping.original.isEmpty?this._accessibilitySignalService.playSignal(Na.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):l&&this._accessibilitySignalService.playSignal(Na.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}};Q4=kbi([dee(3,Zo),dee(4,So),dee(5,Oc),dee(6,LR),dee(7,IR)],Q4);function Tbi(c){return c.mappings.map(e=>{const i=e.lineRangeMapping;let n,s,l,d,f=i.innerChanges;return i.original.isEmpty?(n=i.original.startLineNumber-1,s=0,f=void 0):(n=i.original.startLineNumber,s=i.original.endLineNumberExclusive-1),i.modified.isEmpty?(l=i.modified.startLineNumber-1,d=0,f=void 0):(l=i.modified.startLineNumber,d=i.modified.endLineNumberExclusive-1),{originalStartLineNumber:n,originalEndLineNumber:s,modifiedStartLineNumber:l,modifiedEndLineNumber:d,charChanges:f==null?void 0:f.map(g=>({originalStartLineNumber:g.originalRange.startLineNumber,originalStartColumn:g.originalRange.startColumn,originalEndLineNumber:g.originalRange.endLineNumber,originalEndColumn:g.originalRange.endColumn,modifiedStartLineNumber:g.modifiedRange.startLineNumber,modifiedStartColumn:g.modifiedRange.startColumn,modifiedEndLineNumber:g.modifiedRange.endLineNumber,modifiedEndColumn:g.modifiedRange.endColumn}))}})}var Oze=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},af=function(c,e){return function(i,n){e(i,n,c)}};let Dbi=0,b1t=!1;function Ebi(c){if(!c){if(b1t)return;b1t=!0}Vai(c||ed.document.body)}let i1e=class extends cq{constructor(e,i,n,s,l,d,f,g,y,w,x,I,P){const O={...i};O.ariaLabel=O.ariaLabel||wve.editorViewAccessibleLabel,O.ariaLabel=O.ariaLabel+";"+wve.accessibilityHelpMessage,super(e,O,{},n,s,l,d,y,w,x,I,P),g instanceof Cq?this._standaloneKeybindingService=g:this._standaloneKeybindingService=null,Ebi(O.ariaContainerElement),Emi((W,X)=>n.createInstance(uq,W,X,{})),Imi(f)}addCommand(e,i,n){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const s="DYNAMIC_"+ ++Dbi,l=xn.deserialize(n);return this._standaloneKeybindingService.addDynamicKeybinding(s,e,i,l),s}createContextKey(e,i){return this._contextKeyService.createKey(e,i)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),Ii.None;const i=e.id,n=e.label,s=xn.and(xn.equals("editorId",this.getId()),xn.deserialize(e.precondition)),l=e.keybindings,d=xn.and(s,xn.deserialize(e.keybindingContext)),f=e.contextMenuGroupId||null,g=e.contextMenuOrder||0,y=(P,...O)=>Promise.resolve(e.run(this,...O)),w=new On,x=this.getId()+":"+i;if(w.add(uc.registerCommand(x,y)),f){const P={command:{id:x,title:n},when:s,group:f,order:g};w.add(bm.appendMenuItem(_t.EditorContext,P))}if(Array.isArray(l))for(const P of l)w.add(this._standaloneKeybindingService.addDynamicKeybinding(x,P,y,d));const I=new nwt(x,n,n,void 0,s,(...P)=>Promise.resolve(e.run(this,...P)),this._contextKeyService);return this._actions.set(i,I),w.add(go(()=>{this._actions.delete(i)})),w}_triggerCommand(e,i){if(this._codeEditorService instanceof hve)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,i)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,i)}};i1e=Oze([af(2,So),af(3,Oc),af(4,ff),af(5,Zo),af(6,DL),af(7,ou),af(8,og),af(9,L_),af(10,$C),af(11,Kd),af(12,js)],i1e);let fWe=class extends i1e{constructor(e,i,n,s,l,d,f,g,y,w,x,I,P,O,W,X){const Z={...i};Qve(x,Z,!1);const ee=y.registerEditorContainer(e);typeof Z.theme=="string"&&y.setTheme(Z.theme),typeof Z.autoDetectHighContrast<"u"&&y.setAutoDetectHighContrast(!!Z.autoDetectHighContrast);const he=Z.model;delete Z.model,super(e,Z,n,s,l,d,f,g,y,w,I,W,X),this._configurationService=x,this._standaloneThemeService=y,this._register(ee);let we;if(typeof he>"u"){const Te=O.getLanguageIdByMimeType(Z.language)||Z.language||yw;we=Dkt(P,O,Z.value||"",Te,void 0),this._ownsModel=!0}else we=he,this._ownsModel=!1;if(this._attachModel(we),we){const Te={oldModelUrl:null,newModelUrl:we.uri};this._onDidChangeModel.fire(Te)}}dispose(){super.dispose()}updateOptions(e){Qve(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};fWe=Oze([af(2,So),af(3,Oc),af(4,ff),af(5,Zo),af(6,DL),af(7,ou),af(8,Nw),af(9,L_),af(10,El),af(11,$C),af(12,Qf),af(13,If),af(14,Kd),af(15,js)],fWe);let hWe=class extends Q4{constructor(e,i,n,s,l,d,f,g,y,w,x,I){const P={...i};Qve(g,P,!0);const O=d.registerEditorContainer(e);typeof P.theme=="string"&&d.setTheme(P.theme),typeof P.autoDetectHighContrast<"u"&&d.setAutoDetectHighContrast(!!P.autoDetectHighContrast),super(e,P,{},s,n,l,I,w),this._configurationService=g,this._standaloneThemeService=d,this._register(O)}dispose(){super.dispose()}updateOptions(e){Qve(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_createInnerEditor(e,i,n){return e.createInstance(i1e,i,n)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,i,n){return this.getModifiedEditor().addCommand(e,i,n)}createContextKey(e,i){return this.getModifiedEditor().createContextKey(e,i)}addAction(e){return this.getModifiedEditor().addAction(e)}};hWe=Oze([af(2,So),af(3,Zo),af(4,Oc),af(5,Nw),af(6,L_),af(7,El),af(8,GC),af(9,IR),af(10,o6),af(11,LR)],hWe);function Dkt(c,e,i,n,s){if(i=i||"",!n){const l=i.indexOf(` +`);let d=i;return l!==-1&&(d=i.substring(0,l)),C1t(c,i,e.createByFilepathOrFirstLine(s||null,d),s)}return C1t(c,i,e.createById(n),s)}function C1t(c,e,i,n){return c.createModel(e,i,n)}var Ibi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Nbi=function(c,e){return function(i,n){e(i,n,c)}};class Lbi{constructor(e,i){this.viewModel=e,this.deltaScrollVertical=i}getId(){return this.viewModel}}let n1e=class extends Ii{constructor(e,i,n,s){super(),this._container=e,this._overflowWidgetsDomNode=i,this._workbenchUIElementFactory=n,this._instantiationService=s,this._viewModel=yc(this,void 0),this._collapsed=Ma(this,d=>{var f;return(f=this._viewModel.read(d))===null||f===void 0?void 0:f.collapsed.read(d)}),this._editorContentHeight=yc(this,500),this.contentHeight=Ma(this,d=>(this._collapsed.read(d)?0:this._editorContentHeight.read(d))+this._outerEditorHeight),this._modifiedContentWidth=yc(this,0),this._modifiedWidth=yc(this,0),this._originalContentWidth=yc(this,0),this._originalWidth=yc(this,0),this.maxScroll=Ma(this,d=>{const f=this._modifiedContentWidth.read(d)-this._modifiedWidth.read(d),g=this._originalContentWidth.read(d)-this._originalWidth.read(d);return f>g?{maxScroll:f,width:this._modifiedWidth.read(d)}:{maxScroll:g,width:this._originalWidth.read(d)}}),this._elements=Yc("div.multiDiffEntry",[Yc("div.header@header",[Yc("div.header-content",[Yc("div.collapse-button@collapseButton"),Yc("div.file-path",[Yc("div.title.modified.show-file-icons@primaryPath",[]),Yc("div.status.deleted@status",["R"]),Yc("div.title.original.show-file-icons@secondaryPath",[])]),Yc("div.actions@actions")])]),Yc("div.editorParent",[Yc("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(Q4,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode},{})),this.isModifedFocused=S1t(this.editor.getModifiedEditor()),this.isOriginalFocused=S1t(this.editor.getOriginalEditor()),this.isFocused=Ma(this,d=>this.isModifedFocused.read(d)||this.isOriginalFocused.read(d)),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=new On,this._headerHeight=40,this._lastScrollTop=-1,this._isSettingScrollTop=!1;const l=new Ove(this._elements.collapseButton,{});this._register(Cl(d=>{l.element.className="",l.icon=this._collapsed.read(d)?Dr.chevronRight:Dr.chevronDown})),this._register(l.onDidClick(()=>{var d;(d=this._viewModel.get())===null||d===void 0||d.collapsed.set(!this._collapsed.get(),void 0)})),this._register(Cl(d=>{this._elements.editor.style.display=this._collapsed.read(d)?"none":"block"})),this._register(this.editor.getModifiedEditor().onDidLayoutChange(d=>{const f=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(f,void 0)})),this._register(this.editor.getOriginalEditor().onDidLayoutChange(d=>{const f=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(f,void 0)})),this._register(this.editor.onDidContentSizeChange(d=>{r0e(f=>{this._editorContentHeight.set(d.contentHeight,f),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),f),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),f)})})),this._register(this.editor.getOriginalEditor().onDidScrollChange(d=>{if(this._isSettingScrollTop||!d.scrollTopChanged||!this._data)return;const f=d.scrollTop-this._lastScrollTop;this._data.deltaScrollVertical(f)})),this._register(Cl(d=>{var f;const g=(f=this._viewModel.read(d))===null||f===void 0?void 0:f.isActive.read(d);this._elements.root.classList.toggle("active",g)})),this._container.appendChild(this._elements.root),this._outerEditorHeight=this._headerHeight,this._register(this._instantiationService.createInstance(t1e,this._elements.actions,_t.MultiDiffEditorFileToolbar,{actionRunner:this._register(new xkt(()=>{var d;return(d=this._viewModel.get())===null||d===void 0?void 0:d.modifiedUri})),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:d=>d.startsWith("navigation")},actionViewItemProvider:(d,f)=>wxt(s,d,f)}))}setScrollLeft(e){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(e):this.editor.getOriginalEditor().setScrollLeft(e)}setData(e){this._data=e;function i(s){return{...s,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}const n=e.viewModel.entry.value;n.onOptionsDidChange&&this._dataStore.add(n.onOptionsDidChange(()=>{var s;this.editor.updateOptions(i((s=n.options)!==null&&s!==void 0?s:{}))})),r0e(s=>{var l,d,f,g;(l=this._resourceLabel)===null||l===void 0||l.setUri((d=e.viewModel.modifiedUri)!==null&&d!==void 0?d:e.viewModel.originalUri,{strikethrough:e.viewModel.modifiedUri===void 0});let y=!1,w=!1,x=!1,I="";e.viewModel.modifiedUri&&e.viewModel.originalUri&&e.viewModel.modifiedUri.path!==e.viewModel.originalUri.path?(I="R",y=!0):e.viewModel.modifiedUri?e.viewModel.originalUri||(I="A",x=!0):(I="D",w=!0),this._elements.status.classList.toggle("renamed",y),this._elements.status.classList.toggle("deleted",w),this._elements.status.classList.toggle("added",x),this._elements.status.innerText=I,(f=this._resourceLabel2)===null||f===void 0||f.setUri(y?e.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(e.viewModel,s),this.editor.setModel(e.viewModel.diffEditorViewModel,s),this.editor.updateOptions(i((g=n.options)!==null&&g!==void 0?g:{}))})}render(e,i,n,s){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${e.start}px`,this._elements.root.style.height=`${e.length}px`,this._elements.root.style.width=`${i}px`,this._elements.root.style.position="absolute";const l=e.length-this._headerHeight,d=Math.max(0,Math.min(s.start-e.start,l));this._elements.header.style.transform=`translateY(${d}px)`,r0e(f=>{this.editor.layout({width:i-2*8-2*1,height:e.length-this._outerEditorHeight})});try{this._isSettingScrollTop=!0,this._lastScrollTop=n,this.editor.getOriginalEditor().setScrollTop(n)}finally{this._isSettingScrollTop=!1}this._elements.header.classList.toggle("shadow",d>0||n>0),this._elements.header.classList.toggle("collapsed",d===l)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};n1e=Ibi([Nbi(3,So)],n1e);function S1t(c){return Zu(e=>{const i=new On;return i.add(c.onDidFocusEditorWidget(()=>e(!0))),i.add(c.onDidBlurEditorWidget(()=>e(!1))),i},()=>c.hasTextFocus())}class Pbi{constructor(e){this._create=e,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(e){var i;let n;if(this._unused.size===0)n=this._create(e),this._itemData.set(n,e);else{const s=[...this._unused.values()];n=(i=s.find(l=>this._itemData.get(l).getId()===e.getId()))!==null&&i!==void 0?i:s[0],this._unused.delete(n),this._itemData.set(n,e),n.setData(e)}return this._used.add(n),{object:n,dispose:()=>{this._used.delete(n),this._unused.size>5?n.dispose():this._unused.add(n)}}}dispose(){for(const e of this._used)e.dispose();for(const e of this._unused)e.dispose();this._used.clear(),this._unused.clear()}}var Abi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},w1t=function(c,e){return function(i,n){e(i,n,c)}};let _We=class extends Ii{constructor(e,i,n,s,l,d){super(),this._element=e,this._dimension=i,this._viewModel=n,this._workbenchUIElementFactory=s,this._parentContextKeyService=l,this._parentInstantiationService=d,this._scrollableElements=Yc("div.scrollContent",[Yc("div@content",{style:{overflow:"hidden"}}),Yc("div.monaco-editor@overflowWidgetsDomNode",{})]),this._scrollable=this._register(new qq({forceIntegerValues:!1,scheduleAtNextAnimationFrame:g=>zC(Io(this._element),g),smoothScrollDuration:100})),this._scrollableElement=this._register(new cye(this._scrollableElements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this._elements=Yc("div.monaco-component.multiDiffEditor",{},[Yc("div",{},[this._scrollableElement.getDomNode()]),Yc("div.placeholder@placeholder",{},[Yc("div",[V("noChangedFiles","No Changed Files")])])]),this._sizeObserver=this._register(new mkt(this._element,void 0)),this._objectPool=this._register(new Pbi(g=>{const y=this._instantiationService.createInstance(n1e,this._scrollableElements.content,this._scrollableElements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return y.setData(g),y})),this.scrollTop=Zu(this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollTop),this.scrollLeft=Zu(this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollLeft),this._viewItemsInfo=tB(this,(g,y)=>{const w=this._viewModel.read(g);if(!w)return{items:[],getItem:O=>{throw new Yu}};const x=w.items.read(g),I=new Map;return{items:x.map(O=>{var W;const X=y.add(new Obi(O,this._objectPool,this.scrollLeft,ee=>{this._scrollableElement.setScrollPosition({scrollTop:this._scrollableElement.getScrollPosition().scrollTop+ee})})),Z=(W=this._lastDocStates)===null||W===void 0?void 0:W[X.getKey()];return Z&&Rd(ee=>{X.setViewState(Z,ee)}),I.set(O,X),X}),getItem:O=>I.get(O)}}),this._viewItems=this._viewItemsInfo.map(this,g=>g.items),this._spaceBetweenPx=0,this._totalHeight=this._viewItems.map(this,(g,y)=>g.reduce((w,x)=>w+x.contentHeight.read(y)+this._spaceBetweenPx,0)),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new One([Zo,this._contextKeyService]))),this._lastDocStates={},this._contextKeyService.createKey(Lt.inMultiDiffEditor.key,!0),this._register(ck((g,y)=>{const w=this._viewModel.read(g);if(w&&w.contextKeys)for(const[x,I]of Object.entries(w.contextKeys)){const P=this._contextKeyService.createKey(x,void 0);P.set(I),y.add(go(()=>P.reset()))}}));const f=this._parentContextKeyService.createKey(Lt.multiDiffEditorAllCollapsed.key,!1);this._register(Cl(g=>{const y=this._viewModel.read(g);if(y){const w=y.items.read(g).every(x=>x.collapsed.read(g));f.set(w)}})),this._register(Cl(g=>{const y=this._dimension.read(g);this._sizeObserver.observe(y)})),this._register(Cl(g=>{const y=this._viewItems.read(g);this._elements.placeholder.classList.toggle("visible",y.length===0)})),this._scrollableElements.content.style.position="relative",this._register(Cl(g=>{const y=this._sizeObserver.height.read(g);this._scrollableElements.root.style.height=`${y}px`;const w=this._totalHeight.read(g);this._scrollableElements.content.style.height=`${w}px`;const x=this._sizeObserver.width.read(g);let I=x;const P=this._viewItems.read(g),O=QHe(P,kb(W=>W.maxScroll.read(g).maxScroll,uT));if(O){const W=O.maxScroll.read(g);I=x+W.maxScroll}this._scrollableElement.setScrollDimensions({width:x,height:y,scrollHeight:w,scrollWidth:I})})),e.replaceChildren(this._elements.root),this._register(go(()=>{e.replaceChildren()})),this._register(this._register(Cl(g=>{r0e(y=>{this.render(g)})})))}render(e){const i=this.scrollTop.read(e);let n=0,s=0,l=0;const d=this._sizeObserver.height.read(e),f=gl.ofStartAndLength(i,d),g=this._sizeObserver.width.read(e);for(const y of this._viewItems.read(e)){const w=y.contentHeight.read(e),x=Math.min(w,d),I=gl.ofStartAndLength(s,x),P=gl.ofStartAndLength(l,w);if(P.isBefore(f))n-=w-x,y.hide();else if(P.isAfter(f))y.hide();else{const O=Math.max(0,Math.min(f.start-P.start,w-x));n-=O;const W=gl.ofStartAndLength(i+n,d);y.render(I,O,g,W)}s+=x+this._spaceBetweenPx,l+=w+this._spaceBetweenPx}this._scrollableElements.content.style.transform=`translateY(${-(i+n)}px)`}};_We=Abi([w1t(4,Zo),w1t(5,So)],_We);class Obi extends Ii{constructor(e,i,n,s){super(),this.viewModel=e,this._objectPool=i,this._scrollLeft=n,this._deltaScrollVertical=s,this._templateRef=this._register(yie(this,void 0)),this.contentHeight=Ma(this,l=>{var d,f,g;return(g=(f=(d=this._templateRef.read(l))===null||d===void 0?void 0:d.object.contentHeight)===null||f===void 0?void 0:f.read(l))!==null&&g!==void 0?g:this.viewModel.lastTemplateData.read(l).contentHeight}),this.maxScroll=Ma(this,l=>{var d,f;return(f=(d=this._templateRef.read(l))===null||d===void 0?void 0:d.object.maxScroll.read(l))!==null&&f!==void 0?f:{maxScroll:0,scrollWidth:0}}),this.template=Ma(this,l=>{var d;return(d=this._templateRef.read(l))===null||d===void 0?void 0:d.object}),this._isHidden=yc(this,!1),this._isFocused=Ma(this,l=>{var d,f;return(f=(d=this.template.read(l))===null||d===void 0?void 0:d.isFocused.read(l))!==null&&f!==void 0?f:!1}),this.viewModel.setIsFocused(this._isFocused,void 0),this._register(Cl(l=>{var d;const f=this._scrollLeft.read(l);(d=this._templateRef.read(l))===null||d===void 0||d.object.setScrollLeft(f)})),this._register(Cl(l=>{const d=this._templateRef.read(l);!d||!this._isHidden.read(l)||d.object.isFocused.read(l)||this._clear()}))}dispose(){this._clear(),super.dispose()}toString(){var e;return`VirtualViewItem(${(e=this.viewModel.entry.value.modified)===null||e===void 0?void 0:e.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(e,i){var n;this.viewModel.collapsed.set(e.collapsed,i),this._updateTemplateData(i);const s=this.viewModel.lastTemplateData.get(),l=(n=e.selections)===null||n===void 0?void 0:n.map(Qs.liftSelection);this.viewModel.lastTemplateData.set({...s,selections:l},i);const d=this._templateRef.get();d&&l&&d.object.editor.setSelections(l)}_updateTemplateData(e){var i;const n=this._templateRef.get();n&&this.viewModel.lastTemplateData.set({contentHeight:n.object.contentHeight.get(),selections:(i=n.object.editor.getSelections())!==null&&i!==void 0?i:void 0},e)}_clear(){const e=this._templateRef.get();e&&Rd(i=>{this._updateTemplateData(i),e.object.hide(),this._templateRef.set(void 0,i)})}hide(){this._isHidden.set(!0,void 0)}render(e,i,n,s){this._isHidden.set(!1,void 0);let l=this._templateRef.get();if(!l){l=this._objectPool.getUnusedObj(new Lbi(this.viewModel,this._deltaScrollVertical)),this._templateRef.set(l,void 0);const d=this.viewModel.lastTemplateData.get().selections;d&&l.object.editor.setSelections(d)}l.object.render(e,n,i,s)}}Ft("multiDiffEditor.headerBackground",{dark:"#262626",light:"tab.inactiveBackground",hcDark:"tab.inactiveBackground",hcLight:"tab.inactiveBackground"},V("multiDiffEditor.headerBackground","The background color of the diff editor's header"));Ft("multiDiffEditor.background",{dark:"editorBackground",light:"editorBackground",hcDark:"editorBackground",hcLight:"editorBackground"},V("multiDiffEditor.background","The background color of the multi file diff editor"));Ft("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},V("multiDiffEditor.border","The border color of the multi file diff editor"));var Mbi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Rbi=function(c,e){return function(i,n){e(i,n,c)}};let pWe=class extends Ii{constructor(e,i,n){super(),this._element=e,this._workbenchUIElementFactory=i,this._instantiationService=n,this._dimension=yc(this,void 0),this._viewModel=yc(this,void 0),this._widgetImpl=tB(this,(s,l)=>(eT(n1e,s),l.add(this._instantiationService.createInstance(eT(_We,s),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory)))),this._register(Hne(this._widgetImpl))}};pWe=Mbi([Rbi(2,So)],pWe);function Fbi(c,e,i){return Xo.initialize(i||{}).createInstance(fWe,c,e)}function Bbi(c){return Xo.get(Oc).onCodeEditorAdd(i=>{c(i)})}function Wbi(c){return Xo.get(Oc).onDiffEditorAdd(i=>{c(i)})}function Vbi(){return Xo.get(Oc).listCodeEditors()}function Hbi(){return Xo.get(Oc).listDiffEditors()}function jbi(c,e,i){return Xo.initialize(i||{}).createInstance(hWe,c,e)}function zbi(c,e){const i=Xo.initialize(e||{});return new pWe(c,{},i)}function Ubi(c){if(typeof c.id!="string"||typeof c.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return uc.registerCommand(c.id,c.run)}function qbi(c){if(typeof c.id!="string"||typeof c.label!="string"||typeof c.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const e=xn.deserialize(c.precondition),i=(s,...l)=>sg.runEditorCommand(s,l,e,(d,f,g)=>Promise.resolve(c.run(f,...g))),n=new On;if(n.add(uc.registerCommand(c.id,i)),c.contextMenuGroupId){const s={command:{id:c.id,title:c.label},when:e,group:c.contextMenuGroupId,order:c.contextMenuOrder||0};n.add(bm.appendMenuItem(_t.EditorContext,s))}if(Array.isArray(c.keybindings)){const s=Xo.get(ou);if(!(s instanceof Cq))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const l=xn.and(e,xn.deserialize(c.keybindingContext));n.add(s.addDynamicKeybindings(c.keybindings.map(d=>({keybinding:d,command:c.id,when:l}))))}}return n}function $bi(c){return Ekt([c])}function Ekt(c){const e=Xo.get(ou);return e instanceof Cq?e.addDynamicKeybindings(c.map(i=>({keybinding:i.keybinding,command:i.command,commandArgs:i.commandArgs,when:xn.deserialize(i.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),Ii.None)}function Jbi(c,e,i){const n=Xo.get(If),s=n.getLanguageIdByMimeType(e)||e;return Dkt(Xo.get(Qf),n,c,s,i)}function Gbi(c,e){const i=Xo.get(If),n=i.getLanguageIdByMimeType(e)||e||yw;c.setLanguage(i.createById(n))}function Kbi(c,e,i){c&&Xo.get(EL).changeOne(e,c.uri,i)}function Qbi(c){Xo.get(EL).changeAll(c,[])}function Xbi(c){return Xo.get(EL).read(c)}function Zbi(c){return Xo.get(EL).onMarkerChanged(c)}function Ybi(c){return Xo.get(Qf).getModel(c)}function eCi(){return Xo.get(Qf).getModels()}function tCi(c){return Xo.get(Qf).onModelAdded(c)}function iCi(c){return Xo.get(Qf).onModelRemoved(c)}function nCi(c){return Xo.get(Qf).onModelLanguageChanged(i=>{c({model:i.model,oldLanguage:i.oldLanguageId})})}function rCi(c){return fai(Xo.get(Qf),Xo.get(Kd),c)}function sCi(c,e){const i=Xo.get(If),n=Xo.get(Nw);return rje.colorizeElement(n,i,c,e).then(()=>{n.registerEditorContainer(c)})}function oCi(c,e,i){const n=Xo.get(If);return Xo.get(Nw).registerEditorContainer(ed.document.body),rje.colorize(n,c,e,i)}function aCi(c,e,i=4){return Xo.get(Nw).registerEditorContainer(ed.document.body),rje.colorizeModelLine(c,e,i)}function lCi(c){const e=Nh.get(c);return e||{getInitialState:()=>eq,tokenize:(i,n,s)=>tje(c,s)}}function cCi(c,e){Nh.getOrCreate(e);const i=lCi(e),n=wL(c),s=[];let l=i.getInitialState();for(let d=0,f=n.length;d{var l;if(!n)return null;const d=(l=i.options)===null||l===void 0?void 0:l.selection;let f;return d&&typeof d.endLineNumber=="number"&&typeof d.endColumn=="number"?f=d:d&&(f={lineNumber:d.startLineNumber,column:d.startColumn}),await c.openCodeEditor(n,i.resource,f)?n:null})}function gCi(){return{create:Fbi,getEditors:Vbi,getDiffEditors:Hbi,onDidCreateEditor:Bbi,onDidCreateDiffEditor:Wbi,createDiffEditor:jbi,addCommand:Ubi,addEditorAction:qbi,addKeybindingRule:$bi,addKeybindingRules:Ekt,createModel:Jbi,setModelLanguage:Gbi,setModelMarkers:Kbi,getModelMarkers:Xbi,removeAllMarkers:Qbi,onDidChangeMarkers:Zbi,getModels:eCi,getModel:Ybi,onDidCreateModel:tCi,onWillDisposeModel:iCi,onDidChangeModelLanguage:nCi,createWebWorker:rCi,colorizeElement:sCi,colorize:oCi,colorizeModelLine:aCi,tokenize:cCi,defineTheme:uCi,setTheme:dCi,remeasureFonts:fCi,registerCommand:hCi,registerLinkOpener:_Ci,registerEditorOpener:pCi,AccessibilitySupport:zFe,ContentWidgetPositionPreference:KFe,CursorChangeReason:QFe,DefaultEndOfLine:XFe,EditorAutoIndentStrategy:YFe,EditorOption:e5e,EndOfLinePreference:t5e,EndOfLineSequence:i5e,MinimapPosition:h5e,MinimapSectionHeaderStyle:_5e,MouseTargetType:p5e,OverlayWidgetPositionPreference:v5e,OverviewRulerLane:y5e,GlyphMarginLane:n5e,RenderLineNumbersType:S5e,RenderMinimap:w5e,ScrollbarVisibility:k5e,ScrollType:x5e,TextEditorCursorBlinkingStyle:L5e,TextEditorCursorStyle:P5e,TrackedRangeStickiness:A5e,WrappingIndent:O5e,InjectedTextCursorStops:o5e,PositionAffinity:C5e,ShowLightbulbIconMode:D5e,ConfigurationChangedEvent:Ibt,BareFontInfo:t9,FontInfo:U5e,TextModelResolvedOptions:qme,FindMatch:jte,ApplyUpdateResult:Jee,EditorZoom:Kx,createMultiFileDiffEditor:zbi,EditorType:xne,EditorOptions:RE}}function mCi(c,e){if(!e||!Array.isArray(e))return!1;for(const i of e)if(!c(i))return!1;return!0}function ome(c,e){return typeof c=="boolean"?c:e}function x1t(c,e){return typeof c=="string"?c:e}function vCi(c){const e={};for(const i of c)e[i]=!0;return e}function k1t(c,e=!1){e&&(c=c.map(function(n){return n.toLowerCase()}));const i=vCi(c);return e?function(n){return i[n.toLowerCase()]!==void 0&&i.hasOwnProperty(n.toLowerCase())}:function(n){return i[n]!==void 0&&i.hasOwnProperty(n)}}function gWe(c,e,i){e=e.replace(/@@/g,"");let n=0,s;do s=!1,e=e.replace(/@(\w+)/g,function(d,f){s=!0;let g="";if(typeof c[f]=="string")g=c[f];else if(c[f]&&c[f]instanceof RegExp)g=c[f].source;else throw c[f]===void 0?vf(c,"language definition does not contain attribute '"+f+"', used at: "+e):vf(c,"attribute reference '"+f+"' must be a string, used at: "+e);return M5(g)?"":"(?:"+g+")"}),n++;while(s&&n<5);e=e.replace(/\x01/g,"@");const l=(c.ignoreCase?"i":"")+(c.unicode?"u":"");if(i&&e.match(/\$[sS](\d\d?)/g)){let f=null,g=null;return y=>(g&&f===y||(f=y,g=new RegExp(Pai(c,e,y),l)),g)}return new RegExp(e,l)}function yCi(c,e,i,n){if(n<0)return c;if(n=100){n=n-100;const s=i.split(".");if(s.unshift(i),n=0&&(n.tokenSubst=!0),typeof i.bracket=="string")if(i.bracket==="@open")n.bracket=1;else if(i.bracket==="@close")n.bracket=-1;else throw vf(c,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(i.next){if(typeof i.next!="string")throw vf(c,"the next state must be a string value in rule: "+e);{let s=i.next;if(!/^(@pop|@push|@popall)$/.test(s)&&(s[0]==="@"&&(s=s.substr(1)),s.indexOf("$")<0&&!Aai(c,fM(c,s,"",[],""))))throw vf(c,"the next state '"+i.next+"' is not defined in rule: "+e);n.next=s}}return typeof i.goBack=="number"&&(n.goBack=i.goBack),typeof i.switchTo=="string"&&(n.switchTo=i.switchTo),typeof i.log=="string"&&(n.log=i.log),typeof i.nextEmbedded=="string"&&(n.nextEmbedded=i.nextEmbedded,c.usesEmbedded=!0),n}}else if(Array.isArray(i)){const n=[];for(let s=0,l=i.length;s0&&n[0]==="^",this.name=this.name+": "+n,this.regex=gWe(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")",!0)}setAction(e,i){this.action=mWe(e,this.name,i)}resolveRegex(e){return this.regex instanceof RegExp?this.regex:this.regex(e)}}function Ikt(c,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");const i={};i.languageId=c,i.includeLF=ome(e.includeLF,!1),i.noThrow=!1,i.maxStack=100,i.start=typeof e.start=="string"?e.start:null,i.ignoreCase=ome(e.ignoreCase,!1),i.unicode=ome(e.unicode,!1),i.tokenPostfix=x1t(e.tokenPostfix,"."+i.languageId),i.defaultToken=x1t(e.defaultToken,"source"),i.usesEmbedded=!1;const n=e;n.languageId=c,n.includeLF=i.includeLF,n.ignoreCase=i.ignoreCase,n.unicode=i.unicode,n.noThrow=i.noThrow,n.usesEmbedded=i.usesEmbedded,n.stateNames=e.tokenizer,n.defaultToken=i.defaultToken;function s(d,f,g){for(const y of g){let w=y.include;if(w){if(typeof w!="string")throw vf(i,"an 'include' attribute must be a string at: "+d);if(w[0]==="@"&&(w=w.substr(1)),!e.tokenizer[w])throw vf(i,"include target '"+w+"' is not defined at: "+d);s(d+"."+w,f,e.tokenizer[w])}else{const x=new CCi(d);if(Array.isArray(y)&&y.length>=1&&y.length<=3)if(x.setRegex(n,y[0]),y.length>=3)if(typeof y[1]=="string")x.setAction(n,{token:y[1],next:y[2]});else if(typeof y[1]=="object"){const I=y[1];I.next=y[2],x.setAction(n,I)}else throw vf(i,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+d);else x.setAction(n,y[1]);else{if(!y.regex)throw vf(i,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+d);y.name&&typeof y.name=="string"&&(x.name=y.name),y.matchOnlyAtStart&&(x.matchOnlyAtLineStart=ome(y.matchOnlyAtLineStart,!1)),x.setRegex(n,y.regex),x.setAction(n,y.action)}f.push(x)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw vf(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(const d in e.tokenizer)if(e.tokenizer.hasOwnProperty(d)){i.start||(i.start=d);const f=e.tokenizer[d];i.tokenizer[d]=new Array,s("tokenizer."+d,i.tokenizer[d],f)}if(i.usesEmbedded=n.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw vf(i,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const l=[];for(const d of e.brackets){let f=d;if(f&&Array.isArray(f)&&f.length===3&&(f={token:f[2],open:f[0],close:f[1]}),f.open===f.close)throw vf(i,"open and close brackets in a 'brackets' attribute must be different: "+f.open+` + hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof f.open=="string"&&typeof f.token=="string"&&typeof f.close=="string")l.push({token:f.token+i.tokenPostfix,open:B4(i,f.open),close:B4(i,f.close)});else throw vf(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return i.brackets=l,i.noThrow=!0,i}function SCi(c){XU.registerLanguage(c)}function wCi(){let c=[];return c=c.concat(XU.getLanguages()),c}function xCi(c){return Xo.get(If).languageIdCodec.encodeLanguageId(c)}function kCi(c,e){return Xo.withServices(()=>{const n=Xo.get(If).onDidRequestRichLanguageFeatures(s=>{s===c&&(n.dispose(),e())});return n})}function TCi(c,e){return Xo.withServices(()=>{const n=Xo.get(If).onDidRequestBasicLanguageFeatures(s=>{s===c&&(n.dispose(),e())});return n})}function DCi(c,e){if(!Xo.get(If).isRegisteredLanguageId(c))throw new Error(`Cannot set configuration for unknown language ${c}`);return Xo.get(Kd).register(c,e,100)}class ECi{constructor(e,i){this._languageId=e,this._actual=i}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,i,n){if(typeof this._actual.tokenize=="function")return Mie.adaptTokenize(this._languageId,this._actual,e,n);throw new Error("Not supported!")}tokenizeEncoded(e,i,n){const s=this._actual.tokenizeEncoded(e,n);return new M1e(s.tokens,s.endState)}}class Mie{constructor(e,i,n,s){this._languageId=e,this._actual=i,this._languageService=n,this._standaloneThemeService=s}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,i){const n=[];let s=0;for(let l=0,d=e.length;l0&&l[d-1]===I)continue;let P=x.startIndex;y===0?P=0:P{const n=await Promise.resolve(e.create());return n?ICi(n)?Lkt(c,n):new Kte(Xo.get(If),Xo.get(Nw),c,Ikt(c,n),Xo.get(El)):null});return Nh.registerFactory(c,i)}function PCi(c,e){if(!Xo.get(If).isRegisteredLanguageId(c))throw new Error(`Cannot set tokens provider for unknown language ${c}`);return Nkt(e)?Mze(c,{create:()=>e}):Nh.register(c,Lkt(c,e))}function ACi(c,e){const i=n=>new Kte(Xo.get(If),Xo.get(Nw),c,Ikt(c,n),Xo.get(El));return Nkt(e)?Mze(c,{create:()=>e}):Nh.register(c,i(e))}function OCi(c,e){return Xo.get(js).referenceProvider.register(c,e)}function MCi(c,e){return Xo.get(js).renameProvider.register(c,e)}function RCi(c,e){return Xo.get(js).newSymbolNamesProvider.register(c,e)}function FCi(c,e){return Xo.get(js).signatureHelpProvider.register(c,e)}function BCi(c,e){return Xo.get(js).hoverProvider.register(c,{provideHover:async(n,s,l,d)=>{const f=n.getWordAtPosition(s);return Promise.resolve(e.provideHover(n,s,l,d)).then(g=>{if(g)return!g.range&&f&&(g.range=new at(s.lineNumber,f.startColumn,s.lineNumber,f.endColumn)),g.range||(g.range=new at(s.lineNumber,s.column,s.lineNumber,s.column)),g})}})}function WCi(c,e){return Xo.get(js).documentSymbolProvider.register(c,e)}function VCi(c,e){return Xo.get(js).documentHighlightProvider.register(c,e)}function HCi(c,e){return Xo.get(js).linkedEditingRangeProvider.register(c,e)}function jCi(c,e){return Xo.get(js).definitionProvider.register(c,e)}function zCi(c,e){return Xo.get(js).implementationProvider.register(c,e)}function UCi(c,e){return Xo.get(js).typeDefinitionProvider.register(c,e)}function qCi(c,e){return Xo.get(js).codeLensProvider.register(c,e)}function $Ci(c,e,i){return Xo.get(js).codeActionProvider.register(c,{providedCodeActionKinds:i==null?void 0:i.providedCodeActionKinds,documentation:i==null?void 0:i.documentation,provideCodeActions:(s,l,d,f)=>{const y=Xo.get(EL).read({resource:s.uri}).filter(w=>at.areIntersectingOrTouching(w,l));return e.provideCodeActions(s,l,{markers:y,only:d.only,trigger:d.trigger},f)},resolveCodeAction:e.resolveCodeAction})}function JCi(c,e){return Xo.get(js).documentFormattingEditProvider.register(c,e)}function GCi(c,e){return Xo.get(js).documentRangeFormattingEditProvider.register(c,e)}function KCi(c,e){return Xo.get(js).onTypeFormattingEditProvider.register(c,e)}function QCi(c,e){return Xo.get(js).linkProvider.register(c,e)}function XCi(c,e){return Xo.get(js).completionProvider.register(c,e)}function ZCi(c,e){return Xo.get(js).colorProvider.register(c,e)}function YCi(c,e){return Xo.get(js).foldingRangeProvider.register(c,e)}function eSi(c,e){return Xo.get(js).declarationProvider.register(c,e)}function tSi(c,e){return Xo.get(js).selectionRangeProvider.register(c,e)}function iSi(c,e){return Xo.get(js).documentSemanticTokensProvider.register(c,e)}function nSi(c,e){return Xo.get(js).documentRangeSemanticTokensProvider.register(c,e)}function rSi(c,e){return Xo.get(js).inlineCompletionsProvider.register(c,e)}function sSi(c,e){return Xo.get(js).inlineEditProvider.register(c,e)}function oSi(c,e){return Xo.get(js).inlayHintsProvider.register(c,e)}function aSi(){return{register:SCi,getLanguages:wCi,onLanguage:kCi,onLanguageEncountered:TCi,getEncodedLanguageId:xCi,setLanguageConfiguration:DCi,setColorMap:LCi,registerTokensProviderFactory:Mze,setTokensProvider:PCi,setMonarchTokensProvider:ACi,registerReferenceProvider:OCi,registerRenameProvider:MCi,registerNewSymbolNameProvider:RCi,registerCompletionItemProvider:XCi,registerSignatureHelpProvider:FCi,registerHoverProvider:BCi,registerDocumentSymbolProvider:WCi,registerDocumentHighlightProvider:VCi,registerLinkedEditingRangeProvider:HCi,registerDefinitionProvider:jCi,registerImplementationProvider:zCi,registerTypeDefinitionProvider:UCi,registerCodeLensProvider:qCi,registerCodeActionProvider:$Ci,registerDocumentFormattingEditProvider:JCi,registerDocumentRangeFormattingEditProvider:GCi,registerOnTypeFormattingEditProvider:KCi,registerLinkProvider:QCi,registerColorProvider:ZCi,registerFoldingRangeProvider:YCi,registerDeclarationProvider:eSi,registerSelectionRangeProvider:tSi,registerDocumentSemanticTokensProvider:iSi,registerDocumentRangeSemanticTokensProvider:nSi,registerInlineCompletionsProvider:rSi,registerInlineEditProvider:sSi,registerInlayHintsProvider:oSi,DocumentHighlightKind:ZFe,CompletionItemKind:$Fe,CompletionItemTag:JFe,CompletionItemInsertTextRule:qFe,SymbolKind:I5e,SymbolTag:N5e,IndentAction:s5e,CompletionTriggerKind:GFe,SignatureHelpTriggerKind:E5e,InlayHintKind:a5e,InlineCompletionTriggerKind:l5e,InlineEditTriggerKind:c5e,CodeActionTriggerType:UFe,NewSymbolNameTag:g5e,NewSymbolNameTriggerKind:m5e,PartialAcceptTriggerKind:b5e,HoverVerbosityAction:r5e,FoldingRangeKind:by,SelectedSuggestionInfo:Ubt}}const Rze=Kl("IEditorCancelService"),Pkt=new Xr("cancellableOperation",!1,V("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));dc(Rze,class{constructor(){this._tokens=new WeakMap}add(c,e){let i=this._tokens.get(c);i||(i=c.invokeWithinContext(s=>{const l=Pkt.bindTo(s.get(Zo)),d=new yy;return{key:l,tokens:d}}),this._tokens.set(c,i));let n;return i.key.set(!0),n=i.tokens.push(e),()=>{n&&(n(),i.key.set(!i.tokens.isEmpty()),n=void 0)}}cancel(c){const e=this._tokens.get(c);if(!e)return;const i=e.tokens.pop();i&&(i.cancel(),e.key.set(!e.tokens.isEmpty()))}},1);class lSi extends uh{constructor(e,i){super(i),this.editor=e,this._unregister=e.invokeWithinContext(n=>n.get(Rze).add(e,this))}dispose(){this._unregister(),super.dispose()}}qr(new class extends sg{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:Pkt})}runEditorCommand(c,e){c.get(Rze).cancel(e)}});let Akt=class vWe{constructor(e,i){if(this.flags=i,this.flags&1){const n=e.getModel();this.modelVersionId=n?p9("{0}#{1}",n.uri.toString(),n.getVersionId()):null}else this.modelVersionId=null;this.flags&4?this.position=e.getPosition():this.position=null,this.flags&2?this.selection=e.getSelection():this.selection=null,this.flags&8?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof vWe))return!1;const i=e;return!(this.modelVersionId!==i.modelVersionId||this.scrollLeft!==i.scrollLeft||this.scrollTop!==i.scrollTop||!this.position&&i.position||this.position&&!i.position||this.position&&i.position&&!this.position.equals(i.position)||!this.selection&&i.selection||this.selection&&!i.selection||this.selection&&i.selection&&!this.selection.equalsRange(i.selection))}validate(e){return this._equals(new vWe(e,this.flags))}};class dR extends lSi{constructor(e,i,n,s){super(e,s),this._listener=new On,i&4&&this._listener.add(e.onDidChangeCursorPosition(l=>{(!n||!at.containsPosition(n,l.position))&&this.cancel()})),i&2&&this._listener.add(e.onDidChangeCursorSelection(l=>{(!n||!at.containsRange(n,l.selection))&&this.cancel()})),i&8&&this._listener.add(e.onDidScrollChange(l=>this.cancel())),i&1&&(this._listener.add(e.onDidChangeModel(l=>this.cancel())),this._listener.add(e.onDidChangeModelContent(l=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}class Fze extends uh{constructor(e,i){super(i),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}function bL(c){return c&&typeof c.getEditorType=="function"?c.getEditorType()===xne.ICodeEditor:!1}function Bze(c){return c&&typeof c.getEditorType=="function"?c.getEditorType()===xne.IDiffEditor:!1}function cSi(c){return!!c&&typeof c=="object"&&typeof c.onDidChangeActiveEditor=="function"}function Okt(c){return bL(c)?c:Bze(c)?c.getModifiedEditor():cSi(c)&&bL(c.activeCodeEditor)?c.activeCodeEditor:null}class wq{static _handleEolEdits(e,i){let n;const s=[];for(const l of i)typeof l.eol=="number"&&(n=l.eol),l.range&&typeof l.text=="string"&&s.push(l);return typeof n=="number"&&e.hasModel()&&e.getModel().pushEOL(n),s}static _isFullModelReplaceEdit(e,i){if(!e.hasModel())return!1;const n=e.getModel(),s=n.validateRange(i.range);return n.getFullModelRange().equalsRange(s)}static execute(e,i,n){n&&e.pushUndoStop();const s=ME.capture(e),l=wq._handleEolEdits(e,i);l.length===1&&wq._isFullModelReplaceEdit(e,l[0])?e.executeEdits("formatEditsCommand",l.map(d=>Kf.replace(at.lift(d.range),d.text))):e.executeEdits("formatEditsCommand",l.map(d=>Kf.replaceMove(at.lift(d.range),d.text))),n&&e.pushUndoStop(),s.restoreRelativeVerticalPositionOfCursor(e)}}class T1t{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}}class uSi{constructor(e){if(this._set=new Set,e)for(const i of e)this.add(i)}add(e){this._set.add(T1t.toKey(e))}has(e){return this._set.has(T1t.toKey(e))}}function Mkt(c,e,i){const n=[],s=new uSi,l=c.ordered(i);for(const f of l)n.push(f),f.extensionId&&s.add(f.extensionId);const d=e.ordered(i);for(const f of d){if(f.extensionId){if(s.has(f.extensionId))continue;s.add(f.extensionId)}n.push({displayName:f.displayName,extensionId:f.extensionId,provideDocumentFormattingEdits(g,y,w){return f.provideDocumentRangeFormattingEdits(g,g.getFullModelRange(),y,w)}})}return n}class L9{static setFormatterSelector(e){return{dispose:L9._selectors.unshift(e)}}static async select(e,i,n,s){if(e.length===0)return;const l=cc.first(L9._selectors);if(l)return await l(e,i,n,s)}}L9._selectors=new yy;async function Rkt(c,e,i,n,s,l,d){const f=c.get(So),{documentRangeFormattingEditProvider:g}=c.get(js),y=bL(e)?e.getModel():e,w=g.ordered(y),x=await L9.select(w,y,n,2);x&&(s.report(x),await f.invokeFunction(dSi,x,e,i,l,d))}async function dSi(c,e,i,n,s,l){var d,f;const g=c.get(_k),y=c.get(Sv),w=c.get(LR);let x,I;bL(i)?(x=i.getModel(),I=new dR(i,5,void 0,s)):(x=i,I=new Fze(i,s));const P=[];let O=0;for(const he of hHe(n).sort(at.compareRangesUsingStarts))O>0&&at.areIntersectingOrTouching(P[O-1],he)?P[O-1]=at.fromPositions(P[O-1].getStartPosition(),he.getEndPosition()):O=P.push(he);const W=async he=>{var we,Te;y.trace("[format][provideDocumentRangeFormattingEdits] (request)",(we=e.extensionId)===null||we===void 0?void 0:we.value,he);const Be=await e.provideDocumentRangeFormattingEdits(x,he,x.getFormattingOptions(),I.token)||[];return y.trace("[format][provideDocumentRangeFormattingEdits] (response)",(Te=e.extensionId)===null||Te===void 0?void 0:Te.value,Be),Be},X=(he,we)=>{if(!he.length||!we.length)return!1;const Te=he.reduce((Be,Me)=>at.plusRange(Be,Me.range),he[0].range);if(!we.some(Be=>at.intersectRanges(Te,Be.range)))return!1;for(const Be of he)for(const Me of we)if(at.intersectRanges(Be.range,Me.range))return!0;return!1},Z=[],ee=[];try{if(typeof e.provideDocumentRangesFormattingEdits=="function"){y.trace("[format][provideDocumentRangeFormattingEdits] (request)",(d=e.extensionId)===null||d===void 0?void 0:d.value,P);const he=await e.provideDocumentRangesFormattingEdits(x,P,x.getFormattingOptions(),I.token)||[];y.trace("[format][provideDocumentRangeFormattingEdits] (response)",(f=e.extensionId)===null||f===void 0?void 0:f.value,he),ee.push(he)}else{for(const he of P){if(I.token.isCancellationRequested)return!0;ee.push(await W(he))}for(let he=0;he({text:Te.text,range:at.lift(Te.range),forceMoveMarkers:!0})),Te=>{for(const{range:Be}of Te)if(at.areIntersectingOrTouching(Be,we))return[new Qs(Be.startLineNumber,Be.startColumn,Be.endLineNumber,Be.endColumn)];return null})}return w.playSignal(Na.format,{userGesture:l}),!0}async function fSi(c,e,i,n,s,l){const d=c.get(So),f=c.get(js),g=bL(e)?e.getModel():e,y=Mkt(f.documentFormattingEditProvider,f.documentRangeFormattingEditProvider,g),w=await L9.select(y,g,i,1);w&&(n.report(w),await d.invokeFunction(hSi,w,e,i,s,l))}async function hSi(c,e,i,n,s,l){const d=c.get(_k),f=c.get(LR);let g,y;bL(i)?(g=i.getModel(),y=new dR(i,5,void 0,s)):(g=i,y=new Fze(i,s));let w;try{const x=await e.provideDocumentFormattingEdits(g,g.getFormattingOptions(),y.token);if(w=await d.computeMoreMinimalEdits(g.uri,x),y.token.isCancellationRequested)return!0}finally{y.dispose()}if(!w||w.length===0)return!1;if(bL(i))wq.execute(i,w,n!==2),n!==2&&i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1);else{const[{range:x}]=w,I=new Qs(x.startLineNumber,x.startColumn,x.endLineNumber,x.endColumn);g.pushEditOperations([I],w.map(P=>({text:P.text,range:at.lift(P.range),forceMoveMarkers:!0})),P=>{for(const{range:O}of P)if(at.areIntersectingOrTouching(O,I))return[new Qs(O.startLineNumber,O.startColumn,O.endLineNumber,O.endColumn)];return null})}return f.playSignal(Na.format,{userGesture:l}),!0}async function _Si(c,e,i,n,s,l){const d=e.documentRangeFormattingEditProvider.ordered(i);for(const f of d){const g=await Promise.resolve(f.provideDocumentRangeFormattingEdits(i,n,s,l)).catch(r_);if(bv(g))return await c.computeMoreMinimalEdits(i.uri,g)}}async function pSi(c,e,i,n,s){const l=Mkt(e.documentFormattingEditProvider,e.documentRangeFormattingEditProvider,i);for(const d of l){const f=await Promise.resolve(d.provideDocumentFormattingEdits(i,n,s)).catch(r_);if(bv(f))return await c.computeMoreMinimalEdits(i.uri,f)}}function Fkt(c,e,i,n,s,l,d){const f=e.onTypeFormattingEditProvider.ordered(i);return f.length===0||f[0].autoFormatTriggerCharacters.indexOf(s)<0?Promise.resolve(void 0):Promise.resolve(f[0].provideOnTypeFormattingEdits(i,n,s,l,d)).catch(r_).then(g=>c.computeMoreMinimalEdits(i.uri,g))}uc.registerCommand("_executeFormatRangeProvider",async function(c,...e){const[i,n,s]=e;Ac(Oo.isUri(i)),Ac(at.isIRange(n));const l=c.get(Lb),d=c.get(_k),f=c.get(js),g=await l.createModelReference(i);try{return _Si(d,f,g.object.textEditorModel,at.lift(n),s,Gl.None)}finally{g.dispose()}});uc.registerCommand("_executeFormatDocumentProvider",async function(c,...e){const[i,n]=e;Ac(Oo.isUri(i));const s=c.get(Lb),l=c.get(_k),d=c.get(js),f=await s.createModelReference(i);try{return pSi(l,d,f.object.textEditorModel,n,Gl.None)}finally{f.dispose()}});uc.registerCommand("_executeFormatOnTypeProvider",async function(c,...e){const[i,n,s,l]=e;Ac(Oo.isUri(i)),Ac(yi.isIPosition(n)),Ac(typeof s=="string");const d=c.get(Lb),f=c.get(_k),g=c.get(js),y=await d.createModelReference(i);try{return Fkt(f,g,y.object.textEditorModel,yi.lift(n),s,l,Gl.None)}finally{y.dispose()}});RE.wrappingIndent.defaultValue=0;RE.glyphMargin.defaultValue=!1;RE.autoIndent.defaultValue=3;RE.overviewRulerLanes.defaultValue=2;L9.setFormatterSelector((c,e,i)=>Promise.resolve(c[0]));const Ay=qbt();Ay.editor=gCi();Ay.languages=aSi();const Bkt=Ay.CancellationTokenSource,Wkt=Ay.Emitter,Vkt=Ay.KeyCode,Hkt=Ay.KeyMod,jkt=Ay.Position,zkt=Ay.Range,Ukt=Ay.Selection,qkt=Ay.SelectionDirection,$kt=Ay.MarkerSeverity,Jkt=Ay.MarkerTag,Wze=Ay.Uri,Gkt=Ay.Token,fU=Ay.editor,RN=Ay.languages,Q7e=globalThis.MonacoEnvironment;(Q7e!=null&&Q7e.globalAPI||typeof define=="function"&&define.amd)&&(globalThis.monaco=Ay);typeof globalThis.require<"u"&&typeof globalThis.require.config=="function"&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});const Gne=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:Bkt,Emitter:Wkt,KeyCode:Vkt,KeyMod:Hkt,MarkerSeverity:$kt,MarkerTag:Jkt,Position:jkt,Range:zkt,Selection:Ukt,SelectionDirection:qkt,Token:Gkt,Uri:Wze,editor:fU,languages:RN},Symbol.toStringTag,{value:"Module"}));/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var gSi=Object.defineProperty,mSi=Object.getOwnPropertyDescriptor,vSi=Object.getOwnPropertyNames,ySi=Object.prototype.hasOwnProperty,bSi=(c,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of vSi(e))!ySi.call(c,s)&&s!==i&&gSi(c,s,{get:()=>e[s],enumerable:!(n=mSi(e,s))||n.enumerable});return c},CSi=(c,e,i)=>(bSi(c,e,"default"),i),Wee={};CSi(Wee,Gne);var Kkt={},X7e={},SSi=class Qkt{static getOrCreate(e){return X7e[e]||(X7e[e]=new Qkt(e)),X7e[e]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((i,n)=>{this._lazyLoadPromiseResolve=i,this._lazyLoadPromiseReject=n})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,Kkt[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}};function wo(c){const e=c.id;Kkt[e]=c,Wee.languages.register(c);const i=SSi.getOrCreate(e);Wee.languages.registerTokensProviderFactory(e,{create:async()=>(await i.load()).language}),Wee.languages.onLanguageEncountered(e,async()=>{const n=await i.load();Wee.languages.setLanguageConfiguration(e,n.conf)})}wo({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>_o(()=>import("./abap-DRC6TkPh.js"),[])});wo({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>_o(()=>import("./apex-BuapDI9Y.js"),[])});wo({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>_o(()=>import("./azcli-BypH-vXm.js"),[])});wo({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>_o(()=>import("./bat-BY6pwuIY.js"),[])});wo({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>_o(()=>import("./bicep-gRuQeaLk.js"),[])});wo({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>_o(()=>import("./cameligo-ul-Lp4lw.js"),[])});wo({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>_o(()=>import("./clojure-DeYg-96x.js"),[])});wo({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>_o(()=>import("./coffee-CfnpWUYo.js"),[])});wo({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>_o(()=>import("./cpp-C9L3yaDO.js"),[])});wo({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>_o(()=>import("./cpp-C9L3yaDO.js"),[])});wo({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>_o(()=>import("./csharp-DWGz5Zuj.js"),[])});wo({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>_o(()=>import("./csp-DrRCxMg5.js"),[])});wo({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>_o(()=>import("./css-BfLuTCmN.js"),[])});wo({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>_o(()=>import("./cypher-DoFvH58O.js"),[])});wo({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>_o(()=>import("./dart-DIovg4uR.js"),[])});wo({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>_o(()=>import("./dockerfile-D2PfwrvU.js"),[])});wo({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>_o(()=>import("./ecl-C_scCXcs.js"),[])});wo({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>_o(()=>import("./elixir-BRk-K-rg.js"),[])});wo({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>_o(()=>import("./flow9-DLs3tTet.js"),[])});wo({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>_o(()=>import("./fsharp-D0UiDa5C.js"),[])});wo({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>_o(()=>import("./freemarker2-BNznXqn-.js"),__vite__mapDeps([0,1,2])).then(c=>c.TagAutoInterpolationDollar)});wo({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>_o(()=>import("./freemarker2-BNznXqn-.js"),__vite__mapDeps([0,1,2])).then(c=>c.TagAngleInterpolationDollar)});wo({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>_o(()=>import("./freemarker2-BNznXqn-.js"),__vite__mapDeps([0,1,2])).then(c=>c.TagBracketInterpolationDollar)});wo({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>_o(()=>import("./freemarker2-BNznXqn-.js"),__vite__mapDeps([0,1,2])).then(c=>c.TagAngleInterpolationBracket)});wo({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>_o(()=>import("./freemarker2-BNznXqn-.js"),__vite__mapDeps([0,1,2])).then(c=>c.TagBracketInterpolationBracket)});wo({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>_o(()=>import("./freemarker2-BNznXqn-.js"),__vite__mapDeps([0,1,2])).then(c=>c.TagAutoInterpolationDollar)});wo({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>_o(()=>import("./freemarker2-BNznXqn-.js"),__vite__mapDeps([0,1,2])).then(c=>c.TagAutoInterpolationBracket)});wo({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>_o(()=>import("./go-CyVeKkvQ.js"),[])});wo({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>_o(()=>import("./graphql-BygKL3ZF.js"),[])});wo({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>_o(()=>import("./handlebars-BeFNmT0z.js"),__vite__mapDeps([3,1,2]))});wo({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>_o(()=>import("./hcl-D_OY6ada.js"),[])});wo({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>_o(()=>import("./html-DWqM5c3Y.js"),__vite__mapDeps([4,1,2]))});wo({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>_o(()=>import("./ini-BTpWsGps.js"),[])});wo({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>_o(()=>import("./java-3TATJI7h.js"),[])});wo({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>_o(()=>import("./javascript-zZ_6YuDS.js"),__vite__mapDeps([5,6,1,2]))});wo({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>_o(()=>import("./julia-DDpSJMW6.js"),[])});wo({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>_o(()=>import("./kotlin-DVYH6Lj_.js"),[])});wo({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>_o(()=>import("./less-CuFlys0T.js"),[])});wo({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>_o(()=>import("./lexon-m09vb5r-.js"),[])});wo({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>_o(()=>import("./lua-D2Z7JJdl.js"),[])});wo({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>_o(()=>import("./liquid-QuN8kA_y.js"),__vite__mapDeps([7,1,2]))});wo({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>_o(()=>import("./m3-B2Cf9XSq.js"),[])});wo({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>_o(()=>import("./markdown-BXYnMxBe.js"),[])});wo({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>_o(()=>import("./mdx-DiM9yg6c.js"),__vite__mapDeps([8,1,2]))});wo({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>_o(()=>import("./mips-Ckkbw-AO.js"),[])});wo({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>_o(()=>import("./msdax-B5uW3Zvf.js"),[])});wo({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>_o(()=>import("./mysql-B8ssZoUh.js"),[])});wo({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>_o(()=>import("./objective-c-CrrKwR0a.js"),[])});wo({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>_o(()=>import("./pascal-BWBTHuhh.js"),[])});wo({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>_o(()=>import("./pascaligo-BGLI1Hdo.js"),[])});wo({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>_o(()=>import("./perl-DDrv2Hr-.js"),[])});wo({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>_o(()=>import("./pgsql-DLPipH_Q.js"),[])});wo({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>_o(()=>import("./php-CTNlIIiR.js"),[])});wo({id:"pla",extensions:[".pla"],loader:()=>_o(()=>import("./pla-2oJWbEOo.js"),[])});wo({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>_o(()=>import("./postiats-DOk3G3cc.js"),[])});wo({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>_o(()=>import("./powerquery-Dgyr3wWZ.js"),[])});wo({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>_o(()=>import("./powershell-B_i9asfM.js"),[])});wo({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>_o(()=>import("./protobuf-CV9EbfTh.js"),[])});wo({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>_o(()=>import("./pug-CCBS_C5_.js"),[])});wo({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>_o(()=>import("./python-XZUT-zMz.js"),__vite__mapDeps([9,1,2]))});wo({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>_o(()=>import("./qsharp-BLuZWbUW.js"),[])});wo({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>_o(()=>import("./r-CzF1MCbP.js"),[])});wo({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>_o(()=>import("./razor-B-LsaI92.js"),__vite__mapDeps([10,1,2]))});wo({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>_o(()=>import("./redis-C75U4IDy.js"),[])});wo({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>_o(()=>import("./redshift-Bc5xkKR1.js"),[])});wo({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>_o(()=>import("./restructuredtext-DmdQbaLT.js"),[])});wo({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>_o(()=>import("./ruby-DB0RB20n.js"),[])});wo({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>_o(()=>import("./rust-UMmp-gVE.js"),[])});wo({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>_o(()=>import("./sb-DVG02705.js"),[])});wo({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>_o(()=>import("./scala-DvSxYeG4.js"),[])});wo({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>_o(()=>import("./scheme-yf5bffbF.js"),[])});wo({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>_o(()=>import("./scss-Bzb7OGdO.js"),[])});wo({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>_o(()=>import("./shell-FNqbgIOG.js"),[])});wo({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>_o(()=>import("./solidity-DyKutqhl.js"),[])});wo({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>_o(()=>import("./sophia-B4VqtPa2.js"),[])});wo({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>_o(()=>import("./sparql-B7alP455.js"),[])});wo({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>_o(()=>import("./sql-D7lU1fdU.js"),[])});wo({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>_o(()=>import("./st-VuadG5SK.js"),[])});wo({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>_o(()=>import("./swift-BYtUz8ZP.js"),[])});wo({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>_o(()=>import("./systemverilog-DOAuugfS.js"),[])});wo({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>_o(()=>import("./systemverilog-DOAuugfS.js"),[])});wo({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>_o(()=>import("./tcl-CXKOl_mN.js"),[])});wo({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>_o(()=>import("./twig-D9yiNO04.js"),[])});wo({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>_o(()=>import("./typescript-B4jGL9um.js"),__vite__mapDeps([6,1,2]))});wo({id:"typespec",extensions:[".tsp"],aliases:["TypeSpec"],loader:()=>_o(()=>import("./typespec-BupSXVCO.js"),[])});wo({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>_o(()=>import("./vb-ZlaFEk-P.js"),[])});wo({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>_o(()=>import("./wgsl-B-lZjTdr.js"),[])});wo({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\_o(()=>import("./xml-C1Slvu_M.js"),__vite__mapDeps([11,1,2]))});wo({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>_o(()=>import("./yaml-CGCNEPCO.js"),__vite__mapDeps([12,1,2]))});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var wSi=Object.defineProperty,xSi=Object.getOwnPropertyDescriptor,kSi=Object.getOwnPropertyNames,TSi=Object.prototype.hasOwnProperty,DSi=(c,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of kSi(e))!TSi.call(c,s)&&s!==i&&wSi(c,s,{get:()=>e[s],enumerable:!(n=xSi(e,s))||n.enumerable});return c},ESi=(c,e,i)=>(DSi(c,e,"default"),i),Qq={};ESi(Qq,Gne);var Vze=class{constructor(e,i,n){this._onDidChange=new Qq.Emitter,this._languageId=e,this.setOptions(i),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},Hze={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},jze={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},Xkt=new Vze("css",Hze,jze),Zkt=new Vze("scss",Hze,jze),Ykt=new Vze("less",Hze,jze);Qq.languages.css={cssDefaults:Xkt,lessDefaults:Ykt,scssDefaults:Zkt};function zze(){return _o(()=>import("./cssMode-C9lpIxAQ.js"),__vite__mapDeps([13,1,2]))}Qq.languages.onLanguage("less",()=>{zze().then(c=>c.setupMode(Ykt))});Qq.languages.onLanguage("scss",()=>{zze().then(c=>c.setupMode(Zkt))});Qq.languages.onLanguage("css",()=>{zze().then(c=>c.setupMode(Xkt))});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var ISi=Object.defineProperty,NSi=Object.getOwnPropertyDescriptor,LSi=Object.getOwnPropertyNames,PSi=Object.prototype.hasOwnProperty,ASi=(c,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of LSi(e))!PSi.call(c,s)&&s!==i&&ISi(c,s,{get:()=>e[s],enumerable:!(n=NSi(e,s))||n.enumerable});return c},OSi=(c,e,i)=>(ASi(c,e,"default"),i),Xye={};OSi(Xye,Gne);var MSi=class{constructor(e,i,n){this._onDidChange=new Xye.Emitter,this._languageId=e,this.setOptions(i),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},RSi={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},Zye={format:RSi,suggest:{},data:{useDefaultDataProvider:!0}};function Yye(c){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:c===vte,documentFormattingEdits:c===vte,documentRangeFormattingEdits:c===vte}}var vte="html",D1t="handlebars",E1t="razor",e2t=ebe(vte,Zye,Yye(vte)),FSi=e2t.defaults,t2t=ebe(D1t,Zye,Yye(D1t)),BSi=t2t.defaults,i2t=ebe(E1t,Zye,Yye(E1t)),WSi=i2t.defaults;Xye.languages.html={htmlDefaults:FSi,razorDefaults:WSi,handlebarDefaults:BSi,htmlLanguageService:e2t,handlebarLanguageService:t2t,razorLanguageService:i2t,registerHTMLLanguageService:ebe};function VSi(){return _o(()=>import("./htmlMode-DWjPXI9q.js"),__vite__mapDeps([14,1,2]))}function ebe(c,e=Zye,i=Yye(c)){const n=new MSi(c,e,i);let s;const l=Xye.languages.onLanguage(c,async()=>{s=(await VSi()).setupMode(n)});return{defaults:n,dispose(){l.dispose(),s==null||s.dispose(),s=void 0}}}/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var HSi=Object.defineProperty,jSi=Object.getOwnPropertyDescriptor,zSi=Object.getOwnPropertyNames,USi=Object.prototype.hasOwnProperty,qSi=(c,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of zSi(e))!USi.call(c,s)&&s!==i&&HSi(c,s,{get:()=>e[s],enumerable:!(n=jSi(e,s))||n.enumerable});return c},$Si=(c,e,i)=>(qSi(c,e,"default"),i),Kne={};$Si(Kne,Gne);var JSi=class{constructor(e,i,n){this._onDidChange=new Kne.Emitter,this._languageId=e,this.setDiagnosticsOptions(i),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},GSi={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},KSi={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},n2t=new JSi("json",GSi,KSi),QSi=()=>r2t().then(c=>c.getWorker());Kne.languages.json={jsonDefaults:n2t,getWorker:QSi};function r2t(){return _o(()=>import("./jsonMode-ZHvbUFeD.js"),__vite__mapDeps([15,1,2]))}Kne.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});Kne.languages.onLanguage("json",()=>{r2t().then(c=>c.setupMode(n2t))});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var XSi=Object.defineProperty,ZSi=Object.getOwnPropertyDescriptor,YSi=Object.getOwnPropertyNames,ewi=Object.prototype.hasOwnProperty,twi=(c,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of YSi(e))!ewi.call(c,s)&&s!==i&&XSi(c,s,{get:()=>e[s],enumerable:!(n=ZSi(e,s))||n.enumerable});return c},iwi=(c,e,i)=>(twi(c,e,"default"),i),nwi="5.4.5",xq={};iwi(xq,Gne);var s2t=(c=>(c[c.None=0]="None",c[c.CommonJS=1]="CommonJS",c[c.AMD=2]="AMD",c[c.UMD=3]="UMD",c[c.System=4]="System",c[c.ES2015=5]="ES2015",c[c.ESNext=99]="ESNext",c))(s2t||{}),o2t=(c=>(c[c.None=0]="None",c[c.Preserve=1]="Preserve",c[c.React=2]="React",c[c.ReactNative=3]="ReactNative",c[c.ReactJSX=4]="ReactJSX",c[c.ReactJSXDev=5]="ReactJSXDev",c))(o2t||{}),a2t=(c=>(c[c.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",c[c.LineFeed=1]="LineFeed",c))(a2t||{}),l2t=(c=>(c[c.ES3=0]="ES3",c[c.ES5=1]="ES5",c[c.ES2015=2]="ES2015",c[c.ES2016=3]="ES2016",c[c.ES2017=4]="ES2017",c[c.ES2018=5]="ES2018",c[c.ES2019=6]="ES2019",c[c.ES2020=7]="ES2020",c[c.ESNext=99]="ESNext",c[c.JSON=100]="JSON",c[c.Latest=99]="Latest",c))(l2t||{}),c2t=(c=>(c[c.Classic=1]="Classic",c[c.NodeJs=2]="NodeJs",c))(c2t||{}),u2t=class{constructor(c,e,i,n,s){this._onDidChange=new xq.Emitter,this._onDidExtraLibsChange=new xq.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(c),this.setDiagnosticsOptions(e),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this.setModeConfiguration(s),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(c,e){let i;if(typeof e>"u"?i=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:i=e,this._extraLibs[i]&&this._extraLibs[i].content===c)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[i]&&(n=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(n=this._extraLibs[i].version+1),this._extraLibs[i]={content:c,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let s=this._extraLibs[i];s&&s.version===n&&(delete this._extraLibs[i],this._removedExtraLibs[i]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(c){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),c&&c.length>0)for(const e of c){const i=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=e.content;let s=1;this._removedExtraLibs[i]&&(s=this._removedExtraLibs[i]+1),this._extraLibs[i]={content:n,version:s}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(c){this._compilerOptions=c||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(c){this._diagnosticsOptions=c||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(c){this._workerOptions=c||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(c){this._inlayHintsOptions=c||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(c){}setEagerModelSync(c){this._eagerModelSync=c}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(c){this._modeConfiguration=c||Object.create(null),this._onDidChange.fire(void 0)}},rwi=nwi,d2t={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},f2t=new u2t({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},d2t),h2t=new u2t({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},d2t),swi=()=>tbe().then(c=>c.getTypeScriptWorker()),owi=()=>tbe().then(c=>c.getJavaScriptWorker());xq.languages.typescript={ModuleKind:s2t,JsxEmit:o2t,NewLineKind:a2t,ScriptTarget:l2t,ModuleResolutionKind:c2t,typescriptVersion:rwi,typescriptDefaults:f2t,javascriptDefaults:h2t,getTypeScriptWorker:swi,getJavaScriptWorker:owi};function tbe(){return _o(()=>import("./tsMode-CpBJDrta.js"),__vite__mapDeps([16,1,2]))}xq.languages.onLanguage("typescript",()=>tbe().then(c=>c.setupTypeScript(f2t)));xq.languages.onLanguage("javascript",()=>tbe().then(c=>c.setupJavaScript(h2t)));class awi extends Ny{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:xa("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),icon:Dr.map,toggled:xn.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:xn.has("isInDiffEditor"),menu:{when:xn.has("isInDiffEditor"),id:_t.EditorTitle,order:22,group:"navigation"}})}run(e,...i){const n=e.get(El),s=!n.getValue("diffEditor.hideUnchangedRegions.enabled");n.updateValue("diffEditor.hideUnchangedRegions.enabled",s)}}class _2t extends Ny{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:xa("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),precondition:xn.has("isInDiffEditor")})}run(e,...i){const n=e.get(El),s=!n.getValue("diffEditor.experimental.showMoves");n.updateValue("diffEditor.experimental.showMoves",s)}}class p2t extends Ny{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:xa("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),precondition:xn.has("isInDiffEditor")})}run(e,...i){const n=e.get(El),s=!n.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");n.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",s)}}const Qne=xa("diffEditor","Diff Editor");class lwi extends BE{constructor(){super({id:"diffEditor.switchSide",title:xa("switchSide","Switch Side"),icon:Dr.arrowSwap,precondition:xn.has("isInDiffEditor"),f1:!0,category:Qne})}runEditorCommand(e,i,n){const s=Zq(e);if(s instanceof Q4){if(n&&n.dryRun)return{destinationSelection:s.mapToOtherSide().destinationSelection};s.switchSide()}}}class cwi extends BE{constructor(){super({id:"diffEditor.exitCompareMove",title:xa("exitCompareMove","Exit Compare Move"),icon:Dr.close,precondition:Lt.comparingMovedCode,f1:!1,category:Qne,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,i,...n){const s=Zq(e);s instanceof Q4&&s.exitCompareMove()}}class uwi extends BE{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:xa("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),icon:Dr.fold,precondition:xn.has("isInDiffEditor"),f1:!0,category:Qne})}runEditorCommand(e,i,...n){const s=Zq(e);s instanceof Q4&&s.collapseAllUnchangedRegions()}}class dwi extends BE{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:xa("showAllUnchangedRegions","Show All Unchanged Regions"),icon:Dr.unfold,precondition:xn.has("isInDiffEditor"),f1:!0,category:Qne})}runEditorCommand(e,i,...n){const s=Zq(e);s instanceof Q4&&s.showAllUnchangedRegions()}}class yWe extends Ny{constructor(){super({id:"diffEditor.revert",title:xa("revert","Revert"),f1:!1,category:Qne})}run(e,i){var n;const s=fwi(e,i.originalUri,i.modifiedUri);s instanceof Q4&&s.revertRangeMappings((n=i.mapping.innerChanges)!==null&&n!==void 0?n:[])}}const g2t=xa("accessibleDiffViewer","Accessible Diff Viewer");class Xq extends Ny{constructor(){super({id:Xq.id,title:xa("editor.action.accessibleDiffViewer.next","Go to Next Difference"),category:g2t,precondition:xn.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const i=Zq(e);i==null||i.accessibleDiffViewerNext()}}Xq.id="editor.action.accessibleDiffViewer.next";class Xne extends Ny{constructor(){super({id:Xne.id,title:xa("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),category:g2t,precondition:xn.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const i=Zq(e);i==null||i.accessibleDiffViewerPrev()}}Xne.id="editor.action.accessibleDiffViewer.prev";function fwi(c,e,i){return c.get(Oc).listDiffEditors().find(l=>{var d,f;const g=l.getModifiedEditor(),y=l.getOriginalEditor();return g&&((d=g.getModel())===null||d===void 0?void 0:d.uri.toString())===i.toString()&&y&&((f=y.getModel())===null||f===void 0?void 0:f.uri.toString())===e.toString()})||null}function Zq(c){const i=c.get(Oc).listDiffEditors(),n=A0();if(n)for(const s of i){const l=s.getContainerDomNode();if(hwi(l,n))return s}return null}function hwi(c,e){let i=e;for(;i;){if(i===c)return!0;i=i.parentElement}return!1}Bd(awi);Bd(_2t);Bd(p2t);bm.appendMenuItem(_t.EditorTitle,{command:{id:new p2t().desc.id,title:V("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:xn.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:xn.has("isInDiffEditor")},order:11,group:"1_diff",when:xn.and(Lt.diffEditorRenderSideBySideInlineBreakpointReached,xn.has("isInDiffEditor"))});bm.appendMenuItem(_t.EditorTitle,{command:{id:new _2t().desc.id,title:V("showMoves","Show Moved Code Blocks"),icon:Dr.move,toggled:Vq.create("config.diffEditor.experimental.showMoves",!0),precondition:xn.has("isInDiffEditor")},order:10,group:"1_diff",when:xn.has("isInDiffEditor")});Bd(yWe);for(const c of[{icon:Dr.arrowRight,key:Lt.diffEditorInlineMode.toNegated()},{icon:Dr.discard,key:Lt.diffEditorInlineMode}])bm.appendMenuItem(_t.DiffEditorHunkToolbar,{command:{id:new yWe().desc.id,title:V("revertHunk","Revert Block"),icon:c.icon},when:xn.and(Lt.diffEditorModifiedWritable,c.key),order:5,group:"primary"}),bm.appendMenuItem(_t.DiffEditorSelectionToolbar,{command:{id:new yWe().desc.id,title:V("revertSelection","Revert Selection"),icon:c.icon},when:xn.and(Lt.diffEditorModifiedWritable,c.key),order:5,group:"primary"});Bd(lwi);Bd(cwi);Bd(uwi);Bd(dwi);bm.appendMenuItem(_t.EditorTitle,{command:{id:Xq.id,title:V("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:xn.has("isInDiffEditor")},order:10,group:"2_diff",when:xn.and(Lt.accessibleDiffViewerVisible.negate(),xn.has("isInDiffEditor"))});uc.registerCommandAlias("editor.action.diffReview.next",Xq.id);Bd(Xq);uc.registerCommandAlias("editor.action.diffReview.prev",Xne.id);Bd(Xne);var _wi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},pwi=function(c,e){return function(i,n){e(i,n,c)}},bWe;const ibe=new Xr("selectionAnchorSet",!1);let X4=bWe=class{static get(e){return e.getContribution(bWe.ID)}constructor(e,i){this.editor=e,this.selectionAnchorSetContextKey=ibe.bindTo(i),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(i=>{this.decorationId&&i.removeDecoration(this.decorationId),this.decorationId=i.addDecoration(Qs.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new vv().appendText(V("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),Eb(V("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const i=this.editor.getPosition();this.editor.setSelection(Qs.fromPositions(e.getStartPosition(),i)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(i=>{i.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};X4.ID="editor.contrib.selectionAnchorController";X4=bWe=_wi([pwi(1,Zo)],X4);class gwi extends ms{constructor(){super({id:"editor.action.setSelectionAnchor",label:V("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:Lt.editorTextFocus,primary:qp(2089,2080),weight:100}})}async run(e,i){var n;(n=X4.get(i))===null||n===void 0||n.setSelectionAnchor()}}class mwi extends ms{constructor(){super({id:"editor.action.goToSelectionAnchor",label:V("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:ibe})}async run(e,i){var n;(n=X4.get(i))===null||n===void 0||n.goToSelectionAnchor()}}class vwi extends ms{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:V("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:ibe,kbOpts:{kbExpr:Lt.editorTextFocus,primary:qp(2089,2089),weight:100}})}async run(e,i){var n;(n=X4.get(i))===null||n===void 0||n.selectFromAnchorToCursor()}}class ywi extends ms{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:V("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:ibe,kbOpts:{kbExpr:Lt.editorTextFocus,primary:9,weight:100}})}async run(e,i){var n;(n=X4.get(i))===null||n===void 0||n.cancelSelectionAnchor()}}Bc(X4.ID,X4,4);hr(gwi);hr(mwi);hr(vwi);hr(ywi);const bwi=Ft("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},V("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class Cwi extends ms{constructor(){super({id:"editor.action.jumpToBracket",label:V("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:Lt.editorTextFocus,primary:3165,weight:100}})}run(e,i){var n;(n=fT.get(i))===null||n===void 0||n.jumpToBracket()}}class Swi extends ms{constructor(){super({id:"editor.action.selectToBracket",label:V("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:xa("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,i,n){var s;let l=!0;n&&n.selectBrackets===!1&&(l=!1),(s=fT.get(i))===null||s===void 0||s.selectToBracket(l)}}class wwi extends ms{constructor(){super({id:"editor.action.removeBrackets",label:V("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:Lt.editorTextFocus,primary:2561,weight:100}})}run(e,i){var n;(n=fT.get(i))===null||n===void 0||n.removeBrackets(this.id)}}class xwi{constructor(e,i,n){this.position=e,this.brackets=i,this.options=n}}class fT extends Ii{static get(e){return e.getContribution(fT.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new id(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(72),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(i=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(i=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(i=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(i=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(i=>{i.hasChanged(72)&&(this._matchBrackets=this._editor.getOption(72),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),i=this._editor.getSelections().map(n=>{const s=n.getStartPosition(),l=e.bracketPairs.matchBracket(s);let d=null;if(l)l[0].containsPosition(s)&&!l[1].containsPosition(s)?d=l[1].getStartPosition():l[1].containsPosition(s)&&(d=l[0].getStartPosition());else{const f=e.bracketPairs.findEnclosingBrackets(s);if(f)d=f[1].getStartPosition();else{const g=e.bracketPairs.findNextBracket(s);g&&g.range&&(d=g.range.getStartPosition())}}return d?new Qs(d.lineNumber,d.column,d.lineNumber,d.column):new Qs(s.lineNumber,s.column,s.lineNumber,s.column)});this._editor.setSelections(i),this._editor.revealRange(i[0])}selectToBracket(e){if(!this._editor.hasModel())return;const i=this._editor.getModel(),n=[];this._editor.getSelections().forEach(s=>{const l=s.getStartPosition();let d=i.bracketPairs.matchBracket(l);if(!d&&(d=i.bracketPairs.findEnclosingBrackets(l),!d)){const y=i.bracketPairs.findNextBracket(l);y&&y.range&&(d=i.bracketPairs.matchBracket(y.range.getStartPosition()))}let f=null,g=null;if(d){d.sort(at.compareRangesUsingStarts);const[y,w]=d;if(f=e?y.getStartPosition():y.getEndPosition(),g=e?w.getEndPosition():w.getStartPosition(),w.containsPosition(l)){const x=f;f=g,g=x}}f&&g&&n.push(new Qs(f.lineNumber,f.column,g.lineNumber,g.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const i=this._editor.getModel();this._editor.getSelections().forEach(n=>{const s=n.getPosition();let l=i.bracketPairs.matchBracket(s);l||(l=i.bracketPairs.findEnclosingBrackets(s)),l&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:l[0],text:""},{range:l[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let i=0;for(const n of this._lastBracketsData){const s=n.brackets;s&&(e[i++]={range:s[0],options:n.options},e[i++]={range:s[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const i=this._editor.getModel(),n=i.getVersionId();let s=[];this._lastVersionId===n&&(s=this._lastBracketsData);const l=[];let d=0;for(let x=0,I=e.length;x1&&l.sort(yi.compare);const f=[];let g=0,y=0;const w=s.length;for(let x=0,I=l.length;x0&&(i.pushUndoStop(),i.executeCommands(this.id,s),i.pushUndoStop())}}hr(Ewi);const nbe=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let c;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?c=crypto.getRandomValues.bind(crypto):c=function(n){for(let s=0;sc,asFile:()=>{},value:typeof c=="string"?c:void 0}}function Iwi(c,e,i){const n={id:nbe(),name:c,uri:e,data:i};return{asString:async()=>"",asFile:()=>n,value:void 0}}class v2t{constructor(){this._entries=new Map}get size(){let e=0;for(const i of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const i=[...this._entries.keys()];return cc.some(this,([n,s])=>s.asFile())&&i.push("files"),b2t(r1e(e),i)}get(e){var i;return(i=this._entries.get(this.toKey(e)))===null||i===void 0?void 0:i[0]}append(e,i){const n=this._entries.get(e);n?n.push(i):this._entries.set(this.toKey(e),[i])}replace(e,i){this._entries.set(this.toKey(e),[i])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,i]of this._entries)for(const n of i)yield[e,n]}toKey(e){return r1e(e)}}function r1e(c){return c.toLowerCase()}function y2t(c,e){return b2t(r1e(c),e.map(r1e))}function b2t(c,e){if(c==="*/*")return e.length>0;if(e.includes(c))return!0;const i=c.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!i)return!1;const[n,s,l]=i;return l==="*"?e.some(d=>d.startsWith(s+"/")):!1}const rbe=Object.freeze({create:c=>z4(c.map(e=>e.toString())).join(`\r +`),split:c=>c.split(`\r +`),parse:c=>rbe.split(c).filter(e=>!e.startsWith("#"))});class td{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+td.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new td((this.value?[this.value,...e]:e).join(td.sep))}}td.sep=".";td.None=new td("@@none@@");td.Empty=new td("");const I1t={EDITORS:"CodeEditors",FILES:"CodeFiles"};class Nwi{}const Lwi={DragAndDropContribution:"workbench.contributions.dragAndDrop"};dh.add(Lwi.DragAndDropContribution,new Nwi);class Rie{constructor(){}static getInstance(){return Rie.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}Rie.INSTANCE=new Rie;function C2t(c){const e=new v2t;for(const i of c.items){const n=i.type;if(i.kind==="string"){const s=new Promise(l=>i.getAsString(l));e.append(n,Uze(s))}else if(i.kind==="file"){const s=i.getAsFile();s&&e.append(n,Pwi(s))}}return e}function Pwi(c){const e=c.path?Oo.parse(c.path):void 0;return Iwi(c.name,e,async()=>new Uint8Array(await c.arrayBuffer()))}const Awi=Object.freeze([I1t.EDITORS,I1t.FILES,mie.RESOURCES,mie.INTERNAL_URI_LIST]);function S2t(c,e=!1){const i=C2t(c),n=i.get(mie.INTERNAL_URI_LIST);if(n)i.replace(i_.uriList,n);else if(e||!i.has(i_.uriList)){const s=[];for(const l of c.items){const d=l.getAsFile();if(d){const f=d.path;try{f?s.push(Oo.file(f).toString()):s.push(Oo.parse(d.name,!0).toString())}catch{}}}s.length&&i.replace(i_.uriList,Uze(rbe.create(s)))}for(const s of Awi)i.delete(s);return i}var qze=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Fie=function(c,e){return function(i,n){e(i,n,c)}};class $ze{async provideDocumentPasteEdits(e,i,n,s,l){const d=await this.getEdit(n,l);if(d)return{dispose(){},edits:[{insertText:d.insertText,title:d.title,kind:d.kind,handledMimeType:d.handledMimeType,yieldTo:d.yieldTo}]}}async provideDocumentDropEdits(e,i,n,s){const l=await this.getEdit(n,s);return l?[{insertText:l.insertText,title:l.title,kind:l.kind,handledMimeType:l.handledMimeType,yieldTo:l.yieldTo}]:void 0}}class Z4 extends $ze{constructor(){super(...arguments),this.kind=Z4.kind,this.dropMimeTypes=[i_.text],this.pasteMimeTypes=[i_.text]}async getEdit(e,i){const n=e.get(i_.text);if(!n||e.has(i_.uriList))return;const s=await n.asString();return{handledMimeType:i_.text,title:V("text.label","Insert Plain Text"),insertText:s,kind:this.kind}}}Z4.id="text";Z4.kind=new td("text.plain");class w2t extends $ze{constructor(){super(...arguments),this.kind=new td("uri.absolute"),this.dropMimeTypes=[i_.uriList],this.pasteMimeTypes=[i_.uriList]}async getEdit(e,i){const n=await x2t(e);if(!n.length||i.isCancellationRequested)return;let s=0;const l=n.map(({uri:f,originalText:g})=>f.scheme===wa.file?f.fsPath:(s++,g)).join(" ");let d;return s>0?d=n.length>1?V("defaultDropProvider.uriList.uris","Insert Uris"):V("defaultDropProvider.uriList.uri","Insert Uri"):d=n.length>1?V("defaultDropProvider.uriList.paths","Insert Paths"):V("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:i_.uriList,insertText:l,title:d,kind:this.kind}}}let s1e=class extends $ze{constructor(e){super(),this._workspaceContextService=e,this.kind=new td("uri.relative"),this.dropMimeTypes=[i_.uriList],this.pasteMimeTypes=[i_.uriList]}async getEdit(e,i){const n=await x2t(e);if(!n.length||i.isCancellationRequested)return;const s=kE(n.map(({uri:l})=>{const d=this._workspaceContextService.getWorkspaceFolder(l);return d?Xfi(d.uri,l):void 0}));if(s.length)return{handledMimeType:i_.uriList,insertText:s.join(" "),title:n.length>1?V("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):V("defaultDropProvider.uriList.relativePath","Insert Relative Path"),kind:this.kind}}};s1e=qze([Fie(0,T9)],s1e);class Owi{constructor(){this.kind=new td("html"),this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:i_.text}]}async provideDocumentPasteEdits(e,i,n,s,l){var d;if(s.triggerKind!==Ote.PasteAs&&!(!((d=s.only)===null||d===void 0)&&d.contains(this.kind)))return;const f=n.get("text/html"),g=await(f==null?void 0:f.asString());if(!(!g||l.isCancellationRequested))return{dispose(){},edits:[{insertText:g,yieldTo:this._yieldTo,title:V("pasteHtmlLabel","Insert HTML"),kind:this.kind}]}}}async function x2t(c){const e=c.get(i_.uriList);if(!e)return[];const i=await e.asString(),n=[];for(const s of rbe.parse(i))try{n.push({uri:Oo.parse(s),originalText:s})}catch{}return n}let CWe=class extends Ii{constructor(e,i){super(),this._register(e.documentDropEditProvider.register("*",new Z4)),this._register(e.documentDropEditProvider.register("*",new w2t)),this._register(e.documentDropEditProvider.register("*",new s1e(i)))}};CWe=qze([Fie(0,js),Fie(1,T9)],CWe);let SWe=class extends Ii{constructor(e,i){super(),this._register(e.documentPasteEditProvider.register("*",new Z4)),this._register(e.documentPasteEditProvider.register("*",new w2t)),this._register(e.documentPasteEditProvider.register("*",new s1e(i))),this._register(e.documentPasteEditProvider.register("*",new Owi))}};SWe=qze([Fie(0,js),Fie(1,T9)],SWe);class Y2{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let i=0,n=this.value.charCodeAt(e),s;if(s=Y2._table[n],typeof s=="number")return this.pos+=1,{type:s,pos:e,len:1};if(Y2.isDigitCharacter(n)){s=8;do i+=1,n=this.value.charCodeAt(e+i);while(Y2.isDigitCharacter(n));return this.pos+=i,{type:s,pos:e,len:i}}if(Y2.isVariableCharacter(n)){s=9;do n=this.value.charCodeAt(e+ ++i);while(Y2.isVariableCharacter(n)||Y2.isDigitCharacter(n));return this.pos+=i,{type:s,pos:e,len:i}}s=10;do i+=1,n=this.value.charCodeAt(e+i);while(!isNaN(n)&&typeof Y2._table[n]>"u"&&!Y2.isDigitCharacter(n)&&!Y2.isVariableCharacter(n));return this.pos+=i,{type:s,pos:e,len:i}}}Y2._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class Yq{constructor(){this._children=[]}appendChild(e){return e instanceof gy&&this._children[this._children.length-1]instanceof gy?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,i){const{parent:n}=e,s=n.children.indexOf(e),l=n.children.slice(0);l.splice(s,1,...i),n._children=l,function d(f,g){for(const y of f)y.parent=g,d(y.children,y)}(i,n)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof Zne)return e;e=e.parent}}toString(){return this.children.reduce((e,i)=>e+i.toString(),"")}len(){return 0}}class gy extends Yq{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new gy(this.value)}}class k2t extends Yq{}class Gx extends k2t{static compareByIndex(e,i){return e.index===i.index?0:e.isFinalTabstop?1:i.isFinalTabstop||e.indexi.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof e$?this._children[0]:void 0}clone(){const e=new Gx(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(i=>i.clone()),e}}class e$ extends Yq{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof gy&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new e$;return this.options.forEach(e.appendChild,e),e}}class Jze extends Yq{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const i=this;let n=!1,s=e.replace(this.regexp,function(){return n=!0,i._replace(Array.prototype.slice.call(arguments,0,-2))});return!n&&this._children.some(l=>l instanceof rE&&!!l.elseValue)&&(s=this._replace([])),s}_replace(e){let i="";for(const n of this._children)if(n instanceof rE){let s=e[n.index]||"";s=n.resolve(s),i+=s}else i+=n.toString();return i}toString(){return""}clone(){const e=new Jze;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(i=>i.clone()),e}}class rE extends Yq{constructor(e,i,n,s){super(),this.index=e,this.shorthandName=i,this.ifValue=n,this.elseValue=s}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const i=e.match(/[a-z0-9]+/gi);return i?i.map(n=>n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}_toCamelCase(e){const i=e.match(/[a-z0-9]+/gi);return i?i.map((n,s)=>s===0?n.charAt(0).toLowerCase()+n.substr(1):n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}clone(){return new rE(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class Bie extends k2t{constructor(e){super(),this.name=e}resolve(e){let i=e.resolve(this);return this.transform&&(i=this.transform.resolve(i||"")),i!==void 0?(this._children=[new gy(i)],!0):!1}clone(){const e=new Bie(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(i=>i.clone()),e}}function N1t(c,e){const i=[...c];for(;i.length>0;){const n=i.shift();if(!e(n))break;i.unshift(...n.children)}}class Zne extends Yq{get placeholderInfo(){if(!this._placeholders){const e=[];let i;this.walk(function(n){return n instanceof Gx&&(e.push(n),i=!i||i.indexs===e?(n=!0,!1):(i+=s.len(),!0)),n?i:-1}fullLen(e){let i=0;return N1t([e],n=>(i+=n.len(),!0)),i}enclosingPlaceholders(e){const i=[];let{parent:n}=e;for(;n;)n instanceof Gx&&i.push(n),n=n.parent;return i}resolveVariables(e){return this.walk(i=>(i instanceof Bie&&i.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,i){return this._placeholders=void 0,super.replace(e,i)}clone(){const e=new Zne;return this._children=this.children.map(i=>i.clone()),e}walk(e){N1t(this.children,e)}}class P9{constructor(){this._scanner=new Y2,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,i,n){const s=new Zne;return this.parseFragment(e,s),this.ensureFinalTabstop(s,n??!1,i??!1),s}parseFragment(e,i){const n=i.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(i););const s=new Map,l=[];i.walk(g=>(g instanceof Gx&&(g.isFinalTabstop?s.set(0,void 0):!s.has(g.index)&&g.children.length>0?s.set(g.index,g.children):l.push(g)),!0));const d=(g,y)=>{const w=s.get(g.index);if(!w)return;const x=new Gx(g.index);x.transform=g.transform;for(const I of w){const P=I.clone();x.appendChild(P),P instanceof Gx&&s.has(P.index)&&!y.has(P.index)&&(y.add(P.index),d(P,y),y.delete(P.index))}i.replace(g,[x])},f=new Set;for(const g of l)d(g,f);return i.children.slice(n)}ensureFinalTabstop(e,i,n){(i||n&&e.placeholders.length>0)&&(e.placeholders.find(l=>l.index===0)||e.appendChild(new Gx(0)))}_accept(e,i){if(e===void 0||this._token.type===e){const n=i?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),n}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const i=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const s=this._scanner.next();if(s.type!==0&&s.type!==4&&s.type!==5)return!1}this._token=this._scanner.next()}const n=this._scanner.value.substring(i.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),n}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let i;return(i=this._accept(5,!0))?(i=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||i,e.appendChild(new gy(i)),!0):!1}_parseTabstopOrVariableName(e){let i;const n=this._token;return this._accept(0)&&(i=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(i)?new Gx(Number(i)):new Bie(i)),!0):this._backTo(n)}_parseComplexPlaceholder(e){let i;const n=this._token;if(!(this._accept(0)&&this._accept(3)&&(i=this._accept(8,!0))))return this._backTo(n);const l=new Gx(Number(i));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(l),!0;if(!this._parse(l))return e.appendChild(new gy("${"+i+":")),l.children.forEach(e.appendChild,e),!0}else if(l.index>0&&this._accept(7)){const d=new e$;for(;;){if(this._parseChoiceElement(d)){if(this._accept(2))continue;if(this._accept(7)&&(l.appendChild(d),this._accept(4)))return e.appendChild(l),!0}return this._backTo(n),!1}}else return this._accept(6)?this._parseTransform(l)?(e.appendChild(l),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(l),!0):this._backTo(n)}_parseChoiceElement(e){const i=this._token,n=[];for(;!(this._token.type===2||this._token.type===7);){let s;if((s=this._accept(5,!0))?s=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||s:s=this._accept(void 0,!0),!s)return this._backTo(i),!1;n.push(s)}return n.length===0?(this._backTo(i),!1):(e.appendChild(new gy(n.join(""))),!0)}_parseComplexVariable(e){let i;const n=this._token;if(!(this._accept(0)&&this._accept(3)&&(i=this._accept(9,!0))))return this._backTo(n);const l=new Bie(i);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(l),!0;if(!this._parse(l))return e.appendChild(new gy("${"+i+":")),l.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(l)?(e.appendChild(l),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(l),!0):this._backTo(n)}_parseTransform(e){const i=new Jze;let n="",s="";for(;!this._accept(6);){let l;if(l=this._accept(5,!0)){l=this._accept(6,!0)||l,n+=l;continue}if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let l;if(l=this._accept(5,!0)){l=this._accept(5,!0)||this._accept(6,!0)||l,i.appendChild(new gy(l));continue}if(!(this._parseFormatString(i)||this._parseAnything(i)))return!1}for(;!this._accept(4);){if(this._token.type!==14){s+=this._accept(void 0,!0);continue}return!1}try{i.regexp=new RegExp(n,s)}catch{return!1}return e.transform=i,!0}_parseFormatString(e){const i=this._token;if(!this._accept(0))return!1;let n=!1;this._accept(3)&&(n=!0);const s=this._accept(8,!0);if(s)if(n){if(this._accept(4))return e.appendChild(new rE(Number(s))),!0;if(!this._accept(1))return this._backTo(i),!1}else return e.appendChild(new rE(Number(s))),!0;else return this._backTo(i),!1;if(this._accept(6)){const l=this._accept(9,!0);return!l||!this._accept(4)?(this._backTo(i),!1):(e.appendChild(new rE(Number(s),l)),!0)}else if(this._accept(11)){const l=this._until(4);if(l)return e.appendChild(new rE(Number(s),void 0,l,void 0)),!0}else if(this._accept(12)){const l=this._until(4);if(l)return e.appendChild(new rE(Number(s),void 0,void 0,l)),!0}else if(this._accept(13)){const l=this._until(1);if(l){const d=this._until(4);if(d)return e.appendChild(new rE(Number(s),void 0,l,d)),!0}}else{const l=this._until(4);if(l)return e.appendChild(new rE(Number(s),void 0,void 0,l)),!0}return this._backTo(i),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new gy(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}function T2t(c,e,i){var n,s,l,d;return(typeof i.insertText=="string"?i.insertText==="":i.insertText.snippet==="")?{edits:(s=(n=i.additionalEdit)===null||n===void 0?void 0:n.edits)!==null&&s!==void 0?s:[]}:{edits:[...e.map(f=>new zM(c,{range:f,text:typeof i.insertText=="string"?P9.escape(i.insertText)+"$0":i.insertText.snippet,insertAsSnippet:!0})),...(d=(l=i.additionalEdit)===null||l===void 0?void 0:l.edits)!==null&&d!==void 0?d:[]]}}function D2t(c){var e;function i(f,g){return"mimeType"in f?f.mimeType===g.handledMimeType:!!g.kind&&f.kind.contains(g.kind)}const n=new Map;for(const f of c)for(const g of(e=f.yieldTo)!==null&&e!==void 0?e:[])for(const y of c)if(y!==f&&i(g,y)){let w=n.get(f);w||(w=[],n.set(f,w)),w.push(y)}if(!n.size)return Array.from(c);const s=new Set,l=[];function d(f){if(!f.length)return[];const g=f[0];if(l.includes(g))return console.warn("Yield to cycle detected",g),f;if(s.has(g))return d(f.slice(1));let y=[];const w=n.get(g);return w&&(l.push(g),y=d(w),l.pop()),s.add(g),[...y,g,...d(f.slice(1))]}return d(Array.from(c))}var Mwi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Rwi=function(c,e){return function(i,n){e(i,n,c)}};const Fwi=Xa.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:eCt,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class sbe extends Ii{constructor(e,i,n,s,l){super(),this.typeId=e,this.editor=i,this.range=n,this.delegate=l,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(s),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=Sr(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const i=Sr("span.icon");this.domNode.append(i),i.classList.add(...Uo.asClassNameArray(Dr.loading),"codicon-modifier-spin");const n=()=>{const s=this.editor.getOption(67);this.domNode.style.height=`${s}px`,this.domNode.style.width=`${Math.ceil(.8*s)}px`};n(),this._register(this.editor.onDidChangeConfiguration(s=>{(s.hasChanged(52)||s.hasChanged(67))&&n()})),this._register(tn(this.domNode,yr.CLICK,s=>{this.delegate.cancel()}))}getId(){return sbe.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}}sbe.baseId="editor.widget.inlineProgressWidget";let o1e=class extends Ii{constructor(e,i,n){super(),this.id=e,this._editor=i,this._instantiationService=n,this._showDelay=500,this._showPromise=this._register(new jg),this._currentWidget=new jg,this._operationIdPool=0,this._currentDecorations=i.createDecorationsCollection()}async showWhile(e,i,n){const s=this._operationIdPool++;this._currentOperation=s,this.clear(),this._showPromise.value=tR(()=>{const l=at.fromPositions(e);this._currentDecorations.set([{range:l,options:Fwi}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(sbe,this.id,this._editor,l,i,n))},this._showDelay);try{return await n}finally{this._currentOperation===s&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};o1e=Mwi([Rwi(2,So)],o1e);var Bwi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},L1t=function(c,e){return function(i,n){e(i,n,c)}},f0e;let ky=f0e=class{static get(e){return e.getContribution(f0e.ID)}constructor(e,i,n){this._openerService=n,this._messageWidget=new jg,this._messageListeners=new On,this._mouseOverMessage=!1,this._editor=e,this._visible=f0e.MESSAGE_VISIBLE.bindTo(i)}dispose(){var e;(e=this._message)===null||e===void 0||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,i){Eb(xE(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=xE(e)?wye(e,{actionHandler:{callback:s=>{this.closeMessage(),eze(this._openerService,s,xE(e)?e.isTrusted:void 0)},disposables:this._messageListeners}}):void 0,this._messageWidget.value=new P1t(this._editor,i,typeof e=="string"?e:this._message.element),this._messageListeners.add(Mr.debounce(this._editor.onDidBlurEditorText,(s,l)=>l,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&Wg(A0(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(tn(this._messageWidget.value.getDomNode(),yr.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(tn(this._messageWidget.value.getDomNode(),yr.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let n;this._messageListeners.add(this._editor.onMouseMove(s=>{s.target.position&&(n?n.containsPosition(s.target.position)||this.closeMessage():n=new at(i.lineNumber-3,1,s.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(P1t.fadeOut(this._messageWidget.value))}};ky.ID="editor.contrib.messageController";ky.MESSAGE_VISIBLE=new Xr("messageVisible",!1,V("messageVisible","Whether the editor is currently showing an inline message"));ky=f0e=Bwi([L1t(1,Zo),L1t(2,KC)],ky);const Wwi=sg.bindToContribution(ky.get);qr(new Wwi({id:"leaveEditorMessage",precondition:ky.MESSAGE_VISIBLE,handler:c=>c.closeMessage(),kbOpts:{weight:130,primary:9}}));let P1t=class{static fadeOut(e){const i=()=>{e.dispose(),clearTimeout(n),e.getDomNode().removeEventListener("animationend",i)},n=setTimeout(i,110);return e.getDomNode().addEventListener("animationend",i),e.getDomNode().classList.add("fadeOut"),{dispose:i}}constructor(e,{lineNumber:i,column:n},s){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(i,i,0),this._position={lineNumber:i,column:n},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const l=document.createElement("div");l.classList.add("anchor","top"),this._domNode.appendChild(l);const d=document.createElement("div");typeof s=="string"?(d.classList.add("message"),d.textContent=s):(s.classList.add("message"),d.appendChild(s)),this._domNode.appendChild(d);const f=document.createElement("div");f.classList.add("anchor","below"),this._domNode.appendChild(f),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};Bc(ky.ID,ky,4);function Z7e(c,e){return e&&(c.stack||c.stacktrace)?V("stackTrace.format","{0}: {1}",O1t(c),A1t(c.stack)||A1t(c.stacktrace)):O1t(c)}function A1t(c){return Array.isArray(c)?c.join(` +`):c}function O1t(c){return c.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${c.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof c.code=="string"&&typeof c.errno=="number"&&typeof c.syscall=="string"?V("nodeExceptionMessage","A system error occurred ({0})",c.message):c.message||V("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function a1e(c=null,e=!1){if(!c)return V("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(c)){const i=kE(c),n=a1e(i[0],e);return i.length>1?V("error.moreErrors","{0} ({1} errors in total)",n,i.length):n}if(xy(c))return c;if(c.detail){const i=c.detail;if(i.error)return Z7e(i.error,e);if(i.exception)return Z7e(i.exception,e)}return c.stack?Z7e(c,e):c.message?c.message:V("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var E2t=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},HU=function(c,e){return function(i,n){e(i,n,c)}},wWe;let l1e=wWe=class extends Ii{constructor(e,i,n,s,l,d,f,g,y,w){super(),this.typeId=e,this.editor=i,this.showCommand=s,this.range=l,this.edits=d,this.onSelectNewEdit=f,this._contextMenuService=g,this._keybindingService=w,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=n.bindTo(y),this.visibleContext.set(!0),this._register(go(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(go(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(x=>{l.containsPosition(x.position)||this.dispose()})),this._register(Mr.runAndSubscribe(w.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var e;const i=(e=this._keybindingService.lookupKeybinding(this.showCommand.id))===null||e===void 0?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(i?` (${i})`:"")}create(){this.domNode=Sr(".post-edit-widget"),this.button=this._register(new Ove(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(tn(this.domNode,yr.CLICK,()=>this.showSelector()))}getId(){return wWe.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=Y_(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,i)=>i9({id:"",label:e.title,checked:i===this.edits.activeEditIndex,run:()=>{if(i!==this.edits.activeEditIndex)return this.onSelectNewEdit(i)}}))})}};l1e.baseId="editor.widget.postEditWidget";l1e=wWe=E2t([HU(7,GC),HU(8,Zo),HU(9,ou)],l1e);let c1e=class extends Ii{constructor(e,i,n,s,l,d,f){super(),this._id=e,this._editor=i,this._visibleContext=n,this._showCommand=s,this._instantiationService=l,this._bulkEditService=d,this._notificationService=f,this._currentWidget=this._register(new jg),this._register(Mr.any(i.onDidChangeModel,i.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(e,i,n,s,l){const d=this._editor.getModel();if(!d||!e.length)return;const f=i.allEdits.at(i.activeEditIndex);if(!f)return;const g=async X=>{const Z=this._editor.getModel();Z&&(await Z.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:X,allEdits:i.allEdits},n,s,l))},y=(X,Z)=>{pT(X)||(this._notificationService.error(Z),n&&this.show(e[0],i,g))};let w;try{w=await s(f,l)}catch(X){return y(X,V("resolveError",`Error resolving edit '{0}': +{1}`,f.title,a1e(X)))}if(l.isCancellationRequested)return;const x=T2t(d.uri,e,w),I=e[0],P=d.deltaDecorations([],[{range:I,options:{description:"paste-line-suffix",stickiness:0}}]);this._editor.focus();let O,W;try{O=await this._bulkEditService.apply(x,{editor:this._editor,token:l}),W=d.getDecorationRange(P[0])}catch(X){return y(X,V("applyError",`Error applying edit '{0}': +{1}`,f.title,a1e(X)))}finally{d.deltaDecorations(P,[])}l.isCancellationRequested||n&&O.isApplied&&i.allEdits.length>1&&this.show(W??I,i,g)}show(e,i,n){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(l1e,this._id,this._editor,this._visibleContext,this._showCommand,e,i,n))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;(e=this._currentWidget.value)===null||e===void 0||e.showSelector()}};c1e=E2t([HU(4,So),HU(5,Fne),HU(6,L_)],c1e);var Vwi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Tz=function(c,e){return function(i,n){e(i,n,c)}},N5;const I2t="editor.changePasteType",Gze=new Xr("pasteWidgetVisible",!1,V("pasteWidgetVisible","Whether the paste widget is showing")),Y7e="application/vnd.code.copyMetadata";let CL=N5=class extends Ii{static get(e){return e.getContribution(N5.ID)}constructor(e,i,n,s,l,d,f){super(),this._bulkEditService=n,this._clipboardService=s,this._languageFeaturesService=l,this._quickInputService=d,this._progressService=f,this._editor=e;const g=e.getContainerDomNode();this._register(tn(g,"copy",y=>this.handleCopy(y))),this._register(tn(g,"cut",y=>this.handleCopy(y))),this._register(tn(g,"paste",y=>this.handlePaste(y),!0)),this._pasteProgressManager=this._register(new o1e("pasteIntoEditor",e,i)),this._postPasteWidgetManager=this._register(i.createInstance(c1e,"pasteIntoEditor",e,Gze,{id:I2t,label:V("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferred:e},Wq().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}clearWidgets(){this._postPasteWidgetManager.clear()}isPasteAsEnabled(){return this._editor.getOption(85).enabled&&!this._editor.getOption(91)}async finishedPaste(){await this._currentPasteOperation}handleCopy(e){var i,n;if(!this._editor.hasTextFocus()||(xR&&this._clipboardService.writeResources([]),!e.clipboardData||!this.isPasteAsEnabled()))return;const s=this._editor.getModel(),l=this._editor.getSelections();if(!s||!(l!=null&&l.length))return;const d=this._editor.getOption(37);let f=l;const g=l.length===1&&l[0].isEmpty();if(g){if(!d)return;f=[new at(f[0].startLineNumber,1,f[0].startLineNumber,1+s.getLineLength(f[0].startLineNumber))]}const y=(i=this._editor._getViewModel())===null||i===void 0?void 0:i.getPlainTextToCopy(l,d,M0),x={multicursorText:Array.isArray(y)?y:null,pasteOnNewLine:g,mode:null},I=this._languageFeaturesService.documentPasteEditProvider.ordered(s).filter(Z=>!!Z.prepareDocumentPaste);if(!I.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:x});return}const P=C2t(e.clipboardData),O=I.flatMap(Z=>{var ee;return(ee=Z.copyMimeTypes)!==null&&ee!==void 0?ee:[]}),W=nbe();this.setCopyMetadata(e.clipboardData,{id:W,providerCopyMimeTypes:O,defaultPastePayload:x});const X=Hg(async Z=>{const ee=kE(await Promise.all(I.map(async he=>{try{return await he.prepareDocumentPaste(s,f,P,Z)}catch(we){console.error(we);return}})));ee.reverse();for(const he of ee)for(const[we,Te]of he)P.replace(we,Te);return P});(n=N5._currentCopyOperation)===null||n===void 0||n.dataTransferPromise.cancel(),N5._currentCopyOperation={handle:W,dataTransferPromise:X}}async handlePaste(e){var i,n,s,l;if(!e.clipboardData||!this._editor.hasTextFocus())return;(i=ky.get(this._editor))===null||i===void 0||i.closeMessage(),(n=this._currentPasteOperation)===null||n===void 0||n.cancel(),this._currentPasteOperation=void 0;const d=this._editor.getModel(),f=this._editor.getSelections();if(!(f!=null&&f.length)||!d||!this.isPasteAsEnabled()&&!this._pasteAsActionContext)return;const g=this.fetchCopyMetadata(e),y=S2t(e.clipboardData);y.delete(Y7e);const w=[...e.clipboardData.types,...(s=g==null?void 0:g.providerCopyMimeTypes)!==null&&s!==void 0?s:[],i_.uriList],x=this._languageFeaturesService.documentPasteEditProvider.ordered(d).filter(I=>{var P,O;const W=(P=this._pasteAsActionContext)===null||P===void 0?void 0:P.preferred;return W&&I.providedPasteEditKinds&&!this.providerMatchesPreference(I,W)?!1:(O=I.pasteMimeTypes)===null||O===void 0?void 0:O.some(X=>y2t(X,w))});if(!x.length){!((l=this._pasteAsActionContext)===null||l===void 0)&&l.preferred&&this.showPasteAsNoEditMessage(f,this._pasteAsActionContext.preferred);return}e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferred,x,f,y,g):this.doPasteInline(x,f,y,g,e)}showPasteAsNoEditMessage(e,i){var n;(n=ky.get(this._editor))===null||n===void 0||n.showMessage(V("pasteAsError","No paste edits for '{0}' found",i instanceof td?i.value:i.providerId),e[0].getStartPosition())}doPasteInline(e,i,n,s,l){const d=Hg(async f=>{const g=this._editor;if(!g.hasModel())return;const y=g.getModel(),w=new dR(g,3,void 0,f);try{if(await this.mergeInDataFromCopy(n,s,w.token),w.token.isCancellationRequested)return;const x=e.filter(O=>this.isSupportedPasteProvider(O,n));if(!x.length||x.length===1&&x[0]instanceof Z4)return this.applyDefaultPasteHandler(n,s,w.token,l);const I={triggerKind:Ote.Automatic},P=await this.getPasteEdits(x,n,y,i,I,w.token);if(w.token.isCancellationRequested)return;if(P.length===1&&P[0].provider instanceof Z4)return this.applyDefaultPasteHandler(n,s,w.token,l);if(P.length){const O=g.getOption(85).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(i,{activeEditIndex:0,allEdits:P},O,async(W,X)=>{var Z,ee;const he=await((ee=(Z=W.provider).resolveDocumentPasteEdit)===null||ee===void 0?void 0:ee.call(Z,W,X));return he&&(W.additionalEdit=he.additionalEdit),W},w.token)}await this.applyDefaultPasteHandler(n,s,w.token,l)}finally{w.dispose(),this._currentPasteOperation===d&&(this._currentPasteOperation=void 0)}});this._pasteProgressManager.showWhile(i[0].getEndPosition(),V("pasteIntoEditorProgress","Running paste handlers. Click to cancel"),d),this._currentPasteOperation=d}showPasteAsPick(e,i,n,s,l){const d=Hg(async f=>{const g=this._editor;if(!g.hasModel())return;const y=g.getModel(),w=new dR(g,3,void 0,f);try{if(await this.mergeInDataFromCopy(s,l,w.token),w.token.isCancellationRequested)return;let x=i.filter(X=>this.isSupportedPasteProvider(X,s,e));e&&(x=x.filter(X=>this.providerMatchesPreference(X,e)));const I={triggerKind:Ote.PasteAs,only:e&&e instanceof td?e:void 0};let P=await this.getPasteEdits(x,s,y,n,I,w.token);if(w.token.isCancellationRequested)return;if(e&&(P=P.filter(X=>e instanceof td?e.contains(X.kind):e.providerId===X.provider.id)),!P.length){I.only&&this.showPasteAsNoEditMessage(n,I.only);return}let O;if(e)O=P.at(0);else{const X=await this._quickInputService.pick(P.map(Z=>{var ee;return{label:Z.title,description:(ee=Z.kind)===null||ee===void 0?void 0:ee.value,edit:Z}}),{placeHolder:V("pasteAsPickerPlaceholder","Select Paste Action")});O=X==null?void 0:X.edit}if(!O)return;const W=T2t(y.uri,n,O);await this._bulkEditService.apply(W,{editor:this._editor})}finally{w.dispose(),this._currentPasteOperation===d&&(this._currentPasteOperation=void 0)}});this._progressService.withProgress({location:10,title:V("pasteAsProgress","Running paste handlers")},()=>d)}setCopyMetadata(e,i){e.setData(Y7e,JSON.stringify(i))}fetchCopyMetadata(e){var i;if(!e.clipboardData)return;const n=e.clipboardData.getData(Y7e);if(n)try{return JSON.parse(n)}catch{return}const[s,l]=g9e.getTextData(e.clipboardData);if(l)return{defaultPastePayload:{mode:l.mode,multicursorText:(i=l.multicursorText)!==null&&i!==void 0?i:null,pasteOnNewLine:!!l.isFromEmptySelection}}}async mergeInDataFromCopy(e,i,n){var s;if(i!=null&&i.id&&((s=N5._currentCopyOperation)===null||s===void 0?void 0:s.handle)===i.id){const l=await N5._currentCopyOperation.dataTransferPromise;if(n.isCancellationRequested)return;for(const[d,f]of l)e.replace(d,f)}if(!e.has(i_.uriList)){const l=await this._clipboardService.readResources();if(n.isCancellationRequested)return;l.length&&e.append(i_.uriList,Uze(rbe.create(l)))}}async getPasteEdits(e,i,n,s,l,d){const f=await yne(Promise.all(e.map(async y=>{var w,x;try{const I=await((w=y.provideDocumentPasteEdits)===null||w===void 0?void 0:w.call(y,n,s,i,l,d));return(x=I==null?void 0:I.edits)===null||x===void 0?void 0:x.map(P=>({...P,provider:y}))}catch(I){console.error(I)}})),d),g=kE(f??[]).flat().filter(y=>!l.only||l.only.contains(y.kind));return D2t(g)}async applyDefaultPasteHandler(e,i,n,s){var l,d,f,g;const y=(l=e.get(i_.text))!==null&&l!==void 0?l:e.get("text"),w=(d=await(y==null?void 0:y.asString()))!==null&&d!==void 0?d:"";if(n.isCancellationRequested)return;const x={clipboardEvent:s,text:w,pasteOnNewLine:(f=i==null?void 0:i.defaultPastePayload.pasteOnNewLine)!==null&&f!==void 0?f:!1,multicursorText:(g=i==null?void 0:i.defaultPastePayload.multicursorText)!==null&&g!==void 0?g:null,mode:null};this._editor.trigger("keyboard","paste",x)}isSupportedPasteProvider(e,i,n){var s;return!((s=e.pasteMimeTypes)===null||s===void 0)&&s.some(l=>i.matches(l))?!n||this.providerMatchesPreference(e,n):!1}providerMatchesPreference(e,i){return i instanceof td?e.providedPasteEditKinds?e.providedPasteEditKinds.some(n=>i.contains(n)):!0:e.id===i.providerId}};CL.ID="editor.contrib.copyPasteActionController";CL=N5=Vwi([Tz(1,So),Tz(2,Fne),Tz(3,o6),Tz(4,js),Tz(5,pk),Tz(6,nxt)],CL);const A9="9_cutcopypaste",Hwi=mE||document.queryCommandSupported("cut"),N2t=mE||document.queryCommandSupported("copy"),jwi=typeof navigator.clipboard>"u"||ok?document.queryCommandSupported("paste"):!0;function Kze(c){return c.register(),c}const zwi=Hwi?Kze(new Hq({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:mE?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:_t.MenubarEditMenu,group:"2_ccp",title:V({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:_t.EditorContext,group:A9,title:V("actions.clipboard.cutLabel","Cut"),when:Lt.writable,order:1},{menuId:_t.CommandPalette,group:"",title:V("actions.clipboard.cutLabel","Cut"),order:1},{menuId:_t.SimpleEditorContext,group:A9,title:V("actions.clipboard.cutLabel","Cut"),when:Lt.writable,order:1}]})):void 0,Uwi=N2t?Kze(new Hq({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:mE?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:_t.MenubarEditMenu,group:"2_ccp",title:V({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:_t.EditorContext,group:A9,title:V("actions.clipboard.copyLabel","Copy"),order:2},{menuId:_t.CommandPalette,group:"",title:V("actions.clipboard.copyLabel","Copy"),order:1},{menuId:_t.SimpleEditorContext,group:A9,title:V("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;bm.appendMenuItem(_t.MenubarEditMenu,{submenu:_t.MenubarCopy,title:xa("copy as","Copy As"),group:"2_ccp",order:3});bm.appendMenuItem(_t.EditorContext,{submenu:_t.EditorContextCopy,title:xa("copy as","Copy As"),group:A9,order:3});bm.appendMenuItem(_t.EditorContext,{submenu:_t.EditorContextShare,title:xa("share","Share"),group:"11_share",order:-1,when:xn.and(xn.notEquals("resourceScheme","output"),Lt.editorTextFocus)});bm.appendMenuItem(_t.ExplorerContext,{submenu:_t.ExplorerContextShare,title:xa("share","Share"),group:"11_share",order:-1});const eFe=jwi?Kze(new Hq({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:mE?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:_t.MenubarEditMenu,group:"2_ccp",title:V({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:_t.EditorContext,group:A9,title:V("actions.clipboard.pasteLabel","Paste"),when:Lt.writable,order:4},{menuId:_t.CommandPalette,group:"",title:V("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:_t.SimpleEditorContext,group:A9,title:V("actions.clipboard.pasteLabel","Paste"),when:Lt.writable,order:4}]})):void 0;class qwi extends ms{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:V("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:Lt.textInputFocus,primary:0,weight:100}})}run(e,i){!i.hasModel()||!i.getOption(37)&&i.getSelection().isEmpty()||(_9e.forceCopyWithSyntaxHighlighting=!0,i.focus(),i.getContainerDomNode().ownerDocument.execCommand("copy"),_9e.forceCopyWithSyntaxHighlighting=!1)}}function L2t(c,e){c&&(c.addImplementation(1e4,"code-editor",(i,n)=>{const s=i.get(Oc).getFocusedCodeEditor();if(s&&s.hasTextFocus()){const l=s.getOption(37),d=s.getSelection();return d&&d.isEmpty()&&!l||s.getContainerDomNode().ownerDocument.execCommand(e),!0}return!1}),c.addImplementation(0,"generic-dom",(i,n)=>(Wq().execCommand(e),!0)))}L2t(zwi,"cut");L2t(Uwi,"copy");eFe&&(eFe.addImplementation(1e4,"code-editor",(c,e)=>{var i,n;const s=c.get(Oc),l=c.get(o6),d=s.getFocusedCodeEditor();return d&&d.hasTextFocus()?d.getContainerDomNode().ownerDocument.execCommand("paste")?(n=(i=CL.get(d))===null||i===void 0?void 0:i.finishedPaste())!==null&&n!==void 0?n:Promise.resolve():xR?(async()=>{const g=await l.readText();if(g!==""){const y=iie.INSTANCE.get(g);let w=!1,x=null,I=null;y&&(w=d.getOption(37)&&!!y.isFromEmptySelection,x=typeof y.multicursorText<"u"?y.multicursorText:null,I=y.mode),d.trigger("keyboard","paste",{text:g,pasteOnNewLine:w,multicursorText:x,mode:I})}})():!0:!1}),eFe.addImplementation(0,"generic-dom",(c,e)=>(Wq().execCommand("paste"),!0)));N2t&&hr(qwi);const yf=new class{constructor(){this.QuickFix=new td("quickfix"),this.Refactor=new td("refactor"),this.RefactorExtract=this.Refactor.append("extract"),this.RefactorInline=this.Refactor.append("inline"),this.RefactorMove=this.Refactor.append("move"),this.RefactorRewrite=this.Refactor.append("rewrite"),this.Notebook=new td("notebook"),this.Source=new td("source"),this.SourceOrganizeImports=this.Source.append("organizeImports"),this.SourceFixAll=this.Source.append("fixAll"),this.SurroundWith=this.Refactor.append("surround")}};var UC;(function(c){c.Refactor="refactor",c.RefactorPreview="refactor preview",c.Lightbulb="lightbulb",c.Default="other (default)",c.SourceAction="source action",c.QuickFix="quick fix action",c.FixAll="fix all",c.OrganizeImports="organize imports",c.AutoFix="auto fix",c.QuickFixHover="quick fix hover window",c.OnSave="save participants",c.ProblemsView="problems view"})(UC||(UC={}));function $wi(c,e){return!(c.include&&!c.include.intersects(e)||c.excludes&&c.excludes.some(i=>P2t(e,i,c.include))||!c.includeSourceActions&&yf.Source.contains(e))}function Jwi(c,e){const i=e.kind?new td(e.kind):void 0;return!(c.include&&(!i||!c.include.contains(i))||c.excludes&&i&&c.excludes.some(n=>P2t(i,n,c.include))||!c.includeSourceActions&&i&&yf.Source.contains(i)||c.onlyIncludePreferredActions&&!e.isPreferred)}function P2t(c,e,i){return!(!e.contains(c)||i&&e.contains(i))}class KN{static fromUser(e,i){return!e||typeof e!="object"?new KN(i.kind,i.apply,!1):new KN(KN.getKindFromUser(e,i.kind),KN.getApplyFromUser(e,i.apply),KN.getPreferredUser(e))}static getApplyFromUser(e,i){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return i}}static getKindFromUser(e,i){return typeof e.kind=="string"?new td(e.kind):i}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,i,n){this.kind=e,this.apply=i,this.preferred=n}}class Gwi{constructor(e,i,n){this.action=e,this.provider=i,this.highlightRange=n}async resolve(e){var i;if(!((i=this.provider)===null||i===void 0)&&i.resolveCodeAction&&!this.action.edit){let n;try{n=await this.provider.resolveCodeAction(this.action,e)}catch(s){r_(s)}n&&(this.action.edit=n.edit)}return this}}const A2t="editor.action.codeAction",Qze="editor.action.quickFix",O2t="editor.action.autoFix",M2t="editor.action.refactor",R2t="editor.action.sourceAction",Xze="editor.action.organizeImports",Zze="editor.action.fixAll";class yte extends Ii{static codeActionsPreferredComparator(e,i){return e.isPreferred&&!i.isPreferred?-1:!e.isPreferred&&i.isPreferred?1:0}static codeActionsComparator({action:e},{action:i}){return e.isAI&&!i.isAI?1:!e.isAI&&i.isAI?-1:bv(e.diagnostics)?bv(i.diagnostics)?yte.codeActionsPreferredComparator(e,i):-1:bv(i.diagnostics)?1:yte.codeActionsPreferredComparator(e,i)}constructor(e,i,n){super(),this.documentation=i,this._register(n),this.allActions=[...e].sort(yte.codeActionsComparator),this.validActions=this.allActions.filter(({action:s})=>!s.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&yf.QuickFix.contains(new td(e.kind))&&!!e.isPreferred)}get hasAIFix(){return this.validActions.some(({action:e})=>!!e.isAI)}get allAIFixes(){return this.validActions.every(({action:e})=>!!e.isAI)}}const M1t={actions:[],documentation:void 0};async function bte(c,e,i,n,s,l){var d;const f=n.filter||{},g={...f,excludes:[...f.excludes||[],yf.Notebook]},y={only:(d=f.include)===null||d===void 0?void 0:d.value,trigger:n.type},w=new Fze(e,l),x=n.type===2,I=Kwi(c,e,x?g:f),P=new On,O=I.map(async X=>{try{s.report(X);const Z=await X.provideCodeActions(e,i,y,w.token);if(Z&&P.add(Z),w.token.isCancellationRequested)return M1t;const ee=((Z==null?void 0:Z.actions)||[]).filter(we=>we&&Jwi(f,we)),he=Xwi(X,ee,f.include);return{actions:ee.map(we=>new Gwi(we,X)),documentation:he}}catch(Z){if(pT(Z))throw Z;return r_(Z),M1t}}),W=c.onDidChange(()=>{const X=c.all(e);ch(X,I)||w.cancel()});try{const X=await Promise.all(O),Z=X.map(he=>he.actions).flat(),ee=[...kE(X.map(he=>he.documentation)),...Qwi(c,e,n,Z)];return new yte(Z,ee,P)}finally{W.dispose(),w.dispose()}}function Kwi(c,e,i){return c.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(s=>$wi(i,new td(s))):!0)}function*Qwi(c,e,i,n){var s,l,d;if(e&&n.length)for(const f of c.all(e))f._getAdditionalMenuItems&&(yield*(s=f._getAdditionalMenuItems)===null||s===void 0?void 0:s.call(f,{trigger:i.type,only:(d=(l=i.filter)===null||l===void 0?void 0:l.include)===null||d===void 0?void 0:d.value},n.map(g=>g.action)))}function Xwi(c,e,i){if(!c.documentation)return;const n=c.documentation.map(s=>({kind:new td(s.kind),command:s.command}));if(i){let s;for(const l of n)l.kind.contains(i)&&(s?s.kind.contains(l.kind)&&(s=l):s=l);if(s)return s==null?void 0:s.command}for(const s of e)if(s.kind){for(const l of n)if(l.kind.contains(new td(s.kind)))return l.command}}var Z5;(function(c){c.OnSave="onSave",c.FromProblemsView="fromProblemsView",c.FromCodeActions="fromCodeActions",c.FromAILightbulb="fromAILightbulb"})(Z5||(Z5={}));async function Zwi(c,e,i,n,s=Gl.None){var l;const d=c.get(Fne),f=c.get(ff),g=c.get(R0),y=c.get(L_);if(g.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:i}),await e.resolve(s),!s.isCancellationRequested&&!(!((l=e.action.edit)===null||l===void 0)&&l.edits.length&&!(await d.apply(e.action.edit,{editor:n==null?void 0:n.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:i!==Z5.OnSave,showPreview:n==null?void 0:n.preview})).isApplied)&&e.action.command)try{await f.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(w){const x=Ywi(w);y.error(typeof x=="string"?x:V("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}function Ywi(c){return typeof c=="string"?c:c instanceof Error&&typeof c.message=="string"?c.message:void 0}uc.registerCommand("_executeCodeActionProvider",async function(c,e,i,n,s){if(!(e instanceof Oo))throw nk();const{codeActionProvider:l}=c.get(js),d=c.get(Qf).getModel(e);if(!d)throw nk();const f=Qs.isISelection(i)?Qs.liftSelection(i):at.isIRange(i)?d.validateRange(i):void 0;if(!f)throw nk();const g=typeof n=="string"?new td(n):void 0,y=await bte(l,d,f,{type:1,triggerAction:UC.Default,filter:{includeSourceActions:!0,include:g}},W4.None,Gl.None),w=[],x=Math.min(y.validActions.length,typeof s=="number"?s:0);for(let I=0;II.action)}finally{setTimeout(()=>y.dispose(),100)}});var exi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},txi=function(c,e){return function(i,n){e(i,n,c)}},xWe;let u1e=xWe=class{constructor(e){this.keybindingService=e}getResolver(){const e=new FE(()=>this.keybindingService.getKeybindings().filter(i=>xWe.codeActionCommands.indexOf(i.command)>=0).filter(i=>i.resolvedKeybinding).map(i=>{let n=i.commandArgs;return i.command===Xze?n={kind:yf.SourceOrganizeImports.value}:i.command===Zze&&(n={kind:yf.SourceFixAll.value}),{resolvedKeybinding:i.resolvedKeybinding,...KN.fromUser(n,{kind:td.None,apply:"never"})}}));return i=>{if(i.kind){const n=this.bestKeybindingForCodeAction(i,e.value);return n==null?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,i){if(!e.kind)return;const n=new td(e.kind);return i.filter(s=>s.kind.contains(n)).filter(s=>s.preferred?e.isPreferred:!0).reduceRight((s,l)=>s?s.kind.contains(l.kind)?l:s:l,void 0)}};u1e.codeActionCommands=[M2t,A2t,R2t,Xze,Zze];u1e=xWe=exi([txi(0,ou)],u1e);Ft("symbolIcon.arrayForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.booleanForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},V("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.colorForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.constantForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},V("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},V("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},V("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},V("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},V("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.fileForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.folderForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},V("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},V("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.keyForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.keywordForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},V("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.moduleForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.namespaceForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.nullForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.numberForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.objectForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.operatorForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.packageForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.propertyForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.referenceForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.snippetForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.stringForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.structForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.textForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.typeParameterForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.unitForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},V("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Ft("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},V("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const F2t=Object.freeze({kind:td.Empty,title:V("codeAction.widget.id.more","More Actions...")}),ixi=Object.freeze([{kind:yf.QuickFix,title:V("codeAction.widget.id.quickfix","Quick Fix")},{kind:yf.RefactorExtract,title:V("codeAction.widget.id.extract","Extract"),icon:Dr.wrench},{kind:yf.RefactorInline,title:V("codeAction.widget.id.inline","Inline"),icon:Dr.wrench},{kind:yf.RefactorRewrite,title:V("codeAction.widget.id.convert","Rewrite"),icon:Dr.wrench},{kind:yf.RefactorMove,title:V("codeAction.widget.id.move","Move"),icon:Dr.wrench},{kind:yf.SurroundWith,title:V("codeAction.widget.id.surround","Surround With"),icon:Dr.surroundWith},{kind:yf.Source,title:V("codeAction.widget.id.source","Source Action"),icon:Dr.symbolFile},F2t]);function nxi(c,e,i){if(!e)return c.map(l=>{var d;return{kind:"action",item:l,group:F2t,disabled:!!l.action.disabled,label:l.action.disabled||l.action.title,canPreview:!!(!((d=l.action.edit)===null||d===void 0)&&d.edits.length)}});const n=ixi.map(l=>({group:l,actions:[]}));for(const l of c){const d=l.action.kind?new td(l.action.kind):td.None;for(const f of n)if(f.group.kind.contains(d)){f.actions.push(l);break}}const s=[];for(const l of n)if(l.actions.length){s.push({kind:"header",group:l.group});for(const d of l.actions){const f=l.group;s.push({kind:"action",item:d,group:d.action.isAI?{title:f.title,kind:f.kind,icon:Dr.sparkle}:f,label:d.action.title,disabled:!!d.action.disabled,keybinding:i(d.action)})}}return s}var rxi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},R1t=function(c,e){return function(i,n){e(i,n,c)}},kWe,hU;(function(c){c.Hidden={type:0};class e{constructor(n,s,l,d){this.actions=n,this.trigger=s,this.editorPosition=l,this.widgetPosition=d,this.type=1}}c.Showing=e})(hU||(hU={}));let O9=kWe=class extends Ii{constructor(e,i,n){super(),this._editor=e,this._keybindingService=i,this._onClick=this._register(new ui),this.onClick=this._onClick.event,this._state=hU.Hidden,this._iconClasses=[],this._domNode=Sr("div.lightBulbWidget"),this._domNode.role="listbox",this._register(Jd.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(s=>{const l=this._editor.getModel();(this.state.type!==1||!l||this.state.editorPosition.lineNumber>=l.getLineCount())&&this.hide()})),this._register(ari(this._domNode,s=>{if(this.state.type!==1)return;this._editor.focus(),s.preventDefault();const{top:l,height:d}=Y_(this._domNode),f=this._editor.getOption(67);let g=Math.floor(f/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(s.buttons&1)===1&&this.hide()})),this._register(Mr.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,()=>{var s,l,d,f;this._preferredKbLabel=(l=(s=this._keybindingService.lookupKeybinding(O2t))===null||s===void 0?void 0:s.getLabel())!==null&&l!==void 0?l:void 0,this._quickFixKbLabel=(f=(d=this._keybindingService.lookupKeybinding(Qze))===null||d===void 0?void 0:d.getLabel())!==null&&f!==void 0?f:void 0,this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,i,n){if(e.validActions.length<=0)return this.hide();if(!this._editor.getOptions().get(65).enabled)return this.hide();const l=this._editor.getModel();if(!l)return this.hide();const{lineNumber:d,column:f}=l.validatePosition(n),g=l.getOptions().tabSize,y=this._editor.getOptions().get(50),w=l.getLineContent(d),x=_ye(w,g),I=y.spaceWidth*x>22,P=ee=>ee>2&&this._editor.getTopForLineNumber(ee)===this._editor.getTopForLineNumber(ee-1);let O=d,W=1;if(!I){if(d>1&&!P(d-1))O-=1;else if(d=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},TWe=function(c,e){return function(i,n){e(i,n,c)}};const W2t="acceptSelectedCodeAction",V2t="previewSelectedCodeAction";class sxi{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const i=document.createElement("span");return e.append(i),{container:e,text:i}}renderElement(e,i,n){var s,l;n.text.textContent=(l=(s=e.group)===null||s===void 0?void 0:s.title)!==null&&l!==void 0?l:""}disposeTemplate(e){}}let DWe=class{get templateId(){return"action"}constructor(e,i){this._supportsPreview=e,this._keybindingService=i}renderTemplate(e){e.classList.add(this.templateId);const i=document.createElement("div");i.className="icon",e.append(i);const n=document.createElement("span");n.className="title",e.append(n);const s=new Kq(e,FC);return{container:e,icon:i,text:n,keybinding:s}}renderElement(e,i,n){var s,l,d;if(!((s=e.group)===null||s===void 0)&&s.icon?(n.icon.className=Uo.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=vs(e.group.icon.color.id))):(n.icon.className=Uo.asClassName(Dr.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;n.text.textContent=H2t(e.label),n.keybinding.set(e.keybinding),Cri(!!e.keybinding,n.keybinding.element);const f=(l=this._keybindingService.lookupKeybinding(W2t))===null||l===void 0?void 0:l.getLabel(),g=(d=this._keybindingService.lookupKeybinding(V2t))===null||d===void 0?void 0:d.getLabel();n.container.classList.toggle("option-disabled",e.disabled),e.disabled?n.container.title=e.label:f&&g?this._supportsPreview&&e.canPreview?n.container.title=V({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to Apply, Shift+F2 to Preview"']},"{0} to Apply, {1} to Preview",f,g):n.container.title=V({key:"label",comment:['placeholder is a keybinding, e.g "F2 to Apply"']},"{0} to Apply",f):n.container.title=""}disposeTemplate(e){e.keybinding.dispose()}};DWe=B2t([TWe(1,ou)],DWe);class oxi extends UIEvent{constructor(){super("acceptSelectedAction")}}class F1t extends UIEvent{constructor(){super("previewSelectedAction")}}function axi(c){if(c.kind==="action")return c.label}let EWe=class extends Ii{constructor(e,i,n,s,l,d){super(),this._delegate=s,this._contextViewService=l,this._keybindingService=d,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new uh),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const f={getHeight:g=>g.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:g=>g.kind};this._list=this._register(new Iw(e,this.domNode,f,[new DWe(i,this._keybindingService),new sxi],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:axi},accessibilityProvider:{getAriaLabel:g=>{if(g.kind==="action"){let y=g.label?H2t(g==null?void 0:g.label):"";return g.disabled&&(y=V({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",y,g.disabled)),y}return null},getWidgetAriaLabel:()=>V({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:g=>g.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(iB),this._register(this._list.onMouseClick(g=>this.onListClick(g))),this._register(this._list.onMouseOver(g=>this.onListHover(g))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(g=>this.onListSelection(g))),this._allMenuItems=n,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const i=this._allMenuItems.filter(g=>g.kind==="header").length,s=this._allMenuItems.length*this._actionLineHeight+i*this._headerLineHeight-i*this._actionLineHeight;this._list.layout(s);let l=e;if(this._allMenuItems.length>=50)l=380;else{const g=this._allMenuItems.map((y,w)=>{const x=this.domNode.ownerDocument.getElementById(this._list.getElementID(w));if(x){x.style.width="auto";const I=x.getBoundingClientRect().width;return x.style.width="",I}return 0});l=Math.max(...g,e)}const f=Math.min(s,this.domNode.ownerDocument.body.clientHeight*.7);return this._list.layout(f,l),this.domNode.style.height=`${f}px`,this._list.domFocus(),l}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const i=this._list.getFocus();if(i.length===0)return;const n=i[0],s=this._list.element(n);if(!this.focusCondition(s))return;const l=e?new F1t:new oxi;this._list.setSelection([n],l)}onListSelection(e){if(!e.elements.length)return;const i=e.elements[0];i.item&&this.focusCondition(i)?this._delegate.onSelect(i.item,e.browserEvent instanceof F1t):this._list.setSelection([])}onFocus(){var e,i;const n=this._list.getFocus();if(n.length===0)return;const s=n[0],l=this._list.element(s);(i=(e=this._delegate).onFocus)===null||i===void 0||i.call(e,l.item)}async onListHover(e){const i=e.element;if(i&&i.item&&this.focusCondition(i)){if(this._delegate.onHover&&!i.disabled&&i.kind==="action"){const n=await this._delegate.onHover(i.item,this.cts.token);i.canPreview=n?n.canPreview:void 0}e.index&&this._list.splice(e.index,1,[i])}this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};EWe=B2t([TWe(4,n6),TWe(5,ou)],EWe);function H2t(c){return c.replace(/\r\n|\r|\n/g," ")}var lxi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},tFe=function(c,e){return function(i,n){e(i,n,c)}};Ft("actionBar.toggledBackground",{dark:q5,light:q5,hcDark:q5,hcLight:q5},V("actionBar.toggledBackground","Background color for toggled action items in action bar."));const M9={Visible:new Xr("codeActionMenuVisible",!1,V("codeActionMenuVisible","Whether the action widget list is visible"))},aB=Kl("actionWidgetService");let R9=class extends Ii{get isVisible(){return M9.Visible.getValue(this._contextKeyService)||!1}constructor(e,i,n){super(),this._contextViewService=e,this._contextKeyService=i,this._instantiationService=n,this._list=this._register(new jg)}show(e,i,n,s,l,d,f){const g=M9.Visible.bindTo(this._contextKeyService),y=this._instantiationService.createInstance(EWe,e,i,n,s);this._contextViewService.showContextView({getAnchor:()=>l,render:w=>(g.set(!0),this._renderWidget(w,y,f??[])),onHide:w=>{g.reset(),this._onWidgetClosed(w)}},d,!1)}acceptSelected(e){var i;(i=this._list.value)===null||i===void 0||i.acceptSelected(e)}focusPrevious(){var e,i;(i=(e=this._list)===null||e===void 0?void 0:e.value)===null||i===void 0||i.focusPrevious()}focusNext(){var e,i;(i=(e=this._list)===null||e===void 0?void 0:e.value)===null||i===void 0||i.focusNext()}hide(e){var i;(i=this._list.value)===null||i===void 0||i.hide(e),this._list.clear()}_renderWidget(e,i,n){var s;const l=document.createElement("div");if(l.classList.add("action-widget"),e.appendChild(l),this._list.value=i,this._list.value)l.appendChild(this._list.value.domNode);else throw new Error("List has no value");const d=new On,f=document.createElement("div"),g=e.appendChild(f);g.classList.add("context-view-block"),d.add(tn(g,yr.MOUSE_DOWN,O=>O.stopPropagation()));const y=document.createElement("div"),w=e.appendChild(y);w.classList.add("context-view-pointerBlock"),d.add(tn(w,yr.POINTER_MOVE,()=>w.remove())),d.add(tn(w,yr.MOUSE_DOWN,()=>w.remove()));let x=0;if(n.length){const O=this._createActionBar(".action-widget-action-bar",n);O&&(l.appendChild(O.getContainer().parentElement),d.add(O),x=O.getContainer().offsetWidth)}const I=(s=this._list.value)===null||s===void 0?void 0:s.layout(x);l.style.width=`${I}px`;const P=d.add(IE(e));return d.add(P.onDidBlur(()=>this.hide(!0))),d}_createActionBar(e,i){if(!i.length)return;const n=Sr(e),s=new uk(n);return s.push(i,{icon:!1,label:!0}),s}_onWidgetClosed(e){var i;(i=this._list.value)===null||i===void 0||i.hide(e)}};R9=lxi([tFe(0,n6),tFe(1,Zo),tFe(2,So)],R9);dc(aB,R9,1);const Yne=1100;Bd(class extends Ny{constructor(){super({id:"hideCodeActionWidget",title:xa("hideCodeActionWidget.title","Hide action widget"),precondition:M9.Visible,keybinding:{weight:Yne,primary:9,secondary:[1033]}})}run(c){c.get(aB).hide(!0)}});Bd(class extends Ny{constructor(){super({id:"selectPrevCodeAction",title:xa("selectPrevCodeAction.title","Select previous action"),precondition:M9.Visible,keybinding:{weight:Yne,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(c){const e=c.get(aB);e instanceof R9&&e.focusPrevious()}});Bd(class extends Ny{constructor(){super({id:"selectNextCodeAction",title:xa("selectNextCodeAction.title","Select next action"),precondition:M9.Visible,keybinding:{weight:Yne,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(c){const e=c.get(aB);e instanceof R9&&e.focusNext()}});Bd(class extends Ny{constructor(){super({id:W2t,title:xa("acceptSelected.title","Accept selected action"),precondition:M9.Visible,keybinding:{weight:Yne,primary:3,secondary:[2137]}})}run(c){const e=c.get(aB);e instanceof R9&&e.acceptSelected()}});Bd(class extends Ny{constructor(){super({id:V2t,title:xa("previewSelected.title","Preview selected action"),precondition:M9.Visible,keybinding:{weight:Yne,primary:2051}})}run(c){const e=c.get(aB);e instanceof R9&&e.acceptSelected(!0)}});const j2t=new Xr("supportedCodeAction",""),B1t="_typescript.applyFixAllCodeAction";class cxi extends Ii{constructor(e,i,n,s=250){super(),this._editor=e,this._markerService=i,this._signalChange=n,this._delay=s,this._autoTriggerTimer=this._register(new gT),this._register(this._markerService.onMarkerChanged(l=>this._onMarkerChanges(l))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){const i=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(i?{trigger:e,selection:i}:void 0)}_onMarkerChanges(e){const i=this._editor.getModel();i&&e.some(n=>Dje(n,i.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:UC.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const i=this._editor.getSelection();if(e.type===1)return i;const n=this._editor.getOption(65).enabled;if(n!==tT.Off){{if(n===tT.On)return i;if(n===tT.OnCode){if(!i.isEmpty())return i;const l=this._editor.getModel(),{lineNumber:d,column:f}=i.getPosition(),g=l.getLineContent(d);if(g.length===0)return;if(f===1){if(/\s/.test(g[0]))return}else if(f===l.getLineMaxColumn(d)){if(/\s/.test(g[g.length-1]))return}else if(/\s/.test(g[f-2])&&/\s/.test(g[f-1]))return}}return i}}}var j5;(function(c){c.Empty={type:0};class e{constructor(n,s,l){this.trigger=n,this.position=s,this._cancellablePromise=l,this.type=1,this.actions=l.catch(d=>{if(pT(d))return z2t;throw d})}cancel(){this._cancellablePromise.cancel()}}c.Triggered=e})(j5||(j5={}));const z2t=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1});class uxi extends Ii{constructor(e,i,n,s,l,d){super(),this._editor=e,this._registry=i,this._markerService=n,this._progressService=l,this._configurationService=d,this._codeActionOracle=this._register(new jg),this._state=j5.Empty,this._onDidChangeState=this._register(new ui),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=j2t.bindTo(s),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._register(this._editor.onDidChangeConfiguration(f=>{f.hasChanged(65)&&this._update()})),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(j5.Empty,!0))}_settingEnabledNearbyQuickfixes(){var e;const i=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:i==null?void 0:i.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(j5.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(91)){const i=this._registry.all(e).flatMap(n=>{var s;return(s=n.providedCodeActionKinds)!==null&&s!==void 0?s:[]});this._supportedCodeActions.set(i.join(" ")),this._codeActionOracle.value=new cxi(this._editor,this._markerService,n=>{var s;if(!n){this.setState(j5.Empty);return}const l=n.selection.getStartPosition(),d=Hg(async y=>{var w,x,I,P,O,W,X,Z,ee,he;if(this._settingEnabledNearbyQuickfixes()&&n.trigger.type===1&&(n.trigger.triggerAction===UC.QuickFix||!((x=(w=n.trigger.filter)===null||w===void 0?void 0:w.include)===null||x===void 0)&&x.contains(yf.QuickFix))){const we=await bte(this._registry,e,n.selection,n.trigger,W4.None,y),Te=[...we.allActions];if(y.isCancellationRequested)return z2t;const Be=(I=we.validActions)===null||I===void 0?void 0:I.some(vt=>vt.action.kind?yf.QuickFix.contains(new td(vt.action.kind)):!1),Me=this._markerService.read({resource:e.uri});if(Be){for(const vt of we.validActions)!((O=(P=vt.action.command)===null||P===void 0?void 0:P.arguments)===null||O===void 0)&&O.some(Nt=>typeof Nt=="string"&&Nt.includes(B1t))&&(vt.action.diagnostics=[...Me.filter(Nt=>Nt.relatedInformation)]);return{validActions:we.validActions,allActions:Te,documentation:we.documentation,hasAutoFix:we.hasAutoFix,hasAIFix:we.hasAIFix,allAIFixes:we.allAIFixes,dispose:()=>{we.dispose()}}}else if(!Be&&Me.length>0){const vt=n.selection.getPosition();let Nt=vt,Ni=Number.MAX_VALUE;const ci=[...we.validActions];for(const pi of Me){const gn=pi.endColumn,$n=pi.endLineNumber,Ri=pi.startLineNumber;if($n===vt.lineNumber||Ri===vt.lineNumber){Nt=new yi($n,gn);const ao={type:n.trigger.type,triggerAction:n.trigger.triggerAction,filter:{include:!((W=n.trigger.filter)===null||W===void 0)&&W.include?(X=n.trigger.filter)===null||X===void 0?void 0:X.include:yf.QuickFix},autoApply:n.trigger.autoApply,context:{notAvailableMessage:((Z=n.trigger.context)===null||Z===void 0?void 0:Z.notAvailableMessage)||"",position:Nt}},Xs=new Qs(Nt.lineNumber,Nt.column,Nt.lineNumber,Nt.column),Yt=await bte(this._registry,e,Xs,ao,W4.None,y);if(Yt.validActions.length!==0){for(const na of Yt.validActions)!((he=(ee=na.action.command)===null||ee===void 0?void 0:ee.arguments)===null||he===void 0)&&he.some(Is=>typeof Is=="string"&&Is.includes(B1t))&&(na.action.diagnostics=[...Me.filter(Is=>Is.relatedInformation)]);we.allActions.length===0&&Te.push(...Yt.allActions),Math.abs(vt.column-gn)$n.findIndex(Ri=>Ri.action.title===pi.action.title)===gn);return Mt.sort((pi,gn)=>pi.action.isPreferred&&!gn.action.isPreferred?-1:!pi.action.isPreferred&&gn.action.isPreferred||pi.action.isAI&&!gn.action.isAI?1:!pi.action.isAI&&gn.action.isAI?-1:0),{validActions:Mt,allActions:Te,documentation:we.documentation,hasAutoFix:we.hasAutoFix,hasAIFix:we.hasAIFix,allAIFixes:we.allAIFixes,dispose:()=>{we.dispose()}}}}return bte(this._registry,e,n.selection,n.trigger,W4.None,y)});n.trigger.type===1&&((s=this._progressService)===null||s===void 0||s.showWhile(d,250));const f=new j5.Triggered(n.trigger,l,d);let g=!1;this._state.type===1&&(g=this._state.trigger.type===1&&f.type===1&&f.trigger.type===2&&this._state.position!==f.position),g?setTimeout(()=>{this.setState(f)},500):this.setState(f)},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:UC.Default})}else this._supportedCodeActions.reset()}trigger(e){var i;(i=this._codeActionOracle.value)===null||i===void 0||i.trigger(e)}setState(e,i){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!i&&!this._disposed&&this._onDidChangeState.fire(e))}}var dxi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},TN=function(c,e){return function(i,n){e(i,n,c)}},Wz;const fxi="quickfix-edit-highlight";let fR=Wz=class extends Ii{static get(e){return e.getContribution(Wz.ID)}constructor(e,i,n,s,l,d,f,g,y,w,x){super(),this._commandService=f,this._configurationService=g,this._actionWidgetService=y,this._instantiationService=w,this._telemetryService=x,this._activeCodeActions=this._register(new jg),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new uxi(this._editor,l.codeActionProvider,i,n,d,g)),this._register(this._model.onDidChangeState(I=>this.update(I))),this._lightBulbWidget=new FE(()=>{const I=this._editor.getContribution(O9.ID);return I&&this._register(I.onClick(P=>this.showCodeActionsFromLightbulb(P.actions,P))),I}),this._resolver=s.createInstance(u1e),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}async showCodeActionsFromLightbulb(e,i){if(this._telemetryService.publicLog2("codeAction.showCodeActionsFromLightbulb",{codeActionListLength:e.validActions.length,codeActions:e.validActions.map(n=>n.action.title),codeActionProviders:e.validActions.map(n=>{var s,l;return(l=(s=n.provider)===null||s===void 0?void 0:s.displayName)!==null&&l!==void 0?l:""})}),e.allAIFixes&&e.validActions.length===1){const n=e.validActions[0],s=n.action.command;s&&s.id==="inlineChat.start"&&s.arguments&&s.arguments.length>=1&&(s.arguments[0]={...s.arguments[0],autoSend:!1}),await this._applyCodeAction(n,!1,!1,Z5.FromAILightbulb);return}await this.showCodeActionList(e,i,{includeDisabledActions:!1,fromLightbulb:!0})}showCodeActions(e,i,n){return this.showCodeActionList(i,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,i,n,s){var l;if(!this._editor.hasModel())return;(l=ky.get(this._editor))===null||l===void 0||l.closeMessage();const d=this._editor.getPosition();this._trigger({type:1,triggerAction:i,filter:n,autoApply:s,context:{notAvailableMessage:e,position:d}})}_trigger(e){return this._model.trigger(e)}async _applyCodeAction(e,i,n,s){try{await this._instantiationService.invokeFunction(Zwi,e,s,{preview:n,editor:this._editor})}finally{i&&this._trigger({type:2,triggerAction:UC.QuickFix,filter:{}})}}async update(e){var i,n,s,l,d,f,g;if(e.type!==1){(i=this._lightBulbWidget.rawValue)===null||i===void 0||i.hide();return}let y;try{y=await e.actions}catch(w){Ba(w);return}if(!this._disposed)if((n=this._lightBulbWidget.value)===null||n===void 0||n.update(y,e.trigger,e.position),e.trigger.type===1){if(!((s=e.trigger.filter)===null||s===void 0)&&s.include){const x=this.tryGetValidActionToApply(e.trigger,y);if(x){try{(l=this._lightBulbWidget.value)===null||l===void 0||l.hide(),await this._applyCodeAction(x,!1,!1,Z5.FromCodeActions)}finally{y.dispose()}return}if(e.trigger.context){const I=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,y);if(I&&I.action.disabled){(d=ky.get(this._editor))===null||d===void 0||d.showMessage(I.action.disabled,e.trigger.context.position),y.dispose();return}}}const w=!!(!((f=e.trigger.filter)===null||f===void 0)&&f.include);if(e.trigger.context&&(!y.allActions.length||!w&&!y.validActions.length)){(g=ky.get(this._editor))===null||g===void 0||g.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=y,y.dispose();return}this._activeCodeActions.value=y,this.showCodeActionList(y,this.toCoords(e.position),{includeDisabledActions:w,fromLightbulb:!1})}else this._actionWidgetService.isVisible?y.dispose():this._activeCodeActions.value=y}getInvalidActionThatWouldHaveBeenApplied(e,i){if(i.allActions.length&&(e.autoApply==="first"&&i.validActions.length===0||e.autoApply==="ifSingle"&&i.allActions.length===1))return i.allActions.find(({action:n})=>n.disabled)}tryGetValidActionToApply(e,i){if(i.validActions.length&&(e.autoApply==="first"&&i.validActions.length>0||e.autoApply==="ifSingle"&&i.validActions.length===1))return i.validActions[0]}async showCodeActionList(e,i,n){const s=this._editor.createDecorationsCollection(),l=this._editor.getDomNode();if(!l)return;const d=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!d.length)return;const f=yi.isIPosition(i)?this.toCoords(i):i,g={onSelect:async(y,w)=>{this._applyCodeAction(y,!0,!!w,n.fromLightbulb?Z5.FromAILightbulb:Z5.FromCodeActions),this._actionWidgetService.hide(!1),s.clear()},onHide:y=>{var w;(w=this._editor)===null||w===void 0||w.focus(),s.clear(),n.fromLightbulb&&y!==void 0&&this._telemetryService.publicLog2("codeAction.showCodeActionList.onHide",{codeActionListLength:e.validActions.length,didCancel:y,codeActions:e.validActions.map(x=>x.action.title)})},onHover:async(y,w)=>{var x;if(w.isCancellationRequested)return;let I=!1;const P=y.action.kind;if(P){const O=new td(P);I=[yf.RefactorExtract,yf.RefactorInline,yf.RefactorRewrite,yf.RefactorMove,yf.Source].some(X=>X.contains(O))}return{canPreview:I||!!(!((x=y.action.edit)===null||x===void 0)&&x.edits.length)}},onFocus:y=>{var w,x;if(y&&y.action){const I=y.action.ranges,P=y.action.diagnostics;if(s.clear(),I&&I.length>0){const O=P&&(P==null?void 0:P.length)>1?P.map(W=>({range:W,options:Wz.DECORATION})):I.map(W=>({range:W,options:Wz.DECORATION}));s.set(O)}else if(P&&P.length>0){const O=P.map(X=>({range:X,options:Wz.DECORATION}));s.set(O);const W=P[0];if(W.startLineNumber&&W.startColumn){const X=(x=(w=this._editor.getModel())===null||w===void 0?void 0:w.getWordAtPosition({lineNumber:W.startLineNumber,column:W.startColumn}))===null||x===void 0?void 0:x.word;hL(V("editingNewSelection","Context: {0} at line {1} and column {2}.",X,W.startLineNumber,W.startColumn))}}}else s.clear()}};this._actionWidgetService.show("codeActionWidget",!0,nxi(d,this._shouldShowHeaders(),this._resolver.getResolver()),g,f,l,this._getActionBarActions(e,i,n))}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const i=this._editor.getScrolledVisiblePosition(e),n=Y_(this._editor.getDomNode()),s=n.left+i.left,l=n.top+i.top+i.height;return{x:s,y:l}}_shouldShowHeaders(){var e;const i=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:i==null?void 0:i.uri})}_getActionBarActions(e,i,n){if(n.fromLightbulb)return[];const s=e.documentation.map(l=>{var d;return{id:l.id,label:l.title,tooltip:(d=l.tooltip)!==null&&d!==void 0?d:"",class:void 0,enabled:!0,run:()=>{var f;return this._commandService.executeCommand(l.id,...(f=l.arguments)!==null&&f!==void 0?f:[])}}});return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&s.push(this._showDisabled?{id:"hideMoreActions",label:V("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,i,n))}:{id:"showMoreActions",label:V("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,i,n))}),s}};fR.ID="editor.contrib.codeActionController";fR.DECORATION=Xa.register({description:"quickfix-highlight",className:fxi});fR=Wz=dxi([TN(1,EL),TN(2,Zo),TN(3,So),TN(4,js),TN(5,IR),TN(6,ff),TN(7,El),TN(8,aB),TN(9,So),TN(10,R0)],fR);dk((c,e)=>{((s,l)=>{l&&e.addRule(`.monaco-editor ${s} { background-color: ${l}; }`)})(".quickfix-edit-highlight",c.getColor(w4));const n=c.getColor(xM);n&&e.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${SE(c.type)?"dotted":"solid"} ${n}; box-sizing: border-box; }`)});function ere(c){return xn.regex(j2t.keys()[0],new RegExp("(\\s|^)"+Cw(c.value)+"\\b"))}const Yze={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:V("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:V("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[V("args.schema.apply.first","Always apply the first returned code action."),V("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),V("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:V("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function lB(c,e,i,n,s=UC.Default){if(c.hasModel()){const l=fR.get(c);l==null||l.manualTriggerAtCurrentPosition(e,s,i,n)}}class hxi extends ms{constructor(){super({id:Qze,label:V("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:xn.and(Lt.writable,Lt.hasCodeActionsProvider),kbOpts:{kbExpr:Lt.textInputFocus,primary:2137,weight:100}})}run(e,i){return lB(i,V("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,UC.QuickFix)}}class _xi extends sg{constructor(){super({id:A2t,precondition:xn.and(Lt.writable,Lt.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:Yze}]}})}runEditorCommand(e,i,n){const s=KN.fromUser(n,{kind:td.Empty,apply:"ifSingle"});return lB(i,typeof(n==null?void 0:n.kind)=="string"?s.preferred?V("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):V("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):s.preferred?V("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):V("editor.action.codeAction.noneMessage","No code actions available"),{include:s.kind,includeSourceActions:!0,onlyIncludePreferredActions:s.preferred},s.apply)}}class pxi extends ms{constructor(){super({id:M2t,label:V("refactor.label","Refactor..."),alias:"Refactor...",precondition:xn.and(Lt.writable,Lt.hasCodeActionsProvider),kbOpts:{kbExpr:Lt.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:xn.and(Lt.writable,ere(yf.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:Yze}]}})}run(e,i,n){const s=KN.fromUser(n,{kind:yf.Refactor,apply:"never"});return lB(i,typeof(n==null?void 0:n.kind)=="string"?s.preferred?V("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):V("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):s.preferred?V("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):V("editor.action.refactor.noneMessage","No refactorings available"),{include:yf.Refactor.contains(s.kind)?s.kind:td.None,onlyIncludePreferredActions:s.preferred},s.apply,UC.Refactor)}}class gxi extends ms{constructor(){super({id:R2t,label:V("source.label","Source Action..."),alias:"Source Action...",precondition:xn.and(Lt.writable,Lt.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:xn.and(Lt.writable,ere(yf.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:Yze}]}})}run(e,i,n){const s=KN.fromUser(n,{kind:yf.Source,apply:"never"});return lB(i,typeof(n==null?void 0:n.kind)=="string"?s.preferred?V("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):V("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):s.preferred?V("editor.action.source.noneMessage.preferred","No preferred source actions available"):V("editor.action.source.noneMessage","No source actions available"),{include:yf.Source.contains(s.kind)?s.kind:td.None,includeSourceActions:!0,onlyIncludePreferredActions:s.preferred},s.apply,UC.SourceAction)}}class mxi extends ms{constructor(){super({id:Xze,label:V("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:xn.and(Lt.writable,ere(yf.SourceOrganizeImports)),kbOpts:{kbExpr:Lt.textInputFocus,primary:1581,weight:100}})}run(e,i){return lB(i,V("editor.action.organize.noneMessage","No organize imports action available"),{include:yf.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",UC.OrganizeImports)}}class vxi extends ms{constructor(){super({id:Zze,label:V("fixAll.label","Fix All"),alias:"Fix All",precondition:xn.and(Lt.writable,ere(yf.SourceFixAll))})}run(e,i){return lB(i,V("fixAll.noneMessage","No fix all action available"),{include:yf.SourceFixAll,includeSourceActions:!0},"ifSingle",UC.FixAll)}}class yxi extends ms{constructor(){super({id:O2t,label:V("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:xn.and(Lt.writable,ere(yf.QuickFix)),kbOpts:{kbExpr:Lt.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,i){return lB(i,V("editor.action.autoFix.noneMessage","No auto fixes available"),{include:yf.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",UC.AutoFix)}}Bc(fR.ID,fR,3);Bc(O9.ID,O9,4);hr(hxi);hr(pxi);hr(gxi);hr(mxi);hr(yxi);hr(vxi);qr(new _xi);dh.as(WE.Configuration).registerConfiguration({...xye,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:V("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}});dh.as(WE.Configuration).registerConfiguration({...xye,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:5,description:V("includeNearbyQuickFixes","Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),default:!0}}});class IWe{constructor(){this.lenses=[],this._disposables=new On}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,i){this._disposables.add(e);for(const n of e.lenses)this.lenses.push({symbol:n,provider:i})}}async function U2t(c,e,i){const n=c.ordered(e),s=new Map,l=new IWe,d=n.map(async(f,g)=>{s.set(f,g);try{const y=await Promise.resolve(f.provideCodeLenses(e,i));y&&l.add(y,f)}catch(y){r_(y)}});return await Promise.all(d),l.lenses=l.lenses.sort((f,g)=>f.symbol.range.startLineNumberg.symbol.range.startLineNumber?1:s.get(f.provider)s.get(g.provider)?1:f.symbol.range.startColumng.symbol.range.startColumn?1:0),l}uc.registerCommand("_executeCodeLensProvider",function(c,...e){let[i,n]=e;Ac(Oo.isUri(i)),Ac(typeof n=="number"||!n);const{codeLensProvider:s}=c.get(js),l=c.get(Qf).getModel(i);if(!l)throw nk();const d=[],f=new On;return U2t(s,l,Gl.None).then(g=>{f.add(g);const y=[];for(const w of g.lenses)n==null||w.symbol.command?d.push(w.symbol):n-- >0&&w.provider.resolveCodeLens&&y.push(Promise.resolve(w.provider.resolveCodeLens(l,w.symbol,Gl.None)).then(x=>d.push(x||w.symbol)));return Promise.all(y)}).then(()=>d).finally(()=>{setTimeout(()=>f.dispose(),100)})});var bxi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Cxi=function(c,e){return function(i,n){e(i,n,c)}};const q2t=Kl("ICodeLensCache");class W1t{constructor(e,i){this.lineCount=e,this.data=i}}let NWe=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new TL(20,.75);const i="codelens/cache";Cee(ed,()=>e.remove(i,1));const n="codelens/cache2",s=e.get(n,1,"{}");this._deserialize(s),Mr.once(e.onWillSaveState)(l=>{l.reason===Cie.SHUTDOWN&&e.store(n,this._serialize(),1,1)})}put(e,i){const n=i.lenses.map(d=>{var f;return{range:d.symbol.range,command:d.symbol.command&&{id:"",title:(f=d.symbol.command)===null||f===void 0?void 0:f.title}}}),s=new IWe;s.add({lenses:n,dispose:()=>{}},this._fakeProvider);const l=new W1t(e.getLineCount(),s);this._cache.set(e.uri.toString(),l)}get(e){const i=this._cache.get(e.uri.toString());return i&&i.lineCount===e.getLineCount()?i.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[i,n]of this._cache){const s=new Set;for(const l of n.data.lenses)s.add(l.symbol.range.startLineNumber);e[i]={lineCount:n.lineCount,lines:[...s.values()]}}return JSON.stringify(e)}_deserialize(e){try{const i=JSON.parse(e);for(const n in i){const s=i[n],l=[];for(const f of s.lines)l.push({range:new at(f,1,f,11)});const d=new IWe;d.add({lenses:l,dispose(){}},this._fakeProvider),this._cache.set(n,new W1t(s.lineCount,d))}}catch{}}};NWe=bxi([Cxi(0,mT)],NWe);dc(q2t,NWe,1);class Sxi{constructor(e,i,n){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=i,this._onHeight=n,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class Wie{constructor(e,i){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${Wie._idPool++}`,this.updatePosition(i),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,i){this._commands.clear();const n=[];let s=!1;for(let l=0;l{y.symbol.command&&g.push(y.symbol),n.addDecoration({range:y.symbol.range,options:V1t},x=>this._decorationIds[w]=x),f?f=at.plusRange(f,y.symbol.range):f=at.lift(y.symbol.range)}),this._viewZone=new Sxi(f.startLineNumber-1,l,d),this._viewZoneId=s.addZone(this._viewZone),g.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(g,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new Wie(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,i){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],i==null||i.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,i)=>{const n=this._editor.getModel().getDecorationRange(e),s=this._data[i].symbol;return!!(n&&at.isEmpty(s.range)===n.isEmpty())})}updateCodeLensSymbols(e,i){this._decorationIds.forEach(i.removeDecoration,i),this._decorationIds=[],this._data=e,this._data.forEach((n,s)=>{i.addDecoration({range:n.symbol.range,options:V1t},l=>this._decorationIds[s]=l)})}updateHeight(e,i){this._viewZone.heightInPx=e,i.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let i=0;i=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},fee=function(c,e){return function(i,n){e(i,n,c)}};let kq=class{constructor(e,i,n,s,l,d){this._editor=e,this._languageFeaturesService=i,this._commandService=s,this._notificationService=l,this._codeLensCache=d,this._disposables=new On,this._localToDispose=new On,this._lenses=[],this._oldCodeLensModels=new On,this._provideCodeLensDebounce=n.for(i.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=n.for(i.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new id(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(f=>{(f.hasChanged(50)||f.hasChanged(19)||f.hasChanged(18))&&this._updateLensStyle(),f.hasChanged(17)&&this._onModelChange()})),this._disposables.add(i.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(67)/this._editor.getOption(52));let i=this._editor.getOption(19);return(!i||i<5)&&(i=this._editor.getOption(52)*.9|0),{fontSize:i,codeLensHeight:i*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:i}=this._getLayoutInfo(),n=this._editor.getOption(18),s=this._editor.getOption(50),{style:l}=this._editor.getContainerDomNode();l.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),l.setProperty("--vscode-editorCodeLens-fontSize",`${i}px`),l.setProperty("--vscode-editorCodeLens-fontFeatureSettings",s.fontFeatureSettings),n&&(l.setProperty("--vscode-editorCodeLens-fontFamily",n),l.setProperty("--vscode-editorCodeLens-fontFamilyDefault",Tb.fontFamily)),this._editor.changeViewZones(d=>{for(const f of this._lenses)f.updateHeight(e,d)})}_localDispose(){var e,i,n;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(i=this._resolveCodeLensesPromise)===null||i===void 0||i.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(n=this._currentCodeLensModel)===null||n===void 0||n.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const i=this._codeLensCache.get(e);if(i&&this._renderCodeLensSymbols(i),!this._languageFeaturesService.codeLensProvider.has(e)){i&&tR(()=>{const s=this._codeLensCache.get(e);i===s&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3,this._localToDispose);return}for(const s of this._languageFeaturesService.codeLensProvider.all(e))if(typeof s.onDidChange=="function"){const l=s.onDidChange(()=>n.schedule());this._localToDispose.add(l)}const n=new id(()=>{var s;const l=Date.now();(s=this._getCodeLensModelPromise)===null||s===void 0||s.cancel(),this._getCodeLensModelPromise=Hg(d=>U2t(this._languageFeaturesService.codeLensProvider,e,d)),this._getCodeLensModelPromise.then(d=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=d,this._codeLensCache.put(e,d);const f=this._provideCodeLensDebounce.update(e,Date.now()-l);n.delay=f,this._renderCodeLensSymbols(d),this._resolveCodeLensesInViewportSoon()},Ba)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(n),this._localToDispose.add(go(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var s;this._editor.changeDecorations(l=>{this._editor.changeViewZones(d=>{const f=[];let g=-1;this._lenses.forEach(w=>{!w.isValid()||g===w.getLineNumber()?f.push(w):(w.update(d),g=w.getLineNumber())});const y=new iFe;f.forEach(w=>{w.dispose(y,d),this._lenses.splice(this._lenses.indexOf(w),1)}),y.commit(l)})}),n.schedule(),this._resolveCodeLensesScheduler.cancel(),(s=this._resolveCodeLensesPromise)===null||s===void 0||s.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorText(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{n.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(s=>{s.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(go(()=>{if(this._editor.getModel()){const s=ME.capture(this._editor);this._editor.changeDecorations(l=>{this._editor.changeViewZones(d=>{this._disposeAllLenses(l,d)})}),s.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(s=>{if(s.target.type!==9)return;let l=s.target.element;if((l==null?void 0:l.tagName)==="SPAN"&&(l=l.parentElement),(l==null?void 0:l.tagName)==="A")for(const d of this._lenses){const f=d.getCommand(l);if(f){this._commandService.executeCommand(f.id,...f.arguments||[]).catch(g=>this._notificationService.error(g));break}}})),n.schedule()}_disposeAllLenses(e,i){const n=new iFe;for(const s of this._lenses)s.dispose(n,i);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const i=this._editor.getModel().getLineCount(),n=[];let s;for(const f of e.lenses){const g=f.symbol.range.startLineNumber;g<1||g>i||(s&&s[s.length-1].symbol.range.startLineNumber===g?s.push(f):(s=[f],n.push(s)))}if(!n.length&&!this._lenses.length)return;const l=ME.capture(this._editor),d=this._getLayoutInfo();this._editor.changeDecorations(f=>{this._editor.changeViewZones(g=>{const y=new iFe;let w=0,x=0;for(;xthis._resolveCodeLensesInViewportSoon())),w++,x++)}for(;wthis._resolveCodeLensesInViewportSoon())),x++;y.commit(f)})}),l.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const i=this._editor.getModel();if(!i)return;const n=[],s=[];if(this._lenses.forEach(f=>{const g=f.computeIfNecessary(i);g&&(n.push(g),s.push(f))}),n.length===0)return;const l=Date.now(),d=Hg(f=>{const g=n.map((y,w)=>{const x=new Array(y.length),I=y.map((P,O)=>!P.symbol.command&&typeof P.provider.resolveCodeLens=="function"?Promise.resolve(P.provider.resolveCodeLens(i,P.symbol,f)).then(W=>{x[O]=W},r_):(x[O]=P.symbol,Promise.resolve(void 0)));return Promise.all(I).then(()=>{!f.isCancellationRequested&&!s[w].isDisposed()&&s[w].updateCommands(x)})});return Promise.all(g)});this._resolveCodeLensesPromise=d,this._resolveCodeLensesPromise.then(()=>{const f=this._resolveCodeLensesDebounce.update(i,Date.now()-l);this._resolveCodeLensesScheduler.delay=f,this._currentCodeLensModel&&this._codeLensCache.put(i,this._currentCodeLensModel),this._oldCodeLensModels.clear(),d===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},f=>{Ba(f),d===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}async getModel(){var e;return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,!((e=this._currentCodeLensModel)===null||e===void 0)&&e.isDisposed?void 0:this._currentCodeLensModel}};kq.ID="css.editor.codeLens";kq=wxi([fee(1,js),fee(2,fk),fee(3,ff),fee(4,L_),fee(5,q2t)],kq);Bc(kq.ID,kq,1);hr(class extends ms{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:Lt.hasCodeLensProvider,label:V("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}async run(e,i){if(!i.hasModel())return;const n=e.get(pk),s=e.get(ff),l=e.get(L_),d=i.getSelection().positionLineNumber,f=i.getContribution(kq.ID);if(!f)return;const g=await f.getModel();if(!g)return;const y=[];for(const I of g.lenses)I.symbol.command&&I.symbol.range.startLineNumber===d&&y.push({label:I.symbol.command.title,command:I.symbol.command});if(y.length===0)return;const w=await n.pick(y,{canPickMany:!1,placeHolder:V("placeHolder","Select a command")});if(!w)return;let x=w.command;if(g.isDisposed){const I=await f.getModel(),P=I==null?void 0:I.lenses.find(O=>{var W;return O.symbol.range.startLineNumber===d&&((W=O.symbol.command)===null||W===void 0?void 0:W.title)===x.title});if(!P||!P.symbol.command)return;x=P.symbol.command}try{await s.executeCommand(x.id,...x.arguments||[])}catch(I){l.error(I)}}});var xxi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},nFe=function(c,e){return function(i,n){e(i,n,c)}};class eUe{constructor(e,i){this._editorWorkerClient=new eje(e,!1,"editorWorkerService",i)}async provideDocumentColors(e,i){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)}provideColorPresentations(e,i,n){const s=i.range,l=i.color,d=l.alpha,f=new Qi(new bc(Math.round(255*l.red),Math.round(255*l.green),Math.round(255*l.blue),d)),g=d?Qi.Format.CSS.formatRGB(f):Qi.Format.CSS.formatRGBA(f),y=d?Qi.Format.CSS.formatHSL(f):Qi.Format.CSS.formatHSLA(f),w=d?Qi.Format.CSS.formatHex(f):Qi.Format.CSS.formatHexA(f),x=[];return x.push({label:g,textEdit:{range:s,text:g}}),x.push({label:y,textEdit:{range:s,text:y}}),x.push({label:w,textEdit:{range:s,text:w}}),x}}let LWe=class extends Ii{constructor(e,i,n){super(),this._register(n.colorProvider.register("*",new eUe(e,i)))}};LWe=xxi([nFe(0,Qf),nFe(1,Kd),nFe(2,js)],LWe);Jne(LWe);async function $2t(c,e,i,n=!0){return tUe(new kxi,c,e,i,n)}function J2t(c,e,i,n){return Promise.resolve(i.provideColorPresentations(c,e,n))}class kxi{constructor(){}async compute(e,i,n,s){const l=await e.provideDocumentColors(i,n);if(Array.isArray(l))for(const d of l)s.push({colorInfo:d,provider:e});return Array.isArray(l)}}class Txi{constructor(){}async compute(e,i,n,s){const l=await e.provideDocumentColors(i,n);if(Array.isArray(l))for(const d of l)s.push({range:d.range,color:[d.color.red,d.color.green,d.color.blue,d.color.alpha]});return Array.isArray(l)}}class Dxi{constructor(e){this.colorInfo=e}async compute(e,i,n,s){const l=await e.provideColorPresentations(i,this.colorInfo,Gl.None);return Array.isArray(l)&&s.push(...l),Array.isArray(l)}}async function tUe(c,e,i,n,s){let l=!1,d;const f=[],g=e.ordered(i);for(let y=g.length-1;y>=0;y--){const w=g[y];if(w instanceof eUe)d=w;else try{await c.compute(w,i,n,f)&&(l=!0)}catch(x){r_(x)}}return l?f:d&&s?(await c.compute(d,i,n,f),f):[]}function G2t(c,e){const{colorProvider:i}=c.get(js),n=c.get(Qf).getModel(e);if(!n)throw nk();const s=c.get(El).getValue("editor.defaultColorDecorators",{resource:e});return{model:n,colorProviderRegistry:i,isDefaultColorDecoratorsEnabled:s}}uc.registerCommand("_executeDocumentColorProvider",function(c,...e){const[i]=e;if(!(i instanceof Oo))throw nk();const{model:n,colorProviderRegistry:s,isDefaultColorDecoratorsEnabled:l}=G2t(c,i);return tUe(new Txi,s,n,Gl.None,l)});uc.registerCommand("_executeColorPresentationProvider",function(c,...e){const[i,n]=e,{uri:s,range:l}=n;if(!(s instanceof Oo)||!Array.isArray(i)||i.length!==4||!at.isIRange(l))throw nk();const{model:d,colorProviderRegistry:f,isDefaultColorDecoratorsEnabled:g}=G2t(c,s),[y,w,x,I]=i;return tUe(new Dxi({range:l,color:{red:y,green:w,blue:x,alpha:I}}),f,d,Gl.None,g)});var Exi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},rFe=function(c,e){return function(i,n){e(i,n,c)}},PWe;const K2t=Object.create({});let hR=PWe=class extends Ii{constructor(e,i,n,s){super(),this._editor=e,this._configurationService=i,this._languageFeaturesService=n,this._localToDispose=this._register(new On),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new Dne(this._editor),this._decoratorLimitReporter=new Ixi,this._colorDecorationClassRefs=this._register(new On),this._debounceInformation=s.for(n.colorProvider,"Document Colors",{min:PWe.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(n.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(l=>{const d=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(147);const f=d!==this._isColorDecoratorsEnabled||l.hasChanged(21),g=l.hasChanged(147);(f||g)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(147),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const i=e.getLanguageId(),n=this._configurationService.getValue(i);if(n&&typeof n=="object"){const s=n.colorDecorators;if(s&&s.enable!==void 0&&!s.enable)return s.enable}return this._editor.getOption(20)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new gT,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}async beginCompute(){this._computePromise=Hg(async e=>{const i=this._editor.getModel();if(!i)return[];const n=new o0(!1),s=await $2t(this._languageFeaturesService.colorProvider,i,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(i,n.elapsed()),s});try{const e=await this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){Ba(e)}}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const i=e.map(n=>({range:{startLineNumber:n.colorInfo.range.startLineNumber,startColumn:n.colorInfo.range.startColumn,endLineNumber:n.colorInfo.range.endLineNumber,endColumn:n.colorInfo.range.endColumn},options:Xa.EMPTY}));this._editor.changeDecorations(n=>{this._decorationsIds=n.deltaDecorations(this._decorationsIds,i),this._colorDatas=new Map,this._decorationsIds.forEach((s,l)=>this._colorDatas.set(s,e[l]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const i=[],n=this._editor.getOption(21);for(let l=0;lthis._colorDatas.has(s.id));return n.length===0?null:this._colorDatas.get(n[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};hR.ID="editor.contrib.colorDetector";hR.RECOMPUTE_TIME=1e3;hR=PWe=Exi([rFe(1,El),rFe(2,js),rFe(3,fk)],hR);class Ixi{constructor(){this._onDidChange=new ui,this._computed=0,this._limited=!1}update(e,i){(e!==this._computed||i!==this._limited)&&(this._computed=e,this._limited=i,this._onDidChange.fire())}}Bc(hR.ID,hR,1);class Nxi{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,i,n){this.presentationIndex=n,this._onColorFlushed=new ui,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new ui,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new ui,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=i}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,i){let n=-1;for(let s=0;s{this.backgroundColor=d.getColor(Z0e)||Qi.white})),this._register(tn(this._pickedColorNode,yr.CLICK,()=>this.model.selectNextColorPresentation())),this._register(tn(this._originalColorNode,yr.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(i.onDidChangeColor(this.onDidChangeColor,this)),this._register(i.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=Qi.Format.CSS.format(i.color)||"",this._pickedColorNode.classList.toggle("light",i.color.rgba.a<.5?this.backgroundColor.isLighter():i.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new Pxi(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=Qi.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}class Pxi extends Ii{constructor(e){super(),this._onClicked=this._register(new ui),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),zn(e,this._button);const i=document.createElement("div");i.classList.add("close-button-inner-div"),zn(this._button,i),zn(i,_w(".button"+Uo.asCSSSelector(Oh("color-picker-close",Dr.close,V("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._register(tn(this._button,yr.CLICK,()=>{this._onClicked.fire()}))}}class Axi extends Ii{constructor(e,i,n,s=!1){super(),this.model=i,this.pixelRatio=n,this._insertButton=null,this._domNode=_w(".colorpicker-body"),zn(e,this._domNode),this._saturationBox=new Oxi(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new Mxi(this._domNode,this.model,s),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new Rxi(this._domNode,this.model,s),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),s&&(this._insertButton=this._register(new Fxi(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:i}){const n=this.model.color.hsva;this.model.color=new Qi(new QN(n.h,e,i,n.a))}onDidOpacityChange(e){const i=this.model.color.hsva;this.model.color=new Qi(new QN(i.h,i.s,i.v,e))}onDidHueChange(e){const i=this.model.color.hsva,n=(1-e)*360;this.model.color=new Qi(new QN(n===360?0:n,i.s,i.v,i.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}class Oxi extends Ii{constructor(e,i,n){super(),this.model=i,this.pixelRatio=n,this._onDidChange=new ui,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new ui,this.onColorFlushed=this._onColorFlushed.event,this._domNode=_w(".saturation-wrap"),zn(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",zn(this._domNode,this._canvas),this.selection=_w(".saturation-selection"),zn(this._domNode,this.selection),this.layout(),this._register(tn(this._domNode,yr.POINTER_DOWN,s=>this.onPointerDown(s))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new Uq);const i=Y_(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,s=>this.onDidChangePosition(s.pageX-i.left,s.pageY-i.top),()=>null);const n=tn(e.target.ownerDocument,yr.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,i){const n=Math.max(0,Math.min(1,e/this.width)),s=Math.max(0,Math.min(1,1-i/this.height));this.paintSelection(n,s),this._onDidChange.fire({s:n,v:s})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,i=new Qi(new QN(e.h,1,1,1)),n=this._canvas.getContext("2d"),s=n.createLinearGradient(0,0,this._canvas.width,0);s.addColorStop(0,"rgba(255, 255, 255, 1)"),s.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),s.addColorStop(1,"rgba(255, 255, 255, 0)");const l=n.createLinearGradient(0,0,0,this._canvas.height);l.addColorStop(0,"rgba(0, 0, 0, 0)"),l.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this._canvas.width,this._canvas.height),n.fillStyle=Qi.Format.CSS.format(i),n.fill(),n.fillStyle=s,n.fill(),n.fillStyle=l,n.fill()}paintSelection(e,i){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-i*this.height}px`}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const i=e.hsva;this.paintSelection(i.s,i.v)}}class Q2t extends Ii{constructor(e,i,n=!1){super(),this.model=i,this._onDidChange=new ui,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new ui,this.onColorFlushed=this._onColorFlushed.event,n?(this.domNode=zn(e,_w(".standalone-strip")),this.overlay=zn(this.domNode,_w(".standalone-overlay"))):(this.domNode=zn(e,_w(".strip")),this.overlay=zn(this.domNode,_w(".overlay"))),this.slider=zn(this.domNode,_w(".slider")),this.slider.style.top="0px",this._register(tn(this.domNode,yr.POINTER_DOWN,s=>this.onPointerDown(s))),this._register(i.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const i=this.getValue(e);this.updateSliderPosition(i)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const i=this._register(new Uq),n=Y_(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),i.startMonitoring(e.target,e.pointerId,e.buttons,l=>this.onDidChangeTop(l.pageY-n.top),()=>null);const s=tn(e.target.ownerDocument,yr.POINTER_UP,()=>{this._onColorFlushed.fire(),s.dispose(),i.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const i=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(i),this._onDidChange.fire(i)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class Mxi extends Q2t{constructor(e,i,n=!1){super(e,i,n),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:i,g:n,b:s}=e.rgba,l=new Qi(new bc(i,n,s,1)),d=new Qi(new bc(i,n,s,0));this.overlay.style.background=`linear-gradient(to bottom, ${l} 0%, ${d} 100%)`}getValue(e){return e.hsva.a}}class Rxi extends Q2t{constructor(e,i,n=!1){super(e,i,n),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class Fxi extends Ii{constructor(e){super(),this._onClicked=this._register(new ui),this.onClicked=this._onClicked.event,this._button=zn(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._register(tn(this._button,yr.CLICK,()=>{this._onClicked.fire()}))}get button(){return this._button}}class Bxi extends Ew{constructor(e,i,n,s,l=!1){super(),this.model=i,this.pixelRatio=n,this._register(Vte.getInstance(Io(e)).onDidChange(()=>this.layout()));const d=_w(".colorpicker-widget");e.appendChild(d),this.header=this._register(new Lxi(d,this.model,s,l)),this.body=this._register(new Axi(d,this.model,this.pixelRatio,l))}layout(){this.body.layout()}}var X2t=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Z2t=function(c,e){return function(i,n){e(i,n,c)}};class Wxi{constructor(e,i,n,s){this.owner=e,this.range=i,this.model=n,this.provider=s,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let d1e=class{constructor(e,i){this._editor=e,this._themeService=i,this.hoverOrdinal=2}computeSync(e,i){return[]}computeAsync(e,i,n){return pp.fromPromise(this._computeAsync(e,i,n))}async _computeAsync(e,i,n){if(!this._editor.hasModel())return[];const s=hR.get(this._editor);if(!s)return[];for(const l of i){if(!s.isColorDecoration(l))continue;const d=s.getColorData(l.range.getStartPosition());if(d)return[await Y2t(this,this._editor.getModel(),d.colorInfo,d.provider)]}return[]}renderHoverParts(e,i){return eTt(this,this._editor,this._themeService,i,e)}};d1e=X2t([Z2t(1,og)],d1e);class Vxi{constructor(e,i,n,s){this.owner=e,this.range=i,this.model=n,this.provider=s}}let Vie=class{constructor(e,i){this._editor=e,this._themeService=i,this._color=null}async createColorHover(e,i,n){if(!this._editor.hasModel()||!hR.get(this._editor))return null;const l=await $2t(n,this._editor.getModel(),Gl.None);let d=null,f=null;for(const x of l){const I=x.colorInfo;at.containsRange(I.range,e.range)&&(d=I,f=x.provider)}const g=d??e,y=f??i,w=!!d;return{colorHover:await Y2t(this,this._editor.getModel(),g,y),foundInEditor:w}}async updateEditorModel(e){if(!this._editor.hasModel())return;const i=e.model;let n=new at(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(await h0e(this._editor.getModel(),i,this._color,n,e),n=tTt(this._editor,n,i))}renderHoverParts(e,i){return eTt(this,this._editor,this._themeService,i,e)}set color(e){this._color=e}get color(){return this._color}};Vie=X2t([Z2t(1,og)],Vie);async function Y2t(c,e,i,n){const s=e.getValueInRange(i.range),{red:l,green:d,blue:f,alpha:g}=i.color,y=new bc(Math.round(l*255),Math.round(d*255),Math.round(f*255),g),w=new Qi(y),x=await J2t(e,i,n,Gl.None),I=new Nxi(w,[],0);return I.colorPresentations=x||[],I.guessColorPresentation(w,s),c instanceof d1e?new Wxi(c,at.lift(i.range),I,n):new Vxi(c,at.lift(i.range),I,n)}function eTt(c,e,i,n,s){if(n.length===0||!e.hasModel())return Ii.None;if(s.setMinimumDimensions){const I=e.getOption(67)+8;s.setMinimumDimensions(new eu(302,I))}const l=new On,d=n[0],f=e.getModel(),g=d.model,y=l.add(new Bxi(s.fragment,g,e.getOption(143),i,c instanceof Vie));s.setColorPicker(y);let w=!1,x=new at(d.range.startLineNumber,d.range.startColumn,d.range.endLineNumber,d.range.endColumn);if(c instanceof Vie){const I=n[0].model.color;c.color=I,h0e(f,g,I,x,d),l.add(g.onColorFlushed(P=>{c.color=P}))}else l.add(g.onColorFlushed(async I=>{await h0e(f,g,I,x,d),w=!0,x=tTt(e,x,g)}));return l.add(g.onDidChangeColor(I=>{h0e(f,g,I,x,d)})),l.add(e.onDidChangeModelContent(I=>{w?w=!1:(s.hide(),e.focus())})),l}function tTt(c,e,i){var n,s;const l=[],d=(n=i.presentation.textEdit)!==null&&n!==void 0?n:{range:e,text:i.presentation.label,forceMoveMarkers:!1};l.push(d),i.presentation.additionalTextEdits&&l.push(...i.presentation.additionalTextEdits);const f=at.lift(d.range),g=c.getModel()._setTrackedRange(null,f,3);return c.executeEdits("colorpicker",l),c.pushUndoStop(),(s=c.getModel()._getTrackedRange(g))!==null&&s!==void 0?s:f}async function h0e(c,e,i,n,s){const l=await J2t(c,{range:n,color:{red:i.rgba.r/255,green:i.rgba.g/255,blue:i.rgba.b/255,alpha:i.rgba.a}},s.provider,Gl.None);e.colorPresentations=l||[]}const iTt="editor.action.showHover",Hxi="editor.action.showDefinitionPreviewHover",jxi="editor.action.scrollUpHover",zxi="editor.action.scrollDownHover",Uxi="editor.action.scrollLeftHover",qxi="editor.action.scrollRightHover",$xi="editor.action.pageUpHover",Jxi="editor.action.pageDownHover",Gxi="editor.action.goToTopHover",Kxi="editor.action.goToBottomHover",obe="editor.action.increaseHoverVerbosityLevel",Qxi=V({key:"increaseHoverVerbosityLevel",comment:["Label for action that will increase the hover verbosity level."]},"Increase Hover Verbosity Level"),abe="editor.action.decreaseHoverVerbosityLevel",Xxi=V({key:"decreaseHoverVerbosityLevel",comment:["Label for action that will decrease the hover verbosity level."]},"Decrease Hover Verbosity Level"),nTt="editor.action.inlineSuggest.commit",rTt="editor.action.inlineSuggest.showPrevious",sTt="editor.action.inlineSuggest.showNext";var iUe=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},rT=function(c,e){return function(i,n){e(i,n,c)}},_0e;let AWe=class extends Ii{constructor(e,i,n){super(),this.editor=e,this.model=i,this.instantiationService=n,this.alwaysShowToolbar=Zu(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).showToolbar==="always"),this.sessionPosition=void 0,this.position=Ma(this,s=>{var l,d,f;const g=(l=this.model.read(s))===null||l===void 0?void 0:l.primaryGhostText.read(s);if(!this.alwaysShowToolbar.read(s)||!g||g.parts.length===0)return this.sessionPosition=void 0,null;const y=g.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==g.lineNumber&&(this.sessionPosition=void 0);const w=new yi(g.lineNumber,Math.min(y,(f=(d=this.sessionPosition)===null||d===void 0?void 0:d.column)!==null&&f!==void 0?f:Number.MAX_SAFE_INTEGER));return this.sessionPosition=w,w}),this._register(ck((s,l)=>{const d=this.model.read(s);if(!d||!this.alwaysShowToolbar.read(s))return;const f=tB((y,w)=>{const x=w.add(this.instantiationService.createInstance(_R,this.editor,!0,this.position,d.selectedInlineCompletionIndex,d.inlineCompletionsCount,d.activeCommands));return e.addContentWidget(x),w.add(go(()=>e.removeContentWidget(x))),w.add(Cl(I=>{this.position.read(I)&&d.lastTriggerKind.read(I)!==M4.Explicit&&d.triggerExplicitly()})),x}),g=n0i(this,(y,w)=>!!this.position.read(y)||!!w);l.add(Cl(y=>{g.read(y)&&f.read(y)}))}))}};AWe=iUe([rT(2,So)],AWe);const Zxi=Oh("inline-suggestion-hints-next",Dr.chevronRight,V("parameterHintsNextIcon","Icon for show next parameter hint.")),Yxi=Oh("inline-suggestion-hints-previous",Dr.chevronLeft,V("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let _R=_0e=class extends Ii{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,i,n){const s=new WC(e,i,n,!0,()=>this._commandService.executeCommand(e)),l=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let d=i;return l&&(d=V({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",i,l.getLabel())),s.tooltip=d,s}constructor(e,i,n,s,l,d,f,g,y,w,x){super(),this.editor=e,this.withBorder=i,this._position=n,this._currentSuggestionIdx=s,this._suggestionCount=l,this._extraCommands=d,this._commandService=f,this.keybindingService=y,this._contextKeyService=w,this._menuService=x,this.id=`InlineSuggestionHintsContentWidget${_0e.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=Yc("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[Yc("div@toolBar")]),this.previousAction=this.createCommandAction(rTt,V("previous","Previous"),Uo.asClassName(Yxi)),this.availableSuggestionCountAction=new WC("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(sTt,V("next","Next"),Uo.asClassName(Zxi)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(_t.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new id(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new id(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.toolBar=this._register(g.createInstance(OWe,this.nodes.toolBar,_t.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:I=>I.startsWith("primary")},actionViewItemProvider:(I,P)=>{if(I instanceof VC)return g.createInstance(tki,I,void 0);if(I===this.availableSuggestionCountAction){const O=new eki(void 0,I,{label:!0,icon:!1});return O.setClass("availableSuggestionCount"),O}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(I=>{_0e._dropDownVisible=I})),this._register(Cl(I=>{this._position.read(I),this.editor.layoutContentWidget(this)})),this._register(Cl(I=>{const P=this._suggestionCount.read(I),O=this._currentSuggestionIdx.read(I);P!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${O+1}/${P}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),P!==void 0&&P>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(Cl(I=>{const O=this._extraCommands.read(I).map(W=>({class:void 0,id:W.id,enabled:!0,tooltip:W.tooltip||"",label:W.title,run:X=>this._commandService.executeCommand(W.id)}));for(const[W,X]of this.inlineCompletionsActionsMenus.getActions())for(const Z of X)Z instanceof VC&&O.push(Z);O.length>0&&O.unshift(new Up),this.toolBar.setAdditionalSecondaryActions(O)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};_R._dropDownVisible=!1;_R.id=0;_R=_0e=iUe([rT(6,ff),rT(7,So),rT(8,ou),rT(9,Zo),rT(10,Dw)],_R);class eki extends gq{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}updateTooltip(){}}let tki=class extends cR{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const i=Yc("div.keybinding").root;this._register(new Kq(i,FC,{disableTitle:!0,...ekt})).set(e),this.label.textContent=this._action.label,this.label.appendChild(i),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}updateTooltip(){}},OWe=class extends Pie{constructor(e,i,n,s,l,d,f,g,y){super(e,{resetMenu:i,...n},s,l,d,f,g,y),this.menuId=i,this.options2=n,this.menuService=s,this.contextKeyService=l,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,i,n,s,l,d,f;const g=[],y=[];Mye(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:g,secondary:y},(n=(i=this.options2)===null||i===void 0?void 0:i.toolbarOptions)===null||n===void 0?void 0:n.primaryGroup,(l=(s=this.options2)===null||s===void 0?void 0:s.toolbarOptions)===null||l===void 0?void 0:l.shouldInlineSubmenu,(f=(d=this.options2)===null||d===void 0?void 0:d.toolbarOptions)===null||f===void 0?void 0:f.useSeparatorsInPrimaryActions),y.push(...this.additionalActions),g.unshift(...this.prependedPrimaryActions),this.setActions(g,y)}setPrependedPrimaryActions(e){ch(this.prependedPrimaryActions,e,(i,n)=>i===n)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){ch(this.additionalActions,e,(i,n)=>i===n)||(this.additionalActions=e,this.updateToolbar())}};OWe=iUe([rT(3,Dw),rT(4,Zo),rT(5,GC),rT(6,ou),rT(7,ff),rT(8,R0)],OWe);class nUe{constructor(){this._onDidWillResize=new ui,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new ui,this.onDidResize=this._onDidResize.event,this._sashListener=new On,this._size=new eu(0,0),this._minSize=new eu(0,0),this._maxSize=new eu(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new gv(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new gv(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new gv(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:Mve.North}),this._southSash=new gv(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:Mve.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,i=0,n=0;this._sashListener.add(Mr.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,i=0,n=0)})),this._sashListener.add(Mr.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,i=0,n=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(s=>{e&&(n=s.currentX-s.startX,this.layout(e.height+i,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(s=>{e&&(n=-(s.currentX-s.startX),this.layout(e.height+i,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(s=>{e&&(i=-(s.currentY-s.startY),this.layout(e.height+i,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(s=>{e&&(i=s.currentY-s.startY,this.layout(e.height+i,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(Mr.any(this._eastSash.onDidReset,this._westSash.onDidReset)(s=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(Mr.any(this._northSash.onDidReset,this._southSash.onDidReset)(s=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,i,n,s){this._northSash.state=e?3:0,this._eastSash.state=i?3:0,this._southSash.state=n?3:0,this._westSash.state=s?3:0}layout(e=this.size.height,i=this.size.width){const{height:n,width:s}=this._minSize,{height:l,width:d}=this._maxSize;e=Math.max(n,Math.min(l,e)),i=Math.max(s,Math.min(d,i));const f=new eu(i,e);eu.equals(f,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=i+"px",this._size=f,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}const iki=30,nki=24;class rki extends Ii{constructor(e,i=new eu(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new nUe),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=eu.lift(i),this._resizableNode.layout(i.height,i.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(n=>{this._resize(new eu(n.dimension.width,n.dimension.height)),n.done&&(this._isResizing=!1)})),this._register(this._resizableNode.onDidWillResize(()=>{this._isResizing=!0}))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var e;return!((e=this._contentPosition)===null||e===void 0)&&e.position?yi.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const i=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);return!i||!n?void 0:Y_(i).top+n.top-iki}_availableVerticalSpaceBelow(e){const i=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);if(!i||!n)return;const s=Y_(i),l=iR(i.ownerDocument.body),d=s.top+n.top+n.height;return l.height-d-nki}_findPositionPreference(e,i){var n,s;const l=Math.min((n=this._availableVerticalSpaceBelow(i))!==null&&n!==void 0?n:1/0,e),d=Math.min((s=this._availableVerticalSpaceAbove(i))!==null&&s!==void 0?s:1/0,e),f=Math.min(Math.max(d,l),e),g=Math.min(e,f);let y;return this._editor.getOption(60).above?y=g<=d?1:2:y=g<=l?2:1,y===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),y}_resize(e){this._resizableNode.layout(e.height,e.width)}}var ski=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},ame=function(c,e){return function(i,n){e(i,n,c)}},PN;const j1t=30,oki=6;let Tq=PN=class extends rki{get isColorPickerVisible(){var e;return!!(!((e=this._visibleData)===null||e===void 0)&&e.colorPicker)}get isVisibleFromKeyboard(){var e;return((e=this._visibleData)===null||e===void 0?void 0:e.source)===1}get isVisible(){var e;return(e=this._hoverVisibleKey.get())!==null&&e!==void 0?e:!1}get isFocused(){var e;return(e=this._hoverFocusedKey.get())!==null&&e!==void 0?e:!1}constructor(e,i,n,s,l){const d=e.getOption(67)+8,f=150,g=new eu(f,d);super(e,g),this._configurationService=n,this._accessibilityService=s,this._keybindingService=l,this._hover=this._register(new Uje),this._minimumSize=g,this._hoverVisibleKey=Lt.hoverVisible.bindTo(i),this._hoverFocusedKey=Lt.hoverFocused.bindTo(i),zn(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>{this.isVisible&&this._updateMaxDimensions()})),this._register(this._editor.onDidChangeConfiguration(w=>{w.hasChanged(50)&&this._updateFont()}));const y=this._register(IE(this._resizableNode.domNode));this._register(y.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(y.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setHoverData(void 0),this._editor.addContentWidget(this)}dispose(){var e;super.dispose(),(e=this._visibleData)===null||e===void 0||e.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return PN.ID}static _applyDimensions(e,i,n){const s=typeof i=="number"?`${i}px`:i,l=typeof n=="number"?`${n}px`:n;e.style.width=s,e.style.height=l}_setContentsDomNodeDimensions(e,i){const n=this._hover.contentsDomNode;return PN._applyDimensions(n,e,i)}_setContainerDomNodeDimensions(e,i){const n=this._hover.containerDomNode;return PN._applyDimensions(n,e,i)}_setHoverWidgetDimensions(e,i){this._setContentsDomNodeDimensions(e,i),this._setContainerDomNodeDimensions(e,i),this._layoutContentWidget()}static _applyMaxDimensions(e,i,n){const s=typeof i=="number"?`${i}px`:i,l=typeof n=="number"?`${n}px`:n;e.style.maxWidth=s,e.style.maxHeight=l}_setHoverWidgetMaxDimensions(e,i){PN._applyMaxDimensions(this._hover.contentsDomNode,e,i),PN._applyMaxDimensions(this._hover.containerDomNode,e,i),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const i=e.width,n=e.height;this._setHoverWidgetDimensions(i,n)}_updateResizableNodeMaxDimensions(){var e,i;const n=(e=this._findMaximumRenderingWidth())!==null&&e!==void 0?e:1/0,s=(i=this._findMaximumRenderingHeight())!==null&&i!==void 0?i:1/0;this._resizableNode.maxSize=new eu(n,s),this._setHoverWidgetMaxDimensions(n,s)}_resize(e){var i,n;PN._lastDimensions=new eu(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),(n=(i=this._visibleData)===null||i===void 0?void 0:i.colorPicker)===null||n===void 0||n.layout()}_findAvailableSpaceVertically(){var e;const i=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition;if(i)return this._positionPreference===1?this._availableVerticalSpaceAbove(i):this._availableVerticalSpaceBelow(i)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let i=oki;return Array.from(this._hover.contentsDomNode.children).forEach(n=>{i+=n.clientHeight}),Math.min(e,i)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const e=Array.from(this._hover.contentsDomNode.children).some(i=>i.scrollWidth>i.clientWidth);return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const e=this._isHoverTextOverflowing(),i=typeof this._contentWidth>"u"?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidth"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=i,!1;const n=Y_(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=z1t(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,n.left,n.top,n.width,n.height));const s=z1t(e,i,n.left,n.top,n.width,n.height);return s>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,s),!0)}_setHoverData(e){var i;(i=this._visibleData)===null||i===void 0||i.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_updateFont(){const{fontSize:e,lineHeight:i}=this._editor.getOption(50),n=this._hover.contentsDomNode;n.style.fontSize=`${e}px`,n.style.lineHeight=`${i/e}`,Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(l=>this._editor.applyFontInfo(l))}_updateContent(e){const i=this._hover.contentsDomNode;i.style.paddingBottom="",i.textContent="",i.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,PN._lastDimensions.height),i=Math.max(this._editor.getLayoutInfo().width*.66,500,PN._lastDimensions.width);this._setHoverWidgetMaxDimensions(i,e)}_render(e,i){this._setHoverData(i),this._updateFont(),this._updateContent(e),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){var e;return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[(e=this._positionPreference)!==null&&e!==void 0?e:1]}:null}showAt(e,i){var n,s,l,d;if(!this._editor||!this._editor.hasModel())return;this._render(e,i);const f=y4(this._hover.containerDomNode),g=i.showAtPosition;this._positionPreference=(n=this._findPositionPreference(f,g))!==null&&n!==void 0?n:1,this.onContentsChanged(),i.stoleFocus&&this._hover.containerDomNode.focus(),(s=i.colorPicker)===null||s===void 0||s.layout();const w=this._hover.containerDomNode.ownerDocument.activeElement===this._hover.containerDomNode&&Wwt(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(d=(l=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))===null||l===void 0?void 0:l.getAriaLabel())!==null&&d!==void 0?d:"");w&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+w)}hide(){if(!this._visibleData)return;const e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new eu(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}setMinimumDimensions(e){this._minimumSize=new eu(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new eu(e,this._minimumSize.height)}onContentsChanged(){var e;this._removeConstraintsRenderNormally();const i=this._hover.containerDomNode;let n=y4(i),s=OC(i);if(this._resizableNode.layout(n,s),this._setHoverWidgetDimensions(s,n),n=y4(i),s=OC(i),this._contentWidth=s,this._updateMinimumWidth(),this._resizableNode.layout(n,s),!((e=this._visibleData)===null||e===void 0)&&e.showAtPosition){const l=y4(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(l,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,i=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-i.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,i=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+i.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-j1t})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+j1t})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,i=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-i})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,i=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+i})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};Tq.ID="editor.contrib.resizableContentHoverWidget";Tq._lastDimensions=new eu(0,0);Tq=PN=ski([ame(1,Zo),ame(2,El),ame(3,$C),ame(4,ou)],Tq);function z1t(c,e,i,n,s,l){const d=i+s/2,f=n+l/2,g=Math.max(Math.abs(c-d)-s/2,0),y=Math.max(Math.abs(e-f)-l/2,0);return Math.sqrt(g*g+y*y)}let aki=class{constructor(e,i,n){this.value=e,this.isComplete=i,this.hasLoadingMessage=n}};class oTt extends Ii{constructor(e,i){super(),this._editor=e,this._computer=i,this._onResult=this._register(new ui),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new id(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new id(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new id(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,i=!0){this._state=e,i&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=Eni(e=>this._computer.computeAsync(e)),(async()=>{try{for await(const e of this._asyncIterable)e&&(this._result.push(e),this._fireResult());this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(e){Ba(e)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const e=this._state===0,i=this._state===4;this._onResult.fire(new aki(this._result.slice(0),e,i))}start(e){if(e===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}class sFe{constructor(e,i,n,s){this.priority=e,this.range=i,this.initialMousePosX=n,this.initialMousePosY=s,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,i){return e.type===1&&i.lineNumber===this.range.startLineNumber}}class c9{constructor(e,i,n,s,l,d){this.priority=e,this.owner=i,this.range=n,this.initialMousePosX=s,this.initialMousePosY=l,this.supportsMarkerHover=d,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,i){return e.type===2&&this.owner===e.owner}}const PR=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class lki{constructor(e,i,n){this.provider=e,this.hover=i,this.ordinal=n}}async function cki(c,e,i,n,s){const l=await Promise.resolve(c.provideHover(i,n,s)).catch(r_);if(!(!l||!dki(l)))return new lki(c,l,e)}function rUe(c,e,i,n){const l=c.ordered(e).map((d,f)=>cki(d,f,e,i,n));return pp.fromPromises(l).coalesce()}function uki(c,e,i,n){return rUe(c,e,i,n).map(s=>s.hover).toPromise()}kL("_executeHoverProvider",(c,e,i)=>{const n=c.get(js);return uki(n.hoverProvider,e,i,Gl.None)});function dki(c){const e=typeof c.range<"u",i=typeof c.contents<"u"&&c.contents&&c.contents.length>0;return e&&i}var fki=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Dz=function(c,e){return function(i,n){e(i,n,c)}};const _U=Sr,hki=Oh("hover-increase-verbosity",Dr.add,V("increaseHoverVerbosity","Icon for increaseing hover verbosity.")),_ki=Oh("hover-decrease-verbosity",Dr.remove,V("decreaseHoverVerbosity","Icon for decreasing hover verbosity."));class hE{constructor(e,i,n,s,l,d=void 0){this.owner=e,this.range=i,this.contents=n,this.isBeforeContent=s,this.ordinal=l,this.source=d}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}class aTt{constructor(e,i,n){this.hover=e,this.hoverProvider=i,this.hoverPosition=n}supportsVerbosityAction(e){var i,n;switch(e){case cw.Increase:return(i=this.hover.canIncreaseVerbosity)!==null&&i!==void 0?i:!1;case cw.Decrease:return(n=this.hover.canDecreaseVerbosity)!==null&&n!==void 0?n:!1}}}let Hie=class{constructor(e,i,n,s,l,d,f){this._editor=e,this._languageService=i,this._openerService=n,this._configurationService=s,this._languageFeaturesService=l,this._keybindingService=d,this._hoverService=f,this.hoverOrdinal=3}createLoadingMessage(e){return new hE(this,e.range,[new vv().appendText(V("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,i){if(!this._editor.hasModel()||e.type!==1)return[];const n=this._editor.getModel(),s=e.range.startLineNumber,l=n.getLineMaxColumn(s),d=[];let f=1e3;const g=n.getLineLength(s),y=n.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),w=this._editor.getOption(117),x=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:y});let I=!1;w>=0&&g>w&&e.range.startColumn>=w&&(I=!0,d.push(new hE(this,e.range,[{value:V("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,f++))),!I&&typeof x=="number"&&g>=x&&d.push(new hE(this,e.range,[{value:V("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,f++));let P=!1;for(const O of i){const W=O.range.startLineNumber===s?O.range.startColumn:1,X=O.range.endLineNumber===s?O.range.endColumn:l,Z=O.options.hoverMessage;if(!Z||dq(Z))continue;O.options.beforeContentClassName&&(P=!0);const ee=new at(e.range.startLineNumber,W,e.range.startLineNumber,X);d.push(new hE(this,ee,hHe(Z),P,f++))}return d}computeAsync(e,i,n){if(!this._editor.hasModel()||e.type!==1)return pp.EMPTY;const s=this._editor.getModel(),l=this._languageFeaturesService.hoverProvider;return l.has(s)?this._getMarkdownHovers(l,s,e,n):pp.EMPTY}_getMarkdownHovers(e,i,n,s){const l=n.range.getStartPosition();return rUe(e,i,l,s).filter(g=>!dq(g.hover.contents)).map(g=>{const y=g.hover.range?at.lift(g.hover.range):n.range,w=new aTt(g.hover,g.provider,l);return new hE(this,y,g.hover.contents,!1,g.ordinal,w)})}renderHoverParts(e,i){return this._renderedHoverParts=new pki(i,e.fragment,this._editor,this._languageService,this._openerService,this._keybindingService,this._hoverService,this._configurationService,e.onContentsChanged),this._renderedHoverParts}markdownHoverContentAtIndex(e){var i,n;return(n=(i=this._renderedHoverParts)===null||i===void 0?void 0:i.markdownHoverContentAtIndex(e))!==null&&n!==void 0?n:""}doesMarkdownHoverAtIndexSupportVerbosityAction(e,i){var n,s;return(s=(n=this._renderedHoverParts)===null||n===void 0?void 0:n.doesMarkdownHoverAtIndexSupportVerbosityAction(e,i))!==null&&s!==void 0?s:!1}updateMarkdownHoverVerbosityLevel(e,i,n){var s;(s=this._renderedHoverParts)===null||s===void 0||s.updateMarkdownHoverPartVerbosityLevel(e,i,n)}};Hie=fki([Dz(1,If),Dz(2,KC),Dz(3,El),Dz(4,js),Dz(5,ou),Dz(6,DL)],Hie);class pki extends Ii{constructor(e,i,n,s,l,d,f,g,y){super(),this._editor=n,this._languageService=s,this._openerService=l,this._keybindingService=d,this._hoverService=f,this._configurationService=g,this._onFinishedRendering=y,this._focusedHoverPartIndex=-1,this._ongoingHoverOperations=new Map,this._renderedHoverParts=this._renderHoverParts(e,i,this._onFinishedRendering),this._register(go(()=>{this._renderedHoverParts.forEach(w=>{w.disposables.dispose()})})),this._register(go(()=>{this._ongoingHoverOperations.forEach(w=>{w.tokenSource.dispose(!0)})}))}_renderHoverParts(e,i,n){return e.sort(kb(s=>s.ordinal,uT)),e.map((s,l)=>{const d=this._renderHoverPart(l,s.contents,s.source,n);return i.appendChild(d.renderedMarkdown),d})}_renderHoverPart(e,i,n,s){const{renderedMarkdown:l,disposables:d}=this._renderMarkdownContent(i,s);if(!n)return{renderedMarkdown:l,disposables:d};const f=n.supportsVerbosityAction(cw.Increase),g=n.supportsVerbosityAction(cw.Decrease);if(!f&&!g)return{renderedMarkdown:l,disposables:d,hoverSource:n};const y=_U("div.verbosity-actions");return l.prepend(y),d.add(this._renderHoverExpansionAction(y,cw.Increase,f)),d.add(this._renderHoverExpansionAction(y,cw.Decrease,g)),this._register(tn(l,yr.FOCUS_IN,w=>{w.stopPropagation(),this._focusedHoverPartIndex=e})),this._register(tn(l,yr.FOCUS_OUT,w=>{w.stopPropagation(),this._focusedHoverPartIndex=-1})),{renderedMarkdown:l,disposables:d,hoverSource:n}}_renderMarkdownContent(e,i){const n=_U("div.hover-row");n.tabIndex=0;const s=_U("div.hover-row-contents");n.appendChild(s);const l=new On;return l.add(lTt(this._editor,s,e,this._languageService,this._openerService,i)),{renderedMarkdown:n,disposables:l}}_renderHoverExpansionAction(e,i,n){const s=new On,l=i===cw.Increase,d=zn(e,_U(Uo.asCSSSelector(l?hki:_ki)));d.tabIndex=0;const f=new uq("mouse",!1,{target:e,position:{hoverPosition:0}},this._configurationService,this._hoverService);if(s.add(this._hoverService.setupUpdatableHover(f,d,mki(this._keybindingService,i))),!n)return d.classList.add("disabled"),s;d.classList.add("enabled");const g=()=>this.updateMarkdownHoverPartVerbosityLevel(i);return s.add(new Vwt(d,g)),s.add(new Hwt(d,g,[3,10])),s}async updateMarkdownHoverPartVerbosityLevel(e,i=-1,n=!0){var s;const l=this._editor.getModel();if(!l)return;const d=i!==-1?i:this._focusedHoverPartIndex,f=this._getRenderedHoverPartAtIndex(d);if(!f||!(!((s=f.hoverSource)===null||s===void 0)&&s.supportsVerbosityAction(e)))return;const g=f.hoverSource,y=await this._fetchHover(g,l,e);if(!y)return;const w=new aTt(y,g.hoverProvider,g.hoverPosition),x=this._renderHoverPart(d,y.contents,w,this._onFinishedRendering);this._replaceRenderedHoverPartAtIndex(d,x),n&&this._focusOnHoverPartWithIndex(d),this._onFinishedRendering()}markdownHoverContentAtIndex(e){var i;const n=this._getRenderedHoverPartAtIndex(e);return(i=n==null?void 0:n.renderedMarkdown.innerText)!==null&&i!==void 0?i:""}doesMarkdownHoverAtIndexSupportVerbosityAction(e,i){var n;const s=this._getRenderedHoverPartAtIndex(e);return!(!s||!(!((n=s.hoverSource)===null||n===void 0)&&n.supportsVerbosityAction(i)))}async _fetchHover(e,i,n){let s=n===cw.Increase?1:-1;const l=e.hoverProvider,d=this._ongoingHoverOperations.get(l);d&&(d.tokenSource.cancel(),s+=d.verbosityDelta);const f=new uh;this._ongoingHoverOperations.set(l,{verbosityDelta:s,tokenSource:f});const g={verbosityRequest:{verbosityDelta:s,previousHover:e.hover}};let y;try{y=await Promise.resolve(l.provideHover(i,e.hoverPosition,f.token,g))}catch(w){r_(w)}return f.dispose(),this._ongoingHoverOperations.delete(l),y}_replaceRenderedHoverPartAtIndex(e,i){if(e>=this._renderHoverParts.length||e<0)return;const n=this._renderedHoverParts[e];n.renderedMarkdown.replaceWith(i.renderedMarkdown),n.disposables.dispose(),this._renderedHoverParts[e]=i}_focusOnHoverPartWithIndex(e){this._renderedHoverParts[e].renderedMarkdown.focus()}_getRenderedHoverPartAtIndex(e){return this._renderedHoverParts[e]}}function gki(c,e,i,n,s){e.sort(kb(d=>d.ordinal,uT));const l=new On;for(const d of e)l.add(lTt(i,c.fragment,d.contents,n,s,c.onContentsChanged));return l}function lTt(c,e,i,n,s,l){const d=new On;for(const f of i){if(dq(f))continue;const g=_U("div.markdown-hover"),y=zn(g,_U("div.hover-contents")),w=d.add(new gL({editor:c},n,s));d.add(w.onDidRenderAsync(()=>{y.className="hover-contents code-hover-contents",l()}));const x=d.add(w.render(f));y.appendChild(x.element),e.appendChild(g)}return d}function mki(c,e){switch(e){case cw.Increase:{const i=c.lookupKeybinding(obe);return i?V("increaseVerbosityWithKb","Increase Hover Verbosity ({0})",i.getLabel()):V("increaseVerbosity","Increase Hover Verbosity")}case cw.Decrease:{const i=c.lookupKeybinding(abe);return i?V("decreaseVerbosityWithKb","Decrease Hover Verbosity ({0})",i.getLabel()):V("decreaseVerbosity","Decrease Hover Verbosity")}}}function MWe(c,e){return!!c[e]}class oFe{constructor(e,i){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=MWe(e.event,i.triggerModifier),this.hasSideBySideModifier=MWe(e.event,i.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class U1t{constructor(e,i){this.keyCodeIsTriggerKey=e.keyCode===i.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===i.triggerSideBySideKey,this.hasTriggerModifier=MWe(e,i.triggerModifier)}}class lme{constructor(e,i,n,s){this.triggerKey=e,this.triggerModifier=i,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=s}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function q1t(c){return c==="altKey"?Wl?new lme(57,"metaKey",6,"altKey"):new lme(5,"ctrlKey",6,"altKey"):Wl?new lme(6,"altKey",57,"metaKey"):new lme(6,"altKey",5,"ctrlKey")}class lbe extends Ii{constructor(e,i){var n;super(),this._onMouseMoveOrRelevantKeyDown=this._register(new ui),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new ui),this.onExecute=this._onExecute.event,this._onCancel=this._register(new ui),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=(n=i==null?void 0:i.extractLineNumberFromMouseEvent)!==null&&n!==void 0?n:s=>s.target.position?s.target.position.lineNumber:0,this._opts=q1t(this._editor.getOption(78)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(s=>{if(s.hasChanged(78)){const l=q1t(this._editor.getOption(78));if(this._opts.equals(l))return;this._opts=l,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(s=>this._onEditorMouseMove(new oFe(s,this._opts)))),this._register(this._editor.onMouseDown(s=>this._onEditorMouseDown(new oFe(s,this._opts)))),this._register(this._editor.onMouseUp(s=>this._onEditorMouseUp(new oFe(s,this._opts)))),this._register(this._editor.onKeyDown(s=>this._onEditorKeyDown(new U1t(s,this._opts)))),this._register(this._editor.onKeyUp(s=>this._onEditorKeyUp(new U1t(s,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(s=>this._onDidChangeCursorSelection(s))),this._register(this._editor.onDidChangeModel(s=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(s=>{(s.scrollTopChanged||s.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const i=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===i&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}class cTt{constructor(e,i){this.range=e,this.direction=i}}class sUe{constructor(e,i,n){this.hint=e,this.anchor=i,this.provider=n,this._isResolved=!1}with(e){const i=new sUe(this.hint,e.anchor,this.provider);return i._isResolved=this._isResolved,i._currentResolve=this._currentResolve,i}async resolve(e){if(typeof this.provider.resolveInlayHint=="function"){if(this._currentResolve)return await this._currentResolve,e.isCancellationRequested?void 0:this.resolve(e);this._isResolved||(this._currentResolve=this._doResolve(e).finally(()=>this._currentResolve=void 0)),await this._currentResolve}}async _doResolve(e){var i,n,s;try{const l=await Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=(i=l==null?void 0:l.tooltip)!==null&&i!==void 0?i:this.hint.tooltip,this.hint.label=(n=l==null?void 0:l.label)!==null&&n!==void 0?n:this.hint.label,this.hint.textEdits=(s=l==null?void 0:l.textEdits)!==null&&s!==void 0?s:this.hint.textEdits,this._isResolved=!0}catch(l){r_(l),this._isResolved=!1}}}class u9{static async create(e,i,n,s){const l=[],d=e.ordered(i).reverse().map(f=>n.map(async g=>{try{const y=await f.provideInlayHints(i,g,s);(y!=null&&y.hints.length||f.onDidChangeInlayHints)&&l.push([y??u9._emptyInlayHintList,f])}catch(y){r_(y)}}));if(await Promise.all(d.flat()),s.isCancellationRequested||i.isDisposed())throw new DE;return new u9(n,l,i)}constructor(e,i,n){this._disposables=new On,this.ranges=e,this.provider=new Set;const s=[];for(const[l,d]of i){this._disposables.add(l),this.provider.add(d);for(const f of l.hints){const g=n.validatePosition(f.position);let y="before";const w=u9._getRangeAtPosition(n,g);let x;w.getStartPosition().isBefore(g)?(x=at.fromPositions(w.getStartPosition(),g),y="after"):(x=at.fromPositions(g,w.getEndPosition()),y="before"),s.push(new sUe(f,new cTt(x,y),d))}}this.items=s.sort((l,d)=>yi.compare(l.hint.position,d.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,i){const n=i.lineNumber,s=e.getWordAtPosition(i);if(s)return new at(n,s.startColumn,n,s.endColumn);e.tokenization.tokenizeIfCheap(n);const l=e.tokenization.getLineTokens(n),d=i.column-1,f=l.findTokenIndexAtOffset(d);let g=l.getStartOffset(f),y=l.getEndOffset(f);return y-g===1&&(g===d&&f>1?(g=l.getStartOffset(f-1),y=l.getEndOffset(f-1)):y===d&&f=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},XA=function(c,e){return function(i,n){e(i,n,c)}};let pR=class extends cq{constructor(e,i,n,s,l,d,f,g,y,w,x,I,P){super(e,{...s.getRawOptions(),overflowWidgetsDomNode:s.getOverflowWidgetsDomNode()},n,l,d,f,g,y,w,x,I,P),this._parentEditor=s,this._overwriteOptions=i,super.updateOptions(this._overwriteOptions),this._register(s.onDidChangeConfiguration(O=>this._onParentConfigurationChanged(O)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){L1e(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};pR=yki([XA(4,So),XA(5,Oc),XA(6,ff),XA(7,Zo),XA(8,og),XA(9,L_),XA(10,$C),XA(11,Kd),XA(12,js)],pR);const $1t=new Qi(new bc(0,122,204)),bki={showArrow:!0,showFrame:!0,className:"",frameColor:$1t,arrowColor:$1t,keepEditorSelection:!1},Cki="vs.editor.contrib.zoneWidget";class Ski{constructor(e,i,n,s,l,d,f,g){this.id="",this.domNode=e,this.afterLineNumber=i,this.afterColumn=n,this.heightInLines=s,this.showInHiddenAreas=f,this.ordinal=g,this._onDomNodeTop=l,this._onComputedHeight=d}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class wki{constructor(e,i){this._id=e,this._domNode=i}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class cbe{constructor(e){this._editor=e,this._ruleName=cbe._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),z5e(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){z5e(this._ruleName),H0e(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px !important; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:at.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}cbe._IdGenerator=new Yje(".arrow-decoration-");class xki{constructor(e,i={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new On,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=o4(i),L1e(this.options,bki,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(n=>{const s=this._getWidth(n);this.domNode.style.width=s+"px",this.domNode.style.left=this._getLeft(n)+"px",this._onWidth(s)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new cbe(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var i;if(this.domNode.style.height=`${e}px`,this.container){const n=e-this._decoratingElementsHeight();this.container.style.height=`${n}px`;const s=this.editor.getLayoutInfo();this._doLayout(n,this._getWidth(s))}(i=this._resizeSash)===null||i===void 0||i.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,i){const n=at.isIRange(e)?at.lift(e):at.fromPositions(e);this._isShowing=!0,this._showImpl(n,i),this._isShowing=!1,this._positionMarkerId.set([{range:n,options:Xa.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(i=>{this._viewZone&&i.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(e=this._arrow)===null||e===void 0||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(67);let i=0;if(this.options.showArrow){const n=Math.round(e/3);i+=2*n}if(this.options.showFrame){const n=Math.round(e/9);i+=2*n}return i}_showImpl(e,i){const n=e.getStartPosition(),s=this.editor.getLayoutInfo(),l=this._getWidth(s);this.domNode.style.width=`${l}px`,this.domNode.style.left=this._getLeft(s)+"px";const d=document.createElement("div");d.style.overflow="hidden";const f=this.editor.getOption(67);if(!this.options.allowUnlimitedHeight){const I=Math.max(12,this.editor.getLayoutInfo().height/f*.8);i=Math.min(i,I)}let g=0,y=0;if(this._arrow&&this.options.showArrow&&(g=Math.round(f/3),this._arrow.height=g,this._arrow.show(n)),this.options.showFrame&&(y=Math.round(f/9)),this.editor.changeViewZones(I=>{this._viewZone&&I.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new Ski(d,n.lineNumber,n.column,i,P=>this._onViewZoneTop(P),P=>this._onViewZoneHeight(P),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=I.addZone(this._viewZone),this._overlayWidget=new wki(Cki+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const I=this.options.frameWidth?this.options.frameWidth:y;this.container.style.borderTopWidth=I+"px",this.container.style.borderBottomWidth=I+"px"}const w=i*f-this._decoratingElementsHeight();this.container&&(this.container.style.top=g+"px",this.container.style.height=w+"px",this.container.style.overflow="hidden"),this._doLayout(w,l),this.options.keepEditorSelection||this.editor.setSelection(e);const x=this.editor.getModel();if(x){const I=x.validateRange(new at(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(I,I.startLineNumber===x.getLineCount())}}revealRange(e,i){i?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,i){this.container&&(i&&this.container.classList.remove(i),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,i){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(i=>{this._viewZone&&(this._viewZone.heightInLines=e,i.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new gv(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(i=>{this._viewZone&&(e={startY:i.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(i=>{if(e){const n=(i.currentY-e.startY)/this.editor.getOption(67),s=n<0?Math.ceil(n):Math.floor(n),l=e.heightInLines+s;l>5&&l<35&&this._relayout(l)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var uTt=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},dTt=function(c,e){return function(i,n){e(i,n,c)}};const fTt=Kl("IPeekViewService");dc(fTt,class{constructor(){this._widgets=new Map}addExclusiveWidget(c,e){const i=this._widgets.get(c);i&&(i.listener.dispose(),i.widget.dispose());const n=()=>{const s=this._widgets.get(c);s&&s.widget===e&&(s.listener.dispose(),this._widgets.delete(c))};this._widgets.set(c,{widget:e,listener:e.onDidClose(n)})}},1);var Nb;(function(c){c.inPeekEditor=new Xr("inReferenceSearchEditor",!0,V("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),c.notInPeekEditor=c.inPeekEditor.toNegated()})(Nb||(Nb={}));let jie=class{constructor(e,i){e instanceof pR&&Nb.inPeekEditor.bindTo(i)}dispose(){}};jie.ID="editor.contrib.referenceController";jie=uTt([dTt(1,Zo)],jie);Bc(jie.ID,jie,0);function kki(c){const e=c.get(Oc).getFocusedCodeEditor();return e instanceof pR?e.getParentEditor():e}const Tki={headerBackgroundColor:Qi.white,primaryHeadingColor:Qi.fromHex("#333333"),secondaryHeadingColor:Qi.fromHex("#6c6c6cb3")};let f1e=class extends xki{constructor(e,i,n){super(e,i),this.instantiationService=n,this._onDidClose=new ui,this.onDidClose=this._onDidClose.event,L1e(this.options,Tki,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const i=this.options;e.headerBackgroundColor&&(i.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(i.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(i.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=Sr(".head"),this._bodyElement=Sr(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,i){this._titleElement=Sr(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),n_(this._titleElement,"click",l=>this._onTitleClick(l))),zn(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=Sr("span.filename"),this._secondaryHeading=Sr("span.dirname"),this._metaHeading=Sr("span.meta"),zn(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const n=Sr(".peekview-actions");zn(this._headElement,n);const s=this._getActionBarOptions();this._actionbarWidget=new uk(n,s),this._disposables.add(this._actionbarWidget),i||this._actionbarWidget.push(new WC("peekview.close",V("label.close","Close"),Uo.asClassName(Dr.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:wxt.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,i){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),i?this._secondaryHeading.innerText=i:n0(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,RC(this._metaHeading)):_y(this._metaHeading))}_doLayout(e,i){if(!this._isShowing&&e<0){this.dispose();return}const n=Math.ceil(this.editor.getOption(67)*1.2),s=Math.round(e-(n+2));this._doLayoutHead(n,i),this._doLayoutBody(s,i)}_doLayoutHead(e,i){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,i){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};f1e=uTt([dTt(2,So)],f1e);const Dki=Ft("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:Qi.black,hcLight:Qi.white},V("peekViewTitleBackground","Background color of the peek view title area.")),hTt=Ft("peekViewTitleLabel.foreground",{dark:Qi.white,light:Qi.black,hcDark:Qi.white,hcLight:tk},V("peekViewTitleForeground","Color of the peek view title.")),_Tt=Ft("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},V("peekViewTitleInfoForeground","Color of the peek view title info.")),Eki=Ft("peekView.border",{dark:xb,light:xb,hcDark:ec,hcLight:ec},V("peekViewBorder","Color of the peek view borders and arrow.")),Iki=Ft("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:Qi.black,hcLight:Qi.white},V("peekViewResultsBackground","Background color of the peek view result list."));Ft("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:Qi.white,hcLight:tk},V("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));Ft("peekViewResult.fileForeground",{dark:Qi.white,light:"#1E1E1E",hcDark:Qi.white,hcLight:tk},V("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));Ft("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},V("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));Ft("peekViewResult.selectionForeground",{dark:Qi.white,light:"#6C6C6C",hcDark:Qi.white,hcLight:tk},V("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const AM=Ft("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:Qi.black,hcLight:Qi.white},V("peekViewEditorBackground","Background color of the peek view editor."));Ft("peekViewEditorGutter.background",{dark:AM,light:AM,hcDark:AM,hcLight:AM},V("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));Ft("peekViewEditorStickyScroll.background",{dark:AM,light:AM,hcDark:AM,hcLight:AM},V("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor."));Ft("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},V("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));Ft("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},V("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));Ft("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:bf,hcLight:bf},V("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));class gR{constructor(e,i,n,s){this.isProviderFirst=e,this.parent=i,this.link=n,this._rangeCallback=s,this.id=K9e.nextId()}get uri(){return this.link.uri}get range(){var e,i;return(i=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&i!==void 0?i:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const i=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return i?V({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"{0} in {1} on line {2} at column {3}",i.value,lk(this.uri),this.range.startLineNumber,this.range.startColumn):V("aria.oneReference","in {0} on line {1} at column {2}",lk(this.uri),this.range.startLineNumber,this.range.startColumn)}}class Nki{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,i=8){const n=this._modelReference.object.textEditorModel;if(!n)return;const{startLineNumber:s,startColumn:l,endLineNumber:d,endColumn:f}=e,g=n.getWordUntilPosition({lineNumber:s,column:l-i}),y=new at(s,g.startColumn,s,l),w=new at(d,f,d,1073741824),x=n.getValueInRange(y).replace(/^\s+/,""),I=n.getValueInRange(e),P=n.getValueInRange(w).replace(/\s+$/,"");return{value:x+I+P,highlight:{start:x.length,end:x.length+I.length}}}}class zie{constructor(e,i){this.parent=e,this.uri=i,this.children=[],this._previews=new E_}dispose(){yd(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?V("aria.fileReferences.1","1 symbol in {0}, full path {1}",lk(this.uri),this.uri.fsPath):V("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,lk(this.uri),this.uri.fsPath)}async resolve(e){if(this._previews.size!==0)return this;for(const i of this.children)if(!this._previews.has(i.uri))try{const n=await e.createModelReference(i.uri);this._previews.set(i.uri,new Nki(n))}catch(n){Ba(n)}return this}}class HC{constructor(e,i){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new ui,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=i;const[n]=e;e.sort(HC._compareReferences);let s;for(const l of e)if((!s||!Cf.isEqual(s.uri,l.uri,!0))&&(s=new zie(this,l.uri),this.groups.push(s)),s.children.length===0||HC._compareReferences(l,s.children[s.children.length-1])!==0){const d=new gR(n===l,s,l,f=>this._onDidChangeReferenceRange.fire(f));this.references.push(d),s.children.push(d)}}dispose(){yd(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new HC(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?V("aria.result.0","No results found"):this.references.length===1?V("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?V("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):V("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,i){const{parent:n}=e;let s=n.children.indexOf(e);const l=n.children.length,d=n.parent.groups.length;return d===1||i&&s+10?(i?s=(s+1)%l:s=(s+l-1)%l,n.children[s]):(s=n.parent.groups.indexOf(n),i?(s=(s+1)%d,n.parent.groups[s].children[0]):(s=(s+d-1)%d,n.parent.groups[s].children[n.parent.groups[s].children.length-1]))}nearestReference(e,i){const n=this.references.map((s,l)=>({idx:l,prefixLen:YM(s.uri.toString(),e.toString()),offsetDist:Math.abs(s.range.startLineNumber-i.lineNumber)*100+Math.abs(s.range.startColumn-i.column)})).sort((s,l)=>s.prefixLen>l.prefixLen?-1:s.prefixLenl.offsetDist?1:0)[0];if(n)return this.references[n.idx]}referenceAt(e,i){for(const n of this.references)if(n.uri.toString()===e.toString()&&at.containsPosition(n.range,i))return n}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,i){return Cf.compare(e.uri,i.uri)||at.compareRangesUsingStarts(e.range,i.range)}}var ube=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},dbe=function(c,e){return function(i,n){e(i,n,c)}},RWe;let FWe=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof HC||e instanceof zie}getChildren(e){if(e instanceof HC)return e.groups;if(e instanceof zie)return e.resolve(this._resolverService).then(i=>i.children);throw new Error("bad tree")}};FWe=ube([dbe(0,Lb)],FWe);class Lki{getHeight(){return 23}getTemplateId(e){return e instanceof zie?Uie.id:tre.id}}let BWe=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var i;if(e instanceof gR){const n=(i=e.parent.getPreview(e))===null||i===void 0?void 0:i.preview(e.range);if(n)return n.value}return lk(e.uri)}};BWe=ube([dbe(0,ou)],BWe);class Pki{getId(e){return e instanceof gR?e.id:e.uri}}let WWe=class extends Ii{constructor(e,i){super(),this._labelService=i;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new zve(n,{supportHighlights:!0})),this.badge=new EBe(zn(n,Sr(".count")),{},Cxt),e.appendChild(n)}set(e,i){const n=gye(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(n,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:i});const s=e.children.length;this.badge.setCount(s),s>1?this.badge.setTitleFormat(V("referencesCount","{0} references",s)):this.badge.setTitleFormat(V("referenceCount","{0} reference",s))}};WWe=ube([dbe(1,hq)],WWe);let Uie=RWe=class{constructor(e){this._instantiationService=e,this.templateId=RWe.id}renderTemplate(e){return this._instantiationService.createInstance(WWe,e)}renderElement(e,i,n){n.set(e.element,Rne(e.filterData))}disposeTemplate(e){e.dispose()}};Uie.id="FileReferencesRenderer";Uie=RWe=ube([dbe(0,So)],Uie);class Aki extends Ii{constructor(e){super(),this.label=this._register(new qM(e))}set(e,i){var n;const s=(n=e.parent.getPreview(e))===null||n===void 0?void 0:n.preview(e.range);if(!s||!s.value)this.label.set(`${lk(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:l,highlight:d}=s;i&&!wE.isDefault(i)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(l,Rne(i))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(l,[d]))}}}class tre{constructor(){this.templateId=tre.id}renderTemplate(e){return new Aki(e)}renderElement(e,i,n){n.set(e.element,e.filterData)}disposeTemplate(e){e.dispose()}}tre.id="OneReferenceRenderer";class Oki{getWidgetAriaLabel(){return V("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var Mki=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},ZA=function(c,e){return function(i,n){e(i,n,c)}};class fbe{constructor(e,i){this._editor=e,this._model=i,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new On,this._callOnModelChange=new On,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e){for(const i of this._model.references)if(i.uri.toString()===e.uri.toString()){this._addDecorations(i.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const i=[],n=[];for(let s=0,l=e.children.length;s{const l=s.deltaDecorations([],i);for(let d=0;d{l.equals(9)&&(this._keybindingService.dispatchEvent(l,l.target),l.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(Fki,"ReferencesWidget",this._treeContainer,new Lki,[this._instantiationService.createInstance(Uie),this._instantiationService.createInstance(tre)],this._instantiationService.createInstance(FWe),n),this._splitView.addView({onDidChange:Mr.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:l=>{this._preview.layout({height:this._dim.height,width:l})}},Fve.Distribute),this._splitView.addView({onDidChange:Mr.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:l=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${l}px`,this._tree.layout(this._dim.height,l)}},Fve.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const s=(l,d)=>{l instanceof gR&&(d==="show"&&this._revealReference(l,!1),this._onDidSelectReference.fire({element:l,kind:d,source:"tree"}))};this._tree.onDidOpen(l=>{l.sideBySide?s(l.element,"side"):l.editorOptions.pinned?s(l.element,"goto"):s(l.element,"show")}),_y(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,i){super._doLayoutBody(e,i),this._dim=new eu(i,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(i),this._splitView.resizeView(0,i*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=V("noResults","No results"),RC(this._messageContainer),Promise.resolve(void 0)):(_y(this._messageContainer),this._decorationsManager=new fbe(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{const{event:i,target:n}=e;if(i.detail!==2)return;const s=this._getFocusedReference();s&&this._onDidSelectReference.fire({element:{uri:s.uri,range:n.range},kind:i.ctrlKey||i.metaKey||i.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),RC(this._treeContainer),RC(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof gR)return e;if(e instanceof zie&&e.children.length>0)return e.children[0]}async revealReference(e){await this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}async _revealReference(e,i){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==wa.inMemory?this.setTitle(Jfi(e.uri),this._uriLabel.getUriLabel(gye(e.uri))):this.setTitle(V("peekView.alternateTitle","References"));const n=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(i&&this._tree.reveal(e.parent),await this._tree.expand(e.parent),this._tree.reveal(e));const s=await n;if(!this._model){s.dispose();return}yd(this._previewModelReference);const l=s.object;if(l){const d=this._preview.getModel()===l.textEditorModel?0:1,f=at.lift(e.range).collapseToStart();this._previewModelReference=s,this._preview.setModel(l.textEditorModel),this._preview.setSelection(f),this._preview.revealRangeInCenter(f,d)}else this._preview.setModel(this._previewNotAvailableMessage),s.dispose()}};VWe=Mki([ZA(3,og),ZA(4,Lb),ZA(5,So),ZA(6,fTt),ZA(7,hq),ZA(8,mye),ZA(9,ou),ZA(10,If),ZA(11,Kd)],VWe);var Bki=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Ez=function(c,e){return function(i,n){e(i,n,c)}},p0e;const cB=new Xr("referenceSearchVisible",!1,V("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let mR=p0e=class{static get(e){return e.getContribution(p0e.ID)}constructor(e,i,n,s,l,d,f,g){this._defaultTreeKeyboardSupport=e,this._editor=i,this._editorService=s,this._notificationService=l,this._instantiationService=d,this._storageService=f,this._configurationService=g,this._disposables=new On,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=cB.bindTo(n)}dispose(){var e,i;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(i=this._model)===null||i===void 0||i.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,i,n){let s;if(this._widget&&(s=this._widget.position),this.closeWidget(),s&&e.containsPosition(s))return;this._peekMode=n,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const l="peekViewLayout",d=Rki.fromJSON(this._storageService.get(l,0,"{}"));this._widget=this._instantiationService.createInstance(VWe,this._editor,this._defaultTreeKeyboardSupport,d),this._widget.setTitle(V("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{i.cancel(),this._widget&&(this._storageService.store(l,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(g=>{const{element:y,kind:w}=g;if(y)switch(w){case"open":(g.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(y,!1,!1);break;case"side":this.openReference(y,!0,!1);break;case"goto":n?this._gotoReference(y,!0):this.openReference(y,!1,!0);break}}));const f=++this._requestIdPool;i.then(g=>{var y;if(f!==this._requestIdPool||!this._widget){g.dispose();return}return(y=this._model)===null||y===void 0||y.dispose(),this._model=g,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(V("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const w=this._editor.getModel().uri,x=new yi(e.startLineNumber,e.startColumn),I=this._model.nearestReference(w,x);if(I)return this._widget.setSelection(I).then(()=>{this._widget&&this._editor.getOption(87)==="editor"&&this._widget.focusOnPreviewEditor()})}})},g=>{this._notificationService.error(g)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}async goToNextOrPreviousReference(e){if(!this._editor.hasModel()||!this._model||!this._widget)return;const i=this._widget.position;if(!i)return;const n=this._model.nearestReference(this._editor.getModel().uri,i);if(!n)return;const s=this._model.nextOrPreviousReference(n,e),l=this._editor.hasTextFocus(),d=this._widget.isPreviewEditorFocused();await this._widget.setSelection(s),await this._gotoReference(s,!1),l?this._editor.focus():this._widget&&d&&this._widget.focusOnPreviewEditor()}async revealReference(e){!this._editor.hasModel()||!this._model||!this._widget||await this._widget.revealReference(e)}closeWidget(e=!0){var i,n;(i=this._widget)===null||i===void 0||i.dispose(),(n=this._model)===null||n===void 0||n.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,i){var n;(n=this._widget)===null||n===void 0||n.hide(),this._ignoreModelChangeEvent=!0;const s=at.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:s,selectionSource:"code.jump",pinned:i}},this._editor).then(l=>{var d;if(this._ignoreModelChangeEvent=!1,!l||!this._widget){this.closeWidget();return}if(this._editor===l)this._widget.show(s),this._widget.focusOnReferenceTree();else{const f=p0e.get(l),g=this._model.clone();this.closeWidget(),l.focus(),f==null||f.toggleWidget(s,Hg(y=>Promise.resolve(g)),(d=this._peekMode)!==null&&d!==void 0?d:!1)}},l=>{this._ignoreModelChangeEvent=!1,Ba(l)})}openReference(e,i,n){i||this.closeWidget();const{uri:s,range:l}=e;this._editorService.openCodeEditor({resource:s,options:{selection:l,selectionSource:"code.jump",pinned:n}},this._editor,i)}};mR.ID="editor.contrib.referencesController";mR=p0e=Bki([Ez(2,Zo),Ez(3,Oc),Ez(4,L_),Ez(5,So),Ez(6,mT),Ez(7,El)],mR);function uB(c,e){const i=kki(c);if(!i)return;const n=mR.get(i);n&&e(n)}Ey.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:qp(2089,60),when:xn.or(cB,Nb.inPeekEditor),handler(c){uB(c,e=>{e.changeFocusBetweenPreviewAndReferences()})}});Ey.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:xn.or(cB,Nb.inPeekEditor),handler(c){uB(c,e=>{e.goToNextOrPreviousReference(!0)})}});Ey.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:xn.or(cB,Nb.inPeekEditor),handler(c){uB(c,e=>{e.goToNextOrPreviousReference(!1)})}});uc.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");uc.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");uc.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");uc.registerCommand("closeReferenceSearch",c=>uB(c,e=>e.closeWidget()));Ey.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:xn.and(Nb.inPeekEditor,xn.not("config.editor.stablePeek"))});Ey.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:xn.and(cB,xn.not("config.editor.stablePeek"),xn.or(Lt.editorTextFocus,qxt.negate()))});Ey.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:xn.and(cB,Gxt,yze.negate(),bze.negate()),handler(c){var e;const n=(e=c.get(gk).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof gR&&uB(c,s=>s.revealReference(n[0]))}});Ey.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:xn.and(cB,Gxt,yze.negate(),bze.negate()),handler(c){var e;const n=(e=c.get(gk).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof gR&&uB(c,s=>s.openReference(n[0],!0,!0))}});uc.registerCommand("openReference",c=>{var e;const n=(e=c.get(gk).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof gR&&uB(c,s=>s.openReference(n[0],!1,!0))});var pTt=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Vee=function(c,e){return function(i,n){e(i,n,c)}};const oUe=new Xr("hasSymbols",!1,V("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),hbe=Kl("ISymbolNavigationService");let HWe=class{constructor(e,i,n,s){this._editorService=i,this._notificationService=n,this._keybindingService=s,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=oUe.bindTo(e)}reset(){var e,i;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(i=this._currentMessage)===null||i===void 0||i.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const i=e.parent.parent;if(i.references.length<=1){this.reset();return}this._currentModel=i,this._currentIdx=i.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const n=new jWe(this._editorService),s=n.onDidChange(l=>{if(this._ignoreEditorChange)return;const d=this._editorService.getActiveCodeEditor();if(!d)return;const f=d.getModel(),g=d.getPosition();if(!f||!g)return;let y=!1,w=!1;for(const x of i.references)if(Dje(x.uri,f.uri))y=!0,w=w||at.containsPosition(x.range,g);else if(y)break;(!y||!w)&&this.reset()});this._currentState=dT(n,s)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const i=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:i.uri,options:{selection:at.collapseToStart(i.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const i=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),n=i?V("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,i.getLabel()):V("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(n)}};HWe=pTt([Vee(0,Zo),Vee(1,Oc),Vee(2,L_),Vee(3,ou)],HWe);dc(hbe,HWe,1);qr(new class extends sg{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:oUe,kbOpts:{weight:100,primary:70}})}runEditorCommand(c,e){return c.get(hbe).revealNext(e)}});Ey.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:oUe,primary:9,handler(c){c.get(hbe).reset()}});let jWe=class{constructor(e){this._listener=new Map,this._disposables=new On,this._onDidChange=new ui,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),yd(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,dT(e.onDidChangeCursorPosition(i=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(i=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var i;(i=this._listener.get(e))===null||i===void 0||i.dispose(),this._listener.delete(e)}};jWe=pTt([Vee(0,Oc)],jWe);function zWe(c,e){return e.uri.scheme===c.uri.scheme?!0:!j5e(e.uri,wa.walkThroughSnippet,wa.vscodeChatCodeBlock,wa.vscodeChatCodeCompareBlock,wa.vscodeCopilotBackingChatCodeBlock)}async function ire(c,e,i,n){const l=i.ordered(c).map(f=>Promise.resolve(n(f,c,e)).then(void 0,g=>{r_(g)})),d=await Promise.all(l);return kE(d.flat()).filter(f=>zWe(c,f))}function _be(c,e,i,n){return ire(e,i,c,(s,l,d)=>s.provideDefinition(l,d,n))}function gTt(c,e,i,n){return ire(e,i,c,(s,l,d)=>s.provideDeclaration(l,d,n))}function mTt(c,e,i,n){return ire(e,i,c,(s,l,d)=>s.provideImplementation(l,d,n))}function vTt(c,e,i,n){return ire(e,i,c,(s,l,d)=>s.provideTypeDefinition(l,d,n))}function pbe(c,e,i,n,s){return ire(e,i,c,async(l,d,f)=>{var g,y;const w=(g=await l.provideReferences(d,f,{includeDeclaration:!0},s))===null||g===void 0?void 0:g.filter(I=>zWe(d,I));if(!n||!w||w.length!==2)return w;const x=(y=await l.provideReferences(d,f,{includeDeclaration:!1},s))===null||y===void 0?void 0:y.filter(I=>zWe(d,I));return x&&x.length===1?x:w})}async function nre(c){const e=await c(),i=new HC(e,""),n=i.references.map(s=>s.link);return i.dispose(),n}kL("_executeDefinitionProvider",(c,e,i)=>{const n=c.get(js),s=_be(n.definitionProvider,e,i,Gl.None);return nre(()=>s)});kL("_executeTypeDefinitionProvider",(c,e,i)=>{const n=c.get(js),s=vTt(n.typeDefinitionProvider,e,i,Gl.None);return nre(()=>s)});kL("_executeDeclarationProvider",(c,e,i)=>{const n=c.get(js),s=gTt(n.declarationProvider,e,i,Gl.None);return nre(()=>s)});kL("_executeReferenceProvider",(c,e,i)=>{const n=c.get(js),s=pbe(n.referenceProvider,e,i,!1,Gl.None);return nre(()=>s)});kL("_executeImplementationProvider",(c,e,i)=>{const n=c.get(js),s=mTt(n.implementationProvider,e,i,Gl.None);return nre(()=>s)});var hee,_ee,pee,cme,ume,dme,fme,hme;bm.appendMenuItem(_t.EditorContext,{submenu:_t.EditorContextPeek,title:V("peek.submenu","Peek"),group:"navigation",order:100});class Dq{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof Dq||yi.isIPosition(e.position)&&e.model)}constructor(e,i){this.model=e,this.position=i}}class x1 extends BE{static all(){return x1._allSymbolNavigationCommands.values()}static _patchConfig(e){const i={...e,f1:!0};if(i.menu)for(const n of cc.wrap(i.menu))(n.id===_t.EditorContext||n.id===_t.EditorContextPeek)&&(n.when=xn.and(e.precondition,n.when));return i}constructor(e,i){super(x1._patchConfig(i)),this.configuration=e,x1._allSymbolNavigationCommands.set(i.id,this)}runEditorCommand(e,i,n,s){if(!i.hasModel())return Promise.resolve(void 0);const l=e.get(L_),d=e.get(Oc),f=e.get(IR),g=e.get(hbe),y=e.get(js),w=e.get(So),x=i.getModel(),I=i.getPosition(),P=Dq.is(n)?n:new Dq(x,I),O=new dR(i,5),W=yne(this._getLocationModel(y,P.model,P.position,O.token),O.token).then(async X=>{var Z;if(!X||O.token.isCancellationRequested)return;Eb(X.ariaMessage);let ee;if(X.referenceAt(x.uri,I)){const we=this._getAlternativeCommand(i);!x1._activeAlternativeCommands.has(we)&&x1._allSymbolNavigationCommands.has(we)&&(ee=x1._allSymbolNavigationCommands.get(we))}const he=X.references.length;if(he===0){if(!this.configuration.muteMessage){const we=x.getWordAtPosition(I);(Z=ky.get(i))===null||Z===void 0||Z.showMessage(this._getNoResultFoundMessage(we),I)}}else if(he===1&&ee)x1._activeAlternativeCommands.add(this.desc.id),w.invokeFunction(we=>ee.runEditorCommand(we,i,n,s).finally(()=>{x1._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(d,g,i,X,s)},X=>{l.error(X)}).finally(()=>{O.dispose()});return f.showWhile(W,250),W}async _onResult(e,i,n,s,l){const d=this._getGoToPreference(n);if(!(n instanceof pR)&&(this.configuration.openInPeek||d==="peek"&&s.references.length>1))this._openInPeek(n,s,l);else{const f=s.firstReference(),g=s.references.length>1&&d==="gotoAndPeek",y=await this._openReference(n,e,f,this.configuration.openToSide,!g);g&&y?this._openInPeek(y,s,l):s.dispose(),d==="goto"&&i.put(f)}}async _openReference(e,i,n,s,l){let d;if(zii(n)&&(d=n.targetSelectionRange),d||(d=n.range),!d)return;const f=await i.openCodeEditor({resource:n.uri,options:{selection:at.collapseToStart(d),selectionRevealType:3,selectionSource:"code.jump"}},e,s);if(f){if(l){const g=f.getModel(),y=f.createDecorationsCollection([{range:d,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{f.getModel()===g&&y.clear()},350)}return f}}_openInPeek(e,i,n){const s=mR.get(e);s&&e.hasModel()?s.toggleWidget(n??e.getSelection(),Hg(l=>Promise.resolve(i)),this.configuration.openInPeek):i.dispose()}}x1._allSymbolNavigationCommands=new Map;x1._activeAlternativeCommands=new Set;class rre extends x1{async _getLocationModel(e,i,n,s){return new HC(await _be(e.definitionProvider,i,n,s),V("def.title","Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?V("noResultWord","No definition found for '{0}'",e.word):V("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}Bd((hee=class extends rre{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:hee.id,title:{...xa("actions.goToDecl.label","Go to Definition"),mnemonicTitle:V({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:Lt.hasDefinitionProvider,keybinding:[{when:Lt.editorTextFocus,primary:70,weight:100},{when:xn.and(Lt.editorTextFocus,zxt),primary:2118,weight:100}],menu:[{id:_t.EditorContext,group:"navigation",order:1.1},{id:_t.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),uc.registerCommandAlias("editor.action.goToDeclaration",hee.id)}},hee.id="editor.action.revealDefinition",hee));Bd((_ee=class extends rre{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:_ee.id,title:xa("actions.goToDeclToSide.label","Open Definition to the Side"),precondition:xn.and(Lt.hasDefinitionProvider,Lt.isInEmbeddedEditor.toNegated()),keybinding:[{when:Lt.editorTextFocus,primary:qp(2089,70),weight:100},{when:xn.and(Lt.editorTextFocus,zxt),primary:qp(2089,2118),weight:100}]}),uc.registerCommandAlias("editor.action.openDeclarationToTheSide",_ee.id)}},_ee.id="editor.action.revealDefinitionAside",_ee));Bd((pee=class extends rre{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:pee.id,title:xa("actions.previewDecl.label","Peek Definition"),precondition:xn.and(Lt.hasDefinitionProvider,Nb.notInPeekEditor,Lt.isInEmbeddedEditor.toNegated()),keybinding:{when:Lt.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:_t.EditorContextPeek,group:"peek",order:2}}),uc.registerCommandAlias("editor.action.previewDeclaration",pee.id)}},pee.id="editor.action.peekDefinition",pee));class yTt extends x1{async _getLocationModel(e,i,n,s){return new HC(await gTt(e.declarationProvider,i,n,s),V("decl.title","Declarations"))}_getNoResultFoundMessage(e){return e&&e.word?V("decl.noResultWord","No declaration found for '{0}'",e.word):V("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}Bd((cme=class extends yTt{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:cme.id,title:{...xa("actions.goToDeclaration.label","Go to Declaration"),mnemonicTitle:V({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:xn.and(Lt.hasDeclarationProvider,Lt.isInEmbeddedEditor.toNegated()),menu:[{id:_t.EditorContext,group:"navigation",order:1.3},{id:_t.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?V("decl.noResultWord","No declaration found for '{0}'",e.word):V("decl.generic.noResults","No declaration found")}},cme.id="editor.action.revealDeclaration",cme));Bd(class extends yTt{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:xa("actions.peekDecl.label","Peek Declaration"),precondition:xn.and(Lt.hasDeclarationProvider,Nb.notInPeekEditor,Lt.isInEmbeddedEditor.toNegated()),menu:{id:_t.EditorContextPeek,group:"peek",order:3}})}});class bTt extends x1{async _getLocationModel(e,i,n,s){return new HC(await vTt(e.typeDefinitionProvider,i,n,s),V("typedef.title","Type Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?V("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):V("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}Bd((ume=class extends bTt{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:ume.ID,title:{...xa("actions.goToTypeDefinition.label","Go to Type Definition"),mnemonicTitle:V({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:Lt.hasTypeDefinitionProvider,keybinding:{when:Lt.editorTextFocus,primary:0,weight:100},menu:[{id:_t.EditorContext,group:"navigation",order:1.4},{id:_t.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},ume.ID="editor.action.goToTypeDefinition",ume));Bd((dme=class extends bTt{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:dme.ID,title:xa("actions.peekTypeDefinition.label","Peek Type Definition"),precondition:xn.and(Lt.hasTypeDefinitionProvider,Nb.notInPeekEditor,Lt.isInEmbeddedEditor.toNegated()),menu:{id:_t.EditorContextPeek,group:"peek",order:4}})}},dme.ID="editor.action.peekTypeDefinition",dme));class CTt extends x1{async _getLocationModel(e,i,n,s){return new HC(await mTt(e.implementationProvider,i,n,s),V("impl.title","Implementations"))}_getNoResultFoundMessage(e){return e&&e.word?V("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):V("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}Bd((fme=class extends CTt{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:fme.ID,title:{...xa("actions.goToImplementation.label","Go to Implementations"),mnemonicTitle:V({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:Lt.hasImplementationProvider,keybinding:{when:Lt.editorTextFocus,primary:2118,weight:100},menu:[{id:_t.EditorContext,group:"navigation",order:1.45},{id:_t.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},fme.ID="editor.action.goToImplementation",fme));Bd((hme=class extends CTt{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:hme.ID,title:xa("actions.peekImplementation.label","Peek Implementations"),precondition:xn.and(Lt.hasImplementationProvider,Nb.notInPeekEditor,Lt.isInEmbeddedEditor.toNegated()),keybinding:{when:Lt.editorTextFocus,primary:3142,weight:100},menu:{id:_t.EditorContextPeek,group:"peek",order:5}})}},hme.ID="editor.action.peekImplementation",hme));class STt extends x1{_getNoResultFoundMessage(e){return e?V("references.no","No references found for '{0}'",e.word):V("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}Bd(class extends STt{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{...xa("goToReferences.label","Go to References"),mnemonicTitle:V({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:xn.and(Lt.hasReferenceProvider,Nb.notInPeekEditor,Lt.isInEmbeddedEditor.toNegated()),keybinding:{when:Lt.editorTextFocus,primary:1094,weight:100},menu:[{id:_t.EditorContext,group:"navigation",order:1.45},{id:_t.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}async _getLocationModel(e,i,n,s){return new HC(await pbe(e.referenceProvider,i,n,!0,s),V("ref.title","References"))}});Bd(class extends STt{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:xa("references.action.label","Peek References"),precondition:xn.and(Lt.hasReferenceProvider,Nb.notInPeekEditor,Lt.isInEmbeddedEditor.toNegated()),menu:{id:_t.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(e,i,n,s){return new HC(await pbe(e.referenceProvider,i,n,!1,s),V("ref.title","References"))}});class Wki extends x1{constructor(e,i,n){super(e,{id:"editor.action.goToLocation",title:xa("label.generic","Go to Any Symbol"),precondition:xn.and(Nb.notInPeekEditor,Lt.isInEmbeddedEditor.toNegated())}),this._references=i,this._gotoMultipleBehaviour=n}async _getLocationModel(e,i,n,s){return new HC(this._references,V("generic.title","Locations"))}_getNoResultFoundMessage(e){return e&&V("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var i;return(i=this._gotoMultipleBehaviour)!==null&&i!==void 0?i:e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}uc.registerCommand({id:"editor.action.goToLocations",metadata:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:Oo},{name:"position",description:"The position at which to start",constraint:yi.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:async(c,e,i,n,s,l,d)=>{Ac(Oo.isUri(e)),Ac(yi.isIPosition(i)),Ac(Array.isArray(n)),Ac(typeof s>"u"||typeof s=="string"),Ac(typeof d>"u"||typeof d=="boolean");const f=c.get(Oc),g=await f.openCodeEditor({resource:e},f.getFocusedCodeEditor());if(bL(g))return g.setPosition(i),g.revealPositionInCenterIfOutsideViewport(i,0),g.invokeWithinContext(y=>{const w=new class extends Wki{_getNoResultFoundMessage(x){return l||super._getNoResultFoundMessage(x)}}({muteMessage:!l,openInPeek:!!d,openToSide:!1},n,s);y.get(So).invokeFunction(w.run.bind(w),g)})}});uc.registerCommand({id:"editor.action.peekLocations",metadata:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:Oo},{name:"position",description:"The position at which to start",constraint:yi.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"}]},handler:async(c,e,i,n,s)=>{c.get(ff).executeCommand("editor.action.goToLocations",e,i,n,s,void 0,!0)}});uc.registerCommand({id:"editor.action.findReferences",handler:(c,e,i)=>{Ac(Oo.isUri(e)),Ac(yi.isIPosition(i));const n=c.get(js),s=c.get(Oc);return s.openCodeEditor({resource:e},s.getFocusedCodeEditor()).then(l=>{if(!bL(l)||!l.hasModel())return;const d=mR.get(l);if(!d)return;const f=Hg(y=>pbe(n.referenceProvider,l.getModel(),yi.lift(i),!1,y).then(w=>new HC(w,V("ref.title","References")))),g=new at(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(d.toggleWidget(g,f,!1))})}});uc.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");async function Vki(c,e,i,n){var s;const l=c.get(Lb),d=c.get(GC),f=c.get(ff),g=c.get(So),y=c.get(L_);if(await n.item.resolve(Gl.None),!n.part.location)return;const w=n.part.location,x=[],I=new Set(bm.getMenuItems(_t.EditorContext).map(O=>Gz(O)?O.command.id:nbe()));for(const O of x1.all())I.has(O.desc.id)&&x.push(new WC(O.desc.id,VC.label(O.desc,{renderShortTitle:!0}),void 0,!0,async()=>{const W=await l.createModelReference(w.uri);try{const X=new Dq(W.object.textEditorModel,at.getStartPosition(w.range)),Z=n.item.anchor.range;await g.invokeFunction(O.runEditorCommand.bind(O),e,X,Z)}finally{W.dispose()}}));if(n.part.command){const{command:O}=n.part;x.push(new Up),x.push(new WC(O.id,O.title,void 0,!0,async()=>{var W;try{await f.executeCommand(O.id,...(W=O.arguments)!==null&&W!==void 0?W:[])}catch(X){y.notify({severity:vye.Error,source:n.item.provider.displayName,message:X})}}))}const P=e.getOption(127);d.showContextMenu({domForShadowRoot:P&&(s=e.getDomNode())!==null&&s!==void 0?s:void 0,getAnchor:()=>{const O=Y_(i);return{x:O.left,y:O.top+O.height+8}},getActions:()=>x,onHide:()=>{e.focus()},autoSelectFirstItem:!0})}async function wTt(c,e,i,n){const l=await c.get(Lb).createModelReference(n.uri);await i.invokeWithinContext(async d=>{const f=e.hasSideBySideModifier,g=d.get(Zo),y=Nb.inPeekEditor.getValue(g),w=!f&&i.getOption(88)&&!y;return new rre({openToSide:f,openInPeek:w,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(d,new Dq(l.object.textEditorModel,at.getStartPosition(n.range)),at.lift(n.range))}),l.dispose()}var Hki=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Iz=function(c,e){return function(i,n){e(i,n,c)}},Vz;class h1e{constructor(){this._entries=new TL(50)}get(e){const i=h1e._key(e);return this._entries.get(i)}set(e,i){const n=h1e._key(e);this._entries.set(n,i)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const xTt=Kl("IInlayHintsCache");dc(xTt,h1e,1);class UWe{constructor(e,i){this.item=e,this.index=i}get part(){const e=this.item.hint.label;return typeof e=="string"?{label:e}:e[this.index]}}class jki{constructor(e,i){this.part=e,this.hasTriggerModifier=i}}let vR=Vz=class{static get(e){var i;return(i=e.getContribution(Vz.ID))!==null&&i!==void 0?i:void 0}constructor(e,i,n,s,l,d,f){this._editor=e,this._languageFeaturesService=i,this._inlayHintsCache=s,this._commandService=l,this._notificationService=d,this._instaService=f,this._disposables=new On,this._sessionDisposables=new On,this._decorationsMetadata=new Map,this._ruleFactory=new Dne(this._editor),this._activeRenderMode=0,this._debounceInfo=n.for(i.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(i.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(g=>{g.hasChanged(141)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(141);if(e.enabled==="off")return;const i=this._editor.getModel();if(!i||!this._languageFeaturesService.inlayHintsProvider.has(i))return;if(e.enabled==="on")this._activeRenderMode=0;else{let f,g;e.enabled==="onUnlessPressed"?(f=0,g=1):(f=1,g=0),this._activeRenderMode=f,this._sessionDisposables.add(b4.getInstance().event(y=>{if(!this._editor.hasModel())return;const w=y.altKey&&y.ctrlKey&&!(y.shiftKey||y.metaKey)?g:f;if(w!==this._activeRenderMode){this._activeRenderMode=w;const x=this._editor.getModel(),I=this._copyInlayHintsWithCurrentAnchor(x);this._updateHintsDecorators([x.getFullModelRange()],I),d.schedule(0)}}))}const n=this._inlayHintsCache.get(i);n&&this._updateHintsDecorators([i.getFullModelRange()],n),this._sessionDisposables.add(go(()=>{i.isDisposed()||this._cacheHintsForFastRestore(i)}));let s;const l=new Set,d=new id(async()=>{const f=Date.now();s==null||s.dispose(!0),s=new uh;const g=i.onWillDispose(()=>s==null?void 0:s.cancel());try{const y=s.token,w=await u9.create(this._languageFeaturesService.inlayHintsProvider,i,this._getHintsRanges(),y);if(d.delay=this._debounceInfo.update(i,Date.now()-f),y.isCancellationRequested){w.dispose();return}for(const x of w.provider)typeof x.onDidChangeInlayHints=="function"&&!l.has(x)&&(l.add(x),this._sessionDisposables.add(x.onDidChangeInlayHints(()=>{d.isScheduled()||d.schedule()})));this._sessionDisposables.add(w),this._updateHintsDecorators(w.ranges,w.items),this._cacheHintsForFastRestore(i)}catch(y){Ba(y)}finally{s.dispose(),g.dispose()}},this._debounceInfo.get(i));this._sessionDisposables.add(d),this._sessionDisposables.add(go(()=>s==null?void 0:s.dispose(!0))),d.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(f=>{(f.scrollTopChanged||!d.isScheduled())&&d.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(f=>{s==null||s.cancel();const g=Math.max(d.delay,1250);d.schedule(g)})),this._sessionDisposables.add(this._installDblClickGesture(()=>d.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new On,i=e.add(new lbe(this._editor)),n=new On;return e.add(n),e.add(i.onMouseMoveOrRelevantKeyDown(s=>{const[l]=s,d=this._getInlayHintLabelPart(l),f=this._editor.getModel();if(!d||!f){n.clear();return}const g=new uh;n.add(go(()=>g.dispose(!0))),d.item.resolve(g.token),this._activeInlayHintPart=d.part.command||d.part.location?new jki(d,l.hasTriggerModifier):void 0;const y=f.validatePosition(d.item.hint.position).lineNumber,w=new at(y,1,y,f.getLineMaxColumn(y)),x=this._getInlineHintsForRange(w);this._updateHintsDecorators([w],x),n.add(go(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([w],x)}))})),e.add(i.onCancel(()=>n.clear())),e.add(i.onExecute(async s=>{const l=this._getInlayHintLabelPart(s);if(l){const d=l.part;d.location?this._instaService.invokeFunction(wTt,s,this._editor,d.location):jFe.is(d.command)&&await this._invokeCommand(d.command,l.item)}})),e}_getInlineHintsForRange(e){const i=new Set;for(const n of this._decorationsMetadata.values())e.containsRange(n.item.anchor.range)&&i.add(n.item);return Array.from(i)}_installDblClickGesture(e){return this._editor.onMouseUp(async i=>{if(i.event.detail!==2)return;const n=this._getInlayHintLabelPart(i);if(n&&(i.event.preventDefault(),await n.item.resolve(Gl.None),bv(n.item.hint.textEdits))){const s=n.item.hint.textEdits.map(l=>Kf.replace(at.lift(l.range),l.text));this._editor.executeEdits("inlayHint.default",s),e()}})}_installContextMenu(){return this._editor.onContextMenu(async e=>{if(!Sm(e.event.target))return;const i=this._getInlayHintLabelPart(e);i&&await this._instaService.invokeFunction(Vki,this._editor,e.event.target,i)})}_getInlayHintLabelPart(e){var i;if(e.target.type!==6)return;const n=(i=e.target.detail.injectedText)===null||i===void 0?void 0:i.options;if(n instanceof lR&&(n==null?void 0:n.attachedData)instanceof UWe)return n.attachedData}async _invokeCommand(e,i){var n;try{await this._commandService.executeCommand(e.id,...(n=e.arguments)!==null&&n!==void 0?n:[])}catch(s){this._notificationService.notify({severity:vye.Error,source:i.provider.displayName,message:s})}}_cacheHintsForFastRestore(e){const i=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,i)}_copyInlayHintsWithCurrentAnchor(e){const i=new Map;for(const[n,s]of this._decorationsMetadata){if(i.has(s.item))continue;const l=e.getDecorationRange(n);if(l){const d=new cTt(l,s.item.anchor.direction),f=s.item.with({anchor:d});i.set(s.item,f)}}return Array.from(i.values())}_getHintsRanges(){const i=this._editor.getModel(),n=this._editor.getVisibleRangesPlusViewportAboveBelow(),s=[];for(const l of n.sort(at.compareRangesUsingStarts)){const d=i.validateRange(new at(l.startLineNumber-30,l.startColumn,l.endLineNumber+30,l.endColumn));s.length===0||!at.areIntersectingOrTouching(s[s.length-1],d)?s.push(d):s[s.length-1]=at.plusRange(s[s.length-1],d)}return s}_updateHintsDecorators(e,i){var n,s;const l=[],d=(X,Z,ee,he,we)=>{const Te={content:ee,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:Z.className,cursorStops:he,attachedData:we};l.push({item:X,classNameRef:Z,decoration:{range:X.anchor.range,options:{description:"InlayHint",showIfCollapsed:X.anchor.range.isEmpty(),collapseOnReplaceEdit:!X.anchor.range.isEmpty(),stickiness:0,[X.anchor.direction]:this._activeRenderMode===0?Te:void 0}}})},f=(X,Z)=>{const ee=this._ruleFactory.createClassNameRef({width:`${g/3|0}px`,display:"inline-block"});d(X,ee," ",Z?oT.Right:oT.None)},{fontSize:g,fontFamily:y,padding:w,isUniform:x}=this._getLayoutInfo(),I="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(I,y);let P={line:0,totalLen:0};for(const X of i){if(P.line!==X.anchor.range.startLineNumber&&(P={line:X.anchor.range.startLineNumber,totalLen:0}),P.totalLen>Vz._MAX_LABEL_LEN)continue;X.hint.paddingLeft&&f(X,!1);const Z=typeof X.hint.label=="string"?[{label:X.hint.label}]:X.hint.label;for(let ee=0;ee0&&(Me=Me.slice(0,-Nt)+"…",vt=!0),d(X,this._ruleFactory.createClassNameRef(Be),zki(Me),Te&&!X.hint.paddingRight?oT.Right:oT.None,new UWe(X,ee)),vt)break}if(X.hint.paddingRight&&f(X,!0),l.length>Vz._MAX_DECORATORS)break}const O=[];for(const[X,Z]of this._decorationsMetadata){const ee=(s=this._editor.getModel())===null||s===void 0?void 0:s.getDecorationRange(X);ee&&e.some(he=>he.containsRange(ee))&&(O.push(X),Z.classNameRef.dispose(),this._decorationsMetadata.delete(X))}const W=ME.capture(this._editor);this._editor.changeDecorations(X=>{const Z=X.deltaDecorations(O,l.map(ee=>ee.decoration));for(let ee=0;een)&&(l=n);const d=e.fontFamily||s;return{fontSize:l,fontFamily:d,padding:i,isUniform:!i&&d===s&&l===n}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};vR.ID="editor.contrib.InlayHints";vR._MAX_DECORATORS=1500;vR._MAX_LABEL_LEN=43;vR=Vz=Hki([Iz(1,js),Iz(2,fk),Iz(3,xTt),Iz(4,ff),Iz(5,L_),Iz(6,So)],vR);function zki(c){return c.replace(/[ \t]/g," ")}uc.registerCommand("_executeInlayHintProvider",async(c,...e)=>{const[i,n]=e;Ac(Oo.isUri(i)),Ac(at.isIRange(n));const{inlayHintsProvider:s}=c.get(js),l=await c.get(Lb).createModelReference(i);try{const d=await u9.create(s,l.object.textEditorModel,[at.lift(n)],Gl.None),f=d.items.map(g=>g.hint);return setTimeout(()=>d.dispose(),0),f}finally{l.dispose()}});var Uki=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},C5=function(c,e){return function(i,n){e(i,n,c)}};class J1t extends c9{constructor(e,i,n,s){super(10,i,e.item.anchor.range,n,s,!0),this.part=e}}let _1e=class extends Hie{constructor(e,i,n,s,l,d,f,g){super(e,i,n,d,g,s,l),this._resolverService=f,this.hoverOrdinal=6}suggestHoverAnchor(e){var i;if(!vR.get(this._editor)||e.target.type!==6)return null;const s=(i=e.target.detail.injectedText)===null||i===void 0?void 0:i.options;return s instanceof lR&&s.attachedData instanceof UWe?new J1t(s.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,i,n){return e instanceof J1t?new pp(async s=>{const{part:l}=e;if(await l.item.resolve(n),n.isCancellationRequested)return;let d;typeof l.item.hint.tooltip=="string"?d=new vv().appendText(l.item.hint.tooltip):l.item.hint.tooltip&&(d=l.item.hint.tooltip),d&&s.emitOne(new hE(this,e.range,[d],!1,0)),bv(l.item.hint.textEdits)&&s.emitOne(new hE(this,e.range,[new vv().appendText(V("hint.dbl","Double-click to insert"))],!1,10001));let f;if(typeof l.part.tooltip=="string"?f=new vv().appendText(l.part.tooltip):l.part.tooltip&&(f=l.part.tooltip),f&&s.emitOne(new hE(this,e.range,[f],!1,1)),l.part.location||l.part.command){let y;const x=this._editor.getOption(78)==="altKey"?Wl?V("links.navigate.kb.meta.mac","cmd + click"):V("links.navigate.kb.meta","ctrl + click"):Wl?V("links.navigate.kb.alt.mac","option + click"):V("links.navigate.kb.alt","alt + click");l.part.location&&l.part.command?y=new vv().appendText(V("hint.defAndCommand","Go to Definition ({0}), right click for more",x)):l.part.location?y=new vv().appendText(V("hint.def","Go to Definition ({0})",x)):l.part.command&&(y=new vv(`[${V("hint.cmd","Execute Command")}](${vki(l.part.command)} "${l.part.command.title}") (${x})`,{isTrusted:!0})),y&&s.emitOne(new hE(this,e.range,[y],!1,1e4))}const g=await this._resolveInlayHintLabelPartHover(l,n);for await(const y of g)s.emitOne(y)}):pp.EMPTY}async _resolveInlayHintLabelPartHover(e,i){if(!e.part.location)return pp.EMPTY;const{uri:n,range:s}=e.part.location,l=await this._resolverService.createModelReference(n);try{const d=l.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(d)?rUe(this._languageFeaturesService.hoverProvider,d,new yi(s.startLineNumber,s.startColumn),i).filter(f=>!dq(f.hover.contents)).map(f=>new hE(this,e.item.anchor.range,f.hover.contents,!1,2+f.ordinal)):pp.EMPTY}finally{l.dispose()}}};_1e=Uki([C5(1,If),C5(2,KC),C5(3,ou),C5(4,DL),C5(5,El),C5(6,Lb),C5(7,js)],_1e);class p1e{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,i){this._editor=e,this._participants=i,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,i){if(i.type!==1&&!i.supportsMarkerHover)return[];const n=e.getModel(),s=i.range.startLineNumber;if(s>n.getLineCount())return[];const l=n.getLineMaxColumn(s);return e.getLineDecorations(s).filter(d=>{if(d.options.isWholeLine)return!0;const f=d.range.startLineNumber===s?d.range.startColumn:1,g=d.range.endLineNumber===s?d.range.endColumn:l;if(d.options.showIfCollapsed){if(f>i.range.startColumn+1||i.range.endColumn-1>g)return!1}else if(f>i.range.startColumn||i.range.endColumn>g)return!1;return!0})}computeAsync(e){const i=this._anchor;if(!this._editor.hasModel()||!i)return pp.EMPTY;const n=p1e._getLineDecorations(this._editor,i);return pp.merge(this._participants.map(s=>s.computeAsync?s.computeAsync(i,n,e):pp.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=p1e._getLineDecorations(this._editor,this._anchor);let i=[];for(const n of this._participants)i=i.concat(n.computeSync(this._anchor,e));return kE(i)}}class kTt{constructor(e,i,n){this.anchor=e,this.messages=i,this.isComplete=n}filter(e){const i=this.messages.filter(n=>n.isValidForHoverAnchor(e));return i.length===this.messages.length?this:new qki(this,this.anchor,i,this.isComplete)}}class qki extends kTt{constructor(e,i,n,s){super(i,n,s),this.original=e}filter(e){return this.original.filter(e)}}class $ki{constructor(e,i,n,s,l,d,f,g,y,w){this.initialMousePosX=e,this.initialMousePosY=i,this.colorPicker=n,this.showAtPosition=s,this.showAtSecondaryPosition=l,this.preferAbove=d,this.stoleFocus=f,this.source=g,this.isBeforeContent=y,this.disposables=w,this.closestMouseDistance=void 0}}var Jki=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Gki=function(c,e){return function(i,n){e(i,n,c)}};const G1t=Sr;let g1e=class extends Ii{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=G1t("div.hover-row.status-bar"),this.hoverElement.tabIndex=0,this.actionsElement=zn(this.hoverElement,G1t("div.actions"))}addAction(e){const i=this._keybindingService.lookupKeybinding(e.commandId),n=i?i.getLabel():null;return this._hasContent=!0,this._register(bye.render(this.actionsElement,e,n))}append(e){const i=zn(this.actionsElement,e);return this._hasContent=!0,i}};g1e=Jki([Gki(0,ou)],g1e);var Kki=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},K1t=function(c,e){return function(i,n){e(i,n,c)}},g0e;let m1e=g0e=class extends Ii{constructor(e,i,n){super(),this._editor=e,this._instantiationService=i,this._keybindingService=n,this._currentResult=null,this._onContentsChanged=this._register(new ui),this.onContentsChanged=this._onContentsChanged.event,this._widget=this._register(this._instantiationService.createInstance(Tq,this._editor)),this._participants=[];for(const s of PR.getAll()){const l=this._instantiationService.createInstance(s,this._editor);l instanceof Hie&&!(l instanceof _1e)&&(this._markdownHoverParticipant=l),this._participants.push(l)}this._participants.sort((s,l)=>s.hoverOrdinal-l.hoverOrdinal),this._computer=new p1e(this._editor,this._participants),this._hoverOperation=this._register(new oTt(this._editor,this._computer)),this._register(this._hoverOperation.onResult(s=>{if(!this._computer.anchor)return;const l=s.hasLoadingMessage?this._addLoadingMessage(s.value):s.value;this._withResult(new kTt(this._computer.anchor,l,s.isComplete))})),this._register(n_(this._widget.getDomNode(),"keydown",s=>{s.equals(9)&&this.hide()})),this._register(Nh.onDidChange(()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}_startShowingOrUpdateHover(e,i,n,s,l){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,i,n,s,!1),!0):!1:this._editor.getOption(60).sticky&&l&&this._widget.isMouseGettingCloser(l.event.posx,l.event.posy)?(e&&this._startHoverOperationIfNecessary(e,i,n,s,!0),!0):e?e&&this._currentResult.anchor.equals(e)?!0:e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,i,n,s,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,i,n,s,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,i,n,s,l){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=s,this._computer.source=n,this._computer.insistOnKeepingHoverVisible=l,this._hoverOperation.start(i))}_setCurrentResult(e){this._currentResult!==e&&(e&&e.messages.length===0&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}_addLoadingMessage(e){if(this._computer.anchor){for(const i of this._participants)if(i.createLoadingMessage){const n=i.createLoadingMessage(this._computer.anchor);if(n)return e.slice(0).concat([n])}}return e}_withResult(e){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!e.isComplete||this._computer.insistOnKeepingHoverVisible&&e.messages.length===0)||this._setCurrentResult(e)}_renderMessages(e,i){const{showAtPosition:n,showAtSecondaryPosition:s,highlightRange:l}=g0e.computeHoverRanges(this._editor,e.range,i),d=new On,f=d.add(new g1e(this._keybindingService)),g=document.createDocumentFragment();let y=null;const w={fragment:g,statusBar:f,setColorPicker:I=>y=I,onContentsChanged:()=>this._doOnContentsChanged(),setMinimumDimensions:I=>this._widget.setMinimumDimensions(I),hide:()=>this.hide()};for(const I of this._participants){const P=i.filter(O=>O.owner===I);P.length>0&&d.add(I.renderHoverParts(w,P))}const x=i.some(I=>I.isBeforeContent);if(f.hasContent&&g.appendChild(f.hoverElement),g.hasChildNodes()){if(l){const I=this._editor.createDecorationsCollection();I.set([{range:l,options:g0e._DECORATION_OPTIONS}]),d.add(go(()=>{I.clear()}))}this._widget.showAt(g,new $ki(e.initialMousePosX,e.initialMousePosY,y,n,s,this._editor.getOption(60).above,this._computer.shouldFocus,this._computer.source,x,d))}else d.dispose()}_doOnContentsChanged(){this._onContentsChanged.fire(),this._widget.onContentsChanged()}static computeHoverRanges(e,i,n){let s=1;if(e.hasModel()){const x=e._getViewModel(),I=x.coordinatesConverter,P=I.convertModelRangeToViewRange(i),O=new yi(P.startLineNumber,x.getLineMinColumn(P.startLineNumber));s=I.convertViewPositionToModelPosition(O).column}const l=i.startLineNumber;let d=i.startColumn,f=n[0].range,g=null;for(const x of n)f=at.plusRange(f,x.range),x.range.startLineNumber===l&&x.range.endLineNumber===l&&(d=Math.max(Math.min(d,x.range.startColumn),s)),x.forceShowAtRange&&(g=x.range);const y=g?g.getStartPosition():new yi(l,i.startColumn),w=g?g.getStartPosition():new yi(l,d);return{showAtPosition:y,showAtSecondaryPosition:w,highlightRange:f}}showsOrWillShow(e){if(this._widget.isResizing)return!0;const i=[];for(const s of this._participants)if(s.suggestHoverAnchor){const l=s.suggestHoverAnchor(e);l&&i.push(l)}const n=e.target;if(n.type===6&&i.push(new sFe(0,n.range,e.event.posx,e.event.posy)),n.type===7){const s=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;!n.detail.isAfterLines&&typeof n.detail.horizontalDistanceToText=="number"&&n.detail.horizontalDistanceToTextl.priority-s.priority),this._startShowingOrUpdateHover(i[0],0,0,!1,e))}startShowingAtRange(e,i,n,s){this._startShowingOrUpdateHover(new sFe(0,e,void 0,void 0),i,n,s,null)}async updateMarkdownHoverVerbosityLevel(e,i,n){var s;(s=this._markdownHoverParticipant)===null||s===void 0||s.updateMarkdownHoverVerbosityLevel(e,i,n)}markdownHoverContentAtIndex(e){var i,n;return(n=(i=this._markdownHoverParticipant)===null||i===void 0?void 0:i.markdownHoverContentAtIndex(e))!==null&&n!==void 0?n:""}doesMarkdownHoverAtIndexSupportVerbosityAction(e,i){var n,s;return(s=(n=this._markdownHoverParticipant)===null||n===void 0?void 0:n.doesMarkdownHoverAtIndexSupportVerbosityAction(e,i))!==null&&s!==void 0?s:!1}containsNode(e){return e?this._widget.getDomNode().contains(e):!1}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}get isColorPickerVisible(){return this._widget.isColorPickerVisible}get isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}get isVisible(){return this._widget.isVisible}get isFocused(){return this._widget.isFocused}get isResizing(){return this._widget.isResizing}get widget(){return this._widget}};m1e._DECORATION_OPTIONS=Xa.register({description:"content-hover-highlight",className:"hoverHighlight"});m1e=g0e=Kki([K1t(1,So),K1t(2,ou)],m1e);class Qki{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}get lane(){return this._laneOrLine}set lane(e){this._laneOrLine=e}constructor(e){this._editor=e,this._lineNumber=-1,this._laneOrLine=fL.Center}computeSync(){var e,i;const n=f=>({value:f}),s=this._editor.getLineDecorations(this._lineNumber),l=[],d=this._laneOrLine==="lineNo";if(!s)return l;for(const f of s){const g=(i=(e=f.options.glyphMargin)===null||e===void 0?void 0:e.position)!==null&&i!==void 0?i:fL.Center;if(!d&&g!==this._laneOrLine)continue;const y=d?f.options.lineNumberHoverMessage:f.options.glyphMarginHoverMessage;!y||dq(y)||l.push(...hHe(y).map(n))}return l}}const Q1t=Sr;class qie extends Ii{constructor(e,i,n){super(),this._renderDisposeables=this._register(new On),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new Uje),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new gL({editor:this._editor},i,n)),this._computer=new Qki(this._editor),this._hoverOperation=this._register(new oTt(this._editor,this._computer)),this._register(this._hoverOperation.onResult(s=>{this._withResult(s.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(50)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return qie.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(i=>this._editor.applyFontInfo(i))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}showsOrWillShow(e){const i=e.target;return i.type===2&&i.detail.glyphMarginLane?(this._startShowingAt(i.position.lineNumber,i.detail.glyphMarginLane),!0):i.type===3?(this._startShowingAt(i.position.lineNumber,"lineNo"),!0):!1}_startShowingAt(e,i){this._computer.lineNumber===e&&this._computer.lane===i||(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._computer.lane=i,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,i){this._renderDisposeables.clear();const n=document.createDocumentFragment();for(const s of i){const l=Q1t("div.hover-row.markdown-hover"),d=zn(l,Q1t("div.hover-contents")),f=this._renderDisposeables.add(this._markdownRenderer.render(s.value));d.appendChild(f.element),n.appendChild(l)}this._updateContents(n),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const i=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),s=this._editor.getScrollTop(),l=this._editor.getOption(67),d=this._hover.containerDomNode.clientHeight,f=n-s-(d-l)/2,g=i.glyphMarginLeft+i.glyphMarginWidth+(this._computer.lane==="lineNo"?i.lineNumbersWidth:0);this._hover.containerDomNode.style.left=`${g}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(f),0)}px`}}qie.ID="editor.contrib.modesGlyphHoverWidget";var Xki=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},X1t=function(c,e){return function(i,n){e(i,n,c)}},qWe;const Zki=!1;let D1=qWe=class extends Ii{constructor(e,i,n){super(),this._editor=e,this._instantiationService=i,this._keybindingService=n,this._onHoverContentsChanged=this._register(new ui),this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new On,this._hoverState={mouseDown:!1,activatedByDecoratorClick:!1},this._reactToEditorMouseMoveRunner=this._register(new id(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())}))}static get(e){return e.getContribution(qWe.ID)}_hookListeners(){const e=this._editor.getOption(60);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.delay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown(i=>this._onEditorMouseDown(i))),this._listenersStore.add(this._editor.onMouseUp(()=>this._onEditorMouseUp())),this._listenersStore.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._listenersStore.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))):(this._listenersStore.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._listenersStore.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))),this._listenersStore.add(this._editor.onMouseLeave(i=>this._onEditorMouseLeave(i))),this._listenersStore.add(this._editor.onDidChangeModel(()=>{this._cancelScheduler(),this._hideWidgets()})),this._listenersStore.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._listenersStore.add(this._editor.onDidScrollChange(i=>this._onEditorScrollChanged(i)))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0,!this._shouldNotHideCurrentHoverWidget(e)&&this._hideWidgets()}_shouldNotHideCurrentHoverWidget(e){return!!(this._isMouseOnContentHoverWidget(e)||this._isMouseOnMarginHoverWidget(e)||this._isContentWidgetResizing())}_isMouseOnMarginHoverWidget(e){const i=e.target;return i?i.type===12&&i.detail===qie.ID:!1}_isMouseOnContentHoverWidget(e){const i=e.target;return i?i.type===9&&i.detail===Tq.ID:!1}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._cancelScheduler(),this._shouldNotHideCurrentHoverWidget(e))||this._hideWidgets()}_shouldNotRecomputeCurrentHoverWidget(e){const i=this._hoverSettings.sticky,n=(f,g)=>{const y=this._isMouseOnMarginHoverWidget(f);return g&&y},s=(f,g)=>{const y=this._isMouseOnContentHoverWidget(f);return g&&y},l=f=>{var g;const y=this._isMouseOnContentHoverWidget(f),w=(g=this._contentWidget)===null||g===void 0?void 0:g.isColorPickerVisible;return y&&w},d=(f,g)=>{var y,w,x,I;return g&&((y=this._contentWidget)===null||y===void 0?void 0:y.containsNode((w=f.event.browserEvent.view)===null||w===void 0?void 0:w.document.activeElement))&&!(!((I=(x=f.event.browserEvent.view)===null||x===void 0?void 0:x.getSelection())===null||I===void 0)&&I.isCollapsed)};return!!(n(e,i)||s(e,i)||l(e)||d(e,i))}_onEditorMouseMove(e){var i,n,s,l;if(this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._mouseMoveEvent=e,!((i=this._contentWidget)===null||i===void 0)&&i.isFocused||!((n=this._contentWidget)===null||n===void 0)&&n.isResizing))return;const d=this._hoverSettings.sticky;if(d&&(!((s=this._contentWidget)===null||s===void 0)&&s.isVisibleFromKeyboard))return;if(this._shouldNotRecomputeCurrentHoverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}const g=this._hoverSettings.hidingDelay;if(((l=this._contentWidget)===null||l===void 0?void 0:l.isVisible)&&d&&g>0){this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(g);return}this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){var i;if(!e)return;const s=(i=e.target.element)===null||i===void 0?void 0:i.classList.contains("colorpicker-color-decoration"),l=this._editor.getOption(148),d=this._hoverSettings.enabled,f=this._hoverState.activatedByDecoratorClick;if(s&&(l==="click"&&!f||l==="hover"&&!d&&!Zki||l==="clickAndHover"&&!d&&!f)||!s&&!d&&!f){this._hideWidgets();return}this._tryShowHoverWidget(e,0)||this._tryShowHoverWidget(e,1)||this._hideWidgets()}_tryShowHoverWidget(e,i){const n=this._getOrCreateContentWidget(),s=this._getOrCreateGlyphWidget();let l,d;switch(i){case 0:l=n,d=s;break;case 1:l=s,d=n;break;default:throw new Error(`HoverWidgetType ${i} is unrecognized`)}const f=l.showsOrWillShow(e);return f&&d.hide(),f}_onKeyDown(e){var i;if(!this._editor.hasModel())return;const n=this._keybindingService.softDispatch(e,this._editor.getDomNode()),s=n.kind===1||n.kind===2&&(n.commandId===iTt||n.commandId===obe||n.commandId===abe)&&((i=this._contentWidget)===null||i===void 0?void 0:i.isVisible);e.keyCode===5||e.keyCode===6||e.keyCode===57||e.keyCode===4||s||this._hideWidgets()}_hideWidgets(){var e,i,n;this._hoverState.mouseDown&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible)||_R.dropDownVisible||(this._hoverState.activatedByDecoratorClick=!1,(i=this._glyphWidget)===null||i===void 0||i.hide(),(n=this._contentWidget)===null||n===void 0||n.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(m1e,this._editor),this._listenersStore.add(this._contentWidget.onContentsChanged(()=>this._onHoverContentsChanged.fire()))),this._contentWidget}_getOrCreateGlyphWidget(){return this._glyphWidget||(this._glyphWidget=this._instantiationService.createInstance(qie,this._editor)),this._glyphWidget}showContentHover(e,i,n,s,l=!1){this._hoverState.activatedByDecoratorClick=l,this._getOrCreateContentWidget().startShowingAtRange(e,i,n,s)}_isContentWidgetResizing(){var e;return((e=this._contentWidget)===null||e===void 0?void 0:e.widget.isResizing)||!1}markdownHoverContentAtIndex(e){return this._getOrCreateContentWidget().markdownHoverContentAtIndex(e)}doesMarkdownHoverAtIndexSupportVerbosityAction(e,i){return this._getOrCreateContentWidget().doesMarkdownHoverAtIndexSupportVerbosityAction(e,i)}updateMarkdownHoverVerbosityLevel(e,i,n){this._getOrCreateContentWidget().updateMarkdownHoverVerbosityLevel(e,i,n)}focus(){var e;(e=this._contentWidget)===null||e===void 0||e.focus()}scrollUp(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollUp()}scrollDown(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollDown()}scrollLeft(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollLeft()}scrollRight(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollRight()}pageUp(){var e;(e=this._contentWidget)===null||e===void 0||e.pageUp()}pageDown(){var e;(e=this._contentWidget)===null||e===void 0||e.pageDown()}goToTop(){var e;(e=this._contentWidget)===null||e===void 0||e.goToTop()}goToBottom(){var e;(e=this._contentWidget)===null||e===void 0||e.goToBottom()}get isColorPickerVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible}get isHoverVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isVisible}dispose(){var e,i;super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(i=this._contentWidget)===null||i===void 0||i.dispose()}};D1.ID="editor.contrib.hover";D1=qWe=Xki([X1t(1,So),X1t(2,ou)],D1);class $We extends Ii{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(i=>this.onMouseDown(i)))}dispose(){super.dispose()}onMouseDown(e){const i=this._editor.getOption(148);if(i!=="click"&&i!=="clickAndHover")return;const n=e.target;if(n.type!==6||!n.detail.injectedText||n.detail.injectedText.options.attachedData!==K2t||!n.range)return;const s=this._editor.getContribution(D1.ID);if(s&&!s.isColorPickerVisible){const l=new at(n.range.startLineNumber,n.range.startColumn+1,n.range.endLineNumber,n.range.endColumn+1);s.showContentHover(l,1,0,!1,!0)}}}$We.ID="editor.contrib.colorContribution";Bc($We.ID,$We,2);PR.register(d1e);var TTt=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},cE=function(c,e){return function(i,n){e(i,n,c)}},JWe,GWe;let yR=JWe=class extends Ii{constructor(e,i,n,s,l,d,f){super(),this._editor=e,this._modelService=n,this._keybindingService=s,this._instantiationService=l,this._languageFeatureService=d,this._languageConfigurationService=f,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=Lt.standaloneColorPickerVisible.bindTo(i),this._standaloneColorPickerFocused=Lt.standaloneColorPickerFocused.bindTo(i)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)===null||e===void 0||e.focus():this._standaloneColorPickerWidget=new v1e(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(e=this._standaloneColorPickerWidget)===null||e===void 0||e.hide(),this._editor.focus()}insertColor(){var e;(e=this._standaloneColorPickerWidget)===null||e===void 0||e.updateEditor(),this.hide()}static get(e){return e.getContribution(JWe.ID)}};yR.ID="editor.contrib.standaloneColorPickerController";yR=JWe=TTt([cE(1,Zo),cE(2,Qf),cE(3,ou),cE(4,So),cE(5,js),cE(6,Kd)],yR);Bc(yR.ID,yR,1);const Z1t=8,Yki=22;let v1e=GWe=class extends Ii{constructor(e,i,n,s,l,d,f,g){var y;super(),this._editor=e,this._standaloneColorPickerVisible=i,this._standaloneColorPickerFocused=n,this._modelService=l,this._keybindingService=d,this._languageFeaturesService=f,this._languageConfigurationService=g,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new ui),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=s.createInstance(Vie,this._editor),this._position=(y=this._editor._getViewModel())===null||y===void 0?void 0:y.getPrimaryCursorState().modelState.position;const w=this._editor.getSelection(),x=w?{startLineNumber:w.startLineNumber,startColumn:w.startColumn,endLineNumber:w.endLineNumber,endColumn:w.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},I=this._register(IE(this._body));this._register(I.onDidBlur(P=>{this.hide()})),this._register(I.onDidFocus(P=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(P=>{var O;const W=(O=P.target.element)===null||O===void 0?void 0:O.classList;W&&W.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(P=>{this._render(P.value,P.foundInEditor)})),this._start(x),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return GWe.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}async _start(e){const i=await this._computeAsync(e);i&&this._onResult.fire(new e2i(i.result,i.foundInEditor))}async _computeAsync(e){if(!this._editor.hasModel())return null;const i={range:e,color:{red:0,green:0,blue:0,alpha:1}},n=await this._standaloneColorPickerParticipant.createColorHover(i,new eUe(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return n?{result:n.colorHover,foundInEditor:n.foundInEditor}:null}_render(e,i){const n=document.createDocumentFragment(),s=this._register(new g1e(this._keybindingService));let l;const d={fragment:n,statusBar:s,setColorPicker:W=>l=W,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(d,[e])),l===void 0)return;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(n),l.layout();const f=l.body,g=f.saturationBox.domNode.clientWidth,y=f.domNode.clientWidth-g-Yki-Z1t,w=l.body.enterButton;w==null||w.onClicked(()=>{this.updateEditor(),this.hide()});const x=l.header,I=x.pickedColorNode;I.style.width=g+Z1t+"px";const P=x.originalColorNode;P.style.width=y+"px";const O=l.header.closeButton;O==null||O.onClicked(()=>{this.hide()}),i&&(w&&(w.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};v1e.ID="editor.contrib.standaloneColorPickerWidget";v1e=GWe=TTt([cE(3,So),cE(4,Qf),cE(5,ou),cE(6,js),cE(7,Kd)],v1e);class e2i{constructor(e,i){this.value=e,this.foundInEditor=i}}class t2i extends BE{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{...xa("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:V({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker")},precondition:void 0,menu:[{id:_t.CommandPalette}],metadata:{description:xa("showOrFocusStandaloneColorPickerDescription","Show or focus a standalone color picker which uses the default color provider. It displays hex/rgb/hsl colors.")}})}runEditorCommand(e,i){var n;(n=yR.get(i))===null||n===void 0||n.showOrFocus()}}class i2i extends ms{constructor(){super({id:"editor.action.hideColorPicker",label:V({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:Lt.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100},metadata:{description:xa("hideColorPickerDescription","Hide the standalone color picker.")}})}run(e,i){var n;(n=yR.get(i))===null||n===void 0||n.hide()}}class n2i extends ms{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:V({key:"insertColorWithStandaloneColorPicker",comment:["Action that inserts color with standalone color picker"]},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:Lt.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100},metadata:{description:xa("insertColorWithStandaloneColorPickerDescription","Insert hex/rgb/hsl colors with the focused standalone color picker.")}})}run(e,i){var n;(n=yR.get(i))===null||n===void 0||n.insertColor()}}hr(i2i);hr(n2i);Bd(t2i);class OM{constructor(e,i,n){this.languageConfigurationService=n,this._selection=e,this._insertSpace=i,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,i,n){if(n<0)return!1;const s=i.length,l=e.length;if(n+s>l)return!1;for(let d=0;d=65&&f<=90&&f+32===g)&&!(g>=65&&g<=90&&g+32===f))return!1}return!0}_createOperationsForBlockComment(e,i,n,s,l,d){const f=e.startLineNumber,g=e.startColumn,y=e.endLineNumber,w=e.endColumn,x=l.getLineContent(f),I=l.getLineContent(y);let P=x.lastIndexOf(i,g-1+i.length),O=I.indexOf(n,w-1-n.length);if(P!==-1&&O!==-1)if(f===y)x.substring(P+i.length,O).indexOf(n)>=0&&(P=-1,O=-1);else{const X=x.substring(P+i.length),Z=I.substring(0,O);(X.indexOf(n)>=0||Z.indexOf(n)>=0)&&(P=-1,O=-1)}let W;P!==-1&&O!==-1?(s&&P+i.length0&&I.charCodeAt(O-1)===32&&(n=" "+n,O-=1),W=OM._createRemoveBlockCommentOperations(new at(f,P+i.length+1,y,O+1),i,n)):(W=OM._createAddBlockCommentOperations(e,i,n,this._insertSpace),this._usedEndToken=W.length===1?n:null);for(const X of W)d.addTrackedEditOperation(X.range,X.text)}static _createRemoveBlockCommentOperations(e,i,n){const s=[];return at.isEmpty(e)?s.push(Kf.delete(new at(e.startLineNumber,e.startColumn-i.length,e.endLineNumber,e.endColumn+n.length))):(s.push(Kf.delete(new at(e.startLineNumber,e.startColumn-i.length,e.startLineNumber,e.startColumn))),s.push(Kf.delete(new at(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),s}static _createAddBlockCommentOperations(e,i,n,s){const l=[];return at.isEmpty(e)?l.push(Kf.replace(new at(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),i+" "+n)):(l.push(Kf.insert(new yi(e.startLineNumber,e.startColumn),i+(s?" ":""))),l.push(Kf.insert(new yi(e.endLineNumber,e.endColumn),(s?" ":"")+n))),l}getEditOperations(e,i){const n=this._selection.startLineNumber,s=this._selection.startColumn;e.tokenization.tokenizeIfCheap(n);const l=e.getLanguageIdAtPosition(n,s),d=this.languageConfigurationService.getLanguageConfiguration(l).comments;!d||!d.blockCommentStartToken||!d.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,d.blockCommentStartToken,d.blockCommentEndToken,this._insertSpace,e,i)}computeCursorState(e,i){const n=i.getInverseEditOperations();if(n.length===2){const s=n[0],l=n[1];return new Qs(s.range.endLineNumber,s.range.endColumn,l.range.startLineNumber,l.range.startColumn)}else{const s=n[0].range,l=this._usedEndToken?-this._usedEndToken.length-1:0;return new Qs(s.endLineNumber,s.endColumn+l,s.endLineNumber,s.endColumn+l)}}}class s4{constructor(e,i,n,s,l,d,f){this.languageConfigurationService=e,this._selection=i,this._indentSize=n,this._type=s,this._insertSpace=l,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=d,this._ignoreFirstLine=f||!1}static _gatherPreflightCommentStrings(e,i,n,s){e.tokenization.tokenizeIfCheap(i);const l=e.getLanguageIdAtPosition(i,1),d=s.getLanguageConfiguration(l).comments,f=d?d.lineCommentToken:null;if(!f)return null;const g=[];for(let y=0,w=n-i+1;yl?i[g].commentStrOffset=d-1:i[g].commentStrOffset=d}}}class aUe extends ms{constructor(e,i){super(i),this._type=e}run(e,i){const n=e.get(Kd);if(!i.hasModel())return;const s=i.getModel(),l=[],d=s.getOptions(),f=i.getOption(23),g=i.getSelections().map((w,x)=>({selection:w,index:x,ignoreFirstLine:!1}));g.sort((w,x)=>at.compareRangesUsingStarts(w.selection,x.selection));let y=g[0];for(let w=1;w=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},S5=function(c,e){return function(i,n){e(i,n,c)}},KWe;let Eq=KWe=class{static get(e){return e.getContribution(KWe.ID)}constructor(e,i,n,s,l,d,f,g){this._contextMenuService=i,this._contextViewService=n,this._contextKeyService=s,this._keybindingService=l,this._menuService=d,this._configurationService=f,this._workspaceContextService=g,this._toDispose=new On,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(y=>this._onContextMenu(y))),this._toDispose.add(this._editor.onMouseWheel(y=>{if(this._contextMenuIsBeingShownCount>0){const w=this._contextViewService.getContextViewElement(),x=y.srcElement;x.shadowRoot&&y9(w)===x.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(y=>{this._editor.getOption(24)&&y.keyCode===58&&(y.preventDefault(),y.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(24)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu(e.event);if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let n=!1;for(const s of this._editor.getSelections())if(s.containsPosition(e.target.position)){n=!0;break}n||this._editor.setPosition(e.target.position)}let i=null;e.target.type!==1&&(i=e.event),this.showContextMenu(i)}showContextMenu(e){if(!this._editor.getOption(24)||!this._editor.hasModel())return;const i=this._getMenuActions(this._editor.getModel(),this._editor.contextMenuId);i.length>0&&this._doShowContextMenu(i,e)}_getMenuActions(e,i){const n=[],s=this._menuService.createMenu(i,this._contextKeyService),l=s.getActions({arg:e.uri});s.dispose();for(const d of l){const[,f]=d;let g=0;for(const y of f)if(y instanceof CU){const w=this._getMenuActions(e,y.item.submenu);w.length>0&&(n.push(new KU(y.id,y.label,w)),g++)}else n.push(y),g++;g&&n.push(new Up)}return n.length&&n.pop(),n}_doShowContextMenu(e,i=null){if(!this._editor.hasModel())return;const n=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let s=i;if(!s){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const d=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),f=Y_(this._editor.getDomNode()),g=f.left+d.left,y=f.top+d.top+d.height;s={x:g,y}}const l=this._editor.getOption(127)&&!TE;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>s,getActions:()=>e,getActionViewItem:d=>{const f=this._keybindingFor(d);if(f)return new gq(d,d,{label:!0,keybinding:f.getLabel(),isMenu:!0});const g=d;return typeof g.getActionViewItem=="function"?g.getActionViewItem():new gq(d,d,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:d=>this._keybindingFor(d),onHide:d=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:n})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||mmi(this._workspaceContextService.getWorkspace()))return;const i=this._editor.getOption(73);let n=0;const s=y=>({id:`menu-action-${++n}`,label:y.label,tooltip:"",class:void 0,enabled:typeof y.enabled>"u"?!0:y.enabled,checked:y.checked,run:y.run}),l=(y,w)=>new KU(`menu-action-${++n}`,y,w,void 0),d=(y,w,x,I,P)=>{if(!w)return s({label:y,enabled:w,run:()=>{}});const O=X=>()=>{this._configurationService.updateValue(x,X)},W=[];for(const X of P)W.push(s({label:X.label,checked:I===X.value,run:O(X.value)}));return l(y,W)},f=[];f.push(s({label:V("context.minimap.minimap","Minimap"),checked:i.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!i.enabled)}})),f.push(new Up),f.push(s({label:V("context.minimap.renderCharacters","Render Characters"),enabled:i.enabled,checked:i.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!i.renderCharacters)}})),f.push(d(V("context.minimap.size","Vertical size"),i.enabled,"editor.minimap.size",i.size,[{label:V("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:V("context.minimap.size.fill","Fill"),value:"fill"},{label:V("context.minimap.size.fit","Fit"),value:"fit"}])),f.push(d(V("context.minimap.slider","Slider"),i.enabled,"editor.minimap.showSlider",i.showSlider,[{label:V("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:V("context.minimap.slider.always","Always"),value:"always"}]));const g=this._editor.getOption(127)&&!TE;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:g?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>f,onHide:y=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};Eq.ID="editor.contrib.contextmenu";Eq=KWe=l2i([S5(1,GC),S5(2,n6),S5(3,Zo),S5(4,ou),S5(5,Dw),S5(6,El),S5(7,T9)],Eq);class c2i extends ms{constructor(){super({id:"editor.action.showContextMenu",label:V("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:Lt.textInputFocus,primary:1092,weight:100}})}run(e,i){var n;(n=Eq.get(i))===null||n===void 0||n.showContextMenu()}}Bc(Eq.ID,Eq,2);hr(c2i);class aFe{constructor(e){this.selections=e}equals(e){const i=this.selections.length,n=e.selections.length;if(i!==n)return!1;for(let s=0;s{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(i=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(i=>{if(this._isCursorUndoRedo||!i.oldSelections||i.oldModelVersionId!==i.modelVersionId)return;const n=new aFe(i.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(n)||(this._undoStack.push(new lFe(n,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new lFe(new aFe(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new lFe(new aFe(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}F9.ID="editor.contrib.cursorUndoRedoController";class u2i extends ms{constructor(){super({id:"cursorUndo",label:V("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:Lt.textInputFocus,primary:2099,weight:100}})}run(e,i,n){var s;(s=F9.get(i))===null||s===void 0||s.cursorUndo()}}class d2i extends ms{constructor(){super({id:"cursorRedo",label:V("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,i,n){var s;(s=F9.get(i))===null||s===void 0||s.cursorRedo()}}Bc(F9.ID,F9,0);hr(u2i);hr(d2i);class f2i{constructor(e,i,n){this.selection=e,this.targetPosition=i,this.copy=n,this.targetSelection=null}getEditOperations(e,i){const n=e.getValueInRange(this.selection);if(this.copy||i.addEditOperation(this.selection,null),i.addEditOperation(new at(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),n),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new Qs(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new Qs(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumberthis._onEditorMouseDown(i))),this._register(this._editor.onMouseUp(i=>this._onEditorMouseUp(i))),this._register(this._editor.onMouseDrag(i=>this._onEditorMouseDrag(i))),this._register(this._editor.onMouseDrop(i=>this._onEditorMouseDrop(i))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(i=>this.onEditorKeyDown(i))),this._register(this._editor.onKeyUp(i=>this.onEditorKeyUp(i))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){!this._editor.getOption(35)||this._editor.getOption(22)||(Nz(e)&&(this._modifierPressed=!0),this._mouseDown&&Nz(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(35)||this._editor.getOption(22)||(Nz(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===V4.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const i=e.target;if(this._dragSelection===null){const s=(this._editor.getSelections()||[]).filter(l=>i.position&&l.containsPosition(i.position));if(s.length===1)this._dragSelection=s[0];else return}Nz(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),i.position&&(this._dragSelection.containsPosition(i.position)?this._removeDecoration():this.showAt(i.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const i=new yi(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let n=null;if(e.event.shiftKey){const s=this._editor.getSelection();if(s){const{selectionStartLineNumber:l,selectionStartColumn:d}=s;n=[new Qs(l,d,i.lineNumber,i.column)]}}else n=(this._editor.getSelections()||[]).map(s=>s.containsPosition(i)?new Qs(i.lineNumber,i.column,i.lineNumber,i.column):s);this._editor.setSelections(n||[],"mouse",3)}else(!this._dragSelection.containsPosition(i)||(Nz(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(i)||this._dragSelection.getStartPosition().equals(i)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(V4.ID,new f2i(this._dragSelection,i,Nz(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new at(e.lineNumber,e.column,e.lineNumber,e.column),options:V4._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}V4.ID="editor.contrib.dragAndDrop";V4.TRIGGER_KEY_VALUE=Wl?6:5;V4._DECORATION_OPTIONS=Xa.register({description:"dnd-target",className:"dnd-target"});Bc(V4.ID,V4,2);var _me;Bc(CL.ID,CL,0);Jne(SWe);qr(new class extends sg{constructor(){super({id:I2t,precondition:Gze,kbOpts:{weight:100,primary:2137}})}runEditorCommand(c,e){var i;return(i=CL.get(e))===null||i===void 0?void 0:i.changePasteType()}});qr(new class extends sg{constructor(){super({id:"editor.hidePasteWidget",precondition:Gze,kbOpts:{weight:100,primary:9}})}runEditorCommand(c,e){var i;(i=CL.get(e))===null||i===void 0||i.clearWidgets()}});hr((_me=class extends ms{constructor(){super({id:"editor.action.pasteAs",label:V("pasteAs","Paste As..."),alias:"Paste As...",precondition:Lt.writable,metadata:{description:"Paste as",args:[{name:"args",schema:_me.argsSchema}]}})}run(e,i,n){var s;let l=typeof(n==null?void 0:n.kind)=="string"?n.kind:void 0;return!l&&n&&(l=typeof n.id=="string"?n.id:void 0),(s=CL.get(i))===null||s===void 0?void 0:s.pasteAs(l?new td(l):void 0)}},_me.argsSchema={type:"object",properties:{kind:{type:"string",description:V("pasteAs.kind","The kind of the paste edit to try applying. If not provided or there are multiple edits for this kind, the editor will show a picker.")}}},_me));hr(class extends ms{constructor(){super({id:"editor.action.pasteAsText",label:V("pasteAsText","Paste as Text"),alias:"Paste as Text",precondition:Lt.writable})}run(c,e){var i;return(i=CL.get(e))===null||i===void 0?void 0:i.pasteAs({providerId:Z4.id})}});class h2i{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const i=this._dragOperations.get(e);return this._dragOperations.delete(e),i}}}class Y1t{constructor(e){this.identifier=e}}const DTt=Kl("treeViewsDndService");dc(DTt,h2i,1);var _2i=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},pme=function(c,e){return function(i,n){e(i,n,c)}},QWe;const ETt="editor.experimental.dropIntoEditor.defaultProvider",ITt="editor.changeDropType",lUe=new Xr("dropWidgetVisible",!1,V("dropWidgetVisible","Whether the drop widget is showing"));let B9=QWe=class extends Ii{static get(e){return e.getContribution(QWe.ID)}constructor(e,i,n,s,l){super(),this._configService=n,this._languageFeaturesService=s,this._treeViewsDragAndDropService=l,this.treeItemsTransfer=Rie.getInstance(),this._dropProgressManager=this._register(i.createInstance(o1e,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(i.createInstance(c1e,"dropIntoEditor",e,lUe,{id:ITt,label:V("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(d=>this.onDropIntoEditor(e,d.position,d.event)))}clearWidgets(){this._postDropWidgetManager.clear()}changeDropType(){this._postDropWidgetManager.tryShowSelector()}async onDropIntoEditor(e,i,n){var s;if(!n.dataTransfer||!e.hasModel())return;(s=this._currentOperation)===null||s===void 0||s.cancel(),e.focus(),e.setPosition(i);const l=Hg(async d=>{const f=new dR(e,1,void 0,d);try{const g=await this.extractDataTransferData(n);if(g.size===0||f.token.isCancellationRequested)return;const y=e.getModel();if(!y)return;const w=this._languageFeaturesService.documentDropEditProvider.ordered(y).filter(I=>I.dropMimeTypes?I.dropMimeTypes.some(P=>g.matches(P)):!0),x=await this.getDropEdits(w,y,i,g,f);if(f.token.isCancellationRequested)return;if(x.length){const I=this.getInitialActiveEditIndex(y,x),P=e.getOption(36).showDropSelector==="afterDrop";await this._postDropWidgetManager.applyEditAndShowIfNeeded([at.fromPositions(i)],{activeEditIndex:I,allEdits:x},P,async O=>O,d)}}finally{f.dispose(),this._currentOperation===l&&(this._currentOperation=void 0)}});this._dropProgressManager.showWhile(i,V("dropIntoEditorProgress","Running drop handlers. Click to cancel"),l),this._currentOperation=l}async getDropEdits(e,i,n,s,l){const d=await yne(Promise.all(e.map(async g=>{try{const y=await g.provideDocumentDropEdits(i,n,s,l.token);return y==null?void 0:y.map(w=>({...w,providerId:g.id}))}catch(y){console.error(y)}})),l.token),f=kE(d??[]).flat();return D2t(f)}getInitialActiveEditIndex(e,i){const n=this._configService.getValue(ETt,{resource:e.uri});for(const[s,l]of Object.entries(n)){const d=new td(l),f=i.findIndex(g=>d.value===g.providerId&&g.handledMimeType&&y2t(s,[g.handledMimeType]));if(f>=0)return f}return 0}async extractDataTransferData(e){if(!e.dataTransfer)return new v2t;const i=S2t(e.dataTransfer);if(this.treeItemsTransfer.hasData(Y1t.prototype)){const n=this.treeItemsTransfer.getData(Y1t.prototype);if(Array.isArray(n))for(const s of n){const l=await this._treeViewsDragAndDropService.removeDragOperationTransfer(s.identifier);if(l)for(const[d,f]of l)i.replace(d,f)}}return i}};B9.ID="editor.contrib.dropIntoEditorController";B9=QWe=_2i([pme(1,So),pme(2,El),pme(3,js),pme(4,DTt)],B9);Bc(B9.ID,B9,2);Jne(CWe);qr(new class extends sg{constructor(){super({id:ITt,precondition:lUe,kbOpts:{weight:100,primary:2137}})}runEditorCommand(c,e,i){var n;(n=B9.get(e))===null||n===void 0||n.changeDropType()}});qr(new class extends sg{constructor(){super({id:"editor.hideDropWidget",precondition:lUe,kbOpts:{weight:100,primary:9}})}runEditorCommand(c,e,i){var n;(n=B9.get(e))===null||n===void 0||n.clearWidgets()}});dh.as(WE.Configuration).registerConfiguration({...xye,properties:{[ETt]:{type:"object",scope:5,description:V("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}});class S1{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map(i=>this._editor.getModel().getDecorationRange(i)).filter(i=>!!i);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const i=this._decorations.indexOf(e);return i>=0?i+1:1}getDecorationRangeAt(e){const i=e{if(this._highlightedDecorationId!==null&&(s.changeDecorationOptions(this._highlightedDecorationId,S1._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),i!==null&&(this._highlightedDecorationId=i,s.changeDecorationOptions(this._highlightedDecorationId,S1._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(s.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),i!==null){let l=this._editor.getModel().getDecorationRange(i);if(l.startLineNumber!==l.endLineNumber&&l.endColumn===1){const d=l.endLineNumber-1,f=this._editor.getModel().getLineMaxColumn(d);l=new at(l.startLineNumber,l.startColumn,d,f)}this._rangeHighlightDecorationId=s.addDecoration(l,S1._RANGE_HIGHLIGHT_DECORATION)}}),n}set(e,i){this._editor.changeDecorations(n=>{let s=S1._FIND_MATCH_DECORATION;const l=[];if(e.length>1e3){s=S1._FIND_MATCH_NO_OVERVIEW_DECORATION;const f=this._editor.getModel().getLineCount(),y=this._editor.getLayoutInfo().height/f,w=Math.max(2,Math.ceil(3/y));let x=e[0].range.startLineNumber,I=e[0].range.endLineNumber;for(let P=1,O=e.length;P=W.startLineNumber?W.endLineNumber>I&&(I=W.endLineNumber):(l.push({range:new at(x,1,I,1),options:S1._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),x=W.startLineNumber,I=W.endLineNumber)}l.push({range:new at(x,1,I,1),options:S1._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const d=new Array(e.length);for(let f=0,g=e.length;fn.removeDecoration(f)),this._findScopeDecorationIds=[]),i!=null&&i.length&&(this._findScopeDecorationIds=i.map(f=>n.addDecoration(f,S1._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let i=this._decorations.length-1;i>=0;i--){const n=this._decorations[i],s=this._editor.getModel().getDecorationRange(n);if(!(!s||s.endLineNumber>e.lineNumber)){if(s.endLineNumbere.column))return s}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let i=0,n=this._decorations.length;ie.lineNumber)return l;if(!(l.startColumn0){const n=[];for(let d=0;dat.compareRangesUsingStarts(d.range,f.range));const s=[];let l=n[0];for(let d=1;d0?e[0].toUpperCase()+e.substr(1):c[0][0].toUpperCase()!==c[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function eyt(c,e,i){return c[0].indexOf(i)!==-1&&e.indexOf(i)!==-1&&c[0].split(i).length===e.split(i).length}function tyt(c,e,i){const n=e.split(i),s=c[0].split(i);let l="";return n.forEach((d,f)=>{l+=NTt([s[f]],d)+i}),l.slice(0,-1)}class iyt{constructor(e){this.staticValue=e,this.kind=0}}class g2i{constructor(e){this.pieces=e,this.kind=1}}class Iq{static fromStaticValue(e){return new Iq([d9.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new iyt(""):e.length===1&&e[0].staticValue!==null?this._state=new iyt(e[0].staticValue):this._state=new g2i(e)}buildReplaceString(e,i){if(this._state.kind===0)return i?NTt(e,this._state.staticValue):this._state.staticValue;let n="";for(let s=0,l=this._state.pieces.length;s0){const g=[],y=d.caseOps.length;let w=0;for(let x=0,I=f.length;x=y){g.push(f.slice(x));break}switch(d.caseOps[w]){case"U":g.push(f[x].toUpperCase());break;case"u":g.push(f[x].toUpperCase()),w++;break;case"L":g.push(f[x].toLowerCase());break;case"l":g.push(f[x].toLowerCase()),w++;break;default:g.push(f[x])}}f=g.join("")}n+=f}return n}static _substitute(e,i){if(i===null)return"";if(e===0)return i[0];let n="";for(;e>0;){if(e=s)break;const d=c.charCodeAt(n);switch(d){case 92:i.emitUnchanged(n-1),i.emitStatic("\\",n+1);break;case 110:i.emitUnchanged(n-1),i.emitStatic(` +`,n+1);break;case 116:i.emitUnchanged(n-1),i.emitStatic(" ",n+1);break;case 117:case 85:case 108:case 76:i.emitUnchanged(n-1),i.emitStatic("",n+1),e.push(String.fromCharCode(d));break}continue}if(l===36){if(n++,n>=s)break;const d=c.charCodeAt(n);if(d===36){i.emitUnchanged(n-1),i.emitStatic("$",n+1);continue}if(d===48||d===38){i.emitUnchanged(n-1),i.emitMatchIndex(0,n+1,e),e.length=0;continue}if(49<=d&&d<=57){let f=d-48;if(n+1this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(n=>{(n.reason===3||n.reason===5||n.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(n=>{this._ignoreModelContentChanged||(n.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(n=>this._onStateChanged(n))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,yd(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},y2i)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,i){return i||e.getFullModelRange()}research(e,i){let n=null;typeof i<"u"?i!==null&&(Array.isArray(i)?n=i:n=[i]):n=this._decorations.getFindScopes(),n!==null&&(n=n.map(f=>{if(f.startLineNumber!==f.endLineNumber){let g=f.endLineNumber;return f.endColumn===1&&(g=g-1),new at(f.startLineNumber,1,g,this._editor.getModel().getLineMaxColumn(g))}return f}));const s=this._findMatches(n,!1,MM);this._decorations.set(s,n);const l=this._editor.getSelection();let d=this._decorations.getCurrentMatchesPosition(l);if(d===0&&s.length>0){const f=qte(s.map(g=>g.range),g=>at.compareRangesUsingStarts(g,l)>=0);d=f>0?f-1+1:d}this._state.changeMatchInfo(d,this._decorations.getCount(),void 0),e&&this._editor.getOption(41).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const i=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(i,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const i=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:n,column:s}=e;const l=this._editor.getModel();return i||s===1?(n===1?n=l.getLineCount():n--,s=l.getLineMaxColumn(n)):s--,new yi(n,s)}_moveToPrevMatch(e,i=!1){if(!this._state.canNavigateBack()){const w=this._decorations.matchAfterPosition(e);w&&this._setCurrentFindMatch(w);return}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:n,column:s}=e;const l=this._editor.getModel();return i||s===l.getLineMaxColumn(n)?(n===l.getLineCount()?n=1:n++,s=1):s++,new yi(n,s)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const n=this._decorations.matchBeforePosition(e);n&&this._setCurrentFindMatch(n);return}if(this._decorations.getCount()Cte._getSearchRange(this._editor.getModel(),l));return this._editor.getModel().findMatches(this._state.searchString,s,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(131):null,i,n)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=MM?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const i=new T5(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(131):null).parseSearchRequest();if(!i)return;let n=i.regex;if(!n.multiline){let x="mu";n.ignoreCase&&(x+="i"),n.global&&(x+="g"),n=new RegExp(n.source,x)}const s=this._editor.getModel(),l=s.getValue(1),d=s.getFullModelRange(),f=this._getReplacePattern();let g;const y=this._state.preserveCase;f.hasReplacementPatterns||y?g=l.replace(n,function(){return f.buildReplaceString(arguments,y)}):g=l.replace(n,f.buildReplaceString(null,y));const w=new mje(d,g,this._editor.getSelection());this._executeEditorCommand("replaceAll",w)}_regularReplaceAll(e){const i=this._getReplacePattern(),n=this._findMatches(e,i.hasReplacementPatterns||this._state.preserveCase,1073741824),s=[];for(let d=0,f=n.length;dd.range),s);this._executeEditorCommand("replaceAll",l)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();let n=this._findMatches(e,!1,1073741824).map(l=>new Qs(l.range.startLineNumber,l.range.startColumn,l.range.endLineNumber,l.range.endColumn));const s=this._editor.getSelection();for(let l=0,d=n.length;lthis._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=i,this._keybindingService=n,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const s={inputActiveOptionBorder:vs(cje),inputActiveOptionForeground:vs(uje),inputActiveOptionBackground:vs(q5)},l=this._register(pq());this.caseSensitive=this._register(new Ixt({appendTitle:this._keybindingLabelFor(cf.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,hoverDelegate:l,...s})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new Nxt({appendTitle:this._keybindingLabelFor(cf.ToggleWholeWordCommand),isChecked:this._state.wholeWord,hoverDelegate:l,...s})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new Lxt({appendTitle:this._keybindingLabelFor(cf.ToggleRegexCommand),isChecked:this._state.isRegex,hoverDelegate:l,...s})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(d=>{let f=!1;d.isRegex&&(this.regex.checked=this._state.isRegex,f=!0),d.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,f=!0),d.matchCase&&(this.caseSensitive.checked=this._state.matchCase,f=!0),!this._state.isRevealed&&f&&this._revealTemporarily()})),this._register(tn(this._domNode,yr.MOUSE_LEAVE,d=>this._onMouseLeave())),this._register(tn(this._domNode,"mouseover",d=>this._onMouseOver()))}_keybindingLabelFor(e){const i=this._keybindingService.lookupKeybinding(e);return i?` (${i.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return mbe.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}}mbe.ID="editor.contrib.findOptionsWidget";function Cme(c,e){return c===1?!0:c===2?!1:e}class b2i extends Ii{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return Cme(this._isRegexOverride,this._isRegex)}get wholeWord(){return Cme(this._wholeWordOverride,this._wholeWord)}get matchCase(){return Cme(this._matchCaseOverride,this._matchCase)}get preserveCase(){return Cme(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new ui),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,i,n){const s={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let l=!1;i===0&&(e=0),e>i&&(e=i),this._matchesPosition!==e&&(this._matchesPosition=e,s.matchesPosition=!0,l=!0),this._matchesCount!==i&&(this._matchesCount=i,s.matchesCount=!0,l=!0),typeof n<"u"&&(at.equalsRange(this._currentMatch,n)||(this._currentMatch=n,s.currentMatch=!0,l=!0)),l&&this._onFindReplaceStateChange.fire(s)}change(e,i,n=!0){var s;const l={moveCursor:i,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let d=!1;const f=this.isRegex,g=this.wholeWord,y=this.matchCase,w=this.preserveCase;typeof e.searchString<"u"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,l.searchString=!0,d=!0),typeof e.replaceString<"u"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,l.replaceString=!0,d=!0),typeof e.isRevealed<"u"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,l.isRevealed=!0,d=!0),typeof e.isReplaceRevealed<"u"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,l.isReplaceRevealed=!0,d=!0),typeof e.isRegex<"u"&&(this._isRegex=e.isRegex),typeof e.wholeWord<"u"&&(this._wholeWord=e.wholeWord),typeof e.matchCase<"u"&&(this._matchCase=e.matchCase),typeof e.preserveCase<"u"&&(this._preserveCase=e.preserveCase),typeof e.searchScope<"u"&&(!((s=e.searchScope)===null||s===void 0)&&s.every(x=>{var I;return(I=this._searchScope)===null||I===void 0?void 0:I.some(P=>!at.equalsRange(P,x))})||(this._searchScope=e.searchScope,l.searchScope=!0,d=!0)),typeof e.loop<"u"&&this._loop!==e.loop&&(this._loop=e.loop,l.loop=!0,d=!0),typeof e.isSearching<"u"&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,l.isSearching=!0,d=!0),typeof e.filters<"u"&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,l.filters=!0,d=!0),this._isRegexOverride=typeof e.isRegexOverride<"u"?e.isRegexOverride:0,this._wholeWordOverride=typeof e.wholeWordOverride<"u"?e.wholeWordOverride:0,this._matchCaseOverride=typeof e.matchCaseOverride<"u"?e.matchCaseOverride:0,this._preserveCaseOverride=typeof e.preserveCaseOverride<"u"?e.preserveCaseOverride:0,f!==this.isRegex&&(d=!0,l.isRegex=!0),g!==this.wholeWord&&(d=!0,l.wholeWord=!0),y!==this.matchCase&&(d=!0,l.matchCase=!0),w!==this.preserveCase&&(d=!0,l.preserveCase=!0),d&&this._onFindReplaceStateChange.fire(l)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=MM}}const C2i=V("defaultLabel","input"),S2i=V("label.preserveCaseToggle","Preserve Case");class w2i extends Jq{constructor(e){var i;super({icon:Dr.preserveCase,title:S2i+e.appendTitle,isChecked:e.isChecked,hoverDelegate:(i=e.hoverDelegate)!==null&&i!==void 0?i:Py("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class x2i extends Ew{constructor(e,i,n,s){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new ui),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new ui),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new ui),this._onInput=this._register(new ui),this._onKeyUp=this._register(new ui),this._onPreserveCaseKeyDown=this._register(new ui),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=i,this.placeholder=s.placeholder||"",this.validation=s.validation,this.label=s.label||C2i;const l=s.appendPreserveCaseLabel||"",d=s.history||[],f=!!s.flexibleHeight,g=!!s.flexibleWidth,y=s.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new Pxt(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:d,showHistoryHint:s.showHistoryHint,flexibleHeight:f,flexibleWidth:g,flexibleMaxHeight:y,inputBoxStyles:s.inputBoxStyles})),this.preserveCase=this._register(new w2i({appendTitle:l,isChecked:!1,...s.toggleStyles})),this._register(this.preserveCase.onChange(I=>{this._onDidOptionChange.fire(I),!I&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(I=>{this._onPreserveCaseKeyDown.fire(I)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const w=[this.preserveCase.domNode];this.onkeydown(this.domNode,I=>{if(I.equals(15)||I.equals(17)||I.equals(9)){const P=w.indexOf(this.domNode.ownerDocument.activeElement);if(P>=0){let O=-1;I.equals(17)?O=(P+1)%w.length:I.equals(15)&&(P===0?O=w.length-1:O=P-1),I.equals(9)?(w[P].blur(),this.inputBox.focus()):O>=0&&w[O].focus(),nc.stop(I,!0)}}});const x=document.createElement("div");x.className="controls",x.style.display=this._showOptionButtons?"block":"none",x.appendChild(this.preserveCase.domNode),this.domNode.appendChild(x),e==null||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,I=>this._onKeyDown.fire(I)),this.onkeyup(this.inputBox.inputElement,I=>this._onKeyUp.fire(I)),this.oninput(this.inputBox.inputElement,I=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,I=>this._onMouseDown.fire(I))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){var e;(e=this.inputBox)===null||e===void 0||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var LTt=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},PTt=function(c,e){return function(i,n){e(i,n,c)}};const uUe=new Xr("suggestWidgetVisible",!1,V("suggestWidgetVisible","Whether suggestion are visible")),dUe="historyNavigationWidgetFocus",ATt="historyNavigationForwardsEnabled",OTt="historyNavigationBackwardsEnabled";let H4;const Sme=[];function MTt(c,e){if(Sme.includes(e))throw new Error("Cannot register the same widget multiple times");Sme.push(e);const i=new On,n=new Xr(dUe,!1).bindTo(c),s=new Xr(ATt,!0).bindTo(c),l=new Xr(OTt,!0).bindTo(c),d=()=>{n.set(!0),H4=e},f=()=>{n.set(!1),H4===e&&(H4=void 0)};return H1e(e.element)&&d(),i.add(e.onDidFocus(()=>d())),i.add(e.onDidBlur(()=>f())),i.add(go(()=>{Sme.splice(Sme.indexOf(e),1),f()})),{historyNavigationForwardsEnablement:s,historyNavigationBackwardsEnablement:l,dispose(){i.dispose()}}}let XWe=class extends Axt{constructor(e,i,n,s){super(e,i,n);const l=this._register(s.createScoped(this.inputBox.element));this._register(MTt(l,this.inputBox))}};XWe=LTt([PTt(3,Zo)],XWe);let ZWe=class extends x2i{constructor(e,i,n,s,l=!1){super(e,i,l,n);const d=this._register(s.createScoped(this.inputBox.element));this._register(MTt(d,this.inputBox))}};ZWe=LTt([PTt(3,Zo)],ZWe);Ey.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:xn.and(xn.has(dUe),xn.equals(OTt,!0),xn.not("isComposing"),uUe.isEqualTo(!1)),primary:16,secondary:[528],handler:c=>{H4==null||H4.showPreviousValue()}});Ey.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:xn.and(xn.has(dUe),xn.equals(ATt,!0),xn.not("isComposing"),uUe.isEqualTo(!1)),primary:18,secondary:[530],handler:c=>{H4==null||H4.showNextValue()}});function nyt(c){var e,i;return((e=c.lookupKeybinding("history.showPrevious"))===null||e===void 0?void 0:e.getElectronAccelerator())==="Up"&&((i=c.lookupKeybinding("history.showNext"))===null||i===void 0?void 0:i.getElectronAccelerator())==="Down"}const ryt=Oh("find-collapsed",Dr.chevronRight,V("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),syt=Oh("find-expanded",Dr.chevronDown,V("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),k2i=Oh("find-selection",Dr.selection,V("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),T2i=Oh("find-replace",Dr.replace,V("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),D2i=Oh("find-replace-all",Dr.replaceAll,V("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),E2i=Oh("find-previous-match",Dr.arrowUp,V("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),I2i=Oh("find-next-match",Dr.arrowDown,V("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),N2i=V("label.findDialog","Find / Replace"),L2i=V("label.find","Find"),P2i=V("placeholder.find","Find"),A2i=V("label.previousMatchButton","Previous Match"),O2i=V("label.nextMatchButton","Next Match"),M2i=V("label.toggleSelectionFind","Find in Selection"),R2i=V("label.closeButton","Close"),F2i=V("label.replace","Replace"),B2i=V("placeholder.replace","Replace"),W2i=V("label.replaceButton","Replace"),V2i=V("label.replaceAllButton","Replace All"),H2i=V("label.toggleReplaceButton","Toggle Replace"),j2i=V("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",MM),z2i=V("label.matchesLocation","{0} of {1}"),oyt=V("label.noResults","No results"),DN=419,U2i=275,q2i=U2i-54;let gee=69;const $2i=33,ayt="ctrlEnterReplaceAll.windows.donotask",lyt=Wl?256:2048;class cFe{constructor(e){this.afterLineNumber=e,this.heightInPx=$2i,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function cyt(c,e,i){const n=!!e.match(/\n/);if(i&&n&&i.selectionStart>0){c.stopPropagation();return}}function uyt(c,e,i){const n=!!e.match(/\n/);if(i&&n&&i.selectionEndthis._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(x=>this._onStateChanged(x))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(x=>{if(x.hasChanged(91)&&(this._codeEditor.getOption(91)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),x.hasChanged(145)&&this._tryUpdateWidgetWidth(),x.hasChanged(2)&&this.updateAccessibilitySupport(),x.hasChanged(41)){const I=this._codeEditor.getOption(41).loop;this._state.change({loop:I},!1);const P=this._codeEditor.getOption(41).addExtraSpaceOnTop;P&&!this._viewZone&&(this._viewZone=new cFe(0),this._showViewZone()),!P&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(async()=>{if(this._isVisible){const x=await this._controller.getGlobalBufferTerm();x&&x!==this._state.searchString&&(this._state.change({searchString:x},!1),this._findInput.select())}})),this._findInputFocused=gbe.bindTo(d),this._findFocusTracker=this._register(IE(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=cUe.bindTo(d),this._replaceFocusTracker=this._register(IE(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(41).addExtraSpaceOnTop&&(this._viewZone=new cFe(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(x=>{if(x.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return vbe.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(91)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=OC(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){const i=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",i),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,Ba)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=gee+"px",this._state.matchesCount>=MM?this._matchesCount.title=j2i:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let e;if(this._state.matchesCount>0){let i=String(this._state.matchesCount);this._state.matchesCount>=MM&&(i+="+");let n=String(this._state.matchesPosition);n==="0"&&(n="?"),e=p9(z2i,n,i)}else e=oyt;this._matchesCount.appendChild(document.createTextNode(e)),Eb(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),gee=Math.max(gee,this._matchesCount.clientWidth)}_getAriaLabel(e,i,n){if(e===oyt)return n===""?V("ariaSearchNoResultEmpty","{0} found",e):V("ariaSearchNoResult","{0} found for '{1}'",e,n);if(i){const s=V("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,n,i.startLineNumber+":"+i.startColumn),l=this._codeEditor.getModel();return l&&i.startLineNumber<=l.getLineCount()&&i.startLineNumber>=1?`${l.getLineContent(i.startLineNumber)}, ${s}`:s}return V("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,n)}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),i=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,n=this._toggleSelectionFind.checked;this._isVisible&&(n||i)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const e=this._state.searchString.length>0,i=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&i&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&i&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const n=!this._codeEditor.getOption(91);this._toggleReplaceBtn.setEnabled(this._isVisible&&n)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(41).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const n=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=n;break}}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let i=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&e){const n=this._codeEditor.getDomNode();if(n){const s=Y_(n),l=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),d=s.left+(l?l.left:0),f=l?l.top:0;if(this._viewZone&&fe.startLineNumber&&(i=!1);const g=vCt(this._domNode).left;d>g&&(i=!1);const y=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());s.left+(y?y.left:0)>g&&(i=!1)}}}this._showViewZone(i)}}_hide(e){this._revealTimeouts.forEach(i=>{clearTimeout(i)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(41).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const n=this._viewZone;this._viewZoneId!==void 0||!n||this._codeEditor.changeViewZones(s=>{n.heightInPx=this._getHeight(),this._viewZoneId=s.addZone(n),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+n.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(41).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new cFe(0));const n=this._viewZone;this._codeEditor.changeViewZones(s=>{if(this._viewZoneId!==void 0){const l=this._getHeight();if(l===n.heightInPx)return;const d=l-n.heightInPx;n.heightInPx=l,s.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+d);return}else{let l=this._getHeight();if(l-=this._codeEditor.getOption(84).top,l<=0)return;n.heightInPx=l,this._viewZoneId=s.addZone(n),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+l)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{this._viewZoneId!==void 0&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!this._domNode.isConnected)return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const n=e.width,s=e.minimap.minimapWidth;let l=!1,d=!1,f=!1;if(this._resized&&OC(this._domNode)>DN){this._domNode.style.maxWidth=`${n-28-s-15}px`,this._replaceInput.width=OC(this._findInput.domNode);return}if(DN+28+s>=n&&(d=!0),DN+28+s-gee>=n&&(f=!0),DN+28+s-gee>=n+50&&(l=!0),this._domNode.classList.toggle("collapsed-find-widget",l),this._domNode.classList.toggle("narrow-find-widget",f),this._domNode.classList.toggle("reduced-find-widget",d),!f&&!l&&(this._domNode.style.maxWidth=`${n-28-s-15}px`),this._findInput.layout({collapsedFindWidget:l,narrowFindWidget:f,reducedFindWidget:d}),this._resized){const g=this._findInput.inputBox.element.clientWidth;g>0&&(this._replaceInput.width=g)}else this._isReplaceVisible&&(this._replaceInput.width=OC(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===e?!1:(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const e=this._codeEditor.getSelections();e.map(i=>{i.endColumn===1&&i.endLineNumber>i.startLineNumber&&(i=i.setEndPosition(i.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(i.endLineNumber-1)));const n=this._state.currentMatch;return i.startLineNumber!==i.endLineNumber&&!at.equalsRange(i,n)?i:null}).filter(i=>!!i),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(lyt|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(` +`),e.preventDefault();return}if(e.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return cyt(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return uyt(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(lyt|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{M0&&mE&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(V("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(ayt,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(` +`),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return cyt(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return uyt(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const i=this._keybindingService.lookupKeybinding(e);return i?` (${i.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new XWe(null,this._contextViewProvider,{width:q2i,label:L2i,placeholder:P2i,appendCaseSensitiveLabel:this._keybindingLabelFor(cf.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(cf.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(cf.ToggleRegexCommand),validation:w=>{if(w.length===0||!this._findInput.getRegex())return null;try{return new RegExp(w,"gu"),null}catch(x){return{content:x.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>nyt(this._keybindingService),inputBoxStyles:Dve,toggleStyles:Tve},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(w=>this._onFindInputKeyDown(w))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(w=>{w.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),w.preventDefault())})),this._register(this._findInput.onRegexKeyDown(w=>{w.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),w.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(w=>{this._tryUpdateHeight()&&this._showViewZone()})),Ty&&this._register(this._findInput.onMouseDown(w=>this._onFindInputMouseDown(w))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount();const n=this._register(pq());this._prevBtn=this._register(new Lz({label:A2i+this._keybindingLabelFor(cf.PreviousMatchFindAction),icon:E2i,hoverDelegate:n,onTrigger:()=>{yM(this._codeEditor.getAction(cf.PreviousMatchFindAction)).run().then(void 0,Ba)}},this._hoverService)),this._nextBtn=this._register(new Lz({label:O2i+this._keybindingLabelFor(cf.NextMatchFindAction),icon:I2i,hoverDelegate:n,onTrigger:()=>{yM(this._codeEditor.getAction(cf.NextMatchFindAction)).run().then(void 0,Ba)}},this._hoverService));const s=document.createElement("div");s.className="find-part",s.appendChild(this._findInput.domNode);const l=document.createElement("div");l.className="find-actions",s.appendChild(l),l.appendChild(this._matchesCount),l.appendChild(this._prevBtn.domNode),l.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new Jq({icon:k2i,title:M2i+this._keybindingLabelFor(cf.ToggleSearchScopeCommand),isChecked:!1,hoverDelegate:n,inputActiveOptionBackground:vs(q5),inputActiveOptionBorder:vs(cje),inputActiveOptionForeground:vs(uje)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let w=this._codeEditor.getSelections();w=w.map(x=>(x.endColumn===1&&x.endLineNumber>x.startLineNumber&&(x=x.setEndPosition(x.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(x.endLineNumber-1))),x.isEmpty()?null:x)).filter(x=>!!x),w.length&&this._state.change({searchScope:w},!0)}}else this._state.change({searchScope:null},!0)})),l.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new Lz({label:R2i+this._keybindingLabelFor(cf.CloseFindWidgetCommand),icon:ckt,hoverDelegate:n,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:w=>{w.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),w.preventDefault())}},this._hoverService)),this._replaceInput=this._register(new ZWe(null,void 0,{label:F2i,placeholder:B2i,appendPreserveCaseLabel:this._keybindingLabelFor(cf.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>nyt(this._keybindingService),inputBoxStyles:Dve,toggleStyles:Tve},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(w=>this._onReplaceInputKeyDown(w))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(w=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(w=>{w.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),w.preventDefault())}));const d=this._register(pq());this._replaceBtn=this._register(new Lz({label:W2i+this._keybindingLabelFor(cf.ReplaceOneAction),icon:T2i,hoverDelegate:d,onTrigger:()=>{this._controller.replace()},onKeyDown:w=>{w.equals(1026)&&(this._closeBtn.focus(),w.preventDefault())}},this._hoverService)),this._replaceAllBtn=this._register(new Lz({label:V2i+this._keybindingLabelFor(cf.ReplaceAllAction),icon:D2i,hoverDelegate:d,onTrigger:()=>{this._controller.replaceAll()}},this._hoverService));const f=document.createElement("div");f.className="replace-part",f.appendChild(this._replaceInput.domNode);const g=document.createElement("div");g.className="replace-actions",f.appendChild(g),g.appendChild(this._replaceBtn.domNode),g.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new Lz({label:H2i,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=OC(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}},this._hoverService)),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.ariaLabel=N2i,this._domNode.role="dialog",this._domNode.style.width=`${DN}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(s),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(f),this._resizeSash=this._register(new gv(this._domNode,this,{orientation:0,size:2})),this._resized=!1;let y=DN;this._register(this._resizeSash.onDidStart(()=>{y=OC(this._domNode)})),this._register(this._resizeSash.onDidChange(w=>{this._resized=!0;const x=y+w.startX-w.currentX;if(xI||(this._domNode.style.width=`${x}px`,this._isReplaceVisible&&(this._replaceInput.width=OC(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const w=OC(this._domNode);if(w{this._opts.onTrigger(),l.preventDefault()}),this.onkeydown(this._domNode,l=>{var d,f;if(l.equals(10)||l.equals(3)){this._opts.onTrigger(),l.preventDefault();return}(f=(d=this._opts).onKeyDown)===null||f===void 0||f.call(d,l)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...Uo.asClassNameArray(ryt)),this._domNode.classList.add(...Uo.asClassNameArray(syt))):(this._domNode.classList.remove(...Uo.asClassNameArray(syt)),this._domNode.classList.add(...Uo.asClassNameArray(ryt)))}}dk((c,e)=>{const i=c.getColor(xM);i&&e.addRule(`.monaco-editor .findMatch { border: 1px ${SE(c.type)?"dotted":"solid"} ${i}; box-sizing: border-box; }`);const n=c.getColor(dli);n&&e.addRule(`.monaco-editor .findScope { border: 1px ${SE(c.type)?"dashed":"solid"} ${n}; }`);const s=c.getColor(ec);s&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${s}; }`);const l=c.getColor(cli);l&&e.addRule(`.monaco-editor .findMatchInline { color: ${l}; }`);const d=c.getColor(uli);d&&e.addRule(`.monaco-editor .currentFindMatchInline { color: ${d}; }`)});var RTt=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Jx=function(c,e){return function(i,n){e(i,n,c)}},YWe;const J2i=524288;function eVe(c,e="single",i=!1){if(!c.hasModel())return null;const n=c.getSelection();if(e==="single"&&n.startLineNumber===n.endLineNumber||e==="multiple"){if(n.isEmpty()){const s=c.getConfiguredWordAtPosition(n.getStartPosition());if(s&&i===!1)return s.word}else if(c.getModel().getValueLengthInRange(n)this._onStateChanged(f))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const f=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),f&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(41).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!gbe.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e=e.map(i=>(i.endColumn===1&&i.endLineNumber>i.startLineNumber&&(i=i.setEndPosition(i.endLineNumber-1,this._editor.getModel().getLineMaxColumn(i.endLineNumber-1))),i.isEmpty()?null:i)).filter(i=>!!i),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=Cw(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}async _start(e,i){if(this.disposeModel(),!this._editor.hasModel())return;const n={...i,isRevealed:!0};if(e.seedSearchStringFromSelection==="single"){const s=eVe(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);s&&(this._state.isRegex?n.searchString=Cw(s):n.searchString=s)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){const s=eVe(this._editor,e.seedSearchStringFromSelection);s&&(n.searchString=s)}if(!n.searchString&&e.seedSearchStringFromGlobalClipboard){const s=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;s&&(n.searchString=s)}if(e.forceRevealReplace||n.isReplaceRevealed?n.isReplaceRevealed=!0:this._findWidgetVisible.get()||(n.isReplaceRevealed=!1),e.updateSearchScope){const s=this._editor.getSelections();s.some(l=>!l.isEmpty())&&(n.searchScope=s)}n.loop=e.loop,this._state.change(n,!1),this._model||(this._model=new Cte(this._editor,this._state))}start(e,i){return this._start(e,i)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(e){return this._model?(this._model.moveToMatch(e),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){var e;return this._model?!((e=this._editor.getModel())===null||e===void 0)&&e.isTooLargeForHeapOperation()?(this._notificationService.warn(V("too.large.for.replaceall","The file is too large to perform a replace all operation.")),!1):(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}async getGlobalBufferTerm(){return this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(e){this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};Iy.ID="editor.contrib.findController";Iy=YWe=RTt([Jx(1,Zo),Jx(2,mT),Jx(3,o6),Jx(4,L_),Jx(5,DL)],Iy);let tVe=class extends Iy{constructor(e,i,n,s,l,d,f,g,y){super(e,n,f,g,d,y),this._contextViewService=i,this._keybindingService=s,this._themeService=l,this._widget=null,this._findOptionsWidget=null}async _start(e,i){this._widget||this._createFindWidget();const n=this._editor.getSelection();let s=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":s=!0;break;case"never":s=!1;break;case"multiline":{s=!!n&&n.startLineNumber!==n.endLineNumber;break}}e.updateSearchScope=e.updateSearchScope||s,await super._start(e,i),this._widget&&(e.shouldFocus===2?this._widget.focusReplaceInput():e.shouldFocus===1&&this._widget.focusFindInput())}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new vbe(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService,this._hoverService)),this._findOptionsWidget=this._register(new mbe(this._editor,this._state,this._keybindingService))}};tVe=RTt([Jx(1,n6),Jx(2,Zo),Jx(3,ou),Jx(4,og),Jx(5,L_),Jx(6,mT),Jx(7,o6),Jx(8,DL)],tVe);const G2i=MCt(new OCt({id:cf.StartFindAction,label:V("startFindAction","Find"),alias:"Find",precondition:xn.or(Lt.focus,xn.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:_t.MenubarEditMenu,group:"3_find",title:V({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));G2i.addImplementation(0,(c,e,i)=>{const n=Iy.get(e);return n?n.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(41).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(41).loop}):!1});const K2i={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},isRegex:{type:"boolean"},matchWholeWord:{type:"boolean"},isCaseSensitive:{type:"boolean"},preserveCase:{type:"boolean"},findInSelection:{type:"boolean"}}}}]};class Q2i extends ms{constructor(){super({id:cf.StartFindWithArgs,label:V("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},metadata:K2i})}async run(e,i,n){const s=Iy.get(i);if(s){const l=n?{searchString:n.searchString,replaceString:n.replaceString,isReplaceRevealed:n.replaceString!==void 0,isRegex:n.isRegex,wholeWord:n.matchWholeWord,matchCase:n.isCaseSensitive,preserveCase:n.preserveCase}:{};await s.start({forceRevealReplace:!1,seedSearchStringFromSelection:s.getState().searchString.length===0&&i.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:i.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(n==null?void 0:n.findInSelection)||!1,loop:i.getOption(41).loop},l),s.setGlobalBufferTerm(s.getState().searchString)}}}class X2i extends ms{constructor(){super({id:cf.StartFindWithSelection,label:V("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(e,i){const n=Iy.get(i);n&&(await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:i.getOption(41).loop}),n.setGlobalBufferTerm(n.getState().searchString))}}class FTt extends ms{async run(e,i){const n=Iy.get(i);n&&!this._run(n)&&(await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.getState().searchString.length===0&&i.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:i.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:i.getOption(41).loop}),this._run(n))}}class Z2i extends FTt{constructor(){super({id:cf.NextMatchFindAction,label:V("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:Lt.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:xn.and(Lt.focus,gbe),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}}class Y2i extends FTt{constructor(){super({id:cf.PreviousMatchFindAction,label:V("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:Lt.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:xn.and(Lt.focus,gbe),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}class eTi extends ms{constructor(){super({id:cf.GoToMatchFindAction,label:V("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:l6}),this._highlightDecorations=[]}run(e,i,n){const s=Iy.get(i);if(!s)return;const l=s.getState().matchesCount;if(l<1){e.get(L_).notify({severity:vye.Warning,message:V("findMatchAction.noResults","No matches. Try searching for something else.")});return}const f=e.get(pk).createInputBox();f.placeholder=V("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",l);const g=w=>{const x=parseInt(w);if(isNaN(x))return;const I=s.getState().matchesCount;if(x>0&&x<=I)return x-1;if(x<0&&x>=-I)return I+x},y=w=>{const x=g(w);if(typeof x=="number"){f.validationMessage=void 0,s.goToMatch(x);const I=s.getState().currentMatch;I&&this.addDecorations(i,I)}else f.validationMessage=V("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",s.getState().matchesCount),this.clearDecorations(i)};f.onDidChangeValue(w=>{y(w)}),f.onDidAccept(()=>{const w=g(f.value);typeof w=="number"?(s.goToMatch(w),f.hide()):f.validationMessage=V("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",s.getState().matchesCount)}),f.onDidHide(()=>{this.clearDecorations(i),f.dispose()}),f.show()}clearDecorations(e){e.changeDecorations(i=>{this._highlightDecorations=i.deltaDecorations(this._highlightDecorations,[])})}addDecorations(e,i){e.changeDecorations(n=>{this._highlightDecorations=n.deltaDecorations(this._highlightDecorations,[{range:i,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:i,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:Lh(FSt),position:ww.Full}}}])})}}class BTt extends ms{async run(e,i){const n=Iy.get(i);if(!n)return;const s=eVe(i,"single",!1);s&&n.setSearchString(s),this._run(n)||(await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:i.getOption(41).loop}),this._run(n))}}class tTi extends BTt{constructor(){super({id:cf.NextSelectionMatchFindAction,label:V("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:Lt.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class iTi extends BTt{constructor(){super({id:cf.PreviousSelectionMatchFindAction,label:V("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:Lt.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}const nTi=MCt(new OCt({id:cf.StartFindReplaceAction,label:V("startReplace","Replace"),alias:"Replace",precondition:xn.or(Lt.focus,xn.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:_t.MenubarEditMenu,group:"3_find",title:V({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));nTi.addImplementation(0,(c,e,i)=>{if(!e.hasModel()||e.getOption(91))return!1;const n=Iy.get(e);if(!n)return!1;const s=e.getSelection(),l=n.isFindInputFocused(),d=!s.isEmpty()&&s.startLineNumber===s.endLineNumber&&e.getOption(41).seedSearchStringFromSelection!=="never"&&!l,f=l||d?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:d?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(41).seedSearchStringFromSelection!=="never",shouldFocus:f,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(41).loop})});Bc(Iy.ID,tVe,0);hr(Q2i);hr(X2i);hr(Z2i);hr(Y2i);hr(eTi);hr(tTi);hr(iTi);const jE=sg.bindToContribution(Iy.get);qr(new jE({id:cf.CloseFindWidgetCommand,precondition:l6,handler:c=>c.closeFindWidget(),kbOpts:{weight:105,kbExpr:xn.and(Lt.focus,xn.not("isComposing")),primary:9,secondary:[1033]}}));qr(new jE({id:cf.ToggleCaseSensitiveCommand,precondition:void 0,handler:c=>c.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:Lt.focus,primary:gme.primary,mac:gme.mac,win:gme.win,linux:gme.linux}}));qr(new jE({id:cf.ToggleWholeWordCommand,precondition:void 0,handler:c=>c.toggleWholeWords(),kbOpts:{weight:105,kbExpr:Lt.focus,primary:mme.primary,mac:mme.mac,win:mme.win,linux:mme.linux}}));qr(new jE({id:cf.ToggleRegexCommand,precondition:void 0,handler:c=>c.toggleRegex(),kbOpts:{weight:105,kbExpr:Lt.focus,primary:vme.primary,mac:vme.mac,win:vme.win,linux:vme.linux}}));qr(new jE({id:cf.ToggleSearchScopeCommand,precondition:void 0,handler:c=>c.toggleSearchScope(),kbOpts:{weight:105,kbExpr:Lt.focus,primary:yme.primary,mac:yme.mac,win:yme.win,linux:yme.linux}}));qr(new jE({id:cf.TogglePreserveCaseCommand,precondition:void 0,handler:c=>c.togglePreserveCase(),kbOpts:{weight:105,kbExpr:Lt.focus,primary:bme.primary,mac:bme.mac,win:bme.win,linux:bme.linux}}));qr(new jE({id:cf.ReplaceOneAction,precondition:l6,handler:c=>c.replace(),kbOpts:{weight:105,kbExpr:Lt.focus,primary:3094}}));qr(new jE({id:cf.ReplaceOneAction,precondition:l6,handler:c=>c.replace(),kbOpts:{weight:105,kbExpr:xn.and(Lt.focus,cUe),primary:3}}));qr(new jE({id:cf.ReplaceAllAction,precondition:l6,handler:c=>c.replaceAll(),kbOpts:{weight:105,kbExpr:Lt.focus,primary:2563}}));qr(new jE({id:cf.ReplaceAllAction,precondition:l6,handler:c=>c.replaceAll(),kbOpts:{weight:105,kbExpr:xn.and(Lt.focus,cUe),primary:void 0,mac:{primary:2051}}}));qr(new jE({id:cf.SelectAllMatchesAction,precondition:l6,handler:c=>c.selectAllMatches(),kbOpts:{weight:105,kbExpr:Lt.focus,primary:515}}));const rTi={0:" ",1:"u",2:"r"},dyt=65535,sE=16777215,fyt=4278190080;class uFe{constructor(e){const i=Math.ceil(e/32);this._states=new Uint32Array(i)}get(e){const i=e/32|0,n=e%32;return(this._states[i]&1<dyt)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=i,this._collapseStates=new uFe(e.length),this._userDefinedStates=new uFe(e.length),this._recoveredStates=new uFe(e.length),this._types=n,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const e=[],i=(n,s)=>{const l=e[e.length-1];return this.getStartLineNumber(l)<=n&&this.getEndLineNumber(l)>=s};for(let n=0,s=this._startIndexes.length;nsE||d>sE)throw new Error("startLineNumber or endLineNumber must not exceed "+sE);for(;e.length>0&&!i(l,d);)e.pop();const f=e.length>0?e[e.length-1]:-1;e.push(n),this._startIndexes[n]=l+((f&255)<<24),this._endIndexes[n]=d+((f&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&sE}getEndLineNumber(e){return this._endIndexes[e]&sE}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,i){this._collapseStates.set(e,i)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,i){return this._userDefinedStates.set(e,i)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,i){return this._recoveredStates.set(e,i)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,i){i===1?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):i===2?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,i){let n=!1;if(this._types)for(let s=0;s>>24)+((this._endIndexes[e]&fyt)>>>16);return i===dyt?-1:i}contains(e,i){return this.getStartLineNumber(e)<=i&&this.getEndLineNumber(e)>=i}findIndex(e){let i=0,n=this._startIndexes.length;if(n===0)return-1;for(;i=0){if(this.getEndLineNumber(i)>=e)return i;for(i=this.getParentIndex(i);i!==-1;){if(this.contains(i,e))return i;i=this.getParentIndex(i)}}return-1}toString(){const e=[];for(let i=0;iArray.isArray(W)?Z=>ZZ=w.startLineNumber))y&&y.startLineNumber===w.startLineNumber?(w.source===1?W=w:(W=y,W.isCollapsed=w.isCollapsed&&y.endLineNumber===w.endLineNumber,W.source=0),y=l(++f)):(W=w,w.isCollapsed&&w.source===0&&(W.source=2)),w=d(++g);else{let X=g,Z=w;for(;;){if(!Z||Z.startLineNumber>y.endLineNumber){W=y;break}if(Z.source===1&&Z.endLineNumber>y.endLineNumber)break;Z=d(++X)}y=l(++f)}if(W){for(;I&&I.endLineNumberW.startLineNumber&&W.startLineNumber>P&&W.endLineNumber<=n&&(!I||I.endLineNumber>=W.endLineNumber)&&(O.push(W),P=W.startLineNumber,I&&x.push(I),I=W)}}return O}}class sTi{constructor(e,i){this.ranges=e,this.index=i}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}class oTi{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,i){this._updateEventEmitter=new ui,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=i,this._regions=new uw(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort((n,s)=>n.regionIndex-s.regionIndex);const i={};this._decorationProvider.changeDecorations(n=>{let s=0,l=-1,d=-1;const f=g=>{for(;sd&&(d=y),s++}};for(const g of e){const y=g.regionIndex,w=this._editorDecorationIds[y];if(w&&!i[w]){i[w]=!0,f(y);const x=!this._regions.isCollapsed(y);this._regions.setCollapsed(y,x),l=Math.max(l,this._regions.getEndLineNumber(y))}}f(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){const i=new Array,n=s=>{for(const l of e)if(!(l.startLineNumber>s.endLineNumber||s.startLineNumber>l.endLineNumber))return!0;return!1};for(let s=0;sn&&(n=f)}this._decorationProvider.changeDecorations(s=>this._editorDecorationIds=s.deltaDecorations(this._editorDecorationIds,i)),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){const i=(s,l)=>{for(const d of e)if(s=d.endLineNumber||d.startLineNumber<1||d.endLineNumber>n)continue;const f=this._getLinesChecksum(d.startLineNumber+1,d.endLineNumber);i.push({startLineNumber:d.startLineNumber,endLineNumber:d.endLineNumber,isCollapsed:d.isCollapsed,source:d.source,checksum:f})}return i.length>0?i:void 0}applyMemento(e){var i,n;if(!Array.isArray(e))return;const s=[],l=this._textModel.getLineCount();for(const f of e){if(f.startLineNumber>=f.endLineNumber||f.startLineNumber<1||f.endLineNumber>l)continue;const g=this._getLinesChecksum(f.startLineNumber+1,f.endLineNumber);(!f.checksum||g===f.checksum)&&s.push({startLineNumber:f.startLineNumber,endLineNumber:f.endLineNumber,type:void 0,isCollapsed:(i=f.isCollapsed)!==null&&i!==void 0?i:!0,source:(n=f.source)!==null&&n!==void 0?n:0})}const d=uw.sanitizeAndMerge(this._regions,s,l);this.updatePost(uw.fromFoldRanges(d))}_getLinesChecksum(e,i){return R1e(this._textModel.getLineContent(e)+this._textModel.getLineContent(i))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,i){const n=[];if(this._regions){let s=this._regions.findRange(e),l=1;for(;s>=0;){const d=this._regions.toRegion(s);(!i||i(d,l))&&n.push(d),l++,s=d.parentIndex}}return n}getRegionAtLine(e){if(this._regions){const i=this._regions.findRange(e);if(i>=0)return this._regions.toRegion(i)}return null}getRegionsInside(e,i){const n=[],s=e?e.regionIndex+1:0,l=e?e.endLineNumber:Number.MAX_VALUE;if(i&&i.length===2){const d=[];for(let f=s,g=this._regions.length;f0&&!y.containedBy(d[d.length-1]);)d.pop();d.push(y),i(y,d.length)&&n.push(y)}else break}}else for(let d=s,f=this._regions.length;d1){const f=c.getRegionsInside(l,(g,y)=>g.isCollapsed!==d&&y0)for(const l of n){const d=c.getRegionAtLine(l);if(d&&(d.isCollapsed!==e&&s.push(d),i>1)){const f=c.getRegionsInside(d,(g,y)=>g.isCollapsed!==e&&yd.isCollapsed!==e&&ff.isCollapsed!==e&&g<=i);s.push(...d)}c.toggleCollapseState(s)}function aTi(c,e,i){const n=[];for(const s of i){const l=c.getAllRegionsAtLine(s,d=>d.isCollapsed!==e);l.length>0&&n.push(l[0])}c.toggleCollapseState(n)}function lTi(c,e,i,n){const s=(d,f)=>f===e&&d.isCollapsed!==i&&!n.some(g=>d.containsLine(g)),l=c.getRegionsInside(null,s);c.toggleCollapseState(l)}function HTt(c,e,i){const n=[];for(const d of i){const f=c.getAllRegionsAtLine(d,void 0);f.length>0&&n.push(f[0])}const s=d=>n.every(f=>!f.containedBy(d)&&!d.containedBy(f))&&d.isCollapsed!==e,l=c.getRegionsInside(null,s);c.toggleCollapseState(l)}function fUe(c,e,i){const n=c.textModel,s=c.regions,l=[];for(let d=s.length-1;d>=0;d--)if(i!==s.isCollapsed(d)){const f=s.getStartLineNumber(d);e.test(n.getLineContent(f))&&l.push(s.toRegion(d))}c.toggleCollapseState(l)}function hUe(c,e,i){const n=c.regions,s=[];for(let l=n.length-1;l>=0;l--)i!==n.isCollapsed(l)&&e===n.getType(l)&&s.push(n.toRegion(l));c.toggleCollapseState(s)}function cTi(c,e){let i=null;const n=e.getRegionAtLine(c);if(n!==null&&(i=n.startLineNumber,c===i)){const s=n.parentIndex;s!==-1?i=e.regions.getStartLineNumber(s):i=null}return i}function uTi(c,e){let i=e.getRegionAtLine(c);if(i!==null&&i.startLineNumber===c){if(c!==i.startLineNumber)return i.startLineNumber;{const n=i.parentIndex;let s=0;for(n!==-1&&(s=e.regions.getStartLineNumber(i.parentIndex));i!==null;)if(i.regionIndex>0){if(i=e.regions.toRegion(i.regionIndex-1),i.startLineNumber<=s)return null;if(i.parentIndex===n)return i.startLineNumber}else return null}}else if(e.regions.length>0)for(i=e.regions.toRegion(e.regions.length-1);i!==null;){if(i.startLineNumber0?i=e.regions.toRegion(i.regionIndex-1):i=null}return null}function dTi(c,e){let i=e.getRegionAtLine(c);if(i!==null&&i.startLineNumber===c){const n=i.parentIndex;let s=0;if(n!==-1)s=e.regions.getEndLineNumber(i.parentIndex);else{if(e.regions.length===0)return null;s=e.regions.getEndLineNumber(e.regions.length-1)}for(;i!==null;)if(i.regionIndex=s)return null;if(i.parentIndex===n)return i.startLineNumber}else return null}else if(e.regions.length>0)for(i=e.regions.toRegion(0);i!==null;){if(i.startLineNumber>c)return i.startLineNumber;i.regionIndexthis.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some(i=>i.range.endLineNumber!==i.range.startLineNumber||sR(i.text)[0]!==0))}updateHiddenRanges(){let e=!1;const i=[];let n=0,s=0,l=Number.MAX_VALUE,d=-1;const f=this._foldingModel.regions;for(;n0}isHidden(e){return hyt(this._hiddenRanges,e)!==null}adjustSelections(e){let i=!1;const n=this._foldingModel.textModel;let s=null;const l=d=>((!s||!hTi(d,s))&&(s=hyt(this._hiddenRanges,d)),s?s.startLineNumber-1:null);for(let d=0,f=e.length;d0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function hTi(c,e){return c>=e.startLineNumber&&c<=e.endLineNumber}function hyt(c,e){const i=qte(c,n=>e=0&&c[i].endLineNumber>=e?c[i]:null}const _Ti=5e3,pTi="indent";class _Ue{constructor(e,i,n){this.editorModel=e,this.languageConfigurationService=i,this.foldingRangesLimit=n,this.id=pTi}dispose(){}compute(e){const i=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,n=i&&!!i.offSide,s=i&&i.markers;return Promise.resolve(vTi(this.editorModel,n,s,this.foldingRangesLimit))}}let gTi=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,i,n){if(e>sE||i>sE)return;const s=this._length;this._startIndexes[s]=e,this._endIndexes[s]=i,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(e){const i=this._foldingRangesLimit.limit;if(this._length<=i){this._foldingRangesLimit.update(this._length,!1);const n=new Uint32Array(this._length),s=new Uint32Array(this._length);for(let l=this._length-1,d=0;l>=0;l--,d++)n[d]=this._startIndexes[l],s[d]=this._endIndexes[l];return new uw(n,s)}else{this._foldingRangesLimit.update(this._length,i);let n=0,s=this._indentOccurrences.length;for(let g=0;gi){s=g;break}n+=y}}const l=e.getOptions().tabSize,d=new Uint32Array(i),f=new Uint32Array(i);for(let g=this._length-1,y=0;g>=0;g--){const w=this._startIndexes[g],x=e.getLineContent(w),I=_ye(x,l);(I{}};function vTi(c,e,i,n=mTi){const s=c.getOptions().tabSize,l=new gTi(n);let d;i&&(d=new RegExp(`(${i.start.source})|(?:${i.end.source})`));const f=[],g=c.getLineCount()+1;f.push({indent:-1,endAbove:g,line:g});for(let y=c.getLineCount();y>0;y--){const w=c.getLineContent(y),x=_ye(w,s);let I=f[f.length-1];if(x===-1){e&&(I.endAbove=y);continue}let P;if(d&&(P=w.match(d)))if(P[1]){let O=f.length-1;for(;O>0&&f[O].indent!==-2;)O--;if(O>0){f.length=O+1,I=f[O],l.insertFirst(y,I.line,x),I.line=y,I.indent=x,I.endAbove=y;continue}}else{f.push({indent:-2,endAbove:y,line:y});continue}if(I.indent>x){do f.pop(),I=f[f.length-1];while(I.indent>x);const O=I.endAbove-1;O-y>=1&&l.insertFirst(y,O,x)}I.indent===x?I.endAbove=y:f.push({indent:x,endAbove:y,line:y})}return l.toIndentRanges(c)}const yTi=Ft("editor.foldBackground",{light:yo(wM,.3),dark:yo(wM,.3),hcDark:null,hcLight:null},V("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);Ft("editorGutter.foldingControlForeground",{dark:XN,light:XN,hcDark:XN,hcLight:XN},V("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));const ybe=Oh("folding-expanded",Dr.chevronDown,V("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),bbe=Oh("folding-collapsed",Dr.chevronRight,V("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),jTt=Oh("folding-manual-collapsed",bbe,V("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),zTt=Oh("folding-manual-expanded",ybe,V("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),pUe={color:Lh(yTi),position:1},i$=V("linesCollapsed","Click to expand the range."),Cbe=V("linesExpanded","Click to collapse the range.");class _p{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,i,n){return i?_p.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?e?this.showFoldingHighlights?_p.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:_p.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:_p.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?n?this.showFoldingHighlights?_p.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:_p.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?_p.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:_p.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?n?_p.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:_p.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:n?_p.MANUALLY_EXPANDED_VISUAL_DECORATION:_p.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}}_p.COLLAPSED_VISUAL_DECORATION=Xa.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:i$,firstLineDecorationClassName:Uo.asClassName(bbe)});_p.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=Xa.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:pUe,isWholeLine:!0,linesDecorationsTooltip:i$,firstLineDecorationClassName:Uo.asClassName(bbe)});_p.MANUALLY_COLLAPSED_VISUAL_DECORATION=Xa.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:i$,firstLineDecorationClassName:Uo.asClassName(jTt)});_p.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=Xa.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:pUe,isWholeLine:!0,linesDecorationsTooltip:i$,firstLineDecorationClassName:Uo.asClassName(jTt)});_p.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=Xa.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:i$});_p.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=Xa.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:pUe,isWholeLine:!0,linesDecorationsTooltip:i$});_p.EXPANDED_VISUAL_DECORATION=Xa.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+Uo.asClassName(ybe),linesDecorationsTooltip:Cbe});_p.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Xa.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:Uo.asClassName(ybe),linesDecorationsTooltip:Cbe});_p.MANUALLY_EXPANDED_VISUAL_DECORATION=Xa.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+Uo.asClassName(zTt),linesDecorationsTooltip:Cbe});_p.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Xa.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:Uo.asClassName(zTt),linesDecorationsTooltip:Cbe});_p.NO_CONTROLS_EXPANDED_RANGE_DECORATION=Xa.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0});_p.HIDDEN_RANGE_DECORATION=Xa.register({description:"folding-hidden-range-decoration",stickiness:1});const bTi={},CTi="syntax";class gUe{constructor(e,i,n,s,l){this.editorModel=e,this.providers=i,this.handleFoldingRangesChange=n,this.foldingRangesLimit=s,this.fallbackRangeProvider=l,this.id=CTi,this.disposables=new On,l&&this.disposables.add(l);for(const d of i)typeof d.onDidChange=="function"&&this.disposables.add(d.onDidChange(n))}compute(e){return STi(this.providers,this.editorModel,e).then(i=>{var n,s;return i?xTi(i,this.foldingRangesLimit):(s=(n=this.fallbackRangeProvider)===null||n===void 0?void 0:n.compute(e))!==null&&s!==void 0?s:null})}dispose(){this.disposables.dispose()}}function STi(c,e,i){let n=null;const s=c.map((l,d)=>Promise.resolve(l.provideFoldingRanges(e,bTi,i)).then(f=>{if(!i.isCancellationRequested&&Array.isArray(f)){Array.isArray(n)||(n=[]);const g=e.getLineCount();for(const y of f)y.start>0&&y.end>y.start&&y.end<=g&&n.push({start:y.start,end:y.end,rank:d,kind:y.kind})}},r_));return Promise.all(s).then(l=>n)}class wTi{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,i,n,s){if(e>sE||i>sE)return;const l=this._length;this._startIndexes[l]=e,this._endIndexes[l]=i,this._nestingLevels[l]=s,this._types[l]=n,this._length++,s<30&&(this._nestingLevelCounts[s]=(this._nestingLevelCounts[s]||0)+1)}toIndentRanges(){const e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);const i=new Uint32Array(this._length),n=new Uint32Array(this._length);for(let s=0;se){n=f;break}i+=g}}const s=new Uint32Array(e),l=new Uint32Array(e),d=[];for(let f=0,g=0;f{let g=d.start-f.start;return g===0&&(g=d.rank-f.rank),g}),n=new wTi(e);let s;const l=[];for(const d of i)if(!s)s=d,n.add(d.start,d.end,d.kind&&d.kind.value,l.length);else if(d.start>s.start)if(d.end<=s.end)l.push(s),s=d,n.add(d.start,d.end,d.kind&&d.kind.value,l.length);else{if(d.start>s.end){do s=l.pop();while(s&&d.start>s.end);s&&l.push(s),s=d}n.add(d.start,d.end,d.kind&&d.kind.value,l.length)}return n.toIndentRanges()}var kTi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},mee=function(c,e){return function(i,n){e(i,n,c)}},Hz;const wv=new Xr("foldingEnabled",!1);let Y4=Hz=class extends Ii{static get(e){return e.getContribution(Hz.ID)}static getFoldingRangeProviders(e,i){var n,s;const l=e.foldingRangeProvider.ordered(i);return(s=(n=Hz._foldingRangeSelector)===null||n===void 0?void 0:n.call(Hz,l,i))!==null&&s!==void 0?s:l}constructor(e,i,n,s,l,d){super(),this.contextKeyService=i,this.languageConfigurationService=n,this.languageFeaturesService=d,this.localToDispose=this._register(new On),this.editor=e,this._foldingLimitReporter=new UTt(e);const f=this.editor.getOptions();this._isEnabled=f.get(43),this._useFoldingProviders=f.get(44)!=="indentation",this._unfoldOnClickAfterEndOfLine=f.get(48),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=f.get(46),this.updateDebounceInfo=l.for(d.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new _p(e),this.foldingDecorationProvider.showFoldingControls=f.get(110),this.foldingDecorationProvider.showFoldingHighlights=f.get(45),this.foldingEnabled=wv.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(g=>{if(g.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),g.hasChanged(47)&&this.onModelChanged(),g.hasChanged(110)||g.hasChanged(45)){const y=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=y.get(110),this.foldingDecorationProvider.showFoldingHighlights=y.get(45),this.triggerFoldingModelChanged()}g.hasChanged(44)&&(this._useFoldingProviders=this.editor.getOptions().get(44)!=="indentation",this.onFoldingStrategyChanged()),g.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),g.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))})),this.onModelChanged()}saveViewState(){const e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){const i=this.foldingModel.getMemento(),n=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:i,lineCount:e.getLineCount(),provider:n,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){const i=this.editor.getModel();if(!(!i||!this._isEnabled||i.isTooLargeForTokenization()||!this.hiddenRangeModel)&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const e=this.editor.getModel();!this._isEnabled||!e||e.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new oTi(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new fTi(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(i=>this.onHiddenRangesChanges(i))),this.updateScheduler=new hT(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new id(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(i=>this.onDidChangeModelContent(i))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(i=>this.onEditorMouseDown(i))),this.localToDispose.add(this.editor.onMouseUp(i=>this.onEditorMouseUp(i))),this.localToDispose.add({dispose:()=>{var i,n;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),(i=this.updateScheduler)===null||i===void 0||i.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,(n=this.rangeProvider)===null||n===void 0||n.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var e;(e=this.rangeProvider)===null||e===void 0||e.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;const i=new _Ue(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=i,this._useFoldingProviders&&this.foldingModel){const n=Hz.getFoldingRangeProviders(this.languageFeaturesService,e);n.length>0&&(this.rangeProvider=new gUe(e,n,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,i))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var i;(i=this.hiddenRangeModel)===null||i===void 0||i.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const e=this.foldingModel;if(!e)return null;const i=new o0,n=this.getRangeProvider(e.textModel),s=this.foldingRegionPromise=Hg(l=>n.compute(l));return s.then(l=>{if(l&&s===this.foldingRegionPromise){let d;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const w=l.setCollapsedAllOfType(by.Imports.value,!0);w&&(d=ME.capture(this.editor),this._currentModelHasFoldedImports=w)}const f=this.editor.getSelections(),g=f?f.map(w=>w.startLineNumber):[];e.update(l,g),d==null||d.restore(this.editor);const y=this.updateDebounceInfo.update(e.textModel,i.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=y)}return e})}).then(void 0,e=>(Ba(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){const i=this.editor.getSelections();i&&this.hiddenRangeModel.adjustSelections(i)&&this.editor.setSelections(i)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then(i=>{if(i){const n=this.editor.getSelections();if(n&&n.length>0){const s=[];for(const l of n){const d=l.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(d)&&s.push(...i.getAllRegionsAtLine(d,f=>f.isCollapsed&&d>f.startLineNumber))}s.length&&(i.toggleCollapseState(s),this.reveal(n[0].getPosition()))}}}).then(void 0,Ba)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range||!e.event.leftButton&&!e.event.middleButton)return;const i=e.target.range;let n=!1;switch(e.target.type){case 4:{const s=e.target.detail,l=e.target.element.offsetLeft;if(s.offsetX-l<4)return;n=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){const s=this.editor.getModel();if(s&&i.startColumn===s.getLineMaxColumn(i.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:i.startLineNumber,iconClicked:n}}onEditorMouseUp(e){const i=this.foldingModel;if(!i||!this.mouseDownInfo||!e.target)return;const n=this.mouseDownInfo.lineNumber,s=this.mouseDownInfo.iconClicked,l=e.target.range;if(!l||l.startLineNumber!==n)return;if(s){if(e.target.type!==4)return}else{const f=this.editor.getModel();if(!f||l.startColumn!==f.getLineMaxColumn(n))return}const d=i.getRegionAtLine(n);if(d&&d.startLineNumber===n){const f=d.isCollapsed;if(s||f){const g=e.event.altKey;let y=[];if(g){const w=I=>!I.containedBy(d)&&!d.containedBy(I),x=i.getRegionsInside(null,w);for(const I of x)I.isCollapsed&&y.push(I);y.length===0&&(y=x)}else{const w=e.event.middleButton||e.event.shiftKey;if(w)for(const x of i.getRegionsInside(d))x.isCollapsed===f&&y.push(x);(f||!w||y.length===0)&&y.push(d)}i.toggleCollapseState(y),this.reveal({lineNumber:n,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};Y4.ID="editor.contrib.folding";Y4=Hz=kTi([mee(1,Zo),mee(2,Kd),mee(3,L_),mee(4,fk),mee(5,js)],Y4);class UTt{constructor(e){this.editor=e,this._onDidChange=new ui,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(e,i){(e!==this._computed||i!==this._limited)&&(this._computed=e,this._limited=i,this._onDidChange.fire())}}class E1 extends ms{runEditorCommand(e,i,n){const s=e.get(Kd),l=Y4.get(i);if(!l)return;const d=l.getFoldingModel();if(d)return this.reportTelemetry(e,i),d.then(f=>{if(f){this.invoke(l,f,i,n,s);const g=i.getSelection();g&&l.reveal(g.getStartPosition())}})}getSelectedLines(e){const i=e.getSelections();return i?i.map(n=>n.startLineNumber):[]}getLineNumbers(e,i){return e&&e.selectionLines?e.selectionLines.map(n=>n+1):this.getSelectedLines(i)}run(e,i){}}function qTt(c){if(!wb(c)){if(!vy(c))return!1;const e=c;if(!wb(e.levels)&&!XM(e.levels)||!wb(e.direction)&&!xy(e.direction)||!wb(e.selectionLines)&&(!Array.isArray(e.selectionLines)||!e.selectionLines.every(XM)))return!1}return!0}class TTi extends E1{constructor(){super({id:"editor.unfold",label:V("unfoldAction.label","Unfold"),alias:"Unfold",precondition:wv,kbOpts:{kbExpr:Lt.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},metadata:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument: + * 'levels': Number of levels to unfold. If not set, defaults to 1. + * 'direction': If 'up', unfold given number of levels up otherwise unfolds down. + * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used. + `,constraint:qTt,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,i,n,s){const l=s&&s.levels||1,d=this.getLineNumbers(s,n);s&&s.direction==="up"?VTt(i,!1,l,d):t$(i,!1,l,d)}}class DTi extends E1{constructor(){super({id:"editor.unfoldRecursively",label:V("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:wv,kbOpts:{kbExpr:Lt.editorTextFocus,primary:qp(2089,2142),weight:100}})}invoke(e,i,n,s){t$(i,!1,Number.MAX_VALUE,this.getSelectedLines(n))}}class ETi extends E1{constructor(){super({id:"editor.fold",label:V("foldAction.label","Fold"),alias:"Fold",precondition:wv,kbOpts:{kbExpr:Lt.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},metadata:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument: + * 'levels': Number of levels to fold. + * 'direction': If 'up', folds given number of levels up otherwise folds down. + * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used. + If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead. + `,constraint:qTt,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,i,n,s){const l=this.getLineNumbers(s,n),d=s&&s.levels,f=s&&s.direction;typeof d!="number"&&typeof f!="string"?aTi(i,!0,l):f==="up"?VTt(i,!0,d||1,l):t$(i,!0,d||1,l)}}class ITi extends E1{constructor(){super({id:"editor.toggleFold",label:V("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:wv,kbOpts:{kbExpr:Lt.editorTextFocus,primary:qp(2089,2090),weight:100}})}invoke(e,i,n){const s=this.getSelectedLines(n);WTt(i,1,s)}}class NTi extends E1{constructor(){super({id:"editor.foldRecursively",label:V("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:wv,kbOpts:{kbExpr:Lt.editorTextFocus,primary:qp(2089,2140),weight:100}})}invoke(e,i,n){const s=this.getSelectedLines(n);t$(i,!0,Number.MAX_VALUE,s)}}class LTi extends E1{constructor(){super({id:"editor.foldAllBlockComments",label:V("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:wv,kbOpts:{kbExpr:Lt.editorTextFocus,primary:qp(2089,2138),weight:100}})}invoke(e,i,n,s,l){if(i.regions.hasTypes())hUe(i,by.Comment.value,!0);else{const d=n.getModel();if(!d)return;const f=l.getLanguageConfiguration(d.getLanguageId()).comments;if(f&&f.blockCommentStartToken){const g=new RegExp("^\\s*"+Cw(f.blockCommentStartToken));fUe(i,g,!0)}}}}class PTi extends E1{constructor(){super({id:"editor.foldAllMarkerRegions",label:V("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:wv,kbOpts:{kbExpr:Lt.editorTextFocus,primary:qp(2089,2077),weight:100}})}invoke(e,i,n,s,l){if(i.regions.hasTypes())hUe(i,by.Region.value,!0);else{const d=n.getModel();if(!d)return;const f=l.getLanguageConfiguration(d.getLanguageId()).foldingRules;if(f&&f.markers&&f.markers.start){const g=new RegExp(f.markers.start);fUe(i,g,!0)}}}}class ATi extends E1{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:V("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:wv,kbOpts:{kbExpr:Lt.editorTextFocus,primary:qp(2089,2078),weight:100}})}invoke(e,i,n,s,l){if(i.regions.hasTypes())hUe(i,by.Region.value,!1);else{const d=n.getModel();if(!d)return;const f=l.getLanguageConfiguration(d.getLanguageId()).foldingRules;if(f&&f.markers&&f.markers.start){const g=new RegExp(f.markers.start);fUe(i,g,!1)}}}}class OTi extends E1{constructor(){super({id:"editor.foldAllExcept",label:V("foldAllExcept.label","Fold All Except Selected"),alias:"Fold All Except Selected",precondition:wv,kbOpts:{kbExpr:Lt.editorTextFocus,primary:qp(2089,2136),weight:100}})}invoke(e,i,n){const s=this.getSelectedLines(n);HTt(i,!0,s)}}class MTi extends E1{constructor(){super({id:"editor.unfoldAllExcept",label:V("unfoldAllExcept.label","Unfold All Except Selected"),alias:"Unfold All Except Selected",precondition:wv,kbOpts:{kbExpr:Lt.editorTextFocus,primary:qp(2089,2134),weight:100}})}invoke(e,i,n){const s=this.getSelectedLines(n);HTt(i,!1,s)}}class RTi extends E1{constructor(){super({id:"editor.foldAll",label:V("foldAllAction.label","Fold All"),alias:"Fold All",precondition:wv,kbOpts:{kbExpr:Lt.editorTextFocus,primary:qp(2089,2069),weight:100}})}invoke(e,i,n){t$(i,!0)}}class FTi extends E1{constructor(){super({id:"editor.unfoldAll",label:V("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:wv,kbOpts:{kbExpr:Lt.editorTextFocus,primary:qp(2089,2088),weight:100}})}invoke(e,i,n){t$(i,!1)}}class W9 extends E1{getFoldingLevel(){return parseInt(this.id.substr(W9.ID_PREFIX.length))}invoke(e,i,n){lTi(i,this.getFoldingLevel(),!0,this.getSelectedLines(n))}}W9.ID_PREFIX="editor.foldLevel";W9.ID=c=>W9.ID_PREFIX+c;class BTi extends E1{constructor(){super({id:"editor.gotoParentFold",label:V("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:wv,kbOpts:{kbExpr:Lt.editorTextFocus,weight:100}})}invoke(e,i,n){const s=this.getSelectedLines(n);if(s.length>0){const l=cTi(s[0],i);l!==null&&n.setSelection({startLineNumber:l,startColumn:1,endLineNumber:l,endColumn:1})}}}class WTi extends E1{constructor(){super({id:"editor.gotoPreviousFold",label:V("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:wv,kbOpts:{kbExpr:Lt.editorTextFocus,weight:100}})}invoke(e,i,n){const s=this.getSelectedLines(n);if(s.length>0){const l=uTi(s[0],i);l!==null&&n.setSelection({startLineNumber:l,startColumn:1,endLineNumber:l,endColumn:1})}}}class VTi extends E1{constructor(){super({id:"editor.gotoNextFold",label:V("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:wv,kbOpts:{kbExpr:Lt.editorTextFocus,weight:100}})}invoke(e,i,n){const s=this.getSelectedLines(n);if(s.length>0){const l=dTi(s[0],i);l!==null&&n.setSelection({startLineNumber:l,startColumn:1,endLineNumber:l,endColumn:1})}}}class HTi extends E1{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:V("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:wv,kbOpts:{kbExpr:Lt.editorTextFocus,primary:qp(2089,2135),weight:100}})}invoke(e,i,n){var s;const l=[],d=n.getSelections();if(d){for(const f of d){let g=f.endLineNumber;f.endColumn===1&&--g,g>f.startLineNumber&&(l.push({startLineNumber:f.startLineNumber,endLineNumber:g,type:void 0,isCollapsed:!0,source:1}),n.setSelection({startLineNumber:f.startLineNumber,startColumn:1,endLineNumber:f.startLineNumber,endColumn:1}))}if(l.length>0){l.sort((g,y)=>g.startLineNumber-y.startLineNumber);const f=uw.sanitizeAndMerge(i.regions,l,(s=n.getModel())===null||s===void 0?void 0:s.getLineCount());i.updatePost(uw.fromFoldRanges(f))}}}}class jTi extends E1{constructor(){super({id:"editor.removeManualFoldingRanges",label:V("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:wv,kbOpts:{kbExpr:Lt.editorTextFocus,primary:qp(2089,2137),weight:100}})}invoke(e,i,n){const s=n.getSelections();if(s){const l=[];for(const d of s){const{startLineNumber:f,endLineNumber:g}=d;l.push(g>=f?{startLineNumber:f,endLineNumber:g}:{endLineNumber:g,startLineNumber:f})}i.removeManualRanges(l),e.triggerFoldingModelChanged()}}}Bc(Y4.ID,Y4,0);hr(TTi);hr(DTi);hr(ETi);hr(NTi);hr(RTi);hr(FTi);hr(LTi);hr(PTi);hr(ATi);hr(OTi);hr(MTi);hr(ITi);hr(BTi);hr(WTi);hr(VTi);hr(HTi);hr(jTi);for(let c=1;c<=7;c++)nsi(new W9({id:W9.ID(c),label:V("foldLevelAction.label","Fold Level {0}",c),alias:`Fold Level ${c}`,precondition:wv,kbOpts:{kbExpr:Lt.editorTextFocus,primary:qp(2089,2048|21+c),weight:100}}));uc.registerCommand("_executeFoldingRangeProvider",async function(c,...e){const[i]=e;if(!(i instanceof Oo))throw nk();const n=c.get(js),s=c.get(Qf).getModel(i);if(!s)throw nk();const l=c.get(El);if(!l.getValue("editor.folding",{resource:i}))return[];const d=c.get(Kd),f=l.getValue("editor.foldingStrategy",{resource:i}),g={get limit(){return l.getValue("editor.foldingMaximumRegions",{resource:i})},update:(P,O)=>{}},y=new _Ue(s,d,g);let w=y;if(f!=="indentation"){const P=Y4.getFoldingRangeProviders(n,s);P.length&&(w=new gUe(s,P,()=>{},g,y))}const x=await w.compute(Gl.None),I=[];try{if(x)for(let P=0;P=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Ste=function(c,e){return function(i,n){e(i,n,c)}};let $ie=class{constructor(e,i,n,s){this._editor=e,this._languageFeaturesService=i,this._workerService=n,this._accessibilitySignalService=s,this._disposables=new On,this._sessionDisposables=new On,this._disposables.add(i.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(l=>{l.hasChanged(56)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56)||!this._editor.hasModel())return;const e=this._editor.getModel(),[i]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!i||!i.autoFormatTriggerCharacters)return;const n=new $0e;for(const s of i.autoFormatTriggerCharacters)n.add(s.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(s=>{const l=s.charCodeAt(s.length-1);n.has(l)&&this._trigger(String.fromCharCode(l))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const i=this._editor.getModel(),n=this._editor.getPosition(),s=new uh,l=this._editor.onDidChangeModelContent(d=>{if(d.isFlush){s.cancel(),l.dispose();return}for(let f=0,g=d.changes.length;f{s.token.isCancellationRequested||bv(d)&&(this._accessibilitySignalService.playSignal(Na.format,{userGesture:!1}),wq.execute(this._editor,d,!0))}).finally(()=>{l.dispose()})}};$ie.ID="editor.contrib.autoFormat";$ie=$Tt([Ste(1,js),Ste(2,_k),Ste(3,LR)],$ie);let Jie=class{constructor(e,i,n){this.editor=e,this._languageFeaturesService=i,this._instantiationService=n,this._callOnDispose=new On,this._callOnModel=new On,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(i.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(55)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e)))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(Rkt,this.editor,e,2,W4.None,Gl.None,!1).catch(Ba))}};Jie.ID="editor.contrib.formatOnPaste";Jie=$Tt([Ste(1,js),Ste(2,So)],Jie);class $Ti extends ms{constructor(){super({id:"editor.action.formatDocument",label:V("formatDocument.label","Format Document"),alias:"Format Document",precondition:xn.and(Lt.notInCompositeEditor,Lt.writable,Lt.hasDocumentFormattingProvider),kbOpts:{kbExpr:Lt.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}async run(e,i){if(i.hasModel()){const n=e.get(So);await e.get(IR).showWhile(n.invokeFunction(fSi,i,1,W4.None,Gl.None,!0),250)}}}class JTi extends ms{constructor(){super({id:"editor.action.formatSelection",label:V("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:xn.and(Lt.writable,Lt.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:Lt.editorTextFocus,primary:qp(2089,2084),weight:100},contextMenuOpts:{when:Lt.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(e,i){if(!i.hasModel())return;const n=e.get(So),s=i.getModel(),l=i.getSelections().map(f=>f.isEmpty()?new at(f.startLineNumber,1,f.startLineNumber,s.getLineMaxColumn(f.startLineNumber)):f);await e.get(IR).showWhile(n.invokeFunction(Rkt,i,l,1,W4.None,Gl.None,!0),250)}}Bc($ie.ID,$ie,2);Bc(Jie.ID,Jie,2);hr($Ti);hr(JTi);uc.registerCommand("editor.action.format",async c=>{const e=c.get(Oc).getFocusedCodeEditor();if(!e||!e.hasModel())return;const i=c.get(ff);e.getSelection().isEmpty()?await i.executeCommand("editor.action.formatDocument"):await i.executeCommand("editor.action.formatSelection")});var GTi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},dFe=function(c,e){return function(i,n){e(i,n,c)}};class pU{remove(){var e;(e=this.parent)===null||e===void 0||e.children.delete(this.id)}static findId(e,i){let n;typeof e=="string"?n=`${i.id}/${e}`:(n=`${i.id}/${e.name}`,i.children.get(n)!==void 0&&(n=`${i.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let s=n;for(let l=0;i.children.get(s)!==void 0;l++)s=`${n}_${l}`;return s}static empty(e){return e.children.size===0}}class iVe extends pU{constructor(e,i,n){super(),this.id=e,this.parent=i,this.symbol=n,this.children=new Map}}class JTt extends pU{constructor(e,i,n,s){super(),this.id=e,this.parent=i,this.label=n,this.order=s,this.children=new Map}}class u4 extends pU{static create(e,i,n){const s=new uh(n),l=new u4(i.uri),d=e.ordered(i),f=d.map((y,w)=>{var x;const I=pU.findId(`provider_${w}`,l),P=new JTt(I,l,(x=y.displayName)!==null&&x!==void 0?x:"Unknown Outline Provider",w);return Promise.resolve(y.provideDocumentSymbols(i,s.token)).then(O=>{for(const W of O||[])u4._makeOutlineElement(W,P);return P},O=>(r_(O),P)).then(O=>{pU.empty(O)?O.remove():l._groups.set(I,O)})}),g=e.onDidChange(()=>{const y=e.ordered(i);ch(y,d)||s.cancel()});return Promise.all(f).then(()=>s.token.isCancellationRequested&&!n.isCancellationRequested?u4.create(e,i,n):l._compact()).finally(()=>{s.dispose(),g.dispose(),s.dispose()})}static _makeOutlineElement(e,i){const n=pU.findId(e,i),s=new iVe(n,i,e);if(e.children)for(const l of e.children)u4._makeOutlineElement(l,s);i.children.set(s.id,s)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[i,n]of this._groups)n.children.size===0?this._groups.delete(i):e+=1;if(e!==1)this.children=this._groups;else{const i=cc.first(this._groups.values());for(const[,n]of i.children)n.parent=this,this.children.set(n.id,n)}return this}getTopLevelSymbols(){const e=[];for(const i of this.children.values())i instanceof iVe?e.push(i.symbol):e.push(...cc.map(i.children.values(),n=>n.symbol));return e.sort((i,n)=>at.compareRangesUsingStarts(i.range,n.range))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),i=[];return u4._flattenDocumentSymbols(i,e,""),i.sort((n,s)=>yi.compare(at.getStartPosition(n.range),at.getStartPosition(s.range))||yi.compare(at.getEndPosition(s.range),at.getEndPosition(n.range)))}static _flattenDocumentSymbols(e,i,n){for(const s of i)e.push({kind:s.kind,tags:s.tags,name:s.name,detail:s.detail,containerName:s.containerName||n,range:s.range,selectionRange:s.selectionRange,children:void 0}),s.children&&u4._flattenDocumentSymbols(e,s.children,s.name)}}const sre=Kl("IOutlineModelService");let nVe=class{constructor(e,i,n){this._languageFeaturesService=e,this._disposables=new On,this._cache=new TL(10,.7),this._debounceInformation=i.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(n.onModelRemoved(s=>{this._cache.delete(s.id)}))}dispose(){this._disposables.dispose()}async getOrCreate(e,i){const n=this._languageFeaturesService.documentSymbolProvider,s=n.ordered(e);let l=this._cache.get(e.id);if(!l||l.versionId!==e.getVersionId()||!ch(l.provider,s)){const f=new uh;l={versionId:e.getVersionId(),provider:s,promiseCnt:0,source:f,promise:u4.create(n,e,f.token),model:void 0},this._cache.set(e.id,l);const g=Date.now();l.promise.then(y=>{l.model=y,this._debounceInformation.update(e,Date.now()-g)}).catch(y=>{this._cache.delete(e.id)})}if(l.model)return l.model;l.promiseCnt+=1;const d=i.onCancellationRequested(()=>{--l.promiseCnt===0&&(l.source.cancel(),this._cache.delete(e.id))});try{return await l.promise}finally{d.dispose()}}};nVe=GTi([dFe(0,js),dFe(1,fk),dFe(2,Qf)],nVe);dc(sre,nVe,1);uc.registerCommand("_executeDocumentSymbolProvider",async function(c,...e){const[i]=e;Ac(Oo.isUri(i));const n=c.get(sre),l=await c.get(Lb).createModelReference(i);try{return(await n.getOrCreate(l.object.textEditorModel,Gl.None)).getTopLevelSymbols()}finally{l.dispose()}});class Cm extends Ii{constructor(e,i){super(),this.contextKeyService=e,this.model=i,this.inlineCompletionVisible=Cm.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=Cm.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=Cm.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=Cm.suppressSuggestions.bindTo(this.contextKeyService),this._register(Cl(n=>{const s=this.model.read(n),l=s==null?void 0:s.state.read(n),d=!!(l!=null&&l.inlineCompletion)&&(l==null?void 0:l.primaryGhostText)!==void 0&&!(l!=null&&l.primaryGhostText.isEmpty());this.inlineCompletionVisible.set(d),l!=null&&l.primaryGhostText&&(l!=null&&l.inlineCompletion)&&this.suppressSuggestions.set(l.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register(Cl(n=>{const s=this.model.read(n);let l=!1,d=!0;const f=s==null?void 0:s.primaryGhostText.read(n);if(s!=null&&s.selectedSuggestItem&&f&&f.parts.length>0){const{column:g,lines:y}=f.parts[0],w=y[0],x=s.textModel.getLineIndentColumn(f.lineNumber);if(g<=x){let P=T1(w);P===-1&&(P=w.length-1),l=P>0;const O=s.textModel.getOptions().tabSize;d=ng.visibleColumnFromColumn(w,P+1,O)i.equals(e.parts[n]))}renderForScreenReader(e){if(this.parts.length===0)return"";const i=this.parts[this.parts.length-1],n=e.substr(0,i.column-1);return new XHe([...this.parts.map(l=>new K4(at.fromPositions(new yi(1,l.column)),l.lines.join(` +`)))]).applyToString(n).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(e=>e.lines.length===0)}get lineCount(){return 1+this.parts.reduce((e,i)=>e+i.lines.length-1,0)}}class y1e{constructor(e,i,n){this.column=e,this.text=i,this.preview=n,this.lines=wL(this.text)}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every((i,n)=>i===e.lines[n])}}class rVe{constructor(e,i,n,s=0){this.lineNumber=e,this.columnRange=i,this.text=n,this.additionalReservedLineCount=s,this.parts=[new y1e(this.columnRange.endColumnExclusive,this.text,!1)],this.newLines=wL(this.text)}renderForScreenReader(e){return this.newLines.join(` +`)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(e=>e.lines.length===0)}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every((i,n)=>i===e.newLines[n])&&this.additionalReservedLineCount===e.additionalReservedLineCount}}function _yt(c,e){return ch(c,e,GTt)}function GTt(c,e){return c===e?!0:!c||!e?!1:c instanceof Gie&&e instanceof Gie||c instanceof rVe&&e instanceof rVe?c.equals(e):!1}const KTi=[];function QTi(){return KTi}class KTt{constructor(e,i){if(this.startColumn=e,this.endColumnExclusive=i,e>i)throw new Yu(`startColumn ${e} cannot be after endColumnExclusive ${i}`)}toRange(e){return new at(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}}function QTt(c,e){const i=new On,n=c.createDecorationsCollection();return i.add(Nye({debugName:()=>`Apply decorations from ${e.debugName}`},s=>{const l=e.read(s);n.set(l)})),i.add({dispose:()=>{n.clear()}}),i}function XTi(c,e){return new yi(c.lineNumber+e.lineNumber-1,e.lineNumber===1?c.column+e.column-1:e.column)}function pyt(c,e){return new yi(c.lineNumber-e.lineNumber+1,c.lineNumber-e.lineNumber===0?c.column-e.column+1:c.column)}var ZTi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},YTi=function(c,e){return function(i,n){e(i,n,c)}};const gyt="ghost-text";let sVe=class extends Ii{constructor(e,i,n){super(),this.editor=e,this.model=i,this.languageService=n,this.isDisposed=yc(this,!1),this.currentTextModel=Zu(this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=Ma(this,s=>{if(this.isDisposed.read(s))return;const l=this.currentTextModel.read(s);if(l!==this.model.targetTextModel.read(s))return;const d=this.model.ghostText.read(s);if(!d)return;const f=d instanceof rVe?d.columnRange:void 0,g=[],y=[];function w(W,X){if(y.length>0){const Z=y[y.length-1];X&&Z.decorations.push(new Sy(Z.content.length+1,Z.content.length+1+W[0].length,X,0)),Z.content+=W[0],W=W.slice(1)}for(const Z of W)y.push({content:Z,decorations:X?[new Sy(1,Z.length+1,X,0)]:[]})}const x=l.getLineContent(d.lineNumber);let I,P=0;for(const W of d.parts){let X=W.lines;I===void 0?(g.push({column:W.column,text:X[0],preview:W.preview}),X=X.slice(1)):w([x.substring(P,W.column-1)],void 0),X.length>0&&(w(X,gyt),I===void 0&&W.column<=x.length&&(I=W.column)),P=W.column-1}I!==void 0&&w([x.substring(P)],void 0);const O=I!==void 0?new KTt(I,x.length+1):void 0;return{replacedRange:f,inlineTexts:g,additionalLines:y,hiddenRange:O,lineNumber:d.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(s),targetTextModel:l}}),this.decorations=Ma(this,s=>{const l=this.uiState.read(s);if(!l)return[];const d=[];l.replacedRange&&d.push({range:l.replacedRange.toRange(l.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),l.hiddenRange&&d.push({range:l.hiddenRange.toRange(l.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const f of l.inlineTexts)d.push({range:at.fromPositions(new yi(l.lineNumber,f.column)),options:{description:gyt,after:{content:f.text,inlineClassName:f.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:oT.Left},showIfCollapsed:!0}});return d}),this.additionalLinesWidget=this._register(new XTt(this.editor,this.languageService.languageIdCodec,Ma(s=>{const l=this.uiState.read(s);return l?{lineNumber:l.lineNumber,additionalLines:l.additionalLines,minReservedLineCount:l.additionalReservedLineCount,targetTextModel:l.targetTextModel}:void 0}))),this._register(go(()=>{this.isDisposed.set(!0,void 0)})),this._register(QTt(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};sVe=ZTi([YTi(2,If)],sVe);class XTt extends Ii{get viewZoneId(){return this._viewZoneId}constructor(e,i,n){super(),this.editor=e,this.languageIdCodec=i,this.lines=n,this._viewZoneId=void 0,this.editorOptionsChanged=yv("editorOptionChanged",Mr.filter(this.editor.onDidChangeConfiguration,s=>s.hasChanged(33)||s.hasChanged(117)||s.hasChanged(99)||s.hasChanged(94)||s.hasChanged(51)||s.hasChanged(50)||s.hasChanged(67))),this._register(Cl(s=>{const l=this.lines.read(s);this.editorOptionsChanged.read(s),l?this.updateLines(l.lineNumber,l.additionalLines,l.minReservedLineCount):this.clear()}))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones(e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(e,i,n){const s=this.editor.getModel();if(!s)return;const{tabSize:l}=s.getOptions();this.editor.changeViewZones(d=>{this._viewZoneId&&(d.removeZone(this._viewZoneId),this._viewZoneId=void 0);const f=Math.max(i.length,n);if(f>0){const g=document.createElement("div");eDi(g,l,i,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=d.addZone({afterLineNumber:e,heightInLines:f,domNode:g,afterColumnAffinity:1})}})}}function eDi(c,e,i,n,s){const l=n.get(33),d=n.get(117),f="none",g=n.get(94),y=n.get(51),w=n.get(50),x=n.get(67),I=new jq(1e4);I.appendString('
    ');for(let W=0,X=i.length;W');const he=mne(ee),we=GU(ee),Te=vp.createEmpty(ee,s);kne(new TR(w.isMonospace&&!l,w.canUseHalfwidthRightwardsArrow,ee,!1,he,we,0,Te,Z.decorations,e,0,w.spaceWidth,w.middotWidth,w.wsmiddotWidth,d,f,g,y!==fw.OFF,null),I),I.appendString("
    ")}I.appendString(""),s0(c,w);const P=I.build(),O=myt?myt.createHTML(P):P;c.innerHTML=O}const myt=i6("editorGhostText",{createHTML:c=>c});function tDi(c,e){const i=new swt,n=new awt(i,y=>e.getLanguageConfiguration(y)),s=new owt(new iDi([c]),n),l=x9e(s,[],void 0,!0);let d="";const f=c.getLineContent();function g(y,w){if(y.kind===2)if(g(y.openingBracket,w),w=Ph(w,y.openingBracket.length),y.child&&(g(y.child,w),w=Ph(w,y.child.length)),y.closingBracket)g(y.closingBracket,w),w=Ph(w,y.closingBracket.length);else{const I=n.getSingleLanguageBracketTokens(y.openingBracket.languageId).findClosingTokenText(y.openingBracket.bracketIds);d+=I}else if(y.kind!==3){if(y.kind===0||y.kind===1)d+=f.substring(w,Ph(w,y.length));else if(y.kind===4)for(const x of y.children)g(x,w),w=Ph(w,x.length)}}return g(l,wy),d}class iDi{constructor(e){this.lines=e,this.tokenization={getLineTokens:i=>this.lines[i-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}async function nDi(c,e,i,n,s=Gl.None,l){const d=oDi(e,i),f=c.all(i),g=new $He;for(const Z of f)Z.groupId&&g.add(Z.groupId,Z);function y(Z){if(!Z.yieldsToGroupIds)return[];const ee=[];for(const he of Z.yieldsToGroupIds||[]){const we=g.get(he);for(const Te of we)ee.push(Te)}return ee}const w=new Map,x=new Set;function I(Z,ee){if(ee=[...ee,Z],x.has(Z))return ee;x.add(Z);try{const he=y(Z);for(const we of he){const Te=I(we,ee);if(Te)return Te}}finally{x.delete(Z)}}function P(Z){const ee=w.get(Z);if(ee)return ee;const he=I(Z,[]);he&&r_(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${he.map(Te=>Te.toString?Te.toString():""+Te).join(" -> ")}`));const we=new bne;return w.set(Z,we.p),(async()=>{if(!he){const Te=y(Z);for(const Be of Te){const Me=await P(Be);if(Me&&Me.items.length>0)return}}try{return await Z.provideInlineCompletions(i,e,n,s)}catch(Te){r_(Te);return}})().then(Te=>we.complete(Te),Te=>we.error(Te)),we.p}const O=await Promise.all(f.map(async Z=>({provider:Z,completions:await P(Z)}))),W=new Map,X=[];for(const Z of O){const ee=Z.completions;if(!ee)continue;const he=new sDi(ee,Z.provider);X.push(he);for(const we of ee.items){const Te=b1e.from(we,he,d,i,l);W.set(Te.hash(),Te)}}return new rDi(Array.from(W.values()),new Set(W.keys()),X)}class rDi{constructor(e,i,n){this.completions=e,this.hashs=i,this.providerResults=n}has(e){return this.hashs.has(e.hash())}dispose(){for(const e of this.providerResults)e.removeRef()}}class sDi{constructor(e,i){this.inlineCompletions=e,this.provider=i,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,this.refCount===0&&this.provider.freeInlineCompletions(this.inlineCompletions)}}class b1e{static from(e,i,n,s,l){let d,f,g=e.range?at.lift(e.range):n;if(typeof e.insertText=="string"){if(d=e.insertText,l&&e.completeBracketPairs){d=vyt(d,g.getStartPosition(),s,l);const y=d.length-e.insertText.length;y!==0&&(g=new at(g.startLineNumber,g.startColumn,g.endLineNumber,g.endColumn+y))}f=void 0}else if("snippet"in e.insertText){const y=e.insertText.snippet.length;if(l&&e.completeBracketPairs){e.insertText.snippet=vyt(e.insertText.snippet,g.getStartPosition(),s,l);const x=e.insertText.snippet.length-y;x!==0&&(g=new at(g.startLineNumber,g.startColumn,g.endLineNumber,g.endColumn+x))}const w=new P9().parse(e.insertText.snippet);w.children.length===1&&w.children[0]instanceof gy?(d=w.children[0].value,f=void 0):(d=w.toString(),f={snippet:e.insertText.snippet,range:g})}else X1e(e.insertText);return new b1e(d,e.command,g,d,f,e.additionalTextEdits||QTi(),e,i)}constructor(e,i,n,s,l,d,f,g){this.filterText=e,this.command=i,this.range=n,this.insertText=s,this.snippetInfo=l,this.additionalTextEdits=d,this.sourceInlineCompletion=f,this.source=g,e=e.replace(/\r\n|\r/g,` +`),s=e.replace(/\r\n|\r/g,` +`)}withRange(e){return new b1e(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}}function oDi(c,e){const i=e.getWordAtPosition(c),n=e.getLineMaxColumn(c.lineNumber);return i?new at(c.lineNumber,i.startColumn,c.lineNumber,n):at.fromPositions(c,c.with(void 0,n))}function vyt(c,e,i,n){const l=i.getLineContent(e.lineNumber).substring(0,e.column-1)+c,d=i.tokenization.tokenizeLineWithEdit(e,l.length-(e.column-1),c),f=d==null?void 0:d.sliceAndInflate(e.column-1,l.length,0);return f?tDi(f,n):c}function f9(c,e,i){const n=i?c.range.intersectRanges(i):c.range;if(!n)return c;const s=e.getValueInRange(n,1),l=YM(s,c.text),d=Cy.ofText(s.substring(0,l)).addToPosition(c.range.getStartPosition()),f=c.text.substring(l),g=at.fromPositions(d,c.range.getEndPosition());return new K4(g,f)}function ZTt(c,e){return c.text.startsWith(e.text)&&aDi(c.range,e.range)}function yyt(c,e,i,n,s=0){let l=f9(c,e);if(l.range.endLineNumber!==l.range.startLineNumber)return;const d=e.getLineContent(l.range.startLineNumber),f=Md(d).length;if(l.range.startColumn-1<=f){const O=Md(l.text).length,W=d.substring(l.range.startColumn-1,f),[X,Z]=[l.range.getStartPosition(),l.range.getEndPosition()],ee=X.column+W.length<=Z.column?X.delta(0,W.length):Z,he=at.fromPositions(ee,Z),we=l.text.startsWith(W)?l.text.substring(W.length):l.text.substring(O);l=new K4(he,we)}const y=e.getValueInRange(l.range),w=lDi(y,l.text);if(!w)return;const x=l.range.startLineNumber,I=new Array;if(i==="prefix"){const O=w.filter(W=>W.originalLength===0);if(O.length>1||O.length===1&&O[0].originalStart!==y.length)return}const P=l.text.length-s;for(const O of w){const W=l.range.startColumn+O.originalStart+O.originalLength;if(i==="subwordSmart"&&n&&n.lineNumber===l.range.startLineNumber&&W0)return;if(O.modifiedLength===0)continue;const X=O.modifiedStart+O.modifiedLength,Z=Math.max(O.modifiedStart,Math.min(X,P)),ee=l.text.substring(O.modifiedStart,Z),he=l.text.substring(Z,Math.max(O.modifiedStart,X));ee.length>0&&I.push(new y1e(W,ee,!1)),he.length>0&&I.push(new y1e(W,he,!0))}return new Gie(x,I)}function aDi(c,e){return e.getStartPosition().equals(c.getStartPosition())&&e.getEndPosition().isBeforeOrEqual(c.getEndPosition())}let EN;function lDi(c,e){if((EN==null?void 0:EN.originalValue)===c&&(EN==null?void 0:EN.newValue)===e)return EN==null?void 0:EN.changes;{let i=Cyt(c,e,!0);if(i){const n=byt(i);if(n>0){const s=Cyt(c,e,!1);s&&byt(s)5e3||e.length>5e3)return;function n(y){let w=0;for(let x=0,I=y.length;xw&&(w=P)}return w}const s=Math.max(n(c),n(e));function l(y){if(y<0)throw new Error("unexpected");return s+y+1}function d(y){let w=0,x=0;const I=new Int32Array(y.length);for(let P=0,O=y.length;Pf},{getElements:()=>g}).ComputeDiff(!1).changes}var cDi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Syt=function(c,e){return function(i,n){e(i,n,c)}};let oVe=class extends Ii{constructor(e,i,n,s,l){super(),this.textModel=e,this.versionId=i,this._debounceValue=n,this.languageFeaturesService=s,this.languageConfigurationService=l,this._updateOperation=this._register(new jg),this.inlineCompletions=yie("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=yie("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(e,i,n){var s,l;const d=new dDi(e,i,this.textModel.getVersionId()),f=i.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(!((s=this._updateOperation.value)===null||s===void 0)&&s.request.satisfies(d))return this._updateOperation.value.promise;if(!((l=f.get())===null||l===void 0)&&l.request.satisfies(d))return Promise.resolve(!0);const g=!!this._updateOperation.value;this._updateOperation.clear();const y=new uh,w=(async()=>{if((g||i.triggerKind===M4.Automatic)&&await uDi(this._debounceValue.get(this.textModel),y.token),y.token.isCancellationRequested||this.textModel.getVersionId()!==d.versionId)return!1;const P=new Date,O=await nDi(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,i,y.token,this.languageConfigurationService);if(y.token.isCancellationRequested||this.textModel.getVersionId()!==d.versionId)return!1;const W=new Date;this._debounceValue.update(this.textModel,W.getTime()-P.getTime());const X=new hDi(O,d,this.textModel,this.versionId);if(n){const Z=n.toInlineCompletion(void 0);n.canBeReused(this.textModel,e)&&!O.has(Z)&&X.prepend(n.inlineCompletion,Z.range,!0)}return this._updateOperation.clear(),Rd(Z=>{f.set(X,Z)}),!0})(),x=new fDi(d,y,w);return this._updateOperation.value=x,w}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){var i;!((i=this._updateOperation.value)===null||i===void 0)&&i.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};oVe=cDi([Syt(3,js),Syt(4,Kd)],oVe);function uDi(c,e){return new Promise(i=>{let n;const s=setTimeout(()=>{n&&n.dispose(),i()},c);e&&(n=e.onCancellationRequested(()=>{clearTimeout(s),n&&n.dispose(),i()}))})}class dDi{constructor(e,i,n){this.position=e,this.context=i,this.versionId=n}satisfies(e){return this.position.equals(e.position)&&Vmi(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,lxt())&&(e.context.triggerKind===M4.Automatic||this.context.triggerKind===M4.Explicit)&&this.versionId===e.versionId}}class fDi{constructor(e,i,n){this.request=e,this.cancellationTokenSource=i,this.promise=n}dispose(){this.cancellationTokenSource.cancel()}}class hDi{get inlineCompletions(){return this._inlineCompletions}constructor(e,i,n,s){this.inlineCompletionProviderResult=e,this.request=i,this._textModel=n,this._versionId=s,this._refCount=1,this._prependedInlineCompletionItems=[];const l=n.deltaDecorations([],e.completions.map(d=>({range:d.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=e.completions.map((d,f)=>new wyt(d,l[f],this._textModel,this._versionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){setTimeout(()=>{this._textModel.isDisposed()||this._textModel.deltaDecorations(this._inlineCompletions.map(e=>e.decorationId),[])},0),this.inlineCompletionProviderResult.dispose();for(const e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,i,n){n&&e.source.addRef();const s=this._textModel.deltaDecorations([],[{range:i,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new wyt(e,s,this._textModel,this._versionId)),this._prependedInlineCompletionItems.push(e)}}class wyt{get forwardStable(){var e;return(e=this.inlineCompletion.source.inlineCompletions.enableForwardStability)!==null&&e!==void 0?e:!1}constructor(e,i,n,s){this.inlineCompletion=e,this.decorationId=i,this._textModel=n,this._modelVersion=s,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._updatedRange=g4({owner:this,equalsFn:at.equalsRange},l=>(this._modelVersion.read(l),this._textModel.getDecorationRange(this.decorationId)))}toInlineCompletion(e){var i;return this.inlineCompletion.withRange((i=this._updatedRange.read(e))!==null&&i!==void 0?i:fFe)}toSingleTextEdit(e){var i;return new K4((i=this._updatedRange.read(e))!==null&&i!==void 0?i:fFe,this.inlineCompletion.insertText)}isVisible(e,i,n){const s=f9(this._toFilterTextReplacement(n),e),l=this._updatedRange.read(n);if(!l||!this.inlineCompletion.range.getStartPosition().equals(l.getStartPosition())||i.lineNumber!==s.range.startLineNumber)return!1;const d=e.getValueInRange(s.range,1),f=s.text,g=Math.max(0,i.column-s.range.startColumn);let y=f.substring(0,g),w=f.substring(g),x=d.substring(0,g),I=d.substring(g);const P=e.getLineIndentColumn(s.range.startLineNumber);return s.range.startColumn<=P&&(x=x.trimStart(),x.length===0&&(I=I.trimStart()),y=y.trimStart(),y.length===0&&(w=w.trimStart())),y.startsWith(x)&&!!qwt(I,w)}canBeReused(e,i){const n=this._updatedRange.read(void 0);return!!n&&n.containsPosition(i)&&this.isVisible(e,i,void 0)&&Cy.ofRange(n).isGreaterThanOrEqualTo(Cy.ofRange(this.inlineCompletion.range))}_toFilterTextReplacement(e){var i;return new K4((i=this._updatedRange.read(e))!==null&&i!==void 0?i:fFe,this.inlineCompletion.filterText)}}const fFe=new at(1,1,1,1),bl={Visible:uUe,HasFocusedSuggestion:new Xr("suggestWidgetHasFocusedSuggestion",!1,V("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new Xr("suggestWidgetDetailsVisible",!1,V("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new Xr("suggestWidgetMultipleSuggestions",!1,V("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new Xr("suggestionMakesTextEdit",!0,V("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new Xr("acceptSuggestionOnEnter",!0,V("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new Xr("suggestionHasInsertAndReplaceRange",!1,V("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new Xr("suggestionInsertMode",void 0,{type:"string",description:V("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new Xr("suggestionCanResolve",!1,V("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},JM=new _t("suggestWidgetStatusBar");class _Di{constructor(e,i,n,s){var l;this.position=e,this.completion=i,this.container=n,this.provider=s,this.isInvalid=!1,this.score=wE.Default,this.distance=0,this.textLabel=typeof i.label=="string"?i.label:(l=i.label)===null||l===void 0?void 0:l.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=i.sortText&&i.sortText.toLowerCase(),this.filterTextLow=i.filterText&&i.filterText.toLowerCase(),this.extensionId=i.extensionId,at.isIRange(i.range)?(this.editStart=new yi(i.range.startLineNumber,i.range.startColumn),this.editInsertEnd=new yi(i.range.endLineNumber,i.range.endColumn),this.editReplaceEnd=new yi(i.range.endLineNumber,i.range.endColumn),this.isInvalid=this.isInvalid||at.spansMultipleLines(i.range)||i.range.startLineNumber!==e.lineNumber):(this.editStart=new yi(i.range.insert.startLineNumber,i.range.insert.startColumn),this.editInsertEnd=new yi(i.range.insert.endLineNumber,i.range.insert.endColumn),this.editReplaceEnd=new yi(i.range.replace.endLineNumber,i.range.replace.endColumn),this.isInvalid=this.isInvalid||at.spansMultipleLines(i.range.insert)||at.spansMultipleLines(i.range.replace)||i.range.insert.startLineNumber!==e.lineNumber||i.range.replace.startLineNumber!==e.lineNumber||i.range.insert.startColumn!==i.range.replace.startColumn),typeof s.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return this._resolveDuration!==void 0}get resolveDuration(){return this._resolveDuration!==void 0?this._resolveDuration:-1}async resolve(e){if(!this._resolveCache){const i=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._resolveDuration=void 0}),n=new o0(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(s=>{Object.assign(this.completion,s),this._resolveDuration=n.elapsed()},s=>{pT(s)&&(this._resolveCache=void 0,this._resolveDuration=void 0)}).finally(()=>{i.dispose()})}return this._resolveCache}}class Kie{constructor(e=2,i=new Set,n=new Set,s=new Map,l=!0){this.snippetSortOrder=e,this.kindFilter=i,this.providerFilter=n,this.providerItemsToReuse=s,this.showDeprecated=l}}Kie.default=new Kie;let pDi;function gDi(){return pDi}class mDi{constructor(e,i,n,s){this.items=e,this.needsClipboard=i,this.durations=n,this.disposable=s}}async function mUe(c,e,i,n=Kie.default,s={triggerKind:0},l=Gl.None){const d=new o0;i=i.clone();const f=e.getWordAtPosition(i),g=f?new at(i.lineNumber,f.startColumn,i.lineNumber,f.endColumn):at.fromPositions(i),y={replace:g,insert:g.setEndPosition(i.lineNumber,i.column)},w=[],x=new On,I=[];let P=!1;const O=(X,Z,ee)=>{var he,we,Te;let Be=!1;if(!Z)return Be;for(const Me of Z.suggestions)if(!n.kindFilter.has(Me.kind)){if(!n.showDeprecated&&(!((he=Me==null?void 0:Me.tags)===null||he===void 0)&&he.includes(1)))continue;Me.range||(Me.range=y),Me.sortText||(Me.sortText=typeof Me.label=="string"?Me.label:Me.label.label),!P&&Me.insertTextRules&&Me.insertTextRules&4&&(P=P9.guessNeedsClipboard(Me.insertText)),w.push(new _Di(i,Me,Z,X)),Be=!0}return A1e(Z)&&x.add(Z),I.push({providerName:(we=X._debugDisplayName)!==null&&we!==void 0?we:"unknown_provider",elapsedProvider:(Te=Z.duration)!==null&&Te!==void 0?Te:-1,elapsedOverall:ee.elapsed()}),Be},W=(async()=>{})();for(const X of c.orderedGroups(e)){let Z=!1;if(await Promise.all(X.map(async ee=>{if(n.providerItemsToReuse.has(ee)){const he=n.providerItemsToReuse.get(ee);he.forEach(we=>w.push(we)),Z=Z||he.length>0;return}if(!(n.providerFilter.size>0&&!n.providerFilter.has(ee)))try{const he=new o0,we=await ee.provideCompletionItems(e,i,s,l);Z=O(ee,we,he)||Z}catch(he){r_(he)}})),Z||l.isCancellationRequested)break}return await W,l.isCancellationRequested?(x.dispose(),Promise.reject(new DE)):new mDi(w.sort(bDi(n.snippetSortOrder)),P,{entries:I,elapsed:d.elapsed()},x)}function vUe(c,e){if(c.sortTextLow&&e.sortTextLow){if(c.sortTextLowe.sortTextLow)return 1}return c.textLabele.textLabel?1:c.completion.kind-e.completion.kind}function vDi(c,e){if(c.completion.kind!==e.completion.kind){if(c.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return vUe(c,e)}function yDi(c,e){if(c.completion.kind!==e.completion.kind){if(c.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return vUe(c,e)}const Sbe=new Map;Sbe.set(0,vDi);Sbe.set(2,yDi);Sbe.set(1,vUe);function bDi(c){return Sbe.get(c)}uc.registerCommand("_executeCompletionItemProvider",async(c,...e)=>{const[i,n,s,l]=e;Ac(Oo.isUri(i)),Ac(yi.isIPosition(n)),Ac(typeof s=="string"||!s),Ac(typeof l=="number"||!l);const{completionProvider:d}=c.get(js),f=await c.get(Lb).createModelReference(i);try{const g={incomplete:!1,suggestions:[]},y=[],w=f.object.textEditorModel.validatePosition(n),x=await mUe(d,f.object.textEditorModel,w,void 0,{triggerCharacter:s??void 0,triggerKind:s?1:0});for(const I of x.items)y.length<(l??0)&&y.push(I.resolve(Gl.None)),g.incomplete=g.incomplete||I.container.incomplete,g.suggestions.push(I.completion);try{return await Promise.all(y),g}finally{setTimeout(()=>x.disposable.dispose(),100)}}finally{f.dispose()}});function CDi(c,e){var i;(i=c.getContribution("editor.contrib.suggestController"))===null||i===void 0||i.triggerSuggest(new Set().add(e),void 0,!0)}class gU{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,i){switch(i){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}function xyt(c,e=M0){return qfi(c,e)?c.charAt(0).toUpperCase()+c.slice(1):c}var SDi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},wDi=function(c,e){return function(i,n){e(i,n,c)}};class kyt{constructor(e){this._delegates=e}resolve(e){for(const i of this._delegates){const n=i.resolve(e);if(n!==void 0)return n}}}class Tyt{constructor(e,i,n,s){this._model=e,this._selection=i,this._selectionIdx=n,this._overtypingCapturer=s}resolve(e){const{name:i}=e;if(i==="SELECTION"||i==="TM_SELECTED_TEXT"){let n=this._model.getValueInRange(this._selection)||void 0,s=this._selection.startLineNumber!==this._selection.endLineNumber;if(!n&&this._overtypingCapturer){const l=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);l&&(n=l.value,s=l.multiline)}if(n&&s&&e.snippet){const l=this._model.getLineContent(this._selection.startLineNumber),d=Md(l,0,this._selection.startColumn-1);let f=d;e.snippet.walk(y=>y===e?!1:(y instanceof gy&&(f=Md(wL(y.value).pop())),!0));const g=YM(f,d);n=n.replace(/(\r\n|\r|\n)(.*)/g,(y,w,x)=>`${w}${f.substr(g)}${x}`)}return n}else{if(i==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(i==="TM_CURRENT_WORD"){const n=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return n&&n.word||void 0}else{if(i==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(i==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(i==="CURSOR_INDEX")return String(this._selectionIdx);if(i==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}}class Dyt{constructor(e,i){this._labelService=e,this._model=i}resolve(e){const{name:i}=e;if(i==="TM_FILENAME")return BM(this._model.uri.fsPath);if(i==="TM_FILENAME_BASE"){const n=BM(this._model.uri.fsPath),s=n.lastIndexOf(".");return s<=0?n:n.slice(0,s)}else{if(i==="TM_DIRECTORY")return Wbt(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(gye(this._model.uri));if(i==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(i==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}class Eyt{constructor(e,i,n,s){this._readClipboardText=e,this._selectionIdx=i,this._selectionCount=n,this._spread=s}resolve(e){if(e.name!=="CLIPBOARD")return;const i=this._readClipboardText();if(i){if(this._spread){const n=i.split(/\r\n|\n|\r/).filter(s=>!Jbt(s));if(n.length===this._selectionCount)return n[this._selectionIdx]}return i}}}let C1e=class{constructor(e,i,n){this._model=e,this._selection=i,this._languageConfigurationService=n}resolve(e){const{name:i}=e,n=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),s=this._languageConfigurationService.getLanguageConfiguration(n).comments;if(s){if(i==="LINE_COMMENT")return s.lineCommentToken||void 0;if(i==="BLOCK_COMMENT_START")return s.blockCommentStartToken||void 0;if(i==="BLOCK_COMMENT_END")return s.blockCommentEndToken||void 0}}};C1e=SDi([wDi(2,Kd)],C1e);class gE{constructor(){this._date=new Date}resolve(e){const{name:i}=e;if(i==="CURRENT_YEAR")return String(this._date.getFullYear());if(i==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(i==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(i==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(i==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(i==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(i==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(i==="CURRENT_DAY_NAME")return gE.dayNames[this._date.getDay()];if(i==="CURRENT_DAY_NAME_SHORT")return gE.dayNamesShort[this._date.getDay()];if(i==="CURRENT_MONTH_NAME")return gE.monthNames[this._date.getMonth()];if(i==="CURRENT_MONTH_NAME_SHORT")return gE.monthNamesShort[this._date.getMonth()];if(i==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(i==="CURRENT_TIMEZONE_OFFSET"){const n=this._date.getTimezoneOffset(),s=n>0?"-":"+",l=Math.trunc(Math.abs(n/60)),d=l<10?"0"+l:l,f=Math.abs(n)-l*60,g=f<10?"0"+f:f;return s+d+":"+g}}}gE.dayNames=[V("Sunday","Sunday"),V("Monday","Monday"),V("Tuesday","Tuesday"),V("Wednesday","Wednesday"),V("Thursday","Thursday"),V("Friday","Friday"),V("Saturday","Saturday")];gE.dayNamesShort=[V("SundayShort","Sun"),V("MondayShort","Mon"),V("TuesdayShort","Tue"),V("WednesdayShort","Wed"),V("ThursdayShort","Thu"),V("FridayShort","Fri"),V("SaturdayShort","Sat")];gE.monthNames=[V("January","January"),V("February","February"),V("March","March"),V("April","April"),V("May","May"),V("June","June"),V("July","July"),V("August","August"),V("September","September"),V("October","October"),V("November","November"),V("December","December")];gE.monthNamesShort=[V("JanuaryShort","Jan"),V("FebruaryShort","Feb"),V("MarchShort","Mar"),V("AprilShort","Apr"),V("MayShort","May"),V("JuneShort","Jun"),V("JulyShort","Jul"),V("AugustShort","Aug"),V("SeptemberShort","Sep"),V("OctoberShort","Oct"),V("NovemberShort","Nov"),V("DecemberShort","Dec")];class Iyt{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const i=_mi(this._workspaceService.getWorkspace());if(!fmi(i)){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(i);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(i)}}_resolveWorkspaceName(e){if(nBe(e))return BM(e.uri.path);let i=BM(e.configPath.path);return i.endsWith(rBe)&&(i=i.substr(0,i.length-rBe.length-1)),i}_resoveWorkspacePath(e){if(nBe(e))return xyt(e.uri.fsPath);const i=BM(e.configPath.path);let n=e.configPath.fsPath;return n.endsWith(i)&&(n=n.substr(0,n.length-i.length-1)),n?xyt(n):"/"}}class Nyt{resolve(e){const{name:i}=e;if(i==="RANDOM")return Math.random().toString().slice(-6);if(i==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(i==="UUID")return nbe()}}var xDi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},kDi=function(c,e){return function(i,n){e(i,n,c)}},YD;class $x{constructor(e,i,n){this._editor=e,this._snippet=i,this._snippetLineLeadingWhitespace=n,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=$pt(i.placeholders,Gx.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations(i=>{for(const n of this._snippet.placeholders){const s=this._snippet.offset(n),l=this._snippet.fullLen(n),d=at.fromPositions(e.getPositionAt(this._offset+s),e.getPositionAt(this._offset+s+l)),f=n.isFinalTabstop?$x._decor.inactiveFinal:$x._decor.inactive,g=i.addDecoration(d,f);this._placeholderDecorations.set(n,g)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const s=[];for(const l of this._placeholderGroups[this._placeholderGroupsIdx])if(l.transform){const d=this._placeholderDecorations.get(l),f=this._editor.getModel().getDecorationRange(d),g=this._editor.getModel().getValueInRange(f),y=l.transform.resolve(g).split(/\r\n|\r|\n/);for(let w=1;w0&&this._editor.executeEdits("snippet.placeholderTransform",s)}let i=!1;e===!0&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,i=!0);const n=this._editor.getModel().changeDecorations(s=>{const l=new Set,d=[];for(const f of this._placeholderGroups[this._placeholderGroupsIdx]){const g=this._placeholderDecorations.get(f),y=this._editor.getModel().getDecorationRange(g);d.push(new Qs(y.startLineNumber,y.startColumn,y.endLineNumber,y.endColumn)),i=i&&this._hasPlaceholderBeenCollapsed(f),s.changeDecorationOptions(g,f.isFinalTabstop?$x._decor.activeFinal:$x._decor.active),l.add(f);for(const w of this._snippet.enclosingPlaceholders(f)){const x=this._placeholderDecorations.get(w);s.changeDecorationOptions(x,w.isFinalTabstop?$x._decor.activeFinal:$x._decor.active),l.add(w)}}for(const[f,g]of this._placeholderDecorations)l.has(f)||s.changeDecorationOptions(g,f.isFinalTabstop?$x._decor.inactiveFinal:$x._decor.inactive);return d});return i?this.move(e):n??[]}_hasPlaceholderBeenCollapsed(e){let i=e;for(;i;){if(i instanceof Gx){const n=this._placeholderDecorations.get(i);if(this._editor.getModel().getDecorationRange(n).isEmpty()&&i.toString().length>0)return!0}i=i.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){const[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){const e=new Map;for(const i of this._placeholderGroups){let n;for(const s of i){if(s.isFinalTabstop)break;n||(n=[],e.set(s.index,n));const l=this._placeholderDecorations.get(s),d=this._editor.getModel().getDecorationRange(l);if(!d){e.delete(s.index);break}n.push(d)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(e!=null&&e.choice))return;const i=this._placeholderDecorations.get(e);if(!i)return;const n=this._editor.getModel().getDecorationRange(i);if(n)return{range:n,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(i=>(e=i instanceof e$,!e)),e}merge(e){const i=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(n=>{for(const s of this._placeholderGroups[this._placeholderGroupsIdx]){const l=e.shift();console.assert(l._offset!==-1),console.assert(!l._placeholderDecorations);const d=l._snippet.placeholderInfo.last.index;for(const g of l._snippet.placeholderInfo.all)g.isFinalTabstop?g.index=s.index+(d+1)/this._nestingLevel:g.index=s.index+g.index/this._nestingLevel;this._snippet.replace(s,l._snippet.children);const f=this._placeholderDecorations.get(s);n.removeDecoration(f),this._placeholderDecorations.delete(s);for(const g of l._snippet.placeholders){const y=l._snippet.offset(g),w=l._snippet.fullLen(g),x=at.fromPositions(i.getPositionAt(l._offset+y),i.getPositionAt(l._offset+y+w)),I=n.addDecoration(x,$x._decor.inactive);this._placeholderDecorations.set(g,I)}}this._placeholderGroups=$pt(this._snippet.placeholders,Gx.compareByIndex)})}}$x._decor={active:Xa.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:Xa.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:Xa.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:Xa.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const Lyt={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let S1e=YD=class{static adjustWhitespace(e,i,n,s,l){const d=e.getLineContent(i.lineNumber),f=Md(d,0,i.column-1);let g;return s.walk(y=>{if(!(y instanceof gy)||y.parent instanceof e$||l&&!l.has(y))return!0;const w=y.value.split(/\r\n|\r|\n/);if(n){const I=s.offset(y);if(I===0)w[0]=e.normalizeIndentation(w[0]);else{g=g??s.toString();const P=g.charCodeAt(I-1);(P===10||P===13)&&(w[0]=e.normalizeIndentation(f+w[0]))}for(let P=1;Pwe.get(T9)),O=e.invokeWithinContext(we=>new Dyt(we.get(hq),I)),W=()=>f,X=I.getValueInRange(YD.adjustSelection(I,e.getSelection(),n,0)),Z=I.getValueInRange(YD.adjustSelection(I,e.getSelection(),0,s)),ee=I.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),he=e.getSelections().map((we,Te)=>({selection:we,idx:Te})).sort((we,Te)=>at.compareRangesUsingStarts(we.selection,Te.selection));for(const{selection:we,idx:Te}of he){let Be=YD.adjustSelection(I,we,n,0),Me=YD.adjustSelection(I,we,0,s);X!==I.getValueInRange(Be)&&(Be=we),Z!==I.getValueInRange(Me)&&(Me=we);const vt=we.setStartPosition(Be.startLineNumber,Be.startColumn).setEndPosition(Me.endLineNumber,Me.endColumn),Nt=new P9().parse(i,!0,l),Ni=vt.getStartPosition(),ci=YD.adjustWhitespace(I,Ni,d||Te>0&&ee!==I.getLineFirstNonWhitespaceColumn(we.positionLineNumber),Nt);Nt.resolveVariables(new kyt([O,new Eyt(W,Te,he.length,e.getOption(79)==="spread"),new Tyt(I,we,Te,g),new C1e(I,we,y),new gE,new Iyt(P),new Nyt])),w[Te]=Kf.replace(vt,Nt.toString()),w[Te].identifier={major:Te,minor:0},w[Te]._isTracked=!0,x[Te]=new $x(e,Nt,ci)}return{edits:w,snippets:x}}static createEditsAndSnippetsFromEdits(e,i,n,s,l,d,f){if(!e.hasModel()||i.length===0)return{edits:[],snippets:[]};const g=[],y=e.getModel(),w=new P9,x=new Zne,I=new kyt([e.invokeWithinContext(O=>new Dyt(O.get(hq),y)),new Eyt(()=>l,0,e.getSelections().length,e.getOption(79)==="spread"),new Tyt(y,e.getSelection(),0,d),new C1e(y,e.getSelection(),f),new gE,new Iyt(e.invokeWithinContext(O=>O.get(T9))),new Nyt]);i=i.sort((O,W)=>at.compareRangesUsingStarts(O.range,W.range));let P=0;for(let O=0;O0){const Te=i[O-1].range,Be=at.fromPositions(Te.getEndPosition(),W.getStartPosition()),Me=new gy(y.getValueInRange(Be));x.appendChild(Me),P+=Me.value.length}const Z=w.parseFragment(X,x);YD.adjustWhitespace(y,W.getStartPosition(),!0,x,new Set(Z)),x.resolveVariables(I);const ee=x.toString(),he=ee.slice(P);P=ee.length;const we=Kf.replace(W,he);we.identifier={major:O,minor:0},we._isTracked=!0,g.push(we)}return w.ensureFinalTabstop(x,n,!0),{edits:g,snippets:[new $x(e,x,"")]}}constructor(e,i,n=Lyt,s){this._editor=e,this._template=i,this._options=n,this._languageConfigurationService=s,this._templateMerges=[],this._snippets=[]}dispose(){yd(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:i}=typeof this._template=="string"?YD.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):YD.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=i,this._editor.executeEdits("snippet",e,n=>{const s=n.filter(l=>!!l.identifier);for(let l=0;lQs.fromPositions(l.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,i=Lyt){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:n,snippets:s}=YD.createEditsAndSnippetsFromSelections(this._editor,e,i.overwriteBefore,i.overwriteAfter,!0,i.adjustWhitespace,i.clipboardText,i.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",n,l=>{const d=l.filter(g=>!!g.identifier);for(let g=0;gQs.fromPositions(g.range.getEndPosition()))})}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const i=[];for(const n of this._snippets){const s=n.move(e);i.push(...s)}return i}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length{l.push(...s.get(d))})}e.sort(at.compareRangesUsingStarts);for(const[n,s]of i){if(s.length!==e.length){i.delete(n);continue}s.sort(at.compareRangesUsingStarts);for(let l=0;l0}};S1e=YD=xDi([kDi(3,Kd)],S1e);var TDi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},wme=function(c,e){return function(i,n){e(i,n,c)}},jz;const Pyt={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let a0=jz=class{static get(e){return e.getContribution(jz.ID)}constructor(e,i,n,s,l){this._editor=e,this._logService=i,this._languageFeaturesService=n,this._languageConfigurationService=l,this._snippetListener=new On,this._modelVersionId=-1,this._inSnippet=jz.InSnippetMode.bindTo(s),this._hasNextTabstop=jz.HasNextTabstop.bindTo(s),this._hasPrevTabstop=jz.HasPrevTabstop.bindTo(s)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(e=this._session)===null||e===void 0||e.dispose(),this._snippetListener.dispose()}insert(e,i){try{this._doInsert(e,typeof i>"u"?Pyt:{...Pyt,...i})}catch(n){this.cancel(),this._logService.error(n),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,i){var n;if(this._editor.hasModel()){if(this._snippetListener.clear(),i.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?(Ac(typeof e=="string"),this._session.merge(e,i)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new S1e(this._editor,e,i,this._languageConfigurationService),this._session.insert()),i.undoStopAfter&&this._editor.getModel().pushStackElement(),!((n=this._session)===null||n===void 0)&&n.hasChoice){const s={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(w,x)=>{if(!this._session||w!==this._editor.getModel()||!yi.equals(this._editor.getPosition(),x))return;const{activeChoice:I}=this._session;if(!I||I.choice.options.length===0)return;const P=w.getValueInRange(I.range),O=!!I.choice.options.find(X=>X.value===P),W=[];for(let X=0;X{d==null||d.dispose(),f=!1},y=()=>{f||(d=this._languageFeaturesService.completionProvider.register({language:l.getLanguageId(),pattern:l.uri.fsPath,scheme:l.uri.scheme,exclusive:!0},s),this._snippetListener.add(d),f=!0)};this._choiceCompletions={provider:s,enable:y,disable:g}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(s=>s.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){var e;if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{activeChoice:i}=this._session;if(!i||!this._choiceCompletions){(e=this._choiceCompletions)===null||e===void 0||e.disable(),this._currentChoice=void 0;return}this._currentChoice!==i.choice&&(this._currentChoice=i.choice,this._choiceCompletions.enable(),queueMicrotask(()=>{CDi(this._editor,this._choiceCompletions.provider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var i;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(i=this._session)===null||i===void 0||i.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){var e;(e=this._session)===null||e===void 0||e.prev(),this._updateState()}next(){var e;(e=this._session)===null||e===void 0||e.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}};a0.ID="snippetController2";a0.InSnippetMode=new Xr("inSnippetMode",!1,V("inSnippetMode","Whether the editor in current in snippet mode"));a0.HasNextTabstop=new Xr("hasNextTabstop",!1,V("hasNextTabstop","Whether there is a next tab stop when in snippet mode"));a0.HasPrevTabstop=new Xr("hasPrevTabstop",!1,V("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"));a0=jz=TDi([wme(1,Sv),wme(2,js),wme(3,Zo),wme(4,Kd)],a0);Bc(a0.ID,a0,4);const wbe=sg.bindToContribution(a0.get);qr(new wbe({id:"jumpToNextSnippetPlaceholder",precondition:xn.and(a0.InSnippetMode,a0.HasNextTabstop),handler:c=>c.next(),kbOpts:{weight:130,kbExpr:Lt.textInputFocus,primary:2}}));qr(new wbe({id:"jumpToPrevSnippetPlaceholder",precondition:xn.and(a0.InSnippetMode,a0.HasPrevTabstop),handler:c=>c.prev(),kbOpts:{weight:130,kbExpr:Lt.textInputFocus,primary:1026}}));qr(new wbe({id:"leaveSnippet",precondition:a0.InSnippetMode,handler:c=>c.cancel(!0),kbOpts:{weight:130,kbExpr:Lt.textInputFocus,primary:9,secondary:[1033]}}));qr(new wbe({id:"acceptSnippet",precondition:a0.InSnippetMode,handler:c=>c.finish()}));var DDi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},hFe=function(c,e){return function(i,n){e(i,n,c)}},sw;(function(c){c[c.Undo=0]="Undo",c[c.Redo=1]="Redo",c[c.AcceptWord=2]="AcceptWord",c[c.Other=3]="Other"})(sw||(sw={}));let aVe=class extends Ii{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,i,n,s,l,d,f,g,y,w,x,I){super(),this.textModel=e,this.selectedSuggestItem=i,this.textModelVersionId=n,this._positions=s,this._debounceValue=l,this._suggestPreviewEnabled=d,this._suggestPreviewMode=f,this._inlineSuggestMode=g,this._enabled=y,this._instantiationService=w,this._commandService=x,this._languageConfigurationService=I,this._source=this._register(this._instantiationService.createInstance(oVe,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=yc(this,!1),this._forceUpdateExplicitlySignal=Pye(this),this._selectedInlineCompletionId=yc(this,void 0),this._primaryPosition=Ma(this,O=>{var W;return(W=this._positions.read(O)[0])!==null&&W!==void 0?W:new yi(1,1)}),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([sw.Redo,sw.Undo,sw.AcceptWord]),this._fetchInlineCompletionsPromise=Zmi({owner:this,createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:M4.Automatic}),handleChange:(O,W)=>(O.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(O.change)?W.preserveCurrentCompletion=!0:O.didChange(this._forceUpdateExplicitlySignal)&&(W.inlineCompletionTriggerKind=M4.Explicit),!0)},(O,W)=>{if(this._forceUpdateExplicitlySignal.read(O),!(this._enabled.read(O)&&this.selectedSuggestItem.read(O)||this._isActive.read(O))){this._source.cancelUpdate();return}this.textModelVersionId.read(O);const Z=this._source.suggestWidgetInlineCompletions.get(),ee=this.selectedSuggestItem.read(O);if(Z&&!ee){const Me=this._source.inlineCompletions.get();Rd(vt=>{(!Me||Z.request.versionId>Me.request.versionId)&&this._source.inlineCompletions.set(Z.clone(),vt),this._source.clearSuggestWidgetInlineCompletions(vt)})}const he=this._primaryPosition.read(O),we={triggerKind:W.inlineCompletionTriggerKind,selectedSuggestionInfo:ee==null?void 0:ee.toSelectedSuggestionInfo()},Te=this.selectedInlineCompletion.get(),Be=W.preserveCurrentCompletion||Te!=null&&Te.forwardStable?Te:void 0;return this._source.fetch(he,we,Be)}),this._filteredInlineCompletionItems=g4({owner:this,equalsFn:uBe()},O=>{const W=this._source.inlineCompletions.read(O);if(!W)return[];const X=this._primaryPosition.read(O);return W.inlineCompletions.filter(ee=>ee.isVisible(this.textModel,X,O))}),this.selectedInlineCompletionIndex=Ma(this,O=>{const W=this._selectedInlineCompletionId.read(O),X=this._filteredInlineCompletionItems.read(O),Z=this._selectedInlineCompletionId===void 0?-1:X.findIndex(ee=>ee.semanticId===W);return Z===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):Z}),this.selectedInlineCompletion=Ma(this,O=>{const W=this._filteredInlineCompletionItems.read(O),X=this.selectedInlineCompletionIndex.read(O);return W[X]}),this.activeCommands=g4({owner:this,equalsFn:uBe()},O=>{var W,X;return(X=(W=this.selectedInlineCompletion.read(O))===null||W===void 0?void 0:W.inlineCompletion.source.inlineCompletions.commands)!==null&&X!==void 0?X:[]}),this.lastTriggerKind=this._source.inlineCompletions.map(this,O=>O==null?void 0:O.request.context.triggerKind),this.inlineCompletionsCount=Ma(this,O=>{if(this.lastTriggerKind.read(O)===M4.Explicit)return this._filteredInlineCompletionItems.read(O).length}),this.state=g4({owner:this,equalsFn:(O,W)=>!O||!W?O===W:_yt(O.ghostTexts,W.ghostTexts)&&O.inlineCompletion===W.inlineCompletion&&O.suggestItem===W.suggestItem},O=>{var W,X;const Z=this.textModel,ee=this.selectedSuggestItem.read(O);if(ee){const he=f9(ee.toSingleTextEdit(),Z),we=this._computeAugmentation(he,O);if(!this._suggestPreviewEnabled.read(O)&&!we)return;const Be=(W=we==null?void 0:we.edit)!==null&&W!==void 0?W:he,Me=we?we.edit.text.length-he.text.length:0,vt=this._suggestPreviewMode.read(O),Nt=this._positions.read(O),Ni=[Be,..._Fe(this.textModel,Nt,Be)],ci=Ni.map((pi,gn)=>yyt(pi,Z,vt,Nt[gn],Me)).filter(rL),Mt=(X=ci[0])!==null&&X!==void 0?X:new Gie(Be.range.endLineNumber,[]);return{edits:Ni,primaryGhostText:Mt,ghostTexts:ci,inlineCompletion:we==null?void 0:we.completion,suggestItem:ee}}else{if(!this._isActive.read(O))return;const he=this.selectedInlineCompletion.read(O);if(!he)return;const we=he.toSingleTextEdit(O),Te=this._inlineSuggestMode.read(O),Be=this._positions.read(O),Me=[we,..._Fe(this.textModel,Be,we)],vt=Me.map((Nt,Ni)=>yyt(Nt,Z,Te,Be[Ni],0)).filter(rL);return vt[0]?{edits:Me,primaryGhostText:vt[0],ghostTexts:vt,inlineCompletion:he,suggestItem:void 0}:void 0}}),this.ghostTexts=g4({owner:this,equalsFn:_yt},O=>{const W=this.state.read(O);if(W)return W.ghostTexts}),this.primaryGhostText=g4({owner:this,equalsFn:GTt},O=>{const W=this.state.read(O);if(W)return W==null?void 0:W.primaryGhostText}),this._register(Hne(this._fetchInlineCompletionsPromise));let P;this._register(Cl(O=>{var W,X;const Z=this.state.read(O),ee=Z==null?void 0:Z.inlineCompletion;if((ee==null?void 0:ee.semanticId)!==(P==null?void 0:P.semanticId)&&(P=ee,ee)){const he=ee.inlineCompletion,we=he.source;(X=(W=we.provider).handleItemDidShow)===null||X===void 0||X.call(W,we.inlineCompletions,he.sourceInlineCompletion,he.insertText)}}))}async trigger(e){this._isActive.set(!0,e),await this._fetchInlineCompletionsPromise.get()}async triggerExplicitly(e){vie(e,i=>{this._isActive.set(!0,i),this._forceUpdateExplicitlySignal.trigger(i)}),await this._fetchInlineCompletionsPromise.get()}stop(e){vie(e,i=>{this._isActive.set(!1,i),this._source.clear(i)})}_computeAugmentation(e,i){const n=this.textModel,s=this._source.suggestWidgetInlineCompletions.read(i),l=s?s.inlineCompletions:[this.selectedInlineCompletion.read(i)].filter(rL);return Doi(l,f=>{let g=f.toSingleTextEdit(i);return g=f9(g,n,at.fromPositions(g.range.getStartPosition(),e.range.getEndPosition())),ZTt(g,e)?{completion:f,edit:g}:void 0})}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();const i=this._filteredInlineCompletionItems.get()||[];if(i.length>0){const n=(this.selectedInlineCompletionIndex.get()+e+i.length)%i.length;this._selectedInlineCompletionId.set(i[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){var i;if(e.getModel()!==this.textModel)throw new Yu;const n=this.state.get();if(!n||n.primaryGhostText.isEmpty()||!n.inlineCompletion)return;const s=n.inlineCompletion.toInlineCompletion(void 0);if(e.pushUndoStop(),s.snippetInfo)e.executeEdits("inlineSuggestion.accept",[Kf.replace(s.range,""),...s.additionalTextEdits]),e.setPosition(s.snippetInfo.range.getStartPosition(),"inlineCompletionAccept"),(i=a0.get(e))===null||i===void 0||i.insert(s.snippetInfo.snippet,{undoStopBefore:!1});else{const l=n.edits,d=Ayt(l).map(f=>Qs.fromPositions(f));e.executeEdits("inlineSuggestion.accept",[...l.map(f=>Kf.replace(f.range,f.text)),...s.additionalTextEdits]),e.setSelections(d,"inlineCompletionAccept")}s.command&&s.source.addRef(),Rd(l=>{this._source.clear(l),this._isActive.set(!1,l)}),s.command&&(await this._commandService.executeCommand(s.command.id,...s.command.arguments||[]).then(void 0,r_),s.source.removeRef())}async acceptNextWord(e){await this._acceptNext(e,(i,n)=>{const s=this.textModel.getLanguageIdAtPosition(i.lineNumber,i.column),l=this._languageConfigurationService.getLanguageConfiguration(s),d=new RegExp(l.wordDefinition.source,l.wordDefinition.flags.replace("g","")),f=n.match(d);let g=0;f&&f.index!==void 0?f.index===0?g=f[0].length:g=f.index:g=n.length;const w=/\s+/g.exec(n);return w&&w.index!==void 0&&w.index+w[0].length{const s=n.match(/\n/);return s&&s.index!==void 0?s.index+1:n.length},1)}async _acceptNext(e,i,n){if(e.getModel()!==this.textModel)throw new Yu;const s=this.state.get();if(!s||s.primaryGhostText.isEmpty()||!s.inlineCompletion)return;const l=s.primaryGhostText,d=s.inlineCompletion.toInlineCompletion(void 0);if(d.snippetInfo||d.filterText!==d.insertText){await this.accept(e);return}const f=l.parts[0],g=new yi(l.lineNumber,f.column),y=f.text,w=i(g,y);if(w===y.length&&l.parts.length===1){this.accept(e);return}const x=y.substring(0,w),I=this._positions.get(),P=I[0];d.source.addRef();try{this._isAcceptingPartially=!0;try{e.pushUndoStop();const O=at.fromPositions(P,g),W=e.getModel().getValueInRange(O)+x,X=new K4(O,W),Z=[X,..._Fe(this.textModel,I,X)],ee=Ayt(Z).map(he=>Qs.fromPositions(he));e.executeEdits("inlineSuggestion.accept",Z.map(he=>Kf.replace(he.range,he.text))),e.setSelections(ee,"inlineCompletionPartialAccept"),e.revealPositionInCenterIfOutsideViewport(e.getPosition(),1)}finally{this._isAcceptingPartially=!1}if(d.source.provider.handlePartialAccept){const O=at.fromPositions(d.range.getStartPosition(),Cy.ofText(x).addToPosition(g)),W=e.getModel().getValueInRange(O,1);d.source.provider.handlePartialAccept(d.source.inlineCompletions,d.sourceInlineCompletion,W.length,{kind:n})}}finally{d.source.removeRef()}}handleSuggestAccepted(e){var i,n;const s=f9(e.toSingleTextEdit(),this.textModel),l=this._computeAugmentation(s,void 0);if(!l)return;const d=l.completion.inlineCompletion;(n=(i=d.source.provider).handlePartialAccept)===null||n===void 0||n.call(i,d.source.inlineCompletions,d.sourceInlineCompletion,s.text.length,{kind:2})}};aVe=DDi([hFe(9,So),hFe(10,ff),hFe(11,Kd)],aVe);function _Fe(c,e,i){if(e.length===1)return[];const n=e[0],s=e.slice(1),l=i.range.getStartPosition(),d=i.range.getEndPosition(),f=c.getValueInRange(at.fromPositions(n,d)),g=pyt(n,l);if(g.lineNumber<1)return Ba(new Yu(`positionWithinTextEdit line number should be bigger than 0. + Invalid subtraction between ${n.toString()} and ${l.toString()}`)),[];const y=EDi(i.text,g);return s.map(w=>{const x=XTi(pyt(w,l),d),I=c.getValueInRange(at.fromPositions(w,x)),P=YM(f,I),O=at.fromPositions(w,w.delta(0,P));return new K4(O,y)})}function EDi(c,e){let i="";const n=tni(c);for(let s=e.lineNumber-1;sat.compareRangesUsingStarts(l.range,d.range)),n=new XHe(e.apply(c)).getNewRanges();return e.inverse().apply(n).map(l=>l.getEndPosition())}var IDi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Oyt=function(c,e){return function(i,n){e(i,n,c)}},Hee;class yUe{constructor(e){this.name=e}select(e,i,n){if(n.length===0)return 0;const s=n[0].score[0];for(let l=0;lg&&x.type===n[y].completion.kind&&x.insertText===n[y].completion.insertText&&(g=x.touch,f=y),n[y].completion.preselect&&d===-1)return d=y}return f!==-1?f:d!==-1?d:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();const i=0;for(const[n,s]of e)s.touch=i,s.type=typeof s.type=="number"?s.type:Ate.fromString(s.type),this._cache.set(n,s);this._seq=this._cache.size}}class LDi extends yUe{constructor(){super("recentlyUsedByPrefix"),this._trie=RU.forStrings(),this._seq=0}memorize(e,i,n){const{word:s}=e.getWordUntilPosition(i),l=`${e.getLanguageId()}/${s}`;this._trie.set(l,{type:n.completion.kind,insertText:n.completion.insertText,touch:this._seq++})}select(e,i,n){const{word:s}=e.getWordUntilPosition(i);if(!s)return super.select(e,i,n);const l=`${e.getLanguageId()}/${s}`;let d=this._trie.get(l);if(d||(d=this._trie.findSubstr(l)),d)for(let f=0;fe.push([n,i])),e.sort((i,n)=>-(i[1].touch-n[1].touch)).forEach((i,n)=>i[1].touch=n),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[i,n]of e)n.type=typeof n.type=="number"?n.type:Ate.fromString(n.type),this._trie.set(i,n)}}}let Qie=Hee=class{constructor(e,i){this._storageService=e,this._configService=i,this._disposables=new On,this._persistSoon=new id(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(n=>{n.reason===Cie.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,i,n){this._withStrategy(e,i).memorize(e,i,n),this._persistSoon.schedule()}select(e,i,n){return this._withStrategy(e,i).select(e,i,n)}_withStrategy(e,i){var n;const s=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(i.lineNumber,i.column),resource:e.uri});if(((n=this._strategy)===null||n===void 0?void 0:n.name)!==s){this._saveState();const l=Hee._strategyCtors.get(s)||YTt;this._strategy=new l;try{const f=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,g=this._storageService.get(`${Hee._storagePrefix}/${s}`,f);g&&this._strategy.fromJSON(JSON.parse(g))}catch{}}return this._strategy}_saveState(){if(this._strategy){const i=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,n=JSON.stringify(this._strategy);this._storageService.store(`${Hee._storagePrefix}/${this._strategy.name}`,n,i,1)}}};Qie._strategyCtors=new Map([["recentlyUsedByPrefix",LDi],["recentlyUsed",NDi],["first",YTt]]);Qie._storagePrefix="suggest/memories";Qie=Hee=IDi([Oyt(0,mT),Oyt(1,El)],Qie);const xbe=Kl("ISuggestMemories");dc(xbe,Qie,1);var PDi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},ADi=function(c,e){return function(i,n){e(i,n,c)}},lVe;let Xie=lVe=class{constructor(e,i){this._editor=e,this._enabled=!1,this._ckAtEnd=lVe.AtEnd.bindTo(i),this._configListener=this._editor.onDidChangeConfiguration(n=>n.hasChanged(123)&&this._update()),this._update()}dispose(){var e;this._configListener.dispose(),(e=this._selectionListener)===null||e===void 0||e.dispose(),this._ckAtEnd.reset()}_update(){const e=this._editor.getOption(123)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){const i=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const n=this._editor.getModel(),s=this._editor.getSelection(),l=n.getWordAtPosition(s.getStartPosition());if(!l){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(l.endColumn===s.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(i),i()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};Xie.AtEnd=new Xr("atEndOfWord",!1);Xie=lVe=PDi([ADi(1,Zo)],Xie);var ODi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},MDi=function(c,e){return function(i,n){e(i,n,c)}},jee;let V9=jee=class{constructor(e,i){this._editor=e,this._index=0,this._ckOtherSuggestions=jee.OtherSuggestions.bindTo(i)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),(e=this._listener)===null||e===void 0||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:i},n){if(e.items.length===0){this.reset();return}if(jee._moveIndex(!0,e,i)===i){this.reset();return}this._acceptNext=n,this._model=e,this._index=i,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,i,n){let s=n;for(let l=i.items.length;l>0&&(s=(s+i.items.length+(e?1:-1))%i.items.length,!(s===n||!i.items[s].completion.additionalTextEdits));l--);return s}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=jee._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};V9.OtherSuggestions=new Xr("hasOtherSuggestions",!1);V9=jee=ODi([MDi(1,Zo)],V9);class RDi{constructor(e,i,n,s){this._disposables=new On,this._disposables.add(n.onDidSuggest(l=>{l.completionModel.items.length===0&&this.reset()})),this._disposables.add(n.onDidCancel(l=>{this.reset()})),this._disposables.add(i.onDidShow(()=>this._onItem(i.getFocusedItem()))),this._disposables.add(i.onDidFocus(this._onItem,this)),this._disposables.add(i.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(l=>{if(this._active&&!i.isFrozen()&&n.state!==0){const d=l.charCodeAt(l.length-1);this._active.acceptCharacters.has(d)&&e.getOption(0)&&s(this._active.item)}}))}_onItem(e){if(!e||!bv(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;const i=new $0e;for(const n of e.item.completion.commitCharacters)n.length>0&&i.add(n.charCodeAt(0));this._active={acceptCharacters:i,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}class ow{async provideSelectionRanges(e,i){const n=[];for(const s of i){const l=[];n.push(l);const d=new Map;await new Promise(f=>ow._bracketsRightYield(f,0,e,s,d)),await new Promise(f=>ow._bracketsLeftYield(f,0,e,s,d,l))}return n}static _bracketsRightYield(e,i,n,s,l){const d=new Map,f=Date.now();for(;;){if(i>=ow._maxRounds){e();break}if(!s){e();break}const g=n.bracketPairs.findNextBracket(s);if(!g){e();break}if(Date.now()-f>ow._maxDuration){setTimeout(()=>ow._bracketsRightYield(e,i+1,n,s,l));break}if(g.bracketInfo.isOpeningBracket){const w=g.bracketInfo.bracketText,x=d.has(w)?d.get(w):0;d.set(w,x+1)}else{const w=g.bracketInfo.getOpeningBrackets()[0].bracketText;let x=d.has(w)?d.get(w):0;if(x-=1,d.set(w,Math.max(0,x)),x<0){let I=l.get(w);I||(I=new yy,l.set(w,I)),I.push(g.range)}}s=g.range.getEndPosition()}}static _bracketsLeftYield(e,i,n,s,l,d){const f=new Map,g=Date.now();for(;;){if(i>=ow._maxRounds&&l.size===0){e();break}if(!s){e();break}const y=n.bracketPairs.findPrevBracket(s);if(!y){e();break}if(Date.now()-g>ow._maxDuration){setTimeout(()=>ow._bracketsLeftYield(e,i+1,n,s,l,d));break}if(y.bracketInfo.isOpeningBracket){const x=y.bracketInfo.bracketText;let I=f.has(x)?f.get(x):0;if(I-=1,f.set(x,Math.max(0,I)),I<0){const P=l.get(x);if(P){const O=P.shift();P.size===0&&l.delete(x);const W=at.fromPositions(y.range.getEndPosition(),O.getStartPosition()),X=at.fromPositions(y.range.getStartPosition(),O.getEndPosition());d.push({range:W}),d.push({range:X}),ow._addBracketLeading(n,X,d)}}}else{const x=y.bracketInfo.getOpeningBrackets()[0].bracketText,I=f.has(x)?f.get(x):0;f.set(x,I+1)}s=y.range.getStartPosition()}}static _addBracketLeading(e,i,n){if(i.startLineNumber===i.endLineNumber)return;const s=i.startLineNumber,l=e.getLineFirstNonWhitespaceColumn(s);l!==0&&l!==i.startColumn&&(n.push({range:at.fromPositions(new yi(s,l),i.getEndPosition())}),n.push({range:at.fromPositions(new yi(s,1),i.getEndPosition())}));const d=s-1;if(d>0){const f=e.getLineFirstNonWhitespaceColumn(d);f===i.startColumn&&f!==e.getLineLastNonWhitespaceColumn(d)&&(n.push({range:at.fromPositions(new yi(d,f),i.getEndPosition())}),n.push({range:at.fromPositions(new yi(d,1),i.getEndPosition())}))}}}ow._maxDuration=30;ow._maxRounds=2;class uE{static async create(e,i){if(!i.getOption(118).localityBonus||!i.hasModel())return uE.None;const n=i.getModel(),s=i.getPosition();if(!e.canComputeWordRanges(n.uri))return uE.None;const[l]=await new ow().provideSelectionRanges(n,[s]);if(l.length===0)return uE.None;const d=await e.computeWordRanges(n.uri,l[0].range);if(!d)return uE.None;const f=n.getWordUntilPosition(s);return delete d[f.word],new class extends uE{distance(g,y){if(!s.equals(i.getPosition()))return 0;if(y.kind===17)return 2<<20;const w=typeof y.label=="string"?y.label:y.label.label,x=d[w];if(_bt(x))return 2<<20;const I=Ete(x,at.fromPositions(g),at.compareRangesUsingStarts),P=I>=0?x[I]:x[Math.max(0,~I-1)];let O=l.length;for(const W of l){if(!at.containsRange(W.range,P))break;O-=1}return O}}}}uE.None=new class extends uE{distance(){return 0}};let Myt=class{constructor(e,i){this.leadingLineContent=e,this.characterCountDelta=i}};class mM{constructor(e,i,n,s,l,d,f=Sye.default,g=void 0){this.clipboardText=g,this._snippetCompareFn=mM._compareCompletionItems,this._items=e,this._column=i,this._wordDistance=s,this._options=l,this._refilterKind=1,this._lineContext=n,this._fuzzyScoreOptions=f,d==="top"?this._snippetCompareFn=mM._compareCompletionItemsSnippetsUp:d==="bottom"&&(this._snippetCompareFn=mM._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){(this._lineContext.leadingLineContent!==e.leadingLineContent||this._lineContext.characterCountDelta!==e.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta0&&n[0].container.incomplete&&e.add(i);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const e=[],{leadingLineContent:i,characterCountDelta:n}=this._lineContext;let s="",l="";const d=this._refilterKind===1?this._items:this._filteredItems,f=[],g=!this._options.filterGraceful||d.length>2e3?k9:Kpi;for(let y=0;y=P)w.score=wE.Default;else if(typeof w.completion.filterText=="string"){const W=g(s,l,O,w.completion.filterText,w.filterTextLow,0,this._fuzzyScoreOptions);if(!W)continue;M5e(w.completion.filterText,w.textLabel)===0?w.score=W:(w.score=qpi(s,l,O,w.textLabel,w.labelLow,0),w.score[0]=W[0])}else{const W=g(s,l,O,w.textLabel,w.labelLow,0,this._fuzzyScoreOptions);if(!W)continue;w.score=W}}w.idx=y,w.distance=this._wordDistance.distance(w.position,w.completion),f.push(w),e.push(w.textLabel.length)}this._filteredItems=f.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?LFe(e.length-.85,e,(y,w)=>y-w):0}}static _compareCompletionItems(e,i){return e.score[0]>i.score[0]?-1:e.score[0]i.distance?1:e.idxi.idx?1:0}static _compareCompletionItemsSnippetsDown(e,i){if(e.completion.kind!==i.completion.kind){if(e.completion.kind===27)return 1;if(i.completion.kind===27)return-1}return mM._compareCompletionItems(e,i)}static _compareCompletionItemsSnippetsUp(e,i){if(e.completion.kind!==i.completion.kind){if(e.completion.kind===27)return-1;if(i.completion.kind===27)return 1}return mM._compareCompletionItems(e,i)}}var FDi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},XO=function(c,e){return function(i,n){e(i,n,c)}},cVe;class w5{static shouldAutoTrigger(e){if(!e.hasModel())return!1;const i=e.getModel(),n=e.getPosition();i.tokenization.tokenizeIfCheap(n.lineNumber);const s=i.getWordAtPosition(n);return!(!s||s.endColumn!==n.column&&s.startColumn+1!==n.column||!isNaN(Number(s.word)))}constructor(e,i,n){this.leadingLineContent=e.getLineContent(i.lineNumber).substr(0,i.column-1),this.leadingWord=e.getWordUntilPosition(i),this.lineNumber=i.lineNumber,this.column=i.column,this.triggerOptions=n}}function BDi(c,e,i){if(!e.getContextKeyValue(Cm.inlineSuggestionVisible.key))return!0;const n=e.getContextKeyValue(Cm.suppressSuggestions.key);return n!==void 0?!n:!c.getOption(62).suppressSuggestions}function WDi(c,e,i){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;const n=e.getContextKeyValue(Cm.suppressSuggestions.key);return n!==void 0?!n:!c.getOption(62).suppressSuggestions}let w1e=cVe=class{constructor(e,i,n,s,l,d,f,g,y){this._editor=e,this._editorWorkerService=i,this._clipboardService=n,this._telemetryService=s,this._logService=l,this._contextKeyService=d,this._configurationService=f,this._languageFeaturesService=g,this._envService=y,this._toDispose=new On,this._triggerCharacterListener=new On,this._triggerQuickSuggest=new gT,this._triggerState=void 0,this._completionDisposables=new On,this._onDidCancel=new ui,this._onDidTrigger=new ui,this._onDidSuggest=new ui,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new Qs(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let w=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{w=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{w=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(x=>{w||this._onCursorChange(x)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!w&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){yd(this._triggerCharacterListener),yd([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(91)||!this._editor.hasModel()||!this._editor.getOption(121))return;const e=new Map;for(const n of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const s of n.triggerCharacters||[]){let l=e.get(s);l||(l=new Set,l.add(gDi()),e.set(s,l)),l.add(n)}const i=n=>{var s;if(!WDi(this._editor,this._contextKeyService,this._configurationService)||w5.shouldAutoTrigger(this._editor))return;if(!n){const f=this._editor.getPosition();n=this._editor.getModel().getLineContent(f.lineNumber).substr(0,f.column-1)}let l="";g9(n.charCodeAt(n.length-1))?Bg(n.charCodeAt(n.length-2))&&(l=n.substr(n.length-2)):l=n.charAt(n.length-1);const d=e.get(l);if(d){const f=new Map;if(this._completionModel)for(const[g,y]of this._completionModel.getItemsByProvider())d.has(g)||f.set(g,y);this.trigger({auto:!0,triggerKind:1,triggerCharacter:l,retrigger:!!this._completionModel,clipboardText:(s=this._completionModel)===null||s===void 0?void 0:s.clipboardText,completionOptions:{providerFilter:d,providerItemsToReuse:f}})}};this._triggerCharacterListener.add(this._editor.onDidType(i)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>i()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){var i;this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),(i=this._requestToken)===null||i===void 0||i.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._triggerState!==void 0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._triggerState.auto,retrigger:!0}))}_onCursorChange(e){if(!this._editor.hasModel())return;const i=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||e.reason!==0&&e.reason!==3||e.source!=="keyboard"&&e.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&e.reason===0?(i.containsRange(this._currentSelection)||i.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&e.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var e;gU.isAllOff(this._editor.getOption(89))||this._editor.getOption(118).snippetsPreventQuickSuggestions&&(!((e=a0.get(this._editor))===null||e===void 0)&&e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!w5.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const i=this._editor.getModel(),n=this._editor.getPosition(),s=this._editor.getOption(89);if(!gU.isAllOff(s)){if(!gU.isAllOn(s)){i.tokenization.tokenizeIfCheap(n.lineNumber);const l=i.tokenization.getLineTokens(n.lineNumber),d=l.getStandardTokenType(l.findTokenIndexAtOffset(Math.max(n.column-1-1,0)));if(gU.valueFor(s,d)!=="on")return}BDi(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(i)&&this.trigger({auto:!0})}},this._editor.getOption(90)))}_refilterCompletionItems(){Ac(this._editor.hasModel()),Ac(this._triggerState!==void 0);const e=this._editor.getModel(),i=this._editor.getPosition(),n=new w5(e,i,{...this._triggerState,refilter:!0});this._onNewContext(n)}trigger(e){var i,n,s,l,d,f;if(!this._editor.hasModel())return;const g=this._editor.getModel(),y=new w5(g,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:(i=e.shy)!==null&&i!==void 0?i:!1,position:this._editor.getPosition()}),this._context=y;let w={triggerKind:(n=e.triggerKind)!==null&&n!==void 0?n:0};e.triggerCharacter&&(w={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new uh;const x=this._editor.getOption(112);let I=1;switch(x){case"top":I=0;break;case"bottom":I=2;break}const{itemKind:P,showDeprecated:O}=cVe.createSuggestFilter(this._editor),W=new Kie(I,(l=(s=e.completionOptions)===null||s===void 0?void 0:s.kindFilter)!==null&&l!==void 0?l:P,(d=e.completionOptions)===null||d===void 0?void 0:d.providerFilter,(f=e.completionOptions)===null||f===void 0?void 0:f.providerItemsToReuse,O),X=uE.create(this._editorWorkerService,this._editor),Z=mUe(this._languageFeaturesService.completionProvider,g,this._editor.getPosition(),W,w,this._requestToken.token);Promise.all([Z,X]).then(async([ee,he])=>{var we;if((we=this._requestToken)===null||we===void 0||we.dispose(),!this._editor.hasModel())return;let Te=e==null?void 0:e.clipboardText;if(!Te&&ee.needsClipboard&&(Te=await this._clipboardService.readText()),this._triggerState===void 0)return;const Be=this._editor.getModel(),Me=new w5(Be,this._editor.getPosition(),e),vt={...Sye.default,firstMatchCanBeWeak:!this._editor.getOption(118).matchOnWordStartOnly};if(this._completionModel=new mM(ee.items,this._context.column,{leadingLineContent:Me.leadingLineContent,characterCountDelta:Me.column-this._context.column},he,this._editor.getOption(118),this._editor.getOption(112),vt,Te),this._completionDisposables.add(ee.disposable),this._onNewContext(Me),this._reportDurationsTelemetry(ee.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const Nt of ee.items)Nt.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${Nt.provider._debugDisplayName}`,Nt.completion)}).catch(Ba)}_reportDurationsTelemetry(e){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)})}static createSuggestFilter(e){const i=new Set;e.getOption(112)==="none"&&i.add(27);const s=e.getOption(118);return s.showMethods||i.add(0),s.showFunctions||i.add(1),s.showConstructors||i.add(2),s.showFields||i.add(3),s.showVariables||i.add(4),s.showClasses||i.add(5),s.showStructs||i.add(6),s.showInterfaces||i.add(7),s.showModules||i.add(8),s.showProperties||i.add(9),s.showEvents||i.add(10),s.showOperators||i.add(11),s.showUnits||i.add(12),s.showValues||i.add(13),s.showConstants||i.add(14),s.showEnums||i.add(15),s.showEnumMembers||i.add(16),s.showKeywords||i.add(17),s.showWords||i.add(18),s.showColors||i.add(19),s.showFiles||i.add(20),s.showReferences||i.add(21),s.showColors||i.add(22),s.showFolders||i.add(23),s.showTypeParameters||i.add(24),s.showSnippets||i.add(27),s.showUsers||i.add(25),s.showIssues||i.add(26),{itemKind:i,showDeprecated:s.showDeprecated}}_onNewContext(e){if(this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(Md(e.leadingLineContent)!==Md(this._context.leadingLineContent)){this.cancel();return}if(e.columnthis._context.leadingWord.startColumn){if(w5.shouldAutoTrigger(this._editor)&&this._context){const n=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:n}})}return}if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&e.leadingWord.word.length!==0){const i=new Map,n=new Set;for(const[s,l]of this._completionModel.getItemsByProvider())l.length>0&&l[0].container.incomplete?n.add(s):i.set(s,l);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:n,providerItemsToReuse:i}})}else{const i=this._completionModel.lineContext;let n=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){const s=w5.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(s&&this._context.leadingWord.endColumn0,n&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:n})}}}}};w1e=cVe=FDi([XO(1,_k),XO(2,o6),XO(3,R0),XO(4,Sv),XO(5,Zo),XO(6,El),XO(7,js),XO(8,Hje)],w1e);class kbe{constructor(e,i){this._disposables=new On,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType(()=>{if(this._locked||!e.hasModel())return;const n=e.getSelections(),s=n.length;let l=!1;for(let f=0;fkbe._maxSelectionLength)return;this._lastOvertyped[f]={value:d.getValueInRange(g),multiline:g.startLineNumber!==g.endLineNumber}}})),this._disposables.add(i.onDidTrigger(n=>{this._locked=!0})),this._disposables.add(i.onDidCancel(n=>{this._locked=!1}))}getLastOvertypedInfo(e){if(e>=0&&e=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},pFe=function(c,e){return function(i,n){e(i,n,c)}};let HDi=class eDt extends cR{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=V({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",this._action.label,eDt.symbolPrintEnter(e)))}static symbolPrintEnter(e){var i;return(i=e.getLabel())===null||i===void 0?void 0:i.replace(/\benter\b/gi,"⏎")}},uVe=class{constructor(e,i,n,s,l){this._menuId=i,this._menuService=s,this._contextKeyService=l,this._menuDisposables=new On,this.element=zn(e,Sr(".suggest-status-bar"));const d=f=>f instanceof VC?n.createInstance(HDi,f,void 0):void 0;this._leftActions=new uk(this.element,{actionViewItemProvider:d}),this._rightActions=new uk(this.element,{actionViewItemProvider:d}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this._leftActions.dispose(),this._rightActions.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(this._menuId,this._contextKeyService),i=()=>{const n=[],s=[];for(const[l,d]of e.getActions())l==="left"?n.push(...d):s.push(...d);this._leftActions.clear(),this._leftActions.push(n),this._rightActions.clear(),this._rightActions.push(s)};this._menuDisposables.add(e.onDidChange(()=>i())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};uVe=VDi([pFe(2,So),pFe(3,Dw),pFe(4,Zo)],uVe);var jDi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},zDi=function(c,e){return function(i,n){e(i,n,c)}};function bUe(c){return!!c&&!!(c.completion.documentation||c.completion.detail&&c.completion.detail!==c.completion.label)}let dVe=class{constructor(e,i){this._editor=e,this._onDidClose=new ui,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new ui,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new On,this._renderDisposeable=new On,this._borderWidth=1,this._size=new eu(330,0),this.domNode=Sr(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=i.createInstance(gL,{editor:e}),this._body=Sr(".body"),this._scrollbar=new Ine(this._body,{alwaysConsumeMouseWheel:!0}),zn(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=zn(this._body,Sr(".header")),this._close=zn(this._header,Sr("span"+Uo.asCSSSelector(Dr.close))),this._close.title=V("details.close","Close"),this._type=zn(this._header,Sr("p.type")),this._docs=zn(this._body,Sr("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(50)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),i=e.get(50),n=i.getMassagedFontFamily(),s=e.get(119)||i.fontSize,l=e.get(120)||i.lineHeight,d=i.fontWeight,f=`${s}px`,g=`${l}px`;this.domNode.style.fontSize=f,this.domNode.style.lineHeight=`${l/s}`,this.domNode.style.fontWeight=d,this.domNode.style.fontFeatureSettings=i.fontFeatureSettings,this._type.style.fontFamily=n,this._close.style.height=g,this._close.style.width=g}getLayoutInfo(){const e=this._editor.getOption(120)||this._editor.getOption(50).lineHeight,i=this._borderWidth,n=i*2;return{lineHeight:e,borderWidth:i,borderHeight:n,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=V("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(e,i){var n,s;this._renderDisposeable.clear();let{detail:l,documentation:d}=e.completion;if(i){let f="";f+=`score: ${e.score[0]} +`,f+=`prefix: ${(n=e.word)!==null&&n!==void 0?n:"(no prefix)"} +`,f+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel} +`,f+=`distance: ${e.distance} (localityBonus-setting) +`,f+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"} +`,f+=`commit_chars: ${(s=e.completion.commitCharacters)===null||s===void 0?void 0:s.join("")} +`,d=new vv().appendCodeblock("empty",f),l=`Provider: ${e.provider._debugDisplayName}`}if(!i&&!bUe(e)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),l){const f=l.length>1e5?`${l.substr(0,1e5)}…`:l;this._type.textContent=f,this._type.title=f,RC(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(f))}else n0(this._type),this._type.title="",_y(this._type),this.domNode.classList.add("no-type");if(n0(this._docs),typeof d=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=d;else if(d){this._docs.classList.add("markdown-docs"),n0(this._docs);const f=this._markdownRenderer.render(d);this._docs.appendChild(f.element),this._renderDisposeable.add(f),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=f=>{f.preventDefault(),f.stopPropagation()},this._close.onclick=f=>{f.preventDefault(),f.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get isEmpty(){return this.domNode.classList.contains("no-docs")}get size(){return this._size}layout(e,i){const n=new eu(e,i);eu.equals(n,this._size)||(this._size=n,cri(this.domNode,e,i)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};dVe=jDi([zDi(1,So)],dVe);class UDi{constructor(e,i){this.widget=e,this._editor=i,this.allowEditorOverflow=!0,this._disposables=new On,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new nUe,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let n,s,l=0,d=0;this._disposables.add(this._resizable.onDidWillResize(()=>{n=this._topLeft,s=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(f=>{if(n&&s){this.widget.layout(f.dimension.width,f.dimension.height);let g=!1;f.west&&(d=s.width-f.dimension.width,g=!0),f.north&&(l=s.height-f.dimension.height,g=!0),g&&this._applyTopLeft({top:n.top+l,left:n.left+d})}f.done&&(n=void 0,s=void 0,l=0,d=0,this._userSize=f.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var f;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(f=this._userSize)!==null&&f!==void 0?f:this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return this._topLeft?{preference:this._topLeft}:null}show(){this._added||(this._editor.addOverlayWidget(this),this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,i){var n;const s=e.getBoundingClientRect();this._anchorBox=s,this._preferAlignAtTop=i,this._placeAtAnchor(this._anchorBox,(n=this._userSize)!==null&&n!==void 0?n:this.widget.size,i)}_placeAtAnchor(e,i,n){var s;const l=iR(this.getDomNode().ownerDocument.body),d=this.widget.getLayoutInfo(),f=new eu(220,2*d.lineHeight),g=e.top,y=function(){const Be=l.width-(e.left+e.width+d.borderWidth+d.horizontalPadding),Me=-d.borderWidth+e.left+e.width,vt=new eu(Be,l.height-e.top-d.borderHeight-d.verticalPadding),Nt=vt.with(void 0,e.top+e.height-d.borderHeight-d.verticalPadding);return{top:g,left:Me,fit:Be-i.width,maxSizeTop:vt,maxSizeBottom:Nt,minSize:f.with(Math.min(Be,f.width))}}(),w=function(){const Be=e.left-d.borderWidth-d.horizontalPadding,Me=Math.max(d.horizontalPadding,e.left-i.width-d.borderWidth),vt=new eu(Be,l.height-e.top-d.borderHeight-d.verticalPadding),Nt=vt.with(void 0,e.top+e.height-d.borderHeight-d.verticalPadding);return{top:g,left:Me,fit:Be-i.width,maxSizeTop:vt,maxSizeBottom:Nt,minSize:f.with(Math.min(Be,f.width))}}(),x=function(){const Be=e.left,Me=-d.borderWidth+e.top+e.height,vt=new eu(e.width-d.borderHeight,l.height-e.top-e.height-d.verticalPadding);return{top:Me,left:Be,fit:vt.height-i.height,maxSizeBottom:vt,maxSizeTop:vt,minSize:f.with(vt.width)}}(),I=[y,w,x],P=(s=I.find(Be=>Be.fit>=0))!==null&&s!==void 0?s:I.sort((Be,Me)=>Me.fit-Be.fit)[0],O=e.top+e.height-d.borderHeight;let W,X=i.height;const Z=Math.max(P.maxSizeTop.height,P.maxSizeBottom.height);X>Z&&(X=Z);let ee;n?X<=P.maxSizeTop.height?(W=!0,ee=P.maxSizeTop):(W=!1,ee=P.maxSizeBottom):X<=P.maxSizeBottom.height?(W=!1,ee=P.maxSizeBottom):(W=!0,ee=P.maxSizeTop);let{top:he,left:we}=P;!W&&X>e.height&&(he=O-X);const Te=this._editor.getDomNode();if(Te){const Be=Te.getBoundingClientRect();he-=Be.top,we-=Be.left}this._applyTopLeft({left:we,top:he}),this._resizable.enableSashes(!W,P===y,W,P!==y),this._resizable.minSize=P.minSize,this._resizable.maxSize=ee,this._resizable.layout(X,Math.min(ee.width,i.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this._editor.layoutOverlayWidget(this)}}var iL;(function(c){c[c.FILE=0]="FILE",c[c.FOLDER=1]="FOLDER",c[c.ROOT_FOLDER=2]="ROOT_FOLDER"})(iL||(iL={}));const qDi=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function xme(c,e,i,n,s){if(Uo.isThemeIcon(s))return[`codicon-${s.id}`,"predefined-file-icon"];if(Oo.isUri(s))return[];const l=n===iL.ROOT_FOLDER?["rootfolder-icon"]:n===iL.FOLDER?["folder-icon"]:["file-icon"];if(i){let d;if(i.scheme===wa.data)d=oR.parseMetaData(i).get(oR.META_DATA_LABEL);else{const f=i.path.match(qDi);f?(d=kme(f[2].toLowerCase()),f[1]&&l.push(`${kme(f[1].toLowerCase())}-name-dir-icon`)):d=kme(i.authority.toLowerCase())}if(n===iL.ROOT_FOLDER)l.push(`${d}-root-name-folder-icon`);else if(n===iL.FOLDER)l.push(`${d}-name-folder-icon`);else{if(d){if(l.push(`${d}-name-file-icon`),l.push("name-file-icon"),d.length<=255){const g=d.split(".");for(let y=1;y=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},gFe=function(c,e){return function(i,n){e(i,n,c)}},ZO;function tDt(c){return`suggest-aria-id:${c}`}const GDi=Oh("suggest-more-info",Dr.chevronRight,V("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),KDi=new(ZO=class{extract(e,i){if(e.textLabel.match(ZO._regexStrict))return i[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(ZO._regexStrict))return i[0]=e.completion.detail,!0;if(e.completion.documentation){const n=typeof e.completion.documentation=="string"?e.completion.documentation:e.completion.documentation.value,s=ZO._regexRelaxed.exec(n);if(s&&(s.index===0||s.index+s[0].length===n.length))return i[0]=s[0],!0}return!1}},ZO._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,ZO._regexStrict=new RegExp(`^${ZO._regexRelaxed.source}$`,"i"),ZO);let fVe=class{constructor(e,i,n,s){this._editor=e,this._modelService=i,this._languageService=n,this._themeService=s,this._onDidToggleDetails=new ui,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const i=new On,n=e;n.classList.add("show-file-icons");const s=zn(e,Sr(".icon")),l=zn(s,Sr("span.colorspan")),d=zn(e,Sr(".contents")),f=zn(d,Sr(".main")),g=zn(f,Sr(".icon-label.codicon")),y=zn(f,Sr("span.left")),w=zn(f,Sr("span.right")),x=new zve(y,{supportHighlights:!0,supportIcons:!0});i.add(x);const I=zn(y,Sr("span.signature-label")),P=zn(y,Sr("span.qualifier-label")),O=zn(w,Sr("span.details-label")),W=zn(w,Sr("span.readMore"+Uo.asCSSSelector(GDi)));return W.title=V("readMore","Read More"),{root:n,left:y,right:w,icon:s,colorspan:l,iconLabel:x,iconContainer:g,parametersLabel:I,qualifierLabel:P,detailsLabel:O,readMore:W,disposables:i,configureFont:()=>{const Z=this._editor.getOptions(),ee=Z.get(50),he=ee.getMassagedFontFamily(),we=ee.fontFeatureSettings,Te=Z.get(119)||ee.fontSize,Be=Z.get(120)||ee.lineHeight,Me=ee.fontWeight,vt=ee.letterSpacing,Nt=`${Te}px`,Ni=`${Be}px`,ci=`${vt}px`;n.style.fontSize=Nt,n.style.fontWeight=Me,n.style.letterSpacing=ci,f.style.fontFamily=he,f.style.fontFeatureSettings=we,f.style.lineHeight=Ni,s.style.height=Ni,s.style.width=Ni,W.style.height=Ni,W.style.width=Ni}}}renderElement(e,i,n){n.configureFont();const{completion:s}=e;n.root.id=tDt(i),n.colorspan.style.backgroundColor="";const l={labelEscapeNewLines:!0,matches:Rne(e.score)},d=[];if(s.kind===19&&KDi.extract(e,d))n.icon.className="icon customcolor",n.iconContainer.className="icon hide",n.colorspan.style.backgroundColor=d[0];else if(s.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){n.icon.className="icon hide",n.iconContainer.className="icon hide";const f=xme(this._modelService,this._languageService,Oo.from({scheme:"fake",path:e.textLabel}),iL.FILE),g=xme(this._modelService,this._languageService,Oo.from({scheme:"fake",path:s.detail}),iL.FILE);l.extraClasses=f.length>g.length?f:g}else s.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(n.icon.className="icon hide",n.iconContainer.className="icon hide",l.extraClasses=[xme(this._modelService,this._languageService,Oo.from({scheme:"fake",path:e.textLabel}),iL.FOLDER),xme(this._modelService,this._languageService,Oo.from({scheme:"fake",path:s.detail}),iL.FOLDER)].flat()):(n.icon.className="icon hide",n.iconContainer.className="",n.iconContainer.classList.add("suggest-icon",...Uo.asClassNameArray(Ate.toIcon(s.kind))));s.tags&&s.tags.indexOf(1)>=0&&(l.extraClasses=(l.extraClasses||[]).concat(["deprecated"]),l.matches=[]),n.iconLabel.setLabel(e.textLabel,void 0,l),typeof s.label=="string"?(n.parametersLabel.textContent="",n.detailsLabel.textContent=mFe(s.detail||""),n.root.classList.add("string-label")):(n.parametersLabel.textContent=mFe(s.label.detail||""),n.detailsLabel.textContent=mFe(s.label.description||""),n.root.classList.remove("string-label")),this._editor.getOption(118).showInlineDetails?RC(n.detailsLabel):_y(n.detailsLabel),bUe(e)?(n.right.classList.add("can-expand-details"),RC(n.readMore),n.readMore.onmousedown=f=>{f.stopPropagation(),f.preventDefault()},n.readMore.onclick=f=>{f.stopPropagation(),f.preventDefault(),this._onDidToggleDetails.fire()}):(n.right.classList.remove("can-expand-details"),_y(n.readMore),n.readMore.onmousedown=null,n.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};fVe=JDi([gFe(1,Qf),gFe(2,If),gFe(3,og)],fVe);function mFe(c){return c.replace(/\r\n|\r|\n/g,"")}var QDi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Tme=function(c,e){return function(i,n){e(i,n,c)}},zz;Ft("editorSuggestWidget.background",{dark:I_,light:I_,hcDark:I_,hcLight:I_},V("editorSuggestWidgetBackground","Background color of the suggest widget."));Ft("editorSuggestWidget.border",{dark:S4,light:S4,hcDark:S4,hcLight:S4},V("editorSuggestWidgetBorder","Border color of the suggest widget."));const Dme=Ft("editorSuggestWidget.foreground",{dark:tk,light:tk,hcDark:tk,hcLight:tk},V("editorSuggestWidgetForeground","Foreground color of the suggest widget."));Ft("editorSuggestWidget.selectedForeground",{dark:kM,light:kM,hcDark:kM,hcLight:kM},V("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget."));Ft("editorSuggestWidget.selectedIconForeground",{dark:nU,light:nU,hcDark:nU,hcLight:nU},V("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));const XDi=Ft("editorSuggestWidget.selectedBackground",{dark:TM,light:TM,hcDark:TM,hcLight:TM},V("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));Ft("editorSuggestWidget.highlightForeground",{dark:lT,light:lT,hcDark:lT,hcLight:lT},V("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget."));Ft("editorSuggestWidget.focusHighlightForeground",{dark:xge,light:xge,hcDark:xge,hcLight:xge},V("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));Ft("editorSuggestWidgetStatus.foreground",{dark:yo(Dme,.5),light:yo(Dme,.5),hcDark:yo(Dme,.5),hcLight:yo(Dme,.5)},V("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));class ZDi{constructor(e,i){this._service=e,this._key=`suggestWidget.size/${i.getEditorType()}/${i instanceof pR}`}restore(){var e;const i=(e=this._service.get(this._key,0))!==null&&e!==void 0?e:"";try{const n=JSON.parse(i);if(eu.is(n))return eu.lift(n)}catch{}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let Zie=zz=class{constructor(e,i,n,s,l){this.editor=e,this._storageService=i,this._state=0,this._isAuto=!1,this._pendingLayout=new jg,this._pendingShowDetails=new jg,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new gT,this._disposables=new On,this._onDidSelect=new _9,this._onDidFocus=new _9,this._onDidHide=new ui,this._onDidShow=new ui,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new ui,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new nUe,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new YDi(this,e),this._persistedSize=new ZDi(i,e);class d{constructor(P,O,W=!1,X=!1){this.persistedSize=P,this.currentSize=O,this.persistHeight=W,this.persistWidth=X}}let f;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),f=new d(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(I=>{var P,O,W,X;if(this._resize(I.dimension.width,I.dimension.height),f&&(f.persistHeight=f.persistHeight||!!I.north||!!I.south,f.persistWidth=f.persistWidth||!!I.east||!!I.west),!!I.done){if(f){const{itemHeight:Z,defaultSize:ee}=this.getLayoutInfo(),he=Math.round(Z/2);let{width:we,height:Te}=this.element.size;(!f.persistHeight||Math.abs(f.currentSize.height-Te)<=he)&&(Te=(O=(P=f.persistedSize)===null||P===void 0?void 0:P.height)!==null&&O!==void 0?O:ee.height),(!f.persistWidth||Math.abs(f.currentSize.width-we)<=he)&&(we=(X=(W=f.persistedSize)===null||W===void 0?void 0:W.width)!==null&&X!==void 0?X:ee.width),this._persistedSize.store(new eu(we,Te))}this._contentWidget.unlockPreference(),f=void 0}})),this._messageElement=zn(this.element.domNode,Sr(".message")),this._listElement=zn(this.element.domNode,Sr(".tree"));const g=this._disposables.add(l.createInstance(dVe,this.editor));g.onDidClose(this.toggleDetails,this,this._disposables),this._details=new UDi(g,this.editor);const y=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(118).showIcons);y();const w=l.createInstance(fVe,this.editor);this._disposables.add(w),this._disposables.add(w.onDidToggleDetails(()=>this.toggleDetails())),this._list=new Iw("SuggestWidget",this._listElement,{getHeight:I=>this.getLayoutInfo().itemHeight,getTemplateId:I=>"suggestion"},[w],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>V("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:I=>{let P=I.textLabel;if(typeof I.completion.label!="string"){const{detail:Z,description:ee}=I.completion.label;Z&&ee?P=V("label.full","{0} {1}, {2}",P,Z,ee):Z?P=V("label.detail","{0} {1}",P,Z):ee&&(P=V("label.desc","{0}, {1}",P,ee))}if(!I.isResolved||!this._isDetailsVisible())return P;const{documentation:O,detail:W}=I.completion,X=p9("{0}{1}",W||"",O?typeof O=="string"?O:O.value:"");return V("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",P,X)}}}),this._list.style(nB({listInactiveFocusBackground:XDi,listInactiveFocusOutline:bf})),this._status=l.createInstance(uVe,this.element.domNode,JM);const x=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(118).showStatusBar);x(),this._disposables.add(s.onDidColorThemeChange(I=>this._onThemeChange(I))),this._onThemeChange(s.getColorTheme()),this._disposables.add(this._list.onMouseDown(I=>this._onListMouseDownOrTap(I))),this._disposables.add(this._list.onTap(I=>this._onListMouseDownOrTap(I))),this._disposables.add(this._list.onDidChangeSelection(I=>this._onListSelection(I))),this._disposables.add(this._list.onDidChangeFocus(I=>this._onListFocus(I))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(I=>{I.hasChanged(118)&&(x(),y()),this._completionModel&&(I.hasChanged(50)||I.hasChanged(119)||I.hasChanged(120))&&this._list.splice(0,this._list.length,this._completionModel.items)})),this._ctxSuggestWidgetVisible=bl.Visible.bindTo(n),this._ctxSuggestWidgetDetailsVisible=bl.DetailsVisible.bindTo(n),this._ctxSuggestWidgetMultipleSuggestions=bl.MultipleSuggestions.bindTo(n),this._ctxSuggestWidgetHasFocusedSuggestion=bl.HasFocusedSuggestion.bindTo(n),this._disposables.add(n_(this._details.widget.domNode,"keydown",I=>{this._onDetailsKeydown.fire(I)})),this._disposables.add(this.editor.onMouseDown(I=>this._onEditorMouseDown(I)))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(e){typeof e.element>"u"||typeof e.index>"u"||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,i){const n=this._completionModel;n&&(this._onDidSelect.fire({item:e,index:i,model:n}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=SE(e.type)?2:1}_onListFocus(e){var i;if(this._ignoreFocusEvents)return;if(!e.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const n=e.elements[0],s=e.indexes[0];n!==this._focusedItem&&((i=this._currentSuggestionDetails)===null||i===void 0||i.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=n,this._list.reveal(s),this._currentSuggestionDetails=Hg(async l=>{const d=tR(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),f=l.onCancellationRequested(()=>d.dispose());try{return await n.resolve(l)}finally{d.dispose(),f.dispose()}}),this._currentSuggestionDetails.then(()=>{s>=this._list.length||n!==this._list.element(s)||(this._ignoreFocusEvents=!0,this._list.splice(s,1,[n]),this._list.setFocus([s]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:tDt(s)}))}).catch(Ba)),this._onDidFocus.fire({item:n,index:s,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",e===4),this.element.domNode.classList.remove("message"),e){case 0:_y(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=zz.LOADING_MESSAGE,_y(this._listElement,this._status.element),RC(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,hL(zz.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=zz.NO_SUGGESTIONS_MESSAGE,_y(this._listElement,this._status.element),RC(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,hL(zz.NO_SUGGESTIONS_MESSAGE);break;case 3:_y(this._messageElement),RC(this._listElement,this._status.element),this._show();break;case 4:_y(this._messageElement),RC(this._listElement,this._status.element),this._show();break;case 5:_y(this._messageElement),RC(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(e,i){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=tR(()=>this._setState(1),i)))}showSuggestions(e,i,n,s,l){var d,f;if(this._contentWidget.setPosition(this.editor.getPosition()),(d=this._loadingTimeout)===null||d===void 0||d.dispose(),(f=this._currentSuggestionDetails)===null||f===void 0||f.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),n&&this._state!==2&&this._state!==0){this._setState(4);return}const g=this._completionModel.items.length,y=g===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(g>1),y){this._setState(s?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(n?4:3),this._list.reveal(i,0),this._list.setFocus(l?[]:[i])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=W0e(Io(this.element.domNode),()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")})}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(bUe(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=W0e(Io(this.element.domNode),()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._details.widget.isEmpty?this._details.hide():(this._positionDetails(),this.element.domNode.classList.add("shows-details")),this.editor.focus()})}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;this._pendingLayout.clear(),this._pendingShowDetails.clear(),(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const i=this._persistedSize.restore(),n=Math.ceil(this.getLayoutInfo().itemHeight*4.3);i&&i.heighty&&(g=y);const w=this._completionModel?this._completionModel.stats.pLabelLen*d.typicalHalfwidthCharacterWidth:g,x=d.statusBarHeight+this._list.contentHeight+d.borderHeight,I=d.itemHeight+d.statusBarHeight,P=Y_(this.editor.getDomNode()),O=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),W=P.top+O.top+O.height,X=Math.min(l.height-W-d.verticalPadding,x),Z=P.top+O.top-d.verticalPadding,ee=Math.min(Z,x);let he=Math.min(Math.max(ee,X)+d.borderHeight,x);f===((i=this._cappedHeight)===null||i===void 0?void 0:i.capped)&&(f=this._cappedHeight.wanted),fhe&&(f=he),f>X||this._forceRenderingAbove&&Z>150?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),he=ee):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),he=X),this.element.preferredSize=new eu(w,d.defaultSize.height),this.element.maxSize=new eu(y,he),this.element.minSize=new eu(220,I),this._cappedHeight=f===x?{wanted:(s=(n=this._cappedHeight)===null||n===void 0?void 0:n.wanted)!==null&&s!==void 0?s:e.height,capped:f}:void 0}this._resize(g,f)}_resize(e,i){const{width:n,height:s}=this.element.maxSize;e=Math.min(n,e),i=Math.min(s,i);const{statusBarHeight:l}=this.getLayoutInfo();this._list.layout(i-l,e),this._listElement.style.height=`${i-l}px`,this.element.layout(i,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,((e=this._contentWidget.getPosition())===null||e===void 0?void 0:e.preference[0])===2)}getLayoutInfo(){const e=this.editor.getOption(50),i=fy(this.editor.getOption(120)||e.lineHeight,8,1e3),n=!this.editor.getOption(118).showStatusBar||this._state===2||this._state===1?0:i,s=this._details.widget.borderWidth,l=2*s;return{itemHeight:i,statusBarHeight:n,borderWidth:s,borderHeight:l,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new eu(430,n+12*i+l)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};Zie.LOADING_MESSAGE=V("suggestWidget.loading","Loading...");Zie.NO_SUGGESTIONS_MESSAGE=V("suggestWidget.noSuggestions","No suggestions.");Zie=zz=QDi([Tme(1,mT),Tme(2,Zo),Tme(3,og),Tme(4,So)],Zie);class YDi{constructor(e,i){this._widget=e,this._editor=i,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:e,width:i}=this._widget.element.size,{borderWidth:n,horizontalPadding:s}=this._widget.getLayoutInfo();return new eu(i+2*n+s,e+2*n)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}var eEi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Pz=function(c,e){return function(i,n){e(i,n,c)}},hVe;class tEi{constructor(e,i){if(this._model=e,this._position=i,this._decorationOptions=Xa.register({description:"suggest-line-suffix",stickiness:1}),e.getLineMaxColumn(i.lineNumber)!==i.column){const s=e.getOffsetAt(i),l=e.getPositionAt(s+1);e.changeDecorations(d=>{this._marker&&d.removeDecoration(this._marker),this._marker=d.addDecoration(at.fromPositions(i,l),this._decorationOptions)})}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.changeDecorations(e=>{e.removeDecoration(this._marker),this._marker=void 0})}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const i=this._model.getDecorationRange(this._marker);return this._model.getOffsetAt(i.getStartPosition())-this._model.getOffsetAt(e)}else return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let cT=hVe=class{static get(e){return e.getContribution(hVe.ID)}constructor(e,i,n,s,l,d,f){this._memoryService=i,this._commandService=n,this._contextKeyService=s,this._instantiationService=l,this._logService=d,this._telemetryService=f,this._lineSuffix=new jg,this._toDispose=new On,this._selectors=new iEi(x=>x.priority),this._onWillInsertSuggestItem=new ui,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=l.createInstance(w1e,this.editor),this._selectors.register({priority:0,select:(x,I,P)=>this._memoryService.select(x,I,P)});const g=bl.InsertMode.bindTo(s);g.set(e.getOption(118).insertMode),this._toDispose.add(this.model.onDidTrigger(()=>g.set(e.getOption(118).insertMode))),this.widget=this._toDispose.add(new A8e(Io(e.getDomNode()),()=>{const x=this._instantiationService.createInstance(Zie,this.editor);this._toDispose.add(x),this._toDispose.add(x.onDidSelect(X=>this._insertSuggestion(X,0),this));const I=new RDi(this.editor,x,this.model,X=>this._insertSuggestion(X,2));this._toDispose.add(I);const P=bl.MakesTextEdit.bindTo(this._contextKeyService),O=bl.HasInsertAndReplaceRange.bindTo(this._contextKeyService),W=bl.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(go(()=>{P.reset(),O.reset(),W.reset()})),this._toDispose.add(x.onDidFocus(({item:X})=>{const Z=this.editor.getPosition(),ee=X.editStart.column,he=Z.column;let we=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!X.completion.additionalTextEdits&&!(X.completion.insertTextRules&4)&&he-ee===X.completion.insertText.length&&(we=this.editor.getModel().getValueInRange({startLineNumber:Z.lineNumber,startColumn:ee,endLineNumber:Z.lineNumber,endColumn:he})!==X.completion.insertText),P.set(we),O.set(!yi.equals(X.editInsertEnd,X.editReplaceEnd)),W.set(!!X.provider.resolveCompletionItem||!!X.completion.documentation||X.completion.detail!==X.completion.label)})),this._toDispose.add(x.onDetailsKeyDown(X=>{if(X.toKeyCodeChord().equals(new $4(!0,!1,!1,!1,33))||Wl&&X.toKeyCodeChord().equals(new $4(!1,!1,!1,!0,33))){X.stopPropagation();return}X.toKeyCodeChord().isModifierKey()||this.editor.focus()})),x})),this._overtypingCapturer=this._toDispose.add(new A8e(Io(e.getDomNode()),()=>this._toDispose.add(new kbe(this.editor,this.model)))),this._alternatives=this._toDispose.add(new A8e(Io(e.getDomNode()),()=>this._toDispose.add(new V9(this.editor,this._contextKeyService)))),this._toDispose.add(l.createInstance(Xie,e)),this._toDispose.add(this.model.onDidTrigger(x=>{this.widget.value.showTriggered(x.auto,x.shy?250:50),this._lineSuffix.value=new tEi(this.editor.getModel(),x.position)})),this._toDispose.add(this.model.onDidSuggest(x=>{if(x.triggerOptions.shy)return;let I=-1;for(const O of this._selectors.itemsOrderedByPriorityDesc)if(I=O.select(this.editor.getModel(),this.editor.getPosition(),x.completionModel.items),I!==-1)break;if(I===-1&&(I=0),this.model.state===0)return;let P=!1;if(x.triggerOptions.auto){const O=this.editor.getOption(118);O.selectionMode==="never"||O.selectionMode==="always"?P=O.selectionMode==="never":O.selectionMode==="whenTriggerCharacter"?P=x.triggerOptions.triggerKind!==1:O.selectionMode==="whenQuickSuggestion"&&(P=x.triggerOptions.triggerKind===1&&!x.triggerOptions.refilter)}this.widget.value.showSuggestions(x.completionModel,I,x.isFrozen,x.triggerOptions.auto,P)})),this._toDispose.add(this.model.onDidCancel(x=>{x.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{this.model.cancel(),this.model.clear()}));const y=bl.AcceptSuggestionsOnEnter.bindTo(s),w=()=>{const x=this.editor.getOption(1);y.set(x==="on"||x==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>w())),w()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(e,i){if(!e||!e.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const n=a0.get(this.editor);if(!n)return;this._onWillInsertSuggestItem.fire({item:e.item});const s=this.editor.getModel(),l=s.getAlternativeVersionId(),{item:d}=e,f=[],g=new uh;i&1||this.editor.pushUndoStop();const y=this.getOverwriteInfo(d,!!(i&8));this._memoryService.memorize(s,this.editor.getPosition(),d);const w=d.isResolved;let x=-1,I=-1;if(Array.isArray(d.completion.additionalTextEdits)){this.model.cancel();const O=ME.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",d.completion.additionalTextEdits.map(W=>{let X=at.lift(W.range);if(X.startLineNumber===d.position.lineNumber&&X.startColumn>d.position.column){const Z=this.editor.getPosition().column-d.position.column,ee=Z,he=at.spansMultipleLines(X)?0:Z;X=new at(X.startLineNumber,X.startColumn+ee,X.endLineNumber,X.endColumn+he)}return Kf.replaceMove(X,W.text)})),O.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!w){const O=new o0;let W;const X=s.onDidChangeContent(we=>{if(we.isFlush){g.cancel(),X.dispose();return}for(const Te of we.changes){const Be=at.getEndPosition(Te.range);(!W||yi.isBefore(Be,W))&&(W=Be)}}),Z=i;i|=2;let ee=!1;const he=this.editor.onWillType(()=>{he.dispose(),ee=!0,Z&2||this.editor.pushUndoStop()});f.push(d.resolve(g.token).then(()=>{if(!d.completion.additionalTextEdits||g.token.isCancellationRequested)return;if(W&&d.completion.additionalTextEdits.some(Te=>yi.isBefore(W,at.getStartPosition(Te.range))))return!1;ee&&this.editor.pushUndoStop();const we=ME.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",d.completion.additionalTextEdits.map(Te=>Kf.replaceMove(at.lift(Te.range),Te.text))),we.restoreRelativeVerticalPositionOfCursor(this.editor),(ee||!(Z&2))&&this.editor.pushUndoStop(),!0}).then(we=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",O.elapsed(),we),I=we===!0?1:we===!1?0:-2}).finally(()=>{X.dispose(),he.dispose()}))}let{insertText:P}=d.completion;if(d.completion.insertTextRules&4||(P=P9.escape(P)),this.model.cancel(),n.insert(P,{overwriteBefore:y.overwriteBefore,overwriteAfter:y.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(d.completion.insertTextRules&1),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),i&2||this.editor.pushUndoStop(),d.completion.command)if(d.completion.command.id===ore.id)this.model.trigger({auto:!0,retrigger:!0});else{const O=new o0;f.push(this._commandService.executeCommand(d.completion.command.id,...d.completion.command.arguments?[...d.completion.command.arguments]:[]).catch(W=>{d.completion.extensionId?r_(W):Ba(W)}).finally(()=>{x=O.elapsed()}))}i&4&&this._alternatives.value.set(e,O=>{for(g.cancel();s.canUndo();){l!==s.getAlternativeVersionId()&&s.undo(),this._insertSuggestion(O,3|(i&8?8:0));break}}),this._alertCompletionItem(d),Promise.all(f).finally(()=>{this._reportSuggestionAcceptedTelemetry(d,s,w,x,I),this.model.clear(),g.dispose()})}_reportSuggestionAcceptedTelemetry(e,i,n,s,l){var d,f,g;Math.floor(Math.random()*100)!==0&&this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:(f=(d=e.extensionId)===null||d===void 0?void 0:d.value)!==null&&f!==void 0?f:"unknown",providerId:(g=e.provider._debugDisplayName)!==null&&g!==void 0?g:"unknown",kind:e.completion.kind,basenameHash:R1e(lk(i.uri)).toString(16),languageId:i.getLanguageId(),fileExtension:Gfi(i.uri),resolveInfo:e.provider.resolveCompletionItem?n?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:s,additionalEditsAsync:l})}getOverwriteInfo(e,i){Ac(this.editor.hasModel());let n=this.editor.getOption(118).insertMode==="replace";i&&(n=!n);const s=e.position.column-e.editStart.column,l=(n?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,d=this.editor.getPosition().column-e.position.column,f=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:s+d,overwriteAfter:l+f}}_alertCompletionItem(e){if(bv(e.completion.additionalTextEdits)){const i=V("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);Eb(i)}}triggerSuggest(e,i,n){this.editor.hasModel()&&(this.model.trigger({auto:i??!1,completionOptions:{providerFilter:e,kindFilter:n?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const i=this.editor.getPosition(),n=()=>{i.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},s=l=>{if(l.completion.insertTextRules&4||l.completion.additionalTextEdits)return!0;const d=this.editor.getPosition(),f=l.editStart.column,g=d.column;return g-f!==l.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:d.lineNumber,startColumn:f,endLineNumber:d.lineNumber,endColumn:g})!==l.completion.insertText};Mr.once(this.model.onDidTrigger)(l=>{const d=[];Mr.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{yd(d),n()},void 0,d),this.model.onDidSuggest(({completionModel:f})=>{if(yd(d),f.items.length===0){n();return}const g=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),f.items),y=f.items[g];if(!s(y)){n();return}this.editor.pushUndoStop(),this._insertSuggestion({index:g,item:y,model:f},7)},void 0,d)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(i,0),this.editor.focus()}acceptSelectedSuggestion(e,i){const n=this.widget.value.getFocusedItem();let s=0;e&&(s|=4),i&&(s|=8),this._insertSuggestion(n,s)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};cT.ID="editor.contrib.suggestController";cT=hVe=eEi([Pz(1,xbe),Pz(2,ff),Pz(3,Zo),Pz(4,So),Pz(5,Sv),Pz(6,R0)],cT);class iEi{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(this._items.indexOf(e)!==-1)throw new Error("Value is already registered");return this._items.push(e),this._items.sort((i,n)=>this.prioritySelector(n)-this.prioritySelector(i)),{dispose:()=>{const i=this._items.indexOf(e);i>=0&&this._items.splice(i,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class ore extends ms{constructor(){super({id:ore.id,label:V("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:xn.and(Lt.writable,Lt.hasCompletionItemProvider,bl.Visible.toNegated()),kbOpts:{kbExpr:Lt.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,i,n){const s=cT.get(i);if(!s)return;let l;n&&typeof n=="object"&&n.auto===!0&&(l=!0),s.triggerSuggest(void 0,l,void 0)}}ore.id="editor.action.triggerSuggest";Bc(cT.ID,cT,2);hr(ore);const kw=190,Oy=sg.bindToContribution(cT.get);qr(new Oy({id:"acceptSelectedSuggestion",precondition:xn.and(bl.Visible,bl.HasFocusedSuggestion),handler(c){c.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:xn.and(bl.Visible,Lt.textInputFocus),weight:kw},{primary:3,kbExpr:xn.and(bl.Visible,Lt.textInputFocus,bl.AcceptSuggestionsOnEnter,bl.MakesTextEdit),weight:kw}],menuOpts:[{menuId:JM,title:V("accept.insert","Insert"),group:"left",order:1,when:bl.HasInsertAndReplaceRange.toNegated()},{menuId:JM,title:V("accept.insert","Insert"),group:"left",order:1,when:xn.and(bl.HasInsertAndReplaceRange,bl.InsertMode.isEqualTo("insert"))},{menuId:JM,title:V("accept.replace","Replace"),group:"left",order:1,when:xn.and(bl.HasInsertAndReplaceRange,bl.InsertMode.isEqualTo("replace"))}]}));qr(new Oy({id:"acceptAlternativeSelectedSuggestion",precondition:xn.and(bl.Visible,Lt.textInputFocus,bl.HasFocusedSuggestion),kbOpts:{weight:kw,kbExpr:Lt.textInputFocus,primary:1027,secondary:[1026]},handler(c){c.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:JM,group:"left",order:2,when:xn.and(bl.HasInsertAndReplaceRange,bl.InsertMode.isEqualTo("insert")),title:V("accept.replace","Replace")},{menuId:JM,group:"left",order:2,when:xn.and(bl.HasInsertAndReplaceRange,bl.InsertMode.isEqualTo("replace")),title:V("accept.insert","Insert")}]}));uc.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");qr(new Oy({id:"hideSuggestWidget",precondition:bl.Visible,handler:c=>c.cancelSuggestWidget(),kbOpts:{weight:kw,kbExpr:Lt.textInputFocus,primary:9,secondary:[1033]}}));qr(new Oy({id:"selectNextSuggestion",precondition:xn.and(bl.Visible,xn.or(bl.MultipleSuggestions,bl.HasFocusedSuggestion.negate())),handler:c=>c.selectNextSuggestion(),kbOpts:{weight:kw,kbExpr:Lt.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}}));qr(new Oy({id:"selectNextPageSuggestion",precondition:xn.and(bl.Visible,xn.or(bl.MultipleSuggestions,bl.HasFocusedSuggestion.negate())),handler:c=>c.selectNextPageSuggestion(),kbOpts:{weight:kw,kbExpr:Lt.textInputFocus,primary:12,secondary:[2060]}}));qr(new Oy({id:"selectLastSuggestion",precondition:xn.and(bl.Visible,xn.or(bl.MultipleSuggestions,bl.HasFocusedSuggestion.negate())),handler:c=>c.selectLastSuggestion()}));qr(new Oy({id:"selectPrevSuggestion",precondition:xn.and(bl.Visible,xn.or(bl.MultipleSuggestions,bl.HasFocusedSuggestion.negate())),handler:c=>c.selectPrevSuggestion(),kbOpts:{weight:kw,kbExpr:Lt.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}}));qr(new Oy({id:"selectPrevPageSuggestion",precondition:xn.and(bl.Visible,xn.or(bl.MultipleSuggestions,bl.HasFocusedSuggestion.negate())),handler:c=>c.selectPrevPageSuggestion(),kbOpts:{weight:kw,kbExpr:Lt.textInputFocus,primary:11,secondary:[2059]}}));qr(new Oy({id:"selectFirstSuggestion",precondition:xn.and(bl.Visible,xn.or(bl.MultipleSuggestions,bl.HasFocusedSuggestion.negate())),handler:c=>c.selectFirstSuggestion()}));qr(new Oy({id:"focusSuggestion",precondition:xn.and(bl.Visible,bl.HasFocusedSuggestion.negate()),handler:c=>c.focusSuggestion(),kbOpts:{weight:kw,kbExpr:Lt.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}}));qr(new Oy({id:"focusAndAcceptSuggestion",precondition:xn.and(bl.Visible,bl.HasFocusedSuggestion.negate()),handler:c=>{c.focusSuggestion(),c.acceptSelectedSuggestion(!0,!1)}}));qr(new Oy({id:"toggleSuggestionDetails",precondition:xn.and(bl.Visible,bl.HasFocusedSuggestion),handler:c=>c.toggleSuggestionDetails(),kbOpts:{weight:kw,kbExpr:Lt.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:JM,group:"right",order:1,when:xn.and(bl.DetailsVisible,bl.CanResolve),title:V("detail.more","show less")},{menuId:JM,group:"right",order:1,when:xn.and(bl.DetailsVisible.toNegated(),bl.CanResolve),title:V("detail.less","show more")}]}));qr(new Oy({id:"toggleExplainMode",precondition:bl.Visible,handler:c=>c.toggleExplainMode(),kbOpts:{weight:100,primary:2138}}));qr(new Oy({id:"toggleSuggestionFocus",precondition:bl.Visible,handler:c=>c.toggleSuggestionFocus(),kbOpts:{weight:kw,kbExpr:Lt.textInputFocus,primary:2570,mac:{primary:778}}}));qr(new Oy({id:"insertBestCompletion",precondition:xn.and(Lt.textInputFocus,xn.equals("config.editor.tabCompletion","on"),Xie.AtEnd,bl.Visible.toNegated(),V9.OtherSuggestions.toNegated(),a0.InSnippetMode.toNegated()),handler:(c,e)=>{c.triggerSuggestAndAcceptBest(vy(e)?{fallback:"tab",...e}:{fallback:"tab"})},kbOpts:{weight:kw,primary:2}}));qr(new Oy({id:"insertNextSuggestion",precondition:xn.and(Lt.textInputFocus,xn.equals("config.editor.tabCompletion","on"),V9.OtherSuggestions,bl.Visible.toNegated(),a0.InSnippetMode.toNegated()),handler:c=>c.acceptNextSuggestion(),kbOpts:{weight:kw,kbExpr:Lt.textInputFocus,primary:2}}));qr(new Oy({id:"insertPrevSuggestion",precondition:xn.and(Lt.textInputFocus,xn.equals("config.editor.tabCompletion","on"),V9.OtherSuggestions,bl.Visible.toNegated(),a0.InSnippetMode.toNegated()),handler:c=>c.acceptPrevSuggestion(),kbOpts:{weight:kw,kbExpr:Lt.textInputFocus,primary:1026}}));hr(class extends ms{constructor(){super({id:"editor.action.resetSuggestSize",label:V("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(c,e){var i;(i=cT.get(e))===null||i===void 0||i.resetWidgetSize()}});class nEi extends Ii{get selectedItem(){return this._selectedItem}constructor(e,i,n,s){super(),this.editor=e,this.suggestControllerPreselector=i,this.checkModelVersion=n,this.onWillAccept=s,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._selectedItem=yc(this,void 0),this._register(e.onKeyDown(d=>{d.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(d=>{d.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const l=cT.get(this.editor);if(l){this._register(l.registerSelector({priority:100,select:(g,y,w)=>{Rd(Z=>this.checkModelVersion(Z));const x=this.editor.getModel();if(!x)return-1;const I=this.suggestControllerPreselector(),P=I?f9(I,x):void 0;if(!P)return-1;const O=yi.lift(y),W=w.map((Z,ee)=>{const he=wte.fromSuggestion(l,x,O,Z,this.isShiftKeyPressed),we=f9(he.toSingleTextEdit(),x),Te=ZTt(P,we);return{index:ee,valid:Te,prefixLength:we.text.length,suggestItem:Z}}).filter(Z=>Z&&Z.valid&&Z.prefixLength>0),X=QHe(W,kb(Z=>Z.prefixLength,uT));return X?X.index:-1}}));let d=!1;const f=()=>{d||(d=!0,this._register(l.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(l.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(l.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(Mr.once(l.model.onDidTrigger)(g=>{f()})),this._register(l.onWillInsertSuggestItem(g=>{const y=this.editor.getPosition(),w=this.editor.getModel();if(!y||!w)return;const x=wte.fromSuggestion(l,w,y,g.item,this.isShiftKeyPressed);this.onWillAccept(x)}))}this.update(this._isActive)}update(e){const i=this.getSuggestItemInfo();(this._isActive!==e||!rEi(this._currentSuggestItemInfo,i))&&(this._isActive=e,this._currentSuggestItemInfo=i,Rd(n=>{this.checkModelVersion(n),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,n)}))}getSuggestItemInfo(){const e=cT.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const i=e.widget.value.getFocusedItem(),n=this.editor.getPosition(),s=this.editor.getModel();if(!(!i||!n||!s))return wte.fromSuggestion(e,s,n,i.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){const e=cT.get(this.editor);e==null||e.stopForceRenderingAbove()}forceRenderingAbove(){const e=cT.get(this.editor);e==null||e.forceRenderingAbove()}}class wte{static fromSuggestion(e,i,n,s,l){let{insertText:d}=s.completion,f=!1;if(s.completion.insertTextRules&4){const y=new P9().parse(d);y.children.length<100&&S1e.adjustWhitespace(i,n,!0,y),d=y.toString(),f=!0}const g=e.getOverwriteInfo(s,l);return new wte(at.fromPositions(n.delta(0,-g.overwriteBefore),n.delta(0,Math.max(g.overwriteAfter,0))),d,s.completion.kind,f)}constructor(e,i,n,s){this.range=e,this.insertText=i,this.completionItemKind=n,this.isSnippetText=s}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new Ubt(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new K4(this.range,this.insertText)}}function rEi(c,e){return c===e?!0:!c||!e?!1:c.equals(e)}var sEi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},YA=function(c,e){return function(i,n){e(i,n,c)}},_Ve;let Tw=_Ve=class extends Ii{static get(e){return e.getContribution(_Ve.ID)}constructor(e,i,n,s,l,d,f,g,y,w){super(),this.editor=e,this._instantiationService=i,this._contextKeyService=n,this._configurationService=s,this._commandService=l,this._debounceService=d,this._languageFeaturesService=f,this._accessibilitySignalService=g,this._keybindingService=y,this._accessibilityService=w,this.model=this._register(yie("inlineCompletionModel",void 0)),this._textModelVersionId=yc(this,-1),this._positions=Qmi({owner:this,equalsFn:uBe(lxt())},[new yi(1,1)]),this._suggestWidgetAdaptor=this._register(new nEi(this.editor,()=>{var W,X;return(X=(W=this.model.get())===null||W===void 0?void 0:W.selectedInlineCompletion.get())===null||X===void 0?void 0:X.toSingleTextEdit(void 0)},W=>this.updateObservables(W,sw.Other),W=>{Rd(X=>{var Z;this.updateObservables(X,sw.Other),(Z=this.model.get())===null||Z===void 0||Z.handleSuggestAccepted(W)})})),this._enabledInConfig=Zu(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).enabled),this._isScreenReaderEnabled=Zu(this._accessibilityService.onDidChangeScreenReaderOptimized,()=>this._accessibilityService.isScreenReaderOptimized()),this._editorDictationInProgress=Zu(this._contextKeyService.onDidChangeContext,()=>this._contextKeyService.getContext(this.editor.getDomNode()).getValue("editorDictation.inProgress")===!0),this._enabled=Ma(this,W=>this._enabledInConfig.read(W)&&(!this._isScreenReaderEnabled.read(W)||!this._editorDictationInProgress.read(W))),this._fontFamily=Zu(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).fontFamily),this._ghostTexts=Ma(this,W=>{var X;const Z=this.model.read(W);return(X=Z==null?void 0:Z.ghostTexts.read(W))!==null&&X!==void 0?X:[]}),this._stablizedGhostTexts=oEi(this._ghostTexts,this._store),this._ghostTextWidgets=r0i(this,this._stablizedGhostTexts,(W,X)=>X.add(this._instantiationService.createInstance(sVe,this.editor,{ghostText:W,minReservedLineCount:pE(0),targetTextModel:this.model.map(Z=>Z==null?void 0:Z.textModel)}))).recomputeInitiallyAndOnChange(this._store),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._playAccessibilitySignal=Pye(this),this._isReadonly=Zu(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(91)),this._textModel=Zu(this.editor.onDidChangeModel,()=>this.editor.getModel()),this._textModelIfWritable=Ma(W=>this._isReadonly.read(W)?void 0:this._textModel.read(W)),this._register(new Cm(this._contextKeyService,this.model)),this._register(Cl(W=>{const X=this._textModelIfWritable.read(W);Rd(Z=>{if(this.model.set(void 0,Z),this.updateObservables(Z,sw.Other),X){const ee=i.createInstance(aVe,X,this._suggestWidgetAdaptor.selectedItem,this._textModelVersionId,this._positions,this._debounceValue,Zu(e.onDidChangeConfiguration,()=>e.getOption(118).preview),Zu(e.onDidChangeConfiguration,()=>e.getOption(118).previewMode),Zu(e.onDidChangeConfiguration,()=>e.getOption(62).mode),this._enabled);this.model.set(ee,Z)}})}));const x=this._register(SCt());this._register(Cl(W=>{const X=this._fontFamily.read(W);x.setStyle(X===""||X==="default"?"":` +.monaco-editor .ghost-text-decoration, +.monaco-editor .ghost-text-decoration-preview, +.monaco-editor .ghost-text { + font-family: ${X}; +}`)}));const I=W=>{var X;return W.isUndoing?sw.Undo:W.isRedoing?sw.Redo:!((X=this.model.get())===null||X===void 0)&&X.isAcceptingPartially?sw.AcceptWord:sw.Other};this._register(e.onDidChangeModelContent(W=>Rd(X=>this.updateObservables(X,I(W))))),this._register(e.onDidChangeCursorPosition(W=>Rd(X=>{var Z;this.updateObservables(X,sw.Other),(W.reason===3||W.source==="api")&&((Z=this.model.get())===null||Z===void 0||Z.stop(X))}))),this._register(e.onDidType(()=>Rd(W=>{var X;this.updateObservables(W,sw.Other),this._enabled.get()&&((X=this.model.get())===null||X===void 0||X.trigger(W))}))),this._register(this._commandService.onDidExecuteCommand(W=>{new Set([IU.Tab.id,IU.DeleteLeft.id,IU.DeleteRight.id,nTt,"acceptSelectedSuggestion"]).has(W.commandId)&&e.hasTextFocus()&&this._enabled.get()&&Rd(Z=>{var ee;(ee=this.model.get())===null||ee===void 0||ee.trigger(Z)})})),this._register(this.editor.onDidBlurEditorWidget(()=>{this._contextKeyService.getContextKeyValue("accessibleViewIsShown")||this._configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(62).keepOnBlur||_R.dropDownVisible||Rd(W=>{var X;(X=this.model.get())===null||X===void 0||X.stop(W)})})),this._register(Cl(W=>{var X;const Z=(X=this.model.read(W))===null||X===void 0?void 0:X.state.read(W);Z!=null&&Z.suggestItem?Z.primaryGhostText.lineCount>=2&&this._suggestWidgetAdaptor.forceRenderingAbove():this._suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register(go(()=>{this._suggestWidgetAdaptor.stopForceRenderingAbove()}));const P=this._register(new On);let O;this._register(Vne({handleChange:(W,X)=>(W.didChange(this._playAccessibilitySignal)&&(O=void 0),!0)},async(W,X)=>{this._playAccessibilitySignal.read(W);const Z=this.model.read(W),ee=Z==null?void 0:Z.state.read(W);if(!Z||!ee||!ee.inlineCompletion){O=void 0;return}if(ee.inlineCompletion.semanticId!==O){P.clear(),O=ee.inlineCompletion.semanticId;const he=Z.textModel.getLineContent(ee.primaryGhostText.lineNumber);await J4(50,igt(P)),await hxt(this._suggestWidgetAdaptor.selectedItem,wb,()=>!1,igt(P)),await this._accessibilitySignalService.playSignal(Na.inlineSuggestion),this.editor.getOption(8)&&this.provideScreenReaderUpdate(ee.primaryGhostText.renderForScreenReader(he))}})),this._register(new AWe(this.editor,this.model,this._instantiationService)),this._register(this._configurationService.onDidChangeConfiguration(W=>{W.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})})),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})}playAccessibilitySignal(e){this._playAccessibilitySignal.trigger(e)}provideScreenReaderUpdate(e){const i=this._contextKeyService.getContextKeyValue("accessibleViewIsShown"),n=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let s;!i&&n&&this.editor.getOption(149)&&(s=V("showAccessibleViewHint","Inspect this in the accessible view ({0})",n.getAriaLabel())),Eb(s?e+", "+s:e)}updateObservables(e,i){var n,s,l;const d=this.editor.getModel();this._textModelVersionId.set((n=d==null?void 0:d.getVersionId())!==null&&n!==void 0?n:-1,e,i),this._positions.set((l=(s=this.editor.getSelections())===null||s===void 0?void 0:s.map(f=>f.getPosition()))!==null&&l!==void 0?l:[new yi(1,1)],e)}shouldShowHoverAt(e){var i;const n=(i=this.model.get())===null||i===void 0?void 0:i.primaryGhostText.get();return n?n.parts.some(s=>e.containsPosition(new yi(n.lineNumber,s.column))):!1}shouldShowHoverAtViewZone(e){var i,n;return(n=(i=this._ghostTextWidgets.get()[0])===null||i===void 0?void 0:i.ownsViewZone(e))!==null&&n!==void 0?n:!1}};Tw.ID="editor.contrib.inlineCompletionsController";Tw=_Ve=sEi([YA(1,So),YA(2,Zo),YA(3,El),YA(4,ff),YA(5,fk),YA(6,js),YA(7,LR),YA(8,ou),YA(9,$C)],Tw);function oEi(c,e){const i=yc("result",[]),n=[];return e.add(Cl(s=>{const l=c.read(s);Rd(d=>{if(l.length!==n.length){n.length=l.length;for(let f=0;ff.set(l[g],d))})})),i}class Tbe extends ms{constructor(){super({id:Tbe.ID,label:V("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:xn.and(Lt.writable,Cm.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}async run(e,i){var n;const s=Tw.get(i);(n=s==null?void 0:s.model.get())===null||n===void 0||n.next()}}Tbe.ID=sTt;class Dbe extends ms{constructor(){super({id:Dbe.ID,label:V("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:xn.and(Lt.writable,Cm.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}async run(e,i){var n;const s=Tw.get(i);(n=s==null?void 0:s.model.get())===null||n===void 0||n.previous()}}Dbe.ID=rTt;class aEi extends ms{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:V("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:Lt.writable})}async run(e,i){const n=Tw.get(i);await Kmi(async s=>{var l;await((l=n==null?void 0:n.model.get())===null||l===void 0?void 0:l.triggerExplicitly(s)),n==null||n.playAccessibilitySignal(s)})}}class lEi extends ms{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:V("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:xn.and(Lt.writable,Cm.inlineSuggestionVisible),kbOpts:{weight:101,primary:2065,kbExpr:xn.and(Lt.writable,Cm.inlineSuggestionVisible)},menuOpts:[{menuId:_t.InlineSuggestionToolbar,title:V("acceptWord","Accept Word"),group:"primary",order:2}]})}async run(e,i){var n;const s=Tw.get(i);await((n=s==null?void 0:s.model.get())===null||n===void 0?void 0:n.acceptNextWord(s.editor))}}class cEi extends ms{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:V("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:xn.and(Lt.writable,Cm.inlineSuggestionVisible),kbOpts:{weight:101},menuOpts:[{menuId:_t.InlineSuggestionToolbar,title:V("acceptLine","Accept Line"),group:"secondary",order:2}]})}async run(e,i){var n;const s=Tw.get(i);await((n=s==null?void 0:s.model.get())===null||n===void 0?void 0:n.acceptNextLine(s.editor))}}class uEi extends ms{constructor(){super({id:nTt,label:V("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:Cm.inlineSuggestionVisible,menuOpts:[{menuId:_t.InlineSuggestionToolbar,title:V("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:xn.and(Cm.inlineSuggestionVisible,Lt.tabMovesFocus.toNegated(),Cm.inlineSuggestionHasIndentationLessThanTabSize,bl.Visible.toNegated(),Lt.hoverFocused.toNegated())}})}async run(e,i){var n;const s=Tw.get(i);s&&((n=s.model.get())===null||n===void 0||n.accept(s.editor),s.editor.focus())}}class Ebe extends ms{constructor(){super({id:Ebe.ID,label:V("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:Cm.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}async run(e,i){const n=Tw.get(i);Rd(s=>{var l;(l=n==null?void 0:n.model.get())===null||l===void 0||l.stop(s)})}}Ebe.ID="editor.action.inlineSuggest.hide";class Ibe extends Ny{constructor(){super({id:Ibe.ID,title:V("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:_t.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:xn.equals("config.editor.inlineSuggest.showToolbar","always")})}async run(e,i){const n=e.get(El),l=n.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";n.updateValue("editor.inlineSuggest.showToolbar",l)}}Ibe.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar";var dEi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},vee=function(c,e){return function(i,n){e(i,n,c)}};class fEi{constructor(e,i,n){this.owner=e,this.range=i,this.controller=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let pVe=class{constructor(e,i,n,s,l,d){this._editor=e,this._languageService=i,this._openerService=n,this.accessibilityService=s,this._instantiationService=l,this._telemetryService=d,this.hoverOrdinal=4}suggestHoverAnchor(e){const i=Tw.get(this._editor);if(!i)return null;const n=e.target;if(n.type===8){const s=n.detail;if(i.shouldShowHoverAtViewZone(s.viewZoneId))return new c9(1e3,this,at.fromPositions(this._editor.getModel().validatePosition(s.positionBefore||s.position)),e.event.posx,e.event.posy,!1)}return n.type===7&&i.shouldShowHoverAt(n.range)?new c9(1e3,this,n.range,e.event.posx,e.event.posy,!1):n.type===6&&n.detail.mightBeForeignElement&&i.shouldShowHoverAt(n.range)?new c9(1e3,this,n.range,e.event.posx,e.event.posy,!1):null}computeSync(e,i){if(this._editor.getOption(62).showToolbar!=="onHover")return[];const n=Tw.get(this._editor);return n&&n.shouldShowHoverAt(e.range)?[new fEi(this,e.range,n)]:[]}renderHoverParts(e,i){const n=new On,s=i[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(8)&&this.renderScreenReaderText(e,s,n);const l=s.controller.model.get(),d=this._instantiationService.createInstance(_R,this._editor,!1,pE(null),l.selectedInlineCompletionIndex,l.inlineCompletionsCount,l.activeCommands);return e.fragment.appendChild(d.getDomNode()),l.triggerExplicitly(),n.add(d),n}renderScreenReaderText(e,i,n){const s=Sr,l=s("div.hover-row.markdown-hover"),d=zn(l,s("div.hover-contents",{"aria-live":"assertive"})),f=n.add(new gL({editor:this._editor},this._languageService,this._openerService)),g=y=>{n.add(f.onDidRenderAsync(()=>{d.className="hover-contents code-hover-contents",e.onContentsChanged()}));const w=V("inlineSuggestionFollows","Suggestion:"),x=n.add(f.render(new vv().appendText(w).appendCodeblock("text",y)));d.replaceChildren(x.element)};n.add(Cl(y=>{var w;const x=(w=i.controller.model.read(y))===null||w===void 0?void 0:w.primaryGhostText.read(y);if(x){const I=this._editor.getModel().getLineContent(x.lineNumber);g(x.renderForScreenReader(I))}else r0(d)})),e.fragment.appendChild(l)}};pVe=dEi([vee(1,If),vee(2,KC),vee(3,$C),vee(4,So),vee(5,R0)],pVe);class hEi extends Ii{constructor(){super()}}const Nbe=new class{constructor(){this._implementations=[]}register(e){return this._implementations.push(e),{dispose:()=>{const i=this._implementations.indexOf(e);i!==-1&&this._implementations.splice(i,1),e.dispose()}}}getImplementations(){return this._implementations}};Bc(Tw.ID,Tw,3);hr(aEi);hr(Tbe);hr(Dbe);hr(lEi);hr(cEi);hr(uEi);hr(Ebe);Bd(Ibe);PR.register(pVe);Nbe.register(new hEi);var _Ei=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},vFe=function(c,e){return function(i,n){e(i,n,c)}},zee;let H9=zee=class{constructor(e,i,n,s){this.textModelResolverService=i,this.languageService=n,this.languageFeaturesService=s,this.toUnhook=new On,this.toUnhookForKeyboard=new On,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const l=new lbe(e);this.toUnhook.add(l),this.toUnhook.add(l.onMouseMoveOrRelevantKeyDown(([d,f])=>{this.startFindDefinitionFromMouse(d,f??void 0)})),this.toUnhook.add(l.onExecute(d=>{this.isEnabled(d)&&this.gotoDefinition(d.target.position,d.hasSideBySideModifier).catch(f=>{Ba(f)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(l.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(zee.ID)}async startFindDefinitionFromCursor(e){await this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(i=>{i&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))}startFindDefinitionFromMouse(e,i){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,i)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const n=e.target.position;this.startFindDefinition(n)}async startFindDefinition(e){var i;this.toUnhookForKeyboard.clear();const n=e?(i=this.editor.getModel())===null||i===void 0?void 0:i.getWordAtPosition(e):null;if(!n){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===n.startColumn&&this.currentWordAtPosition.endColumn===n.endColumn&&this.currentWordAtPosition.word===n.word)return;this.currentWordAtPosition=n;const s=new Akt(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Hg(f=>this.findDefinition(e,f));let l;try{l=await this.previousPromise}catch(f){Ba(f);return}if(!l||!l.length||!s.validate(this.editor)){this.removeLinkDecorations();return}const d=l[0].originSelectionRange?at.lift(l[0].originSelectionRange):new at(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn);if(l.length>1){let f=d;for(const{originSelectionRange:g}of l)g&&(f=at.plusRange(f,g));this.addDecoration(f,new vv().appendText(V("multipleResults","Click to show {0} definitions.",l.length)))}else{const f=l[0];if(!f.uri)return;this.textModelResolverService.createModelReference(f.uri).then(g=>{if(!g.object||!g.object.textEditorModel){g.dispose();return}const{object:{textEditorModel:y}}=g,{startLineNumber:w}=f.range;if(w<1||w>y.getLineCount()){g.dispose();return}const x=this.getPreviewValue(y,w,f),I=this.languageService.guessLanguageIdByFilepathOrFirstLine(y.uri);this.addDecoration(d,x?new vv().appendCodeblock(I||"",x):void 0),g.dispose()})}}getPreviewValue(e,i,n){let s=n.range;return s.endLineNumber-s.startLineNumber>=zee.MAX_SOURCE_PREVIEW_LINES&&(s=this.getPreviewRangeBasedOnIndentation(e,i)),this.stripIndentationFromPreviewRange(e,i,s)}stripIndentationFromPreviewRange(e,i,n){let l=e.getLineFirstNonWhitespaceColumn(i);for(let f=i+1;f{const s=!i&&this.editor.getOption(88)&&!this.isInPeekEditor(n);return new rre({openToSide:i,openInPeek:s,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(n)})}isInPeekEditor(e){const i=e.get(Zo);return Nb.inPeekEditor.getValue(i)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};H9.ID="editor.contrib.gotodefinitionatposition";H9.MAX_SOURCE_PREVIEW_LINES=8;H9=zee=_Ei([vFe(1,Lb),vFe(2,If),vFe(3,js)],H9);Bc(H9.ID,H9,2);var iDt=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},x1e=function(c,e){return function(i,n){e(i,n,c)}};class Ryt{constructor(e,i,n){this.marker=e,this.index=i,this.total=n}}let gVe=class{constructor(e,i,n){this._markerService=i,this._configService=n,this._onDidChange=new ui,this.onDidChange=this._onDidChange.event,this._dispoables=new On,this._markers=[],this._nextIdx=-1,Oo.isUri(e)?this._resourceFilter=f=>f.toString()===e.toString():e&&(this._resourceFilter=e);const s=this._configService.getValue("problems.sortOrder"),l=(f,g)=>{let y=Fte(f.resource.toString(),g.resource.toString());return y===0&&(s==="position"?y=at.compareRangesUsingStarts(f,g)||Ah.compare(f.severity,g.severity):y=Ah.compare(f.severity,g.severity)||at.compareRangesUsingStarts(f,g)),y},d=()=>{this._markers=this._markerService.read({resource:Oo.isUri(e)?e:void 0,severities:Ah.Error|Ah.Warning|Ah.Info}),typeof e=="function"&&(this._markers=this._markers.filter(f=>this._resourceFilter(f.resource))),this._markers.sort(l)};d(),this._dispoables.add(i.onMarkerChanged(f=>{(!this._resourceFilter||f.some(g=>this._resourceFilter(g)))&&(d(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new Ryt(e,this._nextIdx+1,this._markers.length)}_initIdx(e,i,n){let s=!1,l=this._markers.findIndex(d=>d.resource.toString()===e.uri.toString());l<0&&(l=Ete(this._markers,{resource:e.uri},(d,f)=>Fte(d.resource.toString(),f.resource.toString())),l<0&&(l=~l));for(let d=l;ds.resource.toString()===e.toString());if(!(n<0)){for(;n=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Az=function(c,e){return function(i,n){e(i,n,c)}},yVe;class gEi{constructor(e,i,n,s,l){this._openerService=s,this._labelService=l,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new On,this._editor=i;const d=document.createElement("div");d.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),d.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),d.appendChild(this._relatedBlock),this._disposables.add(n_(this._relatedBlock,"click",f=>{f.preventDefault();const g=this._relatedDiagnostics.get(f.target);g&&n(g)})),this._scrollable=new LSt(d,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(f=>{d.style.left=`-${f.scrollLeft}px`,d.style.top=`-${f.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){yd(this._disposables)}update(e){const{source:i,message:n,relatedInformation:s,code:l}=e;let d=((i==null?void 0:i.length)||0)+2;l&&(typeof l=="string"?d+=l.length:d+=l.value.length);const f=wL(n);this._lines=f.length,this._longestLineLength=0;for(const I of f)this._longestLineLength=Math.max(I.length+d,this._longestLineLength);n0(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let g=this._messageBlock;for(const I of f)g=document.createElement("div"),g.innerText=I,I===""&&(g.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(g);if(i||l){const I=document.createElement("span");if(I.classList.add("details"),g.appendChild(I),i){const P=document.createElement("span");P.innerText=i,P.classList.add("source"),I.appendChild(P)}if(l)if(typeof l=="string"){const P=document.createElement("span");P.innerText=`(${l})`,P.classList.add("code"),I.appendChild(P)}else{this._codeLink=Sr("a.code-link"),this._codeLink.setAttribute("href",`${l.target.toString()}`),this._codeLink.onclick=O=>{this._openerService.open(l.target,{allowCommands:!0}),O.preventDefault(),O.stopPropagation()};const P=zn(this._codeLink,Sr("span"));P.innerText=l.value,I.appendChild(this._codeLink)}}if(n0(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),bv(s)){const I=this._relatedBlock.appendChild(document.createElement("div"));I.style.paddingTop=`${Math.floor(this._editor.getOption(67)*.66)}px`,this._lines+=1;for(const P of s){const O=document.createElement("div"),W=document.createElement("a");W.classList.add("filename"),W.innerText=`${this._labelService.getUriBasenameLabel(P.resource)}(${P.startLineNumber}, ${P.startColumn}): `,W.title=this._labelService.getUriLabel(P.resource),this._relatedDiagnostics.set(W,P);const X=document.createElement("span");X.innerText=P.message,O.appendChild(W),O.appendChild(X),this._lines+=1,I.appendChild(O)}}const y=this._editor.getOption(50),w=Math.ceil(y.typicalFullwidthCharacterWidth*this._longestLineLength*.75),x=y.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:w,scrollHeight:x})}layout(e,i){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${i}px`,this._scrollable.setScrollDimensions({width:i,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let i="";switch(e.severity){case Ah.Error:i=V("Error","Error");break;case Ah.Warning:i=V("Warning","Warning");break;case Ah.Info:i=V("Info","Info");break;case Ah.Hint:i=V("Hint","Hint");break}let n=V("marker aria","{0} at {1}. ",i,e.startLineNumber+":"+e.startColumn);const s=this._editor.getModel();return s&&e.startLineNumber<=s.getLineCount()&&e.startLineNumber>=1&&(n=`${s.getLineContent(e.startLineNumber)}, ${n}`),n}}let Nq=yVe=class extends f1e{constructor(e,i,n,s,l,d,f){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},l),this._themeService=i,this._openerService=n,this._menuService=s,this._contextKeyService=d,this._labelService=f,this._callOnDispose=new On,this._onDidSelectRelatedInformation=new ui,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Ah.Warning,this._backgroundColor=Qi.white,this._applyTheme(i.getColorTheme()),this._callOnDispose.add(i.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(bEi);let i=bVe,n=mEi;this._severity===Ah.Warning?(i=m0e,n=vEi):this._severity===Ah.Info&&(i=CVe,n=yEi);const s=e.getColor(i),l=e.getColor(n);this.style({arrowColor:s,frameColor:s,headerBackgroundColor:l,primaryHeadingColor:e.getColor(hTt),secondaryHeadingColor:e.getColor(_Tt)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(s=>this.editor.focus()));const i=[],n=this._menuService.createMenu(yVe.TitleMenu,this._contextKeyService);Mye(n,void 0,i),this._actionbarWidget.push(i,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=zn(e,Sr(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new gEi(this._container,this.editor,i=>this._onDidSelectRelatedInformation.fire(i),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,i,n){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const s=at.lift(e),l=this.editor.getPosition(),d=l&&s.containsPosition(l)?l:s.getStartPosition();super.show(d,this.computeRequiredHeight());const f=this.editor.getModel();if(f){const g=n>1?V("problems","{0} of {1} problems",i,n):V("change","{0} of {1} problem",i,n);this.setTitle(lk(f.uri),g)}this._icon.className=`codicon ${vVe.className(Ah.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(d,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,i){super._doLayoutBody(e,i),this._heightInPixel=e,this._message.layout(e,i),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};Nq.TitleMenu=new _t("gotoErrorTitleMenu");Nq=yVe=pEi([Az(1,og),Az(2,KC),Az(3,Dw),Az(4,So),Az(5,Zo),Az(6,hq)],Nq);const Fyt=Xte(ZN,sli),Byt=Xte(k1,Zte),Wyt=Xte(xb,Yte),bVe=Ft("editorMarkerNavigationError.background",{dark:Fyt,light:Fyt,hcDark:ec,hcLight:ec},V("editorMarkerNavigationError","Editor marker navigation widget error color.")),mEi=Ft("editorMarkerNavigationError.headerBackground",{dark:yo(bVe,.1),light:yo(bVe,.1),hcDark:null,hcLight:null},V("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),m0e=Ft("editorMarkerNavigationWarning.background",{dark:Byt,light:Byt,hcDark:ec,hcLight:ec},V("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),vEi=Ft("editorMarkerNavigationWarning.headerBackground",{dark:yo(m0e,.1),light:yo(m0e,.1),hcDark:"#0C141F",hcLight:yo(m0e,.2)},V("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),CVe=Ft("editorMarkerNavigationInfo.background",{dark:Wyt,light:Wyt,hcDark:ec,hcLight:ec},V("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),yEi=Ft("editorMarkerNavigationInfo.headerBackground",{dark:yo(CVe,.1),light:yo(CVe,.1),hcDark:null,hcLight:null},V("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),bEi=Ft("editorMarkerNavigation.background",{dark:Vg,light:Vg,hcDark:Vg,hcLight:Vg},V("editorMarkerNavigationBackground","Editor marker navigation widget background."));var CEi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Eme=function(c,e){return function(i,n){e(i,n,c)}},Uee;let bR=Uee=class{static get(e){return e.getContribution(Uee.ID)}constructor(e,i,n,s,l){this._markerNavigationService=i,this._contextKeyService=n,this._editorService=s,this._instantiationService=l,this._sessionDispoables=new On,this._editor=e,this._widgetVisible=rDt.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let i=!1;return this._model&&(i=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),i&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(Nq,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(n=>{var s,l,d;(!(!((s=this._model)===null||s===void 0)&&s.selected)||!at.containsPosition((l=this._model)===null||l===void 0?void 0:l.selected.marker,n.position))&&((d=this._model)===null||d===void 0||d.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const n=this._model.find(this._editor.getModel().uri,this._widget.position);n?this._widget.updateMarker(n.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(n=>{this._editorService.openCodeEditor({resource:n.resource,options:{pinned:!0,revealIfOpened:!0,selection:at.lift(n).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const i=this._getOrCreateModel(this._editor.getModel().uri);i.resetIndex(),i.move(!0,this._editor.getModel(),new yi(e.startLineNumber,e.startColumn)),i.selected&&this._widget.showAtMarker(i.selected.marker,i.selected.index,i.selected.total)}}async nagivate(e,i){var n,s;if(this._editor.hasModel()){const l=this._getOrCreateModel(i?void 0:this._editor.getModel().uri);if(l.move(e,this._editor.getModel(),this._editor.getPosition()),!l.selected)return;if(l.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const d=await this._editorService.openCodeEditor({resource:l.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:l.selected.marker}},this._editor);d&&((n=Uee.get(d))===null||n===void 0||n.close(),(s=Uee.get(d))===null||s===void 0||s.nagivate(e,i))}else this._widget.showAtMarker(l.selected.marker,l.selected.index,l.selected.total)}}};bR.ID="editor.contrib.markerController";bR=Uee=CEi([Eme(1,nDt),Eme(2,Zo),Eme(3,Oc),Eme(4,So)],bR);class Lbe extends ms{constructor(e,i,n){super(n),this._next=e,this._multiFile=i}async run(e,i){var n;i.hasModel()&&((n=bR.get(i))===null||n===void 0||n.nagivate(this._next,this._multiFile))}}class GM extends Lbe{constructor(){super(!0,!1,{id:GM.ID,label:GM.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Lt.focus,primary:578,weight:100},menuOpts:{menuId:Nq.TitleMenu,title:GM.LABEL,icon:Oh("marker-navigation-next",Dr.arrowDown,V("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}GM.ID="editor.action.marker.next";GM.LABEL=V("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class h9 extends Lbe{constructor(){super(!1,!1,{id:h9.ID,label:h9.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Lt.focus,primary:1602,weight:100},menuOpts:{menuId:Nq.TitleMenu,title:h9.LABEL,icon:Oh("marker-navigation-previous",Dr.arrowUp,V("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}h9.ID="editor.action.marker.prev";h9.LABEL=V("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class SEi extends Lbe{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:V("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Lt.focus,primary:66,weight:100},menuOpts:{menuId:_t.MenubarGoMenu,title:V({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class wEi extends Lbe{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:V("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Lt.focus,primary:1090,weight:100},menuOpts:{menuId:_t.MenubarGoMenu,title:V({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}Bc(bR.ID,bR,4);hr(GM);hr(h9);hr(SEi);hr(wEi);const rDt=new Xr("markersNavigationVisible",!1),xEi=sg.bindToContribution(bR.get);qr(new xEi({id:"closeMarkersNavigation",precondition:rDt,handler:c=>c.close(),kbOpts:{weight:150,kbExpr:Lt.focus,primary:9,secondary:[1033]}}));var eE;(function(c){c.NoAutoFocus="noAutoFocus",c.FocusIfVisible="focusIfVisible",c.AutoFocusImmediately="autoFocusImmediately"})(eE||(eE={}));class kEi extends ms{constructor(){super({id:iTt,label:V({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse."]},"Show or Focus Hover"),metadata:{description:xa("showOrFocusHoverDescription","Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position."),args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[eE.NoAutoFocus,eE.FocusIfVisible,eE.AutoFocusImmediately],enumDescriptions:[V("showOrFocusHover.focus.noAutoFocus","The hover will not automatically take focus."),V("showOrFocusHover.focus.focusIfVisible","The hover will take focus only if it is already visible."),V("showOrFocusHover.focus.autoFocusImmediately","The hover will automatically take focus when it appears.")],default:eE.FocusIfVisible}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:Lt.editorTextFocus,primary:qp(2089,2087),weight:100}})}run(e,i,n){if(!i.hasModel())return;const s=D1.get(i);if(!s)return;const l=n==null?void 0:n.focus;let d=eE.FocusIfVisible;Object.values(eE).includes(l)?d=l:typeof l=="boolean"&&l&&(d=eE.AutoFocusImmediately);const f=y=>{const w=i.getPosition(),x=new at(w.lineNumber,w.column,w.lineNumber,w.column);s.showContentHover(x,1,1,y)},g=i.getOption(2)===2;s.isHoverVisible?d!==eE.NoAutoFocus?s.focus():f(g):f(g||d===eE.AutoFocusImmediately)}}class TEi extends ms{constructor(){super({id:Hxi,label:V({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0,metadata:{description:xa("showDefinitionPreviewHoverDescription","Show the definition preview hover in the editor.")}})}run(e,i){const n=D1.get(i);if(!n)return;const s=i.getPosition();if(!s)return;const l=new at(s.lineNumber,s.column,s.lineNumber,s.column),d=H9.get(i);if(!d)return;d.startFindDefinitionFromCursor(s).then(()=>{n.showContentHover(l,1,1,!0)})}}class DEi extends ms{constructor(){super({id:jxi,label:V({key:"scrollUpHover",comment:["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:Lt.hoverFocused,kbOpts:{kbExpr:Lt.hoverFocused,primary:16,weight:100},metadata:{description:xa("scrollUpHoverDescription","Scroll up the editor hover.")}})}run(e,i){const n=D1.get(i);n&&n.scrollUp()}}class EEi extends ms{constructor(){super({id:zxi,label:V({key:"scrollDownHover",comment:["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:Lt.hoverFocused,kbOpts:{kbExpr:Lt.hoverFocused,primary:18,weight:100},metadata:{description:xa("scrollDownHoverDescription","Scroll down the editor hover.")}})}run(e,i){const n=D1.get(i);n&&n.scrollDown()}}class IEi extends ms{constructor(){super({id:Uxi,label:V({key:"scrollLeftHover",comment:["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:Lt.hoverFocused,kbOpts:{kbExpr:Lt.hoverFocused,primary:15,weight:100},metadata:{description:xa("scrollLeftHoverDescription","Scroll left the editor hover.")}})}run(e,i){const n=D1.get(i);n&&n.scrollLeft()}}class NEi extends ms{constructor(){super({id:qxi,label:V({key:"scrollRightHover",comment:["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:Lt.hoverFocused,kbOpts:{kbExpr:Lt.hoverFocused,primary:17,weight:100},metadata:{description:xa("scrollRightHoverDescription","Scroll right the editor hover.")}})}run(e,i){const n=D1.get(i);n&&n.scrollRight()}}class LEi extends ms{constructor(){super({id:$xi,label:V({key:"pageUpHover",comment:["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]},"Page Up Hover"),alias:"Page Up Hover",precondition:Lt.hoverFocused,kbOpts:{kbExpr:Lt.hoverFocused,primary:11,secondary:[528],weight:100},metadata:{description:xa("pageUpHoverDescription","Page up the editor hover.")}})}run(e,i){const n=D1.get(i);n&&n.pageUp()}}class PEi extends ms{constructor(){super({id:Jxi,label:V({key:"pageDownHover",comment:["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]},"Page Down Hover"),alias:"Page Down Hover",precondition:Lt.hoverFocused,kbOpts:{kbExpr:Lt.hoverFocused,primary:12,secondary:[530],weight:100},metadata:{description:xa("pageDownHoverDescription","Page down the editor hover.")}})}run(e,i){const n=D1.get(i);n&&n.pageDown()}}class AEi extends ms{constructor(){super({id:Gxi,label:V({key:"goToTopHover",comment:["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:Lt.hoverFocused,kbOpts:{kbExpr:Lt.hoverFocused,primary:14,secondary:[2064],weight:100},metadata:{description:xa("goToTopHoverDescription","Go to the top of the editor hover.")}})}run(e,i){const n=D1.get(i);n&&n.goToTop()}}class OEi extends ms{constructor(){super({id:Kxi,label:V({key:"goToBottomHover",comment:["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:Lt.hoverFocused,kbOpts:{kbExpr:Lt.hoverFocused,primary:13,secondary:[2066],weight:100},metadata:{description:xa("goToBottomHoverDescription","Go to the bottom of the editor hover.")}})}run(e,i){const n=D1.get(i);n&&n.goToBottom()}}class MEi extends ms{constructor(){super({id:obe,label:Qxi,alias:"Increase Hover Verbosity Level",precondition:Lt.hoverVisible})}run(e,i,n){var s;(s=D1.get(i))===null||s===void 0||s.updateMarkdownHoverVerbosityLevel(cw.Increase,n==null?void 0:n.index,n==null?void 0:n.focus)}}class REi extends ms{constructor(){super({id:abe,label:Xxi,alias:"Decrease Hover Verbosity Level",precondition:Lt.hoverVisible})}run(e,i,n){var s;(s=D1.get(i))===null||s===void 0||s.updateMarkdownHoverVerbosityLevel(cw.Decrease,n==null?void 0:n.index,n==null?void 0:n.focus)}}var FEi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},yFe=function(c,e){return function(i,n){e(i,n,c)}};const K2=Sr;class BEi{constructor(e,i,n){this.owner=e,this.range=i,this.marker=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const Vyt={type:1,filter:{include:yf.QuickFix},triggerAction:UC.QuickFixHover};let SVe=class{constructor(e,i,n,s){this._editor=e,this._markerDecorationsService=i,this._openerService=n,this._languageFeaturesService=s,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,i){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];const n=this._editor.getModel(),s=e.range.startLineNumber,l=n.getLineMaxColumn(s),d=[];for(const f of i){const g=f.range.startLineNumber===s?f.range.startColumn:1,y=f.range.endLineNumber===s?f.range.endColumn:l,w=this._markerDecorationsService.getMarker(n.uri,f);if(!w)continue;const x=new at(e.range.startLineNumber,g,e.range.startLineNumber,y);d.push(new BEi(this,x,w))}return d}renderHoverParts(e,i){if(!i.length)return Ii.None;const n=new On;i.forEach(l=>e.fragment.appendChild(this.renderMarkerHover(l,n)));const s=i.length===1?i[0]:i.sort((l,d)=>Ah.compare(l.marker.severity,d.marker.severity))[0];return this.renderMarkerStatusbar(e,s,n),n}renderMarkerHover(e,i){const n=K2("div.hover-row");n.tabIndex=0;const s=zn(n,K2("div.marker.hover-contents")),{source:l,message:d,code:f,relatedInformation:g}=e.marker;this._editor.applyFontInfo(s);const y=zn(s,K2("span"));if(y.style.whiteSpace="pre-wrap",y.innerText=d,l||f)if(f&&typeof f!="string"){const w=K2("span");if(l){const O=zn(w,K2("span"));O.innerText=l}const x=zn(w,K2("a.code-link"));x.setAttribute("href",f.target.toString()),i.add(tn(x,"click",O=>{this._openerService.open(f.target,{allowCommands:!0}),O.preventDefault(),O.stopPropagation()}));const I=zn(x,K2("span"));I.innerText=f.value;const P=zn(s,w);P.style.opacity="0.6",P.style.paddingLeft="6px"}else{const w=zn(s,K2("span"));w.style.opacity="0.6",w.style.paddingLeft="6px",w.innerText=l&&f?`${l}(${f})`:l||`(${f})`}if(bv(g))for(const{message:w,resource:x,startLineNumber:I,startColumn:P}of g){const O=zn(s,K2("div"));O.style.marginTop="8px";const W=zn(O,K2("a"));W.innerText=`${lk(x)}(${I}, ${P}): `,W.style.cursor="pointer",i.add(tn(W,"click",Z=>{Z.stopPropagation(),Z.preventDefault(),this._openerService&&this._openerService.open(x,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:I,startColumn:P}}}).catch(Ba)}));const X=zn(O,K2("span"));X.innerText=w,this._editor.applyFontInfo(X)}return n}renderMarkerStatusbar(e,i,n){if(i.marker.severity===Ah.Error||i.marker.severity===Ah.Warning||i.marker.severity===Ah.Info){const s=bR.get(this._editor);s&&e.statusBar.addAction({label:V("view problem","View Problem"),commandId:GM.ID,run:()=>{e.hide(),s.showAtMarker(i.marker),this._editor.focus()}})}if(!this._editor.getOption(91)){const s=e.statusBar.append(K2("div"));this.recentMarkerCodeActionsInfo&&(Lve.makeKey(this.recentMarkerCodeActionsInfo.marker)===Lve.makeKey(i.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(s.textContent=V("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const l=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?Ii.None:tR(()=>s.textContent=V("checkingForQuickFixes","Checking for quick fixes..."),200,n);s.textContent||(s.textContent=" ");const d=this.getCodeActions(i.marker);n.add(go(()=>d.cancel())),d.then(f=>{if(l.dispose(),this.recentMarkerCodeActionsInfo={marker:i.marker,hasCodeActions:f.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){f.dispose(),s.textContent=V("noQuickFixes","No quick fixes available");return}s.style.display="none";let g=!1;n.add(go(()=>{g||f.dispose()})),e.statusBar.addAction({label:V("quick fixes","Quick Fix..."),commandId:Qze,run:y=>{g=!0;const w=fR.get(this._editor),x=Y_(y);e.hide(),w==null||w.showCodeActions(Vyt,f,{x:x.left,y:x.top,width:x.width,height:x.height})}})},Ba)}}getCodeActions(e){return Hg(i=>bte(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new at(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),Vyt,W4.None,i))}};SVe=FEi([yFe(1,sje),yFe(2,KC),yFe(3,js)],SVe);var Hyt;(function(c){c.intro=V("intro","Focus on the hover widget to cycle through the hover parts with the Tab key."),c.increaseVerbosity=V("increaseVerbosity","- The focused hover part verbosity level can be increased with the Increase Hover Verbosity command.",obe),c.decreaseVerbosity=V("decreaseVerbosity","- The focused hover part verbosity level can be decreased with the Decrease Hover Verbosity command.",abe),c.hoverContent=V("contentHover","The last focused hover content is the following.")})(Hyt||(Hyt={}));class WEi{dispose(){var e;(e=this._provider)===null||e===void 0||e.dispose()}}class VEi{dispose(){var e;(e=this._provider)===null||e===void 0||e.dispose()}}class HEi{dispose(){}}Bc(D1.ID,D1,2);hr(kEi);hr(TEi);hr(DEi);hr(EEi);hr(IEi);hr(NEi);hr(LEi);hr(PEi);hr(AEi);hr(OEi);hr(MEi);hr(REi);PR.register(Hie);PR.register(SVe);dk((c,e)=>{const i=c.getColor(vSt);i&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${i.transparent(.5)}; }`))});Nbe.register(new WEi);Nbe.register(new VEi);Nbe.register(new HEi);function AC(c,e){let i=0;for(let n=0;nn-1)return[];const{tabSize:d,indentSize:f,insertSpaces:g}=c.getOptions(),y=(W,X)=>(X=X||1,Zx.shiftIndent(W,W.length+X,d,f,g)),w=(W,X)=>(X=X||1,Zx.unshiftIndent(W,W.length+X,d,f,g)),x=[],I=c.getLineContent(i);let P=Md(I),O=P;l.shouldIncrease(i)?(O=y(O),P=y(P)):l.shouldIndentNextLine(i)&&(O=y(O)),i++;for(let W=i;W<=n;W++){if(jEi(c,W))continue;const X=c.getLineContent(W),Z=Md(X),ee=O;l.shouldDecrease(W,ee)&&(O=w(O),P=w(P)),Z!==O&&x.push(Kf.replaceMove(new Qs(W,1,W,Z.length+1),gje(O,f,g))),!l.shouldIgnore(W)&&(l.shouldIncrease(W,ee)?(P=y(P),O=P):l.shouldIndentNextLine(W,ee)?O=y(O):O=P)}return x}function jEi(c,e){return c.tokenization.isCheapToTokenize(e)?c.tokenization.getLineTokens(e).getStandardTokenType(0)===2:!1}var zEi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},UEi=function(c,e){return function(i,n){e(i,n,c)}};class Pbe extends ms{constructor(){super({id:Pbe.ID,label:V("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:Lt.writable,metadata:{description:xa("indentationToSpacesDescription","Convert the tab indentation to spaces.")}})}run(e,i){const n=i.getModel();if(!n)return;const s=n.getOptions(),l=i.getSelection();if(!l)return;const d=new KEi(l,s.tabSize);i.pushUndoStop(),i.executeCommands(this.id,[d]),i.pushUndoStop(),n.updateOptions({insertSpaces:!0})}}Pbe.ID="editor.action.indentationToSpaces";class Abe extends ms{constructor(){super({id:Abe.ID,label:V("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:Lt.writable,metadata:{description:xa("indentationToTabsDescription","Convert the spaces indentation to tabs.")}})}run(e,i){const n=i.getModel();if(!n)return;const s=n.getOptions(),l=i.getSelection();if(!l)return;const d=new QEi(l,s.tabSize);i.pushUndoStop(),i.executeCommands(this.id,[d]),i.pushUndoStop(),n.updateOptions({insertSpaces:!1})}}Abe.ID="editor.action.indentationToTabs";class CUe extends ms{constructor(e,i,n){super(n),this.insertSpaces=e,this.displaySizeOnly=i}run(e,i){const n=e.get(pk),s=e.get(Qf),l=i.getModel();if(!l)return;const d=s.getCreationOptions(l.getLanguageId(),l.uri,l.isForSimpleWidget),f=l.getOptions(),g=[1,2,3,4,5,6,7,8].map(w=>({id:w.toString(),label:w.toString(),description:w===d.tabSize&&w===f.tabSize?V("configuredTabSize","Configured Tab Size"):w===d.tabSize?V("defaultTabSize","Default Tab Size"):w===f.tabSize?V("currentTabSize","Current Tab Size"):void 0})),y=Math.min(l.getOptions().tabSize-1,7);setTimeout(()=>{n.pick(g,{placeHolder:V({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:g[y]}).then(w=>{if(w&&l&&!l.isDisposed()){const x=parseInt(w.label,10);this.displaySizeOnly?l.updateOptions({tabSize:x}):l.updateOptions({tabSize:x,indentSize:x,insertSpaces:this.insertSpaces})}})},50)}}class Obe extends CUe{constructor(){super(!1,!1,{id:Obe.ID,label:V("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0,metadata:{description:xa("indentUsingTabsDescription","Use indentation with tabs.")}})}}Obe.ID="editor.action.indentUsingTabs";class Mbe extends CUe{constructor(){super(!0,!1,{id:Mbe.ID,label:V("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0,metadata:{description:xa("indentUsingSpacesDescription","Use indentation with spaces.")}})}}Mbe.ID="editor.action.indentUsingSpaces";class Rbe extends CUe{constructor(){super(!0,!0,{id:Rbe.ID,label:V("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0,metadata:{description:xa("changeTabDisplaySizeDescription","Change the space size equivalent of the tab.")}})}}Rbe.ID="editor.action.changeTabDisplaySize";class Fbe extends ms{constructor(){super({id:Fbe.ID,label:V("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0,metadata:{description:xa("detectIndentationDescription","Detect the indentation from content.")}})}run(e,i){const n=e.get(Qf),s=i.getModel();if(!s)return;const l=n.getCreationOptions(s.getLanguageId(),s.uri,s.isForSimpleWidget);s.detectIndentation(l.insertSpaces,l.tabSize)}}Fbe.ID="editor.action.detectIndentation";class qEi extends ms{constructor(){super({id:"editor.action.reindentlines",label:V("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:Lt.writable,metadata:{description:xa("editor.reindentlinesDescription","Reindent the lines of the editor.")}})}run(e,i){const n=e.get(Kd),s=i.getModel();if(!s)return;const l=sDt(s,n,1,s.getLineCount());l.length>0&&(i.pushUndoStop(),i.executeEdits(this.id,l),i.pushUndoStop())}}class $Ei extends ms{constructor(){super({id:"editor.action.reindentselectedlines",label:V("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:Lt.writable,metadata:{description:xa("editor.reindentselectedlinesDescription","Reindent the selected lines of the editor.")}})}run(e,i){const n=e.get(Kd),s=i.getModel();if(!s)return;const l=i.getSelections();if(l===null)return;const d=[];for(const f of l){let g=f.startLineNumber,y=f.endLineNumber;if(g!==y&&f.endColumn===1&&y--,g===1){if(g===y)continue}else g--;const w=sDt(s,n,g,y);d.push(...w)}d.length>0&&(i.pushUndoStop(),i.executeEdits(this.id,d),i.pushUndoStop())}}class JEi{constructor(e,i){this._initialSelection=i,this._edits=[],this._selectionId=null;for(const n of e)n.range&&typeof n.text=="string"&&this._edits.push(n)}getEditOperations(e,i){for(const s of this._edits)i.addEditOperation(at.lift(s.range),s.text);let n=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(n=!0,this._selectionId=i.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(n=!0,this._selectionId=i.trackSelection(this._initialSelection,!1))),n||(this._selectionId=i.trackSelection(this._initialSelection))}computeCursorState(e,i){return i.getTrackedSelection(this._selectionId)}}let Yie=class{constructor(e,i){this.editor=e,this._languageConfigurationService=i,this.callOnDispose=new On,this.callOnModel=new On,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(12)<4||this.editor.getOption(55))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){const i=this.editor.getSelections();if(i===null||i.length>1)return;const n=this.editor.getModel();if(!n||GEi(n,e)||!n.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const s=this.editor.getOption(12),{tabSize:l,indentSize:d,insertSpaces:f}=n.getOptions(),g=[],y={shiftIndent:P=>Zx.shiftIndent(P,P.length+1,l,d,f),unshiftIndent:P=>Zx.unshiftIndent(P,P.length+1,l,d,f)};let w=e.startLineNumber;for(;w<=e.endLineNumber;){if(this.shouldIgnoreLine(n,w)){w++;continue}break}if(w>e.endLineNumber)return;let x=n.getLineContent(w);if(!/\S/.test(x.substring(0,e.startColumn-1))){const P=tte(s,n,n.getLanguageId(),w,y,this._languageConfigurationService);if(P!==null){const O=Md(x),W=AC(P,l),X=AC(O,l);if(W!==X){const Z=xte(W,l,f);g.push({range:new at(w,1,w,O.length+1),text:Z}),x=Z+x.substr(O.length)}else{const Z=$St(n,w,this._languageConfigurationService);if(Z===0||Z===8)return}}}const I=w;for(;wn.tokenization.getLineTokens(W),getLanguageId:()=>n.getLanguageId(),getLanguageIdAtPosition:(W,X)=>n.getLanguageIdAtPosition(W,X)},getLineContent:W=>W===I?x:n.getLineContent(W)},n.getLanguageId(),w+1,y,this._languageConfigurationService);if(O!==null){const W=AC(O,l),X=AC(Md(n.getLineContent(w+1)),l);if(W!==X){const Z=W-X;for(let ee=w+1;ee<=e.endLineNumber;ee++){const he=n.getLineContent(ee),we=Md(he),Be=AC(we,l)+Z,Me=xte(Be,l,f);Me!==we&&g.push({range:new at(ee,1,ee,we.length+1),text:Me})}}}}if(g.length>0){this.editor.pushUndoStop();const P=new JEi(g,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",P),this.editor.pushUndoStop()}}shouldIgnoreLine(e,i){e.tokenization.forceTokenization(i);const n=e.getLineFirstNonWhitespaceColumn(i);if(n===0)return!0;const s=e.tokenization.getLineTokens(i);if(s.getCount()>0){const l=s.findTokenIndexAtOffset(n);if(l>=0&&s.getStandardTokenType(l)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};Yie.ID="editor.contrib.autoIndentOnPaste";Yie=zEi([UEi(1,Kd)],Yie);function GEi(c,e){const i=n=>_ai(c,n)===2;return i(e.getStartPosition())||i(e.getEndPosition())}function oDt(c,e,i,n){if(c.getLineCount()===1&&c.getLineMaxColumn(1)===1)return;let s="";for(let d=0;d=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},YEi=function(c,e){return function(i,n){e(i,n,c)}},v0e;let CR=v0e=class{static get(e){return e.getContribution(v0e.ID)}constructor(e,i){this.editor=e,this.editorWorkerService=i,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,i){var n;(n=this.currentRequest)===null||n===void 0||n.cancel();const s=this.editor.getSelection(),l=this.editor.getModel();if(!l||!s)return;let d=s;if(d.startLineNumber!==d.endLineNumber)return;const f=new Akt(this.editor,5),g=l.uri;return this.editorWorkerService.canNavigateValueSet(g)?(this.currentRequest=Hg(y=>this.editorWorkerService.navigateValueSet(g,d,i)),this.currentRequest.then(y=>{var w;if(!y||!y.range||!y.value||!f.validate(this.editor))return;const x=at.lift(y.range);let I=y.range;const P=y.value.length-(d.endColumn-d.startColumn);I={startLineNumber:I.startLineNumber,startColumn:I.startColumn,endLineNumber:I.endLineNumber,endColumn:I.startColumn+y.value.length},P>1&&(d=new Qs(d.startLineNumber,d.startColumn,d.endLineNumber,d.endColumn+P-1));const O=new XEi(x,d,y.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,O),this.editor.pushUndoStop(),this.decorations.set([{range:I,options:v0e.DECORATION}]),(w=this.decorationRemover)===null||w===void 0||w.cancel(),this.decorationRemover=J4(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(Ba)}).catch(Ba)):Promise.resolve(void 0)}};CR.ID="editor.contrib.inPlaceReplaceController";CR.DECORATION=Xa.register({description:"in-place-replace",className:"valueSetReplacement"});CR=v0e=ZEi([YEi(1,_k)],CR);class eIi extends ms{constructor(){super({id:"editor.action.inPlaceReplace.up",label:V("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:Lt.writable,kbOpts:{kbExpr:Lt.editorTextFocus,primary:3159,weight:100}})}run(e,i){const n=CR.get(i);return n?n.run(this.id,!1):Promise.resolve(void 0)}}class tIi extends ms{constructor(){super({id:"editor.action.inPlaceReplace.down",label:V("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:Lt.writable,kbOpts:{kbExpr:Lt.editorTextFocus,primary:3161,weight:100}})}run(e,i){const n=CR.get(i);return n?n.run(this.id,!0):Promise.resolve(void 0)}}Bc(CR.ID,CR,4);hr(eIi);hr(tIi);class iIi extends ms{constructor(){super({id:"expandLineSelection",label:V("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:Lt.textInputFocus,primary:2090}})}run(e,i,n){if(n=n||{},!i.hasModel())return;const s=i._getViewModel();s.model.pushStackElement(),s.setCursorStates(n.source,3,Zm.expandLineSelection(s,s.getCursorStates())),s.revealAllCursors(n.source,!0)}}hr(iIi);class nIi{constructor(e,i,n){this._selection=e,this._cursors=i,this._selectionId=null,this._trimInRegexesAndStrings=n}getEditOperations(e,i){const n=rIi(e,this._cursors,this._trimInRegexesAndStrings);for(let s=0,l=n.length;sf.lineNumber===g.lineNumber?f.column-g.column:f.lineNumber-g.lineNumber);for(let f=e.length-2;f>=0;f--)e[f].lineNumber===e[f+1].lineNumber&&e.splice(f,1);const n=[];let s=0,l=0;const d=e.length;for(let f=1,g=c.getLineCount();f<=g;f++){const y=c.getLineContent(f),w=y.length+1;let x=0;if(l=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},oIi=function(c,e){return function(i,n){e(i,n,c)}};let wVe=class{constructor(e,i,n,s){this._languageConfigurationService=s,this._selection=e,this._isMovingDown=i,this._autoIndent=n,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,i){const n=()=>e.getLanguageId(),s=(x,I)=>e.getLanguageIdAtPosition(x,I),l=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===l){this._selectionId=i.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=i.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let d=this._selection;d.startLineNumberee===d.startLineNumber?e.tokenization.getLineTokens(x):e.tokenization.getLineTokens(ee),getLanguageId:n,getLanguageIdAtPosition:s},getLineContent:ee=>ee===d.startLineNumber?e.getLineContent(x):e.getLineContent(ee)},Z=tte(this._autoIndent,X,e.getLanguageIdAtPosition(x,1),d.startLineNumber,w,this._languageConfigurationService);if(Z!==null){const ee=Md(e.getLineContent(x)),he=AC(Z,f),we=AC(ee,f);he!==we&&(P=xte(he,f,y)+this.trimStart(I))}}i.addEditOperation(new at(d.startLineNumber,1,d.startLineNumber,1),P+` +`);const W=this.matchEnterRuleMovingDown(e,w,f,d.startLineNumber,x,P);if(W!==null)W!==0&&this.getIndentEditsOfMovingBlock(e,i,d,f,y,W);else{const X={tokenization:{getLineTokens:ee=>ee===d.startLineNumber?e.tokenization.getLineTokens(x):ee>=d.startLineNumber+1&&ee<=d.endLineNumber+1?e.tokenization.getLineTokens(ee-1):e.tokenization.getLineTokens(ee),getLanguageId:n,getLanguageIdAtPosition:s},getLineContent:ee=>ee===d.startLineNumber?P:ee>=d.startLineNumber+1&&ee<=d.endLineNumber+1?e.getLineContent(ee-1):e.getLineContent(ee)},Z=tte(this._autoIndent,X,e.getLanguageIdAtPosition(x,1),d.startLineNumber+1,w,this._languageConfigurationService);if(Z!==null){const ee=Md(e.getLineContent(d.startLineNumber)),he=AC(Z,f),we=AC(ee,f);if(he!==we){const Te=he-we;this.getIndentEditsOfMovingBlock(e,i,d,f,y,Te)}}}}else i.addEditOperation(new at(d.startLineNumber,1,d.startLineNumber,1),P+` +`)}else if(x=d.startLineNumber-1,I=e.getLineContent(x),i.addEditOperation(new at(x,1,x+1,1),null),i.addEditOperation(new at(d.endLineNumber,e.getLineMaxColumn(d.endLineNumber),d.endLineNumber,e.getLineMaxColumn(d.endLineNumber)),` +`+I),this.shouldAutoIndent(e,d)){const P={tokenization:{getLineTokens:W=>W===x?e.tokenization.getLineTokens(d.startLineNumber):e.tokenization.getLineTokens(W),getLanguageId:n,getLanguageIdAtPosition:s},getLineContent:W=>W===x?e.getLineContent(d.startLineNumber):e.getLineContent(W)},O=this.matchEnterRule(e,w,f,d.startLineNumber,d.startLineNumber-2);if(O!==null)O!==0&&this.getIndentEditsOfMovingBlock(e,i,d,f,y,O);else{const W=tte(this._autoIndent,P,e.getLanguageIdAtPosition(d.startLineNumber,1),x,w,this._languageConfigurationService);if(W!==null){const X=Md(e.getLineContent(d.startLineNumber)),Z=AC(W,f),ee=AC(X,f);if(Z!==ee){const he=Z-ee;this.getIndentEditsOfMovingBlock(e,i,d,f,y,he)}}}}}this._selectionId=i.trackSelection(d)}buildIndentConverter(e,i,n){return{shiftIndent:s=>Zx.shiftIndent(s,s.length+1,e,i,n),unshiftIndent:s=>Zx.unshiftIndent(s,s.length+1,e,i,n)}}parseEnterResult(e,i,n,s,l){if(l){let d=l.indentation;l.indentAction===mp.None||l.indentAction===mp.Indent?d=l.indentation+l.appendText:l.indentAction===mp.IndentOutdent?d=l.indentation:l.indentAction===mp.Outdent&&(d=i.unshiftIndent(l.indentation)+l.appendText);const f=e.getLineContent(s);if(this.trimStart(f).indexOf(this.trimStart(d))>=0){const g=Md(e.getLineContent(s));let y=Md(d);const w=$St(e,s,this._languageConfigurationService);w!==null&&w&2&&(y=i.unshiftIndent(y));const x=AC(y,n),I=AC(g,n);return x-I}}return null}matchEnterRuleMovingDown(e,i,n,s,l,d){if(yE(d)>=0){const f=e.getLineMaxColumn(l),g=EU(this._autoIndent,e,new at(l,f,l,f),this._languageConfigurationService);return this.parseEnterResult(e,i,n,s,g)}else{let f=s-1;for(;f>=1;){const w=e.getLineContent(f);if(yE(w)>=0)break;f--}if(f<1||s>e.getLineCount())return null;const g=e.getLineMaxColumn(f),y=EU(this._autoIndent,e,new at(f,g,f,g),this._languageConfigurationService);return this.parseEnterResult(e,i,n,s,y)}}matchEnterRule(e,i,n,s,l,d){let f=l;for(;f>=1;){let w;if(f===l&&d!==void 0?w=d:w=e.getLineContent(f),yE(w)>=0)break;f--}if(f<1||s>e.getLineCount())return null;const g=e.getLineMaxColumn(f),y=EU(this._autoIndent,e,new at(f,g,f,g),this._languageConfigurationService);return this.parseEnterResult(e,i,n,s,y)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,i){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(i.startLineNumber))return!1;const n=e.getLanguageIdAtPosition(i.startLineNumber,1),s=e.getLanguageIdAtPosition(i.endLineNumber,1);return!(n!==s||this._languageConfigurationService.getLanguageConfiguration(n).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,i,n,s,l,d){for(let f=n.startLineNumber;f<=n.endLineNumber;f++){const g=e.getLineContent(f),y=Md(g),x=AC(y,s)+d,I=xte(x,s,l);I!==y&&(i.addEditOperation(new at(f,1,f,y.length+1),I),f===n.endLineNumber&&n.endColumn<=y.length+1&&I===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,i){let n=i.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber=s)return null;const l=[];for(let f=n;f<=s;f++)l.push(c.getLineContent(f));let d=l.slice(0);return d.sort(KM.getCollator().compare),i===!0&&(d=d.reverse()),{startLineNumber:n,endLineNumber:s,before:l,after:d}}function aIi(c,e,i){const n=lDt(c,e,i);return n?Kf.replace(new at(n.startLineNumber,1,n.endLineNumber,c.getLineMaxColumn(n.endLineNumber)),n.after.join(` +`)):null}class cDt extends ms{constructor(e,i){super(i),this.down=e}run(e,i){if(!i.hasModel())return;const n=i.getSelections().map((d,f)=>({selection:d,index:f,ignore:!1}));n.sort((d,f)=>at.compareRangesUsingStarts(d.selection,f.selection));let s=n[0];for(let d=1;dnew yi(w.positionLineNumber,w.positionColumn)));const l=i.getSelection();if(l===null)return;const d=e.get(El),f=i.getModel(),g=d.getValue("files.trimTrailingWhitespaceInRegexAndStrings",{overrideIdentifier:f==null?void 0:f.getLanguageId(),resource:f==null?void 0:f.uri}),y=new nIi(l,s,g);i.pushUndoStop(),i.executeCommands(this.id,[y]),i.pushUndoStop()}}Bbe.ID="editor.action.trimTrailingWhitespace";class gIi extends ms{constructor(){super({id:"editor.action.deleteLines",label:V("lines.delete","Delete Line"),alias:"Delete Line",precondition:Lt.writable,kbOpts:{kbExpr:Lt.textInputFocus,primary:3113,weight:100}})}run(e,i){if(!i.hasModel())return;const n=this._getLinesToRemove(i),s=i.getModel();if(s.getLineCount()===1&&s.getLineMaxColumn(1)===1)return;let l=0;const d=[],f=[];for(let g=0,y=n.length;g1&&(x-=1,P=s.getLineMaxColumn(x)),d.push(Kf.replace(new Qs(x,P,I,O),"")),f.push(new Qs(x-l,w.positionColumn,x-l,w.positionColumn)),l+=w.endLineNumber-w.startLineNumber+1}i.pushUndoStop(),i.executeEdits(this.id,d,f),i.pushUndoStop()}_getLinesToRemove(e){const i=e.getSelections().map(l=>{let d=l.endLineNumber;return l.startLineNumberl.startLineNumber===d.startLineNumber?l.endLineNumber-d.endLineNumber:l.startLineNumber-d.startLineNumber);const n=[];let s=i[0];for(let l=1;l=i[l].startLineNumber?s.endLineNumber=i[l].endLineNumber:(n.push(s),s=i[l]);return n.push(s),n}}class mIi extends ms{constructor(){super({id:"editor.action.indentLines",label:V("lines.indent","Indent Line"),alias:"Indent Line",precondition:Lt.writable,kbOpts:{kbExpr:Lt.editorTextFocus,primary:2142,weight:100}})}run(e,i){const n=i._getViewModel();n&&(i.pushUndoStop(),i.executeCommands(this.id,lh.indent(n.cursorConfig,i.getModel(),i.getSelections())),i.pushUndoStop())}}class vIi extends ms{constructor(){super({id:"editor.action.outdentLines",label:V("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:Lt.writable,kbOpts:{kbExpr:Lt.editorTextFocus,primary:2140,weight:100}})}run(e,i){IU.Outdent.runEditorCommand(e,i,null)}}class yIi extends ms{constructor(){super({id:"editor.action.insertLineBefore",label:V("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:Lt.writable,kbOpts:{kbExpr:Lt.editorTextFocus,primary:3075,weight:100}})}run(e,i){const n=i._getViewModel();n&&(i.pushUndoStop(),i.executeCommands(this.id,lh.lineInsertBefore(n.cursorConfig,i.getModel(),i.getSelections())))}}class bIi extends ms{constructor(){super({id:"editor.action.insertLineAfter",label:V("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:Lt.writable,kbOpts:{kbExpr:Lt.editorTextFocus,primary:2051,weight:100}})}run(e,i){const n=i._getViewModel();n&&(i.pushUndoStop(),i.executeCommands(this.id,lh.lineInsertAfter(n.cursorConfig,i.getModel(),i.getSelections())))}}class fDt extends ms{run(e,i){if(!i.hasModel())return;const n=i.getSelection(),s=this._getRangesToDelete(i),l=[];for(let g=0,y=s.length-1;gKf.replace(g,""));i.pushUndoStop(),i.executeEdits(this.id,f,d),i.pushUndoStop()}}class CIi extends fDt{constructor(){super({id:"deleteAllLeft",label:V("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:Lt.writable,kbOpts:{kbExpr:Lt.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,i){let n=null;const s=[];let l=0;return i.forEach(d=>{let f;if(d.endColumn===1&&l>0){const g=d.startLineNumber-l;f=new Qs(g,d.startColumn,g,d.startColumn)}else f=new Qs(d.startLineNumber,d.startColumn,d.startLineNumber,d.startColumn);l+=d.endLineNumber-d.startLineNumber,d.intersectRanges(e)?n=f:s.push(f)}),n&&s.unshift(n),s}_getRangesToDelete(e){const i=e.getSelections();if(i===null)return[];let n=i;const s=e.getModel();return s===null?[]:(n.sort(at.compareRangesUsingStarts),n=n.map(l=>{if(l.isEmpty())if(l.startColumn===1){const d=Math.max(1,l.startLineNumber-1),f=l.startLineNumber===1?1:s.getLineLength(d)+1;return new at(d,f,l.startLineNumber,1)}else return new at(l.startLineNumber,1,l.startLineNumber,l.startColumn);else return new at(l.startLineNumber,1,l.endLineNumber,l.endColumn)}),n)}}class SIi extends fDt{constructor(){super({id:"deleteAllRight",label:V("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:Lt.writable,kbOpts:{kbExpr:Lt.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,i){let n=null;const s=[];for(let l=0,d=i.length,f=0;l{if(l.isEmpty()){const d=i.getLineMaxColumn(l.startLineNumber);return l.startColumn===d?new at(l.startLineNumber,l.startColumn,l.startLineNumber+1,1):new at(l.startLineNumber,l.startColumn,l.startLineNumber,d)}return l});return s.sort(at.compareRangesUsingStarts),s}}class wIi extends ms{constructor(){super({id:"editor.action.joinLines",label:V("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:Lt.writable,kbOpts:{kbExpr:Lt.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,i){const n=i.getSelections();if(n===null)return;let s=i.getSelection();if(s===null)return;n.sort(at.compareRangesUsingStarts);const l=[],d=n.reduce((I,P)=>I.isEmpty()?I.endLineNumber===P.startLineNumber?(s.equalsSelection(I)&&(s=P),P):P.startLineNumber>I.endLineNumber+1?(l.push(I),P):new Qs(I.startLineNumber,I.startColumn,P.endLineNumber,P.endColumn):P.startLineNumber>I.endLineNumber?(l.push(I),P):new Qs(I.startLineNumber,I.startColumn,P.endLineNumber,P.endColumn));l.push(d);const f=i.getModel();if(f===null)return;const g=[],y=[];let w=s,x=0;for(let I=0,P=l.length;I=1){let Ni=!0;Te===""&&(Ni=!1),Ni&&(Te.charAt(Te.length-1)===" "||Te.charAt(Te.length-1)===" ")&&(Ni=!1,Te=Te.replace(/[\s\uFEFF\xA0]+$/g," "));const ci=vt.substr(Nt-1);Te+=(Ni?" ":"")+ci,Ni?Z=ci.length+1:Z=ci.length}else Z=0}const Be=new at(W,X,ee,he);if(!Be.isEmpty()){let Me;O.isEmpty()?(g.push(Kf.replace(Be,Te)),Me=new Qs(Be.startLineNumber-x,Te.length-Z+1,W-x,Te.length-Z+1)):O.startLineNumber===O.endLineNumber?(g.push(Kf.replace(Be,Te)),Me=new Qs(O.startLineNumber-x,O.startColumn,O.endLineNumber-x,O.endColumn)):(g.push(Kf.replace(Be,Te)),Me=new Qs(O.startLineNumber-x,O.startColumn,O.startLineNumber-x,Te.length-we)),at.intersectRanges(Be,s)!==null?w=Me:y.push(Me)}x+=Be.endLineNumber-Be.startLineNumber}y.unshift(w),i.pushUndoStop(),i.executeEdits(this.id,g,y),i.pushUndoStop()}}class xIi extends ms{constructor(){super({id:"editor.action.transpose",label:V("editor.transpose","Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:Lt.writable})}run(e,i){const n=i.getSelections();if(n===null)return;const s=i.getModel();if(s===null)return;const l=[];for(let d=0,f=n.length;d=w){if(y.lineNumber===s.getLineCount())continue;const x=new at(y.lineNumber,Math.max(1,y.column-1),y.lineNumber+1,1),I=s.getValueInRange(x).split("").reverse().join("");l.push(new I0(new Qs(y.lineNumber,Math.max(1,y.column-1),y.lineNumber+1,1),I))}else{const x=new at(y.lineNumber,Math.max(1,y.column-1),y.lineNumber,y.column+1),I=s.getValueInRange(x).split("").reverse().join("");l.push(new mje(x,I,new Qs(y.lineNumber,y.column+1,y.lineNumber,y.column+1)))}}i.pushUndoStop(),i.executeCommands(this.id,l),i.pushUndoStop()}}class dB extends ms{run(e,i){const n=i.getSelections();if(n===null)return;const s=i.getModel();if(s===null)return;const l=i.getOption(131),d=[];for(const f of n)if(f.isEmpty()){const g=f.getStartPosition(),y=i.getConfiguredWordAtPosition(g);if(!y)continue;const w=new at(g.lineNumber,y.startColumn,g.lineNumber,y.endColumn),x=s.getValueInRange(w);d.push(Kf.replace(w,this._modifyText(x,l)))}else{const g=s.getValueInRange(f);d.push(Kf.replace(f,this._modifyText(g,l)))}i.pushUndoStop(),i.executeEdits(this.id,d),i.pushUndoStop()}}class kIi extends dB{constructor(){super({id:"editor.action.transformToUppercase",label:V("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:Lt.writable})}_modifyText(e,i){return e.toLocaleUpperCase()}}class TIi extends dB{constructor(){super({id:"editor.action.transformToLowercase",label:V("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:Lt.writable})}_modifyText(e,i){return e.toLocaleLowerCase()}}class c6{constructor(e,i){this._pattern=e,this._flags=i,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch{}}return this._actual}isSupported(){return this.get()!==null}}class ene extends dB{constructor(){super({id:"editor.action.transformToTitlecase",label:V("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:Lt.writable})}_modifyText(e,i){const n=ene.titleBoundary.get();return n?e.toLocaleLowerCase().replace(n,s=>s.toLocaleUpperCase()):e}}ene.titleBoundary=new c6("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class QM extends dB{constructor(){super({id:"editor.action.transformToSnakecase",label:V("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:Lt.writable})}_modifyText(e,i){const n=QM.caseBoundary.get(),s=QM.singleLetters.get();return!n||!s?e:e.replace(n,"$1_$2").replace(s,"$1_$2$3").toLocaleLowerCase()}}QM.caseBoundary=new c6("(\\p{Ll})(\\p{Lu})","gmu");QM.singleLetters=new c6("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");class tne extends dB{constructor(){super({id:"editor.action.transformToCamelcase",label:V("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:Lt.writable})}_modifyText(e,i){const n=tne.wordBoundary.get();if(!n)return e;const s=e.split(n);return s.shift()+s.map(d=>d.substring(0,1).toLocaleUpperCase()+d.substring(1)).join("")}}tne.wordBoundary=new c6("[_\\s-]","gm");class j9 extends dB{constructor(){super({id:"editor.action.transformToPascalcase",label:V("editor.transformToPascalcase","Transform to Pascal Case"),alias:"Transform to Pascal Case",precondition:Lt.writable})}_modifyText(e,i){const n=j9.wordBoundary.get(),s=j9.wordBoundaryToMaintain.get();return!n||!s?e:e.split(s).map(f=>f.split(n)).flat().map(f=>f.substring(0,1).toLocaleUpperCase()+f.substring(1)).join("")}}j9.wordBoundary=new c6("[_\\s-]","gm");j9.wordBoundaryToMaintain=new c6("(?<=\\.)","gm");class j4 extends dB{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(i=>i.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:V("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:Lt.writable})}_modifyText(e,i){const n=j4.caseBoundary.get(),s=j4.singleLetters.get(),l=j4.underscoreBoundary.get();return!n||!s||!l?e:e.replace(l,"$1-$3").replace(n,"$1-$2").replace(s,"$1-$2").toLocaleLowerCase()}}j4.caseBoundary=new c6("(\\p{Ll})(\\p{Lu})","gmu");j4.singleLetters=new c6("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu");j4.underscoreBoundary=new c6("(\\S)(_)(\\S)","gm");hr(lIi);hr(cIi);hr(uIi);hr(dIi);hr(fIi);hr(hIi);hr(_Ii);hr(pIi);hr(Bbe);hr(gIi);hr(mIi);hr(vIi);hr(yIi);hr(bIi);hr(CIi);hr(SIi);hr(wIi);hr(xIi);hr(kIi);hr(TIi);QM.caseBoundary.isSupported()&&QM.singleLetters.isSupported()&&hr(QM);tne.wordBoundary.isSupported()&&hr(tne);j9.wordBoundary.isSupported()&&hr(j9);ene.titleBoundary.isSupported()&&hr(ene);j4.isSupported()&&hr(j4);var DIi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Ime=function(c,e){return function(i,n){e(i,n,c)}},y0e;const hDt=new Xr("LinkedEditingInputVisible",!1),EIi="linked-editing-decoration";let SR=y0e=class extends Ii{static get(e){return e.getContribution(y0e.ID)}constructor(e,i,n,s,l){super(),this.languageConfigurationService=s,this._syncRangesToken=0,this._localToDispose=this._register(new On),this._editor=e,this._providers=n.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=hDt.bindTo(i),this._debounceInformation=l.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new On),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequestCts=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(d=>{(d.hasChanged(70)||d.hasChanged(93))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(e){const i=this._editor.getModel(),n=i!==null&&(this._editor.getOption(70)||this._editor.getOption(93))&&this._providers.has(i);if(n===this._enabled&&!e||(this._enabled=n,this.clearRanges(),this._localToDispose.clear(),!n||i===null))return;this._localToDispose.add(Mr.runAndSubscribe(i.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(i.getLanguageId()).getWordDefinition()}));const s=new hT(this._debounceInformation.get(i)),l=()=>{var g;this._rangeUpdateTriggerPromise=s.trigger(()=>this.updateRanges(),(g=this._debounceDuration)!==null&&g!==void 0?g:this._debounceInformation.get(i))},d=new hT(0),f=g=>{this._rangeSyncTriggerPromise=d.trigger(()=>this._syncRanges(g))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{l()})),this._localToDispose.add(this._editor.onDidChangeModelContent(g=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const y=this._currentDecorations.getRange(0);if(y&&g.changes.every(w=>y.intersectRanges(w.range))){f(this._syncRangesToken);return}}l()})),this._localToDispose.add({dispose:()=>{s.dispose(),d.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||this._currentDecorations.length===0)return;const i=this._editor.getModel(),n=this._currentDecorations.getRange(0);if(!n||n.startLineNumber!==n.endLineNumber)return this.clearRanges();const s=i.getValueInRange(n);if(this._currentWordPattern){const d=s.match(this._currentWordPattern);if((d?d[0].length:0)!==s.length)return this.clearRanges()}const l=[];for(let d=1,f=this._currentDecorations.length;d1){this.clearRanges();return}const n=this._editor.getModel(),s=n.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===s){if(i.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const d=this._currentDecorations.getRange(0);if(d&&d.containsPosition(i))return}}this.clearRanges(),this._currentRequestPosition=i,this._currentRequestModelVersion=s;const l=this._currentRequestCts=new uh;try{const d=new o0(!1),f=await _Dt(this._providers,n,i,l.token);if(this._debounceInformation.update(n,d.elapsed()),l!==this._currentRequestCts||(this._currentRequestCts=null,s!==n.getVersionId()))return;let g=[];f!=null&&f.ranges&&(g=f.ranges),this._currentWordPattern=(f==null?void 0:f.wordPattern)||this._languageWordPattern;let y=!1;for(let x=0,I=g.length;x({range:x,options:y0e.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(w),this._syncRangesToken++}catch(d){pT(d)||Ba(d),(this._currentRequestCts===l||!this._currentRequestCts)&&this.clearRanges()}}};SR.ID="editor.contrib.linkedEditing";SR.DECORATION=Xa.register({description:"linked-editing",stickiness:0,className:EIi});SR=y0e=DIi([Ime(1,Zo),Ime(2,js),Ime(3,Kd),Ime(4,fk)],SR);class IIi extends ms{constructor(){super({id:"editor.action.linkedEditing",label:V("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:xn.and(Lt.writable,Lt.hasRenameProvider),kbOpts:{kbExpr:Lt.editorTextFocus,primary:3132,weight:100}})}runCommand(e,i){const n=e.get(Oc),[s,l]=Array.isArray(i)&&i||[void 0,void 0];return Oo.isUri(s)&&yi.isIPosition(l)?n.openCodeEditor({resource:s},n.getActiveCodeEditor()).then(d=>{d&&(d.setPosition(l),d.invokeWithinContext(f=>(this.reportTelemetry(f,d),this.run(f,d))))},Ba):super.runCommand(e,i)}run(e,i){const n=SR.get(i);return n?Promise.resolve(n.updateRanges(!0)):Promise.resolve()}}const NIi=sg.bindToContribution(SR.get);qr(new NIi({id:"cancelLinkedEditingInput",precondition:hDt,handler:c=>c.clearRanges(),kbOpts:{kbExpr:Lt.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));function _Dt(c,e,i,n){const s=c.ordered(e);return AHe(s.map(l=>async()=>{try{return await l.provideLinkedEditingRanges(e,i,n)}catch(d){r_(d);return}}),l=>!!l&&bv(l==null?void 0:l.ranges))}Ft("editor.linkedEditingBackground",{dark:Qi.fromHex("#f00").transparent(.3),light:Qi.fromHex("#f00").transparent(.3),hcDark:Qi.fromHex("#f00").transparent(.3),hcLight:Qi.white},V("editorLinkedEditingBackground","Background color when the editor auto renames on type."));kL("_executeLinkedEditingProvider",(c,e,i)=>{const{linkedEditingRangeProvider:n}=c.get(js);return _Dt(n,e,i,Gl.None)});Bc(SR.ID,SR,1);hr(IIi);let LIi=class{constructor(e,i){this._link=e,this._provider=i}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}async resolve(e){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,e)).then(i=>(this._link=i||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))}};class k1e{constructor(e){this._disposables=new On;let i=[];for(const[n,s]of e){const l=n.links.map(d=>new LIi(d,s));i=k1e._union(i,l),A1e(n)&&this._disposables.add(n)}this.links=i}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,i){const n=[];let s,l,d,f;for(s=0,d=0,l=e.length,f=i.length;sPromise.resolve(l.provideLinks(e,i)).then(f=>{f&&(n[d]=[f,l])},r_));return Promise.all(s).then(()=>{const l=new k1e(kE(n));return i.isCancellationRequested?(l.dispose(),new k1e([])):l})}uc.registerCommand("_executeLinkProvider",async(c,...e)=>{let[i,n]=e;Ac(i instanceof Oo),typeof n!="number"&&(n=0);const{linkProvider:s}=c.get(js),l=c.get(Qf).getModel(i);if(!l)return[];const d=await pDt(s,l,Gl.None);if(!d)return[];for(let g=0;g=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Nme=function(c,e){return function(i,n){e(i,n,c)}},xVe;let Lq=xVe=class extends Ii{static get(e){return e.getContribution(xVe.ID)}constructor(e,i,n,s,l){super(),this.editor=e,this.openerService=i,this.notificationService=n,this.languageFeaturesService=s,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=l.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new id(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const d=this._register(new lbe(e));this._register(d.onMouseMoveOrRelevantKeyDown(([f,g])=>{this._onEditorMouseMove(f,g)})),this._register(d.onExecute(f=>{this.onEditorMouseUp(f)})),this._register(d.onCancel(f=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(f=>{f.hasChanged(71)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(e.onDidChangeModelContent(f=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(e.onDidChangeModel(f=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(e.onDidChangeModelLanguage(f=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(f=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(71))return;const e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=Hg(i=>pDt(this.providers,e,i));try{const i=new o0(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(e,i.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(i){Ba(i)}finally{this.computePromise=null}}}updateDecorations(e){const i=this.editor.getOption(78)==="altKey",n=[],s=Object.keys(this.currentOccurrences);for(const d of s){const f=this.currentOccurrences[d];n.push(f.decorationId)}const l=[];if(e)for(const d of e)l.push(jU.decoration(d,i));this.editor.changeDecorations(d=>{const f=d.deltaDecorations(n,l);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let g=0,y=f.length;g{s.activate(l,n),this.activeLinkDecorationId=s.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e=this.editor.getOption(78)==="altKey";if(this.activeLinkDecorationId){const i=this.currentOccurrences[this.activeLinkDecorationId];i&&this.editor.changeDecorations(n=>{i.deactivate(n,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const i=this.getLinkOccurrence(e.target.position);i&&this.openLinkOccurrence(i,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,i,n=!1){if(!this.openerService)return;const{link:s}=e;s.resolve(Gl.None).then(l=>{if(typeof l=="string"&&this.editor.hasModel()){const d=this.editor.getModel().uri;if(d.scheme===wa.file&&l.startsWith(`${wa.file}:`)){const f=Oo.parse(l);if(f.scheme===wa.file){const g=LN(f);let y=null;g.startsWith("/./")||g.startsWith("\\.\\")?y=`.${g.substr(1)}`:(g.startsWith("//./")||g.startsWith("\\\\.\\"))&&(y=`.${g.substr(2)}`),y&&(l=Kfi(d,y))}}}return this.openerService.open(l,{openToSide:i,fromUserGesture:n,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},l=>{const d=l instanceof Error?l.message:l;d==="invalid"?this.notificationService.warn(V("invalid.url","Failed to open this link because it is not well-formed: {0}",s.url.toString())):d==="missing"?this.notificationService.warn(V("missing.url","Failed to open this link because its target is missing.")):Ba(l)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const i=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const n of i){const s=this.currentOccurrences[n.id];if(s)return s}return null}isEnabled(e,i){return!!(e.target.type===6&&(e.hasTriggerModifier||i&&i.keyCodeIsTriggerKey))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&((e=this.activeLinksList)===null||e===void 0||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};Lq.ID="editor.linkDetector";Lq=xVe=PIi([Nme(1,KC),Nme(2,L_),Nme(3,js),Nme(4,fk)],Lq);const jyt={general:Xa.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:Xa.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class jU{static decoration(e,i){return{range:e.range,options:jU._getOptions(e,i,!1)}}static _getOptions(e,i,n){const s={...n?jyt.active:jyt.general};return s.hoverMessage=AIi(e,i),s}constructor(e,i){this.link=e,this.decorationId=i}activate(e,i){e.changeDecorationOptions(this.decorationId,jU._getOptions(this.link,i,!0))}deactivate(e,i){e.changeDecorationOptions(this.decorationId,jU._getOptions(this.link,i,!1))}}function AIi(c,e){const i=c.url&&/^command:/i.test(c.url.toString()),n=c.tooltip?c.tooltip:i?V("links.navigate.executeCmd","Execute command"):V("links.navigate.follow","Follow link"),s=e?Wl?V("links.navigate.kb.meta.mac","cmd + click"):V("links.navigate.kb.meta","ctrl + click"):Wl?V("links.navigate.kb.alt.mac","option + click"):V("links.navigate.kb.alt","alt + click");if(c.url){let l="";if(/^command:/i.test(c.url.toString())){const f=c.url.toString().match(/^command:([^?#]+)/);if(f){const g=f[1];l=V("tooltip.explanation","Execute command {0}",g)}}return new vv("",!0).appendLink(c.url.toString(!0).replace(/ /g,"%20"),n,l).appendMarkdown(` (${s})`)}else return new vv().appendText(`${n} (${s})`)}class OIi extends ms{constructor(){super({id:"editor.action.openLink",label:V("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,i){const n=Lq.get(i);if(!n||!i.hasModel())return;const s=i.getSelections();for(const l of s){const d=n.getLinkOccurrence(l.getEndPosition());d&&n.openLinkOccurrence(d,!1)}}}Bc(Lq.ID,Lq,1);hr(OIi);class kVe extends Ii{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(i=>{const n=this._editor.getOption(117);n>=0&&i.target.type===6&&i.target.position.column>=n&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}}kVe.ID="editor.contrib.longLinesHelper";Bc(kVe.ID,kVe,2);const Lme=Ft("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},V("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);Ft("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},V("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0);Ft("editor.wordHighlightTextBackground",{light:Lme,dark:Lme,hcDark:Lme,hcLight:Lme},V("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);const Pme=Ft("editor.wordHighlightBorder",{light:null,dark:null,hcDark:bf,hcLight:bf},V("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));Ft("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:bf,hcLight:bf},V("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable."));Ft("editor.wordHighlightTextBorder",{light:Pme,dark:Pme,hcDark:Pme,hcLight:Pme},V("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));const MIi=Ft("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},V("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),RIi=Ft("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},V("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),FIi=Ft("editorOverviewRuler.wordHighlightTextForeground",{dark:Dee,light:Dee,hcDark:Dee,hcLight:Dee},V("overviewRulerWordHighlightTextForeground","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),BIi=Xa.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Lh(RIi),position:ww.Center},minimap:{color:Lh(oye),position:1}}),WIi=Xa.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:Lh(FIi),position:ww.Center},minimap:{color:Lh(oye),position:1}}),VIi=Xa.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:Lh(Dee),position:ww.Center},minimap:{color:Lh(oye),position:1}}),HIi=Xa.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),jIi=Xa.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:Lh(MIi),position:ww.Center},minimap:{color:Lh(oye),position:1}});function zIi(c){return c===Mte.Write?BIi:c===Mte.Text?WIi:jIi}function UIi(c){return c?HIi:VIi}dk((c,e)=>{const i=c.getColor(aje);i&&e.addRule(`.monaco-editor .selectionHighlight { background-color: ${i.transparent(.5)}; }`)});var qIi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},$Ii=function(c,e){return function(i,n){e(i,n,c)}},TVe;function AR(c,e){const i=e.filter(n=>!c.find(s=>s.equals(n)));if(i.length>=1){const n=i.map(l=>`line ${l.viewState.position.lineNumber} column ${l.viewState.position.column}`).join(", "),s=i.length===1?V("cursorAdded","Cursor added: {0}",n):V("cursorsAdded","Cursors added: {0}",n);hL(s)}}class JIi extends ms{constructor(){super({id:"editor.action.insertCursorAbove",label:V("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:Lt.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:_t.MenubarSelectionMenu,group:"3_multi",title:V({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,i,n){if(!i.hasModel())return;let s=!0;n&&n.logicalLine===!1&&(s=!1);const l=i._getViewModel();if(l.cursorConfig.readOnly)return;l.model.pushStackElement();const d=l.getCursorStates();l.setCursorStates(n.source,3,Zm.addCursorUp(l,d,s)),l.revealTopMostCursor(n.source),AR(d,l.getCursorStates())}}class GIi extends ms{constructor(){super({id:"editor.action.insertCursorBelow",label:V("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:Lt.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:_t.MenubarSelectionMenu,group:"3_multi",title:V({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,i,n){if(!i.hasModel())return;let s=!0;n&&n.logicalLine===!1&&(s=!1);const l=i._getViewModel();if(l.cursorConfig.readOnly)return;l.model.pushStackElement();const d=l.getCursorStates();l.setCursorStates(n.source,3,Zm.addCursorDown(l,d,s)),l.revealBottomMostCursor(n.source),AR(d,l.getCursorStates())}}class KIi extends ms{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:V("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:Lt.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:_t.MenubarSelectionMenu,group:"3_multi",title:V({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,i,n){if(!e.isEmpty()){for(let s=e.startLineNumber;s1&&n.push(new Qs(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,i){if(!i.hasModel())return;const n=i.getModel(),s=i.getSelections(),l=i._getViewModel(),d=l.getCursorStates(),f=[];s.forEach(g=>this.getCursorsForSelection(g,n,f)),f.length>0&&i.setSelections(f),AR(d,l.getCursorStates())}}class QIi extends ms{constructor(){super({id:"editor.action.addCursorsToBottom",label:V("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,i){if(!i.hasModel())return;const n=i.getSelections(),s=i.getModel().getLineCount(),l=[];for(let g=n[0].startLineNumber;g<=s;g++)l.push(new Qs(g,n[0].startColumn,g,n[0].endColumn));const d=i._getViewModel(),f=d.getCursorStates();l.length>0&&i.setSelections(l),AR(f,d.getCursorStates())}}class XIi extends ms{constructor(){super({id:"editor.action.addCursorsToTop",label:V("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,i){if(!i.hasModel())return;const n=i.getSelections(),s=[];for(let f=n[0].startLineNumber;f>=1;f--)s.push(new Qs(f,n[0].startColumn,f,n[0].endColumn));const l=i._getViewModel(),d=l.getCursorStates();s.length>0&&i.setSelections(s),AR(d,l.getCursorStates())}}class Ame{constructor(e,i,n){this.selections=e,this.revealRange=i,this.revealScrollType=n}}class ine{static create(e,i){if(!e.hasModel())return null;const n=i.getState();if(!e.hasTextFocus()&&n.isRevealed&&n.searchString.length>0)return new ine(e,i,!1,n.searchString,n.wholeWord,n.matchCase,null);let s=!1,l,d;const f=e.getSelections();f.length===1&&f[0].isEmpty()?(s=!0,l=!0,d=!0):(l=n.wholeWord,d=n.matchCase);const g=e.getSelection();let y,w=null;if(g.isEmpty()){const x=e.getConfiguredWordAtPosition(g.getStartPosition());if(!x)return null;y=x.word,w=new Qs(g.startLineNumber,x.startColumn,g.startLineNumber,x.endColumn)}else y=e.getModel().getValueInRange(g).replace(/\r\n/g,` +`);return new ine(e,i,s,y,l,d,w)}constructor(e,i,n,s,l,d,f){this._editor=e,this.findController=i,this.isDisconnectedFromFindController=n,this.searchText=s,this.wholeWord=l,this.matchCase=d,this.currentMatch=f}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const i=this._editor.getSelections();return new Ame(i.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const i=this._editor.getSelections();return new Ame(i.slice(0,i.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const s=this.currentMatch;return this.currentMatch=null,s}this.findController.highlightFindOptions();const e=this._editor.getSelections(),i=e[e.length-1],n=this._editor.getModel().findNextMatch(this.searchText,i.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(131):null,!1);return n?new Qs(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const i=this._editor.getSelections();return new Ame(i.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const i=this._editor.getSelections();return new Ame(i.slice(0,i.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const s=this.currentMatch;return this.currentMatch=null,s}this.findController.highlightFindOptions();const e=this._editor.getSelections(),i=e[e.length-1],n=this._editor.getModel().findPreviousMatch(this.searchText,i.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(131):null,!1);return n?new Qs(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const i=this._editor.getModel();return e?i.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(131):null,!1,1073741824):i.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(131):null,!1,1073741824)}}class z9 extends Ii{static get(e){return e.getContribution(z9.ID)}constructor(e){super(),this._sessionDispose=this._register(new On),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const i=ine.create(this._editor,e);if(!i)return;this._session=i;const n={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(n.wholeWordOverride=1,n.matchCaseOverride=1,n.isRegexOverride=2),e.getState().change(n,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(s=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(s=>{(s.matchCase||s.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,i){if(!i.isEmpty())return i;const n=this._editor.getConfiguredWordAtPosition(i.getStartPosition());return n?new Qs(i.startLineNumber,n.startColumn,i.startLineNumber,n.endColumn):i}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const i=this._editor.getSelections();if(i.length>1){const s=e.getState().matchCase;if(!gDt(this._editor.getModel(),i,s)){const d=this._editor.getModel(),f=[];for(let g=0,y=i.length;g0&&n.isRegex){const s=this._editor.getModel();n.searchScope?i=s.findMatches(n.searchString,n.searchScope,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(131):null,!1,1073741824):i=s.findMatches(n.searchString,!0,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(131):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;i=this._session.selectAll(n.searchScope)}if(i.length>0){const s=this._editor.getSelection();for(let l=0,d=i.length;lnew Qs(l.range.startLineNumber,l.range.startColumn,l.range.endLineNumber,l.range.endColumn)))}}}z9.ID="editor.contrib.multiCursorController";class n$ extends ms{run(e,i){const n=z9.get(i);if(!n)return;const s=i._getViewModel();if(s){const l=s.getCursorStates(),d=Iy.get(i);if(d)this._run(n,d);else{const f=e.get(So).createInstance(Iy,i);this._run(n,f),f.dispose()}AR(l,s.getCursorStates())}}}class ZIi extends n${constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:V("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:Lt.focus,primary:2082,weight:100},menuOpts:{menuId:_t.MenubarSelectionMenu,group:"3_multi",title:V({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,i){e.addSelectionToNextFindMatch(i)}}class YIi extends n${constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:V("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:_t.MenubarSelectionMenu,group:"3_multi",title:V({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,i){e.addSelectionToPreviousFindMatch(i)}}class eNi extends n${constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:V("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:Lt.focus,primary:qp(2089,2082),weight:100}})}_run(e,i){e.moveSelectionToNextFindMatch(i)}}class tNi extends n${constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:V("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,i){e.moveSelectionToPreviousFindMatch(i)}}class iNi extends n${constructor(){super({id:"editor.action.selectHighlights",label:V("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:Lt.focus,primary:3114,weight:100},menuOpts:{menuId:_t.MenubarSelectionMenu,group:"3_multi",title:V({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,i){e.selectAll(i)}}class nNi extends n${constructor(){super({id:"editor.action.changeAll",label:V("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:xn.and(Lt.writable,Lt.editorTextFocus),kbOpts:{kbExpr:Lt.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,i){e.selectAll(i)}}class rNi{constructor(e,i,n,s,l){this._model=e,this._searchText=i,this._matchCase=n,this._wordSeparators=s,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,l&&this._model===l._model&&this._searchText===l._searchText&&this._matchCase===l._matchCase&&this._wordSeparators===l._wordSeparators&&this._modelVersionId===l._modelVersionId&&(this._cachedFindMatches=l._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(e=>e.range),this._cachedFindMatches.sort(at.compareRangesUsingStarts)),this._cachedFindMatches}}let nne=TVe=class extends Ii{constructor(e,i){super(),this._languageFeaturesService=i,this.editor=e,this._isEnabled=e.getOption(108),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new id(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(s=>{this._isEnabled=e.getOption(108)})),this._register(e.onDidChangeCursorSelection(s=>{this._isEnabled&&(s.selection.isEmpty()?s.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(s=>{this._setState(null)})),this._register(e.onDidChangeModelContent(s=>{this._isEnabled&&this.updateSoon.schedule()}));const n=Iy.get(e);n&&this._register(n.getState().onFindReplaceStateChange(s=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(TVe._createState(this.state,this._isEnabled,this.editor))}static _createState(e,i,n){if(!i||!n.hasModel())return null;const s=n.getSelection();if(s.startLineNumber!==s.endLineNumber)return null;const l=z9.get(n);if(!l)return null;const d=Iy.get(n);if(!d)return null;let f=l.getSession(d);if(!f){const w=n.getSelections();if(w.length>1){const I=d.getState().matchCase;if(!gDt(n.getModel(),w,I))return null}f=ine.create(n,d)}if(!f||f.currentMatch||/^[ \t]+$/.test(f.searchText)||f.searchText.length>200)return null;const g=d.getState(),y=g.matchCase;if(g.isRevealed){let w=g.searchString;y||(w=w.toLowerCase());let x=f.searchText;if(y||(x=x.toLowerCase()),w===x&&f.matchCase===g.matchCase&&f.wholeWord===g.wholeWord&&!g.isRegex)return null}return new rNi(n.getModel(),f.searchText,f.matchCase,f.wholeWord?n.getOption(131):null,e)}_setState(e){if(this.state=e,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;const i=this.editor.getModel();if(i.isTooLargeForTokenization())return;const n=this.state.findMatches(),s=this.editor.getSelections();s.sort(at.compareRangesUsingStarts);const l=[];for(let y=0,w=0,x=n.length,I=s.length;y=I)l.push(P),y++;else{const O=at.compareRangesUsingStarts(P,s[w]);O<0?((s[w].isEmpty()||!at.areIntersecting(P,s[w]))&&l.push(P),y++):(O>0||y++,w++)}}const d=this.editor.getOption(81)!=="off",f=this._languageFeaturesService.documentHighlightProvider.has(i)&&d,g=l.map(y=>({range:y,options:UIi(f)}));this._decorations.set(g)}dispose(){this._setState(null),super.dispose()}};nne.ID="editor.contrib.selectionHighlighter";nne=TVe=qIi([$Ii(1,js)],nne);function gDt(c,e,i){const n=zyt(c,e[0],!i);for(let s=1,l=e.length;s=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},fNi=function(c,e){return function(i,n){e(i,n,c)}};const bFe="inline-edit";let DVe=class extends Ii{constructor(e,i,n){super(),this.editor=e,this.model=i,this.languageService=n,this.isDisposed=yc(this,!1),this.currentTextModel=Zu(this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=Ma(this,s=>{var l;if(this.isDisposed.read(s))return;const d=this.currentTextModel.read(s);if(d!==this.model.targetTextModel.read(s))return;const f=this.model.ghostText.read(s);if(!f)return;let g=(l=this.model.range)===null||l===void 0?void 0:l.read(s);g&&g.startLineNumber===g.endLineNumber&&g.startColumn===g.endColumn&&(g=void 0);const y=(g?g.startLineNumber===g.endLineNumber:!0)&&f.parts.length===1&&f.parts[0].lines.length===1,w=f.parts.length===1&&f.parts[0].lines.every(he=>he.length===0),x=[],I=[];function P(he,we){if(I.length>0){const Te=I[I.length-1];we&&Te.decorations.push(new Sy(Te.content.length+1,Te.content.length+1+he[0].length,we,0)),Te.content+=he[0],he=he.slice(1)}for(const Te of he)I.push({content:Te,decorations:we?[new Sy(1,Te.length+1,we,0)]:[]})}const O=d.getLineContent(f.lineNumber);let W,X=0;if(!w){for(const he of f.parts){let we=he.lines;g&&!y&&(P(we,bFe),we=[]),W===void 0?(x.push({column:he.column,text:we[0],preview:he.preview}),we=we.slice(1)):P([O.substring(X,he.column-1)],void 0),we.length>0&&(P(we,bFe),W===void 0&&he.column<=O.length&&(W=he.column)),X=he.column-1}W!==void 0&&P([O.substring(X)],void 0)}const Z=W!==void 0?new KTt(W,O.length+1):void 0,ee=y||!g?f.lineNumber:g.endLineNumber-1;return{inlineTexts:x,additionalLines:I,hiddenRange:Z,lineNumber:ee,additionalReservedLineCount:this.model.minReservedLineCount.read(s),targetTextModel:d,range:g,isSingleLine:y,isPureRemove:w,backgroundColoring:this.model.backgroundColoring.read(s)}}),this.decorations=Ma(this,s=>{const l=this.uiState.read(s);if(!l)return[];const d=[];if(l.hiddenRange&&d.push({range:l.hiddenRange.toRange(l.lineNumber),options:{inlineClassName:"inline-edit-hidden",description:"inline-edit-hidden"}}),l.range){const f=[];if(l.isSingleLine)f.push(l.range);else if(l.isPureRemove){const y=l.range.endLineNumber-l.range.startLineNumber;for(let w=0;w{const l=this.uiState.read(s);return l&&!l.isPureRemove?{lineNumber:l.lineNumber,additionalLines:l.additionalLines,minReservedLineCount:l.additionalReservedLineCount,targetTextModel:l.targetTextModel}:void 0}))),this._register(go(()=>{this.isDisposed.set(!0,void 0)})),this._register(QTt(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};DVe=dNi([fNi(2,If)],DVe);var SUe=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},HN=function(c,e){return function(i,n){e(i,n,c)}},b0e;let EVe=class extends Ii{constructor(e,i,n){super(),this.editor=e,this.model=i,this.instantiationService=n,this.alwaysShowToolbar=Zu(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(63).showToolbar==="always"),this.sessionPosition=void 0,this.position=Ma(this,s=>{var l,d,f;const g=(l=this.model.read(s))===null||l===void 0?void 0:l.widget.model.ghostText.read(s);if(!this.alwaysShowToolbar.read(s)||!g||g.parts.length===0)return this.sessionPosition=void 0,null;const y=g.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==g.lineNumber&&(this.sessionPosition=void 0);const w=new yi(g.lineNumber,Math.min(y,(f=(d=this.sessionPosition)===null||d===void 0?void 0:d.column)!==null&&f!==void 0?f:Number.MAX_SAFE_INTEGER));return this.sessionPosition=w,w}),this._register(ck((s,l)=>{if(!this.model.read(s)||!this.alwaysShowToolbar.read(s))return;const f=l.add(this.instantiationService.createInstance(Pq,this.editor,!0,this.position));e.addContentWidget(f),l.add(go(()=>e.removeContentWidget(f)))}))}};EVe=SUe([HN(2,So)],EVe);let Pq=b0e=class extends Ii{constructor(e,i,n,s,l,d){super(),this.editor=e,this.withBorder=i,this._position=n,this._contextKeyService=l,this._menuService=d,this.id=`InlineEditHintsContentWidget${b0e.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=Yc("div.inlineEditHints",{className:this.withBorder?".withBorder":""},[Yc("div@toolBar")]),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(_t.InlineEditActions,this._contextKeyService)),this.toolBar=this._register(s.createInstance(IVe,this.nodes.toolBar,this.editor,_t.InlineEditToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:f=>f.startsWith("primary")},actionViewItemProvider:(f,g)=>{if(f instanceof VC)return s.createInstance(hNi,f,void 0)},telemetrySource:"InlineEditToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility(f=>{b0e._dropDownVisible=f})),this._register(Cl(f=>{this._position.read(f),this.editor.layoutContentWidget(this)})),this._register(Cl(f=>{const g=[];for(const[y,w]of this.inlineCompletionsActionsMenus.getActions())for(const x of w)x instanceof VC&&g.push(x);g.length>0&&g.unshift(new Up),this.toolBar.setAdditionalSecondaryActions(g)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};Pq._dropDownVisible=!1;Pq.id=0;Pq=b0e=SUe([HN(3,So),HN(4,Zo),HN(5,Dw)],Pq);class hNi extends cR{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const i=Yc("div.keybinding").root;this._register(new Kq(i,FC,{disableTitle:!0,...ekt})).set(e),this.label.textContent=this._action.label,this.label.appendChild(i),this.label.classList.add("inlineEditStatusBarItemLabel")}}updateTooltip(){}}let IVe=class extends Pie{constructor(e,i,n,s,l,d,f,g,y,w){super(e,{resetMenu:n,...s},l,d,f,g,y,w),this.editor=i,this.menuId=n,this.options2=s,this.menuService=l,this.contextKeyService=d,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this._store.add(this.editor.onDidChangeCursorPosition(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,i,n,s,l,d,f;const g=[],y=[];Mye(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:g,secondary:y},(n=(i=this.options2)===null||i===void 0?void 0:i.toolbarOptions)===null||n===void 0?void 0:n.primaryGroup,(l=(s=this.options2)===null||s===void 0?void 0:s.toolbarOptions)===null||l===void 0?void 0:l.shouldInlineSubmenu,(f=(d=this.options2)===null||d===void 0?void 0:d.toolbarOptions)===null||f===void 0?void 0:f.useSeparatorsInPrimaryActions),y.push(...this.additionalActions),g.unshift(...this.prependedPrimaryActions),this.setActions(g,y)}setAdditionalSecondaryActions(e){ch(this.additionalActions,e,(i,n)=>i===n)||(this.additionalActions=e,this.updateToolbar())}};IVe=SUe([HN(4,Dw),HN(5,Zo),HN(6,GC),HN(7,ou),HN(8,ff),HN(9,R0)],IVe);var _Ni=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},yee=function(c,e){return function(i,n){e(i,n,c)}},Y5;class pNi{constructor(e,i){this.widget=e,this.edit=i}dispose(){this.widget.dispose()}}let rg=Y5=class extends Ii{static get(e){return e.getContribution(Y5.ID)}constructor(e,i,n,s,l,d){super(),this.editor=e,this.instantiationService=i,this.contextKeyService=n,this.languageFeaturesService=s,this._commandService=l,this._configurationService=d,this._isVisibleContext=Y5.inlineEditVisibleContext.bindTo(this.contextKeyService),this._isCursorAtInlineEditContext=Y5.cursorAtInlineEditContext.bindTo(this.contextKeyService),this._currentEdit=this._register(yie(this,void 0)),this._isAccepting=yc(this,!1),this._enabled=Zu(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(63).enabled),this._fontFamily=Zu(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(63).fontFamily),this._backgroundColoring=Zu(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(63).backgroundColoring);const f=yv("InlineEditController.modelContentChangedSignal",e.onDidChangeModelContent);this._register(Cl(I=>{this._enabled.read(I)&&(f.read(I),!this._isAccepting.read(I)&&this.getInlineEdit(e,!0))}));const g=Zu(e.onDidChangeCursorPosition,()=>e.getPosition());this._register(Cl(I=>{if(!this._enabled.read(I))return;const P=g.read(I);P&&this.checkCursorPosition(P)})),this._register(Cl(I=>{const P=this._currentEdit.read(I);if(this._isCursorAtInlineEditContext.set(!1),!P){this._isVisibleContext.set(!1);return}this._isVisibleContext.set(!0);const O=e.getPosition();O&&this.checkCursorPosition(O)}));const y=yv("InlineEditController.editorBlurSignal",e.onDidBlurEditorWidget);this._register(Cl(async I=>{var P;this._enabled.read(I)&&(y.read(I),!(this._configurationService.getValue("editor.experimentalInlineEdit.keepOnBlur")||e.getOption(63).keepOnBlur)&&((P=this._currentRequestCts)===null||P===void 0||P.dispose(!0),this._currentRequestCts=void 0,await this.clear(!1)))}));const w=yv("InlineEditController.editorFocusSignal",e.onDidFocusEditorText);this._register(Cl(I=>{this._enabled.read(I)&&(w.read(I),this.getInlineEdit(e,!0))}));const x=this._register(SCt());this._register(Cl(I=>{const P=this._fontFamily.read(I);x.setStyle(P===""||P==="default"?"":` +.monaco-editor .inline-edit-decoration, +.monaco-editor .inline-edit-decoration-preview, +.monaco-editor .inline-edit { + font-family: ${P}; +}`)})),this._register(new EVe(this.editor,this._currentEdit,this.instantiationService))}checkCursorPosition(e){var i;if(!this._currentEdit){this._isCursorAtInlineEditContext.set(!1);return}const n=(i=this._currentEdit.get())===null||i===void 0?void 0:i.edit;if(!n){this._isCursorAtInlineEditContext.set(!1);return}this._isCursorAtInlineEditContext.set(at.containsPosition(n.range,e))}validateInlineEdit(e,i){var n,s;if(i.text.includes(` +`)&&i.range.startLineNumber!==i.range.endLineNumber&&i.range.startColumn!==i.range.endColumn){if(i.range.startColumn!==1)return!1;const d=i.range.endLineNumber,f=i.range.endColumn,g=(s=(n=e.getModel())===null||n===void 0?void 0:n.getLineLength(d))!==null&&s!==void 0?s:0;if(f!==g+1)return!1}return!0}async fetchInlineEdit(e,i){this._currentRequestCts&&this._currentRequestCts.dispose(!0);const n=e.getModel();if(!n)return;const s=n.getVersionId(),l=this.languageFeaturesService.inlineEditProvider.all(n);if(l.length===0)return;const d=l[0];this._currentRequestCts=new uh;const f=this._currentRequestCts.token,g=i?O0e.Automatic:O0e.Invoke;if(i&&await gNi(50,f),f.isCancellationRequested||n.isDisposed()||n.getVersionId()!==s)return;const w=await d.provideInlineEdit(n,{triggerKind:g},f);if(w&&!(f.isCancellationRequested||n.isDisposed()||n.getVersionId()!==s)&&this.validateInlineEdit(e,w))return w}async getInlineEdit(e,i){var n;this._isCursorAtInlineEditContext.set(!1),await this.clear();const s=await this.fetchInlineEdit(e,i);if(!s)return;const l=s.range.endLineNumber,d=s.range.endColumn,f=s.text.endsWith(` +`)&&!(s.range.startLineNumber===s.range.endLineNumber&&s.range.startColumn===s.range.endColumn)?s.text.slice(0,-1):s.text,g=new Gie(l,[new y1e(d,f,!1)]),y=this.instantiationService.createInstance(DVe,this.editor,{ghostText:pE(g),minReservedLineCount:pE(0),targetTextModel:pE((n=this.editor.getModel())!==null&&n!==void 0?n:void 0),range:pE(s.range),backgroundColoring:this._backgroundColoring});this._currentEdit.set(new pNi(y,s),void 0)}async trigger(){await this.getInlineEdit(this.editor,!1)}async jumpBack(){this._jumpBackPosition&&(this.editor.setPosition(this._jumpBackPosition),this.editor.revealPositionInCenterIfOutsideViewport(this._jumpBackPosition))}async accept(){var e;this._isAccepting.set(!0,void 0);const i=(e=this._currentEdit.get())===null||e===void 0?void 0:e.edit;if(!i)return;let n=i.text;i.text.startsWith(` +`)&&(n=i.text.substring(1)),this.editor.pushUndoStop(),this.editor.executeEdits("acceptCurrent",[Kf.replace(at.lift(i.range),n)]),i.accepted&&await this._commandService.executeCommand(i.accepted.id,...i.accepted.arguments||[]).then(void 0,r_),this.freeEdit(i),Rd(s=>{this._currentEdit.set(void 0,s),this._isAccepting.set(!1,s)})}jumpToCurrent(){var e,i;this._jumpBackPosition=(e=this.editor.getSelection())===null||e===void 0?void 0:e.getStartPosition();const n=(i=this._currentEdit.get())===null||i===void 0?void 0:i.edit;if(!n)return;const s=yi.lift({lineNumber:n.range.startLineNumber,column:n.range.startColumn});this.editor.setPosition(s),this.editor.revealPositionInCenterIfOutsideViewport(s)}async clear(e=!0){var i;const n=(i=this._currentEdit.get())===null||i===void 0?void 0:i.edit;n&&(n!=null&&n.rejected)&&e&&await this._commandService.executeCommand(n.rejected.id,...n.rejected.arguments||[]).then(void 0,r_),n&&this.freeEdit(n),this._currentEdit.set(void 0,void 0)}freeEdit(e){const i=this.editor.getModel();if(!i)return;const n=this.languageFeaturesService.inlineEditProvider.all(i);n.length!==0&&n[0].freeInlineEdit(e)}shouldShowHoverAt(e){const i=this._currentEdit.get();if(!i)return!1;const n=i.edit,s=i.widget.model;if(at.containsPosition(n.range,e.getStartPosition())||at.containsPosition(n.range,e.getEndPosition()))return!0;const d=s.ghostText.get();return d?d.parts.some(f=>e.containsPosition(new yi(d.lineNumber,f.column))):!1}shouldShowHoverAtViewZone(e){var i,n;return(n=(i=this._currentEdit.get())===null||i===void 0?void 0:i.widget.ownsViewZone(e))!==null&&n!==void 0?n:!1}};rg.ID="editor.contrib.inlineEditController";rg.inlineEditVisibleKey="inlineEditVisible";rg.inlineEditVisibleContext=new Xr(Y5.inlineEditVisibleKey,!1);rg.cursorAtInlineEditKey="cursorAtInlineEdit";rg.cursorAtInlineEditContext=new Xr(Y5.cursorAtInlineEditKey,!1);rg=Y5=_Ni([yee(1,So),yee(2,Zo),yee(3,js),yee(4,ff),yee(5,El)],rg);function gNi(c,e){return new Promise(i=>{let n;const s=setTimeout(()=>{n&&n.dispose(),i()},c);e&&(n=e.onCancellationRequested(()=>{clearTimeout(s),n&&n.dispose(),i()}))})}class mNi extends ms{constructor(){super({id:aNi,label:"Accept Inline Edit",alias:"Accept Inline Edit",precondition:xn.and(Lt.writable,rg.inlineEditVisibleContext),kbOpts:[{weight:101,primary:2,kbExpr:xn.and(Lt.writable,rg.inlineEditVisibleContext,rg.cursorAtInlineEditContext)}],menuOpts:[{menuId:_t.InlineEditToolbar,title:"Accept",group:"primary",order:1}]})}async run(e,i){const n=rg.get(i);await(n==null?void 0:n.accept())}}class vNi extends ms{constructor(){const e=xn.and(Lt.writable,xn.not(rg.inlineEditVisibleKey));super({id:"editor.action.inlineEdit.trigger",label:"Trigger Inline Edit",alias:"Trigger Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e}})}async run(e,i){const n=rg.get(i);n==null||n.trigger()}}class yNi extends ms{constructor(){const e=xn.and(Lt.writable,rg.inlineEditVisibleContext,xn.not(rg.cursorAtInlineEditKey));super({id:cNi,label:"Jump to Inline Edit",alias:"Jump to Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e},menuOpts:[{menuId:_t.InlineEditToolbar,title:"Jump To Edit",group:"primary",order:3,when:e}]})}async run(e,i){const n=rg.get(i);n==null||n.jumpToCurrent()}}class bNi extends ms{constructor(){const e=xn.and(Lt.writable,rg.cursorAtInlineEditContext);super({id:uNi,label:"Jump Back from Inline Edit",alias:"Jump Back from Inline Edit",precondition:e,kbOpts:{weight:110,primary:2646,kbExpr:e},menuOpts:[{menuId:_t.InlineEditToolbar,title:"Jump Back",group:"primary",order:3,when:e}]})}async run(e,i){const n=rg.get(i);n==null||n.jumpBack()}}class CNi extends ms{constructor(){const e=xn.and(Lt.writable,rg.inlineEditVisibleContext);super({id:lNi,label:"Reject Inline Edit",alias:"Reject Inline Edit",precondition:e,kbOpts:{weight:100,primary:9,kbExpr:e},menuOpts:[{menuId:_t.InlineEditToolbar,title:"Reject",group:"secondary",order:2}]})}async run(e,i){const n=rg.get(i);await(n==null?void 0:n.clear())}}var SNi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Uyt=function(c,e){return function(i,n){e(i,n,c)}};class wNi{constructor(e,i,n){this.owner=e,this.range=i,this.controller=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let NVe=class{constructor(e,i,n){this._editor=e,this._instantiationService=i,this._telemetryService=n,this.hoverOrdinal=5}suggestHoverAnchor(e){const i=rg.get(this._editor);if(!i)return null;const n=e.target;if(n.type===8){const s=n.detail;if(i.shouldShowHoverAtViewZone(s.viewZoneId)){const l=n.range;return new c9(1e3,this,l,e.event.posx,e.event.posy,!1)}}return n.type===7&&i.shouldShowHoverAt(n.range)?new c9(1e3,this,n.range,e.event.posx,e.event.posy,!1):n.type===6&&n.detail.mightBeForeignElement&&i.shouldShowHoverAt(n.range)?new c9(1e3,this,n.range,e.event.posx,e.event.posy,!1):null}computeSync(e,i){if(this._editor.getOption(63).showToolbar!=="onHover")return[];const n=rg.get(this._editor);return n&&n.shouldShowHoverAt(e.range)?[new wNi(this,e.range,n)]:[]}renderHoverParts(e,i){const n=new On;this._telemetryService.publicLog2("inlineEditHover.shown");const s=this._instantiationService.createInstance(Pq,this._editor,!1,pE(null));return e.fragment.appendChild(s.getDomNode()),n.add(s),n}};NVe=SNi([Uyt(1,So),Uyt(2,R0)],NVe);hr(mNi);hr(CNi);hr(yNi);hr(bNi);hr(vNi);Bc(rg.ID,rg,3);PR.register(NVe);const U9={Visible:new Xr("parameterHintsVisible",!1),MultipleSignatures:new Xr("parameterHintsMultipleSignatures",!1)};async function mDt(c,e,i,n,s){const l=c.ordered(e);for(const d of l)try{const f=await d.provideSignatureHelp(e,i,s,n);if(f)return f}catch(f){r_(f)}}uc.registerCommand("_executeSignatureHelpProvider",async(c,...e)=>{const[i,n,s]=e;Ac(Oo.isUri(i)),Ac(yi.isIPosition(n)),Ac(typeof s=="string"||!s);const l=c.get(js),d=await c.get(Lb).createModelReference(i);try{const f=await mDt(l.signatureHelpProvider,d.object.textEditorModel,yi.lift(n),{triggerKind:sL.Invoke,isRetrigger:!1,triggerCharacter:s},Gl.None);return f?(setTimeout(()=>f.dispose(),0),f.value):void 0}finally{d.dispose()}});var uM;(function(c){c.Default={type:0};class e{constructor(s,l){this.request=s,this.previouslyActiveHints=l,this.type=2}}c.Pending=e;class i{constructor(s){this.hints=s,this.type=1}}c.Active=i})(uM||(uM={}));class Wbe extends Ii{constructor(e,i,n=Wbe.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new ui),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=uM.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new jg),this.triggerChars=new $0e,this.retriggerChars=new $0e,this.triggerId=0,this.editor=e,this.providers=i,this.throttledDelayer=new hT(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=uM.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,i){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),i).catch(Ba)}next(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,i=this.state.hints.activeSignature,n=i%e===e-1,s=this.editor.getOption(86).cycle;if((e<2||n)&&!s){this.cancel();return}this.updateActiveSignature(n&&s?0:i+1)}previous(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,i=this.state.hints.activeSignature,n=i===0,s=this.editor.getOption(86).cycle;if((e<2||n)&&!s){this.cancel();return}this.updateActiveSignature(n&&s?e-1:i-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new uM.Active({...this.state.hints,activeSignature:e}),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){const i=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(xNi);this._pendingTriggers=[];const l={triggerKind:s.triggerKind,triggerCharacter:s.triggerCharacter,isRetrigger:i,activeSignatureHelp:n};if(!this.editor.hasModel())return!1;const d=this.editor.getModel(),f=this.editor.getPosition();this.state=new uM.Pending(Hg(g=>mDt(this.providers,d,f,l,g)),n);try{const g=await this.state.request;return e!==this.triggerId?(g==null||g.dispose(),!1):!g||!g.value.signatures||g.value.signatures.length===0?(g==null||g.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new uM.Active(g.value),this._lastSignatureHelpResult.value=g,this._onChangedHints.fire(this.state.hints),!0)}catch(g){return e===this.triggerId&&(this.state=uM.Default),Ba(g),!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 i of this.providers.ordered(e)){for(const n of i.signatureHelpTriggerCharacters||[])if(n.length){const s=n.charCodeAt(0);this.triggerChars.add(s),this.retriggerChars.add(s)}for(const n of i.signatureHelpRetriggerCharacters||[])n.length&&this.retriggerChars.add(n.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const i=e.length-1,n=e.charCodeAt(i);(this.triggerChars.has(n)||this.isTriggered&&this.retriggerChars.has(n))&&this.trigger({triggerKind:sL.TriggerCharacter,triggerCharacter:e.charAt(i)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:sL.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:sL.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(86).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}Wbe.DEFAULT_DELAY=120;function xNi(c,e){switch(e.triggerKind){case sL.Invoke:return e;case sL.ContentChange:return c;case sL.TriggerCharacter:default:return e}}var kNi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Ome=function(c,e){return function(i,n){e(i,n,c)}},LVe;const tw=Sr,TNi=Oh("parameter-hints-next",Dr.chevronDown,V("parameterHintsNextIcon","Icon for show next parameter hint.")),DNi=Oh("parameter-hints-previous",Dr.chevronUp,V("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let T1e=LVe=class extends Ii{constructor(e,i,n,s,l,d){super(),this.editor=e,this.model=i,this.telemetryService=d,this.renderDisposeables=this._register(new On),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new gL({editor:e},l,s)),this.keyVisible=U9.Visible.bindTo(n),this.keyMultipleSignatures=U9.MultipleSignatures.bindTo(n)}createParameterHintDOMNodes(){const e=tw(".editor-widget.parameter-hints-widget"),i=zn(e,tw(".phwrapper"));i.tabIndex=-1;const n=zn(i,tw(".controls")),s=zn(n,tw(".button"+Uo.asCSSSelector(DNi))),l=zn(n,tw(".overloads")),d=zn(n,tw(".button"+Uo.asCSSSelector(TNi)));this._register(tn(s,"click",I=>{nc.stop(I),this.previous()})),this._register(tn(d,"click",I=>{nc.stop(I),this.next()}));const f=tw(".body"),g=new Ine(f,{alwaysConsumeMouseWheel:!0});this._register(g),i.appendChild(g.getDomNode());const y=zn(f,tw(".signature")),w=zn(f,tw(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:y,overloads:l,docs:w,scrollbar:g},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(I=>{this.visible&&this.editor.layoutContentWidget(this)}));const x=()=>{if(!this.domNodes)return;const I=this.editor.getOption(50);this.domNodes.element.style.fontSize=`${I.fontSize}px`,this.domNodes.element.style.lineHeight=`${I.lineHeight/I.fontSize}`};x(),this._register(Mr.chain(this.editor.onDidChangeConfiguration.bind(this.editor),I=>I.filter(P=>P.hasChanged(50)))(x)),this._register(this.editor.onDidLayoutChange(I=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{var e;(e=this.domNodes)===null||e===void 0||e.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){var e;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,(e=this.domNodes)===null||e===void 0||e.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var i;if(this.renderDisposeables.clear(),!this.domNodes)return;const n=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",n),this.keyMultipleSignatures.set(n),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const s=e.signatures[e.activeSignature];if(!s)return;const l=zn(this.domNodes.signature,tw(".code")),d=this.editor.getOption(50);l.style.fontSize=`${d.fontSize}px`,l.style.fontFamily=d.fontFamily;const f=s.parameters.length>0,g=(i=s.activeParameter)!==null&&i!==void 0?i:e.activeParameter;if(f)this.renderParameters(l,s,g);else{const x=zn(l,tw("span"));x.textContent=s.label}const y=s.parameters[g];if(y!=null&&y.documentation){const x=tw("span.documentation");if(typeof y.documentation=="string")x.textContent=y.documentation;else{const I=this.renderMarkdownDocs(y.documentation);x.appendChild(I.element)}zn(this.domNodes.docs,tw("p",{},x))}if(s.documentation!==void 0)if(typeof s.documentation=="string")zn(this.domNodes.docs,tw("p",{},s.documentation));else{const x=this.renderMarkdownDocs(s.documentation);zn(this.domNodes.docs,x.element)}const w=this.hasDocs(s,y);if(this.domNodes.signature.classList.toggle("has-docs",w),this.domNodes.docs.classList.toggle("empty",!w),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,y){let x="";const I=s.parameters[g];Array.isArray(I.label)?x=s.label.substring(I.label[0],I.label[1]):x=I.label,I.documentation&&(x+=typeof I.documentation=="string"?`, ${I.documentation}`:`, ${I.documentation.value}`),s.documentation&&(x+=typeof s.documentation=="string"?`, ${s.documentation}`:`, ${s.documentation.value}`),this.announcedLabel!==x&&(Eb(V("hint","{0}, hint",x)),this.announcedLabel=x)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const i=new o0,n=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var l;(l=this.domNodes)===null||l===void 0||l.scrollbar.scanDomNode()}}));n.element.classList.add("markdown-docs");const s=i.elapsed();return s>300&&this.telemetryService.publicLog2("parameterHints.parseMarkdown",{renderDuration:s}),n}hasDocs(e,i){return!!(i&&typeof i.documentation=="string"&&yM(i.documentation).length>0||i&&typeof i.documentation=="object"&&yM(i.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&yM(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&yM(e.documentation.value).length>0)}renderParameters(e,i,n){const[s,l]=this.getParameterLabelOffsets(i,n),d=document.createElement("span");d.textContent=i.label.substring(0,s);const f=document.createElement("span");f.textContent=i.label.substring(s,l),f.className="parameter active";const g=document.createElement("span");g.textContent=i.label.substring(l),zn(e,d,f,g)}getParameterLabelOffsets(e,i){const n=e.parameters[i];if(n){if(Array.isArray(n.label))return n.label;if(n.label.length){const s=new RegExp(`(\\W|^)${Cw(n.label)}(?=\\W|$)`,"g");s.test(e.label);const l=s.lastIndex-n.label.length;return l>=0?[l,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 LVe.ID}updateMaxHeight(){if(!this.domNodes)return;const i=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=i;const n=this.domNodes.element.getElementsByClassName("phwrapper");n.length&&(n[0].style.maxHeight=i)}};T1e.ID="editor.widget.parameterHintsWidget";T1e=LVe=kNi([Ome(2,Zo),Ome(3,KC),Ome(4,If),Ome(5,R0)],T1e);Ft("editorHoverWidget.highlightForeground",{dark:lT,light:lT,hcDark:lT,hcLight:lT},V("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));var ENi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},qyt=function(c,e){return function(i,n){e(i,n,c)}},PVe;let q9=PVe=class extends Ii{static get(e){return e.getContribution(PVe.ID)}constructor(e,i,n){super(),this.editor=e,this.model=this._register(new Wbe(e,n.signatureHelpProvider)),this._register(this.model.onChangedHints(s=>{var l;s?(this.widget.value.show(),this.widget.value.render(s)):(l=this.widget.rawValue)===null||l===void 0||l.hide()})),this.widget=new FE(()=>this._register(i.createInstance(T1e,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){var e;(e=this.widget.rawValue)===null||e===void 0||e.previous()}next(){var e;(e=this.widget.rawValue)===null||e===void 0||e.next()}trigger(e){this.model.trigger(e,0)}};q9.ID="editor.controller.parameterHints";q9=PVe=ENi([qyt(1,So),qyt(2,js)],q9);class INi extends ms{constructor(){super({id:"editor.action.triggerParameterHints",label:V("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:Lt.hasSignatureHelpProvider,kbOpts:{kbExpr:Lt.editorTextFocus,primary:3082,weight:100}})}run(e,i){const n=q9.get(i);n==null||n.trigger({triggerKind:sL.Invoke})}}Bc(q9.ID,q9,2);hr(INi);const wUe=175,xUe=sg.bindToContribution(q9.get);qr(new xUe({id:"closeParameterHints",precondition:U9.Visible,handler:c=>c.cancel(),kbOpts:{weight:wUe,kbExpr:Lt.focus,primary:9,secondary:[1033]}}));qr(new xUe({id:"showPrevParameterHint",precondition:xn.and(U9.Visible,U9.MultipleSignatures),handler:c=>c.previous(),kbOpts:{weight:wUe,kbExpr:Lt.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}}));qr(new xUe({id:"showNextParameterHint",precondition:xn.and(U9.Visible,U9.MultipleSignatures),handler:c=>c.next(),kbOpts:{weight:wUe,kbExpr:Lt.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));var NNi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Mme=function(c,e){return function(i,n){e(i,n,c)}};const r$=new Xr("renameInputVisible",!1,V("renameInputVisible","Whether the rename input widget is visible"));new Xr("renameInputFocused",!1,V("renameInputFocused","Whether the rename input widget is focused"));let AVe=class{constructor(e,i,n,s,l,d){this._editor=e,this._acceptKeybindings=i,this._themeService=n,this._keybindingService=s,this._logService=d,this.allowEditorOverflow=!0,this._disposables=new On,this._visibleContextKey=r$.bindTo(l),this._isEditingRenameCandidate=!1,this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,this._candidates=new Set,this._beforeFirstInputFieldEditSW=new o0,this._inputWithButton=new LNi,this._disposables.add(this._inputWithButton),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(f=>{f.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 kUe(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(()=>{var e,i,n,s;((e=this._renameCandidateListView)===null||e===void 0?void 0:e.focusedCandidate)!==void 0&&(this._isEditingRenameCandidate=!0),(i=this._timeBeforeFirstInputFieldEdit)!==null&&i!==void 0||(this._timeBeforeFirstInputFieldEdit=this._beforeFirstInputFieldEditSW.elapsed()),((n=this._renameCandidateProvidersCts)===null||n===void 0?void 0:n.token.isCancellationRequested)===!1&&this._renameCandidateProvidersCts.cancel(),(s=this._renameCandidateListView)===null||s===void 0||s.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){var i,n,s,l,d;if(!this._domNode)return;const f=e.getColor(T4),g=e.getColor(ySt);this._domNode.style.backgroundColor=String((i=e.getColor(I_))!==null&&i!==void 0?i:""),this._domNode.style.boxShadow=f?` 0 0 8px 2px ${f}`:"",this._domNode.style.border=g?`1px solid ${g}`:"",this._domNode.style.color=String((n=e.getColor(CSt))!==null&&n!==void 0?n:"");const y=e.getColor(SSt);this._inputWithButton.domNode.style.backgroundColor=String((s=e.getColor(f9e))!==null&&s!==void 0?s:""),this._inputWithButton.input.style.backgroundColor=String((l=e.getColor(f9e))!==null&&l!==void 0?l:""),this._inputWithButton.domNode.style.borderWidth=y?"1px":"0px",this._inputWithButton.domNode.style.borderStyle=y?"solid":"none",this._inputWithButton.domNode.style.borderColor=(d=y==null?void 0:y.toString())!==null&&d!==void 0?d:"none"}_updateFont(){if(this._domNode===void 0)return;Ac(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=iR(this.getDomNode().ownerDocument.body),i=Y_(this._editor.getDomNode()),n=this._getTopForPosition();this._nPxAvailableAbove=n+i.top,this._nPxAvailableBelow=e.height-this._nPxAvailableAbove;const s=this._editor.getOption(67),{totalHeight:l}=$9.getLayoutInfo({lineHeight:s}),d=this._nPxAvailableBelow>l*6?[2,1]:[1,2];return{position:this._position,preference:d}}beforeRender(){var e,i;const[n,s]=this._acceptKeybindings;return this._label.innerText=V({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",(e=this._keybindingService.lookupKeybinding(n))===null||e===void 0?void 0:e.getLabel(),(i=this._keybindingService.lookupKeybinding(s))===null||i===void 0?void 0:i.getLabel()),this._domNode.style.minWidth="200px",null}afterRender(e){if(this._trace("invoking afterRender, position: ",e?"not null":"null"),e===null){this.cancelInput(!0,"afterRender (because position is null)");return}if(!this._editor.hasModel()||!this._editor.getDomNode())return;Ac(this._renameCandidateListView),Ac(this._nPxAvailableAbove!==void 0),Ac(this._nPxAvailableBelow!==void 0);const i=y4(this._inputWithButton.domNode),n=y4(this._label);let s;e===2?s=this._nPxAvailableBelow:s=this._nPxAvailableAbove,this._renameCandidateListView.layout({height:s-n-i,width:OC(this._inputWithButton.domNode)})}acceptInput(e){var i;this._trace("invoking acceptInput"),(i=this._currentAcceptInput)===null||i===void 0||i.call(this,e)}cancelInput(e,i){var n;this._trace(`invoking cancelInput, caller: ${i}, _currentCancelInput: ${this._currentAcceptInput?"not undefined":"undefined"}`),(n=this._currentCancelInput)===null||n===void 0||n.call(this,e)}focusNextRenameSuggestion(){var e;!((e=this._renameCandidateListView)===null||e===void 0)&&e.focusNext()||(this._inputWithButton.input.value=this._currentName)}focusPreviousRenameSuggestion(){var e;!((e=this._renameCandidateListView)===null||e===void 0)&&e.focusPrevious()||(this._inputWithButton.input.value=this._currentName)}getInput(e,i,n,s,l){const{start:d,end:f}=this._getSelection(e,i);this._renameCts=l;const g=new On;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(i,!1),g.add(tn(this._inputWithButton.button,"click",()=>this._requestRenameCandidates(i,!0))),g.add(tn(this._inputWithButton.button,yr.KEY_DOWN,w=>{const x=new Fd(w);(x.equals(3)||x.equals(10))&&(x.stopPropagation(),x.preventDefault(),this._requestRenameCandidates(i,!0))}))),this._isEditingRenameCandidate=!1,this._domNode.classList.toggle("preview",n),this._position=new yi(e.startLineNumber,e.startColumn),this._currentName=i,this._inputWithButton.input.value=i,this._inputWithButton.input.setAttribute("selectionStart",d.toString()),this._inputWithButton.input.setAttribute("selectionEnd",f.toString()),this._inputWithButton.input.size=Math.max((e.endColumn-e.startColumn)*1.1,20),this._beforeFirstInputFieldEditSW.reset(),g.add(go(()=>{this._renameCts=void 0,l.dispose(!0)})),g.add(go(()=>{this._renameCandidateProvidersCts!==void 0&&(this._renameCandidateProvidersCts.dispose(!0),this._renameCandidateProvidersCts=void 0)})),g.add(go(()=>this._candidates.clear()));const y=new bne;return y.p.finally(()=>{g.dispose(),this._hide()}),this._currentCancelInput=w=>{var x;return this._trace("invoking _currentCancelInput"),this._currentAcceptInput=void 0,this._currentCancelInput=void 0,(x=this._renameCandidateListView)===null||x===void 0||x.clearCandidates(),y.complete(w),!0},this._currentAcceptInput=w=>{this._trace("invoking _currentAcceptInput"),Ac(this._renameCandidateListView!==void 0);const x=this._renameCandidateListView.nCandidates;let I,P;const O=this._renameCandidateListView.focusedCandidate;if(O!==void 0?(this._trace("using new name from renameSuggestion"),I=O,P={k:"renameSuggestion"}):(this._trace("using new name from inputField"),I=this._inputWithButton.input.value,P=this._isEditingRenameCandidate?{k:"userEditedRenameSuggestion"}:{k:"inputField"}),I===i||I.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(),y.complete({newName:I,wantsPreview:n&&w,stats:{source:P,nRenameSuggestions:x,timeBeforeFirstInputFieldEdit:this._timeBeforeFirstInputFieldEdit,nRenameSuggestionsInvocations:this._nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:this._hadAutomaticRenameSuggestionsInvocation}})},g.add(l.token.onCancellationRequested(()=>this.cancelInput(!0,"cts.token.onCancellationRequested"))),g.add(this._editor.onDidBlurEditorWidget(()=>{var w;return this.cancelInput(!(!((w=this._domNode)===null||w===void 0)&&w.ownerDocument.hasFocus()),"editor.onDidBlurEditorWidget")})),this._show(),y.p}_requestRenameCandidates(e,i){if(this._requestRenameCandidatesOnce!==void 0&&(this._renameCandidateProvidersCts!==void 0&&this._renameCandidateProvidersCts.dispose(!0),Ac(this._renameCts),this._inputWithButton.buttonState!=="stop")){this._renameCandidateProvidersCts=new uh;const n=i?Rte.Invoke:Rte.Automatic,s=this._requestRenameCandidatesOnce(n,this._renameCandidateProvidersCts.token);if(s.length===0){this._inputWithButton.setSparkleButton();return}i||(this._hadAutomaticRenameSuggestionsInvocation=!0),this._nRenameSuggestionsInvocations+=1,this._inputWithButton.setStopButton(),this._updateRenameCandidates(s,e,this._renameCts.token)}}_getSelection(e,i){Ac(this._editor.hasModel());const n=this._editor.getSelection();let s=0,l=i.length;return!at.isEmpty(n)&&!at.spansMultipleLines(n)&&at.containsRange(e,n)&&(s=Math.max(0,n.startColumn-e.startColumn),l=Math.min(e.endColumn,n.endColumn)-e.startColumn),{start:s,end:l}}_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,i,n){const s=(...y)=>this._trace("_updateRenameCandidates",...y);s("start");const l=await yne(Promise.allSettled(e),n);if(this._inputWithButton.setSparkleButton(),l===void 0){s("returning early - received updateRenameCandidates results - undefined");return}const d=l.flatMap(y=>y.status==="fulfilled"&&rL(y.value)?y.value:[]);s(`received updateRenameCandidates results - total (unfiltered) ${d.length} candidates.`);const f=z4(d,y=>y.newSymbolName);s(`distinct candidates - ${f.length} candidates.`);const g=f.filter(({newSymbolName:y})=>y.trim().length>0&&y!==this._inputWithButton.input.value&&y!==i&&!this._candidates.has(y));if(s(`valid distinct candidates - ${d.length} candidates.`),g.forEach(y=>this._candidates.add(y.newSymbolName)),g.length<1){s("returning early - no valid distinct candidates");return}s("setting candidates"),this._renameCandidateListView.setCandidates(g),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 i;return e.length>0?i=e[0].startLineNumber:(this._logService.warn("RenameWidget#_getTopForPosition: this should not happen - visibleRanges is empty"),i=Math.max(1,this._position.lineNumber-5)),this._editor.getTopForLineNumber(this._position.lineNumber)-this._editor.getTopForLineNumber(i)}_trace(...e){this._logService.trace("RenameWidget",...e)}};AVe=NNi([Mme(2,og),Mme(3,ou),Mme(4,Zo),Mme(5,Sv)],AVe);class kUe{constructor(e,i){this._disposables=new On,this._availableHeight=0,this._minimumWidth=0,this._lineHeight=i.fontInfo.lineHeight,this._typicalHalfwidthCharacterWidth=i.fontInfo.typicalHalfwidthCharacterWidth,this._listContainer=document.createElement("div"),this._listContainer.className="rename-box rename-candidate-list-container",e.appendChild(this._listContainer),this._listWidget=kUe._createListWidget(this._listContainer,this._candidateViewHeight,i.fontInfo),this._listWidget.onDidChangeFocus(n=>{n.elements.length===1&&i.onFocusChange(n.elements[0].newSymbolName)},this._disposables),this._listWidget.onDidChangeSelection(n=>{n.elements.length===1&&i.onSelectionChange()},this._disposables),this._disposables.add(this._listWidget.onDidBlur(n=>{this._listWidget.setFocus([])})),this._listWidget.style(nB({listInactiveFocusForeground:kM,listInactiveFocusBackground:TM}))}dispose(){this._listWidget.dispose(),this._disposables.dispose()}layout({height:e,width:i}){this._availableHeight=e,this._minimumWidth=i}setCandidates(e){this._listWidget.splice(0,0,e);const i=this._pickListHeight(this._listWidget.length),n=this._pickListWidth(e);this._listWidget.layout(i,n),this._listContainer.style.height=`${i}px`,this._listContainer.style.width=`${n}px`,hL(V("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 i=this._listWidget.getFocusedElements()[0];if(i!==void 0)return i.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 i=this._listWidget.getFocus()[0];return this._listWidget.reveal(i),!0}}focusPrevious(){if(this._listWidget.length===0)return!1;const e=this._listWidget.getFocus();if(e.length===0){this._listWidget.focusLast();const i=this._listWidget.getFocus()[0];return this._listWidget.reveal(i),!0}else{if(e[0]===0)return this._listWidget.setFocus([]),!1;{this._listWidget.focusPrevious();const i=this._listWidget.getFocus()[0];return this._listWidget.reveal(i),!0}}}clearFocus(){this._listWidget.setFocus([])}get _candidateViewHeight(){const{totalHeight:e}=$9.getLayoutInfo({lineHeight:this._lineHeight});return e}_pickListHeight(e){const i=this._candidateViewHeight*e;return Math.min(i,this._availableHeight,this._candidateViewHeight*7)}_pickListWidth(e){const i=Math.ceil(Math.max(...e.map(s=>s.newSymbolName.length))*this._typicalHalfwidthCharacterWidth);return Math.max(this._minimumWidth,25+i+10)}static _createListWidget(e,i,n){const s=new class{getTemplateId(d){return"candidate"}getHeight(d){return i}},l=new class{constructor(){this.templateId="candidate"}renderTemplate(d){return new $9(d,n)}renderElement(d,f,g){g.populate(d)}disposeTemplate(d){d.dispose()}};return new Iw("NewSymbolNameCandidates",e,s,[l],{keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!1})}}class LNi{constructor(){this._onDidInputChange=new ui,this.onDidInputChange=this._onDidInputChange.event,this._disposables=new On}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",V("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=V("generateRenameSuggestionsButton","Generate new name suggestions"),this._buttonCancelHoverText=V("cancelRenameSuggestionsButton","Cancel"),this._buttonHover=HE().setupUpdatableHover(Py("element"),this._buttonNode,this._buttonGenHoverText),this._disposables.add(this._buttonHover),this._domNode.appendChild(this._buttonNode),this._disposables.add(tn(this.input,yr.INPUT,()=>this._onDidInputChange.fire())),this._disposables.add(tn(this.input,yr.KEY_DOWN,e=>{const i=new Fd(e);(i.keyCode===15||i.keyCode===17)&&this._onDidInputChange.fire()})),this._disposables.add(tn(this.input,yr.CLICK,()=>this._onDidInputChange.fire())),this._disposables.add(tn(this.input,yr.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(tn(this.input,yr.BLUR,()=>{this.domNode.style.outline="none"}))),this._domNode}get input(){return Ac(this._inputNode),this._inputNode}get button(){return Ac(this._buttonNode),this._buttonNode}get buttonState(){return this._buttonState}setSparkleButton(){var e,i;this._buttonState="sparkle",(e=this._sparkleIcon)!==null&&e!==void 0||(this._sparkleIcon=x9(Dr.sparkle)),n0(this.button),this.button.appendChild(this._sparkleIcon),this.button.setAttribute("aria-label","Generating new name suggestions"),(i=this._buttonHover)===null||i===void 0||i.update(this._buttonGenHoverText),this.input.focus()}setStopButton(){var e,i;this._buttonState="stop",(e=this._stopIcon)!==null&&e!==void 0||(this._stopIcon=x9(Dr.primitiveSquare)),n0(this.button),this.button.appendChild(this._stopIcon),this.button.setAttribute("aria-label","Cancel generating new name suggestions"),(i=this._buttonHover)===null||i===void 0||i.update(this._buttonCancelHoverText),this.input.focus()}dispose(){this._disposables.dispose()}}class $9{constructor(e,i){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=`${i.lineHeight}px`,this._domNode.style.padding=`${$9._PADDING}px`;const n=document.createElement("div");n.style.display="flex",n.style.alignItems="center",n.style.width=n.style.height=`${i.lineHeight*.8}px`,this._domNode.appendChild(n),this._icon=x9(Dr.sparkle),this._icon.style.display="none",n.appendChild(this._icon),this._label=document.createElement("div"),s0(this._label,i),this._domNode.appendChild(this._label),e.appendChild(this._domNode)}populate(e){this._updateIcon(e),this._updateLabel(e)}_updateIcon(e){var i;const n=!!(!((i=e.tags)===null||i===void 0)&&i.includes(HFe.AIGenerated));this._icon.style.display=n?"inherit":"none"}_updateLabel(e){this._label.innerText=e.newSymbolName}static getLayoutInfo({lineHeight:e}){return{totalHeight:e+$9._PADDING*2}}dispose(){}}$9._PADDING=2;var PNi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},YO=function(c,e){return function(i,n){e(i,n,c)}},OVe;class TUe{constructor(e,i,n){this.model=e,this.position=i,this._providerRenameIdx=0,this._providers=n.ordered(e)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(e){const i=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?i.join(` +`):void 0}:{range:at.fromPositions(this.position),text:"",rejectReason:i.length>0?i.join(` +`):void 0}}async provideRenameEdits(e,i){return this._provideRenameEdits(e,this._providerRenameIdx,[],i)}async _provideRenameEdits(e,i,n,s){const l=this._providers[i];if(!l)return{edits:[],rejectReason:n.join(` +`)};const d=await l.provideRenameEdits(this.model,this.position,e,s);if(d){if(d.rejectReason)return this._provideRenameEdits(e,i+1,n.concat(d.rejectReason),s)}else return this._provideRenameEdits(e,i+1,n.concat(V("no result","No result.")),s);return d}}async function ANi(c,e,i,n){const s=new TUe(e,i,c),l=await s.resolveRenameLocation(Gl.None);return l!=null&&l.rejectReason?{edits:[],rejectReason:l.rejectReason}:s.provideRenameEdits(n,Gl.None)}let e6=OVe=class{static get(e){return e.getContribution(OVe.ID)}constructor(e,i,n,s,l,d,f,g,y){this.editor=e,this._instaService=i,this._notificationService=n,this._bulkEditService=s,this._progressService=l,this._logService=d,this._configService=f,this._languageFeaturesService=g,this._telemetryService=y,this._disposableStore=new On,this._cts=new uh,this._renameWidget=this._disposableStore.add(this._instaService.createInstance(AVe,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){var e,i;const n=this._logService.trace.bind(this._logService,"[rename]");if(this._cts.dispose(!0),this._cts=new uh,!this.editor.hasModel()){n("editor has no model");return}const s=this.editor.getPosition(),l=new TUe(this.editor.getModel(),s,this._languageFeaturesService.renameProvider);if(!l.hasProvider()){n("skeleton has no provider");return}const d=new dR(this.editor,5,void 0,this._cts.token);let f;try{n("resolving rename location");const X=l.resolveRenameLocation(d.token);this._progressService.showWhile(X,250),f=await X,n("resolved rename location")}catch(X){X instanceof DE?n("resolve rename location cancelled",JSON.stringify(X,null," ")):(n("resolve rename location failed",X instanceof Error?X:JSON.stringify(X,null," ")),(typeof X=="string"||xE(X))&&((e=ky.get(this.editor))===null||e===void 0||e.showMessage(X||V("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),s)));return}finally{d.dispose()}if(!f){n("returning early - no loc");return}if(f.rejectReason){n(`returning early - rejected with reason: ${f.rejectReason}`,f.rejectReason),(i=ky.get(this.editor))===null||i===void 0||i.showMessage(f.rejectReason,s);return}if(d.token.isCancellationRequested){n("returning early - cts1 cancelled");return}const g=new dR(this.editor,5,f.range,this._cts.token),y=this.editor.getModel(),w=this._languageFeaturesService.newSymbolNamesProvider.all(y),x=await Promise.all(w.map(async X=>{var Z;return[X,(Z=await X.supportsAutomaticNewSymbolNamesTriggerKind)!==null&&Z!==void 0?Z:!1]})),I=(X,Z)=>{let ee=x.slice();return X===Rte.Automatic&&(ee=ee.filter(([he,we])=>we)),ee.map(([he])=>he.provideNewSymbolNames(y,f.range,X,Z))};n("creating rename input field and awaiting its result");const P=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),O=await this._renameWidget.getInput(f.range,f.text,P,w.length>0?I:void 0,g);if(n("received response from rename input field"),w.length>0&&this._reportTelemetry(w.length,y.getLanguageId(),O),typeof O=="boolean"){n(`returning early - rename input field response - ${O}`),O&&this.editor.focus(),g.dispose();return}this.editor.focus(),n("requesting rename edits");const W=yne(l.provideRenameEdits(O.newName,g.token),g.token).then(async X=>{if(!X){n("returning early - no rename edits result");return}if(!this.editor.hasModel()){n("returning early - no model after rename edits are provided");return}if(X.rejectReason){n(`returning early - rejected with reason: ${X.rejectReason}`),this._notificationService.info(X.rejectReason);return}this.editor.setSelection(at.fromPositions(this.editor.getSelection().getPosition())),n("applying edits"),this._bulkEditService.apply(X,{editor:this.editor,showPreview:O.wantsPreview,label:V("label","Renaming '{0}' to '{1}'",f==null?void 0:f.text,O.newName),code:"undoredo.rename",quotableLabel:V("quotableLabel","Renaming {0} to {1}",f==null?void 0:f.text,O.newName),respectAutoSaveConfig:!0}).then(Z=>{n("edits applied"),Z.ariaSummary&&Eb(V("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",f.text,O.newName,Z.ariaSummary))}).catch(Z=>{n(`error when applying edits ${JSON.stringify(Z,null," ")}`),this._notificationService.error(V("rename.failedApply","Rename failed to apply edits")),this._logService.error(Z)})},X=>{n("error when providing rename edits",JSON.stringify(X,null," ")),this._notificationService.error(V("rename.failed","Rename failed to compute edits")),this._logService.error(X)}).finally(()=>{g.dispose()});return n("returning rename operation"),this._progressService.showWhile(W,250),W}acceptRenameInput(e){this._renameWidget.acceptInput(e)}cancelRenameInput(){this._renameWidget.cancelInput(!0,"cancelRenameInput command")}focusNextRenameSuggestion(){this._renameWidget.focusNextRenameSuggestion()}focusPreviousRenameSuggestion(){this._renameWidget.focusPreviousRenameSuggestion()}_reportTelemetry(e,i,n){const s=typeof n=="boolean"?{kind:"cancelled",languageId:i,nRenameSuggestionProviders:e}:{kind:"accepted",languageId:i,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)}};e6.ID="editor.contrib.renameController";e6=OVe=PNi([YO(1,So),YO(2,L_),YO(3,Fne),YO(4,IR),YO(5,Sv),YO(6,YHe),YO(7,js),YO(8,R0)],e6);class ONi extends ms{constructor(){super({id:"editor.action.rename",label:V("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:xn.and(Lt.writable,Lt.hasRenameProvider),kbOpts:{kbExpr:Lt.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,i){const n=e.get(Oc),[s,l]=Array.isArray(i)&&i||[void 0,void 0];return Oo.isUri(s)&&yi.isIPosition(l)?n.openCodeEditor({resource:s},n.getActiveCodeEditor()).then(d=>{d&&(d.setPosition(l),d.invokeWithinContext(f=>(this.reportTelemetry(f,d),this.run(f,d))))},Ba):super.runCommand(e,i)}run(e,i){const n=e.get(Sv),s=e6.get(i);return s?(n.trace("[RenameAction] got controller, running..."),s.run()):(n.trace("[RenameAction] returning early - controller missing"),Promise.resolve())}}Bc(e6.ID,e6,4);hr(ONi);const DUe=sg.bindToContribution(e6.get);qr(new DUe({id:"acceptRenameInput",precondition:r$,handler:c=>c.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:xn.and(Lt.focus,xn.not("isComposing")),primary:3}}));qr(new DUe({id:"acceptRenameInputWithPreview",precondition:xn.and(r$,xn.has("config.editor.rename.enablePreview")),handler:c=>c.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:xn.and(Lt.focus,xn.not("isComposing")),primary:2051}}));qr(new DUe({id:"cancelRenameInput",precondition:r$,handler:c=>c.cancelRenameInput(),kbOpts:{weight:199,kbExpr:Lt.focus,primary:9,secondary:[1033]}}));Bd(class extends Ny{constructor(){super({id:"focusNextRenameSuggestion",title:{...xa("focusNextRenameSuggestion","Focus Next Rename Suggestion")},precondition:r$,keybinding:[{primary:18,weight:199}]})}run(e){const i=e.get(Oc).getFocusedCodeEditor();if(!i)return;const n=e6.get(i);n&&n.focusNextRenameSuggestion()}});Bd(class extends Ny{constructor(){super({id:"focusPreviousRenameSuggestion",title:{...xa("focusPreviousRenameSuggestion","Focus Previous Rename Suggestion")},precondition:r$,keybinding:[{primary:16,weight:199}]})}run(e){const i=e.get(Oc).getFocusedCodeEditor();if(!i)return;const n=e6.get(i);n&&n.focusPreviousRenameSuggestion()}});kL("_executeDocumentRenameProvider",function(c,e,i,...n){const[s]=n;Ac(typeof s=="string");const{renameProvider:l}=c.get(js);return ANi(l,e,i,s)});kL("_executePrepareRename",async function(c,e,i){const{renameProvider:n}=c.get(js),l=await new TUe(e,i,n).resolveRenameLocation(Gl.None);if(l!=null&&l.rejectReason)throw new Error(l.rejectReason);return l});dh.as(WE.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:V("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});var MNi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},$yt=function(c,e){return function(i,n){e(i,n,c)}};let rne=class extends Ii{constructor(e,i,n){super(),this.editor=e,this.languageConfigurationService=i,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(i.onDidChange(s=>{var l;const d=(l=this.editor.getModel())===null||l===void 0?void 0:l.getLanguageId();d&&s.affects(d)&&(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 id(()=>{this.findSectionHeaders()},250)),this.computeSectionHeaders.schedule(0)}createOptions(e){if(!e||!this.editor.hasModel())return;const i=this.editor.getModel().getLanguageId();if(!i)return;const n=this.languageConfigurationService.getLanguageConfiguration(i).comments,s=this.languageConfigurationService.getLanguageConfiguration(i).foldingRules;if(!(!n&&!(s!=null&&s.markers)))return{foldingRules:s,findMarkSectionHeaders:e.showMarkSectionHeaders,findRegionSectionHeaders:e.showRegionSectionHeaders}}findSectionHeaders(){var e,i;if(!this.editor.hasModel()||!(!((e=this.options)===null||e===void 0)&&e.findMarkSectionHeaders)&&!(!((i=this.options)===null||i===void 0)&&i.findRegionSectionHeaders))return;const n=this.editor.getModel();if(n.isDisposed()||n.isTooLargeForSyncing())return;const s=n.getVersionId();this.editorWorkerService.findSectionHeaders(n.uri,this.options).then(l=>{n.isDisposed()||n.getVersionId()!==s||this.updateDecorations(l)})}updateDecorations(e){const i=this.editor.getModel();i&&(e=e.filter(l=>{if(!l.shouldBeInComments)return!0;const d=i.validateRange(l.range),f=i.tokenization.getLineTokens(d.startLineNumber),g=f.findTokenIndexAtOffset(d.startColumn-1),y=f.getStandardTokenType(g);return f.getLanguageId(g)===i.getLanguageId()&&y===1}));const n=Object.values(this.currentOccurrences).map(l=>l.decorationId),s=e.map(l=>RNi(l));this.editor.changeDecorations(l=>{const d=l.deltaDecorations(n,s);this.currentOccurrences={};for(let f=0,g=d.length;f0?i[0]:[]}async function CDt(c,e,i,n,s){const l=HNi(c,e),d=await Promise.all(l.map(async f=>{let g,y=null;try{g=await f.provideDocumentSemanticTokens(e,f===i?n:null,s)}catch(w){y=w,g=null}return(!g||!Vbe(g)&&!yDt(g))&&(g=null),new VNi(f,g,y)}));for(const f of d){if(f.error)throw f.error;if(f.tokens)return f}return d.length>0?d[0]:null}function jNi(c,e){const i=c.orderedGroups(e);return i.length>0?i[0]:null}class zNi{constructor(e,i){this.provider=e,this.tokens=i}}function UNi(c,e){return c.has(e)}function SDt(c,e){const i=c.orderedGroups(e);return i.length>0?i[0]:[]}async function EUe(c,e,i,n){const s=SDt(c,e),l=await Promise.all(s.map(async d=>{let f;try{f=await d.provideDocumentRangeSemanticTokens(e,i,n)}catch(g){r_(g),f=null}return(!f||!Vbe(f))&&(f=null),new zNi(d,f)}));for(const d of l)if(d.tokens)return d;return l.length>0?l[0]:null}uc.registerCommand("_provideDocumentSemanticTokensLegend",async(c,...e)=>{const[i]=e;Ac(i instanceof Oo);const n=c.get(Qf).getModel(i);if(!n)return;const{documentSemanticTokensProvider:s}=c.get(js),l=jNi(s,n);return l?l[0].getLegend():c.get(ff).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)});uc.registerCommand("_provideDocumentSemanticTokens",async(c,...e)=>{const[i]=e;Ac(i instanceof Oo);const n=c.get(Qf).getModel(i);if(!n)return;const{documentSemanticTokensProvider:s}=c.get(js);if(!bDt(s,n))return c.get(ff).executeCommand("_provideDocumentRangeSemanticTokens",i,n.getFullModelRange());const l=await CDt(s,n,null,null,Gl.None);if(!l)return;const{provider:d,tokens:f}=l;if(!f||!Vbe(f))return;const g=vDt({id:0,type:"full",data:f.data});return f.resultId&&d.releaseDocumentSemanticTokens(f.resultId),g});uc.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(c,...e)=>{const[i,n]=e;Ac(i instanceof Oo);const s=c.get(Qf).getModel(i);if(!s)return;const{documentRangeSemanticTokensProvider:l}=c.get(js),d=SDt(l,s);if(d.length===0)return;if(d.length===1)return d[0].getLegend();if(!n||!at.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),d[0].getLegend();const f=await EUe(l,s,at.lift(n),Gl.None);if(f)return f.provider.getLegend()});uc.registerCommand("_provideDocumentRangeSemanticTokens",async(c,...e)=>{const[i,n]=e;Ac(i instanceof Oo),Ac(at.isIRange(n));const s=c.get(Qf).getModel(i);if(!s)return;const{documentRangeSemanticTokensProvider:l}=c.get(js),d=await EUe(l,s,at.lift(n),Gl.None);if(!(!d||!d.tokens))return vDt({id:0,type:"full",data:d.tokens.data})});const IUe="editor.semanticHighlighting";function C0e(c,e,i){var n;const s=(n=i.getValue(IUe,{overrideIdentifier:c.getLanguageId(),resource:c.uri}))===null||n===void 0?void 0:n.enabled;return typeof s=="boolean"?s:e.getColorTheme().semanticHighlighting}var wDt=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},jN=function(c,e){return function(i,n){e(i,n,c)}},aM;let MVe=class extends Ii{constructor(e,i,n,s,l,d){super(),this._watchers=Object.create(null);const f=w=>{this._watchers[w.uri.toString()]=new sne(w,e,n,l,d)},g=(w,x)=>{x.dispose(),delete this._watchers[w.uri.toString()]},y=()=>{for(const w of i.getModels()){const x=this._watchers[w.uri.toString()];C0e(w,n,s)?x||f(w):x&&g(w,x)}};i.getModels().forEach(w=>{C0e(w,n,s)&&f(w)}),this._register(i.onModelAdded(w=>{C0e(w,n,s)&&f(w)})),this._register(i.onModelRemoved(w=>{const x=this._watchers[w.uri.toString()];x&&g(w,x)})),this._register(s.onDidChangeConfiguration(w=>{w.affectsConfiguration(IUe)&&y()})),this._register(n.onDidColorThemeChange(y))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};MVe=wDt([jN(0,yye),jN(1,Qf),jN(2,og),jN(3,El),jN(4,fk),jN(5,js)],MVe);let sne=aM=class extends Ii{constructor(e,i,n,s,l){super(),this._semanticTokensStylingService=i,this._isDisposed=!1,this._model=e,this._provider=l.documentSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentSemanticTokens",{min:aM.REQUEST_MIN_DELAY,max:aM.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new id(()=>this._fetchDocumentSemanticTokensNow(),aM.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 d=()=>{yd(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const f of this._provider.all(e))typeof f.onDidChange=="function"&&this._documentProvidersChangeListeners.push(f.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};d(),this._register(this._provider.onDidChange(()=>{d(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(n.onDidColorThemeChange(f=>{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),yd(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!bDt(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;const e=new uh,i=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,n=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,s=CDt(this._provider,this._model,i,n,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const l=[],d=this._model.onDidChangeContent(g=>{l.push(g)}),f=new o0(!1);s.then(g=>{if(this._debounceInformation.update(this._model,f.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,d.dispose(),!g)this._setDocumentSemanticTokens(null,null,null,l);else{const{provider:y,tokens:w}=g,x=this._semanticTokensStylingService.getStyling(y);this._setDocumentSemanticTokens(y,w||null,x,l)}},g=>{g&&(pT(g)||typeof g.message=="string"&&g.message.indexOf("busy")!==-1)||Ba(g),this._currentDocumentRequestCancellationTokenSource=null,d.dispose(),(l.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,i,n,s,l){l=Math.min(l,n.length-s,e.length-i);for(let d=0;d{(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&&i&&e.releaseDocumentSemanticTokens(i.resultId);return}if(!e||!n){this._model.tokenization.setSemanticTokens(null,!1);return}if(!i){this._model.tokenization.setSemanticTokens(null,!0),d();return}if(yDt(i)){if(!l){this._model.tokenization.setSemanticTokens(null,!0);return}if(i.edits.length===0)i={resultId:i.resultId,data:l.data};else{let f=0;for(const I of i.edits)f+=(I.data?I.data.length:0)-I.deleteCount;const g=l.data,y=new Uint32Array(g.length+f);let w=g.length,x=y.length;for(let I=i.edits.length-1;I>=0;I--){const P=i.edits[I];if(P.start>g.length){n.warnInvalidEditStart(l.resultId,i.resultId,I,P.start,g.length),this._model.tokenization.setSemanticTokens(null,!0);return}const O=w-(P.start+P.deleteCount);O>0&&(aM._copy(g,w-O,y,x-O,O),x-=O),P.data&&(aM._copy(P.data,0,y,x-P.data.length,P.data.length),x-=P.data.length),w=P.start}w>0&&aM._copy(g,0,y,0,w),i={resultId:i.resultId,data:y}}}if(Vbe(i)){this._currentDocumentResponse=new qNi(e,i.resultId,i.data);const f=Owt(i,n,this._model.getLanguageId());if(s.length>0)for(const g of s)for(const y of f)for(const w of g.changes)y.applyEdit(w.range,w.text);this._model.tokenization.setSemanticTokens(f,!0)}else this._model.tokenization.setSemanticTokens(null,!0);d()}};sne.REQUEST_MIN_DELAY=300;sne.REQUEST_MAX_DELAY=2e3;sne=aM=wDt([jN(1,yye),jN(2,og),jN(3,fk),jN(4,js)],sne);class qNi{constructor(e,i,n){this.provider=e,this.resultId=i,this.data=n}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}Jne(MVe);var $Ni=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},bee=function(c,e){return function(i,n){e(i,n,c)}};let one=class extends Ii{constructor(e,i,n,s,l,d){super(),this._semanticTokensStylingService=i,this._themeService=n,this._configurationService=s,this._editor=e,this._provider=d.documentRangeSemanticTokensProvider,this._debounceInformation=l.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new id(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const f=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{f()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),f()})),this._register(this._editor.onDidChangeModelContent(g=>{this._cancelAll(),f()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),f()})),this._register(this._configurationService.onDidChangeConfiguration(g=>{g.affectsConfiguration(IUe)&&(this._cancelAll(),f())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),f()})),f()}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let i=0,n=this._outstandingRequests.length;ithis._requestRange(e,n)))}_requestRange(e,i){const n=e.getVersionId(),s=Hg(d=>Promise.resolve(EUe(this._provider,e,i,d))),l=new o0(!1);return s.then(d=>{if(this._debounceInformation.update(e,l.elapsed()),!d||!d.tokens||e.isDisposed()||e.getVersionId()!==n)return;const{provider:f,tokens:g}=d,y=this._semanticTokensStylingService.getStyling(f);e.tokenization.setPartialSemanticTokens(i,Owt(g,y,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(s),()=>this._removeOutstandingRequest(s)),s}};one.ID="editor.contrib.viewportSemanticTokens";one=$Ni([bee(1,yye),bee(2,og),bee(3,El),bee(4,fk),bee(5,js)],one);Bc(one.ID,one,1);class JNi{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,i){const n=[];for(const s of i){const l=[];n.push(l),this.selectSubwords&&this._addInWordRanges(l,e,s),this._addWordRanges(l,e,s),this._addWhitespaceLine(l,e,s),l.push({range:e.getFullModelRange()})}return n}_addInWordRanges(e,i,n){const s=i.getWordAtPosition(n);if(!s)return;const{word:l,startColumn:d}=s,f=n.column-d;let g=f,y=f,w=0;for(;g>=0;g--){const x=l.charCodeAt(g);if(g!==f&&(x===95||x===45))break;if(bM(x)&&WN(w))break;w=x}for(g+=1;y0&&i.getLineFirstNonWhitespaceColumn(n.lineNumber)===0&&i.getLineLastNonWhitespaceColumn(n.lineNumber)===0&&e.push({range:new at(n.lineNumber,1,n.lineNumber,i.getLineMaxColumn(n.lineNumber))})}}var GNi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},KNi=function(c,e){return function(i,n){e(i,n,c)}},RVe;class NUe{constructor(e,i){this.index=e,this.ranges=i}mov(e){const i=this.index+(e?1:-1);if(i<0||i>=this.ranges.length)return this;const n=new NUe(i,this.ranges);return n.ranges[i].equalsRange(this.ranges[this.index])?n.mov(e):n}}let Aq=RVe=class{static get(e){return e.getContribution(RVe.ID)}constructor(e,i){this._editor=e,this._languageFeaturesService=i,this._ignoreSelection=!1}dispose(){var e;(e=this._selectionListener)===null||e===void 0||e.dispose()}async run(e){if(!this._editor.hasModel())return;const i=this._editor.getSelections(),n=this._editor.getModel();if(this._state||await kDt(this._languageFeaturesService.selectionRangeProvider,n,i.map(l=>l.getPosition()),this._editor.getOption(113),Gl.None).then(l=>{var d;if(!(!bv(l)||l.length!==i.length)&&!(!this._editor.hasModel()||!ch(this._editor.getSelections(),i,(f,g)=>f.equalsSelection(g)))){for(let f=0;fg.containsPosition(i[f].getStartPosition())&&g.containsPosition(i[f].getEndPosition())),l[f].unshift(i[f]);this._state=l.map(f=>new NUe(0,f)),(d=this._selectionListener)===null||d===void 0||d.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var f;this._ignoreSelection||((f=this._selectionListener)===null||f===void 0||f.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(l=>l.mov(e));const s=this._state.map(l=>Qs.fromPositions(l.ranges[l.index].getStartPosition(),l.ranges[l.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(s)}finally{this._ignoreSelection=!1}}};Aq.ID="editor.contrib.smartSelectController";Aq=RVe=GNi([KNi(1,js)],Aq);class xDt extends ms{constructor(e,i){super(i),this._forward=e}async run(e,i){const n=Aq.get(i);n&&await n.run(this._forward)}}class QNi extends xDt{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:V("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:Lt.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:_t.MenubarSelectionMenu,group:"1_basic",title:V({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}uc.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class XNi extends xDt{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:V("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:Lt.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:_t.MenubarSelectionMenu,group:"1_basic",title:V({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}Bc(Aq.ID,Aq,4);hr(QNi);hr(XNi);async function kDt(c,e,i,n,s){const l=c.all(e).concat(new JNi(n.selectSubwords));l.length===1&&l.unshift(new ow);const d=[],f=[];for(const g of l)d.push(Promise.resolve(g.provideSelectionRanges(e,i,s)).then(y=>{if(bv(y)&&y.length===i.length)for(let w=0;w{if(g.length===0)return[];g.sort((I,P)=>yi.isBefore(I.getStartPosition(),P.getStartPosition())?1:yi.isBefore(P.getStartPosition(),I.getStartPosition())||yi.isBefore(I.getEndPosition(),P.getEndPosition())?-1:yi.isBefore(P.getEndPosition(),I.getEndPosition())?1:0);const y=[];let w;for(const I of g)(!w||at.containsRange(I,w)&&!at.equalsRange(I,w))&&(y.push(I),w=I);if(!n.selectLeadingAndTrailingWhitespace)return y;const x=[y[0]];for(let I=1;Ic}),CFe="data-sticky-line-index",Kyt="data-sticky-is-line",YNi="data-sticky-is-line-number",Qyt="data-sticky-is-folding-icon";class eLi extends Ii{constructor(e){super(),this._editor=e,this._foldingIconStore=new On,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 pR),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const i=()=>{this._linesDomNode.style.left=this._editor.getOption(115).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(115)&&i(),n.hasChanged(67)&&(this._lineHeight=this._editor.getOption(67))})),this._register(this._editor.onDidScrollChange(n=>{n.scrollLeftChanged&&i(),n.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{i(),this._updateWidgetWidth()})),this._register(this._foldingIconStore),i(),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(i=>i.lineNumber===e)}getCurrentLines(){return this._lineNumbers}setState(e,i,n){if(n===void 0&&(!this._previousState&&!e||this._previousState&&this._previousState.equals(e)))return;const s=this._isWidgetHeightZero(e),l=s?void 0:e,d=s?0:this._findLineToRebuildWidgetFrom(e,n);this._renderRootNode(l,i,d),this._previousState=e}_isWidgetHeightZero(e){if(!e)return!0;const i=e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition;if(i>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 i===0}_findLineToRebuildWidgetFrom(e,i){if(!e||!this._previousState)return 0;if(i!==void 0)return i;const n=this._previousState,s=e.startLineNumbers.findIndex(l=>!n.startLineNumbers.includes(l));return s===-1?0:s}_updateWidgetWidth(){const e=this._editor.getLayoutInfo(),i=e.contentLeft;this._lineNumbersDomNode.style.width=`${i}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 i=e;if.scrollWidth))+s.verticalScrollbarWidth,this._editor.layoutOverlayWidget(this)}_setFoldingHoverListeners(){this._editor.getOption(110)==="mouseover"&&(this._foldingIconStore.add(tn(this._lineNumbersDomNode,yr.MOUSE_ENTER,()=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(tn(this._lineNumbersDomNode,yr.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(e,i,n,s){const l=this._editor._getViewModel();if(!l)return;const d=l.coordinatesConverter.convertModelPositionToViewPosition(new yi(i,1)).lineNumber,f=l.getViewLineRenderingData(d),g=this._editor.getOption(68);let y;try{y=Sy.filter(f.inlineDecorations,d,f.minColumn,f.maxColumn)}catch{y=[]}const w=new TR(!0,!0,f.content,f.continuesWithWrappedLine,f.isBasicASCII,f.containsRTL,0,f.tokens,y,f.tabSize,f.startVisibleColumn,1,1,1,500,"none",!0,!0,null),x=new jq(2e3),I=kne(w,x);let P;Gyt?P=Gyt.createHTML(x.build()):P=x.build();const O=document.createElement("span");O.setAttribute(CFe,String(e)),O.setAttribute(Kyt,""),O.setAttribute("role","listitem"),O.tabIndex=0,O.className="sticky-line-content",O.classList.add(`stickyLine${i}`),O.style.lineHeight=`${this._lineHeight}px`,O.innerHTML=P;const W=document.createElement("span");W.setAttribute(CFe,String(e)),W.setAttribute(YNi,""),W.className="sticky-line-number",W.style.lineHeight=`${this._lineHeight}px`;const X=s.contentLeft;W.style.width=`${X}px`;const Z=document.createElement("span");g.renderType===1||g.renderType===3&&i%10===0?Z.innerText=i.toString():g.renderType===2&&(Z.innerText=Math.abs(i-this._editor.getPosition().lineNumber).toString()),Z.className="sticky-line-number-inner",Z.style.lineHeight=`${this._lineHeight}px`,Z.style.width=`${s.lineNumbersWidth}px`,Z.style.paddingLeft=`${s.lineNumbersLeft}px`,W.appendChild(Z);const ee=this._renderFoldingIconForLine(n,i);ee&&W.appendChild(ee.domNode),this._editor.applyFontInfo(O),this._editor.applyFontInfo(Z),W.style.lineHeight=`${this._lineHeight}px`,O.style.lineHeight=`${this._lineHeight}px`,W.style.height=`${this._lineHeight}px`,O.style.height=`${this._lineHeight}px`;const he=new tLi(e,i,O,W,ee,I.characterMapping,O.scrollWidth);return this._updateTopAndZIndexOfStickyLine(he)}_updateTopAndZIndexOfStickyLine(e){var i;const n=e.index,s=e.lineDomNode,l=e.lineNumberDomNode,d=n===this._lineNumbers.length-1,f="0",g="1";s.style.zIndex=d?f:g,l.style.zIndex=d?f:g;const y=`${n*this._lineHeight+this._lastLineRelativePosition+(!((i=e.foldingIcon)===null||i===void 0)&&i.isCollapsed?1:0)}px`,w=`${n*this._lineHeight}px`;return s.style.top=d?y:w,l.style.top=d?y:w,e}_renderFoldingIconForLine(e,i){const n=this._editor.getOption(110);if(!e||n==="never")return;const s=e.regions,l=s.findRange(i),d=s.getStartLineNumber(l);if(!(i===d))return;const g=s.isCollapsed(l),y=new iLi(g,d,s.getEndLineNumber(l),this._lineHeight);return y.setVisible(this._isOnGlyphMargin?!0:g||n==="always"),y.domNode.setAttribute(Qyt,""),y}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:2,stackOridinal:10}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e0)return null;const i=this._getRenderedStickyLineFromChildDomNode(e);if(!i)return null;const n=hje(i.characterMapping,e,0);return new yi(i.lineNumber,n)}getLineNumberFromChildDomNode(e){var i,n;return(n=(i=this._getRenderedStickyLineFromChildDomNode(e))===null||i===void 0?void 0:i.lineNumber)!==null&&n!==void 0?n:null}_getRenderedStickyLineFromChildDomNode(e){const i=this.getLineIndexFromChildDomNode(e);return i===null||i<0||i>=this._renderedStickyLines.length?null:this._renderedStickyLines[i]}getLineIndexFromChildDomNode(e){const i=this._getAttributeValue(e,CFe);return i?parseInt(i,10):null}isInStickyLine(e){return this._getAttributeValue(e,Kyt)!==void 0}isInFoldingIconDomNode(e){return this._getAttributeValue(e,Qyt)!==void 0}_getAttributeValue(e,i){for(;e&&e!==this._rootDomNode;){const n=e.getAttribute(i);if(n!==null)return n;e=e.parentElement}}}class tLi{constructor(e,i,n,s,l,d,f){this.index=e,this.lineNumber=i,this.lineDomNode=n,this.lineNumberDomNode=s,this.foldingIcon=l,this.characterMapping=d,this.scrollWidth=f}}class iLi{constructor(e,i,n,s){this.isCollapsed=e,this.foldingStartLine=i,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=Uo.asClassName(e?bbe:ybe)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}class kte{constructor(e,i){this.startLineNumber=e,this.endLineNumber=i}}class D1e{constructor(e,i,n){this.range=e,this.children=i,this.parent=n}}class TDt{constructor(e,i,n,s){this.uri=e,this.version=i,this.element=n,this.outlineProviderId=s}}var Hbe=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},ane=function(c,e){return function(i,n){e(i,n,c)}},Tte;(function(c){c.OUTLINE_MODEL="outlineModel",c.FOLDING_PROVIDER_MODEL="foldingProviderModel",c.INDENTATION_MODEL="indentationModel"})(Tte||(Tte={}));var RM;(function(c){c[c.VALID=0]="VALID",c[c.INVALID=1]="INVALID",c[c.CANCELED=2]="CANCELED"})(RM||(RM={}));let FVe=class extends Ii{constructor(e,i,n,s){switch(super(),this._editor=e,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new hT(300)),this._updateOperation=this._register(new On),this._editor.getOption(115).defaultModel){case Tte.OUTLINE_MODEL:this._modelProviders.push(new BVe(this._editor,s));case Tte.FOLDING_PROVIDER_MODEL:this._modelProviders.push(new VVe(this._editor,i,s));case Tte.INDENTATION_MODEL:this._modelProviders.push(new WVe(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 i of this._modelProviders){const{statusPromise:n,modelPromise:s}=i.computeStickyModel(e);this._modelPromise=s;const l=await n;if(this._modelPromise!==s)return null;switch(l){case RM.CANCELED:return this._updateOperation.clear(),null;case RM.VALID:return i.stickyModel}}return null}).catch(i=>(Ba(i),null))}};FVe=Hbe([ane(2,So),ane(3,js)],FVe);class DDt extends Ii{constructor(e){super(),this._editor=e,this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,RM.INVALID}computeStickyModel(e){if(e.isCancellationRequested||!this.isProviderValid())return{statusPromise:this._invalid(),modelPromise:null};const i=Hg(n=>this.createModelFromProvider(n));return{statusPromise:i.then(n=>this.isModelValid(n)?e.isCancellationRequested?RM.CANCELED:(this._stickyModel=this.createStickyModel(e,n),RM.VALID):this._invalid()).then(void 0,n=>(Ba(n),RM.CANCELED)),modelPromise:i}}isModelValid(e){return!0}isProviderValid(){return!0}}let BVe=class extends DDt{constructor(e,i){super(e),this._languageFeaturesService=i}createModelFromProvider(e){return u4.create(this._languageFeaturesService.documentSymbolProvider,this._editor.getModel(),e)}createStickyModel(e,i){var n;const{stickyOutlineElement:s,providerID:l}=this._stickyModelFromOutlineModel(i,(n=this._stickyModel)===null||n===void 0?void 0:n.outlineProviderId),d=this._editor.getModel();return new TDt(d.uri,d.getVersionId(),s,l)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,i){let n;if(cc.first(e.children.values())instanceof JTt){const f=cc.find(e.children.values(),g=>g.id===i);if(f)n=f.children;else{let g="",y=-1,w;for(const[x,I]of e.children.entries()){const P=this._findSumOfRangesOfGroup(I);P>y&&(w=I,y=P,g=I.id)}i=g,n=w.children}}else n=e.children;const s=[],l=Array.from(n.values()).sort((f,g)=>{const y=new kte(f.symbol.range.startLineNumber,f.symbol.range.endLineNumber),w=new kte(g.symbol.range.startLineNumber,g.symbol.range.endLineNumber);return this._comparator(y,w)});for(const f of l)s.push(this._stickyModelFromOutlineElement(f,f.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new D1e(void 0,s,void 0),providerID:i}}_stickyModelFromOutlineElement(e,i){const n=[];for(const l of e.children.values())if(l.symbol.selectionRange.startLineNumber!==l.symbol.range.endLineNumber)if(l.symbol.selectionRange.startLineNumber!==i)n.push(this._stickyModelFromOutlineElement(l,l.symbol.selectionRange.startLineNumber));else for(const d of l.children.values())n.push(this._stickyModelFromOutlineElement(d,l.symbol.selectionRange.startLineNumber));n.sort((l,d)=>this._comparator(l.range,d.range));const s=new kte(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new D1e(s,n,void 0)}_comparator(e,i){return e.startLineNumber!==i.startLineNumber?e.startLineNumber-i.startLineNumber:i.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let i=0;for(const n of e.children.values())i+=this._findSumOfRangesOfGroup(n);return e instanceof iVe?i+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:i}};BVe=Hbe([ane(1,js)],BVe);class EDt extends DDt{constructor(e){super(e),this._foldingLimitReporter=new UTt(e)}createStickyModel(e,i){const n=this._fromFoldingRegions(i),s=this._editor.getModel();return new TDt(s.uri,s.getVersionId(),n,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){const i=e.length,n=[],s=new D1e(void 0,[],void 0);for(let l=0;l0&&(this.provider=this._register(new gUe(e.getModel(),s,i,this._foldingLimitReporter,void 0)))}isProviderValid(){return this.provider!==void 0}async createModelFromProvider(e){var i,n;return(n=(i=this.provider)===null||i===void 0?void 0:i.compute(e))!==null&&n!==void 0?n:null}};VVe=Hbe([ane(2,js)],VVe);var nLi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Xyt=function(c,e){return function(i,n){e(i,n,c)}};class rLi{constructor(e,i,n){this.startLineNumber=e,this.endLineNumber=i,this.nestingDepth=n}}let HVe=class extends Ii{constructor(e,i,n){super(),this._languageFeaturesService=i,this._languageConfigurationService=n,this._onDidChangeStickyScroll=this._register(new ui),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new On),this._updateSoon=this._register(new id(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(115)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._sessionStore.clear(),this._editor.getOption(115).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(go(()=>{var i;(i=this._stickyModelProvider)===null||i===void 0||i.dispose(),this._stickyModelProvider=null})),this.updateStickyModelProvider(),this.update())}getVersionId(){var e;return(e=this._model)===null||e===void 0?void 0:e.version}updateStickyModelProvider(){var e;(e=this._stickyModelProvider)===null||e===void 0||e.dispose(),this._stickyModelProvider=null;const i=this._editor;i.hasModel()&&(this._stickyModelProvider=new FVe(i,()=>this._updateSoon.schedule(),this._languageConfigurationService,this._languageFeaturesService))}async update(){var e;(e=this._cts)===null||e===void 0||e.dispose(!0),this._cts=new uh,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 i=await this._stickyModelProvider.update(e);e.isCancellationRequested||(this._model=i)}updateIndex(e){return e===-1?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,i,n,s,l){if(i.children.length===0)return;let d=l;const f=[];for(let w=0;ww-x)),y=this.updateIndex(Ete(f,e.startLineNumber+s,(w,x)=>w-x));for(let w=g;w<=y;w++){const x=i.children[w];if(!x)return;if(x.range){const I=x.range.startLineNumber,P=x.range.endLineNumber;e.startLineNumber<=P+1&&I-1<=e.endLineNumber&&I!==d&&(d=I,n.push(new rLi(I,P-1,s+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,x,n,s+1,I))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,x,n,s,l)}}getCandidateStickyLinesIntersecting(e){var i,n;if(!(!((i=this._model)===null||i===void 0)&&i.element))return[];let s=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,s,0,-1);const l=(n=this._editor._getViewModel())===null||n===void 0?void 0:n.getHiddenAreas();if(l)for(const d of l)s=s.filter(f=>!(f.startLineNumber>=d.startLineNumber&&f.endLineNumber<=d.endLineNumber+1));return s}};HVe=nLi([Xyt(1,js),Xyt(2,Kd)],HVe);var sLi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Oz=function(c,e){return function(i,n){e(i,n,c)}},jVe;let SL=jVe=class extends Ii{constructor(e,i,n,s,l,d,f){super(),this._editor=e,this._contextMenuService=i,this._languageFeaturesService=n,this._instaService=s,this._contextKeyService=f,this._sessionStore=new On,this._foldingModel=null,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._showEndForLine=null,this._stickyScrollWidget=new eLi(this._editor),this._stickyLineCandidateProvider=new HVe(this._editor,n,l),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new Jyt([],[],0),this._onDidResize(),this._readConfiguration();const g=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration(w=>{this._readConfigurationChange(w)})),this._register(tn(g,yr.CONTEXT_MENU,async w=>{this._onContextMenu(Io(g),w)})),this._stickyScrollFocusedContextKey=Lt.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=Lt.stickyScrollVisible.bindTo(this._contextKeyService);const y=this._register(IE(g));this._register(y.onDidBlur(w=>{this._positionRevealed===!1&&g.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(y.onDidFocus(w=>{this.focus()})),this._registerMouseListeners(),this._register(tn(g,yr.MOUSE_DOWN,w=>{this._onMouseDown=!0}))}static get(e){return e.getContribution(jVe.ID)}_disposeFocusStickyScrollStore(){var e;this._stickyScrollFocusedContextKey.set(!1),(e=this._focusDisposableStore)===null||e===void 0||e.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 On,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex0&&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,i){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,i(),this._editor.setSelection(at.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new On),i=this._register(new lbe(this._editor,{extractLineNumberFromMouseEvent:l=>{const d=this._stickyScrollWidget.getEditorPositionFromNode(l.target.element);return d?d.lineNumber:0}})),n=l=>{if(!this._editor.hasModel()||l.target.type!==12||l.target.detail!==this._stickyScrollWidget.getId())return null;const d=l.target.element;if(!d||d.innerText!==d.innerHTML)return null;const f=this._stickyScrollWidget.getEditorPositionFromNode(d);return f?{range:new at(f.lineNumber,f.column,f.lineNumber,f.column+d.innerText.length),textElement:d}:null},s=this._stickyScrollWidget.getDomNode();this._register(n_(s,yr.CLICK,l=>{if(l.ctrlKey||l.altKey||l.metaKey||!l.leftButton)return;if(l.shiftKey){const y=this._stickyScrollWidget.getLineIndexFromChildDomNode(l.target);if(y===null)return;const w=new yi(this._endLineNumbers[y],1);this._revealLineInCenterIfOutsideViewport(w);return}if(this._stickyScrollWidget.isInFoldingIconDomNode(l.target)){const y=this._stickyScrollWidget.getLineNumberFromChildDomNode(l.target);this._toggleFoldingRegionForLine(y);return}if(!this._stickyScrollWidget.isInStickyLine(l.target))return;let g=this._stickyScrollWidget.getEditorPositionFromNode(l.target);if(!g){const y=this._stickyScrollWidget.getLineNumberFromChildDomNode(l.target);if(y===null)return;g=new yi(y,1)}this._revealPosition(g)})),this._register(n_(s,yr.MOUSE_MOVE,l=>{if(l.shiftKey){const d=this._stickyScrollWidget.getLineIndexFromChildDomNode(l.target);if(d===null||this._showEndForLine!==null&&this._showEndForLine===d)return;this._showEndForLine=d,this._renderStickyScroll();return}this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(tn(s,yr.MOUSE_LEAVE,l=>{this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(i.onMouseMoveOrRelevantKeyDown(([l,d])=>{const f=n(l);if(!f||!l.hasTriggerModifier||!this._editor.hasModel()){e.clear();return}const{range:g,textElement:y}=f;if(!g.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=g,e.clear();else if(y.style.textDecoration==="underline")return;const w=new uh;e.add(go(()=>w.dispose(!0)));let x;_be(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new yi(g.startLineNumber,g.startColumn+1),w.token).then(I=>{if(!w.token.isCancellationRequested)if(I.length!==0){this._candidateDefinitionsLength=I.length;const P=y;x!==P?(e.clear(),x=P,x.style.textDecoration="underline",e.add(go(()=>{x.style.textDecoration="none"}))):x||(x=P,x.style.textDecoration="underline",e.add(go(()=>{x.style.textDecoration="none"})))}else e.clear()})})),this._register(i.onCancel(()=>{e.clear()})),this._register(i.onExecute(async l=>{if(l.target.type!==12||l.target.detail!==this._stickyScrollWidget.getId())return;const d=this._stickyScrollWidget.getEditorPositionFromNode(l.target.element);d&&(!this._editor.hasModel()||!this._stickyRangeProjectedOnEditor||(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:d.lineNumber,column:1})),this._instaService.invokeFunction(wTt,l,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor})))}))}_onContextMenu(e,i){const n=new sT(e,i);this._contextMenuService.showContextMenu({menuId:_t.StickyScrollContext,getAnchor:()=>n})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||e===null)return;const i=this._stickyScrollWidget.getRenderedStickyLine(e),n=i==null?void 0:i.foldingIcon;if(!n)return;WTt(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)*i.index+1;this._editor.setScrollTop(s),this._renderStickyScroll(e)}_readConfiguration(){const e=this._editor.getOption(115);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=null,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=null,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(68).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>{this._showEndForLine=null,this._renderStickyScroll(0)}))}_readConfigurationChange(e){(e.hasChanged(115)||e.hasChanged(73)||e.hasChanged(67)||e.hasChanged(110)||e.hasChanged(68))&&this._readConfiguration(),e.hasChanged(68)&&this._renderStickyScroll(0)}_needsUpdate(e){const i=this._stickyScrollWidget.getCurrentLines();for(const n of i)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 i=this._editor.getLayoutInfo().height/this._editor.getOption(67);this._maxStickyLines=Math.round(i*.25)}async _renderStickyScroll(e){var i,n;const s=this._editor.getModel();if(!s||s.isTooLargeForTokenization()){this._foldingModel=null,this._stickyScrollWidget.setState(void 0,null);return}const l=this._stickyLineCandidateProvider.getVersionId();if(l===void 0||l===s.getVersionId())if(this._foldingModel=(n=await((i=Y4.get(this._editor))===null||i===void 0?void 0:i.getFoldingModel()))!==null&&n!==void 0?n:null,this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(this._widgetState.startLineNumbers.length!==0),!this._focused)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e);else if(this._focusedStickyElementIndex===-1)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const d=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(d)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}}findScrollWidgetState(){const e=this._editor.getOption(67),i=Math.min(this._maxStickyLines,this._editor.getOption(115).maxLineCount),n=this._editor.getScrollTop();let s=0;const l=[],d=[],f=this._editor.getVisibleRanges();if(f.length!==0){const g=new kte(f[0].startLineNumber,f[f.length-1].endLineNumber),y=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(g);for(const w of y){const x=w.startLineNumber,I=w.endLineNumber,P=w.nestingDepth;if(I-x>0){const O=(P-1)*e,W=P*e,X=this._editor.getBottomForLineNumber(x)-n,Z=this._editor.getTopForLineNumber(I)-n,ee=this._editor.getBottomForLineNumber(I)-n;if(O>Z&&O<=ee){l.push(x),d.push(I+1),s=ee-W;break}else W>X&&W<=ee&&(l.push(x),d.push(I+1));if(l.length===i)break}}}return this._endLineNumbers=d,new Jyt(l,d,s,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};SL.ID="store.contrib.stickyScrollController";SL=jVe=sLi([Oz(1,GC),Oz(2,js),Oz(3,So),Oz(4,Kd),Oz(5,fk),Oz(6,Zo)],SL);class oLi extends Ny{constructor(){super({id:"editor.action.toggleStickyScroll",title:{...xa("toggleEditorStickyScroll","Toggle Editor Sticky Scroll"),mnemonicTitle:V({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Editor Sticky Scroll")},metadata:{description:xa("toggleEditorStickyScroll.description","Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport")},category:ZNi.View,toggled:{condition:xn.equals("config.editor.stickyScroll.enabled",!0),title:V("stickyScroll","Sticky Scroll"),mnemonicTitle:V({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:_t.CommandPalette},{id:_t.MenubarAppearanceMenu,group:"4_editor",order:3},{id:_t.StickyScrollContext}]})}async run(e){const i=e.get(El),n=!i.getValue("editor.stickyScroll.enabled");return i.updateValue("editor.stickyScroll.enabled",n)}}const jbe=100;class aLi extends BE{constructor(){super({id:"editor.action.focusStickyScroll",title:{...xa("focusStickyScroll","Focus on the editor sticky scroll"),mnemonicTitle:V({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll")},precondition:xn.and(xn.has("config.editor.stickyScroll.enabled"),Lt.stickyScrollVisible),menu:[{id:_t.CommandPalette}]})}runEditorCommand(e,i){var n;(n=SL.get(i))===null||n===void 0||n.focus()}}class lLi extends BE{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:xa("selectNextStickyScrollLine.title","Select the next editor sticky scroll line"),precondition:Lt.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:jbe,primary:18}})}runEditorCommand(e,i){var n;(n=SL.get(i))===null||n===void 0||n.focusNext()}}class cLi extends BE{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:xa("selectPreviousStickyScrollLine.title","Select the previous sticky scroll line"),precondition:Lt.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:jbe,primary:16}})}runEditorCommand(e,i){var n;(n=SL.get(i))===null||n===void 0||n.focusPrevious()}}class uLi extends BE{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:xa("goToFocusedStickyScrollLine.title","Go to the focused sticky scroll line"),precondition:Lt.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:jbe,primary:3}})}runEditorCommand(e,i){var n;(n=SL.get(i))===null||n===void 0||n.goToFocused()}}class dLi extends BE{constructor(){super({id:"editor.action.selectEditor",title:xa("selectEditor.title","Select Editor"),precondition:Lt.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:jbe,primary:9}})}runEditorCommand(e,i){var n;(n=SL.get(i))===null||n===void 0||n.selectEditor()}}Bc(SL.ID,SL,1);Bd(oLi);Bd(aLi);Bd(cLi);Bd(lLi);Bd(uLi);Bd(dLi);var IDt=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},qee=function(c,e){return function(i,n){e(i,n,c)}};class fLi{constructor(e,i,n,s,l,d){this.range=e,this.insertText=i,this.filterText=n,this.additionalTextEdits=s,this.command=l,this.completion=d}}let zVe=class extends aii{constructor(e,i,n,s,l,d){super(l.disposable),this.model=e,this.line=i,this.word=n,this.completionModel=s,this._suggestMemoryService=d}canBeReused(e,i,n){return this.model===e&&this.line===i&&this.word.word.length>0&&this.word.startColumn===n.startColumn&&this.word.endColumn=0&&g.resolve(Gl.None)}return i}};zVe=IDt([qee(5,xbe)],zVe);let UVe=class extends Ii{constructor(e,i,n,s){super(),this._languageFeatureService=e,this._clipboardService=i,this._suggestMemoryService=n,this._editorService=s,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,i,n,s){var l;if(n.selectedSuggestionInfo)return;let d;for(const O of this._editorService.listCodeEditors())if(O.getModel()===e){d=O;break}if(!d)return;const f=d.getOption(89);if(gU.isAllOff(f))return;e.tokenization.tokenizeIfCheap(i.lineNumber);const g=e.tokenization.getLineTokens(i.lineNumber),y=g.getStandardTokenType(g.findTokenIndexAtOffset(Math.max(i.column-1-1,0)));if(gU.valueFor(f,y)!=="inline")return;let w=e.getWordAtPosition(i),x;if(w!=null&&w.word||(x=this._getTriggerCharacterInfo(e,i)),!(w!=null&&w.word)&&!x||(w||(w=e.getWordUntilPosition(i)),w.endColumn!==i.column))return;let I;const P=e.getValueInRange(new at(i.lineNumber,1,i.lineNumber,i.column));if(!x&&(!((l=this._lastResult)===null||l===void 0)&&l.canBeReused(e,i.lineNumber,w))){const O=new Myt(P,i.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=O,this._lastResult.acquire(),I=this._lastResult}else{const O=await mUe(this._languageFeatureService.completionProvider,e,i,new Kie(void 0,w1e.createSuggestFilter(d).itemKind,x==null?void 0:x.providers),x&&{triggerKind:1,triggerCharacter:x.ch},s);let W;O.needsClipboard&&(W=await this._clipboardService.readText());const X=new mM(O.items,i.column,new Myt(P,0),uE.None,d.getOption(118),d.getOption(112),{boostFullMatch:!1,firstMatchCanBeWeak:!1},W);I=new zVe(e,i.lineNumber,w,X,O,this._suggestMemoryService)}return this._lastResult=I,I}handleItemDidShow(e,i){i.completion.resolve(Gl.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,i){var n;const s=e.getValueInRange(at.fromPositions({lineNumber:i.lineNumber,column:i.column-1},i)),l=new Set;for(const d of this._languageFeatureService.completionProvider.all(e))!((n=d.triggerCharacters)===null||n===void 0)&&n.includes(s)&&l.add(d);if(l.size!==0)return{providers:l,ch:s}}};UVe=IDt([qee(0,js),qee(1,o6),qee(2,xbe),qee(3,Oc)],UVe);Jne(UVe);class hLi extends ms{constructor(){super({id:"editor.action.forceRetokenize",label:V("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,i){if(!i.hasModel())return;const n=i.getModel();n.tokenization.resetTokenization();const s=new o0;n.tokenization.forceTokenization(n.getLineCount()),s.stop(),console.log(`tokenization took ${s.elapsed()}`)}}hr(hLi);class zbe extends Ny{constructor(){super({id:zbe.ID,title:xa({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:xa("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 i=!tq.getTabFocusMode();tq.setTabFocusMode(i),Eb(i?V("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element"):V("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}zbe.ID="editor.action.toggleTabFocusMode";Bd(zbe);var _Li=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Zyt=function(c,e){return function(i,n){e(i,n,c)}};let qVe=class extends Ii{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,i,n={},s,l){var d,f;super(),this._link=i,this._hoverService=s,this._enabled=!0,this.el=zn(e,Sr("a.monaco-link",{tabIndex:(d=i.tabIndex)!==null&&d!==void 0?d:0,href:i.href},i.label)),this.hoverDelegate=(f=n.hoverDelegate)!==null&&f!==void 0?f:Py("mouse"),this.setTooltip(i.title),this.el.setAttribute("role","button");const g=this._register(new Yl(this.el,"click")),y=this._register(new Yl(this.el,"keypress")),w=Mr.chain(y.event,P=>P.map(O=>new Fd(O)).filter(O=>O.keyCode===3)),x=this._register(new Yl(this.el,Gd.Tap)).event;this._register(Jd.addTarget(this.el));const I=Mr.any(g.event,w,x);this._register(I(P=>{this.enabled&&(nc.stop(P,!0),n!=null&&n.opener?n.opener(this._link.href):l.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.setupUpdatableHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};qVe=_Li([Zyt(3,DL),Zyt(4,KC)],qVe);var NDt=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},LDt=function(c,e){return function(i,n){e(i,n,c)}};const pLi=26;let $Ve=class extends Ii{constructor(e,i){super(),this._editor=e,this.instantiationService=i,this.banner=this._register(this.instantiationService.createInstance(JVe))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{var i;this.hide(),(i=e.onClose)===null||i===void 0||i.call(e)}}),this._editor.setBanner(this.banner.element,pLi)}};$Ve=NDt([LDt(1,So)],$Ve);let JVe=class extends Ii{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(gL,{}),this.element=Sr("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 i=Sr("span");return i.innerText=e,i}return this.markdownRenderer.render(e).element}clear(){n0(this.element)}show(e){n0(this.element);const i=this.getAriaLabel(e);i&&this.element.setAttribute("aria-label",i);const n=zn(this.element,Sr("div.icon-container"));n.setAttribute("aria-hidden","true"),e.icon&&n.appendChild(Sr(`div${Uo.asCSSSelector(e.icon)}`));const s=zn(this.element,Sr("div.message-container"));if(s.setAttribute("aria-hidden","true"),s.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=zn(this.element,Sr("div.message-actions-container")),e.actions)for(const d of e.actions)this._register(this.instantiationService.createInstance(qVe,this.messageActionsContainer,{...d,tabIndex:-1},{}));const l=zn(this.element,Sr("div.action-container"));this.actionBar=this._register(new uk(l)),this.actionBar.push(this._register(new WC("banner.close","Close Banner",Uo.asClassName(ckt),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};JVe=NDt([LDt(0,So)],JVe);var LUe=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},zU=function(c,e){return function(i,n){e(i,n,c)}};const gLi=Oh("extensions-warning-message",Dr.warning,V("warningIcon","Icon shown with a warning message in the extensions editor."));let Oq=class extends Ii{constructor(e,i,n,s){super(),this._editor=e,this._editorWorkerService=i,this._workspaceTrustService=n,this._highlighter=null,this._bannerClosed=!1,this._updateState=l=>{if(l&&l.hasMore){if(this._bannerClosed)return;const d=Math.max(l.ambiguousCharacterCount,l.nonBasicAsciiCharacterCount,l.invisibleCharacterCount);let f;if(l.nonBasicAsciiCharacterCount>=d)f={message:V("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new o$};else if(l.ambiguousCharacterCount>=d)f={message:V("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new OR};else if(l.invisibleCharacterCount>=d)f={message:V("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new s$};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:f.message,icon:gLi,actions:[{label:f.command.shortLabel,href:`command:${f.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(s.createInstance($Ve,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(125),this._register(n.onDidChangeTrust(l=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(l=>{l.hasChanged(125)&&(this._options=e.getOption(125),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=mLi(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(n=>n===!1))return;const i={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"?oti:n)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new GVe(this._editor,i,this._updateState,this._editorWorkerService):this._highlighter=new vLi(this._editor,i,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};Oq.ID="editor.contrib.unicodeHighlighter";Oq=LUe([zU(1,_k),zU(2,sxt),zU(3,So)],Oq);function mLi(c,e){return{nonBasicASCII:e.nonBasicASCII===nw?!c:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===nw?!c:e.includeComments,includeStrings:e.includeStrings===nw?!c:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}let GVe=class extends Ii{constructor(e,i,n,s){super(),this._editor=e,this._options=i,this._updateState=n,this._editorWorkerService=s,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new id(()=>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(i=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(i);const n=[];if(!i.hasMore)for(const s of i.ranges)n.push({range:s,options:E1e.instance.getDecorationFromOptions(this._options)});this._decorations.set(n)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;const i=this._editor.getModel();if(!Fje(i,e))return null;const n=i.getValueInRange(e.range);return{reason:ADt(n,this._options),inComment:Bje(i,e),inString:Wje(i,e)}}};GVe=LUe([zU(3,_k)],GVe);class vLi extends Ii{constructor(e,i,n){super(),this._editor=e,this._options=i,this._updateState=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new id(()=>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(),i=[],n={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const s of e){const l=GHe.computeUnicodeHighlights(this._model,this._options,s);for(const d of l.ranges)n.ranges.push(d);n.ambiguousCharacterCount+=n.ambiguousCharacterCount,n.invisibleCharacterCount+=n.invisibleCharacterCount,n.nonBasicAsciiCharacterCount+=n.nonBasicAsciiCharacterCount,n.hasMore=n.hasMore||l.hasMore}if(!n.hasMore)for(const s of n.ranges)i.push({range:s,options:E1e.instance.getDecorationFromOptions(this._options)});this._updateState(n),this._decorations.set(i)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const i=this._editor.getModel(),n=i.getValueInRange(e.range);return Fje(i,e)?{reason:ADt(n,this._options),inComment:Bje(i,e),inString:Wje(i,e)}:null}}const PDt=V("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options");let KVe=class{constructor(e,i,n){this._editor=e,this._languageService=i,this._openerService=n,this.hoverOrdinal=5}computeSync(e,i){if(!this._editor.hasModel()||e.type!==1)return[];const n=this._editor.getModel(),s=this._editor.getContribution(Oq.ID);if(!s)return[];const l=[],d=new Set;let f=300;for(const g of i){const y=s.getDecorationInfo(g);if(!y)continue;const x=n.getValueInRange(g.range).codePointAt(0),I=SFe(x);let P;switch(y.reason.kind){case 0:{mne(y.reason.confusableWith)?P=V("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",I,SFe(y.reason.confusableWith.codePointAt(0))):P=V("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",I,SFe(y.reason.confusableWith.codePointAt(0)));break}case 1:P=V("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",I);break;case 2:P=V("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",I);break}if(d.has(P))continue;d.add(P);const O={codePoint:x,reason:y.reason,inComment:y.inComment,inString:y.inString},W=V("unicodeHighlight.adjustSettings","Adjust settings"),X=`command:${are.ID}?${encodeURIComponent(JSON.stringify(O))}`,Z=new vv("",!0).appendMarkdown(P).appendText(" ").appendLink(X,W,PDt);l.push(new hE(this,g.range,[Z],!1,f++))}return l}renderHoverParts(e,i){return gki(e,i,this._editor,this._languageService,this._openerService)}};KVe=LUe([zU(1,If),zU(2,KC)],KVe);function QVe(c){return`U+${c.toString(16).padStart(4,"0")}`}function SFe(c){let e=`\`${QVe(c)}\``;return oL.isInvisibleCharacter(c)||(e+=` "${`${yLi(c)}`}"`),e}function yLi(c){return c===96?"`` ` ``":"`"+String.fromCodePoint(c)+"`"}function ADt(c,e){return GHe.computeUnicodeHighlightReason(c,e)}class E1e{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,i){const n=`${e}${i}`;let s=this.map.get(n);return s||(s=Xa.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:i}),this.map.set(n,s)),s}}E1e.instance=new E1e;class bLi extends ms{constructor(){super({id:OR.ID,label:V("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=V("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}async run(e,i,n){const s=e==null?void 0:e.get(El);s&&this.runAction(s)}async runAction(e){await e.updateValue(Cb.includeComments,!1,2)}}class CLi extends ms{constructor(){super({id:OR.ID,label:V("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=V("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}async run(e,i,n){const s=e==null?void 0:e.get(El);s&&this.runAction(s)}async runAction(e){await e.updateValue(Cb.includeStrings,!1,2)}}class OR extends ms{constructor(){super({id:OR.ID,label:V("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=V("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}async run(e,i,n){const s=e==null?void 0:e.get(El);s&&this.runAction(s)}async runAction(e){await e.updateValue(Cb.ambiguousCharacters,!1,2)}}OR.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class s$ extends ms{constructor(){super({id:s$.ID,label:V("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=V("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}async run(e,i,n){const s=e==null?void 0:e.get(El);s&&this.runAction(s)}async runAction(e){await e.updateValue(Cb.invisibleCharacters,!1,2)}}s$.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class o$ extends ms{constructor(){super({id:o$.ID,label:V("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=V("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}async run(e,i,n){const s=e==null?void 0:e.get(El);s&&this.runAction(s)}async runAction(e){await e.updateValue(Cb.nonBasicASCII,!1,2)}}o$.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class are extends ms{constructor(){super({id:are.ID,label:V("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}async run(e,i,n){const{codePoint:s,reason:l,inString:d,inComment:f}=n,g=String.fromCodePoint(s),y=e.get(pk),w=e.get(El);function x(O){return oL.isInvisibleCharacter(O)?V("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",QVe(O)):V("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${QVe(O)} "${g}"`)}const I=[];if(l.kind===0)for(const O of l.notAmbiguousInLocales)I.push({label:V("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',O),run:async()=>{wLi(w,[O])}});if(I.push({label:x(s),run:()=>SLi(w,[s])}),f){const O=new bLi;I.push({label:O.label,run:async()=>O.runAction(w)})}else if(d){const O=new CLi;I.push({label:O.label,run:async()=>O.runAction(w)})}if(l.kind===0){const O=new OR;I.push({label:O.label,run:async()=>O.runAction(w)})}else if(l.kind===1){const O=new s$;I.push({label:O.label,run:async()=>O.runAction(w)})}else if(l.kind===2){const O=new o$;I.push({label:O.label,run:async()=>O.runAction(w)})}else xLi(l);const P=await y.pick(I,{title:PDt});P&&await P.run()}}are.ID="editor.action.unicodeHighlight.showExcludeOptions";async function SLi(c,e){const i=c.getValue(Cb.allowedCharacters);let n;typeof i=="object"&&i?n=i:n={};for(const s of e)n[String.fromCodePoint(s)]=!0;await c.updateValue(Cb.allowedCharacters,n,2)}async function wLi(c,e){var i;const n=(i=c.inspect(Cb.allowedLocales).user)===null||i===void 0?void 0:i.value;let s;typeof n=="object"&&n?s=Object.assign({},n):s={};for(const l of e)s[l]=!0;await c.updateValue(Cb.allowedLocales,s,2)}function xLi(c){throw new Error(`Unexpected value: ${c}`)}hr(OR);hr(s$);hr(o$);hr(are);Bc(Oq.ID,Oq,1);PR.register(KVe);var kLi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Yyt=function(c,e){return function(i,n){e(i,n,c)}};const ODt="ignoreUnusualLineTerminators";function TLi(c,e,i){c.setModelProperty(e.uri,ODt,i)}function DLi(c,e){return c.getModelProperty(e.uri,ODt)}let lne=class extends Ii{constructor(e,i,n){super(),this._editor=e,this._dialogService=i,this._codeEditorService=n,this._isPresentingDialog=!1,this._config=this._editor.getOption(126),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(126)&&(this._config=this._editor.getOption(126),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()||DLi(this._codeEditorService,e)===!0||this._editor.getOption(91))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:V("unusualLineTerminators.title","Unusual Line Terminators"),message:V("unusualLineTerminators.message","Detected unusual line terminators"),detail:V("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`.",lk(e.uri)),primaryButton:V({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:V("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!n.confirmed){TLi(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())}};lne.ID="editor.contrib.unusualLineTerminatorsDetector";lne=kLi([Yyt(1,Mne),Yyt(2,Oc)],lne);Bc(lne.ID,lne,1);var MDt=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},S0e=function(c,e){return function(i,n){e(i,n,c)}},ig,XVe;const Ube=new Xr("hasWordHighlights",!1);function RDt(c,e,i,n){const s=c.ordered(e);return AHe(s.map(l=>()=>Promise.resolve(l.provideDocumentHighlights(e,i,n)).then(void 0,r_)),bv).then(l=>{if(l){const d=new E_;return d.set(e.uri,l),d}return new E_})}function ELi(c,e,i,n,s,l){const d=c.ordered(e);return AHe(d.map(f=>()=>{const g=l.filter(y=>ZCt(y)).filter(y=>zje(f.selector,y.uri,y.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(f.provideMultiDocumentHighlights(e,i,g,s)).then(void 0,r_)}),f=>f instanceof E_&&f.size>0)}class PUe{constructor(e,i,n){this._model=e,this._selection=i,this._wordSeparators=n,this._wordRange=this._getCurrentWordRange(e,i),this._result=null}get result(){return this._result||(this._result=Hg(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,i){const n=e.getWordAtPosition(i.getPosition());return n?new at(i.startLineNumber,n.startColumn,i.startLineNumber,n.endColumn):null}isValid(e,i,n){const s=i.startLineNumber,l=i.startColumn,d=i.endColumn,f=this._getCurrentWordRange(e,i);let g=!!(this._wordRange&&this._wordRange.equalsRange(f));for(let y=0,w=n.length;!g&&y=d&&(g=!0)}return g}cancel(){this.result.cancel()}}class ILi extends PUe{constructor(e,i,n,s){super(e,i,n),this._providers=s}_compute(e,i,n,s){return RDt(this._providers,e,i.getPosition(),s).then(l=>l||new E_)}}class NLi extends PUe{constructor(e,i,n,s,l){super(e,i,n),this._providers=s,this._otherModels=l}_compute(e,i,n,s){return ELi(this._providers,e,i.getPosition(),n,s,this._otherModels).then(l=>l||new E_)}}class FDt extends PUe{constructor(e,i,n,s,l){super(e,i,s),this._otherModels=l,this._selectionIsEmpty=i.isEmpty(),this._word=n}_compute(e,i,n,s){return J4(250,s).then(()=>{const l=new E_;let d;if(this._word?d=this._word:d=e.getWordAtPosition(i.getPosition()),!d)return new E_;const f=[e,...this._otherModels];for(const g of f){if(g.isDisposed())continue;const w=g.findMatches(d.word,!0,!1,!0,n,!1).map(x=>({range:x.range,kind:Mte.Text}));w&&l.set(g.uri,w)}return l})}isValid(e,i,n){const s=i.isEmpty();return this._selectionIsEmpty!==s?!1:super.isValid(e,i,n)}}function LLi(c,e,i,n,s){return c.has(e)?new ILi(e,i,s,c):new FDt(e,i,n,s,[])}function PLi(c,e,i,n,s,l){return c.has(e)?new NLi(e,i,s,c,l):new FDt(e,i,n,s,l)}kL("_executeDocumentHighlights",async(c,e,i)=>{const n=c.get(js),s=await RDt(n.documentHighlightProvider,e,i,Gl.None);return s==null?void 0:s.get(e.uri)});let cne=ig=class{constructor(e,i,n,s,l){this.toUnhook=new On,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new E_,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=i,this.multiDocumentProviders=n,this.codeEditorService=l,this._hasWordHighlights=Ube.bindTo(s),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(81),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(d=>{this._ignorePositionChangeEvent||this.occurrencesHighlight!=="off"&&this._onPositionChanged(d)})),this.toUnhook.add(e.onDidFocusEditorText(d=>{this.occurrencesHighlight!=="off"&&(this.workerRequest||this._run())})),this.toUnhook.add(e.onDidChangeModelContent(d=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(d=>{!d.newModelUrl&&d.oldModelUrl?this._stopSingular():ig.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(d=>{const f=this.editor.getOption(81);this.occurrencesHighlight!==f&&(this.occurrencesHighlight=f,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,ig.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight!=="off"&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(at.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),n=(e.findIndex(l=>l.containsPosition(this.editor.getPosition()))+1)%e.length,s=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(s.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(s);const l=this._getWord();if(l){const d=this.editor.getModel().getLineContent(s.startLineNumber);Eb(`${d}, ${n+1} of ${e.length} for '${l.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),n=(e.findIndex(l=>l.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 l=this._getWord();if(l){const d=this.editor.getModel().getLineContent(s.startLineNumber);Eb(`${d}, ${n+1} of ${e.length} for '${l.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const e=ig.storedDecorations.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),ig.storedDecorations.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(){const e=this.codeEditorService.listCodeEditors(),i=[];for(const n of e){if(!n.hasModel())continue;const s=ig.storedDecorations.get(n.getModel().uri);if(!s)continue;n.removeDecorations(s),i.push(n.getModel().uri);const l=t6.get(n);l!=null&&l.wordHighlighter&&l.wordHighlighter.decorations.length>0&&(l.wordHighlighter.decorations.clear(),l.wordHighlighter.workerRequest=null,l.wordHighlighter._hasWordHighlights.set(!1))}for(const n of i)ig.storedDecorations.delete(n)}_stopSingular(){var e,i,n,s;this._removeSingleDecorations(),this.editor.hasTextFocus()&&(((e=this.editor.getModel())===null||e===void 0?void 0:e.uri.scheme)!==wa.vscodeNotebookCell&&((n=(i=ig.query)===null||i===void 0?void 0:i.modelInfo)===null||n===void 0?void 0:n.model.uri.scheme)!==wa.vscodeNotebookCell?(ig.query=null,this._run()):!((s=ig.query)===null||s===void 0)&&s.modelInfo&&(ig.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(){this._removeAllDecorations(),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){var i;if(this.occurrencesHighlight==="off"){this._stopAll();return}if(e.reason!==3&&((i=this.editor.getModel())===null||i===void 0?void 0:i.uri.scheme)!==wa.vscodeNotebookCell){this._stopAll();return}this._run()}_getWord(){const e=this.editor.getSelection(),i=e.startLineNumber,n=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:i,column:n})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===wa.vscodeNotebookCell){const l=[],d=this.codeEditorService.listCodeEditors();for(const f of d){const g=f.getModel();g&&g!==e&&g.uri.scheme===wa.vscodeNotebookCell&&l.push(g)}return l}const n=[],s=this.codeEditorService.listCodeEditors();for(const l of s){if(!Bze(l))continue;const d=l.getModel();d&&e===d.modified&&n.push(d.modified)}if(n.length)return n;if(this.occurrencesHighlight==="singleFile")return[];for(const l of s){const d=l.getModel();d&&d!==e&&n.push(d)}return n}_run(){var e;let i;if(this.editor.hasTextFocus()){const s=this.editor.getSelection();if(!s||s.startLineNumber!==s.endLineNumber){ig.query=null,this._stopAll();return}const l=s.startColumn,d=s.endColumn,f=this._getWord();if(!f||f.startColumn>l||f.endColumn{s===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=d||[],this._beginRenderDecorations())},Ba)}}computeWithModel(e,i,n,s){return s.length?PLi(this.multiDocumentProviders,e,i,n,this.editor.getOption(131),s):LLi(this.providers,e,i,n,this.editor.getOption(131))}_beginRenderDecorations(){const e=new Date().getTime(),i=this.lastCursorPositionChangeTime+250;e>=i?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},i-e)}renderDecorations(){var e,i,n;this.renderDecorationsTimer=-1;const s=this.codeEditorService.listCodeEditors();for(const l of s){const d=t6.get(l);if(!d)continue;const f=[],g=(e=l.getModel())===null||e===void 0?void 0:e.uri;if(g&&this.workerRequestValue.has(g)){const y=ig.storedDecorations.get(g),w=this.workerRequestValue.get(g);if(w)for(const I of w)I.range&&f.push({range:I.range,options:zIi(I.kind)});let x=[];l.changeDecorations(I=>{x=I.deltaDecorations(y??[],f)}),ig.storedDecorations=ig.storedDecorations.set(g,x),f.length>0&&((i=d.wordHighlighter)===null||i===void 0||i.decorations.set(f),(n=d.wordHighlighter)===null||n===void 0||n._hasWordHighlights.set(!0))}}}dispose(){this._stopSingular(),this.toUnhook.dispose()}};cne.storedDecorations=new E_;cne.query=null;cne=ig=MDt([S0e(4,Oc)],cne);let t6=XVe=class extends Ii{static get(e){return e.getContribution(XVe.ID)}constructor(e,i,n,s){super(),this._wordHighlighter=null;const l=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this._wordHighlighter=new cne(e,n.documentHighlightProvider,n.multiDocumentHighlightProvider,i,s))};this._register(e.onDidChangeModel(d=>{this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),l()})),l()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){var e;(e=this._wordHighlighter)===null||e===void 0||e.moveNext()}moveBack(){var e;(e=this._wordHighlighter)===null||e===void 0||e.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore()}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};t6.ID="editor.contrib.wordHighlighter";t6=XVe=MDt([S0e(1,Zo),S0e(2,js),S0e(3,Oc)],t6);class BDt extends ms{constructor(e,i){super(i),this._isNext=e}run(e,i){const n=t6.get(i);n&&(this._isNext?n.moveNext():n.moveBack())}}class ALi extends BDt{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:V("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:Ube,kbOpts:{kbExpr:Lt.editorTextFocus,primary:65,weight:100}})}}class OLi extends BDt{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:V("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:Ube,kbOpts:{kbExpr:Lt.editorTextFocus,primary:1089,weight:100}})}}class MLi extends ms{constructor(){super({id:"editor.action.wordHighlight.trigger",label:V("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:Ube.toNegated(),kbOpts:{kbExpr:Lt.editorTextFocus,primary:0,weight:100}})}run(e,i,n){const s=t6.get(i);s&&s.restoreViewState(!0)}}Bc(t6.ID,t6,0);hr(ALi);hr(OLi);hr(MLi);class qbe extends sg{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,i,n){if(!i.hasModel())return;const s=ak(i.getOption(131),i.getOption(130)),l=i.getModel(),f=i.getSelections().map(g=>{const y=new yi(g.positionLineNumber,g.positionColumn),w=this._move(s,l,y,this._wordNavigationType);return this._moveTo(g,w,this._inSelectionMode)});if(l.pushStackElement(),i._getViewModel().setCursorStates("moveWordCommand",3,f.map(g=>Pc.fromModelSelection(g))),f.length===1){const g=new yi(f[0].positionLineNumber,f[0].positionColumn);i.revealPosition(g,0)}}_moveTo(e,i,n){return n?new Qs(e.selectionStartLineNumber,e.selectionStartColumn,i.lineNumber,i.column):new Qs(i.lineNumber,i.column,i.lineNumber,i.column)}}class MR extends qbe{_move(e,i,n,s){return _u.moveWordLeft(e,i,n,s)}}class RR extends qbe{_move(e,i,n,s){return _u.moveWordRight(e,i,n,s)}}class RLi extends MR{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class FLi extends MR{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class BLi extends MR{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:xn.and(Lt.textInputFocus,(e=xn.and(Tne,Wye))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}class WLi extends MR{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class VLi extends MR{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class HLi extends MR{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:xn.and(Lt.textInputFocus,(e=xn.and(Tne,Wye))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class jLi extends MR{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,i,n,s){return super._move(ak(RE.wordSeparators.defaultValue,e.intlSegmenterLocales),i,n,s)}}class zLi extends MR{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,i,n,s){return super._move(ak(RE.wordSeparators.defaultValue,e.intlSegmenterLocales),i,n,s)}}class ULi extends RR{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class qLi extends RR{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:xn.and(Lt.textInputFocus,(e=xn.and(Tne,Wye))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}class $Li extends RR{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class JLi extends RR{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class GLi extends RR{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:xn.and(Lt.textInputFocus,(e=xn.and(Tne,Wye))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class KLi extends RR{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class QLi extends RR{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,i,n,s){return super._move(ak(RE.wordSeparators.defaultValue,e.intlSegmenterLocales),i,n,s)}}class XLi extends RR{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,i,n,s){return super._move(ak(RE.wordSeparators.defaultValue,e.intlSegmenterLocales),i,n,s)}}class $be extends sg{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,i,n){const s=e.get(Kd);if(!i.hasModel())return;const l=ak(i.getOption(131),i.getOption(130)),d=i.getModel(),f=i.getSelections(),g=i.getOption(6),y=i.getOption(11),w=s.getLanguageConfiguration(d.getLanguageId()).getAutoClosingPairs(),x=i._getViewModel(),I=f.map(P=>{const O=this._delete({wordSeparators:l,model:d,selection:P,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:i.getOption(9),autoClosingBrackets:g,autoClosingQuotes:y,autoClosingPairs:w,autoClosedCharacters:x.getCursorAutoClosedCharacters()},this._wordNavigationType);return new I0(O,"")});i.pushUndoStop(),i.executeCommands(this.id,I),i.pushUndoStop()}}class AUe extends $be{_delete(e,i){const n=_u.deleteWordLeft(e,i);return n||new at(1,1,1,1)}}class OUe extends $be{_delete(e,i){const n=_u.deleteWordRight(e,i);if(n)return n;const s=e.model.getLineCount(),l=e.model.getLineMaxColumn(s);return new at(s,l,s,l)}}class ZLi extends AUe{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:Lt.writable})}}class YLi extends AUe{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:Lt.writable})}}class ePi extends AUe{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:Lt.writable,kbOpts:{kbExpr:Lt.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class tPi extends OUe{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:Lt.writable})}}class iPi extends OUe{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:Lt.writable})}}class nPi extends OUe{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:Lt.writable,kbOpts:{kbExpr:Lt.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class rPi extends ms{constructor(){super({id:"deleteInsideWord",precondition:Lt.writable,label:V("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,i,n){if(!i.hasModel())return;const s=ak(i.getOption(131),i.getOption(130)),l=i.getModel(),f=i.getSelections().map(g=>{const y=_u.deleteInsideWord(s,l,g);return new I0(y,"")});i.pushUndoStop(),i.executeCommands(this.id,f),i.pushUndoStop()}}qr(new RLi);qr(new FLi);qr(new BLi);qr(new WLi);qr(new VLi);qr(new HLi);qr(new ULi);qr(new qLi);qr(new $Li);qr(new JLi);qr(new GLi);qr(new KLi);qr(new jLi);qr(new zLi);qr(new QLi);qr(new XLi);qr(new ZLi);qr(new YLi);qr(new ePi);qr(new tPi);qr(new iPi);qr(new nPi);hr(rPi);class sPi extends $be{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:Lt.writable,kbOpts:{kbExpr:Lt.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,i){const n=dye.deleteWordPartLeft(e);return n||new at(1,1,1,1)}}class oPi extends $be{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:Lt.writable,kbOpts:{kbExpr:Lt.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,i){const n=dye.deleteWordPartRight(e);if(n)return n;const s=e.model.getLineCount(),l=e.model.getLineMaxColumn(s);return new at(s,l,s,l)}}class WDt extends qbe{_move(e,i,n,s){return dye.moveWordPartLeft(e,i,n)}}class aPi extends WDt{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:Lt.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}uc.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class lPi extends WDt{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:Lt.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}uc.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class VDt extends qbe{_move(e,i,n,s){return dye.moveWordPartRight(e,i,n)}}class cPi extends VDt{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:Lt.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class uPi extends VDt{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:Lt.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}qr(new sPi);qr(new oPi);qr(new aPi);qr(new lPi);qr(new cPi);qr(new uPi);class ZVe extends Ii{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const e=ky.get(this.editor);if(e&&this.editor.hasModel()){let i=this.editor.getOptions().get(92);i||(this.editor.isSimpleWidget?i=new vv(V("editor.simple.readonly","Cannot edit in read-only input")):i=new vv(V("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(i,this.editor.getPosition())}}}ZVe.ID="editor.contrib.readOnlyMessageController";Bc(ZVe.ID,ZVe,2);var dPi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},ebt=function(c,e){return function(i,n){e(i,n,c)}};let YVe=class extends Ii{constructor(e,i,n){super(),this._textModel=e,this._languageFeaturesService=i,this._outlineModelService=n,this._currentModel=yc(this,void 0);const s=yv("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),l=yv("_textModel.onDidChangeContent",Mr.debounce(d=>this._textModel.onDidChangeContent(d),()=>{},100));this._register(ck(async(d,f)=>{s.read(d),l.read(d);const g=f.add(new Wyi),y=await this._outlineModelService.getOrCreate(this._textModel,g.token);f.isDisposed||this._currentModel.set(y,void 0)}))}getBreadcrumbItems(e,i){const n=this._currentModel.read(i);if(!n)return[];const s=n.asListOfDocumentSymbols().filter(l=>e.contains(l.range.startLineNumber)&&!e.contains(l.range.endLineNumber));return s.sort(gbt(kb(l=>l.range.endLineNumber-l.range.startLineNumber,uT))),s.map(l=>({name:l.name,kind:l.kind,startLineNumber:l.range.startLineNumber}))}};YVe=dPi([ebt(1,js),ebt(2,sre)],YVe);Aie.setBreadcrumbsSourceFactory((c,e)=>e.createInstance(YVe,c));class eHe extends Ii{constructor(e){super(),this.editor=e,this.widget=null,TE&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(91);!this.widget&&e?this.widget=new Jbe(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}eHe.ID="editor.contrib.iPadShowKeyboard";class Jbe extends Ii{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(tn(this._domNode,"touchstart",i=>{this.editor.focus()})),this._register(tn(this._domNode,"focus",i=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return Jbe.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}Jbe.ID="editor.contrib.ShowKeyboardWidget";Bc(eHe.ID,eHe,3);var fPi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},tbt=function(c,e){return function(i,n){e(i,n,c)}},tHe;let Mq=tHe=class extends Ii{static get(e){return e.getContribution(tHe.ID)}constructor(e,i,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(Nh.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 Gbe(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};Mq.ID="editor.contrib.inspectTokens";Mq=tHe=fPi([tbt(1,Nw),tbt(2,If)],Mq);class hPi extends ms{constructor(){super({id:"editor.action.inspectTokens",label:sBe.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,i){const n=Mq.get(i);n==null||n.launch()}}function _Pi(c){let e="";for(let i=0,n=c.length;ieq,tokenize:(s,l,d)=>tje(e,d),tokenizeEncoded:(s,l,d)=>nye(n,d)}}class Gbe extends Ii{constructor(e,i){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=i,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=pPi(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 Gbe._ID}_compute(e){const i=this._getTokensAtLine(e.lineNumber);let n=0;for(let g=i.tokens1.length-1;g>=0;g--){const y=i.tokens1[g];if(e.column-1>=y.offset){n=g;break}}let s=0;for(let g=i.tokens2.length>>>1;g>=0;g--)if(e.column-1>=i.tokens2[g<<1]){s=g;break}const l=this._model.getLineContent(e.lineNumber);let d="";if(n=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},ibt=function(c,e){return function(i,n){e(i,n,c)}},$ee;let I1e=$ee=class{constructor(e,i){this.quickInputService=e,this.keybindingService=i,this.registry=dh.as(rB.Quickaccess)}provide(e){const i=new On;return i.add(e.onDidAccept(()=>{const[n]=e.selectedItems;n&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),i.add(e.onDidChangeValue(n=>{const s=this.registry.getQuickAccessProvider(n.substr($ee.PREFIX.length));s&&s.prefix&&s.prefix!==$ee.PREFIX&&this.quickInputService.quickAccess.show(s.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(n=>n.prefix!==$ee.PREFIX),i}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((i,n)=>i.prefix.localeCompare(n.prefix)).flatMap(i=>this.createPicks(i))}createPicks(e){return e.helpEntries.map(i=>{const n=i.prefix||e.prefix,s=n||"…";return{prefix:n,label:s,keybinding:i.commandId?this.keybindingService.lookupKeybinding(i.commandId):void 0,ariaLabel:V("helpPickAriaLabel","{0}, {1}",s,i.description),description:i.description}})}};I1e.PREFIX="?";I1e=$ee=gPi([ibt(0,pk),ibt(1,ou)],I1e);dh.as(rB.Quickaccess).registerQuickAccessProvider({ctor:I1e,prefix:"",helpEntries:[{description:oBe.helpQuickAccessActionLabel}]});class HDt{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,i,n){var s;const l=new On;e.canAcceptInBackground=!!(!((s=this.options)===null||s===void 0)&&s.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const d=l.add(new jg);return d.value=this.doProvide(e,i,n),l.add(this.onDidActiveTextEditorControlChange(()=>{d.value=void 0,d.value=this.doProvide(e,i)})),l}doProvide(e,i,n){var s;const l=new On,d=this.activeTextEditorControl;if(d&&this.canProvideWithTextEditor(d)){const f={editor:d},g=Okt(d);if(g){let y=(s=d.saveViewState())!==null&&s!==void 0?s:void 0;l.add(g.onDidChangeCursorPosition(()=>{var w;y=(w=d.saveViewState())!==null&&w!==void 0?w:void 0})),f.restoreViewState=()=>{y&&d===this.activeTextEditorControl&&d.restoreViewState(y)},l.add(ZM(i.onCancellationRequested)(()=>{var w;return(w=f.restoreViewState)===null||w===void 0?void 0:w.call(f)}))}l.add(go(()=>this.clearDecorations(d))),l.add(this.provideWithTextEditor(f,e,i,n))}else l.add(this.provideWithoutTextEditor(e,i));return l}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},i){e.setSelection(i.range,"code.jump"),e.revealRangeInCenter(i.range,0),i.preserveFocus||e.focus();const n=e.getModel();n&&"getLineContent"in n&&hL(`${n.getLineContent(i.range.startLineNumber)}`)}getModel(e){var i;return Bze(e)?(i=e.getModel())===null||i===void 0?void 0:i.modified:e.getModel()}addDecorations(e,i){e.changeDecorations(n=>{const s=[];this.rangeHighlightDecorationId&&(s.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),s.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const l=[{range:i,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:i,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:Lh(FSt),position:ww.Full}}}],[d,f]=n.deltaDecorations(s,l);this.rangeHighlightDecorationId={rangeHighlightId:d,overviewRulerDecorationId:f}})}clearDecorations(e){const i=this.rangeHighlightDecorationId;i&&(e.changeDecorations(n=>{n.deltaDecorations([i.overviewRulerDecorationId,i.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}class Kbe extends HDt{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const i=V("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:i}],e.ariaLabel=i,Ii.None}provideWithTextEditor(e,i,n){const s=e.editor,l=new On;l.add(i.onDidAccept(g=>{const[y]=i.selectedItems;if(y){if(!this.isValidLineNumber(s,y.lineNumber))return;this.gotoLocation(e,{range:this.toRange(y.lineNumber,y.column),keyMods:i.keyMods,preserveFocus:g.inBackground}),g.inBackground||i.hide()}}));const d=()=>{const g=this.parsePosition(s,i.value.trim().substr(Kbe.PREFIX.length)),y=this.getPickLabel(s,g.lineNumber,g.column);if(i.items=[{lineNumber:g.lineNumber,column:g.column,label:y}],i.ariaLabel=y,!this.isValidLineNumber(s,g.lineNumber)){this.clearDecorations(s);return}const w=this.toRange(g.lineNumber,g.column);s.revealRangeInCenter(w,0),this.addDecorations(s,w)};d(),l.add(i.onDidChangeValue(()=>d()));const f=Okt(s);return f&&f.getOptions().get(68).renderType===2&&(f.updateOptions({lineNumbers:"on"}),l.add(go(()=>f.updateOptions({lineNumbers:"relative"})))),l}toRange(e=1,i=1){return{startLineNumber:e,startColumn:i,endLineNumber:e,endColumn:i}}parsePosition(e,i){const n=i.split(/,|:|#/).map(l=>parseInt(l,10)).filter(l=>!isNaN(l)),s=this.lineCount(e)+1;return{lineNumber:n[0]>0?n[0]:s+n[0],column:n[1]}}getPickLabel(e,i,n){if(this.isValidLineNumber(e,i))return this.isValidColumn(e,i,n)?V("gotoLineColumnLabel","Go to line {0} and character {1}.",i,n):V("gotoLineLabel","Go to line {0}.",i);const s=e.getPosition()||{lineNumber:1,column:1},l=this.lineCount(e);return l>1?V("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",s.lineNumber,s.column,l):V("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",s.lineNumber,s.column)}isValidLineNumber(e,i){return!i||typeof i!="number"?!1:i>0&&i<=this.lineCount(e)}isValidColumn(e,i,n){if(!n||typeof n!="number")return!1;const s=this.getModel(e);if(!s)return!1;const l={lineNumber:i,column:n};return s.validatePosition(l).equals(l)}lineCount(e){var i,n;return(n=(i=this.getModel(e))===null||i===void 0?void 0:i.getLineCount())!==null&&n!==void 0?n:0}}Kbe.PREFIX=":";var mPi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},vPi=function(c,e){return function(i,n){e(i,n,c)}};let une=class extends Kbe{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=Mr.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};une=mPi([vPi(0,Oc)],une);let MUe=class jDt extends ms{constructor(){super({id:jDt.ID,label:Cve.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:Lt.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(pk).quickAccess.show(une.PREFIX)}};MUe.ID="editor.action.gotoLine";hr(MUe);dh.as(rB.Quickaccess).registerQuickAccessProvider({ctor:une,prefix:une.PREFIX,helpEntries:[{description:Cve.gotoLineActionLabel,commandId:MUe.ID}]});const zDt=[void 0,[]];function wFe(c,e,i=0,n=0){const s=e;return s.values&&s.values.length>1?yPi(c,s.values,i,n):UDt(c,e,i,n)}function yPi(c,e,i,n){let s=0;const l=[];for(const d of e){const[f,g]=UDt(c,d,i,n);if(typeof f!="number")return zDt;s+=f,l.push(...g)}return[s,bPi(l)]}function UDt(c,e,i,n){const s=k9(e.original,e.originalLowercase,i,c,c.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return s?[s[0],Rne(s)]:zDt}function bPi(c){const e=c.sort((s,l)=>s.start-l.start),i=[];let n;for(const s of e)!n||!CPi(n,s)?(n=s,i.push(s)):(n.start=Math.min(n.start,s.start),n.end=Math.max(n.end,s.end));return i}function CPi(c,e){return!(c.end=0,d=nbt(c);let f;const g=c.split(qDt);if(g.length>1)for(const y of g){const w=nbt(y),{pathNormalized:x,normalized:I,normalizedLowercase:P}=rbt(y);I&&(f||(f=[]),f.push({original:y,originalLowercase:y.toLowerCase(),pathNormalized:x,normalized:I,normalizedLowercase:P,expectContiguousMatch:w}))}return{original:c,originalLowercase:e,pathNormalized:i,normalized:n,normalizedLowercase:s,values:f,containsPathSeparator:l,expectContiguousMatch:d}}function rbt(c){let e;M0?e=c.replace(/\//g,vE):e=c.replace(/\\/g,vE);const i=Yii(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:i,normalizedLowercase:i.toLowerCase()}}function sbt(c){return Array.isArray(c)?iHe(c.map(e=>e.original).join(qDt)):iHe(c.original)}var SPi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},obt=function(c,e){return function(i,n){e(i,n,c)}},UU;let uL=UU=class extends HDt{constructor(e,i,n=Object.create(null)){super(n),this._languageFeaturesService=e,this._outlineModelService=i,this.options=n,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,V("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),Ii.None}provideWithTextEditor(e,i,n,s){const l=e.editor,d=this.getModel(l);return d?this._languageFeaturesService.documentSymbolProvider.has(d)?this.doProvideWithEditorSymbols(e,d,i,n,s):this.doProvideWithoutEditorSymbols(e,d,i,n):Ii.None}doProvideWithoutEditorSymbols(e,i,n,s){const l=new On;return this.provideLabelPick(n,V("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(async()=>!await this.waitForLanguageSymbolRegistry(i,l)||s.isCancellationRequested||l.add(this.doProvideWithEditorSymbols(e,i,n,s)))(),l}provideLabelPick(e,i){e.items=[{label:i,index:0,kind:14}],e.ariaLabel=i}async waitForLanguageSymbolRegistry(e,i){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const n=new bne,s=i.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(s.dispose(),n.complete(!0))}));return i.add(go(()=>n.complete(!1))),n.p}doProvideWithEditorSymbols(e,i,n,s,l){var d;const f=e.editor,g=new On;g.add(n.onDidAccept(I=>{var P;const[O]=n.selectedItems;O&&O.range&&(this.gotoLocation(e,{range:O.range.selection,keyMods:n.keyMods,preserveFocus:I.inBackground}),(P=l==null?void 0:l.handleAccept)===null||P===void 0||P.call(l,O),I.inBackground||n.hide())})),g.add(n.onDidTriggerItemButton(({item:I})=>{I&&I.range&&(this.gotoLocation(e,{range:I.range.selection,keyMods:n.keyMods,forceSideBySide:!0}),n.hide())}));const y=this.getDocumentSymbols(i,s);let w;const x=async I=>{w==null||w.dispose(!0),n.busy=!1,w=new uh(s),n.busy=!0;try{const P=iHe(n.value.substr(UU.PREFIX.length).trim()),O=await this.doGetSymbolPicks(y,P,void 0,w.token,i);if(s.isCancellationRequested)return;if(O.length>0){if(n.items=O,I&&P.original.length===0){const W=zte(O,X=>!!(X.type!=="separator"&&X.range&&at.containsPosition(X.range.decoration,I)));W&&(n.activeItems=[W])}}else P.original.length>0?this.provideLabelPick(n,V("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(n,V("noSymbolResults","No editor symbols"))}finally{s.isCancellationRequested||(n.busy=!1)}};return g.add(n.onDidChangeValue(()=>x(void 0))),x((d=f.getSelection())===null||d===void 0?void 0:d.getPosition()),g.add(n.onDidChangeActive(()=>{const[I]=n.activeItems;I&&I.range&&(f.revealRangeInCenter(I.range.selection,0),this.addDecorations(f,I.range.decoration))})),g}async doGetSymbolPicks(e,i,n,s,l){var d,f;const g=await e;if(s.isCancellationRequested)return[];const y=i.original.indexOf(UU.SCOPE_PREFIX)===0,w=y?1:0;let x,I;i.values&&i.values.length>1?(x=sbt(i.values[0]),I=sbt(i.values.slice(1))):x=i;let P;const O=(f=(d=this.options)===null||d===void 0?void 0:d.openSideBySideDirection)===null||f===void 0?void 0:f.call(d);O&&(P=[{iconClass:O==="right"?Uo.asClassName(Dr.splitHorizontal):Uo.asClassName(Dr.splitVertical),tooltip:O==="right"?V("openToSide","Open to the Side"):V("openToBottom","Open to the Bottom")}]);const W=[];for(let ee=0;eew){let pi=!1;if(x!==i&&([vt,Nt]=wFe(Te,{...i,values:void 0},w,Be),typeof vt=="number"&&(pi=!0)),typeof vt!="number"&&([vt,Nt]=wFe(Te,x,w,Be),typeof vt!="number"))continue;if(!pi&&I){if(Me&&I.original.length>0&&([Ni,ci]=wFe(Me,I)),typeof Ni!="number")continue;typeof vt=="number"&&(vt+=Ni)}}const Mt=he.tags&&he.tags.indexOf(1)>=0;W.push({index:ee,kind:he.kind,score:vt,label:Te,ariaLabel:qii(he.name,he.kind),description:Me,highlights:Mt?void 0:{label:Nt,description:ci},range:{selection:at.collapseToStart(he.selectionRange),decoration:he.range},uri:l.uri,symbolName:we,strikethrough:Mt,buttons:P})}const X=W.sort((ee,he)=>y?this.compareByKindAndScore(ee,he):this.compareByScore(ee,he));let Z=[];if(y){let Te=function(){he&&typeof ee=="number"&&we>0&&(he.label=p9(kFe[ee]||xFe,we))},ee,he,we=0;for(const Be of X)ee!==Be.kind?(Te(),ee=Be.kind,we=1,he={type:"separator"},Z.push(he)):we++,Z.push(Be);Te()}else X.length>0&&(Z=[{label:V("symbols","symbols ({0})",W.length),type:"separator"},...X]);return Z}compareByScore(e,i){if(typeof e.score!="number"&&typeof i.score=="number")return 1;if(typeof e.score=="number"&&typeof i.score!="number")return-1;if(typeof e.score=="number"&&typeof i.score=="number"){if(e.score>i.score)return-1;if(e.scorei.index?1:0}compareByKindAndScore(e,i){const n=kFe[e.kind]||xFe,s=kFe[i.kind]||xFe,l=n.localeCompare(s);return l===0?this.compareByScore(e,i):l}async getDocumentSymbols(e,i){const n=await this._outlineModelService.getOrCreate(e,i);return i.isCancellationRequested?[]:n.asListOfDocumentSymbols()}};uL.PREFIX="@";uL.SCOPE_PREFIX=":";uL.PREFIX_BY_CATEGORY=`${UU.PREFIX}${UU.SCOPE_PREFIX}`;uL=UU=SPi([obt(0,js),obt(1,sre)],uL);const xFe=V("property","properties ({0})"),kFe={5:V("method","methods ({0})"),11:V("function","functions ({0})"),8:V("_constructor","constructors ({0})"),12:V("variable","variables ({0})"),4:V("class","classes ({0})"),22:V("struct","structs ({0})"),23:V("event","events ({0})"),24:V("operator","operators ({0})"),10:V("interface","interfaces ({0})"),2:V("namespace","namespaces ({0})"),3:V("package","packages ({0})"),25:V("typeParameter","type parameters ({0})"),1:V("modules","modules ({0})"),6:V("property","properties ({0})"),9:V("enum","enumerations ({0})"),21:V("enumMember","enumeration members ({0})"),14:V("string","strings ({0})"),0:V("file","files ({0})"),17:V("array","arrays ({0})"),15:V("number","numbers ({0})"),16:V("boolean","booleans ({0})"),18:V("object","objects ({0})"),19:V("key","keys ({0})"),7:V("field","fields ({0})"),13:V("constant","constants ({0})")};var wPi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},TFe=function(c,e){return function(i,n){e(i,n,c)}};let nHe=class extends uL{constructor(e,i,n){super(i,n),this.editorService=e,this.onDidActiveTextEditorControlChange=Mr.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};nHe=wPi([TFe(0,Oc),TFe(1,js),TFe(2,sre)],nHe);class lre extends ms{constructor(){super({id:lre.ID,label:_ie.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:Lt.hasDocumentSymbolProvider,kbOpts:{kbExpr:Lt.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(pk).quickAccess.show(uL.PREFIX,{itemActivation:nE.NONE})}}lre.ID="editor.action.quickOutline";hr(lre);dh.as(rB.Quickaccess).registerQuickAccessProvider({ctor:nHe,prefix:uL.PREFIX,helpEntries:[{description:_ie.quickOutlineActionLabel,prefix:uL.PREFIX,commandId:lre.ID},{description:_ie.quickOutlineByCategoryActionLabel,prefix:uL.PREFIX_BY_CATEGORY}]});function xPi(c){var e;const i=new Map;for(const n of c)i.set(n,((e=i.get(n))!==null&&e!==void 0?e:0)+1);return i}class Dte{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,i){const n=this.computeEmbedding(e),s=new Map,l=[];for(const[d,f]of this.documents){if(i.isCancellationRequested)return[];for(const g of f.chunks){const y=this.computeSimilarityScore(g,n,s);y>0&&l.push({key:d,score:y})}}return l}static termFrequencies(e){return xPi(Dte.splitTerms(e))}static*splitTerms(e){const i=n=>n.toLowerCase();for(const[n]of e.matchAll(new RegExp("\\b\\p{Letter}[\\p{Letter}\\d]{2,}\\b","gu"))){yield i(n);const s=n.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(s.length>1)for(const l of s)l.length>2&&new RegExp("\\p{Letter}{3,}","gu").test(l)&&(yield i(l))}}updateDocuments(e){var i;for(const{key:n}of e)this.deleteDocument(n);for(const n of e){const s=[];for(const l of n.textChunks){const d=Dte.termFrequencies(l);for(const f of d.keys())this.chunkOccurrences.set(f,((i=this.chunkOccurrences.get(f))!==null&&i!==void 0?i:0)+1);s.push({text:l,tf:d})}this.chunkCount+=s.length,this.documents.set(n.key,{chunks:s})}return this}deleteDocument(e){const i=this.documents.get(e);if(i){this.documents.delete(e),this.chunkCount-=i.chunks.length;for(const n of i.chunks)for(const s of n.tf.keys()){const l=this.chunkOccurrences.get(s);if(typeof l=="number"){const d=l-1;d<=0?this.chunkOccurrences.delete(s):this.chunkOccurrences.set(s,d)}}}}computeSimilarityScore(e,i,n){let s=0;for(const[l,d]of Object.entries(i)){const f=e.tf.get(l);if(!f)continue;let g=n.get(l);typeof g!="number"&&(g=this.computeIdf(l),n.set(l,g));const y=f*g;s+=y*d}return s}computeEmbedding(e){const i=Dte.termFrequencies(e);return this.computeTfidf(i)}computeIdf(e){var i;const n=(i=this.chunkOccurrences.get(e))!==null&&i!==void 0?i:0;return n>0?Math.log((this.chunkCount+1)/n):0}computeTfidf(e){const i=Object.create(null);for(const[n,s]of e){const l=this.computeIdf(n);l>0&&(i[n]=s*l)}return i}}function kPi(c){var e,i;const n=c.slice(0);n.sort((l,d)=>d.score-l.score);const s=(i=(e=n[0])===null||e===void 0?void 0:e.score)!==null&&i!==void 0?i:0;if(s>0)for(const l of n)l.score/=s;return n}var mU;(function(c){c[c.NO_ACTION=0]="NO_ACTION",c[c.CLOSE_PICKER=1]="CLOSE_PICKER",c[c.REFRESH_PICKER=2]="REFRESH_PICKER",c[c.REMOVE_ITEM=3]="REMOVE_ITEM"})(mU||(mU={}));function DFe(c){const e=c;return Array.isArray(e.items)}function abt(c){const e=c;return!!e.picks&&e.additionalPicks instanceof Promise}class TPi extends Ii{constructor(e,i){super(),this.prefix=e,this.options=i}provide(e,i,n){var s;const l=new On;e.canAcceptInBackground=!!(!((s=this.options)===null||s===void 0)&&s.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let d;const f=l.add(new jg),g=async()=>{var w;const x=f.value=new On;d==null||d.dispose(!0),e.busy=!1,d=new uh(i);const I=d.token;let P=e.value.substring(this.prefix.length);!((w=this.options)===null||w===void 0)&&w.shouldSkipTrimPickFilter||(P=P.trim());const O=this._getPicks(P,x,I,n),W=(Z,ee)=>{var he;let we,Te;if(DFe(Z)?(we=Z.items,Te=Z.active):we=Z,we.length===0){if(ee)return!1;(P.length>0||e.hideInput)&&(!((he=this.options)===null||he===void 0)&&he.noResultsPick)&&(Nte(this.options.noResultsPick)?we=[this.options.noResultsPick(P)]:we=[this.options.noResultsPick])}return e.items=we,Te&&(e.activeItems=[Te]),!0},X=async Z=>{let ee=!1,he=!1;await Promise.all([(async()=>{typeof Z.mergeDelay=="number"&&(await J4(Z.mergeDelay),I.isCancellationRequested)||he||(ee=W(Z.picks,!0))})(),(async()=>{e.busy=!0;try{const we=await Z.additionalPicks;if(I.isCancellationRequested)return;let Te,Be;DFe(Z.picks)?(Te=Z.picks.items,Be=Z.picks.active):Te=Z.picks;let Me,vt;if(DFe(we)?(Me=we.items,vt=we.active):Me=we,Me.length>0||!ee){let Nt;if(!Be&&!vt){const Ni=e.activeItems[0];Ni&&Te.indexOf(Ni)!==-1&&(Nt=Ni)}W({items:[...Te,...Me],active:Be||vt||Nt})}}finally{I.isCancellationRequested||(e.busy=!1),he=!0}})()])};if(O!==null)if(abt(O))await X(O);else if(!(O instanceof Promise))W(O);else{e.busy=!0;try{const Z=await O;if(I.isCancellationRequested)return;abt(Z)?await X(Z):W(Z)}finally{I.isCancellationRequested||(e.busy=!1)}}};l.add(e.onDidChangeValue(()=>g())),g(),l.add(e.onDidAccept(w=>{var x;if(n!=null&&n.handleAccept){w.inBackground||e.hide(),(x=n.handleAccept)===null||x===void 0||x.call(n,e.activeItems[0]);return}const[I]=e.selectedItems;typeof(I==null?void 0:I.accept)=="function"&&(w.inBackground||e.hide(),I.accept(e.keyMods,w))}));const y=async(w,x)=>{var I,P;if(typeof x.trigger!="function")return;const O=(P=(I=x.buttons)===null||I===void 0?void 0:I.indexOf(w))!==null&&P!==void 0?P:-1;if(O>=0){const W=x.trigger(O,e.keyMods),X=typeof W=="number"?W:await W;if(i.isCancellationRequested)return;switch(X){case mU.NO_ACTION:break;case mU.CLOSE_PICKER:e.hide();break;case mU.REFRESH_PICKER:g();break;case mU.REMOVE_ITEM:{const Z=e.items.indexOf(x);if(Z!==-1){const ee=e.items.slice(),he=ee.splice(Z,1),we=e.activeItems.filter(Be=>Be!==he[0]),Te=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=ee,we&&(e.activeItems=we),e.keepScrollPosition=Te}break}}}};return l.add(e.onDidTriggerItemButton(({button:w,item:x})=>y(w,x))),l.add(e.onDidTriggerSeparatorButton(({button:w,separator:x})=>y(w,x))),l}}var $Dt=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},vM=function(c,e){return function(i,n){e(i,n,c)}},L5,Hp;let J9=L5=class extends TPi{constructor(e,i,n,s,l,d){super(L5.PREFIX,e),this.instantiationService=i,this.keybindingService=n,this.commandService=s,this.telemetryService=l,this.dialogService=d,this.commandsHistory=this._register(this.instantiationService.createInstance(wR)),this.options=e}async _getPicks(e,i,n,s){var l,d,f,g;const y=await this.getCommandPicks(n);if(n.isCancellationRequested)return[];const w=ZM(()=>{const Z=new Dte;Z.updateDocuments(y.map(he=>({key:he.commandId,textChunks:[this.getTfIdfChunk(he)]})));const ee=Z.calculateScores(e,n);return kPi(ee).filter(he=>he.score>L5.TFIDF_THRESHOLD).slice(0,L5.TFIDF_MAX_RESULTS)}),x=[];for(const Z of y){const ee=(l=L5.WORD_FILTER(e,Z.label))!==null&&l!==void 0?l:void 0,he=Z.commandAlias&&(d=L5.WORD_FILTER(e,Z.commandAlias))!==null&&d!==void 0?d:void 0;if(ee||he)Z.highlights={label:ee,detail:this.options.showAlias?he:void 0},x.push(Z);else if(e===Z.commandId)x.push(Z);else if(e.length>=3){const we=w();if(n.isCancellationRequested)return[];const Te=we.find(Be=>Be.key===Z.commandId);Te&&(Z.tfIdfScore=Te.score,x.push(Z))}}const I=new Map;for(const Z of x){const ee=I.get(Z.label);ee?(Z.description=Z.commandId,ee.description=ee.commandId):I.set(Z.label,Z)}x.sort((Z,ee)=>{if(Z.tfIdfScore&&ee.tfIdfScore)return Z.tfIdfScore===ee.tfIdfScore?Z.label.localeCompare(ee.label):ee.tfIdfScore-Z.tfIdfScore;if(Z.tfIdfScore)return 1;if(ee.tfIdfScore)return-1;const he=this.commandsHistory.peek(Z.commandId),we=this.commandsHistory.peek(ee.commandId);if(he&&we)return he>we?-1:1;if(he)return-1;if(we)return 1;if(this.options.suggestedCommandIds){const Te=this.options.suggestedCommandIds.has(Z.commandId),Be=this.options.suggestedCommandIds.has(ee.commandId);if(Te&&Be)return 0;if(Te)return-1;if(Be)return 1}return Z.label.localeCompare(ee.label)});const P=[];let O=!1,W=!0,X=!!this.options.suggestedCommandIds;for(let Z=0;Z{var Z;const ee=await this.getAdditionalCommandPicks(y,x,e,n);if(n.isCancellationRequested)return[];const he=ee.map(we=>this.toCommandPick(we,s));return W&&((Z=he[0])===null||Z===void 0?void 0:Z.type)!=="separator"&&he.unshift({type:"separator",label:V("suggested","similar commands")}),he})()}:P}toCommandPick(e,i){if(e.type==="separator")return e;const n=this.keybindingService.lookupKeybinding(e.commandId),s=n?V("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()=>{var l,d;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:(l=i==null?void 0:i.from)!==null&&l!==void 0?l:"quick open"});try{!((d=e.args)===null||d===void 0)&&d.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(f){pT(f)||this.dialogService.error(V("canNotRun","Command '{0}' resulted in an error",e.label),a1e(f))}}}}getTfIdfChunk({label:e,commandAlias:i,commandDescription:n}){let s=e;return i&&i!==e&&(s+=` - ${i}`),n&&n.value!==e&&(s+=` - ${n.value===n.original?n.value:`${n.value} (${n.original})`}`),s}};J9.PREFIX=">";J9.TFIDF_THRESHOLD=.5;J9.TFIDF_MAX_RESULTS=5;J9.WORD_FILTER=$je(die,Hpi,Uwt);J9=L5=$Dt([vM(1,So),vM(2,ou),vM(3,ff),vM(4,R0),vM(5,Mne)],J9);let wR=Hp=class extends Ii{constructor(e,i,n){super(),this.storageService=e,this.configurationService=i,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===Cie.SHUTDOWN&&this.saveState()}))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=Hp.getConfiguredCommandHistoryLength(this.configurationService),Hp.cache&&Hp.cache.limit!==this.configuredCommandsHistoryLength&&(Hp.cache.limit=this.configuredCommandsHistoryLength,Hp.hasChanges=!0))}load(){const e=this.storageService.get(Hp.PREF_KEY_CACHE,0);let i;if(e)try{i=JSON.parse(e)}catch(s){this.logService.error(`[CommandsHistory] invalid data: ${s}`)}const n=Hp.cache=new TL(this.configuredCommandsHistoryLength,1);if(i){let s;i.usesLRU?s=i.entries:s=i.entries.sort((l,d)=>l.value-d.value),s.forEach(l=>n.set(l.key,l.value))}Hp.counter=this.storageService.getNumber(Hp.PREF_KEY_COUNTER,0,Hp.counter)}push(e){Hp.cache&&(Hp.cache.set(e,Hp.counter++),Hp.hasChanges=!0)}peek(e){var i;return(i=Hp.cache)===null||i===void 0?void 0:i.peek(e)}saveState(){if(!Hp.cache||!Hp.hasChanges)return;const e={usesLRU:!0,entries:[]};Hp.cache.forEach((i,n)=>e.entries.push({key:n,value:i})),this.storageService.store(Hp.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(Hp.PREF_KEY_COUNTER,Hp.counter,0,0),Hp.hasChanges=!1}static getConfiguredCommandHistoryLength(e){var i,n;const l=(n=(i=e.getValue().workbench)===null||i===void 0?void 0:i.commandPalette)===null||n===void 0?void 0:n.history;return typeof l=="number"?l:Hp.DEFAULT_COMMANDS_HISTORY_LENGTH}};wR.DEFAULT_COMMANDS_HISTORY_LENGTH=50;wR.PREF_KEY_CACHE="commandPalette.mru.cache";wR.PREF_KEY_COUNTER="commandPalette.mru.counter";wR.counter=1;wR.hasChanges=!1;wR=Hp=$Dt([vM(0,mT),vM(1,El),vM(2,Sv)],wR);class DPi extends J9{constructor(e,i,n,s,l,d){super(e,i,n,s,l,d)}getCodeEditorCommandPicks(){var e;const i=this.activeTextEditorControl;if(!i)return[];const n=[];for(const s of i.getSupportedActions()){let l;!((e=s.metadata)===null||e===void 0)&&e.description&&(T0i(s.metadata.description)?l=s.metadata.description:l={original:s.metadata.description,value:s.metadata.description}),n.push({commandId:s.id,commandAlias:s.alias,commandDescription:l,label:Zje(s.label)||s.id})}return n}}var EPi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Mz=function(c,e){return function(i,n){e(i,n,c)}};let dne=class extends DPi{get activeTextEditorControl(){var e;return(e=this.codeEditorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}constructor(e,i,n,s,l,d){super({showAlias:!1},e,n,s,l,d),this.codeEditorService=i}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};dne=EPi([Mz(0,So),Mz(1,Oc),Mz(2,ou),Mz(3,ff),Mz(4,R0),Mz(5,Mne)],dne);class cre extends ms{constructor(){super({id:cre.ID,label:Sve.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:Lt.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(pk).quickAccess.show(dne.PREFIX)}}cre.ID="editor.action.quickCommand";hr(cre);dh.as(rB.Quickaccess).registerQuickAccessProvider({ctor:dne,prefix:dne.PREFIX,helpEntries:[{description:Sve.quickCommandHelp,commandId:cre.ID}]});var IPi=function(c,e,i,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,i,n);else for(var f=c.length-1;f>=0;f--)(d=c[f])&&(l=(s<3?d(l):s>3?d(e,i,l):d(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Rz=function(c,e){return function(i,n){e(i,n,c)}};let rHe=class extends mR{constructor(e,i,n,s,l,d,f){super(!0,e,i,n,s,l,d,f)}};rHe=IPi([Rz(1,Zo),Rz(2,Oc),Rz(3,L_),Rz(4,So),Rz(5,mT),Rz(6,El)],rHe);Bc(mR.ID,rHe,4);class NPi extends ms{constructor(){super({id:"editor.action.toggleHighContrast",label:aBe.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,i){const n=e.get(Nw),s=n.getColorTheme();SE(s.type)?(n.setTheme(this._originalThemeName||(rq(s.type)?VU:m4)),this._originalThemeName=null):(n.setTheme(rq(s.type)?a9:l9),this._originalThemeName=s.themeName)}}hr(NPi);const EFe=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:Bkt,Emitter:Wkt,KeyCode:Vkt,KeyMod:Hkt,MarkerSeverity:$kt,MarkerTag:Jkt,Position:jkt,Range:zkt,Selection:Ukt,SelectionDirection:qkt,Token:Gkt,Uri:Wze,editor:fU,languages:RN},Symbol.toStringTag,{value:"Module"}));var LPi=Object.defineProperty,PPi=Object.defineProperties,APi=Object.getOwnPropertyDescriptors,lbt=Object.getOwnPropertySymbols,OPi=Object.prototype.hasOwnProperty,MPi=Object.prototype.propertyIsEnumerable,cbt=(c,e,i)=>e in c?LPi(c,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[e]=i,JDt=(c,e)=>{for(var i in e||(e={}))OPi.call(e,i)&&cbt(c,i,e[i]);if(lbt)for(var i of lbt(e))MPi.call(e,i)&&cbt(c,i,e[i]);return c},GDt=(c,e)=>PPi(c,APi(e)),fne=(c,e,i)=>new Promise((n,s)=>{var l=g=>{try{f(i.next(g))}catch(y){s(y)}},d=g=>{try{f(i.throw(g))}catch(y){s(y)}},f=g=>g.done?n(g.value):Promise.resolve(g.value).then(l,d);f((i=i.apply(c,e)).next())}),RPi=(c,e)=>{const i=`https://data.jsdelivr.com/v1/package/npm/${e}`;return RUe(c,i,{cache:"no-store"})},FPi=(c,e,i)=>{const n=`https://data.jsdelivr.com/v1/package/resolve/npm/${e}@${i}`;return RUe(c,n)},BPi=(c,e,i)=>fne(void 0,null,function*(){const n=`https://data.jsdelivr.com/v1/package/npm/${e}@${i}/flat`,s=yield RUe(c,n);return s instanceof Error?s:GDt(JDt({},s),{moduleName:e,version:i})}),ubt=(c,e,i,n)=>fne(void 0,null,function*(){const s=`https://cdn.jsdelivr.net/npm/${e}@${i}${n}`,d=yield(c.fetcher||fetch)(s);return d.ok?d.text():new Error("OK")});function RUe(c,e,i){return(c.fetcher||fetch)(e,i).then(s=>s.ok?s.json().then(l=>l):new Error("OK"))}var WPi=c=>{const e=["assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","repl","stream","stream/promises","stream/consumers","stream/web","string_decoder","sys","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib"];if(c.indexOf("node:")===0||e.includes(c))return"node";const[i="",n=""]=c.split("/");return i.startsWith("@")?`${i}/${n}`:i},VPi=c=>{const e=new Map,i=new Map;let n=0,s=0;return d=>(n=0,s=0,l(d,0).then(f=>{var g,y;s>0&&((y=(g=c.delegate).finished)==null||y.call(g,i))}));function l(d,f){return fne(this,null,function*(){var g,y,w,x,I;const P=jPi(c,e,d);P.forEach(Me=>e.set(Me.module,{state:"loading"}));const W=(yield Promise.all(P.map(Me=>fbt(c,Me.module,Me.version)))).filter(Me=>!("error"in Me)),X=W.filter(Me=>Me.files.find(vt=>FUe(vt.name))),Z=X.map(Me=>dbt(Me,`/node_modules/${Me.moduleName}`)),ee=W.filter(Me=>!X.includes(Me)),we=(yield Promise.all(ee.map(Me=>fbt(c,`@types/${IFe(Me.moduleName)}`,"latest")))).filter(Me=>!("error"in Me)),Te=we.map(Me=>dbt(Me,`/node_modules/@types/${IFe(Me.moduleName).replace("types__","")}`)),Be=Z.concat(Te).reduce((Me,vt)=>Me.concat(vt),[]);n+=Be.length,Be.length&&f===0&&((y=(g=c.delegate).started)==null||y.call(g));for(const Me of W){let vt=`/node_modules/${Me.moduleName}`;we.includes(Me)&&(vt=`/node_modules/@types/${IFe(Me.moduleName).replace("types__","")}`);const Nt=vt+"/package.json",Ni=yield ubt(c,Me.moduleName,Me.version,"/package.json");typeof Ni=="string"?(i.set(Nt,Ni),(x=(w=c.delegate).receivedFile)==null||x.call(w,Ni,Nt)):(I=c.logger)==null||I.error(`Could not download package.json for ${Me.moduleName}`)}yield Promise.all(Be.map(Me=>fne(this,null,function*(){var vt,Nt,Ni;const ci=yield ubt(c,Me.moduleName,Me.moduleVersion,Me.path);s++,ci instanceof Error?(vt=c.logger)==null||vt.error(`Had an issue getting ${Me.path} for ${Me.moduleName}`):(i.set(Me.vfsPath,ci),(Ni=(Nt=c.delegate).receivedFile)==null||Ni.call(Nt,ci,Me.vfsPath),c.delegate.progress&&s%5===0&&c.delegate.progress(s,n),yield l(ci,f+1))})))})}};function dbt(c,e){const i=[];for(const n of c.files)FUe(n.name)&&i.push({moduleName:c.moduleName,moduleVersion:c.version,vfsPath:`${e}${n.name}`,path:n.name});return i}var HPi=(c,e)=>{const i=c.preProcessFile(e),n=c.libMap||new Map;return i.referencedFiles.concat(i.importedFiles).concat(i.libReferenceDirectives).filter(l=>!FUe(l.fileName)).filter(l=>!n.has(l.fileName)).map(l=>{let d;if(!l.fileName.startsWith(".")){d="latest";const f=e.slice(l.end).split(` +`)[0];f.includes("// types:")&&(d=f.split("// types: ")[1].trim())}return{module:l.fileName,version:d}})};function jPi(c,e,i){return HPi(c.typescript,i).map(l=>GDt(JDt({},l),{module:WPi(l.module)})).filter(l=>!l.module.startsWith(".")).filter(l=>!e.has(l.module))}var fbt=(c,e,i)=>fne(void 0,null,function*(){let n=i||"latest";if(n.split(".").length<2){const l=yield FPi(c,e,n);if(l instanceof Error)return{error:l,userFacingMessage:`Could not go from a tag to version on npm for ${e} - possible typo?`};const d=l.version;if(!d){const f=yield RPi(c,e);if(f instanceof Error)return{error:l,userFacingMessage:`Could not get versions on npm for ${e} - possible typo?`};const g=Object.entries(f.tags).join(", ");return{error:new Error("Could not find tag for module"),userFacingMessage:`Could not find a tag for ${e} called ${i}. Did find ${g}`}}n=d}const s=yield BPi(c,e,n);return s instanceof Error?{error:s,userFacingMessage:`Could not get the files for ${e}@${n}. Is it possibly a typo?`}:s});function IFe(c){return c.indexOf("@")===0&&c.indexOf("/")!==-1&&(c=c.substr(1).replace("/","__")),c}function FUe(c){return/\.d\.([^\.]+\.)?[cm]?ts$/i.test(c)}function NFe(c){throw new Error('Could not dynamically require "'+c+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var KDt={exports:{}};const zPi={},UPi=Object.freeze(Object.defineProperty({__proto__:null,default:zPi},Symbol.toStringTag,{value:"Module"})),eM=Eei(UPi);(function(c){var e={};/*! ***************************************************************************** + Copyright (c) Microsoft Corporation. All rights reserved. + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + this file except in compliance with the License. You may obtain a copy of the + License at http://www.apache.org/licenses/LICENSE-2.0 + + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED + WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, + MERCHANTABLITY OR NON-INFRINGEMENT. + + See the Apache Version 2.0 License for specific language governing permissions + and limitations under the License. + ***************************************************************************** */var i={};(n=>{var s=Object.defineProperty,l=(t,r)=>{for(var a in r)s(t,a,{get:r[a],enumerable:!0})},d=t=>t,f={};l(f,{ANONYMOUS:()=>Tde,AccessFlags:()=>HCe,AssertionLevel:()=>Xbe,AssignmentDeclarationKind:()=>QCe,AssignmentKind:()=>bxe,Associativity:()=>Ixe,BreakpointResolver:()=>kfe,BuilderFileEmit:()=>rIe,BuilderProgramKind:()=>dIe,BuilderState:()=>X0,CallHierarchy:()=>YP,CharacterCodes:()=>aSe,CheckFlags:()=>FCe,CheckMode:()=>$le,ClassificationType:()=>Aue,ClassificationTypeNames:()=>mNe,CommentDirectiveType:()=>SCe,Comparison:()=>w,CompletionInfoFlags:()=>uNe,CompletionTriggerKind:()=>Lue,Completions:()=>sA,ContainerFlags:()=>ADe,ContextFlags:()=>ICe,Debug:()=>z,DiagnosticCategory:()=>g$,Diagnostics:()=>k,DocumentHighlights:()=>bX,ElementFlags:()=>VCe,EmitFlags:()=>Wre,EmitHint:()=>fSe,EmitOnly:()=>xCe,EndOfLineState:()=>hNe,ExitStatus:()=>kCe,ExportKind:()=>_Le,Extension:()=>lSe,ExternalEmitHelpers:()=>dSe,FileIncludeKind:()=>Ire,FilePreprocessingDiagnosticsKind:()=>wCe,FileSystemEntryKind:()=>CSe,FileWatcherEventKind:()=>vSe,FindAllReferences:()=>xc,FlattenLevel:()=>oEe,FlowFlags:()=>p$,ForegroundColorEscapeSequences:()=>QEe,FunctionFlags:()=>Txe,GeneratedIdentifierFlags:()=>Ere,GetLiteralTextFlags:()=>Owe,GoToDefinition:()=>G3,HighlightSpanKind:()=>lNe,IdentifierNameMap:()=>w3,IdentifierNameMultiMap:()=>YDe,ImportKind:()=>hLe,ImportsNotUsedAsValues:()=>iSe,IndentStyle:()=>cNe,IndexFlags:()=>jCe,IndexKind:()=>qCe,InferenceFlags:()=>GCe,InferencePriority:()=>JCe,InlayHintKind:()=>aNe,InlayHints:()=>ghe,InternalEmitFlags:()=>cSe,InternalSymbolName:()=>BCe,IntersectionFlags:()=>ECe,InvalidatedProjectKind:()=>MIe,JSDocParsingMode:()=>mSe,JsDoc:()=>l2,JsTyping:()=>Gv,JsxEmit:()=>tSe,JsxFlags:()=>yCe,JsxReferenceKind:()=>zCe,LanguageFeatureMinimumTarget:()=>uSe,LanguageServiceMode:()=>sNe,LanguageVariant:()=>sSe,LexicalEnvironmentFlags:()=>_Se,ListFormat:()=>pSe,LogLevel:()=>lCe,MapCode:()=>mhe,MemberOverrideStatus:()=>TCe,ModifierFlags:()=>Tre,ModuleDetectionKind:()=>XCe,ModuleInstanceState:()=>LDe,ModuleKind:()=>yB,ModuleResolutionKind:()=>qR,ModuleSpecifierEnding:()=>Eke,NavigateTo:()=>RLe,NavigationBar:()=>BLe,NewLineKind:()=>nSe,NodeBuilderFlags:()=>NCe,NodeCheckFlags:()=>Pre,NodeFactoryFlags:()=>e2e,NodeFlags:()=>kre,NodeResolutionFeatures:()=>CDe,ObjectFlags:()=>Ore,OperationCanceledException:()=>UR,OperatorPrecedence:()=>Nxe,OrganizeImports:()=>c2,OrganizeImportsMode:()=>Nue,OuterExpressionKinds:()=>hSe,OutliningElementsCollector:()=>bhe,OutliningSpanKind:()=>dNe,OutputFileType:()=>fNe,PackageJsonAutoImportPreference:()=>rNe,PackageJsonDependencyGroup:()=>nNe,PatternMatchKind:()=>$de,PollingInterval:()=>Vre,PollingWatchKind:()=>eSe,PragmaKindFlags:()=>gSe,PrivateIdentifierKind:()=>d2e,ProcessLevel:()=>fEe,ProgramUpdateLevel:()=>qEe,QuotePreference:()=>HNe,RegularExpressionFlags:()=>bCe,RelationComparisonResult:()=>Dre,Rename:()=>sZ,ScriptElementKind:()=>pNe,ScriptElementKindModifier:()=>gNe,ScriptKind:()=>Rre,ScriptSnapshot:()=>DQ,ScriptTarget:()=>rSe,SemanticClassificationFormat:()=>oNe,SemanticMeaning:()=>vNe,SemicolonPreference:()=>Pue,SignatureCheckMode:()=>Jle,SignatureFlags:()=>Mre,SignatureHelp:()=>KH,SignatureInfo:()=>nIe,SignatureKind:()=>UCe,SmartSelectionRange:()=>whe,SnippetKind:()=>Bre,StatisticType:()=>JIe,StructureIsReused:()=>Nre,SymbolAccessibility:()=>ACe,SymbolDisplay:()=>kS,SymbolDisplayPartKind:()=>IQ,SymbolFlags:()=>Lre,SymbolFormatFlags:()=>PCe,SyntaxKind:()=>xre,SyntheticSymbolKind:()=>OCe,Ternary:()=>KCe,ThrottledCancellationToken:()=>JPe,TokenClass:()=>_Ne,TokenFlags:()=>CCe,TransformFlags:()=>Fre,TypeFacts:()=>qle,TypeFlags:()=>Are,TypeFormatFlags:()=>LCe,TypeMapKind:()=>$Ce,TypePredicateKind:()=>MCe,TypeReferenceSerializationKind:()=>RCe,UnionReduction:()=>DCe,UpToDateStatusType:()=>EIe,VarianceFlags:()=>WCe,Version:()=>B0,VersionRange:()=>h$,WatchDirectoryFlags:()=>oSe,WatchDirectoryKind:()=>YCe,WatchFileKind:()=>ZCe,WatchLogLevel:()=>JEe,WatchType:()=>tf,accessPrivateIdentifier:()=>rEe,addDisposableResourceHelper:()=>W2e,addEmitFlags:()=>Wv,addEmitHelper:()=>vP,addEmitHelpers:()=>Jb,addInternalEmitFlags:()=>gP,addNodeFactoryPatcher:()=>V$e,addObjectAllocatorPatcher:()=>k$e,addRange:()=>un,addRelatedInfo:()=>fa,addSyntheticLeadingComment:()=>l7,addSyntheticTrailingComment:()=>NG,addToSeen:()=>Lm,advancedAsyncSuperHelper:()=>OG,affectsDeclarationPathOptionDeclarations:()=>jTe,affectsEmitOptionDeclarations:()=>HTe,allKeysStartWithDot:()=>NK,altDirectorySeparator:()=>b$,and:()=>u$,append:()=>xi,appendIfUnique:()=>gu,arrayFrom:()=>Fn,arrayIsEqualTo:()=>qs,arrayIsHomogeneous:()=>Fke,arrayIsSorted:()=>ys,arrayOf:()=>Pn,arrayReverseIterator:()=>Mh,arrayToMap:()=>P_,arrayToMultiMap:()=>hh,arrayToNumericMap:()=>By,arraysEqual:()=>pi,assertType:()=>zUe,assign:()=>qo,assignHelper:()=>y2e,asyncDelegator:()=>C2e,asyncGeneratorHelper:()=>b2e,asyncSuperHelper:()=>AG,asyncValues:()=>S2e,attachFileToDiagnostics:()=>aP,awaitHelper:()=>c7,awaiterHelper:()=>x2e,base64decode:()=>tke,base64encode:()=>eke,binarySearch:()=>Fy,binarySearchKey:()=>QC,bindSourceFile:()=>ODe,breakIntoCharacterSpans:()=>ELe,breakIntoWordSpans:()=>ILe,buildLinkParts:()=>QNe,buildOpts:()=>DV,buildOverload:()=>Elt,bundlerModuleNameResolver:()=>SDe,canBeConvertedToAsync:()=>Zde,canHaveDecorators:()=>eD,canHaveExportModifier:()=>ZW,canHaveFlowNode:()=>xW,canHaveIllegalDecorators:()=>tle,canHaveIllegalModifiers:()=>STe,canHaveIllegalType:()=>fJe,canHaveIllegalTypeParameters:()=>CTe,canHaveJSDoc:()=>kW,canHaveLocals:()=>A1,canHaveModifiers:()=>_0,canHaveSymbol:()=>H0,canIncludeBindAndCheckDiagnsotics:()=>XW,canJsonReportNoInputFiles:()=>N7,canProduceDiagnostics:()=>qK,canUsePropertyAccess:()=>dae,canWatchAffectingLocation:()=>yIe,canWatchAtTypes:()=>vIe,canWatchDirectoryOrFile:()=>cQ,cartesianProduct:()=>oCe,cast:()=>ua,chainBundle:()=>Q0,chainDiagnosticMessages:()=>Ro,changeAnyExtension:()=>SB,changeCompilerHostLikeToUseCache:()=>K7,changeExtension:()=>Kw,changeFullExtension:()=>kSe,changesAffectModuleResolution:()=>G$,changesAffectingProgramStructure:()=>Dwe,characterToRegularExpressionFlag:()=>Zre,childIsDecorated:()=>b8,classElementOrClassElementParameterIsDecorated:()=>Qse,classHasClassThisAssignment:()=>lce,classHasDeclaredOrExplicitlyAssignedName:()=>cce,classHasExplicitlyAssignedName:()=>jK,classOrConstructorParameterIsDecorated:()=>oS,classPrivateFieldGetHelper:()=>R2e,classPrivateFieldInHelper:()=>B2e,classPrivateFieldSetHelper:()=>F2e,classicNameResolver:()=>IDe,classifier:()=>XPe,cleanExtendedConfigCache:()=>YK,clear:()=>Xs,clearMap:()=>tp,clearSharedExtendedConfigFileWatcher:()=>Sce,climbPastPropertyAccess:()=>PQ,climbPastPropertyOrElementAccess:()=>SNe,clone:()=>fB,cloneCompilerOptions:()=>Zue,closeFileWatcher:()=>h0,closeFileWatcherOf:()=>tm,codefix:()=>Ch,collapseTextChangeRangesAcrossMultipleVersions:()=>VSe,collectExternalModuleInfo:()=>rce,combine:()=>au,combinePaths:()=>Hr,commandLineOptionOfCustomType:()=>JTe,commentPragmas:()=>m$,commonOptionsWithBuild:()=>cK,commonPackageFolders:()=>Ske,compact:()=>Mo,compareBooleans:()=>bk,compareDataObjects:()=>Voe,compareDiagnostics:()=>q8,compareDiagnosticsSkipRelatedInformation:()=>ZJ,compareEmitHelpers:()=>h2e,compareNumberOfDirectorySeparators:()=>KW,comparePaths:()=>Mb,comparePathsCaseInsensitive:()=>fqe,comparePathsCaseSensitive:()=>dqe,comparePatternKeys:()=>Hle,compareProperties:()=>iCe,compareStringsCaseInsensitive:()=>pB,compareStringsCaseInsensitiveEslintCompatible:()=>Zbe,compareStringsCaseSensitive:()=>Xf,compareStringsCaseSensitiveUI:()=>gB,compareTextSpans:()=>l$,compareValues:()=>hc,compileOnSaveCommandLineOption:()=>aK,compilerOptionsAffectDeclarationPath:()=>bke,compilerOptionsAffectEmit:()=>yke,compilerOptionsAffectSemanticDiagnostics:()=>vke,compilerOptionsDidYouMeanDiagnostics:()=>hK,compilerOptionsIndicateEsModules:()=>sde,compose:()=>HUe,computeCommonSourceDirectoryOfFilenames:()=>GEe,computeLineAndCharacterOfPosition:()=>g6,computeLineOfPosition:()=>QR,computeLineStarts:()=>ML,computePositionOfLineAndCharacter:()=>k$,computeSignature:()=>fIe,computeSignatureWithDiagnostics:()=>Uce,computeSuggestionDiagnostics:()=>Kde,computedOptions:()=>Cd,concatenate:()=>no,concatenateDiagnosticMessageChains:()=>_ke,configDirTemplateSubstitutionOptions:()=>qTe,configDirTemplateSubstitutionWatchOptions:()=>$Te,consumesNodeCoreModules:()=>uX,contains:()=>Mt,containsIgnoredPath:()=>i7,containsObjectRestOrSpread:()=>wV,containsParseError:()=>E6,containsPath:()=>l0,convertCompilerOptionsForTelemetry:()=>cDe,convertCompilerOptionsFromJson:()=>SGe,convertJsonOption:()=>xI,convertToBase64:()=>Yxe,convertToJson:()=>NV,convertToObject:()=>iDe,convertToOptionsWithAbsolutePaths:()=>mK,convertToRelativePath:()=>GR,convertToTSConfig:()=>wle,convertTypeAcquisitionFromJson:()=>wGe,copyComments:()=>NI,copyEntries:()=>K$,copyLeadingComments:()=>W3,copyProperties:()=>dre,copyTrailingAsLeadingComments:()=>SH,copyTrailingComments:()=>uF,couldStartTrivia:()=>NSe,countWhere:()=>$n,createAbstractBuilder:()=>xQe,createAccessorPropertyBackingField:()=>rle,createAccessorPropertyGetRedirector:()=>NTe,createAccessorPropertySetRedirector:()=>LTe,createBaseNodeFactory:()=>Kke,createBinaryExpressionTrampoline:()=>rK,createBindingHelper:()=>PG,createBuildInfo:()=>KK,createBuilderProgram:()=>qce,createBuilderProgramUsingProgramBuildInfo:()=>gIe,createBuilderStatusReporter:()=>vQ,createCacheWithRedirects:()=>Ale,createCacheableExportInfoMap:()=>Fde,createCachedDirectoryStructureHost:()=>XK,createClassNamedEvaluationHelperBlock:()=>dEe,createClassThisAssignmentBlock:()=>cEe,createClassifier:()=>nZe,createCommentDirectivesMap:()=>Awe,createCompilerDiagnostic:()=>Gc,createCompilerDiagnosticForInvalidCustomType:()=>GTe,createCompilerDiagnosticFromMessageChain:()=>XJ,createCompilerHost:()=>KEe,createCompilerHostFromProgramHost:()=>due,createCompilerHostWorker:()=>eQ,createDetachedDiagnostic:()=>oP,createDiagnosticCollection:()=>O8,createDiagnosticForFileFromMessageChain:()=>qse,createDiagnosticForNode:()=>Kn,createDiagnosticForNodeArray:()=>N6,createDiagnosticForNodeArrayFromMessageChain:()=>eW,createDiagnosticForNodeFromMessageChain:()=>$y,createDiagnosticForNodeInSourceFile:()=>Jg,createDiagnosticForRange:()=>Jwe,createDiagnosticMessageChainFromDiagnostic:()=>$we,createDiagnosticReporter:()=>qP,createDocumentPositionMapper:()=>XDe,createDocumentRegistry:()=>mLe,createDocumentRegistryInternal:()=>zde,createEmitAndSemanticDiagnosticsBuilderProgram:()=>Kce,createEmitHelperFactory:()=>f2e,createEmptyExports:()=>gV,createEvaluator:()=>$ke,createExpressionForJsxElement:()=>_Te,createExpressionForJsxFragment:()=>pTe,createExpressionForObjectLiteralElementLike:()=>gTe,createExpressionForPropertyName:()=>Kae,createExpressionFromEntityName:()=>mV,createExternalHelpersImportDeclarationIfNeeded:()=>Zae,createFileDiagnostic:()=>ef,createFileDiagnosticFromMessageChain:()=>sJ,createFlowNode:()=>j1,createForOfBindingStatement:()=>Gae,createFutureSourceFile:()=>vX,createGetCanonicalFileName:()=>Zf,createGetIsolatedDeclarationErrors:()=>MEe,createGetSourceFile:()=>Dce,createGetSymbolAccessibilityDiagnosticForNode:()=>vS,createGetSymbolAccessibilityDiagnosticForNodeName:()=>OEe,createGetSymbolWalker:()=>MDe,createIncrementalCompilerHost:()=>mQ,createIncrementalProgram:()=>DIe,createJsxFactoryExpression:()=>Jae,createLanguageService:()=>GPe,createLanguageServiceSourceFile:()=>RX,createMemberAccessForPropertyName:()=>SI,createModeAwareCache:()=>v3,createModeAwareCacheKey:()=>O7,createModuleNotFoundChain:()=>Q$,createModuleResolutionCache:()=>y3,createModuleResolutionLoader:()=>Mce,createModuleResolutionLoaderUsingGlobalCache:()=>wIe,createModuleSpecifierResolutionHost:()=>KP,createMultiMap:()=>Ug,createNameResolver:()=>gae,createNodeConverters:()=>Zke,createNodeFactory:()=>iV,createOptionNameMap:()=>dK,createOverload:()=>Rhe,createPackageJsonImportFilter:()=>V3,createPackageJsonInfo:()=>Ide,createParenthesizerRules:()=>Qke,createPatternMatcher:()=>SLe,createPrinter:()=>ax,createPrinterWithDefaults:()=>zEe,createPrinterWithRemoveComments:()=>DI,createPrinterWithRemoveCommentsNeverAsciiEscape:()=>UEe,createPrinterWithRemoveCommentsOmitTrailingSemicolon:()=>QK,createProgram:()=>XV,createProgramHost:()=>fue,createPropertyNameNodeForIdentifierOrLiteral:()=>CG,createQueue:()=>_B,createRange:()=>Gg,createRedirectedBuilderProgram:()=>Gce,createResolutionCache:()=>Xce,createRuntimeTypeSerializer:()=>mEe,createScanner:()=>zy,createSemanticDiagnosticsBuilderProgram:()=>wQe,createSet:()=>fre,createSolutionBuilder:()=>PIe,createSolutionBuilderHost:()=>NIe,createSolutionBuilderWithWatch:()=>AIe,createSolutionBuilderWithWatchHost:()=>LIe,createSortedArray:()=>Yi,createSourceFile:()=>RP,createSourceMapGenerator:()=>qDe,createSourceMapSource:()=>U$e,createSuperAccessVariableStatement:()=>UK,createSymbolTable:()=>ga,createSymlinkCache:()=>Xoe,createSyntacticTypeNodeBuilder:()=>eNe,createSystemWatchFunctions:()=>SSe,createTextChange:()=>_H,createTextChangeFromStartLength:()=>$Q,createTextChangeRange:()=>LB,createTextRangeFromNode:()=>tde,createTextRangeFromSpan:()=>qQ,createTextSpan:()=>Pf,createTextSpanFromBounds:()=>sd,createTextSpanFromNode:()=>b_,createTextSpanFromRange:()=>cx,createTextSpanFromStringLiteralLikeContent:()=>ede,createTextWriter:()=>RW,createTokenRange:()=>Roe,createTypeChecker:()=>zDe,createTypeReferenceDirectiveResolutionCache:()=>TK,createTypeReferenceResolutionLoader:()=>tQ,createWatchCompilerHost:()=>OQe,createWatchCompilerHostOfConfigFile:()=>hue,createWatchCompilerHostOfFilesAndCompilerOptions:()=>_ue,createWatchFactory:()=>uue,createWatchHost:()=>cue,createWatchProgram:()=>pue,createWatchStatusReporter:()=>Yce,createWriteFileMeasuringIO:()=>Ece,declarationNameToString:()=>sc,decodeMappings:()=>tce,decodedTextSpanIntersectsWith:()=>NB,decorateHelper:()=>_2e,deduplicate:()=>jt,defaultIncludeSpec:()=>Tle,defaultInitCompilerOptions:()=>gle,defaultMaximumTruncationLength:()=>h8,diagnosticCategoryName:()=>JE,diagnosticToString:()=>cD,diagnosticsEqualityComparer:()=>YJ,directoryProbablyExists:()=>U0,directorySeparator:()=>Hc,displayPart:()=>ip,displayPartsToString:()=>MH,disposeEmitNodes:()=>yae,disposeResourcesHelper:()=>V2e,documentSpansEqual:()=>fde,dumpTracingLegend:()=>vCe,elementAt:()=>bp,elideNodes:()=>ITe,emitComments:()=>jxe,emitDetachedComments:()=>zxe,emitFiles:()=>bce,emitFilesAndReportErrors:()=>hQ,emitFilesAndReportErrorsAndGetExitStatus:()=>lue,emitModuleKindIsNonNodeESM:()=>tG,emitNewLineBeforeLeadingCommentOfPosition:()=>Hxe,emitNewLineBeforeLeadingComments:()=>Wxe,emitNewLineBeforeLeadingCommentsOfPosition:()=>Vxe,emitResolverSkipsTypeChecking:()=>yce,emitSkippedWithNoDiagnostics:()=>Hce,emptyArray:()=>x,emptyFileSystemEntries:()=>nae,emptyMap:()=>I,emptyOptions:()=>Fm,emptySet:()=>P,endsWith:()=>mu,ensurePathIsNonModuleName:()=>KE,ensureScriptKind:()=>dG,ensureTrailingDirectorySeparator:()=>Xd,entityNameToString:()=>kp,enumerateInsertsAndDeletes:()=>f$,equalOwnProperties:()=>Nf,equateStringsCaseInsensitive:()=>yk,equateStringsCaseSensitive:()=>UE,equateValues:()=>XC,esDecorateHelper:()=>m2e,escapeJsxAttributeString:()=>Coe,escapeLeadingUnderscores:()=>du,escapeNonAsciiString:()=>LJ,escapeSnippetText:()=>zT,escapeString:()=>B1,escapeTemplateSubstitution:()=>yoe,evaluatorResult:()=>Hd,every:()=>Be,executeCommandLine:()=>pXe,expandPreOrPostfixIncrementOrDecrementExpression:()=>ZG,explainFiles:()=>nue,explainIfFileIsRedirectAndImpliedFormat:()=>rue,exportAssignmentIsAlias:()=>V6,exportStarHelper:()=>M2e,expressionResultIsUnused:()=>Wke,extend:()=>hB,extendsHelper:()=>k2e,extensionFromPath:()=>X8,extensionIsTS:()=>mG,extensionsNotSupportingExtensionlessResolution:()=>pG,externalHelpersModuleNameText:()=>Ik,factory:()=>G,fileExtensionIs:()=>tu,fileExtensionIsOneOf:()=>rd,fileIncludeReasonToDiagnostics:()=>aue,fileShouldUseJavaScriptRequire:()=>Rde,filter:()=>Ri,filterMutate:()=>ao,filterSemanticDiagnostics:()=>sQ,find:()=>Me,findAncestor:()=>Xi,findBestPatternMatch:()=>mre,findChildOfKind:()=>Hl,findComputedPropertyNameCacheAssignment:()=>sK,findConfigFile:()=>kce,findConstructorDeclaration:()=>tV,findContainingList:()=>FQ,findDiagnosticForNode:()=>lLe,findFirstNonJsxWhitespaceToken:()=>DNe,findIndex:()=>Nt,findLast:()=>vt,findLastIndex:()=>Ni,findListItemInfo:()=>TNe,findMap:()=>ci,findModifier:()=>R3,findNextToken:()=>aD,findPackageJson:()=>oLe,findPackageJsons:()=>Ede,findPrecedingMatchingToken:()=>zQ,findPrecedingToken:()=>Dd,findSuperStatementIndexPath:()=>WK,findTokenOnLeftOfPosition:()=>VQ,findUseStrictPrologue:()=>Xae,first:()=>ma,firstDefined:()=>Z,firstDefinedIterator:()=>ee,firstIterator:()=>vT,firstOrOnly:()=>Ade,firstOrUndefined:()=>lu,firstOrUndefinedIterator:()=>Pw,fixupCompilerOptions:()=>Yde,flatMap:()=>Ln,flatMapIterator:()=>zg,flatMapToMutable:()=>bd,flatten:()=>zs,flattenCommaList:()=>PTe,flattenDestructuringAssignment:()=>TI,flattenDestructuringBinding:()=>nD,flattenDiagnosticMessageText:()=>Jv,forEach:()=>W,forEachAncestor:()=>Ewe,forEachAncestorDirectory:()=>c0,forEachChild:()=>jo,forEachChildRecursively:()=>MP,forEachEmittedFile:()=>pce,forEachEnclosingBlockScopeContainer:()=>zwe,forEachEntry:()=>hf,forEachExternalModuleToImportFrom:()=>Wde,forEachImportClauseDeclaration:()=>vxe,forEachKey:()=>Bb,forEachLeadingCommentRange:()=>kB,forEachNameInAccessChainWalkingLeft:()=>cke,forEachNameOfDefaultExport:()=>Vde,forEachPropertyAssignment:()=>A6,forEachResolvedProjectReference:()=>Fce,forEachReturnStatement:()=>sS,forEachRight:()=>X,forEachTrailingCommentRange:()=>TB,forEachTsConfigPropArray:()=>sW,forEachUnique:()=>_de,forEachYieldExpression:()=>Ywe,forSomeAncestorDirectory:()=>w$e,formatColorAndReset:()=>rD,formatDiagnostic:()=>Ice,formatDiagnostics:()=>tQe,formatDiagnosticsWithColorAndContext:()=>YEe,formatGeneratedName:()=>Jk,formatGeneratedNamePart:()=>_3,formatLocation:()=>Nce,formatMessage:()=>lP,formatStringFromArgs:()=>Qy,formatting:()=>gd,fullTripleSlashAMDReferencePathRegEx:()=>Zwe,fullTripleSlashReferencePathRegEx:()=>Xwe,generateDjb2Hash:()=>$R,generateTSConfig:()=>rDe,generatorHelper:()=>P2e,getAdjustedReferenceLocation:()=>$ue,getAdjustedRenameLocation:()=>WQ,getAliasDeclarationFromName:()=>loe,getAllAccessorDeclarations:()=>qw,getAllDecoratorsOfClass:()=>oce,getAllDecoratorsOfClassElement:()=>HK,getAllJSDocTags:()=>A$,getAllJSDocTagsOfKind:()=>Oqe,getAllKeys:()=>ure,getAllProjectOutputs:()=>GK,getAllSuperTypeNodes:()=>E8,getAllowJSCompilerOption:()=>Jw,getAllowSyntheticDefaultImports:()=>cP,getAncestor:()=>Rk,getAnyExtensionFromPath:()=>p6,getAreDeclarationMapsEnabled:()=>eG,getAssignedExpandoInitializer:()=>JL,getAssignedName:()=>L$,getAssignedNameOfIdentifier:()=>U7,getAssignmentDeclarationKind:()=>Lu,getAssignmentDeclarationPropertyAccessKind:()=>yW,getAssignmentTargetKind:()=>Mk,getAutomaticTypeDirectiveNames:()=>xK,getBaseFileName:()=>fd,getBinaryOperatorPrecedence:()=>OW,getBuildInfo:()=>Cce,getBuildInfoFileVersionMap:()=>Jce,getBuildInfoText:()=>HEe,getBuildOrderFromAnyBuildOrder:()=>tH,getBuilderCreationParameters:()=>aQ,getBuilderFileEmit:()=>lx,getCanonicalDiagnostic:()=>Gwe,getCheckFlags:()=>Pu,getClassExtendsHeritageElement:()=>MT,getClassLikeDeclarationOfSymbol:()=>Ub,getCombinedLocalAndExportSymbolFlags:()=>K6,getCombinedModifierFlags:()=>wk,getCombinedNodeFlags:()=>Rb,getCombinedNodeFlagsAlwaysIncludeJSDoc:()=>rse,getCommentRange:()=>Vv,getCommonSourceDirectory:()=>G7,getCommonSourceDirectoryOfConfig:()=>UP,getCompilerOptionValue:()=>rG,getCompilerOptionsDiffValue:()=>nDe,getConditions:()=>sx,getConfigFileParsingDiagnostics:()=>sD,getConstantValue:()=>r2e,getContainerFlags:()=>zle,getContainerNode:()=>II,getContainingClass:()=>Sf,getContainingClassExcludingClassDecorators:()=>hJ,getContainingClassStaticBlock:()=>cxe,getContainingFunction:()=>Kp,getContainingFunctionDeclaration:()=>lxe,getContainingFunctionOrClassStaticBlock:()=>fJ,getContainingNodeArray:()=>Vke,getContainingObjectLiteralElement:()=>RH,getContextualTypeFromParent:()=>iX,getContextualTypeFromParentOrAncestorTypeNode:()=>BQ,getCurrentTime:()=>eH,getDeclarationDiagnostics:()=>REe,getDeclarationEmitExtensionForPath:()=>OJ,getDeclarationEmitOutputFilePath:()=>Oxe,getDeclarationEmitOutputFilePathWorker:()=>AJ,getDeclarationFileExtension:()=>lle,getDeclarationFromName:()=>D8,getDeclarationModifierFlagsFromSymbol:()=>Qg,getDeclarationOfKind:()=>Jc,getDeclarationsOfKind:()=>kwe,getDeclaredExpandoInitializer:()=>w8,getDecorators:()=>Fw,getDefaultCompilerOptions:()=>MX,getDefaultFormatCodeSettings:()=>EQ,getDefaultLibFileName:()=>EB,getDefaultLibFilePath:()=>KPe,getDefaultLikeExportInfo:()=>yX,getDefaultLikeExportNameFromDeclaration:()=>fX,getDiagnosticText:()=>H_,getDiagnosticsWithinSpan:()=>cLe,getDirectoryPath:()=>rs,getDirectoryToWatchFailedLookupLocation:()=>Qce,getDirectoryToWatchFailedLookupLocationFromTypeRoot:()=>CIe,getDocumentPositionMapper:()=>Gde,getDocumentSpansEqualityComparer:()=>hde,getESModuleInterop:()=>Xy,getEditsForFileRename:()=>yLe,getEffectiveBaseTypeNode:()=>Pv,getEffectiveConstraintOfTypeParameter:()=>C6,getEffectiveContainerForJSDocTemplateTag:()=>TJ,getEffectiveImplementsTypeNodes:()=>H6,getEffectiveInitializer:()=>pW,getEffectiveJSDocHost:()=>Ok,getEffectiveModifierFlags:()=>Wh,getEffectiveModifierFlagsAlwaysIncludeJSDoc:()=>Jxe,getEffectiveModifierFlagsNoCache:()=>Gxe,getEffectiveReturnTypeNode:()=>Dp,getEffectiveSetAccessorTypeAnnotationNode:()=>Bxe,getEffectiveTypeAnnotationNode:()=>hd,getEffectiveTypeParameterDeclarations:()=>Bw,getEffectiveTypeRoots:()=>A7,getElementOrPropertyAccessArgumentExpressionOrName:()=>kJ,getElementOrPropertyAccessName:()=>Wb,getElementsOfBindingOrAssignmentPattern:()=>h3,getEmitDeclarations:()=>fg,getEmitFlags:()=>Ya,getEmitHelpers:()=>LG,getEmitModuleDetectionKind:()=>pke,getEmitModuleKind:()=>Vh,getEmitModuleResolutionKind:()=>f_,getEmitScriptTarget:()=>il,getEmitStandardClassFields:()=>Koe,getEnclosingBlockScopeContainer:()=>j0,getEnclosingContainer:()=>rJ,getEncodedSemanticClassifications:()=>Hde,getEncodedSyntacticClassifications:()=>jde,getEndLinePosition:()=>KB,getEntityNameFromTypeNode:()=>lW,getEntrypointsFromPackageJsonInfo:()=>Ble,getErrorCountForSummary:()=>dQ,getErrorSpanForNode:()=>nI,getErrorSummaryText:()=>tue,getEscapedTextOfIdentifierOrLiteral:()=>L8,getEscapedTextOfJsxAttributeName:()=>s7,getEscapedTextOfJsxNamespacedName:()=>hP,getExpandoInitializer:()=>Pk,getExportAssignmentExpression:()=>coe,getExportInfoMap:()=>EH,getExportNeedsImportStarHelper:()=>ZDe,getExpressionAssociativity:()=>goe,getExpressionPrecedence:()=>A8,getExternalHelpersModuleName:()=>tK,getExternalModuleImportEqualsDeclarationExpression:()=>C8,getExternalModuleName:()=>GL,getExternalModuleNameFromDeclaration:()=>Pxe,getExternalModuleNameFromPath:()=>xoe,getExternalModuleNameLiteral:()=>OP,getExternalModuleRequireArgument:()=>Zse,getFallbackOptions:()=>JV,getFileEmitOutput:()=>iIe,getFileMatcherPatterns:()=>uG,getFileNamesFromConfigSpecs:()=>L7,getFileWatcherEventKind:()=>zre,getFilesInErrorForSummary:()=>fQ,getFirstConstructorWithBody:()=>Gy,getFirstIdentifier:()=>Ip,getFirstNonSpaceCharacterPosition:()=>YNe,getFirstProjectOutput:()=>vce,getFixableErrorSpanExpression:()=>Lde,getFormatCodeSettingsForWriting:()=>gX,getFullWidth:()=>GB,getFunctionFlags:()=>ad,getHeritageClause:()=>NW,getHostSignatureFromJSDoc:()=>Ak,getIdentifierAutoGenerate:()=>J$e,getIdentifierGeneratedImportReference:()=>u2e,getIdentifierTypeArguments:()=>fI,getImmediatelyInvokedFunctionExpression:()=>NT,getImpliedNodeFormatForFile:()=>QV,getImpliedNodeFormatForFileWorker:()=>rQ,getImportNeedsImportDefaultHelper:()=>nce,getImportNeedsImportStarHelper:()=>FK,getIndentSize:()=>q6,getIndentString:()=>PJ,getInferredLibraryNameResolveFrom:()=>nQ,getInitializedVariables:()=>j8,getInitializerOfBinaryExpression:()=>toe,getInitializerOfBindingOrAssignmentElement:()=>bV,getInterfaceBaseTypeNodes:()=>I8,getInternalEmitFlags:()=>d0,getInvokedExpression:()=>gJ,getIsolatedModules:()=>Xg,getJSDocAugmentsTag:()=>QSe,getJSDocClassTag:()=>ase,getJSDocCommentRanges:()=>Jse,getJSDocCommentsAndTags:()=>noe,getJSDocDeprecatedTag:()=>lse,getJSDocDeprecatedTagNoCache:()=>nwe,getJSDocEnumTag:()=>cse,getJSDocHost:()=>AT,getJSDocImplementsTags:()=>XSe,getJSDocOverloadTags:()=>soe,getJSDocOverrideTagNoCache:()=>iwe,getJSDocParameterTags:()=>b6,getJSDocParameterTagsNoCache:()=>$Se,getJSDocPrivateTag:()=>Iqe,getJSDocPrivateTagNoCache:()=>YSe,getJSDocProtectedTag:()=>Nqe,getJSDocProtectedTagNoCache:()=>ewe,getJSDocPublicTag:()=>Eqe,getJSDocPublicTagNoCache:()=>ZSe,getJSDocReadonlyTag:()=>Lqe,getJSDocReadonlyTagNoCache:()=>twe,getJSDocReturnTag:()=>rwe,getJSDocReturnType:()=>AB,getJSDocRoot:()=>W6,getJSDocSatisfiesExpressionType:()=>hae,getJSDocSatisfiesTag:()=>use,getJSDocTags:()=>Tk,getJSDocTagsNoCache:()=>Aqe,getJSDocTemplateTag:()=>Pqe,getJSDocThisTag:()=>P$,getJSDocType:()=>kk,getJSDocTypeAliasName:()=>ele,getJSDocTypeAssertionType:()=>T7,getJSDocTypeParameterDeclarations:()=>WJ,getJSDocTypeParameterTags:()=>JSe,getJSDocTypeParameterTagsNoCache:()=>GSe,getJSDocTypeTag:()=>xk,getJSXImplicitImportBase:()=>oG,getJSXRuntimeImport:()=>aG,getJSXTransformEnabled:()=>sG,getKeyForCompilerOptions:()=>Ple,getLanguageVariant:()=>qW,getLastChild:()=>Hoe,getLeadingCommentRanges:()=>Hy,getLeadingCommentRangesOfNode:()=>$se,getLeftmostAccessExpression:()=>Q6,getLeftmostExpression:()=>X6,getLibraryNameFromLibFileName:()=>Bce,getLineAndCharacterOfPosition:()=>Da,getLineInfo:()=>ece,getLineOfLocalPosition:()=>M8,getLineOfLocalPositionFromLineMap:()=>uI,getLineStartPositionForPosition:()=>Bm,getLineStarts:()=>Wy,getLinesBetweenPositionAndNextNonWhitespaceCharacter:()=>oke,getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter:()=>ske,getLinesBetweenPositions:()=>XR,getLinesBetweenRangeEndAndRangeStart:()=>Foe,getLinesBetweenRangeEndPositions:()=>S$e,getLiteralText:()=>Mwe,getLocalNameForExternalImport:()=>f3,getLocalSymbolForExportDefault:()=>W8,getLocaleSpecificMessage:()=>Po,getLocaleTimeString:()=>YV,getMappedContextSpan:()=>pde,getMappedDocumentSpan:()=>ZQ,getMappedLocation:()=>aF,getMatchedFileSpec:()=>sue,getMatchedIncludeSpec:()=>oue,getMeaningFromDeclaration:()=>NQ,getMeaningFromLocation:()=>EI,getMembersOfDeclaration:()=>exe,getModeForFileReference:()=>GV,getModeForResolutionAtIndex:()=>eIe,getModeForUsageLocation:()=>Pce,getModifiedTime:()=>AL,getModifiers:()=>CT,getModuleInstanceState:()=>Yb,getModuleNameStringLiteralAt:()=>ZV,getModuleSpecifierEndingPreference:()=>Nke,getModuleSpecifierResolverHost:()=>ode,getNameForExportedSymbol:()=>dX,getNameFromImportAttribute:()=>kG,getNameFromIndexInfo:()=>Uwe,getNameFromPropertyName:()=>gH,getNameOfAccessExpression:()=>zoe,getNameOfCompilerOptionValue:()=>xle,getNameOfDeclaration:()=>ko,getNameOfExpando:()=>Yse,getNameOfJSDocTypedef:()=>qSe,getNameOfScriptTarget:()=>nG,getNameOrArgument:()=>vW,getNameTable:()=>xfe,getNamesForExportedSymbol:()=>uLe,getNamespaceDeclarationNode:()=>F6,getNewLineCharacter:()=>fS,getNewLineKind:()=>DH,getNewLineOrDefaultFromHost:()=>SS,getNewTargetContainer:()=>dxe,getNextJSDocCommentLocation:()=>roe,getNodeChildren:()=>qae,getNodeForGeneratedName:()=>SV,getNodeId:()=>Tl,getNodeKind:()=>oD,getNodeModifiers:()=>rF,getNodeModulePathParts:()=>SG,getNonAssignedNameOfDeclaration:()=>N$,getNonAssignmentOperatorForCompoundAssignment:()=>H7,getNonAugmentationDeclaration:()=>Wse,getNonDecoratorTokenPosOfNode:()=>Ase,getNormalizedAbsolutePath:()=>bo,getNormalizedAbsolutePathWithoutRoot:()=>Jre,getNormalizedPathComponents:()=>CB,getObjectFlags:()=>Rr,getOperator:()=>voe,getOperatorAssociativity:()=>moe,getOperatorPrecedence:()=>AW,getOptionFromName:()=>vle,getOptionsForLibraryResolution:()=>Ole,getOptionsNameMap:()=>g3,getOrCreateEmitNode:()=>th,getOrCreateExternalHelpersModuleNameIfNeeded:()=>bTe,getOrUpdate:()=>ka,getOriginalNode:()=>uu,getOriginalNodeId:()=>y_,getOriginalSourceFile:()=>d$e,getOutputDeclarationFileName:()=>k3,getOutputDeclarationFileNameWorker:()=>gce,getOutputExtension:()=>JK,getOutputFileNames:()=>YKe,getOutputJSFileNameWorker:()=>mce,getOutputPathsFor:()=>J7,getOutputPathsForBundle:()=>$K,getOwnEmitOutputFilePath:()=>Axe,getOwnKeys:()=>wm,getOwnValues:()=>Za,getPackageJsonInfo:()=>Yk,getPackageJsonTypesVersionsPaths:()=>wK,getPackageJsonsVisibleToFile:()=>aLe,getPackageNameFromTypesPackageName:()=>F7,getPackageScopeForPath:()=>R7,getParameterSymbolFromJSDoc:()=>TW,getParameterTypeNode:()=>B$e,getParentNodeInSpan:()=>vH,getParseTreeNode:()=>xo,getParsedCommandLineOfConfigFile:()=>EV,getPathComponents:()=>Qd,getPathComponentsRelativeTo:()=>Qre,getPathFromPathComponents:()=>Ob,getPathUpdater:()=>qde,getPathsBasePath:()=>MJ,getPatternFromSpec:()=>kke,getPendingEmitKind:()=>I3,getPositionOfLineAndCharacter:()=>wB,getPossibleGenericSignatures:()=>Gue,getPossibleOriginalInputExtensionForExtension:()=>Mxe,getPossibleTypeArgumentsInfo:()=>Kue,getPreEmitDiagnostics:()=>eQe,getPrecedingNonSpaceCharacterPosition:()=>eX,getPrivateIdentifier:()=>ace,getProperties:()=>sce,getProperty:()=>u6,getPropertyArrayElementValue:()=>axe,getPropertyAssignmentAliasLikeExpression:()=>kxe,getPropertyNameForPropertyNameNode:()=>lI,getPropertyNameForUniqueESSymbol:()=>c$e,getPropertyNameFromType:()=>Am,getPropertyNameOfBindingOrAssignmentElement:()=>Yae,getPropertySymbolFromBindingElement:()=>XQ,getPropertySymbolsFromContextualType:()=>FX,getQuoteFromPreference:()=>lde,getQuotePreference:()=>bg,getRangesWhere:()=>Ry,getRefactorContextSpan:()=>QP,getReferencedFileLocation:()=>X7,getRegexFromPattern:()=>Gw,getRegularExpressionForWildcard:()=>J8,getRegularExpressionsForWildcards:()=>lG,getRelativePathFromDirectory:()=>W0,getRelativePathFromFile:()=>KR,getRelativePathToDirectoryOrUrl:()=>OL,getRenameLocation:()=>CH,getReplacementSpanForContextToken:()=>Yue,getResolutionDiagnostic:()=>zce,getResolutionModeOverride:()=>T3,getResolveJsonModule:()=>VT,getResolvePackageJsonExports:()=>Joe,getResolvePackageJsonImports:()=>Goe,getResolvedExternalModuleName:()=>woe,getRestIndicatorOfBindingOrAssignmentElement:()=>iK,getRestParameterElementType:()=>Gse,getRightMostAssignedExpression:()=>gW,getRootDeclaration:()=>Ov,getRootDirectoryOfResolutionCache:()=>SIe,getRootLength:()=>L1,getRootPathSplitLength:()=>EQe,getScriptKind:()=>bde,getScriptKindFromFileName:()=>fG,getScriptTargetFeatures:()=>Ose,getSelectedEffectiveModifierFlags:()=>tP,getSelectedSyntacticModifierFlags:()=>qxe,getSemanticClassifications:()=>pLe,getSemanticJsxChildren:()=>z6,getSetAccessorTypeAnnotationNode:()=>Rxe,getSetAccessorValueParameter:()=>J6,getSetExternalModuleIndicator:()=>$W,getShebang:()=>D$,getSingleInitializerOfVariableStatementOrPropertyDeclaration:()=>ioe,getSingleVariableOfVariableStatement:()=>XL,getSnapshotText:()=>GP,getSnippetElement:()=>bae,getSourceFileOfModule:()=>Z$,getSourceFileOfNode:()=>_n,getSourceFilePathInNewDir:()=>FJ,getSourceFilePathInNewDirWorker:()=>BJ,getSourceFileVersionAsHashFromText:()=>_Q,getSourceFilesToEmit:()=>RJ,getSourceMapRange:()=>_S,getSourceMapper:()=>LLe,getSourceTextOfNodeFromSourceFile:()=>TT,getSpanOfTokenAtPosition:()=>R1,getSpellingSuggestion:()=>qE,getStartPositionOfLine:()=>zw,getStartPositionOfRange:()=>H8,getStartsOnNewLine:()=>a7,getStaticPropertiesAndClassStaticBlock:()=>VK,getStrictOptionValue:()=>Hh,getStringComparer:()=>f6,getSubPatternFromSpec:()=>cG,getSuperCallFromStatement:()=>BK,getSuperContainer:()=>oW,getSupportedCodeFixes:()=>Sfe,getSupportedExtensions:()=>K8,getSupportedExtensionsWithJsonIfResolveJsonModule:()=>GW,getSwitchedType:()=>kde,getSymbolId:()=>Aa,getSymbolNameForPrivateIdentifier:()=>LW,getSymbolParentOrFail:()=>hX,getSymbolTarget:()=>Cde,getSyntacticClassifications:()=>gLe,getSyntacticModifierFlags:()=>uS,getSyntacticModifierFlagsNoCache:()=>Ioe,getSynthesizedDeepClone:()=>Pl,getSynthesizedDeepCloneWithReplacements:()=>bH,getSynthesizedDeepClones:()=>lD,getSynthesizedDeepClonesWithReplacements:()=>Sde,getSyntheticLeadingComments:()=>i3,getSyntheticTrailingComments:()=>oV,getTargetLabel:()=>AQ,getTargetOfBindingOrAssignmentElement:()=>rx,getTemporaryModuleResolutionState:()=>M7,getTextOfConstantValue:()=>Rwe,getTextOfIdentifierOrLiteral:()=>Im,getTextOfJSDocComment:()=>MB,getTextOfJsxAttributeName:()=>eV,getTextOfJsxNamespacedName:()=>o7,getTextOfNode:()=>yu,getTextOfNodeFromSourceText:()=>g8,getTextOfPropertyName:()=>UL,getThisContainer:()=>u_,getThisParameter:()=>RT,getTokenAtPosition:()=>Rs,getTokenPosOfNode:()=>Nk,getTokenSourceMapRange:()=>q$e,getTouchingPropertyName:()=>j_,getTouchingToken:()=>O3,getTrailingCommentRanges:()=>Rw,getTrailingSemicolonDeferringWriter:()=>Soe,getTransformFlagsSubtreeExclusions:()=>t2e,getTransformers:()=>WEe,getTsBuildInfoEmitOutputFilePath:()=>yS,getTsConfigObjectLiteralExpression:()=>y8,getTsConfigPropArrayElementValue:()=>dJ,getTypeAnnotationNode:()=>Fxe,getTypeArgumentOrTypeParameterList:()=>MNe,getTypeKeywordOfTypeOnlyImport:()=>dde,getTypeNode:()=>l2e,getTypeNodeIfAccessible:()=>fF,getTypeParameterFromJsDoc:()=>yxe,getTypeParameterOwner:()=>xqe,getTypesPackageName:()=>LK,getUILocale:()=>eCe,getUniqueName:()=>LI,getUniqueSymbolId:()=>ZNe,getUseDefineForClassFields:()=>JW,getWatchErrorSummaryDiagnosticMessage:()=>eue,getWatchFactory:()=>xce,group:()=>xv,groupBy:()=>d6,guessIndentation:()=>wwe,handleNoEmitOptions:()=>jce,handleWatchOptionsConfigDirTemplateSubstitution:()=>vK,hasAbstractModifier:()=>WT,hasAccessorModifier:()=>Mv,hasAmbientModifier:()=>Eoe,hasChangesInResolutions:()=>Nse,hasChildOfKind:()=>dH,hasContextSensitiveParameters:()=>bG,hasDecorators:()=>dg,hasDocComment:()=>ANe,hasDynamicName:()=>Hb,hasEffectiveModifier:()=>Ep,hasEffectiveModifiers:()=>Doe,hasEffectiveReadonlyModifier:()=>R8,hasExtension:()=>_6,hasIndexSignature:()=>xde,hasInferredType:()=>Gke,hasInitializer:()=>iS,hasInvalidEscape:()=>boe,hasJSDocNodes:()=>Jp,hasJSDocParameterTags:()=>KSe,hasJSFileExtension:()=>Zy,hasJsonModuleEmitEnabled:()=>iG,hasOnlyExpressionInitializer:()=>tI,hasOverrideModifier:()=>VJ,hasPossibleExternalModuleReference:()=>jwe,hasProperty:()=>Vl,hasPropertyAccessExpressionWithName:()=>oH,hasQuestionToken:()=>QL,hasRecordedExternalHelpers:()=>yTe,hasResolutionModeOverride:()=>qke,hasRestParameter:()=>Tse,hasScopeMarker:()=>pwe,hasStaticModifier:()=>_d,hasSyntacticModifier:()=>Kr,hasSyntacticModifiers:()=>Uxe,hasTSFileExtension:()=>dP,hasTabstop:()=>jke,hasTrailingDirectorySeparator:()=>ZC,hasType:()=>q$,hasTypeArguments:()=>r$e,hasZeroOrOneAsteriskCharacter:()=>Qoe,helperString:()=>wae,hostGetCanonicalFileName:()=>cS,hostUsesCaseSensitiveFileNames:()=>$6,idText:()=>dr,identifierIsThisKeyword:()=>Toe,identifierToKeywordKind:()=>QE,identity:()=>fc,identitySourceMapConsumer:()=>ice,ignoreSourceNewlines:()=>Sae,ignoredPaths:()=>y$,importDefaultHelper:()=>O2e,importFromModuleSpecifier:()=>k8,importStarHelper:()=>xae,indexOfAnyCharCode:()=>gn,indexOfNode:()=>I6,indicesOf:()=>mr,inferredTypesContainingFile:()=>Q7,injectClassNamedEvaluationHelperBlockIfMissing:()=>zK,injectClassThisAssignmentIfMissing:()=>uEe,insertImports:()=>ude,insertLeadingStatement:()=>lJe,insertSorted:()=>Ei,insertStatementAfterCustomPrologue:()=>iI,insertStatementAfterStandardPrologue:()=>Kqe,insertStatementsAfterCustomPrologue:()=>Lse,insertStatementsAfterStandardPrologue:()=>qy,intersperse:()=>Te,intrinsicTagNameToString:()=>_ae,introducesArgumentsExoticObject:()=>rxe,inverseJsxOptionMap:()=>TV,isAbstractConstructorSymbol:()=>ake,isAbstractModifier:()=>$2e,isAccessExpression:()=>Sc,isAccessibilityModifier:()=>Xue,isAccessor:()=>Vw,isAccessorModifier:()=>G2e,isAliasSymbolDeclaration:()=>o$e,isAliasableExpression:()=>IW,isAmbientModule:()=>Bh,isAmbientPropertyDeclaration:()=>Hse,isAnonymousFunctionDefinition:()=>P8,isAnyDirectorySeparator:()=>Ure,isAnyImportOrBareOrAccessedRequire:()=>Vwe,isAnyImportOrReExport:()=>ZB,isAnyImportOrRequireStatement:()=>Hwe,isAnyImportSyntax:()=>zL,isAnySupportedFileExtension:()=>R$e,isApplicableVersionedTypesKey:()=>MV,isArgumentExpressionOfElementAccess:()=>Vue,isArray:()=>Lo,isArrayBindingElement:()=>W$,isArrayBindingOrAssignmentElement:()=>jB,isArrayBindingOrAssignmentPattern:()=>bse,isArrayBindingPattern:()=>mS,isArrayLiteralExpression:()=>Rf,isArrayLiteralOrObjectLiteralDestructuringPattern:()=>CS,isArrayTypeNode:()=>fV,isArrowFunction:()=>Dc,isAsExpression:()=>_7,isAssertClause:()=>eTe,isAssertEntry:()=>eJe,isAssertionExpression:()=>Ek,isAssertsKeyword:()=>U2e,isAssignmentDeclaration:()=>S8,isAssignmentExpression:()=>Yd,isAssignmentOperator:()=>jb,isAssignmentPattern:()=>d8,isAssignmentTarget:()=>lS,isAsteriskToken:()=>cV,isAsyncFunction:()=>N8,isAsyncModifier:()=>d7,isAutoAccessorPropertyDeclaration:()=>O_,isAwaitExpression:()=>ex,isAwaitKeyword:()=>Iae,isBigIntLiteral:()=>lV,isBinaryExpression:()=>cr,isBinaryOperatorToken:()=>ETe,isBindableObjectDefinePropertyCall:()=>oI,isBindableStaticAccessExpression:()=>PT,isBindableStaticElementAccessExpression:()=>xJ,isBindableStaticNameExpression:()=>aI,isBindingElement:()=>nl,isBindingElementOfBareOrAccessedRequire:()=>_xe,isBindingName:()=>YE,isBindingOrAssignmentElement:()=>uwe,isBindingOrAssignmentPattern:()=>VB,isBindingPattern:()=>Qo,isBlock:()=>Ho,isBlockLike:()=>j3,isBlockOrCatchScoped:()=>Mse,isBlockScope:()=>jse,isBlockScopedContainerTopLevel:()=>Wwe,isBooleanLiteral:()=>u8,isBreakOrContinueStatement:()=>s8,isBreakStatement:()=>X$e,isBuild:()=>GIe,isBuildInfoFile:()=>VEe,isBuilderProgram:()=>kIe,isBundle:()=>nTe,isCallChain:()=>XE,isCallExpression:()=>sa,isCallExpressionTarget:()=>Oue,isCallLikeExpression:()=>kT,isCallLikeOrFunctionLikeExpression:()=>Cse,isCallOrNewExpression:()=>Dv,isCallOrNewExpressionTarget:()=>Mue,isCallSignatureDeclaration:()=>xP,isCallToHelper:()=>u7,isCaseBlock:()=>y7,isCaseClause:()=>a3,isCaseKeyword:()=>K2e,isCaseOrDefaultClause:()=>z$,isCatchClause:()=>YT,isCatchClauseVariableDeclaration:()=>Hke,isCatchClauseVariableDeclarationOrBindingElement:()=>Rse,isCheckJsEnabledForFile:()=>Z8,isChildOfNodeWithKind:()=>Xqe,isCircularBuildOrder:()=>$P,isClassDeclaration:()=>xd,isClassElement:()=>Vd,isClassExpression:()=>wd,isClassInstanceProperty:()=>lwe,isClassLike:()=>ss,isClassMemberModifier:()=>mse,isClassNamedEvaluationHelperBlock:()=>zP,isClassOrTypeElement:()=>B$,isClassStaticBlockDeclaration:()=>bu,isClassThisAssignmentBlock:()=>z7,isCollapsedRange:()=>C$e,isColonToken:()=>j2e,isCommaExpression:()=>vV,isCommaListExpression:()=>g7,isCommaSequence:()=>k7,isCommaToken:()=>H2e,isComment:()=>UQ,isCommonJsExportPropertyAssignment:()=>cJ,isCommonJsExportedExpression:()=>ixe,isCompoundAssignment:()=>V7,isComputedNonLiteralName:()=>YB,isComputedPropertyName:()=>Ja,isConciseBody:()=>H$,isConditionalExpression:()=>IP,isConditionalTypeNode:()=>$T,isConstAssertion:()=>pae,isConstTypeReference:()=>V0,isConstructSignatureDeclaration:()=>dV,isConstructorDeclaration:()=>fu,isConstructorTypeNode:()=>n3,isContextualKeyword:()=>EJ,isContinueStatement:()=>Q$e,isCustomPrologue:()=>rW,isDebuggerStatement:()=>Z$e,isDeclaration:()=>Yf,isDeclarationBindingElement:()=>WB,isDeclarationFileName:()=>xf,isDeclarationName:()=>F1,isDeclarationNameOfEnumOrNamespace:()=>Boe,isDeclarationReadonly:()=>tW,isDeclarationStatement:()=>ywe,isDeclarationWithTypeParameterChildren:()=>Use,isDeclarationWithTypeParameters:()=>zse,isDecorator:()=>jd,isDecoratorTarget:()=>bNe,isDefaultClause:()=>C7,isDefaultImport:()=>KL,isDefaultModifier:()=>BG,isDefaultedExpandoInitializer:()=>pxe,isDeleteExpression:()=>X2e,isDeleteTarget:()=>aoe,isDeprecatedDeclaration:()=>_X,isDestructuringAssignment:()=>dS,isDiagnosticWithLocation:()=>Nde,isDiskPathRoot:()=>qre,isDoStatement:()=>K$e,isDocumentRegistryEntry:()=>IH,isDotDotDotToken:()=>RG,isDottedName:()=>VW,isDynamicName:()=>NJ,isESSymbolIdentifier:()=>u$e,isEffectiveExternalModule:()=>jL,isEffectiveModuleDeclaration:()=>Bwe,isEffectiveStrictModeSourceFile:()=>Vse,isElementAccessChain:()=>dse,isElementAccessExpression:()=>wc,isEmittedFileOfProgram:()=>$Ee,isEmptyArrayLiteral:()=>Zxe,isEmptyBindingElement:()=>jSe,isEmptyBindingPattern:()=>HSe,isEmptyObjectLiteral:()=>Ooe,isEmptyStatement:()=>Aae,isEmptyStringLiteral:()=>Xse,isEntityName:()=>A_,isEntityNameExpression:()=>pc,isEnumConst:()=>ET,isEnumDeclaration:()=>Uk,isEnumMember:()=>nx,isEqualityOperatorKind:()=>nX,isEqualsGreaterThanToken:()=>z2e,isExclamationToken:()=>uV,isExcludedFile:()=>oDe,isExclusivelyTypeOnlyImportOrExport:()=>Lce,isExpandoPropertyDeclaration:()=>_P,isExportAssignment:()=>Ec,isExportDeclaration:()=>$u,isExportModifier:()=>SP,isExportName:()=>YG,isExportNamespaceAsDefaultDeclaration:()=>tJ,isExportOrDefaultModifier:()=>CV,isExportSpecifier:()=>gh,isExportsIdentifier:()=>sI,isExportsOrModuleExportsOrAlias:()=>tD,isExpression:()=>Ut,isExpressionNode:()=>z0,isExpressionOfExternalModuleImportEqualsDeclaration:()=>xNe,isExpressionOfOptionalChainRoot:()=>M$,isExpressionStatement:()=>_f,isExpressionWithTypeArguments:()=>Gb,isExpressionWithTypeArgumentsInClassExtendsClause:()=>HJ,isExternalModule:()=>Td,isExternalModuleAugmentation:()=>DT,isExternalModuleImportEqualsDeclaration:()=>Lk,isExternalModuleIndicator:()=>UB,isExternalModuleNameRelative:()=>Zd,isExternalModuleReference:()=>Kb,isExternalModuleSymbol:()=>T6,isExternalOrCommonJsModule:()=>ep,isFileLevelReservedGeneratedIdentifier:()=>BB,isFileLevelUniqueName:()=>Y$,isFileProbablyExternalModule:()=>xV,isFirstDeclarationOfSymbolParameter:()=>gde,isFixablePromiseHandler:()=>Xde,isForInOrOfStatement:()=>eI,isForInStatement:()=>qG,isForInitializer:()=>$g,isForOfStatement:()=>hV,isForStatement:()=>zk,isFullSourceFile:()=>aS,isFunctionBlock:()=>IT,isFunctionBody:()=>wse,isFunctionDeclaration:()=>Uu,isFunctionExpression:()=>gc,isFunctionExpressionOrArrowFunction:()=>Qw,isFunctionLike:()=>Bo,isFunctionLikeDeclaration:()=>rc,isFunctionLikeKind:()=>BL,isFunctionLikeOrClassStaticBlockDeclaration:()=>w6,isFunctionOrConstructorTypeNode:()=>cwe,isFunctionOrModuleBlock:()=>vse,isFunctionSymbol:()=>mxe,isFunctionTypeNode:()=>W1,isFutureReservedKeyword:()=>a$e,isGeneratedIdentifier:()=>jc,isGeneratedPrivateIdentifier:()=>ZE,isGetAccessor:()=>tS,isGetAccessorDeclaration:()=>hg,isGetOrSetAccessorDeclaration:()=>RB,isGlobalDeclaration:()=>eZe,isGlobalScopeAugmentation:()=>Iv,isGlobalSourceFile:()=>nS,isGrammarError:()=>Pwe,isHeritageClause:()=>Lp,isHoistedFunction:()=>aJ,isHoistedVariableStatement:()=>lJ,isIdentifier:()=>lt,isIdentifierANonContextualKeyword:()=>foe,isIdentifierName:()=>xxe,isIdentifierOrThisTypeNode:()=>xTe,isIdentifierPart:()=>YC,isIdentifierStart:()=>jy,isIdentifierText:()=>wp,isIdentifierTypePredicate:()=>sxe,isIdentifierTypeReference:()=>Rke,isIfStatement:()=>jk,isIgnoredFileFromWildCardWatching:()=>$V,isImplicitGlob:()=>Yoe,isImportAttribute:()=>tTe,isImportAttributeName:()=>awe,isImportAttributes:()=>mI,isImportCall:()=>Gp,isImportClause:()=>$0,isImportDeclaration:()=>Cu,isImportEqualsDeclaration:()=>kd,isImportKeyword:()=>h7,isImportMeta:()=>P6,isImportOrExportSpecifier:()=>FL,isImportOrExportSpecifierName:()=>XNe,isImportSpecifier:()=>m_,isImportTypeAssertionContainer:()=>Y$e,isImportTypeNode:()=>V1,isImportableFile:()=>Bde,isInComment:()=>bS,isInCompoundLikeAssignment:()=>ooe,isInExpressionContext:()=>mJ,isInJSDoc:()=>dW,isInJSFile:()=>Xn,isInJSXText:()=>LNe,isInJsonFile:()=>yJ,isInNonReferenceComment:()=>BNe,isInReferenceComment:()=>FNe,isInRightSideOfInternalImportEqualsDeclaration:()=>LQ,isInString:()=>JP,isInTemplateString:()=>Jue,isInTopLevelContext:()=>_J,isInTypeQuery:()=>eP,isIncrementalCompilation:()=>$8,isIndexSignatureDeclaration:()=>UT,isIndexedAccessTypeNode:()=>JT,isInferTypeNode:()=>hI,isInfinityOrNaNString:()=>n7,isInitializedProperty:()=>WV,isInitializedVariable:()=>UW,isInsideJsxElement:()=>jQ,isInsideJsxElementOrAttribute:()=>NNe,isInsideNodeModules:()=>kH,isInsideTemplateLiteral:()=>hH,isInstanceOfExpression:()=>jJ,isInstantiatedModule:()=>Kle,isInterfaceDeclaration:()=>Ff,isInternalDeclaration:()=>xwe,isInternalModuleImportEqualsDeclaration:()=>$L,isInternalName:()=>Qae,isIntersectionTypeNode:()=>DP,isIntrinsicJsxName:()=>U6,isIterationStatement:()=>Hw,isJSDoc:()=>G0,isJSDocAllType:()=>oTe,isJSDocAugmentsTag:()=>AP,isJSDocAuthorTag:()=>rJe,isJSDocCallbackTag:()=>Bae,isJSDocClassTag:()=>lTe,isJSDocCommentContainingNode:()=>U$,isJSDocConstructSignature:()=>B6,isJSDocDeprecatedTag:()=>zae,isJSDocEnumTag:()=>pV,isJSDocFunctionType:()=>c3,isJSDocImplementsTag:()=>QG,isJSDocImportTag:()=>$v,isJSDocIndexSignature:()=>CJ,isJSDocLikeText:()=>sle,isJSDocLink:()=>rTe,isJSDocLinkCode:()=>sTe,isJSDocLinkLike:()=>HL,isJSDocLinkPlain:()=>iJe,isJSDocMemberName:()=>$k,isJSDocNameReference:()=>S7,isJSDocNamepathType:()=>nJe,isJSDocNamespaceBody:()=>jqe,isJSDocNode:()=>x6,isJSDocNonNullableType:()=>$G,isJSDocNullableType:()=>l3,isJSDocOptionalParameter:()=>wG,isJSDocOptionalType:()=>Fae,isJSDocOverloadTag:()=>u3,isJSDocOverrideTag:()=>GG,isJSDocParameterTag:()=>em,isJSDocPrivateTag:()=>Vae,isJSDocPropertyLikeTag:()=>o8,isJSDocPropertyTag:()=>cTe,isJSDocProtectedTag:()=>Hae,isJSDocPublicTag:()=>Wae,isJSDocReadonlyTag:()=>jae,isJSDocReturnTag:()=>KG,isJSDocSatisfiesExpression:()=>fae,isJSDocSatisfiesTag:()=>XG,isJSDocSeeTag:()=>sJe,isJSDocSignature:()=>Qb,isJSDocTag:()=>k6,isJSDocTemplateTag:()=>Rm,isJSDocThisTag:()=>Uae,isJSDocThrowsTag:()=>aJe,isJSDocTypeAlias:()=>Em,isJSDocTypeAssertion:()=>wI,isJSDocTypeExpression:()=>qk,isJSDocTypeLiteral:()=>bI,isJSDocTypeTag:()=>w7,isJSDocTypedefTag:()=>CI,isJSDocUnknownTag:()=>oJe,isJSDocUnknownType:()=>aTe,isJSDocVariadicType:()=>JG,isJSXTagName:()=>M6,isJsonEqual:()=>vG,isJsonSourceFile:()=>Dm,isJsxAttribute:()=>qv,isJsxAttributeLike:()=>j$,isJsxAttributeName:()=>Uke,isJsxAttributes:()=>ZT,isJsxChild:()=>JB,isJsxClosingElement:()=>QT,isJsxClosingFragment:()=>iTe,isJsxElement:()=>tb,isJsxExpression:()=>b7,isJsxFragment:()=>XT,isJsxNamespacedName:()=>J0,isJsxOpeningElement:()=>Uv,isJsxOpeningFragment:()=>yI,isJsxOpeningLikeElement:()=>eh,isJsxOpeningLikeElementTagName:()=>CNe,isJsxSelfClosingElement:()=>vI,isJsxSpreadAttribute:()=>PP,isJsxTagNameExpression:()=>f8,isJsxText:()=>yP,isJumpStatementTarget:()=>aH,isKeyword:()=>d_,isKeywordOrPunctuation:()=>DJ,isKnownSymbol:()=>PW,isLabelName:()=>Bue,isLabelOfLabeledStatement:()=>Fue,isLabeledStatement:()=>ix,isLateVisibilityPaintedStatement:()=>nJ,isLeftHandSideExpression:()=>M_,isLeftHandSideOfAssignment:()=>b$e,isLet:()=>oJ,isLineBreak:()=>_h,isLiteralComputedPropertyDeclarationName:()=>EW,isLiteralExpression:()=>wT,isLiteralExpressionOfObject:()=>pse,isLiteralImportTypeNode:()=>rS,isLiteralKind:()=>a8,isLiteralLikeAccess:()=>wJ,isLiteralLikeElementAccess:()=>mW,isLiteralNameOfPropertyDeclarationOrIndexAccess:()=>OQ,isLiteralTypeLikeExpression:()=>hJe,isLiteralTypeLiteral:()=>hwe,isLiteralTypeNode:()=>gS,isLocalName:()=>Xb,isLogicalOperator:()=>Kxe,isLogicalOrCoalescingAssignmentExpression:()=>Noe,isLogicalOrCoalescingAssignmentOperator:()=>F8,isLogicalOrCoalescingBinaryExpression:()=>WW,isLogicalOrCoalescingBinaryOperator:()=>BW,isMappedTypeNode:()=>pI,isMemberName:()=>Uy,isMetaProperty:()=>p7,isMethodDeclaration:()=>Au,isMethodOrAccessor:()=>WL,isMethodSignature:()=>Hv,isMinusToken:()=>Eae,isMissingDeclaration:()=>tJe,isMissingPackageJsonInfo:()=>vDe,isModifier:()=>Ra,isModifierKind:()=>eS,isModifierLike:()=>zc,isModuleAugmentationExternal:()=>Bse,isModuleBlock:()=>jv,isModuleBody:()=>gwe,isModuleDeclaration:()=>qu,isModuleExportsAccessExpression:()=>Jy,isModuleIdentifier:()=>eoe,isModuleName:()=>DTe,isModuleOrEnumDeclaration:()=>qB,isModuleReference:()=>Cwe,isModuleSpecifierLike:()=>QQ,isModuleWithStringLiteralName:()=>iJ,isNameOfFunctionDeclaration:()=>jue,isNameOfModuleDeclaration:()=>Hue,isNamedClassElement:()=>Fqe,isNamedDeclaration:()=>Af,isNamedEvaluation:()=>Tp,isNamedEvaluationSource:()=>hoe,isNamedExportBindings:()=>hse,isNamedExports:()=>Yg,isNamedImportBindings:()=>xse,isNamedImports:()=>zv,isNamedImportsOrExports:()=>KJ,isNamedTupleMember:()=>r3,isNamespaceBody:()=>Hqe,isNamespaceExport:()=>H1,isNamespaceExportDeclaration:()=>_V,isNamespaceImport:()=>eb,isNamespaceReexportDeclaration:()=>hxe,isNewExpression:()=>GT,isNewExpressionTarget:()=>iF,isNoSubstitutionTemplateLiteral:()=>bP,isNode:()=>Mqe,isNodeArray:()=>ST,isNodeArrayMultiLine:()=>rke,isNodeDescendantOf:()=>OT,isNodeKind:()=>FB,isNodeLikeSystem:()=>bre,isNodeModulesDirectory:()=>S$,isNodeWithPossibleHoistedDeclaration:()=>Sxe,isNonContextualKeyword:()=>doe,isNonExportDefaultModifier:()=>pJe,isNonGlobalAmbientModule:()=>Fse,isNonGlobalDeclaration:()=>fLe,isNonNullAccess:()=>zke,isNonNullChain:()=>R$,isNonNullExpression:()=>NP,isNonStaticMethodOrAccessorWithPrivateName:()=>eEe,isNotEmittedOrPartiallyEmittedNode:()=>Vqe,isNotEmittedStatement:()=>Rae,isNullishCoalesce:()=>fse,isNumber:()=>Aw,isNumericLiteral:()=>W_,isNumericLiteralName:()=>Yy,isObjectBindingElementWithoutPropertyName:()=>mH,isObjectBindingOrAssignmentElement:()=>HB,isObjectBindingOrAssignmentPattern:()=>yse,isObjectBindingPattern:()=>pg,isObjectLiteralElement:()=>kse,isObjectLiteralElementLike:()=>Fb,isObjectLiteralExpression:()=>Pa,isObjectLiteralMethod:()=>f0,isObjectLiteralOrClassExpressionMethodOrAccessor:()=>uJ,isObjectTypeDeclaration:()=>sP,isOctalDigit:()=>T$,isOmittedExpression:()=>zd,isOptionalChain:()=>ph,isOptionalChainRoot:()=>n8,isOptionalDeclaration:()=>t3,isOptionalJSDocPropertyLikeTag:()=>YW,isOptionalTypeNode:()=>WG,isOuterExpression:()=>eK,isOutermostOptionalChain:()=>r8,isOverrideModifier:()=>J2e,isPackageJsonInfo:()=>kK,isPackedArrayLiteral:()=>uae,isParameter:()=>Gs,isParameterPropertyDeclaration:()=>xp,isParameterPropertyModifier:()=>c8,isParenthesizedExpression:()=>g_,isParenthesizedTypeNode:()=>_I,isParseTreeNode:()=>i8,isPartOfParameterDeclaration:()=>Fk,isPartOfTypeNode:()=>Lv,isPartOfTypeQuery:()=>vJ,isPartiallyEmittedExpression:()=>UG,isPatternMatch:()=>c$,isPinnedComment:()=>eJ,isPlainJsFile:()=>p8,isPlusToken:()=>Dae,isPossiblyTypeArgumentPosition:()=>fH,isPostfixUnaryExpression:()=>Pae,isPrefixUnaryExpression:()=>tx,isPrimitiveLiteralValue:()=>TG,isPrivateIdentifier:()=>Vs,isPrivateIdentifierClassElementDeclaration:()=>Fh,isPrivateIdentifierPropertyAccessExpression:()=>S6,isPrivateIdentifierSymbol:()=>Dxe,isProgramBundleEmitBuildInfo:()=>uIe,isProgramUptoDate:()=>Wce,isPrologueDirective:()=>Nv,isPropertyAccessChain:()=>O$,isPropertyAccessEntityNameExpression:()=>HW,isPropertyAccessExpression:()=>Ir,isPropertyAccessOrQualifiedName:()=>zB,isPropertyAccessOrQualifiedNameOrImportTypeNode:()=>dwe,isPropertyAssignment:()=>pd,isPropertyDeclaration:()=>To,isPropertyName:()=>od,isPropertyNameLiteral:()=>Av,isPropertySignature:()=>V_,isProtoSetter:()=>Exe,isPrototypeAccess:()=>$w,isPrototypePropertyAssignment:()=>bW,isPunctuation:()=>uoe,isPushOrUnshiftIdentifier:()=>_oe,isQualifiedName:()=>__,isQuestionDotToken:()=>FG,isQuestionOrExclamationToken:()=>wTe,isQuestionOrPlusOrMinusToken:()=>TTe,isQuestionToken:()=>Zw,isRawSourceMap:()=>GDe,isReadonlyKeyword:()=>q2e,isReadonlyKeywordOrPlusOrMinusToken:()=>kTe,isRecognizedTripleSlashComment:()=>Pse,isReferenceFileLocation:()=>D3,isReferencedFile:()=>t2,isRegularExpressionLiteral:()=>kae,isRequireCall:()=>B_,isRequireVariableStatement:()=>hW,isRestParameter:()=>O1,isRestTypeNode:()=>VG,isReturnStatement:()=>Om,isReturnStatementWithFixablePromiseHandler:()=>CX,isRightSideOfAccessExpression:()=>Aoe,isRightSideOfInstanceofExpression:()=>Xxe,isRightSideOfPropertyAccess:()=>P3,isRightSideOfQualifiedName:()=>wNe,isRightSideOfQualifiedNameOrPropertyAccess:()=>B8,isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName:()=>Qxe,isRootedDiskPath:()=>Sp,isSameEntityName:()=>R6,isSatisfiesExpression:()=>zG,isScopeMarker:()=>_we,isSemicolonClassElement:()=>Z2e,isSetAccessor:()=>Ev,isSetAccessorDeclaration:()=>Np,isShebangTrivia:()=>ese,isShiftOperatorOrHigher:()=>ile,isShorthandAmbientModuleSymbol:()=>XB,isShorthandPropertyAssignment:()=>ih,isSignedNumericLiteral:()=>IJ,isSimpleCopiableExpression:()=>iD,isSimpleInlineableExpression:()=>z1,isSimpleParameter:()=>sEe,isSimpleParameterList:()=>VV,isSingleOrDoubleQuote:()=>_W,isSourceFile:()=>Ns,isSourceFileFromLibrary:()=>H3,isSourceFileJS:()=>F_,isSourceFileNotJS:()=>Yqe,isSourceFileNotJson:()=>bJ,isSourceMapping:()=>QDe,isSpecialPropertyDeclaration:()=>gxe,isSpreadAssignment:()=>ib,isSpreadElement:()=>Zg,isStatement:()=>Es,isStatementButNotDeclaration:()=>$B,isStatementOrBlock:()=>bwe,isStatementWithLocals:()=>Lwe,isStatic:()=>da,isStaticModifier:()=>wP,isString:()=>mo,isStringAKeyword:()=>l$e,isStringANonContextualKeyword:()=>YL,isStringAndEmptyAnonymousObjectIntersection:()=>RNe,isStringDoubleQuoted:()=>SJ,isStringLiteral:()=>ja,isStringLiteralLike:()=>Ml,isStringLiteralOrJsxExpression:()=>Swe,isStringLiteralOrTemplate:()=>nLe,isStringOrNumericLiteralLike:()=>ug,isStringOrRegularExpressionOrTemplateLiteral:()=>Que,isStringTextContainingNode:()=>gse,isSuperCall:()=>rI,isSuperKeyword:()=>f7,isSuperOrSuperProperty:()=>Zqe,isSuperProperty:()=>R_,isSupportedSourceFileName:()=>Lke,isSwitchStatement:()=>v7,isSyntaxList:()=>d3,isSyntheticExpression:()=>G$e,isSyntheticReference:()=>LP,isTagName:()=>Wue,isTaggedTemplateExpression:()=>KT,isTaggedTemplateTag:()=>yNe,isTemplateExpression:()=>HG,isTemplateHead:()=>CP,isTemplateLiteral:()=>VL,isTemplateLiteralKind:()=>Ww,isTemplateLiteralToken:()=>swe,isTemplateLiteralTypeNode:()=>Q2e,isTemplateLiteralTypeSpan:()=>Nae,isTemplateMiddle:()=>Tae,isTemplateMiddleOrTemplateTail:()=>F$,isTemplateSpan:()=>m7,isTemplateTail:()=>MG,isTextWhiteSpaceLike:()=>jNe,isThis:()=>A3,isThisContainerOrFunctionBlock:()=>uxe,isThisIdentifier:()=>Uw,isThisInTypeQuery:()=>BT,isThisInitializedDeclaration:()=>pJ,isThisInitializedObjectBindingExpression:()=>fxe,isThisProperty:()=>aW,isThisTypeNode:()=>s3,isThisTypeParameter:()=>r7,isThisTypePredicate:()=>oxe,isThrowStatement:()=>Mae,isToken:()=>RL,isTokenKind:()=>_se,isTraceEnabled:()=>Zb,isTransientSymbol:()=>M1,isTrivia:()=>j6,isTryStatement:()=>gI,isTupleTypeNode:()=>TP,isTypeAlias:()=>wW,isTypeAliasDeclaration:()=>Mm,isTypeAssertionExpression:()=>Lae,isTypeDeclaration:()=>fP,isTypeElement:()=>xT,isTypeKeyword:()=>sF,isTypeKeywordToken:()=>nde,isTypeKeywordTokenOrIdentifier:()=>JQ,isTypeLiteralNode:()=>p_,isTypeNode:()=>gs,isTypeNodeKind:()=>joe,isTypeOfExpression:()=>o3,isTypeOnlyExportDeclaration:()=>owe,isTypeOnlyImportDeclaration:()=>l8,isTypeOnlyImportOrExportDeclaration:()=>Dk,isTypeOperatorNode:()=>Hk,isTypeParameterDeclaration:()=>Uc,isTypePredicateNode:()=>kP,isTypeQueryNode:()=>qT,isTypeReferenceNode:()=>_g,isTypeReferenceType:()=>$$,isTypeUsableAsPropertyName:()=>Pm,isUMDExportSymbol:()=>GJ,isUnaryExpression:()=>Sse,isUnaryExpressionWithWrite:()=>fwe,isUnicodeIdentifierStart:()=>x$,isUnionTypeNode:()=>Yw,isUrl:()=>xSe,isValidBigIntString:()=>yG,isValidESSymbolDeclaration:()=>nxe,isValidTypeOnlyAliasUseSite:()=>Wk,isValueSignatureDeclaration:()=>ZL,isVarAwaitUsing:()=>iW,isVarConst:()=>L6,isVarConstLike:()=>Qwe,isVarUsing:()=>nW,isVariableDeclaration:()=>ds,isVariableDeclarationInVariableStatement:()=>v8,isVariableDeclarationInitializedToBareOrAccessedRequire:()=>LT,isVariableDeclarationInitializedToRequire:()=>fW,isVariableDeclarationList:()=>wf,isVariableLike:()=>qL,isVariableLikeOrAccessor:()=>txe,isVariableStatement:()=>Ou,isVoidExpression:()=>EP,isWatchSet:()=>Woe,isWhileStatement:()=>Oae,isWhiteSpaceLike:()=>Vy,isWhiteSpaceSingleLine:()=>Tv,isWithStatement:()=>Y2e,isWriteAccess:()=>rP,isWriteOnlyAccess:()=>JJ,isYieldExpression:()=>jG,jsxModeNeedsExplicitImport:()=>Mde,keywordPart:()=>Ap,last:()=>La,lastOrUndefined:()=>Ql,length:()=>O,libMap:()=>dle,libs:()=>lK,lineBreakPart:()=>B3,linkNamePart:()=>KNe,linkPart:()=>vde,linkTextPart:()=>YQ,listFiles:()=>iue,loadModuleFromGlobalCache:()=>NDe,loadWithModeAwareCache:()=>KV,makeIdentifierFromModuleName:()=>Fwe,makeImport:()=>ux,makeStringLiteral:()=>oF,mangleScopedPackageName:()=>C3,map:()=>Yt,mapAllOrFail:()=>Wc,mapDefined:()=>ns,mapDefinedEntries:()=>yp,mapDefinedIterator:()=>fh,mapEntries:()=>Lw,mapIterator:()=>na,mapOneOrMany:()=>Pde,mapToDisplayParts:()=>dx,matchFiles:()=>eae,matchPatternOrExact:()=>rae,matchedText:()=>sCe,matchesExclude:()=>CK,maybeBind:()=>la,maybeSetLocalizedDiagnosticMessages:()=>hke,memoize:()=>l_,memoizeCached:()=>VUe,memoizeOne:()=>I1,memoizeWeak:()=>WUe,metadataHelper:()=>p2e,min:()=>hre,minAndMax:()=>Oke,missingFileModifiedTime:()=>Cp,modifierToFlag:()=>iP,modifiersToFlags:()=>Rv,moduleOptionDeclaration:()=>BTe,moduleResolutionIsEqualTo:()=>Iwe,moduleResolutionNameAndModeGetter:()=>Oce,moduleResolutionOptionDeclarations:()=>hle,moduleResolutionSupportsPackageJsonExportsAndImports:()=>uP,moduleResolutionUsesNodeModules:()=>GQ,moduleSpecifierToValidIdentifier:()=>TH,moduleSpecifiers:()=>e2,moduleSymbolToValidIdentifier:()=>hF,moveEmitHelpers:()=>o2e,moveRangeEnd:()=>qJ,moveRangePastDecorators:()=>zb,moveRangePastModifiers:()=>Fv,moveRangePos:()=>Bk,moveSyntheticComments:()=>n2e,mutateMap:()=>U8,mutateMapSkippingNewValues:()=>Ky,needsParentheses:()=>tX,needsScopeMarker:()=>V$,newCaseClauseTracker:()=>mX,newPrivateEnvironment:()=>nEe,noEmitNotification:()=>jV,noEmitSubstitution:()=>$7,noTransformers:()=>BEe,noTruncationMaximumTruncationLength:()=>Ese,nodeCanBeDecorated:()=>cW,nodeHasName:()=>PB,nodeIsDecorated:()=>O6,nodeIsMissing:()=>vu,nodeIsPresent:()=>Tm,nodeIsSynthesized:()=>oc,nodeModuleNameResolver:()=>wDe,nodeModulesPathPart:()=>nb,nodeNextJsonConfigResolver:()=>xDe,nodeOrChildIsDecorated:()=>uW,nodeOverlapsWithStartEnd:()=>MQ,nodePosToString:()=>qqe,nodeSeenTracker:()=>M3,nodeStartsNewLexicalEnvironment:()=>poe,nodeToDisplayParts:()=>KXe,noop:()=>dl,noopFileWatcher:()=>Z7,normalizePath:()=>ra,normalizeSlashes:()=>Lf,not:()=>d$,notImplemented:()=>pa,notImplementedResolver:()=>jEe,nullNodeConverters:()=>Yke,nullParenthesizerRules:()=>Xke,nullTransformationContext:()=>UV,objectAllocator:()=>Mf,operatorPart:()=>lF,optionDeclarations:()=>K0,optionMapToObject:()=>pK,optionsAffectingProgramStructure:()=>zTe,optionsForBuild:()=>ple,optionsForWatch:()=>BP,optionsHaveChanges:()=>D6,optionsHaveModuleResolutionChanges:()=>Twe,or:()=>lg,orderedRemoveItem:()=>FR,orderedRemoveItemAt:()=>Mw,packageIdToPackageName:()=>X$,packageIdToString:()=>jw,paramHelper:()=>g2e,parameterIsThisKeyword:()=>FT,parameterNamePart:()=>qNe,parseBaseNodeFactory:()=>ATe,parseBigInt:()=>Mke,parseBuildCommand:()=>YTe,parseCommandLine:()=>XTe,parseCommandLineWorker:()=>mle,parseConfigFileTextToJson:()=>yle,parseConfigFileWithSystem:()=>xIe,parseConfigHostFromCompilerHostLike:()=>oQ,parseCustomTypeOption:()=>fK,parseIsolatedEntityName:()=>FP,parseIsolatedJSDocComment:()=>MTe,parseJSDocTypeExpressionForTests:()=>RJe,parseJsonConfigFileContent:()=>dGe,parseJsonSourceFileConfigFileContent:()=>LV,parseJsonText:()=>kV,parseListTypeOption:()=>KTe,parseNodeFactory:()=>Gk,parseNodeModuleFromPath:()=>OV,parsePackageName:()=>IK,parsePseudoBigInt:()=>e7,parseValidBigInt:()=>lae,pasteEdits:()=>Mhe,patchWriteFileEnsuringDirectory:()=>wSe,pathContainsNodeModules:()=>Zk,pathIsAbsolute:()=>JR,pathIsBareSpecifier:()=>$re,pathIsRelative:()=>cg,patternText:()=>rCe,perfLogger:()=>c_,performIncrementalCompilation:()=>TIe,performance:()=>hCe,plainJSErrors:()=>Vce,positionBelongsToNode:()=>Uue,positionIsASICandidate:()=>sX,positionIsSynthesized:()=>q0,positionsAreOnSameLine:()=>Kg,preProcessFile:()=>mZe,probablyUsesSemicolons:()=>wH,processCommentPragmas:()=>cle,processPragmasIntoFields:()=>ule,processTaggedTemplateExpression:()=>uce,programContainsEsModules:()=>VNe,programContainsModules:()=>WNe,projectReferenceIsEqualTo:()=>Ise,propKeyHelper:()=>I2e,propertyNamePart:()=>$Ne,pseudoBigIntToString:()=>jT,punctuationPart:()=>bh,pushIfUnique:()=>Cc,quote:()=>dF,quotePreferenceFromString:()=>ade,rangeContainsPosition:()=>lH,rangeContainsPositionExclusive:()=>cH,rangeContainsRange:()=>yg,rangeContainsRangeExclusive:()=>kNe,rangeContainsStartEnd:()=>uH,rangeEndIsOnSameLineAsRangeStart:()=>zW,rangeEndPositionsAreOnSameLine:()=>ike,rangeEquals:()=>mk,rangeIsOnSingleLine:()=>dI,rangeOfNode:()=>oae,rangeOfTypeParameters:()=>aae,rangeOverlapsWithStartEnd:()=>nF,rangeStartIsOnSameLineAsRangeEnd:()=>nke,rangeStartPositionsAreOnSameLine:()=>$J,readBuilderProgram:()=>gQ,readConfigFile:()=>IV,readHelper:()=>D2e,readJson:()=>V8,readJsonConfigFile:()=>eDe,readJsonOrUndefined:()=>Moe,reduceEachLeadingCommentRange:()=>PSe,reduceEachTrailingCommentRange:()=>ASe,reduceLeft:()=>nd,reduceLeftIterator:()=>he,reducePathComponents:()=>GE,refactor:()=>ZP,regExpEscape:()=>L$e,regularExpressionFlagToCharacter:()=>gqe,relativeComplement:()=>ul,removeAllComments:()=>rV,removeEmitHelper:()=>$$e,removeExtension:()=>QW,removeFileExtension:()=>h_,removeIgnoredPath:()=>lQ,removeMinAndVersionNumbers:()=>pre,removeOptionality:()=>PNe,removePrefix:()=>BR,removeSuffix:()=>h6,removeTrailingDirectorySeparator:()=>Sk,repeatString:()=>pH,replaceElement:()=>IL,replaceFirstStar:()=>pP,resolutionExtensionIsTSOrJson:()=>Q8,resolveConfigFileProjectName:()=>gue,resolveJSModule:()=>bDe,resolveLibrary:()=>DK,resolveModuleName:()=>HP,resolveModuleNameFromCache:()=>WGe,resolvePackageNameToPackageJson:()=>Lle,resolvePath:()=>Ck,resolveProjectReferencePath:()=>E3,resolveTripleslashReference:()=>Tce,resolveTypeReferenceDirective:()=>gDe,resolvingEmptyArray:()=>Dse,restHelper:()=>w2e,returnFalse:()=>kv,returnNoopFileWatcher:()=>Y7,returnTrue:()=>vk,returnUndefined:()=>yT,returnsPromise:()=>Qde,runInitializersHelper:()=>v2e,sameFlatMap:()=>s_,sameMap:()=>Is,sameMapping:()=>IKe,scanShebangTrivia:()=>tse,scanTokenAtPosition:()=>Kwe,scanner:()=>jh,screenStartingMessageCodes:()=>Zce,semanticDiagnosticsOptionDeclarations:()=>VTe,serializeCompilerOptions:()=>gK,server:()=>mct,servicesVersion:()=>_et,setCommentRange:()=>Sd,setConfigFileInOptions:()=>kle,setConstantValue:()=>s2e,setEachParent:()=>F$e,setEmitFlags:()=>ir,setFunctionNameHelper:()=>N2e,setGetSourceFileAsHashVersioned:()=>pQ,setIdentifierAutoGenerate:()=>aV,setIdentifierGeneratedImportReference:()=>c2e,setIdentifierTypeArguments:()=>pS,setInternalEmitFlags:()=>sV,setLocalizedDiagnosticMessages:()=>fke,setModuleDefaultHelper:()=>A2e,setNodeChildren:()=>uTe,setNodeFlags:()=>Bke,setObjectAllocator:()=>dke,setOriginalNode:()=>Er,setParent:()=>ml,setParentRecursive:()=>$b,setPrivateIdentifier:()=>kI,setSnippetElement:()=>Cae,setSourceMapRange:()=>$a,setStackTraceLimit:()=>tqe,setStartsOnNewLine:()=>IG,setSyntheticLeadingComments:()=>Vk,setSyntheticTrailingComments:()=>mP,setSys:()=>aqe,setSysLog:()=>bSe,setTextRange:()=>zt,setTextRangeEnd:()=>e3,setTextRangePos:()=>t7,setTextRangePosEnd:()=>Bv,setTextRangePosWidth:()=>cae,setTokenSourceMapRange:()=>i2e,setTypeNode:()=>a2e,setUILocale:()=>tCe,setValueDeclaration:()=>CW,shouldAllowImportingTsExtension:()=>S3,shouldPreserveConstEnums:()=>HT,shouldUseUriStyleNodeCoreModules:()=>pX,showModuleSpecifier:()=>lke,signatureHasLiteralTypes:()=>Qle,signatureHasRestParameter:()=>vh,signatureToDisplayParts:()=>yde,single:()=>zE,singleElementArray:()=>PL,singleIterator:()=>My,singleOrMany:()=>ag,singleOrUndefined:()=>a_,skipAlias:()=>Of,skipAssertions:()=>uJe,skipConstraint:()=>rde,skipOuterExpressions:()=>ld,skipParentheses:()=>Il,skipPartiallyEmittedExpressions:()=>u0,skipTrivia:()=>qa,skipTypeChecking:()=>Y8,skipTypeParentheses:()=>T8,skipWhile:()=>aCe,sliceAfter:()=>sae,some:()=>Rt,sort:()=>tc,sortAndDeduplicate:()=>fr,sortAndDeduplicateDiagnostics:()=>v6,sourceFileAffectingCompilerOptions:()=>_le,sourceFileMayBeEmitted:()=>cI,sourceMapCommentRegExp:()=>Zle,sourceMapCommentRegExpDontCareLineStart:()=>$De,spacePart:()=>ku,spanMap:()=>F0,spreadArrayHelper:()=>E2e,stableSort:()=>$p,startEndContainsRange:()=>zue,startEndOverlapsWithStartEnd:()=>RQ,startOnNewLine:()=>mh,startTracing:()=>mCe,startsWith:()=>ro,startsWithDirectory:()=>Kre,startsWithUnderscore:()=>Ode,startsWithUseStrict:()=>mTe,stringContainsAt:()=>dLe,stringToToken:()=>bT,stripQuotes:()=>Nm,supportedDeclarationExtensions:()=>hG,supportedJSExtensions:()=>Dke,supportedJSExtensionsFlat:()=>Z6,supportedLocaleDirectories:()=>USe,supportedTSExtensions:()=>G8,supportedTSExtensionsFlat:()=>tae,supportedTSImplementationExtensions:()=>_G,suppressLeadingAndTrailingTrivia:()=>Op,suppressLeadingTrivia:()=>wde,suppressTrailingTrivia:()=>eLe,symbolEscapedNameNoDefault:()=>KQ,symbolName:()=>xu,symbolNameNoDefault:()=>cde,symbolPart:()=>UNe,symbolToDisplayParts:()=>cF,syntaxMayBeASICandidate:()=>sLe,syntaxRequiresTrailingSemicolonOrASI:()=>rX,sys:()=>Wd,sysLog:()=>bB,tagNamesAreEquivalent:()=>Qk,takeWhile:()=>yre,targetOptionDeclaration:()=>fle,templateObjectHelper:()=>T2e,testFormatSettings:()=>VXe,textChangeRangeIsUnchanged:()=>WSe,textChangeRangeNewSpan:()=>t8,textChanges:()=>er,textOrKeywordPart:()=>mde,textPart:()=>Cg,textRangeContainsPositionInclusive:()=>IB,textSpanContainsPosition:()=>nse,textSpanContainsTextSpan:()=>MSe,textSpanEnd:()=>zu,textSpanIntersection:()=>BSe,textSpanIntersectsWith:()=>E$,textSpanIntersectsWithPosition:()=>FSe,textSpanIntersectsWithTextSpan:()=>wqe,textSpanIsEmpty:()=>OSe,textSpanOverlap:()=>RSe,textSpanOverlapsWith:()=>Sqe,textSpansEqual:()=>F3,textToKeywordObj:()=>w$,timestamp:()=>Vc,toArray:()=>NL,toBuilderFileEmit:()=>_Ie,toBuilderStateFileInfoForMultiEmit:()=>hIe,toEditorSettings:()=>OH,toFileNameLowerCase:()=>Ow,toLowerCase:()=>Qbe,toPath:()=>_c,toProgramEmitPending:()=>pIe,tokenIsIdentifierOrKeyword:()=>Rh,tokenIsIdentifierOrKeywordOrGreaterThan:()=>DSe,tokenToString:()=>Ta,trace:()=>lo,tracing:()=>sr,tracingEnabled:()=>vB,transferSourceFileChildren:()=>dTe,transform:()=>ket,transformClassFields:()=>gEe,transformDeclarations:()=>_ce,transformECMAScriptModule:()=>hce,transformES2015:()=>NEe,transformES2016:()=>IEe,transformES2017:()=>bEe,transformES2018:()=>CEe,transformES2019:()=>SEe,transformES2020:()=>wEe,transformES2021:()=>xEe,transformESDecorators:()=>yEe,transformESNext:()=>kEe,transformGenerators:()=>LEe,transformJsx:()=>EEe,transformLegacyDecorators:()=>vEe,transformModule:()=>fce,transformNamedEvaluation:()=>Pp,transformNodeModule:()=>AEe,transformNodes:()=>zV,transformSystemModule:()=>PEe,transformTypeScript:()=>pEe,transpile:()=>TZe,transpileDeclaration:()=>xZe,transpileModule:()=>ALe,transpileOptionValueCompilerOptions:()=>UTe,tryAddToSet:()=>o_,tryAndIgnoreErrors:()=>lX,tryCast:()=>$r,tryDirectoryExists:()=>aX,tryExtractTSExtension:()=>zJ,tryFileExists:()=>xH,tryGetClassExtendingExpressionWithTypeArguments:()=>Loe,tryGetClassImplementingOrExtendingExpressionWithTypeArguments:()=>Poe,tryGetDirectories:()=>oX,tryGetExtensionFromPath:()=>qb,tryGetImportFromModuleSpecifier:()=>SW,tryGetJSDocSatisfiesTypeNode:()=>xG,tryGetModuleNameFromFile:()=>yV,tryGetModuleSpecifierFromDeclaration:()=>x8,tryGetNativePerformanceHooks:()=>fCe,tryGetPropertyAccessOrIdentifierToString:()=>jW,tryGetPropertyNameOfBindingOrAssignmentElement:()=>nK,tryGetSourceMappingURL:()=>JDe,tryGetTextOfPropertyName:()=>m8,tryIOAndConsumeErrors:()=>cX,tryParseJson:()=>UJ,tryParsePattern:()=>Y6,tryParsePatterns:()=>gG,tryParseRawSourceMap:()=>KDe,tryReadDirectory:()=>Dde,tryReadFile:()=>I7,tryRemoveDirectoryPrefix:()=>Zoe,tryRemoveExtension:()=>Ake,tryRemovePrefix:()=>vre,tryRemoveSuffix:()=>nCe,typeAcquisitionDeclarations:()=>uK,typeAliasNamePart:()=>JNe,typeDirectiveIsEqualTo:()=>Nwe,typeKeywords:()=>ide,typeParameterNamePart:()=>GNe,typeToDisplayParts:()=>yH,unchangedPollThresholds:()=>v$,unchangedTextChangeRange:()=>I$,unescapeLeadingUnderscores:()=>Ws,unmangleScopedPackageName:()=>RV,unorderedRemoveItem:()=>LL,unorderedRemoveItemAt:()=>gre,unreachableCodeIsError:()=>gke,unsetNodeChildren:()=>$ae,unusedLabelIsError:()=>mke,unwrapInnermostStatementOfLabel:()=>Kse,unwrapParenthesizedExpression:()=>Jke,updateErrorForNoInputFiles:()=>bK,updateLanguageServiceSourceFile:()=>wfe,updateMissingFilePathsWatch:()=>wce,updateResolutionField:()=>m3,updateSharedExtendedConfigFileWatcher:()=>ZK,updateSourceFile:()=>ole,updateWatchingWildcardDirectories:()=>qV,usesExtensionsOnImports:()=>Ike,usingSingleLineStringWriter:()=>_8,utf16EncodeAsString:()=>e8,validateLocaleAndSetLanguage:()=>sse,valuesHelper:()=>L2e,version:()=>y,versionMajorMinor:()=>g,visitArray:()=>BV,visitCommaListElements:()=>RK,visitEachChild:()=>cn,visitFunctionBody:()=>vg,visitIterationBody:()=>v_,visitLexicalEnvironment:()=>Xle,visitNode:()=>Ct,visitNodes:()=>wn,visitParameterList:()=>Su,walkUpBindingElementsAndPatterns:()=>y6,walkUpLexicalEnvironments:()=>iEe,walkUpOuterExpressions:()=>vTe,walkUpParenthesizedExpressions:()=>Vb,walkUpParenthesizedTypes:()=>DW,walkUpParenthesizedTypesAndGetParentAndChild:()=>wxe,whitespaceOrMapCommentRegExp:()=>Yle,writeCommentRange:()=>G6,writeFile:()=>FW,writeFileEnsuringDirectories:()=>koe,zipWith:()=>we}),n.exports=d(f);var g="5.5",y="5.5.4",w=(t=>(t[t.LessThan=-1]="LessThan",t[t.EqualTo=0]="EqualTo",t[t.GreaterThan=1]="GreaterThan",t))(w||{}),x=[],I=new Map,P=new Set;function O(t){return t?t.length:0}function W(t,r){if(t)for(let a=0;a=0;a--){const u=r(t[a],a);if(u)return u}}function Z(t,r){if(t!==void 0)for(let a=0;a=0;u--){const h=t[u];if(r(h,u))return h}}function Nt(t,r,a){if(t===void 0)return-1;for(let u=a??0;u=0;u--)if(r(t[u],u))return u;return-1}function ci(t,r){for(let a=0;aa(u,r[h]))}function gn(t,r,a){for(let u=a||0;u{const p=r(h,u);if(p!==void 0){const[m,C]=p;m!==void 0&&C!==void 0&&a.set(m,C)}}),a}function ka(t,r,a){if(t.has(r))return t.get(r);const u=a();return t.set(r,u),u}function o_(t,r){return t.has(r)?!1:(t.add(r),!0)}function*My(t){yield t}function F0(t,r,a){let u;if(t){u=[];const h=t.length;let p,m,C=0,b=0;for(;C{const[p,m]=r(h,u);a.set(p,m)}),a}function Rt(t,r){if(t)if(r){for(const a of t)if(r(a))return!0}else return t.length>0;return!1}function Ry(t,r,a){let u;for(let h=0;ht[m])}function Nn(t,r){const a=[];for(const u of t)Cc(a,u,r);return a}function jt(t,r,a){return t.length===0?[]:t.length===1?t.slice():a?Mn(t,r,a):Nn(t,r)}function ti(t,r){if(t.length===0)return x;let a=t[0];const u=[a];for(let h=1;h0&&u(r,t[m-1]))return!1;if(m0&&z.assertGreaterThanOrEqual(a(r[p],r[p-1]),0);t:for(const m=h;hm&&z.assertGreaterThanOrEqual(a(t[h],t[h-1]),0),a(r[p],t[h])){case-1:u.push(r[p]);continue e;case 0:continue e;case 1:continue t}}return u}function xi(t,r){return r===void 0?t:t===void 0?[r]:(t.push(r),t)}function au(t,r){return t===void 0?r:r===void 0?t:Lo(t)?Lo(r)?no(t,r):xi(t,r):Lo(r)?xi(r,t):[t,r]}function Wu(t,r){return r<0?t.length+r:r}function un(t,r,a,u){if(r===void 0||r.length===0)return t;if(t===void 0)return r.slice(a,u);a=a===void 0?0:Wu(r,a),u=u===void 0?r.length:Wu(r,u);for(let h=a;ha(t[u],t[h])||hc(u,h))}function tc(t,r){return t.length===0?t:t.slice().sort(r)}function*Mh(t){for(let r=t.length-1;r>=0;r--)yield t[r]}function $p(t,r){const a=mr(t);return Pb(t,a,r),a.map(u=>t[u])}function mk(t,r,a,u){for(;at==null?void 0:t.at(r):(t,r)=>{if(t&&(r=Wu(t,r),r>1),b=a(t[C],C);switch(u(b,r)){case-1:p=C+1;break;case 0:return C;case 1:m=C-1;break}}return~p}function nd(t,r,a,u,h){if(t&&t.length>0){const p=t.length;if(p>0){let m=u===void 0||u<0?0:u;const C=h===void 0||m+h>p-1?p-1:m+h;let b;for(arguments.length<=2?(b=t[m],m++):b=a;m<=C;)b=r(b,t[m],m),m++;return b}}return a}var Ab=Object.prototype.hasOwnProperty;function Vl(t,r){return Ab.call(t,r)}function u6(t,r){return Ab.call(t,r)?t[r]:void 0}function wm(t){const r=[];for(const a in t)Ab.call(t,a)&&r.push(a);return r}function ure(t){const r=[];do{const a=Object.getOwnPropertyNames(t);for(const u of a)Cc(r,u)}while(t=Object.getPrototypeOf(t));return r}function Za(t){const r=[];for(const a in t)Ab.call(t,a)&&r.push(t[a]);return r}function Pn(t,r){const a=new Array(t);for(let u=0;u100&&a>r.length>>1){const C=r.length-a;r.copyWithin(0,a),r.length=C,a=0}return m}return{enqueue:h,dequeue:p,isEmpty:u}}function fre(t,r){const a=new Map;let u=0;function*h(){for(const m of a.values())Lo(m)?yield*m:yield m}const p={has(m){const C=t(m);if(!a.has(C))return!1;const b=a.get(C);if(!Lo(b))return r(b,m);for(const T of b)if(r(T,m))return!0;return!1},add(m){const C=t(m);if(a.has(C)){const b=a.get(C);if(Lo(b))Mt(b,m,r)||(b.push(m),u++);else{const T=b;r(T,m)||(a.set(C,[T,m]),u++)}}else a.set(C,m),u++;return this},delete(m){const C=t(m);if(!a.has(C))return!1;const b=a.get(C);if(Lo(b)){for(let T=0;Th(),[Symbol.toStringTag]:a[Symbol.toStringTag]};return p}function Lo(t){return Array.isArray(t)}function NL(t){return Lo(t)?t:[t]}function mo(t){return typeof t=="string"}function Aw(t){return typeof t=="number"}function $r(t,r){return t!==void 0&&r(t)?t:void 0}function ua(t,r){return t!==void 0&&r(t)?t:z.fail(`Invalid cast. The supplied value ${t} did not pass the test '${z.getFunctionName(r)}'.`)}function dl(t){}function kv(){return!1}function vk(){return!0}function yT(){}function fc(t){return t}function Qbe(t){return t.toLowerCase()}var BUe=/[^\u0130\u0131\u00DFa-z0-9\\/:\-_. ]+/g;function Ow(t){return BUe.test(t)?t.replace(BUe,Qbe):t}function pa(){throw new Error("Not implemented")}function l_(t){let r;return()=>(t&&(r=t(),t=void 0),r)}function I1(t){const r=new Map;return a=>{const u=`${typeof a}:${a}`;let h=r.get(u);return h===void 0&&!r.has(u)&&(h=t(a),r.set(u,h)),h}}function WUe(t){const r=new WeakMap;return a=>{let u=r.get(a);return u===void 0&&!r.has(a)&&(u=t(a),r.set(a,u)),u}}function VUe(t,r){return(...a)=>{let u=r.get(a);return u===void 0&&!r.has(a)&&(u=t(...a),r.set(a,u)),u}}function HUe(t,r,a,u,h){if(h){const p=[];for(let m=0;mnd(p,(C,b)=>b(C),m)}else return u?p=>u(a(r(t(p)))):a?p=>a(r(t(p))):r?p=>r(t(p)):t?p=>t(p):p=>p}var Xbe=(t=>(t[t.None=0]="None",t[t.Normal=1]="Normal",t[t.Aggressive=2]="Aggressive",t[t.VeryAggressive=3]="VeryAggressive",t))(Xbe||{});function XC(t,r){return t===r}function yk(t,r){return t===r||t!==void 0&&r!==void 0&&t.toUpperCase()===r.toUpperCase()}function UE(t,r){return XC(t,r)}function jUe(t,r){return t===r?0:t===void 0?-1:r===void 0?1:tr(a,u)===-1?a:u)}function pB(t,r){return t===r?0:t===void 0?-1:r===void 0?1:(t=t.toUpperCase(),r=r.toUpperCase(),tr?1:0)}function Zbe(t,r){return t===r?0:t===void 0?-1:r===void 0?1:(t=t.toLowerCase(),r=r.toLowerCase(),tr?1:0)}function Xf(t,r){return jUe(t,r)}function f6(t){return t?pB:Xf}var aEt=(()=>{return r;function t(a,u,h){if(a===u)return 0;if(a===void 0)return-1;if(u===void 0)return 1;const p=h(a,u);return p<0?-1:p>0?1:0}function r(a){const u=new Intl.Collator(a,{usage:"sort",sensitivity:"variant",numeric:!0}).compare;return(h,p)=>t(h,p,u)}})(),Ybe,_re;function eCe(){return _re}function tCe(t){_re!==t&&(_re=t,Ybe=void 0)}function gB(t,r){return(Ybe||(Ybe=aEt(_re)))(t,r)}function iCe(t,r,a,u){return t===r?0:t===void 0?-1:r===void 0?1:u(t[a],r[a])}function bk(t,r){return hc(t?1:0,r?1:0)}function qE(t,r,a){const u=Math.max(2,Math.floor(t.length*.34));let h=Math.floor(t.length*.4)+1,p;for(const m of r){const C=a(m);if(C!==void 0&&Math.abs(C.length-t.length)<=u){if(C===t||C.length<3&&C.toLowerCase()!==t.toLowerCase())continue;const b=lEt(t,C,h-.1);if(b===void 0)continue;z.assert(ba?C-a:1),E=Math.floor(r.length>a+C?a+C:r.length);h[0]=C;let N=C;for(let F=1;Fa)return;const R=u;u=h,h=R}const m=u[r.length];return m>a?void 0:m}function mu(t,r,a){const u=t.length-r.length;return u>=0&&(a?yk(t.slice(u),r):t.indexOf(r,u)===u)}function h6(t,r){return mu(t,r)?t.slice(0,t.length-r.length):t}function nCe(t,r){return mu(t,r)?t.slice(0,t.length-r.length):void 0}function pre(t){let r=t.length;for(let a=r-1;a>0;a--){let u=t.charCodeAt(a);if(u>=48&&u<=57)do--a,u=t.charCodeAt(a);while(a>0&&u>=48&&u<=57);else if(a>4&&(u===110||u===78)){if(--a,u=t.charCodeAt(a),u!==105&&u!==73||(--a,u=t.charCodeAt(a),u!==109&&u!==77))break;--a,u=t.charCodeAt(a)}else break;if(u!==45&&u!==46)break;r=a}return r===t.length?t:t.slice(0,r)}function FR(t,r){for(let a=0;aa===r)}function cEt(t,r){for(let a=0;ah&&(h=m.prefix.length,u=p)}return u}function ro(t,r,a){return a?yk(t.slice(0,r.length),r):t.lastIndexOf(r,0)===0}function BR(t,r){return ro(t,r)?t.substr(r.length):t}function vre(t,r,a=fc){return ro(a(t),a(r))?t.substring(r.length):void 0}function c$({prefix:t,suffix:r},a){return a.length>=t.length+r.length&&ro(a,t)&&mu(a,r)}function u$(t,r){return a=>t(a)&&r(a)}function lg(...t){return(...r)=>{let a;for(const u of t)if(a=u(...r),a)return a;return a}}function d$(t){return(...r)=>!t(...r)}function zUe(t){}function PL(t){return t===void 0?void 0:[t]}function f$(t,r,a,u,h,p){p=p||dl;let m=0,C=0;const b=t.length,T=r.length;let E=!1;for(;m(t[t.Off=0]="Off",t[t.Error=1]="Error",t[t.Warning=2]="Warning",t[t.Info=3]="Info",t[t.Verbose=4]="Verbose",t))(lCe||{}),z;(t=>{let r=0;t.currentLogLevel=2,t.isDebugging=!1;function a(ot){return t.currentLogLevel<=ot}t.shouldLog=a;function u(ot,hi){t.loggingHost&&a(ot)&&t.loggingHost.log(ot,hi)}function h(ot){u(3,ot)}t.log=h,(ot=>{function hi(fs){u(1,fs)}ot.error=hi;function hn(fs){u(2,fs)}ot.warn=hn;function lr(fs){u(3,fs)}ot.log=lr;function as(fs){u(4,fs)}ot.trace=as})(h=t.log||(t.log={}));const p={};function m(){return r}t.getAssertionLevel=m;function C(ot){const hi=r;if(r=ot,ot>hi)for(const hn of wm(p)){const lr=p[hn];lr!==void 0&&t[hn]!==lr.assertion&&ot>=lr.level&&(t[hn]=lr,p[hn]=void 0)}}t.setAssertionLevel=C;function b(ot){return r>=ot}t.shouldAssert=b;function T(ot,hi){return b(ot)?!0:(p[hi]={level:ot,assertion:t[hi]},t[hi]=dl,!1)}function E(ot,hi){debugger;const hn=new Error(ot?`Debug Failure. ${ot}`:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(hn,hi||E),hn}t.fail=E;function N(ot,hi,hn){return E(`${hi||"Unexpected node."}\r +Node ${Ie(ot.kind)} was unexpected.`,hn||N)}t.failBadSyntaxKind=N;function R(ot,hi,hn,lr){ot||(hi=hi?`False expression: ${hi}`:"False expression.",hn&&(hi+=`\r +Verbose Debug Information: `+(typeof hn=="string"?hn:hn())),E(hi,lr||R))}t.assert=R;function F(ot,hi,hn,lr,as){if(ot!==hi){const fs=hn?lr?`${hn} ${lr}`:hn:"";E(`Expected ${ot} === ${hi}. ${fs}`,as||F)}}t.assertEqual=F;function j(ot,hi,hn,lr){ot>=hi&&E(`Expected ${ot} < ${hi}. ${hn||""}`,lr||j)}t.assertLessThan=j;function U(ot,hi,hn){ot>hi&&E(`Expected ${ot} <= ${hi}`,hn||U)}t.assertLessThanOrEqual=U;function q(ot,hi,hn){ot= ${hi}`,hn||q)}t.assertGreaterThanOrEqual=q;function Q(ot,hi,hn){ot==null&&E(hi,hn||Q)}t.assertIsDefined=Q;function re(ot,hi,hn){return Q(ot,hi,hn||re),ot}t.checkDefined=re;function Y(ot,hi,hn){for(const lr of ot)Q(lr,hi,hn||Y)}t.assertEachIsDefined=Y;function ue(ot,hi,hn){return Y(ot,hi,hn||ue),ot}t.checkEachDefined=ue;function te(ot,hi="Illegal value:",hn){const lr=typeof ot=="object"&&Vl(ot,"kind")&&Vl(ot,"pos")?"SyntaxKind: "+Ie(ot.kind):JSON.stringify(ot);return E(`${hi} ${lr}`,hn||te)}t.assertNever=te;function Se(ot,hi,hn,lr){T(1,"assertEachNode")&&R(hi===void 0||Be(ot,hi),hn||"Unexpected node.",()=>`Node array did not pass test '${Ee(hi)}'.`,lr||Se)}t.assertEachNode=Se;function oe(ot,hi,hn,lr){T(1,"assertNode")&&R(ot!==void 0&&(hi===void 0||hi(ot)),hn||"Unexpected node.",()=>`Node ${Ie(ot==null?void 0:ot.kind)} did not pass test '${Ee(hi)}'.`,lr||oe)}t.assertNode=oe;function pe(ot,hi,hn,lr){T(1,"assertNotNode")&&R(ot===void 0||hi===void 0||!hi(ot),hn||"Unexpected node.",()=>`Node ${Ie(ot.kind)} should not have passed test '${Ee(hi)}'.`,lr||pe)}t.assertNotNode=pe;function ye(ot,hi,hn,lr){T(1,"assertOptionalNode")&&R(hi===void 0||ot===void 0||hi(ot),hn||"Unexpected node.",()=>`Node ${Ie(ot==null?void 0:ot.kind)} did not pass test '${Ee(hi)}'.`,lr||ye)}t.assertOptionalNode=ye;function be(ot,hi,hn,lr){T(1,"assertOptionalToken")&&R(hi===void 0||ot===void 0||ot.kind===hi,hn||"Unexpected node.",()=>`Node ${Ie(ot==null?void 0:ot.kind)} was not a '${Ie(hi)}' token.`,lr||be)}t.assertOptionalToken=be;function _e(ot,hi,hn){T(1,"assertMissingNode")&&R(ot===void 0,hi||"Unexpected node.",()=>`Node ${Ie(ot.kind)} was unexpected'.`,hn||_e)}t.assertMissingNode=_e;function ve(ot){}t.type=ve;function Ee(ot){if(typeof ot!="function")return"";if(Vl(ot,"name"))return ot.name;{const hi=Function.prototype.toString.call(ot),hn=/^function\s+([\w$]+)\s*\(/.exec(hi);return hn?hn[1]:""}}t.getFunctionName=Ee;function ke(ot){return`{ name: ${Ws(ot.escapedName)}; flags: ${nt(ot.flags)}; declarations: ${Yt(ot.declarations,hi=>Ie(hi.kind))} }`}t.formatSymbol=ke;function Fe(ot=0,hi,hn){const lr=fe(hi);if(ot===0)return lr.length>0&&lr[0][0]===0?lr[0][1]:"0";if(hn){const as=[];let fs=ot;for(const[Ds,ha]of lr){if(Ds>ot)break;Ds!==0&&Ds&ot&&(as.push(ha),fs&=~Ds)}if(fs===0)return as.join("|")}else for(const[as,fs]of lr)if(as===ot)return fs;return ot.toString()}t.formatEnum=Fe;const Oe=new Map;function fe(ot){const hi=Oe.get(ot);if(hi)return hi;const hn=[];for(const as in ot){const fs=ot[as];typeof fs=="number"&&hn.push([fs,as])}const lr=$p(hn,(as,fs)=>hc(as[0],fs[0]));return Oe.set(ot,lr),lr}function Ie(ot){return Fe(ot,xre,!1)}t.formatSyntaxKind=Ie;function Le(ot){return Fe(ot,Bre,!1)}t.formatSnippetKind=Le;function et(ot){return Fe(ot,Rre,!1)}t.formatScriptKind=et;function He(ot){return Fe(ot,kre,!0)}t.formatNodeFlags=He;function We(ot){return Fe(ot,Pre,!0)}t.formatNodeCheckFlags=We;function Ue(ot){return Fe(ot,Tre,!0)}t.formatModifierFlags=Ue;function Ye(ot){return Fe(ot,Fre,!0)}t.formatTransformFlags=Ye;function wt(ot){return Fe(ot,Wre,!0)}t.formatEmitFlags=wt;function nt(ot){return Fe(ot,Lre,!0)}t.formatSymbolFlags=nt;function ze(ot){return Fe(ot,Are,!0)}t.formatTypeFlags=ze;function st(ot){return Fe(ot,Mre,!0)}t.formatSignatureFlags=st;function xt(ot){return Fe(ot,Ore,!0)}t.formatObjectFlags=xt;function Et(ot){return Fe(ot,p$,!0)}t.formatFlowFlags=Et;function ft(ot){return Fe(ot,Dre,!0)}t.formatRelationComparisonResult=ft;function Ht(ot){return Fe(ot,$le,!0)}t.formatCheckMode=Ht;function Oi(ot){return Fe(ot,Jle,!0)}t.formatSignatureCheckMode=Oi;function Ji(ot){return Fe(ot,qle,!0)}t.formatTypeFacts=Ji;let Ui=!1,bn;function Mi(ot){"__debugFlowFlags"in ot||Object.defineProperties(ot,{__tsDebuggerDisplay:{value(){const hi=this.flags&2?"FlowStart":this.flags&4?"FlowBranchLabel":this.flags&8?"FlowLoopLabel":this.flags&16?"FlowAssignment":this.flags&32?"FlowTrueCondition":this.flags&64?"FlowFalseCondition":this.flags&128?"FlowSwitchClause":this.flags&256?"FlowArrayMutation":this.flags&512?"FlowCall":this.flags&1024?"FlowReduceLabel":this.flags&1?"FlowUnreachable":"UnknownFlow",hn=this.flags&-2048;return`${hi}${hn?` (${Et(hn)})`:""}`}},__debugFlowFlags:{get(){return Fe(this.flags,p$,!0)}},__debugToString:{value(){return Ko(this)}}})}function Ai(ot){return Ui&&(typeof Object.setPrototypeOf=="function"?(bn||(bn=Object.create(Object.prototype),Mi(bn)),Object.setPrototypeOf(ot,bn)):Mi(ot)),ot}t.attachFlowNodeDebugInfo=Ai;let Rn;function bs(ot){"__tsDebuggerDisplay"in ot||Object.defineProperties(ot,{__tsDebuggerDisplay:{value(hi){return hi=String(hi).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/,"]"),`NodeArray ${hi}`}}})}function Hi(ot){Ui&&(typeof Object.setPrototypeOf=="function"?(Rn||(Rn=Object.create(Array.prototype),bs(Rn)),Object.setPrototypeOf(ot,Rn)):bs(ot))}t.attachNodeArrayDebugInfo=Hi;function Hs(){if(Ui)return;const ot=new WeakMap,hi=new WeakMap;Object.defineProperties(Mf.getSymbolConstructor().prototype,{__tsDebuggerDisplay:{value(){const lr=this.flags&33554432?"TransientSymbol":"Symbol",as=this.flags&-33554433;return`${lr} '${xu(this)}'${as?` (${nt(as)})`:""}`}},__debugFlags:{get(){return nt(this.flags)}}}),Object.defineProperties(Mf.getTypeConstructor().prototype,{__tsDebuggerDisplay:{value(){const lr=this.flags&67359327?`IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName?` (${this.debugIntrinsicName})`:""}`:this.flags&98304?"NullableType":this.flags&384?`LiteralType ${JSON.stringify(this.value)}`:this.flags&2048?`LiteralType ${this.value.negative?"-":""}${this.value.base10Value}n`:this.flags&8192?"UniqueESSymbolType":this.flags&32?"EnumType":this.flags&1048576?"UnionType":this.flags&2097152?"IntersectionType":this.flags&4194304?"IndexType":this.flags&8388608?"IndexedAccessType":this.flags&16777216?"ConditionalType":this.flags&33554432?"SubstitutionType":this.flags&262144?"TypeParameter":this.flags&524288?this.objectFlags&3?"InterfaceType":this.objectFlags&4?"TypeReference":this.objectFlags&8?"TupleType":this.objectFlags&16?"AnonymousType":this.objectFlags&32?"MappedType":this.objectFlags&1024?"ReverseMappedType":this.objectFlags&256?"EvolvingArrayType":"ObjectType":"Type",as=this.flags&524288?this.objectFlags&-1344:0;return`${lr}${this.symbol?` '${xu(this.symbol)}'`:""}${as?` (${xt(as)})`:""}`}},__debugFlags:{get(){return ze(this.flags)}},__debugObjectFlags:{get(){return this.flags&524288?xt(this.objectFlags):""}},__debugTypeToString:{value(){let lr=ot.get(this);return lr===void 0&&(lr=this.checker.typeToString(this),ot.set(this,lr)),lr}}}),Object.defineProperties(Mf.getSignatureConstructor().prototype,{__debugFlags:{get(){return st(this.flags)}},__debugSignatureToString:{value(){var lr;return(lr=this.checker)==null?void 0:lr.signatureToString(this)}}});const hn=[Mf.getNodeConstructor(),Mf.getIdentifierConstructor(),Mf.getTokenConstructor(),Mf.getSourceFileConstructor()];for(const lr of hn)Vl(lr.prototype,"__debugKind")||Object.defineProperties(lr.prototype,{__tsDebuggerDisplay:{value(){return`${jc(this)?"GeneratedIdentifier":lt(this)?`Identifier '${dr(this)}'`:Vs(this)?`PrivateIdentifier '${dr(this)}'`:ja(this)?`StringLiteral ${JSON.stringify(this.text.length<10?this.text:this.text.slice(10)+"...")}`:W_(this)?`NumericLiteral ${this.text}`:lV(this)?`BigIntLiteral ${this.text}n`:Uc(this)?"TypeParameterDeclaration":Gs(this)?"ParameterDeclaration":fu(this)?"ConstructorDeclaration":hg(this)?"GetAccessorDeclaration":Np(this)?"SetAccessorDeclaration":xP(this)?"CallSignatureDeclaration":dV(this)?"ConstructSignatureDeclaration":UT(this)?"IndexSignatureDeclaration":kP(this)?"TypePredicateNode":_g(this)?"TypeReferenceNode":W1(this)?"FunctionTypeNode":n3(this)?"ConstructorTypeNode":qT(this)?"TypeQueryNode":p_(this)?"TypeLiteralNode":fV(this)?"ArrayTypeNode":TP(this)?"TupleTypeNode":WG(this)?"OptionalTypeNode":VG(this)?"RestTypeNode":Yw(this)?"UnionTypeNode":DP(this)?"IntersectionTypeNode":$T(this)?"ConditionalTypeNode":hI(this)?"InferTypeNode":_I(this)?"ParenthesizedTypeNode":s3(this)?"ThisTypeNode":Hk(this)?"TypeOperatorNode":JT(this)?"IndexedAccessTypeNode":pI(this)?"MappedTypeNode":gS(this)?"LiteralTypeNode":r3(this)?"NamedTupleMember":V1(this)?"ImportTypeNode":Ie(this.kind)}${this.flags?` (${He(this.flags)})`:""}`}},__debugKind:{get(){return Ie(this.kind)}},__debugNodeFlags:{get(){return He(this.flags)}},__debugModifierFlags:{get(){return Ue(Gxe(this))}},__debugTransformFlags:{get(){return Ye(this.transformFlags)}},__debugIsParseTreeNode:{get(){return i8(this)}},__debugEmitFlags:{get(){return wt(Ya(this))}},__debugGetText:{value(as){if(oc(this))return"";let fs=hi.get(this);if(fs===void 0){const Ds=xo(this),ha=Ds&&_n(Ds);fs=ha?TT(ha,Ds,as):"",hi.set(this,fs)}return fs}}});Ui=!0}t.enableDebugInfo=Hs;function Wo(ot){const hi=ot&7;let hn=hi===0?"in out":hi===3?"[bivariant]":hi===2?"in":hi===1?"out":hi===4?"[independent]":"";return ot&8?hn+=" (unmeasurable)":ot&16&&(hn+=" (unreliable)"),hn}t.formatVariance=Wo;class ts{__debugToString(){var hi;switch(this.kind){case 3:return((hi=this.debugInfo)==null?void 0:hi.call(this))||"(function mapper)";case 0:return`${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`;case 1:return we(this.sources,this.targets||Yt(this.sources,()=>"any"),(hn,lr)=>`${hn.__debugTypeToString()} -> ${typeof lr=="string"?lr:lr.__debugTypeToString()}`).join(", ");case 2:return we(this.sources,this.targets,(hn,lr)=>`${hn.__debugTypeToString()} -> ${lr().__debugTypeToString()}`).join(", ");case 5:case 4:return`m1: ${this.mapper1.__debugToString().split(` +`).join(` + `)} +m2: ${this.mapper2.__debugToString().split(` +`).join(` + `)}`;default:return te(this)}}}t.DebugTypeMapper=ts;function Fo(ot){return t.isDebugging?Object.setPrototypeOf(ot,ts.prototype):ot}t.attachDebugPrototypeIfDebug=Fo;function Cn(ot){return console.log(Ko(ot))}t.printControlFlowGraph=Cn;function Ko(ot){let hi=-1;function hn(je){return je.id||(je.id=hi,hi--),je.id}let lr;(je=>{je.lr="─",je.ud="│",je.dr="╭",je.dl="╮",je.ul="╯",je.ur="╰",je.udr="├",je.udl="┤",je.dlr="┬",je.ulr="┴",je.udlr="╫"})(lr||(lr={}));let as;(je=>{je[je.None=0]="None",je[je.Up=1]="Up",je[je.Down=2]="Down",je[je.Left=4]="Left",je[je.Right=8]="Right",je[je.UpDown=3]="UpDown",je[je.LeftRight=12]="LeftRight",je[je.UpLeft=5]="UpLeft",je[je.UpRight=9]="UpRight",je[je.DownLeft=6]="DownLeft",je[je.DownRight=10]="DownRight",je[je.UpDownLeft=7]="UpDownLeft",je[je.UpDownRight=11]="UpDownRight",je[je.UpLeftRight=13]="UpLeftRight",je[je.DownLeftRight=14]="DownLeftRight",je[je.UpDownLeftRight=15]="UpDownLeftRight",je[je.NoChildren=16]="NoChildren"})(as||(as={}));const fs=2032,Ds=882,ha=Object.create(null),Yo=[],ji=pt(ot,new Set);for(const je of Yo)je.text=wi(je.flowNode,je.circular),Ci(je);const fl=$e(ji),St=qt(fl);return $t(ji,0),ce();function Ot(je){return!!(je.flags&128)}function xe(je){return!!(je.flags&12)&&!!je.antecedent}function Pt(je){return!!(je.flags&fs)}function Re(je){return!!(je.flags&Ds)}function mt(je){const de=[];for(const tt of je.edges)tt.source===je&&de.push(tt.target);return de}function Je(je){const de=[];for(const tt of je.edges)tt.target===je&&de.push(tt.source);return de}function pt(je,de){const tt=hn(je);let Ae=ha[tt];if(Ae&&de.has(je))return Ae.circular=!0,Ae={id:-1,flowNode:je,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:"circularity"},Yo.push(Ae),Ae;if(de.add(je),!Ae)if(ha[tt]=Ae={id:tt,flowNode:je,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:!1},Yo.push(Ae),xe(je))for(const Ke of je.antecedent)kt(Ae,Ke,de);else Pt(je)&&kt(Ae,je.antecedent,de);return de.delete(je),Ae}function kt(je,de,tt){const Ae=pt(de,tt),Ke={source:je,target:Ae};je.edges.push(Ke),Ae.edges.push(Ke)}function Ci(je){if(je.level!==-1)return je.level;let de=0;for(const tt of Je(je))de=Math.max(de,Ci(tt)+1);return je.level=de}function $e(je){let de=0;for(const tt of mt(je))de=Math.max(de,$e(tt));return de+1}function qt(je){const de=Bt(Array(je),0);for(const tt of Yo)de[tt.level]=Math.max(de[tt.level],tt.text.length);return de}function $t(je,de){if(je.lane===-1){je.lane=de,je.endLane=de;const tt=mt(je);for(let Ae=0;Ae0&&de++;const Ke=tt[Ae];$t(Ke,de),Ke.endLane>je.endLane&&(de=Ke.endLane)}je.endLane=de}}function ii(je){if(je&2)return"Start";if(je&4)return"Branch";if(je&8)return"Loop";if(je&16)return"Assignment";if(je&32)return"True";if(je&64)return"False";if(je&128)return"SwitchClause";if(je&256)return"ArrayMutation";if(je&512)return"Call";if(je&1024)return"ReduceLabel";if(je&1)return"Unreachable";throw new Error}function Gt(je){const de=_n(je);return TT(de,je,!1)}function wi(je,de){let tt=ii(je.flags);if(de&&(tt=`${tt}#${hn(je)}`),Ot(je)){const Ae=[],{switchStatement:Ke,clauseStart:Qt,clauseEnd:ni}=je.node;for(let fi=Qt;fiMath.max(ni,fi.lane),0)+1,tt=Bt(Array(de),""),Ae=St.map(()=>Array(de)),Ke=St.map(()=>Bt(Array(de),0));for(const ni of Yo){Ae[ni.level][ni.lane]=ni;const fi=mt(ni);for(let fn=0;fn0&&(or|=1),fn0&&(or|=1),fn0?Ke[ni-1][fi]:0,fn=fi>0?Ke[ni][fi-1]:0;let kn=Ke[ni][fi];kn||(Gi&8&&(kn|=12),fn&2&&(kn|=3),Ke[ni][fi]=kn)}for(let ni=0;ni0?je.repeat(de):"";let tt="";for(;tt.length=0,"Invalid argument: major"),z.assert(a>=0,"Invalid argument: minor"),z.assert(u>=0,"Invalid argument: patch");const m=h?Lo(h)?h:h.split("."):x,C=p?Lo(p)?p:p.split("."):x;z.assert(Be(m,b=>fEt.test(b)),"Invalid argument: prerelease"),z.assert(Be(C,b=>_Et.test(b)),"Invalid argument: build"),this.major=r,this.minor=a,this.patch=u,this.prerelease=m,this.build=C}static tryParse(r){const a=$Ue(r);if(!a)return;const{major:u,minor:h,patch:p,prerelease:m,build:C}=a;return new Uz(u,h,p,m,C)}compareTo(r){return this===r?0:r===void 0?1:hc(this.major,r.major)||hc(this.minor,r.minor)||hc(this.patch,r.patch)||pEt(this.prerelease,r.prerelease)}increment(r){switch(r){case"major":return new Uz(this.major+1,0,0);case"minor":return new Uz(this.major,this.minor+1,0);case"patch":return new Uz(this.major,this.minor,this.patch+1);default:return z.assertNever(r)}}with(r){const{major:a=this.major,minor:u=this.minor,patch:h=this.patch,prerelease:p=this.prerelease,build:m=this.build}=r;return new Uz(a,u,h,p,m)}toString(){let r=`${this.major}.${this.minor}.${this.patch}`;return Rt(this.prerelease)&&(r+=`-${this.prerelease.join(".")}`),Rt(this.build)&&(r+=`+${this.build.join(".")}`),r}};cCe.zero=new cCe(0,0,0,["0"]);var B0=cCe;function $Ue(t){const r=uEt.exec(t);if(!r)return;const[,a,u="0",h="0",p="",m=""]=r;if(!(p&&!dEt.test(p))&&!(m&&!hEt.test(m)))return{major:parseInt(a,10),minor:parseInt(u,10),patch:parseInt(h,10),prerelease:p,build:m}}function pEt(t,r){if(t===r)return 0;if(t.length===0)return r.length===0?0:1;if(r.length===0)return-1;const a=Math.min(t.length,r.length);for(let u=0;u|>=|=)?\s*([a-z0-9-+.*]+)$/i;function JUe(t){const r=[];for(let a of t.trim().split(gEt)){if(!a)continue;const u=[];a=a.trim();const h=yEt.exec(a);if(h){if(!CEt(h[1],h[2],u))return}else for(const p of a.split(mEt)){const m=bEt.exec(p.trim());if(!m||!SEt(m[1],m[2],u))return}r.push(u)}return r}function uCe(t){const r=vEt.exec(t);if(!r)return;const[,a,u="*",h="*",p,m]=r;return{version:new B0(xm(a)?0:parseInt(a,10),xm(a)||xm(u)?0:parseInt(u,10),xm(a)||xm(u)||xm(h)?0:parseInt(h,10),p,m),major:a,minor:u,patch:h}}function CEt(t,r,a){const u=uCe(t);if(!u)return!1;const h=uCe(r);return h?(xm(u.major)||a.push(N1(">=",u.version)),xm(h.major)||a.push(xm(h.minor)?N1("<",h.version.increment("major")):xm(h.patch)?N1("<",h.version.increment("minor")):N1("<=",h.version)),!0):!1}function SEt(t,r,a){const u=uCe(r);if(!u)return!1;const{version:h,major:p,minor:m,patch:C}=u;if(xm(p))(t==="<"||t===">")&&a.push(N1("<",B0.zero));else switch(t){case"~":a.push(N1(">=",h)),a.push(N1("<",h.increment(xm(m)?"major":"minor")));break;case"^":a.push(N1(">=",h)),a.push(N1("<",h.increment(h.major>0||xm(m)?"major":h.minor>0||xm(C)?"minor":"patch")));break;case"<":case">=":a.push(xm(m)||xm(C)?N1(t,h.with({prerelease:"0"})):N1(t,h));break;case"<=":case">":a.push(xm(m)?N1(t==="<="?"<":">=",h.increment("major").with({prerelease:"0"})):xm(C)?N1(t==="<="?"<":">=",h.increment("minor").with({prerelease:"0"})):N1(t,h));break;case"=":case void 0:xm(m)||xm(C)?(a.push(N1(">=",h.with({prerelease:"0"}))),a.push(N1("<",h.increment(xm(m)?"major":"minor").with({prerelease:"0"})))):a.push(N1("=",h));break;default:return!1}return!0}function xm(t){return t==="*"||t==="x"||t==="X"}function N1(t,r){return{operator:t,operand:r}}function wEt(t,r){if(r.length===0)return!0;for(const a of r)if(xEt(t,a))return!0;return!1}function xEt(t,r){for(const a of r)if(!kEt(t,a.operator,a.operand))return!1;return!0}function kEt(t,r,a){const u=t.compareTo(a);switch(r){case"<":return u<0;case"<=":return u<=0;case">":return u>0;case">=":return u>=0;case"=":return u===0;default:return z.assertNever(r)}}function TEt(t){return Yt(t,DEt).join(" || ")||"*"}function DEt(t){return Yt(t,EEt).join(" ")}function EEt(t){return`${t.operator}${t.operand}`}function IEt(){if(bre())try{const{performance:t}=eM;if(t)return{shouldWriteNativeEvents:!1,performance:t}}catch{}if(typeof performance=="object")return{shouldWriteNativeEvents:!0,performance}}function NEt(){const t=IEt();if(!t)return;const{shouldWriteNativeEvents:r,performance:a}=t,u={shouldWriteNativeEvents:r,performance:void 0,performanceTime:void 0};return typeof a.timeOrigin=="number"&&typeof a.now=="function"&&(u.performanceTime=a),u.performanceTime&&typeof a.mark=="function"&&typeof a.measure=="function"&&typeof a.clearMarks=="function"&&typeof a.clearMeasures=="function"&&(u.performance=a),u}var dCe=NEt(),GUe=dCe==null?void 0:dCe.performanceTime;function fCe(){return dCe}var Vc=GUe?()=>GUe.now():Date.now,_$;try{const t=e.TS_ETW_MODULE_PATH??"./node_modules/@microsoft/typescript-etw";_$=NFe(t)}catch{_$=void 0}var c_=_$!=null&&_$.logEvent?_$:void 0,hCe={};l(hCe,{clearMarks:()=>eqe,clearMeasures:()=>YUe,createTimer:()=>Cre,createTimerIf:()=>KUe,disable:()=>gCe,enable:()=>wre,forEachMark:()=>ZUe,forEachMeasure:()=>Sre,getCount:()=>XUe,getDuration:()=>zR,isEnabled:()=>pCe,mark:()=>cu,measure:()=>qg,nullTimer:()=>_Ce});var WR,$E;function KUe(t,r,a,u){return t?Cre(r,a,u):_Ce}function Cre(t,r,a){let u=0;return{enter:h,exit:p};function h(){++u===1&&cu(r)}function p(){--u===0?(cu(a),qg(t,r,a)):u<0&&z.fail("enter/exit count does not match.")}}var _Ce={enter:dl,exit:dl},VR=!1,QUe=Vc(),HR=new Map,mB=new Map,jR=new Map;function cu(t){if(VR){const r=mB.get(t)??0;mB.set(t,r+1),HR.set(t,Vc()),$E==null||$E.mark(t),typeof onProfilerEvent=="function"&&onProfilerEvent(t)}}function qg(t,r,a){if(VR){const u=(a!==void 0?HR.get(a):void 0)??Vc(),h=(r!==void 0?HR.get(r):void 0)??QUe,p=jR.get(t)||0;jR.set(t,p+(u-h)),$E==null||$E.measure(t,r,a)}}function XUe(t){return mB.get(t)||0}function zR(t){return jR.get(t)||0}function Sre(t){jR.forEach((r,a)=>t(a,r))}function ZUe(t){HR.forEach((r,a)=>t(a))}function YUe(t){t!==void 0?jR.delete(t):jR.clear(),$E==null||$E.clearMeasures(t)}function eqe(t){t!==void 0?(mB.delete(t),HR.delete(t)):(mB.clear(),HR.clear()),$E==null||$E.clearMarks(t)}function pCe(){return VR}function wre(t=Wd){var r;return VR||(VR=!0,WR||(WR=fCe()),WR!=null&&WR.performance&&(QUe=WR.performance.timeOrigin,(WR.shouldWriteNativeEvents||(r=t==null?void 0:t.cpuProfilingEnabled)!=null&&r.call(t)||t!=null&&t.debugMode)&&($E=WR.performance))),!0}function gCe(){VR&&(HR.clear(),mB.clear(),jR.clear(),$E=void 0,VR=!1)}var sr,vB;(t=>{let r,a=0,u=0,h;const p=[];let m;const C=[];function b(Se,oe,pe){if(z.assert(!sr,"Tracing already started"),r===void 0)try{r=eM}catch(Ee){throw new Error(`tracing requires having fs +(original error: ${Ee.message||Ee})`)}h=Se,p.length=0,m===void 0&&(m=Hr(oe,"legend.json")),r.existsSync(oe)||r.mkdirSync(oe,{recursive:!0});const ye=h==="build"?`.${process.pid}-${++a}`:h==="server"?`.${process.pid}`:"",be=Hr(oe,`trace${ye}.json`),_e=Hr(oe,`types${ye}.json`);C.push({configFilePath:pe,tracePath:be,typesPath:_e}),u=r.openSync(be,"w"),sr=t;const ve={cat:"__metadata",ph:"M",ts:1e3*Vc(),pid:1,tid:1};r.writeSync(u,`[ +`+[{name:"process_name",args:{name:"tsc"},...ve},{name:"thread_name",args:{name:"Main"},...ve},{name:"TracingStartedInBrowser",...ve,cat:"disabled-by-default-devtools.timeline"}].map(Ee=>JSON.stringify(Ee)).join(`, +`))}t.startTracing=b;function T(){z.assert(sr,"Tracing is not in progress"),z.assert(!!p.length==(h!=="server")),r.writeSync(u,` +] +`),r.closeSync(u),sr=void 0,p.length?ue(p):C[C.length-1].typesPath=void 0}t.stopTracing=T;function E(Se){h!=="server"&&p.push(Se)}t.recordType=E,(Se=>{Se.Parse="parse",Se.Program="program",Se.Bind="bind",Se.Check="check",Se.CheckTypes="checkTypes",Se.Emit="emit",Se.Session="session"})(t.Phase||(t.Phase={}));function N(Se,oe,pe){re("I",Se,oe,pe,'"s":"g"')}t.instant=N;const R=[];function F(Se,oe,pe,ye=!1){ye&&re("B",Se,oe,pe),R.push({phase:Se,name:oe,args:pe,time:1e3*Vc(),separateBeginAndEnd:ye})}t.push=F;function j(Se){z.assert(R.length>0),Q(R.length-1,1e3*Vc(),Se),R.length--}t.pop=j;function U(){const Se=1e3*Vc();for(let oe=R.length-1;oe>=0;oe--)Q(oe,Se);R.length=0}t.popAll=U;const q=1e3*10;function Q(Se,oe,pe){const{phase:ye,name:be,args:_e,time:ve,separateBeginAndEnd:Ee}=R[Se];Ee?(z.assert(!pe,"`results` are not supported for events with `separateBeginAndEnd`"),re("E",ye,be,_e,void 0,oe)):q-ve%q<=oe-ve&&re("X",ye,be,{..._e,results:pe},`"dur":${oe-ve}`,ve)}function re(Se,oe,pe,ye,be,_e=1e3*Vc()){h==="server"&&oe==="checkTypes"||(cu("beginTracing"),r.writeSync(u,`, +{"pid":1,"tid":1,"ph":"${Se}","cat":"${oe}","ts":${_e},"name":"${pe}"`),be&&r.writeSync(u,`,${be}`),ye&&r.writeSync(u,`,"args":${JSON.stringify(ye)}`),r.writeSync(u,"}"),cu("endTracing"),qg("Tracing","beginTracing","endTracing"))}function Y(Se){const oe=_n(Se);return oe?{path:oe.path,start:pe(Da(oe,Se.pos)),end:pe(Da(oe,Se.end))}:void 0;function pe(ye){return{line:ye.line+1,character:ye.character+1}}}function ue(Se){var oe,pe,ye,be,_e,ve,Ee,ke,Fe,Oe,fe,Ie,Le,et,He,We,Ue,Ye,wt;cu("beginDumpTypes");const nt=C[C.length-1].typesPath,ze=r.openSync(nt,"w"),st=new Map;r.writeSync(ze,"[");const xt=Se.length;for(let Et=0;EtFo.id),referenceLocation:Y(ts.node)}}let Mi={};if(ft.flags&16777216){const ts=ft;Mi={conditionalCheckType:(ve=ts.checkType)==null?void 0:ve.id,conditionalExtendsType:(Ee=ts.extendsType)==null?void 0:Ee.id,conditionalTrueType:((ke=ts.resolvedTrueType)==null?void 0:ke.id)??-1,conditionalFalseType:((Fe=ts.resolvedFalseType)==null?void 0:Fe.id)??-1}}let Ai={};if(ft.flags&33554432){const ts=ft;Ai={substitutionBaseType:(Oe=ts.baseType)==null?void 0:Oe.id,constraintType:(fe=ts.constraint)==null?void 0:fe.id}}let Rn={};if(Ht&1024){const ts=ft;Rn={reverseMappedSourceType:(Ie=ts.source)==null?void 0:Ie.id,reverseMappedMappedType:(Le=ts.mappedType)==null?void 0:Le.id,reverseMappedConstraintType:(et=ts.constraintType)==null?void 0:et.id}}let bs={};if(Ht&256){const ts=ft;bs={evolvingArrayElementType:ts.elementType.id,evolvingArrayFinalType:(He=ts.finalArrayType)==null?void 0:He.id}}let Hi;const Hs=ft.checker.getRecursionIdentity(ft);Hs&&(Hi=st.get(Hs),Hi||(Hi=st.size,st.set(Hs,Hi)));const Wo={id:ft.id,intrinsicName:ft.intrinsicName,symbolName:(Oi==null?void 0:Oi.escapedName)&&Ws(Oi.escapedName),recursionId:Hi,isTuple:Ht&8?!0:void 0,unionTypes:ft.flags&1048576?(We=ft.types)==null?void 0:We.map(ts=>ts.id):void 0,intersectionTypes:ft.flags&2097152?ft.types.map(ts=>ts.id):void 0,aliasTypeArguments:(Ue=ft.aliasTypeArguments)==null?void 0:Ue.map(ts=>ts.id),keyofType:ft.flags&4194304?(Ye=ft.type)==null?void 0:Ye.id:void 0,...Ui,...bn,...Mi,...Ai,...Rn,...bs,destructuringPattern:Y(ft.pattern),firstDeclaration:Y((wt=Oi==null?void 0:Oi.declarations)==null?void 0:wt[0]),flags:z.formatTypeFlags(ft.flags).split("|"),display:Ji};r.writeSync(ze,JSON.stringify(Wo)),Et(t[t.Unknown=0]="Unknown",t[t.EndOfFileToken=1]="EndOfFileToken",t[t.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",t[t.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",t[t.NewLineTrivia=4]="NewLineTrivia",t[t.WhitespaceTrivia=5]="WhitespaceTrivia",t[t.ShebangTrivia=6]="ShebangTrivia",t[t.ConflictMarkerTrivia=7]="ConflictMarkerTrivia",t[t.NonTextFileMarkerTrivia=8]="NonTextFileMarkerTrivia",t[t.NumericLiteral=9]="NumericLiteral",t[t.BigIntLiteral=10]="BigIntLiteral",t[t.StringLiteral=11]="StringLiteral",t[t.JsxText=12]="JsxText",t[t.JsxTextAllWhiteSpaces=13]="JsxTextAllWhiteSpaces",t[t.RegularExpressionLiteral=14]="RegularExpressionLiteral",t[t.NoSubstitutionTemplateLiteral=15]="NoSubstitutionTemplateLiteral",t[t.TemplateHead=16]="TemplateHead",t[t.TemplateMiddle=17]="TemplateMiddle",t[t.TemplateTail=18]="TemplateTail",t[t.OpenBraceToken=19]="OpenBraceToken",t[t.CloseBraceToken=20]="CloseBraceToken",t[t.OpenParenToken=21]="OpenParenToken",t[t.CloseParenToken=22]="CloseParenToken",t[t.OpenBracketToken=23]="OpenBracketToken",t[t.CloseBracketToken=24]="CloseBracketToken",t[t.DotToken=25]="DotToken",t[t.DotDotDotToken=26]="DotDotDotToken",t[t.SemicolonToken=27]="SemicolonToken",t[t.CommaToken=28]="CommaToken",t[t.QuestionDotToken=29]="QuestionDotToken",t[t.LessThanToken=30]="LessThanToken",t[t.LessThanSlashToken=31]="LessThanSlashToken",t[t.GreaterThanToken=32]="GreaterThanToken",t[t.LessThanEqualsToken=33]="LessThanEqualsToken",t[t.GreaterThanEqualsToken=34]="GreaterThanEqualsToken",t[t.EqualsEqualsToken=35]="EqualsEqualsToken",t[t.ExclamationEqualsToken=36]="ExclamationEqualsToken",t[t.EqualsEqualsEqualsToken=37]="EqualsEqualsEqualsToken",t[t.ExclamationEqualsEqualsToken=38]="ExclamationEqualsEqualsToken",t[t.EqualsGreaterThanToken=39]="EqualsGreaterThanToken",t[t.PlusToken=40]="PlusToken",t[t.MinusToken=41]="MinusToken",t[t.AsteriskToken=42]="AsteriskToken",t[t.AsteriskAsteriskToken=43]="AsteriskAsteriskToken",t[t.SlashToken=44]="SlashToken",t[t.PercentToken=45]="PercentToken",t[t.PlusPlusToken=46]="PlusPlusToken",t[t.MinusMinusToken=47]="MinusMinusToken",t[t.LessThanLessThanToken=48]="LessThanLessThanToken",t[t.GreaterThanGreaterThanToken=49]="GreaterThanGreaterThanToken",t[t.GreaterThanGreaterThanGreaterThanToken=50]="GreaterThanGreaterThanGreaterThanToken",t[t.AmpersandToken=51]="AmpersandToken",t[t.BarToken=52]="BarToken",t[t.CaretToken=53]="CaretToken",t[t.ExclamationToken=54]="ExclamationToken",t[t.TildeToken=55]="TildeToken",t[t.AmpersandAmpersandToken=56]="AmpersandAmpersandToken",t[t.BarBarToken=57]="BarBarToken",t[t.QuestionToken=58]="QuestionToken",t[t.ColonToken=59]="ColonToken",t[t.AtToken=60]="AtToken",t[t.QuestionQuestionToken=61]="QuestionQuestionToken",t[t.BacktickToken=62]="BacktickToken",t[t.HashToken=63]="HashToken",t[t.EqualsToken=64]="EqualsToken",t[t.PlusEqualsToken=65]="PlusEqualsToken",t[t.MinusEqualsToken=66]="MinusEqualsToken",t[t.AsteriskEqualsToken=67]="AsteriskEqualsToken",t[t.AsteriskAsteriskEqualsToken=68]="AsteriskAsteriskEqualsToken",t[t.SlashEqualsToken=69]="SlashEqualsToken",t[t.PercentEqualsToken=70]="PercentEqualsToken",t[t.LessThanLessThanEqualsToken=71]="LessThanLessThanEqualsToken",t[t.GreaterThanGreaterThanEqualsToken=72]="GreaterThanGreaterThanEqualsToken",t[t.GreaterThanGreaterThanGreaterThanEqualsToken=73]="GreaterThanGreaterThanGreaterThanEqualsToken",t[t.AmpersandEqualsToken=74]="AmpersandEqualsToken",t[t.BarEqualsToken=75]="BarEqualsToken",t[t.BarBarEqualsToken=76]="BarBarEqualsToken",t[t.AmpersandAmpersandEqualsToken=77]="AmpersandAmpersandEqualsToken",t[t.QuestionQuestionEqualsToken=78]="QuestionQuestionEqualsToken",t[t.CaretEqualsToken=79]="CaretEqualsToken",t[t.Identifier=80]="Identifier",t[t.PrivateIdentifier=81]="PrivateIdentifier",t[t.JSDocCommentTextToken=82]="JSDocCommentTextToken",t[t.BreakKeyword=83]="BreakKeyword",t[t.CaseKeyword=84]="CaseKeyword",t[t.CatchKeyword=85]="CatchKeyword",t[t.ClassKeyword=86]="ClassKeyword",t[t.ConstKeyword=87]="ConstKeyword",t[t.ContinueKeyword=88]="ContinueKeyword",t[t.DebuggerKeyword=89]="DebuggerKeyword",t[t.DefaultKeyword=90]="DefaultKeyword",t[t.DeleteKeyword=91]="DeleteKeyword",t[t.DoKeyword=92]="DoKeyword",t[t.ElseKeyword=93]="ElseKeyword",t[t.EnumKeyword=94]="EnumKeyword",t[t.ExportKeyword=95]="ExportKeyword",t[t.ExtendsKeyword=96]="ExtendsKeyword",t[t.FalseKeyword=97]="FalseKeyword",t[t.FinallyKeyword=98]="FinallyKeyword",t[t.ForKeyword=99]="ForKeyword",t[t.FunctionKeyword=100]="FunctionKeyword",t[t.IfKeyword=101]="IfKeyword",t[t.ImportKeyword=102]="ImportKeyword",t[t.InKeyword=103]="InKeyword",t[t.InstanceOfKeyword=104]="InstanceOfKeyword",t[t.NewKeyword=105]="NewKeyword",t[t.NullKeyword=106]="NullKeyword",t[t.ReturnKeyword=107]="ReturnKeyword",t[t.SuperKeyword=108]="SuperKeyword",t[t.SwitchKeyword=109]="SwitchKeyword",t[t.ThisKeyword=110]="ThisKeyword",t[t.ThrowKeyword=111]="ThrowKeyword",t[t.TrueKeyword=112]="TrueKeyword",t[t.TryKeyword=113]="TryKeyword",t[t.TypeOfKeyword=114]="TypeOfKeyword",t[t.VarKeyword=115]="VarKeyword",t[t.VoidKeyword=116]="VoidKeyword",t[t.WhileKeyword=117]="WhileKeyword",t[t.WithKeyword=118]="WithKeyword",t[t.ImplementsKeyword=119]="ImplementsKeyword",t[t.InterfaceKeyword=120]="InterfaceKeyword",t[t.LetKeyword=121]="LetKeyword",t[t.PackageKeyword=122]="PackageKeyword",t[t.PrivateKeyword=123]="PrivateKeyword",t[t.ProtectedKeyword=124]="ProtectedKeyword",t[t.PublicKeyword=125]="PublicKeyword",t[t.StaticKeyword=126]="StaticKeyword",t[t.YieldKeyword=127]="YieldKeyword",t[t.AbstractKeyword=128]="AbstractKeyword",t[t.AccessorKeyword=129]="AccessorKeyword",t[t.AsKeyword=130]="AsKeyword",t[t.AssertsKeyword=131]="AssertsKeyword",t[t.AssertKeyword=132]="AssertKeyword",t[t.AnyKeyword=133]="AnyKeyword",t[t.AsyncKeyword=134]="AsyncKeyword",t[t.AwaitKeyword=135]="AwaitKeyword",t[t.BooleanKeyword=136]="BooleanKeyword",t[t.ConstructorKeyword=137]="ConstructorKeyword",t[t.DeclareKeyword=138]="DeclareKeyword",t[t.GetKeyword=139]="GetKeyword",t[t.InferKeyword=140]="InferKeyword",t[t.IntrinsicKeyword=141]="IntrinsicKeyword",t[t.IsKeyword=142]="IsKeyword",t[t.KeyOfKeyword=143]="KeyOfKeyword",t[t.ModuleKeyword=144]="ModuleKeyword",t[t.NamespaceKeyword=145]="NamespaceKeyword",t[t.NeverKeyword=146]="NeverKeyword",t[t.OutKeyword=147]="OutKeyword",t[t.ReadonlyKeyword=148]="ReadonlyKeyword",t[t.RequireKeyword=149]="RequireKeyword",t[t.NumberKeyword=150]="NumberKeyword",t[t.ObjectKeyword=151]="ObjectKeyword",t[t.SatisfiesKeyword=152]="SatisfiesKeyword",t[t.SetKeyword=153]="SetKeyword",t[t.StringKeyword=154]="StringKeyword",t[t.SymbolKeyword=155]="SymbolKeyword",t[t.TypeKeyword=156]="TypeKeyword",t[t.UndefinedKeyword=157]="UndefinedKeyword",t[t.UniqueKeyword=158]="UniqueKeyword",t[t.UnknownKeyword=159]="UnknownKeyword",t[t.UsingKeyword=160]="UsingKeyword",t[t.FromKeyword=161]="FromKeyword",t[t.GlobalKeyword=162]="GlobalKeyword",t[t.BigIntKeyword=163]="BigIntKeyword",t[t.OverrideKeyword=164]="OverrideKeyword",t[t.OfKeyword=165]="OfKeyword",t[t.QualifiedName=166]="QualifiedName",t[t.ComputedPropertyName=167]="ComputedPropertyName",t[t.TypeParameter=168]="TypeParameter",t[t.Parameter=169]="Parameter",t[t.Decorator=170]="Decorator",t[t.PropertySignature=171]="PropertySignature",t[t.PropertyDeclaration=172]="PropertyDeclaration",t[t.MethodSignature=173]="MethodSignature",t[t.MethodDeclaration=174]="MethodDeclaration",t[t.ClassStaticBlockDeclaration=175]="ClassStaticBlockDeclaration",t[t.Constructor=176]="Constructor",t[t.GetAccessor=177]="GetAccessor",t[t.SetAccessor=178]="SetAccessor",t[t.CallSignature=179]="CallSignature",t[t.ConstructSignature=180]="ConstructSignature",t[t.IndexSignature=181]="IndexSignature",t[t.TypePredicate=182]="TypePredicate",t[t.TypeReference=183]="TypeReference",t[t.FunctionType=184]="FunctionType",t[t.ConstructorType=185]="ConstructorType",t[t.TypeQuery=186]="TypeQuery",t[t.TypeLiteral=187]="TypeLiteral",t[t.ArrayType=188]="ArrayType",t[t.TupleType=189]="TupleType",t[t.OptionalType=190]="OptionalType",t[t.RestType=191]="RestType",t[t.UnionType=192]="UnionType",t[t.IntersectionType=193]="IntersectionType",t[t.ConditionalType=194]="ConditionalType",t[t.InferType=195]="InferType",t[t.ParenthesizedType=196]="ParenthesizedType",t[t.ThisType=197]="ThisType",t[t.TypeOperator=198]="TypeOperator",t[t.IndexedAccessType=199]="IndexedAccessType",t[t.MappedType=200]="MappedType",t[t.LiteralType=201]="LiteralType",t[t.NamedTupleMember=202]="NamedTupleMember",t[t.TemplateLiteralType=203]="TemplateLiteralType",t[t.TemplateLiteralTypeSpan=204]="TemplateLiteralTypeSpan",t[t.ImportType=205]="ImportType",t[t.ObjectBindingPattern=206]="ObjectBindingPattern",t[t.ArrayBindingPattern=207]="ArrayBindingPattern",t[t.BindingElement=208]="BindingElement",t[t.ArrayLiteralExpression=209]="ArrayLiteralExpression",t[t.ObjectLiteralExpression=210]="ObjectLiteralExpression",t[t.PropertyAccessExpression=211]="PropertyAccessExpression",t[t.ElementAccessExpression=212]="ElementAccessExpression",t[t.CallExpression=213]="CallExpression",t[t.NewExpression=214]="NewExpression",t[t.TaggedTemplateExpression=215]="TaggedTemplateExpression",t[t.TypeAssertionExpression=216]="TypeAssertionExpression",t[t.ParenthesizedExpression=217]="ParenthesizedExpression",t[t.FunctionExpression=218]="FunctionExpression",t[t.ArrowFunction=219]="ArrowFunction",t[t.DeleteExpression=220]="DeleteExpression",t[t.TypeOfExpression=221]="TypeOfExpression",t[t.VoidExpression=222]="VoidExpression",t[t.AwaitExpression=223]="AwaitExpression",t[t.PrefixUnaryExpression=224]="PrefixUnaryExpression",t[t.PostfixUnaryExpression=225]="PostfixUnaryExpression",t[t.BinaryExpression=226]="BinaryExpression",t[t.ConditionalExpression=227]="ConditionalExpression",t[t.TemplateExpression=228]="TemplateExpression",t[t.YieldExpression=229]="YieldExpression",t[t.SpreadElement=230]="SpreadElement",t[t.ClassExpression=231]="ClassExpression",t[t.OmittedExpression=232]="OmittedExpression",t[t.ExpressionWithTypeArguments=233]="ExpressionWithTypeArguments",t[t.AsExpression=234]="AsExpression",t[t.NonNullExpression=235]="NonNullExpression",t[t.MetaProperty=236]="MetaProperty",t[t.SyntheticExpression=237]="SyntheticExpression",t[t.SatisfiesExpression=238]="SatisfiesExpression",t[t.TemplateSpan=239]="TemplateSpan",t[t.SemicolonClassElement=240]="SemicolonClassElement",t[t.Block=241]="Block",t[t.EmptyStatement=242]="EmptyStatement",t[t.VariableStatement=243]="VariableStatement",t[t.ExpressionStatement=244]="ExpressionStatement",t[t.IfStatement=245]="IfStatement",t[t.DoStatement=246]="DoStatement",t[t.WhileStatement=247]="WhileStatement",t[t.ForStatement=248]="ForStatement",t[t.ForInStatement=249]="ForInStatement",t[t.ForOfStatement=250]="ForOfStatement",t[t.ContinueStatement=251]="ContinueStatement",t[t.BreakStatement=252]="BreakStatement",t[t.ReturnStatement=253]="ReturnStatement",t[t.WithStatement=254]="WithStatement",t[t.SwitchStatement=255]="SwitchStatement",t[t.LabeledStatement=256]="LabeledStatement",t[t.ThrowStatement=257]="ThrowStatement",t[t.TryStatement=258]="TryStatement",t[t.DebuggerStatement=259]="DebuggerStatement",t[t.VariableDeclaration=260]="VariableDeclaration",t[t.VariableDeclarationList=261]="VariableDeclarationList",t[t.FunctionDeclaration=262]="FunctionDeclaration",t[t.ClassDeclaration=263]="ClassDeclaration",t[t.InterfaceDeclaration=264]="InterfaceDeclaration",t[t.TypeAliasDeclaration=265]="TypeAliasDeclaration",t[t.EnumDeclaration=266]="EnumDeclaration",t[t.ModuleDeclaration=267]="ModuleDeclaration",t[t.ModuleBlock=268]="ModuleBlock",t[t.CaseBlock=269]="CaseBlock",t[t.NamespaceExportDeclaration=270]="NamespaceExportDeclaration",t[t.ImportEqualsDeclaration=271]="ImportEqualsDeclaration",t[t.ImportDeclaration=272]="ImportDeclaration",t[t.ImportClause=273]="ImportClause",t[t.NamespaceImport=274]="NamespaceImport",t[t.NamedImports=275]="NamedImports",t[t.ImportSpecifier=276]="ImportSpecifier",t[t.ExportAssignment=277]="ExportAssignment",t[t.ExportDeclaration=278]="ExportDeclaration",t[t.NamedExports=279]="NamedExports",t[t.NamespaceExport=280]="NamespaceExport",t[t.ExportSpecifier=281]="ExportSpecifier",t[t.MissingDeclaration=282]="MissingDeclaration",t[t.ExternalModuleReference=283]="ExternalModuleReference",t[t.JsxElement=284]="JsxElement",t[t.JsxSelfClosingElement=285]="JsxSelfClosingElement",t[t.JsxOpeningElement=286]="JsxOpeningElement",t[t.JsxClosingElement=287]="JsxClosingElement",t[t.JsxFragment=288]="JsxFragment",t[t.JsxOpeningFragment=289]="JsxOpeningFragment",t[t.JsxClosingFragment=290]="JsxClosingFragment",t[t.JsxAttribute=291]="JsxAttribute",t[t.JsxAttributes=292]="JsxAttributes",t[t.JsxSpreadAttribute=293]="JsxSpreadAttribute",t[t.JsxExpression=294]="JsxExpression",t[t.JsxNamespacedName=295]="JsxNamespacedName",t[t.CaseClause=296]="CaseClause",t[t.DefaultClause=297]="DefaultClause",t[t.HeritageClause=298]="HeritageClause",t[t.CatchClause=299]="CatchClause",t[t.ImportAttributes=300]="ImportAttributes",t[t.ImportAttribute=301]="ImportAttribute",t[t.AssertClause=300]="AssertClause",t[t.AssertEntry=301]="AssertEntry",t[t.ImportTypeAssertionContainer=302]="ImportTypeAssertionContainer",t[t.PropertyAssignment=303]="PropertyAssignment",t[t.ShorthandPropertyAssignment=304]="ShorthandPropertyAssignment",t[t.SpreadAssignment=305]="SpreadAssignment",t[t.EnumMember=306]="EnumMember",t[t.SourceFile=307]="SourceFile",t[t.Bundle=308]="Bundle",t[t.JSDocTypeExpression=309]="JSDocTypeExpression",t[t.JSDocNameReference=310]="JSDocNameReference",t[t.JSDocMemberName=311]="JSDocMemberName",t[t.JSDocAllType=312]="JSDocAllType",t[t.JSDocUnknownType=313]="JSDocUnknownType",t[t.JSDocNullableType=314]="JSDocNullableType",t[t.JSDocNonNullableType=315]="JSDocNonNullableType",t[t.JSDocOptionalType=316]="JSDocOptionalType",t[t.JSDocFunctionType=317]="JSDocFunctionType",t[t.JSDocVariadicType=318]="JSDocVariadicType",t[t.JSDocNamepathType=319]="JSDocNamepathType",t[t.JSDoc=320]="JSDoc",t[t.JSDocComment=320]="JSDocComment",t[t.JSDocText=321]="JSDocText",t[t.JSDocTypeLiteral=322]="JSDocTypeLiteral",t[t.JSDocSignature=323]="JSDocSignature",t[t.JSDocLink=324]="JSDocLink",t[t.JSDocLinkCode=325]="JSDocLinkCode",t[t.JSDocLinkPlain=326]="JSDocLinkPlain",t[t.JSDocTag=327]="JSDocTag",t[t.JSDocAugmentsTag=328]="JSDocAugmentsTag",t[t.JSDocImplementsTag=329]="JSDocImplementsTag",t[t.JSDocAuthorTag=330]="JSDocAuthorTag",t[t.JSDocDeprecatedTag=331]="JSDocDeprecatedTag",t[t.JSDocClassTag=332]="JSDocClassTag",t[t.JSDocPublicTag=333]="JSDocPublicTag",t[t.JSDocPrivateTag=334]="JSDocPrivateTag",t[t.JSDocProtectedTag=335]="JSDocProtectedTag",t[t.JSDocReadonlyTag=336]="JSDocReadonlyTag",t[t.JSDocOverrideTag=337]="JSDocOverrideTag",t[t.JSDocCallbackTag=338]="JSDocCallbackTag",t[t.JSDocOverloadTag=339]="JSDocOverloadTag",t[t.JSDocEnumTag=340]="JSDocEnumTag",t[t.JSDocParameterTag=341]="JSDocParameterTag",t[t.JSDocReturnTag=342]="JSDocReturnTag",t[t.JSDocThisTag=343]="JSDocThisTag",t[t.JSDocTypeTag=344]="JSDocTypeTag",t[t.JSDocTemplateTag=345]="JSDocTemplateTag",t[t.JSDocTypedefTag=346]="JSDocTypedefTag",t[t.JSDocSeeTag=347]="JSDocSeeTag",t[t.JSDocPropertyTag=348]="JSDocPropertyTag",t[t.JSDocThrowsTag=349]="JSDocThrowsTag",t[t.JSDocSatisfiesTag=350]="JSDocSatisfiesTag",t[t.JSDocImportTag=351]="JSDocImportTag",t[t.SyntaxList=352]="SyntaxList",t[t.NotEmittedStatement=353]="NotEmittedStatement",t[t.PartiallyEmittedExpression=354]="PartiallyEmittedExpression",t[t.CommaListExpression=355]="CommaListExpression",t[t.SyntheticReferenceExpression=356]="SyntheticReferenceExpression",t[t.Count=357]="Count",t[t.FirstAssignment=64]="FirstAssignment",t[t.LastAssignment=79]="LastAssignment",t[t.FirstCompoundAssignment=65]="FirstCompoundAssignment",t[t.LastCompoundAssignment=79]="LastCompoundAssignment",t[t.FirstReservedWord=83]="FirstReservedWord",t[t.LastReservedWord=118]="LastReservedWord",t[t.FirstKeyword=83]="FirstKeyword",t[t.LastKeyword=165]="LastKeyword",t[t.FirstFutureReservedWord=119]="FirstFutureReservedWord",t[t.LastFutureReservedWord=127]="LastFutureReservedWord",t[t.FirstTypeNode=182]="FirstTypeNode",t[t.LastTypeNode=205]="LastTypeNode",t[t.FirstPunctuation=19]="FirstPunctuation",t[t.LastPunctuation=79]="LastPunctuation",t[t.FirstToken=0]="FirstToken",t[t.LastToken=165]="LastToken",t[t.FirstTriviaToken=2]="FirstTriviaToken",t[t.LastTriviaToken=7]="LastTriviaToken",t[t.FirstLiteralToken=9]="FirstLiteralToken",t[t.LastLiteralToken=15]="LastLiteralToken",t[t.FirstTemplateToken=15]="FirstTemplateToken",t[t.LastTemplateToken=18]="LastTemplateToken",t[t.FirstBinaryOperator=30]="FirstBinaryOperator",t[t.LastBinaryOperator=79]="LastBinaryOperator",t[t.FirstStatement=243]="FirstStatement",t[t.LastStatement=259]="LastStatement",t[t.FirstNode=166]="FirstNode",t[t.FirstJSDocNode=309]="FirstJSDocNode",t[t.LastJSDocNode=351]="LastJSDocNode",t[t.FirstJSDocTagNode=327]="FirstJSDocTagNode",t[t.LastJSDocTagNode=351]="LastJSDocTagNode",t[t.FirstContextualKeyword=128]="FirstContextualKeyword",t[t.LastContextualKeyword=165]="LastContextualKeyword",t))(xre||{}),kre=(t=>(t[t.None=0]="None",t[t.Let=1]="Let",t[t.Const=2]="Const",t[t.Using=4]="Using",t[t.AwaitUsing=6]="AwaitUsing",t[t.NestedNamespace=8]="NestedNamespace",t[t.Synthesized=16]="Synthesized",t[t.Namespace=32]="Namespace",t[t.OptionalChain=64]="OptionalChain",t[t.ExportContext=128]="ExportContext",t[t.ContainsThis=256]="ContainsThis",t[t.HasImplicitReturn=512]="HasImplicitReturn",t[t.HasExplicitReturn=1024]="HasExplicitReturn",t[t.GlobalAugmentation=2048]="GlobalAugmentation",t[t.HasAsyncFunctions=4096]="HasAsyncFunctions",t[t.DisallowInContext=8192]="DisallowInContext",t[t.YieldContext=16384]="YieldContext",t[t.DecoratorContext=32768]="DecoratorContext",t[t.AwaitContext=65536]="AwaitContext",t[t.DisallowConditionalTypesContext=131072]="DisallowConditionalTypesContext",t[t.ThisNodeHasError=262144]="ThisNodeHasError",t[t.JavaScriptFile=524288]="JavaScriptFile",t[t.ThisNodeOrAnySubNodesHasError=1048576]="ThisNodeOrAnySubNodesHasError",t[t.HasAggregatedChildData=2097152]="HasAggregatedChildData",t[t.PossiblyContainsDynamicImport=4194304]="PossiblyContainsDynamicImport",t[t.PossiblyContainsImportMeta=8388608]="PossiblyContainsImportMeta",t[t.JSDoc=16777216]="JSDoc",t[t.Ambient=33554432]="Ambient",t[t.InWithStatement=67108864]="InWithStatement",t[t.JsonFile=134217728]="JsonFile",t[t.TypeCached=268435456]="TypeCached",t[t.Deprecated=536870912]="Deprecated",t[t.BlockScoped=7]="BlockScoped",t[t.Constant=6]="Constant",t[t.ReachabilityCheckFlags=1536]="ReachabilityCheckFlags",t[t.ReachabilityAndEmitFlags=5632]="ReachabilityAndEmitFlags",t[t.ContextFlags=101441536]="ContextFlags",t[t.TypeExcludesFlags=81920]="TypeExcludesFlags",t[t.PermanentlySetIncrementalFlags=12582912]="PermanentlySetIncrementalFlags",t[t.IdentifierHasExtendedUnicodeEscape=256]="IdentifierHasExtendedUnicodeEscape",t[t.IdentifierIsInJSDocNamespace=4096]="IdentifierIsInJSDocNamespace",t))(kre||{}),Tre=(t=>(t[t.None=0]="None",t[t.Public=1]="Public",t[t.Private=2]="Private",t[t.Protected=4]="Protected",t[t.Readonly=8]="Readonly",t[t.Override=16]="Override",t[t.Export=32]="Export",t[t.Abstract=64]="Abstract",t[t.Ambient=128]="Ambient",t[t.Static=256]="Static",t[t.Accessor=512]="Accessor",t[t.Async=1024]="Async",t[t.Default=2048]="Default",t[t.Const=4096]="Const",t[t.In=8192]="In",t[t.Out=16384]="Out",t[t.Decorator=32768]="Decorator",t[t.Deprecated=65536]="Deprecated",t[t.JSDocPublic=8388608]="JSDocPublic",t[t.JSDocPrivate=16777216]="JSDocPrivate",t[t.JSDocProtected=33554432]="JSDocProtected",t[t.JSDocReadonly=67108864]="JSDocReadonly",t[t.JSDocOverride=134217728]="JSDocOverride",t[t.SyntacticOrJSDocModifiers=31]="SyntacticOrJSDocModifiers",t[t.SyntacticOnlyModifiers=65504]="SyntacticOnlyModifiers",t[t.SyntacticModifiers=65535]="SyntacticModifiers",t[t.JSDocCacheOnlyModifiers=260046848]="JSDocCacheOnlyModifiers",t[t.JSDocOnlyModifiers=65536]="JSDocOnlyModifiers",t[t.NonCacheOnlyModifiers=131071]="NonCacheOnlyModifiers",t[t.HasComputedJSDocModifiers=268435456]="HasComputedJSDocModifiers",t[t.HasComputedFlags=536870912]="HasComputedFlags",t[t.AccessibilityModifier=7]="AccessibilityModifier",t[t.ParameterPropertyModifier=31]="ParameterPropertyModifier",t[t.NonPublicAccessibilityModifier=6]="NonPublicAccessibilityModifier",t[t.TypeScriptModifier=28895]="TypeScriptModifier",t[t.ExportDefault=2080]="ExportDefault",t[t.All=131071]="All",t[t.Modifier=98303]="Modifier",t))(Tre||{}),yCe=(t=>(t[t.None=0]="None",t[t.IntrinsicNamedElement=1]="IntrinsicNamedElement",t[t.IntrinsicIndexedElement=2]="IntrinsicIndexedElement",t[t.IntrinsicElement=3]="IntrinsicElement",t))(yCe||{}),Dre=(t=>(t[t.None=0]="None",t[t.Succeeded=1]="Succeeded",t[t.Failed=2]="Failed",t[t.Reported=4]="Reported",t[t.ReportsUnmeasurable=8]="ReportsUnmeasurable",t[t.ReportsUnreliable=16]="ReportsUnreliable",t[t.ReportsMask=24]="ReportsMask",t))(Dre||{}),Ere=(t=>(t[t.None=0]="None",t[t.Auto=1]="Auto",t[t.Loop=2]="Loop",t[t.Unique=3]="Unique",t[t.Node=4]="Node",t[t.KindMask=7]="KindMask",t[t.ReservedInNestedScopes=8]="ReservedInNestedScopes",t[t.Optimistic=16]="Optimistic",t[t.FileLevel=32]="FileLevel",t[t.AllowNameSubstitution=64]="AllowNameSubstitution",t))(Ere||{}),bCe=(t=>(t[t.None=0]="None",t[t.HasIndices=1]="HasIndices",t[t.Global=2]="Global",t[t.IgnoreCase=4]="IgnoreCase",t[t.Multiline=8]="Multiline",t[t.DotAll=16]="DotAll",t[t.Unicode=32]="Unicode",t[t.UnicodeSets=64]="UnicodeSets",t[t.Sticky=128]="Sticky",t[t.AnyUnicodeMode=96]="AnyUnicodeMode",t[t.Modifiers=28]="Modifiers",t))(bCe||{}),CCe=(t=>(t[t.None=0]="None",t[t.PrecedingLineBreak=1]="PrecedingLineBreak",t[t.PrecedingJSDocComment=2]="PrecedingJSDocComment",t[t.Unterminated=4]="Unterminated",t[t.ExtendedUnicodeEscape=8]="ExtendedUnicodeEscape",t[t.Scientific=16]="Scientific",t[t.Octal=32]="Octal",t[t.HexSpecifier=64]="HexSpecifier",t[t.BinarySpecifier=128]="BinarySpecifier",t[t.OctalSpecifier=256]="OctalSpecifier",t[t.ContainsSeparator=512]="ContainsSeparator",t[t.UnicodeEscape=1024]="UnicodeEscape",t[t.ContainsInvalidEscape=2048]="ContainsInvalidEscape",t[t.HexEscape=4096]="HexEscape",t[t.ContainsLeadingZero=8192]="ContainsLeadingZero",t[t.ContainsInvalidSeparator=16384]="ContainsInvalidSeparator",t[t.BinaryOrOctalSpecifier=384]="BinaryOrOctalSpecifier",t[t.WithSpecifier=448]="WithSpecifier",t[t.StringLiteralFlags=7176]="StringLiteralFlags",t[t.NumericLiteralFlags=25584]="NumericLiteralFlags",t[t.TemplateLiteralLikeFlags=7176]="TemplateLiteralLikeFlags",t[t.IsInvalid=26656]="IsInvalid",t))(CCe||{}),p$=(t=>(t[t.Unreachable=1]="Unreachable",t[t.Start=2]="Start",t[t.BranchLabel=4]="BranchLabel",t[t.LoopLabel=8]="LoopLabel",t[t.Assignment=16]="Assignment",t[t.TrueCondition=32]="TrueCondition",t[t.FalseCondition=64]="FalseCondition",t[t.SwitchClause=128]="SwitchClause",t[t.ArrayMutation=256]="ArrayMutation",t[t.Call=512]="Call",t[t.ReduceLabel=1024]="ReduceLabel",t[t.Referenced=2048]="Referenced",t[t.Shared=4096]="Shared",t[t.Label=12]="Label",t[t.Condition=96]="Condition",t))(p$||{}),SCe=(t=>(t[t.ExpectError=0]="ExpectError",t[t.Ignore=1]="Ignore",t))(SCe||{}),UR=class{},Ire=(t=>(t[t.RootFile=0]="RootFile",t[t.SourceFromProjectReference=1]="SourceFromProjectReference",t[t.OutputFromProjectReference=2]="OutputFromProjectReference",t[t.Import=3]="Import",t[t.ReferenceFile=4]="ReferenceFile",t[t.TypeReferenceDirective=5]="TypeReferenceDirective",t[t.LibFile=6]="LibFile",t[t.LibReferenceDirective=7]="LibReferenceDirective",t[t.AutomaticTypeDirectiveFile=8]="AutomaticTypeDirectiveFile",t))(Ire||{}),wCe=(t=>(t[t.FilePreprocessingLibReferenceDiagnostic=0]="FilePreprocessingLibReferenceDiagnostic",t[t.FilePreprocessingFileExplainingDiagnostic=1]="FilePreprocessingFileExplainingDiagnostic",t[t.ResolutionDiagnostics=2]="ResolutionDiagnostics",t))(wCe||{}),xCe=(t=>(t[t.Js=0]="Js",t[t.Dts=1]="Dts",t[t.BuilderSignature=2]="BuilderSignature",t))(xCe||{}),Nre=(t=>(t[t.Not=0]="Not",t[t.SafeModules=1]="SafeModules",t[t.Completely=2]="Completely",t))(Nre||{}),kCe=(t=>(t[t.Success=0]="Success",t[t.DiagnosticsPresent_OutputsSkipped=1]="DiagnosticsPresent_OutputsSkipped",t[t.DiagnosticsPresent_OutputsGenerated=2]="DiagnosticsPresent_OutputsGenerated",t[t.InvalidProject_OutputsSkipped=3]="InvalidProject_OutputsSkipped",t[t.ProjectReferenceCycle_OutputsSkipped=4]="ProjectReferenceCycle_OutputsSkipped",t))(kCe||{}),TCe=(t=>(t[t.Ok=0]="Ok",t[t.NeedsOverride=1]="NeedsOverride",t[t.HasInvalidOverride=2]="HasInvalidOverride",t))(TCe||{}),DCe=(t=>(t[t.None=0]="None",t[t.Literal=1]="Literal",t[t.Subtype=2]="Subtype",t))(DCe||{}),ECe=(t=>(t[t.None=0]="None",t[t.NoSupertypeReduction=1]="NoSupertypeReduction",t[t.NoConstraintReduction=2]="NoConstraintReduction",t))(ECe||{}),ICe=(t=>(t[t.None=0]="None",t[t.Signature=1]="Signature",t[t.NoConstraints=2]="NoConstraints",t[t.Completions=4]="Completions",t[t.SkipBindingPatterns=8]="SkipBindingPatterns",t))(ICe||{}),NCe=(t=>(t[t.None=0]="None",t[t.NoTruncation=1]="NoTruncation",t[t.WriteArrayAsGenericType=2]="WriteArrayAsGenericType",t[t.GenerateNamesForShadowedTypeParams=4]="GenerateNamesForShadowedTypeParams",t[t.UseStructuralFallback=8]="UseStructuralFallback",t[t.ForbidIndexedAccessSymbolReferences=16]="ForbidIndexedAccessSymbolReferences",t[t.WriteTypeArgumentsOfSignature=32]="WriteTypeArgumentsOfSignature",t[t.UseFullyQualifiedType=64]="UseFullyQualifiedType",t[t.UseOnlyExternalAliasing=128]="UseOnlyExternalAliasing",t[t.SuppressAnyReturnType=256]="SuppressAnyReturnType",t[t.WriteTypeParametersInQualifiedName=512]="WriteTypeParametersInQualifiedName",t[t.MultilineObjectLiterals=1024]="MultilineObjectLiterals",t[t.WriteClassExpressionAsTypeLiteral=2048]="WriteClassExpressionAsTypeLiteral",t[t.UseTypeOfFunction=4096]="UseTypeOfFunction",t[t.OmitParameterModifiers=8192]="OmitParameterModifiers",t[t.UseAliasDefinedOutsideCurrentScope=16384]="UseAliasDefinedOutsideCurrentScope",t[t.UseSingleQuotesForStringLiteralType=268435456]="UseSingleQuotesForStringLiteralType",t[t.NoTypeReduction=536870912]="NoTypeReduction",t[t.OmitThisParameter=33554432]="OmitThisParameter",t[t.AllowThisInObjectLiteral=32768]="AllowThisInObjectLiteral",t[t.AllowQualifiedNameInPlaceOfIdentifier=65536]="AllowQualifiedNameInPlaceOfIdentifier",t[t.AllowAnonymousIdentifier=131072]="AllowAnonymousIdentifier",t[t.AllowEmptyUnionOrIntersection=262144]="AllowEmptyUnionOrIntersection",t[t.AllowEmptyTuple=524288]="AllowEmptyTuple",t[t.AllowUniqueESSymbolType=1048576]="AllowUniqueESSymbolType",t[t.AllowEmptyIndexInfoType=2097152]="AllowEmptyIndexInfoType",t[t.WriteComputedProps=1073741824]="WriteComputedProps",t[t.NoSyntacticPrinter=-2147483648]="NoSyntacticPrinter",t[t.AllowNodeModulesRelativePaths=67108864]="AllowNodeModulesRelativePaths",t[t.DoNotIncludeSymbolChain=134217728]="DoNotIncludeSymbolChain",t[t.AllowUnresolvedNames=1]="AllowUnresolvedNames",t[t.IgnoreErrors=70221824]="IgnoreErrors",t[t.InObjectTypeLiteral=4194304]="InObjectTypeLiteral",t[t.InTypeAlias=8388608]="InTypeAlias",t[t.InInitialEntityName=16777216]="InInitialEntityName",t))(NCe||{}),LCe=(t=>(t[t.None=0]="None",t[t.NoTruncation=1]="NoTruncation",t[t.WriteArrayAsGenericType=2]="WriteArrayAsGenericType",t[t.GenerateNamesForShadowedTypeParams=4]="GenerateNamesForShadowedTypeParams",t[t.UseStructuralFallback=8]="UseStructuralFallback",t[t.WriteTypeArgumentsOfSignature=32]="WriteTypeArgumentsOfSignature",t[t.UseFullyQualifiedType=64]="UseFullyQualifiedType",t[t.SuppressAnyReturnType=256]="SuppressAnyReturnType",t[t.MultilineObjectLiterals=1024]="MultilineObjectLiterals",t[t.WriteClassExpressionAsTypeLiteral=2048]="WriteClassExpressionAsTypeLiteral",t[t.UseTypeOfFunction=4096]="UseTypeOfFunction",t[t.OmitParameterModifiers=8192]="OmitParameterModifiers",t[t.UseAliasDefinedOutsideCurrentScope=16384]="UseAliasDefinedOutsideCurrentScope",t[t.UseSingleQuotesForStringLiteralType=268435456]="UseSingleQuotesForStringLiteralType",t[t.NoTypeReduction=536870912]="NoTypeReduction",t[t.OmitThisParameter=33554432]="OmitThisParameter",t[t.AllowUniqueESSymbolType=1048576]="AllowUniqueESSymbolType",t[t.AddUndefined=131072]="AddUndefined",t[t.WriteArrowStyleSignature=262144]="WriteArrowStyleSignature",t[t.InArrayType=524288]="InArrayType",t[t.InElementType=2097152]="InElementType",t[t.InFirstTypeArgument=4194304]="InFirstTypeArgument",t[t.InTypeAlias=8388608]="InTypeAlias",t[t.NodeBuilderFlagsMask=848330095]="NodeBuilderFlagsMask",t))(LCe||{}),PCe=(t=>(t[t.None=0]="None",t[t.WriteTypeParametersOrArguments=1]="WriteTypeParametersOrArguments",t[t.UseOnlyExternalAliasing=2]="UseOnlyExternalAliasing",t[t.AllowAnyNodeKind=4]="AllowAnyNodeKind",t[t.UseAliasDefinedOutsideCurrentScope=8]="UseAliasDefinedOutsideCurrentScope",t[t.WriteComputedProps=16]="WriteComputedProps",t[t.DoNotIncludeSymbolChain=32]="DoNotIncludeSymbolChain",t))(PCe||{}),ACe=(t=>(t[t.Accessible=0]="Accessible",t[t.NotAccessible=1]="NotAccessible",t[t.CannotBeNamed=2]="CannotBeNamed",t[t.NotResolved=3]="NotResolved",t))(ACe||{}),OCe=(t=>(t[t.UnionOrIntersection=0]="UnionOrIntersection",t[t.Spread=1]="Spread",t))(OCe||{}),MCe=(t=>(t[t.This=0]="This",t[t.Identifier=1]="Identifier",t[t.AssertsThis=2]="AssertsThis",t[t.AssertsIdentifier=3]="AssertsIdentifier",t))(MCe||{}),RCe=(t=>(t[t.Unknown=0]="Unknown",t[t.TypeWithConstructSignatureAndValue=1]="TypeWithConstructSignatureAndValue",t[t.VoidNullableOrNeverType=2]="VoidNullableOrNeverType",t[t.NumberLikeType=3]="NumberLikeType",t[t.BigIntLikeType=4]="BigIntLikeType",t[t.StringLikeType=5]="StringLikeType",t[t.BooleanType=6]="BooleanType",t[t.ArrayLikeType=7]="ArrayLikeType",t[t.ESSymbolType=8]="ESSymbolType",t[t.Promise=9]="Promise",t[t.TypeWithCallSignature=10]="TypeWithCallSignature",t[t.ObjectType=11]="ObjectType",t))(RCe||{}),Lre=(t=>(t[t.None=0]="None",t[t.FunctionScopedVariable=1]="FunctionScopedVariable",t[t.BlockScopedVariable=2]="BlockScopedVariable",t[t.Property=4]="Property",t[t.EnumMember=8]="EnumMember",t[t.Function=16]="Function",t[t.Class=32]="Class",t[t.Interface=64]="Interface",t[t.ConstEnum=128]="ConstEnum",t[t.RegularEnum=256]="RegularEnum",t[t.ValueModule=512]="ValueModule",t[t.NamespaceModule=1024]="NamespaceModule",t[t.TypeLiteral=2048]="TypeLiteral",t[t.ObjectLiteral=4096]="ObjectLiteral",t[t.Method=8192]="Method",t[t.Constructor=16384]="Constructor",t[t.GetAccessor=32768]="GetAccessor",t[t.SetAccessor=65536]="SetAccessor",t[t.Signature=131072]="Signature",t[t.TypeParameter=262144]="TypeParameter",t[t.TypeAlias=524288]="TypeAlias",t[t.ExportValue=1048576]="ExportValue",t[t.Alias=2097152]="Alias",t[t.Prototype=4194304]="Prototype",t[t.ExportStar=8388608]="ExportStar",t[t.Optional=16777216]="Optional",t[t.Transient=33554432]="Transient",t[t.Assignment=67108864]="Assignment",t[t.ModuleExports=134217728]="ModuleExports",t[t.All=-1]="All",t[t.Enum=384]="Enum",t[t.Variable=3]="Variable",t[t.Value=111551]="Value",t[t.Type=788968]="Type",t[t.Namespace=1920]="Namespace",t[t.Module=1536]="Module",t[t.Accessor=98304]="Accessor",t[t.FunctionScopedVariableExcludes=111550]="FunctionScopedVariableExcludes",t[t.BlockScopedVariableExcludes=111551]="BlockScopedVariableExcludes",t[t.ParameterExcludes=111551]="ParameterExcludes",t[t.PropertyExcludes=0]="PropertyExcludes",t[t.EnumMemberExcludes=900095]="EnumMemberExcludes",t[t.FunctionExcludes=110991]="FunctionExcludes",t[t.ClassExcludes=899503]="ClassExcludes",t[t.InterfaceExcludes=788872]="InterfaceExcludes",t[t.RegularEnumExcludes=899327]="RegularEnumExcludes",t[t.ConstEnumExcludes=899967]="ConstEnumExcludes",t[t.ValueModuleExcludes=110735]="ValueModuleExcludes",t[t.NamespaceModuleExcludes=0]="NamespaceModuleExcludes",t[t.MethodExcludes=103359]="MethodExcludes",t[t.GetAccessorExcludes=46015]="GetAccessorExcludes",t[t.SetAccessorExcludes=78783]="SetAccessorExcludes",t[t.AccessorExcludes=13247]="AccessorExcludes",t[t.TypeParameterExcludes=526824]="TypeParameterExcludes",t[t.TypeAliasExcludes=788968]="TypeAliasExcludes",t[t.AliasExcludes=2097152]="AliasExcludes",t[t.ModuleMember=2623475]="ModuleMember",t[t.ExportHasLocal=944]="ExportHasLocal",t[t.BlockScoped=418]="BlockScoped",t[t.PropertyOrAccessor=98308]="PropertyOrAccessor",t[t.ClassMember=106500]="ClassMember",t[t.ExportSupportsDefaultModifier=112]="ExportSupportsDefaultModifier",t[t.ExportDoesNotSupportDefaultModifier=-113]="ExportDoesNotSupportDefaultModifier",t[t.Classifiable=2885600]="Classifiable",t[t.LateBindingContainer=6256]="LateBindingContainer",t))(Lre||{}),FCe=(t=>(t[t.None=0]="None",t[t.Instantiated=1]="Instantiated",t[t.SyntheticProperty=2]="SyntheticProperty",t[t.SyntheticMethod=4]="SyntheticMethod",t[t.Readonly=8]="Readonly",t[t.ReadPartial=16]="ReadPartial",t[t.WritePartial=32]="WritePartial",t[t.HasNonUniformType=64]="HasNonUniformType",t[t.HasLiteralType=128]="HasLiteralType",t[t.ContainsPublic=256]="ContainsPublic",t[t.ContainsProtected=512]="ContainsProtected",t[t.ContainsPrivate=1024]="ContainsPrivate",t[t.ContainsStatic=2048]="ContainsStatic",t[t.Late=4096]="Late",t[t.ReverseMapped=8192]="ReverseMapped",t[t.OptionalParameter=16384]="OptionalParameter",t[t.RestParameter=32768]="RestParameter",t[t.DeferredType=65536]="DeferredType",t[t.HasNeverType=131072]="HasNeverType",t[t.Mapped=262144]="Mapped",t[t.StripOptional=524288]="StripOptional",t[t.Unresolved=1048576]="Unresolved",t[t.Synthetic=6]="Synthetic",t[t.Discriminant=192]="Discriminant",t[t.Partial=48]="Partial",t))(FCe||{}),BCe=(t=>(t.Call="__call",t.Constructor="__constructor",t.New="__new",t.Index="__index",t.ExportStar="__export",t.Global="__global",t.Missing="__missing",t.Type="__type",t.Object="__object",t.JSXAttributes="__jsxAttributes",t.Class="__class",t.Function="__function",t.Computed="__computed",t.Resolving="__resolving__",t.ExportEquals="export=",t.Default="default",t.This="this",t.InstantiationExpression="__instantiationExpression",t.ImportAttributes="__importAttributes",t))(BCe||{}),Pre=(t=>(t[t.None=0]="None",t[t.TypeChecked=1]="TypeChecked",t[t.LexicalThis=2]="LexicalThis",t[t.CaptureThis=4]="CaptureThis",t[t.CaptureNewTarget=8]="CaptureNewTarget",t[t.SuperInstance=16]="SuperInstance",t[t.SuperStatic=32]="SuperStatic",t[t.ContextChecked=64]="ContextChecked",t[t.MethodWithSuperPropertyAccessInAsync=128]="MethodWithSuperPropertyAccessInAsync",t[t.MethodWithSuperPropertyAssignmentInAsync=256]="MethodWithSuperPropertyAssignmentInAsync",t[t.CaptureArguments=512]="CaptureArguments",t[t.EnumValuesComputed=1024]="EnumValuesComputed",t[t.LexicalModuleMergesWithClass=2048]="LexicalModuleMergesWithClass",t[t.LoopWithCapturedBlockScopedBinding=4096]="LoopWithCapturedBlockScopedBinding",t[t.ContainsCapturedBlockScopeBinding=8192]="ContainsCapturedBlockScopeBinding",t[t.CapturedBlockScopedBinding=16384]="CapturedBlockScopedBinding",t[t.BlockScopedBindingInLoop=32768]="BlockScopedBindingInLoop",t[t.NeedsLoopOutParameter=65536]="NeedsLoopOutParameter",t[t.AssignmentsMarked=131072]="AssignmentsMarked",t[t.ContainsConstructorReference=262144]="ContainsConstructorReference",t[t.ConstructorReference=536870912]="ConstructorReference",t[t.ContainsClassWithPrivateIdentifiers=1048576]="ContainsClassWithPrivateIdentifiers",t[t.ContainsSuperPropertyInStaticInitializer=2097152]="ContainsSuperPropertyInStaticInitializer",t[t.InCheckIdentifier=4194304]="InCheckIdentifier",t[t.LazyFlags=539358128]="LazyFlags",t))(Pre||{}),Are=(t=>(t[t.Any=1]="Any",t[t.Unknown=2]="Unknown",t[t.String=4]="String",t[t.Number=8]="Number",t[t.Boolean=16]="Boolean",t[t.Enum=32]="Enum",t[t.BigInt=64]="BigInt",t[t.StringLiteral=128]="StringLiteral",t[t.NumberLiteral=256]="NumberLiteral",t[t.BooleanLiteral=512]="BooleanLiteral",t[t.EnumLiteral=1024]="EnumLiteral",t[t.BigIntLiteral=2048]="BigIntLiteral",t[t.ESSymbol=4096]="ESSymbol",t[t.UniqueESSymbol=8192]="UniqueESSymbol",t[t.Void=16384]="Void",t[t.Undefined=32768]="Undefined",t[t.Null=65536]="Null",t[t.Never=131072]="Never",t[t.TypeParameter=262144]="TypeParameter",t[t.Object=524288]="Object",t[t.Union=1048576]="Union",t[t.Intersection=2097152]="Intersection",t[t.Index=4194304]="Index",t[t.IndexedAccess=8388608]="IndexedAccess",t[t.Conditional=16777216]="Conditional",t[t.Substitution=33554432]="Substitution",t[t.NonPrimitive=67108864]="NonPrimitive",t[t.TemplateLiteral=134217728]="TemplateLiteral",t[t.StringMapping=268435456]="StringMapping",t[t.Reserved1=536870912]="Reserved1",t[t.Reserved2=1073741824]="Reserved2",t[t.AnyOrUnknown=3]="AnyOrUnknown",t[t.Nullable=98304]="Nullable",t[t.Literal=2944]="Literal",t[t.Unit=109472]="Unit",t[t.Freshable=2976]="Freshable",t[t.StringOrNumberLiteral=384]="StringOrNumberLiteral",t[t.StringOrNumberLiteralOrUnique=8576]="StringOrNumberLiteralOrUnique",t[t.DefinitelyFalsy=117632]="DefinitelyFalsy",t[t.PossiblyFalsy=117724]="PossiblyFalsy",t[t.Intrinsic=67359327]="Intrinsic",t[t.StringLike=402653316]="StringLike",t[t.NumberLike=296]="NumberLike",t[t.BigIntLike=2112]="BigIntLike",t[t.BooleanLike=528]="BooleanLike",t[t.EnumLike=1056]="EnumLike",t[t.ESSymbolLike=12288]="ESSymbolLike",t[t.VoidLike=49152]="VoidLike",t[t.Primitive=402784252]="Primitive",t[t.DefinitelyNonNullable=470302716]="DefinitelyNonNullable",t[t.DisjointDomains=469892092]="DisjointDomains",t[t.UnionOrIntersection=3145728]="UnionOrIntersection",t[t.StructuredType=3670016]="StructuredType",t[t.TypeVariable=8650752]="TypeVariable",t[t.InstantiableNonPrimitive=58982400]="InstantiableNonPrimitive",t[t.InstantiablePrimitive=406847488]="InstantiablePrimitive",t[t.Instantiable=465829888]="Instantiable",t[t.StructuredOrInstantiable=469499904]="StructuredOrInstantiable",t[t.ObjectFlagsType=3899393]="ObjectFlagsType",t[t.Simplifiable=25165824]="Simplifiable",t[t.Singleton=67358815]="Singleton",t[t.Narrowable=536624127]="Narrowable",t[t.IncludesMask=473694207]="IncludesMask",t[t.IncludesMissingType=262144]="IncludesMissingType",t[t.IncludesNonWideningType=4194304]="IncludesNonWideningType",t[t.IncludesWildcard=8388608]="IncludesWildcard",t[t.IncludesEmptyObject=16777216]="IncludesEmptyObject",t[t.IncludesInstantiable=33554432]="IncludesInstantiable",t[t.IncludesConstrainedTypeVariable=536870912]="IncludesConstrainedTypeVariable",t[t.IncludesError=1073741824]="IncludesError",t[t.NotPrimitiveUnion=36323331]="NotPrimitiveUnion",t))(Are||{}),Ore=(t=>(t[t.None=0]="None",t[t.Class=1]="Class",t[t.Interface=2]="Interface",t[t.Reference=4]="Reference",t[t.Tuple=8]="Tuple",t[t.Anonymous=16]="Anonymous",t[t.Mapped=32]="Mapped",t[t.Instantiated=64]="Instantiated",t[t.ObjectLiteral=128]="ObjectLiteral",t[t.EvolvingArray=256]="EvolvingArray",t[t.ObjectLiteralPatternWithComputedProperties=512]="ObjectLiteralPatternWithComputedProperties",t[t.ReverseMapped=1024]="ReverseMapped",t[t.JsxAttributes=2048]="JsxAttributes",t[t.JSLiteral=4096]="JSLiteral",t[t.FreshLiteral=8192]="FreshLiteral",t[t.ArrayLiteral=16384]="ArrayLiteral",t[t.PrimitiveUnion=32768]="PrimitiveUnion",t[t.ContainsWideningType=65536]="ContainsWideningType",t[t.ContainsObjectOrArrayLiteral=131072]="ContainsObjectOrArrayLiteral",t[t.NonInferrableType=262144]="NonInferrableType",t[t.CouldContainTypeVariablesComputed=524288]="CouldContainTypeVariablesComputed",t[t.CouldContainTypeVariables=1048576]="CouldContainTypeVariables",t[t.ClassOrInterface=3]="ClassOrInterface",t[t.RequiresWidening=196608]="RequiresWidening",t[t.PropagatingFlags=458752]="PropagatingFlags",t[t.InstantiatedMapped=96]="InstantiatedMapped",t[t.ObjectTypeKindMask=1343]="ObjectTypeKindMask",t[t.ContainsSpread=2097152]="ContainsSpread",t[t.ObjectRestType=4194304]="ObjectRestType",t[t.InstantiationExpressionType=8388608]="InstantiationExpressionType",t[t.SingleSignatureType=134217728]="SingleSignatureType",t[t.IsClassInstanceClone=16777216]="IsClassInstanceClone",t[t.IdenticalBaseTypeCalculated=33554432]="IdenticalBaseTypeCalculated",t[t.IdenticalBaseTypeExists=67108864]="IdenticalBaseTypeExists",t[t.IsGenericTypeComputed=2097152]="IsGenericTypeComputed",t[t.IsGenericObjectType=4194304]="IsGenericObjectType",t[t.IsGenericIndexType=8388608]="IsGenericIndexType",t[t.IsGenericType=12582912]="IsGenericType",t[t.ContainsIntersections=16777216]="ContainsIntersections",t[t.IsUnknownLikeUnionComputed=33554432]="IsUnknownLikeUnionComputed",t[t.IsUnknownLikeUnion=67108864]="IsUnknownLikeUnion",t[t.IsNeverIntersectionComputed=16777216]="IsNeverIntersectionComputed",t[t.IsNeverIntersection=33554432]="IsNeverIntersection",t[t.IsConstrainedTypeVariable=67108864]="IsConstrainedTypeVariable",t))(Ore||{}),WCe=(t=>(t[t.Invariant=0]="Invariant",t[t.Covariant=1]="Covariant",t[t.Contravariant=2]="Contravariant",t[t.Bivariant=3]="Bivariant",t[t.Independent=4]="Independent",t[t.VarianceMask=7]="VarianceMask",t[t.Unmeasurable=8]="Unmeasurable",t[t.Unreliable=16]="Unreliable",t[t.AllowsStructuralFallback=24]="AllowsStructuralFallback",t))(WCe||{}),VCe=(t=>(t[t.Required=1]="Required",t[t.Optional=2]="Optional",t[t.Rest=4]="Rest",t[t.Variadic=8]="Variadic",t[t.Fixed=3]="Fixed",t[t.Variable=12]="Variable",t[t.NonRequired=14]="NonRequired",t[t.NonRest=11]="NonRest",t))(VCe||{}),HCe=(t=>(t[t.None=0]="None",t[t.IncludeUndefined=1]="IncludeUndefined",t[t.NoIndexSignatures=2]="NoIndexSignatures",t[t.Writing=4]="Writing",t[t.CacheSymbol=8]="CacheSymbol",t[t.NoTupleBoundsCheck=16]="NoTupleBoundsCheck",t[t.ExpressionPosition=32]="ExpressionPosition",t[t.ReportDeprecated=64]="ReportDeprecated",t[t.SuppressNoImplicitAnyError=128]="SuppressNoImplicitAnyError",t[t.Contextual=256]="Contextual",t[t.Persistent=1]="Persistent",t))(HCe||{}),jCe=(t=>(t[t.None=0]="None",t[t.StringsOnly=1]="StringsOnly",t[t.NoIndexSignatures=2]="NoIndexSignatures",t[t.NoReducibleCheck=4]="NoReducibleCheck",t))(jCe||{}),zCe=(t=>(t[t.Component=0]="Component",t[t.Function=1]="Function",t[t.Mixed=2]="Mixed",t))(zCe||{}),UCe=(t=>(t[t.Call=0]="Call",t[t.Construct=1]="Construct",t))(UCe||{}),Mre=(t=>(t[t.None=0]="None",t[t.HasRestParameter=1]="HasRestParameter",t[t.HasLiteralTypes=2]="HasLiteralTypes",t[t.Abstract=4]="Abstract",t[t.IsInnerCallChain=8]="IsInnerCallChain",t[t.IsOuterCallChain=16]="IsOuterCallChain",t[t.IsUntypedSignatureInJSFile=32]="IsUntypedSignatureInJSFile",t[t.IsNonInferrable=64]="IsNonInferrable",t[t.IsSignatureCandidateForOverloadFailure=128]="IsSignatureCandidateForOverloadFailure",t[t.PropagatingFlags=167]="PropagatingFlags",t[t.CallChainFlags=24]="CallChainFlags",t))(Mre||{}),qCe=(t=>(t[t.String=0]="String",t[t.Number=1]="Number",t))(qCe||{}),$Ce=(t=>(t[t.Simple=0]="Simple",t[t.Array=1]="Array",t[t.Deferred=2]="Deferred",t[t.Function=3]="Function",t[t.Composite=4]="Composite",t[t.Merged=5]="Merged",t))($Ce||{}),JCe=(t=>(t[t.None=0]="None",t[t.NakedTypeVariable=1]="NakedTypeVariable",t[t.SpeculativeTuple=2]="SpeculativeTuple",t[t.SubstituteSource=4]="SubstituteSource",t[t.HomomorphicMappedType=8]="HomomorphicMappedType",t[t.PartialHomomorphicMappedType=16]="PartialHomomorphicMappedType",t[t.MappedTypeConstraint=32]="MappedTypeConstraint",t[t.ContravariantConditional=64]="ContravariantConditional",t[t.ReturnType=128]="ReturnType",t[t.LiteralKeyof=256]="LiteralKeyof",t[t.NoConstraints=512]="NoConstraints",t[t.AlwaysStrict=1024]="AlwaysStrict",t[t.MaxValue=2048]="MaxValue",t[t.PriorityImpliesCombination=416]="PriorityImpliesCombination",t[t.Circularity=-1]="Circularity",t))(JCe||{}),GCe=(t=>(t[t.None=0]="None",t[t.NoDefault=1]="NoDefault",t[t.AnyDefault=2]="AnyDefault",t[t.SkippedGenericFunction=4]="SkippedGenericFunction",t))(GCe||{}),KCe=(t=>(t[t.False=0]="False",t[t.Unknown=1]="Unknown",t[t.Maybe=3]="Maybe",t[t.True=-1]="True",t))(KCe||{}),QCe=(t=>(t[t.None=0]="None",t[t.ExportsProperty=1]="ExportsProperty",t[t.ModuleExports=2]="ModuleExports",t[t.PrototypeProperty=3]="PrototypeProperty",t[t.ThisProperty=4]="ThisProperty",t[t.Property=5]="Property",t[t.Prototype=6]="Prototype",t[t.ObjectDefinePropertyValue=7]="ObjectDefinePropertyValue",t[t.ObjectDefinePropertyExports=8]="ObjectDefinePropertyExports",t[t.ObjectDefinePrototypeProperty=9]="ObjectDefinePrototypeProperty",t))(QCe||{}),g$=(t=>(t[t.Warning=0]="Warning",t[t.Error=1]="Error",t[t.Suggestion=2]="Suggestion",t[t.Message=3]="Message",t))(g$||{});function JE(t,r=!0){const a=g$[t.category];return r?a.toLowerCase():a}var qR=(t=>(t[t.Classic=1]="Classic",t[t.NodeJs=2]="NodeJs",t[t.Node10=2]="Node10",t[t.Node16=3]="Node16",t[t.NodeNext=99]="NodeNext",t[t.Bundler=100]="Bundler",t))(qR||{}),XCe=(t=>(t[t.Legacy=1]="Legacy",t[t.Auto=2]="Auto",t[t.Force=3]="Force",t))(XCe||{}),ZCe=(t=>(t[t.FixedPollingInterval=0]="FixedPollingInterval",t[t.PriorityPollingInterval=1]="PriorityPollingInterval",t[t.DynamicPriorityPolling=2]="DynamicPriorityPolling",t[t.FixedChunkSizePolling=3]="FixedChunkSizePolling",t[t.UseFsEvents=4]="UseFsEvents",t[t.UseFsEventsOnParentDirectory=5]="UseFsEventsOnParentDirectory",t))(ZCe||{}),YCe=(t=>(t[t.UseFsEvents=0]="UseFsEvents",t[t.FixedPollingInterval=1]="FixedPollingInterval",t[t.DynamicPriorityPolling=2]="DynamicPriorityPolling",t[t.FixedChunkSizePolling=3]="FixedChunkSizePolling",t))(YCe||{}),eSe=(t=>(t[t.FixedInterval=0]="FixedInterval",t[t.PriorityInterval=1]="PriorityInterval",t[t.DynamicPriority=2]="DynamicPriority",t[t.FixedChunkSize=3]="FixedChunkSize",t))(eSe||{}),yB=(t=>(t[t.None=0]="None",t[t.CommonJS=1]="CommonJS",t[t.AMD=2]="AMD",t[t.UMD=3]="UMD",t[t.System=4]="System",t[t.ES2015=5]="ES2015",t[t.ES2020=6]="ES2020",t[t.ES2022=7]="ES2022",t[t.ESNext=99]="ESNext",t[t.Node16=100]="Node16",t[t.NodeNext=199]="NodeNext",t[t.Preserve=200]="Preserve",t))(yB||{}),tSe=(t=>(t[t.None=0]="None",t[t.Preserve=1]="Preserve",t[t.React=2]="React",t[t.ReactNative=3]="ReactNative",t[t.ReactJSX=4]="ReactJSX",t[t.ReactJSXDev=5]="ReactJSXDev",t))(tSe||{}),iSe=(t=>(t[t.Remove=0]="Remove",t[t.Preserve=1]="Preserve",t[t.Error=2]="Error",t))(iSe||{}),nSe=(t=>(t[t.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",t[t.LineFeed=1]="LineFeed",t))(nSe||{}),Rre=(t=>(t[t.Unknown=0]="Unknown",t[t.JS=1]="JS",t[t.JSX=2]="JSX",t[t.TS=3]="TS",t[t.TSX=4]="TSX",t[t.External=5]="External",t[t.JSON=6]="JSON",t[t.Deferred=7]="Deferred",t))(Rre||{}),rSe=(t=>(t[t.ES3=0]="ES3",t[t.ES5=1]="ES5",t[t.ES2015=2]="ES2015",t[t.ES2016=3]="ES2016",t[t.ES2017=4]="ES2017",t[t.ES2018=5]="ES2018",t[t.ES2019=6]="ES2019",t[t.ES2020=7]="ES2020",t[t.ES2021=8]="ES2021",t[t.ES2022=9]="ES2022",t[t.ES2023=10]="ES2023",t[t.ESNext=99]="ESNext",t[t.JSON=100]="JSON",t[t.Latest=99]="Latest",t))(rSe||{}),sSe=(t=>(t[t.Standard=0]="Standard",t[t.JSX=1]="JSX",t))(sSe||{}),oSe=(t=>(t[t.None=0]="None",t[t.Recursive=1]="Recursive",t))(oSe||{}),aSe=(t=>(t[t.EOF=-1]="EOF",t[t.nullCharacter=0]="nullCharacter",t[t.maxAsciiCharacter=127]="maxAsciiCharacter",t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.lineSeparator=8232]="lineSeparator",t[t.paragraphSeparator=8233]="paragraphSeparator",t[t.nextLine=133]="nextLine",t[t.space=32]="space",t[t.nonBreakingSpace=160]="nonBreakingSpace",t[t.enQuad=8192]="enQuad",t[t.emQuad=8193]="emQuad",t[t.enSpace=8194]="enSpace",t[t.emSpace=8195]="emSpace",t[t.threePerEmSpace=8196]="threePerEmSpace",t[t.fourPerEmSpace=8197]="fourPerEmSpace",t[t.sixPerEmSpace=8198]="sixPerEmSpace",t[t.figureSpace=8199]="figureSpace",t[t.punctuationSpace=8200]="punctuationSpace",t[t.thinSpace=8201]="thinSpace",t[t.hairSpace=8202]="hairSpace",t[t.zeroWidthSpace=8203]="zeroWidthSpace",t[t.narrowNoBreakSpace=8239]="narrowNoBreakSpace",t[t.ideographicSpace=12288]="ideographicSpace",t[t.mathematicalSpace=8287]="mathematicalSpace",t[t.ogham=5760]="ogham",t[t.replacementCharacter=65533]="replacementCharacter",t[t._=95]="_",t[t.$=36]="$",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.ampersand=38]="ampersand",t[t.asterisk=42]="asterisk",t[t.at=64]="at",t[t.backslash=92]="backslash",t[t.backtick=96]="backtick",t[t.bar=124]="bar",t[t.caret=94]="caret",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.closeParen=41]="closeParen",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.equals=61]="equals",t[t.exclamation=33]="exclamation",t[t.greaterThan=62]="greaterThan",t[t.hash=35]="hash",t[t.lessThan=60]="lessThan",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.openParen=40]="openParen",t[t.percent=37]="percent",t[t.plus=43]="plus",t[t.question=63]="question",t[t.semicolon=59]="semicolon",t[t.singleQuote=39]="singleQuote",t[t.slash=47]="slash",t[t.tilde=126]="tilde",t[t.backspace=8]="backspace",t[t.formFeed=12]="formFeed",t[t.byteOrderMark=65279]="byteOrderMark",t[t.tab=9]="tab",t[t.verticalTab=11]="verticalTab",t))(aSe||{}),lSe=(t=>(t.Ts=".ts",t.Tsx=".tsx",t.Dts=".d.ts",t.Js=".js",t.Jsx=".jsx",t.Json=".json",t.TsBuildInfo=".tsbuildinfo",t.Mjs=".mjs",t.Mts=".mts",t.Dmts=".d.mts",t.Cjs=".cjs",t.Cts=".cts",t.Dcts=".d.cts",t))(lSe||{}),Fre=(t=>(t[t.None=0]="None",t[t.ContainsTypeScript=1]="ContainsTypeScript",t[t.ContainsJsx=2]="ContainsJsx",t[t.ContainsESNext=4]="ContainsESNext",t[t.ContainsES2022=8]="ContainsES2022",t[t.ContainsES2021=16]="ContainsES2021",t[t.ContainsES2020=32]="ContainsES2020",t[t.ContainsES2019=64]="ContainsES2019",t[t.ContainsES2018=128]="ContainsES2018",t[t.ContainsES2017=256]="ContainsES2017",t[t.ContainsES2016=512]="ContainsES2016",t[t.ContainsES2015=1024]="ContainsES2015",t[t.ContainsGenerator=2048]="ContainsGenerator",t[t.ContainsDestructuringAssignment=4096]="ContainsDestructuringAssignment",t[t.ContainsTypeScriptClassSyntax=8192]="ContainsTypeScriptClassSyntax",t[t.ContainsLexicalThis=16384]="ContainsLexicalThis",t[t.ContainsRestOrSpread=32768]="ContainsRestOrSpread",t[t.ContainsObjectRestOrSpread=65536]="ContainsObjectRestOrSpread",t[t.ContainsComputedPropertyName=131072]="ContainsComputedPropertyName",t[t.ContainsBlockScopedBinding=262144]="ContainsBlockScopedBinding",t[t.ContainsBindingPattern=524288]="ContainsBindingPattern",t[t.ContainsYield=1048576]="ContainsYield",t[t.ContainsAwait=2097152]="ContainsAwait",t[t.ContainsHoistedDeclarationOrCompletion=4194304]="ContainsHoistedDeclarationOrCompletion",t[t.ContainsDynamicImport=8388608]="ContainsDynamicImport",t[t.ContainsClassFields=16777216]="ContainsClassFields",t[t.ContainsDecorators=33554432]="ContainsDecorators",t[t.ContainsPossibleTopLevelAwait=67108864]="ContainsPossibleTopLevelAwait",t[t.ContainsLexicalSuper=134217728]="ContainsLexicalSuper",t[t.ContainsUpdateExpressionForIdentifier=268435456]="ContainsUpdateExpressionForIdentifier",t[t.ContainsPrivateIdentifierInExpression=536870912]="ContainsPrivateIdentifierInExpression",t[t.HasComputedFlags=-2147483648]="HasComputedFlags",t[t.AssertTypeScript=1]="AssertTypeScript",t[t.AssertJsx=2]="AssertJsx",t[t.AssertESNext=4]="AssertESNext",t[t.AssertES2022=8]="AssertES2022",t[t.AssertES2021=16]="AssertES2021",t[t.AssertES2020=32]="AssertES2020",t[t.AssertES2019=64]="AssertES2019",t[t.AssertES2018=128]="AssertES2018",t[t.AssertES2017=256]="AssertES2017",t[t.AssertES2016=512]="AssertES2016",t[t.AssertES2015=1024]="AssertES2015",t[t.AssertGenerator=2048]="AssertGenerator",t[t.AssertDestructuringAssignment=4096]="AssertDestructuringAssignment",t[t.OuterExpressionExcludes=-2147483648]="OuterExpressionExcludes",t[t.PropertyAccessExcludes=-2147483648]="PropertyAccessExcludes",t[t.NodeExcludes=-2147483648]="NodeExcludes",t[t.ArrowFunctionExcludes=-2072174592]="ArrowFunctionExcludes",t[t.FunctionExcludes=-1937940480]="FunctionExcludes",t[t.ConstructorExcludes=-1937948672]="ConstructorExcludes",t[t.MethodOrAccessorExcludes=-2005057536]="MethodOrAccessorExcludes",t[t.PropertyExcludes=-2013249536]="PropertyExcludes",t[t.ClassExcludes=-2147344384]="ClassExcludes",t[t.ModuleExcludes=-1941676032]="ModuleExcludes",t[t.TypeExcludes=-2]="TypeExcludes",t[t.ObjectLiteralExcludes=-2147278848]="ObjectLiteralExcludes",t[t.ArrayLiteralOrCallOrNewExcludes=-2147450880]="ArrayLiteralOrCallOrNewExcludes",t[t.VariableDeclarationListExcludes=-2146893824]="VariableDeclarationListExcludes",t[t.ParameterExcludes=-2147483648]="ParameterExcludes",t[t.CatchClauseExcludes=-2147418112]="CatchClauseExcludes",t[t.BindingPatternExcludes=-2147450880]="BindingPatternExcludes",t[t.ContainsLexicalThisOrSuper=134234112]="ContainsLexicalThisOrSuper",t[t.PropertyNamePropagatingFlags=134234112]="PropertyNamePropagatingFlags",t))(Fre||{}),Bre=(t=>(t[t.TabStop=0]="TabStop",t[t.Placeholder=1]="Placeholder",t[t.Choice=2]="Choice",t[t.Variable=3]="Variable",t))(Bre||{}),Wre=(t=>(t[t.None=0]="None",t[t.SingleLine=1]="SingleLine",t[t.MultiLine=2]="MultiLine",t[t.AdviseOnEmitNode=4]="AdviseOnEmitNode",t[t.NoSubstitution=8]="NoSubstitution",t[t.CapturesThis=16]="CapturesThis",t[t.NoLeadingSourceMap=32]="NoLeadingSourceMap",t[t.NoTrailingSourceMap=64]="NoTrailingSourceMap",t[t.NoSourceMap=96]="NoSourceMap",t[t.NoNestedSourceMaps=128]="NoNestedSourceMaps",t[t.NoTokenLeadingSourceMaps=256]="NoTokenLeadingSourceMaps",t[t.NoTokenTrailingSourceMaps=512]="NoTokenTrailingSourceMaps",t[t.NoTokenSourceMaps=768]="NoTokenSourceMaps",t[t.NoLeadingComments=1024]="NoLeadingComments",t[t.NoTrailingComments=2048]="NoTrailingComments",t[t.NoComments=3072]="NoComments",t[t.NoNestedComments=4096]="NoNestedComments",t[t.HelperName=8192]="HelperName",t[t.ExportName=16384]="ExportName",t[t.LocalName=32768]="LocalName",t[t.InternalName=65536]="InternalName",t[t.Indented=131072]="Indented",t[t.NoIndentation=262144]="NoIndentation",t[t.AsyncFunctionBody=524288]="AsyncFunctionBody",t[t.ReuseTempVariableScope=1048576]="ReuseTempVariableScope",t[t.CustomPrologue=2097152]="CustomPrologue",t[t.NoHoisting=4194304]="NoHoisting",t[t.Iterator=8388608]="Iterator",t[t.NoAsciiEscaping=16777216]="NoAsciiEscaping",t))(Wre||{}),cSe=(t=>(t[t.None=0]="None",t[t.TypeScriptClassWrapper=1]="TypeScriptClassWrapper",t[t.NeverApplyImportHelper=2]="NeverApplyImportHelper",t[t.IgnoreSourceNewlines=4]="IgnoreSourceNewlines",t[t.Immutable=8]="Immutable",t[t.IndirectCall=16]="IndirectCall",t[t.TransformPrivateStaticElements=32]="TransformPrivateStaticElements",t))(cSe||{}),uSe=(t=>(t[t.Classes=2]="Classes",t[t.ForOf=2]="ForOf",t[t.Generators=2]="Generators",t[t.Iteration=2]="Iteration",t[t.SpreadElements=2]="SpreadElements",t[t.RestElements=2]="RestElements",t[t.TaggedTemplates=2]="TaggedTemplates",t[t.DestructuringAssignment=2]="DestructuringAssignment",t[t.BindingPatterns=2]="BindingPatterns",t[t.ArrowFunctions=2]="ArrowFunctions",t[t.BlockScopedVariables=2]="BlockScopedVariables",t[t.ObjectAssign=2]="ObjectAssign",t[t.RegularExpressionFlagsUnicode=2]="RegularExpressionFlagsUnicode",t[t.RegularExpressionFlagsSticky=2]="RegularExpressionFlagsSticky",t[t.Exponentiation=3]="Exponentiation",t[t.AsyncFunctions=4]="AsyncFunctions",t[t.ForAwaitOf=5]="ForAwaitOf",t[t.AsyncGenerators=5]="AsyncGenerators",t[t.AsyncIteration=5]="AsyncIteration",t[t.ObjectSpreadRest=5]="ObjectSpreadRest",t[t.RegularExpressionFlagsDotAll=5]="RegularExpressionFlagsDotAll",t[t.BindinglessCatch=6]="BindinglessCatch",t[t.BigInt=7]="BigInt",t[t.NullishCoalesce=7]="NullishCoalesce",t[t.OptionalChaining=7]="OptionalChaining",t[t.LogicalAssignment=8]="LogicalAssignment",t[t.TopLevelAwait=9]="TopLevelAwait",t[t.ClassFields=9]="ClassFields",t[t.PrivateNamesAndClassStaticBlocks=9]="PrivateNamesAndClassStaticBlocks",t[t.RegularExpressionFlagsHasIndices=9]="RegularExpressionFlagsHasIndices",t[t.ShebangComments=99]="ShebangComments",t[t.UsingAndAwaitUsing=99]="UsingAndAwaitUsing",t[t.ClassAndClassElementDecorators=99]="ClassAndClassElementDecorators",t[t.RegularExpressionFlagsUnicodeSets=99]="RegularExpressionFlagsUnicodeSets",t))(uSe||{}),dSe=(t=>(t[t.Extends=1]="Extends",t[t.Assign=2]="Assign",t[t.Rest=4]="Rest",t[t.Decorate=8]="Decorate",t[t.ESDecorateAndRunInitializers=8]="ESDecorateAndRunInitializers",t[t.Metadata=16]="Metadata",t[t.Param=32]="Param",t[t.Awaiter=64]="Awaiter",t[t.Generator=128]="Generator",t[t.Values=256]="Values",t[t.Read=512]="Read",t[t.SpreadArray=1024]="SpreadArray",t[t.Await=2048]="Await",t[t.AsyncGenerator=4096]="AsyncGenerator",t[t.AsyncDelegator=8192]="AsyncDelegator",t[t.AsyncValues=16384]="AsyncValues",t[t.ExportStar=32768]="ExportStar",t[t.ImportStar=65536]="ImportStar",t[t.ImportDefault=131072]="ImportDefault",t[t.MakeTemplateObject=262144]="MakeTemplateObject",t[t.ClassPrivateFieldGet=524288]="ClassPrivateFieldGet",t[t.ClassPrivateFieldSet=1048576]="ClassPrivateFieldSet",t[t.ClassPrivateFieldIn=2097152]="ClassPrivateFieldIn",t[t.SetFunctionName=4194304]="SetFunctionName",t[t.PropKey=8388608]="PropKey",t[t.AddDisposableResourceAndDisposeResources=16777216]="AddDisposableResourceAndDisposeResources",t[t.FirstEmitHelper=1]="FirstEmitHelper",t[t.LastEmitHelper=16777216]="LastEmitHelper",t[t.ForOfIncludes=256]="ForOfIncludes",t[t.ForAwaitOfIncludes=16384]="ForAwaitOfIncludes",t[t.AsyncGeneratorIncludes=6144]="AsyncGeneratorIncludes",t[t.AsyncDelegatorIncludes=26624]="AsyncDelegatorIncludes",t[t.SpreadIncludes=1536]="SpreadIncludes",t))(dSe||{}),fSe=(t=>(t[t.SourceFile=0]="SourceFile",t[t.Expression=1]="Expression",t[t.IdentifierName=2]="IdentifierName",t[t.MappedTypeParameter=3]="MappedTypeParameter",t[t.Unspecified=4]="Unspecified",t[t.EmbeddedStatement=5]="EmbeddedStatement",t[t.JsxAttributeValue=6]="JsxAttributeValue",t[t.ImportTypeNodeAttributes=7]="ImportTypeNodeAttributes",t))(fSe||{}),hSe=(t=>(t[t.Parentheses=1]="Parentheses",t[t.TypeAssertions=2]="TypeAssertions",t[t.NonNullAssertions=4]="NonNullAssertions",t[t.PartiallyEmittedExpressions=8]="PartiallyEmittedExpressions",t[t.Assertions=6]="Assertions",t[t.All=15]="All",t[t.ExcludeJSDocTypeAssertion=16]="ExcludeJSDocTypeAssertion",t))(hSe||{}),_Se=(t=>(t[t.None=0]="None",t[t.InParameters=1]="InParameters",t[t.VariablesHoistedInParameters=2]="VariablesHoistedInParameters",t))(_Se||{}),pSe=(t=>(t[t.None=0]="None",t[t.SingleLine=0]="SingleLine",t[t.MultiLine=1]="MultiLine",t[t.PreserveLines=2]="PreserveLines",t[t.LinesMask=3]="LinesMask",t[t.NotDelimited=0]="NotDelimited",t[t.BarDelimited=4]="BarDelimited",t[t.AmpersandDelimited=8]="AmpersandDelimited",t[t.CommaDelimited=16]="CommaDelimited",t[t.AsteriskDelimited=32]="AsteriskDelimited",t[t.DelimitersMask=60]="DelimitersMask",t[t.AllowTrailingComma=64]="AllowTrailingComma",t[t.Indented=128]="Indented",t[t.SpaceBetweenBraces=256]="SpaceBetweenBraces",t[t.SpaceBetweenSiblings=512]="SpaceBetweenSiblings",t[t.Braces=1024]="Braces",t[t.Parenthesis=2048]="Parenthesis",t[t.AngleBrackets=4096]="AngleBrackets",t[t.SquareBrackets=8192]="SquareBrackets",t[t.BracketsMask=15360]="BracketsMask",t[t.OptionalIfUndefined=16384]="OptionalIfUndefined",t[t.OptionalIfEmpty=32768]="OptionalIfEmpty",t[t.Optional=49152]="Optional",t[t.PreferNewLine=65536]="PreferNewLine",t[t.NoTrailingNewLine=131072]="NoTrailingNewLine",t[t.NoInterveningComments=262144]="NoInterveningComments",t[t.NoSpaceIfEmpty=524288]="NoSpaceIfEmpty",t[t.SingleElement=1048576]="SingleElement",t[t.SpaceAfterList=2097152]="SpaceAfterList",t[t.Modifiers=2359808]="Modifiers",t[t.HeritageClauses=512]="HeritageClauses",t[t.SingleLineTypeLiteralMembers=768]="SingleLineTypeLiteralMembers",t[t.MultiLineTypeLiteralMembers=32897]="MultiLineTypeLiteralMembers",t[t.SingleLineTupleTypeElements=528]="SingleLineTupleTypeElements",t[t.MultiLineTupleTypeElements=657]="MultiLineTupleTypeElements",t[t.UnionTypeConstituents=516]="UnionTypeConstituents",t[t.IntersectionTypeConstituents=520]="IntersectionTypeConstituents",t[t.ObjectBindingPatternElements=525136]="ObjectBindingPatternElements",t[t.ArrayBindingPatternElements=524880]="ArrayBindingPatternElements",t[t.ObjectLiteralExpressionProperties=526226]="ObjectLiteralExpressionProperties",t[t.ImportAttributes=526226]="ImportAttributes",t[t.ImportClauseEntries=526226]="ImportClauseEntries",t[t.ArrayLiteralExpressionElements=8914]="ArrayLiteralExpressionElements",t[t.CommaListElements=528]="CommaListElements",t[t.CallExpressionArguments=2576]="CallExpressionArguments",t[t.NewExpressionArguments=18960]="NewExpressionArguments",t[t.TemplateExpressionSpans=262144]="TemplateExpressionSpans",t[t.SingleLineBlockStatements=768]="SingleLineBlockStatements",t[t.MultiLineBlockStatements=129]="MultiLineBlockStatements",t[t.VariableDeclarationList=528]="VariableDeclarationList",t[t.SingleLineFunctionBodyStatements=768]="SingleLineFunctionBodyStatements",t[t.MultiLineFunctionBodyStatements=1]="MultiLineFunctionBodyStatements",t[t.ClassHeritageClauses=0]="ClassHeritageClauses",t[t.ClassMembers=129]="ClassMembers",t[t.InterfaceMembers=129]="InterfaceMembers",t[t.EnumMembers=145]="EnumMembers",t[t.CaseBlockClauses=129]="CaseBlockClauses",t[t.NamedImportsOrExportsElements=525136]="NamedImportsOrExportsElements",t[t.JsxElementOrFragmentChildren=262144]="JsxElementOrFragmentChildren",t[t.JsxElementAttributes=262656]="JsxElementAttributes",t[t.CaseOrDefaultClauseStatements=163969]="CaseOrDefaultClauseStatements",t[t.HeritageClauseTypes=528]="HeritageClauseTypes",t[t.SourceFileStatements=131073]="SourceFileStatements",t[t.Decorators=2146305]="Decorators",t[t.TypeArguments=53776]="TypeArguments",t[t.TypeParameters=53776]="TypeParameters",t[t.Parameters=2576]="Parameters",t[t.IndexSignatureParameters=8848]="IndexSignatureParameters",t[t.JSDocComment=33]="JSDocComment",t))(pSe||{}),gSe=(t=>(t[t.None=0]="None",t[t.TripleSlashXML=1]="TripleSlashXML",t[t.SingleLine=2]="SingleLine",t[t.MultiLine=4]="MultiLine",t[t.All=7]="All",t[t.Default=7]="Default",t))(gSe||{}),m$={reference:{args:[{name:"types",optional:!0,captureSpan:!0},{name:"lib",optional:!0,captureSpan:!0},{name:"path",optional:!0,captureSpan:!0},{name:"no-default-lib",optional:!0},{name:"resolution-mode",optional:!0},{name:"preserve",optional:!0}],kind:1},"amd-dependency":{args:[{name:"path"},{name:"name",optional:!0}],kind:1},"amd-module":{args:[{name:"name"}],kind:1},"ts-check":{kind:2},"ts-nocheck":{kind:2},jsx:{args:[{name:"factory"}],kind:4},jsxfrag:{args:[{name:"factory"}],kind:4},jsximportsource:{args:[{name:"factory"}],kind:4},jsxruntime:{args:[{name:"factory"}],kind:4}},mSe=(t=>(t[t.ParseAll=0]="ParseAll",t[t.ParseNone=1]="ParseNone",t[t.ParseForTypeErrors=2]="ParseForTypeErrors",t[t.ParseForTypeInfo=3]="ParseForTypeInfo",t))(mSe||{});function $R(t){let r=5381;for(let a=0;a(t[t.Created=0]="Created",t[t.Changed=1]="Changed",t[t.Deleted=2]="Deleted",t))(vSe||{}),Vre=(t=>(t[t.High=2e3]="High",t[t.Medium=500]="Medium",t[t.Low=250]="Low",t))(Vre||{}),Cp=new Date(0);function AL(t,r){return t.getModifiedTime(r)||Cp}function ySe(t){return{250:t.Low,500:t.Medium,2e3:t.High}}var Hre={Low:32,Medium:64,High:256},jre=ySe(Hre),v$=ySe(Hre);function LEt(t){if(!t.getEnvironmentVariable)return;const r=h("TSC_WATCH_POLLINGINTERVAL",Vre);jre=p("TSC_WATCH_POLLINGCHUNKSIZE",Hre)||jre,v$=p("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS",Hre)||v$;function a(m,C){return t.getEnvironmentVariable(`${m}_${C.toUpperCase()}`)}function u(m){let C;return b("Low"),b("Medium"),b("High"),C;function b(T){const E=a(m,T);E&&((C||(C={}))[T]=Number(E))}}function h(m,C){const b=u(m);if(b)return T("Low"),T("Medium"),T("High"),!0;return!1;function T(E){C[E]=b[E]||C[E]}}function p(m,C){const b=u(m);return(r||b)&&ySe(b?{...C,...b}:C)}}function iqe(t,r,a,u,h){let p=a;for(let C=r.length;u&&C;m(),C--){const b=r[a];if(b){if(b.isClosed){r[a]=void 0;continue}}else continue;u--;const T=MEt(b,AL(t,b.fileName));if(b.isClosed){r[a]=void 0;continue}h==null||h(b,a,T),r[a]&&(p{Y.isClosed=!0,LL(r,Y)}}}function C(q){const Q=[];return Q.pollingInterval=q,Q.pollIndex=0,Q.pollScheduled=!1,Q}function b(q,Q){Q.pollIndex=E(Q,Q.pollingInterval,Q.pollIndex,jre[Q.pollingInterval]),Q.length?U(Q.pollingInterval):(z.assert(Q.pollIndex===0),Q.pollScheduled=!1)}function T(q,Q){E(a,250,0,a.length),b(q,Q),!Q.pollScheduled&&a.length&&U(250)}function E(q,Q,re,Y){return iqe(t,q,re,Y,ue);function ue(te,Se,oe){oe?(te.unchangedPolls=0,q!==a&&(q[Se]=void 0,F(te))):te.unchangedPolls!==v$[Q]?te.unchangedPolls++:q===a?(te.unchangedPolls=1,q[Se]=void 0,R(te,250)):Q!==2e3&&(te.unchangedPolls++,q[Se]=void 0,R(te,Q===250?500:2e3))}}function N(q){switch(q){case 250:return u;case 500:return h;case 2e3:return p}}function R(q,Q){N(Q).push(q),j(Q)}function F(q){a.push(q),j(250)}function j(q){N(q).pollScheduled||U(q)}function U(q){N(q).pollScheduled=t.setTimeout(q===250?T:b,q,q===250?"pollLowPollingIntervalQueue":"pollPollingIntervalQueue",N(q))}}function AEt(t,r,a,u){const h=Ug(),p=u?new Map:void 0,m=new Map,C=Zf(r);return b;function b(E,N,R,F){const j=C(E);h.add(j,N).length===1&&p&&p.set(j,a(E)||Cp);const U=rs(j)||".",q=m.get(U)||T(rs(E)||".",U,F);return q.referenceCount++,{close:()=>{q.referenceCount===1?(q.close(),m.delete(U)):q.referenceCount--,h.remove(j,N)}}}function T(E,N,R){const F=t(E,1,(j,U)=>{if(!mo(U))return;const q=bo(U,E),Q=C(q),re=q&&h.get(Q);if(re){let Y,ue=1;if(p){const te=p.get(Q);if(j==="change"&&(Y=a(q)||Cp,Y.getTime()===te.getTime()))return;Y||(Y=a(q)||Cp),p.set(Q,Y),te===Cp?ue=0:Y===Cp&&(ue=2)}for(const te of re)te(q,ue,Y)}},!1,500,R);return F.referenceCount=0,m.set(N,F),F}}function OEt(t){const r=[];let a=0,u;return h;function h(C,b){const T={fileName:C,callback:b,mtime:AL(t,C)};return r.push(T),m(),{close:()=>{T.isClosed=!0,LL(r,T)}}}function p(){u=void 0,a=iqe(t,r,a,jre[250]),m()}function m(){!r.length||u||(u=t.setTimeout(p,2e3,"pollQueue"))}}function nqe(t,r,a,u,h){const m=Zf(r)(a),C=t.get(m);return C?C.callbacks.push(u):t.set(m,{watcher:h((b,T,E)=>{var N;return(N=t.get(m))==null?void 0:N.callbacks.slice().forEach(R=>R(b,T,E))}),callbacks:[u]}),{close:()=>{const b=t.get(m);b&&(!FR(b.callbacks,u)||b.callbacks.length||(t.delete(m),tm(b)))}}}function MEt(t,r){const a=t.mtime.getTime(),u=r.getTime();return a!==u?(t.mtime=r,t.callback(t.fileName,zre(a,u),r),!0):!1}function zre(t,r){return t===0?0:r===0?2:1}var y$=["/node_modules/.","/.git","/.#"],rqe=dl;function bB(t){return rqe(t)}function bSe(t){rqe=t}function REt({watchDirectory:t,useCaseSensitiveFileNames:r,getCurrentDirectory:a,getAccessibleSortedChildDirectories:u,fileSystemEntryExists:h,realpath:p,setTimeout:m,clearTimeout:C}){const b=new Map,T=Ug(),E=new Map;let N;const R=f6(!r),F=Zf(r);return(pe,ye,be,_e)=>be?j(pe,_e,ye):t(pe,ye,be,_e);function j(pe,ye,be,_e){const ve=F(pe);let Ee=b.get(ve);Ee?Ee.refCount++:(Ee={watcher:t(pe,Fe=>{var Oe;Se(Fe,ye)||(ye!=null&&ye.synchronousWatchDirectory?((Oe=b.get(ve))!=null&&Oe.targetWatcher||U(pe,ve,Fe),te(pe,ve,ye)):q(pe,ve,Fe,ye))},!1,ye),refCount:1,childWatches:x,targetWatcher:void 0,links:void 0},b.set(ve,Ee),te(pe,ve,ye)),_e&&(Ee.links??(Ee.links=new Set)).add(_e);const ke=be&&{dirName:pe,callback:be};return ke&&T.add(ve,ke),{dirName:pe,close:()=>{var Fe;const Oe=z.checkDefined(b.get(ve));ke&&T.remove(ve,ke),_e&&((Fe=Oe.links)==null||Fe.delete(_e)),Oe.refCount--,!Oe.refCount&&(b.delete(ve),Oe.links=void 0,tm(Oe),ue(Oe),Oe.childWatches.forEach(h0))}}}function U(pe,ye,be,_e){var ve,Ee;let ke,Fe;mo(be)?ke=be:Fe=be,T.forEach((Oe,fe)=>{if(!(Fe&&Fe.get(fe)===!0)&&(fe===ye||ro(ye,fe)&&ye[fe.length]===Hc))if(Fe)if(_e){const Ie=Fe.get(fe);Ie?Ie.push(..._e):Fe.set(fe,_e.slice())}else Fe.set(fe,!0);else Oe.forEach(({callback:Ie})=>Ie(ke))}),(Ee=(ve=b.get(ye))==null?void 0:ve.links)==null||Ee.forEach(Oe=>{const fe=Ie=>Hr(Oe,W0(pe,Ie,F));Fe?U(Oe,F(Oe),Fe,_e==null?void 0:_e.map(fe)):U(Oe,F(Oe),fe(ke))})}function q(pe,ye,be,_e){const ve=b.get(ye);if(ve&&h(pe,1)){Q(pe,ye,be,_e);return}U(pe,ye,be),ue(ve),Y(ve)}function Q(pe,ye,be,_e){const ve=E.get(ye);ve?ve.fileNames.push(be):E.set(ye,{dirName:pe,options:_e,fileNames:[be]}),N&&(C(N),N=void 0),N=m(re,1e3,"timerToUpdateChildWatches")}function re(){var pe;N=void 0,bB(`sysLog:: onTimerToUpdateChildWatches:: ${E.size}`);const ye=Vc(),be=new Map;for(;!N&&E.size;){const ve=E.entries().next();z.assert(!ve.done);const{value:[Ee,{dirName:ke,options:Fe,fileNames:Oe}]}=ve;E.delete(Ee);const fe=te(ke,Ee,Fe);(pe=b.get(Ee))!=null&&pe.targetWatcher||U(ke,Ee,be,fe?void 0:Oe)}bB(`sysLog:: invokingWatchers:: Elapsed:: ${Vc()-ye}ms:: ${E.size}`),T.forEach((ve,Ee)=>{const ke=be.get(Ee);ke&&ve.forEach(({callback:Fe,dirName:Oe})=>{Lo(ke)?ke.forEach(Fe):Fe(Oe)})});const _e=Vc()-ye;bB(`sysLog:: Elapsed:: ${_e}ms:: onTimerToUpdateChildWatches:: ${E.size} ${N}`)}function Y(pe){if(!pe)return;const ye=pe.childWatches;pe.childWatches=x;for(const be of ye)be.close(),Y(b.get(F(be.dirName)))}function ue(pe){pe!=null&&pe.targetWatcher&&(pe.targetWatcher.close(),pe.targetWatcher=void 0)}function te(pe,ye,be){const _e=b.get(ye);if(!_e)return!1;const ve=ra(p(pe));let Ee,ke;return R(ve,pe)===0?Ee=f$(h(pe,1)?ns(u(pe),fe=>{const Ie=bo(fe,pe);return!Se(Ie,be)&&R(Ie,ra(p(Ie)))===0?Ie:void 0}):x,_e.childWatches,(fe,Ie)=>R(fe,Ie.dirName),Fe,h0,Oe):_e.targetWatcher&&R(ve,_e.targetWatcher.dirName)===0?(Ee=!1,z.assert(_e.childWatches===x)):(ue(_e),_e.targetWatcher=j(ve,be,void 0,pe),_e.childWatches.forEach(h0),Ee=!0),_e.childWatches=ke||x,Ee;function Fe(fe){const Ie=j(fe,be);Oe(Ie)}function Oe(fe){(ke||(ke=[])).push(fe)}}function Se(pe,ye){return Rt(y$,be=>oe(pe,be))||sqe(pe,ye,r,a)}function oe(pe,ye){return pe.includes(ye)?!0:r?!1:F(pe).includes(ye)}}var CSe=(t=>(t[t.File=0]="File",t[t.Directory=1]="Directory",t))(CSe||{});function FEt(t){return(r,a,u)=>t(a===1?"change":"rename","",u)}function BEt(t,r,a){return(u,h,p)=>{u==="rename"?(p||(p=a(t)||Cp),r(t,p!==Cp?0:2,p)):r(t,1,p)}}function sqe(t,r,a,u){return((r==null?void 0:r.excludeDirectories)||(r==null?void 0:r.excludeFiles))&&(CK(t,r==null?void 0:r.excludeFiles,a,u())||CK(t,r==null?void 0:r.excludeDirectories,a,u()))}function oqe(t,r,a,u,h){return(p,m)=>{if(p==="rename"){const C=m?ra(Hr(t,m)):t;(!m||!sqe(C,a,u,h))&&r(C)}}}function SSe({pollingWatchFileWorker:t,getModifiedTime:r,setTimeout:a,clearTimeout:u,fsWatchWorker:h,fileSystemEntryExists:p,useCaseSensitiveFileNames:m,getCurrentDirectory:C,fsSupportsRecursiveFsWatch:b,getAccessibleSortedChildDirectories:T,realpath:E,tscWatchFile:N,useNonPollingWatchers:R,tscWatchDirectory:F,inodeWatching:j,fsWatchWithTimestamp:U,sysLog:q}){const Q=new Map,re=new Map,Y=new Map;let ue,te,Se,oe,pe=!1;return{watchFile:ye,watchDirectory:ke};function ye(He,We,Ue,Ye){Ye=ve(Ye,R);const wt=z.checkDefined(Ye.watchFile);switch(wt){case 0:return fe(He,We,250,void 0);case 1:return fe(He,We,Ue,void 0);case 2:return be()(He,We,Ue,void 0);case 3:return _e()(He,We,void 0,void 0);case 4:return Ie(He,0,BEt(He,We,r),!1,Ue,JV(Ye));case 5:return Se||(Se=AEt(Ie,m,r,U)),Se(He,We,Ue,JV(Ye));default:z.assertNever(wt)}}function be(){return ue||(ue=PEt({getModifiedTime:r,setTimeout:a}))}function _e(){return te||(te=OEt({getModifiedTime:r,setTimeout:a}))}function ve(He,We){if(He&&He.watchFile!==void 0)return He;switch(N){case"PriorityPollingInterval":return{watchFile:1};case"DynamicPriorityPolling":return{watchFile:2};case"UseFsEvents":return Ee(4,1,He);case"UseFsEventsWithFallbackDynamicPolling":return Ee(4,2,He);case"UseFsEventsOnParentDirectory":We=!0;default:return We?Ee(5,1,He):{watchFile:4}}}function Ee(He,We,Ue){const Ye=Ue==null?void 0:Ue.fallbackPolling;return{watchFile:He,fallbackPolling:Ye===void 0?We:Ye}}function ke(He,We,Ue,Ye){return b?Ie(He,1,oqe(He,We,Ye,m,C),Ue,500,JV(Ye)):(oe||(oe=REt({useCaseSensitiveFileNames:m,getCurrentDirectory:C,fileSystemEntryExists:p,getAccessibleSortedChildDirectories:T,watchDirectory:Fe,realpath:E,setTimeout:a,clearTimeout:u})),oe(He,We,Ue,Ye))}function Fe(He,We,Ue,Ye){z.assert(!Ue);const wt=Oe(Ye),nt=z.checkDefined(wt.watchDirectory);switch(nt){case 1:return fe(He,()=>We(He),500,void 0);case 2:return be()(He,()=>We(He),500,void 0);case 3:return _e()(He,()=>We(He),void 0,void 0);case 0:return Ie(He,1,oqe(He,We,Ye,m,C),Ue,500,JV(wt));default:z.assertNever(nt)}}function Oe(He){if(He&&He.watchDirectory!==void 0)return He;switch(F){case"RecursiveDirectoryUsingFsWatchFile":return{watchDirectory:1};case"RecursiveDirectoryUsingDynamicPriorityPolling":return{watchDirectory:2};default:const We=He==null?void 0:He.fallbackPolling;return{watchDirectory:0,fallbackPolling:We!==void 0?We:void 0}}}function fe(He,We,Ue,Ye){return nqe(Q,m,He,We,wt=>t(He,wt,Ue,Ye))}function Ie(He,We,Ue,Ye,wt,nt){return nqe(Ye?Y:re,m,He,Ue,ze=>Le(He,We,ze,Ye,wt,nt))}function Le(He,We,Ue,Ye,wt,nt){let ze,st;j&&(ze=He.substring(He.lastIndexOf(Hc)),st=ze.slice(Hc.length));let xt=p(He,We)?ft():Ji();return{close:()=>{xt&&(xt.close(),xt=void 0)}};function Et(Ui){xt&&(q(`sysLog:: ${He}:: Changing watcher to ${Ui===ft?"Present":"Missing"}FileSystemEntryWatcher`),xt.close(),xt=Ui())}function ft(){if(pe)return q(`sysLog:: ${He}:: Defaulting to watchFile`),Oi();try{const Ui=(We===1||!U?h:et)(He,Ye,j?Ht:Ue);return Ui.on("error",()=>{Ue("rename",""),Et(Ji)}),Ui}catch(Ui){return pe||(pe=Ui.code==="ENOSPC"),q(`sysLog:: ${He}:: Changing to watchFile`),Oi()}}function Ht(Ui,bn){let Mi;if(bn&&mu(bn,"~")&&(Mi=bn,bn=bn.slice(0,bn.length-1)),Ui==="rename"&&(!bn||bn===st||mu(bn,ze))){const Ai=r(He)||Cp;Mi&&Ue(Ui,Mi,Ai),Ue(Ui,bn,Ai),j?Et(Ai===Cp?Ji:ft):Ai===Cp&&Et(Ji)}else Mi&&Ue(Ui,Mi),Ue(Ui,bn)}function Oi(){return ye(He,FEt(Ue),wt,nt)}function Ji(){return ye(He,(Ui,bn,Mi)=>{bn===0&&(Mi||(Mi=r(He)||Cp),Mi!==Cp&&(Ue("rename","",Mi),Et(ft)))},wt,nt)}}function et(He,We,Ue){let Ye=r(He)||Cp;return h(He,We,(wt,nt,ze)=>{wt==="change"&&(ze||(ze=r(He)||Cp),ze.getTime()===Ye.getTime())||(Ye=ze||r(He)||Cp,Ue(wt,nt,Ye))})}}function wSe(t){const r=t.writeFile;t.writeFile=(a,u,h)=>koe(a,u,!!h,(p,m,C)=>r.call(t,p,m,C),p=>t.createDirectory(p),p=>t.directoryExists(p))}var Wd=(()=>{const t="\uFEFF";function r(){const u=/^native |^\([^)]+\)$|^(internal[\\/]|[a-zA-Z0-9_\s]+(\.js)?$)/,h=eM,p=eM,m=eM;let C;try{C=eM}catch{C=void 0}let b,T="./profile.cpuprofile";const E=process.platform==="darwin",N=process.platform==="linux"||E,R=m.platform(),F=ye(),j=h.realpathSync.native?process.platform==="win32"?We:h.realpathSync.native:h.realpathSync,U=__filename.endsWith("sys.js")?p.join(p.dirname(__dirname),"__fake__.js"):__filename,q=process.platform==="win32"||E,Q=l_(()=>process.cwd()),{watchFile:re,watchDirectory:Y}=SSe({pollingWatchFileWorker:_e,getModifiedTime:Ye,setTimeout,clearTimeout,fsWatchWorker:ve,useCaseSensitiveFileNames:F,getCurrentDirectory:Q,fileSystemEntryExists:Ie,fsSupportsRecursiveFsWatch:q,getAccessibleSortedChildDirectories:st=>Oe(st).directories,realpath:Ue,tscWatchFile:e.TSC_WATCHFILE,useNonPollingWatchers:!!e.TSC_NONPOLLING_WATCHER,tscWatchDirectory:e.TSC_WATCHDIRECTORY,inodeWatching:N,fsWatchWithTimestamp:E,sysLog:bB}),ue={args:process.argv.slice(2),newLine:m.EOL,useCaseSensitiveFileNames:F,write(st){process.stdout.write(st)},getWidthOfTerminal(){return process.stdout.columns},writeOutputIsTTY(){return process.stdout.isTTY},readFile:ke,writeFile:Fe,watchFile:re,watchDirectory:Y,resolvePath:st=>p.resolve(st),fileExists:Le,directoryExists:et,getAccessibleFileSystemEntries:Oe,createDirectory(st){if(!ue.directoryExists(st))try{h.mkdirSync(st)}catch(xt){if(xt.code!=="EEXIST")throw xt}},getExecutingFilePath(){return U},getCurrentDirectory:Q,getDirectories:He,getEnvironmentVariable(st){return e[st]||""},readDirectory:fe,getModifiedTime:Ye,setModifiedTime:wt,deleteFile:nt,createHash:C?ze:$R,createSHA256Hash:C?ze:void 0,getMemoryUsage(){return jpt.gc&&jpt.gc(),process.memoryUsage().heapUsed},getFileSize(st){try{const xt=te(st);if(xt!=null&&xt.isFile())return xt.size}catch{}return 0},exit(st){pe(()=>process.exit(st))},enableCPUProfiler:Se,disableCPUProfiler:pe,cpuProfilingEnabled:()=>!!b||Mt(process.execArgv,"--cpu-prof")||Mt(process.execArgv,"--prof"),realpath:Ue,debugMode:!!e.NODE_INSPECTOR_IPC||!!e.VSCODE_INSPECTOR_OPTIONS||Rt(process.execArgv,st=>/^--(inspect|debug)(-brk)?(=\d+)?$/i.test(st))||!!process.recordreplay,tryEnableSourceMapsForHost(){try{eM.install()}catch{}},setTimeout,clearTimeout,clearScreen:()=>{process.stdout.write("\x1Bc")},setBlocking:()=>{var st;const xt=(st=process.stdout)==null?void 0:st._handle;xt&&xt.setBlocking&&xt.setBlocking(!0)},base64decode:st=>Buffer.from(st,"base64").toString("utf8"),base64encode:st=>Buffer.from(st).toString("base64"),require:(st,xt)=>{try{const Et=bDe(xt,st,ue);return{module:NFe(Et),modulePath:Et,error:void 0}}catch(Et){return{module:void 0,modulePath:void 0,error:Et}}}};return ue;function te(st){return h.statSync(st,{throwIfNoEntry:!1})}function Se(st,xt){if(b)return xt(),!1;const Et=eM;if(!Et||!Et.Session)return xt(),!1;const ft=new Et.Session;return ft.connect(),ft.post("Profiler.enable",()=>{ft.post("Profiler.start",()=>{b=ft,T=st,xt()})}),!0}function oe(st){let xt=0;const Et=new Map,ft=Lf(p.dirname(U)),Ht=`file://${L1(ft)===1?"":"/"}${ft}`;for(const Oi of st.nodes)if(Oi.callFrame.url){const Ji=Lf(Oi.callFrame.url);l0(Ht,Ji,F)?Oi.callFrame.url=OL(Ht,Ji,Ht,Zf(F),!0):u.test(Ji)||(Oi.callFrame.url=(Et.has(Ji)?Et:Et.set(Ji,`external${xt}.js`)).get(Ji),xt++)}return st}function pe(st){if(b&&b!=="stopping"){const xt=b;return b.post("Profiler.stop",(Et,{profile:ft})=>{var Ht;if(!Et){try{(Ht=te(T))!=null&&Ht.isDirectory()&&(T=p.join(T,`${new Date().toISOString().replace(/:/g,"-")}+P${process.pid}.cpuprofile`))}catch{}try{h.mkdirSync(p.dirname(T),{recursive:!0})}catch{}h.writeFileSync(T,JSON.stringify(oe(ft)))}b=void 0,xt.disconnect(),st()}),b="stopping",!0}else return st(),!1}function ye(){return R==="win32"||R==="win64"?!1:!Le(be(__filename))}function be(st){return st.replace(/\w/g,xt=>{const Et=xt.toUpperCase();return xt===Et?xt.toLowerCase():Et})}function _e(st,xt,Et){h.watchFile(st,{persistent:!0,interval:Et},Ht);let ft;return{close:()=>h.unwatchFile(st,Ht)};function Ht(Oi,Ji){const Ui=+Ji.mtime==0||ft===2;if(+Oi.mtime==0){if(Ui)return;ft=2}else if(Ui)ft=0;else{if(+Oi.mtime==+Ji.mtime)return;ft=1}xt(st,ft,Oi.mtime)}}function ve(st,xt,Et){return h.watch(st,q?{persistent:!0,recursive:!!xt}:{persistent:!0},Et)}function Ee(st,xt){let Et;try{Et=h.readFileSync(st)}catch{return}let ft=Et.length;if(ft>=2&&Et[0]===254&&Et[1]===255){ft&=-2;for(let Ht=0;Ht=2&&Et[0]===255&&Et[1]===254?Et.toString("utf16le",2):ft>=3&&Et[0]===239&&Et[1]===187&&Et[2]===191?Et.toString("utf8",3):Et.toString("utf8")}function ke(st,xt){var Et,ft;(Et=c_)==null||Et.logStartReadFile(st);const Ht=Ee(st);return(ft=c_)==null||ft.logStopReadFile(),Ht}function Fe(st,xt,Et){var ft;(ft=c_)==null||ft.logEvent("WriteFile: "+st),Et&&(xt=t+xt);let Ht;try{Ht=h.openSync(st,"w"),h.writeSync(Ht,xt,void 0,"utf8")}finally{Ht!==void 0&&h.closeSync(Ht)}}function Oe(st){var xt;(xt=c_)==null||xt.logEvent("ReadDir: "+(st||"."));try{const Et=h.readdirSync(st||".",{withFileTypes:!0}),ft=[],Ht=[];for(const Oi of Et){const Ji=typeof Oi=="string"?Oi:Oi.name;if(Ji==="."||Ji==="..")continue;let Ui;if(typeof Oi=="string"||Oi.isSymbolicLink()){const bn=Hr(st,Ji);try{if(Ui=te(bn),!Ui)continue}catch{continue}}else Ui=Oi;Ui.isFile()?ft.push(Ji):Ui.isDirectory()&&Ht.push(Ji)}return ft.sort(),Ht.sort(),{files:ft,directories:Ht}}catch{return nae}}function fe(st,xt,Et,ft,Ht){return eae(st,xt,Et,ft,F,process.cwd(),Ht,Oe,Ue)}function Ie(st,xt){const Et=Error.stackTraceLimit;Error.stackTraceLimit=0;try{const ft=te(st);if(!ft)return!1;switch(xt){case 0:return ft.isFile();case 1:return ft.isDirectory();default:return!1}}catch{return!1}finally{Error.stackTraceLimit=Et}}function Le(st){return Ie(st,0)}function et(st){return Ie(st,1)}function He(st){return Oe(st).directories.slice()}function We(st){return st.length<260?h.realpathSync.native(st):h.realpathSync(st)}function Ue(st){try{return j(st)}catch{return st}}function Ye(st){var xt;const Et=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return(xt=te(st))==null?void 0:xt.mtime}catch{return}finally{Error.stackTraceLimit=Et}}function wt(st,xt){try{h.utimesSync(st,xt,xt)}catch{return}}function nt(st){try{return h.unlinkSync(st)}catch{return}}function ze(st){const xt=C.createHash("sha256");return xt.update(st),xt.digest("hex")}}let a;return bre()&&(a=r()),a&&wSe(a),a})();function aqe(t){Wd=t}Wd&&Wd.getEnvironmentVariable&&(LEt(Wd),z.setAssertionLevel(/^development$/i.test(Wd.getEnvironmentVariable("NODE_ENV"))?1:0)),Wd&&Wd.debugMode&&(z.isDebugging=!0);var Hc="/",b$="\\",lqe="://",WEt=/\\/g;function Ure(t){return t===47||t===92}function xSe(t){return C$(t)<0}function Sp(t){return C$(t)>0}function qre(t){const r=C$(t);return r>0&&r===t.length}function JR(t){return C$(t)!==0}function cg(t){return/^\.\.?($|[\\/])/.test(t)}function $re(t){return!JR(t)&&!cg(t)}function _6(t){return fd(t).includes(".")}function tu(t,r){return t.length>r.length&&mu(t,r)}function rd(t,r){for(const a of r)if(tu(t,a))return!0;return!1}function ZC(t){return t.length>0&&Ure(t.charCodeAt(t.length-1))}function cqe(t){return t>=97&&t<=122||t>=65&&t<=90}function VEt(t,r){const a=t.charCodeAt(r);if(a===58)return r+1;if(a===37&&t.charCodeAt(r+1)===51){const u=t.charCodeAt(r+2);if(u===97||u===65)return r+3}return-1}function C$(t){if(!t)return 0;const r=t.charCodeAt(0);if(r===47||r===92){if(t.charCodeAt(1)!==r)return 1;const u=t.indexOf(r===47?Hc:b$,2);return u<0?t.length:u+1}if(cqe(r)&&t.charCodeAt(1)===58){const u=t.charCodeAt(2);if(u===47||u===92)return 3;if(t.length===2)return 2}const a=t.indexOf(lqe);if(a!==-1){const u=a+lqe.length,h=t.indexOf(Hc,u);if(h!==-1){const p=t.slice(0,a),m=t.slice(u,h);if(p==="file"&&(m===""||m==="localhost")&&cqe(t.charCodeAt(h+1))){const C=VEt(t,h+2);if(C!==-1){if(t.charCodeAt(C)===47)return~(C+1);if(C===t.length)return~C}}return~(h+1)}return~t.length}return 0}function L1(t){const r=C$(t);return r<0?~r:r}function rs(t){t=Lf(t);const r=L1(t);return r===t.length?t:(t=Sk(t),t.slice(0,Math.max(r,t.lastIndexOf(Hc))))}function fd(t,r,a){if(t=Lf(t),L1(t)===t.length)return"";t=Sk(t);const h=t.slice(Math.max(L1(t),t.lastIndexOf(Hc)+1)),p=r!==void 0&&a!==void 0?p6(h,r,a):void 0;return p?h.slice(0,h.length-p.length):h}function uqe(t,r,a){if(ro(r,".")||(r="."+r),t.length>=r.length&&t.charCodeAt(t.length-r.length)===46){const u=t.slice(t.length-r.length);if(a(u,r))return u}}function HEt(t,r,a){if(typeof r=="string")return uqe(t,r,a)||"";for(const u of r){const h=uqe(t,u,a);if(h)return h}return""}function p6(t,r,a){if(r)return HEt(Sk(t),r,a?yk:UE);const u=fd(t),h=u.lastIndexOf(".");return h>=0?u.substring(h):""}function jEt(t,r){const a=t.substring(0,r),u=t.substring(r).split(Hc);return u.length&&!Ql(u)&&u.pop(),[a,...u]}function Qd(t,r=""){return t=Hr(r,t),jEt(t,L1(t))}function Ob(t,r){return t.length===0?"":(t[0]&&Xd(t[0]))+t.slice(1,r).join(Hc)}function Lf(t){return t.includes("\\")?t.replace(WEt,Hc):t}function GE(t){if(!Rt(t))return[];const r=[t[0]];for(let a=1;a1){if(r[r.length-1]!==".."){r.pop();continue}}else if(r[0])continue}r.push(u)}}return r}function Hr(t,...r){t&&(t=Lf(t));for(let a of r)a&&(a=Lf(a),!t||L1(a)!==0?t=a:t=Xd(t)+a);return t}function Ck(t,...r){return ra(Rt(r)?Hr(t,...r):Lf(t))}function CB(t,r){return GE(Qd(t,r))}function bo(t,r){return Ob(CB(t,r))}function ra(t){if(t=Lf(t),!Gre.test(t))return t;const r=t.replace(/\/\.\//g,"/").replace(/^\.\//,"");if(r!==t&&(t=r,!Gre.test(t)))return t;const a=Ob(GE(Qd(t)));return a&&ZC(t)?Xd(a):a}function zEt(t){return t.length===0?"":t.slice(1).join(Hc)}function Jre(t,r){return zEt(CB(t,r))}function _c(t,r,a){const u=Sp(t)?ra(t):bo(t,r);return a(u)}function Sk(t){return ZC(t)?t.substr(0,t.length-1):t}function Xd(t){return ZC(t)?t:t+Hc}function KE(t){return!JR(t)&&!cg(t)?"./"+t:t}function SB(t,r,a,u){const h=a!==void 0&&u!==void 0?p6(t,a,u):p6(t);return h?t.slice(0,t.length-h.length)+(ro(r,".")?r:"."+r):t}function kSe(t,r){const a=lle(t);return a?t.slice(0,t.length-a.length)+(ro(r,".")?r:"."+r):SB(t,r)}var Gre=/(?:\/\/)|(?:^|\/)\.\.?(?:$|\/)/;function TSe(t,r,a){if(t===r)return 0;if(t===void 0)return-1;if(r===void 0)return 1;const u=t.substring(0,L1(t)),h=r.substring(0,L1(r)),p=pB(u,h);if(p!==0)return p;const m=t.substring(u.length),C=r.substring(h.length);if(!Gre.test(m)&&!Gre.test(C))return a(m,C);const b=GE(Qd(t)),T=GE(Qd(r)),E=Math.min(b.length,T.length);for(let N=1;N0==L1(r)>0,"Paths must either both be absolute or both be relative");const p=Qre(t,r,(typeof a=="boolean"?a:!1)?yk:UE,typeof a=="function"?a:fc);return Ob(p)}function GR(t,r,a){return Sp(t)?OL(r,t,r,a,!1):t}function KR(t,r,a){return KE(W0(rs(t),r,a))}function OL(t,r,a,u,h){const p=Qre(Ck(a,t),Ck(a,r),UE,u),m=p[0];if(h&&Sp(m)){const C=m.charAt(0)===Hc?"file://":"file:///";p[0]=C+m}return Ob(p)}function c0(t,r){for(;;){const a=r(t);if(a!==void 0)return a;const u=rs(t);if(u===t)return;t=u}}function S$(t){return mu(t,"/node_modules")}function M(t,r,a,u,h,p,m){return{code:t,category:r,key:a,message:u,reportsUnnecessary:h,elidedInCompatabilityPyramid:p,reportsDeprecated:m}}var k={Unterminated_string_literal:M(1002,1,"Unterminated_string_literal_1002","Unterminated string literal."),Identifier_expected:M(1003,1,"Identifier_expected_1003","Identifier expected."),_0_expected:M(1005,1,"_0_expected_1005","'{0}' expected."),A_file_cannot_have_a_reference_to_itself:M(1006,1,"A_file_cannot_have_a_reference_to_itself_1006","A file cannot have a reference to itself."),The_parser_expected_to_find_a_1_to_match_the_0_token_here:M(1007,1,"The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007","The parser expected to find a '{1}' to match the '{0}' token here."),Trailing_comma_not_allowed:M(1009,1,"Trailing_comma_not_allowed_1009","Trailing comma not allowed."),Asterisk_Slash_expected:M(1010,1,"Asterisk_Slash_expected_1010","'*/' expected."),An_element_access_expression_should_take_an_argument:M(1011,1,"An_element_access_expression_should_take_an_argument_1011","An element access expression should take an argument."),Unexpected_token:M(1012,1,"Unexpected_token_1012","Unexpected token."),A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma:M(1013,1,"A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013","A rest parameter or binding pattern may not have a trailing comma."),A_rest_parameter_must_be_last_in_a_parameter_list:M(1014,1,"A_rest_parameter_must_be_last_in_a_parameter_list_1014","A rest parameter must be last in a parameter list."),Parameter_cannot_have_question_mark_and_initializer:M(1015,1,"Parameter_cannot_have_question_mark_and_initializer_1015","Parameter cannot have question mark and initializer."),A_required_parameter_cannot_follow_an_optional_parameter:M(1016,1,"A_required_parameter_cannot_follow_an_optional_parameter_1016","A required parameter cannot follow an optional parameter."),An_index_signature_cannot_have_a_rest_parameter:M(1017,1,"An_index_signature_cannot_have_a_rest_parameter_1017","An index signature cannot have a rest parameter."),An_index_signature_parameter_cannot_have_an_accessibility_modifier:M(1018,1,"An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018","An index signature parameter cannot have an accessibility modifier."),An_index_signature_parameter_cannot_have_a_question_mark:M(1019,1,"An_index_signature_parameter_cannot_have_a_question_mark_1019","An index signature parameter cannot have a question mark."),An_index_signature_parameter_cannot_have_an_initializer:M(1020,1,"An_index_signature_parameter_cannot_have_an_initializer_1020","An index signature parameter cannot have an initializer."),An_index_signature_must_have_a_type_annotation:M(1021,1,"An_index_signature_must_have_a_type_annotation_1021","An index signature must have a type annotation."),An_index_signature_parameter_must_have_a_type_annotation:M(1022,1,"An_index_signature_parameter_must_have_a_type_annotation_1022","An index signature parameter must have a type annotation."),readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature:M(1024,1,"readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024","'readonly' modifier can only appear on a property declaration or index signature."),An_index_signature_cannot_have_a_trailing_comma:M(1025,1,"An_index_signature_cannot_have_a_trailing_comma_1025","An index signature cannot have a trailing comma."),Accessibility_modifier_already_seen:M(1028,1,"Accessibility_modifier_already_seen_1028","Accessibility modifier already seen."),_0_modifier_must_precede_1_modifier:M(1029,1,"_0_modifier_must_precede_1_modifier_1029","'{0}' modifier must precede '{1}' modifier."),_0_modifier_already_seen:M(1030,1,"_0_modifier_already_seen_1030","'{0}' modifier already seen."),_0_modifier_cannot_appear_on_class_elements_of_this_kind:M(1031,1,"_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031","'{0}' modifier cannot appear on class elements of this kind."),super_must_be_followed_by_an_argument_list_or_member_access:M(1034,1,"super_must_be_followed_by_an_argument_list_or_member_access_1034","'super' must be followed by an argument list or member access."),Only_ambient_modules_can_use_quoted_names:M(1035,1,"Only_ambient_modules_can_use_quoted_names_1035","Only ambient modules can use quoted names."),Statements_are_not_allowed_in_ambient_contexts:M(1036,1,"Statements_are_not_allowed_in_ambient_contexts_1036","Statements are not allowed in ambient contexts."),A_declare_modifier_cannot_be_used_in_an_already_ambient_context:M(1038,1,"A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038","A 'declare' modifier cannot be used in an already ambient context."),Initializers_are_not_allowed_in_ambient_contexts:M(1039,1,"Initializers_are_not_allowed_in_ambient_contexts_1039","Initializers are not allowed in ambient contexts."),_0_modifier_cannot_be_used_in_an_ambient_context:M(1040,1,"_0_modifier_cannot_be_used_in_an_ambient_context_1040","'{0}' modifier cannot be used in an ambient context."),_0_modifier_cannot_be_used_here:M(1042,1,"_0_modifier_cannot_be_used_here_1042","'{0}' modifier cannot be used here."),_0_modifier_cannot_appear_on_a_module_or_namespace_element:M(1044,1,"_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044","'{0}' modifier cannot appear on a module or namespace element."),Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier:M(1046,1,"Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046","Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."),A_rest_parameter_cannot_be_optional:M(1047,1,"A_rest_parameter_cannot_be_optional_1047","A rest parameter cannot be optional."),A_rest_parameter_cannot_have_an_initializer:M(1048,1,"A_rest_parameter_cannot_have_an_initializer_1048","A rest parameter cannot have an initializer."),A_set_accessor_must_have_exactly_one_parameter:M(1049,1,"A_set_accessor_must_have_exactly_one_parameter_1049","A 'set' accessor must have exactly one parameter."),A_set_accessor_cannot_have_an_optional_parameter:M(1051,1,"A_set_accessor_cannot_have_an_optional_parameter_1051","A 'set' accessor cannot have an optional parameter."),A_set_accessor_parameter_cannot_have_an_initializer:M(1052,1,"A_set_accessor_parameter_cannot_have_an_initializer_1052","A 'set' accessor parameter cannot have an initializer."),A_set_accessor_cannot_have_rest_parameter:M(1053,1,"A_set_accessor_cannot_have_rest_parameter_1053","A 'set' accessor cannot have rest parameter."),A_get_accessor_cannot_have_parameters:M(1054,1,"A_get_accessor_cannot_have_parameters_1054","A 'get' accessor cannot have parameters."),Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value:M(1055,1,"Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compa_1055","Type '{0}' is not a valid async function return type in ES5 because it does not refer to a Promise-compatible constructor value."),Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher:M(1056,1,"Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056","Accessors are only available when targeting ECMAScript 5 and higher."),The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:M(1058,1,"The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058","The return type of an async function must either be a valid promise or must not contain a callable 'then' member."),A_promise_must_have_a_then_method:M(1059,1,"A_promise_must_have_a_then_method_1059","A promise must have a 'then' method."),The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback:M(1060,1,"The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060","The first parameter of the 'then' method of a promise must be a callback."),Enum_member_must_have_initializer:M(1061,1,"Enum_member_must_have_initializer_1061","Enum member must have initializer."),Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method:M(1062,1,"Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062","Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."),An_export_assignment_cannot_be_used_in_a_namespace:M(1063,1,"An_export_assignment_cannot_be_used_in_a_namespace_1063","An export assignment cannot be used in a namespace."),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0:M(1064,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064","The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type:M(1065,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065","The return type of an async function or method must be the global Promise type."),In_ambient_enum_declarations_member_initializer_must_be_constant_expression:M(1066,1,"In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066","In ambient enum declarations member initializer must be constant expression."),Unexpected_token_A_constructor_method_accessor_or_property_was_expected:M(1068,1,"Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068","Unexpected token. A constructor, method, accessor, or property was expected."),Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces:M(1069,1,"Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069","Unexpected token. A type parameter name was expected without curly braces."),_0_modifier_cannot_appear_on_a_type_member:M(1070,1,"_0_modifier_cannot_appear_on_a_type_member_1070","'{0}' modifier cannot appear on a type member."),_0_modifier_cannot_appear_on_an_index_signature:M(1071,1,"_0_modifier_cannot_appear_on_an_index_signature_1071","'{0}' modifier cannot appear on an index signature."),A_0_modifier_cannot_be_used_with_an_import_declaration:M(1079,1,"A_0_modifier_cannot_be_used_with_an_import_declaration_1079","A '{0}' modifier cannot be used with an import declaration."),Invalid_reference_directive_syntax:M(1084,1,"Invalid_reference_directive_syntax_1084","Invalid 'reference' directive syntax."),_0_modifier_cannot_appear_on_a_constructor_declaration:M(1089,1,"_0_modifier_cannot_appear_on_a_constructor_declaration_1089","'{0}' modifier cannot appear on a constructor declaration."),_0_modifier_cannot_appear_on_a_parameter:M(1090,1,"_0_modifier_cannot_appear_on_a_parameter_1090","'{0}' modifier cannot appear on a parameter."),Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:M(1091,1,"Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091","Only a single variable declaration is allowed in a 'for...in' statement."),Type_parameters_cannot_appear_on_a_constructor_declaration:M(1092,1,"Type_parameters_cannot_appear_on_a_constructor_declaration_1092","Type parameters cannot appear on a constructor declaration."),Type_annotation_cannot_appear_on_a_constructor_declaration:M(1093,1,"Type_annotation_cannot_appear_on_a_constructor_declaration_1093","Type annotation cannot appear on a constructor declaration."),An_accessor_cannot_have_type_parameters:M(1094,1,"An_accessor_cannot_have_type_parameters_1094","An accessor cannot have type parameters."),A_set_accessor_cannot_have_a_return_type_annotation:M(1095,1,"A_set_accessor_cannot_have_a_return_type_annotation_1095","A 'set' accessor cannot have a return type annotation."),An_index_signature_must_have_exactly_one_parameter:M(1096,1,"An_index_signature_must_have_exactly_one_parameter_1096","An index signature must have exactly one parameter."),_0_list_cannot_be_empty:M(1097,1,"_0_list_cannot_be_empty_1097","'{0}' list cannot be empty."),Type_parameter_list_cannot_be_empty:M(1098,1,"Type_parameter_list_cannot_be_empty_1098","Type parameter list cannot be empty."),Type_argument_list_cannot_be_empty:M(1099,1,"Type_argument_list_cannot_be_empty_1099","Type argument list cannot be empty."),Invalid_use_of_0_in_strict_mode:M(1100,1,"Invalid_use_of_0_in_strict_mode_1100","Invalid use of '{0}' in strict mode."),with_statements_are_not_allowed_in_strict_mode:M(1101,1,"with_statements_are_not_allowed_in_strict_mode_1101","'with' statements are not allowed in strict mode."),delete_cannot_be_called_on_an_identifier_in_strict_mode:M(1102,1,"delete_cannot_be_called_on_an_identifier_in_strict_mode_1102","'delete' cannot be called on an identifier in strict mode."),for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:M(1103,1,"for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103","'for await' loops are only allowed within async functions and at the top levels of modules."),A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement:M(1104,1,"A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104","A 'continue' statement can only be used within an enclosing iteration statement."),A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:M(1105,1,"A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105","A 'break' statement can only be used within an enclosing iteration or switch statement."),The_left_hand_side_of_a_for_of_statement_may_not_be_async:M(1106,1,"The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106","The left-hand side of a 'for...of' statement may not be 'async'."),Jump_target_cannot_cross_function_boundary:M(1107,1,"Jump_target_cannot_cross_function_boundary_1107","Jump target cannot cross function boundary."),A_return_statement_can_only_be_used_within_a_function_body:M(1108,1,"A_return_statement_can_only_be_used_within_a_function_body_1108","A 'return' statement can only be used within a function body."),Expression_expected:M(1109,1,"Expression_expected_1109","Expression expected."),Type_expected:M(1110,1,"Type_expected_1110","Type expected."),Private_field_0_must_be_declared_in_an_enclosing_class:M(1111,1,"Private_field_0_must_be_declared_in_an_enclosing_class_1111","Private field '{0}' must be declared in an enclosing class."),A_default_clause_cannot_appear_more_than_once_in_a_switch_statement:M(1113,1,"A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113","A 'default' clause cannot appear more than once in a 'switch' statement."),Duplicate_label_0:M(1114,1,"Duplicate_label_0_1114","Duplicate label '{0}'."),A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement:M(1115,1,"A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115","A 'continue' statement can only jump to a label of an enclosing iteration statement."),A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:M(1116,1,"A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116","A 'break' statement can only jump to a label of an enclosing statement."),An_object_literal_cannot_have_multiple_properties_with_the_same_name:M(1117,1,"An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117","An object literal cannot have multiple properties with the same name."),An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name:M(1118,1,"An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118","An object literal cannot have multiple get/set accessors with the same name."),An_object_literal_cannot_have_property_and_accessor_with_the_same_name:M(1119,1,"An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119","An object literal cannot have property and accessor with the same name."),An_export_assignment_cannot_have_modifiers:M(1120,1,"An_export_assignment_cannot_have_modifiers_1120","An export assignment cannot have modifiers."),Octal_literals_are_not_allowed_Use_the_syntax_0:M(1121,1,"Octal_literals_are_not_allowed_Use_the_syntax_0_1121","Octal literals are not allowed. Use the syntax '{0}'."),Variable_declaration_list_cannot_be_empty:M(1123,1,"Variable_declaration_list_cannot_be_empty_1123","Variable declaration list cannot be empty."),Digit_expected:M(1124,1,"Digit_expected_1124","Digit expected."),Hexadecimal_digit_expected:M(1125,1,"Hexadecimal_digit_expected_1125","Hexadecimal digit expected."),Unexpected_end_of_text:M(1126,1,"Unexpected_end_of_text_1126","Unexpected end of text."),Invalid_character:M(1127,1,"Invalid_character_1127","Invalid character."),Declaration_or_statement_expected:M(1128,1,"Declaration_or_statement_expected_1128","Declaration or statement expected."),Statement_expected:M(1129,1,"Statement_expected_1129","Statement expected."),case_or_default_expected:M(1130,1,"case_or_default_expected_1130","'case' or 'default' expected."),Property_or_signature_expected:M(1131,1,"Property_or_signature_expected_1131","Property or signature expected."),Enum_member_expected:M(1132,1,"Enum_member_expected_1132","Enum member expected."),Variable_declaration_expected:M(1134,1,"Variable_declaration_expected_1134","Variable declaration expected."),Argument_expression_expected:M(1135,1,"Argument_expression_expected_1135","Argument expression expected."),Property_assignment_expected:M(1136,1,"Property_assignment_expected_1136","Property assignment expected."),Expression_or_comma_expected:M(1137,1,"Expression_or_comma_expected_1137","Expression or comma expected."),Parameter_declaration_expected:M(1138,1,"Parameter_declaration_expected_1138","Parameter declaration expected."),Type_parameter_declaration_expected:M(1139,1,"Type_parameter_declaration_expected_1139","Type parameter declaration expected."),Type_argument_expected:M(1140,1,"Type_argument_expected_1140","Type argument expected."),String_literal_expected:M(1141,1,"String_literal_expected_1141","String literal expected."),Line_break_not_permitted_here:M(1142,1,"Line_break_not_permitted_here_1142","Line break not permitted here."),or_expected:M(1144,1,"or_expected_1144","'{' or ';' expected."),or_JSX_element_expected:M(1145,1,"or_JSX_element_expected_1145","'{' or JSX element expected."),Declaration_expected:M(1146,1,"Declaration_expected_1146","Declaration expected."),Import_declarations_in_a_namespace_cannot_reference_a_module:M(1147,1,"Import_declarations_in_a_namespace_cannot_reference_a_module_1147","Import declarations in a namespace cannot reference a module."),Cannot_use_imports_exports_or_module_augmentations_when_module_is_none:M(1148,1,"Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148","Cannot use imports, exports, or module augmentations when '--module' is 'none'."),File_name_0_differs_from_already_included_file_name_1_only_in_casing:M(1149,1,"File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149","File name '{0}' differs from already included file name '{1}' only in casing."),_0_declarations_must_be_initialized:M(1155,1,"_0_declarations_must_be_initialized_1155","'{0}' declarations must be initialized."),_0_declarations_can_only_be_declared_inside_a_block:M(1156,1,"_0_declarations_can_only_be_declared_inside_a_block_1156","'{0}' declarations can only be declared inside a block."),Unterminated_template_literal:M(1160,1,"Unterminated_template_literal_1160","Unterminated template literal."),Unterminated_regular_expression_literal:M(1161,1,"Unterminated_regular_expression_literal_1161","Unterminated regular expression literal."),An_object_member_cannot_be_declared_optional:M(1162,1,"An_object_member_cannot_be_declared_optional_1162","An object member cannot be declared optional."),A_yield_expression_is_only_allowed_in_a_generator_body:M(1163,1,"A_yield_expression_is_only_allowed_in_a_generator_body_1163","A 'yield' expression is only allowed in a generator body."),Computed_property_names_are_not_allowed_in_enums:M(1164,1,"Computed_property_names_are_not_allowed_in_enums_1164","Computed property names are not allowed in enums."),A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:M(1165,1,"A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165","A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type:M(1166,1,"A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166","A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type."),A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:M(1168,1,"A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168","A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:M(1169,1,"A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169","A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:M(1170,1,"A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170","A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_comma_expression_is_not_allowed_in_a_computed_property_name:M(1171,1,"A_comma_expression_is_not_allowed_in_a_computed_property_name_1171","A comma expression is not allowed in a computed property name."),extends_clause_already_seen:M(1172,1,"extends_clause_already_seen_1172","'extends' clause already seen."),extends_clause_must_precede_implements_clause:M(1173,1,"extends_clause_must_precede_implements_clause_1173","'extends' clause must precede 'implements' clause."),Classes_can_only_extend_a_single_class:M(1174,1,"Classes_can_only_extend_a_single_class_1174","Classes can only extend a single class."),implements_clause_already_seen:M(1175,1,"implements_clause_already_seen_1175","'implements' clause already seen."),Interface_declaration_cannot_have_implements_clause:M(1176,1,"Interface_declaration_cannot_have_implements_clause_1176","Interface declaration cannot have 'implements' clause."),Binary_digit_expected:M(1177,1,"Binary_digit_expected_1177","Binary digit expected."),Octal_digit_expected:M(1178,1,"Octal_digit_expected_1178","Octal digit expected."),Unexpected_token_expected:M(1179,1,"Unexpected_token_expected_1179","Unexpected token. '{' expected."),Property_destructuring_pattern_expected:M(1180,1,"Property_destructuring_pattern_expected_1180","Property destructuring pattern expected."),Array_element_destructuring_pattern_expected:M(1181,1,"Array_element_destructuring_pattern_expected_1181","Array element destructuring pattern expected."),A_destructuring_declaration_must_have_an_initializer:M(1182,1,"A_destructuring_declaration_must_have_an_initializer_1182","A destructuring declaration must have an initializer."),An_implementation_cannot_be_declared_in_ambient_contexts:M(1183,1,"An_implementation_cannot_be_declared_in_ambient_contexts_1183","An implementation cannot be declared in ambient contexts."),Modifiers_cannot_appear_here:M(1184,1,"Modifiers_cannot_appear_here_1184","Modifiers cannot appear here."),Merge_conflict_marker_encountered:M(1185,1,"Merge_conflict_marker_encountered_1185","Merge conflict marker encountered."),A_rest_element_cannot_have_an_initializer:M(1186,1,"A_rest_element_cannot_have_an_initializer_1186","A rest element cannot have an initializer."),A_parameter_property_may_not_be_declared_using_a_binding_pattern:M(1187,1,"A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187","A parameter property may not be declared using a binding pattern."),Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement:M(1188,1,"Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188","Only a single variable declaration is allowed in a 'for...of' statement."),The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:M(1189,1,"The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189","The variable declaration of a 'for...in' statement cannot have an initializer."),The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer:M(1190,1,"The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190","The variable declaration of a 'for...of' statement cannot have an initializer."),An_import_declaration_cannot_have_modifiers:M(1191,1,"An_import_declaration_cannot_have_modifiers_1191","An import declaration cannot have modifiers."),Module_0_has_no_default_export:M(1192,1,"Module_0_has_no_default_export_1192","Module '{0}' has no default export."),An_export_declaration_cannot_have_modifiers:M(1193,1,"An_export_declaration_cannot_have_modifiers_1193","An export declaration cannot have modifiers."),Export_declarations_are_not_permitted_in_a_namespace:M(1194,1,"Export_declarations_are_not_permitted_in_a_namespace_1194","Export declarations are not permitted in a namespace."),export_Asterisk_does_not_re_export_a_default:M(1195,1,"export_Asterisk_does_not_re_export_a_default_1195","'export *' does not re-export a default."),Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified:M(1196,1,"Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196","Catch clause variable type annotation must be 'any' or 'unknown' if specified."),Catch_clause_variable_cannot_have_an_initializer:M(1197,1,"Catch_clause_variable_cannot_have_an_initializer_1197","Catch clause variable cannot have an initializer."),An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive:M(1198,1,"An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198","An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."),Unterminated_Unicode_escape_sequence:M(1199,1,"Unterminated_Unicode_escape_sequence_1199","Unterminated Unicode escape sequence."),Line_terminator_not_permitted_before_arrow:M(1200,1,"Line_terminator_not_permitted_before_arrow_1200","Line terminator not permitted before arrow."),Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead:M(1202,1,"Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202",`Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.`),Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead:M(1203,1,"Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203","Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."),Re_exporting_a_type_when_0_is_enabled_requires_using_export_type:M(1205,1,"Re_exporting_a_type_when_0_is_enabled_requires_using_export_type_1205","Re-exporting a type when '{0}' is enabled requires using 'export type'."),Decorators_are_not_valid_here:M(1206,1,"Decorators_are_not_valid_here_1206","Decorators are not valid here."),Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name:M(1207,1,"Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207","Decorators cannot be applied to multiple get/set accessors of the same name."),Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0:M(1209,1,"Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209","Invalid optional chain from new expression. Did you mean to call '{0}()'?"),Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode:M(1210,1,"Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210","Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."),A_class_declaration_without_the_default_modifier_must_have_a_name:M(1211,1,"A_class_declaration_without_the_default_modifier_must_have_a_name_1211","A class declaration without the 'default' modifier must have a name."),Identifier_expected_0_is_a_reserved_word_in_strict_mode:M(1212,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212","Identifier expected. '{0}' is a reserved word in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode:M(1213,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213","Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode:M(1214,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214","Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."),Invalid_use_of_0_Modules_are_automatically_in_strict_mode:M(1215,1,"Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215","Invalid use of '{0}'. Modules are automatically in strict mode."),Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules:M(1216,1,"Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216","Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."),Export_assignment_is_not_supported_when_module_flag_is_system:M(1218,1,"Export_assignment_is_not_supported_when_module_flag_is_system_1218","Export assignment is not supported when '--module' flag is 'system'."),Generators_are_not_allowed_in_an_ambient_context:M(1221,1,"Generators_are_not_allowed_in_an_ambient_context_1221","Generators are not allowed in an ambient context."),An_overload_signature_cannot_be_declared_as_a_generator:M(1222,1,"An_overload_signature_cannot_be_declared_as_a_generator_1222","An overload signature cannot be declared as a generator."),_0_tag_already_specified:M(1223,1,"_0_tag_already_specified_1223","'{0}' tag already specified."),Signature_0_must_be_a_type_predicate:M(1224,1,"Signature_0_must_be_a_type_predicate_1224","Signature '{0}' must be a type predicate."),Cannot_find_parameter_0:M(1225,1,"Cannot_find_parameter_0_1225","Cannot find parameter '{0}'."),Type_predicate_0_is_not_assignable_to_1:M(1226,1,"Type_predicate_0_is_not_assignable_to_1_1226","Type predicate '{0}' is not assignable to '{1}'."),Parameter_0_is_not_in_the_same_position_as_parameter_1:M(1227,1,"Parameter_0_is_not_in_the_same_position_as_parameter_1_1227","Parameter '{0}' is not in the same position as parameter '{1}'."),A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods:M(1228,1,"A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228","A type predicate is only allowed in return type position for functions and methods."),A_type_predicate_cannot_reference_a_rest_parameter:M(1229,1,"A_type_predicate_cannot_reference_a_rest_parameter_1229","A type predicate cannot reference a rest parameter."),A_type_predicate_cannot_reference_element_0_in_a_binding_pattern:M(1230,1,"A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230","A type predicate cannot reference element '{0}' in a binding pattern."),An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration:M(1231,1,"An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231","An export assignment must be at the top level of a file or module declaration."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:M(1232,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232","An import declaration can only be used at the top level of a namespace or module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:M(1233,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233","An export declaration can only be used at the top level of a namespace or module."),An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:M(1234,1,"An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234","An ambient module declaration is only allowed at the top level in a file."),A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module:M(1235,1,"A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235","A namespace declaration is only allowed at the top level of a namespace or module."),The_return_type_of_a_property_decorator_function_must_be_either_void_or_any:M(1236,1,"The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236","The return type of a property decorator function must be either 'void' or 'any'."),The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any:M(1237,1,"The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237","The return type of a parameter decorator function must be either 'void' or 'any'."),Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression:M(1238,1,"Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238","Unable to resolve signature of class decorator when called as an expression."),Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression:M(1239,1,"Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239","Unable to resolve signature of parameter decorator when called as an expression."),Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression:M(1240,1,"Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240","Unable to resolve signature of property decorator when called as an expression."),Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression:M(1241,1,"Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241","Unable to resolve signature of method decorator when called as an expression."),abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration:M(1242,1,"abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242","'abstract' modifier can only appear on a class, method, or property declaration."),_0_modifier_cannot_be_used_with_1_modifier:M(1243,1,"_0_modifier_cannot_be_used_with_1_modifier_1243","'{0}' modifier cannot be used with '{1}' modifier."),Abstract_methods_can_only_appear_within_an_abstract_class:M(1244,1,"Abstract_methods_can_only_appear_within_an_abstract_class_1244","Abstract methods can only appear within an abstract class."),Method_0_cannot_have_an_implementation_because_it_is_marked_abstract:M(1245,1,"Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245","Method '{0}' cannot have an implementation because it is marked abstract."),An_interface_property_cannot_have_an_initializer:M(1246,1,"An_interface_property_cannot_have_an_initializer_1246","An interface property cannot have an initializer."),A_type_literal_property_cannot_have_an_initializer:M(1247,1,"A_type_literal_property_cannot_have_an_initializer_1247","A type literal property cannot have an initializer."),A_class_member_cannot_have_the_0_keyword:M(1248,1,"A_class_member_cannot_have_the_0_keyword_1248","A class member cannot have the '{0}' keyword."),A_decorator_can_only_decorate_a_method_implementation_not_an_overload:M(1249,1,"A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249","A decorator can only decorate a method implementation, not an overload."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5:M(1250,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_1250","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode:M(1251,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definiti_1251","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Class definitions are automatically in strict mode."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode:M(1252,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_au_1252","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Modules are automatically in strict mode."),Abstract_properties_can_only_appear_within_an_abstract_class:M(1253,1,"Abstract_properties_can_only_appear_within_an_abstract_class_1253","Abstract properties can only appear within an abstract class."),A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference:M(1254,1,"A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254","A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."),A_definite_assignment_assertion_is_not_permitted_in_this_context:M(1255,1,"A_definite_assignment_assertion_is_not_permitted_in_this_context_1255","A definite assignment assertion '!' is not permitted in this context."),A_required_element_cannot_follow_an_optional_element:M(1257,1,"A_required_element_cannot_follow_an_optional_element_1257","A required element cannot follow an optional element."),A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration:M(1258,1,"A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258","A default export must be at the top level of a file or module declaration."),Module_0_can_only_be_default_imported_using_the_1_flag:M(1259,1,"Module_0_can_only_be_default_imported_using_the_1_flag_1259","Module '{0}' can only be default-imported using the '{1}' flag"),Keywords_cannot_contain_escape_characters:M(1260,1,"Keywords_cannot_contain_escape_characters_1260","Keywords cannot contain escape characters."),Already_included_file_name_0_differs_from_file_name_1_only_in_casing:M(1261,1,"Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261","Already included file name '{0}' differs from file name '{1}' only in casing."),Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module:M(1262,1,"Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262","Identifier expected. '{0}' is a reserved word at the top-level of a module."),Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:M(1263,1,"Declarations_with_initializers_cannot_also_have_definite_assignment_assertions_1263","Declarations with initializers cannot also have definite assignment assertions."),Declarations_with_definite_assignment_assertions_must_also_have_type_annotations:M(1264,1,"Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264","Declarations with definite assignment assertions must also have type annotations."),A_rest_element_cannot_follow_another_rest_element:M(1265,1,"A_rest_element_cannot_follow_another_rest_element_1265","A rest element cannot follow another rest element."),An_optional_element_cannot_follow_a_rest_element:M(1266,1,"An_optional_element_cannot_follow_a_rest_element_1266","An optional element cannot follow a rest element."),Property_0_cannot_have_an_initializer_because_it_is_marked_abstract:M(1267,1,"Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267","Property '{0}' cannot have an initializer because it is marked abstract."),An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type:M(1268,1,"An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268","An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."),Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled:M(1269,1,"Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled_1269","Cannot use 'export import' on a type or type-only namespace when '{0}' is enabled."),Decorator_function_return_type_0_is_not_assignable_to_type_1:M(1270,1,"Decorator_function_return_type_0_is_not_assignable_to_type_1_1270","Decorator function return type '{0}' is not assignable to type '{1}'."),Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any:M(1271,1,"Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271","Decorator function return type is '{0}' but is expected to be 'void' or 'any'."),A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled:M(1272,1,"A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272","A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."),_0_modifier_cannot_appear_on_a_type_parameter:M(1273,1,"_0_modifier_cannot_appear_on_a_type_parameter_1273","'{0}' modifier cannot appear on a type parameter"),_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias:M(1274,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274","'{0}' modifier can only appear on a type parameter of a class, interface or type alias"),accessor_modifier_can_only_appear_on_a_property_declaration:M(1275,1,"accessor_modifier_can_only_appear_on_a_property_declaration_1275","'accessor' modifier can only appear on a property declaration."),An_accessor_property_cannot_be_declared_optional:M(1276,1,"An_accessor_property_cannot_be_declared_optional_1276","An 'accessor' property cannot be declared optional."),_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class:M(1277,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class_1277","'{0}' modifier can only appear on a type parameter of a function, method or class"),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0:M(1278,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0_1278","The runtime will invoke the decorator with {1} arguments, but the decorator expects {0}."),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0:M(1279,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0_1279","The runtime will invoke the decorator with {1} arguments, but the decorator expects at least {0}."),Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement:M(1280,1,"Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to__1280","Namespaces are not allowed in global script files when '{0}' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement."),Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead:M(1281,1,"Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead_1281","Cannot access '{0}' from another file without qualification when '{1}' is enabled. Use '{2}' instead."),An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:M(1282,1,"An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers__1282","An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:M(1283,1,"An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283","An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:M(1284,1,"An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284","An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:M(1285,1,"An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285","An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled:M(1286,1,"ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286","ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."),A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled:M(1287,1,"A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287","A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."),An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled:M(1288,1,"An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288","An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:M(1289,1,"_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1289","'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default:M(1290,1,"_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1290","'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:M(1291,1,"_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1291","'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default:M(1292,1,"_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1292","'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),with_statements_are_not_allowed_in_an_async_function_block:M(1300,1,"with_statements_are_not_allowed_in_an_async_function_block_1300","'with' statements are not allowed in an async function block."),await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:M(1308,1,"await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308","'await' expressions are only allowed within async functions and at the top levels of modules."),The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level:M(1309,1,"The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309","The current file is a CommonJS module and cannot use 'await' at the top level."),Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern:M(1312,1,"Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312","Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."),The_body_of_an_if_statement_cannot_be_the_empty_statement:M(1313,1,"The_body_of_an_if_statement_cannot_be_the_empty_statement_1313","The body of an 'if' statement cannot be the empty statement."),Global_module_exports_may_only_appear_in_module_files:M(1314,1,"Global_module_exports_may_only_appear_in_module_files_1314","Global module exports may only appear in module files."),Global_module_exports_may_only_appear_in_declaration_files:M(1315,1,"Global_module_exports_may_only_appear_in_declaration_files_1315","Global module exports may only appear in declaration files."),Global_module_exports_may_only_appear_at_top_level:M(1316,1,"Global_module_exports_may_only_appear_at_top_level_1316","Global module exports may only appear at top level."),A_parameter_property_cannot_be_declared_using_a_rest_parameter:M(1317,1,"A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317","A parameter property cannot be declared using a rest parameter."),An_abstract_accessor_cannot_have_an_implementation:M(1318,1,"An_abstract_accessor_cannot_have_an_implementation_1318","An abstract accessor cannot have an implementation."),A_default_export_can_only_be_used_in_an_ECMAScript_style_module:M(1319,1,"A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319","A default export can only be used in an ECMAScript-style module."),Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:M(1320,1,"Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320","Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."),Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:M(1321,1,"Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321","Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."),Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:M(1322,1,"Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322","Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."),Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext:M(1323,1,"Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323","Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."),Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext:M(1324,1,"Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324","Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'."),Argument_of_dynamic_import_cannot_be_spread_element:M(1325,1,"Argument_of_dynamic_import_cannot_be_spread_element_1325","Argument of dynamic import cannot be spread element."),This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments:M(1326,1,"This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326","This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."),String_literal_with_double_quotes_expected:M(1327,1,"String_literal_with_double_quotes_expected_1327","String literal with double quotes expected."),Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal:M(1328,1,"Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328","Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."),_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0:M(1329,1,"_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329","'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"),A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly:M(1330,1,"A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330","A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."),A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly:M(1331,1,"A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331","A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."),A_variable_whose_type_is_a_unique_symbol_type_must_be_const:M(1332,1,"A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332","A variable whose type is a 'unique symbol' type must be 'const'."),unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name:M(1333,1,"unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333","'unique symbol' types may not be used on a variable declaration with a binding name."),unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement:M(1334,1,"unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334","'unique symbol' types are only allowed on variables in a variable statement."),unique_symbol_types_are_not_allowed_here:M(1335,1,"unique_symbol_types_are_not_allowed_here_1335","'unique symbol' types are not allowed here."),An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead:M(1337,1,"An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337","An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."),infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type:M(1338,1,"infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338","'infer' declarations are only permitted in the 'extends' clause of a conditional type."),Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here:M(1339,1,"Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339","Module '{0}' does not refer to a value, but is used as a value here."),Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0:M(1340,1,"Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340","Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),Class_constructor_may_not_be_an_accessor:M(1341,1,"Class_constructor_may_not_be_an_accessor_1341","Class constructor may not be an accessor."),The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext:M(1343,1,"The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343","The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."),A_label_is_not_allowed_here:M(1344,1,"A_label_is_not_allowed_here_1344","'A label is not allowed here."),An_expression_of_type_void_cannot_be_tested_for_truthiness:M(1345,1,"An_expression_of_type_void_cannot_be_tested_for_truthiness_1345","An expression of type 'void' cannot be tested for truthiness."),This_parameter_is_not_allowed_with_use_strict_directive:M(1346,1,"This_parameter_is_not_allowed_with_use_strict_directive_1346","This parameter is not allowed with 'use strict' directive."),use_strict_directive_cannot_be_used_with_non_simple_parameter_list:M(1347,1,"use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347","'use strict' directive cannot be used with non-simple parameter list."),Non_simple_parameter_declared_here:M(1348,1,"Non_simple_parameter_declared_here_1348","Non-simple parameter declared here."),use_strict_directive_used_here:M(1349,1,"use_strict_directive_used_here_1349","'use strict' directive used here."),Print_the_final_configuration_instead_of_building:M(1350,3,"Print_the_final_configuration_instead_of_building_1350","Print the final configuration instead of building."),An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal:M(1351,1,"An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351","An identifier or keyword cannot immediately follow a numeric literal."),A_bigint_literal_cannot_use_exponential_notation:M(1352,1,"A_bigint_literal_cannot_use_exponential_notation_1352","A bigint literal cannot use exponential notation."),A_bigint_literal_must_be_an_integer:M(1353,1,"A_bigint_literal_must_be_an_integer_1353","A bigint literal must be an integer."),readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types:M(1354,1,"readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354","'readonly' type modifier is only permitted on array and tuple literal types."),A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals:M(1355,1,"A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355","A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."),Did_you_mean_to_mark_this_function_as_async:M(1356,1,"Did_you_mean_to_mark_this_function_as_async_1356","Did you mean to mark this function as 'async'?"),An_enum_member_name_must_be_followed_by_a_or:M(1357,1,"An_enum_member_name_must_be_followed_by_a_or_1357","An enum member name must be followed by a ',', '=', or '}'."),Tagged_template_expressions_are_not_permitted_in_an_optional_chain:M(1358,1,"Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358","Tagged template expressions are not permitted in an optional chain."),Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:M(1359,1,"Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359","Identifier expected. '{0}' is a reserved word that cannot be used here."),Type_0_does_not_satisfy_the_expected_type_1:M(1360,1,"Type_0_does_not_satisfy_the_expected_type_1_1360","Type '{0}' does not satisfy the expected type '{1}'."),_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type:M(1361,1,"_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361","'{0}' cannot be used as a value because it was imported using 'import type'."),_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type:M(1362,1,"_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362","'{0}' cannot be used as a value because it was exported using 'export type'."),A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both:M(1363,1,"A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363","A type-only import can specify a default import or named bindings, but not both."),Convert_to_type_only_export:M(1364,3,"Convert_to_type_only_export_1364","Convert to type-only export"),Convert_all_re_exported_types_to_type_only_exports:M(1365,3,"Convert_all_re_exported_types_to_type_only_exports_1365","Convert all re-exported types to type-only exports"),Split_into_two_separate_import_declarations:M(1366,3,"Split_into_two_separate_import_declarations_1366","Split into two separate import declarations"),Split_all_invalid_type_only_imports:M(1367,3,"Split_all_invalid_type_only_imports_1367","Split all invalid type-only imports"),Class_constructor_may_not_be_a_generator:M(1368,1,"Class_constructor_may_not_be_a_generator_1368","Class constructor may not be a generator."),Did_you_mean_0:M(1369,3,"Did_you_mean_0_1369","Did you mean '{0}'?"),await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:M(1375,1,"await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375","'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),_0_was_imported_here:M(1376,3,"_0_was_imported_here_1376","'{0}' was imported here."),_0_was_exported_here:M(1377,3,"_0_was_exported_here_1377","'{0}' was exported here."),Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:M(1378,1,"Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378","Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type:M(1379,1,"An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379","An import alias cannot reference a declaration that was exported using 'export type'."),An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type:M(1380,1,"An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380","An import alias cannot reference a declaration that was imported using 'import type'."),Unexpected_token_Did_you_mean_or_rbrace:M(1381,1,"Unexpected_token_Did_you_mean_or_rbrace_1381","Unexpected token. Did you mean `{'}'}` or `}`?"),Unexpected_token_Did_you_mean_or_gt:M(1382,1,"Unexpected_token_Did_you_mean_or_gt_1382","Unexpected token. Did you mean `{'>'}` or `>`?"),Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:M(1385,1,"Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385","Function type notation must be parenthesized when used in a union type."),Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:M(1386,1,"Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386","Constructor type notation must be parenthesized when used in a union type."),Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:M(1387,1,"Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387","Function type notation must be parenthesized when used in an intersection type."),Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:M(1388,1,"Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388","Constructor type notation must be parenthesized when used in an intersection type."),_0_is_not_allowed_as_a_variable_declaration_name:M(1389,1,"_0_is_not_allowed_as_a_variable_declaration_name_1389","'{0}' is not allowed as a variable declaration name."),_0_is_not_allowed_as_a_parameter_name:M(1390,1,"_0_is_not_allowed_as_a_parameter_name_1390","'{0}' is not allowed as a parameter name."),An_import_alias_cannot_use_import_type:M(1392,1,"An_import_alias_cannot_use_import_type_1392","An import alias cannot use 'import type'"),Imported_via_0_from_file_1:M(1393,3,"Imported_via_0_from_file_1_1393","Imported via {0} from file '{1}'"),Imported_via_0_from_file_1_with_packageId_2:M(1394,3,"Imported_via_0_from_file_1_with_packageId_2_1394","Imported via {0} from file '{1}' with packageId '{2}'"),Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions:M(1395,3,"Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395","Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions:M(1396,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396","Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions:M(1397,3,"Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397","Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"),Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions:M(1398,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398","Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"),File_is_included_via_import_here:M(1399,3,"File_is_included_via_import_here_1399","File is included via import here."),Referenced_via_0_from_file_1:M(1400,3,"Referenced_via_0_from_file_1_1400","Referenced via '{0}' from file '{1}'"),File_is_included_via_reference_here:M(1401,3,"File_is_included_via_reference_here_1401","File is included via reference here."),Type_library_referenced_via_0_from_file_1:M(1402,3,"Type_library_referenced_via_0_from_file_1_1402","Type library referenced via '{0}' from file '{1}'"),Type_library_referenced_via_0_from_file_1_with_packageId_2:M(1403,3,"Type_library_referenced_via_0_from_file_1_with_packageId_2_1403","Type library referenced via '{0}' from file '{1}' with packageId '{2}'"),File_is_included_via_type_library_reference_here:M(1404,3,"File_is_included_via_type_library_reference_here_1404","File is included via type library reference here."),Library_referenced_via_0_from_file_1:M(1405,3,"Library_referenced_via_0_from_file_1_1405","Library referenced via '{0}' from file '{1}'"),File_is_included_via_library_reference_here:M(1406,3,"File_is_included_via_library_reference_here_1406","File is included via library reference here."),Matched_by_include_pattern_0_in_1:M(1407,3,"Matched_by_include_pattern_0_in_1_1407","Matched by include pattern '{0}' in '{1}'"),File_is_matched_by_include_pattern_specified_here:M(1408,3,"File_is_matched_by_include_pattern_specified_here_1408","File is matched by include pattern specified here."),Part_of_files_list_in_tsconfig_json:M(1409,3,"Part_of_files_list_in_tsconfig_json_1409","Part of 'files' list in tsconfig.json"),File_is_matched_by_files_list_specified_here:M(1410,3,"File_is_matched_by_files_list_specified_here_1410","File is matched by 'files' list specified here."),Output_from_referenced_project_0_included_because_1_specified:M(1411,3,"Output_from_referenced_project_0_included_because_1_specified_1411","Output from referenced project '{0}' included because '{1}' specified"),Output_from_referenced_project_0_included_because_module_is_specified_as_none:M(1412,3,"Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412","Output from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_output_from_referenced_project_specified_here:M(1413,3,"File_is_output_from_referenced_project_specified_here_1413","File is output from referenced project specified here."),Source_from_referenced_project_0_included_because_1_specified:M(1414,3,"Source_from_referenced_project_0_included_because_1_specified_1414","Source from referenced project '{0}' included because '{1}' specified"),Source_from_referenced_project_0_included_because_module_is_specified_as_none:M(1415,3,"Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415","Source from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_source_from_referenced_project_specified_here:M(1416,3,"File_is_source_from_referenced_project_specified_here_1416","File is source from referenced project specified here."),Entry_point_of_type_library_0_specified_in_compilerOptions:M(1417,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_1417","Entry point of type library '{0}' specified in compilerOptions"),Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1:M(1418,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418","Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"),File_is_entry_point_of_type_library_specified_here:M(1419,3,"File_is_entry_point_of_type_library_specified_here_1419","File is entry point of type library specified here."),Entry_point_for_implicit_type_library_0:M(1420,3,"Entry_point_for_implicit_type_library_0_1420","Entry point for implicit type library '{0}'"),Entry_point_for_implicit_type_library_0_with_packageId_1:M(1421,3,"Entry_point_for_implicit_type_library_0_with_packageId_1_1421","Entry point for implicit type library '{0}' with packageId '{1}'"),Library_0_specified_in_compilerOptions:M(1422,3,"Library_0_specified_in_compilerOptions_1422","Library '{0}' specified in compilerOptions"),File_is_library_specified_here:M(1423,3,"File_is_library_specified_here_1423","File is library specified here."),Default_library:M(1424,3,"Default_library_1424","Default library"),Default_library_for_target_0:M(1425,3,"Default_library_for_target_0_1425","Default library for target '{0}'"),File_is_default_library_for_target_specified_here:M(1426,3,"File_is_default_library_for_target_specified_here_1426","File is default library for target specified here."),Root_file_specified_for_compilation:M(1427,3,"Root_file_specified_for_compilation_1427","Root file specified for compilation"),File_is_output_of_project_reference_source_0:M(1428,3,"File_is_output_of_project_reference_source_0_1428","File is output of project reference source '{0}'"),File_redirects_to_file_0:M(1429,3,"File_redirects_to_file_0_1429","File redirects to file '{0}'"),The_file_is_in_the_program_because_Colon:M(1430,3,"The_file_is_in_the_program_because_Colon_1430","The file is in the program because:"),for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:M(1431,1,"for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431","'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:M(1432,1,"Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432","Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters:M(1433,1,"Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433","Neither decorators nor modifiers may be applied to 'this' parameters."),Unexpected_keyword_or_identifier:M(1434,1,"Unexpected_keyword_or_identifier_1434","Unexpected keyword or identifier."),Unknown_keyword_or_identifier_Did_you_mean_0:M(1435,1,"Unknown_keyword_or_identifier_Did_you_mean_0_1435","Unknown keyword or identifier. Did you mean '{0}'?"),Decorators_must_precede_the_name_and_all_keywords_of_property_declarations:M(1436,1,"Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436","Decorators must precede the name and all keywords of property declarations."),Namespace_must_be_given_a_name:M(1437,1,"Namespace_must_be_given_a_name_1437","Namespace must be given a name."),Interface_must_be_given_a_name:M(1438,1,"Interface_must_be_given_a_name_1438","Interface must be given a name."),Type_alias_must_be_given_a_name:M(1439,1,"Type_alias_must_be_given_a_name_1439","Type alias must be given a name."),Variable_declaration_not_allowed_at_this_location:M(1440,1,"Variable_declaration_not_allowed_at_this_location_1440","Variable declaration not allowed at this location."),Cannot_start_a_function_call_in_a_type_annotation:M(1441,1,"Cannot_start_a_function_call_in_a_type_annotation_1441","Cannot start a function call in a type annotation."),Expected_for_property_initializer:M(1442,1,"Expected_for_property_initializer_1442","Expected '=' for property initializer."),Module_declaration_names_may_only_use_or_quoted_strings:M(1443,1,"Module_declaration_names_may_only_use_or_quoted_strings_1443",`Module declaration names may only use ' or " quoted strings.`),_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled:M(1448,1,"_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448","'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."),Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed:M(1449,3,"Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449","Preserve unused imported values in the JavaScript output that would otherwise be removed."),Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments:M(1450,3,"Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450","Dynamic imports can only accept a module specifier and an optional set of attributes as arguments"),Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression:M(1451,1,"Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451","Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),resolution_mode_should_be_either_require_or_import:M(1453,1,"resolution_mode_should_be_either_require_or_import_1453","`resolution-mode` should be either `require` or `import`."),resolution_mode_can_only_be_set_for_type_only_imports:M(1454,1,"resolution_mode_can_only_be_set_for_type_only_imports_1454","`resolution-mode` can only be set for type-only imports."),resolution_mode_is_the_only_valid_key_for_type_import_assertions:M(1455,1,"resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455","`resolution-mode` is the only valid key for type import assertions."),Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:M(1456,1,"Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456","Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."),Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk:M(1457,3,"Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457","Matched by default include pattern '**/*'"),File_is_ECMAScript_module_because_0_has_field_type_with_value_module:M(1458,3,"File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458",`File is ECMAScript module because '{0}' has field "type" with value "module"`),File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module:M(1459,3,"File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459",`File is CommonJS module because '{0}' has field "type" whose value is not "module"`),File_is_CommonJS_module_because_0_does_not_have_field_type:M(1460,3,"File_is_CommonJS_module_because_0_does_not_have_field_type_1460",`File is CommonJS module because '{0}' does not have field "type"`),File_is_CommonJS_module_because_package_json_was_not_found:M(1461,3,"File_is_CommonJS_module_because_package_json_was_not_found_1461","File is CommonJS module because 'package.json' was not found"),resolution_mode_is_the_only_valid_key_for_type_import_attributes:M(1463,1,"resolution_mode_is_the_only_valid_key_for_type_import_attributes_1463","'resolution-mode' is the only valid key for type import attributes."),Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:M(1464,1,"Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464","Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'."),The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output:M(1470,1,"The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470","The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead:M(1471,1,"Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471","Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."),catch_or_finally_expected:M(1472,1,"catch_or_finally_expected_1472","'catch' or 'finally' expected."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:M(1473,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473","An import declaration can only be used at the top level of a module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_module:M(1474,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474","An export declaration can only be used at the top level of a module."),Control_what_method_is_used_to_detect_module_format_JS_files:M(1475,3,"Control_what_method_is_used_to_detect_module_format_JS_files_1475","Control what method is used to detect module-format JS files."),auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules:M(1476,3,"auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476",'"auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.'),An_instantiation_expression_cannot_be_followed_by_a_property_access:M(1477,1,"An_instantiation_expression_cannot_be_followed_by_a_property_access_1477","An instantiation expression cannot be followed by a property access."),Identifier_or_string_literal_expected:M(1478,1,"Identifier_or_string_literal_expected_1478","Identifier or string literal expected."),The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead:M(1479,1,"The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479",`The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("{0}")' call instead.`),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module:M(1480,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480",'To convert this file to an ECMAScript module, change its file extension to \'{0}\' or create a local package.json file with `{ "type": "module" }`.'),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1:M(1481,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481",`To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field \`"type": "module"\` to '{1}'.`),To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0:M(1482,3,"To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482",'To convert this file to an ECMAScript module, add the field `"type": "module"` to \'{0}\'.'),To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module:M(1483,3,"To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483",'To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.'),_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:M(1484,1,"_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484","'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:M(1485,1,"_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485","'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),Decorator_used_before_export_here:M(1486,1,"Decorator_used_before_export_here_1486","Decorator used before 'export' here."),Octal_escape_sequences_are_not_allowed_Use_the_syntax_0:M(1487,1,"Octal_escape_sequences_are_not_allowed_Use_the_syntax_0_1487","Octal escape sequences are not allowed. Use the syntax '{0}'."),Escape_sequence_0_is_not_allowed:M(1488,1,"Escape_sequence_0_is_not_allowed_1488","Escape sequence '{0}' is not allowed."),Decimals_with_leading_zeros_are_not_allowed:M(1489,1,"Decimals_with_leading_zeros_are_not_allowed_1489","Decimals with leading zeros are not allowed."),File_appears_to_be_binary:M(1490,1,"File_appears_to_be_binary_1490","File appears to be binary."),_0_modifier_cannot_appear_on_a_using_declaration:M(1491,1,"_0_modifier_cannot_appear_on_a_using_declaration_1491","'{0}' modifier cannot appear on a 'using' declaration."),_0_declarations_may_not_have_binding_patterns:M(1492,1,"_0_declarations_may_not_have_binding_patterns_1492","'{0}' declarations may not have binding patterns."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration:M(1493,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493","The left-hand side of a 'for...in' statement cannot be a 'using' declaration."),The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration:M(1494,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494","The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),_0_modifier_cannot_appear_on_an_await_using_declaration:M(1495,1,"_0_modifier_cannot_appear_on_an_await_using_declaration_1495","'{0}' modifier cannot appear on an 'await using' declaration."),Identifier_string_literal_or_number_literal_expected:M(1496,1,"Identifier_string_literal_or_number_literal_expected_1496","Identifier, string literal, or number literal expected."),Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator:M(1497,1,"Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator_1497","Expression must be enclosed in parentheses to be used as a decorator."),Invalid_syntax_in_decorator:M(1498,1,"Invalid_syntax_in_decorator_1498","Invalid syntax in decorator."),Unknown_regular_expression_flag:M(1499,1,"Unknown_regular_expression_flag_1499","Unknown regular expression flag."),Duplicate_regular_expression_flag:M(1500,1,"Duplicate_regular_expression_flag_1500","Duplicate regular expression flag."),This_regular_expression_flag_is_only_available_when_targeting_0_or_later:M(1501,1,"This_regular_expression_flag_is_only_available_when_targeting_0_or_later_1501","This regular expression flag is only available when targeting '{0}' or later."),The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously:M(1502,1,"The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously_1502","The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously."),Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later:M(1503,1,"Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later_1503","Named capturing groups are only available when targeting 'ES2018' or later."),Subpattern_flags_must_be_present_when_there_is_a_minus_sign:M(1504,1,"Subpattern_flags_must_be_present_when_there_is_a_minus_sign_1504","Subpattern flags must be present when there is a minus sign."),Incomplete_quantifier_Digit_expected:M(1505,1,"Incomplete_quantifier_Digit_expected_1505","Incomplete quantifier. Digit expected."),Numbers_out_of_order_in_quantifier:M(1506,1,"Numbers_out_of_order_in_quantifier_1506","Numbers out of order in quantifier."),There_is_nothing_available_for_repetition:M(1507,1,"There_is_nothing_available_for_repetition_1507","There is nothing available for repetition."),Unexpected_0_Did_you_mean_to_escape_it_with_backslash:M(1508,1,"Unexpected_0_Did_you_mean_to_escape_it_with_backslash_1508","Unexpected '{0}'. Did you mean to escape it with backslash?"),This_regular_expression_flag_cannot_be_toggled_within_a_subpattern:M(1509,1,"This_regular_expression_flag_cannot_be_toggled_within_a_subpattern_1509","This regular expression flag cannot be toggled within a subpattern."),k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets:M(1510,1,"k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets_1510","'\\k' must be followed by a capturing group name enclosed in angle brackets."),q_is_only_available_inside_character_class:M(1511,1,"q_is_only_available_inside_character_class_1511","'\\q' is only available inside character class."),c_must_be_followed_by_an_ASCII_letter:M(1512,1,"c_must_be_followed_by_an_ASCII_letter_1512","'\\c' must be followed by an ASCII letter."),Undetermined_character_escape:M(1513,1,"Undetermined_character_escape_1513","Undetermined character escape."),Expected_a_capturing_group_name:M(1514,1,"Expected_a_capturing_group_name_1514","Expected a capturing group name."),Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other:M(1515,1,"Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other_1515","Named capturing groups with the same name must be mutually exclusive to each other."),A_character_class_range_must_not_be_bounded_by_another_character_class:M(1516,1,"A_character_class_range_must_not_be_bounded_by_another_character_class_1516","A character class range must not be bounded by another character class."),Range_out_of_order_in_character_class:M(1517,1,"Range_out_of_order_in_character_class_1517","Range out of order in character class."),Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class:M(1518,1,"Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_characte_1518","Anything that would possibly match more than a single character is invalid inside a negated character class."),Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead:M(1519,1,"Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead_1519","Operators must not be mixed within a character class. Wrap it in a nested class instead."),Expected_a_class_set_operand:M(1520,1,"Expected_a_class_set_operand_1520","Expected a class set operand."),q_must_be_followed_by_string_alternatives_enclosed_in_braces:M(1521,1,"q_must_be_followed_by_string_alternatives_enclosed_in_braces_1521","'\\q' must be followed by string alternatives enclosed in braces."),A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash:M(1522,1,"A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backs_1522","A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?"),Expected_a_Unicode_property_name:M(1523,1,"Expected_a_Unicode_property_name_1523","Expected a Unicode property name."),Unknown_Unicode_property_name:M(1524,1,"Unknown_Unicode_property_name_1524","Unknown Unicode property name."),Expected_a_Unicode_property_value:M(1525,1,"Expected_a_Unicode_property_value_1525","Expected a Unicode property value."),Unknown_Unicode_property_value:M(1526,1,"Unknown_Unicode_property_value_1526","Unknown Unicode property value."),Expected_a_Unicode_property_name_or_value:M(1527,1,"Expected_a_Unicode_property_name_or_value_1527","Expected a Unicode property name or value."),Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set:M(1528,1,"Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_t_1528","Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set."),Unknown_Unicode_property_name_or_value:M(1529,1,"Unknown_Unicode_property_name_or_value_1529","Unknown Unicode property name or value."),Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set:M(1530,1,"Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v__1530","Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."),_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces:M(1531,1,"_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces_1531","'\\{0}' must be followed by a Unicode property value expression enclosed in braces."),There_is_no_capturing_group_named_0_in_this_regular_expression:M(1532,1,"There_is_no_capturing_group_named_0_in_this_regular_expression_1532","There is no capturing group named '{0}' in this regular expression."),This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_regular_expression:M(1533,1,"This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_r_1533","This backreference refers to a group that does not exist. There are only {0} capturing groups in this regular expression."),This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regular_expression:M(1534,1,"This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regul_1534","This backreference refers to a group that does not exist. There are no capturing groups in this regular expression."),This_character_cannot_be_escaped_in_a_regular_expression:M(1535,1,"This_character_cannot_be_escaped_in_a_regular_expression_1535","This character cannot be escaped in a regular expression."),Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead:M(1536,1,"Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended__1536","Octal escape sequences and backreferences are not allowed in a character class. If this was intended as an escape sequence, use the syntax '{0}' instead."),Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class:M(1537,1,"Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_1537","Decimal escape sequences and backreferences are not allowed in a character class."),The_types_of_0_are_incompatible_between_these_types:M(2200,1,"The_types_of_0_are_incompatible_between_these_types_2200","The types of '{0}' are incompatible between these types."),The_types_returned_by_0_are_incompatible_between_these_types:M(2201,1,"The_types_returned_by_0_are_incompatible_between_these_types_2201","The types returned by '{0}' are incompatible between these types."),Call_signature_return_types_0_and_1_are_incompatible:M(2202,1,"Call_signature_return_types_0_and_1_are_incompatible_2202","Call signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Construct_signature_return_types_0_and_1_are_incompatible:M(2203,1,"Construct_signature_return_types_0_and_1_are_incompatible_2203","Construct signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:M(2204,1,"Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204","Call signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:M(2205,1,"Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205","Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement:M(2206,1,"The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206","The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."),The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement:M(2207,1,"The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207","The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."),This_type_parameter_might_need_an_extends_0_constraint:M(2208,1,"This_type_parameter_might_need_an_extends_0_constraint_2208","This type parameter might need an `extends {0}` constraint."),The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:M(2209,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209","The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:M(2210,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210","The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),Add_extends_constraint:M(2211,3,"Add_extends_constraint_2211","Add `extends` constraint."),Add_extends_constraint_to_all_type_parameters:M(2212,3,"Add_extends_constraint_to_all_type_parameters_2212","Add `extends` constraint to all type parameters"),Duplicate_identifier_0:M(2300,1,"Duplicate_identifier_0_2300","Duplicate identifier '{0}'."),Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:M(2301,1,"Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301","Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),Static_members_cannot_reference_class_type_parameters:M(2302,1,"Static_members_cannot_reference_class_type_parameters_2302","Static members cannot reference class type parameters."),Circular_definition_of_import_alias_0:M(2303,1,"Circular_definition_of_import_alias_0_2303","Circular definition of import alias '{0}'."),Cannot_find_name_0:M(2304,1,"Cannot_find_name_0_2304","Cannot find name '{0}'."),Module_0_has_no_exported_member_1:M(2305,1,"Module_0_has_no_exported_member_1_2305","Module '{0}' has no exported member '{1}'."),File_0_is_not_a_module:M(2306,1,"File_0_is_not_a_module_2306","File '{0}' is not a module."),Cannot_find_module_0_or_its_corresponding_type_declarations:M(2307,1,"Cannot_find_module_0_or_its_corresponding_type_declarations_2307","Cannot find module '{0}' or its corresponding type declarations."),Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity:M(2308,1,"Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308","Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."),An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements:M(2309,1,"An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309","An export assignment cannot be used in a module with other exported elements."),Type_0_recursively_references_itself_as_a_base_type:M(2310,1,"Type_0_recursively_references_itself_as_a_base_type_2310","Type '{0}' recursively references itself as a base type."),Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function:M(2311,1,"Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311","Cannot find name '{0}'. Did you mean to write this in an async function?"),An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members:M(2312,1,"An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312","An interface can only extend an object type or intersection of object types with statically known members."),Type_parameter_0_has_a_circular_constraint:M(2313,1,"Type_parameter_0_has_a_circular_constraint_2313","Type parameter '{0}' has a circular constraint."),Generic_type_0_requires_1_type_argument_s:M(2314,1,"Generic_type_0_requires_1_type_argument_s_2314","Generic type '{0}' requires {1} type argument(s)."),Type_0_is_not_generic:M(2315,1,"Type_0_is_not_generic_2315","Type '{0}' is not generic."),Global_type_0_must_be_a_class_or_interface_type:M(2316,1,"Global_type_0_must_be_a_class_or_interface_type_2316","Global type '{0}' must be a class or interface type."),Global_type_0_must_have_1_type_parameter_s:M(2317,1,"Global_type_0_must_have_1_type_parameter_s_2317","Global type '{0}' must have {1} type parameter(s)."),Cannot_find_global_type_0:M(2318,1,"Cannot_find_global_type_0_2318","Cannot find global type '{0}'."),Named_property_0_of_types_1_and_2_are_not_identical:M(2319,1,"Named_property_0_of_types_1_and_2_are_not_identical_2319","Named property '{0}' of types '{1}' and '{2}' are not identical."),Interface_0_cannot_simultaneously_extend_types_1_and_2:M(2320,1,"Interface_0_cannot_simultaneously_extend_types_1_and_2_2320","Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."),Excessive_stack_depth_comparing_types_0_and_1:M(2321,1,"Excessive_stack_depth_comparing_types_0_and_1_2321","Excessive stack depth comparing types '{0}' and '{1}'."),Type_0_is_not_assignable_to_type_1:M(2322,1,"Type_0_is_not_assignable_to_type_1_2322","Type '{0}' is not assignable to type '{1}'."),Cannot_redeclare_exported_variable_0:M(2323,1,"Cannot_redeclare_exported_variable_0_2323","Cannot redeclare exported variable '{0}'."),Property_0_is_missing_in_type_1:M(2324,1,"Property_0_is_missing_in_type_1_2324","Property '{0}' is missing in type '{1}'."),Property_0_is_private_in_type_1_but_not_in_type_2:M(2325,1,"Property_0_is_private_in_type_1_but_not_in_type_2_2325","Property '{0}' is private in type '{1}' but not in type '{2}'."),Types_of_property_0_are_incompatible:M(2326,1,"Types_of_property_0_are_incompatible_2326","Types of property '{0}' are incompatible."),Property_0_is_optional_in_type_1_but_required_in_type_2:M(2327,1,"Property_0_is_optional_in_type_1_but_required_in_type_2_2327","Property '{0}' is optional in type '{1}' but required in type '{2}'."),Types_of_parameters_0_and_1_are_incompatible:M(2328,1,"Types_of_parameters_0_and_1_are_incompatible_2328","Types of parameters '{0}' and '{1}' are incompatible."),Index_signature_for_type_0_is_missing_in_type_1:M(2329,1,"Index_signature_for_type_0_is_missing_in_type_1_2329","Index signature for type '{0}' is missing in type '{1}'."),_0_and_1_index_signatures_are_incompatible:M(2330,1,"_0_and_1_index_signatures_are_incompatible_2330","'{0}' and '{1}' index signatures are incompatible."),this_cannot_be_referenced_in_a_module_or_namespace_body:M(2331,1,"this_cannot_be_referenced_in_a_module_or_namespace_body_2331","'this' cannot be referenced in a module or namespace body."),this_cannot_be_referenced_in_current_location:M(2332,1,"this_cannot_be_referenced_in_current_location_2332","'this' cannot be referenced in current location."),this_cannot_be_referenced_in_a_static_property_initializer:M(2334,1,"this_cannot_be_referenced_in_a_static_property_initializer_2334","'this' cannot be referenced in a static property initializer."),super_can_only_be_referenced_in_a_derived_class:M(2335,1,"super_can_only_be_referenced_in_a_derived_class_2335","'super' can only be referenced in a derived class."),super_cannot_be_referenced_in_constructor_arguments:M(2336,1,"super_cannot_be_referenced_in_constructor_arguments_2336","'super' cannot be referenced in constructor arguments."),Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors:M(2337,1,"Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337","Super calls are not permitted outside constructors or in nested functions inside constructors."),super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class:M(2338,1,"super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338","'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."),Property_0_does_not_exist_on_type_1:M(2339,1,"Property_0_does_not_exist_on_type_1_2339","Property '{0}' does not exist on type '{1}'."),Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword:M(2340,1,"Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340","Only public and protected methods of the base class are accessible via the 'super' keyword."),Property_0_is_private_and_only_accessible_within_class_1:M(2341,1,"Property_0_is_private_and_only_accessible_within_class_1_2341","Property '{0}' is private and only accessible within class '{1}'."),This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0:M(2343,1,"This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343","This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."),Type_0_does_not_satisfy_the_constraint_1:M(2344,1,"Type_0_does_not_satisfy_the_constraint_1_2344","Type '{0}' does not satisfy the constraint '{1}'."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1:M(2345,1,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345","Argument of type '{0}' is not assignable to parameter of type '{1}'."),Untyped_function_calls_may_not_accept_type_arguments:M(2347,1,"Untyped_function_calls_may_not_accept_type_arguments_2347","Untyped function calls may not accept type arguments."),Value_of_type_0_is_not_callable_Did_you_mean_to_include_new:M(2348,1,"Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348","Value of type '{0}' is not callable. Did you mean to include 'new'?"),This_expression_is_not_callable:M(2349,1,"This_expression_is_not_callable_2349","This expression is not callable."),Only_a_void_function_can_be_called_with_the_new_keyword:M(2350,1,"Only_a_void_function_can_be_called_with_the_new_keyword_2350","Only a void function can be called with the 'new' keyword."),This_expression_is_not_constructable:M(2351,1,"This_expression_is_not_constructable_2351","This expression is not constructable."),Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first:M(2352,1,"Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352","Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."),Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1:M(2353,1,"Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353","Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."),This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found:M(2354,1,"This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354","This syntax requires an imported helper but module '{0}' cannot be found."),A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value:M(2355,1,"A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value_2355","A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value."),An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type:M(2356,1,"An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356","An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."),The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access:M(2357,1,"The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357","The operand of an increment or decrement operator must be a variable or a property access."),The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:M(2358,1,"The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358","The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."),The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method:M(2359,1,"The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_2359","The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function' interface type, or an object type with a 'Symbol.hasInstance' method."),The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:M(2362,1,"The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362","The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:M(2363,1,"The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363","The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access:M(2364,1,"The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364","The left-hand side of an assignment expression must be a variable or a property access."),Operator_0_cannot_be_applied_to_types_1_and_2:M(2365,1,"Operator_0_cannot_be_applied_to_types_1_and_2_2365","Operator '{0}' cannot be applied to types '{1}' and '{2}'."),Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined:M(2366,1,"Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366","Function lacks ending return statement and return type does not include 'undefined'."),This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap:M(2367,1,"This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367","This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."),Type_parameter_name_cannot_be_0:M(2368,1,"Type_parameter_name_cannot_be_0_2368","Type parameter name cannot be '{0}'."),A_parameter_property_is_only_allowed_in_a_constructor_implementation:M(2369,1,"A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369","A parameter property is only allowed in a constructor implementation."),A_rest_parameter_must_be_of_an_array_type:M(2370,1,"A_rest_parameter_must_be_of_an_array_type_2370","A rest parameter must be of an array type."),A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation:M(2371,1,"A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371","A parameter initializer is only allowed in a function or constructor implementation."),Parameter_0_cannot_reference_itself:M(2372,1,"Parameter_0_cannot_reference_itself_2372","Parameter '{0}' cannot reference itself."),Parameter_0_cannot_reference_identifier_1_declared_after_it:M(2373,1,"Parameter_0_cannot_reference_identifier_1_declared_after_it_2373","Parameter '{0}' cannot reference identifier '{1}' declared after it."),Duplicate_index_signature_for_type_0:M(2374,1,"Duplicate_index_signature_for_type_0_2374","Duplicate index signature for type '{0}'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:M(2375,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers:M(2376,1,"A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376","A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers."),Constructors_for_derived_classes_must_contain_a_super_call:M(2377,1,"Constructors_for_derived_classes_must_contain_a_super_call_2377","Constructors for derived classes must contain a 'super' call."),A_get_accessor_must_return_a_value:M(2378,1,"A_get_accessor_must_return_a_value_2378","A 'get' accessor must return a value."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:M(2379,1,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379","Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),Overload_signatures_must_all_be_exported_or_non_exported:M(2383,1,"Overload_signatures_must_all_be_exported_or_non_exported_2383","Overload signatures must all be exported or non-exported."),Overload_signatures_must_all_be_ambient_or_non_ambient:M(2384,1,"Overload_signatures_must_all_be_ambient_or_non_ambient_2384","Overload signatures must all be ambient or non-ambient."),Overload_signatures_must_all_be_public_private_or_protected:M(2385,1,"Overload_signatures_must_all_be_public_private_or_protected_2385","Overload signatures must all be public, private or protected."),Overload_signatures_must_all_be_optional_or_required:M(2386,1,"Overload_signatures_must_all_be_optional_or_required_2386","Overload signatures must all be optional or required."),Function_overload_must_be_static:M(2387,1,"Function_overload_must_be_static_2387","Function overload must be static."),Function_overload_must_not_be_static:M(2388,1,"Function_overload_must_not_be_static_2388","Function overload must not be static."),Function_implementation_name_must_be_0:M(2389,1,"Function_implementation_name_must_be_0_2389","Function implementation name must be '{0}'."),Constructor_implementation_is_missing:M(2390,1,"Constructor_implementation_is_missing_2390","Constructor implementation is missing."),Function_implementation_is_missing_or_not_immediately_following_the_declaration:M(2391,1,"Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391","Function implementation is missing or not immediately following the declaration."),Multiple_constructor_implementations_are_not_allowed:M(2392,1,"Multiple_constructor_implementations_are_not_allowed_2392","Multiple constructor implementations are not allowed."),Duplicate_function_implementation:M(2393,1,"Duplicate_function_implementation_2393","Duplicate function implementation."),This_overload_signature_is_not_compatible_with_its_implementation_signature:M(2394,1,"This_overload_signature_is_not_compatible_with_its_implementation_signature_2394","This overload signature is not compatible with its implementation signature."),Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local:M(2395,1,"Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395","Individual declarations in merged declaration '{0}' must be all exported or all local."),Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters:M(2396,1,"Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396","Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."),Declaration_name_conflicts_with_built_in_global_identifier_0:M(2397,1,"Declaration_name_conflicts_with_built_in_global_identifier_0_2397","Declaration name conflicts with built-in global identifier '{0}'."),constructor_cannot_be_used_as_a_parameter_property_name:M(2398,1,"constructor_cannot_be_used_as_a_parameter_property_name_2398","'constructor' cannot be used as a parameter property name."),Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference:M(2399,1,"Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399","Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."),Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference:M(2400,1,"Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400","Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."),A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers:M(2401,1,"A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401","A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers."),Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference:M(2402,1,"Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402","Expression resolves to '_super' that compiler uses to capture base class reference."),Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2:M(2403,1,"Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403","Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."),The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:M(2404,1,"The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404","The left-hand side of a 'for...in' statement cannot use a type annotation."),The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any:M(2405,1,"The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405","The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."),The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access:M(2406,1,"The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406","The left-hand side of a 'for...in' statement must be a variable or a property access."),The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0:M(2407,1,"The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407","The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."),Setters_cannot_return_a_value:M(2408,1,"Setters_cannot_return_a_value_2408","Setters cannot return a value."),Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class:M(2409,1,"Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409","Return type of constructor signature must be assignable to the instance type of the class."),The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any:M(2410,1,"The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410","The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target:M(2412,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."),Property_0_of_type_1_is_not_assignable_to_2_index_type_3:M(2411,1,"Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411","Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."),_0_index_type_1_is_not_assignable_to_2_index_type_3:M(2413,1,"_0_index_type_1_is_not_assignable_to_2_index_type_3_2413","'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."),Class_name_cannot_be_0:M(2414,1,"Class_name_cannot_be_0_2414","Class name cannot be '{0}'."),Class_0_incorrectly_extends_base_class_1:M(2415,1,"Class_0_incorrectly_extends_base_class_1_2415","Class '{0}' incorrectly extends base class '{1}'."),Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2:M(2416,1,"Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416","Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."),Class_static_side_0_incorrectly_extends_base_class_static_side_1:M(2417,1,"Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417","Class static side '{0}' incorrectly extends base class static side '{1}'."),Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1:M(2418,1,"Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418","Type of computed property's value is '{0}', which is not assignable to type '{1}'."),Types_of_construct_signatures_are_incompatible:M(2419,1,"Types_of_construct_signatures_are_incompatible_2419","Types of construct signatures are incompatible."),Class_0_incorrectly_implements_interface_1:M(2420,1,"Class_0_incorrectly_implements_interface_1_2420","Class '{0}' incorrectly implements interface '{1}'."),A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members:M(2422,1,"A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422","A class can only implement an object type or intersection of object types with statically known members."),Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor:M(2423,1,"Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423","Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."),Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function:M(2425,1,"Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425","Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."),Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:M(2426,1,"Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426","Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."),Interface_name_cannot_be_0:M(2427,1,"Interface_name_cannot_be_0_2427","Interface name cannot be '{0}'."),All_declarations_of_0_must_have_identical_type_parameters:M(2428,1,"All_declarations_of_0_must_have_identical_type_parameters_2428","All declarations of '{0}' must have identical type parameters."),Interface_0_incorrectly_extends_interface_1:M(2430,1,"Interface_0_incorrectly_extends_interface_1_2430","Interface '{0}' incorrectly extends interface '{1}'."),Enum_name_cannot_be_0:M(2431,1,"Enum_name_cannot_be_0_2431","Enum name cannot be '{0}'."),In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element:M(2432,1,"In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432","In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."),A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged:M(2433,1,"A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433","A namespace declaration cannot be in a different file from a class or function with which it is merged."),A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged:M(2434,1,"A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434","A namespace declaration cannot be located prior to a class or function with which it is merged."),Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces:M(2435,1,"Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435","Ambient modules cannot be nested in other modules or namespaces."),Ambient_module_declaration_cannot_specify_relative_module_name:M(2436,1,"Ambient_module_declaration_cannot_specify_relative_module_name_2436","Ambient module declaration cannot specify relative module name."),Module_0_is_hidden_by_a_local_declaration_with_the_same_name:M(2437,1,"Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437","Module '{0}' is hidden by a local declaration with the same name."),Import_name_cannot_be_0:M(2438,1,"Import_name_cannot_be_0_2438","Import name cannot be '{0}'."),Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name:M(2439,1,"Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439","Import or export declaration in an ambient module declaration cannot reference module through relative module name."),Import_declaration_conflicts_with_local_declaration_of_0:M(2440,1,"Import_declaration_conflicts_with_local_declaration_of_0_2440","Import declaration conflicts with local declaration of '{0}'."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module:M(2441,1,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."),Types_have_separate_declarations_of_a_private_property_0:M(2442,1,"Types_have_separate_declarations_of_a_private_property_0_2442","Types have separate declarations of a private property '{0}'."),Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2:M(2443,1,"Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443","Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."),Property_0_is_protected_in_type_1_but_public_in_type_2:M(2444,1,"Property_0_is_protected_in_type_1_but_public_in_type_2_2444","Property '{0}' is protected in type '{1}' but public in type '{2}'."),Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses:M(2445,1,"Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445","Property '{0}' is protected and only accessible within class '{1}' and its subclasses."),Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2:M(2446,1,"Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446","Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."),The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead:M(2447,1,"The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447","The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."),Block_scoped_variable_0_used_before_its_declaration:M(2448,1,"Block_scoped_variable_0_used_before_its_declaration_2448","Block-scoped variable '{0}' used before its declaration."),Class_0_used_before_its_declaration:M(2449,1,"Class_0_used_before_its_declaration_2449","Class '{0}' used before its declaration."),Enum_0_used_before_its_declaration:M(2450,1,"Enum_0_used_before_its_declaration_2450","Enum '{0}' used before its declaration."),Cannot_redeclare_block_scoped_variable_0:M(2451,1,"Cannot_redeclare_block_scoped_variable_0_2451","Cannot redeclare block-scoped variable '{0}'."),An_enum_member_cannot_have_a_numeric_name:M(2452,1,"An_enum_member_cannot_have_a_numeric_name_2452","An enum member cannot have a numeric name."),Variable_0_is_used_before_being_assigned:M(2454,1,"Variable_0_is_used_before_being_assigned_2454","Variable '{0}' is used before being assigned."),Type_alias_0_circularly_references_itself:M(2456,1,"Type_alias_0_circularly_references_itself_2456","Type alias '{0}' circularly references itself."),Type_alias_name_cannot_be_0:M(2457,1,"Type_alias_name_cannot_be_0_2457","Type alias name cannot be '{0}'."),An_AMD_module_cannot_have_multiple_name_assignments:M(2458,1,"An_AMD_module_cannot_have_multiple_name_assignments_2458","An AMD module cannot have multiple name assignments."),Module_0_declares_1_locally_but_it_is_not_exported:M(2459,1,"Module_0_declares_1_locally_but_it_is_not_exported_2459","Module '{0}' declares '{1}' locally, but it is not exported."),Module_0_declares_1_locally_but_it_is_exported_as_2:M(2460,1,"Module_0_declares_1_locally_but_it_is_exported_as_2_2460","Module '{0}' declares '{1}' locally, but it is exported as '{2}'."),Type_0_is_not_an_array_type:M(2461,1,"Type_0_is_not_an_array_type_2461","Type '{0}' is not an array type."),A_rest_element_must_be_last_in_a_destructuring_pattern:M(2462,1,"A_rest_element_must_be_last_in_a_destructuring_pattern_2462","A rest element must be last in a destructuring pattern."),A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature:M(2463,1,"A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463","A binding pattern parameter cannot be optional in an implementation signature."),A_computed_property_name_must_be_of_type_string_number_symbol_or_any:M(2464,1,"A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464","A computed property name must be of type 'string', 'number', 'symbol', or 'any'."),this_cannot_be_referenced_in_a_computed_property_name:M(2465,1,"this_cannot_be_referenced_in_a_computed_property_name_2465","'this' cannot be referenced in a computed property name."),super_cannot_be_referenced_in_a_computed_property_name:M(2466,1,"super_cannot_be_referenced_in_a_computed_property_name_2466","'super' cannot be referenced in a computed property name."),A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type:M(2467,1,"A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467","A computed property name cannot reference a type parameter from its containing type."),Cannot_find_global_value_0:M(2468,1,"Cannot_find_global_value_0_2468","Cannot find global value '{0}'."),The_0_operator_cannot_be_applied_to_type_symbol:M(2469,1,"The_0_operator_cannot_be_applied_to_type_symbol_2469","The '{0}' operator cannot be applied to type 'symbol'."),Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher:M(2472,1,"Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472","Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."),Enum_declarations_must_all_be_const_or_non_const:M(2473,1,"Enum_declarations_must_all_be_const_or_non_const_2473","Enum declarations must all be const or non-const."),const_enum_member_initializers_must_be_constant_expressions:M(2474,1,"const_enum_member_initializers_must_be_constant_expressions_2474","const enum member initializers must be constant expressions."),const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query:M(2475,1,"const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475","'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."),A_const_enum_member_can_only_be_accessed_using_a_string_literal:M(2476,1,"A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476","A const enum member can only be accessed using a string literal."),const_enum_member_initializer_was_evaluated_to_a_non_finite_value:M(2477,1,"const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477","'const' enum member initializer was evaluated to a non-finite value."),const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:M(2478,1,"const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478","'const' enum member initializer was evaluated to disallowed value 'NaN'."),let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations:M(2480,1,"let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480","'let' is not allowed to be used as a name in 'let' or 'const' declarations."),Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1:M(2481,1,"Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481","Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."),The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation:M(2483,1,"The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483","The left-hand side of a 'for...of' statement cannot use a type annotation."),Export_declaration_conflicts_with_exported_declaration_of_0:M(2484,1,"Export_declaration_conflicts_with_exported_declaration_of_0_2484","Export declaration conflicts with exported declaration of '{0}'."),The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access:M(2487,1,"The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487","The left-hand side of a 'for...of' statement must be a variable or a property access."),Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator:M(2488,1,"Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488","Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."),An_iterator_must_have_a_next_method:M(2489,1,"An_iterator_must_have_a_next_method_2489","An iterator must have a 'next()' method."),The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property:M(2490,1,"The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490","The type returned by the '{0}()' method of an iterator must have a 'value' property."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern:M(2491,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491","The left-hand side of a 'for...in' statement cannot be a destructuring pattern."),Cannot_redeclare_identifier_0_in_catch_clause:M(2492,1,"Cannot_redeclare_identifier_0_in_catch_clause_2492","Cannot redeclare identifier '{0}' in catch clause."),Tuple_type_0_of_length_1_has_no_element_at_index_2:M(2493,1,"Tuple_type_0_of_length_1_has_no_element_at_index_2_2493","Tuple type '{0}' of length '{1}' has no element at index '{2}'."),Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher:M(2494,1,"Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494","Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."),Type_0_is_not_an_array_type_or_a_string_type:M(2495,1,"Type_0_is_not_an_array_type_or_a_string_type_2495","Type '{0}' is not an array type or a string type."),The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression:M(2496,1,"The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_func_2496","The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression."),This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export:M(2497,1,"This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497","This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."),Module_0_uses_export_and_cannot_be_used_with_export_Asterisk:M(2498,1,"Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498","Module '{0}' uses 'export =' and cannot be used with 'export *'."),An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments:M(2499,1,"An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499","An interface can only extend an identifier/qualified-name with optional type arguments."),A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments:M(2500,1,"A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500","A class can only implement an identifier/qualified-name with optional type arguments."),A_rest_element_cannot_contain_a_binding_pattern:M(2501,1,"A_rest_element_cannot_contain_a_binding_pattern_2501","A rest element cannot contain a binding pattern."),_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation:M(2502,1,"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502","'{0}' is referenced directly or indirectly in its own type annotation."),Cannot_find_namespace_0:M(2503,1,"Cannot_find_namespace_0_2503","Cannot find namespace '{0}'."),Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:M(2504,1,"Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504","Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."),A_generator_cannot_have_a_void_type_annotation:M(2505,1,"A_generator_cannot_have_a_void_type_annotation_2505","A generator cannot have a 'void' type annotation."),_0_is_referenced_directly_or_indirectly_in_its_own_base_expression:M(2506,1,"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506","'{0}' is referenced directly or indirectly in its own base expression."),Type_0_is_not_a_constructor_function_type:M(2507,1,"Type_0_is_not_a_constructor_function_type_2507","Type '{0}' is not a constructor function type."),No_base_constructor_has_the_specified_number_of_type_arguments:M(2508,1,"No_base_constructor_has_the_specified_number_of_type_arguments_2508","No base constructor has the specified number of type arguments."),Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members:M(2509,1,"Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509","Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."),Base_constructors_must_all_have_the_same_return_type:M(2510,1,"Base_constructors_must_all_have_the_same_return_type_2510","Base constructors must all have the same return type."),Cannot_create_an_instance_of_an_abstract_class:M(2511,1,"Cannot_create_an_instance_of_an_abstract_class_2511","Cannot create an instance of an abstract class."),Overload_signatures_must_all_be_abstract_or_non_abstract:M(2512,1,"Overload_signatures_must_all_be_abstract_or_non_abstract_2512","Overload signatures must all be abstract or non-abstract."),Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression:M(2513,1,"Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513","Abstract method '{0}' in class '{1}' cannot be accessed via super expression."),A_tuple_type_cannot_be_indexed_with_a_negative_value:M(2514,1,"A_tuple_type_cannot_be_indexed_with_a_negative_value_2514","A tuple type cannot be indexed with a negative value."),Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2:M(2515,1,"Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515","Non-abstract class '{0}' does not implement inherited abstract member {1} from class '{2}'."),All_declarations_of_an_abstract_method_must_be_consecutive:M(2516,1,"All_declarations_of_an_abstract_method_must_be_consecutive_2516","All declarations of an abstract method must be consecutive."),Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type:M(2517,1,"Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517","Cannot assign an abstract constructor type to a non-abstract constructor type."),A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard:M(2518,1,"A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518","A 'this'-based type guard is not compatible with a parameter-based type guard."),An_async_iterator_must_have_a_next_method:M(2519,1,"An_async_iterator_must_have_a_next_method_2519","An async iterator must have a 'next()' method."),Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions:M(2520,1,"Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520","Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."),The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method:M(2522,1,"The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_sta_2522","The 'arguments' object cannot be referenced in an async function or method in ES5. Consider using a standard function or method."),yield_expressions_cannot_be_used_in_a_parameter_initializer:M(2523,1,"yield_expressions_cannot_be_used_in_a_parameter_initializer_2523","'yield' expressions cannot be used in a parameter initializer."),await_expressions_cannot_be_used_in_a_parameter_initializer:M(2524,1,"await_expressions_cannot_be_used_in_a_parameter_initializer_2524","'await' expressions cannot be used in a parameter initializer."),Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value:M(2525,1,"Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525","Initializer provides no value for this binding element and the binding element has no default value."),A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface:M(2526,1,"A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526","A 'this' type is available only in a non-static member of a class or interface."),The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary:M(2527,1,"The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527","The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."),A_module_cannot_have_multiple_default_exports:M(2528,1,"A_module_cannot_have_multiple_default_exports_2528","A module cannot have multiple default exports."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions:M(2529,1,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."),Property_0_is_incompatible_with_index_signature:M(2530,1,"Property_0_is_incompatible_with_index_signature_2530","Property '{0}' is incompatible with index signature."),Object_is_possibly_null:M(2531,1,"Object_is_possibly_null_2531","Object is possibly 'null'."),Object_is_possibly_undefined:M(2532,1,"Object_is_possibly_undefined_2532","Object is possibly 'undefined'."),Object_is_possibly_null_or_undefined:M(2533,1,"Object_is_possibly_null_or_undefined_2533","Object is possibly 'null' or 'undefined'."),A_function_returning_never_cannot_have_a_reachable_end_point:M(2534,1,"A_function_returning_never_cannot_have_a_reachable_end_point_2534","A function returning 'never' cannot have a reachable end point."),Type_0_cannot_be_used_to_index_type_1:M(2536,1,"Type_0_cannot_be_used_to_index_type_1_2536","Type '{0}' cannot be used to index type '{1}'."),Type_0_has_no_matching_index_signature_for_type_1:M(2537,1,"Type_0_has_no_matching_index_signature_for_type_1_2537","Type '{0}' has no matching index signature for type '{1}'."),Type_0_cannot_be_used_as_an_index_type:M(2538,1,"Type_0_cannot_be_used_as_an_index_type_2538","Type '{0}' cannot be used as an index type."),Cannot_assign_to_0_because_it_is_not_a_variable:M(2539,1,"Cannot_assign_to_0_because_it_is_not_a_variable_2539","Cannot assign to '{0}' because it is not a variable."),Cannot_assign_to_0_because_it_is_a_read_only_property:M(2540,1,"Cannot_assign_to_0_because_it_is_a_read_only_property_2540","Cannot assign to '{0}' because it is a read-only property."),Index_signature_in_type_0_only_permits_reading:M(2542,1,"Index_signature_in_type_0_only_permits_reading_2542","Index signature in type '{0}' only permits reading."),Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference:M(2543,1,"Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543","Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."),Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference:M(2544,1,"Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544","Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."),A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any:M(2545,1,"A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545","A mixin class must have a constructor with a single rest parameter of type 'any[]'."),The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property:M(2547,1,"The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547","The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."),Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:M(2548,1,"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548","Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:M(2549,1,"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549","Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later:M(2550,1,"Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550","Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{2}' or later."),Property_0_does_not_exist_on_type_1_Did_you_mean_2:M(2551,1,"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"),Cannot_find_name_0_Did_you_mean_1:M(2552,1,"Cannot_find_name_0_Did_you_mean_1_2552","Cannot find name '{0}'. Did you mean '{1}'?"),Computed_values_are_not_permitted_in_an_enum_with_string_valued_members:M(2553,1,"Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553","Computed values are not permitted in an enum with string valued members."),Expected_0_arguments_but_got_1:M(2554,1,"Expected_0_arguments_but_got_1_2554","Expected {0} arguments, but got {1}."),Expected_at_least_0_arguments_but_got_1:M(2555,1,"Expected_at_least_0_arguments_but_got_1_2555","Expected at least {0} arguments, but got {1}."),A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter:M(2556,1,"A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556","A spread argument must either have a tuple type or be passed to a rest parameter."),Expected_0_type_arguments_but_got_1:M(2558,1,"Expected_0_type_arguments_but_got_1_2558","Expected {0} type arguments, but got {1}."),Type_0_has_no_properties_in_common_with_type_1:M(2559,1,"Type_0_has_no_properties_in_common_with_type_1_2559","Type '{0}' has no properties in common with type '{1}'."),Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it:M(2560,1,"Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560","Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"),Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2:M(2561,1,"Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561","Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"),Base_class_expressions_cannot_reference_class_type_parameters:M(2562,1,"Base_class_expressions_cannot_reference_class_type_parameters_2562","Base class expressions cannot reference class type parameters."),The_containing_function_or_module_body_is_too_large_for_control_flow_analysis:M(2563,1,"The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563","The containing function or module body is too large for control flow analysis."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor:M(2564,1,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564","Property '{0}' has no initializer and is not definitely assigned in the constructor."),Property_0_is_used_before_being_assigned:M(2565,1,"Property_0_is_used_before_being_assigned_2565","Property '{0}' is used before being assigned."),A_rest_element_cannot_have_a_property_name:M(2566,1,"A_rest_element_cannot_have_a_property_name_2566","A rest element cannot have a property name."),Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations:M(2567,1,"Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567","Enum declarations can only merge with namespace or other enum declarations."),Property_0_may_not_exist_on_type_1_Did_you_mean_2:M(2568,1,"Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568","Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"),Could_not_find_name_0_Did_you_mean_1:M(2570,1,"Could_not_find_name_0_Did_you_mean_1_2570","Could not find name '{0}'. Did you mean '{1}'?"),Object_is_of_type_unknown:M(2571,1,"Object_is_of_type_unknown_2571","Object is of type 'unknown'."),A_rest_element_type_must_be_an_array_type:M(2574,1,"A_rest_element_type_must_be_an_array_type_2574","A rest element type must be an array type."),No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments:M(2575,1,"No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575","No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."),Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead:M(2576,1,"Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576","Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"),Return_type_annotation_circularly_references_itself:M(2577,1,"Return_type_annotation_circularly_references_itself_2577","Return type annotation circularly references itself."),Unused_ts_expect_error_directive:M(2578,1,"Unused_ts_expect_error_directive_2578","Unused '@ts-expect-error' directive."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode:M(2580,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2580","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery:M(2581,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2581","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha:M(2582,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later:M(2583,1,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583","Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom:M(2584,1,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584","Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later:M(2585,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585","'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later."),Cannot_assign_to_0_because_it_is_a_constant:M(2588,1,"Cannot_assign_to_0_because_it_is_a_constant_2588","Cannot assign to '{0}' because it is a constant."),Type_instantiation_is_excessively_deep_and_possibly_infinite:M(2589,1,"Type_instantiation_is_excessively_deep_and_possibly_infinite_2589","Type instantiation is excessively deep and possibly infinite."),Expression_produces_a_union_type_that_is_too_complex_to_represent:M(2590,1,"Expression_produces_a_union_type_that_is_too_complex_to_represent_2590","Expression produces a union type that is too complex to represent."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig:M(2591,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig:M(2592,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig:M(2593,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig."),This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag:M(2594,1,"This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594","This module is declared with 'export =', and can only be used with a default import when using the '{0}' flag."),_0_can_only_be_imported_by_using_a_default_import:M(2595,1,"_0_can_only_be_imported_by_using_a_default_import_2595","'{0}' can only be imported by using a default import."),_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:M(2596,1,"_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596","'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import."),_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import:M(2597,1,"_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597","'{0}' can only be imported by using a 'require' call or by using a default import."),_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:M(2598,1,"_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using__2598","'{0}' can only be imported by using a 'require' call or by turning on the 'esModuleInterop' flag and using a default import."),JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist:M(2602,1,"JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602","JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."),Property_0_in_type_1_is_not_assignable_to_type_2:M(2603,1,"Property_0_in_type_1_is_not_assignable_to_type_2_2603","Property '{0}' in type '{1}' is not assignable to type '{2}'."),JSX_element_type_0_does_not_have_any_construct_or_call_signatures:M(2604,1,"JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604","JSX element type '{0}' does not have any construct or call signatures."),Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property:M(2606,1,"Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606","Property '{0}' of JSX spread attribute is not assignable to target property."),JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property:M(2607,1,"JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607","JSX element class does not support attributes because it does not have a '{0}' property."),The_global_type_JSX_0_may_not_have_more_than_one_property:M(2608,1,"The_global_type_JSX_0_may_not_have_more_than_one_property_2608","The global type 'JSX.{0}' may not have more than one property."),JSX_spread_child_must_be_an_array_type:M(2609,1,"JSX_spread_child_must_be_an_array_type_2609","JSX spread child must be an array type."),_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property:M(2610,1,"_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610","'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."),_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor:M(2611,1,"_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611","'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."),Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration:M(2612,1,"Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612","Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."),Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead:M(2613,1,"Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613","Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"),Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead:M(2614,1,"Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614","Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"),Type_of_property_0_circularly_references_itself_in_mapped_type_1:M(2615,1,"Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615","Type of property '{0}' circularly references itself in mapped type '{1}'."),_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import:M(2616,1,"_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import_2616","'{0}' can only be imported by using 'import {1} = require({2})' or a default import."),_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:M(2617,1,"_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_us_2617","'{0}' can only be imported by using 'import {1} = require({2})' or by turning on the 'esModuleInterop' flag and using a default import."),Source_has_0_element_s_but_target_requires_1:M(2618,1,"Source_has_0_element_s_but_target_requires_1_2618","Source has {0} element(s) but target requires {1}."),Source_has_0_element_s_but_target_allows_only_1:M(2619,1,"Source_has_0_element_s_but_target_allows_only_1_2619","Source has {0} element(s) but target allows only {1}."),Target_requires_0_element_s_but_source_may_have_fewer:M(2620,1,"Target_requires_0_element_s_but_source_may_have_fewer_2620","Target requires {0} element(s) but source may have fewer."),Target_allows_only_0_element_s_but_source_may_have_more:M(2621,1,"Target_allows_only_0_element_s_but_source_may_have_more_2621","Target allows only {0} element(s) but source may have more."),Source_provides_no_match_for_required_element_at_position_0_in_target:M(2623,1,"Source_provides_no_match_for_required_element_at_position_0_in_target_2623","Source provides no match for required element at position {0} in target."),Source_provides_no_match_for_variadic_element_at_position_0_in_target:M(2624,1,"Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624","Source provides no match for variadic element at position {0} in target."),Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target:M(2625,1,"Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625","Variadic element at position {0} in source does not match element at position {1} in target."),Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target:M(2626,1,"Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626","Type at position {0} in source is not compatible with type at position {1} in target."),Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target:M(2627,1,"Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627","Type at positions {0} through {1} in source is not compatible with type at position {2} in target."),Cannot_assign_to_0_because_it_is_an_enum:M(2628,1,"Cannot_assign_to_0_because_it_is_an_enum_2628","Cannot assign to '{0}' because it is an enum."),Cannot_assign_to_0_because_it_is_a_class:M(2629,1,"Cannot_assign_to_0_because_it_is_a_class_2629","Cannot assign to '{0}' because it is a class."),Cannot_assign_to_0_because_it_is_a_function:M(2630,1,"Cannot_assign_to_0_because_it_is_a_function_2630","Cannot assign to '{0}' because it is a function."),Cannot_assign_to_0_because_it_is_a_namespace:M(2631,1,"Cannot_assign_to_0_because_it_is_a_namespace_2631","Cannot assign to '{0}' because it is a namespace."),Cannot_assign_to_0_because_it_is_an_import:M(2632,1,"Cannot_assign_to_0_because_it_is_an_import_2632","Cannot assign to '{0}' because it is an import."),JSX_property_access_expressions_cannot_include_JSX_namespace_names:M(2633,1,"JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633","JSX property access expressions cannot include JSX namespace names"),_0_index_signatures_are_incompatible:M(2634,1,"_0_index_signatures_are_incompatible_2634","'{0}' index signatures are incompatible."),Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable:M(2635,1,"Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635","Type '{0}' has no signatures for which the type argument list is applicable."),Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation:M(2636,1,"Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636","Type '{0}' is not assignable to type '{1}' as implied by variance annotation."),Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types:M(2637,1,"Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637","Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."),Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator:M(2638,1,"Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638","Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."),React_components_cannot_include_JSX_namespace_names:M(2639,1,"React_components_cannot_include_JSX_namespace_names_2639","React components cannot include JSX namespace names"),Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity:M(2649,1,"Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649","Cannot augment module '{0}' with value exports because it resolves to a non-module entity."),Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more:M(2650,1,"Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and__2650","Non-abstract class expression is missing implementations for the following members of '{0}': {1} and {2} more."),A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums:M(2651,1,"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651","A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."),Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead:M(2652,1,"Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652","Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."),Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1:M(2653,1,"Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653","Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."),Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2:M(2654,1,"Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_2654","Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2}."),Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more:M(2655,1,"Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more_2655","Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2} and {3} more."),Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1:M(2656,1,"Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_2656","Non-abstract class expression is missing implementations for the following members of '{0}': {1}."),JSX_expressions_must_have_one_parent_element:M(2657,1,"JSX_expressions_must_have_one_parent_element_2657","JSX expressions must have one parent element."),Type_0_provides_no_match_for_the_signature_1:M(2658,1,"Type_0_provides_no_match_for_the_signature_1_2658","Type '{0}' provides no match for the signature '{1}'."),super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher:M(2659,1,"super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659","'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."),super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions:M(2660,1,"super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660","'super' can only be referenced in members of derived classes or object literal expressions."),Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module:M(2661,1,"Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661","Cannot export '{0}'. Only local declarations can be exported from a module."),Cannot_find_name_0_Did_you_mean_the_static_member_1_0:M(2662,1,"Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662","Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"),Cannot_find_name_0_Did_you_mean_the_instance_member_this_0:M(2663,1,"Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663","Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"),Invalid_module_name_in_augmentation_module_0_cannot_be_found:M(2664,1,"Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664","Invalid module name in augmentation, module '{0}' cannot be found."),Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented:M(2665,1,"Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665","Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."),Exports_and_export_assignments_are_not_permitted_in_module_augmentations:M(2666,1,"Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666","Exports and export assignments are not permitted in module augmentations."),Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module:M(2667,1,"Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667","Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."),export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible:M(2668,1,"export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668","'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."),Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations:M(2669,1,"Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669","Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."),Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context:M(2670,1,"Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670","Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."),Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity:M(2671,1,"Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671","Cannot augment module '{0}' because it resolves to a non-module entity."),Cannot_assign_a_0_constructor_type_to_a_1_constructor_type:M(2672,1,"Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672","Cannot assign a '{0}' constructor type to a '{1}' constructor type."),Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration:M(2673,1,"Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673","Constructor of class '{0}' is private and only accessible within the class declaration."),Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration:M(2674,1,"Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674","Constructor of class '{0}' is protected and only accessible within the class declaration."),Cannot_extend_a_class_0_Class_constructor_is_marked_as_private:M(2675,1,"Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675","Cannot extend a class '{0}'. Class constructor is marked as private."),Accessors_must_both_be_abstract_or_non_abstract:M(2676,1,"Accessors_must_both_be_abstract_or_non_abstract_2676","Accessors must both be abstract or non-abstract."),A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type:M(2677,1,"A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677","A type predicate's type must be assignable to its parameter's type."),Type_0_is_not_comparable_to_type_1:M(2678,1,"Type_0_is_not_comparable_to_type_1_2678","Type '{0}' is not comparable to type '{1}'."),A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void:M(2679,1,"A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679","A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."),A_0_parameter_must_be_the_first_parameter:M(2680,1,"A_0_parameter_must_be_the_first_parameter_2680","A '{0}' parameter must be the first parameter."),A_constructor_cannot_have_a_this_parameter:M(2681,1,"A_constructor_cannot_have_a_this_parameter_2681","A constructor cannot have a 'this' parameter."),this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation:M(2683,1,"this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683","'this' implicitly has type 'any' because it does not have a type annotation."),The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1:M(2684,1,"The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684","The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."),The_this_types_of_each_signature_are_incompatible:M(2685,1,"The_this_types_of_each_signature_are_incompatible_2685","The 'this' types of each signature are incompatible."),_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead:M(2686,1,"_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686","'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."),All_declarations_of_0_must_have_identical_modifiers:M(2687,1,"All_declarations_of_0_must_have_identical_modifiers_2687","All declarations of '{0}' must have identical modifiers."),Cannot_find_type_definition_file_for_0:M(2688,1,"Cannot_find_type_definition_file_for_0_2688","Cannot find type definition file for '{0}'."),Cannot_extend_an_interface_0_Did_you_mean_implements:M(2689,1,"Cannot_extend_an_interface_0_Did_you_mean_implements_2689","Cannot extend an interface '{0}'. Did you mean 'implements'?"),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0:M(2690,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690","'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?"),_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible:M(2692,1,"_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692","'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here:M(2693,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693","'{0}' only refers to a type, but is being used as a value here."),Namespace_0_has_no_exported_member_1:M(2694,1,"Namespace_0_has_no_exported_member_1_2694","Namespace '{0}' has no exported member '{1}'."),Left_side_of_comma_operator_is_unused_and_has_no_side_effects:M(2695,1,"Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695","Left side of comma operator is unused and has no side effects.",!0),The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead:M(2696,1,"The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696","The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"),An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:M(2697,1,"An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697","An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."),Spread_types_may_only_be_created_from_object_types:M(2698,1,"Spread_types_may_only_be_created_from_object_types_2698","Spread types may only be created from object types."),Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1:M(2699,1,"Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699","Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."),Rest_types_may_only_be_created_from_object_types:M(2700,1,"Rest_types_may_only_be_created_from_object_types_2700","Rest types may only be created from object types."),The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access:M(2701,1,"The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701","The target of an object rest assignment must be a variable or a property access."),_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here:M(2702,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702","'{0}' only refers to a type, but is being used as a namespace here."),The_operand_of_a_delete_operator_must_be_a_property_reference:M(2703,1,"The_operand_of_a_delete_operator_must_be_a_property_reference_2703","The operand of a 'delete' operator must be a property reference."),The_operand_of_a_delete_operator_cannot_be_a_read_only_property:M(2704,1,"The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704","The operand of a 'delete' operator cannot be a read-only property."),An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:M(2705,1,"An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_2705","An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."),Required_type_parameters_may_not_follow_optional_type_parameters:M(2706,1,"Required_type_parameters_may_not_follow_optional_type_parameters_2706","Required type parameters may not follow optional type parameters."),Generic_type_0_requires_between_1_and_2_type_arguments:M(2707,1,"Generic_type_0_requires_between_1_and_2_type_arguments_2707","Generic type '{0}' requires between {1} and {2} type arguments."),Cannot_use_namespace_0_as_a_value:M(2708,1,"Cannot_use_namespace_0_as_a_value_2708","Cannot use namespace '{0}' as a value."),Cannot_use_namespace_0_as_a_type:M(2709,1,"Cannot_use_namespace_0_as_a_type_2709","Cannot use namespace '{0}' as a type."),_0_are_specified_twice_The_attribute_named_0_will_be_overwritten:M(2710,1,"_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710","'{0}' are specified twice. The attribute named '{0}' will be overwritten."),A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:M(2711,1,"A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711","A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."),A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:M(2712,1,"A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_t_2712","A dynamic import call in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."),Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1:M(2713,1,"Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713",`Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}["{1}"]'?`),The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context:M(2714,1,"The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714","The expression of an export assignment must be an identifier or qualified name in an ambient context."),Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor:M(2715,1,"Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715","Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."),Type_parameter_0_has_a_circular_default:M(2716,1,"Type_parameter_0_has_a_circular_default_2716","Type parameter '{0}' has a circular default."),Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:M(2717,1,"Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717","Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."),Duplicate_property_0:M(2718,1,"Duplicate_property_0_2718","Duplicate property '{0}'."),Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated:M(2719,1,"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719","Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."),Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:M(2720,1,"Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720","Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"),Cannot_invoke_an_object_which_is_possibly_null:M(2721,1,"Cannot_invoke_an_object_which_is_possibly_null_2721","Cannot invoke an object which is possibly 'null'."),Cannot_invoke_an_object_which_is_possibly_undefined:M(2722,1,"Cannot_invoke_an_object_which_is_possibly_undefined_2722","Cannot invoke an object which is possibly 'undefined'."),Cannot_invoke_an_object_which_is_possibly_null_or_undefined:M(2723,1,"Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723","Cannot invoke an object which is possibly 'null' or 'undefined'."),_0_has_no_exported_member_named_1_Did_you_mean_2:M(2724,1,"_0_has_no_exported_member_named_1_Did_you_mean_2_2724","'{0}' has no exported member named '{1}'. Did you mean '{2}'?"),Class_name_cannot_be_Object_when_targeting_ES5_with_module_0:M(2725,1,"Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725","Class name cannot be 'Object' when targeting ES5 with module {0}."),Cannot_find_lib_definition_for_0:M(2726,1,"Cannot_find_lib_definition_for_0_2726","Cannot find lib definition for '{0}'."),Cannot_find_lib_definition_for_0_Did_you_mean_1:M(2727,1,"Cannot_find_lib_definition_for_0_Did_you_mean_1_2727","Cannot find lib definition for '{0}'. Did you mean '{1}'?"),_0_is_declared_here:M(2728,3,"_0_is_declared_here_2728","'{0}' is declared here."),Property_0_is_used_before_its_initialization:M(2729,1,"Property_0_is_used_before_its_initialization_2729","Property '{0}' is used before its initialization."),An_arrow_function_cannot_have_a_this_parameter:M(2730,1,"An_arrow_function_cannot_have_a_this_parameter_2730","An arrow function cannot have a 'this' parameter."),Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String:M(2731,1,"Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731","Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."),Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension:M(2732,1,"Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732","Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension."),Property_0_was_also_declared_here:M(2733,1,"Property_0_was_also_declared_here_2733","Property '{0}' was also declared here."),Are_you_missing_a_semicolon:M(2734,1,"Are_you_missing_a_semicolon_2734","Are you missing a semicolon?"),Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1:M(2735,1,"Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735","Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"),Operator_0_cannot_be_applied_to_type_1:M(2736,1,"Operator_0_cannot_be_applied_to_type_1_2736","Operator '{0}' cannot be applied to type '{1}'."),BigInt_literals_are_not_available_when_targeting_lower_than_ES2020:M(2737,1,"BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737","BigInt literals are not available when targeting lower than ES2020."),An_outer_value_of_this_is_shadowed_by_this_container:M(2738,3,"An_outer_value_of_this_is_shadowed_by_this_container_2738","An outer value of 'this' is shadowed by this container."),Type_0_is_missing_the_following_properties_from_type_1_Colon_2:M(2739,1,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739","Type '{0}' is missing the following properties from type '{1}': {2}"),Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more:M(2740,1,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740","Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."),Property_0_is_missing_in_type_1_but_required_in_type_2:M(2741,1,"Property_0_is_missing_in_type_1_but_required_in_type_2_2741","Property '{0}' is missing in type '{1}' but required in type '{2}'."),The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary:M(2742,1,"The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742","The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."),No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments:M(2743,1,"No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743","No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."),Type_parameter_defaults_can_only_reference_previously_declared_type_parameters:M(2744,1,"Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744","Type parameter defaults can only reference previously declared type parameters."),This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided:M(2745,1,"This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745","This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."),This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided:M(2746,1,"This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746","This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."),_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2:M(2747,1,"_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747","'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."),Cannot_access_ambient_const_enums_when_0_is_enabled:M(2748,1,"Cannot_access_ambient_const_enums_when_0_is_enabled_2748","Cannot access ambient const enums when '{0}' is enabled."),_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0:M(2749,1,"_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749","'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"),The_implementation_signature_is_declared_here:M(2750,1,"The_implementation_signature_is_declared_here_2750","The implementation signature is declared here."),Circularity_originates_in_type_at_this_location:M(2751,1,"Circularity_originates_in_type_at_this_location_2751","Circularity originates in type at this location."),The_first_export_default_is_here:M(2752,1,"The_first_export_default_is_here_2752","The first export default is here."),Another_export_default_is_here:M(2753,1,"Another_export_default_is_here_2753","Another export default is here."),super_may_not_use_type_arguments:M(2754,1,"super_may_not_use_type_arguments_2754","'super' may not use type arguments."),No_constituent_of_type_0_is_callable:M(2755,1,"No_constituent_of_type_0_is_callable_2755","No constituent of type '{0}' is callable."),Not_all_constituents_of_type_0_are_callable:M(2756,1,"Not_all_constituents_of_type_0_are_callable_2756","Not all constituents of type '{0}' are callable."),Type_0_has_no_call_signatures:M(2757,1,"Type_0_has_no_call_signatures_2757","Type '{0}' has no call signatures."),Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other:M(2758,1,"Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758","Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."),No_constituent_of_type_0_is_constructable:M(2759,1,"No_constituent_of_type_0_is_constructable_2759","No constituent of type '{0}' is constructable."),Not_all_constituents_of_type_0_are_constructable:M(2760,1,"Not_all_constituents_of_type_0_are_constructable_2760","Not all constituents of type '{0}' are constructable."),Type_0_has_no_construct_signatures:M(2761,1,"Type_0_has_no_construct_signatures_2761","Type '{0}' has no construct signatures."),Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other:M(2762,1,"Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762","Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0:M(2763,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0:M(2764,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0:M(2765,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."),Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0:M(2766,1,"Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766","Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."),The_0_property_of_an_iterator_must_be_a_method:M(2767,1,"The_0_property_of_an_iterator_must_be_a_method_2767","The '{0}' property of an iterator must be a method."),The_0_property_of_an_async_iterator_must_be_a_method:M(2768,1,"The_0_property_of_an_async_iterator_must_be_a_method_2768","The '{0}' property of an async iterator must be a method."),No_overload_matches_this_call:M(2769,1,"No_overload_matches_this_call_2769","No overload matches this call."),The_last_overload_gave_the_following_error:M(2770,1,"The_last_overload_gave_the_following_error_2770","The last overload gave the following error."),The_last_overload_is_declared_here:M(2771,1,"The_last_overload_is_declared_here_2771","The last overload is declared here."),Overload_0_of_1_2_gave_the_following_error:M(2772,1,"Overload_0_of_1_2_gave_the_following_error_2772","Overload {0} of {1}, '{2}', gave the following error."),Did_you_forget_to_use_await:M(2773,1,"Did_you_forget_to_use_await_2773","Did you forget to use 'await'?"),This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead:M(2774,1,"This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774","This condition will always return true since this function is always defined. Did you mean to call it instead?"),Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation:M(2775,1,"Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775","Assertions require every name in the call target to be declared with an explicit type annotation."),Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name:M(2776,1,"Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776","Assertions require the call target to be an identifier or qualified name."),The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access:M(2777,1,"The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777","The operand of an increment or decrement operator may not be an optional property access."),The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access:M(2778,1,"The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778","The target of an object rest assignment may not be an optional property access."),The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access:M(2779,1,"The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779","The left-hand side of an assignment expression may not be an optional property access."),The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access:M(2780,1,"The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780","The left-hand side of a 'for...in' statement may not be an optional property access."),The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access:M(2781,1,"The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781","The left-hand side of a 'for...of' statement may not be an optional property access."),_0_needs_an_explicit_type_annotation:M(2782,3,"_0_needs_an_explicit_type_annotation_2782","'{0}' needs an explicit type annotation."),_0_is_specified_more_than_once_so_this_usage_will_be_overwritten:M(2783,1,"_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783","'{0}' is specified more than once, so this usage will be overwritten."),get_and_set_accessors_cannot_declare_this_parameters:M(2784,1,"get_and_set_accessors_cannot_declare_this_parameters_2784","'get' and 'set' accessors cannot declare 'this' parameters."),This_spread_always_overwrites_this_property:M(2785,1,"This_spread_always_overwrites_this_property_2785","This spread always overwrites this property."),_0_cannot_be_used_as_a_JSX_component:M(2786,1,"_0_cannot_be_used_as_a_JSX_component_2786","'{0}' cannot be used as a JSX component."),Its_return_type_0_is_not_a_valid_JSX_element:M(2787,1,"Its_return_type_0_is_not_a_valid_JSX_element_2787","Its return type '{0}' is not a valid JSX element."),Its_instance_type_0_is_not_a_valid_JSX_element:M(2788,1,"Its_instance_type_0_is_not_a_valid_JSX_element_2788","Its instance type '{0}' is not a valid JSX element."),Its_element_type_0_is_not_a_valid_JSX_element:M(2789,1,"Its_element_type_0_is_not_a_valid_JSX_element_2789","Its element type '{0}' is not a valid JSX element."),The_operand_of_a_delete_operator_must_be_optional:M(2790,1,"The_operand_of_a_delete_operator_must_be_optional_2790","The operand of a 'delete' operator must be optional."),Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later:M(2791,1,"Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791","Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later."),Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option:M(2792,1,"Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792","Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?"),The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible:M(2793,1,"The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793","The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."),Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise:M(2794,1,"Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794","Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?"),The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types:M(2795,1,"The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795","The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."),It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked:M(2796,1,"It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796","It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked."),A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract:M(2797,1,"A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797","A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."),The_declaration_was_marked_as_deprecated_here:M(2798,1,"The_declaration_was_marked_as_deprecated_here_2798","The declaration was marked as deprecated here."),Type_produces_a_tuple_type_that_is_too_large_to_represent:M(2799,1,"Type_produces_a_tuple_type_that_is_too_large_to_represent_2799","Type produces a tuple type that is too large to represent."),Expression_produces_a_tuple_type_that_is_too_large_to_represent:M(2800,1,"Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800","Expression produces a tuple type that is too large to represent."),This_condition_will_always_return_true_since_this_0_is_always_defined:M(2801,1,"This_condition_will_always_return_true_since_this_0_is_always_defined_2801","This condition will always return true since this '{0}' is always defined."),Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher:M(2802,1,"Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802","Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."),Cannot_assign_to_private_method_0_Private_methods_are_not_writable:M(2803,1,"Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803","Cannot assign to private method '{0}'. Private methods are not writable."),Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name:M(2804,1,"Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804","Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."),Private_accessor_was_defined_without_a_getter:M(2806,1,"Private_accessor_was_defined_without_a_getter_2806","Private accessor was defined without a getter."),This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0:M(2807,1,"This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807","This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."),A_get_accessor_must_be_at_least_as_accessible_as_the_setter:M(2808,1,"A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808","A get accessor must be at least as accessible as the setter"),Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses:M(2809,1,"Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809","Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses."),Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments:M(2810,1,"Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810","Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."),Initializer_for_property_0:M(2811,1,"Initializer_for_property_0_2811","Initializer for property '{0}'"),Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom:M(2812,1,"Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812","Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),Class_declaration_cannot_implement_overload_list_for_0:M(2813,1,"Class_declaration_cannot_implement_overload_list_for_0_2813","Class declaration cannot implement overload list for '{0}'."),Function_with_bodies_can_only_merge_with_classes_that_are_ambient:M(2814,1,"Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814","Function with bodies can only merge with classes that are ambient."),arguments_cannot_be_referenced_in_property_initializers:M(2815,1,"arguments_cannot_be_referenced_in_property_initializers_2815","'arguments' cannot be referenced in property initializers."),Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class:M(2816,1,"Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816","Cannot use 'this' in a static property initializer of a decorated class."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block:M(2817,1,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817","Property '{0}' has no initializer and is not definitely assigned in a class static block."),Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers:M(2818,1,"Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818","Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."),Namespace_name_cannot_be_0:M(2819,1,"Namespace_name_cannot_be_0_2819","Namespace name cannot be '{0}'."),Type_0_is_not_assignable_to_type_1_Did_you_mean_2:M(2820,1,"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820","Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve:M(2821,1,"Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2821","Import assertions are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'."),Import_assertions_cannot_be_used_with_type_only_imports_or_exports:M(2822,1,"Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822","Import assertions cannot be used with type-only imports or exports."),Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve:M(2823,1,"Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2823","Import attributes are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'."),Cannot_find_namespace_0_Did_you_mean_1:M(2833,1,"Cannot_find_namespace_0_Did_you_mean_1_2833","Cannot find namespace '{0}'. Did you mean '{1}'?"),Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path:M(2834,1,"Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834","Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."),Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0:M(2835,1,"Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835","Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"),Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:M(2836,1,"Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2836","Import assertions are not allowed on statements that compile to CommonJS 'require' calls."),Import_assertion_values_must_be_string_literal_expressions:M(2837,1,"Import_assertion_values_must_be_string_literal_expressions_2837","Import assertion values must be string literal expressions."),All_declarations_of_0_must_have_identical_constraints:M(2838,1,"All_declarations_of_0_must_have_identical_constraints_2838","All declarations of '{0}' must have identical constraints."),This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value:M(2839,1,"This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839","This condition will always return '{0}' since JavaScript compares objects by reference, not value."),An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types:M(2840,1,"An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840","An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."),_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation:M(2842,1,"_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842","'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here:M(2843,1,"We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843","We can only write a type for '{0}' by adding a type for the entire parameter here."),Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:M(2844,1,"Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844","Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),This_condition_will_always_return_0:M(2845,1,"This_condition_will_always_return_0_2845","This condition will always return '{0}'."),A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead:M(2846,1,"A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846","A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"),The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression:M(2848,1,"The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848","The right-hand side of an 'instanceof' expression must not be an instantiation expression."),Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1:M(2849,1,"Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849","Target signature provides too few arguments. Expected {0} or more, but got {1}."),The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined:M(2850,1,"The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850","The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined:M(2851,1,"The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851","The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:M(2852,1,"await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852","'await using' statements are only allowed within async functions and at the top levels of modules."),await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:M(2853,1,"await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853","'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:M(2854,1,"Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854","Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super:M(2855,1,"Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855","Class field '{0}' defined by the parent class is not accessible in the child class via super."),Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:M(2856,1,"Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856","Import attributes are not allowed on statements that compile to CommonJS 'require' calls."),Import_attributes_cannot_be_used_with_type_only_imports_or_exports:M(2857,1,"Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857","Import attributes cannot be used with type-only imports or exports."),Import_attribute_values_must_be_string_literal_expressions:M(2858,1,"Import_attribute_values_must_be_string_literal_expressions_2858","Import attribute values must be string literal expressions."),Excessive_complexity_comparing_types_0_and_1:M(2859,1,"Excessive_complexity_comparing_types_0_and_1_2859","Excessive complexity comparing types '{0}' and '{1}'."),The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method:M(2860,1,"The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860","The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."),An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression:M(2861,1,"An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861","An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."),Type_0_is_generic_and_can_only_be_indexed_for_reading:M(2862,1,"Type_0_is_generic_and_can_only_be_indexed_for_reading_2862","Type '{0}' is generic and can only be indexed for reading."),A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values:M(2863,1,"A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863","A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."),A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types:M(2864,1,"A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864","A class cannot implement a primitive type like '{0}'. It can only implement other named object types."),Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled:M(2865,1,"Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_2865","Import '{0}' conflicts with local value, so must be declared with a type-only import when 'isolatedModules' is enabled."),Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled:M(2866,1,"Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_w_2866","Import '{0}' conflicts with global value used in this file, so must be declared with a type-only import when 'isolatedModules' is enabled."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun:M(2867,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2867","Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig:M(2868,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2868","Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types field in your tsconfig."),Import_declaration_0_is_using_private_name_1:M(4e3,1,"Import_declaration_0_is_using_private_name_1_4000","Import declaration '{0}' is using private name '{1}'."),Type_parameter_0_of_exported_class_has_or_is_using_private_name_1:M(4002,1,"Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002","Type parameter '{0}' of exported class has or is using private name '{1}'."),Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1:M(4004,1,"Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004","Type parameter '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:M(4006,1,"Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006","Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:M(4008,1,"Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008","Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:M(4010,1,"Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010","Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:M(4012,1,"Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012","Type parameter '{0}' of public method from exported class has or is using private name '{1}'."),Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:M(4014,1,"Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014","Type parameter '{0}' of method from exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_function_has_or_is_using_private_name_1:M(4016,1,"Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016","Type parameter '{0}' of exported function has or is using private name '{1}'."),Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:M(4019,1,"Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019","Implements clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_class_0_has_or_is_using_private_name_1:M(4020,1,"extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020","'extends' clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_class_has_or_is_using_private_name_0:M(4021,1,"extends_clause_of_exported_class_has_or_is_using_private_name_0_4021","'extends' clause of exported class has or is using private name '{0}'."),extends_clause_of_exported_interface_0_has_or_is_using_private_name_1:M(4022,1,"extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022","'extends' clause of exported interface '{0}' has or is using private name '{1}'."),Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4023,1,"Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023","Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."),Exported_variable_0_has_or_is_using_name_1_from_private_module_2:M(4024,1,"Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024","Exported variable '{0}' has or is using name '{1}' from private module '{2}'."),Exported_variable_0_has_or_is_using_private_name_1:M(4025,1,"Exported_variable_0_has_or_is_using_private_name_1_4025","Exported variable '{0}' has or is using private name '{1}'."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4026,1,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026","Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:M(4027,1,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027","Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:M(4028,1,"Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028","Public static property '{0}' of exported class has or is using private name '{1}'."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4029,1,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029","Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:M(4030,1,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030","Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_property_0_of_exported_class_has_or_is_using_private_name_1:M(4031,1,"Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031","Public property '{0}' of exported class has or is using private name '{1}'."),Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:M(4032,1,"Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032","Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Property_0_of_exported_interface_has_or_is_using_private_name_1:M(4033,1,"Property_0_of_exported_interface_has_or_is_using_private_name_1_4033","Property '{0}' of exported interface has or is using private name '{1}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:M(4034,1,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034","Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:M(4035,1,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035","Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:M(4036,1,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036","Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:M(4037,1,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037","Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4038,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038","Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:M(4039,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039","Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:M(4040,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040","Return type of public static getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4041,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041","Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:M(4042,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042","Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1:M(4043,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043","Return type of public getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:M(4044,1,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044","Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0:M(4045,1,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045","Return type of constructor signature from exported interface has or is using private name '{0}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:M(4046,1,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046","Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0:M(4047,1,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047","Return type of call signature from exported interface has or is using private name '{0}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:M(4048,1,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048","Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0:M(4049,1,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049","Return type of index signature from exported interface has or is using private name '{0}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:M(4050,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050","Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:M(4051,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051","Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:M(4052,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052","Return type of public static method from exported class has or is using private name '{0}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:M(4053,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053","Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:M(4054,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054","Return type of public method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:M(4055,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055","Return type of public method from exported class has or is using private name '{0}'."),Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:M(4056,1,"Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056","Return type of method from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0:M(4057,1,"Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057","Return type of method from exported interface has or is using private name '{0}'."),Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:M(4058,1,"Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058","Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:M(4059,1,"Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059","Return type of exported function has or is using name '{0}' from private module '{1}'."),Return_type_of_exported_function_has_or_is_using_private_name_0:M(4060,1,"Return_type_of_exported_function_has_or_is_using_private_name_0_4060","Return type of exported function has or is using private name '{0}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4061,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061","Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:M(4062,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062","Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1:M(4063,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063","Parameter '{0}' of constructor from exported class has or is using private name '{1}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:M(4064,1,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064","Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:M(4065,1,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065","Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:M(4066,1,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066","Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:M(4067,1,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067","Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4068,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068","Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:M(4069,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069","Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:M(4070,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070","Parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4071,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071","Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:M(4072,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072","Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:M(4073,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073","Parameter '{0}' of public method from exported class has or is using private name '{1}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:M(4074,1,"Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074","Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:M(4075,1,"Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075","Parameter '{0}' of method from exported interface has or is using private name '{1}'."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4076,1,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076","Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:M(4077,1,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077","Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."),Parameter_0_of_exported_function_has_or_is_using_private_name_1:M(4078,1,"Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078","Parameter '{0}' of exported function has or is using private name '{1}'."),Exported_type_alias_0_has_or_is_using_private_name_1:M(4081,1,"Exported_type_alias_0_has_or_is_using_private_name_1_4081","Exported type alias '{0}' has or is using private name '{1}'."),Default_export_of_the_module_has_or_is_using_private_name_0:M(4082,1,"Default_export_of_the_module_has_or_is_using_private_name_0_4082","Default export of the module has or is using private name '{0}'."),Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1:M(4083,1,"Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083","Type parameter '{0}' of exported type alias has or is using private name '{1}'."),Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2:M(4084,1,"Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084","Exported type alias '{0}' has or is using private name '{1}' from module {2}."),Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1:M(4085,1,"Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1_4085","Extends clause for inferred type '{0}' has or is using private name '{1}'."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:M(4091,1,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091","Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1:M(4092,1,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092","Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."),Property_0_of_exported_class_expression_may_not_be_private_or_protected:M(4094,1,"Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094","Property '{0}' of exported class expression may not be private or protected."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4095,1,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095","Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:M(4096,1,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096","Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:M(4097,1,"Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097","Public static method '{0}' of exported class has or is using private name '{1}'."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4098,1,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098","Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:M(4099,1,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099","Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_method_0_of_exported_class_has_or_is_using_private_name_1:M(4100,1,"Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100","Public method '{0}' of exported class has or is using private name '{1}'."),Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:M(4101,1,"Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101","Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Method_0_of_exported_interface_has_or_is_using_private_name_1:M(4102,1,"Method_0_of_exported_interface_has_or_is_using_private_name_1_4102","Method '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1:M(4103,1,"Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103","Type parameter '{0}' of exported mapped object type is using private name '{1}'."),The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1:M(4104,1,"The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104","The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."),Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter:M(4105,1,"Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105","Private or protected member '{0}' cannot be accessed on a type parameter."),Parameter_0_of_accessor_has_or_is_using_private_name_1:M(4106,1,"Parameter_0_of_accessor_has_or_is_using_private_name_1_4106","Parameter '{0}' of accessor has or is using private name '{1}'."),Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2:M(4107,1,"Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107","Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."),Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4108,1,"Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108","Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."),Type_arguments_for_0_circularly_reference_themselves:M(4109,1,"Type_arguments_for_0_circularly_reference_themselves_4109","Type arguments for '{0}' circularly reference themselves."),Tuple_type_arguments_circularly_reference_themselves:M(4110,1,"Tuple_type_arguments_circularly_reference_themselves_4110","Tuple type arguments circularly reference themselves."),Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0:M(4111,1,"Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111","Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."),This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class:M(4112,1,"This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112","This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0:M(4113,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0:M(4114,1,"This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114","This member must have an 'override' modifier because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0:M(4115,1,"This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115","This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0:M(4116,1,"This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116","This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:M(4117,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"),The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized:M(4118,1,"The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118","The type of this node cannot be serialized because its property '{0}' cannot be serialized."),This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:M(4119,1,"This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119","This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:M(4120,1,"This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120","This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class:M(4121,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121","This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0:M(4122,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122","This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:M(4123,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123","This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next:M(4124,1,"Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124","Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given:M(4125,1,"Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125","Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."),One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value:M(4126,1,"One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126","One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."),The_current_host_does_not_support_the_0_option:M(5001,1,"The_current_host_does_not_support_the_0_option_5001","The current host does not support the '{0}' option."),Cannot_find_the_common_subdirectory_path_for_the_input_files:M(5009,1,"Cannot_find_the_common_subdirectory_path_for_the_input_files_5009","Cannot find the common subdirectory path for the input files."),File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:M(5010,1,"File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010","File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),Cannot_read_file_0_Colon_1:M(5012,1,"Cannot_read_file_0_Colon_1_5012","Cannot read file '{0}': {1}."),Failed_to_parse_file_0_Colon_1:M(5014,1,"Failed_to_parse_file_0_Colon_1_5014","Failed to parse file '{0}': {1}."),Unknown_compiler_option_0:M(5023,1,"Unknown_compiler_option_0_5023","Unknown compiler option '{0}'."),Compiler_option_0_requires_a_value_of_type_1:M(5024,1,"Compiler_option_0_requires_a_value_of_type_1_5024","Compiler option '{0}' requires a value of type {1}."),Unknown_compiler_option_0_Did_you_mean_1:M(5025,1,"Unknown_compiler_option_0_Did_you_mean_1_5025","Unknown compiler option '{0}'. Did you mean '{1}'?"),Could_not_write_file_0_Colon_1:M(5033,1,"Could_not_write_file_0_Colon_1_5033","Could not write file '{0}': {1}."),Option_project_cannot_be_mixed_with_source_files_on_a_command_line:M(5042,1,"Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042","Option 'project' cannot be mixed with source files on a command line."),Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher:M(5047,1,"Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047","Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."),Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided:M(5051,1,"Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051","Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."),Option_0_cannot_be_specified_without_specifying_option_1:M(5052,1,"Option_0_cannot_be_specified_without_specifying_option_1_5052","Option '{0}' cannot be specified without specifying option '{1}'."),Option_0_cannot_be_specified_with_option_1:M(5053,1,"Option_0_cannot_be_specified_with_option_1_5053","Option '{0}' cannot be specified with option '{1}'."),A_tsconfig_json_file_is_already_defined_at_Colon_0:M(5054,1,"A_tsconfig_json_file_is_already_defined_at_Colon_0_5054","A 'tsconfig.json' file is already defined at: '{0}'."),Cannot_write_file_0_because_it_would_overwrite_input_file:M(5055,1,"Cannot_write_file_0_because_it_would_overwrite_input_file_5055","Cannot write file '{0}' because it would overwrite input file."),Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files:M(5056,1,"Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056","Cannot write file '{0}' because it would be overwritten by multiple input files."),Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0:M(5057,1,"Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057","Cannot find a tsconfig.json file at the specified directory: '{0}'."),The_specified_path_does_not_exist_Colon_0:M(5058,1,"The_specified_path_does_not_exist_Colon_0_5058","The specified path does not exist: '{0}'."),Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier:M(5059,1,"Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059","Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."),Pattern_0_can_have_at_most_one_Asterisk_character:M(5061,1,"Pattern_0_can_have_at_most_one_Asterisk_character_5061","Pattern '{0}' can have at most one '*' character."),Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character:M(5062,1,"Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062","Substitution '{0}' in pattern '{1}' can have at most one '*' character."),Substitutions_for_pattern_0_should_be_an_array:M(5063,1,"Substitutions_for_pattern_0_should_be_an_array_5063","Substitutions for pattern '{0}' should be an array."),Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2:M(5064,1,"Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064","Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."),File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:M(5065,1,"File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065","File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."),Substitutions_for_pattern_0_shouldn_t_be_an_empty_array:M(5066,1,"Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066","Substitutions for pattern '{0}' shouldn't be an empty array."),Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name:M(5067,1,"Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067","Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."),Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig:M(5068,1,"Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068","Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."),Option_0_cannot_be_specified_without_specifying_option_1_or_option_2:M(5069,1,"Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069","Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."),Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic:M(5070,1,"Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic_5070","Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'."),Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd:M(5071,1,"Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd_5071","Option '--resolveJsonModule' cannot be specified when 'module' is set to 'none', 'system', or 'umd'."),Unknown_build_option_0:M(5072,1,"Unknown_build_option_0_5072","Unknown build option '{0}'."),Build_option_0_requires_a_value_of_type_1:M(5073,1,"Build_option_0_requires_a_value_of_type_1_5073","Build option '{0}' requires a value of type {1}."),Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified:M(5074,1,"Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074","Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified."),_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2:M(5075,1,"_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075","'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."),_0_and_1_operations_cannot_be_mixed_without_parentheses:M(5076,1,"_0_and_1_operations_cannot_be_mixed_without_parentheses_5076","'{0}' and '{1}' operations cannot be mixed without parentheses."),Unknown_build_option_0_Did_you_mean_1:M(5077,1,"Unknown_build_option_0_Did_you_mean_1_5077","Unknown build option '{0}'. Did you mean '{1}'?"),Unknown_watch_option_0:M(5078,1,"Unknown_watch_option_0_5078","Unknown watch option '{0}'."),Unknown_watch_option_0_Did_you_mean_1:M(5079,1,"Unknown_watch_option_0_Did_you_mean_1_5079","Unknown watch option '{0}'. Did you mean '{1}'?"),Watch_option_0_requires_a_value_of_type_1:M(5080,1,"Watch_option_0_requires_a_value_of_type_1_5080","Watch option '{0}' requires a value of type {1}."),Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0:M(5081,1,"Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081","Cannot find a tsconfig.json file at the current directory: {0}."),_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1:M(5082,1,"_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082","'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."),Cannot_read_file_0:M(5083,1,"Cannot_read_file_0_5083","Cannot read file '{0}'."),A_tuple_member_cannot_be_both_optional_and_rest:M(5085,1,"A_tuple_member_cannot_be_both_optional_and_rest_5085","A tuple member cannot be both optional and rest."),A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type:M(5086,1,"A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086","A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."),A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type:M(5087,1,"A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087","A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."),The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary:M(5088,1,"The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088","The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary."),Option_0_cannot_be_specified_when_option_jsx_is_1:M(5089,1,"Option_0_cannot_be_specified_when_option_jsx_is_1_5089","Option '{0}' cannot be specified when option 'jsx' is '{1}'."),Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash:M(5090,1,"Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090","Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"),Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled:M(5091,1,"Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled_5091","Option 'preserveConstEnums' cannot be disabled when '{0}' is enabled."),The_root_value_of_a_0_file_must_be_an_object:M(5092,1,"The_root_value_of_a_0_file_must_be_an_object_5092","The root value of a '{0}' file must be an object."),Compiler_option_0_may_only_be_used_with_build:M(5093,1,"Compiler_option_0_may_only_be_used_with_build_5093","Compiler option '--{0}' may only be used with '--build'."),Compiler_option_0_may_not_be_used_with_build:M(5094,1,"Compiler_option_0_may_not_be_used_with_build_5094","Compiler option '--{0}' may not be used with '--build'."),Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later:M(5095,1,"Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later_5095","Option '{0}' can only be used when 'module' is set to 'preserve' or to 'es2015' or later."),Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set:M(5096,1,"Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096","Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."),An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled:M(5097,1,"An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097","An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler:M(5098,1,"Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098","Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error:M(5101,1,"Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101",`Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`),Option_0_has_been_removed_Please_remove_it_from_your_configuration:M(5102,1,"Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102","Option '{0}' has been removed. Please remove it from your configuration."),Invalid_value_for_ignoreDeprecations:M(5103,1,"Invalid_value_for_ignoreDeprecations_5103","Invalid value for '--ignoreDeprecations'."),Option_0_is_redundant_and_cannot_be_specified_with_option_1:M(5104,1,"Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104","Option '{0}' is redundant and cannot be specified with option '{1}'."),Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System:M(5105,1,"Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105","Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."),Use_0_instead:M(5106,3,"Use_0_instead_5106","Use '{0}' instead."),Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error:M(5107,1,"Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107",`Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`),Option_0_1_has_been_removed_Please_remove_it_from_your_configuration:M(5108,1,"Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108","Option '{0}={1}' has been removed. Please remove it from your configuration."),Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1:M(5109,1,"Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109","Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."),Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1:M(5110,1,"Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110","Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."),Generates_a_sourcemap_for_each_corresponding_d_ts_file:M(6e3,3,"Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000","Generates a sourcemap for each corresponding '.d.ts' file."),Concatenate_and_emit_output_to_single_file:M(6001,3,"Concatenate_and_emit_output_to_single_file_6001","Concatenate and emit output to single file."),Generates_corresponding_d_ts_file:M(6002,3,"Generates_corresponding_d_ts_file_6002","Generates corresponding '.d.ts' file."),Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations:M(6004,3,"Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004","Specify the location where debugger should locate TypeScript files instead of source locations."),Watch_input_files:M(6005,3,"Watch_input_files_6005","Watch input files."),Redirect_output_structure_to_the_directory:M(6006,3,"Redirect_output_structure_to_the_directory_6006","Redirect output structure to the directory."),Do_not_erase_const_enum_declarations_in_generated_code:M(6007,3,"Do_not_erase_const_enum_declarations_in_generated_code_6007","Do not erase const enum declarations in generated code."),Do_not_emit_outputs_if_any_errors_were_reported:M(6008,3,"Do_not_emit_outputs_if_any_errors_were_reported_6008","Do not emit outputs if any errors were reported."),Do_not_emit_comments_to_output:M(6009,3,"Do_not_emit_comments_to_output_6009","Do not emit comments to output."),Do_not_emit_outputs:M(6010,3,"Do_not_emit_outputs_6010","Do not emit outputs."),Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking:M(6011,3,"Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011","Allow default imports from modules with no default export. This does not affect code emit, just typechecking."),Skip_type_checking_of_declaration_files:M(6012,3,"Skip_type_checking_of_declaration_files_6012","Skip type checking of declaration files."),Do_not_resolve_the_real_path_of_symlinks:M(6013,3,"Do_not_resolve_the_real_path_of_symlinks_6013","Do not resolve the real path of symlinks."),Only_emit_d_ts_declaration_files:M(6014,3,"Only_emit_d_ts_declaration_files_6014","Only emit '.d.ts' declaration files."),Specify_ECMAScript_target_version:M(6015,3,"Specify_ECMAScript_target_version_6015","Specify ECMAScript target version."),Specify_module_code_generation:M(6016,3,"Specify_module_code_generation_6016","Specify module code generation."),Print_this_message:M(6017,3,"Print_this_message_6017","Print this message."),Print_the_compiler_s_version:M(6019,3,"Print_the_compiler_s_version_6019","Print the compiler's version."),Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json:M(6020,3,"Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020","Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."),Syntax_Colon_0:M(6023,3,"Syntax_Colon_0_6023","Syntax: {0}"),options:M(6024,3,"options_6024","options"),file:M(6025,3,"file_6025","file"),Examples_Colon_0:M(6026,3,"Examples_Colon_0_6026","Examples: {0}"),Options_Colon:M(6027,3,"Options_Colon_6027","Options:"),Version_0:M(6029,3,"Version_0_6029","Version {0}"),Insert_command_line_options_and_files_from_a_file:M(6030,3,"Insert_command_line_options_and_files_from_a_file_6030","Insert command line options and files from a file."),Starting_compilation_in_watch_mode:M(6031,3,"Starting_compilation_in_watch_mode_6031","Starting compilation in watch mode..."),File_change_detected_Starting_incremental_compilation:M(6032,3,"File_change_detected_Starting_incremental_compilation_6032","File change detected. Starting incremental compilation..."),KIND:M(6034,3,"KIND_6034","KIND"),FILE:M(6035,3,"FILE_6035","FILE"),VERSION:M(6036,3,"VERSION_6036","VERSION"),LOCATION:M(6037,3,"LOCATION_6037","LOCATION"),DIRECTORY:M(6038,3,"DIRECTORY_6038","DIRECTORY"),STRATEGY:M(6039,3,"STRATEGY_6039","STRATEGY"),FILE_OR_DIRECTORY:M(6040,3,"FILE_OR_DIRECTORY_6040","FILE OR DIRECTORY"),Errors_Files:M(6041,3,"Errors_Files_6041","Errors Files"),Generates_corresponding_map_file:M(6043,3,"Generates_corresponding_map_file_6043","Generates corresponding '.map' file."),Compiler_option_0_expects_an_argument:M(6044,1,"Compiler_option_0_expects_an_argument_6044","Compiler option '{0}' expects an argument."),Unterminated_quoted_string_in_response_file_0:M(6045,1,"Unterminated_quoted_string_in_response_file_0_6045","Unterminated quoted string in response file '{0}'."),Argument_for_0_option_must_be_Colon_1:M(6046,1,"Argument_for_0_option_must_be_Colon_1_6046","Argument for '{0}' option must be: {1}."),Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1:M(6048,1,"Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048","Locale must be of the form or -. For example '{0}' or '{1}'."),Unable_to_open_file_0:M(6050,1,"Unable_to_open_file_0_6050","Unable to open file '{0}'."),Corrupted_locale_file_0:M(6051,1,"Corrupted_locale_file_0_6051","Corrupted locale file {0}."),Raise_error_on_expressions_and_declarations_with_an_implied_any_type:M(6052,3,"Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052","Raise error on expressions and declarations with an implied 'any' type."),File_0_not_found:M(6053,1,"File_0_not_found_6053","File '{0}' not found."),File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1:M(6054,1,"File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054","File '{0}' has an unsupported extension. The only supported extensions are {1}."),Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures:M(6055,3,"Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055","Suppress noImplicitAny errors for indexing objects lacking index signatures."),Do_not_emit_declarations_for_code_that_has_an_internal_annotation:M(6056,3,"Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056","Do not emit declarations for code that has an '@internal' annotation."),Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir:M(6058,3,"Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058","Specify the root directory of input files. Use to control the output directory structure with --outDir."),File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files:M(6059,1,"File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059","File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."),Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix:M(6060,3,"Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060","Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."),NEWLINE:M(6061,3,"NEWLINE_6061","NEWLINE"),Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line:M(6064,1,"Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064","Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."),Enables_experimental_support_for_ES7_decorators:M(6065,3,"Enables_experimental_support_for_ES7_decorators_6065","Enables experimental support for ES7 decorators."),Enables_experimental_support_for_emitting_type_metadata_for_decorators:M(6066,3,"Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066","Enables experimental support for emitting type metadata for decorators."),Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file:M(6070,3,"Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070","Initializes a TypeScript project and creates a tsconfig.json file."),Successfully_created_a_tsconfig_json_file:M(6071,3,"Successfully_created_a_tsconfig_json_file_6071","Successfully created a tsconfig.json file."),Suppress_excess_property_checks_for_object_literals:M(6072,3,"Suppress_excess_property_checks_for_object_literals_6072","Suppress excess property checks for object literals."),Stylize_errors_and_messages_using_color_and_context_experimental:M(6073,3,"Stylize_errors_and_messages_using_color_and_context_experimental_6073","Stylize errors and messages using color and context (experimental)."),Do_not_report_errors_on_unused_labels:M(6074,3,"Do_not_report_errors_on_unused_labels_6074","Do not report errors on unused labels."),Report_error_when_not_all_code_paths_in_function_return_a_value:M(6075,3,"Report_error_when_not_all_code_paths_in_function_return_a_value_6075","Report error when not all code paths in function return a value."),Report_errors_for_fallthrough_cases_in_switch_statement:M(6076,3,"Report_errors_for_fallthrough_cases_in_switch_statement_6076","Report errors for fallthrough cases in switch statement."),Do_not_report_errors_on_unreachable_code:M(6077,3,"Do_not_report_errors_on_unreachable_code_6077","Do not report errors on unreachable code."),Disallow_inconsistently_cased_references_to_the_same_file:M(6078,3,"Disallow_inconsistently_cased_references_to_the_same_file_6078","Disallow inconsistently-cased references to the same file."),Specify_library_files_to_be_included_in_the_compilation:M(6079,3,"Specify_library_files_to_be_included_in_the_compilation_6079","Specify library files to be included in the compilation."),Specify_JSX_code_generation:M(6080,3,"Specify_JSX_code_generation_6080","Specify JSX code generation."),Only_amd_and_system_modules_are_supported_alongside_0:M(6082,1,"Only_amd_and_system_modules_are_supported_alongside_0_6082","Only 'amd' and 'system' modules are supported alongside --{0}."),Base_directory_to_resolve_non_absolute_module_names:M(6083,3,"Base_directory_to_resolve_non_absolute_module_names_6083","Base directory to resolve non-absolute module names."),Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit:M(6084,3,"Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084","[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"),Enable_tracing_of_the_name_resolution_process:M(6085,3,"Enable_tracing_of_the_name_resolution_process_6085","Enable tracing of the name resolution process."),Resolving_module_0_from_1:M(6086,3,"Resolving_module_0_from_1_6086","======== Resolving module '{0}' from '{1}'. ========"),Explicitly_specified_module_resolution_kind_Colon_0:M(6087,3,"Explicitly_specified_module_resolution_kind_Colon_0_6087","Explicitly specified module resolution kind: '{0}'."),Module_resolution_kind_is_not_specified_using_0:M(6088,3,"Module_resolution_kind_is_not_specified_using_0_6088","Module resolution kind is not specified, using '{0}'."),Module_name_0_was_successfully_resolved_to_1:M(6089,3,"Module_name_0_was_successfully_resolved_to_1_6089","======== Module name '{0}' was successfully resolved to '{1}'. ========"),Module_name_0_was_not_resolved:M(6090,3,"Module_name_0_was_not_resolved_6090","======== Module name '{0}' was not resolved. ========"),paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0:M(6091,3,"paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091","'paths' option is specified, looking for a pattern to match module name '{0}'."),Module_name_0_matched_pattern_1:M(6092,3,"Module_name_0_matched_pattern_1_6092","Module name '{0}', matched pattern '{1}'."),Trying_substitution_0_candidate_module_location_Colon_1:M(6093,3,"Trying_substitution_0_candidate_module_location_Colon_1_6093","Trying substitution '{0}', candidate module location: '{1}'."),Resolving_module_name_0_relative_to_base_url_1_2:M(6094,3,"Resolving_module_name_0_relative_to_base_url_1_2_6094","Resolving module name '{0}' relative to base url '{1}' - '{2}'."),Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1:M(6095,3,"Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095","Loading module as file / folder, candidate module location '{0}', target file types: {1}."),File_0_does_not_exist:M(6096,3,"File_0_does_not_exist_6096","File '{0}' does not exist."),File_0_exists_use_it_as_a_name_resolution_result:M(6097,3,"File_0_exists_use_it_as_a_name_resolution_result_6097","File '{0}' exists - use it as a name resolution result."),Loading_module_0_from_node_modules_folder_target_file_types_Colon_1:M(6098,3,"Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098","Loading module '{0}' from 'node_modules' folder, target file types: {1}."),Found_package_json_at_0:M(6099,3,"Found_package_json_at_0_6099","Found 'package.json' at '{0}'."),package_json_does_not_have_a_0_field:M(6100,3,"package_json_does_not_have_a_0_field_6100","'package.json' does not have a '{0}' field."),package_json_has_0_field_1_that_references_2:M(6101,3,"package_json_has_0_field_1_that_references_2_6101","'package.json' has '{0}' field '{1}' that references '{2}'."),Allow_javascript_files_to_be_compiled:M(6102,3,"Allow_javascript_files_to_be_compiled_6102","Allow javascript files to be compiled."),Checking_if_0_is_the_longest_matching_prefix_for_1_2:M(6104,3,"Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104","Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."),Expected_type_of_0_field_in_package_json_to_be_1_got_2:M(6105,3,"Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105","Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."),baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1:M(6106,3,"baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106","'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."),rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0:M(6107,3,"rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107","'rootDirs' option is set, using it to resolve relative module name '{0}'."),Longest_matching_prefix_for_0_is_1:M(6108,3,"Longest_matching_prefix_for_0_is_1_6108","Longest matching prefix for '{0}' is '{1}'."),Loading_0_from_the_root_dir_1_candidate_location_2:M(6109,3,"Loading_0_from_the_root_dir_1_candidate_location_2_6109","Loading '{0}' from the root dir '{1}', candidate location '{2}'."),Trying_other_entries_in_rootDirs:M(6110,3,"Trying_other_entries_in_rootDirs_6110","Trying other entries in 'rootDirs'."),Module_resolution_using_rootDirs_has_failed:M(6111,3,"Module_resolution_using_rootDirs_has_failed_6111","Module resolution using 'rootDirs' has failed."),Do_not_emit_use_strict_directives_in_module_output:M(6112,3,"Do_not_emit_use_strict_directives_in_module_output_6112","Do not emit 'use strict' directives in module output."),Enable_strict_null_checks:M(6113,3,"Enable_strict_null_checks_6113","Enable strict null checks."),Unknown_option_excludes_Did_you_mean_exclude:M(6114,1,"Unknown_option_excludes_Did_you_mean_exclude_6114","Unknown option 'excludes'. Did you mean 'exclude'?"),Raise_error_on_this_expressions_with_an_implied_any_type:M(6115,3,"Raise_error_on_this_expressions_with_an_implied_any_type_6115","Raise error on 'this' expressions with an implied 'any' type."),Resolving_type_reference_directive_0_containing_file_1_root_directory_2:M(6116,3,"Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116","======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2:M(6119,3,"Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119","======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"),Type_reference_directive_0_was_not_resolved:M(6120,3,"Type_reference_directive_0_was_not_resolved_6120","======== Type reference directive '{0}' was not resolved. ========"),Resolving_with_primary_search_path_0:M(6121,3,"Resolving_with_primary_search_path_0_6121","Resolving with primary search path '{0}'."),Root_directory_cannot_be_determined_skipping_primary_search_paths:M(6122,3,"Root_directory_cannot_be_determined_skipping_primary_search_paths_6122","Root directory cannot be determined, skipping primary search paths."),Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set:M(6123,3,"Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123","======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"),Type_declaration_files_to_be_included_in_compilation:M(6124,3,"Type_declaration_files_to_be_included_in_compilation_6124","Type declaration files to be included in compilation."),Looking_up_in_node_modules_folder_initial_location_0:M(6125,3,"Looking_up_in_node_modules_folder_initial_location_0_6125","Looking up in 'node_modules' folder, initial location '{0}'."),Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder:M(6126,3,"Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126","Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1:M(6127,3,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127","======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set:M(6128,3,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128","======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"),Resolving_real_path_for_0_result_1:M(6130,3,"Resolving_real_path_for_0_result_1_6130","Resolving real path for '{0}', result '{1}'."),Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system:M(6131,1,"Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131","Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."),File_name_0_has_a_1_extension_stripping_it:M(6132,3,"File_name_0_has_a_1_extension_stripping_it_6132","File name '{0}' has a '{1}' extension - stripping it."),_0_is_declared_but_its_value_is_never_read:M(6133,1,"_0_is_declared_but_its_value_is_never_read_6133","'{0}' is declared but its value is never read.",!0),Report_errors_on_unused_locals:M(6134,3,"Report_errors_on_unused_locals_6134","Report errors on unused locals."),Report_errors_on_unused_parameters:M(6135,3,"Report_errors_on_unused_parameters_6135","Report errors on unused parameters."),The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files:M(6136,3,"The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136","The maximum dependency depth to search under node_modules and load JavaScript files."),Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1:M(6137,1,"Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137","Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."),Property_0_is_declared_but_its_value_is_never_read:M(6138,1,"Property_0_is_declared_but_its_value_is_never_read_6138","Property '{0}' is declared but its value is never read.",!0),Import_emit_helpers_from_tslib:M(6139,3,"Import_emit_helpers_from_tslib_6139","Import emit helpers from 'tslib'."),Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2:M(6140,1,"Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140","Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."),Parse_in_strict_mode_and_emit_use_strict_for_each_source_file:M(6141,3,"Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141",'Parse in strict mode and emit "use strict" for each source file.'),Module_0_was_resolved_to_1_but_jsx_is_not_set:M(6142,1,"Module_0_was_resolved_to_1_but_jsx_is_not_set_6142","Module '{0}' was resolved to '{1}', but '--jsx' is not set."),Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1:M(6144,3,"Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144","Module '{0}' was resolved as locally declared ambient module in file '{1}'."),Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified:M(6145,3,"Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145","Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified."),Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h:M(6146,3,"Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146","Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."),Resolution_for_module_0_was_found_in_cache_from_location_1:M(6147,3,"Resolution_for_module_0_was_found_in_cache_from_location_1_6147","Resolution for module '{0}' was found in cache from location '{1}'."),Directory_0_does_not_exist_skipping_all_lookups_in_it:M(6148,3,"Directory_0_does_not_exist_skipping_all_lookups_in_it_6148","Directory '{0}' does not exist, skipping all lookups in it."),Show_diagnostic_information:M(6149,3,"Show_diagnostic_information_6149","Show diagnostic information."),Show_verbose_diagnostic_information:M(6150,3,"Show_verbose_diagnostic_information_6150","Show verbose diagnostic information."),Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file:M(6151,3,"Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151","Emit a single file with source maps instead of having a separate file."),Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set:M(6152,3,"Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152","Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."),Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule:M(6153,3,"Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153","Transpile each file as a separate module (similar to 'ts.transpileModule')."),Print_names_of_generated_files_part_of_the_compilation:M(6154,3,"Print_names_of_generated_files_part_of_the_compilation_6154","Print names of generated files part of the compilation."),Print_names_of_files_part_of_the_compilation:M(6155,3,"Print_names_of_files_part_of_the_compilation_6155","Print names of files part of the compilation."),The_locale_used_when_displaying_messages_to_the_user_e_g_en_us:M(6156,3,"The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156","The locale used when displaying messages to the user (e.g. 'en-us')"),Do_not_generate_custom_helper_functions_like_extends_in_compiled_output:M(6157,3,"Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157","Do not generate custom helper functions like '__extends' in compiled output."),Do_not_include_the_default_library_file_lib_d_ts:M(6158,3,"Do_not_include_the_default_library_file_lib_d_ts_6158","Do not include the default library file (lib.d.ts)."),Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files:M(6159,3,"Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159","Do not add triple-slash references or imported modules to the list of compiled files."),Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files:M(6160,3,"Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160","[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."),List_of_folders_to_include_type_definitions_from:M(6161,3,"List_of_folders_to_include_type_definitions_from_6161","List of folders to include type definitions from."),Disable_size_limitations_on_JavaScript_projects:M(6162,3,"Disable_size_limitations_on_JavaScript_projects_6162","Disable size limitations on JavaScript projects."),The_character_set_of_the_input_files:M(6163,3,"The_character_set_of_the_input_files_6163","The character set of the input files."),Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1:M(6164,3,"Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1_6164","Skipping module '{0}' that looks like an absolute URI, target file types: {1}."),Do_not_truncate_error_messages:M(6165,3,"Do_not_truncate_error_messages_6165","Do not truncate error messages."),Output_directory_for_generated_declaration_files:M(6166,3,"Output_directory_for_generated_declaration_files_6166","Output directory for generated declaration files."),A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl:M(6167,3,"A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167","A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."),List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime:M(6168,3,"List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168","List of root folders whose combined content represents the structure of the project at runtime."),Show_all_compiler_options:M(6169,3,"Show_all_compiler_options_6169","Show all compiler options."),Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file:M(6170,3,"Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170","[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"),Command_line_Options:M(6171,3,"Command_line_Options_6171","Command-line Options"),Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5:M(6179,3,"Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_6179","Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5'."),Enable_all_strict_type_checking_options:M(6180,3,"Enable_all_strict_type_checking_options_6180","Enable all strict type-checking options."),Scoped_package_detected_looking_in_0:M(6182,3,"Scoped_package_detected_looking_in_0_6182","Scoped package detected, looking in '{0}'"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:M(6183,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:M(6184,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Enable_strict_checking_of_function_types:M(6186,3,"Enable_strict_checking_of_function_types_6186","Enable strict checking of function types."),Enable_strict_checking_of_property_initialization_in_classes:M(6187,3,"Enable_strict_checking_of_property_initialization_in_classes_6187","Enable strict checking of property initialization in classes."),Numeric_separators_are_not_allowed_here:M(6188,1,"Numeric_separators_are_not_allowed_here_6188","Numeric separators are not allowed here."),Multiple_consecutive_numeric_separators_are_not_permitted:M(6189,1,"Multiple_consecutive_numeric_separators_are_not_permitted_6189","Multiple consecutive numeric separators are not permitted."),Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen:M(6191,3,"Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191","Whether to keep outdated console output in watch mode instead of clearing the screen."),All_imports_in_import_declaration_are_unused:M(6192,1,"All_imports_in_import_declaration_are_unused_6192","All imports in import declaration are unused.",!0),Found_1_error_Watching_for_file_changes:M(6193,3,"Found_1_error_Watching_for_file_changes_6193","Found 1 error. Watching for file changes."),Found_0_errors_Watching_for_file_changes:M(6194,3,"Found_0_errors_Watching_for_file_changes_6194","Found {0} errors. Watching for file changes."),Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols:M(6195,3,"Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195","Resolve 'keyof' to string valued property names only (no numbers or symbols)."),_0_is_declared_but_never_used:M(6196,1,"_0_is_declared_but_never_used_6196","'{0}' is declared but never used.",!0),Include_modules_imported_with_json_extension:M(6197,3,"Include_modules_imported_with_json_extension_6197","Include modules imported with '.json' extension"),All_destructured_elements_are_unused:M(6198,1,"All_destructured_elements_are_unused_6198","All destructured elements are unused.",!0),All_variables_are_unused:M(6199,1,"All_variables_are_unused_6199","All variables are unused.",!0),Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0:M(6200,1,"Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200","Definitions of the following identifiers conflict with those in another file: {0}"),Conflicts_are_in_this_file:M(6201,3,"Conflicts_are_in_this_file_6201","Conflicts are in this file."),Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0:M(6202,1,"Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202","Project references may not form a circular graph. Cycle detected: {0}"),_0_was_also_declared_here:M(6203,3,"_0_was_also_declared_here_6203","'{0}' was also declared here."),and_here:M(6204,3,"and_here_6204","and here."),All_type_parameters_are_unused:M(6205,1,"All_type_parameters_are_unused_6205","All type parameters are unused."),package_json_has_a_typesVersions_field_with_version_specific_path_mappings:M(6206,3,"package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206","'package.json' has a 'typesVersions' field with version-specific path mappings."),package_json_does_not_have_a_typesVersions_entry_that_matches_version_0:M(6207,3,"package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207","'package.json' does not have a 'typesVersions' entry that matches version '{0}'."),package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2:M(6208,3,"package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208","'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."),package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range:M(6209,3,"package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209","'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."),An_argument_for_0_was_not_provided:M(6210,3,"An_argument_for_0_was_not_provided_6210","An argument for '{0}' was not provided."),An_argument_matching_this_binding_pattern_was_not_provided:M(6211,3,"An_argument_matching_this_binding_pattern_was_not_provided_6211","An argument matching this binding pattern was not provided."),Did_you_mean_to_call_this_expression:M(6212,3,"Did_you_mean_to_call_this_expression_6212","Did you mean to call this expression?"),Did_you_mean_to_use_new_with_this_expression:M(6213,3,"Did_you_mean_to_use_new_with_this_expression_6213","Did you mean to use 'new' with this expression?"),Enable_strict_bind_call_and_apply_methods_on_functions:M(6214,3,"Enable_strict_bind_call_and_apply_methods_on_functions_6214","Enable strict 'bind', 'call', and 'apply' methods on functions."),Using_compiler_options_of_project_reference_redirect_0:M(6215,3,"Using_compiler_options_of_project_reference_redirect_0_6215","Using compiler options of project reference redirect '{0}'."),Found_1_error:M(6216,3,"Found_1_error_6216","Found 1 error."),Found_0_errors:M(6217,3,"Found_0_errors_6217","Found {0} errors."),Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2:M(6218,3,"Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218","======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3:M(6219,3,"Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219","======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========"),package_json_had_a_falsy_0_field:M(6220,3,"package_json_had_a_falsy_0_field_6220","'package.json' had a falsy '{0}' field."),Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects:M(6221,3,"Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221","Disable use of source files instead of declaration files from referenced projects."),Emit_class_fields_with_Define_instead_of_Set:M(6222,3,"Emit_class_fields_with_Define_instead_of_Set_6222","Emit class fields with Define instead of Set."),Generates_a_CPU_profile:M(6223,3,"Generates_a_CPU_profile_6223","Generates a CPU profile."),Disable_solution_searching_for_this_project:M(6224,3,"Disable_solution_searching_for_this_project_6224","Disable solution searching for this project."),Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory:M(6225,3,"Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225","Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."),Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling:M(6226,3,"Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226","Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling'."),Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize:M(6227,3,"Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227","Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority', 'FixedChunkSize'."),Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3:M(6229,1,"Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229","Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."),Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line:M(6230,1,"Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230","Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."),Could_not_resolve_the_path_0_with_the_extensions_Colon_1:M(6231,1,"Could_not_resolve_the_path_0_with_the_extensions_Colon_1_6231","Could not resolve the path '{0}' with the extensions: {1}."),Declaration_augments_declaration_in_another_file_This_cannot_be_serialized:M(6232,1,"Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232","Declaration augments declaration in another file. This cannot be serialized."),This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file:M(6233,1,"This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233","This is the declaration being augmented. Consider moving the augmenting declaration into the same file."),This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without:M(6234,1,"This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without_6234","This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?"),Disable_loading_referenced_projects:M(6235,3,"Disable_loading_referenced_projects_6235","Disable loading referenced projects."),Arguments_for_the_rest_parameter_0_were_not_provided:M(6236,1,"Arguments_for_the_rest_parameter_0_were_not_provided_6236","Arguments for the rest parameter '{0}' were not provided."),Generates_an_event_trace_and_a_list_of_types:M(6237,3,"Generates_an_event_trace_and_a_list_of_types_6237","Generates an event trace and a list of types."),Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react:M(6238,1,"Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238","Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react"),File_0_exists_according_to_earlier_cached_lookups:M(6239,3,"File_0_exists_according_to_earlier_cached_lookups_6239","File '{0}' exists according to earlier cached lookups."),File_0_does_not_exist_according_to_earlier_cached_lookups:M(6240,3,"File_0_does_not_exist_according_to_earlier_cached_lookups_6240","File '{0}' does not exist according to earlier cached lookups."),Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1:M(6241,3,"Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241","Resolution for type reference directive '{0}' was found in cache from location '{1}'."),Resolving_type_reference_directive_0_containing_file_1:M(6242,3,"Resolving_type_reference_directive_0_containing_file_1_6242","======== Resolving type reference directive '{0}', containing file '{1}'. ========"),Interpret_optional_property_types_as_written_rather_than_adding_undefined:M(6243,3,"Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243","Interpret optional property types as written, rather than adding 'undefined'."),Modules:M(6244,3,"Modules_6244","Modules"),File_Management:M(6245,3,"File_Management_6245","File Management"),Emit:M(6246,3,"Emit_6246","Emit"),JavaScript_Support:M(6247,3,"JavaScript_Support_6247","JavaScript Support"),Type_Checking:M(6248,3,"Type_Checking_6248","Type Checking"),Editor_Support:M(6249,3,"Editor_Support_6249","Editor Support"),Watch_and_Build_Modes:M(6250,3,"Watch_and_Build_Modes_6250","Watch and Build Modes"),Compiler_Diagnostics:M(6251,3,"Compiler_Diagnostics_6251","Compiler Diagnostics"),Interop_Constraints:M(6252,3,"Interop_Constraints_6252","Interop Constraints"),Backwards_Compatibility:M(6253,3,"Backwards_Compatibility_6253","Backwards Compatibility"),Language_and_Environment:M(6254,3,"Language_and_Environment_6254","Language and Environment"),Projects:M(6255,3,"Projects_6255","Projects"),Output_Formatting:M(6256,3,"Output_Formatting_6256","Output Formatting"),Completeness:M(6257,3,"Completeness_6257","Completeness"),_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file:M(6258,1,"_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258","'{0}' should be set inside the 'compilerOptions' object of the config json file"),Found_1_error_in_0:M(6259,3,"Found_1_error_in_0_6259","Found 1 error in {0}"),Found_0_errors_in_the_same_file_starting_at_Colon_1:M(6260,3,"Found_0_errors_in_the_same_file_starting_at_Colon_1_6260","Found {0} errors in the same file, starting at: {1}"),Found_0_errors_in_1_files:M(6261,3,"Found_0_errors_in_1_files_6261","Found {0} errors in {1} files."),File_name_0_has_a_1_extension_looking_up_2_instead:M(6262,3,"File_name_0_has_a_1_extension_looking_up_2_instead_6262","File name '{0}' has a '{1}' extension - looking up '{2}' instead."),Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set:M(6263,1,"Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263","Module '{0}' was resolved to '{1}', but '--allowArbitraryExtensions' is not set."),Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present:M(6264,3,"Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present_6264","Enable importing files with any extension, provided a declaration file is present."),Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder:M(6265,3,"Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_no_6265","Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder."),Option_0_can_only_be_specified_on_command_line:M(6266,1,"Option_0_can_only_be_specified_on_command_line_6266","Option '{0}' can only be specified on command line."),Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve:M(6270,3,"Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270","Directory '{0}' has no containing package.json scope. Imports will not resolve."),Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1:M(6271,3,"Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271","Import specifier '{0}' does not exist in package.json scope at path '{1}'."),Invalid_import_specifier_0_has_no_possible_resolutions:M(6272,3,"Invalid_import_specifier_0_has_no_possible_resolutions_6272","Invalid import specifier '{0}' has no possible resolutions."),package_json_scope_0_has_no_imports_defined:M(6273,3,"package_json_scope_0_has_no_imports_defined_6273","package.json scope '{0}' has no imports defined."),package_json_scope_0_explicitly_maps_specifier_1_to_null:M(6274,3,"package_json_scope_0_explicitly_maps_specifier_1_to_null_6274","package.json scope '{0}' explicitly maps specifier '{1}' to null."),package_json_scope_0_has_invalid_type_for_target_of_specifier_1:M(6275,3,"package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275","package.json scope '{0}' has invalid type for target of specifier '{1}'"),Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1:M(6276,3,"Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276","Export specifier '{0}' does not exist in package.json scope at path '{1}'."),Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update:M(6277,3,"Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_i_6277","Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update."),There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings:M(6278,3,"There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278",`There are types at '{0}', but this result could not be resolved when respecting package.json "exports". The '{1}' library may need to update its package.json or typings.`),Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update:M(6279,3,"Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_ne_6279","Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update."),There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler:M(6280,3,"There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setti_6280","There are types at '{0}', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'."),package_json_has_a_peerDependencies_field:M(6281,3,"package_json_has_a_peerDependencies_field_6281","'package.json' has a 'peerDependencies' field."),Found_peerDependency_0_with_1_version:M(6282,3,"Found_peerDependency_0_with_1_version_6282","Found peerDependency '{0}' with '{1}' version."),Failed_to_find_peerDependency_0:M(6283,3,"Failed_to_find_peerDependency_0_6283","Failed to find peerDependency '{0}'."),Enable_project_compilation:M(6302,3,"Enable_project_compilation_6302","Enable project compilation"),Composite_projects_may_not_disable_declaration_emit:M(6304,1,"Composite_projects_may_not_disable_declaration_emit_6304","Composite projects may not disable declaration emit."),Output_file_0_has_not_been_built_from_source_file_1:M(6305,1,"Output_file_0_has_not_been_built_from_source_file_1_6305","Output file '{0}' has not been built from source file '{1}'."),Referenced_project_0_must_have_setting_composite_Colon_true:M(6306,1,"Referenced_project_0_must_have_setting_composite_Colon_true_6306",`Referenced project '{0}' must have setting "composite": true.`),File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern:M(6307,1,"File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307","File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."),Referenced_project_0_may_not_disable_emit:M(6310,1,"Referenced_project_0_may_not_disable_emit_6310","Referenced project '{0}' may not disable emit."),Project_0_is_out_of_date_because_output_1_is_older_than_input_2:M(6350,3,"Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350","Project '{0}' is out of date because output '{1}' is older than input '{2}'"),Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2:M(6351,3,"Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351","Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"),Project_0_is_out_of_date_because_output_file_1_does_not_exist:M(6352,3,"Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352","Project '{0}' is out of date because output file '{1}' does not exist"),Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date:M(6353,3,"Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353","Project '{0}' is out of date because its dependency '{1}' is out of date"),Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies:M(6354,3,"Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354","Project '{0}' is up to date with .d.ts files from its dependencies"),Projects_in_this_build_Colon_0:M(6355,3,"Projects_in_this_build_Colon_0_6355","Projects in this build: {0}"),A_non_dry_build_would_delete_the_following_files_Colon_0:M(6356,3,"A_non_dry_build_would_delete_the_following_files_Colon_0_6356","A non-dry build would delete the following files: {0}"),A_non_dry_build_would_build_project_0:M(6357,3,"A_non_dry_build_would_build_project_0_6357","A non-dry build would build project '{0}'"),Building_project_0:M(6358,3,"Building_project_0_6358","Building project '{0}'..."),Updating_output_timestamps_of_project_0:M(6359,3,"Updating_output_timestamps_of_project_0_6359","Updating output timestamps of project '{0}'..."),Project_0_is_up_to_date:M(6361,3,"Project_0_is_up_to_date_6361","Project '{0}' is up to date"),Skipping_build_of_project_0_because_its_dependency_1_has_errors:M(6362,3,"Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362","Skipping build of project '{0}' because its dependency '{1}' has errors"),Project_0_can_t_be_built_because_its_dependency_1_has_errors:M(6363,3,"Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363","Project '{0}' can't be built because its dependency '{1}' has errors"),Build_one_or_more_projects_and_their_dependencies_if_out_of_date:M(6364,3,"Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364","Build one or more projects and their dependencies, if out of date"),Delete_the_outputs_of_all_projects:M(6365,3,"Delete_the_outputs_of_all_projects_6365","Delete the outputs of all projects."),Show_what_would_be_built_or_deleted_if_specified_with_clean:M(6367,3,"Show_what_would_be_built_or_deleted_if_specified_with_clean_6367","Show what would be built (or deleted, if specified with '--clean')"),Option_build_must_be_the_first_command_line_argument:M(6369,1,"Option_build_must_be_the_first_command_line_argument_6369","Option '--build' must be the first command line argument."),Options_0_and_1_cannot_be_combined:M(6370,1,"Options_0_and_1_cannot_be_combined_6370","Options '{0}' and '{1}' cannot be combined."),Updating_unchanged_output_timestamps_of_project_0:M(6371,3,"Updating_unchanged_output_timestamps_of_project_0_6371","Updating unchanged output timestamps of project '{0}'..."),A_non_dry_build_would_update_timestamps_for_output_of_project_0:M(6374,3,"A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374","A non-dry build would update timestamps for output of project '{0}'"),Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1:M(6377,1,"Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377","Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"),Composite_projects_may_not_disable_incremental_compilation:M(6379,1,"Composite_projects_may_not_disable_incremental_compilation_6379","Composite projects may not disable incremental compilation."),Specify_file_to_store_incremental_compilation_information:M(6380,3,"Specify_file_to_store_incremental_compilation_information_6380","Specify file to store incremental compilation information"),Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2:M(6381,3,"Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381","Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"),Skipping_build_of_project_0_because_its_dependency_1_was_not_built:M(6382,3,"Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382","Skipping build of project '{0}' because its dependency '{1}' was not built"),Project_0_can_t_be_built_because_its_dependency_1_was_not_built:M(6383,3,"Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383","Project '{0}' can't be built because its dependency '{1}' was not built"),Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it:M(6384,3,"Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384","Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."),_0_is_deprecated:M(6385,2,"_0_is_deprecated_6385","'{0}' is deprecated.",void 0,void 0,!0),Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found:M(6386,3,"Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386","Performance timings for '--diagnostics' or '--extendedDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found."),The_signature_0_of_1_is_deprecated:M(6387,2,"The_signature_0_of_1_is_deprecated_6387","The signature '{0}' of '{1}' is deprecated.",void 0,void 0,!0),Project_0_is_being_forcibly_rebuilt:M(6388,3,"Project_0_is_being_forcibly_rebuilt_6388","Project '{0}' is being forcibly rebuilt"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved:M(6389,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389","Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2:M(6390,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:M(6391,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved:M(6392,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:M(6393,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:M(6394,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:M(6395,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:M(6396,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:M(6397,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:M(6398,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted:M(6399,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399","Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"),Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files:M(6400,3,"Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400","Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"),Project_0_is_out_of_date_because_there_was_error_reading_file_1:M(6401,3,"Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401","Project '{0}' is out of date because there was error reading file '{1}'"),Resolving_in_0_mode_with_conditions_1:M(6402,3,"Resolving_in_0_mode_with_conditions_1_6402","Resolving in {0} mode with conditions {1}."),Matched_0_condition_1:M(6403,3,"Matched_0_condition_1_6403","Matched '{0}' condition '{1}'."),Using_0_subpath_1_with_target_2:M(6404,3,"Using_0_subpath_1_with_target_2_6404","Using '{0}' subpath '{1}' with target '{2}'."),Saw_non_matching_condition_0:M(6405,3,"Saw_non_matching_condition_0_6405","Saw non-matching condition '{0}'."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions:M(6406,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406","Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"),Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set:M(6407,3,"Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noE_6407","Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set."),Use_the_package_json_exports_field_when_resolving_package_imports:M(6408,3,"Use_the_package_json_exports_field_when_resolving_package_imports_6408","Use the package.json 'exports' field when resolving package imports."),Use_the_package_json_imports_field_when_resolving_imports:M(6409,3,"Use_the_package_json_imports_field_when_resolving_imports_6409","Use the package.json 'imports' field when resolving imports."),Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports:M(6410,3,"Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports_6410","Conditions to set in addition to the resolver-specific defaults when resolving imports."),true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false:M(6411,3,"true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false_6411","`true` when 'moduleResolution' is 'node16', 'nodenext', or 'bundler'; otherwise `false`."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more:M(6412,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_6412","Project '{0}' is out of date because buildinfo file '{1}' indicates that file '{2}' was root file of compilation but not any more."),Entering_conditional_exports:M(6413,3,"Entering_conditional_exports_6413","Entering conditional exports."),Resolved_under_condition_0:M(6414,3,"Resolved_under_condition_0_6414","Resolved under condition '{0}'."),Failed_to_resolve_under_condition_0:M(6415,3,"Failed_to_resolve_under_condition_0_6415","Failed to resolve under condition '{0}'."),Exiting_conditional_exports:M(6416,3,"Exiting_conditional_exports_6416","Exiting conditional exports."),Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0:M(6417,3,"Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417","Searching all ancestor node_modules directories for preferred extensions: {0}."),Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0:M(6418,3,"Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418","Searching all ancestor node_modules directories for fallback extensions: {0}."),The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1:M(6500,3,"The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500","The expected type comes from property '{0}' which is declared here on type '{1}'"),The_expected_type_comes_from_this_index_signature:M(6501,3,"The_expected_type_comes_from_this_index_signature_6501","The expected type comes from this index signature."),The_expected_type_comes_from_the_return_type_of_this_signature:M(6502,3,"The_expected_type_comes_from_the_return_type_of_this_signature_6502","The expected type comes from the return type of this signature."),Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing:M(6503,3,"Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503","Print names of files that are part of the compilation and then stop processing."),File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option:M(6504,1,"File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504","File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"),Print_names_of_files_and_the_reason_they_are_part_of_the_compilation:M(6505,3,"Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505","Print names of files and the reason they are part of the compilation."),Consider_adding_a_declare_modifier_to_this_class:M(6506,3,"Consider_adding_a_declare_modifier_to_this_class_6506","Consider adding a 'declare' modifier to this class."),Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files:M(6600,3,"Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600","Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files."),Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export:M(6601,3,"Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601","Allow 'import x from y' when a module doesn't have a default export."),Allow_accessing_UMD_globals_from_modules:M(6602,3,"Allow_accessing_UMD_globals_from_modules_6602","Allow accessing UMD globals from modules."),Disable_error_reporting_for_unreachable_code:M(6603,3,"Disable_error_reporting_for_unreachable_code_6603","Disable error reporting for unreachable code."),Disable_error_reporting_for_unused_labels:M(6604,3,"Disable_error_reporting_for_unused_labels_6604","Disable error reporting for unused labels."),Ensure_use_strict_is_always_emitted:M(6605,3,"Ensure_use_strict_is_always_emitted_6605","Ensure 'use strict' is always emitted."),Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it:M(6606,3,"Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606","Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."),Specify_the_base_directory_to_resolve_non_relative_module_names:M(6607,3,"Specify_the_base_directory_to_resolve_non_relative_module_names_6607","Specify the base directory to resolve non-relative module names."),No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files:M(6608,3,"No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608","No longer supported. In early versions, manually set the text encoding for reading files."),Enable_error_reporting_in_type_checked_JavaScript_files:M(6609,3,"Enable_error_reporting_in_type_checked_JavaScript_files_6609","Enable error reporting in type-checked JavaScript files."),Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references:M(6611,3,"Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611","Enable constraints that allow a TypeScript project to be used with project references."),Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project:M(6612,3,"Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612","Generate .d.ts files from TypeScript and JavaScript files in your project."),Specify_the_output_directory_for_generated_declaration_files:M(6613,3,"Specify_the_output_directory_for_generated_declaration_files_6613","Specify the output directory for generated declaration files."),Create_sourcemaps_for_d_ts_files:M(6614,3,"Create_sourcemaps_for_d_ts_files_6614","Create sourcemaps for d.ts files."),Output_compiler_performance_information_after_building:M(6615,3,"Output_compiler_performance_information_after_building_6615","Output compiler performance information after building."),Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project:M(6616,3,"Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616","Disables inference for type acquisition by looking at filenames in a project."),Reduce_the_number_of_projects_loaded_automatically_by_TypeScript:M(6617,3,"Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617","Reduce the number of projects loaded automatically by TypeScript."),Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server:M(6618,3,"Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618","Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."),Opt_a_project_out_of_multi_project_reference_checking_when_editing:M(6619,3,"Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619","Opt a project out of multi-project reference checking when editing."),Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects:M(6620,3,"Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620","Disable preferring source files instead of declaration files when referencing composite projects."),Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration:M(6621,3,"Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621","Emit more compliant, but verbose and less performant JavaScript for iteration."),Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files:M(6622,3,"Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622","Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."),Only_output_d_ts_files_and_not_JavaScript_files:M(6623,3,"Only_output_d_ts_files_and_not_JavaScript_files_6623","Only output d.ts files and not JavaScript files."),Emit_design_type_metadata_for_decorated_declarations_in_source_files:M(6624,3,"Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624","Emit design-type metadata for decorated declarations in source files."),Disable_the_type_acquisition_for_JavaScript_projects:M(6625,3,"Disable_the_type_acquisition_for_JavaScript_projects_6625","Disable the type acquisition for JavaScript projects"),Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility:M(6626,3,"Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626","Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."),Filters_results_from_the_include_option:M(6627,3,"Filters_results_from_the_include_option_6627","Filters results from the `include` option."),Remove_a_list_of_directories_from_the_watch_process:M(6628,3,"Remove_a_list_of_directories_from_the_watch_process_6628","Remove a list of directories from the watch process."),Remove_a_list_of_files_from_the_watch_mode_s_processing:M(6629,3,"Remove_a_list_of_files_from_the_watch_mode_s_processing_6629","Remove a list of files from the watch mode's processing."),Enable_experimental_support_for_legacy_experimental_decorators:M(6630,3,"Enable_experimental_support_for_legacy_experimental_decorators_6630","Enable experimental support for legacy experimental decorators."),Print_files_read_during_the_compilation_including_why_it_was_included:M(6631,3,"Print_files_read_during_the_compilation_including_why_it_was_included_6631","Print files read during the compilation including why it was included."),Output_more_detailed_compiler_performance_information_after_building:M(6632,3,"Output_more_detailed_compiler_performance_information_after_building_6632","Output more detailed compiler performance information after building."),Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited:M(6633,3,"Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633","Specify one or more path or node module references to base configuration files from which settings are inherited."),Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers:M(6634,3,"Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634","Specify what approach the watcher should use if the system runs out of native file watchers."),Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include:M(6635,3,"Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635","Include a list of files. This does not support glob patterns, as opposed to `include`."),Build_all_projects_including_those_that_appear_to_be_up_to_date:M(6636,3,"Build_all_projects_including_those_that_appear_to_be_up_to_date_6636","Build all projects, including those that appear to be up to date."),Ensure_that_casing_is_correct_in_imports:M(6637,3,"Ensure_that_casing_is_correct_in_imports_6637","Ensure that casing is correct in imports."),Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging:M(6638,3,"Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638","Emit a v8 CPU profile of the compiler run for debugging."),Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file:M(6639,3,"Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639","Allow importing helper functions from tslib once per project, instead of including them per-file."),Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation:M(6641,3,"Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641","Specify a list of glob patterns that match files to be included in compilation."),Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects:M(6642,3,"Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642","Save .tsbuildinfo files to allow for incremental compilation of projects."),Include_sourcemap_files_inside_the_emitted_JavaScript:M(6643,3,"Include_sourcemap_files_inside_the_emitted_JavaScript_6643","Include sourcemap files inside the emitted JavaScript."),Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript:M(6644,3,"Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644","Include source code in the sourcemaps inside the emitted JavaScript."),Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports:M(6645,3,"Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645","Ensure that each file can be safely transpiled without relying on other imports."),Specify_what_JSX_code_is_generated:M(6646,3,"Specify_what_JSX_code_is_generated_6646","Specify what JSX code is generated."),Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h:M(6647,3,"Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647","Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."),Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment:M(6648,3,"Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648","Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."),Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk:M(6649,3,"Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649","Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."),Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option:M(6650,3,"Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650","Make keyof only return strings instead of string, numbers or symbols. Legacy option."),Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment:M(6651,3,"Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651","Specify a set of bundled library declaration files that describe the target runtime environment."),Print_the_names_of_emitted_files_after_a_compilation:M(6652,3,"Print_the_names_of_emitted_files_after_a_compilation_6652","Print the names of emitted files after a compilation."),Print_all_of_the_files_read_during_the_compilation:M(6653,3,"Print_all_of_the_files_read_during_the_compilation_6653","Print all of the files read during the compilation."),Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit:M(6654,3,"Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654","Set the language of the messaging from TypeScript. This does not affect emit."),Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations:M(6655,3,"Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655","Specify the location where debugger should locate map files instead of generated locations."),Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs:M(6656,3,"Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656","Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."),Specify_what_module_code_is_generated:M(6657,3,"Specify_what_module_code_is_generated_6657","Specify what module code is generated."),Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier:M(6658,3,"Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658","Specify how TypeScript looks up a file from a given module specifier."),Set_the_newline_character_for_emitting_files:M(6659,3,"Set_the_newline_character_for_emitting_files_6659","Set the newline character for emitting files."),Disable_emitting_files_from_a_compilation:M(6660,3,"Disable_emitting_files_from_a_compilation_6660","Disable emitting files from a compilation."),Disable_generating_custom_helper_functions_like_extends_in_compiled_output:M(6661,3,"Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661","Disable generating custom helper functions like '__extends' in compiled output."),Disable_emitting_files_if_any_type_checking_errors_are_reported:M(6662,3,"Disable_emitting_files_if_any_type_checking_errors_are_reported_6662","Disable emitting files if any type checking errors are reported."),Disable_truncating_types_in_error_messages:M(6663,3,"Disable_truncating_types_in_error_messages_6663","Disable truncating types in error messages."),Enable_error_reporting_for_fallthrough_cases_in_switch_statements:M(6664,3,"Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664","Enable error reporting for fallthrough cases in switch statements."),Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type:M(6665,3,"Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665","Enable error reporting for expressions and declarations with an implied 'any' type."),Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier:M(6666,3,"Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666","Ensure overriding members in derived classes are marked with an override modifier."),Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function:M(6667,3,"Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667","Enable error reporting for codepaths that do not explicitly return in a function."),Enable_error_reporting_when_this_is_given_the_type_any:M(6668,3,"Enable_error_reporting_when_this_is_given_the_type_any_6668","Enable error reporting when 'this' is given the type 'any'."),Disable_adding_use_strict_directives_in_emitted_JavaScript_files:M(6669,3,"Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669","Disable adding 'use strict' directives in emitted JavaScript files."),Disable_including_any_library_files_including_the_default_lib_d_ts:M(6670,3,"Disable_including_any_library_files_including_the_default_lib_d_ts_6670","Disable including any library files, including the default lib.d.ts."),Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type:M(6671,3,"Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671","Enforces using indexed accessors for keys declared using an indexed type."),Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project:M(6672,3,"Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672","Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project."),Disable_strict_checking_of_generic_signatures_in_function_types:M(6673,3,"Disable_strict_checking_of_generic_signatures_in_function_types_6673","Disable strict checking of generic signatures in function types."),Add_undefined_to_a_type_when_accessed_using_an_index:M(6674,3,"Add_undefined_to_a_type_when_accessed_using_an_index_6674","Add 'undefined' to a type when accessed using an index."),Enable_error_reporting_when_local_variables_aren_t_read:M(6675,3,"Enable_error_reporting_when_local_variables_aren_t_read_6675","Enable error reporting when local variables aren't read."),Raise_an_error_when_a_function_parameter_isn_t_read:M(6676,3,"Raise_an_error_when_a_function_parameter_isn_t_read_6676","Raise an error when a function parameter isn't read."),Deprecated_setting_Use_outFile_instead:M(6677,3,"Deprecated_setting_Use_outFile_instead_6677","Deprecated setting. Use 'outFile' instead."),Specify_an_output_folder_for_all_emitted_files:M(6678,3,"Specify_an_output_folder_for_all_emitted_files_6678","Specify an output folder for all emitted files."),Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output:M(6679,3,"Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679","Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."),Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations:M(6680,3,"Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680","Specify a set of entries that re-map imports to additional lookup locations."),Specify_a_list_of_language_service_plugins_to_include:M(6681,3,"Specify_a_list_of_language_service_plugins_to_include_6681","Specify a list of language service plugins to include."),Disable_erasing_const_enum_declarations_in_generated_code:M(6682,3,"Disable_erasing_const_enum_declarations_in_generated_code_6682","Disable erasing 'const enum' declarations in generated code."),Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node:M(6683,3,"Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683","Disable resolving symlinks to their realpath. This correlates to the same flag in node."),Disable_wiping_the_console_in_watch_mode:M(6684,3,"Disable_wiping_the_console_in_watch_mode_6684","Disable wiping the console in watch mode."),Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read:M(6685,3,"Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685","Enable color and formatting in TypeScript's output to make compiler errors easier to read."),Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit:M(6686,3,"Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686","Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."),Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references:M(6687,3,"Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687","Specify an array of objects that specify paths for projects. Used in project references."),Disable_emitting_comments:M(6688,3,"Disable_emitting_comments_6688","Disable emitting comments."),Enable_importing_json_files:M(6689,3,"Enable_importing_json_files_6689","Enable importing .json files."),Specify_the_root_folder_within_your_source_files:M(6690,3,"Specify_the_root_folder_within_your_source_files_6690","Specify the root folder within your source files."),Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules:M(6691,3,"Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691","Allow multiple folders to be treated as one when resolving modules."),Skip_type_checking_d_ts_files_that_are_included_with_TypeScript:M(6692,3,"Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692","Skip type checking .d.ts files that are included with TypeScript."),Skip_type_checking_all_d_ts_files:M(6693,3,"Skip_type_checking_all_d_ts_files_6693","Skip type checking all .d.ts files."),Create_source_map_files_for_emitted_JavaScript_files:M(6694,3,"Create_source_map_files_for_emitted_JavaScript_files_6694","Create source map files for emitted JavaScript files."),Specify_the_root_path_for_debuggers_to_find_the_reference_source_code:M(6695,3,"Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695","Specify the root path for debuggers to find the reference source code."),Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function:M(6697,3,"Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697","Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."),When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible:M(6698,3,"When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698","When assigning functions, check to ensure parameters and the return values are subtype-compatible."),When_type_checking_take_into_account_null_and_undefined:M(6699,3,"When_type_checking_take_into_account_null_and_undefined_6699","When type checking, take into account 'null' and 'undefined'."),Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor:M(6700,3,"Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700","Check for class properties that are declared but not set in the constructor."),Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments:M(6701,3,"Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701","Disable emitting declarations that have '@internal' in their JSDoc comments."),Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals:M(6702,3,"Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702","Disable reporting of excess property errors during the creation of object literals."),Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures:M(6703,3,"Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703","Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."),Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively:M(6704,3,"Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704","Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."),Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations:M(6705,3,"Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705","Set the JavaScript language version for emitted JavaScript and include compatible library declarations."),Log_paths_used_during_the_moduleResolution_process:M(6706,3,"Log_paths_used_during_the_moduleResolution_process_6706","Log paths used during the 'moduleResolution' process."),Specify_the_path_to_tsbuildinfo_incremental_compilation_file:M(6707,3,"Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707","Specify the path to .tsbuildinfo incremental compilation file."),Specify_options_for_automatic_acquisition_of_declaration_files:M(6709,3,"Specify_options_for_automatic_acquisition_of_declaration_files_6709","Specify options for automatic acquisition of declaration files."),Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types:M(6710,3,"Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710","Specify multiple folders that act like './node_modules/@types'."),Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file:M(6711,3,"Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711","Specify type package names to be included without being referenced in a source file."),Emit_ECMAScript_standard_compliant_class_fields:M(6712,3,"Emit_ECMAScript_standard_compliant_class_fields_6712","Emit ECMAScript-standard-compliant class fields."),Enable_verbose_logging:M(6713,3,"Enable_verbose_logging_6713","Enable verbose logging."),Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality:M(6714,3,"Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714","Specify how directories are watched on systems that lack recursive file-watching functionality."),Specify_how_the_TypeScript_watch_mode_works:M(6715,3,"Specify_how_the_TypeScript_watch_mode_works_6715","Specify how the TypeScript watch mode works."),Require_undeclared_properties_from_index_signatures_to_use_element_accesses:M(6717,3,"Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717","Require undeclared properties from index signatures to use element accesses."),Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types:M(6718,3,"Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718","Specify emit/checking behavior for imports that are only used for types."),Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files:M(6719,3,"Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files_6719","Require sufficient annotation on exports so other tools can trivially generate declaration files."),Default_catch_clause_variables_as_unknown_instead_of_any:M(6803,3,"Default_catch_clause_variables_as_unknown_instead_of_any_6803","Default catch clause variables as 'unknown' instead of 'any'."),Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting:M(6804,3,"Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804","Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."),Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported:M(6805,3,"Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported_6805","Disable full type checking (only critical parse and emit errors will be reported)."),one_of_Colon:M(6900,3,"one_of_Colon_6900","one of:"),one_or_more_Colon:M(6901,3,"one_or_more_Colon_6901","one or more:"),type_Colon:M(6902,3,"type_Colon_6902","type:"),default_Colon:M(6903,3,"default_Colon_6903","default:"),module_system_or_esModuleInterop:M(6904,3,"module_system_or_esModuleInterop_6904",'module === "system" or esModuleInterop'),false_unless_strict_is_set:M(6905,3,"false_unless_strict_is_set_6905","`false`, unless `strict` is set"),false_unless_composite_is_set:M(6906,3,"false_unless_composite_is_set_6906","`false`, unless `composite` is set"),node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified:M(6907,3,"node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907",'`["node_modules", "bower_components", "jspm_packages"]`, plus the value of `outDir` if one is specified.'),if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk:M(6908,3,"if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908",'`[]` if `files` is specified, otherwise `["**/*"]`'),true_if_composite_false_otherwise:M(6909,3,"true_if_composite_false_otherwise_6909","`true` if `composite`, `false` otherwise"),module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node:M(69010,3,"module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010","module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"),Computed_from_the_list_of_input_files:M(6911,3,"Computed_from_the_list_of_input_files_6911","Computed from the list of input files"),Platform_specific:M(6912,3,"Platform_specific_6912","Platform specific"),You_can_learn_about_all_of_the_compiler_options_at_0:M(6913,3,"You_can_learn_about_all_of_the_compiler_options_at_0_6913","You can learn about all of the compiler options at {0}"),Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon:M(6914,3,"Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914","Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"),Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0:M(6915,3,"Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915","Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"),COMMON_COMMANDS:M(6916,3,"COMMON_COMMANDS_6916","COMMON COMMANDS"),ALL_COMPILER_OPTIONS:M(6917,3,"ALL_COMPILER_OPTIONS_6917","ALL COMPILER OPTIONS"),WATCH_OPTIONS:M(6918,3,"WATCH_OPTIONS_6918","WATCH OPTIONS"),BUILD_OPTIONS:M(6919,3,"BUILD_OPTIONS_6919","BUILD OPTIONS"),COMMON_COMPILER_OPTIONS:M(6920,3,"COMMON_COMPILER_OPTIONS_6920","COMMON COMPILER OPTIONS"),COMMAND_LINE_FLAGS:M(6921,3,"COMMAND_LINE_FLAGS_6921","COMMAND LINE FLAGS"),tsc_Colon_The_TypeScript_Compiler:M(6922,3,"tsc_Colon_The_TypeScript_Compiler_6922","tsc: The TypeScript Compiler"),Compiles_the_current_project_tsconfig_json_in_the_working_directory:M(6923,3,"Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923","Compiles the current project (tsconfig.json in the working directory.)"),Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options:M(6924,3,"Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924","Ignoring tsconfig.json, compiles the specified files with default compiler options."),Build_a_composite_project_in_the_working_directory:M(6925,3,"Build_a_composite_project_in_the_working_directory_6925","Build a composite project in the working directory."),Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory:M(6926,3,"Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926","Creates a tsconfig.json with the recommended settings in the working directory."),Compiles_the_TypeScript_project_located_at_the_specified_path:M(6927,3,"Compiles_the_TypeScript_project_located_at_the_specified_path_6927","Compiles the TypeScript project located at the specified path."),An_expanded_version_of_this_information_showing_all_possible_compiler_options:M(6928,3,"An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928","An expanded version of this information, showing all possible compiler options"),Compiles_the_current_project_with_additional_settings:M(6929,3,"Compiles_the_current_project_with_additional_settings_6929","Compiles the current project, with additional settings."),true_for_ES2022_and_above_including_ESNext:M(6930,3,"true_for_ES2022_and_above_including_ESNext_6930","`true` for ES2022 and above, including ESNext."),List_of_file_name_suffixes_to_search_when_resolving_a_module:M(6931,1,"List_of_file_name_suffixes_to_search_when_resolving_a_module_6931","List of file name suffixes to search when resolving a module."),Variable_0_implicitly_has_an_1_type:M(7005,1,"Variable_0_implicitly_has_an_1_type_7005","Variable '{0}' implicitly has an '{1}' type."),Parameter_0_implicitly_has_an_1_type:M(7006,1,"Parameter_0_implicitly_has_an_1_type_7006","Parameter '{0}' implicitly has an '{1}' type."),Member_0_implicitly_has_an_1_type:M(7008,1,"Member_0_implicitly_has_an_1_type_7008","Member '{0}' implicitly has an '{1}' type."),new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type:M(7009,1,"new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009","'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:M(7010,1,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010","'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."),Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:M(7011,1,"Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011","Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."),This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation:M(7012,1,"This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012","This overload implicitly returns the type '{0}' because it lacks a return type annotation."),Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:M(7013,1,"Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013","Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."),Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:M(7014,1,"Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014","Function type, which lacks return-type annotation, implicitly has an '{0}' return type."),Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number:M(7015,1,"Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015","Element implicitly has an 'any' type because index expression is not of type 'number'."),Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type:M(7016,1,"Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016","Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature:M(7017,1,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017","Element implicitly has an 'any' type because type '{0}' has no index signature."),Object_literal_s_property_0_implicitly_has_an_1_type:M(7018,1,"Object_literal_s_property_0_implicitly_has_an_1_type_7018","Object literal's property '{0}' implicitly has an '{1}' type."),Rest_parameter_0_implicitly_has_an_any_type:M(7019,1,"Rest_parameter_0_implicitly_has_an_any_type_7019","Rest parameter '{0}' implicitly has an 'any[]' type."),Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:M(7020,1,"Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020","Call signature, which lacks return-type annotation, implicitly has an 'any' return type."),_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer:M(7022,1,"_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022","'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."),_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:M(7023,1,"_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023","'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:M(7024,1,"Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024","Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation:M(7025,1,"Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025","Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation."),JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists:M(7026,1,"JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026","JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."),Unreachable_code_detected:M(7027,1,"Unreachable_code_detected_7027","Unreachable code detected.",!0),Unused_label:M(7028,1,"Unused_label_7028","Unused label.",!0),Fallthrough_case_in_switch:M(7029,1,"Fallthrough_case_in_switch_7029","Fallthrough case in switch."),Not_all_code_paths_return_a_value:M(7030,1,"Not_all_code_paths_return_a_value_7030","Not all code paths return a value."),Binding_element_0_implicitly_has_an_1_type:M(7031,1,"Binding_element_0_implicitly_has_an_1_type_7031","Binding element '{0}' implicitly has an '{1}' type."),Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation:M(7032,1,"Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032","Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."),Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation:M(7033,1,"Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033","Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."),Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined:M(7034,1,"Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034","Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."),Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0:M(7035,1,"Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035","Try `npm i --save-dev @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"),Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0:M(7036,1,"Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036","Dynamic import's specifier must be of type 'string', but here has type '{0}'."),Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports:M(7037,3,"Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037","Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."),Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead:M(7038,3,"Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038","Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."),Mapped_object_type_implicitly_has_an_any_template_type:M(7039,1,"Mapped_object_type_implicitly_has_an_any_template_type_7039","Mapped object type implicitly has an 'any' template type."),If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1:M(7040,1,"If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040","If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}'"),The_containing_arrow_function_captures_the_global_value_of_this:M(7041,1,"The_containing_arrow_function_captures_the_global_value_of_this_7041","The containing arrow function captures the global value of 'this'."),Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used:M(7042,1,"Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042","Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."),Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:M(7043,2,"Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043","Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:M(7044,2,"Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044","Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:M(7045,2,"Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045","Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage:M(7046,2,"Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046","Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."),Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:M(7047,2,"Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047","Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage:M(7048,2,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048","Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage:M(7049,2,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049","Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."),_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage:M(7050,2,"_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050","'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."),Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1:M(7051,1,"Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051","Parameter has a name but no type. Did you mean '{0}: {1}'?"),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1:M(7052,1,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052","Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?"),Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1:M(7053,1,"Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053","Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."),No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1:M(7054,1,"No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054","No index signature with a parameter of type '{0}' was found on type '{1}'."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type:M(7055,1,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055","'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."),The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed:M(7056,1,"The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056","The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed."),yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation:M(7057,1,"yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057","'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."),If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1:M(7058,1,"If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058","If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead:M(7059,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059","This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint:M(7060,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060","This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."),A_mapped_type_may_not_declare_properties_or_methods:M(7061,1,"A_mapped_type_may_not_declare_properties_or_methods_7061","A mapped type may not declare properties or methods."),You_cannot_rename_this_element:M(8e3,1,"You_cannot_rename_this_element_8000","You cannot rename this element."),You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library:M(8001,1,"You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001","You cannot rename elements that are defined in the standard TypeScript library."),import_can_only_be_used_in_TypeScript_files:M(8002,1,"import_can_only_be_used_in_TypeScript_files_8002","'import ... =' can only be used in TypeScript files."),export_can_only_be_used_in_TypeScript_files:M(8003,1,"export_can_only_be_used_in_TypeScript_files_8003","'export =' can only be used in TypeScript files."),Type_parameter_declarations_can_only_be_used_in_TypeScript_files:M(8004,1,"Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004","Type parameter declarations can only be used in TypeScript files."),implements_clauses_can_only_be_used_in_TypeScript_files:M(8005,1,"implements_clauses_can_only_be_used_in_TypeScript_files_8005","'implements' clauses can only be used in TypeScript files."),_0_declarations_can_only_be_used_in_TypeScript_files:M(8006,1,"_0_declarations_can_only_be_used_in_TypeScript_files_8006","'{0}' declarations can only be used in TypeScript files."),Type_aliases_can_only_be_used_in_TypeScript_files:M(8008,1,"Type_aliases_can_only_be_used_in_TypeScript_files_8008","Type aliases can only be used in TypeScript files."),The_0_modifier_can_only_be_used_in_TypeScript_files:M(8009,1,"The_0_modifier_can_only_be_used_in_TypeScript_files_8009","The '{0}' modifier can only be used in TypeScript files."),Type_annotations_can_only_be_used_in_TypeScript_files:M(8010,1,"Type_annotations_can_only_be_used_in_TypeScript_files_8010","Type annotations can only be used in TypeScript files."),Type_arguments_can_only_be_used_in_TypeScript_files:M(8011,1,"Type_arguments_can_only_be_used_in_TypeScript_files_8011","Type arguments can only be used in TypeScript files."),Parameter_modifiers_can_only_be_used_in_TypeScript_files:M(8012,1,"Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012","Parameter modifiers can only be used in TypeScript files."),Non_null_assertions_can_only_be_used_in_TypeScript_files:M(8013,1,"Non_null_assertions_can_only_be_used_in_TypeScript_files_8013","Non-null assertions can only be used in TypeScript files."),Type_assertion_expressions_can_only_be_used_in_TypeScript_files:M(8016,1,"Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016","Type assertion expressions can only be used in TypeScript files."),Signature_declarations_can_only_be_used_in_TypeScript_files:M(8017,1,"Signature_declarations_can_only_be_used_in_TypeScript_files_8017","Signature declarations can only be used in TypeScript files."),Report_errors_in_js_files:M(8019,3,"Report_errors_in_js_files_8019","Report errors in .js files."),JSDoc_types_can_only_be_used_inside_documentation_comments:M(8020,1,"JSDoc_types_can_only_be_used_inside_documentation_comments_8020","JSDoc types can only be used inside documentation comments."),JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags:M(8021,1,"JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021","JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."),JSDoc_0_is_not_attached_to_a_class:M(8022,1,"JSDoc_0_is_not_attached_to_a_class_8022","JSDoc '@{0}' is not attached to a class."),JSDoc_0_1_does_not_match_the_extends_2_clause:M(8023,1,"JSDoc_0_1_does_not_match_the_extends_2_clause_8023","JSDoc '@{0} {1}' does not match the 'extends {2}' clause."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name:M(8024,1,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024","JSDoc '@param' tag has name '{0}', but there is no parameter with that name."),Class_declarations_cannot_have_more_than_one_augments_or_extends_tag:M(8025,1,"Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025","Class declarations cannot have more than one '@augments' or '@extends' tag."),Expected_0_type_arguments_provide_these_with_an_extends_tag:M(8026,1,"Expected_0_type_arguments_provide_these_with_an_extends_tag_8026","Expected {0} type arguments; provide these with an '@extends' tag."),Expected_0_1_type_arguments_provide_these_with_an_extends_tag:M(8027,1,"Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027","Expected {0}-{1} type arguments; provide these with an '@extends' tag."),JSDoc_may_only_appear_in_the_last_parameter_of_a_signature:M(8028,1,"JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028","JSDoc '...' may only appear in the last parameter of a signature."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type:M(8029,1,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029","JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."),The_type_of_a_function_declaration_must_match_the_function_s_signature:M(8030,1,"The_type_of_a_function_declaration_must_match_the_function_s_signature_8030","The type of a function declaration must match the function's signature."),You_cannot_rename_a_module_via_a_global_import:M(8031,1,"You_cannot_rename_a_module_via_a_global_import_8031","You cannot rename a module via a global import."),Qualified_name_0_is_not_allowed_without_a_leading_param_object_1:M(8032,1,"Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032","Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."),A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags:M(8033,1,"A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033","A JSDoc '@typedef' comment may not contain multiple '@type' tags."),The_tag_was_first_specified_here:M(8034,1,"The_tag_was_first_specified_here_8034","The tag was first specified here."),You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder:M(8035,1,"You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035","You cannot rename elements that are defined in a 'node_modules' folder."),You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder:M(8036,1,"You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036","You cannot rename elements that are defined in another 'node_modules' folder."),Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files:M(8037,1,"Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037","Type satisfaction expressions can only be used in TypeScript files."),Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export:M(8038,1,"Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export_8038","Decorators may not appear after 'export' or 'export default' if they also appear before 'export'."),A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag:M(8039,1,"A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag_8039","A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag"),Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit:M(9005,1,"Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005","Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."),Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit:M(9006,1,"Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006","Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."),Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations:M(9007,1,"Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9007","Function must have an explicit return type annotation with --isolatedDeclarations."),Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations:M(9008,1,"Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9008","Method must have an explicit return type annotation with --isolatedDeclarations."),At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations:M(9009,1,"At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9009","At least one accessor must have an explicit return type annotation with --isolatedDeclarations."),Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations:M(9010,1,"Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9010","Variable must have an explicit type annotation with --isolatedDeclarations."),Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations:M(9011,1,"Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9011","Parameter must have an explicit type annotation with --isolatedDeclarations."),Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations:M(9012,1,"Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9012","Property must have an explicit type annotation with --isolatedDeclarations."),Expression_type_can_t_be_inferred_with_isolatedDeclarations:M(9013,1,"Expression_type_can_t_be_inferred_with_isolatedDeclarations_9013","Expression type can't be inferred with --isolatedDeclarations."),Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations:M(9014,1,"Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedD_9014","Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations."),Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations:M(9015,1,"Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations_9015","Objects that contain spread assignments can't be inferred with --isolatedDeclarations."),Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations:M(9016,1,"Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations_9016","Objects that contain shorthand properties can't be inferred with --isolatedDeclarations."),Only_const_arrays_can_be_inferred_with_isolatedDeclarations:M(9017,1,"Only_const_arrays_can_be_inferred_with_isolatedDeclarations_9017","Only const arrays can be inferred with --isolatedDeclarations."),Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations:M(9018,1,"Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations_9018","Arrays with spread elements can't inferred with --isolatedDeclarations."),Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations:M(9019,1,"Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations_9019","Binding elements can't be exported directly with --isolatedDeclarations."),Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations:M(9020,1,"Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDecl_9020","Enum member initializers must be computable without references to external symbols with --isolatedDeclarations."),Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations:M(9021,1,"Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations_9021","Extends clause can't contain an expression with --isolatedDeclarations."),Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations:M(9022,1,"Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations_9022","Inference from class expressions is not supported with --isolatedDeclarations."),Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function:M(9023,1,"Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations__9023","Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function."),Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations:M(9025,1,"Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_su_9025","Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations."),Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations:M(9026,1,"Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_support_9026","Declaration emit for this file requires preserving this import for augmentations. This is not supported with --isolatedDeclarations."),Add_a_type_annotation_to_the_variable_0:M(9027,1,"Add_a_type_annotation_to_the_variable_0_9027","Add a type annotation to the variable {0}."),Add_a_type_annotation_to_the_parameter_0:M(9028,1,"Add_a_type_annotation_to_the_parameter_0_9028","Add a type annotation to the parameter {0}."),Add_a_type_annotation_to_the_property_0:M(9029,1,"Add_a_type_annotation_to_the_property_0_9029","Add a type annotation to the property {0}."),Add_a_return_type_to_the_function_expression:M(9030,1,"Add_a_return_type_to_the_function_expression_9030","Add a return type to the function expression."),Add_a_return_type_to_the_function_declaration:M(9031,1,"Add_a_return_type_to_the_function_declaration_9031","Add a return type to the function declaration."),Add_a_return_type_to_the_get_accessor_declaration:M(9032,1,"Add_a_return_type_to_the_get_accessor_declaration_9032","Add a return type to the get accessor declaration."),Add_a_type_to_parameter_of_the_set_accessor_declaration:M(9033,1,"Add_a_type_to_parameter_of_the_set_accessor_declaration_9033","Add a type to parameter of the set accessor declaration."),Add_a_return_type_to_the_method:M(9034,1,"Add_a_return_type_to_the_method_9034","Add a return type to the method"),Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit:M(9035,1,"Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit_9035","Add satisfies and a type assertion to this expression (satisfies T as T) to make the type explicit."),Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it:M(9036,1,"Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it_9036","Move the expression in default export to a variable and add a type annotation to it."),Default_exports_can_t_be_inferred_with_isolatedDeclarations:M(9037,1,"Default_exports_can_t_be_inferred_with_isolatedDeclarations_9037","Default exports can't be inferred with --isolatedDeclarations."),Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations:M(9038,1,"Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations_9038","Computed property names on class or object literals cannot be inferred with --isolatedDeclarations."),Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations:M(9039,1,"Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations_9039","Type containing private name '{0}' can't be used with --isolatedDeclarations."),JSX_attributes_must_only_be_assigned_a_non_empty_expression:M(17e3,1,"JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000","JSX attributes must only be assigned a non-empty 'expression'."),JSX_elements_cannot_have_multiple_attributes_with_the_same_name:M(17001,1,"JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001","JSX elements cannot have multiple attributes with the same name."),Expected_corresponding_JSX_closing_tag_for_0:M(17002,1,"Expected_corresponding_JSX_closing_tag_for_0_17002","Expected corresponding JSX closing tag for '{0}'."),Cannot_use_JSX_unless_the_jsx_flag_is_provided:M(17004,1,"Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004","Cannot use JSX unless the '--jsx' flag is provided."),A_constructor_cannot_contain_a_super_call_when_its_class_extends_null:M(17005,1,"A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005","A constructor cannot contain a 'super' call when its class extends 'null'."),An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:M(17006,1,"An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006","An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:M(17007,1,"A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007","A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),JSX_element_0_has_no_corresponding_closing_tag:M(17008,1,"JSX_element_0_has_no_corresponding_closing_tag_17008","JSX element '{0}' has no corresponding closing tag."),super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class:M(17009,1,"super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009","'super' must be called before accessing 'this' in the constructor of a derived class."),Unknown_type_acquisition_option_0:M(17010,1,"Unknown_type_acquisition_option_0_17010","Unknown type acquisition option '{0}'."),super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class:M(17011,1,"super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011","'super' must be called before accessing a property of 'super' in the constructor of a derived class."),_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2:M(17012,1,"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012","'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"),Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor:M(17013,1,"Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013","Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."),JSX_fragment_has_no_corresponding_closing_tag:M(17014,1,"JSX_fragment_has_no_corresponding_closing_tag_17014","JSX fragment has no corresponding closing tag."),Expected_corresponding_closing_tag_for_JSX_fragment:M(17015,1,"Expected_corresponding_closing_tag_for_JSX_fragment_17015","Expected corresponding closing tag for JSX fragment."),The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option:M(17016,1,"The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_com_17016","The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option."),An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments:M(17017,1,"An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017","An @jsxFrag pragma is required when using an @jsx pragma with JSX fragments."),Unknown_type_acquisition_option_0_Did_you_mean_1:M(17018,1,"Unknown_type_acquisition_option_0_Did_you_mean_1_17018","Unknown type acquisition option '{0}'. Did you mean '{1}'?"),_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:M(17019,1,"_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019","'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:M(17020,1,"_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020","'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),Unicode_escape_sequence_cannot_appear_here:M(17021,1,"Unicode_escape_sequence_cannot_appear_here_17021","Unicode escape sequence cannot appear here."),Circularity_detected_while_resolving_configuration_Colon_0:M(18e3,1,"Circularity_detected_while_resolving_configuration_Colon_0_18000","Circularity detected while resolving configuration: {0}"),The_files_list_in_config_file_0_is_empty:M(18002,1,"The_files_list_in_config_file_0_is_empty_18002","The 'files' list in config file '{0}' is empty."),No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2:M(18003,1,"No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003","No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."),File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module:M(80001,2,"File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001","File is a CommonJS module; it may be converted to an ES module."),This_constructor_function_may_be_converted_to_a_class_declaration:M(80002,2,"This_constructor_function_may_be_converted_to_a_class_declaration_80002","This constructor function may be converted to a class declaration."),Import_may_be_converted_to_a_default_import:M(80003,2,"Import_may_be_converted_to_a_default_import_80003","Import may be converted to a default import."),JSDoc_types_may_be_moved_to_TypeScript_types:M(80004,2,"JSDoc_types_may_be_moved_to_TypeScript_types_80004","JSDoc types may be moved to TypeScript types."),require_call_may_be_converted_to_an_import:M(80005,2,"require_call_may_be_converted_to_an_import_80005","'require' call may be converted to an import."),This_may_be_converted_to_an_async_function:M(80006,2,"This_may_be_converted_to_an_async_function_80006","This may be converted to an async function."),await_has_no_effect_on_the_type_of_this_expression:M(80007,2,"await_has_no_effect_on_the_type_of_this_expression_80007","'await' has no effect on the type of this expression."),Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers:M(80008,2,"Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008","Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers."),JSDoc_typedef_may_be_converted_to_TypeScript_type:M(80009,2,"JSDoc_typedef_may_be_converted_to_TypeScript_type_80009","JSDoc typedef may be converted to TypeScript type."),JSDoc_typedefs_may_be_converted_to_TypeScript_types:M(80010,2,"JSDoc_typedefs_may_be_converted_to_TypeScript_types_80010","JSDoc typedefs may be converted to TypeScript types."),Add_missing_super_call:M(90001,3,"Add_missing_super_call_90001","Add missing 'super()' call"),Make_super_call_the_first_statement_in_the_constructor:M(90002,3,"Make_super_call_the_first_statement_in_the_constructor_90002","Make 'super()' call the first statement in the constructor"),Change_extends_to_implements:M(90003,3,"Change_extends_to_implements_90003","Change 'extends' to 'implements'"),Remove_unused_declaration_for_Colon_0:M(90004,3,"Remove_unused_declaration_for_Colon_0_90004","Remove unused declaration for: '{0}'"),Remove_import_from_0:M(90005,3,"Remove_import_from_0_90005","Remove import from '{0}'"),Implement_interface_0:M(90006,3,"Implement_interface_0_90006","Implement interface '{0}'"),Implement_inherited_abstract_class:M(90007,3,"Implement_inherited_abstract_class_90007","Implement inherited abstract class"),Add_0_to_unresolved_variable:M(90008,3,"Add_0_to_unresolved_variable_90008","Add '{0}.' to unresolved variable"),Remove_variable_statement:M(90010,3,"Remove_variable_statement_90010","Remove variable statement"),Remove_template_tag:M(90011,3,"Remove_template_tag_90011","Remove template tag"),Remove_type_parameters:M(90012,3,"Remove_type_parameters_90012","Remove type parameters"),Import_0_from_1:M(90013,3,"Import_0_from_1_90013",`Import '{0}' from "{1}"`),Change_0_to_1:M(90014,3,"Change_0_to_1_90014","Change '{0}' to '{1}'"),Declare_property_0:M(90016,3,"Declare_property_0_90016","Declare property '{0}'"),Add_index_signature_for_property_0:M(90017,3,"Add_index_signature_for_property_0_90017","Add index signature for property '{0}'"),Disable_checking_for_this_file:M(90018,3,"Disable_checking_for_this_file_90018","Disable checking for this file"),Ignore_this_error_message:M(90019,3,"Ignore_this_error_message_90019","Ignore this error message"),Initialize_property_0_in_the_constructor:M(90020,3,"Initialize_property_0_in_the_constructor_90020","Initialize property '{0}' in the constructor"),Initialize_static_property_0:M(90021,3,"Initialize_static_property_0_90021","Initialize static property '{0}'"),Change_spelling_to_0:M(90022,3,"Change_spelling_to_0_90022","Change spelling to '{0}'"),Declare_method_0:M(90023,3,"Declare_method_0_90023","Declare method '{0}'"),Declare_static_method_0:M(90024,3,"Declare_static_method_0_90024","Declare static method '{0}'"),Prefix_0_with_an_underscore:M(90025,3,"Prefix_0_with_an_underscore_90025","Prefix '{0}' with an underscore"),Rewrite_as_the_indexed_access_type_0:M(90026,3,"Rewrite_as_the_indexed_access_type_0_90026","Rewrite as the indexed access type '{0}'"),Declare_static_property_0:M(90027,3,"Declare_static_property_0_90027","Declare static property '{0}'"),Call_decorator_expression:M(90028,3,"Call_decorator_expression_90028","Call decorator expression"),Add_async_modifier_to_containing_function:M(90029,3,"Add_async_modifier_to_containing_function_90029","Add async modifier to containing function"),Replace_infer_0_with_unknown:M(90030,3,"Replace_infer_0_with_unknown_90030","Replace 'infer {0}' with 'unknown'"),Replace_all_unused_infer_with_unknown:M(90031,3,"Replace_all_unused_infer_with_unknown_90031","Replace all unused 'infer' with 'unknown'"),Add_parameter_name:M(90034,3,"Add_parameter_name_90034","Add parameter name"),Declare_private_property_0:M(90035,3,"Declare_private_property_0_90035","Declare private property '{0}'"),Replace_0_with_Promise_1:M(90036,3,"Replace_0_with_Promise_1_90036","Replace '{0}' with 'Promise<{1}>'"),Fix_all_incorrect_return_type_of_an_async_functions:M(90037,3,"Fix_all_incorrect_return_type_of_an_async_functions_90037","Fix all incorrect return type of an async functions"),Declare_private_method_0:M(90038,3,"Declare_private_method_0_90038","Declare private method '{0}'"),Remove_unused_destructuring_declaration:M(90039,3,"Remove_unused_destructuring_declaration_90039","Remove unused destructuring declaration"),Remove_unused_declarations_for_Colon_0:M(90041,3,"Remove_unused_declarations_for_Colon_0_90041","Remove unused declarations for: '{0}'"),Declare_a_private_field_named_0:M(90053,3,"Declare_a_private_field_named_0_90053","Declare a private field named '{0}'."),Includes_imports_of_types_referenced_by_0:M(90054,3,"Includes_imports_of_types_referenced_by_0_90054","Includes imports of types referenced by '{0}'"),Remove_type_from_import_declaration_from_0:M(90055,3,"Remove_type_from_import_declaration_from_0_90055",`Remove 'type' from import declaration from "{0}"`),Remove_type_from_import_of_0_from_1:M(90056,3,"Remove_type_from_import_of_0_from_1_90056",`Remove 'type' from import of '{0}' from "{1}"`),Add_import_from_0:M(90057,3,"Add_import_from_0_90057",'Add import from "{0}"'),Update_import_from_0:M(90058,3,"Update_import_from_0_90058",'Update import from "{0}"'),Export_0_from_module_1:M(90059,3,"Export_0_from_module_1_90059","Export '{0}' from module '{1}'"),Export_all_referenced_locals:M(90060,3,"Export_all_referenced_locals_90060","Export all referenced locals"),Update_modifiers_of_0:M(90061,3,"Update_modifiers_of_0_90061","Update modifiers of '{0}'"),Add_annotation_of_type_0:M(90062,3,"Add_annotation_of_type_0_90062","Add annotation of type '{0}'"),Add_return_type_0:M(90063,3,"Add_return_type_0_90063","Add return type '{0}'"),Extract_base_class_to_variable:M(90064,3,"Extract_base_class_to_variable_90064","Extract base class to variable"),Extract_default_export_to_variable:M(90065,3,"Extract_default_export_to_variable_90065","Extract default export to variable"),Extract_binding_expressions_to_variable:M(90066,3,"Extract_binding_expressions_to_variable_90066","Extract binding expressions to variable"),Add_all_missing_type_annotations:M(90067,3,"Add_all_missing_type_annotations_90067","Add all missing type annotations"),Add_satisfies_and_an_inline_type_assertion_with_0:M(90068,3,"Add_satisfies_and_an_inline_type_assertion_with_0_90068","Add satisfies and an inline type assertion with '{0}'"),Extract_to_variable_and_replace_with_0_as_typeof_0:M(90069,3,"Extract_to_variable_and_replace_with_0_as_typeof_0_90069","Extract to variable and replace with '{0} as typeof {0}'"),Mark_array_literal_as_const:M(90070,3,"Mark_array_literal_as_const_90070","Mark array literal as const"),Annotate_types_of_properties_expando_function_in_a_namespace:M(90071,3,"Annotate_types_of_properties_expando_function_in_a_namespace_90071","Annotate types of properties expando function in a namespace"),Convert_function_to_an_ES2015_class:M(95001,3,"Convert_function_to_an_ES2015_class_95001","Convert function to an ES2015 class"),Convert_0_to_1_in_0:M(95003,3,"Convert_0_to_1_in_0_95003","Convert '{0}' to '{1} in {0}'"),Extract_to_0_in_1:M(95004,3,"Extract_to_0_in_1_95004","Extract to {0} in {1}"),Extract_function:M(95005,3,"Extract_function_95005","Extract function"),Extract_constant:M(95006,3,"Extract_constant_95006","Extract constant"),Extract_to_0_in_enclosing_scope:M(95007,3,"Extract_to_0_in_enclosing_scope_95007","Extract to {0} in enclosing scope"),Extract_to_0_in_1_scope:M(95008,3,"Extract_to_0_in_1_scope_95008","Extract to {0} in {1} scope"),Annotate_with_type_from_JSDoc:M(95009,3,"Annotate_with_type_from_JSDoc_95009","Annotate with type from JSDoc"),Infer_type_of_0_from_usage:M(95011,3,"Infer_type_of_0_from_usage_95011","Infer type of '{0}' from usage"),Infer_parameter_types_from_usage:M(95012,3,"Infer_parameter_types_from_usage_95012","Infer parameter types from usage"),Convert_to_default_import:M(95013,3,"Convert_to_default_import_95013","Convert to default import"),Install_0:M(95014,3,"Install_0_95014","Install '{0}'"),Replace_import_with_0:M(95015,3,"Replace_import_with_0_95015","Replace import with '{0}'."),Use_synthetic_default_member:M(95016,3,"Use_synthetic_default_member_95016","Use synthetic 'default' member."),Convert_to_ES_module:M(95017,3,"Convert_to_ES_module_95017","Convert to ES module"),Add_undefined_type_to_property_0:M(95018,3,"Add_undefined_type_to_property_0_95018","Add 'undefined' type to property '{0}'"),Add_initializer_to_property_0:M(95019,3,"Add_initializer_to_property_0_95019","Add initializer to property '{0}'"),Add_definite_assignment_assertion_to_property_0:M(95020,3,"Add_definite_assignment_assertion_to_property_0_95020","Add definite assignment assertion to property '{0}'"),Convert_all_type_literals_to_mapped_type:M(95021,3,"Convert_all_type_literals_to_mapped_type_95021","Convert all type literals to mapped type"),Add_all_missing_members:M(95022,3,"Add_all_missing_members_95022","Add all missing members"),Infer_all_types_from_usage:M(95023,3,"Infer_all_types_from_usage_95023","Infer all types from usage"),Delete_all_unused_declarations:M(95024,3,"Delete_all_unused_declarations_95024","Delete all unused declarations"),Prefix_all_unused_declarations_with_where_possible:M(95025,3,"Prefix_all_unused_declarations_with_where_possible_95025","Prefix all unused declarations with '_' where possible"),Fix_all_detected_spelling_errors:M(95026,3,"Fix_all_detected_spelling_errors_95026","Fix all detected spelling errors"),Add_initializers_to_all_uninitialized_properties:M(95027,3,"Add_initializers_to_all_uninitialized_properties_95027","Add initializers to all uninitialized properties"),Add_definite_assignment_assertions_to_all_uninitialized_properties:M(95028,3,"Add_definite_assignment_assertions_to_all_uninitialized_properties_95028","Add definite assignment assertions to all uninitialized properties"),Add_undefined_type_to_all_uninitialized_properties:M(95029,3,"Add_undefined_type_to_all_uninitialized_properties_95029","Add undefined type to all uninitialized properties"),Change_all_jsdoc_style_types_to_TypeScript:M(95030,3,"Change_all_jsdoc_style_types_to_TypeScript_95030","Change all jsdoc-style types to TypeScript"),Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types:M(95031,3,"Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031","Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"),Implement_all_unimplemented_interfaces:M(95032,3,"Implement_all_unimplemented_interfaces_95032","Implement all unimplemented interfaces"),Install_all_missing_types_packages:M(95033,3,"Install_all_missing_types_packages_95033","Install all missing types packages"),Rewrite_all_as_indexed_access_types:M(95034,3,"Rewrite_all_as_indexed_access_types_95034","Rewrite all as indexed access types"),Convert_all_to_default_imports:M(95035,3,"Convert_all_to_default_imports_95035","Convert all to default imports"),Make_all_super_calls_the_first_statement_in_their_constructor:M(95036,3,"Make_all_super_calls_the_first_statement_in_their_constructor_95036","Make all 'super()' calls the first statement in their constructor"),Add_qualifier_to_all_unresolved_variables_matching_a_member_name:M(95037,3,"Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037","Add qualifier to all unresolved variables matching a member name"),Change_all_extended_interfaces_to_implements:M(95038,3,"Change_all_extended_interfaces_to_implements_95038","Change all extended interfaces to 'implements'"),Add_all_missing_super_calls:M(95039,3,"Add_all_missing_super_calls_95039","Add all missing super calls"),Implement_all_inherited_abstract_classes:M(95040,3,"Implement_all_inherited_abstract_classes_95040","Implement all inherited abstract classes"),Add_all_missing_async_modifiers:M(95041,3,"Add_all_missing_async_modifiers_95041","Add all missing 'async' modifiers"),Add_ts_ignore_to_all_error_messages:M(95042,3,"Add_ts_ignore_to_all_error_messages_95042","Add '@ts-ignore' to all error messages"),Annotate_everything_with_types_from_JSDoc:M(95043,3,"Annotate_everything_with_types_from_JSDoc_95043","Annotate everything with types from JSDoc"),Add_to_all_uncalled_decorators:M(95044,3,"Add_to_all_uncalled_decorators_95044","Add '()' to all uncalled decorators"),Convert_all_constructor_functions_to_classes:M(95045,3,"Convert_all_constructor_functions_to_classes_95045","Convert all constructor functions to classes"),Generate_get_and_set_accessors:M(95046,3,"Generate_get_and_set_accessors_95046","Generate 'get' and 'set' accessors"),Convert_require_to_import:M(95047,3,"Convert_require_to_import_95047","Convert 'require' to 'import'"),Convert_all_require_to_import:M(95048,3,"Convert_all_require_to_import_95048","Convert all 'require' to 'import'"),Move_to_a_new_file:M(95049,3,"Move_to_a_new_file_95049","Move to a new file"),Remove_unreachable_code:M(95050,3,"Remove_unreachable_code_95050","Remove unreachable code"),Remove_all_unreachable_code:M(95051,3,"Remove_all_unreachable_code_95051","Remove all unreachable code"),Add_missing_typeof:M(95052,3,"Add_missing_typeof_95052","Add missing 'typeof'"),Remove_unused_label:M(95053,3,"Remove_unused_label_95053","Remove unused label"),Remove_all_unused_labels:M(95054,3,"Remove_all_unused_labels_95054","Remove all unused labels"),Convert_0_to_mapped_object_type:M(95055,3,"Convert_0_to_mapped_object_type_95055","Convert '{0}' to mapped object type"),Convert_namespace_import_to_named_imports:M(95056,3,"Convert_namespace_import_to_named_imports_95056","Convert namespace import to named imports"),Convert_named_imports_to_namespace_import:M(95057,3,"Convert_named_imports_to_namespace_import_95057","Convert named imports to namespace import"),Add_or_remove_braces_in_an_arrow_function:M(95058,3,"Add_or_remove_braces_in_an_arrow_function_95058","Add or remove braces in an arrow function"),Add_braces_to_arrow_function:M(95059,3,"Add_braces_to_arrow_function_95059","Add braces to arrow function"),Remove_braces_from_arrow_function:M(95060,3,"Remove_braces_from_arrow_function_95060","Remove braces from arrow function"),Convert_default_export_to_named_export:M(95061,3,"Convert_default_export_to_named_export_95061","Convert default export to named export"),Convert_named_export_to_default_export:M(95062,3,"Convert_named_export_to_default_export_95062","Convert named export to default export"),Add_missing_enum_member_0:M(95063,3,"Add_missing_enum_member_0_95063","Add missing enum member '{0}'"),Add_all_missing_imports:M(95064,3,"Add_all_missing_imports_95064","Add all missing imports"),Convert_to_async_function:M(95065,3,"Convert_to_async_function_95065","Convert to async function"),Convert_all_to_async_functions:M(95066,3,"Convert_all_to_async_functions_95066","Convert all to async functions"),Add_missing_call_parentheses:M(95067,3,"Add_missing_call_parentheses_95067","Add missing call parentheses"),Add_all_missing_call_parentheses:M(95068,3,"Add_all_missing_call_parentheses_95068","Add all missing call parentheses"),Add_unknown_conversion_for_non_overlapping_types:M(95069,3,"Add_unknown_conversion_for_non_overlapping_types_95069","Add 'unknown' conversion for non-overlapping types"),Add_unknown_to_all_conversions_of_non_overlapping_types:M(95070,3,"Add_unknown_to_all_conversions_of_non_overlapping_types_95070","Add 'unknown' to all conversions of non-overlapping types"),Add_missing_new_operator_to_call:M(95071,3,"Add_missing_new_operator_to_call_95071","Add missing 'new' operator to call"),Add_missing_new_operator_to_all_calls:M(95072,3,"Add_missing_new_operator_to_all_calls_95072","Add missing 'new' operator to all calls"),Add_names_to_all_parameters_without_names:M(95073,3,"Add_names_to_all_parameters_without_names_95073","Add names to all parameters without names"),Enable_the_experimentalDecorators_option_in_your_configuration_file:M(95074,3,"Enable_the_experimentalDecorators_option_in_your_configuration_file_95074","Enable the 'experimentalDecorators' option in your configuration file"),Convert_parameters_to_destructured_object:M(95075,3,"Convert_parameters_to_destructured_object_95075","Convert parameters to destructured object"),Extract_type:M(95077,3,"Extract_type_95077","Extract type"),Extract_to_type_alias:M(95078,3,"Extract_to_type_alias_95078","Extract to type alias"),Extract_to_typedef:M(95079,3,"Extract_to_typedef_95079","Extract to typedef"),Infer_this_type_of_0_from_usage:M(95080,3,"Infer_this_type_of_0_from_usage_95080","Infer 'this' type of '{0}' from usage"),Add_const_to_unresolved_variable:M(95081,3,"Add_const_to_unresolved_variable_95081","Add 'const' to unresolved variable"),Add_const_to_all_unresolved_variables:M(95082,3,"Add_const_to_all_unresolved_variables_95082","Add 'const' to all unresolved variables"),Add_await:M(95083,3,"Add_await_95083","Add 'await'"),Add_await_to_initializer_for_0:M(95084,3,"Add_await_to_initializer_for_0_95084","Add 'await' to initializer for '{0}'"),Fix_all_expressions_possibly_missing_await:M(95085,3,"Fix_all_expressions_possibly_missing_await_95085","Fix all expressions possibly missing 'await'"),Remove_unnecessary_await:M(95086,3,"Remove_unnecessary_await_95086","Remove unnecessary 'await'"),Remove_all_unnecessary_uses_of_await:M(95087,3,"Remove_all_unnecessary_uses_of_await_95087","Remove all unnecessary uses of 'await'"),Enable_the_jsx_flag_in_your_configuration_file:M(95088,3,"Enable_the_jsx_flag_in_your_configuration_file_95088","Enable the '--jsx' flag in your configuration file"),Add_await_to_initializers:M(95089,3,"Add_await_to_initializers_95089","Add 'await' to initializers"),Extract_to_interface:M(95090,3,"Extract_to_interface_95090","Extract to interface"),Convert_to_a_bigint_numeric_literal:M(95091,3,"Convert_to_a_bigint_numeric_literal_95091","Convert to a bigint numeric literal"),Convert_all_to_bigint_numeric_literals:M(95092,3,"Convert_all_to_bigint_numeric_literals_95092","Convert all to bigint numeric literals"),Convert_const_to_let:M(95093,3,"Convert_const_to_let_95093","Convert 'const' to 'let'"),Prefix_with_declare:M(95094,3,"Prefix_with_declare_95094","Prefix with 'declare'"),Prefix_all_incorrect_property_declarations_with_declare:M(95095,3,"Prefix_all_incorrect_property_declarations_with_declare_95095","Prefix all incorrect property declarations with 'declare'"),Convert_to_template_string:M(95096,3,"Convert_to_template_string_95096","Convert to template string"),Add_export_to_make_this_file_into_a_module:M(95097,3,"Add_export_to_make_this_file_into_a_module_95097","Add 'export {}' to make this file into a module"),Set_the_target_option_in_your_configuration_file_to_0:M(95098,3,"Set_the_target_option_in_your_configuration_file_to_0_95098","Set the 'target' option in your configuration file to '{0}'"),Set_the_module_option_in_your_configuration_file_to_0:M(95099,3,"Set_the_module_option_in_your_configuration_file_to_0_95099","Set the 'module' option in your configuration file to '{0}'"),Convert_invalid_character_to_its_html_entity_code:M(95100,3,"Convert_invalid_character_to_its_html_entity_code_95100","Convert invalid character to its html entity code"),Convert_all_invalid_characters_to_HTML_entity_code:M(95101,3,"Convert_all_invalid_characters_to_HTML_entity_code_95101","Convert all invalid characters to HTML entity code"),Convert_all_const_to_let:M(95102,3,"Convert_all_const_to_let_95102","Convert all 'const' to 'let'"),Convert_function_expression_0_to_arrow_function:M(95105,3,"Convert_function_expression_0_to_arrow_function_95105","Convert function expression '{0}' to arrow function"),Convert_function_declaration_0_to_arrow_function:M(95106,3,"Convert_function_declaration_0_to_arrow_function_95106","Convert function declaration '{0}' to arrow function"),Fix_all_implicit_this_errors:M(95107,3,"Fix_all_implicit_this_errors_95107","Fix all implicit-'this' errors"),Wrap_invalid_character_in_an_expression_container:M(95108,3,"Wrap_invalid_character_in_an_expression_container_95108","Wrap invalid character in an expression container"),Wrap_all_invalid_characters_in_an_expression_container:M(95109,3,"Wrap_all_invalid_characters_in_an_expression_container_95109","Wrap all invalid characters in an expression container"),Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file:M(95110,3,"Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110","Visit https://aka.ms/tsconfig to read more about this file"),Add_a_return_statement:M(95111,3,"Add_a_return_statement_95111","Add a return statement"),Remove_braces_from_arrow_function_body:M(95112,3,"Remove_braces_from_arrow_function_body_95112","Remove braces from arrow function body"),Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal:M(95113,3,"Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113","Wrap the following body with parentheses which should be an object literal"),Add_all_missing_return_statement:M(95114,3,"Add_all_missing_return_statement_95114","Add all missing return statement"),Remove_braces_from_all_arrow_function_bodies_with_relevant_issues:M(95115,3,"Remove_braces_from_all_arrow_function_bodies_with_relevant_issues_95115","Remove braces from all arrow function bodies with relevant issues"),Wrap_all_object_literal_with_parentheses:M(95116,3,"Wrap_all_object_literal_with_parentheses_95116","Wrap all object literal with parentheses"),Move_labeled_tuple_element_modifiers_to_labels:M(95117,3,"Move_labeled_tuple_element_modifiers_to_labels_95117","Move labeled tuple element modifiers to labels"),Convert_overload_list_to_single_signature:M(95118,3,"Convert_overload_list_to_single_signature_95118","Convert overload list to single signature"),Generate_get_and_set_accessors_for_all_overriding_properties:M(95119,3,"Generate_get_and_set_accessors_for_all_overriding_properties_95119","Generate 'get' and 'set' accessors for all overriding properties"),Wrap_in_JSX_fragment:M(95120,3,"Wrap_in_JSX_fragment_95120","Wrap in JSX fragment"),Wrap_all_unparented_JSX_in_JSX_fragment:M(95121,3,"Wrap_all_unparented_JSX_in_JSX_fragment_95121","Wrap all unparented JSX in JSX fragment"),Convert_arrow_function_or_function_expression:M(95122,3,"Convert_arrow_function_or_function_expression_95122","Convert arrow function or function expression"),Convert_to_anonymous_function:M(95123,3,"Convert_to_anonymous_function_95123","Convert to anonymous function"),Convert_to_named_function:M(95124,3,"Convert_to_named_function_95124","Convert to named function"),Convert_to_arrow_function:M(95125,3,"Convert_to_arrow_function_95125","Convert to arrow function"),Remove_parentheses:M(95126,3,"Remove_parentheses_95126","Remove parentheses"),Could_not_find_a_containing_arrow_function:M(95127,3,"Could_not_find_a_containing_arrow_function_95127","Could not find a containing arrow function"),Containing_function_is_not_an_arrow_function:M(95128,3,"Containing_function_is_not_an_arrow_function_95128","Containing function is not an arrow function"),Could_not_find_export_statement:M(95129,3,"Could_not_find_export_statement_95129","Could not find export statement"),This_file_already_has_a_default_export:M(95130,3,"This_file_already_has_a_default_export_95130","This file already has a default export"),Could_not_find_import_clause:M(95131,3,"Could_not_find_import_clause_95131","Could not find import clause"),Could_not_find_namespace_import_or_named_imports:M(95132,3,"Could_not_find_namespace_import_or_named_imports_95132","Could not find namespace import or named imports"),Selection_is_not_a_valid_type_node:M(95133,3,"Selection_is_not_a_valid_type_node_95133","Selection is not a valid type node"),No_type_could_be_extracted_from_this_type_node:M(95134,3,"No_type_could_be_extracted_from_this_type_node_95134","No type could be extracted from this type node"),Could_not_find_property_for_which_to_generate_accessor:M(95135,3,"Could_not_find_property_for_which_to_generate_accessor_95135","Could not find property for which to generate accessor"),Name_is_not_valid:M(95136,3,"Name_is_not_valid_95136","Name is not valid"),Can_only_convert_property_with_modifier:M(95137,3,"Can_only_convert_property_with_modifier_95137","Can only convert property with modifier"),Switch_each_misused_0_to_1:M(95138,3,"Switch_each_misused_0_to_1_95138","Switch each misused '{0}' to '{1}'"),Convert_to_optional_chain_expression:M(95139,3,"Convert_to_optional_chain_expression_95139","Convert to optional chain expression"),Could_not_find_convertible_access_expression:M(95140,3,"Could_not_find_convertible_access_expression_95140","Could not find convertible access expression"),Could_not_find_matching_access_expressions:M(95141,3,"Could_not_find_matching_access_expressions_95141","Could not find matching access expressions"),Can_only_convert_logical_AND_access_chains:M(95142,3,"Can_only_convert_logical_AND_access_chains_95142","Can only convert logical AND access chains"),Add_void_to_Promise_resolved_without_a_value:M(95143,3,"Add_void_to_Promise_resolved_without_a_value_95143","Add 'void' to Promise resolved without a value"),Add_void_to_all_Promises_resolved_without_a_value:M(95144,3,"Add_void_to_all_Promises_resolved_without_a_value_95144","Add 'void' to all Promises resolved without a value"),Use_element_access_for_0:M(95145,3,"Use_element_access_for_0_95145","Use element access for '{0}'"),Use_element_access_for_all_undeclared_properties:M(95146,3,"Use_element_access_for_all_undeclared_properties_95146","Use element access for all undeclared properties."),Delete_all_unused_imports:M(95147,3,"Delete_all_unused_imports_95147","Delete all unused imports"),Infer_function_return_type:M(95148,3,"Infer_function_return_type_95148","Infer function return type"),Return_type_must_be_inferred_from_a_function:M(95149,3,"Return_type_must_be_inferred_from_a_function_95149","Return type must be inferred from a function"),Could_not_determine_function_return_type:M(95150,3,"Could_not_determine_function_return_type_95150","Could not determine function return type"),Could_not_convert_to_arrow_function:M(95151,3,"Could_not_convert_to_arrow_function_95151","Could not convert to arrow function"),Could_not_convert_to_named_function:M(95152,3,"Could_not_convert_to_named_function_95152","Could not convert to named function"),Could_not_convert_to_anonymous_function:M(95153,3,"Could_not_convert_to_anonymous_function_95153","Could not convert to anonymous function"),Can_only_convert_string_concatenations_and_string_literals:M(95154,3,"Can_only_convert_string_concatenations_and_string_literals_95154","Can only convert string concatenations and string literals"),Selection_is_not_a_valid_statement_or_statements:M(95155,3,"Selection_is_not_a_valid_statement_or_statements_95155","Selection is not a valid statement or statements"),Add_missing_function_declaration_0:M(95156,3,"Add_missing_function_declaration_0_95156","Add missing function declaration '{0}'"),Add_all_missing_function_declarations:M(95157,3,"Add_all_missing_function_declarations_95157","Add all missing function declarations"),Method_not_implemented:M(95158,3,"Method_not_implemented_95158","Method not implemented."),Function_not_implemented:M(95159,3,"Function_not_implemented_95159","Function not implemented."),Add_override_modifier:M(95160,3,"Add_override_modifier_95160","Add 'override' modifier"),Remove_override_modifier:M(95161,3,"Remove_override_modifier_95161","Remove 'override' modifier"),Add_all_missing_override_modifiers:M(95162,3,"Add_all_missing_override_modifiers_95162","Add all missing 'override' modifiers"),Remove_all_unnecessary_override_modifiers:M(95163,3,"Remove_all_unnecessary_override_modifiers_95163","Remove all unnecessary 'override' modifiers"),Can_only_convert_named_export:M(95164,3,"Can_only_convert_named_export_95164","Can only convert named export"),Add_missing_properties:M(95165,3,"Add_missing_properties_95165","Add missing properties"),Add_all_missing_properties:M(95166,3,"Add_all_missing_properties_95166","Add all missing properties"),Add_missing_attributes:M(95167,3,"Add_missing_attributes_95167","Add missing attributes"),Add_all_missing_attributes:M(95168,3,"Add_all_missing_attributes_95168","Add all missing attributes"),Add_undefined_to_optional_property_type:M(95169,3,"Add_undefined_to_optional_property_type_95169","Add 'undefined' to optional property type"),Convert_named_imports_to_default_import:M(95170,3,"Convert_named_imports_to_default_import_95170","Convert named imports to default import"),Delete_unused_param_tag_0:M(95171,3,"Delete_unused_param_tag_0_95171","Delete unused '@param' tag '{0}'"),Delete_all_unused_param_tags:M(95172,3,"Delete_all_unused_param_tags_95172","Delete all unused '@param' tags"),Rename_param_tag_name_0_to_1:M(95173,3,"Rename_param_tag_name_0_to_1_95173","Rename '@param' tag name '{0}' to '{1}'"),Use_0:M(95174,3,"Use_0_95174","Use `{0}`."),Use_Number_isNaN_in_all_conditions:M(95175,3,"Use_Number_isNaN_in_all_conditions_95175","Use `Number.isNaN` in all conditions."),Convert_typedef_to_TypeScript_type:M(95176,3,"Convert_typedef_to_TypeScript_type_95176","Convert typedef to TypeScript type."),Convert_all_typedef_to_TypeScript_types:M(95177,3,"Convert_all_typedef_to_TypeScript_types_95177","Convert all typedef to TypeScript types."),Move_to_file:M(95178,3,"Move_to_file_95178","Move to file"),Cannot_move_to_file_selected_file_is_invalid:M(95179,3,"Cannot_move_to_file_selected_file_is_invalid_95179","Cannot move to file, selected file is invalid"),Use_import_type:M(95180,3,"Use_import_type_95180","Use 'import type'"),Use_type_0:M(95181,3,"Use_type_0_95181","Use 'type {0}'"),Fix_all_with_type_only_imports:M(95182,3,"Fix_all_with_type_only_imports_95182","Fix all with type-only imports"),Cannot_move_statements_to_the_selected_file:M(95183,3,"Cannot_move_statements_to_the_selected_file_95183","Cannot move statements to the selected file"),Inline_variable:M(95184,3,"Inline_variable_95184","Inline variable"),Could_not_find_variable_to_inline:M(95185,3,"Could_not_find_variable_to_inline_95185","Could not find variable to inline."),Variables_with_multiple_declarations_cannot_be_inlined:M(95186,3,"Variables_with_multiple_declarations_cannot_be_inlined_95186","Variables with multiple declarations cannot be inlined."),Add_missing_comma_for_object_member_completion_0:M(95187,3,"Add_missing_comma_for_object_member_completion_0_95187","Add missing comma for object member completion '{0}'."),Add_missing_parameter_to_0:M(95188,3,"Add_missing_parameter_to_0_95188","Add missing parameter to '{0}'"),Add_missing_parameters_to_0:M(95189,3,"Add_missing_parameters_to_0_95189","Add missing parameters to '{0}'"),Add_all_missing_parameters:M(95190,3,"Add_all_missing_parameters_95190","Add all missing parameters"),Add_optional_parameter_to_0:M(95191,3,"Add_optional_parameter_to_0_95191","Add optional parameter to '{0}'"),Add_optional_parameters_to_0:M(95192,3,"Add_optional_parameters_to_0_95192","Add optional parameters to '{0}'"),Add_all_optional_parameters:M(95193,3,"Add_all_optional_parameters_95193","Add all optional parameters"),Wrap_in_parentheses:M(95194,3,"Wrap_in_parentheses_95194","Wrap in parentheses"),Wrap_all_invalid_decorator_expressions_in_parentheses:M(95195,3,"Wrap_all_invalid_decorator_expressions_in_parentheses_95195","Wrap all invalid decorator expressions in parentheses"),No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer:M(18004,1,"No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004","No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),Classes_may_not_have_a_field_named_constructor:M(18006,1,"Classes_may_not_have_a_field_named_constructor_18006","Classes may not have a field named 'constructor'."),JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array:M(18007,1,"JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007","JSX expressions may not use the comma operator. Did you mean to write an array?"),Private_identifiers_cannot_be_used_as_parameters:M(18009,1,"Private_identifiers_cannot_be_used_as_parameters_18009","Private identifiers cannot be used as parameters."),An_accessibility_modifier_cannot_be_used_with_a_private_identifier:M(18010,1,"An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010","An accessibility modifier cannot be used with a private identifier."),The_operand_of_a_delete_operator_cannot_be_a_private_identifier:M(18011,1,"The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011","The operand of a 'delete' operator cannot be a private identifier."),constructor_is_a_reserved_word:M(18012,1,"constructor_is_a_reserved_word_18012","'#constructor' is a reserved word."),Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier:M(18013,1,"Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013","Property '{0}' is not accessible outside class '{1}' because it has a private identifier."),The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling:M(18014,1,"The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014","The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling."),Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2:M(18015,1,"Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015","Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'."),Private_identifiers_are_not_allowed_outside_class_bodies:M(18016,1,"Private_identifiers_are_not_allowed_outside_class_bodies_18016","Private identifiers are not allowed outside class bodies."),The_shadowing_declaration_of_0_is_defined_here:M(18017,1,"The_shadowing_declaration_of_0_is_defined_here_18017","The shadowing declaration of '{0}' is defined here"),The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here:M(18018,1,"The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018","The declaration of '{0}' that you probably intended to use is defined here"),_0_modifier_cannot_be_used_with_a_private_identifier:M(18019,1,"_0_modifier_cannot_be_used_with_a_private_identifier_18019","'{0}' modifier cannot be used with a private identifier."),An_enum_member_cannot_be_named_with_a_private_identifier:M(18024,1,"An_enum_member_cannot_be_named_with_a_private_identifier_18024","An enum member cannot be named with a private identifier."),can_only_be_used_at_the_start_of_a_file:M(18026,1,"can_only_be_used_at_the_start_of_a_file_18026","'#!' can only be used at the start of a file."),Compiler_reserves_name_0_when_emitting_private_identifier_downlevel:M(18027,1,"Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027","Compiler reserves name '{0}' when emitting private identifier downlevel."),Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher:M(18028,1,"Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028","Private identifiers are only available when targeting ECMAScript 2015 and higher."),Private_identifiers_are_not_allowed_in_variable_declarations:M(18029,1,"Private_identifiers_are_not_allowed_in_variable_declarations_18029","Private identifiers are not allowed in variable declarations."),An_optional_chain_cannot_contain_private_identifiers:M(18030,1,"An_optional_chain_cannot_contain_private_identifiers_18030","An optional chain cannot contain private identifiers."),The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents:M(18031,1,"The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031","The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents."),The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some:M(18032,1,"The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032","The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some."),Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values:M(18033,1,"Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033","Type '{0}' is not assignable to type '{1}' as required for computed enum member values."),Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment:M(18034,3,"Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034","Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."),Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name:M(18035,1,"Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035","Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."),Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator:M(18036,1,"Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036","Class decorators can't be used with static private identifier. Consider removing the experimental decorator."),await_expression_cannot_be_used_inside_a_class_static_block:M(18037,1,"await_expression_cannot_be_used_inside_a_class_static_block_18037","'await' expression cannot be used inside a class static block."),for_await_loops_cannot_be_used_inside_a_class_static_block:M(18038,1,"for_await_loops_cannot_be_used_inside_a_class_static_block_18038","'for await' loops cannot be used inside a class static block."),Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block:M(18039,1,"Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039","Invalid use of '{0}'. It cannot be used inside a class static block."),A_return_statement_cannot_be_used_inside_a_class_static_block:M(18041,1,"A_return_statement_cannot_be_used_inside_a_class_static_block_18041","A 'return' statement cannot be used inside a class static block."),_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation:M(18042,1,"_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042","'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."),Types_cannot_appear_in_export_declarations_in_JavaScript_files:M(18043,1,"Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043","Types cannot appear in export declarations in JavaScript files."),_0_is_automatically_exported_here:M(18044,3,"_0_is_automatically_exported_here_18044","'{0}' is automatically exported here."),Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher:M(18045,1,"Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045","Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."),_0_is_of_type_unknown:M(18046,1,"_0_is_of_type_unknown_18046","'{0}' is of type 'unknown'."),_0_is_possibly_null:M(18047,1,"_0_is_possibly_null_18047","'{0}' is possibly 'null'."),_0_is_possibly_undefined:M(18048,1,"_0_is_possibly_undefined_18048","'{0}' is possibly 'undefined'."),_0_is_possibly_null_or_undefined:M(18049,1,"_0_is_possibly_null_or_undefined_18049","'{0}' is possibly 'null' or 'undefined'."),The_value_0_cannot_be_used_here:M(18050,1,"The_value_0_cannot_be_used_here_18050","The value '{0}' cannot be used here."),Compiler_option_0_cannot_be_given_an_empty_string:M(18051,1,"Compiler_option_0_cannot_be_given_an_empty_string_18051","Compiler option '{0}' cannot be given an empty string."),Its_type_0_is_not_a_valid_JSX_element_type:M(18053,1,"Its_type_0_is_not_a_valid_JSX_element_type_18053","Its type '{0}' is not a valid JSX element type."),await_using_statements_cannot_be_used_inside_a_class_static_block:M(18054,1,"await_using_statements_cannot_be_used_inside_a_class_static_block_18054","'await using' statements cannot be used inside a class static block."),_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled:M(18055,1,"_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is__18055","'{0}' has a string type, but must have syntactically recognizable string syntax when 'isolatedModules' is enabled."),Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled:M(18056,1,"Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is__18056","Enum member following a non-literal numeric member must have an initializer when 'isolatedModules' is enabled.")};function Rh(t){return t>=80}function DSe(t){return t===32||Rh(t)}var w$={abstract:128,accessor:129,any:133,as:130,asserts:131,assert:132,bigint:163,boolean:136,break:83,case:84,catch:85,class:86,continue:88,const:87,constructor:137,debugger:89,declare:138,default:90,delete:91,do:92,else:93,enum:94,export:95,extends:96,false:97,finally:98,for:99,from:161,function:100,get:139,if:101,implements:119,import:102,in:103,infer:140,instanceof:104,interface:120,intrinsic:141,is:142,keyof:143,let:121,module:144,namespace:145,never:146,new:105,null:106,number:150,object:151,package:122,private:123,protected:124,public:125,override:164,out:147,readonly:148,require:149,global:162,return:107,satisfies:152,set:153,static:126,string:154,super:108,switch:109,symbol:155,this:110,throw:111,true:112,try:113,type:156,typeof:114,undefined:157,unique:158,unknown:159,using:160,var:115,void:116,while:117,with:118,yield:127,async:134,await:135,of:165},UEt=new Map(Object.entries(w$)),hqe=new Map(Object.entries({...w$,"{":19,"}":20,"(":21,")":22,"[":23,"]":24,".":25,"...":26,";":27,",":28,"<":30,">":32,"<=":33,">=":34,"==":35,"!=":36,"===":37,"!==":38,"=>":39,"+":40,"-":41,"**":43,"*":42,"/":44,"%":45,"++":46,"--":47,"<<":48,">":49,">>>":50,"&":51,"|":52,"^":53,"!":54,"~":55,"&&":56,"||":57,"?":58,"??":61,"?.":29,":":59,"=":64,"+=":65,"-=":66,"*=":67,"**=":68,"/=":69,"%=":70,"<<=":71,">>=":72,">>>=":73,"&=":74,"|=":75,"^=":79,"||=":76,"&&=":77,"??=":78,"@":60,"#":63,"`":62})),_qe=new Map(Object.entries({d:1,g:2,i:4,m:8,s:16,u:32,v:64,y:128})),qEt=new Map([[1,9],[16,5],[32,2],[64,99],[128,2]]),$Et=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1319,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2208,2208,2210,2220,2308,2361,2365,2365,2384,2384,2392,2401,2417,2423,2425,2431,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3133,3160,3161,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3294,3294,3296,3297,3313,3314,3333,3340,3342,3344,3346,3386,3389,3389,3406,3406,3424,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5905,5920,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6263,6272,6312,6314,6314,6320,6389,6400,6428,6480,6509,6512,6516,6528,6571,6593,6599,6656,6678,6688,6740,6823,6823,6917,6963,6981,6987,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7401,7404,7406,7409,7413,7414,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11823,11823,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42647,42656,42735,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43648,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],JEt=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1319,1329,1366,1369,1369,1377,1415,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1520,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2048,2093,2112,2139,2208,2208,2210,2220,2276,2302,2304,2403,2406,2415,2417,2423,2425,2431,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3140,3142,3144,3146,3149,3157,3158,3160,3161,3168,3171,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3299,3302,3311,3313,3314,3330,3331,3333,3340,3342,3344,3346,3386,3389,3396,3398,3400,3402,3406,3415,3415,3424,3427,3430,3439,3450,3455,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5908,5920,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6160,6169,6176,6263,6272,6314,6320,6389,6400,6428,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6617,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6912,6987,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7376,7378,7380,7414,7424,7654,7676,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,11823,11823,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12442,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42647,42655,42737,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43047,43072,43123,43136,43204,43216,43225,43232,43255,43259,43259,43264,43309,43312,43347,43360,43388,43392,43456,43471,43481,43520,43574,43584,43597,43600,43609,43616,43638,43642,43643,43648,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65062,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],GEt=[65,90,97,122,170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,895,895,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1327,1329,1366,1369,1369,1376,1416,1488,1514,1519,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2144,2154,2160,2183,2185,2190,2208,2249,2308,2361,2365,2365,2384,2384,2392,2401,2417,2432,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2556,2556,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2809,2809,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3129,3133,3133,3160,3162,3165,3165,3168,3169,3200,3200,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3293,3294,3296,3297,3313,3314,3332,3340,3342,3344,3346,3386,3389,3389,3406,3406,3412,3414,3423,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5905,5919,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6264,6272,6312,6314,6314,6320,6389,6400,6430,6480,6509,6512,6516,6528,6571,6576,6601,6656,6678,6688,6740,6823,6823,6917,6963,6981,6988,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7296,7304,7312,7354,7357,7359,7401,7404,7406,7411,7413,7414,7418,7418,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12443,12447,12449,12538,12540,12543,12549,12591,12593,12686,12704,12735,12784,12799,13312,19903,19968,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42653,42656,42735,42775,42783,42786,42888,42891,42954,42960,42961,42963,42963,42965,42969,42994,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43261,43262,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43488,43492,43494,43503,43514,43518,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43646,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43881,43888,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66176,66204,66208,66256,66304,66335,66349,66378,66384,66421,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66736,66771,66776,66811,66816,66855,66864,66915,66928,66938,66940,66954,66956,66962,66964,66965,66967,66977,66979,66993,66995,67001,67003,67004,67072,67382,67392,67413,67424,67431,67456,67461,67463,67504,67506,67514,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68096,68112,68115,68117,68119,68121,68149,68192,68220,68224,68252,68288,68295,68297,68324,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68899,69248,69289,69296,69297,69376,69404,69415,69415,69424,69445,69488,69505,69552,69572,69600,69622,69635,69687,69745,69746,69749,69749,69763,69807,69840,69864,69891,69926,69956,69956,69959,69959,69968,70002,70006,70006,70019,70066,70081,70084,70106,70106,70108,70108,70144,70161,70163,70187,70207,70208,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70366,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70461,70461,70480,70480,70493,70497,70656,70708,70727,70730,70751,70753,70784,70831,70852,70853,70855,70855,71040,71086,71128,71131,71168,71215,71236,71236,71296,71338,71352,71352,71424,71450,71488,71494,71680,71723,71840,71903,71935,71942,71945,71945,71948,71955,71957,71958,71960,71983,71999,71999,72001,72001,72096,72103,72106,72144,72161,72161,72163,72163,72192,72192,72203,72242,72250,72250,72272,72272,72284,72329,72349,72349,72368,72440,72704,72712,72714,72750,72768,72768,72818,72847,72960,72966,72968,72969,72971,73008,73030,73030,73056,73061,73063,73064,73066,73097,73112,73112,73440,73458,73474,73474,73476,73488,73490,73523,73648,73648,73728,74649,74752,74862,74880,75075,77712,77808,77824,78895,78913,78918,82944,83526,92160,92728,92736,92766,92784,92862,92880,92909,92928,92975,92992,92995,93027,93047,93053,93071,93760,93823,93952,94026,94032,94032,94099,94111,94176,94177,94179,94179,94208,100343,100352,101589,101632,101640,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,122624,122654,122661,122666,122928,122989,123136,123180,123191,123197,123214,123214,123536,123565,123584,123627,124112,124139,124896,124902,124904,124907,124909,124910,124912,124926,124928,125124,125184,125251,125259,125259,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,131072,173791,173824,177977,177984,178205,178208,183969,183984,191456,191472,192093,194560,195101,196608,201546,201552,205743],KEt=[48,57,65,90,95,95,97,122,170,170,181,181,183,183,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,895,895,902,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1327,1329,1366,1369,1369,1376,1416,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1519,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2045,2045,2048,2093,2112,2139,2144,2154,2160,2183,2185,2190,2200,2273,2275,2403,2406,2415,2417,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2556,2556,2558,2558,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2809,2815,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2901,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3072,3084,3086,3088,3090,3112,3114,3129,3132,3140,3142,3144,3146,3149,3157,3158,3160,3162,3165,3165,3168,3171,3174,3183,3200,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3293,3294,3296,3299,3302,3311,3313,3315,3328,3340,3342,3344,3346,3396,3398,3400,3402,3406,3412,3415,3423,3427,3430,3439,3450,3455,3457,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3558,3567,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3773,3776,3780,3782,3782,3784,3790,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4969,4977,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5909,5919,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6159,6169,6176,6264,6272,6314,6320,6389,6400,6430,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6618,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6832,6845,6847,6862,6912,6988,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7296,7304,7312,7354,7357,7359,7376,7378,7380,7418,7424,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12447,12449,12543,12549,12591,12593,12686,12704,12735,12784,12799,13312,19903,19968,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42737,42775,42783,42786,42888,42891,42954,42960,42961,42963,42963,42965,42969,42994,43047,43052,43052,43072,43123,43136,43205,43216,43225,43232,43255,43259,43259,43261,43309,43312,43347,43360,43388,43392,43456,43471,43481,43488,43518,43520,43574,43584,43597,43600,43609,43616,43638,43642,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43881,43888,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65071,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65381,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66045,66045,66176,66204,66208,66256,66272,66272,66304,66335,66349,66378,66384,66426,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66720,66729,66736,66771,66776,66811,66816,66855,66864,66915,66928,66938,66940,66954,66956,66962,66964,66965,66967,66977,66979,66993,66995,67001,67003,67004,67072,67382,67392,67413,67424,67431,67456,67461,67463,67504,67506,67514,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68099,68101,68102,68108,68115,68117,68119,68121,68149,68152,68154,68159,68159,68192,68220,68224,68252,68288,68295,68297,68326,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68903,68912,68921,69248,69289,69291,69292,69296,69297,69373,69404,69415,69415,69424,69456,69488,69509,69552,69572,69600,69622,69632,69702,69734,69749,69759,69818,69826,69826,69840,69864,69872,69881,69888,69940,69942,69951,69956,69959,69968,70003,70006,70006,70016,70084,70089,70092,70094,70106,70108,70108,70144,70161,70163,70199,70206,70209,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70378,70384,70393,70400,70403,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70459,70468,70471,70472,70475,70477,70480,70480,70487,70487,70493,70499,70502,70508,70512,70516,70656,70730,70736,70745,70750,70753,70784,70853,70855,70855,70864,70873,71040,71093,71096,71104,71128,71133,71168,71232,71236,71236,71248,71257,71296,71352,71360,71369,71424,71450,71453,71467,71472,71481,71488,71494,71680,71738,71840,71913,71935,71942,71945,71945,71948,71955,71957,71958,71960,71989,71991,71992,71995,72003,72016,72025,72096,72103,72106,72151,72154,72161,72163,72164,72192,72254,72263,72263,72272,72345,72349,72349,72368,72440,72704,72712,72714,72758,72760,72768,72784,72793,72818,72847,72850,72871,72873,72886,72960,72966,72968,72969,72971,73014,73018,73018,73020,73021,73023,73031,73040,73049,73056,73061,73063,73064,73066,73102,73104,73105,73107,73112,73120,73129,73440,73462,73472,73488,73490,73530,73534,73538,73552,73561,73648,73648,73728,74649,74752,74862,74880,75075,77712,77808,77824,78895,78912,78933,82944,83526,92160,92728,92736,92766,92768,92777,92784,92862,92864,92873,92880,92909,92912,92916,92928,92982,92992,92995,93008,93017,93027,93047,93053,93071,93760,93823,93952,94026,94031,94087,94095,94111,94176,94177,94179,94180,94192,94193,94208,100343,100352,101589,101632,101640,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,113821,113822,118528,118573,118576,118598,119141,119145,119149,119154,119163,119170,119173,119179,119210,119213,119362,119364,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,120782,120831,121344,121398,121403,121452,121461,121461,121476,121476,121499,121503,121505,121519,122624,122654,122661,122666,122880,122886,122888,122904,122907,122913,122915,122916,122918,122922,122928,122989,123023,123023,123136,123180,123184,123197,123200,123209,123214,123214,123536,123566,123584,123641,124112,124153,124896,124902,124904,124907,124909,124910,124912,124926,124928,125124,125136,125142,125184,125259,125264,125273,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,130032,130041,131072,173791,173824,177977,177984,178205,178208,183969,183984,191456,191472,192093,194560,195101,196608,201546,201552,205743,917760,917999],QEt=/^\/\/\/?\s*@(ts-expect-error|ts-ignore)/,XEt=/^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/,ZEt=/@(?:see|link)/i;function Xre(t,r){if(t=2?Xre(t,GEt):Xre(t,$Et)}function YEt(t,r){return r>=2?Xre(t,KEt):Xre(t,JEt)}function pqe(t){const r=[];return t.forEach((a,u)=>{r[a]=u}),r}var eIt=pqe(hqe);function Ta(t){return eIt[t]}function bT(t){return hqe.get(t)}var tIt=pqe(_qe);function gqe(t){return tIt[t]}function Zre(t){return _qe.get(t)}function ML(t){const r=[];let a=0,u=0;for(;a127&&_h(h)&&(r.push(u),u=a);break}}return r.push(u),r}function wB(t,r,a,u){return t.getPositionOfLineAndCharacter?t.getPositionOfLineAndCharacter(r,a,u):k$(Wy(t),r,a,t.text,u)}function k$(t,r,a,u,h){(r<0||r>=t.length)&&(h?r=r<0?0:r>=t.length?t.length-1:r:z.fail(`Bad line number. Line: ${r}, lineStarts.length: ${t.length} , line map is correct? ${u!==void 0?pi(t,ML(u)):"unknown"}`));const p=t[r]+a;return h?p>t[r+1]?t[r+1]:typeof u=="string"&&p>u.length?u.length:p:(r=8192&&t<=8203||t===8239||t===8287||t===12288||t===65279}function _h(t){return t===10||t===13||t===8232||t===8233}function m6(t){return t>=48&&t<=57}function ESe(t){return m6(t)||t>=65&&t<=70||t>=97&&t<=102}function ISe(t){return t>=65&&t<=90||t>=97&&t<=122}function mqe(t){return ISe(t)||m6(t)||t===95}function T$(t){return t>=48&&t<=55}function NSe(t,r){const a=t.charCodeAt(r);switch(a){case 13:case 10:case 9:case 11:case 12:case 32:case 47:case 60:case 124:case 61:case 62:return!0;case 35:return r===0;default:return a>127}}function qa(t,r,a,u,h){if(q0(r))return r;let p=!1;for(;;){const m=t.charCodeAt(r);switch(m){case 13:t.charCodeAt(r+1)===10&&r++;case 10:if(r++,a)return r;p=!!h;continue;case 9:case 11:case 12:case 32:r++;continue;case 47:if(u)break;if(t.charCodeAt(r+1)===47){for(r+=2;r127&&Vy(m)){r++;continue}break}return r}}var Yre=7;function ZR(t,r){if(z.assert(r>=0),r===0||_h(t.charCodeAt(r-1))){const a=t.charCodeAt(r);if(r+Yre=0&&a127&&Vy(j)){N&&_h(j)&&(E=!0),a++;continue}break e}}return N&&(F=h(C,b,T,E,p,F)),F}function kB(t,r,a,u){return ise(!1,t,r,!1,a,u)}function TB(t,r,a,u){return ise(!1,t,r,!0,a,u)}function PSe(t,r,a,u,h){return ise(!0,t,r,!1,a,u,h)}function ASe(t,r,a,u,h){return ise(!0,t,r,!0,a,u,h)}function vqe(t,r,a,u,h,p=[]){return p.push({kind:a,pos:t,end:r,hasTrailingNewLine:u}),p}function Hy(t,r){return PSe(t,r,vqe,void 0,void 0)}function Rw(t,r){return ASe(t,r,vqe,void 0,void 0)}function D$(t){const r=LSe.exec(t);if(r)return r[0]}function jy(t,r){return ISe(t)||t===36||t===95||t>127&&x$(t,r)}function YC(t,r,a){return mqe(t)||t===36||(a===1?t===45||t===58:!1)||t>127&&YEt(t,r)}function wp(t,r,a){let u=YR(t,0);if(!jy(u,r))return!1;for(let h=P1(u);hE,getStartPos:()=>E,getTokenEnd:()=>b,getTextPos:()=>b,getToken:()=>R,getTokenStart:()=>N,getTokenPos:()=>N,getTokenText:()=>C.substring(N,b),getTokenValue:()=>F,hasUnicodeEscape:()=>(j&1024)!==0,hasExtendedUnicodeEscape:()=>(j&8)!==0,hasPrecedingLineBreak:()=>(j&1)!==0,hasPrecedingJSDocComment:()=>(j&2)!==0,isIdentifier:()=>R===80||R>118,isReservedWord:()=>R>=83&&R<=118,isUnterminated:()=>(j&4)!==0,getCommentDirectives:()=>U,getNumericLiteralFlags:()=>j&25584,getTokenFlags:()=>j,reScanGreaterToken:ft,reScanAsteriskEqualsToken:Ht,reScanSlashToken:Oi,reScanTemplateToken:Ai,reScanTemplateHeadOrNoSubstitutionTemplate:Rn,scanJsxIdentifier:Fo,scanJsxAttributeValue:Cn,reScanJsxAttributeValue:Ko,reScanJsxToken:bs,reScanLessThanToken:Hi,reScanHashToken:Hs,reScanQuestionToken:Wo,reScanInvalidIdentifier:xt,scanJsxToken:ts,scanJsDocToken:hi,scanJSDocCommentTextToken:ot,scan:ze,getText:Ds,clearCommentDirectives:ha,setText:Yo,setScriptTarget:fl,setLanguageVariant:St,setScriptKind:Ot,setJSDocParsingMode:xe,setOnError:ji,resetTokenState:Pt,setTextPos:Pt,setSkipJsDocLeadingAsterisks:Re,hasLeadingAsterisks:mt,tryScan:fs,lookAhead:as,scanRange:lr};return z.isDebugging&&Object.defineProperty(ue,"__debugShowCurrentPositionInText",{get:()=>{const Je=ue.getText();return Je.slice(0,ue.getTokenFullStart())+"║"+Je.slice(ue.getTokenFullStart())}}),ue;function te(Je){return YR(C,Je)}function Se(Je){return Je>=0&&Je=0&&Je=65&&$t<=70)$t+=32;else if(!($t>=48&&$t<=57||$t>=97&&$t<=102))break;Ci.push($t),b++,qt=!1}return Ci.length=T){kt+=C.substring(Ci,b),j|=4,ye(k.Unterminated_string_literal);break}const $e=oe(b);if($e===pt){kt+=C.substring(Ci,b),b++;break}if($e===92&&!Je){kt+=C.substring(Ci,b),kt+=Le(3),Ci=b;continue}if(($e===10||$e===13)&&!Je){kt+=C.substring(Ci,b),j|=4,ye(k.Unterminated_string_literal);break}b++}return kt}function Ie(Je){const pt=oe(b)===96;b++;let kt=b,Ci="",$e;for(;;){if(b>=T){Ci+=C.substring(kt,b),j|=4,ye(k.Unterminated_template_literal),$e=pt?15:18;break}const qt=oe(b);if(qt===96){Ci+=C.substring(kt,b),b++,$e=pt?15:18;break}if(qt===36&&b+1=T)return ye(k.Unexpected_end_of_text),"";const kt=oe(b);switch(b++,kt){case 48:if(b>=T||!m6(oe(b)))return"\0";case 49:case 50:case 51:b=55296&&Ci<=56319&&b+6=56320&&ii<=57343)return b=$t,$e+String.fromCharCode(ii)}return $e;case 120:for(;b1114111&&(Je&&ye(k.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive,kt,b-kt),qt=!0),b>=T?(Je&&ye(k.Unexpected_end_of_text),qt=!0):oe(b)===125?b++:(Je&&ye(k.Unterminated_Unicode_escape_sequence),qt=!0),qt?(j|=2048,C.substring(pt,b)):(j|=8,e8($e))}function He(){if(b+5=0&&YC(kt,t)){Je+=et(!0),pt=b;continue}if(kt=He(),!(kt>=0&&YC(kt,t)))break;j|=1024,Je+=C.substring(pt,b),Je+=e8(kt),b+=6,pt=b}else break}return Je+=C.substring(pt,b),Je}function Ye(){const Je=F.length;if(Je>=2&&Je<=12){const pt=F.charCodeAt(0);if(pt>=97&&pt<=122){const kt=UEt.get(F);if(kt!==void 0)return R=kt}}return R=80}function wt(Je){let pt="",kt=!1,Ci=!1;for(;;){const $e=oe(b);if($e===95){j|=512,kt?(kt=!1,Ci=!0):ye(Ci?k.Multiple_consecutive_numeric_separators_are_not_permitted:k.Numeric_separators_are_not_allowed_here,b,1),b++;continue}if(kt=!0,!m6($e)||$e-48>=Je)break;pt+=C[b],b++,Ci=!1}return oe(b-1)===95&&ye(k.Numeric_separators_are_not_allowed_here,b-1,1),pt}function nt(){return oe(b)===110?(F+="n",j&384&&(F=e7(F)+"n"),b++,10):(F=""+(j&128?parseInt(F.slice(2),2):j&256?parseInt(F.slice(2),8):+F),9)}function ze(){for(E=b,j=0,Q=!1;;){if(N=b,b>=T)return R=1;const Je=te(b);if(b===0&&Je===35&&ese(C,b)){if(b=tse(C,b),r)continue;return R=6}switch(Je){case 10:case 13:if(j|=1,r){b++;continue}else return Je===13&&b+1=0&&jy(pt,t))return F=et(!0)+Ue(),R=Ye();const kt=He();return kt>=0&&jy(kt,t)?(b+=6,j|=1024,F=String.fromCharCode(kt)+Ue(),R=Ye()):(ye(k.Invalid_character),b++,R=0);case 35:if(b!==0&&C[b+1]==="!")return ye(k.can_only_be_used_at_the_start_of_a_file,b,2),b++,R=0;const Ci=te(b+1);if(Ci===92){b++;const $t=We();if($t>=0&&jy($t,t))return F="#"+et(!0)+Ue(),R=81;const ii=He();if(ii>=0&&jy(ii,t))return b+=6,j|=1024,F="#"+String.fromCharCode(ii)+Ue(),R=81;b--}return jy(Ci,t)?(b++,Et(Ci,t)):(F="#",ye(k.Invalid_character,b++,P1(Je))),R=81;case 65533:return ye(k.File_appears_to_be_binary,0,0),b=T,R=8;default:const $e=Et(Je,t);if($e)return R=$e;if(Tv(Je)){b+=P1(Je);continue}else if(_h(Je)){j|=1,b+=P1(Je);continue}const qt=P1(Je);return ye(k.Invalid_character,b,qt),b+=qt,R=0}}}function st(){switch(Y){case 0:return!0;case 1:return!1}return re!==3&&re!==4?!0:Y===3?!1:ZEt.test(C.slice(E,b))}function xt(){z.assert(R===0,"'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."),b=N=E,j=0;const Je=te(b),pt=Et(Je,99);return pt?R=pt:(b+=P1(Je),R)}function Et(Je,pt){let kt=Je;if(jy(kt,pt)){for(b+=P1(kt);b=T)return R=1;let pt=oe(b);if(pt===60)return oe(b+1)===47?(b+=2,R=31):(b++,R=30);if(pt===123)return b++,R=19;let kt=0;for(;b0)break;Vy(pt)||(kt=b)}b++}return F=C.substring(E,b),kt===-1?13:12}function Fo(){if(Rh(R)){for(;b=T)return R=1;for(let pt=oe(b);b=0&&Tv(oe(b-1))&&!(b+1=T)return R=1;const Je=te(b);switch(b+=P1(Je),Je){case 9:case 11:case 12:case 32:for(;b=0&&jy(pt,t))return F=et(!0)+Ue(),R=Ye();const kt=He();return kt>=0&&jy(kt,t)?(b+=6,j|=1024,F=String.fromCharCode(kt)+Ue(),R=Ye()):(b++,R=0)}if(jy(Je,t)){let pt=Je;for(;b=0),b=Je,E=Je,N=Je,R=0,F=void 0,j=0}function Re(Je){q+=Je?1:-1}function mt(){return Q}}function YR(t,r){return t.codePointAt(r)}function P1(t){return t>=65536?2:t===-1?0:1}function iIt(t){if(z.assert(0<=t&&t<=1114111),t<=65535)return String.fromCharCode(t);const r=Math.floor((t-65536)/1024)+55296,a=(t-65536)%1024+56320;return String.fromCharCode(r,a)}var nIt=String.fromCodePoint?t=>String.fromCodePoint(t):iIt;function e8(t){return nIt(t)}var yqe=new Map(Object.entries({General_Category:"General_Category",gc:"General_Category",Script:"Script",sc:"Script",Script_Extensions:"Script_Extensions",scx:"Script_Extensions"})),bqe=new Set(["ASCII","ASCII_Hex_Digit","AHex","Alphabetic","Alpha","Any","Assigned","Bidi_Control","Bidi_C","Bidi_Mirrored","Bidi_M","Case_Ignorable","CI","Cased","Changes_When_Casefolded","CWCF","Changes_When_Casemapped","CWCM","Changes_When_Lowercased","CWL","Changes_When_NFKC_Casefolded","CWKCF","Changes_When_Titlecased","CWT","Changes_When_Uppercased","CWU","Dash","Default_Ignorable_Code_Point","DI","Deprecated","Dep","Diacritic","Dia","Emoji","Emoji_Component","EComp","Emoji_Modifier","EMod","Emoji_Modifier_Base","EBase","Emoji_Presentation","EPres","Extended_Pictographic","ExtPict","Extender","Ext","Grapheme_Base","Gr_Base","Grapheme_Extend","Gr_Ext","Hex_Digit","Hex","IDS_Binary_Operator","IDSB","IDS_Trinary_Operator","IDST","ID_Continue","IDC","ID_Start","IDS","Ideographic","Ideo","Join_Control","Join_C","Logical_Order_Exception","LOE","Lowercase","Lower","Math","Noncharacter_Code_Point","NChar","Pattern_Syntax","Pat_Syn","Pattern_White_Space","Pat_WS","Quotation_Mark","QMark","Radical","Regional_Indicator","RI","Sentence_Terminal","STerm","Soft_Dotted","SD","Terminal_Punctuation","Term","Unified_Ideograph","UIdeo","Uppercase","Upper","Variation_Selector","VS","White_Space","space","XID_Continue","XIDC","XID_Start","XIDS"]),Cqe=new Set(["Basic_Emoji","Emoji_Keycap_Sequence","RGI_Emoji_Modifier_Sequence","RGI_Emoji_Flag_Sequence","RGI_Emoji_Tag_Sequence","RGI_Emoji_ZWJ_Sequence","RGI_Emoji"]),DB={General_Category:new Set(["C","Other","Cc","Control","cntrl","Cf","Format","Cn","Unassigned","Co","Private_Use","Cs","Surrogate","L","Letter","LC","Cased_Letter","Ll","Lowercase_Letter","Lm","Modifier_Letter","Lo","Other_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter","M","Mark","Combining_Mark","Mc","Spacing_Mark","Me","Enclosing_Mark","Mn","Nonspacing_Mark","N","Number","Nd","Decimal_Number","digit","Nl","Letter_Number","No","Other_Number","P","Punctuation","punct","Pc","Connector_Punctuation","Pd","Dash_Punctuation","Pe","Close_Punctuation","Pf","Final_Punctuation","Pi","Initial_Punctuation","Po","Other_Punctuation","Ps","Open_Punctuation","S","Symbol","Sc","Currency_Symbol","Sk","Modifier_Symbol","Sm","Math_Symbol","So","Other_Symbol","Z","Separator","Zl","Line_Separator","Zp","Paragraph_Separator","Zs","Space_Separator"]),Script:new Set(["Adlm","Adlam","Aghb","Caucasian_Albanian","Ahom","Arab","Arabic","Armi","Imperial_Aramaic","Armn","Armenian","Avst","Avestan","Bali","Balinese","Bamu","Bamum","Bass","Bassa_Vah","Batk","Batak","Beng","Bengali","Bhks","Bhaiksuki","Bopo","Bopomofo","Brah","Brahmi","Brai","Braille","Bugi","Buginese","Buhd","Buhid","Cakm","Chakma","Cans","Canadian_Aboriginal","Cari","Carian","Cham","Cher","Cherokee","Chrs","Chorasmian","Copt","Coptic","Qaac","Cpmn","Cypro_Minoan","Cprt","Cypriot","Cyrl","Cyrillic","Deva","Devanagari","Diak","Dives_Akuru","Dogr","Dogra","Dsrt","Deseret","Dupl","Duployan","Egyp","Egyptian_Hieroglyphs","Elba","Elbasan","Elym","Elymaic","Ethi","Ethiopic","Geor","Georgian","Glag","Glagolitic","Gong","Gunjala_Gondi","Gonm","Masaram_Gondi","Goth","Gothic","Gran","Grantha","Grek","Greek","Gujr","Gujarati","Guru","Gurmukhi","Hang","Hangul","Hani","Han","Hano","Hanunoo","Hatr","Hatran","Hebr","Hebrew","Hira","Hiragana","Hluw","Anatolian_Hieroglyphs","Hmng","Pahawh_Hmong","Hmnp","Nyiakeng_Puachue_Hmong","Hrkt","Katakana_Or_Hiragana","Hung","Old_Hungarian","Ital","Old_Italic","Java","Javanese","Kali","Kayah_Li","Kana","Katakana","Kawi","Khar","Kharoshthi","Khmr","Khmer","Khoj","Khojki","Kits","Khitan_Small_Script","Knda","Kannada","Kthi","Kaithi","Lana","Tai_Tham","Laoo","Lao","Latn","Latin","Lepc","Lepcha","Limb","Limbu","Lina","Linear_A","Linb","Linear_B","Lisu","Lyci","Lycian","Lydi","Lydian","Mahj","Mahajani","Maka","Makasar","Mand","Mandaic","Mani","Manichaean","Marc","Marchen","Medf","Medefaidrin","Mend","Mende_Kikakui","Merc","Meroitic_Cursive","Mero","Meroitic_Hieroglyphs","Mlym","Malayalam","Modi","Mong","Mongolian","Mroo","Mro","Mtei","Meetei_Mayek","Mult","Multani","Mymr","Myanmar","Nagm","Nag_Mundari","Nand","Nandinagari","Narb","Old_North_Arabian","Nbat","Nabataean","Newa","Nkoo","Nko","Nshu","Nushu","Ogam","Ogham","Olck","Ol_Chiki","Orkh","Old_Turkic","Orya","Oriya","Osge","Osage","Osma","Osmanya","Ougr","Old_Uyghur","Palm","Palmyrene","Pauc","Pau_Cin_Hau","Perm","Old_Permic","Phag","Phags_Pa","Phli","Inscriptional_Pahlavi","Phlp","Psalter_Pahlavi","Phnx","Phoenician","Plrd","Miao","Prti","Inscriptional_Parthian","Rjng","Rejang","Rohg","Hanifi_Rohingya","Runr","Runic","Samr","Samaritan","Sarb","Old_South_Arabian","Saur","Saurashtra","Sgnw","SignWriting","Shaw","Shavian","Shrd","Sharada","Sidd","Siddham","Sind","Khudawadi","Sinh","Sinhala","Sogd","Sogdian","Sogo","Old_Sogdian","Sora","Sora_Sompeng","Soyo","Soyombo","Sund","Sundanese","Sylo","Syloti_Nagri","Syrc","Syriac","Tagb","Tagbanwa","Takr","Takri","Tale","Tai_Le","Talu","New_Tai_Lue","Taml","Tamil","Tang","Tangut","Tavt","Tai_Viet","Telu","Telugu","Tfng","Tifinagh","Tglg","Tagalog","Thaa","Thaana","Thai","Tibt","Tibetan","Tirh","Tirhuta","Tnsa","Tangsa","Toto","Ugar","Ugaritic","Vaii","Vai","Vith","Vithkuqi","Wara","Warang_Citi","Wcho","Wancho","Xpeo","Old_Persian","Xsux","Cuneiform","Yezi","Yezidi","Yiii","Yi","Zanb","Zanabazar_Square","Zinh","Inherited","Qaai","Zyyy","Common","Zzzz","Unknown"]),Script_Extensions:void 0};DB.Script_Extensions=DB.Script;function Zd(t){return cg(t)||Sp(t)}function v6(t){return fr(t,q8,YJ)}function EB(t){switch(il(t)){case 99:return"lib.esnext.full.d.ts";case 10:return"lib.es2023.full.d.ts";case 9:return"lib.es2022.full.d.ts";case 8:return"lib.es2021.full.d.ts";case 7:return"lib.es2020.full.d.ts";case 6:return"lib.es2019.full.d.ts";case 5:return"lib.es2018.full.d.ts";case 4:return"lib.es2017.full.d.ts";case 3:return"lib.es2016.full.d.ts";case 2:return"lib.es6.d.ts";default:return"lib.d.ts"}}function zu(t){return t.start+t.length}function OSe(t){return t.length===0}function nse(t,r){return r>=t.start&&r=t.pos&&r<=t.end}function MSe(t,r){return r.start>=t.start&&zu(r)<=zu(t)}function Sqe(t,r){return RSe(t,r)!==void 0}function RSe(t,r){const a=BSe(t,r);return a&&a.length===0?void 0:a}function wqe(t,r){return NB(t.start,t.length,r.start,r.length)}function E$(t,r,a){return NB(t.start,t.length,r,a)}function NB(t,r,a,u){const h=t+r,p=a+u;return a<=h&&p>=t}function FSe(t,r){return r<=zu(t)&&r>=t.start}function BSe(t,r){const a=Math.max(t.start,r.start),u=Math.min(zu(t),zu(r));return a<=u?sd(a,u):void 0}function Pf(t,r){if(t<0)throw new Error("start < 0");if(r<0)throw new Error("length < 0");return{start:t,length:r}}function sd(t,r){return Pf(t,r-t)}function t8(t){return Pf(t.span.start,t.newLength)}function WSe(t){return OSe(t.span)&&t.newLength===0}function LB(t,r){if(r<0)throw new Error("newLength < 0");return{span:t,newLength:r}}var I$=LB(Pf(0,0),0);function VSe(t){if(t.length===0)return I$;if(t.length===1)return t[0];const r=t[0];let a=r.span.start,u=zu(r.span),h=a+r.newLength;for(let p=1;p=2&&t.charCodeAt(0)===95&&t.charCodeAt(1)===95?"_"+t:t}function Ws(t){const r=t;return r.length>=3&&r.charCodeAt(0)===95&&r.charCodeAt(1)===95&&r.charCodeAt(2)===95?r.substr(1):r}function dr(t){return Ws(t.escapedText)}function QE(t){const r=bT(t.escapedText);return r?$r(r,d_):void 0}function xu(t){return t.valueDeclaration&&Fh(t.valueDeclaration)?dr(t.valueDeclaration.name):Ws(t.escapedName)}function kqe(t){const r=t.parent.parent;if(r){if(Yf(r))return ose(r);switch(r.kind){case 243:if(r.declarationList&&r.declarationList.declarations[0])return ose(r.declarationList.declarations[0]);break;case 244:let a=r.expression;switch(a.kind===226&&a.operatorToken.kind===64&&(a=a.left),a.kind){case 211:return a.name;case 212:const u=a.argumentExpression;if(lt(u))return u}break;case 217:return ose(r.expression);case 256:{if(Yf(r.statement)||Ut(r.statement))return ose(r.statement);break}}}}function ose(t){const r=ko(t);return r&<(r)?r:void 0}function PB(t,r){return!!(Af(t)&<(t.name)&&dr(t.name)===dr(r)||Ou(t)&&Rt(t.declarationList.declarations,a=>PB(a,r)))}function qSe(t){return t.name||kqe(t)}function Af(t){return!!t.name}function N$(t){switch(t.kind){case 80:return t;case 348:case 341:{const{name:a}=t;if(a.kind===166)return a.right;break}case 213:case 226:{const a=t;switch(Lu(a)){case 1:case 4:case 5:case 3:return kJ(a.left);case 7:case 8:case 9:return a.arguments[1];default:return}}case 346:return qSe(t);case 340:return kqe(t);case 277:{const{expression:a}=t;return lt(a)?a:void 0}case 212:const r=t;if(xJ(r))return r.argumentExpression}return t.name}function ko(t){if(t!==void 0)return N$(t)||(gc(t)||Dc(t)||wd(t)?L$(t):void 0)}function L$(t){if(t.parent){if(pd(t.parent)||nl(t.parent))return t.parent.name;if(cr(t.parent)&&t===t.parent.right){if(lt(t.parent.left))return t.parent.left;if(Sc(t.parent.left))return kJ(t.parent.left)}else if(ds(t.parent)&<(t.parent.name))return t.parent.name}else return}function Fw(t){if(dg(t))return Ri(t.modifiers,jd)}function CT(t){if(Kr(t,98303))return Ri(t.modifiers,Ra)}function Tqe(t,r){if(t.name)if(lt(t.name)){const a=t.name.escapedText;return OB(t.parent,r).filter(u=>em(u)&<(u.name)&&u.name.escapedText===a)}else{const a=t.parent.parameters.indexOf(t);z.assert(a>-1,"Parameters should always be in their parents' parameter list");const u=OB(t.parent,r).filter(em);if(aRm(u)&&u.typeParameters.some(h=>h.name.escapedText===a))}function JSe(t){return Dqe(t,!1)}function GSe(t){return Dqe(t,!0)}function KSe(t){return!!km(t,em)}function QSe(t){return km(t,AP)}function XSe(t){return A$(t,QG)}function ase(t){return km(t,lTe)}function Eqe(t){return km(t,Wae)}function ZSe(t){return km(t,Wae,!0)}function Iqe(t){return km(t,Vae)}function YSe(t){return km(t,Vae,!0)}function Nqe(t){return km(t,Hae)}function ewe(t){return km(t,Hae,!0)}function Lqe(t){return km(t,jae)}function twe(t){return km(t,jae,!0)}function iwe(t){return km(t,GG,!0)}function lse(t){return km(t,zae)}function nwe(t){return km(t,zae,!0)}function cse(t){return km(t,pV)}function P$(t){return km(t,Uae)}function rwe(t){return km(t,KG)}function Pqe(t){return km(t,Rm)}function use(t){return km(t,XG)}function xk(t){const r=km(t,w7);if(r&&r.typeExpression&&r.typeExpression.type)return r}function kk(t){let r=km(t,w7);return!r&&Gs(t)&&(r=Me(b6(t),a=>!!a.typeExpression)),r&&r.typeExpression&&r.typeExpression.type}function AB(t){const r=rwe(t);if(r&&r.typeExpression)return r.typeExpression.type;const a=xk(t);if(a&&a.typeExpression){const u=a.typeExpression.type;if(p_(u)){const h=Me(u.members,xP);return h&&h.type}if(W1(u)||c3(u))return u.type}}function OB(t,r){var a;if(!kW(t))return x;let u=(a=t.jsDoc)==null?void 0:a.jsDocCache;if(u===void 0||r){const h=noe(t,r);z.assert(h.length<2||h[0]!==h[1]),u=Ln(h,p=>G0(p)?p.tags:p),r||(t.jsDoc??(t.jsDoc=[]),t.jsDoc.jsDocCache=u)}return u}function Tk(t){return OB(t,!1)}function Aqe(t){return OB(t,!0)}function km(t,r,a){return Me(OB(t,a),r)}function A$(t,r){return Tk(t).filter(r)}function Oqe(t,r){return Tk(t).filter(a=>a.kind===r)}function MB(t){return typeof t=="string"?t:t==null?void 0:t.map(r=>r.kind===321?r.text:sIt(r)).join("")}function sIt(t){const r=t.kind===324?"link":t.kind===325?"linkcode":"linkplain",a=t.name?kp(t.name):"",u=t.name&&(t.text===""||t.text.startsWith("://"))?"":" ";return`{@${r} ${a}${u}${t.text}}`}function Bw(t){if(Qb(t)){if(u3(t.parent)){const r=W6(t.parent);if(r&&O(r.tags))return Ln(r.tags,a=>Rm(a)?a.typeParameters:void 0)}return x}if(Em(t))return z.assert(t.parent.kind===320),Ln(t.parent.tags,r=>Rm(r)?r.typeParameters:void 0);if(t.typeParameters||CTe(t)&&t.typeParameters)return t.typeParameters;if(Xn(t)){const r=WJ(t);if(r.length)return r;const a=kk(t);if(a&&W1(a)&&a.typeParameters)return a.typeParameters}return x}function C6(t){return t.constraint?t.constraint:Rm(t.parent)&&t===t.parent.typeParameters[0]?t.parent.constraint:void 0}function Uy(t){return t.kind===80||t.kind===81}function RB(t){return t.kind===178||t.kind===177}function O$(t){return Ir(t)&&!!(t.flags&64)}function dse(t){return wc(t)&&!!(t.flags&64)}function XE(t){return sa(t)&&!!(t.flags&64)}function ph(t){const r=t.kind;return!!(t.flags&64)&&(r===211||r===212||r===213||r===235)}function n8(t){return ph(t)&&!NP(t)&&!!t.questionDotToken}function M$(t){return n8(t.parent)&&t.parent.expression===t}function r8(t){return!ph(t.parent)||n8(t.parent)||t!==t.parent.expression}function fse(t){return t.kind===226&&t.operatorToken.kind===61}function V0(t){return _g(t)&<(t.typeName)&&t.typeName.escapedText==="const"&&!t.typeArguments}function u0(t){return ld(t,8)}function R$(t){return NP(t)&&!!(t.flags&64)}function s8(t){return t.kind===252||t.kind===251}function hse(t){return t.kind===280||t.kind===279}function o8(t){return t.kind===348||t.kind===341}function Mqe(t){return FB(t.kind)}function FB(t){return t>=166}function _se(t){return t>=0&&t<=165}function RL(t){return _se(t.kind)}function ST(t){return Vl(t,"pos")&&Vl(t,"end")}function a8(t){return 9<=t&&t<=15}function wT(t){return a8(t.kind)}function pse(t){switch(t.kind){case 210:case 209:case 14:case 218:case 231:return!0}return!1}function Ww(t){return 15<=t&&t<=18}function swe(t){return Ww(t.kind)}function F$(t){const r=t.kind;return r===17||r===18}function FL(t){return m_(t)||gh(t)}function l8(t){switch(t.kind){case 276:return t.isTypeOnly||t.parent.parent.isTypeOnly;case 274:return t.parent.isTypeOnly;case 273:case 271:return t.isTypeOnly}return!1}function owe(t){switch(t.kind){case 281:return t.isTypeOnly||t.parent.parent.isTypeOnly;case 278:return t.isTypeOnly&&!!t.moduleSpecifier&&!t.exportClause;case 280:return t.parent.isTypeOnly}return!1}function Dk(t){return l8(t)||owe(t)}function gse(t){return t.kind===11||Ww(t.kind)}function awe(t){return ja(t)||lt(t)}function jc(t){var r;return lt(t)&&((r=t.emitNode)==null?void 0:r.autoGenerate)!==void 0}function ZE(t){var r;return Vs(t)&&((r=t.emitNode)==null?void 0:r.autoGenerate)!==void 0}function BB(t){const r=t.emitNode.autoGenerate.flags;return!!(r&32)&&!!(r&16)&&!!(r&8)}function Fh(t){return(To(t)||WL(t))&&Vs(t.name)}function S6(t){return Ir(t)&&Vs(t.name)}function eS(t){switch(t){case 128:case 129:case 134:case 87:case 138:case 90:case 95:case 103:case 125:case 123:case 124:case 148:case 126:case 147:case 164:return!0}return!1}function c8(t){return!!(iP(t)&31)}function mse(t){return c8(t)||t===126||t===164||t===129}function Ra(t){return eS(t.kind)}function A_(t){const r=t.kind;return r===166||r===80}function od(t){const r=t.kind;return r===80||r===81||r===11||r===9||r===167}function YE(t){const r=t.kind;return r===80||r===206||r===207}function Bo(t){return!!t&&BL(t.kind)}function w6(t){return!!t&&(BL(t.kind)||bu(t))}function rc(t){return t&&Rqe(t.kind)}function u8(t){return t.kind===112||t.kind===97}function Rqe(t){switch(t){case 262:case 174:case 176:case 177:case 178:case 218:case 219:return!0;default:return!1}}function BL(t){switch(t){case 173:case 179:case 323:case 180:case 181:case 184:case 317:case 185:return!0;default:return Rqe(t)}}function vse(t){return Ns(t)||jv(t)||Ho(t)&&Bo(t.parent)}function Vd(t){const r=t.kind;return r===176||r===172||r===174||r===177||r===178||r===181||r===175||r===240}function ss(t){return t&&(t.kind===263||t.kind===231)}function Vw(t){return t&&(t.kind===177||t.kind===178)}function O_(t){return To(t)&&Mv(t)}function lwe(t){return Xn(t)&&_P(t)?(!PT(t)||!$w(t.expression))&&!aI(t,!0):t.parent&&ss(t.parent)&&To(t)&&!Mv(t)}function WL(t){switch(t.kind){case 174:case 177:case 178:return!0;default:return!1}}function Fqe(t){switch(t.kind){case 174:case 177:case 178:case 172:return!0;default:return!1}}function zc(t){return Ra(t)||jd(t)}function xT(t){const r=t.kind;return r===180||r===179||r===171||r===173||r===181||r===177||r===178}function B$(t){return xT(t)||Vd(t)}function Fb(t){const r=t.kind;return r===303||r===304||r===305||r===174||r===177||r===178}function gs(t){return joe(t.kind)}function cwe(t){switch(t.kind){case 184:case 185:return!0}return!1}function Qo(t){if(t){const r=t.kind;return r===207||r===206}return!1}function d8(t){const r=t.kind;return r===209||r===210}function W$(t){const r=t.kind;return r===208||r===232}function WB(t){switch(t.kind){case 260:case 169:case 208:return!0}return!1}function uwe(t){return ds(t)||Gs(t)||HB(t)||jB(t)}function VB(t){return yse(t)||bse(t)}function yse(t){switch(t.kind){case 206:case 210:return!0}return!1}function HB(t){switch(t.kind){case 208:case 303:case 304:case 305:return!0}return!1}function bse(t){switch(t.kind){case 207:case 209:return!0}return!1}function jB(t){switch(t.kind){case 208:case 232:case 230:case 209:case 210:case 80:case 211:case 212:return!0}return Yd(t,!0)}function dwe(t){const r=t.kind;return r===211||r===166||r===205}function zB(t){const r=t.kind;return r===211||r===166}function Cse(t){return kT(t)||Qw(t)}function kT(t){switch(t.kind){case 286:case 285:case 213:case 214:case 215:case 170:return!0;default:return!1}}function Dv(t){return t.kind===213||t.kind===214}function VL(t){const r=t.kind;return r===228||r===15}function M_(t){return Bqe(u0(t).kind)}function Bqe(t){switch(t){case 211:case 212:case 214:case 213:case 284:case 285:case 288:case 215:case 209:case 217:case 210:case 231:case 218:case 80:case 81:case 14:case 9:case 10:case 11:case 15:case 228:case 97:case 106:case 110:case 112:case 108:case 235:case 233:case 236:case 102:case 282:return!0;default:return!1}}function Sse(t){return Wqe(u0(t).kind)}function Wqe(t){switch(t){case 224:case 225:case 220:case 221:case 222:case 223:case 216:return!0;default:return Bqe(t)}}function fwe(t){switch(t.kind){case 225:return!0;case 224:return t.operator===46||t.operator===47;default:return!1}}function hwe(t){switch(t.kind){case 106:case 112:case 97:case 224:return!0;default:return wT(t)}}function Ut(t){return oIt(u0(t).kind)}function oIt(t){switch(t){case 227:case 229:case 219:case 226:case 230:case 234:case 232:case 355:case 354:case 238:return!0;default:return Wqe(t)}}function Ek(t){const r=t.kind;return r===216||r===234}function Vqe(t){return Rae(t)||UG(t)}function Hw(t,r){switch(t.kind){case 248:case 249:case 250:case 246:case 247:return!0;case 256:return r&&Hw(t.statement,r)}return!1}function _we(t){return Ec(t)||$u(t)}function pwe(t){return Rt(t,_we)}function V$(t){return!ZB(t)&&!Ec(t)&&!Kr(t,32)&&!Bh(t)}function UB(t){return ZB(t)||Ec(t)||Kr(t,32)}function eI(t){return t.kind===249||t.kind===250}function H$(t){return Ho(t)||Ut(t)}function wse(t){return Ho(t)}function $g(t){return wf(t)||Ut(t)}function gwe(t){const r=t.kind;return r===268||r===267||r===80}function Hqe(t){const r=t.kind;return r===268||r===267}function jqe(t){const r=t.kind;return r===80||r===267}function xse(t){const r=t.kind;return r===275||r===274}function qB(t){return t.kind===267||t.kind===266}function H0(t){switch(t.kind){case 219:case 226:case 208:case 213:case 179:case 263:case 231:case 175:case 176:case 185:case 180:case 212:case 266:case 306:case 277:case 278:case 281:case 262:case 218:case 184:case 177:case 80:case 273:case 271:case 276:case 181:case 264:case 338:case 340:case 317:case 341:case 348:case 323:case 346:case 322:case 291:case 292:case 293:case 200:case 174:case 173:case 267:case 202:case 280:case 270:case 274:case 214:case 15:case 9:case 210:case 169:case 211:case 303:case 172:case 171:case 178:case 304:case 307:case 305:case 11:case 265:case 187:case 168:case 260:return!0;default:return!1}}function A1(t){switch(t.kind){case 219:case 241:case 179:case 269:case 299:case 175:case 194:case 176:case 185:case 180:case 248:case 249:case 250:case 262:case 218:case 184:case 177:case 181:case 338:case 340:case 317:case 323:case 346:case 200:case 174:case 173:case 267:case 178:case 307:case 265:return!0;default:return!1}}function aIt(t){return t===219||t===208||t===263||t===231||t===175||t===176||t===266||t===306||t===281||t===262||t===218||t===177||t===273||t===271||t===276||t===264||t===291||t===174||t===173||t===267||t===270||t===274||t===280||t===169||t===303||t===172||t===171||t===178||t===304||t===265||t===168||t===260||t===346||t===338||t===348||t===202}function mwe(t){return t===262||t===282||t===263||t===264||t===265||t===266||t===267||t===272||t===271||t===278||t===277||t===270}function vwe(t){return t===252||t===251||t===259||t===246||t===244||t===242||t===249||t===250||t===248||t===245||t===256||t===253||t===255||t===257||t===258||t===243||t===247||t===254||t===353}function Yf(t){return t.kind===168?t.parent&&t.parent.kind!==345||Xn(t):aIt(t.kind)}function ywe(t){return mwe(t.kind)}function $B(t){return vwe(t.kind)}function Es(t){const r=t.kind;return vwe(r)||mwe(r)||lIt(t)}function lIt(t){return t.kind!==241||t.parent!==void 0&&(t.parent.kind===258||t.parent.kind===299)?!1:!IT(t)}function bwe(t){const r=t.kind;return vwe(r)||mwe(r)||r===241}function Cwe(t){const r=t.kind;return r===283||r===166||r===80}function f8(t){const r=t.kind;return r===110||r===80||r===211||r===295}function JB(t){const r=t.kind;return r===284||r===294||r===285||r===12||r===288}function j$(t){const r=t.kind;return r===291||r===293}function Swe(t){const r=t.kind;return r===11||r===294}function eh(t){const r=t.kind;return r===286||r===285}function z$(t){const r=t.kind;return r===296||r===297}function x6(t){return t.kind>=309&&t.kind<=351}function U$(t){return t.kind===320||t.kind===319||t.kind===321||HL(t)||k6(t)||bI(t)||Qb(t)}function k6(t){return t.kind>=327&&t.kind<=351}function Ev(t){return t.kind===178}function tS(t){return t.kind===177}function Jp(t){if(!kW(t))return!1;const{jsDoc:r}=t;return!!r&&r.length>0}function q$(t){return!!t.type}function iS(t){return!!t.initializer}function tI(t){switch(t.kind){case 260:case 169:case 208:case 172:case 303:case 306:return!0;default:return!1}}function kse(t){return t.kind===291||t.kind===293||Fb(t)}function $$(t){return t.kind===183||t.kind===233}var zqe=1073741823;function wwe(t){let r=zqe;for(const a of t){if(!a.length)continue;let u=0;for(;u0?a.parent.parameters[h-1]:void 0,m=r.text,C=p?no(Rw(m,qa(m,p.end+1,!1,!0)),Hy(m,t.pos)):Rw(m,qa(m,t.pos,!1,!0));return Rt(C)&&Uqe(La(C),r)}const u=a&&$se(a,r);return!!W(u,h=>Uqe(h,r))}var Dse=[],Ik="tslib",h8=160,Ese=1e6;function Jc(t,r){const a=t.declarations;if(a){for(const u of a)if(u.kind===r)return u}}function kwe(t,r){return Ri(t.declarations||x,a=>a.kind===r)}function ga(t){const r=new Map;if(t)for(const a of t)r.set(a.escapedName,a);return r}function M1(t){return(t.flags&33554432)!==0}function T6(t){return!!(t.flags&1536)&&t.escapedName.charCodeAt(0)===34}var J$=cIt();function cIt(){var t="";const r=a=>t+=a;return{getText:()=>t,write:r,rawWrite:r,writeKeyword:r,writeOperator:r,writePunctuation:r,writeSpace:r,writeStringLiteral:r,writeLiteral:r,writeParameter:r,writeProperty:r,writeSymbol:(a,u)=>r(a),writeTrailingSemicolon:r,writeComment:r,getTextPos:()=>t.length,getLine:()=>0,getColumn:()=>0,getIndent:()=>0,isAtStartOfLine:()=>!1,hasTrailingComment:()=>!1,hasTrailingWhitespace:()=>!!t.length&&Vy(t.charCodeAt(t.length-1)),writeLine:()=>t+=" ",increaseIndent:dl,decreaseIndent:dl,clear:()=>t=""}}function G$(t,r){return t.configFilePath!==r.configFilePath||Twe(t,r)}function Twe(t,r){return D6(t,r,hle)}function Dwe(t,r){return D6(t,r,zTe)}function D6(t,r,a){return t!==r&&a.some(u=>!vG(rG(t,u),rG(r,u)))}function Ewe(t,r){for(;;){const a=r(t);if(a==="quit")return;if(a!==void 0)return a;if(Ns(t))return;t=t.parent}}function hf(t,r){const a=t.entries();for(const[u,h]of a){const p=r(h,u);if(p)return p}}function Bb(t,r){const a=t.keys();for(const u of a){const h=r(u);if(h)return h}}function K$(t,r){t.forEach((a,u)=>{r.set(u,a)})}function _8(t){const r=J$.getText();try{return t(J$),J$.getText()}finally{J$.clear(),J$.writeKeyword(r)}}function GB(t){return t.end-t.pos}function Ise(t,r){return t.path===r.path&&!t.prepend==!r.prepend&&!t.circular==!r.circular}function Iwe(t,r){return t===r||t.resolvedModule===r.resolvedModule||!!t.resolvedModule&&!!r.resolvedModule&&t.resolvedModule.isExternalLibraryImport===r.resolvedModule.isExternalLibraryImport&&t.resolvedModule.extension===r.resolvedModule.extension&&t.resolvedModule.resolvedFileName===r.resolvedModule.resolvedFileName&&t.resolvedModule.originalPath===r.resolvedModule.originalPath&&uIt(t.resolvedModule.packageId,r.resolvedModule.packageId)&&t.alternateResult===r.alternateResult}function Q$(t,r,a,u,h){var p;const m=(p=r.getResolvedModule(t,a,u))==null?void 0:p.alternateResult,C=m&&(f_(r.getCompilerOptions())===2?[k.There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler,[m]]:[k.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings,[m,m.includes(nb+"@types/")?`@types/${C3(h)}`:h]]),b=C?Ro(void 0,C[0],...C[1]):r.typesPackageExists(h)?Ro(void 0,k.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1,h,C3(h)):r.packageBundlesTypes(h)?Ro(void 0,k.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1,h,a):Ro(void 0,k.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,a,C3(h));return b&&(b.repopulateInfo=()=>({moduleReference:a,mode:u,packageName:h===a?void 0:h})),b}function uIt(t,r){return t===r||!!t&&!!r&&t.name===r.name&&t.subModuleName===r.subModuleName&&t.version===r.version&&t.peerDependencies===r.peerDependencies}function X$({name:t,subModuleName:r}){return r?`${t}/${r}`:t}function jw(t){return`${X$(t)}@${t.version}${t.peerDependencies??""}`}function Nwe(t,r){return t===r||t.resolvedTypeReferenceDirective===r.resolvedTypeReferenceDirective||!!t.resolvedTypeReferenceDirective&&!!r.resolvedTypeReferenceDirective&&t.resolvedTypeReferenceDirective.resolvedFileName===r.resolvedTypeReferenceDirective.resolvedFileName&&!!t.resolvedTypeReferenceDirective.primary==!!r.resolvedTypeReferenceDirective.primary&&t.resolvedTypeReferenceDirective.originalPath===r.resolvedTypeReferenceDirective.originalPath}function Nse(t,r,a,u){z.assert(t.length===r.length);for(let h=0;h=0),Wy(r)[t]}function qqe(t){const r=_n(t),a=Da(r,t.pos);return`${r.fileName}(${a.line+1},${a.character+1})`}function KB(t,r){z.assert(t>=0);const a=Wy(r),u=t,h=r.text;if(u+1===a.length)return h.length-1;{const p=a[u];let m=a[u+1]-1;for(z.assert(_h(h.charCodeAt(m)));p<=m&&_h(h.charCodeAt(m));)m--;return m}}function Y$(t,r,a){return!(a&&a(r))&&!t.identifiers.has(r)}function vu(t){return t===void 0?!0:t.pos===t.end&&t.pos>=0&&t.kind!==1}function Tm(t){return!vu(t)}function Pwe(t,r){return Uc(t)?r===t.expression:bu(t)?r===t.modifiers:V_(t)?r===t.initializer:To(t)?r===t.questionToken&&O_(t):pd(t)?r===t.modifiers||r===t.questionToken||r===t.exclamationToken||QB(t.modifiers,r,zc):ih(t)?r===t.equalsToken||r===t.modifiers||r===t.questionToken||r===t.exclamationToken||QB(t.modifiers,r,zc):Au(t)?r===t.exclamationToken:fu(t)?r===t.typeParameters||r===t.type||QB(t.typeParameters,r,Uc):hg(t)?r===t.typeParameters||QB(t.typeParameters,r,Uc):Np(t)?r===t.typeParameters||r===t.type||QB(t.typeParameters,r,Uc):_V(t)?r===t.modifiers||QB(t.modifiers,r,zc):!1}function QB(t,r,a){return!t||Lo(r)||!a(r)?!1:Mt(t,r)}function $qe(t,r,a){if(r===void 0||r.length===0)return t;let u=0;for(;u[`${Da(t,m.range.end).line}`,m])),u=new Map;return{getUnusedExpectations:h,markUsed:p};function h(){return Fn(a.entries()).filter(([m,C])=>C.type===0&&!u.get(m)).map(([m,C])=>C)}function p(m){return a.has(`${m}`)?(u.set(`${m}`,!0),!0):!1}}function Nk(t,r,a){if(vu(t))return t.pos;if(x6(t)||t.kind===12)return qa((r??_n(t)).text,t.pos,!1,!0);if(a&&Jp(t))return Nk(t.jsDoc[0],r);if(t.kind===352){r??(r=_n(t));const u=lu(qae(t,r));if(u)return Nk(u,r,a)}return qa((r??_n(t)).text,t.pos,!1,!1,dW(t))}function Ase(t,r){const a=!vu(t)&&_0(t)?vt(t.modifiers,jd):void 0;return a?qa((r||_n(t)).text,a.end):Nk(t,r)}function TT(t,r,a=!1){return g8(t.text,r,a)}function fIt(t){return!!Xi(t,qk)}function tJ(t){return!!($u(t)&&t.exportClause&&H1(t.exportClause)&&t.exportClause.name.escapedText==="default")}function g8(t,r,a=!1){if(vu(r))return"";let u=t.substring(a?r.pos:qa(t,r.pos),r.end);return fIt(r)&&(u=u.split(/\r\n|\n|\r/).map(h=>h.replace(/^\s*\*/,"").trimStart()).join(` +`)),u}function yu(t,r=!1){return TT(_n(t),t,r)}function hIt(t){return t.pos}function I6(t,r){return Fy(t,r,hIt,hc)}function Ya(t){const r=t.emitNode;return r&&r.flags||0}function d0(t){const r=t.emitNode;return r&&r.internalFlags||0}var Ose=l_(()=>new Map(Object.entries({Array:new Map(Object.entries({es2015:["find","findIndex","fill","copyWithin","entries","keys","values"],es2016:["includes"],es2019:["flat","flatMap"],es2022:["at"],es2023:["findLastIndex","findLast"]})),Iterator:new Map(Object.entries({es2015:x})),AsyncIterator:new Map(Object.entries({es2015:x})),Atomics:new Map(Object.entries({es2017:x})),SharedArrayBuffer:new Map(Object.entries({es2017:x})),AsyncIterable:new Map(Object.entries({es2018:x})),AsyncIterableIterator:new Map(Object.entries({es2018:x})),AsyncGenerator:new Map(Object.entries({es2018:x})),AsyncGeneratorFunction:new Map(Object.entries({es2018:x})),RegExp:new Map(Object.entries({es2015:["flags","sticky","unicode"],es2018:["dotAll"]})),Reflect:new Map(Object.entries({es2015:["apply","construct","defineProperty","deleteProperty","get","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"]})),ArrayConstructor:new Map(Object.entries({es2015:["from","of"],esnext:["fromAsync"]})),ObjectConstructor:new Map(Object.entries({es2015:["assign","getOwnPropertySymbols","keys","is","setPrototypeOf"],es2017:["values","entries","getOwnPropertyDescriptors"],es2019:["fromEntries"],es2022:["hasOwn"]})),NumberConstructor:new Map(Object.entries({es2015:["isFinite","isInteger","isNaN","isSafeInteger","parseFloat","parseInt"]})),Math:new Map(Object.entries({es2015:["clz32","imul","sign","log10","log2","log1p","expm1","cosh","sinh","tanh","acosh","asinh","atanh","hypot","trunc","fround","cbrt"]})),Map:new Map(Object.entries({es2015:["entries","keys","values"]})),Set:new Map(Object.entries({es2015:["entries","keys","values"]})),PromiseConstructor:new Map(Object.entries({es2015:["all","race","reject","resolve"],es2020:["allSettled"],es2021:["any"]})),Symbol:new Map(Object.entries({es2015:["for","keyFor"],es2019:["description"]})),WeakMap:new Map(Object.entries({es2015:["entries","keys","values"]})),WeakSet:new Map(Object.entries({es2015:["entries","keys","values"]})),String:new Map(Object.entries({es2015:["codePointAt","includes","endsWith","normalize","repeat","startsWith","anchor","big","blink","bold","fixed","fontcolor","fontsize","italics","link","small","strike","sub","sup"],es2017:["padStart","padEnd"],es2019:["trimStart","trimEnd","trimLeft","trimRight"],es2020:["matchAll"],es2021:["replaceAll"],es2022:["at"],esnext:["isWellFormed","toWellFormed"]})),StringConstructor:new Map(Object.entries({es2015:["fromCodePoint","raw"]})),DateTimeFormat:new Map(Object.entries({es2017:["formatToParts"]})),Promise:new Map(Object.entries({es2015:x,es2018:["finally"]})),RegExpMatchArray:new Map(Object.entries({es2018:["groups"]})),RegExpExecArray:new Map(Object.entries({es2018:["groups"]})),Intl:new Map(Object.entries({es2018:["PluralRules"]})),NumberFormat:new Map(Object.entries({es2018:["formatToParts"]})),SymbolConstructor:new Map(Object.entries({es2020:["matchAll"]})),DataView:new Map(Object.entries({es2020:["setBigInt64","setBigUint64","getBigInt64","getBigUint64"]})),BigInt:new Map(Object.entries({es2020:x})),RelativeTimeFormat:new Map(Object.entries({es2020:["format","formatToParts","resolvedOptions"]})),Int8Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Uint8Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Uint8ClampedArray:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Int16Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Uint16Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Int32Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Uint32Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Float32Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Float64Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),BigInt64Array:new Map(Object.entries({es2020:x,es2022:["at"],es2023:["findLastIndex","findLast"]})),BigUint64Array:new Map(Object.entries({es2020:x,es2022:["at"],es2023:["findLastIndex","findLast"]})),Error:new Map(Object.entries({es2022:["cause"]}))}))),Owe=(t=>(t[t.None=0]="None",t[t.NeverAsciiEscape=1]="NeverAsciiEscape",t[t.JsxAttributeEscape=2]="JsxAttributeEscape",t[t.TerminateUnterminatedLiterals=4]="TerminateUnterminatedLiterals",t[t.AllowNumericSeparator=8]="AllowNumericSeparator",t))(Owe||{});function Mwe(t,r,a){if(r&&_It(t,a))return TT(r,t);switch(t.kind){case 11:{const u=a&2?Coe:a&1||Ya(t)&16777216?B1:LJ;return t.singleQuote?"'"+u(t.text,39)+"'":'"'+u(t.text,34)+'"'}case 15:case 16:case 17:case 18:{const u=a&1||Ya(t)&16777216?B1:LJ,h=t.rawText??yoe(u(t.text,96));switch(t.kind){case 15:return"`"+h+"`";case 16:return"`"+h+"${";case 17:return"}"+h+"${";case 18:return"}"+h+"`"}break}case 9:case 10:return t.text;case 14:return a&4&&t.isUnterminated?t.text+(t.text.charCodeAt(t.text.length-1)===92?" /":"/"):t.text}return z.fail(`Literal kind '${t.kind}' not accounted for.`)}function _It(t,r){if(oc(t)||!t.parent||r&4&&t.isUnterminated)return!1;if(W_(t)){if(t.numericLiteralFlags&26656)return!1;if(t.numericLiteralFlags&512)return!!(r&8)}return!lV(t)}function Rwe(t){return mo(t)?`"${B1(t)}"`:""+t}function Fwe(t){return fd(t).replace(/^(\d)/,"_$1").replace(/\W/g,"_")}function Mse(t){return(Rb(t)&7)!==0||Rse(t)}function Rse(t){const r=Ov(t);return r.kind===260&&r.parent.kind===299}function Bh(t){return qu(t)&&(t.name.kind===11||Iv(t))}function iJ(t){return qu(t)&&t.name.kind===11}function Fse(t){return qu(t)&&ja(t.name)}function Bwe(t){return qu(t)||lt(t)}function XB(t){return pIt(t.valueDeclaration)}function pIt(t){return!!t&&t.kind===267&&!t.body}function Wwe(t){return t.kind===307||t.kind===267||w6(t)}function Iv(t){return!!(t.flags&2048)}function DT(t){return Bh(t)&&Bse(t)}function Bse(t){switch(t.parent.kind){case 307:return Td(t.parent);case 268:return Bh(t.parent.parent)&&Ns(t.parent.parent.parent)&&!Td(t.parent.parent.parent)}return!1}function Wse(t){var r;return(r=t.declarations)==null?void 0:r.find(a=>!DT(a)&&!(qu(a)&&Iv(a)))}function gIt(t){return t===1||t===100||t===199}function jL(t,r){return Td(t)||gIt(Vh(r))&&!!t.commonJsModuleIndicator}function Vse(t,r){switch(t.scriptKind){case 1:case 3:case 2:case 4:break;default:return!1}return t.isDeclarationFile?!1:!!(Hh(r,"alwaysStrict")||mTe(t.statements)||Td(t)||Xg(r))}function Hse(t){return!!(t.flags&33554432)||Kr(t,128)}function jse(t,r){switch(t.kind){case 307:case 269:case 299:case 267:case 248:case 249:case 250:case 176:case 174:case 177:case 178:case 262:case 218:case 219:case 172:case 175:return!0;case 241:return!w6(r)}return!1}function zse(t){switch(z.type(t),t.kind){case 338:case 346:case 323:return!0;default:return Use(t)}}function Use(t){switch(z.type(t),t.kind){case 179:case 180:case 173:case 181:case 184:case 185:case 317:case 263:case 231:case 264:case 265:case 345:case 262:case 174:case 176:case 177:case 178:case 218:case 219:return!0;default:return!1}}function zL(t){switch(t.kind){case 272:case 271:return!0;default:return!1}}function Vwe(t){return zL(t)||LT(t)}function Hwe(t){return zL(t)||hW(t)}function nJ(t){switch(t.kind){case 272:case 271:case 243:case 263:case 262:case 267:case 265:case 264:case 266:return!0;default:return!1}}function jwe(t){return ZB(t)||qu(t)||V1(t)||Gp(t)}function ZB(t){return zL(t)||$u(t)}function rJ(t){return Xi(t.parent,r=>!!(zle(r)&1))}function j0(t){return Xi(t.parent,r=>jse(r,r.parent))}function zwe(t,r){let a=j0(t);for(;a;)r(a),a=j0(a)}function sc(t){return!t||GB(t)===0?"(Missing)":yu(t)}function Uwe(t){return t.declaration?sc(t.declaration.parameters[0].name):void 0}function YB(t){return t.kind===167&&!ug(t.expression)}function m8(t){var r;switch(t.kind){case 80:case 81:return(r=t.emitNode)!=null&&r.autoGenerate?void 0:t.escapedText;case 11:case 9:case 15:return du(t.text);case 167:return ug(t.expression)?du(t.expression.text):void 0;case 295:return hP(t);default:return z.assertNever(t)}}function UL(t){return z.checkDefined(m8(t))}function kp(t){switch(t.kind){case 110:return"this";case 81:case 80:return GB(t)===0?dr(t):yu(t);case 166:return kp(t.left)+"."+kp(t.right);case 211:return lt(t.name)||Vs(t.name)?kp(t.expression)+"."+kp(t.name):z.assertNever(t.name);case 311:return kp(t.left)+"#"+kp(t.right);case 295:return kp(t.namespace)+":"+kp(t.name);default:return z.assertNever(t)}}function Kn(t,r,...a){const u=_n(t);return Jg(u,t,r,...a)}function N6(t,r,a,...u){const h=qa(t.text,r.pos);return ef(t,h,r.end-h,a,...u)}function Jg(t,r,a,...u){const h=nI(t,r);return ef(t,h.start,h.length,a,...u)}function $y(t,r,a,u){const h=nI(t,r);return sJ(t,h.start,h.length,a,u)}function eW(t,r,a,u){const h=qa(t.text,r.pos);return sJ(t,h,r.end-h,a,u)}function qwe(t,r,a){z.assertGreaterThanOrEqual(r,0),z.assertGreaterThanOrEqual(a,0),z.assertLessThanOrEqual(r,t.length),z.assertLessThanOrEqual(r+a,t.length)}function sJ(t,r,a,u,h){return qwe(t.text,r,a),{file:t,start:r,length:a,code:u.code,category:u.category,messageText:u.next?u:u.messageText,relatedInformation:h,canonicalHead:u.canonicalHead}}function qse(t,r,a){return{file:t,start:0,length:0,code:r.code,category:r.category,messageText:r.next?r:r.messageText,relatedInformation:a}}function $we(t){return typeof t.messageText=="string"?{code:t.code,category:t.category,messageText:t.messageText,next:t.next}:t.messageText}function Jwe(t,r,a){return{file:t,start:r.pos,length:r.end-r.pos,code:a.code,category:a.category,messageText:a.message}}function Gwe(t,...r){return{code:t.code,messageText:lP(t,...r)}}function R1(t,r){const a=zy(t.languageVersion,!0,t.languageVariant,t.text,void 0,r);a.scan();const u=a.getTokenStart();return sd(u,a.getTokenEnd())}function Kwe(t,r){const a=zy(t.languageVersion,!0,t.languageVariant,t.text,void 0,r);return a.scan(),a.getToken()}function mIt(t,r){const a=qa(t.text,r.pos);if(r.body&&r.body.kind===241){const{line:u}=Da(t,r.body.pos),{line:h}=Da(t,r.body.end);if(u0?r.statements[0].pos:r.end;return sd(p,m)}case 253:case 229:{const p=qa(t.text,r.pos);return R1(t,p)}case 238:{const p=qa(t.text,r.expression.end);return R1(t,p)}case 350:{const p=qa(t.text,r.tagName.pos);return R1(t,p)}case 176:{const p=r,m=qa(t.text,p.pos),C=zy(t.languageVersion,!0,t.languageVariant,t.text,void 0,m);let b=C.scan();for(;b!==137&&b!==1;)b=C.scan();const T=C.getTokenEnd();return sd(m,T)}}if(a===void 0)return R1(t,r.pos);z.assert(!G0(a));const u=vu(a),h=u||yP(r)?a.pos:qa(t.text,a.pos);return u?(z.assert(h===a.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),z.assert(h===a.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")):(z.assert(h>=a.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),z.assert(h<=a.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")),sd(h,a.end)}function nS(t){return t.kind===307&&!ep(t)}function ep(t){return(t.externalModuleIndicator||t.commonJsModuleIndicator)!==void 0}function Dm(t){return t.scriptKind===6}function ET(t){return!!(wk(t)&4096)}function tW(t){return!!(wk(t)&8&&!xp(t,t.parent))}function iW(t){return(Rb(t)&7)===6}function nW(t){return(Rb(t)&7)===4}function L6(t){return(Rb(t)&7)===2}function Qwe(t){const r=Rb(t)&7;return r===2||r===4||r===6}function oJ(t){return(Rb(t)&7)===1}function rI(t){return t.kind===213&&t.expression.kind===108}function Gp(t){return t.kind===213&&t.expression.kind===102}function P6(t){return p7(t)&&t.keywordToken===102&&t.name.escapedText==="meta"}function rS(t){return V1(t)&&gS(t.argument)&&ja(t.argument.literal)}function Nv(t){return t.kind===244&&t.expression.kind===11}function rW(t){return!!(Ya(t)&2097152)}function aJ(t){return rW(t)&&Uu(t)}function vIt(t){return lt(t.name)&&!t.initializer}function lJ(t){return rW(t)&&Ou(t)&&Be(t.declarationList.declarations,vIt)}function $se(t,r){return t.kind!==12?Hy(r.text,t.pos):void 0}function Jse(t,r){const a=t.kind===169||t.kind===168||t.kind===218||t.kind===219||t.kind===217||t.kind===260||t.kind===281?no(Rw(r,t.pos),Hy(r,t.pos)):Hy(r,t.pos);return Ri(a,u=>u.end<=t.end&&r.charCodeAt(u.pos+1)===42&&r.charCodeAt(u.pos+2)===42&&r.charCodeAt(u.pos+3)!==47)}var Xwe=/^(\/\/\/\s*/,yIt=/^(\/\/\/\s*/,bIt=/^(\/\/\/\s*/,Zwe=/^(\/\/\/\s*/,CIt=/^\/\/\/\s*/,SIt=/^(\/\/\/\s*/;function Lv(t){if(182<=t.kind&&t.kind<=205)return!0;switch(t.kind){case 133:case 159:case 150:case 163:case 154:case 136:case 155:case 151:case 157:case 106:case 146:return!0;case 116:return t.parent.kind!==222;case 233:return Qqe(t);case 168:return t.parent.kind===200||t.parent.kind===195;case 80:(t.parent.kind===166&&t.parent.right===t||t.parent.kind===211&&t.parent.name===t)&&(t=t.parent),z.assert(t.kind===80||t.kind===166||t.kind===211,"'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");case 166:case 211:case 110:{const{parent:r}=t;if(r.kind===186)return!1;if(r.kind===205)return!r.isTypeOf;if(182<=r.kind&&r.kind<=205)return!0;switch(r.kind){case 233:return Qqe(r);case 168:return t===r.constraint;case 345:return t===r.constraint;case 172:case 171:case 169:case 260:return t===r.type;case 262:case 218:case 219:case 176:case 174:case 173:case 177:case 178:return t===r.type;case 179:case 180:case 181:return t===r.type;case 216:return t===r.type;case 213:case 214:case 215:return Mt(r.typeArguments,t)}}}return!1}function Qqe(t){return QG(t.parent)||AP(t.parent)||Lp(t.parent)&&!HJ(t)}function Xqe(t,r){for(;t;){if(t.kind===r)return!0;t=t.parent}return!1}function sS(t,r){return a(t);function a(u){switch(u.kind){case 253:return r(u);case 269:case 241:case 245:case 246:case 247:case 248:case 249:case 250:case 254:case 255:case 296:case 297:case 256:case 258:case 299:return jo(u,a)}}}function Ywe(t,r){return a(t);function a(u){switch(u.kind){case 229:r(u);const h=u.expression;h&&a(h);return;case 266:case 264:case 267:case 265:return;default:if(Bo(u)){if(u.name&&u.name.kind===167){a(u.name.expression);return}}else Lv(u)||jo(u,a)}}}function Gse(t){return t&&t.kind===188?t.elementType:t&&t.kind===183?a_(t.typeArguments):void 0}function exe(t){switch(t.kind){case 264:case 263:case 231:case 187:return t.members;case 210:return t.properties}}function qL(t){if(t)switch(t.kind){case 208:case 306:case 169:case 303:case 172:case 171:case 304:case 260:return!0}return!1}function txe(t){return qL(t)||Vw(t)}function v8(t){return t.parent.kind===261&&t.parent.parent.kind===243}function ixe(t){return Xn(t)?Pa(t.parent)&&cr(t.parent.parent)&&Lu(t.parent.parent)===2||cJ(t.parent):!1}function cJ(t){return Xn(t)?cr(t)&&Lu(t)===1:!1}function nxe(t){return(ds(t)?L6(t)&<(t.name)&&v8(t):To(t)?R8(t)&&_d(t):V_(t)&&R8(t))||cJ(t)}function rxe(t){switch(t.kind){case 174:case 173:case 176:case 177:case 178:case 262:case 218:return!0}return!1}function Kse(t,r){for(;;){if(r&&r(t),t.statement.kind!==256)return t.statement;t=t.statement}}function IT(t){return t&&t.kind===241&&Bo(t.parent)}function f0(t){return t&&t.kind===174&&t.parent.kind===210}function uJ(t){return(t.kind===174||t.kind===177||t.kind===178)&&(t.parent.kind===210||t.parent.kind===231)}function sxe(t){return t&&t.kind===1}function oxe(t){return t&&t.kind===0}function A6(t,r,a,u){return W(t==null?void 0:t.properties,h=>{if(!pd(h))return;const p=m8(h.name);return r===p||u&&u===p?a(h):void 0})}function axe(t,r,a){return A6(t,r,u=>Rf(u.initializer)?Me(u.initializer.elements,h=>ja(h)&&h.text===a):void 0)}function y8(t){if(t&&t.statements.length){const r=t.statements[0].expression;return $r(r,Pa)}}function dJ(t,r,a){return sW(t,r,u=>Rf(u.initializer)?Me(u.initializer.elements,h=>ja(h)&&h.text===a):void 0)}function sW(t,r,a){return A6(y8(t),r,a)}function Kp(t){return Xi(t.parent,Bo)}function lxe(t){return Xi(t.parent,rc)}function Sf(t){return Xi(t.parent,ss)}function cxe(t){return Xi(t.parent,r=>ss(r)||Bo(r)?"quit":bu(r))}function fJ(t){return Xi(t.parent,w6)}function hJ(t){const r=Xi(t.parent,a=>ss(a)?"quit":jd(a));return r&&ss(r.parent)?Sf(r.parent):Sf(r??t)}function u_(t,r,a){for(z.assert(t.kind!==307);;){if(t=t.parent,!t)return z.fail();switch(t.kind){case 167:if(a&&ss(t.parent.parent))return t;t=t.parent.parent;break;case 170:t.parent.kind===169&&Vd(t.parent.parent)?t=t.parent.parent:Vd(t.parent)&&(t=t.parent);break;case 219:if(!r)continue;case 262:case 218:case 267:case 175:case 172:case 171:case 174:case 173:case 176:case 177:case 178:case 179:case 180:case 181:case 266:case 307:return t}}}function uxe(t){switch(t.kind){case 219:case 262:case 218:case 172:return!0;case 241:switch(t.parent.kind){case 176:case 174:case 177:case 178:return!0;default:return!1}default:return!1}}function _J(t){lt(t)&&(xd(t.parent)||Uu(t.parent))&&t.parent.name===t&&(t=t.parent);const r=u_(t,!0,!1);return Ns(r)}function dxe(t){const r=u_(t,!1,!1);if(r)switch(r.kind){case 176:case 262:case 218:return r}}function oW(t,r){for(;;){if(t=t.parent,!t)return;switch(t.kind){case 167:t=t.parent;break;case 262:case 218:case 219:if(!r)continue;case 172:case 171:case 174:case 173:case 176:case 177:case 178:case 175:return t;case 170:t.parent.kind===169&&Vd(t.parent.parent)?t=t.parent.parent:Vd(t.parent)&&(t=t.parent);break}}}function NT(t){if(t.kind===218||t.kind===219){let r=t,a=t.parent;for(;a.kind===217;)r=a,a=a.parent;if(a.kind===213&&a.expression===r)return a}}function Zqe(t){return t.kind===108||R_(t)}function R_(t){const r=t.kind;return(r===211||r===212)&&t.expression.kind===108}function aW(t){const r=t.kind;return(r===211||r===212)&&t.expression.kind===110}function pJ(t){var r;return!!t&&ds(t)&&((r=t.initializer)==null?void 0:r.kind)===110}function fxe(t){return!!t&&(ih(t)||pd(t))&&cr(t.parent.parent)&&t.parent.parent.operatorToken.kind===64&&t.parent.parent.right.kind===110}function lW(t){switch(t.kind){case 183:return t.typeName;case 233:return pc(t.expression)?t.expression:void 0;case 80:case 166:return t}}function gJ(t){switch(t.kind){case 215:return t.tag;case 286:case 285:return t.tagName;case 226:return t.right;default:return t.expression}}function cW(t,r,a,u){if(t&&Af(r)&&Vs(r.name))return!1;switch(r.kind){case 263:return!0;case 231:return!t;case 172:return a!==void 0&&(t?xd(a):ss(a)&&!WT(r)&&!Eoe(r));case 177:case 178:case 174:return r.body!==void 0&&a!==void 0&&(t?xd(a):ss(a));case 169:return t?a!==void 0&&a.body!==void 0&&(a.kind===176||a.kind===174||a.kind===178)&&RT(a)!==r&&u!==void 0&&u.kind===263:!1}return!1}function O6(t,r,a,u){return dg(r)&&cW(t,r,a,u)}function uW(t,r,a,u){return O6(t,r,a,u)||b8(t,r,a)}function b8(t,r,a){switch(r.kind){case 263:return Rt(r.members,u=>uW(t,u,r,a));case 231:return!t&&Rt(r.members,u=>uW(t,u,r,a));case 174:case 178:case 176:return Rt(r.parameters,u=>O6(t,u,r,a));default:return!1}}function oS(t,r){if(O6(t,r))return!0;const a=Gy(r);return!!a&&b8(t,a,r)}function Qse(t,r,a){let u;if(Vw(r)){const{firstAccessor:h,secondAccessor:p,setAccessor:m}=qw(a.members,r),C=dg(h)?h:p&&dg(p)?p:void 0;if(!C||r!==C)return!1;u=m==null?void 0:m.parameters}else Au(r)&&(u=r.parameters);if(O6(t,r,a))return!0;if(u){for(const h of u)if(!FT(h)&&O6(t,h,r,a))return!0}return!1}function Xse(t){if(t.textSourceNode){switch(t.textSourceNode.kind){case 11:return Xse(t.textSourceNode);case 15:return t.text===""}return!1}return t.text===""}function M6(t){const{parent:r}=t;return r.kind===286||r.kind===285||r.kind===287?r.tagName===t:!1}function z0(t){switch(t.kind){case 108:case 106:case 112:case 97:case 14:case 209:case 210:case 211:case 212:case 213:case 214:case 215:case 234:case 216:case 238:case 235:case 217:case 218:case 231:case 219:case 222:case 220:case 221:case 224:case 225:case 226:case 227:case 230:case 228:case 232:case 284:case 285:case 288:case 229:case 223:case 236:return!0;case 233:return!Lp(t.parent)&&!AP(t.parent);case 166:for(;t.parent.kind===166;)t=t.parent;return t.parent.kind===186||HL(t.parent)||S7(t.parent)||$k(t.parent)||M6(t);case 311:for(;$k(t.parent);)t=t.parent;return t.parent.kind===186||HL(t.parent)||S7(t.parent)||$k(t.parent)||M6(t);case 81:return cr(t.parent)&&t.parent.left===t&&t.parent.operatorToken.kind===103;case 80:if(t.parent.kind===186||HL(t.parent)||S7(t.parent)||$k(t.parent)||M6(t))return!0;case 9:case 10:case 11:case 15:case 110:return mJ(t);default:return!1}}function mJ(t){const{parent:r}=t;switch(r.kind){case 260:case 169:case 172:case 171:case 306:case 303:case 208:return r.initializer===t;case 244:case 245:case 246:case 247:case 253:case 254:case 255:case 296:case 257:return r.expression===t;case 248:const a=r;return a.initializer===t&&a.initializer.kind!==261||a.condition===t||a.incrementor===t;case 249:case 250:const u=r;return u.initializer===t&&u.initializer.kind!==261||u.expression===t;case 216:case 234:return t===r.expression;case 239:return t===r.expression;case 167:return t===r.expression;case 170:case 294:case 293:case 305:return!0;case 233:return r.expression===t&&!Lv(r);case 304:return r.objectAssignmentInitializer===t;case 238:return t===r.expression;default:return z0(r)}}function vJ(t){for(;t.kind===166||t.kind===80;)t=t.parent;return t.kind===186}function hxe(t){return H1(t)&&!!t.parent.moduleSpecifier}function Lk(t){return t.kind===271&&t.moduleReference.kind===283}function C8(t){return z.assert(Lk(t)),t.moduleReference.expression}function Zse(t){return LT(t)&&Q6(t.initializer).arguments[0]}function $L(t){return t.kind===271&&t.moduleReference.kind!==283}function aS(t){return(t==null?void 0:t.kind)===307}function F_(t){return Xn(t)}function Yqe(t){return!Xn(t)}function Xn(t){return!!t&&!!(t.flags&524288)}function yJ(t){return!!t&&!!(t.flags&134217728)}function bJ(t){return!Dm(t)}function dW(t){return!!t&&!!(t.flags&16777216)}function CJ(t){return _g(t)&<(t.typeName)&&t.typeName.escapedText==="Object"&&t.typeArguments&&t.typeArguments.length===2&&(t.typeArguments[0].kind===154||t.typeArguments[0].kind===150)}function B_(t,r){if(t.kind!==213)return!1;const{expression:a,arguments:u}=t;if(a.kind!==80||a.escapedText!=="require"||u.length!==1)return!1;const h=u[0];return!r||Ml(h)}function fW(t){return e$e(t,!1)}function LT(t){return e$e(t,!0)}function _xe(t){return nl(t)&<(t.parent.parent)}function e$e(t,r){return ds(t)&&!!t.initializer&&B_(r?Q6(t.initializer):t.initializer,!0)}function hW(t){return Ou(t)&&t.declarationList.declarations.length>0&&Be(t.declarationList.declarations,r=>fW(r))}function _W(t){return t===39||t===34}function SJ(t,r){return TT(r,t).charCodeAt(0)===34}function S8(t){return cr(t)||Sc(t)||lt(t)||sa(t)}function pW(t){return Xn(t)&&t.initializer&&cr(t.initializer)&&(t.initializer.operatorToken.kind===57||t.initializer.operatorToken.kind===61)&&t.name&&pc(t.name)&&R6(t.name,t.initializer.left)?t.initializer.right:t.initializer}function w8(t){const r=pW(t);return r&&Pk(r,$w(t.name))}function wIt(t,r){return W(t.properties,a=>pd(a)&<(a.name)&&a.name.escapedText==="value"&&a.initializer&&Pk(a.initializer,r))}function JL(t){if(t&&t.parent&&cr(t.parent)&&t.parent.operatorToken.kind===64){const r=$w(t.parent.left);return Pk(t.parent.right,r)||xIt(t.parent.left,t.parent.right,r)}if(t&&sa(t)&&oI(t)){const r=wIt(t.arguments[2],t.arguments[1].text==="prototype");if(r)return r}}function Pk(t,r){if(sa(t)){const a=Il(t.expression);return a.kind===218||a.kind===219?t:void 0}if(t.kind===218||t.kind===231||t.kind===219||Pa(t)&&(t.properties.length===0||r))return t}function xIt(t,r,a){const u=cr(r)&&(r.operatorToken.kind===57||r.operatorToken.kind===61)&&Pk(r.right,a);if(u&&R6(t,r.left))return u}function pxe(t){const r=ds(t.parent)?t.parent.name:cr(t.parent)&&t.parent.operatorToken.kind===64?t.parent.left:void 0;return r&&Pk(t.right,$w(r))&&pc(r)&&R6(r,t.left)}function Yse(t){if(cr(t.parent)){const r=(t.parent.operatorToken.kind===57||t.parent.operatorToken.kind===61)&&cr(t.parent.parent)?t.parent.parent:t.parent;if(r.operatorToken.kind===64&<(r.left))return r.left}else if(ds(t.parent))return t.parent.name}function R6(t,r){return Av(t)&&Av(r)?Im(t)===Im(r):Uy(t)&&wJ(r)&&(r.expression.kind===110||lt(r.expression)&&(r.expression.escapedText==="window"||r.expression.escapedText==="self"||r.expression.escapedText==="global"))?R6(t,vW(r)):wJ(t)&&wJ(r)?Wb(t)===Wb(r)&&R6(t.expression,r.expression):!1}function gW(t){for(;Yd(t,!0);)t=t.right;return t}function sI(t){return lt(t)&&t.escapedText==="exports"}function eoe(t){return lt(t)&&t.escapedText==="module"}function Jy(t){return(Ir(t)||mW(t))&&eoe(t.expression)&&Wb(t)==="exports"}function Lu(t){const r=kIt(t);return r===5||Xn(t)?r:0}function oI(t){return O(t.arguments)===3&&Ir(t.expression)&<(t.expression.expression)&&dr(t.expression.expression)==="Object"&&dr(t.expression.name)==="defineProperty"&&ug(t.arguments[1])&&aI(t.arguments[0],!0)}function wJ(t){return Ir(t)||mW(t)}function mW(t){return wc(t)&&ug(t.argumentExpression)}function PT(t,r){return Ir(t)&&(!r&&t.expression.kind===110||lt(t.name)&&aI(t.expression,!0))||xJ(t,r)}function xJ(t,r){return mW(t)&&(!r&&t.expression.kind===110||pc(t.expression)||PT(t.expression,!0))}function aI(t,r){return pc(t)||PT(t,r)}function vW(t){return Ir(t)?t.name:t.argumentExpression}function kIt(t){if(sa(t)){if(!oI(t))return 0;const r=t.arguments[0];return sI(r)||Jy(r)?8:PT(r)&&Wb(r)==="prototype"?9:7}return t.operatorToken.kind!==64||!Sc(t.left)||TIt(gW(t))?0:aI(t.left.expression,!0)&&Wb(t.left)==="prototype"&&Pa(toe(t))?6:yW(t.left)}function TIt(t){return EP(t)&&W_(t.expression)&&t.expression.text==="0"}function kJ(t){if(Ir(t))return t.name;const r=Il(t.argumentExpression);return W_(r)||Ml(r)?r:t}function Wb(t){const r=kJ(t);if(r){if(lt(r))return r.escapedText;if(Ml(r)||W_(r))return du(r.text)}}function yW(t){if(t.expression.kind===110)return 4;if(Jy(t))return 2;if(aI(t.expression,!0)){if($w(t.expression))return 3;let r=t;for(;!lt(r.expression);)r=r.expression;const a=r.expression;if((a.escapedText==="exports"||a.escapedText==="module"&&Wb(r)==="exports")&&PT(t))return 1;if(aI(t,!0)||wc(t)&&NJ(t))return 5}return 0}function toe(t){for(;cr(t.right);)t=t.right;return t.right}function bW(t){return cr(t)&&Lu(t)===3}function gxe(t){return Xn(t)&&t.parent&&t.parent.kind===244&&(!wc(t)||mW(t))&&!!xk(t.parent)}function CW(t,r){const{valueDeclaration:a}=t;(!a||!(r.flags&33554432&&!Xn(r)&&!(a.flags&33554432))&&S8(a)&&!S8(r)||a.kind!==r.kind&&Bwe(a))&&(t.valueDeclaration=r)}function mxe(t){if(!t||!t.valueDeclaration)return!1;const r=t.valueDeclaration;return r.kind===262||ds(r)&&r.initializer&&Bo(r.initializer)}function x8(t){var r,a;switch(t.kind){case 260:case 208:return(r=Xi(t.initializer,u=>B_(u,!0)))==null?void 0:r.arguments[0];case 272:case 278:case 351:return $r(t.moduleSpecifier,Ml);case 271:return $r((a=$r(t.moduleReference,Kb))==null?void 0:a.expression,Ml);case 273:case 280:return $r(t.parent.moduleSpecifier,Ml);case 274:case 281:return $r(t.parent.parent.moduleSpecifier,Ml);case 276:return $r(t.parent.parent.parent.moduleSpecifier,Ml);case 205:return rS(t)?t.argument.literal:void 0;default:z.assertNever(t)}}function k8(t){return SW(t)||z.failBadSyntaxKind(t.parent)}function SW(t){switch(t.parent.kind){case 272:case 278:case 351:return t.parent;case 283:return t.parent.parent;case 213:return Gp(t.parent)||B_(t.parent,!1)?t.parent:void 0;case 201:return z.assert(ja(t)),$r(t.parent.parent,V1);default:return}}function GL(t){switch(t.kind){case 272:case 278:case 351:return t.moduleSpecifier;case 271:return t.moduleReference.kind===283?t.moduleReference.expression:void 0;case 205:return rS(t)?t.argument.literal:void 0;case 213:return t.arguments[0];case 267:return t.name.kind===11?t.name:void 0;default:return z.assertNever(t)}}function F6(t){switch(t.kind){case 272:return t.importClause&&$r(t.importClause.namedBindings,eb);case 271:return t;case 278:return t.exportClause&&$r(t.exportClause,H1);default:return z.assertNever(t)}}function KL(t){return(t.kind===272||t.kind===351)&&!!t.importClause&&!!t.importClause.name}function vxe(t,r){if(t.name){const a=r(t);if(a)return a}if(t.namedBindings){const a=eb(t.namedBindings)?r(t.namedBindings):W(t.namedBindings.elements,r);if(a)return a}}function QL(t){if(t)switch(t.kind){case 169:case 174:case 173:case 304:case 303:case 172:case 171:return t.questionToken!==void 0}return!1}function B6(t){const r=c3(t)?lu(t.parameters):void 0,a=$r(r&&r.name,lt);return!!a&&a.escapedText==="new"}function Em(t){return t.kind===346||t.kind===338||t.kind===340}function wW(t){return Em(t)||Mm(t)}function DIt(t){return _f(t)&&cr(t.expression)&&t.expression.operatorToken.kind===64?gW(t.expression):void 0}function t$e(t){return _f(t)&&cr(t.expression)&&Lu(t.expression)!==0&&cr(t.expression.right)&&(t.expression.right.operatorToken.kind===57||t.expression.right.operatorToken.kind===61)?t.expression.right.right:void 0}function ioe(t){switch(t.kind){case 243:const r=XL(t);return r&&r.initializer;case 172:return t.initializer;case 303:return t.initializer}}function XL(t){return Ou(t)?lu(t.declarationList.declarations):void 0}function i$e(t){return qu(t)&&t.body&&t.body.kind===267?t.body:void 0}function xW(t){if(t.kind>=243&&t.kind<=259)return!0;switch(t.kind){case 80:case 110:case 108:case 166:case 236:case 212:case 211:case 208:case 218:case 219:case 174:case 177:case 178:return!0;default:return!1}}function kW(t){switch(t.kind){case 219:case 226:case 241:case 252:case 179:case 296:case 263:case 231:case 175:case 176:case 185:case 180:case 251:case 259:case 246:case 212:case 242:case 1:case 266:case 306:case 277:case 278:case 281:case 244:case 249:case 250:case 248:case 262:case 218:case 184:case 177:case 80:case 245:case 272:case 271:case 181:case 264:case 317:case 323:case 256:case 174:case 173:case 267:case 202:case 270:case 210:case 169:case 217:case 211:case 303:case 172:case 171:case 253:case 240:case 178:case 304:case 305:case 255:case 257:case 258:case 265:case 168:case 260:case 243:case 247:case 254:return!0;default:return!1}}function noe(t,r){let a;qL(t)&&iS(t)&&Jp(t.initializer)&&(a=un(a,n$e(t,t.initializer.jsDoc)));let u=t;for(;u&&u.parent;){if(Jp(u)&&(a=un(a,n$e(t,u.jsDoc))),u.kind===169){a=un(a,(r?$Se:b6)(u));break}if(u.kind===168){a=un(a,(r?GSe:JSe)(u));break}u=roe(u)}return a||x}function n$e(t,r){const a=La(r);return Ln(r,u=>{if(u===a){const h=Ri(u.tags,p=>EIt(t,p));return u.tags===h?[u]:h}else return Ri(u.tags,u3)})}function EIt(t,r){return!(w7(r)||XG(r))||!r.parent||!G0(r.parent)||!g_(r.parent.parent)||r.parent.parent===t}function roe(t){const r=t.parent;if(r.kind===303||r.kind===277||r.kind===172||r.kind===244&&t.kind===211||r.kind===253||i$e(r)||Yd(t))return r;if(r.parent&&(XL(r.parent)===t||Yd(r)))return r.parent;if(r.parent&&r.parent.parent&&(XL(r.parent.parent)||ioe(r.parent.parent)===t||t$e(r.parent.parent)))return r.parent.parent}function TW(t){if(t.symbol)return t.symbol;if(!lt(t.name))return;const r=t.name.escapedText,a=Ak(t);if(!a)return;const u=Me(a.parameters,h=>h.name.kind===80&&h.name.escapedText===r);return u&&u.symbol}function TJ(t){if(G0(t.parent)&&t.parent.tags){const r=Me(t.parent.tags,Em);if(r)return r}return Ak(t)}function soe(t){return A$(t,u3)}function Ak(t){const r=Ok(t);if(r)return V_(r)&&r.type&&Bo(r.type)?r.type:Bo(r)?r:void 0}function Ok(t){const r=AT(t);if(r)return t$e(r)||DIt(r)||ioe(r)||XL(r)||i$e(r)||r}function AT(t){const r=W6(t);if(!r)return;const a=r.parent;if(a&&a.jsDoc&&r===Ql(a.jsDoc))return a}function W6(t){return Xi(t.parent,G0)}function yxe(t){const r=t.name.escapedText,{typeParameters:a}=t.parent.parent.parent;return a&&Me(a,u=>u.name.escapedText===r)}function r$e(t){return!!t.typeArguments}var bxe=(t=>(t[t.None=0]="None",t[t.Definite=1]="Definite",t[t.Compound=2]="Compound",t))(bxe||{});function Cxe(t){let r=t.parent;for(;;){switch(r.kind){case 226:const a=r,u=a.operatorToken.kind;return jb(u)&&a.left===t?a:void 0;case 224:case 225:const h=r,p=h.operator;return p===46||p===47?h:void 0;case 249:case 250:const m=r;return m.initializer===t?m:void 0;case 217:case 209:case 230:case 235:t=r;break;case 305:t=r.parent;break;case 304:if(r.name!==t)return;t=r.parent;break;case 303:if(r.name===t)return;t=r.parent;break;default:return}r=t.parent}}function Mk(t){const r=Cxe(t);if(!r)return 0;switch(r.kind){case 226:const a=r.operatorToken.kind;return a===64||F8(a)?1:2;case 224:case 225:return 2;case 249:case 250:return 1}}function lS(t){return!!Cxe(t)}function IIt(t){const r=Il(t.right);return r.kind===226&&ile(r.operatorToken.kind)}function ooe(t){const r=Cxe(t);return!!r&&Yd(r,!0)&&IIt(r)}function Sxe(t){switch(t.kind){case 241:case 243:case 254:case 245:case 255:case 269:case 296:case 297:case 256:case 248:case 249:case 250:case 246:case 247:case 258:case 299:return!0}return!1}function ZL(t){return gc(t)||Dc(t)||WL(t)||Uu(t)||fu(t)}function s$e(t,r){for(;t&&t.kind===r;)t=t.parent;return t}function DW(t){return s$e(t,196)}function Vb(t){return s$e(t,217)}function wxe(t){let r;for(;t&&t.kind===196;)r=t,t=t.parent;return[r,t]}function T8(t){for(;_I(t);)t=t.type;return t}function Il(t,r){return ld(t,r?17:1)}function aoe(t){return t.kind!==211&&t.kind!==212?!1:(t=Vb(t.parent),t&&t.kind===220)}function OT(t,r){for(;t;){if(t===r)return!0;t=t.parent}return!1}function F1(t){return!Ns(t)&&!Qo(t)&&Yf(t.parent)&&t.parent.name===t}function D8(t){const r=t.parent;switch(t.kind){case 11:case 15:case 9:if(Ja(r))return r.parent;case 80:if(Yf(r))return r.name===t?r:void 0;if(__(r)){const a=r.parent;return em(a)&&a.name===r?a:void 0}else{const a=r.parent;return cr(a)&&Lu(a)!==0&&(a.left.symbol||a.symbol)&&ko(a)===t?a:void 0}case 81:return Yf(r)&&r.name===t?r:void 0;default:return}}function EW(t){return ug(t)&&t.parent.kind===167&&Yf(t.parent.parent)}function xxe(t){const r=t.parent;switch(r.kind){case 172:case 171:case 174:case 173:case 177:case 178:case 306:case 303:case 211:return r.name===t;case 166:return r.right===t;case 208:case 276:return r.propertyName===t;case 281:case 291:case 285:case 286:case 287:return!0}return!1}function o$e(t){return t.kind===271||t.kind===270||t.kind===273&&t.name||t.kind===274||t.kind===280||t.kind===276||t.kind===281||t.kind===277&&V6(t)?!0:Xn(t)&&(cr(t)&&Lu(t)===2&&V6(t)||Ir(t)&&cr(t.parent)&&t.parent.left===t&&t.parent.operatorToken.kind===64&&IW(t.parent.right))}function loe(t){switch(t.parent.kind){case 273:case 276:case 274:case 281:case 277:case 271:case 280:return t.parent;case 166:do t=t.parent;while(t.parent.kind===166);return loe(t)}}function IW(t){return pc(t)||wd(t)}function V6(t){const r=coe(t);return IW(r)}function coe(t){return Ec(t)?t.expression:t.right}function kxe(t){return t.kind===304?t.name:t.kind===303?t.initializer:t.parent.right}function Pv(t){const r=MT(t);if(r&&Xn(t)){const a=QSe(t);if(a)return a.class}return r}function MT(t){const r=NW(t.heritageClauses,96);return r&&r.types.length>0?r.types[0]:void 0}function H6(t){if(Xn(t))return XSe(t).map(r=>r.class);{const r=NW(t.heritageClauses,119);return r==null?void 0:r.types}}function E8(t){return Ff(t)?I8(t)||x:ss(t)&&no(PL(Pv(t)),H6(t))||x}function I8(t){const r=NW(t.heritageClauses,96);return r?r.types:void 0}function NW(t,r){if(t){for(const a of t)if(a.token===r)return a}}function Rk(t,r){for(;t;){if(t.kind===r)return t;t=t.parent}}function d_(t){return 83<=t&&t<=165}function uoe(t){return 19<=t&&t<=79}function DJ(t){return d_(t)||uoe(t)}function EJ(t){return 128<=t&&t<=165}function doe(t){return d_(t)&&!EJ(t)}function a$e(t){return 119<=t&&t<=127}function YL(t){const r=bT(t);return r!==void 0&&doe(r)}function l$e(t){const r=bT(t);return r!==void 0&&d_(r)}function foe(t){const r=QE(t);return!!r&&!EJ(r)}function j6(t){return 2<=t&&t<=7}var Txe=(t=>(t[t.Normal=0]="Normal",t[t.Generator=1]="Generator",t[t.Async=2]="Async",t[t.Invalid=4]="Invalid",t[t.AsyncGenerator=3]="AsyncGenerator",t))(Txe||{});function ad(t){if(!t)return 4;let r=0;switch(t.kind){case 262:case 218:case 174:t.asteriskToken&&(r|=1);case 219:Kr(t,1024)&&(r|=2);break}return t.body||(r|=4),r}function N8(t){switch(t.kind){case 262:case 218:case 219:case 174:return t.body!==void 0&&t.asteriskToken===void 0&&Kr(t,1024)}return!1}function ug(t){return Ml(t)||W_(t)}function IJ(t){return tx(t)&&(t.operator===40||t.operator===41)&&W_(t.operand)}function Hb(t){const r=ko(t);return!!r&&NJ(r)}function NJ(t){if(!(t.kind===167||t.kind===212))return!1;const r=wc(t)?Il(t.argumentExpression):t.expression;return!ug(r)&&!IJ(r)}function lI(t){switch(t.kind){case 80:case 81:return t.escapedText;case 11:case 15:case 9:return du(t.text);case 167:const r=t.expression;return ug(r)?du(r.text):IJ(r)?r.operator===41?Ta(r.operator)+r.operand.text:r.operand.text:void 0;case 295:return hP(t);default:return z.assertNever(t)}}function Av(t){switch(t.kind){case 80:case 11:case 15:case 9:return!0;default:return!1}}function Im(t){return Uy(t)?dr(t):J0(t)?o7(t):t.text}function L8(t){return Uy(t)?t.escapedText:J0(t)?hP(t):du(t.text)}function c$e(t){return`__@${Aa(t)}@${t.escapedName}`}function LW(t,r){return`__#${Aa(t)}@${r}`}function PW(t){return ro(t.escapedName,"__@")}function Dxe(t){return ro(t.escapedName,"__#")}function u$e(t){return t.kind===80&&t.escapedText==="Symbol"}function Exe(t){return lt(t)?dr(t)==="__proto__":ja(t)&&t.text==="__proto__"}function P8(t,r){switch(t=ld(t),t.kind){case 231:if(cce(t))return!1;break;case 218:if(t.name)return!1;break;case 219:break;default:return!1}return typeof r=="function"?r(t):!0}function hoe(t){switch(t.kind){case 303:return!Exe(t.name);case 304:return!!t.objectAssignmentInitializer;case 260:return lt(t.name)&&!!t.initializer;case 169:return lt(t.name)&&!!t.initializer&&!t.dotDotDotToken;case 208:return lt(t.name)&&!!t.initializer&&!t.dotDotDotToken;case 172:return!!t.initializer;case 226:switch(t.operatorToken.kind){case 64:case 77:case 76:case 78:return lt(t.left)}break;case 277:return!0}return!1}function Tp(t,r){if(!hoe(t))return!1;switch(t.kind){case 303:return P8(t.initializer,r);case 304:return P8(t.objectAssignmentInitializer,r);case 260:case 169:case 208:case 172:return P8(t.initializer,r);case 226:return P8(t.right,r);case 277:return P8(t.expression,r)}}function _oe(t){return t.escapedText==="push"||t.escapedText==="unshift"}function Fk(t){return Ov(t).kind===169}function Ov(t){for(;t.kind===208;)t=t.parent.parent;return t}function poe(t){const r=t.kind;return r===176||r===218||r===262||r===219||r===174||r===177||r===178||r===267||r===307}function oc(t){return q0(t.pos)||q0(t.end)}function d$e(t){return xo(t,Ns)||t}var Ixe=(t=>(t[t.Left=0]="Left",t[t.Right=1]="Right",t))(Ixe||{});function goe(t){const r=voe(t),a=t.kind===214&&t.arguments!==void 0;return moe(t.kind,r,a)}function moe(t,r,a){switch(t){case 214:return a?0:1;case 224:case 221:case 222:case 220:case 223:case 227:case 229:return 1;case 226:switch(r){case 43:case 64:case 65:case 66:case 68:case 67:case 69:case 70:case 71:case 72:case 73:case 74:case 79:case 75:case 76:case 77:case 78:return 1}}return 0}function A8(t){const r=voe(t),a=t.kind===214&&t.arguments!==void 0;return AW(t.kind,r,a)}function voe(t){return t.kind===226?t.operatorToken.kind:t.kind===224||t.kind===225?t.operator:t.kind}var Nxe=(t=>(t[t.Comma=0]="Comma",t[t.Spread=1]="Spread",t[t.Yield=2]="Yield",t[t.Assignment=3]="Assignment",t[t.Conditional=4]="Conditional",t[t.Coalesce=4]="Coalesce",t[t.LogicalOR=5]="LogicalOR",t[t.LogicalAND=6]="LogicalAND",t[t.BitwiseOR=7]="BitwiseOR",t[t.BitwiseXOR=8]="BitwiseXOR",t[t.BitwiseAND=9]="BitwiseAND",t[t.Equality=10]="Equality",t[t.Relational=11]="Relational",t[t.Shift=12]="Shift",t[t.Additive=13]="Additive",t[t.Multiplicative=14]="Multiplicative",t[t.Exponentiation=15]="Exponentiation",t[t.Unary=16]="Unary",t[t.Update=17]="Update",t[t.LeftHandSide=18]="LeftHandSide",t[t.Member=19]="Member",t[t.Primary=20]="Primary",t[t.Highest=20]="Highest",t[t.Lowest=0]="Lowest",t[t.Invalid=-1]="Invalid",t))(Nxe||{});function AW(t,r,a){switch(t){case 355:return 0;case 230:return 1;case 229:return 2;case 227:return 4;case 226:switch(r){case 28:return 0;case 64:case 65:case 66:case 68:case 67:case 69:case 70:case 71:case 72:case 73:case 74:case 79:case 75:case 76:case 77:case 78:return 3;default:return OW(r)}case 216:case 235:case 224:case 221:case 222:case 220:case 223:return 16;case 225:return 17;case 213:return 18;case 214:return a?19:18;case 215:case 211:case 212:case 236:return 19;case 234:case 238:return 11;case 110:case 108:case 80:case 81:case 106:case 112:case 97:case 9:case 10:case 11:case 209:case 210:case 218:case 219:case 231:case 14:case 15:case 228:case 217:case 232:case 284:case 285:case 288:return 20;default:return-1}}function OW(t){switch(t){case 61:return 4;case 57:return 5;case 56:return 6;case 52:return 7;case 53:return 8;case 51:return 9;case 35:case 36:case 37:case 38:return 10;case 30:case 32:case 33:case 34:case 104:case 103:case 130:case 152:return 11;case 48:case 49:case 50:return 12;case 40:case 41:return 13;case 42:case 44:case 45:return 14;case 43:return 15}return-1}function z6(t){return Ri(t,r=>{switch(r.kind){case 294:return!!r.expression;case 12:return!r.containsOnlyTriviaWhiteSpaces;default:return!0}})}function O8(){let t=[];const r=[],a=new Map;let u=!1;return{add:p,lookup:h,getGlobalDiagnostics:m,getDiagnostics:C};function h(b){let T;if(b.file?T=a.get(b.file.fileName):T=t,!T)return;const E=Fy(T,b,fc,ZJ);if(E>=0)return T[E];if(~E>0&&YJ(b,T[~E-1]))return T[~E-1]}function p(b){let T;b.file?(T=a.get(b.file.fileName),T||(T=[],a.set(b.file.fileName,T),Ei(r,b.file.fileName,Xf))):(u&&(u=!1,t=t.slice()),T=t),Ei(T,b,ZJ,YJ)}function m(){return u=!0,t}function C(b){if(b)return a.get(b)||[];const T=bd(r,E=>a.get(E));return t.length&&T.unshift(...t),T}}var NIt=/\$\{/g;function yoe(t){return t.replace(NIt,"\\${")}function Lxe(t){return!!((t.templateFlags||0)&2048)}function boe(t){return t&&!!(bP(t)?Lxe(t):Lxe(t.head)||Rt(t.templateSpans,r=>Lxe(r.literal)))}var LIt=/[\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,PIt=/[\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,AIt=/\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g,OIt=new Map(Object.entries({" ":"\\t","\v":"\\v","\f":"\\f","\b":"\\b","\r":"\\r","\n":"\\n","\\":"\\\\",'"':'\\"',"'":"\\'","`":"\\`","\u2028":"\\u2028","\u2029":"\\u2029","…":"\\u0085","\r\n":"\\r\\n"}));function f$e(t){return"\\u"+("0000"+t.toString(16).toUpperCase()).slice(-4)}function MIt(t,r,a){if(t.charCodeAt(0)===0){const u=a.charCodeAt(r+t.length);return u>=48&&u<=57?"\\x00":"\\0"}return OIt.get(t)||f$e(t.charCodeAt(0))}function B1(t,r){const a=r===96?AIt:r===39?PIt:LIt;return t.replace(a,MIt)}var h$e=/[^\u0000-\u007F]/g;function LJ(t,r){return t=B1(t,r),h$e.test(t)?t.replace(h$e,a=>f$e(a.charCodeAt(0))):t}var RIt=/["\u0000-\u001f\u2028\u2029\u0085]/g,FIt=/['\u0000-\u001f\u2028\u2029\u0085]/g,BIt=new Map(Object.entries({'"':""","'":"'"}));function WIt(t){return"&#x"+t.toString(16).toUpperCase()+";"}function VIt(t){return t.charCodeAt(0)===0?"�":BIt.get(t)||WIt(t.charCodeAt(0))}function Coe(t,r){const a=r===39?FIt:RIt;return t.replace(a,VIt)}function Nm(t){const r=t.length;return r>=2&&t.charCodeAt(0)===t.charCodeAt(r-1)&&HIt(t.charCodeAt(0))?t.substring(1,r-1):t}function HIt(t){return t===39||t===34||t===96}function U6(t){const r=t.charCodeAt(0);return r>=97&&r<=122||t.includes("-")}var MW=[""," "];function PJ(t){const r=MW[1];for(let a=MW.length;a<=t;a++)MW.push(MW[a-1]+r);return MW[t]}function q6(){return MW[1].length}function RW(t){var r,a,u,h,p,m=!1;function C(U){const q=ML(U);q.length>1?(h=h+q.length-1,p=r.length-U.length+La(q),u=p-r.length===0):u=!1}function b(U){U&&U.length&&(u&&(U=PJ(a)+U,u=!1),r+=U,C(U))}function T(U){U&&(m=!1),b(U)}function E(U){U&&(m=!0),b(U)}function N(){r="",a=0,u=!0,h=0,p=0,m=!1}function R(U){U!==void 0&&(r+=U,C(U),m=!1)}function F(U){U&&U.length&&T(U)}function j(U){(!u||U)&&(r+=t,h++,p=r.length,u=!0,m=!1)}return N(),{write:T,rawWrite:R,writeLiteral:F,writeLine:j,increaseIndent:()=>{a++},decreaseIndent:()=>{a--},getIndent:()=>a,getTextPos:()=>r.length,getLine:()=>h,getColumn:()=>u?a*q6():r.length-p,getText:()=>r,isAtStartOfLine:()=>u,hasTrailingComment:()=>m,hasTrailingWhitespace:()=>!!r.length&&Vy(r.charCodeAt(r.length-1)),clear:N,writeKeyword:T,writeOperator:T,writeParameter:T,writeProperty:T,writePunctuation:T,writeSpace:T,writeStringLiteral:T,writeSymbol:(U,q)=>T(U),writeTrailingSemicolon:T,writeComment:E}}function Soe(t){let r=!1;function a(){r&&(t.writeTrailingSemicolon(";"),r=!1)}return{...t,writeTrailingSemicolon(){r=!0},writeLiteral(u){a(),t.writeLiteral(u)},writeStringLiteral(u){a(),t.writeStringLiteral(u)},writeSymbol(u,h){a(),t.writeSymbol(u,h)},writePunctuation(u){a(),t.writePunctuation(u)},writeKeyword(u){a(),t.writeKeyword(u)},writeOperator(u){a(),t.writeOperator(u)},writeParameter(u){a(),t.writeParameter(u)},writeSpace(u){a(),t.writeSpace(u)},writeProperty(u){a(),t.writeProperty(u)},writeComment(u){a(),t.writeComment(u)},writeLine(){a(),t.writeLine()},increaseIndent(){a(),t.increaseIndent()},decreaseIndent(){a(),t.decreaseIndent()}}}function $6(t){return t.useCaseSensitiveFileNames?t.useCaseSensitiveFileNames():!1}function cS(t){return Zf($6(t))}function woe(t,r,a){return r.moduleName||xoe(t,r.fileName,a&&a.fileName)}function _$e(t,r){return t.getCanonicalFileName(bo(r,t.getCurrentDirectory()))}function Pxe(t,r,a){const u=r.getExternalModuleFileFromDeclaration(a);if(!u||u.isDeclarationFile)return;const h=GL(a);if(!(h&&Ml(h)&&!cg(h.text)&&!_$e(t,u.path).includes(_$e(t,Xd(t.getCommonSourceDirectory())))))return woe(t,u)}function xoe(t,r,a){const u=b=>t.getCanonicalFileName(b),h=_c(a?rs(a):t.getCommonSourceDirectory(),t.getCurrentDirectory(),u),p=bo(r,t.getCurrentDirectory()),m=OL(h,p,h,u,!1),C=h_(m);return a?KE(C):C}function Axe(t,r,a){const u=r.getCompilerOptions();let h;return u.outDir?h=h_(FJ(t,r,u.outDir)):h=h_(t),h+a}function Oxe(t,r){return AJ(t,r.getCompilerOptions(),r)}function AJ(t,r,a){const u=r.declarationDir||r.outDir,h=u?BJ(t,u,a.getCurrentDirectory(),a.getCommonSourceDirectory(),m=>a.getCanonicalFileName(m)):t,p=OJ(h);return h_(h)+p}function OJ(t){return rd(t,[".mjs",".mts"])?".d.mts":rd(t,[".cjs",".cts"])?".d.cts":rd(t,[".json"])?".d.json.ts":".d.ts"}function Mxe(t){return rd(t,[".d.mts",".mjs",".mts"])?[".mts",".mjs"]:rd(t,[".d.cts",".cjs",".cts"])?[".cts",".cjs"]:rd(t,[".d.json.ts"])?[".json"]:[".tsx",".ts",".jsx",".js"]}function MJ(t,r){var a;if(t.paths)return t.baseUrl??z.checkDefined(t.pathsBasePath||((a=r.getCurrentDirectory)==null?void 0:a.call(r)),"Encountered 'paths' without a 'baseUrl', config file, or host 'getCurrentDirectory'.")}function RJ(t,r,a){const u=t.getCompilerOptions();if(u.outFile){const h=Vh(u),p=u.emitDeclarationOnly||h===2||h===4;return Ri(t.getSourceFiles(),m=>(p||!Td(m))&&cI(m,t,a))}else{const h=r===void 0?t.getSourceFiles():[r];return Ri(h,p=>cI(p,t,a))}}function cI(t,r,a){const u=r.getCompilerOptions();if(u.noEmitForJsFiles&&F_(t)||t.isDeclarationFile||r.isSourceFileFromExternalLibrary(t))return!1;if(a)return!0;if(r.isSourceOfProjectReferenceRedirect(t.fileName))return!1;if(!Dm(t))return!0;if(r.getResolvedProjectReferenceToRedirect(t.fileName))return!1;if(u.outFile)return!0;if(!u.outDir)return!1;if(u.rootDir||u.composite&&u.configFilePath){const h=bo(G7(u,()=>[],r.getCurrentDirectory(),r.getCanonicalFileName),r.getCurrentDirectory()),p=BJ(t.fileName,u.outDir,r.getCurrentDirectory(),h,r.getCanonicalFileName);if(Mb(t.fileName,p,r.getCurrentDirectory(),!r.useCaseSensitiveFileNames())===0)return!1}return!0}function FJ(t,r,a){return BJ(t,a,r.getCurrentDirectory(),r.getCommonSourceDirectory(),u=>r.getCanonicalFileName(u))}function BJ(t,r,a,u,h){let p=bo(t,a);return p=h(p).indexOf(h(u))===0?p.substring(u.length):p,Hr(r,p)}function FW(t,r,a,u,h,p,m){t.writeFile(a,u,h,C=>{r.add(Gc(k.Could_not_write_file_0_Colon_1,a,C))},p,m)}function p$e(t,r,a){if(t.length>L1(t)&&!a(t)){const u=rs(t);p$e(u,r,a),r(t)}}function koe(t,r,a,u,h,p){try{u(t,r,a)}catch{p$e(rs(ra(t)),h,p),u(t,r,a)}}function M8(t,r){const a=Wy(t);return QR(a,r)}function uI(t,r){return QR(t,r)}function Gy(t){return Me(t.members,r=>fu(r)&&Tm(r.body))}function J6(t){if(t&&t.parameters.length>0){const r=t.parameters.length===2&&FT(t.parameters[0]);return t.parameters[r?1:0]}}function Rxe(t){const r=J6(t);return r&&r.type}function RT(t){if(t.parameters.length&&!Qb(t)){const r=t.parameters[0];if(FT(r))return r}}function FT(t){return Uw(t.name)}function Uw(t){return!!t&&t.kind===80&&Toe(t)}function eP(t){return!!Xi(t,r=>r.kind===186?!0:r.kind===80||r.kind===166?!1:"quit")}function BT(t){if(!Uw(t))return!1;for(;__(t.parent)&&t.parent.left===t;)t=t.parent;return t.parent.kind===186}function Toe(t){return t.escapedText==="this"}function qw(t,r){let a,u,h,p;return Hb(r)?(a=r,r.kind===177?h=r:r.kind===178?p=r:z.fail("Accessor has wrong kind")):W(t,m=>{if(Vw(m)&&da(m)===da(r)){const C=lI(m.name),b=lI(r.name);C===b&&(a?u||(u=m):a=m,m.kind===177&&!h&&(h=m),m.kind===178&&!p&&(p=m))}}),{firstAccessor:a,secondAccessor:u,getAccessor:h,setAccessor:p}}function hd(t){if(!Xn(t)&&Uu(t)||Mm(t))return;const r=t.type;return r||!Xn(t)?r:o8(t)?t.typeExpression&&t.typeExpression.type:kk(t)}function Fxe(t){return t.type}function Dp(t){return Qb(t)?t.type&&t.type.typeExpression&&t.type.typeExpression.type:t.type||(Xn(t)?AB(t):void 0)}function WJ(t){return Ln(Tk(t),r=>jIt(r)?r.typeParameters:void 0)}function jIt(t){return Rm(t)&&!(t.parent.kind===320&&(t.parent.tags.some(Em)||t.parent.tags.some(u3)))}function Bxe(t){const r=J6(t);return r&&hd(r)}function Wxe(t,r,a,u){Vxe(t,r,a.pos,u)}function Vxe(t,r,a,u){u&&u.length&&a!==u[0].pos&&uI(t,a)!==uI(t,u[0].pos)&&r.writeLine()}function Hxe(t,r,a,u){a!==u&&uI(t,a)!==uI(t,u)&&r.writeLine()}function jxe(t,r,a,u,h,p,m,C){if(u&&u.length>0){h&&a.writeSpace(" ");let b=!1;for(const T of u)b&&(a.writeSpace(" "),b=!1),C(t,r,a,T.pos,T.end,m),T.hasTrailingNewLine?a.writeLine():b=!0;b&&p&&a.writeSpace(" ")}}function zxe(t,r,a,u,h,p,m){let C,b;if(m?h.pos===0&&(C=Ri(Hy(t,h.pos),T)):C=Hy(t,h.pos),C){const E=[];let N;for(const R of C){if(N){const F=uI(r,N.end);if(uI(r,R.pos)>=F+2)break}E.push(R),N=R}if(E.length){const R=uI(r,La(E).end);uI(r,qa(t,h.pos))>=R+2&&(Wxe(r,a,h,C),jxe(t,r,a,E,!1,!0,p,u),b={nodePos:h.pos,detachedCommentEndPos:La(E).end})}}return b;function T(E){return eJ(t,E.pos)}}function G6(t,r,a,u,h,p){if(t.charCodeAt(u+1)===42){const m=g6(r,u),C=r.length;let b;for(let T=u,E=m.line;T0){let j=F%q6();const U=PJ((F-j)/q6());for(a.rawWrite(U);j;)a.rawWrite(" "),j--}else a.rawWrite("")}zIt(t,h,a,p,T,N),T=N}}else a.writeComment(t.substring(u,h))}function zIt(t,r,a,u,h,p){const m=Math.min(r,p-1),C=t.substring(h,m).trim();C?(a.writeComment(C),m!==r&&a.writeLine()):a.rawWrite(u)}function g$e(t,r,a){let u=0;for(;r=0&&t.kind<=165?0:(t.modifierFlagsCache&536870912||(t.modifierFlagsCache=Ioe(t)|536870912),a||r&&Xn(t)?(!(t.modifierFlagsCache&268435456)&&t.parent&&(t.modifierFlagsCache|=m$e(t)|268435456),v$e(t.modifierFlagsCache)):UIt(t.modifierFlagsCache))}function Wh(t){return $xe(t,!0)}function Jxe(t){return $xe(t,!0,!0)}function uS(t){return $xe(t,!1)}function m$e(t){let r=0;return t.parent&&!Gs(t)&&(Xn(t)&&(ZSe(t)&&(r|=8388608),YSe(t)&&(r|=16777216),ewe(t)&&(r|=33554432),twe(t)&&(r|=67108864),iwe(t)&&(r|=134217728)),nwe(t)&&(r|=65536)),r}function UIt(t){return t&65535}function v$e(t){return t&131071|(t&260046848)>>>23}function qIt(t){return v$e(m$e(t))}function Gxe(t){return Ioe(t)|qIt(t)}function Ioe(t){let r=_0(t)?Rv(t.modifiers):0;return(t.flags&8||t.kind===80&&t.flags&4096)&&(r|=32),r}function Rv(t){let r=0;if(t)for(const a of t)r|=iP(a.kind);return r}function iP(t){switch(t){case 126:return 256;case 125:return 1;case 124:return 4;case 123:return 2;case 128:return 64;case 129:return 512;case 95:return 32;case 138:return 128;case 87:return 4096;case 90:return 2048;case 134:return 1024;case 148:return 8;case 164:return 16;case 103:return 8192;case 147:return 16384;case 170:return 32768}return 0}function y$e(t){return t===57||t===56}function Kxe(t){return y$e(t)||t===54}function F8(t){return t===76||t===77||t===78}function Noe(t){return cr(t)&&F8(t.operatorToken.kind)}function BW(t){return y$e(t)||t===61}function WW(t){return cr(t)&&BW(t.operatorToken.kind)}function jb(t){return t>=64&&t<=79}function Loe(t){const r=Poe(t);return r&&!r.isImplements?r.class:void 0}function Poe(t){if(Gb(t)){if(Lp(t.parent)&&ss(t.parent.parent))return{class:t.parent.parent,isImplements:t.parent.token===119};if(AP(t.parent)){const r=Ok(t.parent);if(r&&ss(r))return{class:r,isImplements:!1}}}}function Yd(t,r){return cr(t)&&(r?t.operatorToken.kind===64:jb(t.operatorToken.kind))&&M_(t.left)}function b$e(t){return Yd(t.parent)&&t.parent.left===t}function dS(t){if(Yd(t,!0)){const r=t.left.kind;return r===210||r===209}return!1}function HJ(t){return Loe(t)!==void 0}function pc(t){return t.kind===80||HW(t)}function Ip(t){switch(t.kind){case 80:return t;case 166:do t=t.left;while(t.kind!==80);return t;case 211:do t=t.expression;while(t.kind!==80);return t}}function VW(t){return t.kind===80||t.kind===110||t.kind===108||t.kind===236||t.kind===211&&VW(t.expression)||t.kind===217&&VW(t.expression)}function HW(t){return Ir(t)&<(t.name)&&pc(t.expression)}function jW(t){if(Ir(t)){const r=jW(t.expression);if(r!==void 0)return r+"."+kp(t.name)}else if(wc(t)){const r=jW(t.expression);if(r!==void 0&&od(t.argumentExpression))return r+"."+lI(t.argumentExpression)}else{if(lt(t))return Ws(t.escapedText);if(J0(t))return o7(t)}}function $w(t){return PT(t)&&Wb(t)==="prototype"}function B8(t){return t.parent.kind===166&&t.parent.right===t||t.parent.kind===211&&t.parent.name===t||t.parent.kind===236&&t.parent.name===t}function Aoe(t){return!!t.parent&&(Ir(t.parent)&&t.parent.name===t||wc(t.parent)&&t.parent.argumentExpression===t)}function Qxe(t){return __(t.parent)&&t.parent.right===t||Ir(t.parent)&&t.parent.name===t||$k(t.parent)&&t.parent.right===t}function jJ(t){return cr(t)&&t.operatorToken.kind===104}function Xxe(t){return jJ(t.parent)&&t===t.parent.right}function Ooe(t){return t.kind===210&&t.properties.length===0}function Zxe(t){return t.kind===209&&t.elements.length===0}function W8(t){if(!(!$It(t)||!t.declarations)){for(const r of t.declarations)if(r.localSymbol)return r.localSymbol}}function $It(t){return t&&O(t.declarations)>0&&Kr(t.declarations[0],2048)}function zJ(t){return Me(yNt,r=>tu(t,r))}function JIt(t){const r=[],a=t.length;for(let u=0;u>6|192),r.push(h&63|128)):h<65536?(r.push(h>>12|224),r.push(h>>6&63|128),r.push(h&63|128)):h<131072?(r.push(h>>18|240),r.push(h>>12&63|128),r.push(h>>6&63|128),r.push(h&63|128)):z.assert(!1,"Unexpected code point")}return r}var nP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Yxe(t){let r="";const a=JIt(t);let u=0;const h=a.length;let p,m,C,b;for(;u>2,m=(a[u]&3)<<4|a[u+1]>>4,C=(a[u+1]&15)<<2|a[u+2]>>6,b=a[u+2]&63,u+1>=h?C=b=64:u+2>=h&&(b=64),r+=nP.charAt(p)+nP.charAt(m)+nP.charAt(C)+nP.charAt(b),u+=3;return r}function GIt(t){let r="",a=0;const u=t.length;for(;a>4&3,E=(m&15)<<4|C>>2&15,N=(C&3)<<6|b&63;E===0&&C!==0?u.push(T):N===0&&b!==0?u.push(T,E):u.push(T,E,N),h+=4}return GIt(u)}function Moe(t,r){const a=mo(r)?r:r.readFile(t);if(!a)return;const u=yle(t,a);return u.error?void 0:u.config}function V8(t,r){return Moe(t,r)||{}}function UJ(t){try{return JSON.parse(t)}catch{return}}function U0(t,r){return!r.directoryExists||r.directoryExists(t)}var KIt=`\r +`,QIt=` +`;function fS(t){switch(t.newLine){case 0:return KIt;case 1:case void 0:return QIt}}function Gg(t,r=t){return z.assert(r>=t||r===-1),{pos:t,end:r}}function qJ(t,r){return Gg(t.pos,r)}function Bk(t,r){return Gg(r,t.end)}function zb(t){const r=_0(t)?vt(t.modifiers,jd):void 0;return r&&!q0(r.end)?Bk(t,r.end):t}function Fv(t){if(To(t)||Au(t))return Bk(t,t.name.pos);const r=_0(t)?Ql(t.modifiers):void 0;return r&&!q0(r.end)?Bk(t,r.end):zb(t)}function C$e(t){return t.pos===t.end}function Roe(t,r){return Gg(t,t+Ta(r).length)}function dI(t,r){return nke(t,t,r)}function $J(t,r,a){return Kg(H8(t,a,!1),H8(r,a,!1),a)}function ike(t,r,a){return Kg(t.end,r.end,a)}function nke(t,r,a){return Kg(H8(t,a,!1),r.end,a)}function zW(t,r,a){return Kg(t.end,H8(r,a,!1),a)}function Foe(t,r,a,u){const h=H8(r,a,u);return XR(a,t.end,h)}function S$e(t,r,a){return XR(a,t.end,r.end)}function rke(t,r){return!Kg(t.pos,t.end,r)}function Kg(t,r,a){return XR(a,t,r)===0}function H8(t,r,a){return q0(t.pos)?-1:qa(r.text,t.pos,!1,a)}function ske(t,r,a,u){const h=qa(a.text,t,!1,u),p=XIt(h,r,a);return XR(a,p??r,h)}function oke(t,r,a,u){const h=qa(a.text,t,!1,u);return XR(a,t,Math.min(r,h))}function XIt(t,r=0,a){for(;t-- >r;)if(!Vy(a.text.charCodeAt(t)))return t}function Boe(t){const r=xo(t);if(r)switch(r.parent.kind){case 266:case 267:return r===r.parent.name}return!1}function j8(t){return Ri(t.declarations,UW)}function UW(t){return ds(t)&&t.initializer!==void 0}function Woe(t){return t.watch&&Vl(t,"watch")}function h0(t){t.close()}function Pu(t){return t.flags&33554432?t.links.checkFlags:0}function Qg(t,r=!1){if(t.valueDeclaration){const a=r&&t.declarations&&Me(t.declarations,Np)||t.flags&32768&&Me(t.declarations,hg)||t.valueDeclaration,u=wk(a);return t.parent&&t.parent.flags&32?u:u&-8}if(Pu(t)&6){const a=t.links.checkFlags,u=a&1024?2:a&256?1:4,h=a&2048?256:0;return u|h}return t.flags&4194304?257:0}function Of(t,r){return t.flags&2097152?r.getAliasedSymbol(t):t}function K6(t){return t.exportSymbol?t.exportSymbol.flags|t.flags:t.flags}function JJ(t){return z8(t)===1}function rP(t){return z8(t)!==0}function z8(t){const{parent:r}=t;switch(r==null?void 0:r.kind){case 217:return z8(r);case 225:case 224:const{operator:a}=r;return a===46||a===47?2:0;case 226:const{left:u,operatorToken:h}=r;return u===t&&jb(h.kind)?h.kind===64?1:2:0;case 211:return r.name!==t?0:z8(r);case 303:{const p=z8(r.parent);return t===r.name?ZIt(p):p}case 304:return t===r.objectAssignmentInitializer?0:z8(r.parent);case 209:return z8(r);default:return 0}}function ZIt(t){switch(t){case 0:return 1;case 1:return 0;case 2:return 2;default:return z.assertNever(t)}}function Voe(t,r){if(!t||!r||Object.keys(t).length!==Object.keys(r).length)return!1;for(const a in t)if(typeof t[a]=="object"){if(!Voe(t[a],r[a]))return!1}else if(typeof t[a]!="function"&&t[a]!==r[a])return!1;return!0}function tp(t,r){t.forEach(r),t.clear()}function Ky(t,r,a){const{onDeleteValue:u,onExistingValue:h}=a;t.forEach((p,m)=>{var C;r!=null&&r.has(m)?h&&h(p,(C=r.get)==null?void 0:C.call(r,m),m):(t.delete(m),u(p,m))})}function U8(t,r,a){Ky(t,r,a);const{createNewValue:u}=a;r==null||r.forEach((h,p)=>{t.has(p)||t.set(p,u(p,h))})}function ake(t){if(t.flags&32){const r=Ub(t);return!!r&&Kr(r,64)}return!1}function Ub(t){var r;return(r=t.declarations)==null?void 0:r.find(ss)}function Rr(t){return t.flags&3899393?t.objectFlags:0}function w$e(t,r){return!!c0(t,a=>r(a)?!0:void 0)}function GJ(t){return!!t&&!!t.declarations&&!!t.declarations[0]&&_V(t.declarations[0])}function lke({moduleSpecifier:t}){return ja(t)?t.text:yu(t)}function Hoe(t){let r;return jo(t,a=>{Tm(a)&&(r=a)},a=>{for(let u=a.length-1;u>=0;u--)if(Tm(a[u])){r=a[u];break}}),r}function Lm(t,r,a=!0){return t.has(r)?!1:(t.set(r,a),!0)}function sP(t){return ss(t)||Ff(t)||p_(t)}function joe(t){return t>=182&&t<=205||t===133||t===159||t===150||t===163||t===151||t===136||t===154||t===155||t===116||t===157||t===146||t===141||t===233||t===312||t===313||t===314||t===315||t===316||t===317||t===318}function Sc(t){return t.kind===211||t.kind===212}function zoe(t){return t.kind===211?t.name:(z.assert(t.kind===212),t.argumentExpression)}function KJ(t){return t.kind===275||t.kind===279}function Q6(t){for(;Sc(t);)t=t.expression;return t}function cke(t,r){if(Sc(t.parent)&&Aoe(t))return a(t.parent);function a(u){if(u.kind===211){const h=r(u.name);if(h!==void 0)return h}else if(u.kind===212)if(lt(u.argumentExpression)||Ml(u.argumentExpression)){const h=r(u.argumentExpression);if(h!==void 0)return h}else return;if(Sc(u.expression))return a(u.expression);if(lt(u.expression))return r(u.expression)}}function X6(t,r){for(;;){switch(t.kind){case 225:t=t.operand;continue;case 226:t=t.left;continue;case 227:t=t.condition;continue;case 215:t=t.tag;continue;case 213:if(r)return t;case 234:case 212:case 211:case 235:case 354:case 238:t=t.expression;continue}return t}}function YIt(t,r){this.flags=t,this.escapedName=r,this.declarations=void 0,this.valueDeclaration=void 0,this.id=0,this.mergeId=0,this.parent=void 0,this.members=void 0,this.exports=void 0,this.exportSymbol=void 0,this.constEnumOnlyModule=void 0,this.isReferenced=void 0,this.lastAssignmentPos=void 0,this.links=void 0}function eNt(t,r){this.flags=r,(z.isDebugging||sr)&&(this.checker=t)}function tNt(t,r){this.flags=r,z.isDebugging&&(this.checker=t)}function uke(t,r,a){this.pos=r,this.end=a,this.kind=t,this.id=0,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}function iNt(t,r,a){this.pos=r,this.end=a,this.kind=t,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.emitNode=void 0}function nNt(t,r,a){this.pos=r,this.end=a,this.kind=t,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}function rNt(t,r,a){this.fileName=t,this.text=r,this.skipTrivia=a||(u=>u)}var Mf={getNodeConstructor:()=>uke,getTokenConstructor:()=>iNt,getIdentifierConstructor:()=>nNt,getPrivateIdentifierConstructor:()=>uke,getSourceFileConstructor:()=>uke,getSymbolConstructor:()=>YIt,getTypeConstructor:()=>eNt,getSignatureConstructor:()=>tNt,getSourceMapSourceConstructor:()=>rNt},x$e=[];function k$e(t){x$e.push(t),t(Mf)}function dke(t){Object.assign(Mf,t),W(x$e,r=>r(Mf))}function Qy(t,r){return t.replace(/{(\d+)}/g,(a,u)=>""+z.checkDefined(r[+u]))}var QJ;function fke(t){QJ=t}function hke(t){!QJ&&t&&(QJ=t())}function Po(t){return QJ&&QJ[t.key]||t.message}function oP(t,r,a,u,h,...p){a+u>r.length&&(u=r.length-a),qwe(r,a,u);let m=Po(h);return Rt(p)&&(m=Qy(m,p)),{file:void 0,start:a,length:u,messageText:m,category:h.category,code:h.code,reportsUnnecessary:h.reportsUnnecessary,fileName:t}}function sNt(t){return t.file===void 0&&t.start!==void 0&&t.length!==void 0&&typeof t.fileName=="string"}function T$e(t,r){const a=r.fileName||"",u=r.text.length;z.assertEqual(t.fileName,a),z.assertLessThanOrEqual(t.start,u),z.assertLessThanOrEqual(t.start+t.length,u);const h={file:r,start:t.start,length:t.length,messageText:t.messageText,category:t.category,code:t.code,reportsUnnecessary:t.reportsUnnecessary};if(t.relatedInformation){h.relatedInformation=[];for(const p of t.relatedInformation)sNt(p)&&p.fileName===a?(z.assertLessThanOrEqual(p.start,u),z.assertLessThanOrEqual(p.start+p.length,u),h.relatedInformation.push(T$e(p,r))):h.relatedInformation.push(p)}return h}function aP(t,r){const a=[];for(const u of t)a.push(T$e(u,r));return a}function ef(t,r,a,u,...h){qwe(t.text,r,a);let p=Po(u);return Rt(h)&&(p=Qy(p,h)),{file:t,start:r,length:a,messageText:p,category:u.category,code:u.code,reportsUnnecessary:u.reportsUnnecessary,reportsDeprecated:u.reportsDeprecated}}function lP(t,...r){let a=Po(t);return Rt(r)&&(a=Qy(a,r)),a}function Gc(t,...r){let a=Po(t);return Rt(r)&&(a=Qy(a,r)),{file:void 0,start:void 0,length:void 0,messageText:a,category:t.category,code:t.code,reportsUnnecessary:t.reportsUnnecessary,reportsDeprecated:t.reportsDeprecated}}function XJ(t,r){return{file:void 0,start:void 0,length:void 0,code:t.code,category:t.category,messageText:t.next?t:t.messageText,relatedInformation:r}}function Ro(t,r,...a){let u=Po(r);return Rt(a)&&(u=Qy(u,a)),{messageText:u,category:r.category,code:r.code,next:t===void 0||Array.isArray(t)?t:[t]}}function _ke(t,r){let a=t;for(;a.next;)a=a.next[0];a.next=[r]}function Uoe(t){return t.file?t.file.path:void 0}function q8(t,r){return ZJ(t,r)||oNt(t,r)||0}function ZJ(t,r){const a=qoe(t),u=qoe(r);return Xf(Uoe(t),Uoe(r))||hc(t.start,r.start)||hc(t.length,r.length)||hc(a,u)||aNt(t,r)||0}function oNt(t,r){return!t.relatedInformation&&!r.relatedInformation?0:t.relatedInformation&&r.relatedInformation?hc(r.relatedInformation.length,t.relatedInformation.length)||W(t.relatedInformation,(a,u)=>{const h=r.relatedInformation[u];return q8(a,h)})||0:t.relatedInformation?-1:1}function aNt(t,r){let a=$oe(t),u=$oe(r);typeof a!="string"&&(a=a.messageText),typeof u!="string"&&(u=u.messageText);const h=typeof t.messageText!="string"?t.messageText.next:void 0,p=typeof r.messageText!="string"?r.messageText.next:void 0;let m=Xf(a,u);return m||(m=lNt(h,p),m)?m:t.canonicalHead&&!r.canonicalHead?-1:r.canonicalHead&&!t.canonicalHead?1:0}function lNt(t,r){return t===void 0&&r===void 0?0:t===void 0?1:r===void 0?-1:D$e(t,r)||E$e(t,r)}function D$e(t,r){if(t===void 0&&r===void 0)return 0;if(t===void 0)return 1;if(r===void 0)return-1;let a=hc(r.length,t.length);if(a)return a;for(let u=0;u{h.externalModuleIndicator=xV(h)||!h.isDeclarationFile||void 0};case 1:return h=>{h.externalModuleIndicator=xV(h)};case 2:const r=[xV];(t.jsx===4||t.jsx===5)&&r.push(uNt),r.push(dNt);const a=lg(...r);return h=>void(h.externalModuleIndicator=a(h))}}function YPi(t){return t}var Cd={target:{dependencies:["module"],computeValue:t=>(t.target===0?void 0:t.target)??(t.module===100&&9||t.module===199&&99||1)},module:{dependencies:["target"],computeValue:t=>typeof t.module=="number"?t.module:Cd.target.computeValue(t)>=2?5:1},moduleResolution:{dependencies:["module","target"],computeValue:t=>{let r=t.moduleResolution;if(r===void 0)switch(Cd.module.computeValue(t)){case 1:r=2;break;case 100:r=3;break;case 199:r=99;break;case 200:r=100;break;default:r=1;break}return r}},moduleDetection:{dependencies:["module","target"],computeValue:t=>t.moduleDetection||(Cd.module.computeValue(t)===100||Cd.module.computeValue(t)===199?3:2)},isolatedModules:{dependencies:["verbatimModuleSyntax"],computeValue:t=>!!(t.isolatedModules||t.verbatimModuleSyntax)},esModuleInterop:{dependencies:["module","target"],computeValue:t=>{if(t.esModuleInterop!==void 0)return t.esModuleInterop;switch(Cd.module.computeValue(t)){case 100:case 199:case 200:return!0}return!1}},allowSyntheticDefaultImports:{dependencies:["module","target","moduleResolution"],computeValue:t=>t.allowSyntheticDefaultImports!==void 0?t.allowSyntheticDefaultImports:Cd.esModuleInterop.computeValue(t)||Cd.module.computeValue(t)===4||Cd.moduleResolution.computeValue(t)===100},resolvePackageJsonExports:{dependencies:["moduleResolution"],computeValue:t=>{const r=Cd.moduleResolution.computeValue(t);if(!uP(r))return!1;if(t.resolvePackageJsonExports!==void 0)return t.resolvePackageJsonExports;switch(r){case 3:case 99:case 100:return!0}return!1}},resolvePackageJsonImports:{dependencies:["moduleResolution","resolvePackageJsonExports"],computeValue:t=>{const r=Cd.moduleResolution.computeValue(t);if(!uP(r))return!1;if(t.resolvePackageJsonExports!==void 0)return t.resolvePackageJsonExports;switch(r){case 3:case 99:case 100:return!0}return!1}},resolveJsonModule:{dependencies:["moduleResolution","module","target"],computeValue:t=>t.resolveJsonModule!==void 0?t.resolveJsonModule:Cd.moduleResolution.computeValue(t)===100},declaration:{dependencies:["composite"],computeValue:t=>!!(t.declaration||t.composite)},preserveConstEnums:{dependencies:["isolatedModules","verbatimModuleSyntax"],computeValue:t=>!!(t.preserveConstEnums||Cd.isolatedModules.computeValue(t))},incremental:{dependencies:["composite"],computeValue:t=>!!(t.incremental||t.composite)},declarationMap:{dependencies:["declaration","composite"],computeValue:t=>!!(t.declarationMap&&Cd.declaration.computeValue(t))},allowJs:{dependencies:["checkJs"],computeValue:t=>t.allowJs===void 0?!!t.checkJs:t.allowJs},useDefineForClassFields:{dependencies:["target","module"],computeValue:t=>t.useDefineForClassFields===void 0?Cd.target.computeValue(t)>=9:t.useDefineForClassFields},noImplicitAny:{dependencies:["strict"],computeValue:t=>Hh(t,"noImplicitAny")},noImplicitThis:{dependencies:["strict"],computeValue:t=>Hh(t,"noImplicitThis")},strictNullChecks:{dependencies:["strict"],computeValue:t=>Hh(t,"strictNullChecks")},strictFunctionTypes:{dependencies:["strict"],computeValue:t=>Hh(t,"strictFunctionTypes")},strictBindCallApply:{dependencies:["strict"],computeValue:t=>Hh(t,"strictBindCallApply")},strictPropertyInitialization:{dependencies:["strict"],computeValue:t=>Hh(t,"strictPropertyInitialization")},alwaysStrict:{dependencies:["strict"],computeValue:t=>Hh(t,"alwaysStrict")},useUnknownInCatchVariables:{dependencies:["strict"],computeValue:t=>Hh(t,"useUnknownInCatchVariables")}},il=Cd.target.computeValue,Vh=Cd.module.computeValue,f_=Cd.moduleResolution.computeValue,pke=Cd.moduleDetection.computeValue,Xg=Cd.isolatedModules.computeValue,Xy=Cd.esModuleInterop.computeValue,cP=Cd.allowSyntheticDefaultImports.computeValue,Joe=Cd.resolvePackageJsonExports.computeValue,Goe=Cd.resolvePackageJsonImports.computeValue,VT=Cd.resolveJsonModule.computeValue,fg=Cd.declaration.computeValue,HT=Cd.preserveConstEnums.computeValue,$8=Cd.incremental.computeValue,eG=Cd.declarationMap.computeValue,Jw=Cd.allowJs.computeValue,JW=Cd.useDefineForClassFields.computeValue;function tG(t){return t>=5&&t<=99}function iG(t){switch(Vh(t)){case 0:case 4:case 3:return!1}return!0}function gke(t){return t.allowUnreachableCode===!1}function mke(t){return t.allowUnusedLabels===!1}function uP(t){return t>=3&&t<=99||t===100}function Hh(t,r){return t[r]===void 0?!!t.strict:!!t[r]}function nG(t){return hf(fle.type,(r,a)=>r===t?a:void 0)}function Koe(t){return t.useDefineForClassFields!==!1&&il(t)>=9}function vke(t,r){return D6(r,t,VTe)}function yke(t,r){return D6(r,t,HTe)}function bke(t,r){return D6(r,t,jTe)}function rG(t,r){return r.strictFlag?Hh(t,r.name):r.allowJsFlag?Jw(t):t[r.name]}function sG(t){const r=t.jsx;return r===2||r===4||r===5}function oG(t,r){const a=r==null?void 0:r.pragmas.get("jsximportsource"),u=Lo(a)?a[a.length-1]:a;return t.jsx===4||t.jsx===5||t.jsxImportSource||u?(u==null?void 0:u.arguments.factory)||t.jsxImportSource||"react":void 0}function aG(t,r){return t?`${t}/${r.jsx===5?"jsx-dev-runtime":"jsx-runtime"}`:void 0}function Qoe(t){let r=!1;for(let a=0;ah,getSymlinkedDirectories:()=>a,getSymlinkedDirectoriesByRealpath:()=>u,setSymlinkedFile:(b,T)=>(h||(h=new Map)).set(b,T),setSymlinkedDirectory:(b,T)=>{let E=_c(b,t,r);i7(E)||(E=Xd(E),T!==!1&&!(a!=null&&a.has(E))&&(u||(u=Ug())).add(T.realPath,b),(a||(a=new Map)).set(E,T))},setSymlinksFromResolutions(b,T,E){z.assert(!p),p=!0,b(N=>C(this,N.resolvedModule)),T(N=>C(this,N.resolvedTypeReferenceDirective)),E.forEach(N=>C(this,N.resolvedTypeReferenceDirective))},hasProcessedResolutions:()=>p,setSymlinksFromResolution(b){C(this,b)},hasAnySymlinks:m};function m(){return!!(h!=null&&h.size)||!!a&&!!hf(a,b=>!!b)}function C(b,T){if(!T||!T.originalPath||!T.resolvedFileName)return;const{resolvedFileName:E,originalPath:N}=T;b.setSymlinkedFile(_c(N,t,r),E);const[R,F]=fNt(E,N,t,r)||x;R&&F&&b.setSymlinkedDirectory(F,{real:Xd(R),realPath:Xd(_c(R,t,r))})}}function fNt(t,r,a,u){const h=Qd(bo(t,a)),p=Qd(bo(r,a));let m=!1;for(;h.length>=2&&p.length>=2&&!N$e(h[h.length-2],u)&&!N$e(p[p.length-2],u)&&u(h[h.length-1])===u(p[p.length-1]);)h.pop(),p.pop(),m=!0;return m?[Ob(h),Ob(p)]:void 0}function N$e(t,r){return t!==void 0&&(r(t)==="node_modules"||ro(t,"@"))}function hNt(t){return Ure(t.charCodeAt(0))?t.slice(1):void 0}function Zoe(t,r,a){const u=vre(t,r,a);return u===void 0?void 0:hNt(u)}var Cke=/[^\w\s/]/g;function L$e(t){return t.replace(Cke,_Nt)}function _Nt(t){return"\\"+t}var pNt=[42,63],Ske=["node_modules","bower_components","jspm_packages"],wke=`(?!(${Ske.join("|")})(/|$))`,P$e={singleAsteriskRegexFragment:"([^./]|(\\.(?!min\\.js$))?)*",doubleAsteriskRegexFragment:`(/${wke}[^/.][^/]*)*?`,replaceWildcardCharacter:t=>Tke(t,P$e.singleAsteriskRegexFragment)},A$e={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:`(/${wke}[^/.][^/]*)*?`,replaceWildcardCharacter:t=>Tke(t,A$e.singleAsteriskRegexFragment)},O$e={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:"(/.+?)?",replaceWildcardCharacter:t=>Tke(t,O$e.singleAsteriskRegexFragment)},xke={files:P$e,directories:A$e,exclude:O$e};function J8(t,r,a){const u=lG(t,r,a);return!u||!u.length?void 0:`^(${u.map(m=>`(${m})`).join("|")})${a==="exclude"?"($|/)":"$"}`}function lG(t,r,a){if(!(t===void 0||t.length===0))return Ln(t,u=>u&&cG(u,r,a,xke[a]))}function Yoe(t){return!/[.*?]/.test(t)}function kke(t,r,a){const u=t&&cG(t,r,a,xke[a]);return u&&`^(${u})${a==="exclude"?"($|/)":"$"}`}function cG(t,r,a,{singleAsteriskRegexFragment:u,doubleAsteriskRegexFragment:h,replaceWildcardCharacter:p}=xke[a]){let m="",C=!1;const b=CB(t,r),T=La(b);if(a!=="exclude"&&T==="**")return;b[0]=Sk(b[0]),Yoe(T)&&b.push("**","*");let E=0;for(let N of b){if(N==="**")m+=h;else if(a==="directories"&&(m+="(",E++),C&&(m+=Hc),a!=="exclude"){let R="";N.charCodeAt(0)===42?(R+="([^./]"+u+")?",N=N.substr(1)):N.charCodeAt(0)===63&&(R+="[^./]",N=N.substr(1)),R+=N.replace(Cke,p),R!==N&&(m+=wke),m+=R}else m+=N.replace(Cke,p);C=!0}for(;E>0;)m+=")?",E--;return m}function Tke(t,r){return t==="*"?r:t==="?"?"[^/]":"\\"+t}function uG(t,r,a,u,h){t=ra(t),h=ra(h);const p=Hr(h,t);return{includeFilePatterns:Yt(lG(a,p,"files"),m=>`^${m}$`),includeFilePattern:J8(a,p,"files"),includeDirectoryPattern:J8(a,p,"directories"),excludePattern:J8(r,p,"exclude"),basePaths:gNt(t,a,u)}}function Gw(t,r){return new RegExp(t,r?"":"i")}function eae(t,r,a,u,h,p,m,C,b){t=ra(t),p=ra(p);const T=uG(t,a,u,h,p),E=T.includeFilePatterns&&T.includeFilePatterns.map(Q=>Gw(Q,h)),N=T.includeDirectoryPattern&&Gw(T.includeDirectoryPattern,h),R=T.excludePattern&&Gw(T.excludePattern,h),F=E?E.map(()=>[]):[[]],j=new Map,U=Zf(h);for(const Q of T.basePaths)q(Q,Hr(p,Q),m);return zs(F);function q(Q,re,Y){const ue=U(b(re));if(j.has(ue))return;j.set(ue,!0);const{files:te,directories:Se}=C(Q);for(const oe of tc(te,Xf)){const pe=Hr(Q,oe),ye=Hr(re,oe);if(!(r&&!rd(pe,r))&&!(R&&R.test(ye)))if(!E)F[0].push(pe);else{const be=Nt(E,_e=>_e.test(ye));be!==-1&&F[be].push(pe)}}if(!(Y!==void 0&&(Y--,Y===0)))for(const oe of tc(Se,Xf)){const pe=Hr(Q,oe),ye=Hr(re,oe);(!N||N.test(ye))&&(!R||!R.test(ye))&&q(pe,ye,Y)}}}function gNt(t,r,a){const u=[t];if(r){const h=[];for(const p of r){const m=Sp(p)?p:ra(Hr(t,p));h.push(mNt(m))}h.sort(f6(!a));for(const p of h)Be(u,m=>!l0(m,p,t,!a))&&u.push(p)}return u}function mNt(t){const r=gn(t,pNt);return r<0?_6(t)?Sk(rs(t)):t:t.substring(0,t.lastIndexOf(Hc,r))}function dG(t,r){return r||fG(t)||3}function fG(t){switch(t.substr(t.lastIndexOf(".")).toLowerCase()){case".js":case".cjs":case".mjs":return 1;case".jsx":return 2;case".ts":case".cts":case".mts":return 3;case".tsx":return 4;case".json":return 6;default:return 0}}var G8=[[".ts",".tsx",".d.ts"],[".cts",".d.cts"],[".mts",".d.mts"]],tae=zs(G8),vNt=[...G8,[".json"]],yNt=[".d.ts",".d.cts",".d.mts",".cts",".mts",".ts",".tsx"],Dke=[[".js",".jsx"],[".mjs"],[".cjs"]],Z6=zs(Dke),iae=[[".ts",".tsx",".d.ts",".js",".jsx"],[".cts",".d.cts",".cjs"],[".mts",".d.mts",".mjs"]],bNt=[...iae,[".json"]],hG=[".d.ts",".d.cts",".d.mts"],_G=[".ts",".cts",".mts",".tsx"],pG=[".mts",".d.mts",".mjs",".cts",".d.cts",".cjs"];function K8(t,r){const a=t&&Jw(t);if(!r||r.length===0)return a?iae:G8;const u=a?iae:G8,h=zs(u);return[...u,...ns(r,m=>m.scriptKind===7||a&&CNt(m.scriptKind)&&!h.includes(m.extension)?[m.extension]:void 0)]}function GW(t,r){return!t||!VT(t)?r:r===iae?bNt:r===G8?vNt:[...r,[".json"]]}function CNt(t){return t===1||t===2}function Zy(t){return Rt(Z6,r=>tu(t,r))}function dP(t){return Rt(tae,r=>tu(t,r))}var Eke=(t=>(t[t.Minimal=0]="Minimal",t[t.Index=1]="Index",t[t.JsExtension=2]="JsExtension",t[t.TsExtension=3]="TsExtension",t))(Eke||{});function Ike({imports:t},r=lg(Zy,dP)){return Z(t,({text:a})=>cg(a)&&!rd(a,pG)?r(a):void 0)||!1}function Nke(t,r,a,u){const h=f_(a),p=3<=h&&h<=99;if(t==="js"||r===99&&p)return S3(a)&&m()!==2?3:2;if(t==="minimal")return 0;if(t==="index")return 1;if(!S3(a))return u&&Ike(u)?2:0;return m();function m(){let C=!1;const b=u!=null&&u.imports.length?u.imports:u&&F_(u)?SNt(u).map(T=>T.arguments[0]):x;for(const T of b)if(cg(T.text)){if(p&&r===1&&Pce(u,T,a)===99||rd(T.text,pG))continue;if(dP(T.text))return 3;Zy(T.text)&&(C=!0)}return C?2:0}}function SNt(t){let r=0,a;for(const u of t.statements){if(r>3)break;hW(u)?a=no(a,u.declarationList.declarations.map(h=>h.initializer)):_f(u)&&B_(u.expression,!0)?a=xi(a,u.expression):r++}return a||x}function Lke(t,r,a){if(!t)return!1;const u=K8(r,a);for(const h of zs(GW(r,u)))if(tu(t,h))return!0;return!1}function M$e(t){const r=t.match(/\//g);return r?r.length:0}function KW(t,r){return hc(M$e(t),M$e(r))}var Pke=[".d.ts",".d.mts",".d.cts",".mjs",".mts",".cjs",".cts",".ts",".js",".tsx",".jsx",".json"];function h_(t){for(const r of Pke){const a=Ake(t,r);if(a!==void 0)return a}return t}function Ake(t,r){return tu(t,r)?QW(t,r):void 0}function QW(t,r){return t.substring(0,t.length-r.length)}function Kw(t,r){return SB(t,r,Pke,!1)}function Y6(t){const r=t.indexOf("*");return r===-1?t:t.indexOf("*",r+1)!==-1?void 0:{prefix:t.substr(0,r),suffix:t.substr(r+1)}}function gG(t){return ns(wm(t),r=>Y6(r))}function q0(t){return!(t>=0)}function mG(t){return t===".ts"||t===".tsx"||t===".d.ts"||t===".cts"||t===".mts"||t===".d.mts"||t===".d.cts"||ro(t,".d.")&&mu(t,".ts")}function Q8(t){return mG(t)||t===".json"}function X8(t){const r=qb(t);return r!==void 0?r:z.fail(`File ${t} has unknown extension.`)}function R$e(t){return qb(t)!==void 0}function qb(t){return Me(Pke,r=>tu(t,r))}function Z8(t,r){return t.checkJsDirective?t.checkJsDirective.enabled:r.checkJs}var nae={files:x,directories:x};function rae(t,r){const a=[];for(const u of t){if(u===r)return r;mo(u)||a.push(u)}return mre(a,u=>u,r)}function sae(t,r){const a=t.indexOf(r);return z.assert(a!==-1),t.slice(a)}function fa(t,...r){return r.length&&(t.relatedInformation||(t.relatedInformation=[]),z.assert(t.relatedInformation!==x,"Diagnostic had empty array singleton for related info, but is still being constructed!"),t.relatedInformation.push(...r)),t}function Oke(t,r){z.assert(t.length!==0);let a=r(t[0]),u=a;for(let h=1;hu&&(u=p)}return{min:a,max:u}}function oae(t){return{pos:Nk(t),end:t.end}}function aae(t,r){const a=r.pos-1,u=Math.min(t.text.length,qa(t.text,r.end)+1);return{pos:a,end:u}}function Y8(t,r,a){return r.skipLibCheck&&t.isDeclarationFile||r.skipDefaultLibCheck&&t.hasNoDefaultLib||r.noCheck||a.isSourceOfProjectReferenceRedirect(t.fileName)||!XW(t,r)}function XW(t,r){if(t.checkJsDirective&&t.checkJsDirective.enabled===!1)return!1;if(t.scriptKind===3||t.scriptKind===4||t.scriptKind===5)return!0;const u=(t.scriptKind===1||t.scriptKind===2)&&Z8(t,r);return p8(t,r.checkJs)||u||t.scriptKind===7}function vG(t,r){return t===r||typeof t=="object"&&t!==null&&typeof r=="object"&&r!==null&&Nf(t,r,vG)}function e7(t){let r;switch(t.charCodeAt(1)){case 98:case 66:r=1;break;case 111:case 79:r=3;break;case 120:case 88:r=4;break;default:const T=t.length-1;let E=0;for(;t.charCodeAt(E)===48;)E++;return t.slice(E,T)||"0"}const a=2,u=t.length-1,h=(u-a)*r,p=new Uint16Array((h>>>4)+(h&15?1:0));for(let T=u-1,E=0;T>=a;T--,E+=r){const N=E>>>4,R=t.charCodeAt(T),j=(R<=57?R-48:10+R-(R<=70?65:97))<<(E&15);p[N]|=j;const U=j>>>16;U&&(p[N+1]|=U)}let m="",C=p.length-1,b=!0;for(;b;){let T=0;b=!1;for(let E=C;E>=0;E--){const N=T<<16|p[E],R=N/10|0;p[E]=R,T=N-R*10,R&&!b&&(C=E,b=!0)}m=T+m}return m}function jT({negative:t,base10Value:r}){return(t&&r!=="0"?"-":"")+r}function Mke(t){if(yG(t,!1))return lae(t)}function lae(t){const r=t.startsWith("-"),a=e7(`${r?t.slice(1):t}n`);return{negative:r,base10Value:a}}function yG(t,r){if(t==="")return!1;const a=zy(99,!1);let u=!0;a.setOnError(()=>u=!1),a.setText(t+"n");let h=a.scan();const p=h===41;p&&(h=a.scan());const m=a.getTokenFlags();return u&&h===10&&a.getTokenEnd()===t.length+1&&!(m&512)&&(!r||t===jT({negative:p,base10Value:e7(a.getTokenValue())}))}function Wk(t){return!!(t.flags&33554432)||vJ(t)||kNt(t)||xNt(t)||!(z0(t)||wNt(t))}function wNt(t){return lt(t)&&ih(t.parent)&&t.parent.name===t}function xNt(t){for(;t.kind===80||t.kind===211;)t=t.parent;if(t.kind!==167)return!1;if(Kr(t.parent,64))return!0;const r=t.parent.parent.kind;return r===264||r===187}function kNt(t){if(t.kind!==80)return!1;const r=Xi(t.parent,a=>{switch(a.kind){case 298:return!0;case 211:case 233:return!1;default:return"quit"}});return(r==null?void 0:r.token)===119||(r==null?void 0:r.parent.kind)===264}function Rke(t){return _g(t)&<(t.typeName)}function Fke(t,r=XC){if(t.length<2)return!0;const a=t[0];for(let u=1,h=t.length;ut.includes(r))}function Vke(t){if(!t.parent)return;switch(t.kind){case 168:const{parent:a}=t;return a.kind===195?void 0:a.typeParameters;case 169:return t.parent.parameters;case 204:return t.parent.templateSpans;case 239:return t.parent.templateSpans;case 170:{const{parent:u}=t;return eD(u)?u.modifiers:void 0}case 298:return t.parent.heritageClauses}const{parent:r}=t;if(k6(t))return bI(t.parent)?void 0:t.parent.tags;switch(r.kind){case 187:case 264:return xT(t)?r.members:void 0;case 192:case 193:return r.types;case 189:case 209:case 355:case 275:case 279:return r.elements;case 210:case 292:return r.properties;case 213:case 214:return gs(t)?r.typeArguments:r.expression===t?void 0:r.arguments;case 284:case 288:return JB(t)?r.children:void 0;case 286:case 285:return gs(t)?r.typeArguments:void 0;case 241:case 296:case 297:case 268:return r.statements;case 269:return r.clauses;case 263:case 231:return Vd(t)?r.members:void 0;case 266:return nx(t)?r.members:void 0;case 307:return r.statements}}function bG(t){if(!t.typeParameters){if(Rt(t.parameters,r=>!hd(r)))return!0;if(t.kind!==219){const r=lu(t.parameters);if(!(r&&FT(r)))return!0}}return!1}function n7(t){return t==="Infinity"||t==="-Infinity"||t==="NaN"}function Hke(t){return t.kind===260&&t.parent.kind===299}function Qw(t){return t.kind===218||t.kind===219}function zT(t){return t.replace(/\$/gm,()=>"\\$")}function Yy(t){return(+t).toString()===t}function CG(t,r,a,u,h){const p=h&&t==="new";return!p&&wp(t,r)?G.createIdentifier(t):!u&&!p&&Yy(t)&&+t>=0?G.createNumericLiteral(+t):G.createStringLiteral(t,!!a)}function r7(t){return!!(t.flags&262144&&t.isThisType)}function SG(t){let r=0,a=0,u=0,h=0,p;(T=>{T[T.BeforeNodeModules=0]="BeforeNodeModules",T[T.NodeModules=1]="NodeModules",T[T.Scope=2]="Scope",T[T.PackageContent=3]="PackageContent"})(p||(p={}));let m=0,C=0,b=0;for(;C>=0;)switch(m=C,C=t.indexOf("/",m+1),b){case 0:t.indexOf(nb,m)===m&&(r=m,a=C,b=1);break;case 1:case 2:b===1&&t.charAt(m+1)==="@"?b=2:(u=C,b=3);break;case 3:t.indexOf(nb,m)===m?b=1:b=3;break}return h=m,b>1?{topLevelNodeModulesIndex:r,topLevelPackageNameIndex:a,packageRootIndex:u,fileNameIndex:h}:void 0}function B$e(t){var r;return t.kind===341?(r=t.typeExpression)==null?void 0:r.type:t.type}function fP(t){switch(t.kind){case 168:case 263:case 264:case 265:case 266:case 346:case 338:case 340:return!0;case 273:return t.isTypeOnly;case 276:case 281:return t.parent.parent.isTypeOnly;default:return!1}}function ZW(t){return Uk(t)||Ou(t)||Uu(t)||xd(t)||Ff(t)||fP(t)||qu(t)&&!DT(t)&&!Iv(t)}function YW(t){if(!o8(t))return!1;const{isBracketed:r,typeExpression:a}=t;return r||!!a&&a.type.kind===316}function dae(t,r){if(t.length===0)return!1;const a=t.charCodeAt(0);return a===35?t.length>1&&jy(t.charCodeAt(1),r):jy(a,r)}function jke(t){var r;return((r=bae(t))==null?void 0:r.kind)===0}function wG(t){return Xn(t)&&(t.type&&t.type.kind===316||b6(t).some(YW))}function t3(t){switch(t.kind){case 172:case 171:return!!t.questionToken;case 169:return!!t.questionToken||wG(t);case 348:case 341:return YW(t);default:return!1}}function zke(t){const r=t.kind;return(r===211||r===212)&&NP(t.expression)}function fae(t){return Xn(t)&&g_(t)&&Jp(t)&&!!use(t)}function hae(t){return z.checkDefined(xG(t))}function xG(t){const r=use(t);return r&&r.typeExpression&&r.typeExpression.type}function s7(t){return lt(t)?t.escapedText:hP(t)}function eV(t){return lt(t)?dr(t):o7(t)}function Uke(t){const r=t.kind;return r===80||r===295}function hP(t){return`${t.namespace.escapedText}:${dr(t.name)}`}function o7(t){return`${dr(t.namespace)}:${dr(t.name)}`}function _ae(t){return lt(t)?dr(t):o7(t)}function Pm(t){return!!(t.flags&8576)}function Am(t){return t.flags&8192?t.escapedName:t.flags&384?du(""+t.value):z.fail()}function _P(t){return!!t&&(Ir(t)||wc(t)||cr(t))}function qke(t){return t===void 0?!1:!!T3(t.attributes)}var DNt=String.prototype.replace;function pP(t,r){return DNt.call(t,"*",r)}function kG(t){return lt(t.name)?t.name.escapedText:du(t.name.text)}function Hd(t,r=!1,a=!1,u=!1){return{value:t,isSyntacticallyString:r,resolvedOtherFiles:a,hasExternalReferences:u}}function $ke({evaluateElementAccessExpression:t,evaluateEntityNameExpression:r}){function a(h,p){let m=!1,C=!1,b=!1;switch(h=Il(h),h.kind){case 224:const T=a(h.operand,p);if(C=T.resolvedOtherFiles,b=T.hasExternalReferences,typeof T.value=="number")switch(h.operator){case 40:return Hd(T.value,m,C,b);case 41:return Hd(-T.value,m,C,b);case 55:return Hd(~T.value,m,C,b)}break;case 226:{const E=a(h.left,p),N=a(h.right,p);if(m=(E.isSyntacticallyString||N.isSyntacticallyString)&&h.operatorToken.kind===40,C=E.resolvedOtherFiles||N.resolvedOtherFiles,b=E.hasExternalReferences||N.hasExternalReferences,typeof E.value=="number"&&typeof N.value=="number")switch(h.operatorToken.kind){case 52:return Hd(E.value|N.value,m,C,b);case 51:return Hd(E.value&N.value,m,C,b);case 49:return Hd(E.value>>N.value,m,C,b);case 50:return Hd(E.value>>>N.value,m,C,b);case 48:return Hd(E.value<=2)break;case 174:case 176:case 177:case 178:case 262:if(Se&3&&He==="arguments"){ke=a;break e}break;case 218:if(Se&3&&He==="arguments"){ke=a;break e}if(Se&16){const Ye=ue.name;if(Ye&&He===Ye.escapedText){ke=ue.symbol;break e}}break;case 170:ue.parent&&ue.parent.kind===169&&(ue=ue.parent),ue.parent&&(Vd(ue.parent)||ue.parent.kind===263)&&(ue=ue.parent);break;case 346:case 338:case 340:case 351:const Ue=W6(ue);Ue&&(ue=Ue.parent);break;case 169:Fe&&(Fe===ue.initializer||Fe===ue.name&&Qo(Fe))&&(Ie||(Ie=ue));break;case 208:Fe&&(Fe===ue.initializer||Fe===ue.name&&Qo(Fe))&&Fk(ue)&&!Ie&&(Ie=ue);break;case 195:if(Se&262144){const Ye=ue.typeParameter.name;if(Ye&&He===Ye.escapedText){ke=ue.typeParameter.symbol;break e}}break;case 281:Fe&&Fe===ue.propertyName&&ue.parent.parent.moduleSpecifier&&(ue=ue.parent.parent.parent);break}re(ue,Fe)&&(Oe=ue),Fe=ue,ue=Rm(ue)?TJ(ue)||ue.parent:(em(ue)||KG(ue))&&Ak(ue)||ue.parent}if(pe&&ke&&(!Oe||ke!==Oe.symbol)&&(ke.isReferenced|=Se),!ke){if(Fe&&(z.assertNode(Fe,Ns),Fe.commonJsModuleIndicator&&He==="exports"&&Se&Fe.symbol.flags))return Fe.symbol;ye||(ke=m(p,He,Se))}if(!ke&&Ee&&Xn(Ee)&&Ee.parent&&B_(Ee.parent,!1))return r;if(oe){if(fe&&T(Ee,He,fe,ke))return;ke?N(Ee,ke,Se,Fe,Ie,Le):E(Ee,te,Se,oe)}return ke}function q(ue,te,Se){const oe=il(t),pe=te;if(Gs(Se)&&pe.body&&ue.valueDeclaration&&ue.valueDeclaration.pos>=pe.body.pos&&ue.valueDeclaration.end<=pe.body.end&&oe>=2){let _e=b(pe);return _e===void 0&&(_e=W(pe.parameters,ye)||!1,C(pe,_e)),!_e}return!1;function ye(_e){return be(_e.name)||!!_e.initializer&&be(_e.initializer)}function be(_e){switch(_e.kind){case 219:case 218:case 262:case 176:return!1;case 174:case 177:case 178:case 303:return be(_e.name);case 172:return _d(_e)?!F:be(_e.name);default:return fse(_e)||ph(_e)?oe<7:nl(_e)&&_e.dotDotDotToken&&pg(_e.parent)?oe<4:gs(_e)?!1:jo(_e,be)||!1}}}function Q(ue,te){return ue.kind!==219&&ue.kind!==218?qT(ue)||(rc(ue)||ue.kind===172&&!da(ue))&&(!te||te!==ue.name):te&&te===ue.name?!1:ue.asteriskToken||Kr(ue,1024)?!0:!NT(ue)}function re(ue,te){switch(ue.kind){case 169:return!!te&&te===ue.name;case 262:case 263:case 264:case 266:case 265:case 267:return!0;default:return!1}}function Y(ue,te){if(ue.declarations){for(const Se of ue.declarations)if(Se.kind===168&&(Rm(Se.parent)?AT(Se.parent):Se.parent)===te)return!(Rm(Se.parent)&&Me(Se.parent.parent.tags,Em))}return!1}}function TG(t,r=!0){switch(z.type(t),t.kind){case 112:case 97:case 9:case 11:case 15:return!0;case 10:return r;case 224:return t.operator===41?W_(t.operand)||r&&lV(t.operand):t.operator===40?W_(t.operand):!1;default:return!1}}function Jke(t){for(;t.kind===217;)t=t.expression;return t}function Gke(t){switch(z.type(t),t.kind){case 169:case 171:case 172:case 208:case 211:case 212:case 226:case 260:case 277:case 303:return!0;default:return!1}}function Kke(){let t,r,a,u,h;return{createBaseSourceFileNode:p,createBaseIdentifierNode:m,createBasePrivateIdentifierNode:C,createBaseTokenNode:b,createBaseNode:T};function p(E){return new(h||(h=Mf.getSourceFileConstructor()))(E,-1,-1)}function m(E){return new(a||(a=Mf.getIdentifierConstructor()))(E,-1,-1)}function C(E){return new(u||(u=Mf.getPrivateIdentifierConstructor()))(E,-1,-1)}function b(E){return new(r||(r=Mf.getTokenConstructor()))(E,-1,-1)}function T(E){return new(t||(t=Mf.getNodeConstructor()))(E,-1,-1)}}function Qke(t){let r,a;return{getParenthesizeLeftSideOfBinaryForOperator:u,getParenthesizeRightSideOfBinaryForOperator:h,parenthesizeLeftSideOfBinary:T,parenthesizeRightSideOfBinary:E,parenthesizeExpressionOfComputedPropertyName:N,parenthesizeConditionOfConditionalExpression:R,parenthesizeBranchOfConditionalExpression:F,parenthesizeExpressionOfExportDefault:j,parenthesizeExpressionOfNew:U,parenthesizeLeftSideOfAccess:q,parenthesizeOperandOfPostfixUnary:Q,parenthesizeOperandOfPrefixUnary:re,parenthesizeExpressionsOfCommaDelimitedList:Y,parenthesizeExpressionForDisallowedComma:ue,parenthesizeExpressionOfExpressionStatement:te,parenthesizeConciseBodyOfArrowFunction:Se,parenthesizeCheckTypeOfConditionalType:oe,parenthesizeExtendsTypeOfConditionalType:pe,parenthesizeConstituentTypesOfUnionType:be,parenthesizeConstituentTypeOfUnionType:ye,parenthesizeConstituentTypesOfIntersectionType:ve,parenthesizeConstituentTypeOfIntersectionType:_e,parenthesizeOperandOfTypeOperator:Ee,parenthesizeOperandOfReadonlyTypeOperator:ke,parenthesizeNonArrayTypeOfPostfixType:Fe,parenthesizeElementTypesOfTupleType:Oe,parenthesizeElementTypeOfTupleType:fe,parenthesizeTypeOfOptionalType:Le,parenthesizeTypeArguments:We,parenthesizeLeadingTypeArgument:et};function u(Ue){r||(r=new Map);let Ye=r.get(Ue);return Ye||(Ye=wt=>T(Ue,wt),r.set(Ue,Ye)),Ye}function h(Ue){a||(a=new Map);let Ye=a.get(Ue);return Ye||(Ye=wt=>E(Ue,void 0,wt),a.set(Ue,Ye)),Ye}function p(Ue,Ye,wt,nt){const ze=AW(226,Ue),st=moe(226,Ue),xt=u0(Ye);if(!wt&&Ye.kind===219&&ze>3)return!0;const Et=A8(xt);switch(hc(Et,ze)){case-1:return!(!wt&&st===1&&Ye.kind===229);case 1:return!1;case 0:if(wt)return st===1;if(cr(xt)&&xt.operatorToken.kind===Ue){if(m(Ue))return!1;if(Ue===40){const Ht=nt?C(nt):0;if(a8(Ht)&&Ht===C(xt))return!1}}return goe(xt)===0}}function m(Ue){return Ue===42||Ue===52||Ue===51||Ue===53||Ue===28}function C(Ue){if(Ue=u0(Ue),a8(Ue.kind))return Ue.kind;if(Ue.kind===226&&Ue.operatorToken.kind===40){if(Ue.cachedLiteralKind!==void 0)return Ue.cachedLiteralKind;const Ye=C(Ue.left),wt=a8(Ye)&&Ye===C(Ue.right)?Ye:0;return Ue.cachedLiteralKind=wt,wt}return 0}function b(Ue,Ye,wt,nt){return u0(Ye).kind===217?Ye:p(Ue,Ye,wt,nt)?t.createParenthesizedExpression(Ye):Ye}function T(Ue,Ye){return b(Ue,Ye,!0)}function E(Ue,Ye,wt){return b(Ue,wt,!1,Ye)}function N(Ue){return k7(Ue)?t.createParenthesizedExpression(Ue):Ue}function R(Ue){const Ye=AW(227,58),wt=u0(Ue),nt=A8(wt);return hc(nt,Ye)!==1?t.createParenthesizedExpression(Ue):Ue}function F(Ue){const Ye=u0(Ue);return k7(Ye)?t.createParenthesizedExpression(Ue):Ue}function j(Ue){const Ye=u0(Ue);let wt=k7(Ye);if(!wt)switch(X6(Ye,!1).kind){case 231:case 218:wt=!0}return wt?t.createParenthesizedExpression(Ue):Ue}function U(Ue){const Ye=X6(Ue,!0);switch(Ye.kind){case 213:return t.createParenthesizedExpression(Ue);case 214:return Ye.arguments?Ue:t.createParenthesizedExpression(Ue)}return q(Ue)}function q(Ue,Ye){const wt=u0(Ue);return M_(wt)&&(wt.kind!==214||wt.arguments)&&(Ye||!ph(wt))?Ue:zt(t.createParenthesizedExpression(Ue),Ue)}function Q(Ue){return M_(Ue)?Ue:zt(t.createParenthesizedExpression(Ue),Ue)}function re(Ue){return Sse(Ue)?Ue:zt(t.createParenthesizedExpression(Ue),Ue)}function Y(Ue){const Ye=Is(Ue,ue);return zt(t.createNodeArray(Ye,Ue.hasTrailingComma),Ue)}function ue(Ue){const Ye=u0(Ue),wt=A8(Ye),nt=AW(226,28);return wt>nt?Ue:zt(t.createParenthesizedExpression(Ue),Ue)}function te(Ue){const Ye=u0(Ue);if(sa(Ye)){const nt=Ye.expression,ze=u0(nt).kind;if(ze===218||ze===219){const st=t.updateCallExpression(Ye,zt(t.createParenthesizedExpression(nt),nt),Ye.typeArguments,Ye.arguments);return t.restoreOuterExpressions(Ue,st,8)}}const wt=X6(Ye,!1).kind;return wt===210||wt===218?zt(t.createParenthesizedExpression(Ue),Ue):Ue}function Se(Ue){return!Ho(Ue)&&(k7(Ue)||X6(Ue,!1).kind===210)?zt(t.createParenthesizedExpression(Ue),Ue):Ue}function oe(Ue){switch(Ue.kind){case 184:case 185:case 194:return t.createParenthesizedType(Ue)}return Ue}function pe(Ue){switch(Ue.kind){case 194:return t.createParenthesizedType(Ue)}return Ue}function ye(Ue){switch(Ue.kind){case 192:case 193:return t.createParenthesizedType(Ue)}return oe(Ue)}function be(Ue){return t.createNodeArray(Is(Ue,ye))}function _e(Ue){switch(Ue.kind){case 192:case 193:return t.createParenthesizedType(Ue)}return ye(Ue)}function ve(Ue){return t.createNodeArray(Is(Ue,_e))}function Ee(Ue){switch(Ue.kind){case 193:return t.createParenthesizedType(Ue)}return _e(Ue)}function ke(Ue){switch(Ue.kind){case 198:return t.createParenthesizedType(Ue)}return Ee(Ue)}function Fe(Ue){switch(Ue.kind){case 195:case 198:case 186:return t.createParenthesizedType(Ue)}return Ee(Ue)}function Oe(Ue){return t.createNodeArray(Is(Ue,fe))}function fe(Ue){return Ie(Ue)?t.createParenthesizedType(Ue):Ue}function Ie(Ue){return l3(Ue)?Ue.postfix:r3(Ue)||W1(Ue)||n3(Ue)||Hk(Ue)?Ie(Ue.type):$T(Ue)?Ie(Ue.falseType):Yw(Ue)||DP(Ue)?Ie(La(Ue.types)):hI(Ue)?!!Ue.typeParameter.constraint&&Ie(Ue.typeParameter.constraint):!1}function Le(Ue){return Ie(Ue)?t.createParenthesizedType(Ue):Fe(Ue)}function et(Ue){return cwe(Ue)&&Ue.typeParameters?t.createParenthesizedType(Ue):Ue}function He(Ue,Ye){return Ye===0?et(Ue):Ue}function We(Ue){if(Rt(Ue))return t.createNodeArray(Is(Ue,He))}}var Xke={getParenthesizeLeftSideOfBinaryForOperator:t=>fc,getParenthesizeRightSideOfBinaryForOperator:t=>fc,parenthesizeLeftSideOfBinary:(t,r)=>r,parenthesizeRightSideOfBinary:(t,r,a)=>a,parenthesizeExpressionOfComputedPropertyName:fc,parenthesizeConditionOfConditionalExpression:fc,parenthesizeBranchOfConditionalExpression:fc,parenthesizeExpressionOfExportDefault:fc,parenthesizeExpressionOfNew:t=>ua(t,M_),parenthesizeLeftSideOfAccess:t=>ua(t,M_),parenthesizeOperandOfPostfixUnary:t=>ua(t,M_),parenthesizeOperandOfPrefixUnary:t=>ua(t,Sse),parenthesizeExpressionsOfCommaDelimitedList:t=>ua(t,ST),parenthesizeExpressionForDisallowedComma:fc,parenthesizeExpressionOfExpressionStatement:fc,parenthesizeConciseBodyOfArrowFunction:fc,parenthesizeCheckTypeOfConditionalType:fc,parenthesizeExtendsTypeOfConditionalType:fc,parenthesizeConstituentTypesOfUnionType:t=>ua(t,ST),parenthesizeConstituentTypeOfUnionType:fc,parenthesizeConstituentTypesOfIntersectionType:t=>ua(t,ST),parenthesizeConstituentTypeOfIntersectionType:fc,parenthesizeOperandOfTypeOperator:fc,parenthesizeOperandOfReadonlyTypeOperator:fc,parenthesizeNonArrayTypeOfPostfixType:fc,parenthesizeElementTypesOfTupleType:t=>ua(t,ST),parenthesizeElementTypeOfTupleType:fc,parenthesizeTypeOfOptionalType:fc,parenthesizeTypeArguments:t=>t&&ua(t,ST),parenthesizeLeadingTypeArgument:fc};function Zke(t){return{convertToFunctionBlock:r,convertToFunctionExpression:a,convertToClassExpression:u,convertToArrayAssignmentElement:h,convertToObjectAssignmentElement:p,convertToAssignmentPattern:m,convertToObjectAssignmentPattern:C,convertToArrayAssignmentPattern:b,convertToAssignmentElementTarget:T};function r(E,N){if(Ho(E))return E;const R=t.createReturnStatement(E);zt(R,E);const F=t.createBlock([R],N);return zt(F,E),F}function a(E){var N;if(!E.body)return z.fail("Cannot convert a FunctionDeclaration without a body");const R=t.createFunctionExpression((N=CT(E))==null?void 0:N.filter(F=>!SP(F)&&!BG(F)),E.asteriskToken,E.name,E.typeParameters,E.parameters,E.type,E.body);return Er(R,E),zt(R,E),a7(E)&&IG(R,!0),R}function u(E){var N;const R=t.createClassExpression((N=E.modifiers)==null?void 0:N.filter(F=>!SP(F)&&!BG(F)),E.name,E.typeParameters,E.heritageClauses,E.members);return Er(R,E),zt(R,E),a7(E)&&IG(R,!0),R}function h(E){if(nl(E)){if(E.dotDotDotToken)return z.assertNode(E.name,lt),Er(zt(t.createSpreadElement(E.name),E),E);const N=T(E.name);return E.initializer?Er(zt(t.createAssignment(N,E.initializer),E),E):N}return ua(E,Ut)}function p(E){if(nl(E)){if(E.dotDotDotToken)return z.assertNode(E.name,lt),Er(zt(t.createSpreadAssignment(E.name),E),E);if(E.propertyName){const N=T(E.name);return Er(zt(t.createPropertyAssignment(E.propertyName,E.initializer?t.createAssignment(N,E.initializer):N),E),E)}return z.assertNode(E.name,lt),Er(zt(t.createShorthandPropertyAssignment(E.name,E.initializer),E),E)}return ua(E,Fb)}function m(E){switch(E.kind){case 207:case 209:return b(E);case 206:case 210:return C(E)}}function C(E){return pg(E)?Er(zt(t.createObjectLiteralExpression(Yt(E.elements,p)),E),E):ua(E,Pa)}function b(E){return mS(E)?Er(zt(t.createArrayLiteralExpression(Yt(E.elements,h)),E),E):ua(E,Rf)}function T(E){return Qo(E)?m(E):ua(E,Ut)}}var Yke={convertToFunctionBlock:pa,convertToFunctionExpression:pa,convertToClassExpression:pa,convertToArrayAssignmentElement:pa,convertToObjectAssignmentElement:pa,convertToAssignmentPattern:pa,convertToObjectAssignmentPattern:pa,convertToArrayAssignmentPattern:pa,convertToAssignmentElementTarget:pa},mae=0,e2e=(t=>(t[t.None=0]="None",t[t.NoParenthesizerRules=1]="NoParenthesizerRules",t[t.NoNodeConverters=2]="NoNodeConverters",t[t.NoIndentationOnFreshPropertyAccess=4]="NoIndentationOnFreshPropertyAccess",t[t.NoOriginalNode=8]="NoOriginalNode",t))(e2e||{}),W$e=[];function V$e(t){W$e.push(t)}function iV(t,r){const a=t&8?fc:Er,u=l_(()=>t&1?Xke:Qke(Q)),h=l_(()=>t&2?Yke:Zke(Q)),p=I1(A=>($,se)=>Vn($,A,se)),m=I1(A=>$=>At(A,$)),C=I1(A=>$=>gi($,A)),b=I1(A=>()=>Ao(A)),T=I1(A=>$=>zI(A,$)),E=I1(A=>($,se)=>Zn(A,$,se)),N=I1(A=>($,se)=>uC(A,$,se)),R=I1(A=>($,se)=>Rp(A,$,se)),F=I1(A=>($,se)=>r1(A,$,se)),j=I1(A=>($,se,De)=>gx(A,$,se,De)),U=I1(A=>($,se,De)=>cO(A,$,se,De)),q=I1(A=>($,se,De,gt)=>Du(A,$,se,De,gt)),Q={get parenthesizer(){return u()},get converters(){return h()},baseFactory:r,flags:t,createNodeArray:re,createNumericLiteral:Se,createBigIntLiteral:oe,createStringLiteral:ye,createStringLiteralFromNode:be,createRegularExpressionLiteral:_e,createLiteralLikeNode:ve,createIdentifier:Fe,createTempVariable:Oe,createLoopVariable:fe,createUniqueName:Ie,getGeneratedNameForNode:Le,createPrivateIdentifier:He,createUniquePrivateName:Ue,getGeneratedPrivateNameForNode:Ye,createToken:nt,createSuper:ze,createThis:st,createNull:xt,createTrue:Et,createFalse:ft,createModifier:Ht,createModifiersFromModifierFlags:Oi,createQualifiedName:Ji,updateQualifiedName:Ui,createComputedPropertyName:bn,updateComputedPropertyName:Mi,createTypeParameterDeclaration:Ai,updateTypeParameterDeclaration:Rn,createParameterDeclaration:bs,updateParameterDeclaration:Hi,createDecorator:Hs,updateDecorator:Wo,createPropertySignature:ts,updatePropertySignature:Fo,createPropertyDeclaration:Ko,updatePropertyDeclaration:ot,createMethodSignature:hi,updateMethodSignature:hn,createMethodDeclaration:lr,updateMethodDeclaration:as,createConstructorDeclaration:ji,updateConstructorDeclaration:fl,createGetAccessorDeclaration:Ot,updateGetAccessorDeclaration:xe,createSetAccessorDeclaration:Re,updateSetAccessorDeclaration:mt,createCallSignature:pt,updateCallSignature:kt,createConstructSignature:Ci,updateConstructSignature:$e,createIndexSignature:qt,updateIndexSignature:$t,createClassStaticBlockDeclaration:Ds,updateClassStaticBlockDeclaration:ha,createTemplateLiteralTypeSpan:ii,updateTemplateLiteralTypeSpan:Gt,createKeywordTypeNode:wi,createTypePredicateNode:ce,updateTypePredicateNode:ut,createTypeReferenceNode:Bt,updateTypeReferenceNode:le,createFunctionTypeNode:je,updateFunctionTypeNode:de,createConstructorTypeNode:Ae,updateConstructorTypeNode:ni,createTypeQueryNode:fn,updateTypeQueryNode:kn,createTypeLiteralNode:or,updateTypeLiteralNode:rn,createArrayTypeNode:_r,updateArrayTypeNode:Fs,createTupleTypeNode:to,updateTupleTypeNode:Ar,createNamedTupleMember:is,updateNamedTupleMember:$i,createOptionalTypeNode:Tn,updateOptionalTypeNode:ki,createRestTypeNode:zo,updateRestTypeNode:Sl,createUnionTypeNode:co,updateUnionTypeNode:ca,createIntersectionTypeNode:Ic,updateIntersectionTypeNode:$s,createConditionalTypeNode:Ps,updateConditionalTypeNode:pf,createInferTypeNode:qc,updateInferTypeNode:wh,createImportTypeNode:za,updateImportTypeNode:Mc,createParenthesizedType:Ul,updateParenthesizedType:wl,createThisTypeNode:Li,createTypeOperatorNode:wu,updateTypeOperatorNode:zh,createIndexedAccessTypeNode:Uh,updateIndexedAccessTypeNode:z_,createMappedTypeNode:Rc,updateMappedTypeNode:Qc,createLiteralTypeNode:J,updateLiteralTypeNode:ct,createTemplateLiteralType:Tu,updateTemplateLiteralType:Wf,createObjectBindingPattern:Wt,updateObjectBindingPattern:mi,createArrayBindingPattern:mn,updateArrayBindingPattern:Zr,createBindingElement:Fi,updateBindingElement:br,createArrayLiteralExpression:Cs,updateArrayLiteralExpression:xs,createObjectLiteralExpression:ql,updateObjectLiteralExpression:Xc,createPropertyAccessExpression:t&4?(A,$)=>ir($c(A,$),262144):$c,updatePropertyAccessExpression:Ud,createPropertyAccessChain:t&4?(A,$,se)=>ir(Fc(A,$,se),262144):Fc,updatePropertyAccessChain:qd,createElementAccessExpression:Nd,updateElementAccessExpression:md,createElementAccessChain:wg,updateElementAccessChain:it,createCallExpression:Sn,updateCallExpression:uo,createCallChain:rl,updateCallChain:hl,createNewExpression:Mu,updateNewExpression:Ld,createTaggedTemplateExpression:Xl,updateTaggedTemplateExpression:$l,createTypeAssertion:Ju,updateTypeAssertion:np,createParenthesizedExpression:ev,updateParenthesizedExpression:xg,createFunctionExpression:U_,updateFunctionExpression:nm,createArrowFunction:kg,updateArrowFunction:$1,createDeleteExpression:J1,updateDeleteExpression:q_,createTypeOfExpression:vd,updateTypeOfExpression:G1,createVoidExpression:rp,updateVoidExpression:Xv,createAwaitExpression:Tg,updateAwaitExpression:me,createPrefixUnaryExpression:At,updatePrefixUnaryExpression:di,createPostfixUnaryExpression:gi,updatePostfixUnaryExpression:dn,createBinaryExpression:Vn,updateBinaryExpression:ls,createConditionalExpression:ie,updateConditionalExpression:Xe,createTemplateExpression:ei,updateTemplateExpression:Dn,createTemplateHead:Ga,createTemplateMiddle:hu,createTemplateTail:rm,createNoSubstitutionTemplateLiteral:g0,createTemplateLiteralLikeNode:Dl,createYieldExpression:K1,updateYieldExpression:ob,createSpreadElement:DS,updateSpreadElement:ab,createClassExpression:sm,updateClassExpression:Dg,createOmittedExpression:Zl,createExpressionWithTypeArguments:nh,updateExpressionWithTypeArguments:$h,createAsExpression:m0,updateAsExpression:ES,createNonNullExpression:nC,updateNonNullExpression:hx,createSatisfiesExpression:Wm,updateSatisfiesExpression:_x,createNonNullChain:Vm,updateNonNullChain:u2,createMetaProperty:tv,updateMetaProperty:Eg,createTemplateSpan:rC,updateTemplateSpan:rt,createSemicolonClassElement:bt,createBlock:si,updateBlock:Ti,createVariableStatement:Ki,updateVariableStatement:Jn,createEmptyStatement:sn,createExpressionStatement:ar,updateExpressionStatement:ks,createIfStatement:nr,updateIfStatement:ps,createDoStatement:Hn,updateDoStatement:Do,createWhileStatement:Wa,updateWhileStatement:nf,createForStatement:xh,updateForStatement:Hm,createForInStatement:IS,updateForInStatement:jm,createForOfStatement:cA,updateForOfStatement:iO,createContinueStatement:uA,updateContinueStatement:pD,createBreakStatement:d2,updateBreakStatement:f2,createReturnStatement:h2,updateReturnStatement:RI,createWithStatement:NS,updateWithStatement:gD,createSwitchStatement:lb,updateSwitchStatement:mD,createLabeledStatement:vl,updateLabeledStatement:FI,createThrowStatement:BI,updateThrowStatement:_2,createTryStatement:sC,updateTryStatement:Zv,createDebuggerStatement:om,createVariableDeclaration:$_,updateVariableDeclaration:Mp,createVariableDeclarationList:sp,updateVariableDeclarationList:LS,createFunctionDeclaration:dA,updateFunctionDeclaration:fA,createClassDeclaration:PS,updateClassDeclaration:g2,createInterfaceDeclaration:hA,updateInterfaceDeclaration:Pd,createTypeAliasDeclaration:AS,updateTypeAliasDeclaration:_A,createEnumDeclaration:iv,updateEnumDeclaration:WI,createModuleDeclaration:ht,updateModuleDeclaration:v0,createModuleBlock:rf,updateModuleBlock:m2,createCaseBlock:Q1,updateCaseBlock:am,createNamespaceExportDeclaration:Yv,updateNamespaceExportDeclaration:oC,createImportEqualsDeclaration:sl,updateImportEqualsDeclaration:y0,createImportDeclaration:vD,updateImportDeclaration:VI,createImportClause:HI,updateImportClause:v2,createAssertClause:aC,updateAssertClause:lC,createAssertEntry:y2,updateAssertEntry:Ig,createImportTypeAssertionContainer:Xp,updateImportTypeAssertionContainer:OS,createImportAttributes:MS,updateImportAttributes:Zs,createImportAttribute:Tr,updateImportAttribute:rh,createNamespaceImport:nO,updateNamespaceImport:b0,createNamespaceExport:pA,updateNamespaceExport:X1,createNamedImports:RS,updateNamedImports:cC,createImportSpecifier:rO,updateImportSpecifier:b2,createExportAssignment:Zp,updateExportAssignment:yD,createExportDeclaration:mc,updateExportDeclaration:cb,createNamedExports:jI,updateNamedExports:bD,createExportSpecifier:gA,updateExportSpecifier:LF,createMissingDeclaration:oO,createExternalModuleReference:vr,updateExternalModuleReference:kh,get createJSDocAllType(){return b(312)},get createJSDocUnknownType(){return b(313)},get createJSDocNonNullableType(){return N(315)},get updateJSDocNonNullableType(){return R(315)},get createJSDocNullableType(){return N(314)},get updateJSDocNullableType(){return R(314)},get createJSDocOptionalType(){return T(316)},get updateJSDocOptionalType(){return E(316)},get createJSDocVariadicType(){return T(318)},get updateJSDocVariadicType(){return E(318)},get createJSDocNamepathType(){return T(319)},get updateJSDocNamepathType(){return E(319)},createJSDocFunctionType:mA,updateJSDocFunctionType:vA,createJSDocTypeLiteral:Jh,updateJSDocTypeLiteral:C0,createJSDocTypeExpression:zm,updateJSDocTypeExpression:FS,createJSDocSignature:CD,updateJSDocSignature:e1,createJSDocTemplateTag:ub,updateJSDocTemplateTag:C2,createJSDocTypedefTag:yA,updateJSDocTypedefTag:UI,createJSDocParameterTag:SD,updateJSDocParameterTag:aO,createJSDocPropertyTag:qI,updateJSDocPropertyTag:S2,createJSDocCallbackTag:S0,updateJSDocCallbackTag:lO,createJSDocOverloadTag:w2,updateJSDocOverloadTag:px,createJSDocAugmentsTag:dC,updateJSDocAugmentsTag:BS,createJSDocImplementsTag:Um,updateJSDocImplementsTag:CA,createJSDocSeeTag:WS,updateJSDocSeeTag:x2,createJSDocImportTag:Gh,updateJSDocImportTag:$I,createJSDocNameReference:gf,updateJSDocNameReference:fC,createJSDocMemberName:i1,updateJSDocMemberName:Ru,createJSDocLink:sf,updateJSDocLink:hC,createJSDocLinkCode:op,updateJSDocLinkCode:cm,createJSDocLinkPlain:bA,updateJSDocLinkPlain:n1,get createJSDocTypeTag(){return U(344)},get updateJSDocTypeTag(){return q(344)},get createJSDocReturnTag(){return U(342)},get updateJSDocReturnTag(){return q(342)},get createJSDocThisTag(){return U(343)},get updateJSDocThisTag(){return q(343)},get createJSDocAuthorTag(){return F(330)},get updateJSDocAuthorTag(){return j(330)},get createJSDocClassTag(){return F(332)},get updateJSDocClassTag(){return j(332)},get createJSDocPublicTag(){return F(333)},get updateJSDocPublicTag(){return j(333)},get createJSDocPrivateTag(){return F(334)},get updateJSDocPrivateTag(){return j(334)},get createJSDocProtectedTag(){return F(335)},get updateJSDocProtectedTag(){return j(335)},get createJSDocReadonlyTag(){return F(336)},get updateJSDocReadonlyTag(){return j(336)},get createJSDocOverrideTag(){return F(337)},get updateJSDocOverrideTag(){return j(337)},get createJSDocDeprecatedTag(){return F(331)},get updateJSDocDeprecatedTag(){return j(331)},get createJSDocThrowsTag(){return U(349)},get updateJSDocThrowsTag(){return q(349)},get createJSDocSatisfiesTag(){return U(350)},get updateJSDocSatisfiesTag(){return q(350)},createJSDocEnumTag:k2,updateJSDocEnumTag:PF,createJSDocUnknownTag:uO,updateJSDocUnknownTag:dO,createJSDocText:wD,updateJSDocText:T2,createJSDocComment:J_,updateJSDocComment:AF,createJsxElement:D2,updateJsxElement:fO,createJsxSelfClosingElement:E2,updateJsxSelfClosingElement:xD,createJsxOpeningElement:SA,updateJsxOpeningElement:JI,createJsxClosingElement:Ng,updateJsxClosingElement:hO,createJsxFragment:mx,createJsxText:nv,updateJsxText:GI,createJsxOpeningFragment:KI,createJsxJsxClosingFragment:al,updateJsxFragment:Yp,createJsxAttribute:wr,updateJsxAttribute:Lg,createJsxAttributes:Vf,updateJsxAttributes:_O,createJsxSpreadAttribute:pO,updateJsxSpreadAttribute:I2,createJsxExpression:vx,updateJsxExpression:gO,createJsxNamespacedName:yx,updateJsxNamespacedName:w0,createCaseClause:eg,updateCaseClause:Z1,createDefaultClause:s1,updateDefaultClause:_C,createHeritageClause:QI,updateHeritageClause:cd,createCatchClause:x0,updateCatchClause:tg,createPropertyAssignment:VS,updatePropertyAssignment:Pg,createShorthandPropertyAssignment:bx,updateShorthandPropertyAssignment:H,createSpreadAssignment:Jt,updateSpreadAssignment:bi,createEnumMember:cs,updateEnumMember:ho,createSourceFile:so,updateSourceFile:kD,createRedirectedSourceFile:Co,createBundle:Bp,updateBundle:rv,createSyntheticExpression:pC,createSyntaxList:TD,createNotEmittedStatement:mO,createPartiallyEmittedExpression:gC,updatePartiallyEmittedExpression:N2,createCommaListExpression:Cx,updateCommaListExpression:Js,createSyntheticReferenceExpression:Sx,updateSyntheticReferenceExpression:Un,cloneNode:bO,get createComma(){return p(28)},get createAssignment(){return p(64)},get createLogicalOr(){return p(57)},get createLogicalAnd(){return p(56)},get createBitwiseOr(){return p(52)},get createBitwiseXor(){return p(53)},get createBitwiseAnd(){return p(51)},get createStrictEquality(){return p(37)},get createStrictInequality(){return p(38)},get createEquality(){return p(35)},get createInequality(){return p(36)},get createLessThan(){return p(30)},get createLessThanEquals(){return p(33)},get createGreaterThan(){return p(32)},get createGreaterThanEquals(){return p(34)},get createLeftShift(){return p(48)},get createRightShift(){return p(49)},get createUnsignedRightShift(){return p(50)},get createAdd(){return p(40)},get createSubtract(){return p(41)},get createMultiply(){return p(42)},get createDivide(){return p(44)},get createModulo(){return p(45)},get createExponent(){return p(43)},get createPrefixPlus(){return m(40)},get createPrefixMinus(){return m(41)},get createPrefixIncrement(){return m(46)},get createPrefixDecrement(){return m(47)},get createBitwiseNot(){return m(55)},get createLogicalNot(){return m(54)},get createPostfixIncrement(){return C(46)},get createPostfixDecrement(){return C(47)},createImmediatelyInvokedFunctionExpression:pZ,createImmediatelyInvokedArrowFunction:gZ,createVoidZero:Y1,createExportDefault:hj,createExternalModuleExport:MF,createTypeCheck:RF,createIsNotTypeCheck:_j,createMethodCall:L2,createGlobalMethodCall:ED,createFunctionBindCall:pj,createFunctionCallCall:DD,createFunctionApplyCall:mC,createArraySliceCall:qm,createArrayConcatCall:CO,createObjectDefinePropertyCall:gj,createObjectGetOwnPropertyDescriptorCall:ey,createReflectGetCall:ZI,createReflectSetCall:mj,createPropertyDescriptor:FF,createCallBinding:Qe,createAssignmentTargetWrapper:yt,inlineExpressions:Zt,getInternalName:an,getLocalName:jr,getExportName:Bs,getDeclarationName:ws,getNamespaceMemberName:hs,getExternalModuleOrNamespaceExportName:io,restoreOuterExpressions:xA,restoreEnclosingLabel:kA,createUseStrictPrologue:Ka,copyPrologue:ic,copyStandardPrologue:Ag,copyCustomPrologue:sv,ensureUseStrict:vC,liftToBlock:wx,mergeLexicalEnvironment:P2,replaceModifiers:BF,replaceDecoratorsAndModifiers:SO,replacePropertyName:vj};return W(W$e,A=>A(Q)),Q;function re(A,$){if(A===void 0||A===x)A=[];else if(ST(A)){if($===void 0||A.hasTrailingComma===$)return A.transformFlags===void 0&&j$e(A),z.attachNodeArrayDebugInfo(A),A;const gt=A.slice();return gt.pos=A.pos,gt.end=A.end,gt.hasTrailingComma=$,gt.transformFlags=A.transformFlags,z.attachNodeArrayDebugInfo(gt),gt}const se=A.length,De=se>=1&&se<=4?A.slice():A;return De.pos=-1,De.end=-1,De.hasTrailingComma=!!$,De.transformFlags=0,j$e(De),z.attachNodeArrayDebugInfo(De),De}function Y(A){return r.createBaseNode(A)}function ue(A){const $=Y(A);return $.symbol=void 0,$.localSymbol=void 0,$}function te(A,$){return A!==$&&(A.typeArguments=$.typeArguments),Yn(A,$)}function Se(A,$=0){const se=typeof A=="number"?A+"":A;z.assert(se.charCodeAt(0)!==45,"Negative numbers should be created in combination with createPrefixUnaryExpression");const De=ue(9);return De.text=se,De.numericLiteralFlags=$,$&384&&(De.transformFlags|=1024),De}function oe(A){const $=wt(10);return $.text=typeof A=="string"?A:jT(A)+"n",$.transformFlags|=32,$}function pe(A,$){const se=ue(11);return se.text=A,se.singleQuote=$,se}function ye(A,$,se){const De=pe(A,$);return De.hasExtendedUnicodeEscape=se,se&&(De.transformFlags|=1024),De}function be(A){const $=pe(Im(A),void 0);return $.textSourceNode=A,$}function _e(A){const $=wt(14);return $.text=A,$}function ve(A,$){switch(A){case 9:return Se($,0);case 10:return oe($);case 11:return ye($,void 0);case 12:return nv($,!1);case 13:return nv($,!0);case 14:return _e($);case 15:return Dl(A,$,void 0,0)}}function Ee(A){const $=r.createBaseIdentifierNode(80);return $.escapedText=A,$.jsDoc=void 0,$.flowNode=void 0,$.symbol=void 0,$}function ke(A,$,se,De){const gt=Ee(du(A));return aV(gt,{flags:$,id:mae,prefix:se,suffix:De}),mae++,gt}function Fe(A,$,se){$===void 0&&A&&($=bT(A)),$===80&&($=void 0);const De=Ee(du(A));return se&&(De.flags|=256),De.escapedText==="await"&&(De.transformFlags|=67108864),De.flags&256&&(De.transformFlags|=1024),De}function Oe(A,$,se,De){let gt=1;$&&(gt|=8);const vi=ke("",gt,se,De);return A&&A(vi),vi}function fe(A){let $=2;return A&&($|=8),ke("",$,void 0,void 0)}function Ie(A,$=0,se,De){return z.assert(!($&7),"Argument out of range: flags"),z.assert(($&48)!==32,"GeneratedIdentifierFlags.FileLevel cannot be set without also setting GeneratedIdentifierFlags.Optimistic"),ke(A,3|$,se,De)}function Le(A,$=0,se,De){z.assert(!($&7),"Argument out of range: flags");const gt=A?Uy(A)?Jk(!1,se,A,De,dr):`generated@${Tl(A)}`:"";(se||De)&&($|=16);const vi=ke(gt,4|$,se,De);return vi.original=A,vi}function et(A){const $=r.createBasePrivateIdentifierNode(81);return $.escapedText=A,$.transformFlags|=16777216,$}function He(A){return ro(A,"#")||z.fail("First character of private identifier must be #: "+A),et(du(A))}function We(A,$,se,De){const gt=et(du(A));return aV(gt,{flags:$,id:mae,prefix:se,suffix:De}),mae++,gt}function Ue(A,$,se){A&&!ro(A,"#")&&z.fail("First character of private identifier must be #: "+A);const De=8|(A?3:1);return We(A??"",De,$,se)}function Ye(A,$,se){const De=Uy(A)?Jk(!0,$,A,se,dr):`#generated@${Tl(A)}`,vi=We(De,4|($||se?16:0),$,se);return vi.original=A,vi}function wt(A){return r.createBaseTokenNode(A)}function nt(A){z.assert(A>=0&&A<=165,"Invalid token"),z.assert(A<=15||A>=18,"Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."),z.assert(A<=9||A>=15,"Invalid token. Use 'createLiteralLikeNode' to create literals."),z.assert(A!==80,"Invalid token. Use 'createIdentifier' to create identifiers");const $=wt(A);let se=0;switch(A){case 134:se=384;break;case 160:se=4;break;case 125:case 123:case 124:case 148:case 128:case 138:case 87:case 133:case 150:case 163:case 146:case 151:case 103:case 147:case 164:case 154:case 136:case 155:case 116:case 159:case 157:se=1;break;case 108:se=134218752,$.flowNode=void 0;break;case 126:se=1024;break;case 129:se=16777216;break;case 110:se=16384,$.flowNode=void 0;break}return se&&($.transformFlags|=se),$}function ze(){return nt(108)}function st(){return nt(110)}function xt(){return nt(106)}function Et(){return nt(112)}function ft(){return nt(97)}function Ht(A){return nt(A)}function Oi(A){const $=[];return A&32&&$.push(Ht(95)),A&128&&$.push(Ht(138)),A&2048&&$.push(Ht(90)),A&4096&&$.push(Ht(87)),A&1&&$.push(Ht(125)),A&2&&$.push(Ht(123)),A&4&&$.push(Ht(124)),A&64&&$.push(Ht(128)),A&256&&$.push(Ht(126)),A&16&&$.push(Ht(164)),A&8&&$.push(Ht(148)),A&512&&$.push(Ht(129)),A&1024&&$.push(Ht(134)),A&8192&&$.push(Ht(103)),A&16384&&$.push(Ht(147)),$.length?$:void 0}function Ji(A,$){const se=Y(166);return se.left=A,se.right=Ad($),se.transformFlags|=gr(se.left)|nV(se.right),se.flowNode=void 0,se}function Ui(A,$,se){return A.left!==$||A.right!==se?Yn(Ji($,se),A):A}function bn(A){const $=Y(167);return $.expression=u().parenthesizeExpressionOfComputedPropertyName(A),$.transformFlags|=gr($.expression)|1024|131072,$}function Mi(A,$){return A.expression!==$?Yn(bn($),A):A}function Ai(A,$,se,De){const gt=ue(168);return gt.modifiers=pl(A),gt.name=Ad($),gt.constraint=se,gt.default=De,gt.transformFlags=1,gt.expression=void 0,gt.jsDoc=void 0,gt}function Rn(A,$,se,De,gt){return A.modifiers!==$||A.name!==se||A.constraint!==De||A.default!==gt?Yn(Ai($,se,De,gt),A):A}function bs(A,$,se,De,gt,vi){const Gn=ue(169);return Gn.modifiers=pl(A),Gn.dotDotDotToken=$,Gn.name=Ad(se),Gn.questionToken=De,Gn.type=gt,Gn.initializer=ov(vi),Uw(Gn.name)?Gn.transformFlags=1:Gn.transformFlags=ol(Gn.modifiers)|gr(Gn.dotDotDotToken)|Xw(Gn.name)|gr(Gn.questionToken)|gr(Gn.initializer)|(Gn.questionToken??Gn.type?1:0)|(Gn.dotDotDotToken??Gn.initializer?1024:0)|(Rv(Gn.modifiers)&31?8192:0),Gn.jsDoc=void 0,Gn}function Hi(A,$,se,De,gt,vi,Gn){return A.modifiers!==$||A.dotDotDotToken!==se||A.name!==De||A.questionToken!==gt||A.type!==vi||A.initializer!==Gn?Yn(bs($,se,De,gt,vi,Gn),A):A}function Hs(A){const $=Y(170);return $.expression=u().parenthesizeLeftSideOfAccess(A,!1),$.transformFlags|=gr($.expression)|1|8192|33554432,$}function Wo(A,$){return A.expression!==$?Yn(Hs($),A):A}function ts(A,$,se,De){const gt=ue(171);return gt.modifiers=pl(A),gt.name=Ad($),gt.type=De,gt.questionToken=se,gt.transformFlags=1,gt.initializer=void 0,gt.jsDoc=void 0,gt}function Fo(A,$,se,De,gt){return A.modifiers!==$||A.name!==se||A.questionToken!==De||A.type!==gt?Cn(ts($,se,De,gt),A):A}function Cn(A,$){return A!==$&&(A.initializer=$.initializer),Yn(A,$)}function Ko(A,$,se,De,gt){const vi=ue(172);vi.modifiers=pl(A),vi.name=Ad($),vi.questionToken=se&&Zw(se)?se:void 0,vi.exclamationToken=se&&uV(se)?se:void 0,vi.type=De,vi.initializer=ov(gt);const Gn=vi.flags&33554432||Rv(vi.modifiers)&128;return vi.transformFlags=ol(vi.modifiers)|Xw(vi.name)|gr(vi.initializer)|(Gn||vi.questionToken||vi.exclamationToken||vi.type?1:0)|(Ja(vi.name)||Rv(vi.modifiers)&256&&vi.initializer?8192:0)|16777216,vi.jsDoc=void 0,vi}function ot(A,$,se,De,gt,vi){return A.modifiers!==$||A.name!==se||A.questionToken!==(De!==void 0&&Zw(De)?De:void 0)||A.exclamationToken!==(De!==void 0&&uV(De)?De:void 0)||A.type!==gt||A.initializer!==vi?Yn(Ko($,se,De,gt,vi),A):A}function hi(A,$,se,De,gt,vi){const Gn=ue(173);return Gn.modifiers=pl(A),Gn.name=Ad($),Gn.questionToken=se,Gn.typeParameters=pl(De),Gn.parameters=pl(gt),Gn.type=vi,Gn.transformFlags=1,Gn.jsDoc=void 0,Gn.locals=void 0,Gn.nextContainer=void 0,Gn.typeArguments=void 0,Gn}function hn(A,$,se,De,gt,vi,Gn){return A.modifiers!==$||A.name!==se||A.questionToken!==De||A.typeParameters!==gt||A.parameters!==vi||A.type!==Gn?te(hi($,se,De,gt,vi,Gn),A):A}function lr(A,$,se,De,gt,vi,Gn,vo){const ac=ue(174);if(ac.modifiers=pl(A),ac.asteriskToken=$,ac.name=Ad(se),ac.questionToken=De,ac.exclamationToken=void 0,ac.typeParameters=pl(gt),ac.parameters=re(vi),ac.type=Gn,ac.body=vo,!ac.body)ac.transformFlags=1;else{const k0=Rv(ac.modifiers)&1024,T0=!!ac.asteriskToken,ty=k0&&T0;ac.transformFlags=ol(ac.modifiers)|gr(ac.asteriskToken)|Xw(ac.name)|gr(ac.questionToken)|ol(ac.typeParameters)|ol(ac.parameters)|gr(ac.type)|gr(ac.body)&-67108865|(ty?128:k0?256:T0?2048:0)|(ac.questionToken||ac.typeParameters||ac.type?1:0)|1024}return ac.typeArguments=void 0,ac.jsDoc=void 0,ac.locals=void 0,ac.nextContainer=void 0,ac.flowNode=void 0,ac.endFlowNode=void 0,ac.returnFlowNode=void 0,ac}function as(A,$,se,De,gt,vi,Gn,vo,ac){return A.modifiers!==$||A.asteriskToken!==se||A.name!==De||A.questionToken!==gt||A.typeParameters!==vi||A.parameters!==Gn||A.type!==vo||A.body!==ac?fs(lr($,se,De,gt,vi,Gn,vo,ac),A):A}function fs(A,$){return A!==$&&(A.exclamationToken=$.exclamationToken),Yn(A,$)}function Ds(A){const $=ue(175);return $.body=A,$.transformFlags=gr(A)|16777216,$.modifiers=void 0,$.jsDoc=void 0,$.locals=void 0,$.nextContainer=void 0,$.endFlowNode=void 0,$.returnFlowNode=void 0,$}function ha(A,$){return A.body!==$?Yo(Ds($),A):A}function Yo(A,$){return A!==$&&(A.modifiers=$.modifiers),Yn(A,$)}function ji(A,$,se){const De=ue(176);return De.modifiers=pl(A),De.parameters=re($),De.body=se,De.transformFlags=ol(De.modifiers)|ol(De.parameters)|gr(De.body)&-67108865|1024,De.typeParameters=void 0,De.type=void 0,De.typeArguments=void 0,De.jsDoc=void 0,De.locals=void 0,De.nextContainer=void 0,De.endFlowNode=void 0,De.returnFlowNode=void 0,De}function fl(A,$,se,De){return A.modifiers!==$||A.parameters!==se||A.body!==De?St(ji($,se,De),A):A}function St(A,$){return A!==$&&(A.typeParameters=$.typeParameters,A.type=$.type),te(A,$)}function Ot(A,$,se,De,gt){const vi=ue(177);return vi.modifiers=pl(A),vi.name=Ad($),vi.parameters=re(se),vi.type=De,vi.body=gt,vi.body?vi.transformFlags=ol(vi.modifiers)|Xw(vi.name)|ol(vi.parameters)|gr(vi.type)|gr(vi.body)&-67108865|(vi.type?1:0):vi.transformFlags=1,vi.typeArguments=void 0,vi.typeParameters=void 0,vi.jsDoc=void 0,vi.locals=void 0,vi.nextContainer=void 0,vi.flowNode=void 0,vi.endFlowNode=void 0,vi.returnFlowNode=void 0,vi}function xe(A,$,se,De,gt,vi){return A.modifiers!==$||A.name!==se||A.parameters!==De||A.type!==gt||A.body!==vi?Pt(Ot($,se,De,gt,vi),A):A}function Pt(A,$){return A!==$&&(A.typeParameters=$.typeParameters),te(A,$)}function Re(A,$,se,De){const gt=ue(178);return gt.modifiers=pl(A),gt.name=Ad($),gt.parameters=re(se),gt.body=De,gt.body?gt.transformFlags=ol(gt.modifiers)|Xw(gt.name)|ol(gt.parameters)|gr(gt.body)&-67108865|(gt.type?1:0):gt.transformFlags=1,gt.typeArguments=void 0,gt.typeParameters=void 0,gt.type=void 0,gt.jsDoc=void 0,gt.locals=void 0,gt.nextContainer=void 0,gt.flowNode=void 0,gt.endFlowNode=void 0,gt.returnFlowNode=void 0,gt}function mt(A,$,se,De,gt){return A.modifiers!==$||A.name!==se||A.parameters!==De||A.body!==gt?Je(Re($,se,De,gt),A):A}function Je(A,$){return A!==$&&(A.typeParameters=$.typeParameters,A.type=$.type),te(A,$)}function pt(A,$,se){const De=ue(179);return De.typeParameters=pl(A),De.parameters=pl($),De.type=se,De.transformFlags=1,De.jsDoc=void 0,De.locals=void 0,De.nextContainer=void 0,De.typeArguments=void 0,De}function kt(A,$,se,De){return A.typeParameters!==$||A.parameters!==se||A.type!==De?te(pt($,se,De),A):A}function Ci(A,$,se){const De=ue(180);return De.typeParameters=pl(A),De.parameters=pl($),De.type=se,De.transformFlags=1,De.jsDoc=void 0,De.locals=void 0,De.nextContainer=void 0,De.typeArguments=void 0,De}function $e(A,$,se,De){return A.typeParameters!==$||A.parameters!==se||A.type!==De?te(Ci($,se,De),A):A}function qt(A,$,se){const De=ue(181);return De.modifiers=pl(A),De.parameters=pl($),De.type=se,De.transformFlags=1,De.jsDoc=void 0,De.locals=void 0,De.nextContainer=void 0,De.typeArguments=void 0,De}function $t(A,$,se,De){return A.parameters!==se||A.type!==De||A.modifiers!==$?te(qt($,se,De),A):A}function ii(A,$){const se=Y(204);return se.type=A,se.literal=$,se.transformFlags=1,se}function Gt(A,$,se){return A.type!==$||A.literal!==se?Yn(ii($,se),A):A}function wi(A){return nt(A)}function ce(A,$,se){const De=Y(182);return De.assertsModifier=A,De.parameterName=Ad($),De.type=se,De.transformFlags=1,De}function ut(A,$,se,De){return A.assertsModifier!==$||A.parameterName!==se||A.type!==De?Yn(ce($,se,De),A):A}function Bt(A,$){const se=Y(183);return se.typeName=Ad(A),se.typeArguments=$&&u().parenthesizeTypeArguments(re($)),se.transformFlags=1,se}function le(A,$,se){return A.typeName!==$||A.typeArguments!==se?Yn(Bt($,se),A):A}function je(A,$,se){const De=ue(184);return De.typeParameters=pl(A),De.parameters=pl($),De.type=se,De.transformFlags=1,De.modifiers=void 0,De.jsDoc=void 0,De.locals=void 0,De.nextContainer=void 0,De.typeArguments=void 0,De}function de(A,$,se,De){return A.typeParameters!==$||A.parameters!==se||A.type!==De?tt(je($,se,De),A):A}function tt(A,$){return A!==$&&(A.modifiers=$.modifiers),te(A,$)}function Ae(...A){return A.length===4?Ke(...A):A.length===3?Qt(...A):z.fail("Incorrect number of arguments specified.")}function Ke(A,$,se,De){const gt=ue(185);return gt.modifiers=pl(A),gt.typeParameters=pl($),gt.parameters=pl(se),gt.type=De,gt.transformFlags=1,gt.jsDoc=void 0,gt.locals=void 0,gt.nextContainer=void 0,gt.typeArguments=void 0,gt}function Qt(A,$,se){return Ke(void 0,A,$,se)}function ni(...A){return A.length===5?fi(...A):A.length===4?Gi(...A):z.fail("Incorrect number of arguments specified.")}function fi(A,$,se,De,gt){return A.modifiers!==$||A.typeParameters!==se||A.parameters!==De||A.type!==gt?te(Ae($,se,De,gt),A):A}function Gi(A,$,se,De){return fi(A,A.modifiers,$,se,De)}function fn(A,$){const se=Y(186);return se.exprName=A,se.typeArguments=$&&u().parenthesizeTypeArguments($),se.transformFlags=1,se}function kn(A,$,se){return A.exprName!==$||A.typeArguments!==se?Yn(fn($,se),A):A}function or(A){const $=ue(187);return $.members=re(A),$.transformFlags=1,$}function rn(A,$){return A.members!==$?Yn(or($),A):A}function _r(A){const $=Y(188);return $.elementType=u().parenthesizeNonArrayTypeOfPostfixType(A),$.transformFlags=1,$}function Fs(A,$){return A.elementType!==$?Yn(_r($),A):A}function to(A){const $=Y(189);return $.elements=re(u().parenthesizeElementTypesOfTupleType(A)),$.transformFlags=1,$}function Ar(A,$){return A.elements!==$?Yn(to($),A):A}function is(A,$,se,De){const gt=ue(202);return gt.dotDotDotToken=A,gt.name=$,gt.questionToken=se,gt.type=De,gt.transformFlags=1,gt.jsDoc=void 0,gt}function $i(A,$,se,De,gt){return A.dotDotDotToken!==$||A.name!==se||A.questionToken!==De||A.type!==gt?Yn(is($,se,De,gt),A):A}function Tn(A){const $=Y(190);return $.type=u().parenthesizeTypeOfOptionalType(A),$.transformFlags=1,$}function ki(A,$){return A.type!==$?Yn(Tn($),A):A}function zo(A){const $=Y(191);return $.type=A,$.transformFlags=1,$}function Sl(A,$){return A.type!==$?Yn(zo($),A):A}function Rl(A,$,se){const De=Y(A);return De.types=Q.createNodeArray(se($)),De.transformFlags=1,De}function zl(A,$,se){return A.types!==$?Yn(Rl(A.kind,$,se),A):A}function co(A){return Rl(192,A,u().parenthesizeConstituentTypesOfUnionType)}function ca(A,$){return zl(A,$,u().parenthesizeConstituentTypesOfUnionType)}function Ic(A){return Rl(193,A,u().parenthesizeConstituentTypesOfIntersectionType)}function $s(A,$){return zl(A,$,u().parenthesizeConstituentTypesOfIntersectionType)}function Ps(A,$,se,De){const gt=Y(194);return gt.checkType=u().parenthesizeCheckTypeOfConditionalType(A),gt.extendsType=u().parenthesizeExtendsTypeOfConditionalType($),gt.trueType=se,gt.falseType=De,gt.transformFlags=1,gt.locals=void 0,gt.nextContainer=void 0,gt}function pf(A,$,se,De,gt){return A.checkType!==$||A.extendsType!==se||A.trueType!==De||A.falseType!==gt?Yn(Ps($,se,De,gt),A):A}function qc(A){const $=Y(195);return $.typeParameter=A,$.transformFlags=1,$}function wh(A,$){return A.typeParameter!==$?Yn(qc($),A):A}function Tu(A,$){const se=Y(203);return se.head=A,se.templateSpans=re($),se.transformFlags=1,se}function Wf(A,$,se){return A.head!==$||A.templateSpans!==se?Yn(Tu($,se),A):A}function za(A,$,se,De,gt=!1){const vi=Y(205);return vi.argument=A,vi.attributes=$,vi.assertions&&vi.assertions.assertClause&&vi.attributes&&(vi.assertions.assertClause=vi.attributes),vi.qualifier=se,vi.typeArguments=De&&u().parenthesizeTypeArguments(De),vi.isTypeOf=gt,vi.transformFlags=1,vi}function Mc(A,$,se,De,gt,vi=A.isTypeOf){return A.argument!==$||A.attributes!==se||A.qualifier!==De||A.typeArguments!==gt||A.isTypeOf!==vi?Yn(za($,se,De,gt,vi),A):A}function Ul(A){const $=Y(196);return $.type=A,$.transformFlags=1,$}function wl(A,$){return A.type!==$?Yn(Ul($),A):A}function Li(){const A=Y(197);return A.transformFlags=1,A}function wu(A,$){const se=Y(198);return se.operator=A,se.type=A===148?u().parenthesizeOperandOfReadonlyTypeOperator($):u().parenthesizeOperandOfTypeOperator($),se.transformFlags=1,se}function zh(A,$){return A.type!==$?Yn(wu(A.operator,$),A):A}function Uh(A,$){const se=Y(199);return se.objectType=u().parenthesizeNonArrayTypeOfPostfixType(A),se.indexType=$,se.transformFlags=1,se}function z_(A,$,se){return A.objectType!==$||A.indexType!==se?Yn(Uh($,se),A):A}function Rc(A,$,se,De,gt,vi){const Gn=ue(200);return Gn.readonlyToken=A,Gn.typeParameter=$,Gn.nameType=se,Gn.questionToken=De,Gn.type=gt,Gn.members=vi&&re(vi),Gn.transformFlags=1,Gn.locals=void 0,Gn.nextContainer=void 0,Gn}function Qc(A,$,se,De,gt,vi,Gn){return A.readonlyToken!==$||A.typeParameter!==se||A.nameType!==De||A.questionToken!==gt||A.type!==vi||A.members!==Gn?Yn(Rc($,se,De,gt,vi,Gn),A):A}function J(A){const $=Y(201);return $.literal=A,$.transformFlags=1,$}function ct(A,$){return A.literal!==$?Yn(J($),A):A}function Wt(A){const $=Y(206);return $.elements=re(A),$.transformFlags|=ol($.elements)|1024|524288,$.transformFlags&32768&&($.transformFlags|=65664),$}function mi(A,$){return A.elements!==$?Yn(Wt($),A):A}function mn(A){const $=Y(207);return $.elements=re(A),$.transformFlags|=ol($.elements)|1024|524288,$}function Zr(A,$){return A.elements!==$?Yn(mn($),A):A}function Fi(A,$,se,De){const gt=ue(208);return gt.dotDotDotToken=A,gt.propertyName=Ad($),gt.name=Ad(se),gt.initializer=ov(De),gt.transformFlags|=gr(gt.dotDotDotToken)|Xw(gt.propertyName)|Xw(gt.name)|gr(gt.initializer)|(gt.dotDotDotToken?32768:0)|1024,gt.flowNode=void 0,gt}function br(A,$,se,De,gt){return A.propertyName!==se||A.dotDotDotToken!==$||A.name!==De||A.initializer!==gt?Yn(Fi($,se,De,gt),A):A}function Cs(A,$){const se=Y(209),De=A&&Ql(A),gt=re(A,De&&zd(De)?!0:void 0);return se.elements=u().parenthesizeExpressionsOfCommaDelimitedList(gt),se.multiLine=$,se.transformFlags|=ol(se.elements),se}function xs(A,$){return A.elements!==$?Yn(Cs($,A.multiLine),A):A}function ql(A,$){const se=ue(210);return se.properties=re(A),se.multiLine=$,se.transformFlags|=ol(se.properties),se.jsDoc=void 0,se}function Xc(A,$){return A.properties!==$?Yn(ql($,A.multiLine),A):A}function Id(A,$,se){const De=ue(211);return De.expression=A,De.questionDotToken=$,De.name=se,De.transformFlags=gr(De.expression)|gr(De.questionDotToken)|(lt(De.name)?nV(De.name):gr(De.name)|536870912),De.jsDoc=void 0,De.flowNode=void 0,De}function $c(A,$){const se=Id(u().parenthesizeLeftSideOfAccess(A,!1),void 0,Ad($));return f7(A)&&(se.transformFlags|=384),se}function Ud(A,$,se){return O$(A)?qd(A,$,A.questionDotToken,ua(se,lt)):A.expression!==$||A.name!==se?Yn($c($,se),A):A}function Fc(A,$,se){const De=Id(u().parenthesizeLeftSideOfAccess(A,!0),$,Ad(se));return De.flags|=64,De.transformFlags|=32,De}function qd(A,$,se,De){return z.assert(!!(A.flags&64),"Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."),A.expression!==$||A.questionDotToken!==se||A.name!==De?Yn(Fc($,se,De),A):A}function qh(A,$,se){const De=ue(212);return De.expression=A,De.questionDotToken=$,De.argumentExpression=se,De.transformFlags|=gr(De.expression)|gr(De.questionDotToken)|gr(De.argumentExpression),De.jsDoc=void 0,De.flowNode=void 0,De}function Nd(A,$){const se=qh(u().parenthesizeLeftSideOfAccess(A,!1),void 0,xx($));return f7(A)&&(se.transformFlags|=384),se}function md(A,$,se){return dse(A)?it(A,$,A.questionDotToken,se):A.expression!==$||A.argumentExpression!==se?Yn(Nd($,se),A):A}function wg(A,$,se){const De=qh(u().parenthesizeLeftSideOfAccess(A,!0),$,xx(se));return De.flags|=64,De.transformFlags|=32,De}function it(A,$,se,De){return z.assert(!!(A.flags&64),"Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."),A.expression!==$||A.questionDotToken!==se||A.argumentExpression!==De?Yn(wg($,se,De),A):A}function ai(A,$,se,De){const gt=ue(213);return gt.expression=A,gt.questionDotToken=$,gt.typeArguments=se,gt.arguments=De,gt.transformFlags|=gr(gt.expression)|gr(gt.questionDotToken)|ol(gt.typeArguments)|ol(gt.arguments),gt.typeArguments&&(gt.transformFlags|=1),R_(gt.expression)&&(gt.transformFlags|=16384),gt}function Sn(A,$,se){const De=ai(u().parenthesizeLeftSideOfAccess(A,!1),void 0,pl($),u().parenthesizeExpressionsOfCommaDelimitedList(re(se)));return h7(De.expression)&&(De.transformFlags|=8388608),De}function uo(A,$,se,De){return XE(A)?hl(A,$,A.questionDotToken,se,De):A.expression!==$||A.typeArguments!==se||A.arguments!==De?Yn(Sn($,se,De),A):A}function rl(A,$,se,De){const gt=ai(u().parenthesizeLeftSideOfAccess(A,!0),$,pl(se),u().parenthesizeExpressionsOfCommaDelimitedList(re(De)));return gt.flags|=64,gt.transformFlags|=32,gt}function hl(A,$,se,De,gt){return z.assert(!!(A.flags&64),"Cannot update a CallExpression using updateCallChain. Use updateCall instead."),A.expression!==$||A.questionDotToken!==se||A.typeArguments!==De||A.arguments!==gt?Yn(rl($,se,De,gt),A):A}function Mu(A,$,se){const De=ue(214);return De.expression=u().parenthesizeExpressionOfNew(A),De.typeArguments=pl($),De.arguments=se?u().parenthesizeExpressionsOfCommaDelimitedList(se):void 0,De.transformFlags|=gr(De.expression)|ol(De.typeArguments)|ol(De.arguments)|32,De.typeArguments&&(De.transformFlags|=1),De}function Ld(A,$,se,De){return A.expression!==$||A.typeArguments!==se||A.arguments!==De?Yn(Mu($,se,De),A):A}function Xl(A,$,se){const De=Y(215);return De.tag=u().parenthesizeLeftSideOfAccess(A,!1),De.typeArguments=pl($),De.template=se,De.transformFlags|=gr(De.tag)|ol(De.typeArguments)|gr(De.template)|1024,De.typeArguments&&(De.transformFlags|=1),boe(De.template)&&(De.transformFlags|=128),De}function $l(A,$,se,De){return A.tag!==$||A.typeArguments!==se||A.template!==De?Yn(Xl($,se,De),A):A}function Ju(A,$){const se=Y(216);return se.expression=u().parenthesizeOperandOfPrefixUnary($),se.type=A,se.transformFlags|=gr(se.expression)|gr(se.type)|1,se}function np(A,$,se){return A.type!==$||A.expression!==se?Yn(Ju($,se),A):A}function ev(A){const $=Y(217);return $.expression=A,$.transformFlags=gr($.expression),$.jsDoc=void 0,$}function xg(A,$){return A.expression!==$?Yn(ev($),A):A}function U_(A,$,se,De,gt,vi,Gn){const vo=ue(218);vo.modifiers=pl(A),vo.asteriskToken=$,vo.name=Ad(se),vo.typeParameters=pl(De),vo.parameters=re(gt),vo.type=vi,vo.body=Gn;const ac=Rv(vo.modifiers)&1024,k0=!!vo.asteriskToken,T0=ac&&k0;return vo.transformFlags=ol(vo.modifiers)|gr(vo.asteriskToken)|Xw(vo.name)|ol(vo.typeParameters)|ol(vo.parameters)|gr(vo.type)|gr(vo.body)&-67108865|(T0?128:ac?256:k0?2048:0)|(vo.typeParameters||vo.type?1:0)|4194304,vo.typeArguments=void 0,vo.jsDoc=void 0,vo.locals=void 0,vo.nextContainer=void 0,vo.flowNode=void 0,vo.endFlowNode=void 0,vo.returnFlowNode=void 0,vo}function nm(A,$,se,De,gt,vi,Gn,vo){return A.name!==De||A.modifiers!==$||A.asteriskToken!==se||A.typeParameters!==gt||A.parameters!==vi||A.type!==Gn||A.body!==vo?te(U_($,se,De,gt,vi,Gn,vo),A):A}function kg(A,$,se,De,gt,vi){const Gn=ue(219);Gn.modifiers=pl(A),Gn.typeParameters=pl($),Gn.parameters=re(se),Gn.type=De,Gn.equalsGreaterThanToken=gt??nt(39),Gn.body=u().parenthesizeConciseBodyOfArrowFunction(vi);const vo=Rv(Gn.modifiers)&1024;return Gn.transformFlags=ol(Gn.modifiers)|ol(Gn.typeParameters)|ol(Gn.parameters)|gr(Gn.type)|gr(Gn.equalsGreaterThanToken)|gr(Gn.body)&-67108865|(Gn.typeParameters||Gn.type?1:0)|(vo?16640:0)|1024,Gn.typeArguments=void 0,Gn.jsDoc=void 0,Gn.locals=void 0,Gn.nextContainer=void 0,Gn.flowNode=void 0,Gn.endFlowNode=void 0,Gn.returnFlowNode=void 0,Gn}function $1(A,$,se,De,gt,vi,Gn){return A.modifiers!==$||A.typeParameters!==se||A.parameters!==De||A.type!==gt||A.equalsGreaterThanToken!==vi||A.body!==Gn?te(kg($,se,De,gt,vi,Gn),A):A}function J1(A){const $=Y(220);return $.expression=u().parenthesizeOperandOfPrefixUnary(A),$.transformFlags|=gr($.expression),$}function q_(A,$){return A.expression!==$?Yn(J1($),A):A}function vd(A){const $=Y(221);return $.expression=u().parenthesizeOperandOfPrefixUnary(A),$.transformFlags|=gr($.expression),$}function G1(A,$){return A.expression!==$?Yn(vd($),A):A}function rp(A){const $=Y(222);return $.expression=u().parenthesizeOperandOfPrefixUnary(A),$.transformFlags|=gr($.expression),$}function Xv(A,$){return A.expression!==$?Yn(rp($),A):A}function Tg(A){const $=Y(223);return $.expression=u().parenthesizeOperandOfPrefixUnary(A),$.transformFlags|=gr($.expression)|256|128|2097152,$}function me(A,$){return A.expression!==$?Yn(Tg($),A):A}function At(A,$){const se=Y(224);return se.operator=A,se.operand=u().parenthesizeOperandOfPrefixUnary($),se.transformFlags|=gr(se.operand),(A===46||A===47)&<(se.operand)&&!jc(se.operand)&&!Xb(se.operand)&&(se.transformFlags|=268435456),se}function di(A,$){return A.operand!==$?Yn(At(A.operator,$),A):A}function gi(A,$){const se=Y(225);return se.operator=$,se.operand=u().parenthesizeOperandOfPostfixUnary(A),se.transformFlags|=gr(se.operand),lt(se.operand)&&!jc(se.operand)&&!Xb(se.operand)&&(se.transformFlags|=268435456),se}function dn(A,$){return A.operand!==$?Yn(gi($,A.operator),A):A}function Vn(A,$,se){const De=ue(226),gt=A2($),vi=gt.kind;return De.left=u().parenthesizeLeftSideOfBinary(vi,A),De.operatorToken=gt,De.right=u().parenthesizeRightSideOfBinary(vi,De.left,se),De.transformFlags|=gr(De.left)|gr(De.operatorToken)|gr(De.right),vi===61?De.transformFlags|=32:vi===64?Pa(De.left)?De.transformFlags|=5248|Lr(De.left):Rf(De.left)&&(De.transformFlags|=5120|Lr(De.left)):vi===43||vi===68?De.transformFlags|=512:F8(vi)&&(De.transformFlags|=16),vi===103&&Vs(De.left)&&(De.transformFlags|=536870912),De.jsDoc=void 0,De}function Lr(A){return wV(A)?65536:0}function ls(A,$,se,De){return A.left!==$||A.operatorToken!==se||A.right!==De?Yn(Vn($,se,De),A):A}function ie(A,$,se,De,gt){const vi=Y(227);return vi.condition=u().parenthesizeConditionOfConditionalExpression(A),vi.questionToken=$??nt(58),vi.whenTrue=u().parenthesizeBranchOfConditionalExpression(se),vi.colonToken=De??nt(59),vi.whenFalse=u().parenthesizeBranchOfConditionalExpression(gt),vi.transformFlags|=gr(vi.condition)|gr(vi.questionToken)|gr(vi.whenTrue)|gr(vi.colonToken)|gr(vi.whenFalse),vi}function Xe(A,$,se,De,gt,vi){return A.condition!==$||A.questionToken!==se||A.whenTrue!==De||A.colonToken!==gt||A.whenFalse!==vi?Yn(ie($,se,De,gt,vi),A):A}function ei(A,$){const se=Y(228);return se.head=A,se.templateSpans=re($),se.transformFlags|=gr(se.head)|ol(se.templateSpans)|1024,se}function Dn(A,$,se){return A.head!==$||A.templateSpans!==se?Yn(ei($,se),A):A}function Ss(A,$,se,De=0){z.assert(!(De&-7177),"Unsupported template flags.");let gt;if(se!==void 0&&se!==$&&(gt=ENt(A,se),typeof gt=="object"))return z.fail("Invalid raw text");if($===void 0){if(gt===void 0)return z.fail("Arguments 'text' and 'rawText' may not both be undefined.");$=gt}else gt!==void 0&&z.assert($===gt,"Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'.");return $}function Vo(A){let $=1024;return A&&($|=128),$}function po(A,$,se,De){const gt=wt(A);return gt.text=$,gt.rawText=se,gt.templateFlags=De&7176,gt.transformFlags=Vo(gt.templateFlags),gt}function $o(A,$,se,De){const gt=ue(A);return gt.text=$,gt.rawText=se,gt.templateFlags=De&7176,gt.transformFlags=Vo(gt.templateFlags),gt}function Dl(A,$,se,De){return A===15?$o(A,$,se,De):po(A,$,se,De)}function Ga(A,$,se){return A=Ss(16,A,$,se),Dl(16,A,$,se)}function hu(A,$,se){return A=Ss(16,A,$,se),Dl(17,A,$,se)}function rm(A,$,se){return A=Ss(16,A,$,se),Dl(18,A,$,se)}function g0(A,$,se){return A=Ss(16,A,$,se),$o(15,A,$,se)}function K1(A,$){z.assert(!A||!!$,"A `YieldExpression` with an asteriskToken must have an expression.");const se=Y(229);return se.expression=$&&u().parenthesizeExpressionForDisallowedComma($),se.asteriskToken=A,se.transformFlags|=gr(se.expression)|gr(se.asteriskToken)|1024|128|1048576,se}function ob(A,$,se){return A.expression!==se||A.asteriskToken!==$?Yn(K1($,se),A):A}function DS(A){const $=Y(230);return $.expression=u().parenthesizeExpressionForDisallowedComma(A),$.transformFlags|=gr($.expression)|1024|32768,$}function ab(A,$){return A.expression!==$?Yn(DS($),A):A}function sm(A,$,se,De,gt){const vi=ue(231);return vi.modifiers=pl(A),vi.name=Ad($),vi.typeParameters=pl(se),vi.heritageClauses=pl(De),vi.members=re(gt),vi.transformFlags|=ol(vi.modifiers)|Xw(vi.name)|ol(vi.typeParameters)|ol(vi.heritageClauses)|ol(vi.members)|(vi.typeParameters?1:0)|1024,vi.jsDoc=void 0,vi}function Dg(A,$,se,De,gt,vi){return A.modifiers!==$||A.name!==se||A.typeParameters!==De||A.heritageClauses!==gt||A.members!==vi?Yn(sm($,se,De,gt,vi),A):A}function Zl(){return Y(232)}function nh(A,$){const se=Y(233);return se.expression=u().parenthesizeLeftSideOfAccess(A,!1),se.typeArguments=$&&u().parenthesizeTypeArguments($),se.transformFlags|=gr(se.expression)|ol(se.typeArguments)|1024,se}function $h(A,$,se){return A.expression!==$||A.typeArguments!==se?Yn(nh($,se),A):A}function m0(A,$){const se=Y(234);return se.expression=A,se.type=$,se.transformFlags|=gr(se.expression)|gr(se.type)|1,se}function ES(A,$,se){return A.expression!==$||A.type!==se?Yn(m0($,se),A):A}function nC(A){const $=Y(235);return $.expression=u().parenthesizeLeftSideOfAccess(A,!1),$.transformFlags|=gr($.expression)|1,$}function hx(A,$){return R$(A)?u2(A,$):A.expression!==$?Yn(nC($),A):A}function Wm(A,$){const se=Y(238);return se.expression=A,se.type=$,se.transformFlags|=gr(se.expression)|gr(se.type)|1,se}function _x(A,$,se){return A.expression!==$||A.type!==se?Yn(Wm($,se),A):A}function Vm(A){const $=Y(235);return $.flags|=64,$.expression=u().parenthesizeLeftSideOfAccess(A,!0),$.transformFlags|=gr($.expression)|1,$}function u2(A,$){return z.assert(!!(A.flags&64),"Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."),A.expression!==$?Yn(Vm($),A):A}function tv(A,$){const se=Y(236);switch(se.keywordToken=A,se.name=$,se.transformFlags|=gr(se.name),A){case 105:se.transformFlags|=1024;break;case 102:se.transformFlags|=32;break;default:return z.assertNever(A)}return se.flowNode=void 0,se}function Eg(A,$){return A.name!==$?Yn(tv(A.keywordToken,$),A):A}function rC(A,$){const se=Y(239);return se.expression=A,se.literal=$,se.transformFlags|=gr(se.expression)|gr(se.literal)|1024,se}function rt(A,$,se){return A.expression!==$||A.literal!==se?Yn(rC($,se),A):A}function bt(){const A=Y(240);return A.transformFlags|=1024,A}function si(A,$){const se=Y(241);return se.statements=re(A),se.multiLine=$,se.transformFlags|=ol(se.statements),se.jsDoc=void 0,se.locals=void 0,se.nextContainer=void 0,se}function Ti(A,$){return A.statements!==$?Yn(si($,A.multiLine),A):A}function Ki(A,$){const se=Y(243);return se.modifiers=pl(A),se.declarationList=Lo($)?sp($):$,se.transformFlags|=ol(se.modifiers)|gr(se.declarationList),Rv(se.modifiers)&128&&(se.transformFlags=1),se.jsDoc=void 0,se.flowNode=void 0,se}function Jn(A,$,se){return A.modifiers!==$||A.declarationList!==se?Yn(Ki($,se),A):A}function sn(){const A=Y(242);return A.jsDoc=void 0,A}function ar(A){const $=Y(244);return $.expression=u().parenthesizeExpressionOfExpressionStatement(A),$.transformFlags|=gr($.expression),$.jsDoc=void 0,$.flowNode=void 0,$}function ks(A,$){return A.expression!==$?Yn(ar($),A):A}function nr(A,$,se){const De=Y(245);return De.expression=A,De.thenStatement=db($),De.elseStatement=db(se),De.transformFlags|=gr(De.expression)|gr(De.thenStatement)|gr(De.elseStatement),De.jsDoc=void 0,De.flowNode=void 0,De}function ps(A,$,se,De){return A.expression!==$||A.thenStatement!==se||A.elseStatement!==De?Yn(nr($,se,De),A):A}function Hn(A,$){const se=Y(246);return se.statement=db(A),se.expression=$,se.transformFlags|=gr(se.statement)|gr(se.expression),se.jsDoc=void 0,se.flowNode=void 0,se}function Do(A,$,se){return A.statement!==$||A.expression!==se?Yn(Hn($,se),A):A}function Wa(A,$){const se=Y(247);return se.expression=A,se.statement=db($),se.transformFlags|=gr(se.expression)|gr(se.statement),se.jsDoc=void 0,se.flowNode=void 0,se}function nf(A,$,se){return A.expression!==$||A.statement!==se?Yn(Wa($,se),A):A}function xh(A,$,se,De){const gt=Y(248);return gt.initializer=A,gt.condition=$,gt.incrementor=se,gt.statement=db(De),gt.transformFlags|=gr(gt.initializer)|gr(gt.condition)|gr(gt.incrementor)|gr(gt.statement),gt.jsDoc=void 0,gt.locals=void 0,gt.nextContainer=void 0,gt.flowNode=void 0,gt}function Hm(A,$,se,De,gt){return A.initializer!==$||A.condition!==se||A.incrementor!==De||A.statement!==gt?Yn(xh($,se,De,gt),A):A}function IS(A,$,se){const De=Y(249);return De.initializer=A,De.expression=$,De.statement=db(se),De.transformFlags|=gr(De.initializer)|gr(De.expression)|gr(De.statement),De.jsDoc=void 0,De.locals=void 0,De.nextContainer=void 0,De.flowNode=void 0,De}function jm(A,$,se,De){return A.initializer!==$||A.expression!==se||A.statement!==De?Yn(IS($,se,De),A):A}function cA(A,$,se,De){const gt=Y(250);return gt.awaitModifier=A,gt.initializer=$,gt.expression=u().parenthesizeExpressionForDisallowedComma(se),gt.statement=db(De),gt.transformFlags|=gr(gt.awaitModifier)|gr(gt.initializer)|gr(gt.expression)|gr(gt.statement)|1024,A&&(gt.transformFlags|=128),gt.jsDoc=void 0,gt.locals=void 0,gt.nextContainer=void 0,gt.flowNode=void 0,gt}function iO(A,$,se,De,gt){return A.awaitModifier!==$||A.initializer!==se||A.expression!==De||A.statement!==gt?Yn(cA($,se,De,gt),A):A}function uA(A){const $=Y(251);return $.label=Ad(A),$.transformFlags|=gr($.label)|4194304,$.jsDoc=void 0,$.flowNode=void 0,$}function pD(A,$){return A.label!==$?Yn(uA($),A):A}function d2(A){const $=Y(252);return $.label=Ad(A),$.transformFlags|=gr($.label)|4194304,$.jsDoc=void 0,$.flowNode=void 0,$}function f2(A,$){return A.label!==$?Yn(d2($),A):A}function h2(A){const $=Y(253);return $.expression=A,$.transformFlags|=gr($.expression)|128|4194304,$.jsDoc=void 0,$.flowNode=void 0,$}function RI(A,$){return A.expression!==$?Yn(h2($),A):A}function NS(A,$){const se=Y(254);return se.expression=A,se.statement=db($),se.transformFlags|=gr(se.expression)|gr(se.statement),se.jsDoc=void 0,se.flowNode=void 0,se}function gD(A,$,se){return A.expression!==$||A.statement!==se?Yn(NS($,se),A):A}function lb(A,$){const se=Y(255);return se.expression=u().parenthesizeExpressionForDisallowedComma(A),se.caseBlock=$,se.transformFlags|=gr(se.expression)|gr(se.caseBlock),se.jsDoc=void 0,se.flowNode=void 0,se.possiblyExhaustive=!1,se}function mD(A,$,se){return A.expression!==$||A.caseBlock!==se?Yn(lb($,se),A):A}function vl(A,$){const se=Y(256);return se.label=Ad(A),se.statement=db($),se.transformFlags|=gr(se.label)|gr(se.statement),se.jsDoc=void 0,se.flowNode=void 0,se}function FI(A,$,se){return A.label!==$||A.statement!==se?Yn(vl($,se),A):A}function BI(A){const $=Y(257);return $.expression=A,$.transformFlags|=gr($.expression),$.jsDoc=void 0,$.flowNode=void 0,$}function _2(A,$){return A.expression!==$?Yn(BI($),A):A}function sC(A,$,se){const De=Y(258);return De.tryBlock=A,De.catchClause=$,De.finallyBlock=se,De.transformFlags|=gr(De.tryBlock)|gr(De.catchClause)|gr(De.finallyBlock),De.jsDoc=void 0,De.flowNode=void 0,De}function Zv(A,$,se,De){return A.tryBlock!==$||A.catchClause!==se||A.finallyBlock!==De?Yn(sC($,se,De),A):A}function om(){const A=Y(259);return A.jsDoc=void 0,A.flowNode=void 0,A}function $_(A,$,se,De){const gt=ue(260);return gt.name=Ad(A),gt.exclamationToken=$,gt.type=se,gt.initializer=ov(De),gt.transformFlags|=Xw(gt.name)|gr(gt.initializer)|(gt.exclamationToken??gt.type?1:0),gt.jsDoc=void 0,gt}function Mp(A,$,se,De,gt){return A.name!==$||A.type!==De||A.exclamationToken!==se||A.initializer!==gt?Yn($_($,se,De,gt),A):A}function sp(A,$=0){const se=Y(261);return se.flags|=$&7,se.declarations=re(A),se.transformFlags|=ol(se.declarations)|4194304,$&7&&(se.transformFlags|=263168),$&4&&(se.transformFlags|=4),se}function LS(A,$){return A.declarations!==$?Yn(sp($,A.flags),A):A}function dA(A,$,se,De,gt,vi,Gn){const vo=ue(262);if(vo.modifiers=pl(A),vo.asteriskToken=$,vo.name=Ad(se),vo.typeParameters=pl(De),vo.parameters=re(gt),vo.type=vi,vo.body=Gn,!vo.body||Rv(vo.modifiers)&128)vo.transformFlags=1;else{const ac=Rv(vo.modifiers)&1024,k0=!!vo.asteriskToken,T0=ac&&k0;vo.transformFlags=ol(vo.modifiers)|gr(vo.asteriskToken)|Xw(vo.name)|ol(vo.typeParameters)|ol(vo.parameters)|gr(vo.type)|gr(vo.body)&-67108865|(T0?128:ac?256:k0?2048:0)|(vo.typeParameters||vo.type?1:0)|4194304}return vo.typeArguments=void 0,vo.jsDoc=void 0,vo.locals=void 0,vo.nextContainer=void 0,vo.endFlowNode=void 0,vo.returnFlowNode=void 0,vo}function fA(A,$,se,De,gt,vi,Gn,vo){return A.modifiers!==$||A.asteriskToken!==se||A.name!==De||A.typeParameters!==gt||A.parameters!==vi||A.type!==Gn||A.body!==vo?p2(dA($,se,De,gt,vi,Gn,vo),A):A}function p2(A,$){return A!==$&&A.modifiers===$.modifiers&&(A.modifiers=$.modifiers),te(A,$)}function PS(A,$,se,De,gt){const vi=ue(263);return vi.modifiers=pl(A),vi.name=Ad($),vi.typeParameters=pl(se),vi.heritageClauses=pl(De),vi.members=re(gt),Rv(vi.modifiers)&128?vi.transformFlags=1:(vi.transformFlags|=ol(vi.modifiers)|Xw(vi.name)|ol(vi.typeParameters)|ol(vi.heritageClauses)|ol(vi.members)|(vi.typeParameters?1:0)|1024,vi.transformFlags&8192&&(vi.transformFlags|=1)),vi.jsDoc=void 0,vi}function g2(A,$,se,De,gt,vi){return A.modifiers!==$||A.name!==se||A.typeParameters!==De||A.heritageClauses!==gt||A.members!==vi?Yn(PS($,se,De,gt,vi),A):A}function hA(A,$,se,De,gt){const vi=ue(264);return vi.modifiers=pl(A),vi.name=Ad($),vi.typeParameters=pl(se),vi.heritageClauses=pl(De),vi.members=re(gt),vi.transformFlags=1,vi.jsDoc=void 0,vi}function Pd(A,$,se,De,gt,vi){return A.modifiers!==$||A.name!==se||A.typeParameters!==De||A.heritageClauses!==gt||A.members!==vi?Yn(hA($,se,De,gt,vi),A):A}function AS(A,$,se,De){const gt=ue(265);return gt.modifiers=pl(A),gt.name=Ad($),gt.typeParameters=pl(se),gt.type=De,gt.transformFlags=1,gt.jsDoc=void 0,gt.locals=void 0,gt.nextContainer=void 0,gt}function _A(A,$,se,De,gt){return A.modifiers!==$||A.name!==se||A.typeParameters!==De||A.type!==gt?Yn(AS($,se,De,gt),A):A}function iv(A,$,se){const De=ue(266);return De.modifiers=pl(A),De.name=Ad($),De.members=re(se),De.transformFlags|=ol(De.modifiers)|gr(De.name)|ol(De.members)|1,De.transformFlags&=-67108865,De.jsDoc=void 0,De}function WI(A,$,se,De){return A.modifiers!==$||A.name!==se||A.members!==De?Yn(iv($,se,De),A):A}function ht(A,$,se,De=0){const gt=ue(267);return gt.modifiers=pl(A),gt.flags|=De&2088,gt.name=$,gt.body=se,Rv(gt.modifiers)&128?gt.transformFlags=1:gt.transformFlags|=ol(gt.modifiers)|gr(gt.name)|gr(gt.body)|1,gt.transformFlags&=-67108865,gt.jsDoc=void 0,gt.locals=void 0,gt.nextContainer=void 0,gt}function v0(A,$,se,De){return A.modifiers!==$||A.name!==se||A.body!==De?Yn(ht($,se,De,A.flags),A):A}function rf(A){const $=Y(268);return $.statements=re(A),$.transformFlags|=ol($.statements),$.jsDoc=void 0,$}function m2(A,$){return A.statements!==$?Yn(rf($),A):A}function Q1(A){const $=Y(269);return $.clauses=re(A),$.transformFlags|=ol($.clauses),$.locals=void 0,$.nextContainer=void 0,$}function am(A,$){return A.clauses!==$?Yn(Q1($),A):A}function Yv(A){const $=ue(270);return $.name=Ad(A),$.transformFlags|=nV($.name)|1,$.modifiers=void 0,$.jsDoc=void 0,$}function oC(A,$){return A.name!==$?NF(Yv($),A):A}function NF(A,$){return A!==$&&(A.modifiers=$.modifiers),Yn(A,$)}function sl(A,$,se,De){const gt=ue(271);return gt.modifiers=pl(A),gt.name=Ad(se),gt.isTypeOnly=$,gt.moduleReference=De,gt.transformFlags|=ol(gt.modifiers)|nV(gt.name)|gr(gt.moduleReference),Kb(gt.moduleReference)||(gt.transformFlags|=1),gt.transformFlags&=-67108865,gt.jsDoc=void 0,gt}function y0(A,$,se,De,gt){return A.modifiers!==$||A.isTypeOnly!==se||A.name!==De||A.moduleReference!==gt?Yn(sl($,se,De,gt),A):A}function vD(A,$,se,De){const gt=Y(272);return gt.modifiers=pl(A),gt.importClause=$,gt.moduleSpecifier=se,gt.attributes=gt.assertClause=De,gt.transformFlags|=gr(gt.importClause)|gr(gt.moduleSpecifier),gt.transformFlags&=-67108865,gt.jsDoc=void 0,gt}function VI(A,$,se,De,gt){return A.modifiers!==$||A.importClause!==se||A.moduleSpecifier!==De||A.attributes!==gt?Yn(vD($,se,De,gt),A):A}function HI(A,$,se){const De=ue(273);return De.isTypeOnly=A,De.name=$,De.namedBindings=se,De.transformFlags|=gr(De.name)|gr(De.namedBindings),A&&(De.transformFlags|=1),De.transformFlags&=-67108865,De}function v2(A,$,se,De){return A.isTypeOnly!==$||A.name!==se||A.namedBindings!==De?Yn(HI($,se,De),A):A}function aC(A,$){const se=Y(300);return se.elements=re(A),se.multiLine=$,se.token=132,se.transformFlags|=4,se}function lC(A,$,se){return A.elements!==$||A.multiLine!==se?Yn(aC($,se),A):A}function y2(A,$){const se=Y(301);return se.name=A,se.value=$,se.transformFlags|=4,se}function Ig(A,$,se){return A.name!==$||A.value!==se?Yn(y2($,se),A):A}function Xp(A,$){const se=Y(302);return se.assertClause=A,se.multiLine=$,se}function OS(A,$,se){return A.assertClause!==$||A.multiLine!==se?Yn(Xp($,se),A):A}function MS(A,$,se){const De=Y(300);return De.token=se??118,De.elements=re(A),De.multiLine=$,De.transformFlags|=4,De}function Zs(A,$,se){return A.elements!==$||A.multiLine!==se?Yn(MS($,se,A.token),A):A}function Tr(A,$){const se=Y(301);return se.name=A,se.value=$,se.transformFlags|=4,se}function rh(A,$,se){return A.name!==$||A.value!==se?Yn(Tr($,se),A):A}function nO(A){const $=ue(274);return $.name=A,$.transformFlags|=gr($.name),$.transformFlags&=-67108865,$}function b0(A,$){return A.name!==$?Yn(nO($),A):A}function pA(A){const $=ue(280);return $.name=A,$.transformFlags|=gr($.name)|32,$.transformFlags&=-67108865,$}function X1(A,$){return A.name!==$?Yn(pA($),A):A}function RS(A){const $=Y(275);return $.elements=re(A),$.transformFlags|=ol($.elements),$.transformFlags&=-67108865,$}function cC(A,$){return A.elements!==$?Yn(RS($),A):A}function rO(A,$,se){const De=ue(276);return De.isTypeOnly=A,De.propertyName=$,De.name=se,De.transformFlags|=gr(De.propertyName)|gr(De.name),De.transformFlags&=-67108865,De}function b2(A,$,se,De){return A.isTypeOnly!==$||A.propertyName!==se||A.name!==De?Yn(rO($,se,De),A):A}function Zp(A,$,se){const De=ue(277);return De.modifiers=pl(A),De.isExportEquals=$,De.expression=$?u().parenthesizeRightSideOfBinary(64,void 0,se):u().parenthesizeExpressionOfExportDefault(se),De.transformFlags|=ol(De.modifiers)|gr(De.expression),De.transformFlags&=-67108865,De.jsDoc=void 0,De}function yD(A,$,se){return A.modifiers!==$||A.expression!==se?Yn(Zp($,A.isExportEquals,se),A):A}function mc(A,$,se,De,gt){const vi=ue(278);return vi.modifiers=pl(A),vi.isTypeOnly=$,vi.exportClause=se,vi.moduleSpecifier=De,vi.attributes=vi.assertClause=gt,vi.transformFlags|=ol(vi.modifiers)|gr(vi.exportClause)|gr(vi.moduleSpecifier),vi.transformFlags&=-67108865,vi.jsDoc=void 0,vi}function cb(A,$,se,De,gt,vi){return A.modifiers!==$||A.isTypeOnly!==se||A.exportClause!==De||A.moduleSpecifier!==gt||A.attributes!==vi?sO(mc($,se,De,gt,vi),A):A}function sO(A,$){return A!==$&&A.modifiers===$.modifiers&&(A.modifiers=$.modifiers),Yn(A,$)}function jI(A){const $=Y(279);return $.elements=re(A),$.transformFlags|=ol($.elements),$.transformFlags&=-67108865,$}function bD(A,$){return A.elements!==$?Yn(jI($),A):A}function gA(A,$,se){const De=Y(281);return De.isTypeOnly=A,De.propertyName=Ad($),De.name=Ad(se),De.transformFlags|=gr(De.propertyName)|gr(De.name),De.transformFlags&=-67108865,De.jsDoc=void 0,De}function LF(A,$,se,De){return A.isTypeOnly!==$||A.propertyName!==se||A.name!==De?Yn(gA($,se,De),A):A}function oO(){const A=ue(282);return A.jsDoc=void 0,A}function vr(A){const $=Y(283);return $.expression=A,$.transformFlags|=gr($.expression),$.transformFlags&=-67108865,$}function kh(A,$){return A.expression!==$?Yn(vr($),A):A}function Ao(A){return Y(A)}function uC(A,$,se=!1){const De=zI(A,se?$&&u().parenthesizeNonArrayTypeOfPostfixType($):$);return De.postfix=se,De}function zI(A,$){const se=Y(A);return se.type=$,se}function Rp(A,$,se){return $.type!==se?Yn(uC(A,se,$.postfix),$):$}function Zn(A,$,se){return $.type!==se?Yn(zI(A,se),$):$}function mA(A,$){const se=ue(317);return se.parameters=pl(A),se.type=$,se.transformFlags=ol(se.parameters)|(se.type?1:0),se.jsDoc=void 0,se.locals=void 0,se.nextContainer=void 0,se.typeArguments=void 0,se}function vA(A,$,se){return A.parameters!==$||A.type!==se?Yn(mA($,se),A):A}function Jh(A,$=!1){const se=ue(322);return se.jsDocPropertyTags=pl(A),se.isArrayType=$,se}function C0(A,$,se){return A.jsDocPropertyTags!==$||A.isArrayType!==se?Yn(Jh($,se),A):A}function zm(A){const $=Y(309);return $.type=A,$}function FS(A,$){return A.type!==$?Yn(zm($),A):A}function CD(A,$,se){const De=ue(323);return De.typeParameters=pl(A),De.parameters=re($),De.type=se,De.jsDoc=void 0,De.locals=void 0,De.nextContainer=void 0,De}function e1(A,$,se,De){return A.typeParameters!==$||A.parameters!==se||A.type!==De?Yn(CD($,se,De),A):A}function Fp(A){const $=vae(A.kind);return A.tagName.escapedText===du($)?A.tagName:Fe($)}function t1(A,$,se){const De=Y(A);return De.tagName=$,De.comment=se,De}function lm(A,$,se){const De=ue(A);return De.tagName=$,De.comment=se,De}function ub(A,$,se,De){const gt=t1(345,A??Fe("template"),De);return gt.constraint=$,gt.typeParameters=re(se),gt}function C2(A,$=Fp(A),se,De,gt){return A.tagName!==$||A.constraint!==se||A.typeParameters!==De||A.comment!==gt?Yn(ub($,se,De,gt),A):A}function yA(A,$,se,De){const gt=lm(346,A??Fe("typedef"),De);return gt.typeExpression=$,gt.fullName=se,gt.name=ele(se),gt.locals=void 0,gt.nextContainer=void 0,gt}function UI(A,$=Fp(A),se,De,gt){return A.tagName!==$||A.typeExpression!==se||A.fullName!==De||A.comment!==gt?Yn(yA($,se,De,gt),A):A}function SD(A,$,se,De,gt,vi){const Gn=lm(341,A??Fe("param"),vi);return Gn.typeExpression=De,Gn.name=$,Gn.isNameFirst=!!gt,Gn.isBracketed=se,Gn}function aO(A,$=Fp(A),se,De,gt,vi,Gn){return A.tagName!==$||A.name!==se||A.isBracketed!==De||A.typeExpression!==gt||A.isNameFirst!==vi||A.comment!==Gn?Yn(SD($,se,De,gt,vi,Gn),A):A}function qI(A,$,se,De,gt,vi){const Gn=lm(348,A??Fe("prop"),vi);return Gn.typeExpression=De,Gn.name=$,Gn.isNameFirst=!!gt,Gn.isBracketed=se,Gn}function S2(A,$=Fp(A),se,De,gt,vi,Gn){return A.tagName!==$||A.name!==se||A.isBracketed!==De||A.typeExpression!==gt||A.isNameFirst!==vi||A.comment!==Gn?Yn(qI($,se,De,gt,vi,Gn),A):A}function S0(A,$,se,De){const gt=lm(338,A??Fe("callback"),De);return gt.typeExpression=$,gt.fullName=se,gt.name=ele(se),gt.locals=void 0,gt.nextContainer=void 0,gt}function lO(A,$=Fp(A),se,De,gt){return A.tagName!==$||A.typeExpression!==se||A.fullName!==De||A.comment!==gt?Yn(S0($,se,De,gt),A):A}function w2(A,$,se){const De=t1(339,A??Fe("overload"),se);return De.typeExpression=$,De}function px(A,$=Fp(A),se,De){return A.tagName!==$||A.typeExpression!==se||A.comment!==De?Yn(w2($,se,De),A):A}function dC(A,$,se){const De=t1(328,A??Fe("augments"),se);return De.class=$,De}function BS(A,$=Fp(A),se,De){return A.tagName!==$||A.class!==se||A.comment!==De?Yn(dC($,se,De),A):A}function Um(A,$,se){const De=t1(329,A??Fe("implements"),se);return De.class=$,De}function WS(A,$,se){const De=t1(347,A??Fe("see"),se);return De.name=$,De}function x2(A,$,se,De){return A.tagName!==$||A.name!==se||A.comment!==De?Yn(WS($,se,De),A):A}function gf(A){const $=Y(310);return $.name=A,$}function fC(A,$){return A.name!==$?Yn(gf($),A):A}function i1(A,$){const se=Y(311);return se.left=A,se.right=$,se.transformFlags|=gr(se.left)|gr(se.right),se}function Ru(A,$,se){return A.left!==$||A.right!==se?Yn(i1($,se),A):A}function sf(A,$){const se=Y(324);return se.name=A,se.text=$,se}function hC(A,$,se){return A.name!==$?Yn(sf($,se),A):A}function op(A,$){const se=Y(325);return se.name=A,se.text=$,se}function cm(A,$,se){return A.name!==$?Yn(op($,se),A):A}function bA(A,$){const se=Y(326);return se.name=A,se.text=$,se}function n1(A,$,se){return A.name!==$?Yn(bA($,se),A):A}function CA(A,$=Fp(A),se,De){return A.tagName!==$||A.class!==se||A.comment!==De?Yn(Um($,se,De),A):A}function r1(A,$,se){return t1(A,$??Fe(vae(A)),se)}function gx(A,$,se=Fp($),De){return $.tagName!==se||$.comment!==De?Yn(r1(A,se,De),$):$}function cO(A,$,se,De){const gt=t1(A,$??Fe(vae(A)),De);return gt.typeExpression=se,gt}function Du(A,$,se=Fp($),De,gt){return $.tagName!==se||$.typeExpression!==De||$.comment!==gt?Yn(cO(A,se,De,gt),$):$}function uO(A,$){return t1(327,A,$)}function dO(A,$,se){return A.tagName!==$||A.comment!==se?Yn(uO($,se),A):A}function k2(A,$,se){const De=lm(340,A??Fe(vae(340)),se);return De.typeExpression=$,De.locals=void 0,De.nextContainer=void 0,De}function PF(A,$=Fp(A),se,De){return A.tagName!==$||A.typeExpression!==se||A.comment!==De?Yn(k2($,se,De),A):A}function Gh(A,$,se,De,gt){const vi=t1(351,A??Fe("import"),gt);return vi.importClause=$,vi.moduleSpecifier=se,vi.attributes=De,vi.comment=gt,vi}function $I(A,$,se,De,gt,vi){return A.tagName!==$||A.comment!==vi||A.importClause!==se||A.moduleSpecifier!==De||A.attributes!==gt?Yn(Gh($,se,De,gt,vi),A):A}function wD(A){const $=Y(321);return $.text=A,$}function T2(A,$){return A.text!==$?Yn(wD($),A):A}function J_(A,$){const se=Y(320);return se.comment=A,se.tags=pl($),se}function AF(A,$,se){return A.comment!==$||A.tags!==se?Yn(J_($,se),A):A}function D2(A,$,se){const De=Y(284);return De.openingElement=A,De.children=re($),De.closingElement=se,De.transformFlags|=gr(De.openingElement)|ol(De.children)|gr(De.closingElement)|2,De}function fO(A,$,se,De){return A.openingElement!==$||A.children!==se||A.closingElement!==De?Yn(D2($,se,De),A):A}function E2(A,$,se){const De=Y(285);return De.tagName=A,De.typeArguments=pl($),De.attributes=se,De.transformFlags|=gr(De.tagName)|ol(De.typeArguments)|gr(De.attributes)|2,De.typeArguments&&(De.transformFlags|=1),De}function xD(A,$,se,De){return A.tagName!==$||A.typeArguments!==se||A.attributes!==De?Yn(E2($,se,De),A):A}function SA(A,$,se){const De=Y(286);return De.tagName=A,De.typeArguments=pl($),De.attributes=se,De.transformFlags|=gr(De.tagName)|ol(De.typeArguments)|gr(De.attributes)|2,$&&(De.transformFlags|=1),De}function JI(A,$,se,De){return A.tagName!==$||A.typeArguments!==se||A.attributes!==De?Yn(SA($,se,De),A):A}function Ng(A){const $=Y(287);return $.tagName=A,$.transformFlags|=gr($.tagName)|2,$}function hO(A,$){return A.tagName!==$?Yn(Ng($),A):A}function mx(A,$,se){const De=Y(288);return De.openingFragment=A,De.children=re($),De.closingFragment=se,De.transformFlags|=gr(De.openingFragment)|ol(De.children)|gr(De.closingFragment)|2,De}function Yp(A,$,se,De){return A.openingFragment!==$||A.children!==se||A.closingFragment!==De?Yn(mx($,se,De),A):A}function nv(A,$){const se=Y(12);return se.text=A,se.containsOnlyTriviaWhiteSpaces=!!$,se.transformFlags|=2,se}function GI(A,$,se){return A.text!==$||A.containsOnlyTriviaWhiteSpaces!==se?Yn(nv($,se),A):A}function KI(){const A=Y(289);return A.transformFlags|=2,A}function al(){const A=Y(290);return A.transformFlags|=2,A}function wr(A,$){const se=ue(291);return se.name=A,se.initializer=$,se.transformFlags|=gr(se.name)|gr(se.initializer)|2,se}function Lg(A,$,se){return A.name!==$||A.initializer!==se?Yn(wr($,se),A):A}function Vf(A){const $=ue(292);return $.properties=re(A),$.transformFlags|=ol($.properties)|2,$}function _O(A,$){return A.properties!==$?Yn(Vf($),A):A}function pO(A){const $=Y(293);return $.expression=A,$.transformFlags|=gr($.expression)|2,$}function I2(A,$){return A.expression!==$?Yn(pO($),A):A}function vx(A,$){const se=Y(294);return se.dotDotDotToken=A,se.expression=$,se.transformFlags|=gr(se.dotDotDotToken)|gr(se.expression)|2,se}function gO(A,$){return A.expression!==$?Yn(vx(A.dotDotDotToken,$),A):A}function yx(A,$){const se=Y(295);return se.namespace=A,se.name=$,se.transformFlags|=gr(se.namespace)|gr(se.name)|2,se}function w0(A,$,se){return A.namespace!==$||A.name!==se?Yn(yx($,se),A):A}function eg(A,$){const se=Y(296);return se.expression=u().parenthesizeExpressionForDisallowedComma(A),se.statements=re($),se.transformFlags|=gr(se.expression)|ol(se.statements),se.jsDoc=void 0,se}function Z1(A,$,se){return A.expression!==$||A.statements!==se?Yn(eg($,se),A):A}function s1(A){const $=Y(297);return $.statements=re(A),$.transformFlags=ol($.statements),$}function _C(A,$){return A.statements!==$?Yn(s1($),A):A}function QI(A,$){const se=Y(298);switch(se.token=A,se.types=re($),se.transformFlags|=ol(se.types),A){case 96:se.transformFlags|=1024;break;case 119:se.transformFlags|=1;break;default:return z.assertNever(A)}return se}function cd(A,$){return A.types!==$?Yn(QI(A.token,$),A):A}function x0(A,$){const se=Y(299);return se.variableDeclaration=um(A),se.block=$,se.transformFlags|=gr(se.variableDeclaration)|gr(se.block)|(A?0:64),se.locals=void 0,se.nextContainer=void 0,se}function tg(A,$,se){return A.variableDeclaration!==$||A.block!==se?Yn(x0($,se),A):A}function VS(A,$){const se=ue(303);return se.name=Ad(A),se.initializer=u().parenthesizeExpressionForDisallowedComma($),se.transformFlags|=Xw(se.name)|gr(se.initializer),se.modifiers=void 0,se.questionToken=void 0,se.exclamationToken=void 0,se.jsDoc=void 0,se}function Pg(A,$,se){return A.name!==$||A.initializer!==se?XI(VS($,se),A):A}function XI(A,$){return A!==$&&(A.modifiers=$.modifiers,A.questionToken=$.questionToken,A.exclamationToken=$.exclamationToken),Yn(A,$)}function bx(A,$){const se=ue(304);return se.name=Ad(A),se.objectAssignmentInitializer=$&&u().parenthesizeExpressionForDisallowedComma($),se.transformFlags|=nV(se.name)|gr(se.objectAssignmentInitializer)|1024,se.equalsToken=void 0,se.modifiers=void 0,se.questionToken=void 0,se.exclamationToken=void 0,se.jsDoc=void 0,se}function H(A,$,se){return A.name!==$||A.objectAssignmentInitializer!==se?Ne(bx($,se),A):A}function Ne(A,$){return A!==$&&(A.modifiers=$.modifiers,A.questionToken=$.questionToken,A.exclamationToken=$.exclamationToken,A.equalsToken=$.equalsToken),Yn(A,$)}function Jt(A){const $=ue(305);return $.expression=u().parenthesizeExpressionForDisallowedComma(A),$.transformFlags|=gr($.expression)|128|65536,$.jsDoc=void 0,$}function bi(A,$){return A.expression!==$?Yn(Jt($),A):A}function cs(A,$){const se=ue(306);return se.name=Ad(A),se.initializer=$&&u().parenthesizeExpressionForDisallowedComma($),se.transformFlags|=gr(se.name)|gr(se.initializer)|1,se.jsDoc=void 0,se}function ho(A,$,se){return A.name!==$||A.initializer!==se?Yn(cs($,se),A):A}function so(A,$,se){const De=r.createBaseSourceFileNode(307);return De.statements=re(A),De.endOfFileToken=$,De.flags|=se,De.text="",De.fileName="",De.path="",De.resolvedPath="",De.originalFileName="",De.languageVersion=1,De.languageVariant=0,De.scriptKind=0,De.isDeclarationFile=!1,De.hasNoDefaultLib=!1,De.transformFlags|=ol(De.statements)|gr(De.endOfFileToken),De.locals=void 0,De.nextContainer=void 0,De.endFlowNode=void 0,De.nodeCount=0,De.identifierCount=0,De.symbolCount=0,De.parseDiagnostics=void 0,De.bindDiagnostics=void 0,De.bindSuggestionDiagnostics=void 0,De.lineMap=void 0,De.externalModuleIndicator=void 0,De.setExternalModuleIndicator=void 0,De.pragmas=void 0,De.checkJsDirective=void 0,De.referencedFiles=void 0,De.typeReferenceDirectives=void 0,De.libReferenceDirectives=void 0,De.amdDependencies=void 0,De.commentDirectives=void 0,De.identifiers=void 0,De.packageJsonLocations=void 0,De.packageJsonScope=void 0,De.imports=void 0,De.moduleAugmentations=void 0,De.ambientModuleNames=void 0,De.classifiableNames=void 0,De.impliedNodeFormat=void 0,De}function Co(A){const $=Object.create(A.redirectTarget);return Object.defineProperties($,{id:{get(){return this.redirectInfo.redirectTarget.id},set(se){this.redirectInfo.redirectTarget.id=se}},symbol:{get(){return this.redirectInfo.redirectTarget.symbol},set(se){this.redirectInfo.redirectTarget.symbol=se}}}),$.redirectInfo=A,$}function Va(A){const $=Co(A.redirectInfo);return $.flags|=A.flags&-17,$.fileName=A.fileName,$.path=A.path,$.resolvedPath=A.resolvedPath,$.originalFileName=A.originalFileName,$.packageJsonLocations=A.packageJsonLocations,$.packageJsonScope=A.packageJsonScope,$.emitNode=void 0,$}function Kh(A){const $=r.createBaseSourceFileNode(307);$.flags|=A.flags&-17;for(const se in A)if(!(Vl($,se)||!Vl(A,se))){if(se==="emitNode"){$.emitNode=void 0;continue}$[se]=A[se]}return $}function Th(A){const $=A.redirectInfo?Va(A):Kh(A);return a($,A),$}function HS(A,$,se,De,gt,vi,Gn){const vo=Th(A);return vo.statements=re($),vo.isDeclarationFile=se,vo.referencedFiles=De,vo.typeReferenceDirectives=gt,vo.hasNoDefaultLib=vi,vo.libReferenceDirectives=Gn,vo.transformFlags=ol(vo.statements)|gr(vo.endOfFileToken),vo}function kD(A,$,se=A.isDeclarationFile,De=A.referencedFiles,gt=A.typeReferenceDirectives,vi=A.hasNoDefaultLib,Gn=A.libReferenceDirectives){return A.statements!==$||A.isDeclarationFile!==se||A.referencedFiles!==De||A.typeReferenceDirectives!==gt||A.hasNoDefaultLib!==vi||A.libReferenceDirectives!==Gn?Yn(HS(A,$,se,De,gt,vi,Gn),A):A}function Bp(A){const $=Y(308);return $.sourceFiles=A,$.syntheticFileReferences=void 0,$.syntheticTypeReferences=void 0,$.syntheticLibReferences=void 0,$.hasNoDefaultLib=void 0,$}function rv(A,$){return A.sourceFiles!==$?Yn(Bp($),A):A}function pC(A,$=!1,se){const De=Y(237);return De.type=A,De.isSpread=$,De.tupleNameSource=se,De}function TD(A){const $=Y(352);return $._children=A,$}function mO(A){const $=Y(353);return $.original=A,zt($,A),$}function gC(A,$){const se=Y(354);return se.expression=A,se.original=$,se.transformFlags|=gr(se.expression)|1,zt(se,$),se}function N2(A,$){return A.expression!==$?Yn(gC($,A.original),A):A}function jS(A){if(oc(A)&&!i8(A)&&!A.original&&!A.emitNode&&!A.id){if(g7(A))return A.elements;if(cr(A)&&H2e(A.operatorToken))return[A.left,A.right]}return A}function Cx(A){const $=Y(355);return $.elements=re(s_(A,jS)),$.transformFlags|=ol($.elements),$}function Js(A,$){return A.elements!==$?Yn(Cx($),A):A}function Sx(A,$){const se=Y(356);return se.expression=A,se.thisArg=$,se.transformFlags|=gr(se.expression)|gr(se.thisArg),se}function Un(A,$,se){return A.expression!==$||A.thisArg!==se?Yn(Sx($,se),A):A}function OF(A){const $=Ee(A.escapedText);return $.flags|=A.flags&-17,$.transformFlags=A.transformFlags,a($,A),aV($,{...A.emitNode.autoGenerate}),$}function vO(A){const $=Ee(A.escapedText);$.flags|=A.flags&-17,$.jsDoc=A.jsDoc,$.flowNode=A.flowNode,$.symbol=A.symbol,$.transformFlags=A.transformFlags,a($,A);const se=fI(A);return se&&pS($,se),$}function wA(A){const $=et(A.escapedText);return $.flags|=A.flags&-17,$.transformFlags=A.transformFlags,a($,A),aV($,{...A.emitNode.autoGenerate}),$}function yO(A){const $=et(A.escapedText);return $.flags|=A.flags&-17,$.transformFlags=A.transformFlags,a($,A),$}function bO(A){if(A===void 0)return A;if(Ns(A))return Th(A);if(jc(A))return OF(A);if(lt(A))return vO(A);if(ZE(A))return wA(A);if(Vs(A))return yO(A);const $=FB(A.kind)?r.createBaseNode(A.kind):r.createBaseTokenNode(A.kind);$.flags|=A.flags&-17,$.transformFlags=A.transformFlags,a($,A);for(const se in A)Vl($,se)||!Vl(A,se)||($[se]=A[se]);return $}function pZ(A,$,se){return Sn(U_(void 0,void 0,void 0,void 0,$?[$]:[],void 0,si(A,!0)),void 0,se?[se]:[])}function gZ(A,$,se){return Sn(kg(void 0,void 0,$?[$]:[],void 0,void 0,si(A,!0)),void 0,se?[se]:[])}function Y1(){return rp(Se("0"))}function hj(A){return Zp(void 0,!1,A)}function MF(A){return mc(void 0,!1,jI([gA(!1,void 0,A)]))}function RF(A,$){return $==="null"?Q.createStrictEquality(A,xt()):$==="undefined"?Q.createStrictEquality(A,Y1()):Q.createStrictEquality(vd(A),ye($))}function _j(A,$){return $==="null"?Q.createStrictInequality(A,xt()):$==="undefined"?Q.createStrictInequality(A,Y1()):Q.createStrictInequality(vd(A),ye($))}function L2(A,$,se){return XE(A)?rl(Fc(A,void 0,$),void 0,void 0,se):Sn($c(A,$),void 0,se)}function pj(A,$,se){return L2(A,"bind",[$,...se])}function DD(A,$,se){return L2(A,"call",[$,...se])}function mC(A,$,se){return L2(A,"apply",[$,se])}function ED(A,$,se){return L2(Fe(A),$,se)}function qm(A,$){return L2(A,"slice",$===void 0?[]:[xx($)])}function CO(A,$){return L2(A,"concat",$)}function gj(A,$,se){return ED("Object","defineProperty",[A,xx($),se])}function ey(A,$){return ED("Object","getOwnPropertyDescriptor",[A,xx($)])}function ZI(A,$,se){return ED("Reflect","get",se?[A,$,se]:[A,$])}function mj(A,$,se,De){return ED("Reflect","set",De?[A,$,se,De]:[A,$,se])}function Eu(A,$,se){return se?(A.push(VS($,se)),!0):!1}function FF(A,$){const se=[];Eu(se,"enumerable",xx(A.enumerable)),Eu(se,"configurable",xx(A.configurable));let De=Eu(se,"writable",xx(A.writable));De=Eu(se,"value",A.value)||De;let gt=Eu(se,"get",A.get);return gt=Eu(se,"set",A.set)||gt,z.assert(!(De&>),"A PropertyDescriptor may not be both an accessor descriptor and a data descriptor."),ql(se,!$)}function Al(A,$){switch(A.kind){case 217:return xg(A,$);case 216:return np(A,A.type,$);case 234:return ES(A,$,A.type);case 238:return _x(A,$,A.type);case 235:return hx(A,$);case 354:return N2(A,$)}}function _l(A){return g_(A)&&oc(A)&&oc(_S(A))&&oc(Vv(A))&&!Rt(i3(A))&&!Rt(oV(A))}function xA(A,$,se=15){return A&&eK(A,se)&&!_l(A)?Al(A,xA(A.expression,$)):$}function kA(A,$,se){if(!$)return A;const De=FI($,$.label,ix($.statement)?kA(A,$.statement):A);return se&&se($),De}function ge(A,$){const se=Il(A);switch(se.kind){case 80:return $;case 110:case 9:case 10:case 11:return!1;case 209:return se.elements.length!==0;case 210:return se.properties.length>0;default:return!0}}function Qe(A,$,se,De=!1){const gt=ld(A,15);let vi,Gn;return R_(gt)?(vi=st(),Gn=gt):f7(gt)?(vi=st(),Gn=se!==void 0&&se<2?zt(Fe("_super"),gt):gt):Ya(gt)&8192?(vi=Y1(),Gn=u().parenthesizeLeftSideOfAccess(gt,!1)):Ir(gt)?ge(gt.expression,De)?(vi=Oe($),Gn=$c(zt(Q.createAssignment(vi,gt.expression),gt.expression),gt.name),zt(Gn,gt)):(vi=gt.expression,Gn=gt):wc(gt)?ge(gt.expression,De)?(vi=Oe($),Gn=Nd(zt(Q.createAssignment(vi,gt.expression),gt.expression),gt.argumentExpression),zt(Gn,gt)):(vi=gt.expression,Gn=gt):(vi=Y1(),Gn=u().parenthesizeLeftSideOfAccess(A,!1)),{target:Gn,thisArg:vi}}function yt(A,$){return $c(ev(ql([Re(void 0,"value",[bs(void 0,void 0,A,void 0,void 0,void 0)],si([ar($)]))])),"value")}function Zt(A){return A.length>10?Cx(A):nd(A,Q.createComma)}function _i(A,$,se,De=0,gt){const vi=gt?A&&N$(A):ko(A);if(vi&<(vi)&&!jc(vi)){const Gn=ml(zt(bO(vi),vi),vi.parent);return De|=Ya(vi),se||(De|=96),$||(De|=3072),De&&ir(Gn,De),Gn}return Le(A)}function an(A,$,se){return _i(A,$,se,98304)}function jr(A,$,se,De){return _i(A,$,se,32768,De)}function Bs(A,$,se){return _i(A,$,se,16384)}function ws(A,$,se){return _i(A,$,se)}function hs(A,$,se,De){const gt=$c(A,oc($)?$:bO($));zt(gt,$);let vi=0;return De||(vi|=96),se||(vi|=3072),vi&&ir(gt,vi),gt}function io(A,$,se,De){return A&&Kr($,32)?hs(A,_i($),se,De):Bs($,se,De)}function ic(A,$,se,De){const gt=Ag(A,$,0,se);return sv(A,$,gt,De)}function va(A){return ja(A.expression)&&A.expression.text==="use strict"}function Ka(){return mh(ar(ye("use strict")))}function Ag(A,$,se=0,De){z.assert($.length===0,"Prologue directives should be at the first statement in the target statements array");let gt=!1;const vi=A.length;for(;sevo&&k0.splice(gt,0,...$.slice(vo,ac)),vo>Gn&&k0.splice(De,0,...$.slice(Gn,vo)),Gn>vi&&k0.splice(se,0,...$.slice(vi,Gn)),vi>0)if(se===0)k0.splice(0,0,...$.slice(0,vi));else{const T0=new Map;for(let ty=0;ty=0;ty--){const TA=$[ty];T0.has(TA.expression.text)||k0.unshift(TA)}}return ST(A)?zt(re(k0,A.hasTrailingComma),A):A}function BF(A,$){let se;return typeof $=="number"?se=Oi($):se=$,Uc(A)?Rn(A,se,A.name,A.constraint,A.default):Gs(A)?Hi(A,se,A.dotDotDotToken,A.name,A.questionToken,A.type,A.initializer):n3(A)?fi(A,se,A.typeParameters,A.parameters,A.type):V_(A)?Fo(A,se,A.name,A.questionToken,A.type):To(A)?ot(A,se,A.name,A.questionToken??A.exclamationToken,A.type,A.initializer):Hv(A)?hn(A,se,A.name,A.questionToken,A.typeParameters,A.parameters,A.type):Au(A)?as(A,se,A.asteriskToken,A.name,A.questionToken,A.typeParameters,A.parameters,A.type,A.body):fu(A)?fl(A,se,A.parameters,A.body):hg(A)?xe(A,se,A.name,A.parameters,A.type,A.body):Np(A)?mt(A,se,A.name,A.parameters,A.body):UT(A)?$t(A,se,A.parameters,A.type):gc(A)?nm(A,se,A.asteriskToken,A.name,A.typeParameters,A.parameters,A.type,A.body):Dc(A)?$1(A,se,A.typeParameters,A.parameters,A.type,A.equalsGreaterThanToken,A.body):wd(A)?Dg(A,se,A.name,A.typeParameters,A.heritageClauses,A.members):Ou(A)?Jn(A,se,A.declarationList):Uu(A)?fA(A,se,A.asteriskToken,A.name,A.typeParameters,A.parameters,A.type,A.body):xd(A)?g2(A,se,A.name,A.typeParameters,A.heritageClauses,A.members):Ff(A)?Pd(A,se,A.name,A.typeParameters,A.heritageClauses,A.members):Mm(A)?_A(A,se,A.name,A.typeParameters,A.type):Uk(A)?WI(A,se,A.name,A.members):qu(A)?v0(A,se,A.name,A.body):kd(A)?y0(A,se,A.isTypeOnly,A.name,A.moduleReference):Cu(A)?VI(A,se,A.importClause,A.moduleSpecifier,A.attributes):Ec(A)?yD(A,se,A.expression):$u(A)?cb(A,se,A.isTypeOnly,A.exportClause,A.moduleSpecifier,A.attributes):z.assertNever(A)}function SO(A,$){return Gs(A)?Hi(A,$,A.dotDotDotToken,A.name,A.questionToken,A.type,A.initializer):To(A)?ot(A,$,A.name,A.questionToken??A.exclamationToken,A.type,A.initializer):Au(A)?as(A,$,A.asteriskToken,A.name,A.questionToken,A.typeParameters,A.parameters,A.type,A.body):hg(A)?xe(A,$,A.name,A.parameters,A.type,A.body):Np(A)?mt(A,$,A.name,A.parameters,A.body):wd(A)?Dg(A,$,A.name,A.typeParameters,A.heritageClauses,A.members):xd(A)?g2(A,$,A.name,A.typeParameters,A.heritageClauses,A.members):z.assertNever(A)}function vj(A,$){switch(A.kind){case 177:return xe(A,A.modifiers,$,A.parameters,A.type,A.body);case 178:return mt(A,A.modifiers,$,A.parameters,A.body);case 174:return as(A,A.modifiers,A.asteriskToken,$,A.questionToken,A.typeParameters,A.parameters,A.type,A.body);case 173:return hn(A,A.modifiers,$,A.questionToken,A.typeParameters,A.parameters,A.type);case 172:return ot(A,A.modifiers,$,A.questionToken??A.exclamationToken,A.type,A.initializer);case 171:return Fo(A,A.modifiers,$,A.questionToken,A.type);case 303:return Pg(A,$,A.initializer)}}function pl(A){return A?re(A):void 0}function Ad(A){return typeof A=="string"?Fe(A):A}function xx(A){return typeof A=="string"?ye(A):typeof A=="number"?Se(A):typeof A=="boolean"?A?Et():ft():A}function ov(A){return A&&u().parenthesizeExpressionForDisallowedComma(A)}function A2(A){return typeof A=="number"?nt(A):A}function db(A){return A&&Rae(A)?zt(a(sn(),A),A):A}function um(A){return typeof A=="string"||A&&!ds(A)?$_(A,void 0,void 0,void 0):A}function Yn(A,$){return A!==$&&(a(A,$),zt(A,$)),A}}function vae(t){switch(t){case 344:return"type";case 342:return"returns";case 343:return"this";case 340:return"enum";case 330:return"author";case 332:return"class";case 333:return"public";case 334:return"private";case 335:return"protected";case 336:return"readonly";case 337:return"override";case 345:return"template";case 346:return"typedef";case 341:return"param";case 348:return"prop";case 338:return"callback";case 339:return"overload";case 328:return"augments";case 329:return"implements";case 351:return"import";default:return z.fail(`Unsupported kind: ${z.formatSyntaxKind(t)}`)}}var hS,H$e={};function ENt(t,r){switch(hS||(hS=zy(99,!1,0)),t){case 15:hS.setText("`"+r+"`");break;case 16:hS.setText("`"+r+"${");break;case 17:hS.setText("}"+r+"${");break;case 18:hS.setText("}"+r+"`");break}let a=hS.scan();if(a===20&&(a=hS.reScanTemplateToken(!1)),hS.isUnterminated())return hS.setText(void 0),H$e;let u;switch(a){case 15:case 16:case 17:case 18:u=hS.getTokenValue();break}return u===void 0||hS.scan()!==1?(hS.setText(void 0),H$e):(hS.setText(void 0),u)}function Xw(t){return t&<(t)?nV(t):gr(t)}function nV(t){return gr(t)&-67108865}function INt(t,r){return r|t.transformFlags&134234112}function gr(t){if(!t)return 0;const r=t.transformFlags&~t2e(t.kind);return Af(t)&&od(t.name)?INt(t.name,r):r}function ol(t){return t?t.transformFlags:0}function j$e(t){let r=0;for(const a of t)r|=gr(a);t.transformFlags=r}function t2e(t){if(t>=182&&t<=205)return-2;switch(t){case 213:case 214:case 209:return-2147450880;case 267:return-1941676032;case 169:return-2147483648;case 219:return-2072174592;case 218:case 262:return-1937940480;case 261:return-2146893824;case 263:case 231:return-2147344384;case 176:return-1937948672;case 172:return-2013249536;case 174:case 177:case 178:return-2005057536;case 133:case 150:case 163:case 146:case 154:case 151:case 136:case 155:case 116:case 168:case 171:case 173:case 179:case 180:case 181:case 264:case 265:return-2;case 210:return-2147278848;case 299:return-2147418112;case 206:case 207:return-2147450880;case 216:case 238:case 234:case 354:case 217:case 108:return-2147483648;case 211:case 212:return-2147483648;default:return-2147483648}}var DG=Kke();function EG(t){return t.flags|=16,t}var NNt={createBaseSourceFileNode:t=>EG(DG.createBaseSourceFileNode(t)),createBaseIdentifierNode:t=>EG(DG.createBaseIdentifierNode(t)),createBasePrivateIdentifierNode:t=>EG(DG.createBasePrivateIdentifierNode(t)),createBaseTokenNode:t=>EG(DG.createBaseTokenNode(t)),createBaseNode:t=>EG(DG.createBaseNode(t))},G=iV(4,NNt),z$e;function U$e(t,r,a){return new(z$e||(z$e=Mf.getSourceMapSourceConstructor()))(t,r,a)}function Er(t,r){if(t.original!==r&&(t.original=r,r)){const a=r.emitNode;a&&(t.emitNode=LNt(a,t.emitNode))}return t}function LNt(t,r){const{flags:a,internalFlags:u,leadingComments:h,trailingComments:p,commentRange:m,sourceMapRange:C,tokenSourceMapRanges:b,constantValue:T,helpers:E,startsOnNewLine:N,snippetElement:R,classThis:F,assignedName:j}=t;if(r||(r={}),a&&(r.flags=a),u&&(r.internalFlags=u&-9),h&&(r.leadingComments=un(h.slice(),r.leadingComments)),p&&(r.trailingComments=un(p.slice(),r.trailingComments)),m&&(r.commentRange=m),C&&(r.sourceMapRange=C),b&&(r.tokenSourceMapRanges=PNt(b,r.tokenSourceMapRanges)),T!==void 0&&(r.constantValue=T),E)for(const U of E)r.helpers=gu(r.helpers,U);return N!==void 0&&(r.startsOnNewLine=N),R!==void 0&&(r.snippetElement=R),F&&(r.classThis=F),j&&(r.assignedName=j),r}function PNt(t,r){r||(r=[]);for(const a in t)r[a]=t[a];return r}function th(t){if(t.emitNode)z.assert(!(t.emitNode.internalFlags&8),"Invalid attempt to mutate an immutable node.");else{if(i8(t)){if(t.kind===307)return t.emitNode={annotatedNodes:[t]};const r=_n(xo(_n(t)))??z.fail("Could not determine parsed source file.");th(r).annotatedNodes.push(t)}t.emitNode={}}return t.emitNode}function yae(t){var r,a;const u=(a=(r=_n(xo(t)))==null?void 0:r.emitNode)==null?void 0:a.annotatedNodes;if(u)for(const h of u)h.emitNode=void 0}function rV(t){const r=th(t);return r.flags|=3072,r.leadingComments=void 0,r.trailingComments=void 0,t}function ir(t,r){return th(t).flags=r,t}function Wv(t,r){const a=th(t);return a.flags=a.flags|r,t}function sV(t,r){return th(t).internalFlags=r,t}function gP(t,r){const a=th(t);return a.internalFlags=a.internalFlags|r,t}function _S(t){var r;return((r=t.emitNode)==null?void 0:r.sourceMapRange)??t}function $a(t,r){return th(t).sourceMapRange=r,t}function q$e(t,r){var a,u;return(u=(a=t.emitNode)==null?void 0:a.tokenSourceMapRanges)==null?void 0:u[r]}function i2e(t,r,a){const u=th(t),h=u.tokenSourceMapRanges??(u.tokenSourceMapRanges=[]);return h[r]=a,t}function a7(t){var r;return(r=t.emitNode)==null?void 0:r.startsOnNewLine}function IG(t,r){return th(t).startsOnNewLine=r,t}function Vv(t){var r;return((r=t.emitNode)==null?void 0:r.commentRange)??t}function Sd(t,r){return th(t).commentRange=r,t}function i3(t){var r;return(r=t.emitNode)==null?void 0:r.leadingComments}function Vk(t,r){return th(t).leadingComments=r,t}function l7(t,r,a,u){return Vk(t,xi(i3(t),{kind:r,pos:-1,end:-1,hasTrailingNewLine:u,text:a}))}function oV(t){var r;return(r=t.emitNode)==null?void 0:r.trailingComments}function mP(t,r){return th(t).trailingComments=r,t}function NG(t,r,a,u){return mP(t,xi(oV(t),{kind:r,pos:-1,end:-1,hasTrailingNewLine:u,text:a}))}function n2e(t,r){Vk(t,i3(r)),mP(t,oV(r));const a=th(r);return a.leadingComments=void 0,a.trailingComments=void 0,t}function r2e(t){var r;return(r=t.emitNode)==null?void 0:r.constantValue}function s2e(t,r){const a=th(t);return a.constantValue=r,t}function vP(t,r){const a=th(t);return a.helpers=xi(a.helpers,r),t}function Jb(t,r){if(Rt(r)){const a=th(t);for(const u of r)a.helpers=gu(a.helpers,u)}return t}function $$e(t,r){var a;const u=(a=t.emitNode)==null?void 0:a.helpers;return u?FR(u,r):!1}function LG(t){var r;return(r=t.emitNode)==null?void 0:r.helpers}function o2e(t,r,a){const u=t.emitNode,h=u&&u.helpers;if(!Rt(h))return;const p=th(r);let m=0;for(let C=0;C0&&(h[C-m]=b)}m>0&&(h.length-=m)}function bae(t){var r;return(r=t.emitNode)==null?void 0:r.snippetElement}function Cae(t,r){const a=th(t);return a.snippetElement=r,t}function Sae(t){return th(t).internalFlags|=4,t}function a2e(t,r){const a=th(t);return a.typeNode=r,t}function l2e(t){var r;return(r=t.emitNode)==null?void 0:r.typeNode}function pS(t,r){return th(t).identifierTypeArguments=r,t}function fI(t){var r;return(r=t.emitNode)==null?void 0:r.identifierTypeArguments}function aV(t,r){return th(t).autoGenerate=r,t}function J$e(t){var r;return(r=t.emitNode)==null?void 0:r.autoGenerate}function c2e(t,r){return th(t).generatedImportReference=r,t}function u2e(t){var r;return(r=t.emitNode)==null?void 0:r.generatedImportReference}var d2e=(t=>(t.Field="f",t.Method="m",t.Accessor="a",t))(d2e||{});function f2e(t){const r=t.factory,a=l_(()=>sV(r.createTrue(),8)),u=l_(()=>sV(r.createFalse(),8));return{getUnscopedHelperName:h,createDecorateHelper:p,createMetadataHelper:m,createParamHelper:C,createESDecorateHelper:U,createRunInitializersHelper:q,createAssignHelper:Q,createAwaitHelper:re,createAsyncGeneratorHelper:Y,createAsyncDelegatorHelper:ue,createAsyncValuesHelper:te,createRestHelper:Se,createAwaiterHelper:oe,createExtendsHelper:pe,createTemplateObjectHelper:ye,createSpreadArrayHelper:be,createPropKeyHelper:_e,createSetFunctionNameHelper:ve,createValuesHelper:Ee,createReadHelper:ke,createGeneratorHelper:Fe,createImportStarHelper:Oe,createImportStarCallbackHelper:fe,createImportDefaultHelper:Ie,createExportStarHelper:Le,createClassPrivateFieldGetHelper:et,createClassPrivateFieldSetHelper:He,createClassPrivateFieldInHelper:We,createAddDisposableResourceHelper:Ue,createDisposeResourcesHelper:Ye};function h(wt){return ir(r.createIdentifier(wt),8196)}function p(wt,nt,ze,st){t.requestEmitHelper(_2e);const xt=[];return xt.push(r.createArrayLiteralExpression(wt,!0)),xt.push(nt),ze&&(xt.push(ze),st&&xt.push(st)),r.createCallExpression(h("__decorate"),void 0,xt)}function m(wt,nt){return t.requestEmitHelper(p2e),r.createCallExpression(h("__metadata"),void 0,[r.createStringLiteral(wt),nt])}function C(wt,nt,ze){return t.requestEmitHelper(g2e),zt(r.createCallExpression(h("__param"),void 0,[r.createNumericLiteral(nt+""),wt]),ze)}function b(wt){const nt=[r.createPropertyAssignment(r.createIdentifier("kind"),r.createStringLiteral("class")),r.createPropertyAssignment(r.createIdentifier("name"),wt.name),r.createPropertyAssignment(r.createIdentifier("metadata"),wt.metadata)];return r.createObjectLiteralExpression(nt)}function T(wt){const nt=wt.computed?r.createElementAccessExpression(r.createIdentifier("obj"),wt.name):r.createPropertyAccessExpression(r.createIdentifier("obj"),wt.name);return r.createPropertyAssignment("get",r.createArrowFunction(void 0,void 0,[r.createParameterDeclaration(void 0,void 0,r.createIdentifier("obj"))],void 0,void 0,nt))}function E(wt){const nt=wt.computed?r.createElementAccessExpression(r.createIdentifier("obj"),wt.name):r.createPropertyAccessExpression(r.createIdentifier("obj"),wt.name);return r.createPropertyAssignment("set",r.createArrowFunction(void 0,void 0,[r.createParameterDeclaration(void 0,void 0,r.createIdentifier("obj")),r.createParameterDeclaration(void 0,void 0,r.createIdentifier("value"))],void 0,void 0,r.createBlock([r.createExpressionStatement(r.createAssignment(nt,r.createIdentifier("value")))])))}function N(wt){const nt=wt.computed?wt.name:lt(wt.name)?r.createStringLiteralFromNode(wt.name):wt.name;return r.createPropertyAssignment("has",r.createArrowFunction(void 0,void 0,[r.createParameterDeclaration(void 0,void 0,r.createIdentifier("obj"))],void 0,void 0,r.createBinaryExpression(nt,103,r.createIdentifier("obj"))))}function R(wt,nt){const ze=[];return ze.push(N(wt)),nt.get&&ze.push(T(wt)),nt.set&&ze.push(E(wt)),r.createObjectLiteralExpression(ze)}function F(wt){const nt=[r.createPropertyAssignment(r.createIdentifier("kind"),r.createStringLiteral(wt.kind)),r.createPropertyAssignment(r.createIdentifier("name"),wt.name.computed?wt.name.name:r.createStringLiteralFromNode(wt.name.name)),r.createPropertyAssignment(r.createIdentifier("static"),wt.static?r.createTrue():r.createFalse()),r.createPropertyAssignment(r.createIdentifier("private"),wt.private?r.createTrue():r.createFalse()),r.createPropertyAssignment(r.createIdentifier("access"),R(wt.name,wt.access)),r.createPropertyAssignment(r.createIdentifier("metadata"),wt.metadata)];return r.createObjectLiteralExpression(nt)}function j(wt){return wt.kind==="class"?b(wt):F(wt)}function U(wt,nt,ze,st,xt,Et){return t.requestEmitHelper(m2e),r.createCallExpression(h("__esDecorate"),void 0,[wt??r.createNull(),nt??r.createNull(),ze,j(st),xt,Et])}function q(wt,nt,ze){return t.requestEmitHelper(v2e),r.createCallExpression(h("__runInitializers"),void 0,ze?[wt,nt,ze]:[wt,nt])}function Q(wt){return il(t.getCompilerOptions())>=2?r.createCallExpression(r.createPropertyAccessExpression(r.createIdentifier("Object"),"assign"),void 0,wt):(t.requestEmitHelper(y2e),r.createCallExpression(h("__assign"),void 0,wt))}function re(wt){return t.requestEmitHelper(c7),r.createCallExpression(h("__await"),void 0,[wt])}function Y(wt,nt){return t.requestEmitHelper(c7),t.requestEmitHelper(b2e),(wt.emitNode||(wt.emitNode={})).flags|=1572864,r.createCallExpression(h("__asyncGenerator"),void 0,[nt?r.createThis():r.createVoidZero(),r.createIdentifier("arguments"),wt])}function ue(wt){return t.requestEmitHelper(c7),t.requestEmitHelper(C2e),r.createCallExpression(h("__asyncDelegator"),void 0,[wt])}function te(wt){return t.requestEmitHelper(S2e),r.createCallExpression(h("__asyncValues"),void 0,[wt])}function Se(wt,nt,ze,st){t.requestEmitHelper(w2e);const xt=[];let Et=0;for(let ft=0;ft{let u="";for(let h=0;h= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + };`},p2e={name:"typescript:metadata",importName:"__metadata",scoped:!1,priority:3,text:` + var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + };`},g2e={name:"typescript:param",importName:"__param",scoped:!1,priority:4,text:` + var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + };`},m2e={name:"typescript:esDecorate",importName:"__esDecorate",scoped:!1,priority:2,text:` + var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; + };`},v2e={name:"typescript:runInitializers",importName:"__runInitializers",scoped:!1,priority:2,text:` + var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; + };`},y2e={name:"typescript:assign",importName:"__assign",scoped:!1,priority:1,text:` + var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + };`},c7={name:"typescript:await",importName:"__await",scoped:!1,text:` + var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }`},b2e={name:"typescript:asyncGenerator",importName:"__asyncGenerator",scoped:!1,dependencies:[c7],text:` + var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } + function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + };`},C2e={name:"typescript:asyncDelegator",importName:"__asyncDelegator",scoped:!1,dependencies:[c7],text:` + var __asyncDelegator = (this && this.__asyncDelegator) || function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } + };`},S2e={name:"typescript:asyncValues",importName:"__asyncValues",scoped:!1,text:` + var __asyncValues = (this && this.__asyncValues) || function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + };`},w2e={name:"typescript:rest",importName:"__rest",scoped:!1,text:` + var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + };`},x2e={name:"typescript:awaiter",importName:"__awaiter",scoped:!1,priority:5,text:` + var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + };`},k2e={name:"typescript:extends",importName:"__extends",scoped:!1,priority:0,text:` + var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })();`},T2e={name:"typescript:makeTemplateObject",importName:"__makeTemplateObject",scoped:!1,priority:0,text:` + var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + };`},D2e={name:"typescript:read",importName:"__read",scoped:!1,text:` + var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + };`},E2e={name:"typescript:spreadArray",importName:"__spreadArray",scoped:!1,text:` + var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + };`},I2e={name:"typescript:propKey",importName:"__propKey",scoped:!1,text:` + var __propKey = (this && this.__propKey) || function (x) { + return typeof x === "symbol" ? x : "".concat(x); + };`},N2e={name:"typescript:setFunctionName",importName:"__setFunctionName",scoped:!1,text:` + var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + };`},L2e={name:"typescript:values",importName:"__values",scoped:!1,text:` + var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + };`},P2e={name:"typescript:generator",importName:"__generator",scoped:!1,priority:6,text:` + var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + };`},PG={name:"typescript:commonjscreatebinding",importName:"__createBinding",scoped:!1,priority:1,text:` + var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }));`},A2e={name:"typescript:commonjscreatevalue",importName:"__setModuleDefault",scoped:!1,priority:1,text:` + var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + });`},xae={name:"typescript:commonjsimportstar",importName:"__importStar",scoped:!1,dependencies:[PG,A2e],priority:2,text:` + var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + };`},O2e={name:"typescript:commonjsimportdefault",importName:"__importDefault",scoped:!1,text:` + var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + };`},M2e={name:"typescript:export-star",importName:"__exportStar",scoped:!1,dependencies:[PG],priority:2,text:` + var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); + };`},R2e={name:"typescript:classPrivateFieldGet",importName:"__classPrivateFieldGet",scoped:!1,text:` + var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + };`},F2e={name:"typescript:classPrivateFieldSet",importName:"__classPrivateFieldSet",scoped:!1,text:` + var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + };`},B2e={name:"typescript:classPrivateFieldIn",importName:"__classPrivateFieldIn",scoped:!1,text:` + var __classPrivateFieldIn = (this && this.__classPrivateFieldIn) || function(state, receiver) { + if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); + };`},W2e={name:"typescript:addDisposableResource",importName:"__addDisposableResource",scoped:!1,text:` + var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + };`},V2e={name:"typescript:disposeResources",importName:"__disposeResources",scoped:!1,text:` + var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + })(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + });`},AG={name:"typescript:async-super",scoped:!0,text:wae` + const ${"_superIndex"} = name => super[name];`},OG={name:"typescript:advanced-async-super",scoped:!0,text:wae` + const ${"_superIndex"} = (function (geti, seti) { + const cache = Object.create(null); + return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } }); + })(name => super[name], (name, value) => super[name] = value);`};function u7(t,r){return sa(t)&<(t.expression)&&(Ya(t.expression)&8192)!==0&&t.expression.escapedText===r}function W_(t){return t.kind===9}function lV(t){return t.kind===10}function ja(t){return t.kind===11}function yP(t){return t.kind===12}function kae(t){return t.kind===14}function bP(t){return t.kind===15}function CP(t){return t.kind===16}function Tae(t){return t.kind===17}function MG(t){return t.kind===18}function RG(t){return t.kind===26}function H2e(t){return t.kind===28}function Dae(t){return t.kind===40}function Eae(t){return t.kind===41}function cV(t){return t.kind===42}function uV(t){return t.kind===54}function Zw(t){return t.kind===58}function j2e(t){return t.kind===59}function FG(t){return t.kind===29}function z2e(t){return t.kind===39}function lt(t){return t.kind===80}function Vs(t){return t.kind===81}function SP(t){return t.kind===95}function BG(t){return t.kind===90}function d7(t){return t.kind===134}function U2e(t){return t.kind===131}function Iae(t){return t.kind===135}function q2e(t){return t.kind===148}function wP(t){return t.kind===126}function $2e(t){return t.kind===128}function J2e(t){return t.kind===164}function G2e(t){return t.kind===129}function f7(t){return t.kind===108}function h7(t){return t.kind===102}function K2e(t){return t.kind===84}function __(t){return t.kind===166}function Ja(t){return t.kind===167}function Uc(t){return t.kind===168}function Gs(t){return t.kind===169}function jd(t){return t.kind===170}function V_(t){return t.kind===171}function To(t){return t.kind===172}function Hv(t){return t.kind===173}function Au(t){return t.kind===174}function bu(t){return t.kind===175}function fu(t){return t.kind===176}function hg(t){return t.kind===177}function Np(t){return t.kind===178}function xP(t){return t.kind===179}function dV(t){return t.kind===180}function UT(t){return t.kind===181}function kP(t){return t.kind===182}function _g(t){return t.kind===183}function W1(t){return t.kind===184}function n3(t){return t.kind===185}function qT(t){return t.kind===186}function p_(t){return t.kind===187}function fV(t){return t.kind===188}function TP(t){return t.kind===189}function r3(t){return t.kind===202}function WG(t){return t.kind===190}function VG(t){return t.kind===191}function Yw(t){return t.kind===192}function DP(t){return t.kind===193}function $T(t){return t.kind===194}function hI(t){return t.kind===195}function _I(t){return t.kind===196}function s3(t){return t.kind===197}function Hk(t){return t.kind===198}function JT(t){return t.kind===199}function pI(t){return t.kind===200}function gS(t){return t.kind===201}function V1(t){return t.kind===205}function Nae(t){return t.kind===204}function Q2e(t){return t.kind===203}function pg(t){return t.kind===206}function mS(t){return t.kind===207}function nl(t){return t.kind===208}function Rf(t){return t.kind===209}function Pa(t){return t.kind===210}function Ir(t){return t.kind===211}function wc(t){return t.kind===212}function sa(t){return t.kind===213}function GT(t){return t.kind===214}function KT(t){return t.kind===215}function Lae(t){return t.kind===216}function g_(t){return t.kind===217}function gc(t){return t.kind===218}function Dc(t){return t.kind===219}function X2e(t){return t.kind===220}function o3(t){return t.kind===221}function EP(t){return t.kind===222}function ex(t){return t.kind===223}function tx(t){return t.kind===224}function Pae(t){return t.kind===225}function cr(t){return t.kind===226}function IP(t){return t.kind===227}function HG(t){return t.kind===228}function jG(t){return t.kind===229}function Zg(t){return t.kind===230}function wd(t){return t.kind===231}function zd(t){return t.kind===232}function Gb(t){return t.kind===233}function _7(t){return t.kind===234}function zG(t){return t.kind===238}function NP(t){return t.kind===235}function p7(t){return t.kind===236}function G$e(t){return t.kind===237}function UG(t){return t.kind===354}function g7(t){return t.kind===355}function m7(t){return t.kind===239}function Z2e(t){return t.kind===240}function Ho(t){return t.kind===241}function Ou(t){return t.kind===243}function Aae(t){return t.kind===242}function _f(t){return t.kind===244}function jk(t){return t.kind===245}function K$e(t){return t.kind===246}function Oae(t){return t.kind===247}function zk(t){return t.kind===248}function qG(t){return t.kind===249}function hV(t){return t.kind===250}function Q$e(t){return t.kind===251}function X$e(t){return t.kind===252}function Om(t){return t.kind===253}function Y2e(t){return t.kind===254}function v7(t){return t.kind===255}function ix(t){return t.kind===256}function Mae(t){return t.kind===257}function gI(t){return t.kind===258}function Z$e(t){return t.kind===259}function ds(t){return t.kind===260}function wf(t){return t.kind===261}function Uu(t){return t.kind===262}function xd(t){return t.kind===263}function Ff(t){return t.kind===264}function Mm(t){return t.kind===265}function Uk(t){return t.kind===266}function qu(t){return t.kind===267}function jv(t){return t.kind===268}function y7(t){return t.kind===269}function _V(t){return t.kind===270}function kd(t){return t.kind===271}function Cu(t){return t.kind===272}function $0(t){return t.kind===273}function Y$e(t){return t.kind===302}function eTe(t){return t.kind===300}function eJe(t){return t.kind===301}function mI(t){return t.kind===300}function tTe(t){return t.kind===301}function eb(t){return t.kind===274}function H1(t){return t.kind===280}function zv(t){return t.kind===275}function m_(t){return t.kind===276}function Ec(t){return t.kind===277}function $u(t){return t.kind===278}function Yg(t){return t.kind===279}function gh(t){return t.kind===281}function tJe(t){return t.kind===282}function Rae(t){return t.kind===353}function LP(t){return t.kind===356}function Kb(t){return t.kind===283}function tb(t){return t.kind===284}function vI(t){return t.kind===285}function Uv(t){return t.kind===286}function QT(t){return t.kind===287}function XT(t){return t.kind===288}function yI(t){return t.kind===289}function iTe(t){return t.kind===290}function qv(t){return t.kind===291}function ZT(t){return t.kind===292}function PP(t){return t.kind===293}function b7(t){return t.kind===294}function J0(t){return t.kind===295}function a3(t){return t.kind===296}function C7(t){return t.kind===297}function Lp(t){return t.kind===298}function YT(t){return t.kind===299}function pd(t){return t.kind===303}function ih(t){return t.kind===304}function ib(t){return t.kind===305}function nx(t){return t.kind===306}function Ns(t){return t.kind===307}function nTe(t){return t.kind===308}function qk(t){return t.kind===309}function S7(t){return t.kind===310}function $k(t){return t.kind===311}function rTe(t){return t.kind===324}function sTe(t){return t.kind===325}function iJe(t){return t.kind===326}function oTe(t){return t.kind===312}function aTe(t){return t.kind===313}function l3(t){return t.kind===314}function $G(t){return t.kind===315}function Fae(t){return t.kind===316}function c3(t){return t.kind===317}function JG(t){return t.kind===318}function nJe(t){return t.kind===319}function G0(t){return t.kind===320}function bI(t){return t.kind===322}function Qb(t){return t.kind===323}function AP(t){return t.kind===328}function rJe(t){return t.kind===330}function lTe(t){return t.kind===332}function Bae(t){return t.kind===338}function Wae(t){return t.kind===333}function Vae(t){return t.kind===334}function Hae(t){return t.kind===335}function jae(t){return t.kind===336}function GG(t){return t.kind===337}function u3(t){return t.kind===339}function zae(t){return t.kind===331}function sJe(t){return t.kind===347}function pV(t){return t.kind===340}function em(t){return t.kind===341}function KG(t){return t.kind===342}function Uae(t){return t.kind===343}function w7(t){return t.kind===344}function Rm(t){return t.kind===345}function CI(t){return t.kind===346}function oJe(t){return t.kind===327}function cTe(t){return t.kind===348}function QG(t){return t.kind===329}function XG(t){return t.kind===350}function aJe(t){return t.kind===349}function $v(t){return t.kind===351}function d3(t){return t.kind===352}var x7=new WeakMap;function qae(t,r){var a;const u=t.kind;return FB(u)?u===352?t._children:(a=x7.get(r))==null?void 0:a.get(t):x}function uTe(t,r,a){t.kind===352&&z.fail("Should not need to re-set the children of a SyntaxList.");let u=x7.get(r);return u===void 0&&(u=new WeakMap,x7.set(r,u)),u.set(t,a),a}function $ae(t,r){var a;t.kind===352&&z.fail("Did not expect to unset the children of a SyntaxList."),(a=x7.get(r))==null||a.delete(t)}function dTe(t,r){const a=x7.get(t);a!==void 0&&(x7.delete(t),x7.set(r,a))}function gV(t){return t.createExportDeclaration(void 0,!1,t.createNamedExports([]),void 0)}function SI(t,r,a,u){if(Ja(a))return zt(t.createElementAccessExpression(r,a.expression),u);{const h=zt(Uy(a)?t.createPropertyAccessExpression(r,a):t.createElementAccessExpression(r,a),a);return Wv(h,128),h}}function fTe(t,r){const a=Gk.createIdentifier(t||"React");return ml(a,xo(r)),a}function hTe(t,r,a){if(__(r)){const u=hTe(t,r.left,a),h=t.createIdentifier(dr(r.right));return h.escapedText=r.right.escapedText,t.createPropertyAccessExpression(u,h)}else return fTe(dr(r),a)}function Jae(t,r,a,u){return r?hTe(t,r,u):t.createPropertyAccessExpression(fTe(a,u),"createElement")}function ANt(t,r,a,u){return r?hTe(t,r,u):t.createPropertyAccessExpression(fTe(a,u),"Fragment")}function _Te(t,r,a,u,h,p){const m=[a];if(u&&m.push(u),h&&h.length>0)if(u||m.push(t.createNull()),h.length>1)for(const C of h)mh(C),m.push(C);else m.push(h[0]);return zt(t.createCallExpression(r,void 0,m),p)}function pTe(t,r,a,u,h,p,m){const b=[ANt(t,a,u,p),t.createNull()];if(h&&h.length>0)if(h.length>1)for(const T of h)mh(T),b.push(T);else b.push(h[0]);return zt(t.createCallExpression(Jae(t,r,u,p),void 0,b),m)}function Gae(t,r,a){if(wf(r)){const u=ma(r.declarations),h=t.updateVariableDeclaration(u,u.name,void 0,void 0,a);return zt(t.createVariableStatement(void 0,t.updateVariableDeclarationList(r,[h])),r)}else{const u=zt(t.createAssignment(r,a),r);return zt(t.createExpressionStatement(u),r)}}function lJe(t,r,a){return Ho(r)?t.updateBlock(r,zt(t.createNodeArray([a,...r.statements]),r.statements)):t.createBlock(t.createNodeArray([r,a]),!0)}function mV(t,r){if(__(r)){const a=mV(t,r.left),u=ml(zt(t.cloneNode(r.right),r.right),r.right.parent);return zt(t.createPropertyAccessExpression(a,u),r)}else return ml(zt(t.cloneNode(r),r),r.parent)}function Kae(t,r){return lt(r)?t.createStringLiteralFromNode(r):Ja(r)?ml(zt(t.cloneNode(r.expression),r.expression),r.expression.parent):ml(zt(t.cloneNode(r),r),r.parent)}function ONt(t,r,a,u,h){const{firstAccessor:p,getAccessor:m,setAccessor:C}=qw(r,a);if(a===p)return zt(t.createObjectDefinePropertyCall(u,Kae(t,a.name),t.createPropertyDescriptor({enumerable:t.createFalse(),configurable:!0,get:m&&zt(Er(t.createFunctionExpression(CT(m),void 0,void 0,void 0,m.parameters,void 0,m.body),m),m),set:C&&zt(Er(t.createFunctionExpression(CT(C),void 0,void 0,void 0,C.parameters,void 0,C.body),C),C)},!h)),p)}function MNt(t,r,a){return Er(zt(t.createAssignment(SI(t,a,r.name,r.name),r.initializer),r),r)}function RNt(t,r,a){return Er(zt(t.createAssignment(SI(t,a,r.name,r.name),t.cloneNode(r.name)),r),r)}function FNt(t,r,a){return Er(zt(t.createAssignment(SI(t,a,r.name,r.name),Er(zt(t.createFunctionExpression(CT(r),r.asteriskToken,void 0,void 0,r.parameters,void 0,r.body),r),r)),r),r)}function gTe(t,r,a,u){switch(a.name&&Vs(a.name)&&z.failBadSyntaxKind(a.name,"Private identifiers are not allowed in object literals."),a.kind){case 177:case 178:return ONt(t,r.properties,a,u,!!r.multiLine);case 303:return MNt(t,a,u);case 304:return RNt(t,a,u);case 174:return FNt(t,a,u)}}function ZG(t,r,a,u,h){const p=r.operator;z.assert(p===46||p===47,"Expected 'node' to be a pre- or post-increment or pre- or post-decrement expression");const m=t.createTempVariable(u);a=t.createAssignment(m,a),zt(a,r.operand);let C=tx(r)?t.createPrefixUnaryExpression(p,m):t.createPostfixUnaryExpression(m,p);return zt(C,r),h&&(C=t.createAssignment(h,C),zt(C,r)),a=t.createComma(a,C),zt(a,r),Pae(r)&&(a=t.createComma(a,m),zt(a,r)),a}function Qae(t){return(Ya(t)&65536)!==0}function Xb(t){return(Ya(t)&32768)!==0}function YG(t){return(Ya(t)&16384)!==0}function cJe(t){return ja(t.expression)&&t.expression.text==="use strict"}function Xae(t){for(const r of t)if(Nv(r)){if(cJe(r))return r}else break}function mTe(t){const r=lu(t);return r!==void 0&&Nv(r)&&cJe(r)}function vV(t){return t.kind===226&&t.operatorToken.kind===28}function k7(t){return vV(t)||g7(t)}function wI(t){return g_(t)&&Xn(t)&&!!xk(t)}function T7(t){const r=kk(t);return z.assertIsDefined(r),r}function eK(t,r=15){switch(t.kind){case 217:return r&16&&wI(t)?!1:(r&1)!==0;case 216:case 234:case 233:case 238:return(r&2)!==0;case 235:return(r&4)!==0;case 354:return(r&8)!==0}return!1}function ld(t,r=15){for(;eK(t,r);)t=t.expression;return t}function vTe(t,r=15){let a=t.parent;for(;eK(a,r);)a=a.parent,z.assert(a);return a}function uJe(t){return ld(t,6)}function mh(t){return IG(t,!0)}function tK(t){const r=uu(t,Ns),a=r&&r.emitNode;return a&&a.externalHelpersModuleName}function yTe(t){const r=uu(t,Ns),a=r&&r.emitNode;return!!a&&(!!a.externalHelpersModuleName||!!a.externalHelpers)}function Zae(t,r,a,u,h,p,m){if(u.importHelpers&&jL(a,u)){let C;const b=Vh(u);if(b>=5&&b<=99||a.impliedNodeFormat===99){const T=LG(a);if(T){const E=[];for(const N of T)if(!N.scoped){const R=N.importName;R&&Cc(E,R)}if(Rt(E)){E.sort(Xf),C=t.createNamedImports(Yt(E,F=>Y$(a,F)?t.createImportSpecifier(!1,void 0,t.createIdentifier(F)):t.createImportSpecifier(!1,t.createIdentifier(F),r.getUnscopedHelperName(F))));const N=uu(a,Ns),R=th(N);R.externalHelpers=!0}}}else{const T=bTe(t,a,u,h,p||m);T&&(C=t.createNamespaceImport(T))}if(C){const T=t.createImportDeclaration(void 0,t.createImportClause(!1,void 0,C),t.createStringLiteral(Ik),void 0);return gP(T,2),T}}}function bTe(t,r,a,u,h){if(a.importHelpers&&jL(r,a)){const p=tK(r);if(p)return p;const m=Vh(a);let C=(u||Xy(a)&&h)&&m!==4&&(m<5||r.impliedNodeFormat===1);if(!C){const b=LG(r);if(b){for(const T of b)if(!T.scoped){C=!0;break}}}if(C){const b=uu(r,Ns),T=th(b);return T.externalHelpersModuleName||(T.externalHelpersModuleName=t.createUniqueName(Ik))}}}function f3(t,r,a){const u=F6(r);if(u&&!KL(r)&&!tJ(r)){const h=u.name;return jc(h)?h:t.createIdentifier(TT(a,h)||dr(h))}if(r.kind===272&&r.importClause||r.kind===278&&r.moduleSpecifier)return t.getGeneratedNameForNode(r)}function OP(t,r,a,u,h,p){const m=GL(r);if(m&&ja(m))return WNt(r,u,t,h,p)||BNt(t,m,a)||t.cloneNode(m)}function BNt(t,r,a){const u=a.renamedDependencies&&a.renamedDependencies.get(r.text);return u?t.createStringLiteral(u):void 0}function yV(t,r,a,u){if(r){if(r.moduleName)return t.createStringLiteral(r.moduleName);if(!r.isDeclarationFile&&u.outFile)return t.createStringLiteral(xoe(a,r.fileName))}}function WNt(t,r,a,u,h){return yV(a,u.getExternalModuleFileFromDeclaration(t),r,h)}function bV(t){if(WB(t))return t.initializer;if(pd(t)){const r=t.initializer;return Yd(r,!0)?r.right:void 0}if(ih(t))return t.objectAssignmentInitializer;if(Yd(t,!0))return t.right;if(Zg(t))return bV(t.expression)}function rx(t){if(WB(t))return t.name;if(Fb(t)){switch(t.kind){case 303:return rx(t.initializer);case 304:return t.name;case 305:return rx(t.expression)}return}return Yd(t,!0)?rx(t.left):Zg(t)?rx(t.expression):t}function iK(t){switch(t.kind){case 169:case 208:return t.dotDotDotToken;case 230:case 305:return t}}function Yae(t){const r=nK(t);return z.assert(!!r||ib(t),"Invalid property name for binding element."),r}function nK(t){switch(t.kind){case 208:if(t.propertyName){const a=t.propertyName;return Vs(a)?z.failBadSyntaxKind(a):Ja(a)&&dJe(a.expression)?a.expression:a}break;case 303:if(t.name){const a=t.name;return Vs(a)?z.failBadSyntaxKind(a):Ja(a)&&dJe(a.expression)?a.expression:a}break;case 305:return t.name&&Vs(t.name)?z.failBadSyntaxKind(t.name):t.name}const r=rx(t);if(r&&od(r))return r}function dJe(t){const r=t.kind;return r===11||r===9}function h3(t){switch(t.kind){case 206:case 207:case 209:return t.elements;case 210:return t.properties}}function ele(t){if(t){let r=t;for(;;){if(lt(r)||!r.body)return lt(r)?r:r.name;r=r.body}}}function fJe(t){const r=t.kind;return r===176||r===178}function CTe(t){const r=t.kind;return r===176||r===177||r===178}function tle(t){const r=t.kind;return r===303||r===304||r===262||r===176||r===181||r===175||r===282||r===243||r===264||r===265||r===266||r===267||r===271||r===272||r===270||r===278||r===277}function STe(t){const r=t.kind;return r===175||r===303||r===304||r===282||r===270}function wTe(t){return Zw(t)||uV(t)}function xTe(t){return lt(t)||s3(t)}function kTe(t){return q2e(t)||Dae(t)||Eae(t)}function TTe(t){return Zw(t)||Dae(t)||Eae(t)}function DTe(t){return lt(t)||ja(t)}function hJe(t){const r=t.kind;return r===106||r===112||r===97||wT(t)||tx(t)}function VNt(t){return t===43}function HNt(t){return t===42||t===44||t===45}function jNt(t){return VNt(t)||HNt(t)}function zNt(t){return t===40||t===41}function UNt(t){return zNt(t)||jNt(t)}function qNt(t){return t===48||t===49||t===50}function ile(t){return qNt(t)||UNt(t)}function $Nt(t){return t===30||t===33||t===32||t===34||t===104||t===103}function JNt(t){return $Nt(t)||ile(t)}function GNt(t){return t===35||t===37||t===36||t===38}function KNt(t){return GNt(t)||JNt(t)}function QNt(t){return t===51||t===52||t===53}function XNt(t){return QNt(t)||KNt(t)}function ZNt(t){return t===56||t===57}function YNt(t){return ZNt(t)||XNt(t)}function eLt(t){return t===61||YNt(t)||jb(t)}function tLt(t){return eLt(t)||t===28}function ETe(t){return tLt(t.kind)}var nle;(t=>{function r(E,N,R,F,j,U,q){const Q=N>0?j[N-1]:void 0;return z.assertEqual(R[N],r),j[N]=E.onEnter(F[N],Q,q),R[N]=C(E,r),N}t.enter=r;function a(E,N,R,F,j,U,q){z.assertEqual(R[N],a),z.assertIsDefined(E.onLeft),R[N]=C(E,a);const Q=E.onLeft(F[N].left,j[N],F[N]);return Q?(T(N,F,Q),b(N,R,F,j,Q)):N}t.left=a;function u(E,N,R,F,j,U,q){return z.assertEqual(R[N],u),z.assertIsDefined(E.onOperator),R[N]=C(E,u),E.onOperator(F[N].operatorToken,j[N],F[N]),N}t.operator=u;function h(E,N,R,F,j,U,q){z.assertEqual(R[N],h),z.assertIsDefined(E.onRight),R[N]=C(E,h);const Q=E.onRight(F[N].right,j[N],F[N]);return Q?(T(N,F,Q),b(N,R,F,j,Q)):N}t.right=h;function p(E,N,R,F,j,U,q){z.assertEqual(R[N],p),R[N]=C(E,p);const Q=E.onExit(F[N],j[N]);if(N>0){if(N--,E.foldState){const re=R[N]===p?"right":"left";j[N]=E.foldState(j[N],Q,re)}}else U.value=Q;return N}t.exit=p;function m(E,N,R,F,j,U,q){return z.assertEqual(R[N],m),N}t.done=m;function C(E,N){switch(N){case r:if(E.onLeft)return a;case a:if(E.onOperator)return u;case u:if(E.onRight)return h;case h:return p;case p:return m;case m:return m;default:z.fail("Invalid state")}}t.nextState=C;function b(E,N,R,F,j){return E++,N[E]=r,R[E]=j,F[E]=void 0,E}function T(E,N,R){if(z.shouldAssert(2))for(;E>=0;)z.assert(N[E]!==R,"Circular traversal detected."),E--}})(nle||(nle={}));var iLt=class{constructor(t,r,a,u,h,p){this.onEnter=t,this.onLeft=r,this.onOperator=a,this.onRight=u,this.onExit=h,this.foldState=p}};function rK(t,r,a,u,h,p){const m=new iLt(t,r,a,u,h,p);return C;function C(b,T){const E={value:void 0},N=[nle.enter],R=[b],F=[void 0];let j=0;for(;N[j]!==nle.done;)j=N[j](m,j,N,R,F,E,T);return z.assertEqual(j,0),E.value}}function _Je(t){return t===95||t===90}function CV(t){const r=t.kind;return _Je(r)}function pJe(t){const r=t.kind;return eS(r)&&!_Je(r)}function ITe(t,r){if(r!==void 0)return r.length===0?r:zt(t.createNodeArray([],r.hasTrailingComma),r)}function SV(t){var r;const a=t.emitNode.autoGenerate;if(a.flags&4){const u=a.id;let h=t,p=h.original;for(;p;){h=p;const m=(r=h.emitNode)==null?void 0:r.autoGenerate;if(Uy(h)&&(m===void 0||m.flags&4&&m.id!==u))break;p=h.original}return h}return t}function _3(t,r){return typeof t=="object"?Jk(!1,t.prefix,t.node,t.suffix,r):typeof t=="string"?t.length>0&&t.charCodeAt(0)===35?t.slice(1):t:""}function nLt(t,r){return typeof t=="string"?t:rLt(t,z.checkDefined(r))}function rLt(t,r){return ZE(t)?r(t).slice(1):jc(t)?r(t):Vs(t)?t.escapedText.slice(1):dr(t)}function Jk(t,r,a,u,h){return r=_3(r,h),u=_3(u,h),a=nLt(a,h),`${t?"#":""}${r}${a}${u}`}function rle(t,r,a,u){return t.updatePropertyDeclaration(r,a,t.getGeneratedPrivateNameForNode(r.name,void 0,"_accessor_storage"),void 0,void 0,u)}function NTe(t,r,a,u,h=t.createThis()){return t.createGetAccessorDeclaration(a,u,[],void 0,t.createBlock([t.createReturnStatement(t.createPropertyAccessExpression(h,t.getGeneratedPrivateNameForNode(r.name,void 0,"_accessor_storage")))]))}function LTe(t,r,a,u,h=t.createThis()){return t.createSetAccessorDeclaration(a,u,[t.createParameterDeclaration(void 0,void 0,"value")],t.createBlock([t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(h,t.getGeneratedPrivateNameForNode(r.name,void 0,"_accessor_storage")),t.createIdentifier("value")))]))}function sK(t){let r=t.expression;for(;;){if(r=ld(r),g7(r)){r=La(r.elements);continue}if(vV(r)){r=r.right;continue}if(Yd(r,!0)&&jc(r.left))return r;break}}function sLt(t){return g_(t)&&oc(t)&&!t.emitNode}function oK(t,r){if(sLt(t))oK(t.expression,r);else if(vV(t))oK(t.left,r),oK(t.right,r);else if(g7(t))for(const a of t.elements)oK(a,r);else r.push(t)}function PTe(t){const r=[];return oK(t,r),r}function wV(t){if(t.transformFlags&65536)return!0;if(t.transformFlags&128)for(const r of h3(t)){const a=rx(r);if(a&&d8(a)&&(a.transformFlags&65536||a.transformFlags&128&&wV(a)))return!0}return!1}function zt(t,r){return r?Bv(t,r.pos,r.end):t}function _0(t){const r=t.kind;return r===168||r===169||r===171||r===172||r===173||r===174||r===176||r===177||r===178||r===181||r===185||r===218||r===219||r===231||r===243||r===262||r===263||r===264||r===265||r===266||r===267||r===271||r===272||r===277||r===278}function eD(t){const r=t.kind;return r===169||r===172||r===174||r===177||r===178||r===231||r===263}var gJe,mJe,vJe,yJe,bJe,ATe={createBaseSourceFileNode:t=>new(bJe||(bJe=Mf.getSourceFileConstructor()))(t,-1,-1),createBaseIdentifierNode:t=>new(vJe||(vJe=Mf.getIdentifierConstructor()))(t,-1,-1),createBasePrivateIdentifierNode:t=>new(yJe||(yJe=Mf.getPrivateIdentifierConstructor()))(t,-1,-1),createBaseTokenNode:t=>new(mJe||(mJe=Mf.getTokenConstructor()))(t,-1,-1),createBaseNode:t=>new(gJe||(gJe=Mf.getNodeConstructor()))(t,-1,-1)},Gk=iV(1,ATe);function Si(t,r){return r&&t(r)}function Ls(t,r,a){if(a){if(r)return r(a);for(const u of a){const h=t(u);if(h)return h}}}function sle(t,r){return t.charCodeAt(r+1)===42&&t.charCodeAt(r+2)===42&&t.charCodeAt(r+3)!==47}function xV(t){return W(t.statements,oLt)||aLt(t)}function oLt(t){return _0(t)&&lLt(t,95)||kd(t)&&Kb(t.moduleReference)||Cu(t)||Ec(t)||$u(t)?t:void 0}function aLt(t){return t.flags&8388608?CJe(t):void 0}function CJe(t){return cLt(t)?t:jo(t,CJe)}function lLt(t,r){return Rt(t.modifiers,a=>a.kind===r)}function cLt(t){return p7(t)&&t.keywordToken===102&&t.name.escapedText==="meta"}var uLt={166:function(r,a,u){return Si(a,r.left)||Si(a,r.right)},168:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.name)||Si(a,r.constraint)||Si(a,r.default)||Si(a,r.expression)},304:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.name)||Si(a,r.questionToken)||Si(a,r.exclamationToken)||Si(a,r.equalsToken)||Si(a,r.objectAssignmentInitializer)},305:function(r,a,u){return Si(a,r.expression)},169:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.dotDotDotToken)||Si(a,r.name)||Si(a,r.questionToken)||Si(a,r.type)||Si(a,r.initializer)},172:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.name)||Si(a,r.questionToken)||Si(a,r.exclamationToken)||Si(a,r.type)||Si(a,r.initializer)},171:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.name)||Si(a,r.questionToken)||Si(a,r.type)||Si(a,r.initializer)},303:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.name)||Si(a,r.questionToken)||Si(a,r.exclamationToken)||Si(a,r.initializer)},260:function(r,a,u){return Si(a,r.name)||Si(a,r.exclamationToken)||Si(a,r.type)||Si(a,r.initializer)},208:function(r,a,u){return Si(a,r.dotDotDotToken)||Si(a,r.propertyName)||Si(a,r.name)||Si(a,r.initializer)},181:function(r,a,u){return Ls(a,u,r.modifiers)||Ls(a,u,r.typeParameters)||Ls(a,u,r.parameters)||Si(a,r.type)},185:function(r,a,u){return Ls(a,u,r.modifiers)||Ls(a,u,r.typeParameters)||Ls(a,u,r.parameters)||Si(a,r.type)},184:function(r,a,u){return Ls(a,u,r.modifiers)||Ls(a,u,r.typeParameters)||Ls(a,u,r.parameters)||Si(a,r.type)},179:SJe,180:SJe,174:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.asteriskToken)||Si(a,r.name)||Si(a,r.questionToken)||Si(a,r.exclamationToken)||Ls(a,u,r.typeParameters)||Ls(a,u,r.parameters)||Si(a,r.type)||Si(a,r.body)},173:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.name)||Si(a,r.questionToken)||Ls(a,u,r.typeParameters)||Ls(a,u,r.parameters)||Si(a,r.type)},176:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.name)||Ls(a,u,r.typeParameters)||Ls(a,u,r.parameters)||Si(a,r.type)||Si(a,r.body)},177:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.name)||Ls(a,u,r.typeParameters)||Ls(a,u,r.parameters)||Si(a,r.type)||Si(a,r.body)},178:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.name)||Ls(a,u,r.typeParameters)||Ls(a,u,r.parameters)||Si(a,r.type)||Si(a,r.body)},262:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.asteriskToken)||Si(a,r.name)||Ls(a,u,r.typeParameters)||Ls(a,u,r.parameters)||Si(a,r.type)||Si(a,r.body)},218:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.asteriskToken)||Si(a,r.name)||Ls(a,u,r.typeParameters)||Ls(a,u,r.parameters)||Si(a,r.type)||Si(a,r.body)},219:function(r,a,u){return Ls(a,u,r.modifiers)||Ls(a,u,r.typeParameters)||Ls(a,u,r.parameters)||Si(a,r.type)||Si(a,r.equalsGreaterThanToken)||Si(a,r.body)},175:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.body)},183:function(r,a,u){return Si(a,r.typeName)||Ls(a,u,r.typeArguments)},182:function(r,a,u){return Si(a,r.assertsModifier)||Si(a,r.parameterName)||Si(a,r.type)},186:function(r,a,u){return Si(a,r.exprName)||Ls(a,u,r.typeArguments)},187:function(r,a,u){return Ls(a,u,r.members)},188:function(r,a,u){return Si(a,r.elementType)},189:function(r,a,u){return Ls(a,u,r.elements)},192:wJe,193:wJe,194:function(r,a,u){return Si(a,r.checkType)||Si(a,r.extendsType)||Si(a,r.trueType)||Si(a,r.falseType)},195:function(r,a,u){return Si(a,r.typeParameter)},205:function(r,a,u){return Si(a,r.argument)||Si(a,r.attributes)||Si(a,r.qualifier)||Ls(a,u,r.typeArguments)},302:function(r,a,u){return Si(a,r.assertClause)},196:xJe,198:xJe,199:function(r,a,u){return Si(a,r.objectType)||Si(a,r.indexType)},200:function(r,a,u){return Si(a,r.readonlyToken)||Si(a,r.typeParameter)||Si(a,r.nameType)||Si(a,r.questionToken)||Si(a,r.type)||Ls(a,u,r.members)},201:function(r,a,u){return Si(a,r.literal)},202:function(r,a,u){return Si(a,r.dotDotDotToken)||Si(a,r.name)||Si(a,r.questionToken)||Si(a,r.type)},206:kJe,207:kJe,209:function(r,a,u){return Ls(a,u,r.elements)},210:function(r,a,u){return Ls(a,u,r.properties)},211:function(r,a,u){return Si(a,r.expression)||Si(a,r.questionDotToken)||Si(a,r.name)},212:function(r,a,u){return Si(a,r.expression)||Si(a,r.questionDotToken)||Si(a,r.argumentExpression)},213:TJe,214:TJe,215:function(r,a,u){return Si(a,r.tag)||Si(a,r.questionDotToken)||Ls(a,u,r.typeArguments)||Si(a,r.template)},216:function(r,a,u){return Si(a,r.type)||Si(a,r.expression)},217:function(r,a,u){return Si(a,r.expression)},220:function(r,a,u){return Si(a,r.expression)},221:function(r,a,u){return Si(a,r.expression)},222:function(r,a,u){return Si(a,r.expression)},224:function(r,a,u){return Si(a,r.operand)},229:function(r,a,u){return Si(a,r.asteriskToken)||Si(a,r.expression)},223:function(r,a,u){return Si(a,r.expression)},225:function(r,a,u){return Si(a,r.operand)},226:function(r,a,u){return Si(a,r.left)||Si(a,r.operatorToken)||Si(a,r.right)},234:function(r,a,u){return Si(a,r.expression)||Si(a,r.type)},235:function(r,a,u){return Si(a,r.expression)},238:function(r,a,u){return Si(a,r.expression)||Si(a,r.type)},236:function(r,a,u){return Si(a,r.name)},227:function(r,a,u){return Si(a,r.condition)||Si(a,r.questionToken)||Si(a,r.whenTrue)||Si(a,r.colonToken)||Si(a,r.whenFalse)},230:function(r,a,u){return Si(a,r.expression)},241:DJe,268:DJe,307:function(r,a,u){return Ls(a,u,r.statements)||Si(a,r.endOfFileToken)},243:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.declarationList)},261:function(r,a,u){return Ls(a,u,r.declarations)},244:function(r,a,u){return Si(a,r.expression)},245:function(r,a,u){return Si(a,r.expression)||Si(a,r.thenStatement)||Si(a,r.elseStatement)},246:function(r,a,u){return Si(a,r.statement)||Si(a,r.expression)},247:function(r,a,u){return Si(a,r.expression)||Si(a,r.statement)},248:function(r,a,u){return Si(a,r.initializer)||Si(a,r.condition)||Si(a,r.incrementor)||Si(a,r.statement)},249:function(r,a,u){return Si(a,r.initializer)||Si(a,r.expression)||Si(a,r.statement)},250:function(r,a,u){return Si(a,r.awaitModifier)||Si(a,r.initializer)||Si(a,r.expression)||Si(a,r.statement)},251:EJe,252:EJe,253:function(r,a,u){return Si(a,r.expression)},254:function(r,a,u){return Si(a,r.expression)||Si(a,r.statement)},255:function(r,a,u){return Si(a,r.expression)||Si(a,r.caseBlock)},269:function(r,a,u){return Ls(a,u,r.clauses)},296:function(r,a,u){return Si(a,r.expression)||Ls(a,u,r.statements)},297:function(r,a,u){return Ls(a,u,r.statements)},256:function(r,a,u){return Si(a,r.label)||Si(a,r.statement)},257:function(r,a,u){return Si(a,r.expression)},258:function(r,a,u){return Si(a,r.tryBlock)||Si(a,r.catchClause)||Si(a,r.finallyBlock)},299:function(r,a,u){return Si(a,r.variableDeclaration)||Si(a,r.block)},170:function(r,a,u){return Si(a,r.expression)},263:IJe,231:IJe,264:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.name)||Ls(a,u,r.typeParameters)||Ls(a,u,r.heritageClauses)||Ls(a,u,r.members)},265:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.name)||Ls(a,u,r.typeParameters)||Si(a,r.type)},266:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.name)||Ls(a,u,r.members)},306:function(r,a,u){return Si(a,r.name)||Si(a,r.initializer)},267:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.name)||Si(a,r.body)},271:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.name)||Si(a,r.moduleReference)},272:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.importClause)||Si(a,r.moduleSpecifier)||Si(a,r.attributes)},273:function(r,a,u){return Si(a,r.name)||Si(a,r.namedBindings)},300:function(r,a,u){return Ls(a,u,r.elements)},301:function(r,a,u){return Si(a,r.name)||Si(a,r.value)},270:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.name)},274:function(r,a,u){return Si(a,r.name)},280:function(r,a,u){return Si(a,r.name)},275:NJe,279:NJe,278:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.exportClause)||Si(a,r.moduleSpecifier)||Si(a,r.attributes)},276:LJe,281:LJe,277:function(r,a,u){return Ls(a,u,r.modifiers)||Si(a,r.expression)},228:function(r,a,u){return Si(a,r.head)||Ls(a,u,r.templateSpans)},239:function(r,a,u){return Si(a,r.expression)||Si(a,r.literal)},203:function(r,a,u){return Si(a,r.head)||Ls(a,u,r.templateSpans)},204:function(r,a,u){return Si(a,r.type)||Si(a,r.literal)},167:function(r,a,u){return Si(a,r.expression)},298:function(r,a,u){return Ls(a,u,r.types)},233:function(r,a,u){return Si(a,r.expression)||Ls(a,u,r.typeArguments)},283:function(r,a,u){return Si(a,r.expression)},282:function(r,a,u){return Ls(a,u,r.modifiers)},355:function(r,a,u){return Ls(a,u,r.elements)},284:function(r,a,u){return Si(a,r.openingElement)||Ls(a,u,r.children)||Si(a,r.closingElement)},288:function(r,a,u){return Si(a,r.openingFragment)||Ls(a,u,r.children)||Si(a,r.closingFragment)},285:PJe,286:PJe,292:function(r,a,u){return Ls(a,u,r.properties)},291:function(r,a,u){return Si(a,r.name)||Si(a,r.initializer)},293:function(r,a,u){return Si(a,r.expression)},294:function(r,a,u){return Si(a,r.dotDotDotToken)||Si(a,r.expression)},287:function(r,a,u){return Si(a,r.tagName)},295:function(r,a,u){return Si(a,r.namespace)||Si(a,r.name)},190:D7,191:D7,309:D7,315:D7,314:D7,316:D7,318:D7,317:function(r,a,u){return Ls(a,u,r.parameters)||Si(a,r.type)},320:function(r,a,u){return(typeof r.comment=="string"?void 0:Ls(a,u,r.comment))||Ls(a,u,r.tags)},347:function(r,a,u){return Si(a,r.tagName)||Si(a,r.name)||(typeof r.comment=="string"?void 0:Ls(a,u,r.comment))},310:function(r,a,u){return Si(a,r.name)},311:function(r,a,u){return Si(a,r.left)||Si(a,r.right)},341:AJe,348:AJe,330:function(r,a,u){return Si(a,r.tagName)||(typeof r.comment=="string"?void 0:Ls(a,u,r.comment))},329:function(r,a,u){return Si(a,r.tagName)||Si(a,r.class)||(typeof r.comment=="string"?void 0:Ls(a,u,r.comment))},328:function(r,a,u){return Si(a,r.tagName)||Si(a,r.class)||(typeof r.comment=="string"?void 0:Ls(a,u,r.comment))},345:function(r,a,u){return Si(a,r.tagName)||Si(a,r.constraint)||Ls(a,u,r.typeParameters)||(typeof r.comment=="string"?void 0:Ls(a,u,r.comment))},346:function(r,a,u){return Si(a,r.tagName)||(r.typeExpression&&r.typeExpression.kind===309?Si(a,r.typeExpression)||Si(a,r.fullName)||(typeof r.comment=="string"?void 0:Ls(a,u,r.comment)):Si(a,r.fullName)||Si(a,r.typeExpression)||(typeof r.comment=="string"?void 0:Ls(a,u,r.comment)))},338:function(r,a,u){return Si(a,r.tagName)||Si(a,r.fullName)||Si(a,r.typeExpression)||(typeof r.comment=="string"?void 0:Ls(a,u,r.comment))},342:E7,344:E7,343:E7,340:E7,350:E7,349:E7,339:E7,323:function(r,a,u){return W(r.typeParameters,a)||W(r.parameters,a)||Si(a,r.type)},324:OTe,325:OTe,326:OTe,322:function(r,a,u){return W(r.jsDocPropertyTags,a)},327:p3,332:p3,333:p3,334:p3,335:p3,336:p3,331:p3,337:p3,351:dLt,354:fLt};function SJe(t,r,a){return Ls(r,a,t.typeParameters)||Ls(r,a,t.parameters)||Si(r,t.type)}function wJe(t,r,a){return Ls(r,a,t.types)}function xJe(t,r,a){return Si(r,t.type)}function kJe(t,r,a){return Ls(r,a,t.elements)}function TJe(t,r,a){return Si(r,t.expression)||Si(r,t.questionDotToken)||Ls(r,a,t.typeArguments)||Ls(r,a,t.arguments)}function DJe(t,r,a){return Ls(r,a,t.statements)}function EJe(t,r,a){return Si(r,t.label)}function IJe(t,r,a){return Ls(r,a,t.modifiers)||Si(r,t.name)||Ls(r,a,t.typeParameters)||Ls(r,a,t.heritageClauses)||Ls(r,a,t.members)}function NJe(t,r,a){return Ls(r,a,t.elements)}function LJe(t,r,a){return Si(r,t.propertyName)||Si(r,t.name)}function PJe(t,r,a){return Si(r,t.tagName)||Ls(r,a,t.typeArguments)||Si(r,t.attributes)}function D7(t,r,a){return Si(r,t.type)}function AJe(t,r,a){return Si(r,t.tagName)||(t.isNameFirst?Si(r,t.name)||Si(r,t.typeExpression):Si(r,t.typeExpression)||Si(r,t.name))||(typeof t.comment=="string"?void 0:Ls(r,a,t.comment))}function E7(t,r,a){return Si(r,t.tagName)||Si(r,t.typeExpression)||(typeof t.comment=="string"?void 0:Ls(r,a,t.comment))}function OTe(t,r,a){return Si(r,t.name)}function p3(t,r,a){return Si(r,t.tagName)||(typeof t.comment=="string"?void 0:Ls(r,a,t.comment))}function dLt(t,r,a){return Si(r,t.tagName)||Si(r,t.importClause)||Si(r,t.moduleSpecifier)||Si(r,t.attributes)||(typeof t.comment=="string"?void 0:Ls(r,a,t.comment))}function fLt(t,r,a){return Si(r,t.expression)}function jo(t,r,a){if(t===void 0||t.kind<=165)return;const u=uLt[t.kind];return u===void 0?void 0:u(t,r,a)}function MP(t,r,a){const u=OJe(t),h=[];for(;h.length=0;--C)u.push(p[C]),h.push(m)}else{const C=r(p,m);if(C){if(C==="skip")continue;return C}if(p.kind>=166)for(const b of OJe(p))u.push(b),h.push(p)}}}function OJe(t){const r=[];return jo(t,a,a),r;function a(u){r.unshift(u)}}function MJe(t){t.externalModuleIndicator=xV(t)}function RP(t,r,a,u=!1,h){var p,m,C,b;(p=sr)==null||p.push(sr.Phase.Parse,"createSourceFile",{path:t},!0),cu("beforeParse");let T;(m=c_)==null||m.logStartParseSourceFile(t);const{languageVersion:E,setExternalModuleIndicator:N,impliedNodeFormat:R,jsDocParsingMode:F}=typeof a=="object"?a:{languageVersion:a};if(E===100)T=Kk.parseSourceFile(t,r,E,void 0,u,6,dl,F);else{const j=R===void 0?N:U=>(U.impliedNodeFormat=R,(N||MJe)(U));T=Kk.parseSourceFile(t,r,E,void 0,u,h,j,F)}return(C=c_)==null||C.logStopParseSourceFile(),cu("afterParse"),qg("Parse","beforeParse","afterParse"),(b=sr)==null||b.pop(),T}function FP(t,r){return Kk.parseIsolatedEntityName(t,r)}function kV(t,r){return Kk.parseJsonText(t,r)}function Td(t){return t.externalModuleIndicator!==void 0}function ole(t,r,a,u=!1){const h=ale.updateSourceFile(t,r,a,u);return h.flags|=t.flags&12582912,h}function MTe(t,r,a){const u=Kk.JSDocParser.parseIsolatedJSDocComment(t,r,a);return u&&u.jsDoc&&Kk.fixupParentReferences(u.jsDoc),u}function RJe(t,r,a){return Kk.JSDocParser.parseJSDocTypeExpressionForTests(t,r,a)}var Kk;(t=>{var r=zy(99,!0),a=40960,u,h,p,m,C;function b(ge){return ft++,ge}var T={createBaseSourceFileNode:ge=>b(new C(ge,0,0)),createBaseIdentifierNode:ge=>b(new p(ge,0,0)),createBasePrivateIdentifierNode:ge=>b(new m(ge,0,0)),createBaseTokenNode:ge=>b(new h(ge,0,0)),createBaseNode:ge=>b(new u(ge,0,0))},E=iV(11,T),{createNodeArray:N,createNumericLiteral:R,createStringLiteral:F,createLiteralLikeNode:j,createIdentifier:U,createPrivateIdentifier:q,createToken:Q,createArrayLiteralExpression:re,createObjectLiteralExpression:Y,createPropertyAccessExpression:ue,createPropertyAccessChain:te,createElementAccessExpression:Se,createElementAccessChain:oe,createCallExpression:pe,createCallChain:ye,createNewExpression:be,createParenthesizedExpression:_e,createBlock:ve,createVariableStatement:Ee,createExpressionStatement:ke,createIfStatement:Fe,createWhileStatement:Oe,createForStatement:fe,createForOfStatement:Ie,createVariableDeclaration:Le,createVariableDeclarationList:et}=E,He,We,Ue,Ye,wt,nt,ze,st,xt,Et,ft,Ht,Oi,Ji,Ui,bn,Mi=!0,Ai=!1;function Rn(ge,Qe,yt,Zt,_i=!1,an,jr,Bs=0){var ws;if(an=dG(ge,an),an===6){const io=Hi(ge,Qe,yt,Zt,_i);return NV(io,(ws=io.statements[0])==null?void 0:ws.expression,io.parseDiagnostics,!1,void 0),io.referencedFiles=x,io.typeReferenceDirectives=x,io.libReferenceDirectives=x,io.amdDependencies=x,io.hasNoDefaultLib=!1,io.pragmas=I,io}Hs(ge,Qe,yt,Zt,an,Bs);const hs=ts(yt,_i,an,jr||MJe,Bs);return Wo(),hs}t.parseSourceFile=Rn;function bs(ge,Qe){Hs("",ge,Qe,void 0,1,0),Ke();const yt=me(!0),Zt=de()===1&&!ze.length;return Wo(),Zt?yt:void 0}t.parseIsolatedEntityName=bs;function Hi(ge,Qe,yt=2,Zt,_i=!1){Hs(ge,Qe,yt,Zt,6,0),We=bn,Ke();const an=le();let jr,Bs;if(de()===1)jr=wl([],an,an),Bs=Tu();else{let io;for(;de()!==1;){let Ka;switch(de()){case 23:Ka=S0();break;case 112:case 97:case 106:Ka=Tu();break;case 41:Ar(()=>Ke()===9&&Ke()!==59)?Ka=Tr():Ka=w2();break;case 9:case 11:if(Ar(()=>Ke()!==59)){Ka=ei();break}default:Ka=w2();break}io&&Lo(io)?io.push(Ka):io?io=[io,Ka]:(io=Ka,de()!==1&&Gt(k.Unexpected_token))}const ic=Lo(io)?Li(re(io),an):z.checkDefined(io),va=ke(ic);Li(va,an),jr=wl([va],an),Bs=qc(1,k.Unexpected_token)}const ws=hi(ge,2,6,!1,jr,Bs,We,dl);_i&&ot(ws),ws.nodeCount=ft,ws.identifierCount=Oi,ws.identifiers=Ht,ws.parseDiagnostics=aP(ze,ws),st&&(ws.jsDocDiagnostics=aP(st,ws));const hs=ws;return Wo(),hs}t.parseJsonText=Hi;function Hs(ge,Qe,yt,Zt,_i,an){switch(u=Mf.getNodeConstructor(),h=Mf.getTokenConstructor(),p=Mf.getIdentifierConstructor(),m=Mf.getPrivateIdentifierConstructor(),C=Mf.getSourceFileConstructor(),He=ra(ge),Ue=Qe,Ye=yt,xt=Zt,wt=_i,nt=qW(_i),ze=[],Ji=0,Ht=new Map,Oi=0,ft=0,We=0,Mi=!0,wt){case 1:case 2:bn=524288;break;case 6:bn=134742016;break;default:bn=0;break}Ai=!1,r.setText(Ue),r.setOnError(Bt),r.setScriptTarget(Ye),r.setLanguageVariant(nt),r.setScriptKind(wt),r.setJSDocParsingMode(an)}function Wo(){r.clearCommentDirectives(),r.setText(""),r.setOnError(void 0),r.setScriptKind(0),r.setJSDocParsingMode(0),Ue=void 0,Ye=void 0,xt=void 0,wt=void 0,nt=void 0,We=0,ze=void 0,st=void 0,Ji=0,Ht=void 0,Ui=void 0,Mi=!0}function ts(ge,Qe,yt,Zt,_i){const an=xf(He);an&&(bn|=33554432),We=bn,Ke();const jr=hl(0,Ng);z.assert(de()===1);const Bs=je(),ws=Cn(Tu(),Bs),hs=hi(He,ge,yt,an,jr,ws,We,Zt);return cle(hs,Ue),ule(hs,io),hs.commentDirectives=r.getCommentDirectives(),hs.nodeCount=ft,hs.identifierCount=Oi,hs.identifiers=Ht,hs.parseDiagnostics=aP(ze,hs),hs.jsDocParsingMode=_i,st&&(hs.jsDocDiagnostics=aP(st,hs)),Qe&&ot(hs),hs;function io(ic,va,Ka){ze.push(oP(He,Ue,ic,va,Ka))}}let Fo=!1;function Cn(ge,Qe){if(!Qe)return ge;z.assert(!ge.jsDoc);const yt=ns(Jse(ge,Ue),Zt=>kA.parseJSDocComment(ge,Zt.pos,Zt.end-Zt.pos));return yt.length&&(ge.jsDoc=yt),Fo&&(Fo=!1,ge.flags|=536870912),ge}function Ko(ge){const Qe=xt,yt=ale.createSyntaxCursor(ge);xt={currentNode:io};const Zt=[],_i=ze;ze=[];let an=0,jr=ws(ge.statements,0);for(;jr!==-1;){const ic=ge.statements[an],va=ge.statements[jr];un(Zt,ge.statements,an,jr),an=hs(ge.statements,jr);const Ka=Nt(_i,sv=>sv.start>=ic.pos),Ag=Ka>=0?Nt(_i,sv=>sv.start>=va.pos,Ka):-1;Ka>=0&&un(ze,_i,Ka,Ag>=0?Ag:void 0),to(()=>{const sv=bn;for(bn|=65536,r.resetTokenState(va.pos),Ke();de()!==1;){const vC=r.getTokenFullStart(),wx=Mu(0,Ng);if(Zt.push(wx),vC===r.getTokenFullStart()&&Ke(),an>=0){const $m=ge.statements[an];if(wx.end===$m.pos)break;wx.end>$m.pos&&(an=hs(ge.statements,an+1))}}bn=sv},2),jr=an>=0?ws(ge.statements,an):-1}if(an>=0){const ic=ge.statements[an];un(Zt,ge.statements,an);const va=Nt(_i,Ka=>Ka.start>=ic.pos);va>=0&&un(ze,_i,va)}return xt=Qe,E.updateSourceFile(ge,zt(N(Zt),ge.statements));function Bs(ic){return!(ic.flags&65536)&&!!(ic.transformFlags&67108864)}function ws(ic,va){for(let Ka=va;Ka118}function Tn(){return de()===80?!0:de()===127&&Ci()||de()===135&&ii()?!1:de()>118}function ki(ge,Qe,yt=!0){return de()===ge?(yt&&Ke(),!0):(Qe?Gt(Qe):Gt(k._0_expected,Ta(ge)),!1)}const zo=Object.keys(w$).filter(ge=>ge.length>2);function Sl(ge){if(KT(ge)){ce(qa(Ue,ge.template.pos),ge.template.end,k.Module_declaration_names_may_only_use_or_quoted_strings);return}const Qe=lt(ge)?dr(ge):void 0;if(!Qe||!wp(Qe,Ye)){Gt(k._0_expected,Ta(27));return}const yt=qa(Ue,ge.pos);switch(Qe){case"const":case"let":case"var":ce(yt,ge.end,k.Variable_declaration_not_allowed_at_this_location);return;case"declare":return;case"interface":Rl(k.Interface_name_cannot_be_0,k.Interface_must_be_given_a_name,19);return;case"is":ce(yt,r.getTokenStart(),k.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);return;case"module":case"namespace":Rl(k.Namespace_name_cannot_be_0,k.Namespace_must_be_given_a_name,19);return;case"type":Rl(k.Type_alias_name_cannot_be_0,k.Type_alias_must_be_given_a_name,64);return}const Zt=qE(Qe,zo,fc)??zl(Qe);if(Zt){ce(yt,ge.end,k.Unknown_keyword_or_identifier_Did_you_mean_0,Zt);return}de()!==0&&ce(yt,ge.end,k.Unexpected_keyword_or_identifier)}function Rl(ge,Qe,yt){de()===yt?Gt(Qe):Gt(ge,r.getTokenValue())}function zl(ge){for(const Qe of zo)if(ge.length>Qe.length+2&&ro(ge,Qe))return`${Qe} ${ge.slice(Qe.length)}`}function co(ge,Qe,yt){if(de()===60&&!r.hasPrecedingLineBreak()){Gt(k.Decorators_must_precede_the_name_and_all_keywords_of_property_declarations);return}if(de()===21){Gt(k.Cannot_start_a_function_call_in_a_type_annotation),Ke();return}if(Qe&&!za()){yt?Gt(k._0_expected,Ta(27)):Gt(k.Expected_for_property_initializer);return}if(!Mc()){if(yt){Gt(k._0_expected,Ta(27));return}Sl(ge)}}function ca(ge){return de()===ge?(Qt(),!0):(z.assert(DJ(ge)),Gt(k._0_expected,Ta(ge)),!1)}function Ic(ge,Qe,yt,Zt){if(de()===Qe){Ke();return}const _i=Gt(k._0_expected,Ta(Qe));yt&&_i&&fa(_i,oP(He,Ue,Zt,1,k.The_parser_expected_to_find_a_1_to_match_the_0_token_here,Ta(ge),Ta(Qe)))}function $s(ge){return de()===ge?(Ke(),!0):!1}function Ps(ge){if(de()===ge)return Tu()}function pf(ge){if(de()===ge)return Wf()}function qc(ge,Qe,yt){return Ps(ge)||wu(ge,!1,Qe||k._0_expected,yt||Ta(ge))}function wh(ge){const Qe=pf(ge);return Qe||(z.assert(DJ(ge)),wu(ge,!1,k._0_expected,Ta(ge)))}function Tu(){const ge=le(),Qe=de();return Ke(),Li(Q(Qe),ge)}function Wf(){const ge=le(),Qe=de();return Qt(),Li(Q(Qe),ge)}function za(){return de()===27?!0:de()===20||de()===1||r.hasPrecedingLineBreak()}function Mc(){return za()?(de()===27&&Ke(),!0):!1}function Ul(){return Mc()||ki(27)}function wl(ge,Qe,yt,Zt){const _i=N(ge,Zt);return Bv(_i,Qe,yt??r.getTokenFullStart()),_i}function Li(ge,Qe,yt){return Bv(ge,Qe,yt??r.getTokenFullStart()),bn&&(ge.flags|=bn),Ai&&(Ai=!1,ge.flags|=262144),ge}function wu(ge,Qe,yt,...Zt){Qe?wi(r.getTokenFullStart(),0,yt,...Zt):yt&&Gt(yt,...Zt);const _i=le(),an=ge===80?U("",void 0):Ww(ge)?E.createTemplateLiteralLikeNode(ge,"","",void 0):ge===9?R("",void 0):ge===11?F("",void 0):ge===282?E.createMissingDeclaration():Q(ge);return Li(an,_i)}function zh(ge){let Qe=Ht.get(ge);return Qe===void 0&&Ht.set(ge,Qe=ge),Qe}function Uh(ge,Qe,yt){if(ge){Oi++;const Bs=r.hasLeadingAsterisks()?r.getTokenStart():le(),ws=de(),hs=zh(r.getTokenValue()),io=r.hasExtendedUnicodeEscape();return tt(),Li(U(hs,ws,io),Bs)}if(de()===81)return Gt(yt||k.Private_identifiers_are_not_allowed_outside_class_bodies),Uh(!0);if(de()===0&&r.tryScan(()=>r.reScanInvalidIdentifier()===80))return Uh(!0);Oi++;const Zt=de()===1,_i=r.isReservedWord(),an=r.getTokenText(),jr=_i?k.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:k.Identifier_expected;return wu(80,Zt,Qe||jr,an)}function z_(ge){return Uh($i(),void 0,ge)}function Rc(ge,Qe){return Uh(Tn(),ge,Qe)}function Qc(ge){return Uh(Rh(de()),ge)}function J(){return(r.hasUnicodeEscape()||r.hasExtendedUnicodeEscape())&&Gt(k.Unicode_escape_sequence_cannot_appear_here),Uh(Rh(de()))}function ct(){return Rh(de())||de()===11||de()===9}function Wt(){return Rh(de())||de()===11}function mi(ge){if(de()===11||de()===9){const Qe=ei();return Qe.text=zh(Qe.text),Qe}return de()===23?Zr():de()===81?Fi():Qc()}function mn(){return mi()}function Zr(){const ge=le();ki(23);const Qe=ji(ht);return ki(24),Li(E.createComputedPropertyName(Qe),ge)}function Fi(){const ge=le(),Qe=q(zh(r.getTokenValue()));return Ke(),Li(Qe,ge)}function br(ge){return de()===ge&&is(xs)}function Cs(){return Ke(),r.hasPrecedingLineBreak()?!1:$c()}function xs(){switch(de()){case 87:return Ke()===94;case 95:return Ke(),de()===90?Ar(Ud):de()===156?Ar(Xc):ql();case 90:return Ud();case 126:case 139:case 153:return Ke(),$c();default:return Cs()}}function ql(){return de()===60||de()!==42&&de()!==130&&de()!==19&&$c()}function Xc(){return Ke(),ql()}function Id(){return eS(de())&&is(xs)}function $c(){return de()===23||de()===19||de()===42||de()===26||ct()}function Ud(){return Ke(),de()===86||de()===100||de()===120||de()===60||de()===128&&Ar(PF)||de()===134&&Ar(Gh)}function Fc(ge,Qe){if(Ld(ge))return!0;switch(ge){case 0:case 1:case 3:return!(de()===27&&Qe)&&J_();case 2:return de()===84||de()===90;case 4:return Ar(Jn);case 5:return Ar(Pg)||de()===27&&!Qe;case 6:return de()===23||ct();case 12:switch(de()){case 23:case 42:case 26:case 25:return!0;default:return ct()}case 18:return ct();case 9:return de()===23||de()===26||ct();case 24:return Wt();case 7:return de()===19?Ar(qd):Qe?Tn()&&!wg():_A()&&!wg();case 8:return I2();case 10:return de()===28||de()===26||I2();case 19:return de()===103||de()===87||Tn();case 15:switch(de()){case 28:case 25:return!0}case 11:return de()===26||iv();case 16:return m0(!1);case 17:return m0(!0);case 20:case 21:return de()===28||lb();case 22:return TD();case 23:return de()===161&&Ar(GI)?!1:Rh(de());case 13:return Rh(de())||de()===19;case 14:return!0;case 25:return!0;case 26:return z.fail("ParsingContext.Count used as a context");default:z.assertNever(ge,"Non-exhaustive case in 'isListElement'.")}}function qd(){if(z.assert(de()===19),Ke()===20){const ge=Ke();return ge===28||ge===19||ge===96||ge===119}return!0}function qh(){return Ke(),Tn()}function Nd(){return Ke(),Rh(de())}function md(){return Ke(),DSe(de())}function wg(){return de()===119||de()===96?Ar(it):!1}function it(){return Ke(),iv()}function ai(){return Ke(),lb()}function Sn(ge){if(de()===1)return!0;switch(ge){case 1:case 2:case 4:case 5:case 6:case 12:case 9:case 23:case 24:return de()===20;case 3:return de()===20||de()===84||de()===90;case 7:return de()===19||de()===96||de()===119;case 8:return uo();case 19:return de()===32||de()===21||de()===19||de()===96||de()===119;case 11:return de()===22||de()===27;case 15:case 21:case 10:return de()===24;case 17:case 16:case 18:return de()===22||de()===24;case 20:return de()!==28;case 22:return de()===19||de()===20;case 13:return de()===32||de()===44;case 14:return de()===30&&Ar(bO);default:return!1}}function uo(){return!!(za()||y2(de())||de()===39)}function rl(){z.assert(Ji,"Missing parsing context");for(let ge=0;ge<26;ge++)if(Ji&1<=0)}function G1(ge){return ge===6?k.An_enum_member_name_must_be_followed_by_a_or:void 0}function rp(){const ge=wl([],le());return ge.isMissingList=!0,ge}function Xv(ge){return!!ge.isMissingList}function Tg(ge,Qe,yt,Zt){if(ki(yt)){const _i=vd(ge,Qe);return ki(Zt),_i}return rp()}function me(ge,Qe){const yt=le();let Zt=ge?Qc(Qe):Rc(Qe);for(;$s(25)&&de()!==30;)Zt=Li(E.createQualifiedName(Zt,di(ge,!1,!0)),yt);return Zt}function At(ge,Qe){return Li(E.createQualifiedName(ge,Qe),ge.pos)}function di(ge,Qe,yt){if(r.hasPrecedingLineBreak()&&Rh(de())&&Ar(k2))return wu(80,!0,k.Identifier_expected);if(de()===81){const Zt=Fi();return Qe?Zt:wu(80,!0,k.Identifier_expected)}return ge?yt?Qc():J():Rc()}function gi(ge){const Qe=le(),yt=[];let Zt;do Zt=Xe(ge),yt.push(Zt);while(Zt.literal.kind===17);return wl(yt,Qe)}function dn(ge){const Qe=le();return Li(E.createTemplateExpression(Dn(ge),gi(ge)),Qe)}function Vn(){const ge=le();return Li(E.createTemplateLiteralType(Dn(!1),Lr()),ge)}function Lr(){const ge=le(),Qe=[];let yt;do yt=ls(),Qe.push(yt);while(yt.literal.kind===17);return wl(Qe,ge)}function ls(){const ge=le();return Li(E.createTemplateLiteralTypeSpan(Pd(),ie(!1)),ge)}function ie(ge){return de()===20?(fn(ge),Ss()):qc(18,k._0_expected,Ta(20))}function Xe(ge){const Qe=le();return Li(E.createTemplateSpan(ji(ht),ie(ge)),Qe)}function ei(){return po(de())}function Dn(ge){!ge&&r.getTokenFlags()&26656&&fn(!1);const Qe=po(de());return z.assert(Qe.kind===16,"Template head has wrong token kind"),Qe}function Ss(){const ge=po(de());return z.assert(ge.kind===17||ge.kind===18,"Template fragment has wrong token kind"),ge}function Vo(ge){const Qe=ge===15||ge===18,yt=r.getTokenText();return yt.substring(1,yt.length-(r.isUnterminated()?0:Qe?1:2))}function po(ge){const Qe=le(),yt=Ww(ge)?E.createTemplateLiteralLikeNode(ge,r.getTokenValue(),Vo(ge),r.getTokenFlags()&7176):ge===9?R(r.getTokenValue(),r.getNumericLiteralFlags()):ge===11?F(r.getTokenValue(),void 0,r.hasExtendedUnicodeEscape()):a8(ge)?j(ge,r.getTokenValue()):z.fail();return r.hasExtendedUnicodeEscape()&&(yt.hasExtendedUnicodeEscape=!0),r.isUnterminated()&&(yt.isUnterminated=!0),Ke(),Li(yt,Qe)}function $o(){return me(!0,k.Type_expected)}function Dl(){if(!r.hasPrecedingLineBreak()&&kn()===30)return Tg(20,Pd,30,32)}function Ga(){const ge=le();return Li(E.createTypeReferenceNode($o(),Dl()),ge)}function hu(ge){switch(ge.kind){case 183:return vu(ge.typeName);case 184:case 185:{const{parameters:Qe,type:yt}=ge;return Xv(Qe)||hu(yt)}case 196:return hu(ge.type);default:return!1}}function rm(ge){return Ke(),Li(E.createTypePredicateNode(void 0,ge,Pd()),ge.pos)}function g0(){const ge=le();return Ke(),Li(E.createThisTypeNode(),ge)}function K1(){const ge=le();return Ke(),Li(E.createJSDocAllType(),ge)}function ob(){const ge=le();return Ke(),Li(E.createJSDocNonNullableType(gD(),!1),ge)}function DS(){const ge=le();return Ke(),de()===28||de()===20||de()===22||de()===32||de()===64||de()===52?Li(E.createJSDocUnknownType(),ge):Li(E.createJSDocNullableType(Pd(),!1),ge)}function ab(){const ge=le(),Qe=je();if(is(wA)){const yt=Eg(36),Zt=Vm(59,!1);return Cn(Li(E.createJSDocFunctionType(yt,Zt),ge),Qe)}return Li(E.createTypeReferenceNode(Qc(),void 0),ge)}function sm(){const ge=le();let Qe;return(de()===110||de()===105)&&(Qe=Qc(),ki(59)),Li(E.createParameterDeclaration(void 0,void 0,Qe,void 0,Dg(),void 0),ge)}function Dg(){r.setSkipJsDocLeadingAsterisks(!0);const ge=le();if($s(144)){const Zt=E.createJSDocNamepathType(void 0);e:for(;;)switch(de()){case 20:case 1:case 28:case 5:break e;default:Qt()}return r.setSkipJsDocLeadingAsterisks(!1),Li(Zt,ge)}const Qe=$s(26);let yt=PS();return r.setSkipJsDocLeadingAsterisks(!1),Qe&&(yt=Li(E.createJSDocVariadicType(yt),ge)),de()===64?(Ke(),Li(E.createJSDocOptionalType(yt),ge)):yt}function Zl(){const ge=le();ki(114);const Qe=me(!0),yt=r.hasPrecedingLineBreak()?void 0:pC();return Li(E.createTypeQueryNode(Qe,yt),ge)}function nh(){const ge=le(),Qe=bi(!1,!0),yt=Rc();let Zt,_i;$s(96)&&(lb()||!iv()?Zt=Pd():_i=RS());const an=$s(64)?Pd():void 0,jr=E.createTypeParameterDeclaration(Qe,yt,Zt,an);return jr.expression=_i,Li(jr,ge)}function $h(){if(de()===30)return Tg(19,nh,30,32)}function m0(ge){return de()===26||I2()||eS(de())||de()===60||lb(!ge)}function ES(ge){const Qe=vx(k.Private_identifiers_cannot_be_used_as_parameters);return GB(Qe)===0&&!Rt(ge)&&eS(de())&&Ke(),Qe}function nC(){return $i()||de()===23||de()===19}function hx(ge){return _x(ge)}function Wm(ge){return _x(ge,!1)}function _x(ge,Qe=!0){const yt=le(),Zt=je(),_i=ge?Re(()=>bi(!0)):mt(()=>bi(!0));if(de()===110){const ws=E.createParameterDeclaration(_i,void 0,Uh(!0),void 0,AS(),void 0),hs=lu(_i);return hs&&ut(hs,k.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters),Cn(Li(ws,yt),Zt)}const an=Mi;Mi=!1;const jr=Ps(26);if(!Qe&&!nC())return;const Bs=Cn(Li(E.createParameterDeclaration(_i,jr,ES(_i),Ps(58),AS(),v0()),yt),Zt);return Mi=an,Bs}function Vm(ge,Qe){if(u2(ge,Qe))return St(PS)}function u2(ge,Qe){return ge===39?(ki(ge),!0):$s(59)?!0:Qe&&de()===39?(Gt(k._0_expected,Ta(59)),Ke(),!0):!1}function tv(ge,Qe){const yt=Ci(),Zt=ii();as(!!(ge&1)),Ds(!!(ge&2));const _i=ge&32?vd(17,sm):vd(16,()=>Qe?hx(Zt):Wm(Zt));return as(yt),Ds(Zt),_i}function Eg(ge){if(!ki(21))return rp();const Qe=tv(ge,!0);return ki(22),Qe}function rC(){$s(28)||Ul()}function rt(ge){const Qe=le(),yt=je();ge===180&&ki(105);const Zt=$h(),_i=Eg(4),an=Vm(59,!0);rC();const jr=ge===179?E.createCallSignature(Zt,_i,an):E.createConstructSignature(Zt,_i,an);return Cn(Li(jr,Qe),yt)}function bt(){return de()===23&&Ar(si)}function si(){if(Ke(),de()===26||de()===24)return!0;if(eS(de())){if(Ke(),Tn())return!0}else if(Tn())Ke();else return!1;return de()===59||de()===28?!0:de()!==58?!1:(Ke(),de()===59||de()===28||de()===24)}function Ti(ge,Qe,yt){const Zt=Tg(16,()=>hx(!1),23,24),_i=AS();rC();const an=E.createIndexSignature(yt,Zt,_i);return Cn(Li(an,ge),Qe)}function Ki(ge,Qe,yt){const Zt=mn(),_i=Ps(58);let an;if(de()===21||de()===30){const jr=$h(),Bs=Eg(4),ws=Vm(59,!0);an=E.createMethodSignature(yt,Zt,_i,jr,Bs,ws)}else{const jr=AS();an=E.createPropertySignature(yt,Zt,_i,jr),de()===64&&(an.initializer=v0())}return rC(),Cn(Li(an,ge),Qe)}function Jn(){if(de()===21||de()===30||de()===139||de()===153)return!0;let ge=!1;for(;eS(de());)ge=!0,Ke();return de()===23?!0:(ct()&&(ge=!0,Ke()),ge?de()===21||de()===30||de()===58||de()===59||de()===28||za():!1)}function sn(){if(de()===21||de()===30)return rt(179);if(de()===105&&Ar(ar))return rt(180);const ge=le(),Qe=je(),yt=bi(!1);return br(139)?VS(ge,Qe,yt,177,4):br(153)?VS(ge,Qe,yt,178,4):bt()?Ti(ge,Qe,yt):Ki(ge,Qe,yt)}function ar(){return Ke(),de()===21||de()===30}function ks(){return Ke()===25}function nr(){switch(Ke()){case 21:case 30:case 25:return!0}return!1}function ps(){const ge=le();return Li(E.createTypeLiteralNode(Hn()),ge)}function Hn(){let ge;return ki(19)?(ge=hl(4,sn),ki(20)):ge=rp(),ge}function Do(){return Ke(),de()===40||de()===41?Ke()===148:(de()===148&&Ke(),de()===23&&qh()&&Ke()===103)}function Wa(){const ge=le(),Qe=Qc();ki(103);const yt=Pd();return Li(E.createTypeParameterDeclaration(void 0,Qe,yt,void 0),ge)}function nf(){const ge=le();ki(19);let Qe;(de()===148||de()===40||de()===41)&&(Qe=Tu(),Qe.kind!==148&&ki(148)),ki(23);const yt=Wa(),Zt=$s(130)?Pd():void 0;ki(24);let _i;(de()===58||de()===40||de()===41)&&(_i=Tu(),_i.kind!==58&&ki(58));const an=AS();Ul();const jr=hl(4,sn);return ki(20),Li(E.createMappedTypeNode(Qe,yt,Zt,_i,an,jr),ge)}function xh(){const ge=le();if($s(26))return Li(E.createRestTypeNode(Pd()),ge);const Qe=Pd();if(l3(Qe)&&Qe.pos===Qe.type.pos){const yt=E.createOptionalTypeNode(Qe.type);return zt(yt,Qe),yt.flags=Qe.flags,yt}return Qe}function Hm(){return Ke()===59||de()===58&&Ke()===59}function IS(){return de()===26?Rh(Ke())&&Hm():Rh(de())&&Hm()}function jm(){if(Ar(IS)){const ge=le(),Qe=je(),yt=Ps(26),Zt=Qc(),_i=Ps(58);ki(59);const an=xh(),jr=E.createNamedTupleMember(yt,Zt,_i,an);return Cn(Li(jr,ge),Qe)}return xh()}function cA(){const ge=le();return Li(E.createTupleTypeNode(Tg(21,jm,23,24)),ge)}function iO(){const ge=le();ki(21);const Qe=Pd();return ki(22),Li(E.createParenthesizedType(Qe),ge)}function uA(){let ge;if(de()===128){const Qe=le();Ke();const yt=Li(Q(128),Qe);ge=wl([yt],Qe)}return ge}function pD(){const ge=le(),Qe=je(),yt=uA(),Zt=$s(105);z.assert(!yt||Zt,"Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers.");const _i=$h(),an=Eg(4),jr=Vm(39,!1),Bs=Zt?E.createConstructorTypeNode(yt,_i,an,jr):E.createFunctionTypeNode(_i,an,jr);return Cn(Li(Bs,ge),Qe)}function d2(){const ge=Tu();return de()===25?void 0:ge}function f2(ge){const Qe=le();ge&&Ke();let yt=de()===112||de()===97||de()===106?Tu():po(de());return ge&&(yt=Li(E.createPrefixUnaryExpression(41,yt),Qe)),Li(E.createLiteralTypeNode(yt),Qe)}function h2(){return Ke(),de()===102}function RI(){We|=4194304;const ge=le(),Qe=$s(114);ki(102),ki(21);const yt=Pd();let Zt;if($s(28)){const jr=r.getTokenStart();ki(19);const Bs=de();if(Bs===118||Bs===132?Ke():Gt(k._0_expected,Ta(118)),ki(59),Zt=RF(Bs,!0),!ki(20)){const ws=Ql(ze);ws&&ws.code===k._0_expected.code&&fa(ws,oP(He,Ue,jr,1,k.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}}ki(22);const _i=$s(25)?$o():void 0,an=Dl();return Li(E.createImportTypeNode(yt,Zt,_i,an,Qe),ge)}function NS(){return Ke(),de()===9||de()===10}function gD(){switch(de()){case 133:case 159:case 154:case 150:case 163:case 155:case 136:case 157:case 146:case 151:return is(d2)||Ga();case 67:r.reScanAsteriskEqualsToken();case 42:return K1();case 61:r.reScanQuestionToken();case 58:return DS();case 100:return ab();case 54:return ob();case 15:case 11:case 9:case 10:case 112:case 97:case 106:return f2();case 41:return Ar(NS)?f2(!0):Ga();case 116:return Tu();case 110:{const ge=g0();return de()===142&&!r.hasPrecedingLineBreak()?rm(ge):ge}case 114:return Ar(h2)?RI():Zl();case 19:return Ar(Do)?nf():ps();case 23:return cA();case 21:return iO();case 102:return RI();case 131:return Ar(k2)?hA():Ga();case 16:return Vn();default:return Ga()}}function lb(ge){switch(de()){case 133:case 159:case 154:case 150:case 163:case 136:case 148:case 155:case 158:case 116:case 157:case 106:case 110:case 114:case 146:case 19:case 23:case 30:case 52:case 51:case 105:case 11:case 9:case 10:case 112:case 97:case 151:case 42:case 58:case 54:case 26:case 140:case 102:case 131:case 15:case 16:return!0;case 100:return!ge;case 41:return!ge&&Ar(NS);case 21:return!ge&&Ar(mD);default:return Tn()}}function mD(){return Ke(),de()===22||m0(!1)||lb()}function vl(){const ge=le();let Qe=gD();for(;!r.hasPrecedingLineBreak();)switch(de()){case 54:Ke(),Qe=Li(E.createJSDocNonNullableType(Qe,!0),ge);break;case 58:if(Ar(ai))return Qe;Ke(),Qe=Li(E.createJSDocNullableType(Qe,!0),ge);break;case 23:if(ki(23),lb()){const yt=Pd();ki(24),Qe=Li(E.createIndexedAccessTypeNode(Qe,yt),ge)}else ki(24),Qe=Li(E.createArrayTypeNode(Qe),ge);break;default:return Qe}return Qe}function FI(ge){const Qe=le();return ki(ge),Li(E.createTypeOperatorNode(ge,Zv()),Qe)}function BI(){if($s(96)){const ge=Ot(Pd);if(qt()||de()!==58)return ge}}function _2(){const ge=le(),Qe=Rc(),yt=is(BI),Zt=E.createTypeParameterDeclaration(void 0,Qe,yt);return Li(Zt,ge)}function sC(){const ge=le();return ki(140),Li(E.createInferTypeNode(_2()),ge)}function Zv(){const ge=de();switch(ge){case 143:case 158:case 148:return FI(ge);case 140:return sC()}return St(vl)}function om(ge){if(dA()){const Qe=pD();let yt;return W1(Qe)?yt=ge?k.Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:k.Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:yt=ge?k.Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:k.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type,ut(Qe,yt),Qe}}function $_(ge,Qe,yt){const Zt=le(),_i=ge===52,an=$s(ge);let jr=an&&om(_i)||Qe();if(de()===ge||an){const Bs=[jr];for(;$s(ge);)Bs.push(om(_i)||Qe());jr=Li(yt(wl(Bs,Zt)),Zt)}return jr}function Mp(){return $_(51,Zv,E.createIntersectionTypeNode)}function sp(){return $_(52,Mp,E.createUnionTypeNode)}function LS(){return Ke(),de()===105}function dA(){return de()===30||de()===21&&Ar(p2)?!0:de()===105||de()===128&&Ar(LS)}function fA(){if(eS(de())&&bi(!1),Tn()||de()===110)return Ke(),!0;if(de()===23||de()===19){const ge=ze.length;return vx(),ge===ze.length}return!1}function p2(){return Ke(),!!(de()===22||de()===26||fA()&&(de()===59||de()===28||de()===58||de()===64||de()===22&&(Ke(),de()===39)))}function PS(){const ge=le(),Qe=Tn()&&is(g2),yt=Pd();return Qe?Li(E.createTypePredicateNode(void 0,Qe,yt),ge):yt}function g2(){const ge=Rc();if(de()===142&&!r.hasPrecedingLineBreak())return Ke(),ge}function hA(){const ge=le(),Qe=qc(131),yt=de()===110?g0():Rc(),Zt=$s(142)?Pd():void 0;return Li(E.createTypePredicateNode(Qe,yt,Zt),ge)}function Pd(){if(bn&81920)return ha(81920,Pd);if(dA())return pD();const ge=le(),Qe=sp();if(!qt()&&!r.hasPrecedingLineBreak()&&$s(96)){const yt=Ot(Pd);ki(58);const Zt=St(Pd);ki(59);const _i=St(Pd);return Li(E.createConditionalTypeNode(Qe,yt,Zt,_i),ge)}return Qe}function AS(){return $s(59)?Pd():void 0}function _A(){switch(de()){case 110:case 108:case 106:case 112:case 97:case 9:case 10:case 11:case 15:case 16:case 21:case 23:case 19:case 100:case 86:case 105:case 44:case 69:case 80:return!0;case 102:return Ar(nr);default:return Tn()}}function iv(){if(_A())return!0;switch(de()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 46:case 47:case 30:case 135:case 127:case 81:case 60:return!0;default:return Xp()?!0:Tn()}}function WI(){return de()!==19&&de()!==100&&de()!==86&&de()!==60&&iv()}function ht(){const ge=$t();ge&&fs(!1);const Qe=le();let yt=rf(!0),Zt;for(;Zt=Ps(28);)yt=MS(yt,Zt,rf(!0),Qe);return ge&&fs(!0),yt}function v0(){return $s(64)?rf(!0):void 0}function rf(ge){if(m2())return am();const Qe=oC(ge)||vD(ge);if(Qe)return Qe;const yt=le(),Zt=je(),_i=lC(0);return _i.kind===80&&de()===39?Yv(yt,_i,ge,Zt,void 0):M_(_i)&&jb(fi())?MS(_i,Tu(),rf(ge),yt):aC(_i,yt,ge)}function m2(){return de()===127?Ci()?!0:Ar($I):!1}function Q1(){return Ke(),!r.hasPrecedingLineBreak()&&Tn()}function am(){const ge=le();return Ke(),!r.hasPrecedingLineBreak()&&(de()===42||iv())?Li(E.createYieldExpression(Ps(42),rf(!0)),ge):Li(E.createYieldExpression(void 0,void 0),ge)}function Yv(ge,Qe,yt,Zt,_i){z.assert(de()===39,"parseSimpleArrowFunctionExpression should only have been called if we had a =>");const an=E.createParameterDeclaration(void 0,void 0,Qe,void 0,void 0,void 0);Li(an,Qe.pos);const jr=wl([an],an.pos,an.end),Bs=qc(39),ws=v2(!!_i,yt),hs=E.createArrowFunction(_i,void 0,jr,void 0,Bs,ws);return Cn(Li(hs,ge),Zt)}function oC(ge){const Qe=NF();if(Qe!==0)return Qe===1?HI(!0,!0):is(()=>y0(ge))}function NF(){return de()===21||de()===30||de()===134?Ar(sl):de()===39?1:0}function sl(){if(de()===134&&(Ke(),r.hasPrecedingLineBreak()||de()!==21&&de()!==30))return 0;const ge=de(),Qe=Ke();if(ge===21){if(Qe===22)switch(Ke()){case 39:case 59:case 19:return 1;default:return 0}if(Qe===23||Qe===19)return 2;if(Qe===26)return 1;if(eS(Qe)&&Qe!==134&&Ar(qh))return Ke()===130?0:1;if(!Tn()&&Qe!==110)return 0;switch(Ke()){case 59:return 1;case 58:return Ke(),de()===59||de()===28||de()===64||de()===22?1:0;case 28:case 64:case 22:return 2}return 0}else return z.assert(ge===30),!Tn()&&de()!==87?0:nt===1?Ar(()=>{$s(87);const Zt=Ke();if(Zt===96)switch(Ke()){case 64:case 32:case 44:return!1;default:return!0}else if(Zt===28||Zt===64)return!0;return!1})?1:0:2}function y0(ge){const Qe=r.getTokenStart();if(Ui!=null&&Ui.has(Qe))return;const yt=HI(!1,ge);return yt||(Ui||(Ui=new Set)).add(Qe),yt}function vD(ge){if(de()===134&&Ar(VI)===1){const Qe=le(),yt=je(),Zt=cs(),_i=lC(0);return Yv(Qe,_i,ge,yt,Zt)}}function VI(){if(de()===134){if(Ke(),r.hasPrecedingLineBreak()||de()===39)return 0;const ge=lC(0);if(!r.hasPrecedingLineBreak()&&ge.kind===80&&de()===39)return 1}return 0}function HI(ge,Qe){const yt=le(),Zt=je(),_i=cs(),an=Rt(_i,d7)?2:0,jr=$h();let Bs;if(ki(21)){if(ge)Bs=tv(an,ge);else{const vC=tv(an,ge);if(!vC)return;Bs=vC}if(!ki(22)&&!ge)return}else{if(!ge)return;Bs=rp()}const ws=de()===59,hs=Vm(59,!1);if(hs&&!ge&&hu(hs))return;let io=hs;for(;(io==null?void 0:io.kind)===196;)io=io.type;const ic=io&&c3(io);if(!ge&&de()!==39&&(ic||de()!==19))return;const va=de(),Ka=qc(39),Ag=va===39||va===19?v2(Rt(_i,d7),Qe):Rc();if(!Qe&&ws&&de()!==59)return;const sv=E.createArrowFunction(_i,jr,Bs,hs,Ka,Ag);return Cn(Li(sv,yt),Zt)}function v2(ge,Qe){if(de()===19)return WS(ge?2:0);if(de()!==27&&de()!==100&&de()!==86&&J_()&&!WI())return WS(16|(ge?2:0));const yt=Mi;Mi=!1;const Zt=ge?Re(()=>rf(Qe)):mt(()=>rf(Qe));return Mi=yt,Zt}function aC(ge,Qe,yt){const Zt=Ps(58);if(!Zt)return ge;let _i;return Li(E.createConditionalExpression(ge,Zt,ha(a,()=>rf(!1)),_i=qc(59),Tm(_i)?rf(yt):wu(80,!1,k._0_expected,Ta(59))),Qe)}function lC(ge){const Qe=le(),yt=RS();return Ig(ge,yt,Qe)}function y2(ge){return ge===103||ge===165}function Ig(ge,Qe,yt){for(;;){fi();const Zt=OW(de());if(!(de()===43?Zt>=ge:Zt>ge)||de()===103&&$e())break;if(de()===130||de()===152){if(r.hasPrecedingLineBreak())break;{const an=de();Ke(),Qe=an===152?OS(Qe,Pd()):Zs(Qe,Pd())}}else Qe=MS(Qe,Tu(),lC(Zt),yt)}return Qe}function Xp(){return $e()&&de()===103?!1:OW(de())>0}function OS(ge,Qe){return Li(E.createSatisfiesExpression(ge,Qe),ge.pos)}function MS(ge,Qe,yt,Zt){return Li(E.createBinaryExpression(ge,Qe,yt),Zt)}function Zs(ge,Qe){return Li(E.createAsExpression(ge,Qe),ge.pos)}function Tr(){const ge=le();return Li(E.createPrefixUnaryExpression(de(),Ae(cC)),ge)}function rh(){const ge=le();return Li(E.createDeleteExpression(Ae(cC)),ge)}function nO(){const ge=le();return Li(E.createTypeOfExpression(Ae(cC)),ge)}function b0(){const ge=le();return Li(E.createVoidExpression(Ae(cC)),ge)}function pA(){return de()===135?ii()?!0:Ar($I):!1}function X1(){const ge=le();return Li(E.createAwaitExpression(Ae(cC)),ge)}function RS(){if(rO()){const yt=le(),Zt=b2();return de()===43?Ig(OW(de()),Zt,yt):Zt}const ge=de(),Qe=cC();if(de()===43){const yt=qa(Ue,Qe.pos),{end:Zt}=Qe;Qe.kind===216?ce(yt,Zt,k.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses):(z.assert(DJ(ge)),ce(yt,Zt,k.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses,Ta(ge)))}return Qe}function cC(){switch(de()){case 40:case 41:case 55:case 54:return Tr();case 91:return rh();case 114:return nO();case 116:return b0();case 30:return nt===1?cb(!0,void 0,void 0,!0):vA();case 135:if(pA())return X1();default:return b2()}}function rO(){switch(de()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 135:return!1;case 30:if(nt!==1)return!1;default:return!0}}function b2(){if(de()===46||de()===47){const Qe=le();return Li(E.createPrefixUnaryExpression(de(),Ae(Zp)),Qe)}else if(nt===1&&de()===30&&Ar(md))return cb(!0);const ge=Zp();if(z.assert(M_(ge)),(de()===46||de()===47)&&!r.hasPrecedingLineBreak()){const Qe=de();return Ke(),Li(E.createPostfixUnaryExpression(ge,Qe),ge.pos)}return ge}function Zp(){const ge=le();let Qe;return de()===102?Ar(ar)?(We|=4194304,Qe=Tu()):Ar(ks)?(Ke(),Ke(),Qe=Li(E.createMetaProperty(102,Qc()),ge),We|=8388608):Qe=yD():Qe=de()===108?mc():yD(),lm(ge,Qe)}function yD(){const ge=le(),Qe=UI();return e1(ge,Qe,!0)}function mc(){const ge=le();let Qe=Tu();if(de()===30){const yt=le(),Zt=is(C2);Zt!==void 0&&(ce(yt,le(),k.super_may_not_use_type_arguments),Fp()||(Qe=E.createExpressionWithTypeArguments(Qe,Zt)))}return de()===21||de()===25||de()===23?Qe:(qc(25,k.super_must_be_followed_by_an_argument_list_or_member_access),Li(ue(Qe,di(!0,!0,!0)),ge))}function cb(ge,Qe,yt,Zt=!1){const _i=le(),an=LF(ge);let jr;if(an.kind===286){let Bs=bD(an),ws;const hs=Bs[Bs.length-1];if((hs==null?void 0:hs.kind)===284&&!Qk(hs.openingElement.tagName,hs.closingElement.tagName)&&Qk(an.tagName,hs.closingElement.tagName)){const io=hs.children.end,ic=Li(E.createJsxElement(hs.openingElement,hs.children,Li(E.createJsxClosingElement(Li(U(""),io,io)),io,io)),hs.openingElement.pos,io);Bs=wl([...Bs.slice(0,Bs.length-1),ic],Bs.pos,io),ws=hs.closingElement}else ws=Zn(an,ge),Qk(an.tagName,ws.tagName)||(yt&&Uv(yt)&&Qk(ws.tagName,yt.tagName)?ut(an.tagName,k.JSX_element_0_has_no_corresponding_closing_tag,g8(Ue,an.tagName)):ut(ws.tagName,k.Expected_corresponding_JSX_closing_tag_for_0,g8(Ue,an.tagName)));jr=Li(E.createJsxElement(an,Bs,ws),_i)}else an.kind===289?jr=Li(E.createJsxFragment(an,bD(an),mA(ge)),_i):(z.assert(an.kind===285),jr=an);if(!Zt&&ge&&de()===30){const Bs=typeof Qe>"u"?jr.pos:Qe,ws=is(()=>cb(!0,Bs));if(ws){const hs=wu(28,!1);return cae(hs,ws.pos,0),ce(qa(Ue,Bs),ws.end,k.JSX_expressions_must_have_one_parent_element),Li(E.createBinaryExpression(jr,hs,ws),_i)}}return jr}function sO(){const ge=le(),Qe=E.createJsxText(r.getTokenValue(),Et===13);return Et=r.scanJsxToken(),Li(Qe,ge)}function jI(ge,Qe){switch(Qe){case 1:if(yI(ge))ut(ge,k.JSX_fragment_has_no_corresponding_closing_tag);else{const yt=ge.tagName,Zt=Math.min(qa(Ue,yt.pos),yt.end);ce(Zt,yt.end,k.JSX_element_0_has_no_corresponding_closing_tag,g8(Ue,ge.tagName))}return;case 31:case 7:return;case 12:case 13:return sO();case 19:return kh(!1);case 30:return cb(!1,void 0,ge);default:return z.assertNever(Qe)}}function bD(ge){const Qe=[],yt=le(),Zt=Ji;for(Ji|=16384;;){const _i=jI(ge,Et=r.reScanJsxToken());if(!_i||(Qe.push(_i),Uv(ge)&&(_i==null?void 0:_i.kind)===284&&!Qk(_i.openingElement.tagName,_i.closingElement.tagName)&&Qk(ge.tagName,_i.closingElement.tagName)))break}return Ji=Zt,wl(Qe,yt)}function gA(){const ge=le();return Li(E.createJsxAttributes(hl(13,Ao)),ge)}function LF(ge){const Qe=le();if(ki(30),de()===32)return _r(),Li(E.createJsxOpeningFragment(),Qe);const yt=oO(),Zt=bn&524288?void 0:pC(),_i=gA();let an;return de()===32?(_r(),an=E.createJsxOpeningElement(yt,Zt,_i)):(ki(44),ki(32,void 0,!1)&&(ge?Ke():_r()),an=E.createJsxSelfClosingElement(yt,Zt,_i)),Li(an,Qe)}function oO(){const ge=le(),Qe=vr();if(J0(Qe))return Qe;let yt=Qe;for(;$s(25);)yt=Li(ue(yt,di(!0,!1,!1)),ge);return yt}function vr(){const ge=le();rn();const Qe=de()===110,yt=J();return $s(59)?(rn(),Li(E.createJsxNamespacedName(yt,J()),ge)):Qe?Li(E.createToken(110),ge):yt}function kh(ge){const Qe=le();if(!ki(19))return;let yt,Zt;return de()!==20&&(ge||(yt=Ps(26)),Zt=ht()),ge?ki(20):ki(20,void 0,!1)&&_r(),Li(E.createJsxExpression(yt,Zt),Qe)}function Ao(){if(de()===19)return Rp();const ge=le();return Li(E.createJsxAttribute(zI(),uC()),ge)}function uC(){if(de()===64){if(Fs()===11)return ei();if(de()===19)return kh(!0);if(de()===30)return cb(!0);Gt(k.or_JSX_element_expected)}}function zI(){const ge=le();rn();const Qe=J();return $s(59)?(rn(),Li(E.createJsxNamespacedName(Qe,J()),ge)):Qe}function Rp(){const ge=le();ki(19),ki(26);const Qe=ht();return ki(20),Li(E.createJsxSpreadAttribute(Qe),ge)}function Zn(ge,Qe){const yt=le();ki(31);const Zt=oO();return ki(32,void 0,!1)&&(Qe||!Qk(ge.tagName,Zt)?Ke():_r()),Li(E.createJsxClosingElement(Zt),yt)}function mA(ge){const Qe=le();return ki(31),ki(32,k.Expected_corresponding_closing_tag_for_JSX_fragment,!1)&&(ge?Ke():_r()),Li(E.createJsxJsxClosingFragment(),Qe)}function vA(){z.assert(nt!==1,"Type assertions should never be parsed in JSX; they should be parsed as comparisons or JSX elements/fragments.");const ge=le();ki(30);const Qe=Pd();ki(32);const yt=cC();return Li(E.createTypeAssertion(Qe,yt),ge)}function Jh(){return Ke(),Rh(de())||de()===23||Fp()}function C0(){return de()===29&&Ar(Jh)}function zm(ge){if(ge.flags&64)return!0;if(NP(ge)){let Qe=ge.expression;for(;NP(Qe)&&!(Qe.flags&64);)Qe=Qe.expression;if(Qe.flags&64){for(;NP(ge);)ge.flags|=64,ge=ge.expression;return!0}}return!1}function FS(ge,Qe,yt){const Zt=di(!0,!0,!0),_i=yt||zm(Qe),an=_i?te(Qe,yt,Zt):ue(Qe,Zt);if(_i&&Vs(an.name)&&ut(an.name,k.An_optional_chain_cannot_contain_private_identifiers),Gb(Qe)&&Qe.typeArguments){const jr=Qe.typeArguments.pos-1,Bs=qa(Ue,Qe.typeArguments.end)+1;ce(jr,Bs,k.An_instantiation_expression_cannot_be_followed_by_a_property_access)}return Li(an,ge)}function CD(ge,Qe,yt){let Zt;if(de()===24)Zt=wu(80,!0,k.An_element_access_expression_should_take_an_argument);else{const an=ji(ht);ug(an)&&(an.text=zh(an.text)),Zt=an}ki(24);const _i=yt||zm(Qe)?oe(Qe,yt,Zt):Se(Qe,Zt);return Li(_i,ge)}function e1(ge,Qe,yt){for(;;){let Zt,_i=!1;if(yt&&C0()?(Zt=qc(29),_i=Rh(de())):_i=$s(25),_i){Qe=FS(ge,Qe,Zt);continue}if((Zt||!$t())&&$s(23)){Qe=CD(ge,Qe,Zt);continue}if(Fp()){Qe=!Zt&&Qe.kind===233?t1(ge,Qe.expression,Zt,Qe.typeArguments):t1(ge,Qe,Zt,void 0);continue}if(!Zt){if(de()===54&&!r.hasPrecedingLineBreak()){Ke(),Qe=Li(E.createNonNullExpression(Qe),ge);continue}const an=is(C2);if(an){Qe=Li(E.createExpressionWithTypeArguments(Qe,an),ge);continue}}return Qe}}function Fp(){return de()===15||de()===16}function t1(ge,Qe,yt,Zt){const _i=E.createTaggedTemplateExpression(Qe,Zt,de()===15?(fn(!0),ei()):dn(!0));return(yt||Qe.flags&64)&&(_i.flags|=64),_i.questionDotToken=yt,Li(_i,ge)}function lm(ge,Qe){for(;;){Qe=e1(ge,Qe,!0);let yt;const Zt=Ps(29);if(Zt&&(yt=is(C2),Fp())){Qe=t1(ge,Qe,Zt,yt);continue}if(yt||de()===21){!Zt&&Qe.kind===233&&(yt=Qe.typeArguments,Qe=Qe.expression);const _i=ub(),an=Zt||zm(Qe)?ye(Qe,Zt,yt,_i):pe(Qe,yt,_i);Qe=Li(an,ge);continue}if(Zt){const _i=wu(80,!1,k.Identifier_expected);Qe=Li(te(Qe,Zt,_i),ge)}break}return Qe}function ub(){ki(21);const ge=vd(11,S2);return ki(22),ge}function C2(){if(bn&524288||kn()!==30)return;Ke();const ge=vd(20,Pd);if(fi()===32)return Ke(),ge&&yA()?ge:void 0}function yA(){switch(de()){case 21:case 15:case 16:return!0;case 30:case 32:case 40:case 41:return!1}return r.hasPrecedingLineBreak()||Xp()||!iv()}function UI(){switch(de()){case 15:r.getTokenFlags()&26656&&fn(!1);case 9:case 10:case 11:return ei();case 110:case 108:case 106:case 112:case 97:return Tu();case 21:return SD();case 23:return S0();case 19:return w2();case 134:if(!Ar(Gh))break;return px();case 60:return so();case 86:return Co();case 100:return px();case 105:return BS();case 44:case 69:if(Gi()===14)return ei();break;case 16:return dn(!1);case 81:return Fi()}return Rc(k.Expression_expected)}function SD(){const ge=le(),Qe=je();ki(21);const yt=ji(ht);return ki(22),Cn(Li(_e(yt),ge),Qe)}function aO(){const ge=le();ki(26);const Qe=rf(!0);return Li(E.createSpreadElement(Qe),ge)}function qI(){return de()===26?aO():de()===28?Li(E.createOmittedExpression(),le()):rf(!0)}function S2(){return ha(a,qI)}function S0(){const ge=le(),Qe=r.getTokenStart(),yt=ki(23),Zt=r.hasPrecedingLineBreak(),_i=vd(15,qI);return Ic(23,24,yt,Qe),Li(re(_i,Zt),ge)}function lO(){const ge=le(),Qe=je();if(Ps(26)){const io=rf(!0);return Cn(Li(E.createSpreadAssignment(io),ge),Qe)}const yt=bi(!0);if(br(139))return VS(ge,Qe,yt,177,0);if(br(153))return VS(ge,Qe,yt,178,0);const Zt=Ps(42),_i=Tn(),an=mn(),jr=Ps(58),Bs=Ps(54);if(Zt||de()===21||de()===30)return cd(ge,Qe,yt,Zt,an,jr,Bs);let ws;if(_i&&de()!==59){const io=Ps(64),ic=io?ji(()=>rf(!0)):void 0;ws=E.createShorthandPropertyAssignment(an,ic),ws.equalsToken=io}else{ki(59);const io=ji(()=>rf(!0));ws=E.createPropertyAssignment(an,io)}return ws.modifiers=yt,ws.questionToken=jr,ws.exclamationToken=Bs,Cn(Li(ws,ge),Qe)}function w2(){const ge=le(),Qe=r.getTokenStart(),yt=ki(19),Zt=r.hasPrecedingLineBreak(),_i=vd(12,lO,!0);return Ic(19,20,yt,Qe),Li(Y(_i,Zt),ge)}function px(){const ge=$t();fs(!1);const Qe=le(),yt=je(),Zt=bi(!1);ki(100);const _i=Ps(42),an=_i?1:0,jr=Rt(Zt,d7)?2:0,Bs=an&&jr?Je(dC):an?xe(dC):jr?Re(dC):dC(),ws=$h(),hs=Eg(an|jr),io=Vm(59,!1),ic=WS(an|jr);fs(ge);const va=E.createFunctionExpression(Zt,_i,Bs,ws,hs,io,ic);return Cn(Li(va,Qe),yt)}function dC(){return $i()?z_():void 0}function BS(){const ge=le();if(ki(105),$s(25)){const an=Qc();return Li(E.createMetaProperty(105,an),ge)}const Qe=le();let yt=e1(Qe,UI(),!1),Zt;yt.kind===233&&(Zt=yt.typeArguments,yt=yt.expression),de()===29&&Gt(k.Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0,g8(Ue,yt));const _i=de()===21?ub():void 0;return Li(be(yt,Zt,_i),ge)}function Um(ge,Qe){const yt=le(),Zt=je(),_i=r.getTokenStart(),an=ki(19,Qe);if(an||ge){const jr=r.hasPrecedingLineBreak(),Bs=hl(1,Ng);Ic(19,20,an,_i);const ws=Cn(Li(ve(Bs,jr),yt),Zt);return de()===64&&(Gt(k.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses),Ke()),ws}else{const jr=rp();return Cn(Li(ve(jr,void 0),yt),Zt)}}function WS(ge,Qe){const yt=Ci();as(!!(ge&1));const Zt=ii();Ds(!!(ge&2));const _i=Mi;Mi=!1;const an=$t();an&&fs(!1);const jr=Um(!!(ge&16),Qe);return an&&fs(!0),Mi=_i,as(yt),Ds(Zt),jr}function x2(){const ge=le(),Qe=je();return ki(27),Cn(Li(E.createEmptyStatement(),ge),Qe)}function gf(){const ge=le(),Qe=je();ki(101);const yt=r.getTokenStart(),Zt=ki(21),_i=ji(ht);Ic(21,22,Zt,yt);const an=Ng(),jr=$s(93)?Ng():void 0;return Cn(Li(Fe(_i,an,jr),ge),Qe)}function fC(){const ge=le(),Qe=je();ki(92);const yt=Ng();ki(117);const Zt=r.getTokenStart(),_i=ki(21),an=ji(ht);return Ic(21,22,_i,Zt),$s(27),Cn(Li(E.createDoStatement(yt,an),ge),Qe)}function i1(){const ge=le(),Qe=je();ki(117);const yt=r.getTokenStart(),Zt=ki(21),_i=ji(ht);Ic(21,22,Zt,yt);const an=Ng();return Cn(Li(Oe(_i,an),ge),Qe)}function Ru(){const ge=le(),Qe=je();ki(99);const yt=Ps(135);ki(21);let Zt;de()!==27&&(de()===115||de()===121||de()===87||de()===160&&Ar(fO)||de()===135&&Ar(SA)?Zt=w0(!0):Zt=fl(ht));let _i;if(yt?ki(165):$s(165)){const an=ji(()=>rf(!0));ki(22),_i=Ie(yt,Zt,an,Ng())}else if($s(103)){const an=ji(ht);ki(22),_i=E.createForInStatement(Zt,an,Ng())}else{ki(27);const an=de()!==27&&de()!==22?ji(ht):void 0;ki(27);const jr=de()!==22?ji(ht):void 0;ki(22),_i=fe(Zt,an,jr,Ng())}return Cn(Li(_i,ge),Qe)}function sf(ge){const Qe=le(),yt=je();ki(ge===252?83:88);const Zt=za()?void 0:Rc();Ul();const _i=ge===252?E.createBreakStatement(Zt):E.createContinueStatement(Zt);return Cn(Li(_i,Qe),yt)}function hC(){const ge=le(),Qe=je();ki(107);const yt=za()?void 0:ji(ht);return Ul(),Cn(Li(E.createReturnStatement(yt),ge),Qe)}function op(){const ge=le(),Qe=je();ki(118);const yt=r.getTokenStart(),Zt=ki(21),_i=ji(ht);Ic(21,22,Zt,yt);const an=Yo(67108864,Ng);return Cn(Li(E.createWithStatement(_i,an),ge),Qe)}function cm(){const ge=le(),Qe=je();ki(84);const yt=ji(ht);ki(59);const Zt=hl(3,Ng);return Cn(Li(E.createCaseClause(yt,Zt),ge),Qe)}function bA(){const ge=le();ki(90),ki(59);const Qe=hl(3,Ng);return Li(E.createDefaultClause(Qe),ge)}function n1(){return de()===84?cm():bA()}function CA(){const ge=le();ki(19);const Qe=hl(2,n1);return ki(20),Li(E.createCaseBlock(Qe),ge)}function r1(){const ge=le(),Qe=je();ki(109),ki(21);const yt=ji(ht);ki(22);const Zt=CA();return Cn(Li(E.createSwitchStatement(yt,Zt),ge),Qe)}function gx(){const ge=le(),Qe=je();ki(111);let yt=r.hasPrecedingLineBreak()?void 0:ji(ht);return yt===void 0&&(Oi++,yt=Li(U(""),le())),Mc()||Sl(yt),Cn(Li(E.createThrowStatement(yt),ge),Qe)}function cO(){const ge=le(),Qe=je();ki(113);const yt=Um(!1),Zt=de()===85?Du():void 0;let _i;return(!Zt||de()===98)&&(ki(98,k.catch_or_finally_expected),_i=Um(!1)),Cn(Li(E.createTryStatement(yt,Zt,_i),ge),Qe)}function Du(){const ge=le();ki(85);let Qe;$s(21)?(Qe=yx(),ki(22)):Qe=void 0;const yt=Um(!1);return Li(E.createCatchClause(Qe,yt),ge)}function uO(){const ge=le(),Qe=je();return ki(89),Ul(),Cn(Li(E.createDebuggerStatement(),ge),Qe)}function dO(){const ge=le();let Qe=je(),yt;const Zt=de()===21,_i=ji(ht);return lt(_i)&&$s(59)?yt=E.createLabeledStatement(_i,Ng()):(Mc()||Sl(_i),yt=ke(_i),Zt&&(Qe=!1)),Cn(Li(yt,ge),Qe)}function k2(){return Ke(),Rh(de())&&!r.hasPrecedingLineBreak()}function PF(){return Ke(),de()===86&&!r.hasPrecedingLineBreak()}function Gh(){return Ke(),de()===100&&!r.hasPrecedingLineBreak()}function $I(){return Ke(),(Rh(de())||de()===9||de()===10||de()===11)&&!r.hasPrecedingLineBreak()}function wD(){for(;;)switch(de()){case 115:case 121:case 87:case 100:case 86:case 94:return!0;case 160:return xD();case 135:return JI();case 120:case 156:return Q1();case 144:case 145:return al();case 128:case 129:case 134:case 138:case 123:case 124:case 125:case 148:const ge=de();if(Ke(),r.hasPrecedingLineBreak())return!1;if(ge===138&&de()===156)return!0;continue;case 162:return Ke(),de()===19||de()===80||de()===95;case 102:return Ke(),de()===11||de()===42||de()===19||Rh(de());case 95:let Qe=Ke();if(Qe===156&&(Qe=Ar(Ke)),Qe===64||Qe===42||Qe===19||Qe===90||Qe===130||Qe===60)return!0;continue;case 126:Ke();continue;default:return!1}}function T2(){return Ar(wD)}function J_(){switch(de()){case 60:case 27:case 19:case 115:case 121:case 160:case 100:case 86:case 94:case 101:case 92:case 117:case 99:case 88:case 83:case 107:case 118:case 109:case 111:case 113:case 89:case 85:case 98:return!0;case 102:return T2()||Ar(nr);case 87:case 95:return T2();case 134:case 138:case 120:case 144:case 145:case 156:case 162:return!0;case 129:case 125:case 123:case 124:case 126:case 148:return T2()||!Ar(k2);default:return iv()}}function AF(){return Ke(),$i()||de()===19||de()===23}function D2(){return Ar(AF)}function fO(){return E2(!0)}function E2(ge){return Ke(),ge&&de()===165?!1:($i()||de()===19)&&!r.hasPrecedingLineBreak()}function xD(){return Ar(E2)}function SA(ge){return Ke()===160?E2(ge):!1}function JI(){return Ar(SA)}function Ng(){switch(de()){case 27:return x2();case 19:return Um(!1);case 115:return Z1(le(),je(),void 0);case 121:if(D2())return Z1(le(),je(),void 0);break;case 135:if(JI())return Z1(le(),je(),void 0);break;case 160:if(xD())return Z1(le(),je(),void 0);break;case 100:return s1(le(),je(),void 0);case 86:return Va(le(),je(),void 0);case 101:return gf();case 92:return fC();case 117:return i1();case 99:return Ru();case 88:return sf(251);case 83:return sf(252);case 107:return hC();case 118:return op();case 109:return r1();case 111:return gx();case 113:case 85:case 98:return cO();case 89:return uO();case 60:return mx();case 134:case 120:case 156:case 144:case 145:case 138:case 87:case 94:case 95:case 102:case 123:case 124:case 125:case 128:case 129:case 126:case 148:case 162:if(T2())return mx();break}return dO()}function hO(ge){return ge.kind===138}function mx(){const ge=le(),Qe=je(),yt=bi(!0);if(Rt(yt,hO)){const _i=Yp(ge);if(_i)return _i;for(const an of yt)an.flags|=33554432;return Yo(33554432,()=>nv(ge,Qe,yt))}else return nv(ge,Qe,yt)}function Yp(ge){return Yo(33554432,()=>{const Qe=Ld(Ji,ge);if(Qe)return Xl(Qe)})}function nv(ge,Qe,yt){switch(de()){case 115:case 121:case 87:case 160:case 135:return Z1(ge,Qe,yt);case 100:return s1(ge,Qe,yt);case 86:return Va(ge,Qe,yt);case 120:return gC(ge,Qe,yt);case 156:return N2(ge,Qe,yt);case 94:return Cx(ge,Qe,yt);case 162:case 144:case 145:return OF(ge,Qe,yt);case 102:return gZ(ge,Qe,yt);case 95:switch(Ke(),de()){case 90:case 64:return Al(ge,Qe,yt);case 130:return pZ(ge,Qe,yt);default:return FF(ge,Qe,yt)}default:if(yt){const Zt=wu(282,!0,k.Declaration_expected);return t7(Zt,ge),Zt.modifiers=yt,Zt}return}}function GI(){return Ke()===11}function KI(){return Ke(),de()===161||de()===64}function al(){return Ke(),!r.hasPrecedingLineBreak()&&(Tn()||de()===11)}function wr(ge,Qe){if(de()!==19){if(ge&4){rC();return}if(za()){Ul();return}}return WS(ge,Qe)}function Lg(){const ge=le();if(de()===28)return Li(E.createOmittedExpression(),ge);const Qe=Ps(26),yt=vx(),Zt=v0();return Li(E.createBindingElement(Qe,void 0,yt,Zt),ge)}function Vf(){const ge=le(),Qe=Ps(26),yt=$i();let Zt=mn(),_i;yt&&de()!==59?(_i=Zt,Zt=void 0):(ki(59),_i=vx());const an=v0();return Li(E.createBindingElement(Qe,Zt,_i,an),ge)}function _O(){const ge=le();ki(19);const Qe=ji(()=>vd(9,Vf));return ki(20),Li(E.createObjectBindingPattern(Qe),ge)}function pO(){const ge=le();ki(23);const Qe=ji(()=>vd(10,Lg));return ki(24),Li(E.createArrayBindingPattern(Qe),ge)}function I2(){return de()===19||de()===23||de()===81||$i()}function vx(ge){return de()===23?pO():de()===19?_O():z_(ge)}function gO(){return yx(!0)}function yx(ge){const Qe=le(),yt=je(),Zt=vx(k.Private_identifiers_are_not_allowed_in_variable_declarations);let _i;ge&&Zt.kind===80&&de()===54&&!r.hasPrecedingLineBreak()&&(_i=Tu());const an=AS(),jr=y2(de())?void 0:v0(),Bs=Le(Zt,_i,an,jr);return Cn(Li(Bs,Qe),yt)}function w0(ge){const Qe=le();let yt=0;switch(de()){case 115:break;case 121:yt|=1;break;case 87:yt|=2;break;case 160:yt|=4;break;case 135:z.assert(JI()),yt|=6,Ke();break;default:z.fail()}Ke();let Zt;if(de()===165&&Ar(eg))Zt=rp();else{const _i=$e();lr(ge),Zt=vd(8,ge?yx:gO),lr(_i)}return Li(et(Zt,yt),Qe)}function eg(){return qh()&&Ke()===22}function Z1(ge,Qe,yt){const Zt=w0(!1);Ul();const _i=Ee(yt,Zt);return Cn(Li(_i,ge),Qe)}function s1(ge,Qe,yt){const Zt=ii(),_i=Rv(yt);ki(100);const an=Ps(42),jr=_i&2048?dC():z_(),Bs=an?1:0,ws=_i&1024?2:0,hs=$h();_i&32&&Ds(!0);const io=Eg(Bs|ws),ic=Vm(59,!1),va=wr(Bs|ws,k.or_expected);Ds(Zt);const Ka=E.createFunctionDeclaration(yt,an,jr,hs,io,ic,va);return Cn(Li(Ka,ge),Qe)}function _C(){if(de()===137)return ki(137);if(de()===11&&Ar(Ke)===21)return is(()=>{const ge=ei();return ge.text==="constructor"?ge:void 0})}function QI(ge,Qe,yt){return is(()=>{if(_C()){const Zt=$h(),_i=Eg(0),an=Vm(59,!1),jr=wr(0,k.or_expected),Bs=E.createConstructorDeclaration(yt,_i,jr);return Bs.typeParameters=Zt,Bs.type=an,Cn(Li(Bs,ge),Qe)}})}function cd(ge,Qe,yt,Zt,_i,an,jr,Bs){const ws=Zt?1:0,hs=Rt(yt,d7)?2:0,io=$h(),ic=Eg(ws|hs),va=Vm(59,!1),Ka=wr(ws|hs,Bs),Ag=E.createMethodDeclaration(yt,Zt,_i,an,io,ic,va,Ka);return Ag.exclamationToken=jr,Cn(Li(Ag,ge),Qe)}function x0(ge,Qe,yt,Zt,_i){const an=!_i&&!r.hasPrecedingLineBreak()?Ps(54):void 0,jr=AS(),Bs=ha(90112,v0);co(Zt,jr,Bs);const ws=E.createPropertyDeclaration(yt,Zt,_i||an,jr,Bs);return Cn(Li(ws,ge),Qe)}function tg(ge,Qe,yt){const Zt=Ps(42),_i=mn(),an=Ps(58);return Zt||de()===21||de()===30?cd(ge,Qe,yt,Zt,_i,an,void 0,k.or_expected):x0(ge,Qe,yt,_i,an)}function VS(ge,Qe,yt,Zt,_i){const an=mn(),jr=$h(),Bs=Eg(0),ws=Vm(59,!1),hs=wr(_i),io=Zt===177?E.createGetAccessorDeclaration(yt,an,Bs,ws,hs):E.createSetAccessorDeclaration(yt,an,Bs,hs);return io.typeParameters=jr,Np(io)&&(io.type=ws),Cn(Li(io,ge),Qe)}function Pg(){let ge;if(de()===60)return!0;for(;eS(de());){if(ge=de(),mse(ge))return!0;Ke()}if(de()===42||(ct()&&(ge=de(),Ke()),de()===23))return!0;if(ge!==void 0){if(!d_(ge)||ge===153||ge===139)return!0;switch(de()){case 21:case 30:case 54:case 59:case 64:case 58:return!0;default:return za()}}return!1}function XI(ge,Qe,yt){qc(126);const Zt=bx(),_i=Cn(Li(E.createClassStaticBlockDeclaration(Zt),ge),Qe);return _i.modifiers=yt,_i}function bx(){const ge=Ci(),Qe=ii();as(!1),Ds(!0);const yt=Um(!1);return as(ge),Ds(Qe),yt}function H(){if(ii()&&de()===135){const ge=le(),Qe=Rc(k.Expression_expected);Ke();const yt=e1(ge,Qe,!0);return lm(ge,yt)}return Zp()}function Ne(){const ge=le();if(!$s(60))return;const Qe=Pt(H);return Li(E.createDecorator(Qe),ge)}function Jt(ge,Qe,yt){const Zt=le(),_i=de();if(de()===87&&Qe){if(!is(Cs))return}else{if(yt&&de()===126&&Ar(yO))return;if(ge&&de()===126)return;if(!Id())return}return Li(Q(_i),Zt)}function bi(ge,Qe,yt){const Zt=le();let _i,an,jr,Bs=!1,ws=!1,hs=!1;if(ge&&de()===60)for(;an=Ne();)_i=xi(_i,an);for(;jr=Jt(Bs,Qe,yt);)jr.kind===126&&(Bs=!0),_i=xi(_i,jr),ws=!0;if(ws&&ge&&de()===60)for(;an=Ne();)_i=xi(_i,an),hs=!0;if(hs)for(;jr=Jt(Bs,Qe,yt);)jr.kind===126&&(Bs=!0),_i=xi(_i,jr);return _i&&wl(_i,Zt)}function cs(){let ge;if(de()===134){const Qe=le();Ke();const yt=Li(Q(134),Qe);ge=wl([yt],Qe)}return ge}function ho(){const ge=le(),Qe=je();if(de()===27)return Ke(),Cn(Li(E.createSemicolonClassElement(),ge),Qe);const yt=bi(!0,!0,!0);if(de()===126&&Ar(yO))return XI(ge,Qe,yt);if(br(139))return VS(ge,Qe,yt,177,0);if(br(153))return VS(ge,Qe,yt,178,0);if(de()===137||de()===11){const Zt=QI(ge,Qe,yt);if(Zt)return Zt}if(bt())return Ti(ge,Qe,yt);if(Rh(de())||de()===11||de()===9||de()===42||de()===23)if(Rt(yt,hO)){for(const _i of yt)_i.flags|=33554432;return Yo(33554432,()=>tg(ge,Qe,yt))}else return tg(ge,Qe,yt);if(yt){const Zt=wu(80,!0,k.Declaration_expected);return x0(ge,Qe,yt,Zt,void 0)}return z.fail("Should not have attempted to parse class member declaration.")}function so(){const ge=le(),Qe=je(),yt=bi(!0);if(de()===86)return Kh(ge,Qe,yt,231);const Zt=wu(282,!0,k.Expression_expected);return t7(Zt,ge),Zt.modifiers=yt,Zt}function Co(){return Kh(le(),je(),void 0,231)}function Va(ge,Qe,yt){return Kh(ge,Qe,yt,263)}function Kh(ge,Qe,yt,Zt){const _i=ii();ki(86);const an=Th(),jr=$h();Rt(yt,SP)&&Ds(!0);const Bs=kD();let ws;ki(19)?(ws=mO(),ki(20)):ws=rp(),Ds(_i);const hs=Zt===263?E.createClassDeclaration(yt,an,jr,Bs,ws):E.createClassExpression(yt,an,jr,Bs,ws);return Cn(Li(hs,ge),Qe)}function Th(){return $i()&&!HS()?Uh($i()):void 0}function HS(){return de()===119&&Ar(Nd)}function kD(){if(TD())return hl(22,Bp)}function Bp(){const ge=le(),Qe=de();z.assert(Qe===96||Qe===119),Ke();const yt=vd(7,rv);return Li(E.createHeritageClause(Qe,yt),ge)}function rv(){const ge=le(),Qe=Zp();if(Qe.kind===233)return Qe;const yt=pC();return Li(E.createExpressionWithTypeArguments(Qe,yt),ge)}function pC(){return de()===30?Tg(20,Pd,30,32):void 0}function TD(){return de()===96||de()===119}function mO(){return hl(5,ho)}function gC(ge,Qe,yt){ki(120);const Zt=Rc(),_i=$h(),an=kD(),jr=Hn(),Bs=E.createInterfaceDeclaration(yt,Zt,_i,an,jr);return Cn(Li(Bs,ge),Qe)}function N2(ge,Qe,yt){ki(156),r.hasPrecedingLineBreak()&&Gt(k.Line_break_not_permitted_here);const Zt=Rc(),_i=$h();ki(64);const an=de()===141&&is(d2)||Pd();Ul();const jr=E.createTypeAliasDeclaration(yt,Zt,_i,an);return Cn(Li(jr,ge),Qe)}function jS(){const ge=le(),Qe=je(),yt=mn(),Zt=ji(v0);return Cn(Li(E.createEnumMember(yt,Zt),ge),Qe)}function Cx(ge,Qe,yt){ki(94);const Zt=Rc();let _i;ki(19)?(_i=pt(()=>vd(6,jS)),ki(20)):_i=rp();const an=E.createEnumDeclaration(yt,Zt,_i);return Cn(Li(an,ge),Qe)}function Js(){const ge=le();let Qe;return ki(19)?(Qe=hl(1,Ng),ki(20)):Qe=rp(),Li(E.createModuleBlock(Qe),ge)}function Sx(ge,Qe,yt,Zt){const _i=Zt&32,an=Zt&8?Qc():Rc(),jr=$s(25)?Sx(le(),!1,void 0,8|_i):Js(),Bs=E.createModuleDeclaration(yt,an,jr,Zt);return Cn(Li(Bs,ge),Qe)}function Un(ge,Qe,yt){let Zt=0,_i;de()===162?(_i=Rc(),Zt|=2048):(_i=ei(),_i.text=zh(_i.text));let an;de()===19?an=Js():Ul();const jr=E.createModuleDeclaration(yt,_i,an,Zt);return Cn(Li(jr,ge),Qe)}function OF(ge,Qe,yt){let Zt=0;if(de()===162)return Un(ge,Qe,yt);if($s(145))Zt|=32;else if(ki(144),de()===11)return Un(ge,Qe,yt);return Sx(ge,Qe,yt,Zt)}function vO(){return de()===149&&Ar(wA)}function wA(){return Ke()===21}function yO(){return Ke()===19}function bO(){return Ke()===44}function pZ(ge,Qe,yt){ki(130),ki(145);const Zt=Rc();Ul();const _i=E.createNamespaceExportDeclaration(Zt);return _i.modifiers=yt,Cn(Li(_i,ge),Qe)}function gZ(ge,Qe,yt){ki(102);const Zt=r.getTokenFullStart();let _i;Tn()&&(_i=Rc());let an=!1;if((_i==null?void 0:_i.escapedText)==="type"&&(de()!==161||Tn()&&Ar(KI))&&(Tn()||_j())&&(an=!0,_i=Tn()?Rc():void 0),_i&&!L2())return pj(ge,Qe,yt,_i,an);const jr=Y1(_i,Zt,an),Bs=qm(),ws=hj();Ul();const hs=E.createImportDeclaration(yt,jr,Bs,ws);return Cn(Li(hs,ge),Qe)}function Y1(ge,Qe,yt,Zt=!1){let _i;return(ge||de()===42||de()===19)&&(_i=DD(ge,Qe,yt,Zt),ki(161)),_i}function hj(){const ge=de();if((ge===118||ge===132)&&!r.hasPrecedingLineBreak())return RF(ge)}function MF(){const ge=le(),Qe=Rh(de())?Qc():po(11);ki(59);const yt=rf(!0);return Li(E.createImportAttribute(Qe,yt),ge)}function RF(ge,Qe){const yt=le();Qe||ki(ge);const Zt=r.getTokenStart();if(ki(19)){const _i=r.hasPrecedingLineBreak(),an=vd(24,MF,!0);if(!ki(20)){const jr=Ql(ze);jr&&jr.code===k._0_expected.code&&fa(jr,oP(He,Ue,Zt,1,k.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}return Li(E.createImportAttributes(an,_i,ge),yt)}else{const _i=wl([],le(),void 0,!1);return Li(E.createImportAttributes(_i,!1,ge),yt)}}function _j(){return de()===42||de()===19}function L2(){return de()===28||de()===161}function pj(ge,Qe,yt,Zt,_i){ki(64);const an=mC();Ul();const jr=E.createImportEqualsDeclaration(yt,_i,Zt,an);return Cn(Li(jr,ge),Qe)}function DD(ge,Qe,yt,Zt){let _i;return(!ge||$s(28))&&(Zt&&r.setSkipJsDocLeadingAsterisks(!0),_i=de()===42?CO():gj(275),Zt&&r.setSkipJsDocLeadingAsterisks(!1)),Li(E.createImportClause(yt,ge,_i),Qe)}function mC(){return vO()?ED():me(!1)}function ED(){const ge=le();ki(149),ki(21);const Qe=qm();return ki(22),Li(E.createExternalModuleReference(Qe),ge)}function qm(){if(de()===11){const ge=ei();return ge.text=zh(ge.text),ge}else return ht()}function CO(){const ge=le();ki(42),ki(130);const Qe=Rc();return Li(E.createNamespaceImport(Qe),ge)}function gj(ge){const Qe=le(),yt=ge===275?E.createNamedImports(Tg(23,ZI,19,20)):E.createNamedExports(Tg(23,ey,19,20));return Li(yt,Qe)}function ey(){const ge=je();return Cn(mj(281),ge)}function ZI(){return mj(276)}function mj(ge){const Qe=le();let yt=d_(de())&&!Tn(),Zt=r.getTokenStart(),_i=r.getTokenEnd(),an=!1,jr,Bs=!0,ws=Qc();if(ws.escapedText==="type")if(de()===130){const ic=Qc();if(de()===130){const va=Qc();Rh(de())?(an=!0,jr=ic,ws=io(),Bs=!1):(jr=ws,ws=va,Bs=!1)}else Rh(de())?(jr=ws,Bs=!1,ws=io()):(an=!0,ws=ic)}else Rh(de())&&(an=!0,ws=io());Bs&&de()===130&&(jr=ws,ki(130),ws=io()),ge===276&&yt&&ce(Zt,_i,k.Identifier_expected);const hs=ge===276?E.createImportSpecifier(an,jr,ws):E.createExportSpecifier(an,jr,ws);return Li(hs,Qe);function io(){return yt=d_(de())&&!Tn(),Zt=r.getTokenStart(),_i=r.getTokenEnd(),Qc()}}function Eu(ge){return Li(E.createNamespaceExport(Qc()),ge)}function FF(ge,Qe,yt){const Zt=ii();Ds(!0);let _i,an,jr;const Bs=$s(156),ws=le();$s(42)?($s(130)&&(_i=Eu(ws)),ki(161),an=qm()):(_i=gj(279),(de()===161||de()===11&&!r.hasPrecedingLineBreak())&&(ki(161),an=qm()));const hs=de();an&&(hs===118||hs===132)&&!r.hasPrecedingLineBreak()&&(jr=RF(hs)),Ul(),Ds(Zt);const io=E.createExportDeclaration(yt,Bs,_i,an,jr);return Cn(Li(io,ge),Qe)}function Al(ge,Qe,yt){const Zt=ii();Ds(!0);let _i;$s(64)?_i=!0:ki(90);const an=rf(!0);Ul(),Ds(Zt);const jr=E.createExportAssignment(yt,_i,an);return Cn(Li(jr,ge),Qe)}let _l;(ge=>{ge[ge.SourceElements=0]="SourceElements",ge[ge.BlockStatements=1]="BlockStatements",ge[ge.SwitchClauses=2]="SwitchClauses",ge[ge.SwitchClauseStatements=3]="SwitchClauseStatements",ge[ge.TypeMembers=4]="TypeMembers",ge[ge.ClassMembers=5]="ClassMembers",ge[ge.EnumMembers=6]="EnumMembers",ge[ge.HeritageClauseElement=7]="HeritageClauseElement",ge[ge.VariableDeclarations=8]="VariableDeclarations",ge[ge.ObjectBindingElements=9]="ObjectBindingElements",ge[ge.ArrayBindingElements=10]="ArrayBindingElements",ge[ge.ArgumentExpressions=11]="ArgumentExpressions",ge[ge.ObjectLiteralMembers=12]="ObjectLiteralMembers",ge[ge.JsxAttributes=13]="JsxAttributes",ge[ge.JsxChildren=14]="JsxChildren",ge[ge.ArrayLiteralMembers=15]="ArrayLiteralMembers",ge[ge.Parameters=16]="Parameters",ge[ge.JSDocParameters=17]="JSDocParameters",ge[ge.RestProperties=18]="RestProperties",ge[ge.TypeParameters=19]="TypeParameters",ge[ge.TypeArguments=20]="TypeArguments",ge[ge.TupleElementTypes=21]="TupleElementTypes",ge[ge.HeritageClauses=22]="HeritageClauses",ge[ge.ImportOrExportSpecifiers=23]="ImportOrExportSpecifiers",ge[ge.ImportAttributes=24]="ImportAttributes",ge[ge.JSDocComment=25]="JSDocComment",ge[ge.Count=26]="Count"})(_l||(_l={}));let xA;(ge=>{ge[ge.False=0]="False",ge[ge.True=1]="True",ge[ge.Unknown=2]="Unknown"})(xA||(xA={}));let kA;(ge=>{function Qe(hs,io,ic){Hs("file.js",hs,99,void 0,1,0),r.setText(hs,io,ic),Et=r.scan();const va=yt(),Ka=hi("file.js",99,1,!1,[],Q(1),0,dl),Ag=aP(ze,Ka);return st&&(Ka.jsDocDiagnostics=aP(st,Ka)),Wo(),va?{jsDocTypeExpression:va,diagnostics:Ag}:void 0}ge.parseJSDocTypeExpressionForTests=Qe;function yt(hs){const io=le(),ic=(hs?$s:ki)(19),va=Yo(16777216,Dg);(!hs||ic)&&ca(20);const Ka=E.createJSDocTypeExpression(va);return ot(Ka),Li(Ka,io)}ge.parseJSDocTypeExpression=yt;function Zt(){const hs=le(),io=$s(19),ic=le();let va=me(!1);for(;de()===81;)or(),Qt(),va=Li(E.createJSDocMemberName(va,Rc()),ic);io&&ca(20);const Ka=E.createJSDocNameReference(va);return ot(Ka),Li(Ka,hs)}ge.parseJSDocNameReference=Zt;function _i(hs,io,ic){Hs("",hs,99,void 0,1,0);const va=Yo(16777216,()=>ws(io,ic)),Ag=aP(ze,{languageVariant:0,text:hs});return Wo(),va?{jsDoc:va,diagnostics:Ag}:void 0}ge.parseIsolatedJSDocComment=_i;function an(hs,io,ic){const va=Et,Ka=ze.length,Ag=Ai,sv=Yo(16777216,()=>ws(io,ic));return ml(sv,hs),bn&524288&&(st||(st=[]),un(st,ze,Ka)),Et=va,ze.length=Ka,Ai=Ag,sv}ge.parseJSDocComment=an;let jr;(hs=>{hs[hs.BeginningOfLine=0]="BeginningOfLine",hs[hs.SawAsterisk=1]="SawAsterisk",hs[hs.SavingComments=2]="SavingComments",hs[hs.SavingBackticks=3]="SavingBackticks"})(jr||(jr={}));let Bs;(hs=>{hs[hs.Property=1]="Property",hs[hs.Parameter=2]="Parameter",hs[hs.CallbackParameter=4]="CallbackParameter"})(Bs||(Bs={}));function ws(hs=0,io){const ic=Ue,va=io===void 0?ic.length:hs+io;if(io=va-hs,z.assert(hs>=0),z.assert(hs<=va),z.assert(va<=ic.length),!sle(ic,hs))return;let Ka,Ag,sv,vC,wx,$m=[];const P2=[],BF=Ji;Ji|=1<<25;const SO=r.scanRange(hs+3,io-5,vj);return Ji=BF,SO;function vj(){let ln=1,Fr,Wr=hs-(ic.lastIndexOf(` +`,hs)+1)+4;function Yr(lc){Fr||(Fr=Wr),$m.push(lc),Wr+=lc.length}for(Qt();M2(5););M2(4)&&(ln=0,Wr=0);e:for(;;){switch(de()){case 60:Ad($m),wx||(wx=le()),vi(db(Wr)),ln=0,Fr=void 0;break;case 4:$m.push(r.getTokenText()),ln=0,Wr=0;break;case 42:const lc=r.getTokenText();ln===1?(ln=2,Yr(lc)):(z.assert(ln===0),ln=1,Wr+=lc.length);break;case 5:z.assert(ln!==2,"whitespace shouldn't come from the scanner while saving top-level comment text");const of=r.getTokenText();Fr!==void 0&&Wr+of.length>Fr&&$m.push(of.slice(Fr-Wr)),Wr+=of.length;break;case 1:break e;case 82:ln=2,Yr(r.getTokenValue());break;case 19:ln=2;const iy=r.getTokenFullStart(),o1=r.getTokenEnd()-1,Gu=A(o1);if(Gu){vC||pl($m),P2.push(Li(E.createJSDocText($m.join("")),vC??hs,iy)),P2.push(Gu),$m=[],vC=r.getTokenEnd();break}default:ln=2,Yr(r.getTokenText());break}ln===2?ni(!1):Qt()}const Ts=$m.join("").trimEnd();P2.length&&Ts.length&&P2.push(Li(E.createJSDocText(Ts),vC??hs,wx)),P2.length&&Ka&&z.assertIsDefined(wx,"having parsed tags implies that the end of the comment span should be set");const xl=Ka&&wl(Ka,Ag,sv);return Li(E.createJSDocComment(P2.length?wl(P2,hs,wx):Ts.length?Ts:void 0,xl),hs,va)}function pl(ln){for(;ln.length&&(ln[0]===` +`||ln[0]==="\r");)ln.shift()}function Ad(ln){for(;ln.length;){const Fr=ln[ln.length-1].trimEnd();if(Fr==="")ln.pop();else if(Fr.lengthof&&(Yr.push(yC.slice(of-ln)),lc=2),ln+=yC.length;break;case 19:lc=2;const DA=r.getTokenFullStart(),EA=r.getTokenEnd()-1,VF=A(EA);VF?(Ts.push(Li(E.createJSDocText(Yr.join("")),xl??Wr,DA)),Ts.push(VF),Yr=[],xl=r.getTokenEnd()):iy(r.getTokenText());break;case 62:lc===3?lc=2:lc=3,iy(r.getTokenText());break;case 82:lc!==3&&(lc=2),iy(r.getTokenValue());break;case 42:if(lc===0){lc=1,ln+=1;break}default:lc!==3&&(lc=2),iy(r.getTokenText());break}lc===2||lc===3?o1=ni(lc===3):o1=Qt()}pl(Yr);const Gu=Yr.join("").trimEnd();if(Ts.length)return Gu.length&&Ts.push(Li(E.createJSDocText(Gu),xl??Wr)),wl(Ts,Wr,r.getTokenEnd());if(Gu.length)return Gu}function A(ln){const Fr=is(se);if(!Fr)return;Qt(),ov();const Wr=$(),Yr=[];for(;de()!==20&&de()!==4&&de()!==1;)Yr.push(r.getTokenText()),Qt();const Ts=Fr==="link"?E.createJSDocLink:Fr==="linkcode"?E.createJSDocLinkCode:E.createJSDocLinkPlain;return Li(Ts(Wr,Yr.join("")),ln,r.getTokenEnd())}function $(){if(Rh(de())){const ln=le();let Fr=Qc();for(;$s(25);)Fr=Li(E.createQualifiedName(Fr,de()===81?wu(80,!1):Qc()),ln);for(;de()===81;)or(),Qt(),Fr=Li(E.createJSDocMemberName(Fr,Rc()),ln);return Fr}}function se(){if(A2(),de()===19&&Qt()===60&&Rh(Qt())){const ln=r.getTokenValue();if(De(ln))return ln}}function De(ln){return ln==="link"||ln==="linkcode"||ln==="linkplain"}function gt(ln,Fr,Wr,Yr){return Li(E.createJSDocUnknownTag(Fr,um(ln,le(),Wr,Yr)),ln)}function vi(ln){ln&&(Ka?Ka.push(ln):(Ka=[ln],Ag=ln.pos),sv=ln.end)}function Gn(){return A2(),de()===19?yt():void 0}function vo(){const ln=M2(23);ln&&ov();const Fr=M2(62),Wr=h_e();return Fr&&wh(62),ln&&(ov(),Ps(64)&&ht(),ki(24)),{name:Wr,isBracketed:ln}}function ac(ln){switch(ln.kind){case 151:return!0;case 188:return ac(ln.elementType);default:return _g(ln)&<(ln.typeName)&&ln.typeName.escapedText==="Object"&&!ln.typeArguments}}function k0(ln,Fr,Wr,Yr){let Ts=Gn(),xl=!Ts;A2();const{name:lc,isBracketed:of}=vo(),iy=A2();xl&&!Ar(se)&&(Ts=Gn());const o1=um(ln,le(),Yr,iy),Gu=T0(Ts,lc,Wr,Yr);Gu&&(Ts=Gu,xl=!0);const yC=Wr===1?E.createJSDocPropertyTag(Fr,lc,of,Ts,xl,o1):E.createJSDocParameterTag(Fr,lc,of,Ts,xl,o1);return Li(yC,ln)}function T0(ln,Fr,Wr,Yr){if(ln&&ac(ln.type)){const Ts=le();let xl,lc;for(;xl=is(()=>bj(Wr,Yr,Fr));)xl.kind===341||xl.kind===348?lc=xi(lc,xl):xl.kind===345&&ut(xl.tagName,k.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);if(lc){const of=Li(E.createJSDocTypeLiteral(lc,ln.type.kind===188),Ts);return Li(E.createJSDocTypeExpression(of),Ts)}}}function ty(ln,Fr,Wr,Yr){Rt(Ka,KG)&&ce(Fr.pos,r.getTokenStart(),k._0_tag_already_specified,Ws(Fr.escapedText));const Ts=Gn();return Li(E.createJSDocReturnTag(Fr,Ts,um(ln,le(),Wr,Yr)),ln)}function TA(ln,Fr,Wr,Yr){Rt(Ka,w7)&&ce(Fr.pos,r.getTokenStart(),k._0_tag_already_specified,Ws(Fr.escapedText));const Ts=yt(!0),xl=Wr!==void 0&&Yr!==void 0?um(ln,le(),Wr,Yr):void 0;return Li(E.createJSDocTypeTag(Fr,Ts,xl),ln)}function W3e(ln,Fr,Wr,Yr){const xl=de()===23||Ar(()=>Qt()===60&&Rh(Qt())&&De(r.getTokenValue()))?void 0:Zt(),lc=Wr!==void 0&&Yr!==void 0?um(ln,le(),Wr,Yr):void 0;return Li(E.createJSDocSeeTag(Fr,xl,lc),ln)}function yj(ln,Fr,Wr,Yr){const Ts=Gn(),xl=um(ln,le(),Wr,Yr);return Li(E.createJSDocThrowsTag(Fr,Ts,xl),ln)}function c_e(ln,Fr,Wr,Yr){const Ts=le(),xl=u_e();let lc=r.getTokenFullStart();const of=um(ln,lc,Wr,Yr);of||(lc=r.getTokenFullStart());const iy=typeof of!="string"?wl(no([Li(xl,Ts,lc)],of),Ts):xl.text+of;return Li(E.createJSDocAuthorTag(Fr,iy),ln)}function u_e(){const ln=[];let Fr=!1,Wr=r.getToken();for(;Wr!==1&&Wr!==4;){if(Wr===30)Fr=!0;else{if(Wr===60&&!Fr)break;if(Wr===32&&Fr){ln.push(r.getTokenText()),r.resetTokenState(r.getTokenEnd());break}}ln.push(r.getTokenText()),Wr=Qt()}return E.createJSDocText(ln.join(""))}function WF(ln,Fr,Wr,Yr){const Ts=f_e();return Li(E.createJSDocImplementsTag(Fr,Ts,um(ln,le(),Wr,Yr)),ln)}function V3e(ln,Fr,Wr,Yr){const Ts=f_e();return Li(E.createJSDocAugmentsTag(Fr,Ts,um(ln,le(),Wr,Yr)),ln)}function d_e(ln,Fr,Wr,Yr){const Ts=yt(!1),xl=Wr!==void 0&&Yr!==void 0?um(ln,le(),Wr,Yr):void 0;return Li(E.createJSDocSatisfiesTag(Fr,Ts,xl),ln)}function H3e(ln,Fr,Wr,Yr){const Ts=r.getTokenFullStart();let xl;Tn()&&(xl=Rc());const lc=Y1(xl,Ts,!0,!0),of=qm(),iy=hj(),o1=Wr!==void 0&&Yr!==void 0?um(ln,le(),Wr,Yr):void 0;return Li(E.createJSDocImportTag(Fr,lc,of,iy,o1),ln)}function f_e(){const ln=$s(19),Fr=le(),Wr=j3e();r.setSkipJsDocLeadingAsterisks(!0);const Yr=pC();r.setSkipJsDocLeadingAsterisks(!1);const Ts=E.createExpressionWithTypeArguments(Wr,Yr),xl=Li(Ts,Fr);return ln&&ki(20),xl}function j3e(){const ln=le();let Fr=R2();for(;$s(25);){const Wr=R2();Fr=Li(ue(Fr,Wr),ln)}return Fr}function zS(ln,Fr,Wr,Yr,Ts){return Li(Fr(Wr,um(ln,le(),Yr,Ts)),ln)}function mZ(ln,Fr,Wr,Yr){const Ts=yt(!0);return ov(),Li(E.createJSDocThisTag(Fr,Ts,um(ln,le(),Wr,Yr)),ln)}function z3e(ln,Fr,Wr,Yr){const Ts=yt(!0);return ov(),Li(E.createJSDocEnumTag(Fr,Ts,um(ln,le(),Wr,Yr)),ln)}function O2(ln,Fr,Wr,Yr){let Ts=Gn();A2();const xl=Qn();ov();let lc=Yn(Wr),of;if(!Ts||ac(Ts.type)){let o1,Gu,yC,DA=!1;for(;(o1=is(()=>kO(Wr)))&&o1.kind!==345;)if(DA=!0,o1.kind===344)if(Gu){const EA=Gt(k.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);EA&&fa(EA,oP(He,Ue,0,0,k.The_tag_was_first_specified_here));break}else Gu=o1;else yC=xi(yC,o1);if(DA){const EA=Ts&&Ts.type.kind===188,VF=E.createJSDocTypeLiteral(yC,EA);Ts=Gu&&Gu.typeExpression&&!ac(Gu.typeExpression.type)?Gu.typeExpression:Li(VF,ln),of=Ts.end}}of=of||lc!==void 0?le():(xl??Ts??Fr).end,lc||(lc=um(ln,of,Wr,Yr));const iy=E.createJSDocTypedefTag(Fr,Ts,xl,lc);return Li(iy,ln,of)}function Qn(ln){const Fr=r.getTokenStart();if(!Rh(de()))return;const Wr=R2();if($s(25)){const Yr=Qn(!0),Ts=E.createModuleDeclaration(void 0,Wr,Yr,ln?8:void 0);return Li(Ts,Fr)}return ln&&(Wr.flags|=4096),Wr}function kx(ln){const Fr=le();let Wr,Yr;for(;Wr=is(()=>bj(4,ln));){if(Wr.kind===345){ut(Wr.tagName,k.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);break}Yr=xi(Yr,Wr)}return wl(Yr||[],Fr)}function Tx(ln,Fr){const Wr=kx(Fr),Yr=is(()=>{if(M2(60)){const Ts=db(Fr);if(Ts&&Ts.kind===342)return Ts}});return Li(E.createJSDocSignature(void 0,Wr,Yr),ln)}function wO(ln,Fr,Wr,Yr){const Ts=Qn();ov();let xl=Yn(Wr);const lc=Tx(ln,Wr);xl||(xl=um(ln,le(),Wr,Yr));const of=xl!==void 0?le():lc.end;return Li(E.createJSDocCallbackTag(Fr,lc,Ts,xl),ln,of)}function xO(ln,Fr,Wr,Yr){ov();let Ts=Yn(Wr);const xl=Tx(ln,Wr);Ts||(Ts=um(ln,le(),Wr,Yr));const lc=Ts!==void 0?le():xl.end;return Li(E.createJSDocOverloadTag(Fr,xl,Ts),ln,lc)}function vZ(ln,Fr){for(;!lt(ln)||!lt(Fr);)if(!lt(ln)&&!lt(Fr)&&ln.right.escapedText===Fr.right.escapedText)ln=ln.left,Fr=Fr.left;else return!1;return ln.escapedText===Fr.escapedText}function kO(ln){return bj(1,ln)}function bj(ln,Fr,Wr){let Yr=!0,Ts=!1;for(;;)switch(Qt()){case 60:if(Yr){const xl=US(ln,Fr);return xl&&(xl.kind===341||xl.kind===348)&&Wr&&(lt(xl.name)||!vZ(Wr,xl.name.left))?!1:xl}Ts=!1;break;case 4:Yr=!0,Ts=!1;break;case 42:Ts&&(Yr=!1),Ts=!0;break;case 80:Yr=!1;break;case 1:return!1}}function US(ln,Fr){z.assert(de()===60);const Wr=r.getTokenFullStart();Qt();const Yr=R2(),Ts=A2();let xl;switch(Yr.escapedText){case"type":return ln===1&&TA(Wr,Yr);case"prop":case"property":xl=1;break;case"arg":case"argument":case"param":xl=6;break;case"template":return Cj(Wr,Yr,Fr,Ts);case"this":return mZ(Wr,Yr,Fr,Ts);default:return!1}return ln&xl?k0(Wr,Yr,ln,Fr):!1}function U3e(){const ln=le(),Fr=M2(23);Fr&&ov();const Wr=bi(!1,!0),Yr=R2(k.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces);let Ts;if(Fr&&(ov(),ki(64),Ts=Yo(16777216,Dg),ki(24)),!vu(Yr))return Li(E.createTypeParameterDeclaration(Wr,Yr,void 0,Ts),ln)}function yZ(){const ln=le(),Fr=[];do{ov();const Wr=U3e();Wr!==void 0&&Fr.push(Wr),A2()}while(M2(28));return wl(Fr,ln)}function Cj(ln,Fr,Wr,Yr){const Ts=de()===19?yt():void 0,xl=yZ();return Li(E.createJSDocTemplateTag(Fr,Ts,xl,um(ln,le(),Wr,Yr)),ln)}function M2(ln){return de()===ln?(Qt(),!0):!1}function h_e(){let ln=R2();for($s(23)&&ki(24);$s(25);){const Fr=R2();$s(23)&&ki(24),ln=At(ln,Fr)}return ln}function R2(ln){if(!Rh(de()))return wu(80,!ln,ln||k.Identifier_expected);Oi++;const Fr=r.getTokenStart(),Wr=r.getTokenEnd(),Yr=de(),Ts=zh(r.getTokenValue()),xl=Li(U(Ts,Yr),Fr,Wr);return Qt(),xl}}})(kA=t.JSDocParser||(t.JSDocParser={}))})(Kk||(Kk={}));var FJe=new WeakSet;function hLt(t){FJe.has(t)&&z.fail("Source file has already been incrementally parsed"),FJe.add(t)}var BJe=new WeakSet;function _Lt(t){return BJe.has(t)}function RTe(t){BJe.add(t)}var ale;(t=>{function r(F,j,U,q){if(q=q||z.shouldAssert(2),E(F,j,U,q),WSe(U))return F;if(F.statements.length===0)return Kk.parseSourceFile(F.fileName,j,F.languageVersion,void 0,!0,F.scriptKind,F.setExternalModuleIndicator,F.jsDocParsingMode);hLt(F),Kk.fixupParentReferences(F);const Q=F.text,re=N(F),Y=b(F,U);E(F,j,Y,q),z.assert(Y.span.start<=U.span.start),z.assert(zu(Y.span)===zu(U.span)),z.assert(zu(t8(Y))===zu(t8(U)));const ue=t8(Y).length-Y.span.length;C(F,Y.span.start,zu(Y.span),zu(t8(Y)),ue,Q,j,q);const te=Kk.parseSourceFile(F.fileName,j,F.languageVersion,re,!0,F.scriptKind,F.setExternalModuleIndicator,F.jsDocParsingMode);return te.commentDirectives=a(F.commentDirectives,te.commentDirectives,Y.span.start,zu(Y.span),ue,Q,j,q),te.impliedNodeFormat=F.impliedNodeFormat,dTe(F,te),te}t.updateSourceFile=r;function a(F,j,U,q,Q,re,Y,ue){if(!F)return j;let te,Se=!1;for(const pe of F){const{range:ye,type:be}=pe;if(ye.endq){oe();const _e={range:{pos:ye.pos+Q,end:ye.end+Q},type:be};te=xi(te,_e),ue&&z.assert(re.substring(ye.pos,ye.end)===Y.substring(_e.range.pos,_e.range.end))}}return oe(),te;function oe(){Se||(Se=!0,te?j&&te.push(...j):te=j)}}function u(F,j,U,q,Q,re,Y){U?te(F):ue(F);return;function ue(Se){let oe="";if(Y&&h(Se)&&(oe=Q.substring(Se.pos,Se.end)),$ae(Se,j),Bv(Se,Se.pos+q,Se.end+q),Y&&h(Se)&&z.assert(oe===re.substring(Se.pos,Se.end)),jo(Se,ue,te),Jp(Se))for(const pe of Se.jsDoc)ue(pe);m(Se,Y)}function te(Se){Bv(Se,Se.pos+q,Se.end+q);for(const oe of Se)ue(oe)}}function h(F){switch(F.kind){case 11:case 9:case 80:return!0}return!1}function p(F,j,U,q,Q){z.assert(F.end>=j,"Adjusting an element that was entirely before the change range"),z.assert(F.pos<=U,"Adjusting an element that was entirely after the change range"),z.assert(F.pos<=F.end);const re=Math.min(F.pos,q),Y=F.end>=U?F.end+Q:Math.min(F.end,q);if(z.assert(re<=Y),F.parent){const ue=F.parent;z.assertGreaterThanOrEqual(re,ue.pos),z.assertLessThanOrEqual(Y,ue.end)}Bv(F,re,Y)}function m(F,j){if(j){let U=F.pos;const q=Q=>{z.assert(Q.pos>=U),U=Q.end};if(Jp(F))for(const Q of F.jsDoc)q(Q);jo(F,q),z.assert(U<=F.end)}}function C(F,j,U,q,Q,re,Y,ue){te(F);return;function te(oe){if(z.assert(oe.pos<=oe.end),oe.pos>U){u(oe,F,!1,Q,re,Y,ue);return}const pe=oe.end;if(pe>=j){if(RTe(oe),$ae(oe,F),p(oe,j,U,q,Q),jo(oe,te,Se),Jp(oe))for(const ye of oe.jsDoc)te(ye);m(oe,ue);return}z.assert(peU){u(oe,F,!0,Q,re,Y,ue);return}const pe=oe.end;if(pe>=j){RTe(oe),p(oe,j,U,q,Q);for(const ye of oe)te(ye);return}z.assert(pe0&&Y<=1;Y++){const ue=T(F,q);z.assert(ue.pos<=q);const te=ue.pos;q=Math.max(0,te-1)}const Q=sd(q,zu(j.span)),re=j.newLength+(j.span.start-q);return LB(Q,re)}function T(F,j){let U=F,q;if(jo(F,re),q){const Y=Q(q);Y.pos>U.pos&&(U=Y)}return U;function Q(Y){for(;;){const ue=Hoe(Y);if(ue)Y=ue;else return Y}}function re(Y){if(!vu(Y))if(Y.pos<=j){if(Y.pos>=U.pos&&(U=Y),jj),!0}}function E(F,j,U,q){const Q=F.text;if(U&&(z.assert(Q.length-U.span.length+U.newLength===j.length),q||z.shouldAssert(3))){const re=Q.substr(0,U.span.start),Y=j.substr(0,U.span.start);z.assert(re===Y);const ue=Q.substring(zu(U.span),Q.length),te=j.substring(zu(t8(U)),j.length);z.assert(ue===te)}}function N(F){let j=F.statements,U=0;z.assert(U=Se.pos&&Y=Se.pos&&Y{F[F.Value=-1]="Value"})(R||(R={}))})(ale||(ale={}));function xf(t){return lle(t)!==void 0}function lle(t){const r=p6(t,hG,!1);if(r)return r;if(tu(t,".ts")){const a=fd(t).lastIndexOf(".d.");if(a>=0)return t.substring(a)}}function pLt(t,r,a,u){if(t){if(t==="import")return 99;if(t==="require")return 1;u(r,a-r,k.resolution_mode_should_be_either_require_or_import)}}function cle(t,r){const a=[];for(const u of Hy(r,0)||x){const h=r.substring(u.pos,u.end);yLt(a,u,h)}t.pragmas=new Map;for(const u of a){if(t.pragmas.has(u.name)){const h=t.pragmas.get(u.name);h instanceof Array?h.push(u.args):t.pragmas.set(u.name,[h,u.args]);continue}t.pragmas.set(u.name,u.args)}}function ule(t,r){t.checkJsDirective=void 0,t.referencedFiles=[],t.typeReferenceDirectives=[],t.libReferenceDirectives=[],t.amdDependencies=[],t.hasNoDefaultLib=!1,t.pragmas.forEach((a,u)=>{switch(u){case"reference":{const h=t.referencedFiles,p=t.typeReferenceDirectives,m=t.libReferenceDirectives;W(NL(a),C=>{const{types:b,lib:T,path:E,["resolution-mode"]:N,preserve:R}=C.arguments,F=R==="true"?!0:void 0;if(C.arguments["no-default-lib"]==="true")t.hasNoDefaultLib=!0;else if(b){const j=pLt(N,b.pos,b.end,r);p.push({pos:b.pos,end:b.end,fileName:b.value,...j?{resolutionMode:j}:{},...F?{preserve:F}:{}})}else T?m.push({pos:T.pos,end:T.end,fileName:T.value,...F?{preserve:F}:{}}):E?h.push({pos:E.pos,end:E.end,fileName:E.value,...F?{preserve:F}:{}}):r(C.range.pos,C.range.end-C.range.pos,k.Invalid_reference_directive_syntax)});break}case"amd-dependency":{t.amdDependencies=Yt(NL(a),h=>({name:h.arguments.name,path:h.arguments.path}));break}case"amd-module":{if(a instanceof Array)for(const h of a)t.moduleName&&r(h.range.pos,h.range.end-h.range.pos,k.An_AMD_module_cannot_have_multiple_name_assignments),t.moduleName=h.arguments.name;else t.moduleName=a.arguments.name;break}case"ts-nocheck":case"ts-check":{W(NL(a),h=>{(!t.checkJsDirective||h.range.pos>t.checkJsDirective.pos)&&(t.checkJsDirective={enabled:u==="ts-check",end:h.range.end,pos:h.range.pos})});break}case"jsx":case"jsxfrag":case"jsximportsource":case"jsxruntime":return;default:z.fail("Unhandled pragma kind")}})}var FTe=new Map;function gLt(t){if(FTe.has(t))return FTe.get(t);const r=new RegExp(`(\\s${t}\\s*=\\s*)(?:(?:'([^']*)')|(?:"([^"]*)"))`,"im");return FTe.set(t,r),r}var mLt=/^\/\/\/\s*<(\S+)\s.*?\/>/im,vLt=/^\/\/\/?\s*@([^\s:]+)(.*)\s*$/im;function yLt(t,r,a){const u=r.kind===2&&mLt.exec(a);if(u){const p=u[1].toLowerCase(),m=m$[p];if(!m||!(m.kind&1))return;if(m.args){const C={};for(const b of m.args){const E=gLt(b.name).exec(a);if(!E&&!b.optional)return;if(E){const N=E[2]||E[3];if(b.captureSpan){const R=r.pos+E.index+E[1].length+1;C[b.name]={value:N,pos:R,end:R+N.length}}else C[b.name]=N}}t.push({name:p,args:{arguments:C,range:r}})}else t.push({name:p,args:{arguments:{},range:r}});return}const h=r.kind===2&&vLt.exec(a);if(h)return WJe(t,r,2,h);if(r.kind===3){const p=/@(\S+)(\s+.*)?$/gim;let m;for(;m=p.exec(a);)WJe(t,r,4,m)}}function WJe(t,r,a,u){if(!u)return;const h=u[1].toLowerCase(),p=m$[h];if(!p||!(p.kind&a))return;const m=u[2],C=bLt(p,m);C!=="fail"&&t.push({name:h,args:{arguments:C,range:r}})}function bLt(t,r){if(!r)return{};if(!t.args)return{};const a=r.trim().split(/\s+/),u={};for(let h=0;h[""+r,t])),HJe=[["es5","lib.es5.d.ts"],["es6","lib.es2015.d.ts"],["es2015","lib.es2015.d.ts"],["es7","lib.es2016.d.ts"],["es2016","lib.es2016.d.ts"],["es2017","lib.es2017.d.ts"],["es2018","lib.es2018.d.ts"],["es2019","lib.es2019.d.ts"],["es2020","lib.es2020.d.ts"],["es2021","lib.es2021.d.ts"],["es2022","lib.es2022.d.ts"],["es2023","lib.es2023.d.ts"],["esnext","lib.esnext.d.ts"],["dom","lib.dom.d.ts"],["dom.iterable","lib.dom.iterable.d.ts"],["dom.asynciterable","lib.dom.asynciterable.d.ts"],["webworker","lib.webworker.d.ts"],["webworker.importscripts","lib.webworker.importscripts.d.ts"],["webworker.iterable","lib.webworker.iterable.d.ts"],["webworker.asynciterable","lib.webworker.asynciterable.d.ts"],["scripthost","lib.scripthost.d.ts"],["es2015.core","lib.es2015.core.d.ts"],["es2015.collection","lib.es2015.collection.d.ts"],["es2015.generator","lib.es2015.generator.d.ts"],["es2015.iterable","lib.es2015.iterable.d.ts"],["es2015.promise","lib.es2015.promise.d.ts"],["es2015.proxy","lib.es2015.proxy.d.ts"],["es2015.reflect","lib.es2015.reflect.d.ts"],["es2015.symbol","lib.es2015.symbol.d.ts"],["es2015.symbol.wellknown","lib.es2015.symbol.wellknown.d.ts"],["es2016.array.include","lib.es2016.array.include.d.ts"],["es2016.intl","lib.es2016.intl.d.ts"],["es2017.date","lib.es2017.date.d.ts"],["es2017.object","lib.es2017.object.d.ts"],["es2017.sharedmemory","lib.es2017.sharedmemory.d.ts"],["es2017.string","lib.es2017.string.d.ts"],["es2017.intl","lib.es2017.intl.d.ts"],["es2017.typedarrays","lib.es2017.typedarrays.d.ts"],["es2018.asyncgenerator","lib.es2018.asyncgenerator.d.ts"],["es2018.asynciterable","lib.es2018.asynciterable.d.ts"],["es2018.intl","lib.es2018.intl.d.ts"],["es2018.promise","lib.es2018.promise.d.ts"],["es2018.regexp","lib.es2018.regexp.d.ts"],["es2019.array","lib.es2019.array.d.ts"],["es2019.object","lib.es2019.object.d.ts"],["es2019.string","lib.es2019.string.d.ts"],["es2019.symbol","lib.es2019.symbol.d.ts"],["es2019.intl","lib.es2019.intl.d.ts"],["es2020.bigint","lib.es2020.bigint.d.ts"],["es2020.date","lib.es2020.date.d.ts"],["es2020.promise","lib.es2020.promise.d.ts"],["es2020.sharedmemory","lib.es2020.sharedmemory.d.ts"],["es2020.string","lib.es2020.string.d.ts"],["es2020.symbol.wellknown","lib.es2020.symbol.wellknown.d.ts"],["es2020.intl","lib.es2020.intl.d.ts"],["es2020.number","lib.es2020.number.d.ts"],["es2021.promise","lib.es2021.promise.d.ts"],["es2021.string","lib.es2021.string.d.ts"],["es2021.weakref","lib.es2021.weakref.d.ts"],["es2021.intl","lib.es2021.intl.d.ts"],["es2022.array","lib.es2022.array.d.ts"],["es2022.error","lib.es2022.error.d.ts"],["es2022.intl","lib.es2022.intl.d.ts"],["es2022.object","lib.es2022.object.d.ts"],["es2022.sharedmemory","lib.es2022.sharedmemory.d.ts"],["es2022.string","lib.es2022.string.d.ts"],["es2022.regexp","lib.es2022.regexp.d.ts"],["es2023.array","lib.es2023.array.d.ts"],["es2023.collection","lib.es2023.collection.d.ts"],["es2023.intl","lib.es2023.intl.d.ts"],["esnext.array","lib.es2023.array.d.ts"],["esnext.collection","lib.esnext.collection.d.ts"],["esnext.symbol","lib.es2019.symbol.d.ts"],["esnext.asynciterable","lib.es2018.asynciterable.d.ts"],["esnext.intl","lib.esnext.intl.d.ts"],["esnext.disposable","lib.esnext.disposable.d.ts"],["esnext.bigint","lib.es2020.bigint.d.ts"],["esnext.string","lib.es2022.string.d.ts"],["esnext.promise","lib.esnext.promise.d.ts"],["esnext.weakref","lib.es2021.weakref.d.ts"],["esnext.decorators","lib.esnext.decorators.d.ts"],["esnext.object","lib.esnext.object.d.ts"],["esnext.array","lib.esnext.array.d.ts"],["esnext.regexp","lib.esnext.regexp.d.ts"],["esnext.string","lib.esnext.string.d.ts"],["decorators","lib.decorators.d.ts"],["decorators.legacy","lib.decorators.legacy.d.ts"]],lK=HJe.map(t=>t[0]),dle=new Map(HJe),BP=[{name:"watchFile",type:new Map(Object.entries({fixedpollinginterval:0,prioritypollinginterval:1,dynamicprioritypolling:2,fixedchunksizepolling:3,usefsevents:4,usefseventsonparentdirectory:5})),category:k.Watch_and_Build_Modes,description:k.Specify_how_the_TypeScript_watch_mode_works,defaultValueDescription:4},{name:"watchDirectory",type:new Map(Object.entries({usefsevents:0,fixedpollinginterval:1,dynamicprioritypolling:2,fixedchunksizepolling:3})),category:k.Watch_and_Build_Modes,description:k.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality,defaultValueDescription:0},{name:"fallbackPolling",type:new Map(Object.entries({fixedinterval:0,priorityinterval:1,dynamicpriority:2,fixedchunksize:3})),category:k.Watch_and_Build_Modes,description:k.Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers,defaultValueDescription:1},{name:"synchronousWatchDirectory",type:"boolean",category:k.Watch_and_Build_Modes,description:k.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,defaultValueDescription:!1},{name:"excludeDirectories",type:"list",element:{name:"excludeDirectory",type:"string",isFilePath:!0,extraValidation:aDe},allowConfigDirTemplateSubstitution:!0,category:k.Watch_and_Build_Modes,description:k.Remove_a_list_of_directories_from_the_watch_process},{name:"excludeFiles",type:"list",element:{name:"excludeFile",type:"string",isFilePath:!0,extraValidation:aDe},allowConfigDirTemplateSubstitution:!0,category:k.Watch_and_Build_Modes,description:k.Remove_a_list_of_files_from_the_watch_mode_s_processing}],cK=[{name:"help",shortName:"h",type:"boolean",showInSimplifiedHelpView:!0,isCommandLineOnly:!0,category:k.Command_line_Options,description:k.Print_this_message,defaultValueDescription:!1},{name:"help",shortName:"?",type:"boolean",isCommandLineOnly:!0,category:k.Command_line_Options,defaultValueDescription:!1},{name:"watch",shortName:"w",type:"boolean",showInSimplifiedHelpView:!0,isCommandLineOnly:!0,category:k.Command_line_Options,description:k.Watch_input_files,defaultValueDescription:!1},{name:"preserveWatchOutput",type:"boolean",showInSimplifiedHelpView:!1,category:k.Output_Formatting,description:k.Disable_wiping_the_console_in_watch_mode,defaultValueDescription:!1},{name:"listFiles",type:"boolean",category:k.Compiler_Diagnostics,description:k.Print_all_of_the_files_read_during_the_compilation,defaultValueDescription:!1},{name:"explainFiles",type:"boolean",category:k.Compiler_Diagnostics,description:k.Print_files_read_during_the_compilation_including_why_it_was_included,defaultValueDescription:!1},{name:"listEmittedFiles",type:"boolean",category:k.Compiler_Diagnostics,description:k.Print_the_names_of_emitted_files_after_a_compilation,defaultValueDescription:!1},{name:"pretty",type:"boolean",showInSimplifiedHelpView:!0,category:k.Output_Formatting,description:k.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read,defaultValueDescription:!0},{name:"traceResolution",type:"boolean",category:k.Compiler_Diagnostics,description:k.Log_paths_used_during_the_moduleResolution_process,defaultValueDescription:!1},{name:"diagnostics",type:"boolean",category:k.Compiler_Diagnostics,description:k.Output_compiler_performance_information_after_building,defaultValueDescription:!1},{name:"extendedDiagnostics",type:"boolean",category:k.Compiler_Diagnostics,description:k.Output_more_detailed_compiler_performance_information_after_building,defaultValueDescription:!1},{name:"generateCpuProfile",type:"string",isFilePath:!0,paramType:k.FILE_OR_DIRECTORY,category:k.Compiler_Diagnostics,description:k.Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging,defaultValueDescription:"profile.cpuprofile"},{name:"generateTrace",type:"string",isFilePath:!0,isCommandLineOnly:!0,paramType:k.DIRECTORY,category:k.Compiler_Diagnostics,description:k.Generates_an_event_trace_and_a_list_of_types},{name:"incremental",shortName:"i",type:"boolean",category:k.Projects,description:k.Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects,transpileOptionValue:void 0,defaultValueDescription:k.false_unless_composite_is_set},{name:"declaration",shortName:"d",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:k.Emit,transpileOptionValue:void 0,description:k.Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project,defaultValueDescription:k.false_unless_composite_is_set},{name:"declarationMap",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:k.Emit,defaultValueDescription:!1,description:k.Create_sourcemaps_for_d_ts_files},{name:"emitDeclarationOnly",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:k.Emit,description:k.Only_output_d_ts_files_and_not_JavaScript_files,transpileOptionValue:void 0,defaultValueDescription:!1},{name:"sourceMap",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:k.Emit,defaultValueDescription:!1,description:k.Create_source_map_files_for_emitted_JavaScript_files},{name:"inlineSourceMap",type:"boolean",affectsBuildInfo:!0,category:k.Emit,description:k.Include_sourcemap_files_inside_the_emitted_JavaScript,defaultValueDescription:!1},{name:"assumeChangesOnlyAffectDirectDependencies",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,category:k.Watch_and_Build_Modes,description:k.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it,defaultValueDescription:!1},{name:"locale",type:"string",category:k.Command_line_Options,isCommandLineOnly:!0,description:k.Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit,defaultValueDescription:k.Platform_specific}],fle={name:"target",shortName:"t",type:new Map(Object.entries({es3:0,es5:1,es6:2,es2015:2,es2016:3,es2017:4,es2018:5,es2019:6,es2020:7,es2021:8,es2022:9,es2023:10,esnext:99})),affectsSourceFile:!0,affectsModuleResolution:!0,affectsEmit:!0,affectsBuildInfo:!0,deprecatedKeys:new Set(["es3"]),paramType:k.VERSION,showInSimplifiedHelpView:!0,category:k.Language_and_Environment,description:k.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,defaultValueDescription:1},BTe={name:"module",shortName:"m",type:new Map(Object.entries({none:0,commonjs:1,amd:2,system:4,umd:3,es6:5,es2015:5,es2020:6,es2022:7,esnext:99,node16:100,nodenext:199,preserve:200})),affectsSourceFile:!0,affectsModuleResolution:!0,affectsEmit:!0,affectsBuildInfo:!0,paramType:k.KIND,showInSimplifiedHelpView:!0,category:k.Modules,description:k.Specify_what_module_code_is_generated,defaultValueDescription:void 0},WTe=[{name:"all",type:"boolean",showInSimplifiedHelpView:!0,category:k.Command_line_Options,description:k.Show_all_compiler_options,defaultValueDescription:!1},{name:"version",shortName:"v",type:"boolean",showInSimplifiedHelpView:!0,category:k.Command_line_Options,description:k.Print_the_compiler_s_version,defaultValueDescription:!1},{name:"init",type:"boolean",showInSimplifiedHelpView:!0,category:k.Command_line_Options,description:k.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,defaultValueDescription:!1},{name:"project",shortName:"p",type:"string",isFilePath:!0,showInSimplifiedHelpView:!0,category:k.Command_line_Options,paramType:k.FILE_OR_DIRECTORY,description:k.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json},{name:"build",type:"boolean",shortName:"b",showInSimplifiedHelpView:!0,category:k.Command_line_Options,description:k.Build_one_or_more_projects_and_their_dependencies_if_out_of_date,defaultValueDescription:!1},{name:"showConfig",type:"boolean",showInSimplifiedHelpView:!0,category:k.Command_line_Options,isCommandLineOnly:!0,description:k.Print_the_final_configuration_instead_of_building,defaultValueDescription:!1},{name:"listFilesOnly",type:"boolean",category:k.Command_line_Options,isCommandLineOnly:!0,description:k.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,defaultValueDescription:!1},fle,BTe,{name:"lib",type:"list",element:{name:"lib",type:dle,defaultValueDescription:void 0},affectsProgramStructure:!0,showInSimplifiedHelpView:!0,category:k.Language_and_Environment,description:k.Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment,transpileOptionValue:void 0},{name:"allowJs",type:"boolean",allowJsFlag:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:k.JavaScript_Support,description:k.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,defaultValueDescription:!1},{name:"checkJs",type:"boolean",affectsModuleResolution:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:k.JavaScript_Support,description:k.Enable_error_reporting_in_type_checked_JavaScript_files,defaultValueDescription:!1},{name:"jsx",type:VJe,affectsSourceFile:!0,affectsEmit:!0,affectsBuildInfo:!0,affectsModuleResolution:!0,affectsSemanticDiagnostics:!0,paramType:k.KIND,showInSimplifiedHelpView:!0,category:k.Language_and_Environment,description:k.Specify_what_JSX_code_is_generated,defaultValueDescription:void 0},{name:"outFile",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:k.FILE,showInSimplifiedHelpView:!0,category:k.Emit,description:k.Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output,transpileOptionValue:void 0},{name:"outDir",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:k.DIRECTORY,showInSimplifiedHelpView:!0,category:k.Emit,description:k.Specify_an_output_folder_for_all_emitted_files},{name:"rootDir",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:k.LOCATION,category:k.Modules,description:k.Specify_the_root_folder_within_your_source_files,defaultValueDescription:k.Computed_from_the_list_of_input_files},{name:"composite",type:"boolean",affectsBuildInfo:!0,isTSConfigOnly:!0,category:k.Projects,transpileOptionValue:void 0,defaultValueDescription:!1,description:k.Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references},{name:"tsBuildInfoFile",type:"string",affectsEmit:!0,affectsBuildInfo:!0,isFilePath:!0,paramType:k.FILE,category:k.Projects,transpileOptionValue:void 0,defaultValueDescription:".tsbuildinfo",description:k.Specify_the_path_to_tsbuildinfo_incremental_compilation_file},{name:"removeComments",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:k.Emit,defaultValueDescription:!1,description:k.Disable_emitting_comments},{name:"noCheck",type:"boolean",showInSimplifiedHelpView:!1,category:k.Compiler_Diagnostics,description:k.Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported,transpileOptionValue:!0,defaultValueDescription:!1,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,extraValidation(){return[k.Unknown_compiler_option_0,"noCheck"]}},{name:"noEmit",type:"boolean",showInSimplifiedHelpView:!0,category:k.Emit,description:k.Disable_emitting_files_from_a_compilation,transpileOptionValue:void 0,defaultValueDescription:!1},{name:"importHelpers",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,affectsSourceFile:!0,category:k.Emit,description:k.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,defaultValueDescription:!1},{name:"importsNotUsedAsValues",type:new Map(Object.entries({remove:0,preserve:1,error:2})),affectsEmit:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Backwards_Compatibility,description:k.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,defaultValueDescription:0},{name:"downlevelIteration",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:k.Emit,description:k.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,defaultValueDescription:!1},{name:"isolatedModules",type:"boolean",category:k.Interop_Constraints,description:k.Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports,transpileOptionValue:!0,defaultValueDescription:!1},{name:"verbatimModuleSyntax",type:"boolean",affectsEmit:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Interop_Constraints,description:k.Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting,defaultValueDescription:!1},{name:"isolatedDeclarations",type:"boolean",category:k.Interop_Constraints,description:k.Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files,defaultValueDescription:!1,affectsBuildInfo:!0,affectsSemanticDiagnostics:!0},{name:"strict",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:k.Type_Checking,description:k.Enable_all_strict_type_checking_options,defaultValueDescription:!1},{name:"noImplicitAny",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:k.Type_Checking,description:k.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,defaultValueDescription:k.false_unless_strict_is_set},{name:"strictNullChecks",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:k.Type_Checking,description:k.When_type_checking_take_into_account_null_and_undefined,defaultValueDescription:k.false_unless_strict_is_set},{name:"strictFunctionTypes",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:k.Type_Checking,description:k.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,defaultValueDescription:k.false_unless_strict_is_set},{name:"strictBindCallApply",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:k.Type_Checking,description:k.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,defaultValueDescription:k.false_unless_strict_is_set},{name:"strictPropertyInitialization",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:k.Type_Checking,description:k.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,defaultValueDescription:k.false_unless_strict_is_set},{name:"noImplicitThis",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:k.Type_Checking,description:k.Enable_error_reporting_when_this_is_given_the_type_any,defaultValueDescription:k.false_unless_strict_is_set},{name:"useUnknownInCatchVariables",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:k.Type_Checking,description:k.Default_catch_clause_variables_as_unknown_instead_of_any,defaultValueDescription:k.false_unless_strict_is_set},{name:"alwaysStrict",type:"boolean",affectsSourceFile:!0,affectsEmit:!0,affectsBuildInfo:!0,strictFlag:!0,category:k.Type_Checking,description:k.Ensure_use_strict_is_always_emitted,defaultValueDescription:k.false_unless_strict_is_set},{name:"noUnusedLocals",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Type_Checking,description:k.Enable_error_reporting_when_local_variables_aren_t_read,defaultValueDescription:!1},{name:"noUnusedParameters",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Type_Checking,description:k.Raise_an_error_when_a_function_parameter_isn_t_read,defaultValueDescription:!1},{name:"exactOptionalPropertyTypes",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Type_Checking,description:k.Interpret_optional_property_types_as_written_rather_than_adding_undefined,defaultValueDescription:!1},{name:"noImplicitReturns",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Type_Checking,description:k.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,defaultValueDescription:!1},{name:"noFallthroughCasesInSwitch",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Type_Checking,description:k.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,defaultValueDescription:!1},{name:"noUncheckedIndexedAccess",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Type_Checking,description:k.Add_undefined_to_a_type_when_accessed_using_an_index,defaultValueDescription:!1},{name:"noImplicitOverride",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Type_Checking,description:k.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,defaultValueDescription:!1},{name:"noPropertyAccessFromIndexSignature",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!1,category:k.Type_Checking,description:k.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,defaultValueDescription:!1},{name:"moduleResolution",type:new Map(Object.entries({node10:2,node:2,classic:1,node16:3,nodenext:99,bundler:100})),deprecatedKeys:new Set(["node"]),affectsSourceFile:!0,affectsModuleResolution:!0,paramType:k.STRATEGY,category:k.Modules,description:k.Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier,defaultValueDescription:k.module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node},{name:"baseUrl",type:"string",affectsModuleResolution:!0,isFilePath:!0,category:k.Modules,description:k.Specify_the_base_directory_to_resolve_non_relative_module_names},{name:"paths",type:"object",affectsModuleResolution:!0,allowConfigDirTemplateSubstitution:!0,isTSConfigOnly:!0,category:k.Modules,description:k.Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations,transpileOptionValue:void 0},{name:"rootDirs",type:"list",isTSConfigOnly:!0,element:{name:"rootDirs",type:"string",isFilePath:!0},affectsModuleResolution:!0,allowConfigDirTemplateSubstitution:!0,category:k.Modules,description:k.Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules,transpileOptionValue:void 0,defaultValueDescription:k.Computed_from_the_list_of_input_files},{name:"typeRoots",type:"list",element:{name:"typeRoots",type:"string",isFilePath:!0},affectsModuleResolution:!0,allowConfigDirTemplateSubstitution:!0,category:k.Modules,description:k.Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types},{name:"types",type:"list",element:{name:"types",type:"string"},affectsProgramStructure:!0,showInSimplifiedHelpView:!0,category:k.Modules,description:k.Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file,transpileOptionValue:void 0},{name:"allowSyntheticDefaultImports",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Interop_Constraints,description:k.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,defaultValueDescription:k.module_system_or_esModuleInterop},{name:"esModuleInterop",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:k.Interop_Constraints,description:k.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,defaultValueDescription:!1},{name:"preserveSymlinks",type:"boolean",category:k.Interop_Constraints,description:k.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node,defaultValueDescription:!1},{name:"allowUmdGlobalAccess",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Modules,description:k.Allow_accessing_UMD_globals_from_modules,defaultValueDescription:!1},{name:"moduleSuffixes",type:"list",element:{name:"suffix",type:"string"},listPreserveFalsyValues:!0,affectsModuleResolution:!0,category:k.Modules,description:k.List_of_file_name_suffixes_to_search_when_resolving_a_module},{name:"allowImportingTsExtensions",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Modules,description:k.Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set,defaultValueDescription:!1,transpileOptionValue:void 0},{name:"resolvePackageJsonExports",type:"boolean",affectsModuleResolution:!0,category:k.Modules,description:k.Use_the_package_json_exports_field_when_resolving_package_imports,defaultValueDescription:k.true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false},{name:"resolvePackageJsonImports",type:"boolean",affectsModuleResolution:!0,category:k.Modules,description:k.Use_the_package_json_imports_field_when_resolving_imports,defaultValueDescription:k.true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false},{name:"customConditions",type:"list",element:{name:"condition",type:"string"},affectsModuleResolution:!0,category:k.Modules,description:k.Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports},{name:"sourceRoot",type:"string",affectsEmit:!0,affectsBuildInfo:!0,paramType:k.LOCATION,category:k.Emit,description:k.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code},{name:"mapRoot",type:"string",affectsEmit:!0,affectsBuildInfo:!0,paramType:k.LOCATION,category:k.Emit,description:k.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations},{name:"inlineSources",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:k.Emit,description:k.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,defaultValueDescription:!1},{name:"experimentalDecorators",type:"boolean",affectsEmit:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Language_and_Environment,description:k.Enable_experimental_support_for_legacy_experimental_decorators,defaultValueDescription:!1},{name:"emitDecoratorMetadata",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,category:k.Language_and_Environment,description:k.Emit_design_type_metadata_for_decorated_declarations_in_source_files,defaultValueDescription:!1},{name:"jsxFactory",type:"string",category:k.Language_and_Environment,description:k.Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h,defaultValueDescription:"`React.createElement`"},{name:"jsxFragmentFactory",type:"string",category:k.Language_and_Environment,description:k.Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment,defaultValueDescription:"React.Fragment"},{name:"jsxImportSource",type:"string",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,affectsModuleResolution:!0,affectsSourceFile:!0,category:k.Language_and_Environment,description:k.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,defaultValueDescription:"react"},{name:"resolveJsonModule",type:"boolean",affectsModuleResolution:!0,category:k.Modules,description:k.Enable_importing_json_files,defaultValueDescription:!1},{name:"allowArbitraryExtensions",type:"boolean",affectsProgramStructure:!0,category:k.Modules,description:k.Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present,defaultValueDescription:!1},{name:"out",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!1,category:k.Backwards_Compatibility,paramType:k.FILE,transpileOptionValue:void 0,description:k.Deprecated_setting_Use_outFile_instead},{name:"reactNamespace",type:"string",affectsEmit:!0,affectsBuildInfo:!0,category:k.Language_and_Environment,description:k.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit,defaultValueDescription:"`React`"},{name:"skipDefaultLibCheck",type:"boolean",affectsBuildInfo:!0,category:k.Completeness,description:k.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,defaultValueDescription:!1},{name:"charset",type:"string",category:k.Backwards_Compatibility,description:k.No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files,defaultValueDescription:"utf8"},{name:"emitBOM",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:k.Emit,description:k.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,defaultValueDescription:!1},{name:"newLine",type:new Map(Object.entries({crlf:0,lf:1})),affectsEmit:!0,affectsBuildInfo:!0,paramType:k.NEWLINE,category:k.Emit,description:k.Set_the_newline_character_for_emitting_files,defaultValueDescription:"lf"},{name:"noErrorTruncation",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Output_Formatting,description:k.Disable_truncating_types_in_error_messages,defaultValueDescription:!1},{name:"noLib",type:"boolean",category:k.Language_and_Environment,affectsProgramStructure:!0,description:k.Disable_including_any_library_files_including_the_default_lib_d_ts,transpileOptionValue:!0,defaultValueDescription:!1},{name:"noResolve",type:"boolean",affectsModuleResolution:!0,category:k.Modules,description:k.Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project,transpileOptionValue:!0,defaultValueDescription:!1},{name:"stripInternal",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:k.Emit,description:k.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,defaultValueDescription:!1},{name:"disableSizeLimit",type:"boolean",affectsProgramStructure:!0,category:k.Editor_Support,description:k.Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server,defaultValueDescription:!1},{name:"disableSourceOfProjectReferenceRedirect",type:"boolean",isTSConfigOnly:!0,category:k.Projects,description:k.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects,defaultValueDescription:!1},{name:"disableSolutionSearching",type:"boolean",isTSConfigOnly:!0,category:k.Projects,description:k.Opt_a_project_out_of_multi_project_reference_checking_when_editing,defaultValueDescription:!1},{name:"disableReferencedProjectLoad",type:"boolean",isTSConfigOnly:!0,category:k.Projects,description:k.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript,defaultValueDescription:!1},{name:"noImplicitUseStrict",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Backwards_Compatibility,description:k.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,defaultValueDescription:!1},{name:"noEmitHelpers",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:k.Emit,description:k.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,defaultValueDescription:!1},{name:"noEmitOnError",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:k.Emit,transpileOptionValue:void 0,description:k.Disable_emitting_files_if_any_type_checking_errors_are_reported,defaultValueDescription:!1},{name:"preserveConstEnums",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:k.Emit,description:k.Disable_erasing_const_enum_declarations_in_generated_code,defaultValueDescription:!1},{name:"declarationDir",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:k.DIRECTORY,category:k.Emit,transpileOptionValue:void 0,description:k.Specify_the_output_directory_for_generated_declaration_files},{name:"skipLibCheck",type:"boolean",affectsBuildInfo:!0,category:k.Completeness,description:k.Skip_type_checking_all_d_ts_files,defaultValueDescription:!1},{name:"allowUnusedLabels",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Type_Checking,description:k.Disable_error_reporting_for_unused_labels,defaultValueDescription:void 0},{name:"allowUnreachableCode",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Type_Checking,description:k.Disable_error_reporting_for_unreachable_code,defaultValueDescription:void 0},{name:"suppressExcessPropertyErrors",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Backwards_Compatibility,description:k.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,defaultValueDescription:!1},{name:"suppressImplicitAnyIndexErrors",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Backwards_Compatibility,description:k.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,defaultValueDescription:!1},{name:"forceConsistentCasingInFileNames",type:"boolean",affectsModuleResolution:!0,category:k.Interop_Constraints,description:k.Ensure_that_casing_is_correct_in_imports,defaultValueDescription:!0},{name:"maxNodeModuleJsDepth",type:"number",affectsModuleResolution:!0,category:k.JavaScript_Support,description:k.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs,defaultValueDescription:0},{name:"noStrictGenericChecks",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Backwards_Compatibility,description:k.Disable_strict_checking_of_generic_signatures_in_function_types,defaultValueDescription:!1},{name:"useDefineForClassFields",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,category:k.Language_and_Environment,description:k.Emit_ECMAScript_standard_compliant_class_fields,defaultValueDescription:k.true_for_ES2022_and_above_including_ESNext},{name:"preserveValueImports",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:k.Backwards_Compatibility,description:k.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,defaultValueDescription:!1},{name:"keyofStringsOnly",type:"boolean",category:k.Backwards_Compatibility,description:k.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option,defaultValueDescription:!1},{name:"plugins",type:"list",isTSConfigOnly:!0,element:{name:"plugin",type:"object"},description:k.Specify_a_list_of_language_service_plugins_to_include,category:k.Editor_Support},{name:"moduleDetection",type:new Map(Object.entries({auto:2,legacy:1,force:3})),affectsSourceFile:!0,affectsModuleResolution:!0,description:k.Control_what_method_is_used_to_detect_module_format_JS_files,category:k.Language_and_Environment,defaultValueDescription:k.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules},{name:"ignoreDeprecations",type:"string",defaultValueDescription:void 0}],K0=[...cK,...WTe],VTe=K0.filter(t=>!!t.affectsSemanticDiagnostics),HTe=K0.filter(t=>!!t.affectsEmit),jTe=K0.filter(t=>!!t.affectsDeclarationPath),hle=K0.filter(t=>!!t.affectsModuleResolution),_le=K0.filter(t=>!!t.affectsSourceFile||!!t.affectsBindDiagnostics),zTe=K0.filter(t=>!!t.affectsProgramStructure),UTe=K0.filter(t=>Vl(t,"transpileOptionValue")),qTe=K0.filter(t=>t.allowConfigDirTemplateSubstitution||!t.isCommandLineOnly&&t.isFilePath),$Te=BP.filter(t=>t.allowConfigDirTemplateSubstitution||!t.isCommandLineOnly&&t.isFilePath),JTe=K0.filter(CLt);function CLt(t){return!mo(t.type)}var ple=[{name:"verbose",shortName:"v",category:k.Command_line_Options,description:k.Enable_verbose_logging,type:"boolean",defaultValueDescription:!1},{name:"dry",shortName:"d",category:k.Command_line_Options,description:k.Show_what_would_be_built_or_deleted_if_specified_with_clean,type:"boolean",defaultValueDescription:!1},{name:"force",shortName:"f",category:k.Command_line_Options,description:k.Build_all_projects_including_those_that_appear_to_be_up_to_date,type:"boolean",defaultValueDescription:!1},{name:"clean",category:k.Command_line_Options,description:k.Delete_the_outputs_of_all_projects,type:"boolean",defaultValueDescription:!1}],DV=[...cK,...ple],uK=[{name:"enable",type:"boolean",defaultValueDescription:!1},{name:"include",type:"list",element:{name:"include",type:"string"}},{name:"exclude",type:"list",element:{name:"exclude",type:"string"}},{name:"disableFilenameBasedTypeAcquisition",type:"boolean",defaultValueDescription:!1}];function dK(t){const r=new Map,a=new Map;return W(t,u=>{r.set(u.name.toLowerCase(),u),u.shortName&&a.set(u.shortName,u.name)}),{optionsNameMap:r,shortOptionNames:a}}var jJe;function g3(){return jJe||(jJe=dK(K0))}var SLt={diagnostic:k.Compiler_option_0_may_only_be_used_with_build,getOptionsNameMap:JJe},gle={module:1,target:3,strict:!0,esModuleInterop:!0,forceConsistentCasingInFileNames:!0,skipLibCheck:!0};function GTe(t){return zJe(t,Gc)}function zJe(t,r){const a=Fn(t.type.keys()),u=(t.deprecatedKeys?a.filter(h=>!t.deprecatedKeys.has(h)):a).map(h=>`'${h}'`).join(", ");return r(k.Argument_for_0_option_must_be_Colon_1,`--${t.name}`,u)}function fK(t,r,a){return DGe(t,(r??"").trim(),a)}function KTe(t,r="",a){if(r=r.trim(),ro(r,"-"))return;if(t.type==="listOrElement"&&!r.includes(","))return WP(t,r,a);if(r==="")return[];const u=r.split(",");switch(t.element.type){case"number":return ns(u,h=>WP(t.element,parseInt(h),a));case"string":return ns(u,h=>WP(t.element,h||"",a));case"boolean":case"object":return z.fail(`List of ${t.element.type} is not yet supported.`);default:return ns(u,h=>fK(t.element,h,a))}}function UJe(t){return t.name}function QTe(t,r,a,u,h){var p;if((p=r.alternateMode)!=null&&p.getOptionsNameMap().optionsNameMap.has(t.toLowerCase()))return Xk(h,u,r.alternateMode.diagnostic,t);const m=qE(t,r.optionDeclarations,UJe);return m?Xk(h,u,r.unknownDidYouMeanDiagnostic,a||t,m.name):Xk(h,u,r.unknownOptionDiagnostic,a||t)}function mle(t,r,a){const u={};let h;const p=[],m=[];return C(r),{options:u,watchOptions:h,fileNames:p,errors:m};function C(T){let E=0;for(;EWd.readFile(F)));if(!mo(E)){m.push(E);return}const N=[];let R=0;for(;;){for(;R=E.length)break;const F=R;if(E.charCodeAt(F)===34){for(R++;R32;)R++;N.push(E.substring(F,R))}}C(N)}}function qJe(t,r,a,u,h,p){if(u.isTSConfigOnly){const m=t[r];m==="null"?(h[u.name]=void 0,r++):u.type==="boolean"?m==="false"?(h[u.name]=WP(u,!1,p),r++):(m==="true"&&r++,p.push(Gc(k.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line,u.name))):(p.push(Gc(k.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line,u.name)),m&&!ro(m,"-")&&r++)}else if(!t[r]&&u.type!=="boolean"&&p.push(Gc(a.optionTypeMismatchDiagnostic,u.name,Sle(u))),t[r]!=="null")switch(u.type){case"number":h[u.name]=WP(u,parseInt(t[r]),p),r++;break;case"boolean":const m=t[r];h[u.name]=WP(u,m!=="false",p),(m==="false"||m==="true")&&r++;break;case"string":h[u.name]=WP(u,t[r]||"",p),r++;break;case"list":const C=KTe(u,t[r],p);h[u.name]=C||[],C&&r++;break;case"listOrElement":z.fail("listOrElement not supported here");break;default:h[u.name]=fK(u,t[r],p),r++;break}else h[u.name]=void 0,r++;return r}var hK={alternateMode:SLt,getOptionsNameMap:g3,optionDeclarations:K0,unknownOptionDiagnostic:k.Unknown_compiler_option_0,unknownDidYouMeanDiagnostic:k.Unknown_compiler_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:k.Compiler_option_0_expects_an_argument};function XTe(t,r){return mle(hK,t,r)}function vle(t,r){return ZTe(g3,t,r)}function ZTe(t,r,a=!1){r=r.toLowerCase();const{optionsNameMap:u,shortOptionNames:h}=t();if(a){const p=h.get(r);p!==void 0&&(r=p)}return u.get(r)}var $Je;function JJe(){return $Je||($Je=dK(DV))}var wLt={diagnostic:k.Compiler_option_0_may_not_be_used_with_build,getOptionsNameMap:g3},xLt={alternateMode:wLt,getOptionsNameMap:JJe,optionDeclarations:DV,unknownOptionDiagnostic:k.Unknown_build_option_0,unknownDidYouMeanDiagnostic:k.Unknown_build_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:k.Build_option_0_requires_a_value_of_type_1};function YTe(t){const{options:r,watchOptions:a,fileNames:u,errors:h}=mle(xLt,t),p=r;return u.length===0&&u.push("."),p.clean&&p.force&&h.push(Gc(k.Options_0_and_1_cannot_be_combined,"clean","force")),p.clean&&p.verbose&&h.push(Gc(k.Options_0_and_1_cannot_be_combined,"clean","verbose")),p.clean&&p.watch&&h.push(Gc(k.Options_0_and_1_cannot_be_combined,"clean","watch")),p.watch&&p.dry&&h.push(Gc(k.Options_0_and_1_cannot_be_combined,"watch","dry")),{buildOptions:p,watchOptions:a,projects:u,errors:h}}function H_(t,...r){return ua(Gc(t,...r).messageText,mo)}function EV(t,r,a,u,h,p){const m=I7(t,T=>a.readFile(T));if(!mo(m)){a.onUnRecoverableConfigFileDiagnostic(m);return}const C=kV(t,m),b=a.getCurrentDirectory();return C.path=_c(t,b,Zf(a.useCaseSensitiveFileNames)),C.resolvedPath=C.path,C.originalFileName=C.fileName,LV(C,a,bo(rs(t),b),r,bo(t,b),void 0,p,u,h)}function IV(t,r){const a=I7(t,r);return mo(a)?yle(t,a):{config:{},error:a}}function yle(t,r){const a=kV(t,r);return{config:oGe(a,a.parseDiagnostics,void 0),error:a.parseDiagnostics.length?a.parseDiagnostics[0]:void 0}}function eDe(t,r){const a=I7(t,r);return mo(a)?kV(t,a):{fileName:t,parseDiagnostics:[a]}}function I7(t,r){let a;try{a=r(t)}catch(u){return Gc(k.Cannot_read_file_0_Colon_1,t,u.message)}return a===void 0?Gc(k.Cannot_read_file_0,t):a}function ble(t){return P_(t,UJe)}var GJe={optionDeclarations:uK,unknownOptionDiagnostic:k.Unknown_type_acquisition_option_0,unknownDidYouMeanDiagnostic:k.Unknown_type_acquisition_option_0_Did_you_mean_1},KJe;function QJe(){return KJe||(KJe=dK(BP))}var Cle={getOptionsNameMap:QJe,optionDeclarations:BP,unknownOptionDiagnostic:k.Unknown_watch_option_0,unknownDidYouMeanDiagnostic:k.Unknown_watch_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:k.Watch_option_0_requires_a_value_of_type_1},XJe;function ZJe(){return XJe||(XJe=ble(K0))}var YJe;function eGe(){return YJe||(YJe=ble(BP))}var tGe;function iGe(){return tGe||(tGe=ble(uK))}var _K={name:"extends",type:"listOrElement",element:{name:"extends",type:"string"},category:k.File_Management,disallowNullOrUndefined:!0},nGe={name:"compilerOptions",type:"object",elementOptions:ZJe(),extraKeyDiagnostics:hK},rGe={name:"watchOptions",type:"object",elementOptions:eGe(),extraKeyDiagnostics:Cle},sGe={name:"typeAcquisition",type:"object",elementOptions:iGe(),extraKeyDiagnostics:GJe},tDe;function kLt(){return tDe===void 0&&(tDe={name:void 0,type:"object",elementOptions:ble([nGe,rGe,sGe,_K,{name:"references",type:"list",element:{name:"references",type:"object"},category:k.Projects},{name:"files",type:"list",element:{name:"files",type:"string"},category:k.File_Management},{name:"include",type:"list",element:{name:"include",type:"string"},category:k.File_Management,defaultValueDescription:k.if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk},{name:"exclude",type:"list",element:{name:"exclude",type:"string"},category:k.File_Management,defaultValueDescription:k.node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified},aK])}),tDe}function oGe(t,r,a){var u;const h=(u=t.statements[0])==null?void 0:u.expression;if(h&&h.kind!==210){if(r.push(Jg(t,h,k.The_root_value_of_a_0_file_must_be_an_object,fd(t.fileName)==="jsconfig.json"?"jsconfig.json":"tsconfig.json")),Rf(h)){const p=Me(h.elements,Pa);if(p)return NV(t,p,r,!0,a)}return{}}return NV(t,h,r,!0,a)}function iDe(t,r){var a;return NV(t,(a=t.statements[0])==null?void 0:a.expression,r,!0,void 0)}function NV(t,r,a,u,h){if(!r)return u?{}:void 0;return C(r,h==null?void 0:h.rootOptions);function p(T,E){var N;const R=u?{}:void 0;for(const F of T.properties){if(F.kind!==303){a.push(Jg(t,F,k.Property_assignment_expected));continue}F.questionToken&&a.push(Jg(t,F.questionToken,k.The_0_modifier_can_only_be_used_in_TypeScript_files,"?")),b(F.name)||a.push(Jg(t,F.name,k.String_literal_with_double_quotes_expected));const j=YB(F.name)?void 0:UL(F.name),U=j&&Ws(j),q=U?(N=E==null?void 0:E.elementOptions)==null?void 0:N.get(U):void 0,Q=C(F.initializer,q);typeof U<"u"&&(u&&(R[U]=Q),h==null||h.onPropertySet(U,Q,F,E,q))}return R}function m(T,E){if(!u){T.forEach(N=>C(N,E));return}return Ri(T.map(N=>C(N,E)),N=>N!==void 0)}function C(T,E){switch(T.kind){case 112:return!0;case 97:return!1;case 106:return null;case 11:return b(T)||a.push(Jg(t,T,k.String_literal_with_double_quotes_expected)),T.text;case 9:return Number(T.text);case 224:if(T.operator!==41||T.operand.kind!==9)break;return-Number(T.operand.text);case 210:return p(T,E);case 209:return m(T.elements,E&&E.element)}E?a.push(Jg(t,T,k.Compiler_option_0_requires_a_value_of_type_1,E.name,Sle(E))):a.push(Jg(t,T,k.Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal))}function b(T){return ja(T)&&SJ(T,t)}}function Sle(t){return t.type==="listOrElement"?`${Sle(t.element)} or Array`:t.type==="list"?"Array":mo(t.type)?t.type:"string"}function aGe(t,r){if(t){if(PV(r))return!t.disallowNullOrUndefined;if(t.type==="list")return Lo(r);if(t.type==="listOrElement")return Lo(r)||aGe(t.element,r);const a=mo(t.type)?t.type:"string";return typeof r===a}return!1}function wle(t,r,a){var u,h,p;const m=Zf(a.useCaseSensitiveFileNames),C=Yt(Ri(t.fileNames,(h=(u=t.options.configFile)==null?void 0:u.configFileSpecs)!=null&&h.validatedIncludeSpecs?DLt(r,t.options.configFile.configFileSpecs.validatedIncludeSpecs,t.options.configFile.configFileSpecs.validatedExcludeSpecs,a):vk),j=>KR(bo(r,a.getCurrentDirectory()),bo(j,a.getCurrentDirectory()),m)),b={configFilePath:bo(r,a.getCurrentDirectory()),useCaseSensitiveFileNames:a.useCaseSensitiveFileNames},T=gK(t.options,b),E=t.watchOptions&&ELt(t.watchOptions),N={compilerOptions:{...pK(T),showConfig:void 0,configFile:void 0,configFilePath:void 0,help:void 0,init:void 0,listFiles:void 0,listEmittedFiles:void 0,project:void 0,build:void 0,version:void 0},watchOptions:E&&pK(E),references:Yt(t.projectReferences,j=>({...j,path:j.originalPath?j.originalPath:"",originalPath:void 0})),files:O(C)?C:void 0,...(p=t.options.configFile)!=null&&p.configFileSpecs?{include:TLt(t.options.configFile.configFileSpecs.validatedIncludeSpecs),exclude:t.options.configFile.configFileSpecs.validatedExcludeSpecs}:{},compileOnSave:t.compileOnSave?!0:void 0},R=new Set(T.keys()),F={};for(const j in Cd)if(!R.has(j)&&Rt(Cd[j].dependencies,U=>R.has(U))){const U=Cd[j].computeValue(t.options),q=Cd[j].computeValue({});U!==q&&(F[j]=Cd[j].computeValue(t.options))}return qo(N.compilerOptions,pK(gK(F,b))),N}function pK(t){return{...Fn(t.entries()).reduce((r,a)=>({...r,[a[0]]:a[1]}),{})}}function TLt(t){if(O(t)){if(O(t)!==1)return t;if(t[0]!==Tle)return t}}function DLt(t,r,a,u){if(!r)return vk;const h=uG(t,a,r,u.useCaseSensitiveFileNames,u.getCurrentDirectory()),p=h.excludePattern&&Gw(h.excludePattern,u.useCaseSensitiveFileNames),m=h.includeFilePattern&&Gw(h.includeFilePattern,u.useCaseSensitiveFileNames);return m?p?C=>!(m.test(C)&&!p.test(C)):C=>!m.test(C):p?C=>p.test(C):vk}function lGe(t){switch(t.type){case"string":case"number":case"boolean":case"object":return;case"list":case"listOrElement":return lGe(t.element);default:return t.type}}function xle(t,r){return hf(r,(a,u)=>{if(a===t)return u})}function gK(t,r){return cGe(t,g3(),r)}function ELt(t){return cGe(t,QJe())}function cGe(t,{optionsNameMap:r},a){const u=new Map,h=a&&Zf(a.useCaseSensitiveFileNames);for(const p in t)if(Vl(t,p)){if(r.has(p)&&(r.get(p).category===k.Command_line_Options||r.get(p).category===k.Output_Formatting))continue;const m=t[p],C=r.get(p.toLowerCase());if(C){z.assert(C.type!=="listOrElement");const b=lGe(C);b?C.type==="list"?u.set(p,m.map(T=>xle(T,b))):u.set(p,xle(m,b)):a&&C.isFilePath?u.set(p,KR(a.configFilePath,bo(m,rs(a.configFilePath)),h)):a&&C.type==="list"&&C.element.isFilePath?u.set(p,m.map(T=>KR(a.configFilePath,bo(T,rs(a.configFilePath)),h))):u.set(p,m)}}return u}function nDe(t,r){const a=uGe(t);return h();function u(p){return Array(p+1).join(" ")}function h(){const p=[],m=u(2);return WTe.forEach(C=>{if(!a.has(C.name))return;const b=a.get(C.name),T=dDe(C);b!==T?p.push(`${m}${C.name}: ${b}`):Vl(gle,C.name)&&p.push(`${m}${C.name}: ${T}`)}),p.join(r)+r}}function uGe(t){const r=hB(t,gle);return gK(r)}function rDe(t,r,a){const u=uGe(t);return m();function h(C){return Array(C+1).join(" ")}function p({category:C,name:b,isCommandLineOnly:T}){const E=[k.Command_line_Options,k.Editor_Support,k.Compiler_Diagnostics,k.Backwards_Compatibility,k.Watch_and_Build_Modes,k.Output_Formatting];return!T&&C!==void 0&&(!E.includes(C)||u.has(b))}function m(){const C=new Map;C.set(k.Projects,[]),C.set(k.Language_and_Environment,[]),C.set(k.Modules,[]),C.set(k.JavaScript_Support,[]),C.set(k.Emit,[]),C.set(k.Interop_Constraints,[]),C.set(k.Type_Checking,[]),C.set(k.Completeness,[]);for(const F of K0)if(p(F)){let j=C.get(F.category);j||C.set(F.category,j=[]),j.push(F)}let b=0,T=0;const E=[];C.forEach((F,j)=>{E.length!==0&&E.push({value:""}),E.push({value:`/* ${Po(j)} */`});for(const U of F){let q;u.has(U.name)?q=`"${U.name}": ${JSON.stringify(u.get(U.name))}${(T+=1)===u.size?"":","}`:q=`// "${U.name}": ${JSON.stringify(dDe(U))},`,E.push({value:q,description:`/* ${U.description&&Po(U.description)||U.name} */`}),b=Math.max(q.length,b)}});const N=h(2),R=[];R.push("{"),R.push(`${N}"compilerOptions": {`),R.push(`${N}${N}/* ${Po(k.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file)} */`),R.push("");for(const F of E){const{value:j,description:U=""}=F;R.push(j&&`${N}${N}${j}${U&&h(b-j.length+2)+U}`)}if(r.length){R.push(`${N}},`),R.push(`${N}"files": [`);for(let F=0;Ftypeof et=="object","object"),ye=ue(te("files"));if(ye){const et=pe==="no-prop"||Lo(pe)&&pe.length===0,He=Vl(R,"extends");if(ye.length===0&&et&&!He)if(r){const We=m||"tsconfig.json",Ue=k.The_files_list_in_config_file_0_is_empty,Ye=sW(r,"files",nt=>nt.initializer),wt=Xk(r,Ye,Ue,We);E.push(wt)}else oe(k.The_files_list_in_config_file_0_is_empty,m||"tsconfig.json")}let be=ue(te("include"));const _e=te("exclude");let ve=!1,Ee=ue(_e);if(_e==="no-prop"){const et=F.outDir,He=F.declarationDir;(et||He)&&(Ee=Ri([et,He],We=>!!We))}ye===void 0&&be===void 0&&(be=[Tle],ve=!0);let ke,Fe,Oe,fe;be&&(ke=LGe(be,E,!0,r,"include"),Oe=yK(ke,U)||ke),Ee&&(Fe=LGe(Ee,E,!1,r,"exclude"),fe=yK(Fe,U)||Fe);const Ie=Ri(ye,mo),Le=yK(Ie,U)||Ie;return{filesSpecs:ye,includeSpecs:be,excludeSpecs:Ee,validatedFilesSpec:Le,validatedIncludeSpecs:Oe,validatedExcludeSpecs:fe,validatedFilesSpecBeforeSubstitution:Ie,validatedIncludeSpecsBeforeSubstitution:ke,validatedExcludeSpecsBeforeSubstitution:Fe,pathPatterns:void 0,isDefaultIncludeSpec:ve}}function re(pe){const ye=L7(q,pe,F,a,b);return vGe(ye,N7(R),C)&&E.push(mGe(q,m)),ye}function Y(pe){let ye;const be=Se("references",_e=>typeof _e=="object","object");if(Lo(be))for(const _e of be)typeof _e.path!="string"?oe(k.Compiler_option_0_requires_a_value_of_type_1,"reference.path","string"):(ye||(ye=[])).push({path:bo(_e.path,pe),originalPath:_e.path,prepend:_e.prepend,circular:_e.circular});return ye}function ue(pe){return Lo(pe)?pe:void 0}function te(pe){return Se(pe,mo,"string")}function Se(pe,ye,be){if(Vl(R,pe)&&!PV(R[pe]))if(Lo(R[pe])){const _e=R[pe];return!r&&!Be(_e,ye)&&E.push(Gc(k.Compiler_option_0_requires_a_value_of_type_1,pe,be)),_e}else return oe(k.Compiler_option_0_requires_a_value_of_type_1,pe,"Array"),"not-array";return"no-prop"}function oe(pe,...ye){r||E.push(Gc(pe,...ye))}}function vK(t,r){return _Ge(t,$Te,r)}function _Ge(t,r,a){if(!t)return t;let u;for(const p of r)if(t[p.name]!==void 0){const m=t[p.name];switch(p.type){case"string":z.assert(p.isFilePath),Dle(m)&&h(p,gGe(m,a));break;case"list":z.assert(p.element.isFilePath);const C=yK(m,a);C&&h(p,C);break;case"object":z.assert(p.name==="paths");const b=NLt(m,a);b&&h(p,b);break;default:z.fail("option type not supported")}}return u||t;function h(p,m){(u??(u=qo({},t)))[p.name]=m}}var pGe="${configDir}";function Dle(t){return mo(t)&&ro(t,pGe,!0)}function gGe(t,r){return bo(t.replace(pGe,"./"),r)}function yK(t,r){if(!t)return t;let a;return t.forEach((u,h)=>{Dle(u)&&((a??(a=t.slice()))[h]=gGe(u,r))}),a}function NLt(t,r){let a;return wm(t).forEach(h=>{if(!Lo(t[h]))return;const p=yK(t[h],r);p&&((a??(a=qo({},t)))[h]=p)}),a}function LLt(t){return t.code===k.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code}function mGe({includeSpecs:t,excludeSpecs:r},a){return Gc(k.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2,a||"tsconfig.json",JSON.stringify(t||[]),JSON.stringify(r||[]))}function vGe(t,r,a){return t.length===0&&r&&(!a||a.length===0)}function N7(t){return!Vl(t,"files")&&!Vl(t,"references")}function bK(t,r,a,u,h){const p=u.length;return vGe(t,h)?u.push(mGe(a,r)):ao(u,m=>!LLt(m)),p!==u.length}function PLt(t){return!!t.options}function yGe(t,r,a,u,h,p,m,C){var b;u=Lf(u);const T=bo(h||"",u);if(p.includes(T))return m.push(Gc(k.Circularity_detected_while_resolving_configuration_Colon_0,[...p,T].join(" -> "))),{raw:t||iDe(r,m)};const E=t?ALt(t,a,u,h,m):OLt(r,a,u,h,m);if((b=E.options)!=null&&b.paths&&(E.options.pathsBasePath=u),E.extendedConfigPath){p=p.concat([T]);const R={options:{}};mo(E.extendedConfigPath)?N(R,E.extendedConfigPath):E.extendedConfigPath.forEach(F=>N(R,F)),R.include&&(E.raw.include=R.include),R.exclude&&(E.raw.exclude=R.exclude),R.files&&(E.raw.files=R.files),E.raw.compileOnSave===void 0&&R.compileOnSave&&(E.raw.compileOnSave=R.compileOnSave),r&&R.extendedSourceFiles&&(r.extendedSourceFiles=Fn(R.extendedSourceFiles.keys())),E.options=qo(R.options,E.options),E.watchOptions=E.watchOptions&&R.watchOptions?qo(R.watchOptions,E.watchOptions):E.watchOptions||R.watchOptions}return E;function N(R,F){const j=MLt(r,F,a,p,m,C,R);if(j&&PLt(j)){const U=j.raw;let q;const Q=re=>{E.raw[re]||U[re]&&(R[re]=Yt(U[re],Y=>Dle(Y)||Sp(Y)?Y:Hr(q||(q=GR(rs(F),u,Zf(a.useCaseSensitiveFileNames))),Y)))};Q("include"),Q("exclude"),Q("files"),U.compileOnSave!==void 0&&(R.compileOnSave=U.compileOnSave),qo(R.options,j.options),R.watchOptions=R.watchOptions&&j.watchOptions?qo({},R.watchOptions,j.watchOptions):R.watchOptions||j.watchOptions}}}function ALt(t,r,a,u,h){Vl(t,"excludes")&&h.push(Gc(k.Unknown_option_excludes_Did_you_mean_exclude));const p=kGe(t.compilerOptions,a,h,u),m=TGe(t.typeAcquisition,a,h,u),C=FLt(t.watchOptions,a,h);t.compileOnSave=RLt(t,a,h);const b=t.extends||t.extends===""?bGe(t.extends,r,a,u,h):void 0;return{raw:t,options:p,watchOptions:C,typeAcquisition:m,extendedConfigPath:b}}function bGe(t,r,a,u,h,p,m,C){let b;const T=u?fGe(u,a):a;if(mo(t))b=CGe(t,r,T,h,m,C);else if(Lo(t)){b=[];for(let E=0;Ere.name===F)&&(T=xi(T,U.name))))}}function CGe(t,r,a,u,h,p){if(t=Lf(t),Sp(t)||ro(t,"./")||ro(t,"../")){let C=bo(t,a);if(!r.fileExists(C)&&!mu(C,".json")&&(C=`${C}.json`,!r.fileExists(C))){u.push(Xk(p,h,k.File_0_not_found,t));return}return C}const m=xDe(t,Hr(a,"tsconfig.json"),r);if(m.resolvedModule)return m.resolvedModule.resolvedFileName;t===""?u.push(Xk(p,h,k.Compiler_option_0_cannot_be_given_an_empty_string,"extends")):u.push(Xk(p,h,k.File_0_not_found,t))}function MLt(t,r,a,u,h,p,m){const C=a.useCaseSensitiveFileNames?r:Ow(r);let b,T,E;if(p&&(b=p.get(C))?{extendedResult:T,extendedConfig:E}=b:(T=eDe(r,N=>a.readFile(N)),T.parseDiagnostics.length||(E=yGe(void 0,T,a,rs(r),fd(r),u,h,p)),p&&p.set(C,{extendedResult:T,extendedConfig:E})),t&&((m.extendedSourceFiles??(m.extendedSourceFiles=new Set)).add(T.fileName),T.extendedSourceFiles))for(const N of T.extendedSourceFiles)m.extendedSourceFiles.add(N);if(T.parseDiagnostics.length){h.push(...T.parseDiagnostics);return}return E}function RLt(t,r,a){if(!Vl(t,aK.name))return!1;const u=xI(aK,t.compileOnSave,r,a);return typeof u=="boolean"&&u}function SGe(t,r,a){const u=[];return{options:kGe(t,r,u,a),errors:u}}function wGe(t,r,a){const u=[];return{options:TGe(t,r,u,a),errors:u}}function xGe(t){return t&&fd(t)==="jsconfig.json"?{allowJs:!0,maxNodeModuleJsDepth:2,allowSyntheticDefaultImports:!0,skipLibCheck:!0,noEmit:!0}:{}}function kGe(t,r,a,u){const h=xGe(u);return sDe(ZJe(),t,r,h,hK,a),u&&(h.configFilePath=Lf(u)),h}function Ele(t){return{enable:!!t&&fd(t)==="jsconfig.json",include:[],exclude:[]}}function TGe(t,r,a,u){const h=Ele(u);return sDe(iGe(),t,r,h,GJe,a),h}function FLt(t,r,a){return sDe(eGe(),t,r,void 0,Cle,a)}function sDe(t,r,a,u,h,p){if(r){for(const m in r){const C=t.get(m);C?(u||(u={}))[C.name]=xI(C,r[m],a,p):p.push(QTe(m,h))}return u}}function Xk(t,r,a,...u){return t&&r?Jg(t,r,a,...u):Gc(a,...u)}function xI(t,r,a,u,h,p,m){if(t.isCommandLineOnly){u.push(Xk(m,h==null?void 0:h.name,k.Option_0_can_only_be_specified_on_command_line,t.name));return}if(aGe(t,r)){const C=t.type;if(C==="list"&&Lo(r))return EGe(t,r,a,u,h,p,m);if(C==="listOrElement")return Lo(r)?EGe(t,r,a,u,h,p,m):xI(t.element,r,a,u,h,p,m);if(!mo(t.type))return DGe(t,r,u,p,m);const b=WP(t,r,u,p,m);return PV(b)?b:BLt(t,a,b)}else u.push(Xk(m,p,k.Compiler_option_0_requires_a_value_of_type_1,t.name,Sle(t)))}function BLt(t,r,a){return t.isFilePath&&(a=Lf(a),a=Dle(a)?a:bo(a,r),a===""&&(a=".")),a}function WP(t,r,a,u,h){var p;if(PV(r))return;const m=(p=t.extraValidation)==null?void 0:p.call(t,r);if(!m)return r;a.push(Xk(h,u,...m))}function DGe(t,r,a,u,h){if(PV(r))return;const p=r.toLowerCase(),m=t.type.get(p);if(m!==void 0)return WP(t,m,a,u,h);a.push(zJe(t,(C,...b)=>Xk(h,u,C,...b)))}function EGe(t,r,a,u,h,p,m){return Ri(Yt(r,(C,b)=>xI(t.element,C,a,u,h,p==null?void 0:p.elements[b],m)),C=>t.listPreserveFalsyValues?!0:!!C)}var WLt=/(^|\/)\*\*\/?$/,VLt=/^[^*?]*(?=\/[^/]*[*?])/;function L7(t,r,a,u,h=x){r=ra(r);const p=Zf(u.useCaseSensitiveFileNames),m=new Map,C=new Map,b=new Map,{validatedFilesSpec:T,validatedIncludeSpecs:E,validatedExcludeSpecs:N}=t,R=K8(a,h),F=GW(a,R);if(T)for(const Q of T){const re=bo(Q,r);m.set(p(re),re)}let j;if(E&&E.length>0)for(const Q of u.readDirectory(r,zs(F),N,E,void 0)){if(tu(Q,".json")){if(!j){const ue=E.filter(Se=>mu(Se,".json")),te=Yt(lG(ue,r,"files"),Se=>`^${Se}$`);j=te?te.map(Se=>Gw(Se,u.useCaseSensitiveFileNames)):x}if(Nt(j,ue=>ue.test(Q))!==-1){const ue=p(Q);!m.has(ue)&&!b.has(ue)&&b.set(ue,Q)}continue}if(zLt(Q,m,C,R,p))continue;ULt(Q,C,R,p);const re=p(Q);!m.has(re)&&!C.has(re)&&C.set(re,Q)}const U=Fn(m.values()),q=Fn(C.values());return U.concat(q,Fn(b.values()))}function oDe(t,r,a,u,h){const{validatedFilesSpec:p,validatedIncludeSpecs:m,validatedExcludeSpecs:C}=r;if(!O(m)||!O(C))return!1;a=ra(a);const b=Zf(u);if(p){for(const T of p)if(b(bo(T,a))===t)return!1}return NGe(t,C,u,h,a)}function IGe(t){const r=ro(t,"**/")?0:t.indexOf("/**/");return r===-1?!1:(mu(t,"/..")?t.length:t.lastIndexOf("/../"))>r}function CK(t,r,a,u){return NGe(t,Ri(r,h=>!IGe(h)),a,u)}function NGe(t,r,a,u,h){const p=J8(r,Hr(ra(u),h),"exclude"),m=p&&Gw(p,a);return m?m.test(t)?!0:!_6(t)&&m.test(Xd(t)):!1}function LGe(t,r,a,u,h){return t.filter(m=>{if(!mo(m))return!1;const C=aDe(m,a);return C!==void 0&&r.push(p(...C)),C===void 0});function p(m,C){const b=dJ(u,h,C);return Xk(u,b,m,C)}}function aDe(t,r){if(z.assert(typeof t=="string"),r&&WLt.test(t))return[k.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0,t];if(IGe(t))return[k.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0,t]}function HLt({validatedIncludeSpecs:t,validatedExcludeSpecs:r},a,u){const h=J8(r,a,"exclude"),p=h&&new RegExp(h,u?"":"i"),m={},C=new Map;if(t!==void 0){const b=[];for(const T of t){const E=ra(Hr(a,T));if(p&&p.test(E))continue;const N=jLt(E,u);if(N){const{key:R,path:F,flags:j}=N,U=C.get(R),q=U!==void 0?m[U]:void 0;(q===void 0||qrd(t,m)?m:void 0);if(!p)return!1;for(const m of p){if(tu(t,m)&&(m!==".ts"||!tu(t,".d.ts")))return!1;const C=h(Kw(t,m));if(r.has(C)||a.has(C)){if(m===".d.ts"&&(tu(t,".js")||tu(t,".jsx")))continue;return!0}}return!1}function ULt(t,r,a,u){const h=W(a,p=>rd(t,p)?p:void 0);if(h)for(let p=h.length-1;p>=0;p--){const m=h[p];if(tu(t,m))return;const C=u(Kw(t,m));r.delete(C)}}function cDe(t){const r={};for(const a in t)if(Vl(t,a)){const u=vle(a);u!==void 0&&(r[a]=uDe(t[a],u))}return r}function uDe(t,r){if(t===void 0)return t;switch(r.type){case"object":return"";case"string":return"";case"number":return typeof t=="number"?t:"";case"boolean":return typeof t=="boolean"?t:"";case"listOrElement":if(!Lo(t))return uDe(t,r.element);case"list":const a=r.element;return Lo(t)?ns(t,u=>uDe(u,a)):"";default:return hf(r.type,(u,h)=>{if(u===t)return h})}}function dDe(t){switch(t.type){case"number":return 1;case"boolean":return!0;case"string":const r=t.defaultValueDescription;return t.isFilePath?`./${r&&typeof r=="string"?r:""}`:"";case"list":return[];case"listOrElement":return dDe(t.element);case"object":return{};default:const a=Pw(t.type.keys());return a!==void 0?a:z.fail("Expected 'option.type' to have entries.")}}function lo(t,r,...a){t.trace(lP(r,...a))}function Zb(t,r){return!!t.traceResolution&&r.trace!==void 0}function VP(t,r,a){let u;if(r&&t){const h=t.contents.packageJsonContent;typeof h.name=="string"&&typeof h.version=="string"&&(u={name:h.name,subModuleName:r.path.slice(t.packageDirectory.length+Hc.length),version:h.version,peerDependencies:fPt(t,a)})}return r&&{path:r.path,extension:r.ext,packageId:u,resolvedUsingTsExtension:r.resolvedUsingTsExtension}}function Ile(t){return VP(void 0,t,void 0)}function PGe(t){if(t)return z.assert(t.packageId===void 0),{path:t.path,ext:t.extension,resolvedUsingTsExtension:t.resolvedUsingTsExtension}}function SK(t){const r=[];return t&1&&r.push("TypeScript"),t&2&&r.push("JavaScript"),t&4&&r.push("Declaration"),t&8&&r.push("JSON"),r.join(", ")}function qLt(t){const r=[];return t&1&&r.push(..._G),t&2&&r.push(...Z6),t&4&&r.push(...hG),t&8&&r.push(".json"),r}function fDe(t){if(t)return z.assert(mG(t.extension)),{fileName:t.path,packageId:t.packageId}}function AGe(t,r,a,u,h,p,m,C,b){if(!m.resultFromCache&&!m.compilerOptions.preserveSymlinks&&r&&a&&!r.originalPath&&!Zd(t)){const{resolvedFileName:T,originalPath:E}=MGe(r.path,m.host,m.traceEnabled);E&&(r={...r,path:T,originalPath:E})}return OGe(r,a,u,h,p,m.resultFromCache,C,b)}function OGe(t,r,a,u,h,p,m,C){return p?m!=null&&m.isReadonly?{...p,failedLookupLocations:hDe(p.failedLookupLocations,a),affectingLocations:hDe(p.affectingLocations,u),resolutionDiagnostics:hDe(p.resolutionDiagnostics,h)}:(p.failedLookupLocations=m3(p.failedLookupLocations,a),p.affectingLocations=m3(p.affectingLocations,u),p.resolutionDiagnostics=m3(p.resolutionDiagnostics,h),p):{resolvedModule:t&&{resolvedFileName:t.path,originalPath:t.originalPath===!0?void 0:t.originalPath,extension:t.extension,isExternalLibraryImport:r,packageId:t.packageId,resolvedUsingTsExtension:!!t.resolvedUsingTsExtension},failedLookupLocations:P7(a),affectingLocations:P7(u),resolutionDiagnostics:P7(h),alternateResult:C}}function P7(t){return t.length?t:void 0}function m3(t,r){return r!=null&&r.length?t!=null&&t.length?(t.push(...r),t):r:t}function hDe(t,r){return t!=null&&t.length?r.length?[...t,...r]:t.slice():P7(r)}function _De(t,r,a,u){if(!Vl(t,r)){u.traceEnabled&&lo(u.host,k.package_json_does_not_have_a_0_field,r);return}const h=t[r];if(typeof h!==a||h===null){u.traceEnabled&&lo(u.host,k.Expected_type_of_0_field_in_package_json_to_be_1_got_2,r,a,h===null?"null":typeof h);return}return h}function Nle(t,r,a,u){const h=_De(t,r,"string",u);if(h===void 0)return;if(!h){u.traceEnabled&&lo(u.host,k.package_json_had_a_falsy_0_field,r);return}const p=ra(Hr(a,h));return u.traceEnabled&&lo(u.host,k.package_json_has_0_field_1_that_references_2,r,h,p),p}function $Lt(t,r,a){return Nle(t,"typings",r,a)||Nle(t,"types",r,a)}function JLt(t,r,a){return Nle(t,"tsconfig",r,a)}function GLt(t,r,a){return Nle(t,"main",r,a)}function KLt(t,r){const a=_De(t,"typesVersions","object",r);if(a!==void 0)return r.traceEnabled&&lo(r.host,k.package_json_has_a_typesVersions_field_with_version_specific_path_mappings),a}function QLt(t,r){const a=KLt(t,r);if(a===void 0)return;if(r.traceEnabled)for(const m in a)Vl(a,m)&&!h$.tryParse(m)&&lo(r.host,k.package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range,m);const u=wK(a);if(!u){r.traceEnabled&&lo(r.host,k.package_json_does_not_have_a_typesVersions_entry_that_matches_version_0,g);return}const{version:h,paths:p}=u;if(typeof p!="object"){r.traceEnabled&&lo(r.host,k.Expected_type_of_0_field_in_package_json_to_be_1_got_2,`typesVersions['${h}']`,"object",typeof p);return}return u}var pDe;function wK(t){pDe||(pDe=new B0(y));for(const r in t){if(!Vl(t,r))continue;const a=h$.tryParse(r);if(a!==void 0&&a.test(pDe))return{version:r,paths:t[r]}}}function A7(t,r){if(t.typeRoots)return t.typeRoots;let a;if(t.configFilePath?a=rs(t.configFilePath):r.getCurrentDirectory&&(a=r.getCurrentDirectory()),a!==void 0)return XLt(a)}function XLt(t){let r;return c0(ra(t),a=>{const u=Hr(a,ZLt);(r??(r=[])).push(u)}),r}var ZLt=Hr("node_modules","@types");function YLt(t,r,a){const u=typeof a.useCaseSensitiveFileNames=="function"?a.useCaseSensitiveFileNames():a.useCaseSensitiveFileNames;return Mb(t,r,!u)===0}function MGe(t,r,a){const u=zGe(t,r,a),h=YLt(t,u,r);return{resolvedFileName:h?t:u,originalPath:h?void 0:t}}function RGe(t,r,a){const u=mu(t,"/node_modules/@types")||mu(t,"/node_modules/@types/")?tKe(r,a):r;return Hr(t,u)}function gDe(t,r,a,u,h,p,m){z.assert(typeof t=="string","Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.");const C=Zb(a,u);h&&(a=h.commandLine.options);const b=r?rs(r):void 0;let T=b?p==null?void 0:p.getFromDirectoryCache(t,m,b,h):void 0;if(!T&&b&&!Zd(t)&&(T=p==null?void 0:p.getFromNonRelativeNameCache(t,m,b,h)),T)return C&&(lo(u,k.Resolving_type_reference_directive_0_containing_file_1,t,r),h&&lo(u,k.Using_compiler_options_of_project_reference_redirect_0,h.sourceFile.fileName),lo(u,k.Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1,t,b),te(T)),T;const E=A7(a,u);C&&(r===void 0?E===void 0?lo(u,k.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set,t):lo(u,k.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1,t,E):E===void 0?lo(u,k.Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set,t,r):lo(u,k.Resolving_type_reference_directive_0_containing_file_1_root_directory_2,t,r,E),h&&lo(u,k.Using_compiler_options_of_project_reference_redirect_0,h.sourceFile.fileName));const N=[],R=[];let F=mDe(a);m!==void 0&&(F|=30);const j=f_(a);m===99&&3<=j&&j<=99&&(F|=32);const U=F&8?sx(a,m):[],q=[],Q={compilerOptions:a,host:u,traceEnabled:C,failedLookupLocations:N,affectingLocations:R,packageJsonInfoCache:p,features:F,conditions:U,requestContainingDirectory:b,reportDiagnostic:pe=>void q.push(pe),isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1};let re=Se(),Y=!0;re||(re=oe(),Y=!1);let ue;if(re){const{fileName:pe,packageId:ye}=re;let be=pe,_e;a.preserveSymlinks||({resolvedFileName:be,originalPath:_e}=MGe(pe,u,C)),ue={primary:Y,resolvedFileName:be,originalPath:_e,packageId:ye,isExternalLibraryImport:Zk(pe)}}return T={resolvedTypeReferenceDirective:ue,failedLookupLocations:P7(N),affectingLocations:P7(R),resolutionDiagnostics:P7(q)},b&&p&&!p.isReadonly&&(p.getOrCreateCacheForDirectory(b,h).set(t,m,T),Zd(t)||p.getOrCreateCacheForNonRelativeName(t,m,h).set(b,T)),C&&te(T),T;function te(pe){var ye;(ye=pe.resolvedTypeReferenceDirective)!=null&&ye.resolvedFileName?pe.resolvedTypeReferenceDirective.packageId?lo(u,k.Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3,t,pe.resolvedTypeReferenceDirective.resolvedFileName,jw(pe.resolvedTypeReferenceDirective.packageId),pe.resolvedTypeReferenceDirective.primary):lo(u,k.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2,t,pe.resolvedTypeReferenceDirective.resolvedFileName,pe.resolvedTypeReferenceDirective.primary):lo(u,k.Type_reference_directive_0_was_not_resolved,t)}function Se(){if(E&&E.length)return C&&lo(u,k.Resolving_with_primary_search_path_0,E.join(", ")),Z(E,pe=>{const ye=RGe(pe,t,Q),be=U0(pe,u);if(!be&&C&&lo(u,k.Directory_0_does_not_exist_skipping_all_lookups_in_it,pe),a.typeRoots){const _e=b3(4,ye,!be,Q);if(_e){const ve=OV(_e.path),Ee=ve?Yk(ve,!1,Q):void 0;return fDe(VP(Ee,_e,Q))}}return fDe(TDe(4,ye,!be,Q))});C&&lo(u,k.Root_directory_cannot_be_determined_skipping_primary_search_paths)}function oe(){const pe=r&&rs(r);if(pe!==void 0){let ye;if(!a.typeRoots||!mu(r,Q7))if(C&&lo(u,k.Looking_up_in_node_modules_folder_initial_location_0,pe),Zd(t)){const{path:be}=jGe(pe,t);ye=Mle(4,be,!1,Q,!0)}else{const be=XGe(4,t,pe,Q,void 0,void 0);ye=be&&be.value}else C&&lo(u,k.Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder);return fDe(ye)}else C&&lo(u,k.Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder)}}function mDe(t){let r=0;switch(f_(t)){case 3:r=30;break;case 99:r=30;break;case 100:r=30;break}return t.resolvePackageJsonExports?r|=8:t.resolvePackageJsonExports===!1&&(r&=-9),t.resolvePackageJsonImports?r|=2:t.resolvePackageJsonImports===!1&&(r&=-3),r}function sx(t,r){const a=f_(t);if(r===void 0){if(a===100)r=99;else if(a===2)return[]}const u=r===99?["import"]:["require"];return t.noDtsResolution||u.push("types"),a!==100&&u.push("node"),no(u,t.customConditions)}function Lle(t,r,a,u,h){const p=M7(h==null?void 0:h.getPackageJsonInfoCache(),u,a);return c0(r,m=>{if(fd(m)!=="node_modules"){const C=Hr(m,"node_modules"),b=Hr(C,t);return Yk(b,!1,p)}})}function xK(t,r){if(t.types)return t.types;const a=[];if(r.directoryExists&&r.getDirectories){const u=A7(t,r);if(u){for(const h of u)if(r.directoryExists(h))for(const p of r.getDirectories(h)){const m=ra(p),C=Hr(h,m,"package.json");if(!(r.fileExists(C)&&V8(C,r).typings===null)){const T=fd(m);T.charCodeAt(0)!==46&&a.push(T)}}}}return a}function kK(t){return!!(t!=null&&t.contents)}function vDe(t){return!!t&&!t.contents}function yDe(t){var r;if(t===null||typeof t!="object")return""+t;if(Lo(t))return`[${(r=t.map(u=>yDe(u)))==null?void 0:r.join(",")}]`;let a="{";for(const u in t)Vl(t,u)&&(a+=`${u}: ${yDe(t[u])}`);return a+"}"}function Ple(t,r){return r.map(a=>yDe(rG(t,a))).join("|")+`|${t.pathsBasePath}`}function Ale(t,r){const a=new Map,u=new Map;let h=new Map;return t&&a.set(t,h),{getMapOfCacheRedirects:p,getOrCreateMapOfCacheRedirects:m,update:C,clear:T,getOwnMap:()=>h};function p(N){return N?b(N.commandLine.options,!1):h}function m(N){return N?b(N.commandLine.options,!0):h}function C(N){t!==N&&(t?h=b(N,!0):a.set(N,h),t=N)}function b(N,R){let F=a.get(N);if(F)return F;const j=E(N);if(F=u.get(j),!F){if(t){const U=E(t);U===j?F=h:u.has(U)||u.set(U,h)}R&&(F??(F=new Map)),F&&u.set(j,F)}return F&&a.set(N,F),F}function T(){const N=t&&r.get(t);h.clear(),a.clear(),r.clear(),u.clear(),t&&(N&&r.set(t,N),a.set(t,h))}function E(N){let R=r.get(N);return R||r.set(N,R=Ple(N,hle)),R}}function ePt(t,r){let a;return{getPackageJsonInfo:u,setPackageJsonInfo:h,clear:p,getInternalMap:m};function u(C){return a==null?void 0:a.get(_c(C,t,r))}function h(C,b){(a||(a=new Map)).set(_c(C,t,r),b)}function p(){a=void 0}function m(){return a}}function FGe(t,r,a,u){const h=t.getOrCreateMapOfCacheRedirects(r);let p=h.get(a);return p||(p=u(),h.set(a,p)),p}function tPt(t,r,a,u){const h=Ale(a,u);return{getFromDirectoryCache:b,getOrCreateCacheForDirectory:C,clear:p,update:m,directoryToModuleNameMap:h};function p(){h.clear()}function m(T){h.update(T)}function C(T,E){const N=_c(T,t,r);return FGe(h,E,N,()=>v3())}function b(T,E,N,R){var F,j;const U=_c(N,t,r);return(j=(F=h.getMapOfCacheRedirects(R))==null?void 0:F.get(U))==null?void 0:j.get(T,E)}}function O7(t,r){return r===void 0?t:`${r}|${t}`}function v3(){const t=new Map,r=new Map,a={get(h,p){return t.get(u(h,p))},set(h,p,m){return t.set(u(h,p),m),a},delete(h,p){return t.delete(u(h,p)),a},has(h,p){return t.has(u(h,p))},forEach(h){return t.forEach((p,m)=>{const[C,b]=r.get(m);return h(p,C,b)})},size(){return t.size}};return a;function u(h,p){const m=O7(h,p);return r.set(m,[h,p]),m}}function iPt(t){return t.resolvedModule&&(t.resolvedModule.originalPath||t.resolvedModule.resolvedFileName)}function nPt(t){return t.resolvedTypeReferenceDirective&&(t.resolvedTypeReferenceDirective.originalPath||t.resolvedTypeReferenceDirective.resolvedFileName)}function rPt(t,r,a,u,h){const p=Ale(a,h);return{getFromNonRelativeNameCache:b,getOrCreateCacheForNonRelativeName:T,clear:m,update:C};function m(){p.clear()}function C(N){p.update(N)}function b(N,R,F,j){var U,q;return z.assert(!Zd(N)),(q=(U=p.getMapOfCacheRedirects(j))==null?void 0:U.get(O7(N,R)))==null?void 0:q.get(F)}function T(N,R,F){return z.assert(!Zd(N)),FGe(p,F,O7(N,R),E)}function E(){const N=new Map;return{get:R,set:F};function R(U){return N.get(_c(U,t,r))}function F(U,q){const Q=_c(U,t,r);if(N.has(Q))return;N.set(Q,q);const re=u(q),Y=re&&j(Q,re);let ue=Q;for(;ue!==Y;){const te=rs(ue);if(te===ue||N.has(te))break;N.set(te,q),ue=te}}function j(U,q){const Q=_c(rs(q),t,r);let re=0;const Y=Math.min(U.length,Q.length);for(;reu,clearAllExceptPackageJsonInfoCache:T,optionsToRedirectsKey:p};function b(){T(),u.clear()}function T(){m.clear(),C.clear()}function E(N){m.update(N),C.update(N)}}function y3(t,r,a,u,h){const p=BGe(t,r,a,u,iPt,h);return p.getOrCreateCacheForModuleName=(m,C,b)=>p.getOrCreateCacheForNonRelativeName(m,C,b),p}function TK(t,r,a,u,h){return BGe(t,r,a,u,nPt,h)}function Ole(t){return{moduleResolution:2,traceResolution:t.traceResolution}}function DK(t,r,a,u,h){return HP(t,r,Ole(a),u,h)}function WGe(t,r,a,u){const h=rs(r);return a.getFromDirectoryCache(t,u,h,void 0)}function HP(t,r,a,u,h,p,m){var C,b,T;const E=Zb(a,u);p&&(a=p.commandLine.options),E&&(lo(u,k.Resolving_module_0_from_1,t,r),p&&lo(u,k.Using_compiler_options_of_project_reference_redirect_0,p.sourceFile.fileName));const N=rs(r);let R=h==null?void 0:h.getFromDirectoryCache(t,m,N,p);if(R)E&&lo(u,k.Resolution_for_module_0_was_found_in_cache_from_location_1,t,N);else{let F=a.moduleResolution;switch(F===void 0?(F=f_(a),E&&lo(u,k.Module_resolution_kind_is_not_specified_using_0,qR[F])):E&&lo(u,k.Explicitly_specified_module_resolution_kind_Colon_0,qR[F]),(C=c_)==null||C.logStartResolveModule(t),F){case 3:R=lPt(t,r,a,u,h,p,m);break;case 99:R=cPt(t,r,a,u,h,p,m);break;case 2:R=wDe(t,r,a,u,h,p,m?sx(a,m):void 0);break;case 1:R=IDe(t,r,a,u,h,p);break;case 100:R=SDe(t,r,a,u,h,p,m?sx(a,m):void 0);break;default:return z.fail(`Unexpected moduleResolution: ${F}`)}R&&R.resolvedModule&&((b=c_)==null||b.logInfoEvent(`Module "${t}" resolved to "${R.resolvedModule.resolvedFileName}"`)),(T=c_)==null||T.logStopResolveModule(R&&R.resolvedModule?""+R.resolvedModule.resolvedFileName:"null"),h&&!h.isReadonly&&(h.getOrCreateCacheForDirectory(N,p).set(t,m,R),Zd(t)||h.getOrCreateCacheForNonRelativeName(t,m,p).set(N,R))}return E&&(R.resolvedModule?R.resolvedModule.packageId?lo(u,k.Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2,t,R.resolvedModule.resolvedFileName,jw(R.resolvedModule.packageId)):lo(u,k.Module_name_0_was_successfully_resolved_to_1,t,R.resolvedModule.resolvedFileName):lo(u,k.Module_name_0_was_not_resolved,t)),R}function VGe(t,r,a,u,h){const p=sPt(t,r,u,h);return p?p.value:Zd(r)?oPt(t,r,a,u,h):aPt(t,r,u,h)}function sPt(t,r,a,u){var h;const{baseUrl:p,paths:m,configFile:C}=u.compilerOptions;if(m&&!cg(r)){u.traceEnabled&&(p&&lo(u.host,k.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1,p,r),lo(u.host,k.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0,r));const b=MJ(u.compilerOptions,u.host),T=C!=null&&C.configFileSpecs?(h=C.configFileSpecs).pathPatterns||(h.pathPatterns=gG(m)):void 0;return DDe(t,r,b,m,T,a,!1,u)}}function oPt(t,r,a,u,h){if(!h.compilerOptions.rootDirs)return;h.traceEnabled&&lo(h.host,k.rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0,r);const p=ra(Hr(a,r));let m,C;for(const b of h.compilerOptions.rootDirs){let T=ra(b);mu(T,Hc)||(T+=Hc);const E=ro(p,T)&&(C===void 0||C.length(t[t.None=0]="None",t[t.Imports=2]="Imports",t[t.SelfName=4]="SelfName",t[t.Exports=8]="Exports",t[t.ExportsPatternTrailers=16]="ExportsPatternTrailers",t[t.AllFeatures=30]="AllFeatures",t[t.Node16Default=30]="Node16Default",t[t.NodeNextDefault=30]="NodeNextDefault",t[t.BundlerDefault=30]="BundlerDefault",t[t.EsmMode=32]="EsmMode",t))(CDe||{});function lPt(t,r,a,u,h,p,m){return HGe(30,t,r,a,u,h,p,m)}function cPt(t,r,a,u,h,p,m){return HGe(30,t,r,a,u,h,p,m)}function HGe(t,r,a,u,h,p,m,C,b){const T=rs(a),E=C===99?32:0;let N=u.noDtsResolution?3:7;return VT(u)&&(N|=8),AV(t|E,r,T,u,h,p,N,!1,m,b)}function uPt(t,r,a){return AV(0,t,r,{moduleResolution:2,allowJs:!0},a,void 0,2,!1,void 0,void 0)}function SDe(t,r,a,u,h,p,m){const C=rs(r);let b=a.noDtsResolution?3:7;return VT(a)&&(b|=8),AV(mDe(a),t,C,a,u,h,b,!1,p,m)}function wDe(t,r,a,u,h,p,m,C){let b;return C?b=8:a.noDtsResolution?(b=3,VT(a)&&(b|=8)):b=VT(a)?15:7,AV(m?30:0,t,rs(r),a,u,h,b,!!C,p,m)}function xDe(t,r,a){return AV(30,t,rs(r),{moduleResolution:99},a,void 0,8,!0,void 0,void 0)}function AV(t,r,a,u,h,p,m,C,b,T){var E,N,R,F,j;const U=Zb(u,h),q=[],Q=[],re=f_(u);T??(T=sx(u,re===100||re===2?void 0:t&32?99:1));const Y=[],ue={compilerOptions:u,host:h,traceEnabled:U,failedLookupLocations:q,affectingLocations:Q,packageJsonInfoCache:p,features:t,conditions:T??x,requestContainingDirectory:a,reportDiagnostic:pe=>void Y.push(pe),isConfigLookup:C,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1};U&&uP(re)&&lo(h,k.Resolving_in_0_mode_with_conditions_1,t&32?"ESM":"CJS",ue.conditions.map(pe=>`'${pe}'`).join(", "));let te;if(re===2){const pe=m&5,ye=m&-6;te=pe&&oe(pe,ue)||ye&&oe(ye,ue)||void 0}else te=oe(m,ue);let Se;if(ue.resolvedPackageDirectory&&!C&&!Zd(r)){const pe=(te==null?void 0:te.value)&&m&5&&!GGe(5,te.value.resolved.extension);if((E=te==null?void 0:te.value)!=null&&E.isExternalLibraryImport&&pe&&t&8&&(T!=null&&T.includes("import"))){ox(ue,k.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);const ye={...ue,features:ue.features&-9,reportDiagnostic:dl},be=oe(m&5,ye);(N=be==null?void 0:be.value)!=null&&N.isExternalLibraryImport&&(Se=be.value.resolved.path)}else if((!(te!=null&&te.value)||pe)&&re===2){ox(ue,k.Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update);const ye={...ue.compilerOptions,moduleResolution:100},be={...ue,compilerOptions:ye,features:30,conditions:sx(ye),reportDiagnostic:dl},_e=oe(m&5,be);(R=_e==null?void 0:_e.value)!=null&&R.isExternalLibraryImport&&(Se=_e.value.resolved.path)}}return AGe(r,(F=te==null?void 0:te.value)==null?void 0:F.resolved,(j=te==null?void 0:te.value)==null?void 0:j.isExternalLibraryImport,q,Q,Y,ue,p,Se);function oe(pe,ye){const _e=VGe(pe,r,a,(ve,Ee,ke,Fe)=>Mle(ve,Ee,ke,Fe,!0),ye);if(_e)return gg({resolved:_e,isExternalLibraryImport:Zk(_e.path)});if(Zd(r)){const{path:ve,parts:Ee}=jGe(a,r),ke=Mle(pe,ve,!1,ye,!0);return ke&&gg({resolved:ke,isExternalLibraryImport:Mt(Ee,"node_modules")})}else{let ve;if(t&2&&ro(r,"#")&&(ve=gPt(pe,r,a,ye,p,b)),!ve&&t&4&&(ve=pPt(pe,r,a,ye,p,b)),!ve){if(r.includes(":")){U&&lo(h,k.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1,r,SK(pe));return}U&&lo(h,k.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1,r,SK(pe)),ve=XGe(pe,r,a,ye,p,b)}return pe&4&&(ve??(ve=nKe(r,ye))),ve&&{value:ve.value&&{resolved:ve.value,isExternalLibraryImport:!0}}}}}function jGe(t,r){const a=Hr(t,r),u=Qd(a),h=Ql(u);return{path:h==="."||h===".."?Xd(ra(a)):ra(a),parts:u}}function zGe(t,r,a){if(!r.realpath)return t;const u=ra(r.realpath(t));return a&&lo(r,k.Resolving_real_path_for_0_result_1,t,u),u}function Mle(t,r,a,u,h){if(u.traceEnabled&&lo(u.host,k.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1,r,SK(t)),!ZC(r)){if(!a){const m=rs(r);U0(m,u.host)||(u.traceEnabled&&lo(u.host,k.Directory_0_does_not_exist_skipping_all_lookups_in_it,m),a=!0)}const p=b3(t,r,a,u);if(p){const m=h?OV(p.path):void 0,C=m?Yk(m,!1,u):void 0;return VP(C,p,u)}}if(a||U0(r,u.host)||(u.traceEnabled&&lo(u.host,k.Directory_0_does_not_exist_skipping_all_lookups_in_it,r),a=!0),!(u.features&32))return TDe(t,r,a,u,h)}var nb="/node_modules/";function Zk(t){return t.includes(nb)}function OV(t,r){const a=ra(t),u=a.lastIndexOf(nb);if(u===-1)return;const h=u+nb.length;let p=UGe(a,h,r);return a.charCodeAt(h)===64&&(p=UGe(a,p,r)),a.slice(0,p)}function UGe(t,r,a){const u=t.indexOf(Hc,r+1);return u===-1?a?t.length:r:u}function kDe(t,r,a,u){return Ile(b3(t,r,a,u))}function b3(t,r,a,u){const h=qGe(t,r,a,u);if(h)return h;if(!(u.features&32)){const p=$Ge(r,t,"",a,u);if(p)return p}}function qGe(t,r,a,u){if(!fd(r).includes("."))return;let p=h_(r);p===r&&(p=r.substring(0,r.lastIndexOf(".")));const m=r.substring(p.length);return u.traceEnabled&&lo(u.host,k.File_name_0_has_a_1_extension_stripping_it,r,m),$Ge(p,t,m,a,u)}function Rle(t,r,a,u){return t&1&&rd(r,_G)||t&4&&rd(r,hG)?Fle(r,a,u)!==void 0?{path:r,ext:zJ(r),resolvedUsingTsExtension:void 0}:void 0:u.isConfigLookup&&t===8&&tu(r,".json")?Fle(r,a,u)!==void 0?{path:r,ext:".json",resolvedUsingTsExtension:void 0}:void 0:qGe(t,r,a,u)}function $Ge(t,r,a,u,h){if(!u){const m=rs(t);m&&(u=!U0(m,h.host))}switch(a){case".mjs":case".mts":case".d.mts":return r&1&&p(".mts",a===".mts"||a===".d.mts")||r&4&&p(".d.mts",a===".mts"||a===".d.mts")||r&2&&p(".mjs")||void 0;case".cjs":case".cts":case".d.cts":return r&1&&p(".cts",a===".cts"||a===".d.cts")||r&4&&p(".d.cts",a===".cts"||a===".d.cts")||r&2&&p(".cjs")||void 0;case".json":return r&4&&p(".d.json.ts")||r&8&&p(".json")||void 0;case".tsx":case".jsx":return r&1&&(p(".tsx",a===".tsx")||p(".ts",a===".tsx"))||r&4&&p(".d.ts",a===".tsx")||r&2&&(p(".jsx")||p(".js"))||void 0;case".ts":case".d.ts":case".js":case"":return r&1&&(p(".ts",a===".ts"||a===".d.ts")||p(".tsx",a===".ts"||a===".d.ts"))||r&4&&p(".d.ts",a===".ts"||a===".d.ts")||r&2&&(p(".js")||p(".jsx"))||h.isConfigLookup&&p(".json")||void 0;default:return r&4&&!xf(t+a)&&p(`.d${a}.ts`)||void 0}function p(m,C){const b=Fle(t+m,u,h);return b===void 0?void 0:{path:b,ext:m,resolvedUsingTsExtension:!h.candidateIsFromPackageJsonField&&C}}}function Fle(t,r,a){var u;if(!((u=a.compilerOptions.moduleSuffixes)!=null&&u.length))return JGe(t,r,a);const h=qb(t)??"",p=h?QW(t,h):t;return W(a.compilerOptions.moduleSuffixes,m=>JGe(p+m+h,r,a))}function JGe(t,r,a){var u;if(!r){if(a.host.fileExists(t))return a.traceEnabled&&lo(a.host,k.File_0_exists_use_it_as_a_name_resolution_result,t),t;a.traceEnabled&&lo(a.host,k.File_0_does_not_exist,t)}(u=a.failedLookupLocations)==null||u.push(t)}function TDe(t,r,a,u,h=!0){const p=h?Yk(r,a,u):void 0,m=p&&p.contents.packageJsonContent,C=p&&EK(p,u);return VP(p,Wle(t,r,a,u,m,C),u)}function Ble(t,r,a,u,h){if(!h&&t.contents.resolvedEntrypoints!==void 0)return t.contents.resolvedEntrypoints;let p;const m=5|(h?2:0),C=mDe(r),b=M7(u==null?void 0:u.getPackageJsonInfoCache(),a,r);b.conditions=sx(r),b.requestContainingDirectory=t.packageDirectory;const T=Wle(m,t.packageDirectory,!1,b,t.contents.packageJsonContent,EK(t,b));if(p=xi(p,T==null?void 0:T.path),C&8&&t.contents.packageJsonContent.exports){const E=jt([sx(r,99),sx(r,1)],qs);for(const N of E){const R={...b,failedLookupLocations:[],conditions:N,host:a},F=dPt(t,t.contents.packageJsonContent.exports,R,m);if(F)for(const j of F)p=gu(p,j.path)}}return t.contents.resolvedEntrypoints=p||!1}function dPt(t,r,a,u){let h;if(Lo(r))for(const m of r)p(m);else if(typeof r=="object"&&r!==null&&NK(r))for(const m in r)p(r[m]);else p(r);return h;function p(m){var C,b;if(typeof m=="string"&&ro(m,"./"))if(m.includes("*")&&a.host.readDirectory){if(m.indexOf("*")!==m.lastIndexOf("*"))return!1;a.host.readDirectory(t.packageDirectory,qLt(u),void 0,[kSe(pP(m,"**/*"),".*")]).forEach(T=>{h=gu(h,{path:T,ext:p6(T),resolvedUsingTsExtension:void 0})})}else{const T=Qd(m).slice(2);if(T.includes("..")||T.includes(".")||T.includes("node_modules"))return!1;const E=Hr(t.packageDirectory,m),N=bo(E,(b=(C=a.host).getCurrentDirectory)==null?void 0:b.call(C)),R=Rle(u,N,!1,a);if(R)return h=gu(h,R,(F,j)=>F.path===j.path),!0}else if(Array.isArray(m)){for(const T of m)if(p(T))return!0}else if(typeof m=="object"&&m!==null)return W(wm(m),T=>{if(T==="default"||Mt(a.conditions,T)||MV(a.conditions,T))return p(m[T]),!0})}}function M7(t,r,a){return{host:r,compilerOptions:a,traceEnabled:Zb(a,r),failedLookupLocations:void 0,affectingLocations:void 0,packageJsonInfoCache:t,features:0,conditions:x,requestContainingDirectory:void 0,reportDiagnostic:dl,isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1}}function R7(t,r){const a=Qd(t);for(a.pop();a.length>0;){const u=Yk(Ob(a),!1,r);if(u)return u;a.pop()}}function EK(t,r){return t.contents.versionPaths===void 0&&(t.contents.versionPaths=QLt(t.contents.packageJsonContent,r)||!1),t.contents.versionPaths||void 0}function fPt(t,r){return t.contents.peerDependencies===void 0&&(t.contents.peerDependencies=hPt(t,r)||!1),t.contents.peerDependencies||void 0}function hPt(t,r){const a=_De(t.contents.packageJsonContent,"peerDependencies","object",r);if(a===void 0)return;r.traceEnabled&&lo(r.host,k.package_json_has_a_peerDependencies_field);const u=zGe(t.packageDirectory,r.host,r.traceEnabled),h=u.substring(0,u.lastIndexOf("node_modules")+12)+Hc;let p="";for(const m in a)if(Vl(a,m)){const C=Yk(h+m,!1,r);if(C){const b=C.contents.packageJsonContent.version;p+=`+${m}@${b}`,r.traceEnabled&&lo(r.host,k.Found_peerDependency_0_with_1_version,m,b)}else r.traceEnabled&&lo(r.host,k.Failed_to_find_peerDependency_0,m)}return p}function Yk(t,r,a){var u,h,p,m,C,b;const{host:T,traceEnabled:E}=a,N=Hr(t,"package.json");if(r){(u=a.failedLookupLocations)==null||u.push(N);return}const R=(h=a.packageJsonInfoCache)==null?void 0:h.getPackageJsonInfo(N);if(R!==void 0){if(kK(R))return E&&lo(T,k.File_0_exists_according_to_earlier_cached_lookups,N),(p=a.affectingLocations)==null||p.push(N),R.packageDirectory===t?R:{packageDirectory:t,contents:R.contents};R.directoryExists&&E&&lo(T,k.File_0_does_not_exist_according_to_earlier_cached_lookups,N),(m=a.failedLookupLocations)==null||m.push(N);return}const F=U0(t,T);if(F&&T.fileExists(N)){const j=V8(N,T);E&&lo(T,k.Found_package_json_at_0,N);const U={packageDirectory:t,contents:{packageJsonContent:j,versionPaths:void 0,resolvedEntrypoints:void 0,peerDependencies:void 0}};return a.packageJsonInfoCache&&!a.packageJsonInfoCache.isReadonly&&a.packageJsonInfoCache.setPackageJsonInfo(N,U),(C=a.affectingLocations)==null||C.push(N),U}else F&&E&&lo(T,k.File_0_does_not_exist,N),a.packageJsonInfoCache&&!a.packageJsonInfoCache.isReadonly&&a.packageJsonInfoCache.setPackageJsonInfo(N,{packageDirectory:t,directoryExists:F}),(b=a.failedLookupLocations)==null||b.push(N)}function Wle(t,r,a,u,h,p){let m;h&&(u.isConfigLookup?m=JLt(h,r,u):m=t&4&&$Lt(h,r,u)||t&7&&GLt(h,r,u)||void 0);const C=(R,F,j,U)=>{const q=Rle(R,F,j,U);if(q)return Ile(q);const Q=R===4?5:R,re=U.features,Y=U.candidateIsFromPackageJsonField;U.candidateIsFromPackageJsonField=!0,(h==null?void 0:h.type)!=="module"&&(U.features&=-33);const ue=Mle(Q,F,j,U,!1);return U.features=re,U.candidateIsFromPackageJsonField=Y,ue},b=m?!U0(rs(m),u.host):void 0,T=a||!U0(r,u.host),E=Hr(r,u.isConfigLookup?"tsconfig":"index");if(p&&(!m||l0(r,m))){const R=W0(r,m||E,!1);u.traceEnabled&&lo(u.host,k.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2,p.version,y,R);const F=DDe(t,R,r,p.paths,void 0,C,b||T,u);if(F)return PGe(F.value)}const N=m&&PGe(C(t,m,b,u));if(N)return N;if(!(u.features&32))return b3(t,E,T,u)}function GGe(t,r){return t&2&&(r===".js"||r===".jsx"||r===".mjs"||r===".cjs")||t&1&&(r===".ts"||r===".tsx"||r===".mts"||r===".cts")||t&4&&(r===".d.ts"||r===".d.mts"||r===".d.cts")||t&8&&r===".json"||!1}function IK(t){let r=t.indexOf(Hc);return t[0]==="@"&&(r=t.indexOf(Hc,r+1)),r===-1?{packageName:t,rest:""}:{packageName:t.slice(0,r),rest:t.slice(r+1)}}function NK(t){return Be(wm(t),r=>ro(r,"."))}function _Pt(t){return!Rt(wm(t),r=>ro(r,"."))}function pPt(t,r,a,u,h,p){var m,C;const b=bo(Hr(a,"dummy"),(C=(m=u.host).getCurrentDirectory)==null?void 0:C.call(m)),T=R7(b,u);if(!T||!T.contents.packageJsonContent.exports||typeof T.contents.packageJsonContent.name!="string")return;const E=Qd(r),N=Qd(T.contents.packageJsonContent.name);if(!Be(N,(q,Q)=>E[Q]===q))return;const R=E.slice(N.length),F=O(R)?`.${Hc}${R.join(Hc)}`:".";if(Jw(u.compilerOptions)&&!Zk(a))return Vle(T,t,F,u,h,p);const j=t&5,U=t&-6;return Vle(T,j,F,u,h,p)||Vle(T,U,F,u,h,p)}function Vle(t,r,a,u,h,p){if(t.contents.packageJsonContent.exports){if(a==="."){let m;if(typeof t.contents.packageJsonContent.exports=="string"||Array.isArray(t.contents.packageJsonContent.exports)||typeof t.contents.packageJsonContent.exports=="object"&&_Pt(t.contents.packageJsonContent.exports)?m=t.contents.packageJsonContent.exports:Vl(t.contents.packageJsonContent.exports,".")&&(m=t.contents.packageJsonContent.exports["."]),m)return QGe(r,u,h,p,a,t,!1)(m,"",!1,".")}else if(NK(t.contents.packageJsonContent.exports)){if(typeof t.contents.packageJsonContent.exports!="object")return u.traceEnabled&&lo(u.host,k.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1,a,t.packageDirectory),gg(void 0);const m=KGe(r,u,h,p,a,t.contents.packageJsonContent.exports,t,!1);if(m)return m}return u.traceEnabled&&lo(u.host,k.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1,a,t.packageDirectory),gg(void 0)}}function gPt(t,r,a,u,h,p){var m,C;if(r==="#"||ro(r,"#/"))return u.traceEnabled&&lo(u.host,k.Invalid_import_specifier_0_has_no_possible_resolutions,r),gg(void 0);const b=bo(Hr(a,"dummy"),(C=(m=u.host).getCurrentDirectory)==null?void 0:C.call(m)),T=R7(b,u);if(!T)return u.traceEnabled&&lo(u.host,k.Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve,b),gg(void 0);if(!T.contents.packageJsonContent.imports)return u.traceEnabled&&lo(u.host,k.package_json_scope_0_has_no_imports_defined,T.packageDirectory),gg(void 0);const E=KGe(t,u,h,p,r,T.contents.packageJsonContent.imports,T,!0);return E||(u.traceEnabled&&lo(u.host,k.Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1,r,T.packageDirectory),gg(void 0))}function Hle(t,r){const a=t.indexOf("*"),u=r.indexOf("*"),h=a===-1?t.length:a+1,p=u===-1?r.length:u+1;return h>p?-1:p>h||a===-1?1:u===-1||t.length>r.length?-1:r.length>t.length?1:0}function KGe(t,r,a,u,h,p,m,C){const b=QGe(t,r,a,u,h,m,C);if(!mu(h,Hc)&&!h.includes("*")&&Vl(p,h)){const N=p[h];return b(N,"",!1,h)}const T=tc(Ri(wm(p),N=>mPt(N)||mu(N,"/")),Hle);for(const N of T)if(r.features&16&&E(N,h)){const R=p[N],F=N.indexOf("*"),j=h.substring(N.substring(0,F).length,h.length-(N.length-1-F));return b(R,j,!0,N)}else if(mu(N,"*")&&ro(h,N.substring(0,N.length-1))){const R=p[N],F=h.substring(N.length-1);return b(R,F,!0,N)}else if(ro(h,N)){const R=p[N],F=h.substring(N.length);return b(R,F,!1,N)}function E(N,R){if(mu(N,"*"))return!1;const F=N.indexOf("*");return F===-1?!1:ro(R,N.substring(0,F))&&mu(R,N.substring(F+1))}}function mPt(t){const r=t.indexOf("*");return r!==-1&&r===t.lastIndexOf("*")}function QGe(t,r,a,u,h,p,m){return C;function C(b,T,E,N){if(typeof b=="string"){if(!E&&T.length>0&&!mu(b,"/"))return r.traceEnabled&&lo(r.host,k.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,p.packageDirectory,h),gg(void 0);if(!ro(b,"./")){if(m&&!ro(b,"../")&&!ro(b,"/")&&!Sp(b)){const te=E?b.replace(/\*/g,T):b+T;ox(r,k.Using_0_subpath_1_with_target_2,"imports",N,te),ox(r,k.Resolving_module_0_from_1,te,p.packageDirectory+"/");const Se=AV(r.features,te,p.packageDirectory+"/",r.compilerOptions,r.host,a,t,!1,u,r.conditions);return gg(Se.resolvedModule?{path:Se.resolvedModule.resolvedFileName,extension:Se.resolvedModule.extension,packageId:Se.resolvedModule.packageId,originalPath:Se.resolvedModule.originalPath,resolvedUsingTsExtension:Se.resolvedModule.resolvedUsingTsExtension}:void 0)}return r.traceEnabled&&lo(r.host,k.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,p.packageDirectory,h),gg(void 0)}const q=(cg(b)?Qd(b).slice(1):Qd(b)).slice(1);if(q.includes("..")||q.includes(".")||q.includes("node_modules"))return r.traceEnabled&&lo(r.host,k.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,p.packageDirectory,h),gg(void 0);const Q=Hr(p.packageDirectory,b),re=Qd(T);if(re.includes("..")||re.includes(".")||re.includes("node_modules"))return r.traceEnabled&&lo(r.host,k.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,p.packageDirectory,h),gg(void 0);r.traceEnabled&&lo(r.host,k.Using_0_subpath_1_with_target_2,m?"imports":"exports",N,E?b.replace(/\*/g,T):b+T);const Y=R(E?Q.replace(/\*/g,T):Q+T),ue=j(Y,T,Hr(p.packageDirectory,"package.json"),m);return ue||gg(VP(p,Rle(t,Y,!1,r),r))}else if(typeof b=="object"&&b!==null)if(Array.isArray(b)){if(!O(b))return r.traceEnabled&&lo(r.host,k.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,p.packageDirectory,h),gg(void 0);for(const U of b){const q=C(U,T,E,N);if(q)return q}}else{ox(r,k.Entering_conditional_exports);for(const U of wm(b))if(U==="default"||r.conditions.includes(U)||MV(r.conditions,U)){ox(r,k.Matched_0_condition_1,m?"imports":"exports",U);const q=b[U],Q=C(q,T,E,N);if(Q)return ox(r,k.Resolved_under_condition_0,U),ox(r,k.Exiting_conditional_exports),Q;ox(r,k.Failed_to_resolve_under_condition_0,U)}else ox(r,k.Saw_non_matching_condition_0,U);ox(r,k.Exiting_conditional_exports);return}else if(b===null)return r.traceEnabled&&lo(r.host,k.package_json_scope_0_explicitly_maps_specifier_1_to_null,p.packageDirectory,h),gg(void 0);return r.traceEnabled&&lo(r.host,k.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,p.packageDirectory,h),gg(void 0);function R(U){var q,Q;return U===void 0?U:bo(U,(Q=(q=r.host).getCurrentDirectory)==null?void 0:Q.call(q))}function F(U,q){return Xd(Hr(U,q))}function j(U,q,Q,re){var Y,ue,te,Se;if(!r.isConfigLookup&&(r.compilerOptions.declarationDir||r.compilerOptions.outDir)&&!U.includes("/node_modules/")&&(!r.compilerOptions.configFile||l0(p.packageDirectory,R(r.compilerOptions.configFile.fileName),!jle(r)))){const pe=cS({useCaseSensitiveFileNames:()=>jle(r)}),ye=[];if(r.compilerOptions.rootDir||r.compilerOptions.composite&&r.compilerOptions.configFilePath){const be=R(G7(r.compilerOptions,()=>[],((ue=(Y=r.host).getCurrentDirectory)==null?void 0:ue.call(Y))||"",pe));ye.push(be)}else if(r.requestContainingDirectory){const be=R(Hr(r.requestContainingDirectory,"index.ts")),_e=R(G7(r.compilerOptions,()=>[be,R(Q)],((Se=(te=r.host).getCurrentDirectory)==null?void 0:Se.call(te))||"",pe));ye.push(_e);let ve=Xd(_e);for(;ve&&ve.length>1;){const Ee=Qd(ve);Ee.pop();const ke=Ob(Ee);ye.unshift(ke),ve=Xd(ke)}}ye.length>1&&r.reportDiagnostic(Gc(re?k.The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:k.The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate,q===""?".":q,Q));for(const be of ye){const _e=oe(be);for(const ve of _e)if(l0(ve,U,!jle(r))){const Ee=U.slice(ve.length+1),ke=Hr(be,Ee),Fe=[".mjs",".cjs",".js",".json",".d.mts",".d.cts",".d.ts"];for(const Oe of Fe)if(tu(ke,Oe)){const fe=Mxe(ke);for(const Ie of fe){if(!GGe(t,Ie))continue;const Le=SB(ke,Ie,Oe,!jle(r));if(r.host.fileExists(Le))return gg(VP(p,Rle(t,Le,!1,r),r))}}}}}return;function oe(pe){var ye,be;const _e=r.compilerOptions.configFile?((be=(ye=r.host).getCurrentDirectory)==null?void 0:be.call(ye))||"":pe,ve=[];return r.compilerOptions.declarationDir&&ve.push(R(F(_e,r.compilerOptions.declarationDir))),r.compilerOptions.outDir&&r.compilerOptions.outDir!==r.compilerOptions.declarationDir&&ve.push(R(F(_e,r.compilerOptions.outDir))),ve}}}}function MV(t,r){if(!t.includes("types")||!ro(r,"types@"))return!1;const a=h$.tryParse(r.substring(6));return a?a.test(y):!1}function XGe(t,r,a,u,h,p){return ZGe(t,r,a,u,!1,h,p)}function vPt(t,r,a){return ZGe(4,t,r,a,!0,void 0,void 0)}function ZGe(t,r,a,u,h,p,m){const C=u.features===0?void 0:u.features&32?99:1,b=t&5,T=t&-6;if(b){ox(u,k.Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0,SK(b));const N=E(b);if(N)return N}if(T&&!h)return ox(u,k.Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0,SK(T)),E(T);function E(N){return c0(Lf(a),R=>{if(fd(R)!=="node_modules"){const F=iKe(p,r,C,R,m,u);return F||gg(YGe(N,r,R,u,h,p,m))}})}}function YGe(t,r,a,u,h,p,m){const C=Hr(a,"node_modules"),b=U0(C,u.host);if(!b&&u.traceEnabled&&lo(u.host,k.Directory_0_does_not_exist_skipping_all_lookups_in_it,C),!h){const T=eKe(t,r,C,b,u,p,m);if(T)return T}if(t&4){const T=Hr(C,"@types");let E=b;return b&&!U0(T,u.host)&&(u.traceEnabled&&lo(u.host,k.Directory_0_does_not_exist_skipping_all_lookups_in_it,T),E=!1),eKe(4,tKe(r,u),T,E,u,p,m)}}function eKe(t,r,a,u,h,p,m){var C,b;const T=ra(Hr(a,r)),{packageName:E,rest:N}=IK(r),R=Hr(a,E);let F,j=Yk(T,!u,h);if(N!==""&&j&&(!(h.features&8)||!Vl(((C=F=Yk(R,!u,h))==null?void 0:C.contents.packageJsonContent)??x,"exports"))){const Q=b3(t,T,!u,h);if(Q)return Ile(Q);const re=Wle(t,T,!u,h,j.contents.packageJsonContent,EK(j,h));return VP(j,re,h)}const U=(Q,re,Y,ue)=>{let te=(N||!(ue.features&32))&&b3(Q,re,Y,ue)||Wle(Q,re,Y,ue,j&&j.contents.packageJsonContent,j&&EK(j,ue));return!te&&j&&(j.contents.packageJsonContent.exports===void 0||j.contents.packageJsonContent.exports===null)&&ue.features&32&&(te=b3(Q,Hr(re,"index.js"),Y,ue)),VP(j,te,ue)};if(N!==""&&(j=F??Yk(R,!u,h)),j&&(h.resolvedPackageDirectory=!0),j&&j.contents.packageJsonContent.exports&&h.features&8)return(b=Vle(j,t,Hr(".",N),h,p,m))==null?void 0:b.value;const q=N!==""&&j?EK(j,h):void 0;if(q){h.traceEnabled&&lo(h.host,k.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2,q.version,y,N);const Q=u&&U0(R,h.host),re=DDe(t,N,R,q.paths,void 0,U,!Q,h);if(re)return re.value}return U(t,T,!u,h)}function DDe(t,r,a,u,h,p,m,C){h||(h=gG(u));const b=rae(h,r);if(b){const T=mo(b)?void 0:sCe(b,r),E=mo(b)?b:rCe(b);return C.traceEnabled&&lo(C.host,k.Module_name_0_matched_pattern_1,r,E),{value:W(u[E],R=>{const F=T?pP(R,T):R,j=ra(Hr(a,F));C.traceEnabled&&lo(C.host,k.Trying_substitution_0_candidate_module_location_Colon_1,R,F);const U=qb(R);if(U!==void 0){const q=Fle(j,m,C);if(q!==void 0)return Ile({path:q,ext:U,resolvedUsingTsExtension:void 0})}return p(t,j,m||!U0(rs(j),C.host),C)})}}}var EDe="__";function tKe(t,r){const a=C3(t);return r.traceEnabled&&a!==t&&lo(r.host,k.Scoped_package_detected_looking_in_0,a),a}function LK(t){return`@types/${C3(t)}`}function C3(t){if(ro(t,"@")){const r=t.replace(Hc,EDe);if(r!==t)return r.slice(1)}return t}function F7(t){const r=BR(t,"@types/");return r!==t?RV(r):t}function RV(t){return t.includes(EDe)?"@"+t.replace(EDe,Hc):t}function iKe(t,r,a,u,h,p){const m=t&&t.getFromNonRelativeNameCache(r,a,u,h);if(m)return p.traceEnabled&&lo(p.host,k.Resolution_for_module_0_was_found_in_cache_from_location_1,r,u),p.resultFromCache=m,{value:m.resolvedModule&&{path:m.resolvedModule.resolvedFileName,originalPath:m.resolvedModule.originalPath||!0,extension:m.resolvedModule.extension,packageId:m.resolvedModule.packageId,resolvedUsingTsExtension:m.resolvedModule.resolvedUsingTsExtension}}}function IDe(t,r,a,u,h,p){const m=Zb(a,u),C=[],b=[],T=rs(r),E=[],N={compilerOptions:a,host:u,traceEnabled:m,failedLookupLocations:C,affectingLocations:b,packageJsonInfoCache:h,features:0,conditions:[],requestContainingDirectory:T,reportDiagnostic:j=>void E.push(j),isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1},R=F(5)||F(2|(a.resolveJsonModule?8:0));return AGe(t,R&&R.value,(R==null?void 0:R.value)&&Zk(R.value.path),C,b,E,N,h);function F(j){const U=VGe(j,t,T,kDe,N);if(U)return{value:U};if(Zd(t)){const q=ra(Hr(T,t));return gg(kDe(j,q,!1,N))}else{const q=c0(T,Q=>{const re=iKe(h,t,void 0,Q,p,N);if(re)return re;const Y=ra(Hr(Q,t));return gg(kDe(j,Y,!1,N))});if(q)return q;if(j&5){let Q=vPt(t,T,N);return j&4&&(Q??(Q=nKe(t,N))),Q}}}}function nKe(t,r){if(r.compilerOptions.typeRoots)for(const a of r.compilerOptions.typeRoots){const u=RGe(a,t,r),h=U0(a,r.host);!h&&r.traceEnabled&&lo(r.host,k.Directory_0_does_not_exist_skipping_all_lookups_in_it,a);const p=b3(4,u,!h,r);if(p){const C=OV(p.path),b=C?Yk(C,!1,r):void 0;return gg(VP(b,p,r))}const m=TDe(4,u,!h,r);if(m)return gg(m)}}function S3(t,r){return!!t.allowImportingTsExtensions||r&&xf(r)}function NDe(t,r,a,u,h,p){const m=Zb(a,u);m&&lo(u,k.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2,r,t,h);const C=[],b=[],T=[],E={compilerOptions:a,host:u,traceEnabled:m,failedLookupLocations:C,affectingLocations:b,packageJsonInfoCache:p,features:0,conditions:[],requestContainingDirectory:void 0,reportDiagnostic:R=>void T.push(R),isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1},N=YGe(4,t,h,E,!1,void 0,void 0);return OGe(N,!0,C,b,T,E.resultFromCache,void 0)}function gg(t){return t!==void 0?{value:t}:void 0}function ox(t,r,...a){t.traceEnabled&&lo(t.host,r,...a)}function jle(t){return t.host.useCaseSensitiveFileNames?typeof t.host.useCaseSensitiveFileNames=="boolean"?t.host.useCaseSensitiveFileNames:t.host.useCaseSensitiveFileNames():!0}var LDe=(t=>(t[t.NonInstantiated=0]="NonInstantiated",t[t.Instantiated=1]="Instantiated",t[t.ConstEnumOnly=2]="ConstEnumOnly",t))(LDe||{});function Yb(t,r){return t.body&&!t.body.parent&&(ml(t.body,t),$b(t.body,!1)),t.body?PDe(t.body,r):1}function PDe(t,r=new Map){const a=Tl(t);if(r.has(a))return r.get(a)||0;r.set(a,void 0);const u=yPt(t,r);return r.set(a,u),u}function yPt(t,r){switch(t.kind){case 264:case 265:return 0;case 266:if(ET(t))return 2;break;case 272:case 271:if(!Kr(t,32))return 0;break;case 278:const a=t;if(!a.moduleSpecifier&&a.exportClause&&a.exportClause.kind===279){let u=0;for(const h of a.exportClause.elements){const p=bPt(h,r);if(p>u&&(u=p),u===1)return u}return u}break;case 268:{let u=0;return jo(t,h=>{const p=PDe(h,r);switch(p){case 0:return;case 2:u=2;return;case 1:return u=1,!0;default:z.assertNever(p)}}),u}case 267:return Yb(t,r);case 80:if(t.flags&4096)return 0}return 1}function bPt(t,r){const a=t.propertyName||t.name;let u=t.parent;for(;u;){if(Ho(u)||jv(u)||Ns(u)){const h=u.statements;let p;for(const m of h)if(PB(m,a)){m.parent||(ml(m,u),$b(m,!1));const C=PDe(m,r);if((p===void 0||C>p)&&(p=C),p===1)return p;m.kind===271&&(p=1)}if(p!==void 0)return p}u=u.parent}return 1}var ADe=(t=>(t[t.None=0]="None",t[t.IsContainer=1]="IsContainer",t[t.IsBlockScopedContainer=2]="IsBlockScopedContainer",t[t.IsControlFlowContainer=4]="IsControlFlowContainer",t[t.IsFunctionLike=8]="IsFunctionLike",t[t.IsFunctionExpression=16]="IsFunctionExpression",t[t.HasLocals=32]="HasLocals",t[t.IsInterface=64]="IsInterface",t[t.IsObjectLiteralOrClassExpressionMethodOrAccessor=128]="IsObjectLiteralOrClassExpressionMethodOrAccessor",t))(ADe||{});function j1(t,r,a){return z.attachFlowNodeDebugInfo({flags:t,id:0,node:r,antecedent:a})}var CPt=SPt();function ODe(t,r){var a,u;cu("beforeBind"),(a=c_)==null||a.logStartBindFile(""+t.fileName),CPt(t,r),(u=c_)==null||u.logStopBindFile(),cu("afterBind"),qg("Bind","beforeBind","afterBind")}function SPt(){var t,r,a,u,h,p,m,C,b,T,E,N,R,F,j,U,q,Q,re,Y,ue,te,Se,oe,pe=!1,ye=0,be,_e,ve=j1(1,void 0,void 0),Ee=j1(1,void 0,void 0),ke=Bt();return Oe;function Fe(ie,Xe,...ei){return Jg(_n(ie)||t,ie,Xe,...ei)}function Oe(ie,Xe){var ei,Dn;t=ie,r=Xe,a=il(r),oe=fe(t,Xe),_e=new Set,ye=0,be=Mf.getSymbolConstructor(),z.attachFlowNodeDebugInfo(ve),z.attachFlowNodeDebugInfo(Ee),t.locals||((ei=sr)==null||ei.push(sr.Phase.Bind,"bindSourceFile",{path:t.path},!0),Fi(t),(Dn=sr)==null||Dn.pop(),t.symbolCount=ye,t.classifiableNames=_e,pf(),qc()),t=void 0,r=void 0,a=void 0,u=void 0,h=void 0,p=void 0,m=void 0,C=void 0,b=void 0,E=void 0,T=!1,N=void 0,R=void 0,F=void 0,j=void 0,U=void 0,q=void 0,Q=void 0,Y=void 0,ue=!1,te=!1,pe=!1,Se=0}function fe(ie,Xe){return Hh(Xe,"alwaysStrict")&&!ie.isDeclarationFile?!0:!!ie.externalModuleIndicator}function Ie(ie,Xe){return ye++,new be(ie,Xe)}function Le(ie,Xe,ei){ie.flags|=ei,Xe.symbol=ie,ie.declarations=gu(ie.declarations,Xe),ei&1955&&!ie.exports&&(ie.exports=ga()),ei&6240&&!ie.members&&(ie.members=ga()),ie.constEnumOnlyModule&&ie.flags&304&&(ie.constEnumOnlyModule=!1),ei&111551&&CW(ie,Xe)}function et(ie){if(ie.kind===277)return ie.isExportEquals?"export=":"default";const Xe=ko(ie);if(Xe){if(Bh(ie)){const ei=Im(Xe);return Iv(ie)?"__global":`"${ei}"`}if(Xe.kind===167){const ei=Xe.expression;if(ug(ei))return du(ei.text);if(IJ(ei))return Ta(ei.operator)+ei.operand.text;z.fail("Only computed properties with literal names have declaration names")}if(Vs(Xe)){const ei=Sf(ie);if(!ei)return;const Dn=ei.symbol;return LW(Dn,Xe.escapedText)}return J0(Xe)?hP(Xe):Av(Xe)?L8(Xe):void 0}switch(ie.kind){case 176:return"__constructor";case 184:case 179:case 323:return"__call";case 185:case 180:return"__new";case 181:return"__index";case 278:return"__export";case 307:return"export=";case 226:if(Lu(ie)===2)return"export=";z.fail("Unknown binary declaration kind");break;case 317:return B6(ie)?"__new":"__call";case 169:return z.assert(ie.parent.kind===317,"Impossible parameter parent kind",()=>`parent is: ${z.formatSyntaxKind(ie.parent.kind)}, expected JSDocFunctionType`),"arg"+ie.parent.parameters.indexOf(ie)}}function He(ie){return Af(ie)?sc(ie.name):Ws(z.checkDefined(et(ie)))}function We(ie,Xe,ei,Dn,Ss,Vo,po){z.assert(po||!Hb(ei));const $o=Kr(ei,2048)||gh(ei)&&ei.name.escapedText==="default",Dl=po?"__computed":$o&&Xe?"default":et(ei);let Ga;if(Dl===void 0)Ga=Ie(0,"__missing");else if(Ga=ie.get(Dl),Dn&2885600&&_e.add(Dl),!Ga)ie.set(Dl,Ga=Ie(0,Dl)),Vo&&(Ga.isReplaceableByMethod=!0);else{if(Vo&&!Ga.isReplaceableByMethod)return Ga;if(Ga.flags&Ss){if(Ga.isReplaceableByMethod)ie.set(Dl,Ga=Ie(0,Dl));else if(!(Dn&3&&Ga.flags&67108864)){Af(ei)&&ml(ei.name,ei);let hu=Ga.flags&2?k.Cannot_redeclare_block_scoped_variable_0:k.Duplicate_identifier_0,rm=!0;(Ga.flags&384||Dn&384)&&(hu=k.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations,rm=!1);let g0=!1;O(Ga.declarations)&&($o||Ga.declarations&&Ga.declarations.length&&ei.kind===277&&!ei.isExportEquals)&&(hu=k.A_module_cannot_have_multiple_default_exports,rm=!1,g0=!0);const K1=[];Mm(ei)&&vu(ei.type)&&Kr(ei,32)&&Ga.flags&2887656&&K1.push(Fe(ei,k.Did_you_mean_0,`export type { ${Ws(ei.name.escapedText)} }`));const ob=ko(ei)||ei;W(Ga.declarations,(ab,sm)=>{const Dg=ko(ab)||ab,Zl=rm?Fe(Dg,hu,He(ab)):Fe(Dg,hu);t.bindDiagnostics.push(g0?fa(Zl,Fe(ob,sm===0?k.Another_export_default_is_here:k.and_here)):Zl),g0&&K1.push(Fe(Dg,k.The_first_export_default_is_here))});const DS=rm?Fe(ob,hu,He(ei)):Fe(ob,hu);t.bindDiagnostics.push(fa(DS,...K1)),Ga=Ie(0,Dl)}}}return Le(Ga,ei,Dn),Ga.parent?z.assert(Ga.parent===Xe,"Existing symbol parent should match new one"):Ga.parent=Xe,Ga}function Ue(ie,Xe,ei){const Dn=!!(wk(ie)&32)||Ye(ie);if(Xe&2097152)return ie.kind===281||ie.kind===271&&Dn?We(h.symbol.exports,h.symbol,ie,Xe,ei):(z.assertNode(h,A1),We(h.locals,void 0,ie,Xe,ei));if(Em(ie)&&z.assert(Xn(ie)),!Bh(ie)&&(Dn||h.flags&128)){if(!A1(h)||!h.locals||Kr(ie,2048)&&!et(ie))return We(h.symbol.exports,h.symbol,ie,Xe,ei);const Ss=Xe&111551?1048576:0,Vo=We(h.locals,void 0,ie,Ss,ei);return Vo.exportSymbol=We(h.symbol.exports,h.symbol,ie,Xe,ei),ie.localSymbol=Vo,Vo}else return z.assertNode(h,A1),We(h.locals,void 0,ie,Xe,ei)}function Ye(ie){if(ie.parent&&qu(ie)&&(ie=ie.parent),!Em(ie))return!1;if(!pV(ie)&&ie.fullName)return!0;const Xe=ko(ie);return Xe?!!(HW(Xe.parent)&&nm(Xe.parent)||Yf(Xe.parent)&&wk(Xe.parent)&32):!1}function wt(ie,Xe){const ei=h,Dn=p,Ss=m;if(Xe&1?(ie.kind!==219&&(p=h),h=m=ie,Xe&32&&(h.locals=ga(),Ar(h))):Xe&2&&(m=ie,Xe&32&&(m.locals=void 0)),Xe&4){const Vo=N,po=R,$o=F,Dl=j,Ga=Q,hu=Y,rm=ue,g0=Xe&16&&!Kr(ie,1024)&&!ie.asteriskToken&&!!NT(ie)||ie.kind===175;g0||(N=j1(2,void 0,void 0),Xe&144&&(N.node=ie)),j=g0||ie.kind===176||Xn(ie)&&(ie.kind===262||ie.kind===218)?Mi():void 0,Q=void 0,R=void 0,F=void 0,Y=void 0,ue=!1,xt(ie),ie.flags&=-5633,!(N.flags&1)&&Xe&8&&Tm(ie.body)&&(ie.flags|=512,ue&&(ie.flags|=1024),ie.endFlowNode=N),ie.kind===307&&(ie.flags|=Se,ie.endFlowNode=N),j&&(Hi(j,N),N=Cn(j),(ie.kind===176||ie.kind===175||Xn(ie)&&(ie.kind===262||ie.kind===218))&&(ie.returnFlowNode=N)),g0||(N=Vo),R=po,F=$o,j=Dl,Q=Ga,Y=hu,ue=rm}else Xe&64?(T=!1,xt(ie),z.assertNotNode(ie,lt),ie.flags=T?ie.flags|256:ie.flags&-257):xt(ie);h=ei,p=Dn,m=Ss}function nt(ie){ze(ie,Xe=>Xe.kind===262?Fi(Xe):void 0),ze(ie,Xe=>Xe.kind!==262?Fi(Xe):void 0)}function ze(ie,Xe=Fi){ie!==void 0&&W(ie,Xe)}function st(ie){jo(ie,Fi,ze)}function xt(ie){const Xe=pe;if(pe=!1,ls(ie)){st(ie),br(ie),pe=Xe;return}switch(ie.kind>=243&&ie.kind<=259&&(!r.allowUnreachableCode||ie.kind===253)&&(ie.flowNode=N),ie.kind){case 247:ha(ie);break;case 246:Yo(ie);break;case 248:ji(ie);break;case 249:case 250:fl(ie);break;case 245:St(ie);break;case 253:case 257:Ot(ie);break;case 252:case 251:Re(ie);break;case 258:mt(ie);break;case 255:Je(ie);break;case 269:pt(ie);break;case 296:kt(ie);break;case 244:Ci(ie);break;case 256:qt(ie);break;case 224:wi(ie);break;case 225:ce(ie);break;case 226:if(dS(ie)){pe=Xe,ut(ie);return}ke(ie);break;case 220:le(ie);break;case 227:je(ie);break;case 260:tt(ie);break;case 211:case 212:Fs(ie);break;case 213:to(ie);break;case 235:_r(ie);break;case 346:case 338:case 340:ni(ie);break;case 351:Gi(ie);break;case 307:{nt(ie.statements),Fi(ie.endOfFileToken);break}case 241:case 268:nt(ie.statements);break;case 208:Ae(ie);break;case 169:Ke(ie);break;case 210:case 209:case 303:case 230:pe=Xe;default:st(ie);break}br(ie),pe=Xe}function Et(ie){switch(ie.kind){case 80:case 110:return!0;case 211:case 212:return Ht(ie);case 213:return Oi(ie);case 217:if(wI(ie))return!1;case 235:return Et(ie.expression);case 226:return Ui(ie);case 224:return ie.operator===54&&Et(ie.operand);case 221:return Et(ie.expression)}return!1}function ft(ie){switch(ie.kind){case 80:case 110:case 108:case 236:return!0;case 211:case 217:case 235:return ft(ie.expression);case 212:return(ug(ie.argumentExpression)||pc(ie.argumentExpression))&&ft(ie.expression);case 226:return ie.operatorToken.kind===28&&ft(ie.right)||jb(ie.operatorToken.kind)&&M_(ie.left)}return!1}function Ht(ie){return ft(ie)||ph(ie)&&Ht(ie.expression)}function Oi(ie){if(ie.arguments){for(const Xe of ie.arguments)if(Ht(Xe))return!0}return!!(ie.expression.kind===211&&Ht(ie.expression.expression))}function Ji(ie,Xe){return o3(ie)&&bn(ie.expression)&&Ml(Xe)}function Ui(ie){switch(ie.operatorToken.kind){case 64:case 76:case 77:case 78:return Ht(ie.left);case 35:case 36:case 37:case 38:return bn(ie.left)||bn(ie.right)||Ji(ie.right,ie.left)||Ji(ie.left,ie.right)||u8(ie.right)&&Et(ie.left)||u8(ie.left)&&Et(ie.right);case 104:return bn(ie.left);case 103:return Et(ie.right);case 28:return Et(ie.right)}return!1}function bn(ie){switch(ie.kind){case 217:return bn(ie.expression);case 226:switch(ie.operatorToken.kind){case 64:return bn(ie.left);case 28:return bn(ie.right)}}return Ht(ie)}function Mi(){return j1(4,void 0,void 0)}function Ai(){return j1(8,void 0,void 0)}function Rn(ie,Xe,ei){return j1(1024,{target:ie,antecedents:Xe},ei)}function bs(ie){ie.flags|=ie.flags&2048?4096:2048}function Hi(ie,Xe){!(Xe.flags&1)&&!Mt(ie.antecedent,Xe)&&((ie.antecedent||(ie.antecedent=[])).push(Xe),bs(Xe))}function Hs(ie,Xe,ei){return Xe.flags&1?Xe:ei?(ei.kind===112&&ie&64||ei.kind===97&&ie&32)&&!M$(ei)&&!fse(ei.parent)?ve:Et(ei)?(bs(Xe),j1(ie,ei,Xe)):Xe:ie&32?Xe:ve}function Wo(ie,Xe,ei,Dn){return bs(ie),j1(128,{switchStatement:Xe,clauseStart:ei,clauseEnd:Dn},ie)}function ts(ie,Xe,ei){bs(Xe),te=!0;const Dn=j1(ie,ei,Xe);return Q&&Hi(Q,Dn),Dn}function Fo(ie,Xe){return bs(ie),te=!0,j1(512,Xe,ie)}function Cn(ie){const Xe=ie.antecedent;return Xe?Xe.length===1?Xe[0]:ie:ve}function Ko(ie){const Xe=ie.parent;switch(Xe.kind){case 245:case 247:case 246:return Xe.expression===ie;case 248:case 227:return Xe.condition===ie}return!1}function ot(ie){for(;;)if(ie.kind===217)ie=ie.expression;else if(ie.kind===224&&ie.operator===54)ie=ie.operand;else return WW(ie)}function hi(ie){return Noe(Il(ie))}function hn(ie){for(;g_(ie.parent)||tx(ie.parent)&&ie.parent.operator===54;)ie=ie.parent;return!Ko(ie)&&!ot(ie.parent)&&!(ph(ie.parent)&&ie.parent.expression===ie)}function lr(ie,Xe,ei,Dn){const Ss=U,Vo=q;U=ei,q=Dn,ie(Xe),U=Ss,q=Vo}function as(ie,Xe,ei){lr(Fi,ie,Xe,ei),(!ie||!hi(ie)&&!ot(ie)&&!(ph(ie)&&r8(ie)))&&(Hi(Xe,Hs(32,N,ie)),Hi(ei,Hs(64,N,ie)))}function fs(ie,Xe,ei){const Dn=R,Ss=F;R=Xe,F=ei,Fi(ie),R=Dn,F=Ss}function Ds(ie,Xe){let ei=Y;for(;ei&&ie.parent.kind===256;)ei.continueTarget=Xe,ei=ei.next,ie=ie.parent;return Xe}function ha(ie){const Xe=Ds(ie,Ai()),ei=Mi(),Dn=Mi();Hi(Xe,N),N=Xe,as(ie.expression,ei,Dn),N=Cn(ei),fs(ie.statement,Dn,Xe),Hi(Xe,N),N=Cn(Dn)}function Yo(ie){const Xe=Ai(),ei=Ds(ie,Mi()),Dn=Mi();Hi(Xe,N),N=Xe,fs(ie.statement,Dn,ei),Hi(ei,N),N=Cn(ei),as(ie.expression,Xe,Dn),N=Cn(Dn)}function ji(ie){const Xe=Ds(ie,Ai()),ei=Mi(),Dn=Mi();Fi(ie.initializer),Hi(Xe,N),N=Xe,as(ie.condition,ei,Dn),N=Cn(ei),fs(ie.statement,Dn,Xe),Fi(ie.incrementor),Hi(Xe,N),N=Cn(Dn)}function fl(ie){const Xe=Ds(ie,Ai()),ei=Mi();Fi(ie.expression),Hi(Xe,N),N=Xe,ie.kind===250&&Fi(ie.awaitModifier),Hi(ei,N),Fi(ie.initializer),ie.initializer.kind!==261&&ii(ie.initializer),fs(ie.statement,ei,Xe),Hi(Xe,N),N=Cn(ei)}function St(ie){const Xe=Mi(),ei=Mi(),Dn=Mi();as(ie.expression,Xe,ei),N=Cn(Xe),Fi(ie.thenStatement),Hi(Dn,N),N=Cn(ei),Fi(ie.elseStatement),Hi(Dn,N),N=Cn(Dn)}function Ot(ie){Fi(ie.expression),ie.kind===253&&(ue=!0,j&&Hi(j,N)),N=ve,te=!0}function xe(ie){for(let Xe=Y;Xe;Xe=Xe.next)if(Xe.name===ie)return Xe}function Pt(ie,Xe,ei){const Dn=ie.kind===252?Xe:ei;Dn&&(Hi(Dn,N),N=ve,te=!0)}function Re(ie){if(Fi(ie.label),ie.label){const Xe=xe(ie.label.escapedText);Xe&&(Xe.referenced=!0,Pt(ie,Xe.breakTarget,Xe.continueTarget))}else Pt(ie,R,F)}function mt(ie){const Xe=j,ei=Q,Dn=Mi(),Ss=Mi();let Vo=Mi();if(ie.finallyBlock&&(j=Ss),Hi(Vo,N),Q=Vo,Fi(ie.tryBlock),Hi(Dn,N),ie.catchClause&&(N=Cn(Vo),Vo=Mi(),Hi(Vo,N),Q=Vo,Fi(ie.catchClause),Hi(Dn,N)),j=Xe,Q=ei,ie.finallyBlock){const po=Mi();po.antecedent=no(no(Dn.antecedent,Vo.antecedent),Ss.antecedent),N=po,Fi(ie.finallyBlock),N.flags&1?N=ve:(j&&Ss.antecedent&&Hi(j,Rn(po,Ss.antecedent,N)),Q&&Vo.antecedent&&Hi(Q,Rn(po,Vo.antecedent,N)),N=Dn.antecedent?Rn(po,Dn.antecedent,N):ve)}else N=Cn(Dn)}function Je(ie){const Xe=Mi();Fi(ie.expression);const ei=R,Dn=re;R=Xe,re=N,Fi(ie.caseBlock),Hi(Xe,N);const Ss=W(ie.caseBlock.clauses,Vo=>Vo.kind===297);ie.possiblyExhaustive=!Ss&&!Xe.antecedent,Ss||Hi(Xe,Wo(re,ie,0,0)),R=ei,re=Dn,N=Cn(Xe)}function pt(ie){const Xe=ie.clauses,ei=ie.parent.expression.kind===112||Et(ie.parent.expression);let Dn=ve;for(let Ss=0;Ss$u(ei)||Ec(ei))}function zo(ie){ie.flags&33554432&&!ki(ie)?ie.flags|=128:ie.flags&=-129}function Sl(ie){if(zo(ie),Bh(ie))if(Kr(ie,32)&&Wt(ie,k.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible),Bse(ie))Rl(ie);else{let Xe;if(ie.name.kind===11){const{text:Dn}=ie.name;Xe=Y6(Dn),Xe===void 0&&Wt(ie.name,k.Pattern_0_can_have_at_most_one_Asterisk_character,Dn)}const ei=is(ie,512,110735);t.patternAmbientModules=xi(t.patternAmbientModules,Xe&&!mo(Xe)?{pattern:Xe,symbol:ei}:void 0)}else{const Xe=Rl(ie);if(Xe!==0){const{symbol:ei}=ie;ei.constEnumOnlyModule=!(ei.flags&304)&&Xe===2&&ei.constEnumOnlyModule!==!1}}}function Rl(ie){const Xe=Yb(ie),ei=Xe!==0;return is(ie,ei?512:1024,ei?110735:0),Xe}function zl(ie){const Xe=Ie(131072,et(ie));Le(Xe,ie,131072);const ei=Ie(2048,"__type");Le(ei,ie,2048),ei.members=ga(),ei.members.set(Xe.escapedName,Xe)}function co(ie){return $s(ie,4096,"__object")}function ca(ie){return $s(ie,4096,"__jsxAttributes")}function Ic(ie,Xe,ei){return is(ie,Xe,ei)}function $s(ie,Xe,ei){const Dn=Ie(Xe,ei);return Xe&106508&&(Dn.parent=h.symbol),Le(Dn,ie,Xe),Dn}function Ps(ie,Xe,ei){switch(m.kind){case 267:Ue(ie,Xe,ei);break;case 307:if(ep(h)){Ue(ie,Xe,ei);break}default:z.assertNode(m,A1),m.locals||(m.locals=ga(),Ar(m)),We(m.locals,void 0,ie,Xe,ei)}}function pf(){if(!b)return;const ie=h,Xe=C,ei=m,Dn=u,Ss=N;for(const Vo of b){const po=Vo.parent.parent;h=rJ(po)||t,m=j0(po)||t,N=j1(2,void 0,void 0),u=Vo,Fi(Vo.typeExpression);const $o=ko(Vo);if((pV(Vo)||!Vo.fullName)&&$o&&HW($o.parent)){const Dl=nm($o.parent);if(Dl){xg(t.symbol,$o.parent,Dl,!!Xi($o,hu=>Ir(hu)&&hu.name.escapedText==="prototype"),!1);const Ga=h;switch(yW($o.parent)){case 1:case 2:ep(t)?h=t:h=void 0;break;case 4:h=$o.parent.expression;break;case 3:h=$o.parent.expression.name;break;case 5:h=tD(t,$o.parent.expression)?t:Ir($o.parent.expression)?$o.parent.expression.name:$o.parent.expression;break;case 0:return z.fail("Shouldn't have detected typedef or enum on non-assignment declaration")}h&&Ue(Vo,524288,788968),h=Ga}}else pV(Vo)||!Vo.fullName||Vo.fullName.kind===80?(u=Vo.parent,Ps(Vo,524288,788968)):Fi(Vo.fullName)}h=ie,C=Xe,m=ei,u=Dn,N=Ss}function qc(){if(E===void 0)return;const ie=h,Xe=C,ei=m,Dn=u,Ss=N;for(const Vo of E){const po=AT(Vo),$o=po?rJ(po):void 0,Dl=po?j0(po):void 0;h=$o||t,m=Dl||t,N=j1(2,void 0,void 0),u=Vo,Fi(Vo.importClause)}h=ie,C=Xe,m=ei,u=Dn,N=Ss}function wh(ie){if(!t.parseDiagnostics.length&&!(ie.flags&33554432)&&!(ie.flags&16777216)&&!xxe(ie)){const Xe=QE(ie);if(Xe===void 0)return;oe&&Xe>=119&&Xe<=127?t.bindDiagnostics.push(Fe(ie,Tu(ie),sc(ie))):Xe===135?Td(t)&&_J(ie)?t.bindDiagnostics.push(Fe(ie,k.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module,sc(ie))):ie.flags&65536&&t.bindDiagnostics.push(Fe(ie,k.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,sc(ie))):Xe===127&&ie.flags&16384&&t.bindDiagnostics.push(Fe(ie,k.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,sc(ie)))}}function Tu(ie){return Sf(ie)?k.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode:t.externalModuleIndicator?k.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode:k.Identifier_expected_0_is_a_reserved_word_in_strict_mode}function Wf(ie){ie.escapedText==="#constructor"&&(t.parseDiagnostics.length||t.bindDiagnostics.push(Fe(ie,k.constructor_is_a_reserved_word,sc(ie))))}function za(ie){oe&&M_(ie.left)&&jb(ie.operatorToken.kind)&&Li(ie,ie.left)}function Mc(ie){oe&&ie.variableDeclaration&&Li(ie,ie.variableDeclaration.name)}function Ul(ie){if(oe&&ie.expression.kind===80){const Xe=nI(t,ie.expression);t.bindDiagnostics.push(ef(t,Xe.start,Xe.length,k.delete_cannot_be_called_on_an_identifier_in_strict_mode))}}function wl(ie){return lt(ie)&&(ie.escapedText==="eval"||ie.escapedText==="arguments")}function Li(ie,Xe){if(Xe&&Xe.kind===80){const ei=Xe;if(wl(ei)){const Dn=nI(t,Xe);t.bindDiagnostics.push(ef(t,Dn.start,Dn.length,wu(ie),dr(ei)))}}}function wu(ie){return Sf(ie)?k.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode:t.externalModuleIndicator?k.Invalid_use_of_0_Modules_are_automatically_in_strict_mode:k.Invalid_use_of_0_in_strict_mode}function zh(ie){oe&&!(ie.flags&33554432)&&Li(ie,ie.name)}function Uh(ie){return Sf(ie)?k.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode:t.externalModuleIndicator?k.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode:k.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5}function z_(ie){if(a<2&&m.kind!==307&&m.kind!==267&&!w6(m)){const Xe=nI(t,ie);t.bindDiagnostics.push(ef(t,Xe.start,Xe.length,Uh(ie)))}}function Rc(ie){oe&&Li(ie,ie.operand)}function Qc(ie){oe&&(ie.operator===46||ie.operator===47)&&Li(ie,ie.operand)}function J(ie){oe&&Wt(ie,k.with_statements_are_not_allowed_in_strict_mode)}function ct(ie){oe&&il(r)>=2&&(ywe(ie.statement)||Ou(ie.statement))&&Wt(ie.label,k.A_label_is_not_allowed_here)}function Wt(ie,Xe,...ei){const Dn=R1(t,ie.pos);t.bindDiagnostics.push(ef(t,Dn.start,Dn.length,Xe,...ei))}function mi(ie,Xe,ei){mn(ie,Xe,Xe,ei)}function mn(ie,Xe,ei,Dn){Zr(ie,{pos:Nk(Xe,t),end:ei.end},Dn)}function Zr(ie,Xe,ei){const Dn=ef(t,Xe.pos,Xe.end-Xe.pos,ei);ie?t.bindDiagnostics.push(Dn):t.bindSuggestionDiagnostics=xi(t.bindSuggestionDiagnostics,{...Dn,category:2})}function Fi(ie){if(!ie)return;ml(ie,u),sr&&(ie.tracingPath=t.path);const Xe=oe;if(ql(ie),ie.kind>165){const ei=u;u=ie;const Dn=zle(ie);Dn===0?xt(ie):wt(ie,Dn),u=ei}else{const ei=u;ie.kind===1&&(u=ie),br(ie),u=ei}oe=Xe}function br(ie){if(Jp(ie))if(Xn(ie))for(const Xe of ie.jsDoc)Fi(Xe);else for(const Xe of ie.jsDoc)ml(Xe,ie),$b(Xe,!1)}function Cs(ie){if(!oe)for(const Xe of ie){if(!Nv(Xe))return;if(xs(Xe)){oe=!0;return}}}function xs(ie){const Xe=TT(t,ie.expression);return Xe==='"use strict"'||Xe==="'use strict'"}function ql(ie){switch(ie.kind){case 80:if(ie.flags&4096){let po=ie.parent;for(;po&&!Em(po);)po=po.parent;Ps(po,524288,788968);break}case 110:return N&&(Ut(ie)||u.kind===304)&&(ie.flowNode=N),wh(ie);case 166:N&&vJ(ie)&&(ie.flowNode=N);break;case 236:case 108:ie.flowNode=N;break;case 81:return Wf(ie);case 211:case 212:const Xe=ie;N&&ft(Xe)&&(Xe.flowNode=N),gxe(Xe)&&Mu(Xe),Xn(Xe)&&t.commonJsModuleIndicator&&Jy(Xe)&&!PK(m,"module")&&We(t.locals,void 0,Xe.expression,134217729,111550);break;case 226:switch(Lu(ie)){case 1:it(ie);break;case 2:ai(ie);break;case 3:$l(ie.left,ie);break;case 6:Ld(ie);break;case 4:uo(ie);break;case 5:const po=ie.left.expression;if(Xn(ie)&<(po)){const $o=PK(m,po.escapedText);if(pJ($o==null?void 0:$o.valueDeclaration)){uo(ie);break}}np(ie);break;case 0:break;default:z.fail("Unknown binary expression special property assignment kind")}return za(ie);case 299:return Mc(ie);case 220:return Ul(ie);case 225:return Rc(ie);case 224:return Qc(ie);case 254:return J(ie);case 256:return ct(ie);case 197:T=!0;return;case 182:break;case 168:return Vn(ie);case 169:return me(ie);case 260:return Tg(ie);case 208:return ie.flowNode=N,Tg(ie);case 172:case 171:return Xc(ie);case 303:case 304:return gi(ie,4,0);case 306:return gi(ie,8,900095);case 179:case 180:case 181:return is(ie,131072,0);case 174:case 173:return gi(ie,8192|(ie.questionToken?16777216:0),f0(ie)?0:103359);case 262:return At(ie);case 176:return is(ie,16384,0);case 177:return gi(ie,32768,46015);case 178:return gi(ie,65536,78783);case 184:case 317:case 323:case 185:return zl(ie);case 187:case 322:case 200:return Id(ie);case 332:return fi(ie);case 210:return co(ie);case 218:case 219:return di(ie);case 213:switch(Lu(ie)){case 7:return Ju(ie);case 8:return wg(ie);case 9:return Xl(ie);case 0:break;default:return z.fail("Unknown call expression assignment declaration kind")}Xn(ie)&&G1(ie);break;case 231:case 263:return oe=!0,rp(ie);case 264:return Ps(ie,64,788872);case 265:return Ps(ie,524288,788968);case 266:return Xv(ie);case 267:return Sl(ie);case 292:return ca(ie);case 291:return Ic(ie,4,0);case 271:case 274:case 276:case 281:return is(ie,2097152,2097152);case 270:return qd(ie);case 273:return Nd(ie);case 278:return qh(ie);case 277:return Fc(ie);case 307:return Cs(ie.statements),$c();case 241:if(!w6(ie.parent))return;case 268:return Cs(ie.statements);case 341:if(ie.parent.kind===323)return me(ie);if(ie.parent.kind!==322)break;case 348:const Ss=ie,Vo=Ss.isBracketed||Ss.typeExpression&&Ss.typeExpression.type.kind===316?16777220:4;return is(Ss,Vo,0);case 346:case 338:case 340:return(b||(b=[])).push(ie);case 339:return Fi(ie.typeExpression);case 351:return(E||(E=[])).push(ie)}}function Xc(ie){const Xe=O_(ie),ei=Xe?98304:4,Dn=Xe?13247:0;return gi(ie,ei|(ie.questionToken?16777216:0),Dn)}function Id(ie){return $s(ie,2048,"__type")}function $c(){if(zo(t),Td(t))Ud();else if(Dm(t)){Ud();const ie=t.symbol;We(t.symbol.exports,t.symbol,t,4,-1),t.symbol=ie}}function Ud(){$s(t,512,`"${h_(t.fileName)}"`)}function Fc(ie){if(!h.symbol||!h.symbol.exports)$s(ie,111551,et(ie));else{const Xe=V6(ie)?2097152:4,ei=We(h.symbol.exports,h.symbol,ie,Xe,-1);ie.isExportEquals&&CW(ei,ie)}}function qd(ie){Rt(ie.modifiers)&&t.bindDiagnostics.push(Fe(ie,k.Modifiers_cannot_appear_here));const Xe=Ns(ie.parent)?Td(ie.parent)?ie.parent.isDeclarationFile?void 0:k.Global_module_exports_may_only_appear_in_declaration_files:k.Global_module_exports_may_only_appear_in_module_files:k.Global_module_exports_may_only_appear_at_top_level;Xe?t.bindDiagnostics.push(Fe(ie,Xe)):(t.symbol.globalExports=t.symbol.globalExports||ga(),We(t.symbol.globalExports,t.symbol,ie,2097152,2097152))}function qh(ie){!h.symbol||!h.symbol.exports?$s(ie,8388608,et(ie)):ie.exportClause?H1(ie.exportClause)&&(ml(ie.exportClause,ie),We(h.symbol.exports,h.symbol,ie.exportClause,2097152,2097152)):We(h.symbol.exports,h.symbol,ie,8388608,0)}function Nd(ie){ie.name&&is(ie,2097152,2097152)}function md(ie){return t.externalModuleIndicator&&t.externalModuleIndicator!==!0?!1:(t.commonJsModuleIndicator||(t.commonJsModuleIndicator=ie,t.externalModuleIndicator||Ud()),!0)}function wg(ie){if(!md(ie))return;const Xe=vd(ie.arguments[0],void 0,(ei,Dn)=>(Dn&&Le(Dn,ei,67110400),Dn));Xe&&We(Xe.exports,Xe,ie,1048580,0)}function it(ie){if(!md(ie))return;const Xe=vd(ie.left.expression,void 0,(ei,Dn)=>(Dn&&Le(Dn,ei,67110400),Dn));if(Xe){const Dn=IW(ie.right)&&(sI(ie.left.expression)||Jy(ie.left.expression))?2097152:1048580;ml(ie.left,ie),We(Xe.exports,Xe,ie.left,Dn,0)}}function ai(ie){if(!md(ie))return;const Xe=gW(ie.right);if(Ooe(Xe)||h===t&&tD(t,Xe))return;if(Pa(Xe)&&Be(Xe.properties,ih)){W(Xe.properties,Sn);return}const ei=V6(ie)?2097152:1049092,Dn=We(t.symbol.exports,t.symbol,ie,ei|67108864,0);CW(Dn,ie)}function Sn(ie){We(t.symbol.exports,t.symbol,ie,69206016,0)}function uo(ie){if(z.assert(Xn(ie)),cr(ie)&&Ir(ie.left)&&Vs(ie.left.name)||Ir(ie)&&Vs(ie.name))return;const ei=u_(ie,!1,!1);switch(ei.kind){case 262:case 218:let Dn=ei.symbol;if(cr(ei.parent)&&ei.parent.operatorToken.kind===64){const po=ei.parent.left;PT(po)&&$w(po.expression)&&(Dn=q_(po.expression.expression,p))}Dn&&Dn.valueDeclaration&&(Dn.members=Dn.members||ga(),Hb(ie)?rl(ie,Dn,Dn.members):We(Dn.members,Dn,ie,67108868,0),Le(Dn,Dn.valueDeclaration,32));break;case 176:case 172:case 174:case 177:case 178:case 175:const Ss=ei.parent,Vo=da(ei)?Ss.symbol.exports:Ss.symbol.members;Hb(ie)?rl(ie,Ss.symbol,Vo):We(Vo,Ss.symbol,ie,67108868,0,!0);break;case 307:if(Hb(ie))break;ei.commonJsModuleIndicator?We(ei.symbol.exports,ei.symbol,ie,1048580,0):is(ie,1,111550);break;case 267:break;default:z.failBadSyntaxKind(ei)}}function rl(ie,Xe,ei){We(ei,Xe,ie,4,0,!0,!0),hl(ie,Xe)}function hl(ie,Xe){Xe&&(Xe.assignmentDeclarationMembers||(Xe.assignmentDeclarationMembers=new Map)).set(Tl(ie),ie)}function Mu(ie){ie.expression.kind===110?uo(ie):PT(ie)&&ie.parent.parent.kind===307&&($w(ie.expression)?$l(ie,ie.parent):ev(ie))}function Ld(ie){ml(ie.left,ie),ml(ie.right,ie),kg(ie.left.expression,ie.left,!1,!0)}function Xl(ie){const Xe=q_(ie.arguments[0].expression);Xe&&Xe.valueDeclaration&&Le(Xe,Xe.valueDeclaration,32),U_(ie,Xe,!0)}function $l(ie,Xe){const ei=ie.expression,Dn=ei.expression;ml(Dn,ei),ml(ei,ie),ml(ie,Xe),kg(Dn,ie,!0,!0)}function Ju(ie){let Xe=q_(ie.arguments[0]);const ei=ie.parent.parent.kind===307;Xe=xg(Xe,ie.arguments[0],ei,!1,!1),U_(ie,Xe,!1)}function np(ie){var Xe;const ei=q_(ie.left.expression,m)||q_(ie.left.expression,h);if(!Xn(ie)&&!mxe(ei))return;const Dn=Q6(ie.left);if(!(lt(Dn)&&((Xe=PK(h,Dn.escapedText))==null?void 0:Xe.flags)&2097152))if(ml(ie.left,ie),ml(ie.right,ie),lt(ie.left.expression)&&h===t&&tD(t,ie.left.expression))it(ie);else if(Hb(ie)){$s(ie,67108868,"__computed");const Ss=xg(ei,ie.left.expression,nm(ie.left),!1,!1);hl(ie,Ss)}else ev(ua(ie.left,aI))}function ev(ie){z.assert(!lt(ie)),ml(ie.expression,ie),kg(ie.expression,ie,!1,!1)}function xg(ie,Xe,ei,Dn,Ss){return(ie==null?void 0:ie.flags)&2097152||(ei&&!Dn&&(ie=vd(Xe,ie,($o,Dl,Ga)=>{if(Dl)return Le(Dl,$o,67110400),Dl;{const hu=Ga?Ga.exports:t.jsGlobalAugmentations||(t.jsGlobalAugmentations=ga());return We(hu,Ga,$o,67110400,110735)}})),Ss&&ie&&ie.valueDeclaration&&Le(ie,ie.valueDeclaration,32)),ie}function U_(ie,Xe,ei){if(!Xe||!$1(Xe))return;const Dn=ei?Xe.members||(Xe.members=ga()):Xe.exports||(Xe.exports=ga());let Ss=0,Vo=0;rc(JL(ie))?(Ss=8192,Vo=103359):sa(ie)&&oI(ie)&&(Rt(ie.arguments[2].properties,po=>{const $o=ko(po);return!!$o&<($o)&&dr($o)==="set"})&&(Ss|=65540,Vo|=78783),Rt(ie.arguments[2].properties,po=>{const $o=ko(po);return!!$o&<($o)&&dr($o)==="get"})&&(Ss|=32772,Vo|=46015)),Ss===0&&(Ss=4,Vo=0),We(Dn,Xe,ie,Ss|67108864,Vo&-67108865)}function nm(ie){return cr(ie.parent)?J1(ie.parent).parent.kind===307:ie.parent.parent.kind===307}function kg(ie,Xe,ei,Dn){let Ss=q_(ie,m)||q_(ie,h);const Vo=nm(Xe);Ss=xg(Ss,Xe.expression,Vo,ei,Dn),U_(Xe,Ss,ei)}function $1(ie){if(ie.flags&1072)return!0;const Xe=ie.valueDeclaration;if(Xe&&sa(Xe))return!!JL(Xe);let ei=Xe?ds(Xe)?Xe.initializer:cr(Xe)?Xe.right:Ir(Xe)&&cr(Xe.parent)?Xe.parent.right:void 0:void 0;if(ei=ei&&gW(ei),ei){const Dn=$w(ds(Xe)?Xe.name:cr(Xe)?Xe.left:Xe);return!!Pk(cr(ei)&&(ei.operatorToken.kind===57||ei.operatorToken.kind===61)?ei.right:ei,Dn)}return!1}function J1(ie){for(;cr(ie.parent);)ie=ie.parent;return ie.parent}function q_(ie,Xe=h){if(lt(ie))return PK(Xe,ie.escapedText);{const ei=q_(ie.expression);return ei&&ei.exports&&ei.exports.get(Wb(ie))}}function vd(ie,Xe,ei){if(tD(t,ie))return t.symbol;if(lt(ie))return ei(ie,q_(ie),Xe);{const Dn=vd(ie.expression,Xe,ei),Ss=vW(ie);return Vs(Ss)&&z.fail("unexpected PrivateIdentifier"),ei(Ss,Dn&&Dn.exports&&Dn.exports.get(Wb(ie)),Dn)}}function G1(ie){!t.commonJsModuleIndicator&&B_(ie,!1)&&md(ie)}function rp(ie){if(ie.kind===263)Ps(ie,32,899503);else{const Ss=ie.name?ie.name.escapedText:"__class";$s(ie,32,Ss),ie.name&&_e.add(ie.name.escapedText)}const{symbol:Xe}=ie,ei=Ie(4194308,"prototype"),Dn=Xe.exports.get(ei.escapedName);Dn&&(ie.name&&ml(ie.name,ie),t.bindDiagnostics.push(Fe(Dn.declarations[0],k.Duplicate_identifier_0,xu(ei)))),Xe.exports.set(ei.escapedName,ei),ei.parent=Xe}function Xv(ie){return ET(ie)?Ps(ie,128,899967):Ps(ie,256,899327)}function Tg(ie){if(oe&&Li(ie,ie.name),!Qo(ie.name)){const Xe=ie.kind===260?ie:ie.parent.parent;Xn(ie)&<(Xe)&&!xk(ie)&&!(wk(ie)&32)?is(ie,2097152,2097152):Mse(ie)?Ps(ie,2,111551):Fk(ie)?is(ie,1,111551):is(ie,1,111550)}}function me(ie){if(!(ie.kind===341&&h.kind!==323)&&(oe&&!(ie.flags&33554432)&&Li(ie,ie.name),Qo(ie.name)?$s(ie,1,"__"+ie.parent.parameters.indexOf(ie)):is(ie,1,111551),xp(ie,ie.parent))){const Xe=ie.parent.parent;We(Xe.symbol.members,Xe.symbol,ie,4|(ie.questionToken?16777216:0),0)}}function At(ie){!t.isDeclarationFile&&!(ie.flags&33554432)&&N8(ie)&&(Se|=4096),zh(ie),oe?(z_(ie),Ps(ie,16,110991)):is(ie,16,110991)}function di(ie){!t.isDeclarationFile&&!(ie.flags&33554432)&&N8(ie)&&(Se|=4096),N&&(ie.flowNode=N),zh(ie);const Xe=ie.name?ie.name.escapedText:"__function";return $s(ie,16,Xe)}function gi(ie,Xe,ei){return!t.isDeclarationFile&&!(ie.flags&33554432)&&N8(ie)&&(Se|=4096),N&&uJ(ie)&&(ie.flowNode=N),Hb(ie)?$s(ie,Xe,"__computed"):is(ie,Xe,ei)}function dn(ie){const Xe=Xi(ie,ei=>ei.parent&&$T(ei.parent)&&ei.parent.extendsType===ei);return Xe&&Xe.parent}function Vn(ie){if(Rm(ie.parent)){const Xe=TJ(ie.parent);Xe?(z.assertNode(Xe,A1),Xe.locals??(Xe.locals=ga()),We(Xe.locals,void 0,ie,262144,526824)):is(ie,262144,526824)}else if(ie.parent.kind===195){const Xe=dn(ie.parent);Xe?(z.assertNode(Xe,A1),Xe.locals??(Xe.locals=ga()),We(Xe.locals,void 0,ie,262144,526824)):$s(ie,262144,et(ie))}else is(ie,262144,526824)}function Lr(ie){const Xe=Yb(ie);return Xe===1||Xe===2&&HT(r)}function ls(ie){if(!(N.flags&1))return!1;if(N===ve&&($B(ie)&&ie.kind!==242||ie.kind===263||ie.kind===267&&Lr(ie))&&(N=Ee,!r.allowUnreachableCode)){const ei=gke(r)&&!(ie.flags&33554432)&&(!Ou(ie)||!!(Rb(ie.declarationList)&7)||ie.declarationList.declarations.some(Dn=>!!Dn.initializer));wPt(ie,(Dn,Ss)=>mn(ei,Dn,Ss,k.Unreachable_code_detected))}return!0}}function wPt(t,r){if(Es(t)&&rKe(t)&&Ho(t.parent)){const{statements:a}=t.parent,u=sae(a,t);Ry(u,rKe,(h,p)=>r(u[h],u[p-1]))}else r(t,t)}function rKe(t){return!Uu(t)&&!xPt(t)&&!Uk(t)&&!(Ou(t)&&!(Rb(t)&7)&&t.declarationList.declarations.some(r=>!r.initializer))}function xPt(t){switch(t.kind){case 264:case 265:return!0;case 267:return Yb(t)!==1;case 266:return Kr(t,4096);default:return!1}}function tD(t,r){let a=0;const u=_B();for(u.enqueue(r);!u.isEmpty()&&a<100;){if(a++,r=u.dequeue(),sI(r)||Jy(r))return!0;if(lt(r)){const h=PK(t,r.escapedText);if(h&&h.valueDeclaration&&ds(h.valueDeclaration)&&h.valueDeclaration.initializer){const p=h.valueDeclaration.initializer;u.enqueue(p),Yd(p,!0)&&(u.enqueue(p.left),u.enqueue(p.right))}}}return!1}function zle(t){switch(t.kind){case 231:case 263:case 266:case 210:case 187:case 322:case 292:return 1;case 264:return 65;case 267:case 265:case 200:case 181:return 33;case 307:return 37;case 177:case 178:case 174:if(uJ(t))return 173;case 176:case 262:case 173:case 179:case 323:case 317:case 184:case 180:case 185:case 175:return 45;case 218:case 219:return 61;case 268:return 4;case 172:return t.initializer?4:0;case 299:case 248:case 249:case 250:case 269:return 34;case 241:return Bo(t.parent)||bu(t.parent)?0:34}return 0}function PK(t,r){var a,u,h,p;const m=(u=(a=$r(t,A1))==null?void 0:a.locals)==null?void 0:u.get(r);if(m)return m.exportSymbol??m;if(Ns(t)&&t.jsGlobalAugmentations&&t.jsGlobalAugmentations.has(r))return t.jsGlobalAugmentations.get(r);if(H0(t))return(p=(h=t.symbol)==null?void 0:h.exports)==null?void 0:p.get(r)}function MDe(t,r,a,u,h,p,m,C,b,T){return E;function E(N=()=>!0){const R=[],F=[];return{walkType:ye=>{try{return j(ye),{visitedTypes:Za(R),visitedSymbols:Za(F)}}finally{Xs(R),Xs(F)}},walkSymbol:ye=>{try{return pe(ye),{visitedTypes:Za(R),visitedSymbols:Za(F)}}finally{Xs(R),Xs(F)}}};function j(ye){if(!(!ye||R[ye.id]||(R[ye.id]=ye,pe(ye.symbol)))){if(ye.flags&524288){const _e=ye,ve=_e.objectFlags;ve&4&&U(ye),ve&32&&ue(ye),ve&3&&Se(ye),ve&24&&oe(_e)}ye.flags&262144&&q(ye),ye.flags&3145728&&Q(ye),ye.flags&4194304&&re(ye),ye.flags&8388608&&Y(ye)}}function U(ye){j(ye.target),W(T(ye),j)}function q(ye){j(C(ye))}function Q(ye){W(ye.types,j)}function re(ye){j(ye.type)}function Y(ye){j(ye.objectType),j(ye.indexType),j(ye.constraint)}function ue(ye){j(ye.typeParameter),j(ye.constraintType),j(ye.templateType),j(ye.modifiersType)}function te(ye){const be=r(ye);be&&j(be.type),W(ye.typeParameters,j);for(const _e of ye.parameters)pe(_e);j(t(ye)),j(a(ye))}function Se(ye){oe(ye),W(ye.typeParameters,j),W(u(ye),j),j(ye.thisType)}function oe(ye){const be=h(ye);for(const _e of be.indexInfos)j(_e.keyType),j(_e.type);for(const _e of be.callSignatures)te(_e);for(const _e of be.constructSignatures)te(_e);for(const _e of be.properties)pe(_e)}function pe(ye){if(!ye)return!1;const be=Aa(ye);if(F[be])return!1;if(F[be]=ye,!N(ye))return!0;const _e=p(ye);return j(_e),ye.exports&&ye.exports.forEach(pe),W(ye.declarations,ve=>{if(ve.type&&ve.type.kind===186){const Ee=ve.type,ke=m(b(Ee.exprName));pe(ke)}}),!1}}}var e2={};l(e2,{RelativePreference:()=>sKe,countPathComponents:()=>OK,forEachFileNameOfModule:()=>fKe,getLocalModuleSpecifierBetweenFileNames:()=>EPt,getModuleSpecifier:()=>oKe,getModuleSpecifierPreferences:()=>B7,getModuleSpecifiers:()=>cKe,getModuleSpecifiersWithCacheInfo:()=>uKe,getNodeModulesPackageName:()=>TPt,tryGetJSExtensionForFile:()=>VDe,tryGetModuleSpecifiersFromCache:()=>DPt,tryGetRealFileNameForNonJsDeclarationFileName:()=>mKe,updateModuleSpecifier:()=>kPt});var sKe=(t=>(t[t.Relative=0]="Relative",t[t.NonRelative=1]="NonRelative",t[t.Shortest=2]="Shortest",t[t.ExternalNonRelative=3]="ExternalNonRelative",t))(sKe||{});function B7({importModuleSpecifierPreference:t,importModuleSpecifierEnding:r},a,u,h){const p=m();return{relativePreference:h!==void 0?Zd(h)?0:1:t==="relative"?0:t==="non-relative"?1:t==="project-relative"?3:2,getAllowedEndingsInPreferredOrder:C=>{const b=C!==u.impliedNodeFormat?m(C):p;if((C??u.impliedNodeFormat)===99)return S3(a,u.fileName)?[3,2]:[2];if(f_(a)===1)return b===2?[2,1]:[1,2];const T=S3(a,u.fileName);switch(b){case 2:return T?[2,3,0,1]:[2,0,1];case 3:return[3,0,2,1];case 1:return T?[1,0,3,2]:[1,0,2];case 0:return T?[0,1,3,2]:[0,1,2];default:z.assertNever(b)}}};function m(C){if(h!==void 0){if(Zy(h))return 2;if(mu(h,"/index"))return 1}return Nke(r,C??u.impliedNodeFormat,a,aS(u)?u:void 0)}}function kPt(t,r,a,u,h,p,m={}){const C=aKe(t,r,a,u,h,B7({},t,r,p),{},m);if(C!==p)return C}function oKe(t,r,a,u,h,p={}){return aKe(t,r,a,u,h,B7({},t,r),{},p)}function TPt(t,r,a,u,h,p={}){const m=AK(r.fileName,u),C=hKe(m,a,u,h,t,p);return Z(C,b=>BDe(b,m,r,u,t,h,!0,p.overrideImportMode))}function aKe(t,r,a,u,h,p,m,C={}){const b=AK(a,h),T=hKe(b,u,h,m,t,C);return Z(T,E=>BDe(E,b,r,h,t,m,void 0,C.overrideImportMode))||RDe(u,b,t,h,C.overrideImportMode||r.impliedNodeFormat,p)}function DPt(t,r,a,u,h={}){const p=lKe(t,r,a,u,h);return p[1]&&{kind:p[0],moduleSpecifiers:p[1],computedWithoutCache:!1}}function lKe(t,r,a,u,h={}){var p;const m=Z$(t);if(!m)return x;const C=(p=a.getModuleSpecifierCache)==null?void 0:p.call(a),b=C==null?void 0:C.get(r.path,m.path,u,h);return[b==null?void 0:b.kind,b==null?void 0:b.moduleSpecifiers,m,b==null?void 0:b.modulePaths,C]}function cKe(t,r,a,u,h,p,m={}){return uKe(t,r,a,u,h,p,m,!1).moduleSpecifiers}function uKe(t,r,a,u,h,p,m={},C){let b=!1;const T=APt(t,r);if(T)return{kind:"ambient",moduleSpecifiers:[T],computedWithoutCache:b};let[E,N,R,F,j]=lKe(t,u,h,p,m);if(N)return{kind:E,moduleSpecifiers:N,computedWithoutCache:b};if(!R)return{kind:void 0,moduleSpecifiers:x,computedWithoutCache:b};b=!0,F||(F=_Ke(AK(u.fileName,h),R.originalFileName,h,a,m));const U=IPt(F,a,u,h,p,m,C);return j==null||j.set(u.path,R.path,p,m,U.kind,F,U.moduleSpecifiers),U}function EPt(t,r,a,u,h={}){const p=AK(t.fileName,u),m=h.overrideImportMode??t.impliedNodeFormat;return RDe(r,p,a,u,m,B7({},a,t))}function IPt(t,r,a,u,h,p={},m){const C=AK(a.fileName,u),b=B7(h,r,a),T=aS(a)&&W(t,U=>W(u.getFileIncludeReasons().get(_c(U.path,u.getCurrentDirectory(),C.getCanonicalFileName)),q=>{if(q.kind!==3||q.file!==a.path||a.impliedNodeFormat&&a.impliedNodeFormat!==eIe(a,q.index,r))return;const Q=ZV(a,q.index).text;return b.relativePreference!==1||!cg(Q)?Q:void 0}));if(T)return{kind:void 0,moduleSpecifiers:[T],computedWithoutCache:!0};const E=Rt(t,U=>U.isInNodeModules);let N,R,F,j;for(const U of t){const q=U.isInNodeModules?BDe(U,C,a,u,r,h,void 0,p.overrideImportMode):void 0;if(N=xi(N,q),q&&U.isRedirect)return{kind:"node_modules",moduleSpecifiers:N,computedWithoutCache:!0};if(!q){const Q=RDe(U.path,C,r,u,p.overrideImportMode||a.impliedNodeFormat,b,U.isRedirect);if(!Q)continue;U.isRedirect?F=xi(F,Q):$re(Q)?Zk(Q)?j=xi(j,Q):R=xi(R,Q):(m||!E||U.isInNodeModules)&&(j=xi(j,Q))}}return R!=null&&R.length?{kind:"paths",moduleSpecifiers:R,computedWithoutCache:!0}:F!=null&&F.length?{kind:"redirect",moduleSpecifiers:F,computedWithoutCache:!0}:N!=null&&N.length?{kind:"node_modules",moduleSpecifiers:N,computedWithoutCache:!0}:{kind:"relative",moduleSpecifiers:z.checkDefined(j),computedWithoutCache:!0}}function AK(t,r){t=bo(t,r.getCurrentDirectory());const a=Zf(r.useCaseSensitiveFileNames?r.useCaseSensitiveFileNames():!0),u=rs(t);return{getCanonicalFileName:a,importingSourceFileName:t,sourceDirectory:u,canonicalSourceDirectory:a(u)}}function RDe(t,r,a,u,h,{getAllowedEndingsInPreferredOrder:p,relativePreference:m},C){const{baseUrl:b,paths:T,rootDirs:E}=a;if(C&&!T)return;const{sourceDirectory:N,canonicalSourceDirectory:R,getCanonicalFileName:F}=r,j=p(h),U=E&&RPt(E,t,N,F,j,a)||FV(KE(W0(N,t,F)),j,a);if(!b&&!T&&!Goe(a)||m===0)return C?void 0:U;const q=bo(MJ(a,u)||b,u.getCurrentDirectory()),Q=vKe(t,q,F);if(!Q)return C?void 0:U;const re=C?void 0:MPt(t,N,a,u,h),Y=C||re===void 0?T&&pKe(Q,T,j,u,a):void 0;if(C)return Y;const ue=re??(Y===void 0&&b!==void 0?FV(Q,j,a):Y);if(!ue)return U;if(m===1&&!cg(ue))return ue;if(m===3&&!cg(ue)){const te=a.configFilePath?_c(rs(a.configFilePath),u.getCurrentDirectory(),r.getCanonicalFileName):r.getCanonicalFileName(u.getCurrentDirectory()),Se=_c(t,te,F),oe=ro(R,te),pe=ro(Se,te);if(oe&&!pe||!oe&&pe)return ue;const ye=FDe(u,rs(Se)),be=FDe(u,N),_e=!$6(u);return NPt(ye,be,_e)?U:ue}return yKe(ue)||OK(U)t.fileExists(Hr(a,"package.json"))?a:void 0)}function fKe(t,r,a,u,h){var p;const m=cS(a),C=a.getCurrentDirectory(),b=a.isSourceOfProjectReferenceRedirect(r)?a.getProjectReferenceRedirect(r):void 0,T=_c(r,C,m),E=a.redirectTargetsMap.get(T)||x,R=[...b?[b]:x,r,...E].map(Q=>bo(Q,C));let F=!Be(R,i7);if(!u){const Q=W(R,re=>!(F&&i7(re))&&h(re,b===re));if(Q)return Q}const j=(p=a.getSymlinkCache)==null?void 0:p.call(a).getSymlinkedDirectoriesByRealpath(),U=bo(r,C);return j&&c0(rs(U),Q=>{const re=j.get(Xd(_c(Q,C,m)));if(re)return Kre(t,Q,m)?!1:W(R,Y=>{if(!Kre(Y,Q,m))return;const ue=W0(Q,Y,m);for(const te of re){const Se=Ck(te,ue),oe=h(Se,Y===b);if(F=!0,oe)return oe}})})||(u?W(R,Q=>F&&i7(Q)?void 0:h(Q,Q===b)):void 0)}function hKe(t,r,a,u,h,p={}){var m;const C=_c(t.importingSourceFileName,a.getCurrentDirectory(),cS(a)),b=_c(r,a.getCurrentDirectory(),cS(a)),T=(m=a.getModuleSpecifierCache)==null?void 0:m.call(a);if(T){const N=T.get(C,b,u,p);if(N!=null&&N.modulePaths)return N.modulePaths}const E=_Ke(t,r,a,h,p);return T&&T.setModulePaths(C,b,u,p,E),E}var LPt=["dependencies","peerDependencies","optionalDependencies"];function PPt(t){let r;for(const a of LPt){const u=t[a];u&&typeof u=="object"&&(r=no(r,wm(u)))}return r}function _Ke(t,r,a,u,h){var p,m;const C=(p=a.getModuleResolutionCache)==null?void 0:p.call(a),b=(m=a.getSymlinkCache)==null?void 0:m.call(a);if(C&&b&&a.readFile&&!Zk(t.importingSourceFileName)){z.type(a);const N=M7(C.getPackageJsonInfoCache(),a,{}),R=R7(t.importingSourceFileName,N);if(R){const F=PPt(R.contents.packageJsonContent);for(const j of F||x){const U=HP(j,Hr(R.packageDirectory,"package.json"),u,a,C,void 0,h.overrideImportMode);b.setSymlinksFromResolution(U.resolvedModule)}}}const T=new Map;fKe(t.importingSourceFileName,r,a,!0,(N,R)=>{const F=Zk(N);T.set(N,{path:t.getCanonicalFileName(N),isRedirect:R,isInNodeModules:F})});const E=[];for(let N=t.canonicalSourceDirectory;T.size!==0;){const R=Xd(N);let F;T.forEach(({path:U,isRedirect:q,isInNodeModules:Q},re)=>{ro(U,R)&&((F||(F=[])).push({path:re,isRedirect:q,isInNodeModules:Q}),T.delete(re))}),F&&(F.length>1&&F.sort(dKe),E.push(...F));const j=rs(N);if(j===N)break;N=j}if(T.size){const N=Fn(T.entries(),([R,{isRedirect:F,isInNodeModules:j}])=>({path:R,isRedirect:F,isInNodeModules:j}));N.length>1&&N.sort(dKe),E.push(...N)}return E}function APt(t,r){var a;const u=(a=t.declarations)==null?void 0:a.find(m=>Fse(m)&&(!DT(m)||!Zd(Im(m.name))));if(u)return u.name.text;const p=ns(t.declarations,m=>{var C,b,T,E;if(!qu(m))return;const N=U(m);if(!((C=N==null?void 0:N.parent)!=null&&C.parent&&jv(N.parent)&&Bh(N.parent.parent)&&Ns(N.parent.parent.parent)))return;const R=(E=(T=(b=N.parent.parent.symbol.exports)==null?void 0:b.get("export="))==null?void 0:T.valueDeclaration)==null?void 0:E.expression;if(!R)return;const F=r.getSymbolAtLocation(R);if(!F)return;if(((F==null?void 0:F.flags)&2097152?r.getAliasedSymbol(F):F)===m.symbol)return N.parent.parent;function U(q){for(;q.flags&8;)q=q.parent;return q}})[0];if(p)return p.name.text}function pKe(t,r,a,u,h){for(const m in r)for(const C of r[m]){const b=ra(C),T=b.indexOf("*"),E=a.map(N=>({ending:N,value:FV(t,[N],h)}));if(qb(b)&&E.push({ending:void 0,value:t}),T!==-1){const N=b.substring(0,T),R=b.substring(T+1);for(const{ending:F,value:j}of E)if(j.length>=N.length+R.length&&ro(j,N)&&mu(j,R)&&p({ending:F,value:j})){const U=j.substring(N.length,j.length-R.length);if(!cg(U))return pP(m,U)}}else if(Rt(E,N=>N.ending!==0&&b===N.value)||Rt(E,N=>N.ending===0&&b===N.value&&p(N)))return m}function p({ending:m,value:C}){return m!==0||C===FV(t,[m],h,u)}}function MK(t,r,a,u,h,p,m,C,b){if(typeof p=="string"){const T=!$6(r),E=()=>r.getCommonSourceDirectory(),N=b&&mce(a,t,T,E),R=b&&gce(a,t,T,E),F=bo(Hr(u,p),void 0),j=dP(a)?h_(a)+VDe(a,t):void 0;switch(C){case 0:if(j&&Mb(j,F,T)===0||Mb(a,F,T)===0||N&&Mb(N,F,T)===0||R&&Mb(R,F,T)===0)return{moduleFileToTry:h};break;case 1:if(j&&l0(F,j,T)){const re=W0(F,j,!1);return{moduleFileToTry:bo(Hr(Hr(h,p),re),void 0)}}if(l0(F,a,T)){const re=W0(F,a,!1);return{moduleFileToTry:bo(Hr(Hr(h,p),re),void 0)}}if(N&&l0(F,N,T)){const re=W0(F,N,!1);return{moduleFileToTry:Hr(h,re)}}if(R&&l0(F,R,T)){const re=W0(F,R,!1);return{moduleFileToTry:Hr(h,re)}}break;case 2:const U=F.indexOf("*"),q=F.slice(0,U),Q=F.slice(U+1);if(j&&ro(j,q,T)&&mu(j,Q,T)){const re=j.slice(q.length,j.length-Q.length);return{moduleFileToTry:pP(h,re)}}if(ro(a,q,T)&&mu(a,Q,T)){const re=a.slice(q.length,a.length-Q.length);return{moduleFileToTry:pP(h,re)}}if(N&&ro(N,q,T)&&mu(N,Q,T)){const re=N.slice(q.length,N.length-Q.length);return{moduleFileToTry:pP(h,re)}}if(R&&ro(R,q,T)&&mu(R,Q,T)){const re=R.slice(q.length,R.length-Q.length);return{moduleFileToTry:pP(h,re)}}break}}else{if(Array.isArray(p))return W(p,T=>MK(t,r,a,u,h,T,m,C,b));if(typeof p=="object"&&p!==null){for(const T of wm(p))if(T==="default"||m.indexOf(T)>=0||MV(m,T)){const E=p[T],N=MK(t,r,a,u,h,E,m,C,b);if(N)return N}}}}function OPt(t,r,a,u,h,p,m){return typeof p=="object"&&p!==null&&!Array.isArray(p)&&NK(p)?W(wm(p),C=>{const b=bo(Hr(h,C),void 0),T=mu(C,"/")?1:C.includes("*")?2:0;return MK(t,r,a,u,b,p[C],m,T,!1)}):MK(t,r,a,u,h,p,m,0,!1)}function MPt(t,r,a,u,h){var p,m,C;if(!u.readFile||!Goe(a))return;const b=FDe(u,r);if(!b)return;const T=Hr(b,"package.json"),E=(m=(p=u.getPackageJsonInfoCache)==null?void 0:p.call(u))==null?void 0:m.getPackageJsonInfo(T);if(vDe(E)||!u.fileExists(T))return;const N=(E==null?void 0:E.contents.packageJsonContent)||UJ(u.readFile(T)),R=N==null?void 0:N.imports;if(!R)return;const F=sx(a,h);return(C=W(wm(R),j=>{if(!ro(j,"#")||j==="#"||ro(j,"#/"))return;const U=mu(j,"/")?1:j.includes("*")?2:0;return MK(a,u,t,b,j,R[j],F,U,!0)}))==null?void 0:C.moduleFileToTry}function RPt(t,r,a,u,h,p){const m=gKe(r,t,u);if(m===void 0)return;const C=gKe(a,t,u),b=Ln(C,E=>Yt(m,N=>KE(W0(E,N,u)))),T=hre(b,KW);if(T)return FV(T,h,p)}function BDe({path:t,isRedirect:r},{getCanonicalFileName:a,canonicalSourceDirectory:u},h,p,m,C,b,T){if(!p.fileExists||!p.readFile)return;const E=SG(t);if(!E)return;const R=B7(C,m,h).getAllowedEndingsInPreferredOrder();let F=t,j=!1;if(!b){let ue=E.packageRootIndex,te;for(;;){const{moduleFileToTry:Se,packageRootPath:oe,blockedByExports:pe,verbatimFromExports:ye}=Y(ue);if(f_(m)!==1){if(pe)return;if(ye)return Se}if(oe){F=oe,j=!0;break}if(te||(te=Se),ue=t.indexOf(Hc,ue+1),ue===-1){F=FV(te,R,m,p);break}}}if(r&&!j)return;const U=p.getGlobalTypingsCacheLocation&&p.getGlobalTypingsCacheLocation(),q=a(F.substring(0,E.topLevelNodeModulesIndex));if(!(ro(u,q)||U&&ro(a(U),q)))return;const Q=F.substring(E.topLevelPackageNameIndex+1),re=F7(Q);return f_(m)===1&&re===Q?void 0:re;function Y(ue){var te,Se;const oe=t.substring(0,ue),pe=Hr(oe,"package.json");let ye=t,be=!1;const _e=(Se=(te=p.getPackageJsonInfoCache)==null?void 0:te.call(p))==null?void 0:Se.getPackageJsonInfo(pe);if(kK(_e)||_e===void 0&&p.fileExists(pe)){const ve=(_e==null?void 0:_e.contents.packageJsonContent)||UJ(p.readFile(pe)),Ee=T||h.impliedNodeFormat;if(Joe(m)){const Oe=oe.substring(E.topLevelPackageNameIndex+1),fe=F7(Oe),Ie=sx(m,Ee),Le=ve!=null&&ve.exports?OPt(m,p,t,oe,fe,ve.exports,Ie):void 0;if(Le)return{...Le,verbatimFromExports:!0};if(ve!=null&&ve.exports)return{moduleFileToTry:t,blockedByExports:!0}}const ke=ve!=null&&ve.typesVersions?wK(ve.typesVersions):void 0;if(ke){const Oe=t.slice(oe.length+1),fe=pKe(Oe,ke.paths,R,p,m);fe===void 0?be=!0:ye=Hr(oe,fe)}const Fe=(ve==null?void 0:ve.typings)||(ve==null?void 0:ve.types)||(ve==null?void 0:ve.main)||"index.js";if(mo(Fe)&&!(be&&rae(gG(ke.paths),Fe))){const Oe=_c(Fe,oe,a),fe=a(ye);if(h_(Oe)===h_(fe))return{packageRootPath:oe,moduleFileToTry:ye};if((ve==null?void 0:ve.type)!=="module"&&!rd(fe,pG)&&ro(fe,Oe)&&rs(fe)===Sk(Oe)&&h_(fd(fe))==="index")return{packageRootPath:oe,moduleFileToTry:ye}}}else{const ve=a(ye.substring(E.packageRootIndex+1));if(ve==="index.d.ts"||ve==="index.js"||ve==="index.ts"||ve==="index.tsx")return{moduleFileToTry:ye,packageRootPath:oe}}return{moduleFileToTry:ye}}}function FPt(t,r){if(!t.fileExists)return;const a=zs(K8({allowJs:!0},[{extension:"node",isMixedContent:!1},{extension:"json",isMixedContent:!1,scriptKind:6}]));for(const u of a){const h=r+u;if(t.fileExists(h))return h}}function gKe(t,r,a){return ns(r,u=>{const h=vKe(t,u,a);return h!==void 0&&yKe(h)?void 0:h})}function FV(t,r,a,u){if(rd(t,[".json",".mjs",".cjs"]))return t;const h=h_(t);if(t===h)return t;const p=r.indexOf(2),m=r.indexOf(3);if(rd(t,[".mts",".cts"])&&m!==-1&&mT===0||T===1);return b!==-1&&b(t[t.None=0]="None",t[t.TypeofEQString=1]="TypeofEQString",t[t.TypeofEQNumber=2]="TypeofEQNumber",t[t.TypeofEQBigInt=4]="TypeofEQBigInt",t[t.TypeofEQBoolean=8]="TypeofEQBoolean",t[t.TypeofEQSymbol=16]="TypeofEQSymbol",t[t.TypeofEQObject=32]="TypeofEQObject",t[t.TypeofEQFunction=64]="TypeofEQFunction",t[t.TypeofEQHostObject=128]="TypeofEQHostObject",t[t.TypeofNEString=256]="TypeofNEString",t[t.TypeofNENumber=512]="TypeofNENumber",t[t.TypeofNEBigInt=1024]="TypeofNEBigInt",t[t.TypeofNEBoolean=2048]="TypeofNEBoolean",t[t.TypeofNESymbol=4096]="TypeofNESymbol",t[t.TypeofNEObject=8192]="TypeofNEObject",t[t.TypeofNEFunction=16384]="TypeofNEFunction",t[t.TypeofNEHostObject=32768]="TypeofNEHostObject",t[t.EQUndefined=65536]="EQUndefined",t[t.EQNull=131072]="EQNull",t[t.EQUndefinedOrNull=262144]="EQUndefinedOrNull",t[t.NEUndefined=524288]="NEUndefined",t[t.NENull=1048576]="NENull",t[t.NEUndefinedOrNull=2097152]="NEUndefinedOrNull",t[t.Truthy=4194304]="Truthy",t[t.Falsy=8388608]="Falsy",t[t.IsUndefined=16777216]="IsUndefined",t[t.IsNull=33554432]="IsNull",t[t.IsUndefinedOrNull=50331648]="IsUndefinedOrNull",t[t.All=134217727]="All",t[t.BaseStringStrictFacts=3735041]="BaseStringStrictFacts",t[t.BaseStringFacts=12582401]="BaseStringFacts",t[t.StringStrictFacts=16317953]="StringStrictFacts",t[t.StringFacts=16776705]="StringFacts",t[t.EmptyStringStrictFacts=12123649]="EmptyStringStrictFacts",t[t.EmptyStringFacts=12582401]="EmptyStringFacts",t[t.NonEmptyStringStrictFacts=7929345]="NonEmptyStringStrictFacts",t[t.NonEmptyStringFacts=16776705]="NonEmptyStringFacts",t[t.BaseNumberStrictFacts=3734786]="BaseNumberStrictFacts",t[t.BaseNumberFacts=12582146]="BaseNumberFacts",t[t.NumberStrictFacts=16317698]="NumberStrictFacts",t[t.NumberFacts=16776450]="NumberFacts",t[t.ZeroNumberStrictFacts=12123394]="ZeroNumberStrictFacts",t[t.ZeroNumberFacts=12582146]="ZeroNumberFacts",t[t.NonZeroNumberStrictFacts=7929090]="NonZeroNumberStrictFacts",t[t.NonZeroNumberFacts=16776450]="NonZeroNumberFacts",t[t.BaseBigIntStrictFacts=3734276]="BaseBigIntStrictFacts",t[t.BaseBigIntFacts=12581636]="BaseBigIntFacts",t[t.BigIntStrictFacts=16317188]="BigIntStrictFacts",t[t.BigIntFacts=16775940]="BigIntFacts",t[t.ZeroBigIntStrictFacts=12122884]="ZeroBigIntStrictFacts",t[t.ZeroBigIntFacts=12581636]="ZeroBigIntFacts",t[t.NonZeroBigIntStrictFacts=7928580]="NonZeroBigIntStrictFacts",t[t.NonZeroBigIntFacts=16775940]="NonZeroBigIntFacts",t[t.BaseBooleanStrictFacts=3733256]="BaseBooleanStrictFacts",t[t.BaseBooleanFacts=12580616]="BaseBooleanFacts",t[t.BooleanStrictFacts=16316168]="BooleanStrictFacts",t[t.BooleanFacts=16774920]="BooleanFacts",t[t.FalseStrictFacts=12121864]="FalseStrictFacts",t[t.FalseFacts=12580616]="FalseFacts",t[t.TrueStrictFacts=7927560]="TrueStrictFacts",t[t.TrueFacts=16774920]="TrueFacts",t[t.SymbolStrictFacts=7925520]="SymbolStrictFacts",t[t.SymbolFacts=16772880]="SymbolFacts",t[t.ObjectStrictFacts=7888800]="ObjectStrictFacts",t[t.ObjectFacts=16736160]="ObjectFacts",t[t.FunctionStrictFacts=7880640]="FunctionStrictFacts",t[t.FunctionFacts=16728e3]="FunctionFacts",t[t.VoidFacts=9830144]="VoidFacts",t[t.UndefinedFacts=26607360]="UndefinedFacts",t[t.NullFacts=42917664]="NullFacts",t[t.EmptyObjectStrictFacts=83427327]="EmptyObjectStrictFacts",t[t.EmptyObjectFacts=83886079]="EmptyObjectFacts",t[t.UnknownFacts=83886079]="UnknownFacts",t[t.AllTypeofNE=556800]="AllTypeofNE",t[t.OrFactsMask=8256]="OrFactsMask",t[t.AndFactsMask=134209471]="AndFactsMask",t))(qle||{}),jDe=new Map(Object.entries({string:256,number:512,bigint:1024,boolean:2048,symbol:4096,undefined:524288,object:8192,function:16384})),$le=(t=>(t[t.Normal=0]="Normal",t[t.Contextual=1]="Contextual",t[t.Inferential=2]="Inferential",t[t.SkipContextSensitive=4]="SkipContextSensitive",t[t.SkipGenericFunctions=8]="SkipGenericFunctions",t[t.IsForSignatureHelp=16]="IsForSignatureHelp",t[t.RestBindingElement=32]="RestBindingElement",t[t.TypeOnly=64]="TypeOnly",t))($le||{}),Jle=(t=>(t[t.None=0]="None",t[t.BivariantCallback=1]="BivariantCallback",t[t.StrictCallback=2]="StrictCallback",t[t.IgnoreReturnTypes=4]="IgnoreReturnTypes",t[t.StrictArity=8]="StrictArity",t[t.StrictTopSignature=16]="StrictTopSignature",t[t.Callback=3]="Callback",t))(Jle||{}),BPt=u$(kKe,VPt),Gle=new Map(Object.entries({Uppercase:0,Lowercase:1,Capitalize:2,Uncapitalize:3,NoInfer:4})),xKe=class{};function WPt(){this.flags=0}function Tl(t){return t.id||(t.id=CKe,CKe++),t.id}function Aa(t){return t.id||(t.id=bKe,bKe++),t.id}function Kle(t,r){const a=Yb(t);return a===1||r&&a===2}function zDe(t){var r=[],a=o=>{r.push(o)},u,h,p=Mf.getSymbolConstructor(),m=Mf.getTypeConstructor(),C=Mf.getSignatureConstructor(),b=0,T=0,E=0,N=0,R=0,F=0,j,U,q=!1,Q=ga(),re=[1],Y=t.getCompilerOptions(),ue=il(Y),te=Vh(Y),Se=!!Y.experimentalDecorators,oe=JW(Y),pe=Koe(Y),ye=cP(Y),be=Hh(Y,"strictNullChecks"),_e=Hh(Y,"strictFunctionTypes"),ve=Hh(Y,"strictBindCallApply"),Ee=Hh(Y,"strictPropertyInitialization"),ke=Hh(Y,"noImplicitAny"),Fe=Hh(Y,"noImplicitThis"),Oe=Hh(Y,"useUnknownInCatchVariables"),fe=Y.exactOptionalPropertyTypes,Ie=WKt(),Le=vYt(),et=gZ(),He=eNe(Y,{isEntityNameVisible:Cx,isExpandoFunctionDeclaration:bpt,getAllAccessorDeclarations:VY,requiresAddingImplicitUndefined:sge,isUndefinedIdentifierExpression(o){return z.assert(z0(o)),Qm(o)===Ye},isDefinitelyReferenceToGlobalSymbolObject:fA}),We=$ke({evaluateElementAccessExpression:aZt,evaluateEntityNameExpression:tpt}),Ue=ga(),Ye=sl(4,"undefined");Ye.declarations=[];var wt=sl(1536,"globalThis",8);wt.exports=Ue,wt.declarations=[],Ue.set(wt.escapedName,wt);var nt=sl(4,"arguments"),ze=sl(4,"require"),st=Y.verbatimModuleSyntax?"verbatimModuleSyntax":"isolatedModules",xt=!Y.verbatimModuleSyntax,Et,ft,Ht=0,Oi,Ji=0,Ui=gae({compilerOptions:Y,requireSymbol:ze,argumentsSymbol:nt,globals:Ue,getSymbolOfDeclaration:wr,error:ht,getRequiresScopeChangeCache:pA,setRequiresScopeChangeCache:X1,lookup:rh,onPropertyWithInvalidInitializer:RS,onFailedToResolveSymbol:cC,onSuccessfullyResolvedSymbol:rO}),bn=gae({compilerOptions:Y,requireSymbol:ze,argumentsSymbol:nt,globals:Ue,getSymbolOfDeclaration:wr,error:ht,getRequiresScopeChangeCache:pA,setRequiresScopeChangeCache:X1,lookup:oGt});const Mi={getNodeCount:()=>nd(t.getSourceFiles(),(o,_)=>o+_.nodeCount,0),getIdentifierCount:()=>nd(t.getSourceFiles(),(o,_)=>o+_.identifierCount,0),getSymbolCount:()=>nd(t.getSourceFiles(),(o,_)=>o+_.symbolCount,T),getTypeCount:()=>b,getInstantiationCount:()=>E,getRelationCacheSizes:()=>({assignable:$_.size,identity:sp.size,subtype:Zv.size,strictSubtype:om.size}),isUndefinedSymbol:o=>o===Ye,isArgumentsSymbol:o=>o===nt,isUnknownSymbol:o=>o===Ot,getMergedSymbol:al,symbolIsValue:Z1,getDiagnostics:lpt,getGlobalDiagnostics:LZt,getRecursionIdentity:$_e,getUnmatchedProperties:vMe,getTypeOfSymbolAtLocation:(o,_)=>{const v=xo(_);return v?S$t(o,v):$e},getTypeOfSymbol:Qn,getSymbolsOfParameterPropertyDeclaration:(o,_)=>{const v=xo(o,Gs);return v===void 0?z.fail("Cannot get symbols of a synthetic parameter that cannot be resolved to a parse-tree node."):(z.assert(xp(v,v.parent)),nO(v,du(_)))},getDeclaredTypeOfSymbol:vc,getPropertiesOfType:Nl,getPropertyOfType:(o,_)=>ya(o,du(_)),getPrivateIdentifierPropertyOfType:(o,_,v)=>{const S=xo(v);if(!S)return;const D=du(_),L=_Y(D,S);return L?Tpe(o,L):void 0},getTypeOfPropertyOfType:(o,_)=>Eu(o,du(_)),getIndexInfoOfType:(o,_)=>hb(o,_===0?tt:Ae),getIndexInfosOfType:Xh,getIndexInfosOfIndexSymbol:hOe,getSignaturesOfType:ea,getIndexTypeOfType:(o,_)=>F2(o,_===0?tt:Ae),getIndexType:o=>l1(o),getBaseTypes:Yr,getBaseTypeOfLiteralType:xC,getWidenedType:up,getWidenedLiteralType:z2,getTypeFromTypeNode:o=>{const _=xo(o,gs);return _?As(_):$e},getParameterType:fv,getParameterIdentifierInfoAtPosition:eKt,getPromisedTypeOfPromise:nz,getAwaitedType:o=>yN(o),getReturnTypeOfSignature:Ol,isNullableType:hY,getNullableType:KZ,getNonNullableType:kC,getNonOptionalType:Q_e,getTypeArguments:Nc,typeToTypeNode:et.typeToTypeNode,indexInfoToIndexSignatureDeclaration:et.indexInfoToIndexSignatureDeclaration,signatureToSignatureDeclaration:et.signatureToSignatureDeclaration,symbolToEntityName:et.symbolToEntityName,symbolToExpression:et.symbolToExpression,symbolToNode:et.symbolToNode,symbolToTypeParameterDeclarations:et.symbolToTypeParameterDeclarations,symbolToParameterDeclaration:et.symbolToParameterDeclaration,typeParameterToDeclaration:et.typeParameterToDeclaration,getSymbolsInScope:(o,_)=>{const v=xo(o);return v?PZt(v,_):[]},getSymbolAtLocation:o=>{const _=xo(o);return _?Qm(_,!0):void 0},getIndexInfosAtLocation:o=>{const _=xo(o);return _?VZt(_):void 0},getShorthandAssignmentValueSymbol:o=>{const _=xo(o);return _?HZt(_):void 0},getExportSpecifierLocalTargetSymbol:o=>{const _=xo(o,gh);return _?jZt(_):void 0},getExportSymbolOfSymbol(o){return al(o.exportSymbol||o)},getTypeAtLocation:o=>{const _=xo(o);return _?UA(_):$e},getTypeOfAssignmentPattern:o=>{const _=xo(o,d8);return _&&ige(_)||$e},getPropertySymbolOfDestructuringAssignment:o=>{const _=xo(o,lt);return _?zZt(_):void 0},signatureToString:(o,_,v,S)=>Sx(o,xo(_),v,S),typeToString:(o,_,v)=>Un(o,xo(_),v),symbolToString:(o,_,v,S)=>Js(o,xo(_),v,S),typePredicateToString:(o,_,v)=>Y1(o,xo(_),v),writeSignature:(o,_,v,S,D)=>Sx(o,xo(_),v,S,D),writeType:(o,_,v,S)=>Un(o,xo(_),v,S),writeSymbol:(o,_,v,S,D)=>Js(o,xo(_),v,S,D),writeTypePredicate:(o,_,v,S)=>Y1(o,xo(_),v,S),getAugmentedPropertiesOfType:o8e,getRootSymbols:ppt,getSymbolOfExpando:Ppe,getContextualType:(o,_)=>{const v=xo(o,Ut);if(v)return _&4?bs(v,()=>w_(v,_)):w_(v,_)},getContextualTypeForObjectLiteralElement:o=>{const _=xo(o,Fb);return _?UMe(_,void 0):void 0},getContextualTypeForArgumentAtIndex:(o,_)=>{const v=xo(o,kT);return v&&zMe(v,_)},getContextualTypeForJsxAttribute:o=>{const _=xo(o,j$);return _&&Mft(_,void 0)},isContextSensitive:fm,getTypeOfPropertyOfContextualType:$2,getFullyQualifiedName:r1,getResolvedSignature:(o,_,v)=>Hi(o,_,v,0),getCandidateSignaturesForStringLiteralCompletions:Ai,getResolvedSignatureForSignatureHelp:(o,_,v)=>Rn(o,()=>Hi(o,_,v,16)),getExpandedParameters:Dct,hasEffectiveRestParameter:ly,containsArgumentsReference:uOe,getConstantValue:o=>{const _=xo(o,Cpt);return _?l8e(_):void 0},isValidPropertyAccess:(o,_)=>{const v=xo(o,dwe);return!!v&&cGt(v,du(_))},isValidPropertyAccessForCompletions:(o,_,v)=>{const S=xo(o,Ir);return!!S&&dht(S,_,v)},getSignatureFromDeclaration:o=>{const _=xo(o,Bo);return _?Mg(_):void 0},isImplementationOfOverload:o=>{const _=xo(o,Bo);return _?ypt(_):void 0},getImmediateAliasedSymbol:bpe,getAliasedSymbol:sf,getEmitResolver:AS,requiresAddingImplicitUndefined:sge,getExportsOfModule:xD,getExportsAndPropertiesOfModule:SA,forEachExportAndPropertyOfModule:JI,getSymbolWalker:MDe(Vjt,dm,Ol,Yr,lv,Qn,S_,C_,Ip,Nc),getAmbientModules:aei,getJsxIntrinsicTagNamesAt:zJt,isOptionalParameter:o=>{const _=xo(o,Gs);return _?EZ(_):!1},tryGetMemberInModuleExports:(o,_)=>Ng(du(o),_),tryGetMemberInModuleExportsAndProperties:(o,_)=>hO(du(o),_),tryFindAmbientModule:o=>lOe(o,!0),tryFindAmbientModuleWithoutAugmentations:o=>lOe(o,!1),getApparentType:Qh,getUnionType:es,isTypeAssignableTo:ba,createAnonymousType:bi,createSignature:fb,createSymbol:sl,createIndexInfo:sy,getAnyType:()=>Je,getStringType:()=>tt,getStringLiteralType:G_,getNumberType:()=>Ae,getNumberLiteralType:D0,getBigIntType:()=>Ke,createPromiseType:kY,createArrayType:sh,getElementTypeOfArrayType:GZ,getBooleanType:()=>fn,getFalseType:o=>o?Qt:ni,getTrueType:o=>o?fi:Gi,getVoidType:()=>or,getUndefinedType:()=>wi,getNullType:()=>je,getESSymbolType:()=>kn,getNeverType:()=>rn,getOptionalType:()=>le,getPromiseType:()=>PZ(!1),getPromiseLikeType:()=>_ut(!1),getAsyncIterableType:()=>{const o=D_e(!1);if(o!==za)return o},isSymbolAccessible:rv,isArrayType:_m,isTupleType:Qa,isArrayLikeType:XS,isEmptyAnonymousObjectType:ay,isTypeInvalidDueToUnionDiscriminant:Cjt,getExactOptionalProperties:XUt,getAllPossiblePropertiesOfTypes:Sjt,getSuggestedSymbolForNonexistentProperty:oRe,getSuggestedSymbolForNonexistentJSXAttribute:aht,getSuggestedSymbolForNonexistentSymbol:(o,_,v)=>cht(o,du(_),v),getSuggestedSymbolForNonexistentModule:aRe,getSuggestedSymbolForNonexistentClassMember:oht,getBaseConstraintOfType:Hf,getDefaultFromTypeParameter:o=>o&&o.flags&262144?tN(o):void 0,resolveName(o,_,v,S){return Ui(_,du(o),v,void 0,!1,S)},getJsxNamespace:o=>Ws(g2(o)),getJsxFragmentFactory:o=>{const _=u8e(o);return _&&Ws(Ip(_).escapedText)},getAccessibleSymbolChain:Co,getTypePredicateOfSignature:dm,resolveExternalModuleName:o=>{const _=xo(o,Ut);return _&&Gh(_,_,!0)},resolveExternalModuleSymbol:J_,tryGetThisTypeAt:(o,_,v)=>{const S=xo(o);return S&&VMe(S,_,v)},getTypeArgumentConstraint:o=>{const _=xo(o,gs);return _&&mQt(_)},getSuggestionDiagnostics:(o,_)=>{const v=xo(o,Ns)||z.fail("Could not determine parsed source file.");if(Y8(v,Y,t))return x;let S;try{return u=_,n8e(v),z.assert(!!(Tr(v).flags&1)),S=un(S,FI.getDiagnostics(v.fileName)),T_t(apt(v),(D,L,B)=>{!E6(D)&&!opt(L,!!(D.flags&33554432))&&(S||(S=[])).push({...B,category:2})}),S||x}finally{u=void 0}},runWithCancellationToken:(o,_)=>{try{return u=o,_(Mi)}finally{u=void 0}},getLocalTypeParametersOfClassOrInterfaceOrTypeAlias:US,isDeclarationVisible:mC,isPropertyAccessible:cRe,getTypeOnlyAliasDeclaration:n1,getMemberOverrideModifierStatus:QXt,isTypeParameterPossiblyReferenced:WZ,typeHasCallOrConstructSignatures:nge,getSymbolFlags:op};function Ai(o,_){const v=new Set,S=[];bs(_,()=>Hi(o,S,void 0,0));for(const D of S)v.add(D);S.length=0,Rn(_,()=>Hi(o,S,void 0,0));for(const D of S)v.add(D);return Fn(v)}function Rn(o,_){if(o=Xi(o,Cse),o){const v=[],S=[];for(;o;){const L=Tr(o);if(v.push([L,L.resolvedSignature]),L.resolvedSignature=void 0,Qw(o)){const B=Zs(wr(o)),K=B.type;S.push([B,K]),B.type=void 0}o=Xi(o.parent,Cse)}const D=_();for(const[L,B]of v)L.resolvedSignature=B;for(const[L,B]of S)L.type=B;return D}return _()}function bs(o,_){const v=Xi(o,kT);if(v){let D=o;do Tr(D).skipDirectInference=!0,D=D.parent;while(D&&D!==v)}q=!0;const S=Rn(o,_);if(q=!1,v){let D=o;do Tr(D).skipDirectInference=void 0,D=D.parent;while(D&&D!==v)}return S}function Hi(o,_,v,S){const D=xo(o,kT);Et=v;const L=D?HO(D,_,S):void 0;return Et=void 0,L}var Hs=new Map,Wo=new Map,ts=new Map,Fo=new Map,Cn=new Map,Ko=new Map,ot=new Map,hi=new Map,hn=new Map,lr=new Map,as=new Map,fs=new Map,Ds=new Map,ha=new Map,Yo=new Map,ji=[],fl=new Map,St=new Set,Ot=sl(4,"unknown"),xe=sl(0,"__resolving__"),Pt=new Map,Re=new Map,mt=new Set,Je=cd(1,"any"),pt=cd(1,"any",262144,"auto"),kt=cd(1,"any",void 0,"wildcard"),Ci=cd(1,"any",void 0,"blocked string"),$e=cd(1,"error"),qt=cd(1,"unresolved"),$t=cd(1,"any",65536,"non-inferrable"),ii=cd(1,"intrinsic"),Gt=cd(2,"unknown"),wi=cd(32768,"undefined"),ce=be?wi:cd(32768,"undefined",65536,"widening"),ut=cd(32768,"undefined",void 0,"missing"),Bt=fe?ut:wi,le=cd(32768,"undefined",void 0,"optional"),je=cd(65536,"null"),de=be?je:cd(65536,"null",65536,"widening"),tt=cd(4,"string"),Ae=cd(8,"number"),Ke=cd(64,"bigint"),Qt=cd(512,"false",void 0,"fresh"),ni=cd(512,"false"),fi=cd(512,"true",void 0,"fresh"),Gi=cd(512,"true");fi.regularType=Gi,fi.freshType=fi,Gi.regularType=Gi,Gi.freshType=fi,Qt.regularType=ni,Qt.freshType=Qt,ni.regularType=ni,ni.freshType=Qt;var fn=es([ni,Gi]),kn=cd(4096,"symbol"),or=cd(16384,"void"),rn=cd(131072,"never"),_r=cd(131072,"never",262144,"silent"),Fs=cd(131072,"never",void 0,"implicit"),to=cd(131072,"never",void 0,"unreachable"),Ar=cd(67108864,"object"),is=es([tt,Ae]),$i=es([tt,Ae,kn]),Tn=es([Ae,Ke]),ki=es([tt,Ae,fn,Ke,je,wi]),zo=nN(["",""],[Ae]),Sl=BZ(o=>o.flags&262144?wUt(o):o,()=>"(restrictive mapper)"),Rl=BZ(o=>o.flags&262144?kt:o,()=>"(permissive mapper)"),zl=cd(131072,"never",void 0,"unique literal"),co=BZ(o=>o.flags&262144?zl:o,()=>"(unique literal mapper)"),ca,Ic=BZ(o=>(ca&&(o===wu||o===zh||o===Uh)&&ca(!0),o),()=>"(unmeasurable reporter)"),$s=BZ(o=>(ca&&(o===wu||o===zh||o===Uh)&&ca(!1),o),()=>"(unreliable reporter)"),Ps=bi(void 0,Q,x,x,x),pf=bi(void 0,Q,x,x,x);pf.objectFlags|=2048;var qc=sl(2048,"__type");qc.members=ga();var wh=bi(qc,Q,x,x,x),Tu=bi(void 0,Q,x,x,x),Wf=be?es([wi,je,Tu]):Gt,za=bi(void 0,Q,x,x,x);za.instantiations=new Map;var Mc=bi(void 0,Q,x,x,x);Mc.objectFlags|=262144;var Ul=bi(void 0,Q,x,x,x),wl=bi(void 0,Q,x,x,x),Li=bi(void 0,Q,x,x,x),wu=Pg(),zh=Pg();zh.constraint=wu;var Uh=Pg(),z_=Pg(),Rc=Pg();Rc.constraint=z_;var Qc=kj(1,"<>",0,Je),J=fb(void 0,void 0,void 0,x,Je,void 0,0,0),ct=fb(void 0,void 0,void 0,x,$e,void 0,0,0),Wt=fb(void 0,void 0,void 0,x,Je,void 0,0,0),mi=fb(void 0,void 0,void 0,x,_r,void 0,0,0),mn=sy(Ae,tt,!0),Zr=new Map,Fi={get yieldType(){return z.fail("Not supported")},get returnType(){return z.fail("Not supported")},get nextType(){return z.fail("Not supported")}},br=ew(Je,Je,Je),Cs=ew(Je,Je,Gt),xs=ew(rn,Je,wi),ql={iterableCacheKey:"iterationTypesOfAsyncIterable",iteratorCacheKey:"iterationTypesOfAsyncIterator",iteratorSymbolName:"asyncIterator",getGlobalIteratorType:nzt,getGlobalIterableType:D_e,getGlobalIterableIteratorType:rzt,getGlobalGeneratorType:szt,resolveIterationType:(o,_)=>yN(o,_,k.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member),mustHaveANextMethodDiagnostic:k.An_async_iterator_must_have_a_next_method,mustBeAMethodDiagnostic:k.The_0_property_of_an_async_iterator_must_be_a_method,mustHaveAValueDiagnostic:k.The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property},Xc={iterableCacheKey:"iterationTypesOfIterable",iteratorCacheKey:"iterationTypesOfIterator",iteratorSymbolName:"iterator",getGlobalIteratorType:ozt,getGlobalIterableType:wOe,getGlobalIterableIteratorType:azt,getGlobalGeneratorType:lzt,resolveIterationType:(o,_)=>o,mustHaveANextMethodDiagnostic:k.An_iterator_must_have_a_next_method,mustBeAMethodDiagnostic:k.The_0_property_of_an_iterator_must_be_a_method,mustHaveAValueDiagnostic:k.The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property},Id,$c=new Map,Ud=new Map,Fc,qd,qh,Nd,md,wg,it,ai,Sn,uo,rl,hl,Mu,Ld,Xl,$l,Ju,np,ev,xg,U_,nm,kg,$1,J1,q_,vd,G1,rp,Xv,Tg,me,At,di,gi,dn,Vn,Lr,ls,ie,Xe,ei,Dn,Ss,Vo,po,$o,Dl,Ga,hu,rm,g0,K1,ob,DS,ab,sm,Dg=new Map,Zl=0,nh=0,$h=0,m0=!1,ES=0,nC,hx,Wm,_x=[],Vm=[],u2=[],tv=0,Eg=[],rC=[],rt=0,bt=G_(""),si=D0(0),Ti=P_e({negative:!1,base10Value:"0"}),Ki=[],Jn=[],sn=[],ar=0,ks=!1,nr=0,ps=10,Hn=[],Do=[],Wa=[],nf=[],xh=[],Hm=[],IS=[],jm=[],cA=[],iO=[],uA=[],pD=[],d2=[],f2=[],h2=[],RI=[],NS=[],gD=[],lb=[],mD=0,vl=O8(),FI=O8(),BI=VS(),_2,sC,Zv=new Map,om=new Map,$_=new Map,Mp=new Map,sp=new Map,LS=new Map,dA=[[".mts",".mjs"],[".ts",".js"],[".cts",".cjs"],[".mjs",".mjs"],[".js",".js"],[".cjs",".cjs"],[".tsx",Y.jsx===1?".jsx":".js"],[".jsx",".jsx"],[".json",".json"]];return yYt(),Mi;function fA(o){return!Ir(o)||!lt(o.name)||!Ir(o.expression)&&!lt(o.expression)?!1:lt(o.expression)?dr(o.expression)==="Symbol"&&S_(o.expression)===(PO("Symbol",1160127,void 0)||Ot):lt(o.expression.expression)?dr(o.expression.name)==="Symbol"&&dr(o.expression.expression)==="globalThis"&&S_(o.expression.expression)===wt:!1}function p2(o){return o?Yo.get(o):void 0}function PS(o,_){return o&&Yo.set(o,_),_}function g2(o){if(o){const _=_n(o);if(_)if(yI(o)){if(_.localJsxFragmentNamespace)return _.localJsxFragmentNamespace;const v=_.pragmas.get("jsxfrag");if(v){const D=Lo(v)?v[0]:v;if(_.localJsxFragmentFactory=FP(D.arguments.factory,ue),Ct(_.localJsxFragmentFactory,Pd,A_),_.localJsxFragmentFactory)return _.localJsxFragmentNamespace=Ip(_.localJsxFragmentFactory).escapedText}const S=u8e(o);if(S)return _.localJsxFragmentFactory=S,_.localJsxFragmentNamespace=Ip(S).escapedText}else{const v=hA(_);if(v)return _.localJsxNamespace=v}}return _2||(_2="React",Y.jsxFactory?(sC=FP(Y.jsxFactory,ue),Ct(sC,Pd),sC&&(_2=Ip(sC).escapedText)):Y.reactNamespace&&(_2=du(Y.reactNamespace))),sC||(sC=G.createQualifiedName(G.createIdentifier(Ws(_2)),"createElement")),_2}function hA(o){if(o.localJsxNamespace)return o.localJsxNamespace;const _=o.pragmas.get("jsx");if(_){const v=Lo(_)?_[0]:_;if(o.localJsxFactory=FP(v.arguments.factory,ue),Ct(o.localJsxFactory,Pd,A_),o.localJsxFactory)return o.localJsxNamespace=Ip(o.localJsxFactory).escapedText}}function Pd(o){return Bv(o,-1,-1),cn(o,Pd,void 0)}function AS(o,_,v){return v||lpt(o,_),Le}function _A(o,_,...v){const S=o?Kn(o,_,...v):Gc(_,...v),D=vl.lookup(S);return D||(vl.add(S),S)}function iv(o,_,v,...S){const D=ht(_,v,...S);return D.skippedOn=o,D}function WI(o,_,...v){return o?Kn(o,_,...v):Gc(_,...v)}function ht(o,_,...v){const S=WI(o,_,...v);return vl.add(S),S}function v0(o,_){o?vl.add(_):FI.add({..._,category:2})}function rf(o,_,v,...S){if(_.pos<0||_.end<0){if(!o)return;const D=_n(_);v0(o,"message"in v?ef(D,0,0,v,...S):qse(D,v));return}v0(o,"message"in v?Kn(_,v,...S):$y(_n(_),_,v))}function m2(o,_,v,...S){const D=ht(o,v,...S);if(_){const L=Kn(o,k.Did_you_forget_to_use_await);fa(D,L)}return D}function Q1(o,_){const v=Array.isArray(o)?W(o,lse):lse(o);return v&&fa(_,Kn(v,k.The_declaration_was_marked_as_deprecated_here)),FI.add(_),_}function am(o){const _=Vf(o);return _&&O(o.declarations)>1?_.flags&64?Rt(o.declarations,Yv):Be(o.declarations,Yv):!!o.valueDeclaration&&Yv(o.valueDeclaration)||O(o.declarations)&&Be(o.declarations,Yv)}function Yv(o){return!!(qD(o)&536870912)}function oC(o,_,v){const S=Kn(o,k._0_is_deprecated,v);return Q1(_,S)}function NF(o,_,v,S){const D=v?Kn(o,k.The_signature_0_of_1_is_deprecated,S,v):Kn(o,k._0_is_deprecated,S);return Q1(_,D)}function sl(o,_,v){T++;const S=new p(o|33554432,_);return S.links=new xKe,S.links.checkFlags=v||0,S}function y0(o,_){const v=sl(1,o);return v.links.type=_,v}function vD(o,_){const v=sl(4,o);return v.links.type=_,v}function VI(o){let _=0;return o&2&&(_|=111551),o&1&&(_|=111550),o&4&&(_|=0),o&8&&(_|=900095),o&16&&(_|=110991),o&32&&(_|=899503),o&64&&(_|=788872),o&256&&(_|=899327),o&128&&(_|=899967),o&512&&(_|=110735),o&8192&&(_|=103359),o&32768&&(_|=46015),o&65536&&(_|=78783),o&262144&&(_|=526824),o&524288&&(_|=788968),o&2097152&&(_|=2097152),_}function HI(o,_){_.mergeId||(_.mergeId=SKe,SKe++),Hn[_.mergeId]=o}function v2(o){const _=sl(o.flags,o.escapedName);return _.declarations=o.declarations?o.declarations.slice():[],_.parent=o.parent,o.valueDeclaration&&(_.valueDeclaration=o.valueDeclaration),o.constEnumOnlyModule&&(_.constEnumOnlyModule=!0),o.members&&(_.members=new Map(o.members)),o.exports&&(_.exports=new Map(o.exports)),HI(_,o),_}function aC(o,_,v=!1){if(!(o.flags&VI(_.flags))||(_.flags|o.flags)&67108864){if(_===o)return o;if(!(o.flags&33554432)){const L=Ru(o);if(L===Ot)return _;if(!(L.flags&VI(_.flags))||(_.flags|L.flags)&67108864)o=v2(L);else return S(o,_),_}_.flags&512&&o.flags&512&&o.constEnumOnlyModule&&!_.constEnumOnlyModule&&(o.constEnumOnlyModule=!1),o.flags|=_.flags,_.valueDeclaration&&CW(o,_.valueDeclaration),un(o.declarations,_.declarations),_.members&&(o.members||(o.members=ga()),Xp(o.members,_.members,v)),_.exports&&(o.exports||(o.exports=ga()),Xp(o.exports,_.exports,v)),v||HI(o,_)}else o.flags&1024?o!==wt&&ht(_.declarations&&ko(_.declarations[0]),k.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity,Js(o)):S(o,_);return o;function S(L,B){const K=!!(L.flags&384||B.flags&384),ne=!!(L.flags&2||B.flags&2),ae=K?k.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations:ne?k.Cannot_redeclare_block_scoped_variable_0:k.Duplicate_identifier_0,Ce=B.declarations&&_n(B.declarations[0]),qe=L.declarations&&_n(L.declarations[0]),Ve=p8(Ce,Y.checkJs),Dt=p8(qe,Y.checkJs),Vt=Js(B);if(Ce&&qe&&Id&&!K&&Ce!==qe){const Kt=Mb(Ce.path,qe.path)===-1?Ce:qe,Wi=Kt===Ce?qe:Ce,qi=ka(Id,`${Kt.path}|${Wi.path}`,()=>({firstFile:Kt,secondFile:Wi,conflictingSymbols:new Map})),An=ka(qi.conflictingSymbols,Vt,()=>({isBlockScoped:ne,firstFileLocations:[],secondFileLocations:[]}));Ve||D(An.firstFileLocations,B),Dt||D(An.secondFileLocations,L)}else Ve||lC(B,ae,Vt,L),Dt||lC(L,ae,Vt,B)}function D(L,B){if(B.declarations)for(const K of B.declarations)Cc(L,K)}}function lC(o,_,v,S){W(o.declarations,D=>{y2(D,_,v,S.declarations)})}function y2(o,_,v,S){const D=(Pk(o,!1)?Yse(o):ko(o))||o,L=_A(D,_,v);for(const B of S||x){const K=(Pk(B,!1)?Yse(B):ko(B))||B;if(K===D)continue;L.relatedInformation=L.relatedInformation||[];const ne=Kn(K,k._0_was_also_declared_here,v),ae=Kn(K,k.and_here);O(L.relatedInformation)>=5||Rt(L.relatedInformation,Ce=>q8(Ce,ae)===0||q8(Ce,ne)===0)||fa(L,O(L.relatedInformation)?ae:ne)}}function Ig(o,_){if(!(o!=null&&o.size))return _;if(!(_!=null&&_.size))return o;const v=ga();return Xp(v,o),Xp(v,_),v}function Xp(o,_,v=!1){_.forEach((S,D)=>{const L=o.get(D);o.set(D,L?aC(L,S,v):al(S))})}function OS(o){var _,v,S;const D=o.parent;if(((_=D.symbol.declarations)==null?void 0:_[0])!==D){z.assert(D.symbol.declarations.length>1);return}if(Iv(D))Xp(Ue,D.symbol.exports);else{const L=o.parent.parent.flags&33554432?void 0:k.Invalid_module_name_in_augmentation_module_0_cannot_be_found;let B=$I(o,o,L,!0);if(!B)return;if(B=J_(B),B.flags&1920)if(Rt(qd,K=>B===K.symbol)){const K=aC(D.symbol,B,!0);qh||(qh=new Map),qh.set(o.text,K)}else{if((v=B.exports)!=null&&v.get("__export")&&((S=D.symbol.exports)!=null&&S.size)){const K=$3e(B,"resolvedExports");for(const[ne,ae]of Fn(D.symbol.exports.entries()))K.has(ne)&&!B.exports.has(ne)&&aC(K.get(ne),ae)}aC(B,D.symbol)}else ht(o,k.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity,o.text)}}function MS(){const o=Ye.escapedName,_=Ue.get(o);_?W(_.declarations,v=>{fP(v)||vl.add(Kn(v,k.Declaration_name_conflicts_with_built_in_global_identifier_0,Ws(o)))}):Ue.set(o,Ye)}function Zs(o){if(o.flags&33554432)return o.links;const _=Aa(o);return Do[_]??(Do[_]=new xKe)}function Tr(o){const _=Tl(o);return Wa[_]||(Wa[_]=new WPt)}function rh(o,_,v){if(v){const S=al(o.get(_));if(S&&(S.flags&v||S.flags&2097152&&op(S)&v))return S}}function nO(o,_){const v=o.parent,S=o.parent.parent,D=rh(v.locals,_,111551),L=rh(Dx(S.symbol),_,111551);return D&&L?[D,L]:z.fail("There should exist two symbols, one as property declaration and one as parameter declaration")}function b0(o,_){const v=_n(o),S=_n(_),D=j0(o);if(v!==S){if(te&&(v.externalModuleIndicator||S.externalModuleIndicator)||!Y.outFile||eP(_)||o.flags&33554432||B(_,o))return!0;const ne=t.getSourceFiles();return ne.indexOf(v)<=ne.indexOf(S)}if(_.flags&16777216||eP(_)||kMe(_))return!0;if(o.pos<=_.pos&&!(To(o)&&aW(_.parent)&&!o.initializer&&!o.exclamationToken)){if(o.kind===208){const ne=Rk(_,208);return ne?Xi(ne,nl)!==Xi(o,nl)||o.posae===o?"quit":Ja(ae)?ae.parent.parent===o:!Se&&jd(ae)&&(ae.parent===o||Au(ae.parent)&&ae.parent.parent===o||RB(ae.parent)&&ae.parent.parent===o||To(ae.parent)&&ae.parent.parent===o||Gs(ae.parent)&&ae.parent.parent.parent===o));return ne?!Se&&jd(ne)?!!Xi(_,ae=>ae===ne?"quit":Bo(ae)&&!NT(ae)):!1:!0}else{if(To(o))return!K(o,_,!1);if(xp(o,o.parent))return!(pe&&Sf(o)===Sf(_)&&B(_,o))}}return!0}if(_.parent.kind===281||_.parent.kind===277&&_.parent.isExportEquals||_.kind===277&&_.isExportEquals)return!0;if(B(_,o))return pe&&Sf(o)&&(To(o)||xp(o,o.parent))?!K(o,_,!0):!0;return!1;function L(ne,ae){switch(ne.parent.parent.kind){case 243:case 248:case 250:if(uC(ae,ne,D))return!0;break}const Ce=ne.parent.parent;return eI(Ce)&&uC(ae,Ce.expression,D)}function B(ne,ae){return!!Xi(ne,Ce=>{if(Ce===D)return"quit";if(Bo(Ce))return!0;if(bu(Ce))return ae.posne.end?!1:Xi(ae,Ve=>{if(Ve===ne)return"quit";switch(Ve.kind){case 219:return!0;case 172:return Ce&&(To(ne)&&Ve.parent===ne.parent||xp(ne,ne.parent)&&Ve.parent===ne.parent.parent)?"quit":!0;case 241:switch(Ve.parent.kind){case 177:case 174:case 178:return!0;default:return!1}default:return!1}})===void 0}}function pA(o){return Tr(o).declarationRequiresScopeChange}function X1(o,_){Tr(o).declarationRequiresScopeChange=_}function RS(o,_,v,S){return pe?!1:(o&&!S&&yD(o,_,_)||ht(o,o&&v.type&&IB(v.type,o.pos)?k.Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:k.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor,sc(v.name),Zp(_)),!0)}function cC(o,_,v,S){const D=mo(_)?_:_.escapedText;a(()=>{if(!o||o.parent.kind!==324&&!yD(o,D,_)&&!mc(o)&&!sO(o,D,v)&&!gA(o,D)&&!kh(o,D,v)&&!LF(o,D,v)&&!jI(o,D,v)){let L,B;if(_&&(B=rGt(_),B&&ht(o,S,Zp(_),B)),!B&&nr{var B;const K=_.escapedName,ne=S&&Ns(S)&&ep(S);if(o&&(v&2||(v&32||v&384)&&(v&111551)===111551)){const ae=eg(_);(ae.flags&2||ae.flags&32||ae.flags&384)&&Ao(ae,o)}if(ne&&(v&111551)===111551&&!(o.flags&16777216)){const ae=al(_);O(ae.declarations)&&Be(ae.declarations,Ce=>_V(Ce)||Ns(Ce)&&!!Ce.symbol.globalExports)&&rf(!Y.allowUmdGlobalAccess,o,k._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead,Ws(K))}if(D&&!L&&(v&111551)===111551){const ae=al(p_e(_)),Ce=Ov(D);ae===wr(D)?ht(o,k.Parameter_0_cannot_reference_itself,sc(D.name)):ae.valueDeclaration&&ae.valueDeclaration.pos>D.pos&&Ce.parent.locals&&rh(Ce.parent.locals,ae.escapedName,v)===ae&&ht(o,k.Parameter_0_cannot_reference_identifier_1_declared_after_it,sc(D.name),sc(o))}if(o&&v&111551&&_.flags&2097152&&!(_.flags&111551)&&!Wk(o)){const ae=n1(_,111551);if(ae){const Ce=ae.kind===281||ae.kind===278||ae.kind===280?k._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type:k._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type,qe=Ws(K);b2(ht(o,Ce,qe),ae,qe)}}if(Y.isolatedModules&&_&&ne&&(v&111551)===111551){const Ce=rh(Ue,K,v)===_&&Ns(S)&&S.locals&&rh(S.locals,K,-111552);if(Ce){const qe=(B=Ce.declarations)==null?void 0:B.find(Ve=>Ve.kind===276||Ve.kind===273||Ve.kind===274||Ve.kind===271);qe&&!l8(qe)&&ht(qe,k.Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled,Ws(K))}}})}function b2(o,_,v){return _?fa(o,Kn(_,_.kind===281||_.kind===278||_.kind===280?k._0_was_exported_here:k._0_was_imported_here,v)):o}function Zp(o){return mo(o)?Ws(o):sc(o)}function yD(o,_,v){if(!lt(o)||o.escapedText!==_||cpt(o)||eP(o))return!1;const S=u_(o,!1,!1);let D=S;for(;D;){if(ss(D.parent)){const L=wr(D.parent);if(!L)break;const B=Qn(L);if(ya(B,_))return ht(o,k.Cannot_find_name_0_Did_you_mean_the_static_member_1_0,Zp(v),Js(L)),!0;if(D===S&&!da(D)){const K=vc(L).thisType;if(ya(K,_))return ht(o,k.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0,Zp(v)),!0}}D=D.parent}return!1}function mc(o){const _=cb(o);return _&&Du(_,64,!0)?(ht(o,k.Cannot_extend_an_interface_0_Did_you_mean_implements,yu(_)),!0):!1}function cb(o){switch(o.kind){case 80:case 211:return o.parent?cb(o.parent):void 0;case 233:if(pc(o.expression))return o.expression;default:return}}function sO(o,_,v){const S=1920|(Xn(o)?111551:0);if(v===S){const D=Ru(Ui(o,_,788968&~S,void 0,!1)),L=o.parent;if(D){if(__(L)){z.assert(L.left===o,"Should only be resolving left side of qualified name as a namespace");const B=L.right.escapedText;if(ya(vc(D),B))return ht(L,k.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1,Ws(_),Ws(B)),!0}return ht(o,k._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here,Ws(_)),!0}}return!1}function jI(o,_,v){if(v&788584){const S=Ru(Ui(o,_,111127,void 0,!1));if(S&&!(S.flags&1920))return ht(o,k._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0,Ws(_)),!0}return!1}function bD(o){return o==="any"||o==="string"||o==="number"||o==="boolean"||o==="never"||o==="unknown"}function gA(o,_){return bD(_)&&o.parent.kind===281?(ht(o,k.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module,_),!0):!1}function LF(o,_,v){if(v&111551){if(bD(_)){const L=o.parent.parent;if(L&&L.parent&&Lp(L)){const B=L.token,K=L.parent.kind;K===264&&B===96?ht(o,k.An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types,Ws(_)):K===263&&B===96?ht(o,k.A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values,Ws(_)):K===263&&B===119&&ht(o,k.A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types,Ws(_))}else ht(o,k._0_only_refers_to_a_type_but_is_being_used_as_a_value_here,Ws(_));return!0}const S=Ru(Ui(o,_,788544,void 0,!1)),D=S&&op(S);if(S&&D!==void 0&&!(D&111551)){const L=Ws(_);return vr(_)?ht(o,k._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later,L):oO(o,S)?ht(o,k._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0,L,L==="K"?"P":"K"):ht(o,k._0_only_refers_to_a_type_but_is_being_used_as_a_value_here,L),!0}}return!1}function oO(o,_){const v=Xi(o.parent,S=>Ja(S)||V_(S)?!1:p_(S)||"quit");if(v&&v.members.length===1){const S=vc(_);return!!(S.flags&1048576)&&ez(S,384,!0)}return!1}function vr(o){switch(o){case"Promise":case"Symbol":case"Map":case"WeakMap":case"Set":case"WeakSet":return!0}return!1}function kh(o,_,v){if(v&111127){if(Ru(Ui(o,_,1024,void 0,!1)))return ht(o,k.Cannot_use_namespace_0_as_a_value,Ws(_)),!0}else if(v&788544&&Ru(Ui(o,_,1536,void 0,!1)))return ht(o,k.Cannot_use_namespace_0_as_a_type,Ws(_)),!0;return!1}function Ao(o,_){var v;if(z.assert(!!(o.flags&2||o.flags&32||o.flags&384)),o.flags&67108881&&o.flags&32)return;const S=(v=o.declarations)==null?void 0:v.find(D=>Mse(D)||ss(D)||D.kind===266);if(S===void 0)return z.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration");if(!(S.flags&33554432)&&!b0(S,_)){let D;const L=sc(ko(S));o.flags&2?D=ht(_,k.Block_scoped_variable_0_used_before_its_declaration,L):o.flags&32?D=ht(_,k.Class_0_used_before_its_declaration,L):o.flags&256?D=ht(_,k.Enum_0_used_before_its_declaration,L):(z.assert(!!(o.flags&128)),Xg(Y)&&(D=ht(_,k.Enum_0_used_before_its_declaration,L))),D&&fa(D,Kn(S,k._0_is_declared_here,L))}}function uC(o,_,v){return!!_&&!!Xi(o,S=>S===_||(S===v||Bo(S)&&(!NT(S)||ad(S)&3)?"quit":!1))}function zI(o){switch(o.kind){case 271:return o;case 273:return o.parent;case 274:return o.parent.parent;case 276:return o.parent.parent.parent;default:return}}function Rp(o){return o.declarations&&vt(o.declarations,Zn)}function Zn(o){return o.kind===271||o.kind===270||o.kind===273&&!!o.name||o.kind===274||o.kind===280||o.kind===276||o.kind===281||o.kind===277&&V6(o)||cr(o)&&Lu(o)===2&&V6(o)||Sc(o)&&cr(o.parent)&&o.parent.left===o&&o.parent.operatorToken.kind===64&&mA(o.parent.right)||o.kind===304||o.kind===303&&mA(o.initializer)||o.kind===260&<(o)||o.kind===208&<(o.parent.parent)}function mA(o){return IW(o)||gc(o)&&h1(o)}function vA(o,_){const v=dC(o);if(v){const D=Q6(v.expression).arguments[0];return lt(v.name)?Ru(ya(Jct(D),v.name.escapedText)):void 0}if(ds(o)||o.moduleReference.kind===283){const D=Gh(o,Zse(o)||C8(o)),L=J_(D);return cm(o,D,L,!1),L}const S=CA(o.moduleReference,_);return Jh(o,S),S}function Jh(o,_){if(cm(o,void 0,_,!1)&&!o.isTypeOnly){const v=n1(wr(o)),S=v.kind===281||v.kind===278,D=S?k.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type:k.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type,L=S?k._0_was_exported_here:k._0_was_imported_here,B=v.kind===278?"*":Ws(v.name.escapedText);fa(ht(o.moduleReference,D),Kn(v,L,B))}}function C0(o,_,v,S){const D=o.exports.get("export="),L=D?ya(Qn(D),_,!0):o.exports.get(_),B=Ru(L,S);return cm(v,L,B,!1),B}function zm(o){return Ec(o)&&!o.isExportEquals||Kr(o,2048)||gh(o)||H1(o)}function FS(o){return Ml(o)?t.getModeForUsageLocation(_n(o),o):void 0}function CD(o,_){return o===99&&_===1}function e1(o){return FS(o)===99&&mu(o.text,".json")}function Fp(o,_,v,S){const D=o&&FS(S);if(o&&D!==void 0&&100<=te&&te<=199){const L=CD(D,o.impliedNodeFormat);if(D===99||L)return L}if(!ye)return!1;if(!o||o.isDeclarationFile){const L=C0(_,"default",void 0,!0);return!(L&&Rt(L.declarations,zm)||C0(_,du("__esModule"),void 0,v))}return F_(o)?typeof o.externalModuleIndicator!="object"&&!C0(_,du("__esModule"),void 0,v):E2(_)}function t1(o,_){const v=Gh(o,o.parent.moduleSpecifier);if(v)return lm(v,o,_)}function lm(o,_,v){var S;let D;XB(o)?D=o:D=C0(o,"default",_,v);const L=(S=o.declarations)==null?void 0:S.find(Ns),B=ub(_);if(!B)return D;const K=e1(B),ne=Fp(L,o,v,B);if(!D&&!ne&&!K)if(E2(o)&&!ye){const ae=te>=5?"allowSyntheticDefaultImports":"esModuleInterop",qe=o.exports.get("export=").valueDeclaration,Ve=ht(_.name,k.Module_0_can_only_be_default_imported_using_the_1_flag,Js(o),ae);qe&&fa(Ve,Kn(qe,k.This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag,ae))}else $0(_)?C2(o,_):S0(o,o,_,FL(_)&&_.propertyName||_.name);else if(ne||K){const ae=J_(o,v)||Ru(o,v);return cm(_,o,ae,!1),ae}return cm(_,D,void 0,!1),D}function ub(o){switch(o.kind){case 273:return o.parent.moduleSpecifier;case 271:return Kb(o.moduleReference)?o.moduleReference.expression:void 0;case 274:return o.parent.parent.moduleSpecifier;case 276:return o.parent.parent.parent.moduleSpecifier;case 281:return o.parent.parent.moduleSpecifier;default:return z.assertNever(o)}}function C2(o,_){var v,S,D;if((v=o.exports)!=null&&v.has(_.symbol.escapedName))ht(_.name,k.Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead,Js(o),Js(_.symbol));else{const L=ht(_.name,k.Module_0_has_no_default_export,Js(o)),B=(S=o.exports)==null?void 0:S.get("__export");if(B){const K=(D=B.declarations)==null?void 0:D.find(ne=>{var ae,Ce;return!!($u(ne)&&ne.moduleSpecifier&&((Ce=(ae=Gh(ne,ne.moduleSpecifier))==null?void 0:ae.exports)!=null&&Ce.has("default")))});K&&fa(L,Kn(K,k.export_Asterisk_does_not_re_export_a_default))}}}function yA(o,_){const v=o.parent.parent.moduleSpecifier,S=Gh(o,v),D=D2(S,v,_,!1);return cm(o,S,D,!1),D}function UI(o,_){const v=o.parent.moduleSpecifier,S=v&&Gh(o,v),D=v&&D2(S,v,_,!1);return cm(o,S,D,!1),D}function SD(o,_){if(o===Ot&&_===Ot)return Ot;if(o.flags&790504)return o;const v=sl(o.flags|_.flags,o.escapedName);return z.assert(o.declarations||_.declarations),v.declarations=jt(no(o.declarations,_.declarations),XC),v.parent=o.parent||_.parent,o.valueDeclaration&&(v.valueDeclaration=o.valueDeclaration),_.members&&(v.members=new Map(_.members)),o.exports&&(v.exports=new Map(o.exports)),v}function aO(o,_,v,S){var D;if(o.flags&1536){const L=Yp(o).get(_.escapedText),B=Ru(L,S),K=(D=Zs(o).typeOnlyExportStarMap)==null?void 0:D.get(_.escapedText);return cm(v,L,B,!1,K,_.escapedText),B}}function qI(o,_){if(o.flags&3){const v=o.valueDeclaration.type;if(v)return Ru(ya(As(v),_))}}function S2(o,_,v=!1){var S;const D=Zse(o)||o.moduleSpecifier,L=Gh(o,D),B=!Ir(_)&&_.propertyName||_.name;if(!lt(B))return;const K=B.escapedText==="default"&&ye,ne=D2(L,D,!1,K);if(ne&&B.escapedText){if(XB(L))return L;let ae;L&&L.exports&&L.exports.get("export=")?ae=ya(Qn(ne),B.escapedText,!0):ae=qI(ne,B.escapedText),ae=Ru(ae,v);let Ce=aO(ne,B,_,v);if(Ce===void 0&&B.escapedText==="default"){const Ve=(S=L.declarations)==null?void 0:S.find(Ns);(e1(D)||Fp(Ve,L,v,D))&&(Ce=J_(L,v)||Ru(L,v))}const qe=Ce&&ae&&Ce!==ae?SD(ae,Ce):Ce||ae;return qe||S0(L,ne,o,B),qe}}function S0(o,_,v,S){var D;const L=r1(o,v),B=sc(S),K=aRe(S,_);if(K!==void 0){const ne=Js(K),ae=ht(S,k._0_has_no_exported_member_named_1_Did_you_mean_2,L,B,ne);K.valueDeclaration&&fa(ae,Kn(K.valueDeclaration,k._0_is_declared_here,ne))}else(D=o.exports)!=null&&D.has("default")?ht(S,k.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead,L,B):lO(v,S,B,o,L)}function lO(o,_,v,S,D){var L,B;const K=(B=(L=$r(S.valueDeclaration,A1))==null?void 0:L.locals)==null?void 0:B.get(_.escapedText),ne=S.exports;if(K){const ae=ne==null?void 0:ne.get("export=");if(ae)w0(ae,K)?w2(o,_,v,D):ht(_,k.Module_0_has_no_exported_member_1,D,v);else{const Ce=ne?Me(aOe(ne),Ve=>!!w0(Ve,K)):void 0,qe=Ce?ht(_,k.Module_0_declares_1_locally_but_it_is_exported_as_2,D,v,Js(Ce)):ht(_,k.Module_0_declares_1_locally_but_it_is_not_exported,D,v);K.declarations&&fa(qe,...Yt(K.declarations,(Ve,Dt)=>Kn(Ve,Dt===0?k._0_is_declared_here:k.and_here,v)))}}else ht(_,k.Module_0_has_no_exported_member_1,D,v)}function w2(o,_,v,S){if(te>=5){const D=Xy(Y)?k._0_can_only_be_imported_by_using_a_default_import:k._0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import;ht(_,D,v)}else if(Xn(o)){const D=Xy(Y)?k._0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import:k._0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import;ht(_,D,v)}else{const D=Xy(Y)?k._0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import:k._0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import;ht(_,D,v,v,S)}}function px(o,_){if(m_(o)&&dr(o.propertyName||o.name)==="default"){const B=ub(o),K=B&&Gh(o,B);if(K)return lm(K,o,_)}const v=nl(o)?Ov(o):o.parent.parent.parent,S=dC(v),D=S2(v,S||o,_),L=o.propertyName||o.name;return S&&D&<(L)?Ru(ya(Qn(D),L.escapedText),_):(cm(o,void 0,D,!1),D)}function dC(o){if(ds(o)&&o.initializer&&Ir(o.initializer))return o.initializer}function BS(o,_){if(H0(o.parent)){const v=J_(o.parent.symbol,_);return cm(o,void 0,v,!1),v}}function Um(o,_,v){if(dr(o.propertyName||o.name)==="default"){const D=ub(o),L=D&&Gh(o,D);if(L)return lm(L,o,!!v)}const S=o.parent.parent.moduleSpecifier?S2(o.parent.parent,o,v):Du(o.propertyName||o.name,_,!1,v);return cm(o,void 0,S,!1),S}function WS(o,_){const v=Ec(o)?o.expression:o.right,S=x2(v,_);return cm(o,void 0,S,!1),S}function x2(o,_){if(wd(o))return Vu(o).symbol;if(!A_(o)&&!pc(o))return;const v=Du(o,901119,!0,_);return v||(Vu(o),Tr(o).resolvedSymbol)}function gf(o,_){if(cr(o.parent)&&o.parent.left===o&&o.parent.operatorToken.kind===64)return x2(o.parent.right,_)}function fC(o,_=!1){switch(o.kind){case 271:case 260:return vA(o,_);case 273:return t1(o,_);case 274:return yA(o,_);case 280:return UI(o,_);case 276:case 208:return px(o,_);case 281:return Um(o,901119,_);case 277:case 226:return WS(o,_);case 270:return BS(o,_);case 304:return Du(o.name,901119,!0,_);case 303:return x2(o.initializer,_);case 212:case 211:return gf(o,_);default:return z.fail()}}function i1(o,_=901119){return o?(o.flags&(2097152|_))===2097152||!!(o.flags&2097152&&o.flags&67108864):!1}function Ru(o,_){return!_&&i1(o)?sf(o):o}function sf(o){z.assert((o.flags&2097152)!==0,"Should only get Alias here.");const _=Zs(o);if(_.aliasTarget)_.aliasTarget===xe&&(_.aliasTarget=Ot);else{_.aliasTarget=xe;const v=Rp(o);if(!v)return z.fail();const S=fC(v);_.aliasTarget===xe?_.aliasTarget=S||Ot:ht(v,k.Circular_definition_of_import_alias_0,Js(o))}return _.aliasTarget}function hC(o){if(Zs(o).aliasTarget!==xe)return sf(o)}function op(o,_,v){const S=_&&n1(o),D=S&&$u(S),L=S&&(D?Gh(S.moduleSpecifier,S.moduleSpecifier,!0):sf(S.symbol)),B=D&&L?nv(L):void 0;let K=v?0:o.flags,ne;for(;o.flags&2097152;){const ae=eg(sf(o));if(!D&&ae===L||(B==null?void 0:B.get(ae.escapedName))===ae)break;if(ae===Ot)return-1;if(ae===o||ne!=null&&ne.has(ae))break;ae.flags&2097152&&(ne?ne.add(ae):ne=new Set([o,ae])),K|=ae.flags,o=ae}return K}function cm(o,_,v,S,D,L){if(!o||Ir(o))return!1;const B=wr(o);if(Dk(o)){const ne=Zs(B);return ne.typeOnlyDeclaration=o,!0}if(D){const ne=Zs(B);return ne.typeOnlyDeclaration=D,B.escapedName!==L&&(ne.typeOnlyExportStarName=L),!0}const K=Zs(B);return bA(K,_,S)||bA(K,v,S)}function bA(o,_,v){var S;if(_&&(o.typeOnlyDeclaration===void 0||v&&o.typeOnlyDeclaration===!1)){const D=((S=_.exports)==null?void 0:S.get("export="))??_,L=D.declarations&&Me(D.declarations,Dk);o.typeOnlyDeclaration=L??Zs(D).typeOnlyDeclaration??!1}return!!o.typeOnlyDeclaration}function n1(o,_){var v;if(!(o.flags&2097152))return;const S=Zs(o);if(S.typeOnlyDeclaration===void 0){S.typeOnlyDeclaration=!1;const D=Ru(o);cm((v=o.declarations)==null?void 0:v[0],Rp(o)&&bpe(o),D,!0)}if(_===void 0)return S.typeOnlyDeclaration||void 0;if(S.typeOnlyDeclaration){const D=S.typeOnlyDeclaration.kind===278?Ru(nv(S.typeOnlyDeclaration.symbol.parent).get(S.typeOnlyExportStarName||o.escapedName)):sf(S.typeOnlyDeclaration.symbol);return op(D)&_?S.typeOnlyDeclaration:void 0}}function CA(o,_){return o.kind===80&&B8(o)&&(o=o.parent),o.kind===80||o.parent.kind===166?Du(o,1920,!1,_):(z.assert(o.parent.kind===271),Du(o,901119,!1,_))}function r1(o,_){return o.parent?r1(o.parent,_)+"."+Js(o):Js(o,_,void 0,36)}function gx(o){for(;__(o.parent);)o=o.parent;return o}function cO(o){let _=Ip(o),v=Ui(_,_,111551,void 0,!0);if(v){for(;__(_.parent);){const S=Qn(v);if(v=ya(S,_.parent.right.escapedText),!v)return;_=_.parent}return v}}function Du(o,_,v,S,D){if(vu(o))return;const L=1920|(Xn(o)?_&111551:0);let B;if(o.kind===80){const K=_===L||oc(o)?k.Cannot_find_namespace_0:Hdt(Ip(o)),ne=Xn(o)&&!oc(o)?uO(o,_):void 0;if(B=al(Ui(D||o,o,_,v||ne?void 0:K,!0,!1)),!B)return al(ne)}else if(o.kind===166||o.kind===211){const K=o.kind===166?o.left:o.expression,ne=o.kind===166?o.right:o.name;let ae=Du(K,L,v,!1,D);if(!ae||vu(ne))return;if(ae===Ot)return ae;if(ae.valueDeclaration&&Xn(ae.valueDeclaration)&&f_(Y)!==100&&ds(ae.valueDeclaration)&&ae.valueDeclaration.initializer&&Aht(ae.valueDeclaration.initializer)){const Ce=ae.valueDeclaration.initializer.arguments[0],qe=Gh(Ce,Ce);if(qe){const Ve=J_(qe);Ve&&(ae=Ve)}}if(B=al(rh(Yp(ae),ne.escapedText,_)),!B&&ae.flags&2097152&&(B=al(rh(Yp(sf(ae)),ne.escapedText,_))),!B){if(!v){const Ce=r1(ae),qe=sc(ne),Ve=aRe(ne,ae);if(Ve){ht(ne,k._0_has_no_exported_member_named_1_Did_you_mean_2,Ce,qe,Js(Ve));return}const Dt=__(o)&&gx(o);if(Nd&&_&788968&&Dt&&!o3(Dt.parent)&&cO(Dt)){ht(Dt,k._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0,kp(Dt));return}if(_&1920&&__(o.parent)){const Kt=al(rh(Yp(ae),ne.escapedText,788968));if(Kt){ht(o.parent.right,k.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1,Js(Kt),Ws(o.parent.right.escapedText));return}}ht(ne,k.Namespace_0_has_no_exported_member_1,Ce,qe)}return}}else z.assertNever(o,"Unknown entity name kind.");return!oc(o)&&A_(o)&&(B.flags&2097152||o.parent.kind===277)&&cm(loe(o),B,void 0,!0),B.flags&_||S?B:sf(B)}function uO(o,_){if(k_e(o.parent)){const v=dO(o.parent);if(v)return Ui(v,o,_,void 0,!0)}}function dO(o){if(Xi(o,D=>x6(D)||D.flags&16777216?Em(D):"quit"))return;const v=AT(o);if(v&&_f(v)&&bW(v.expression)){const D=wr(v.expression.left);if(D)return k2(D)}if(v&&gc(v)&&bW(v.parent)&&_f(v.parent.parent)){const D=wr(v.parent.left);if(D)return k2(D)}if(v&&(f0(v)||pd(v))&&cr(v.parent.parent)&&Lu(v.parent.parent)===6){const D=wr(v.parent.parent.left);if(D)return k2(D)}const S=Ok(o);if(S&&Bo(S)){const D=wr(S);return D&&D.valueDeclaration}}function k2(o){const _=o.parent.valueDeclaration;return _?(S8(_)?JL(_):tI(_)?w8(_):void 0)||_:void 0}function PF(o){const _=o.valueDeclaration;if(!_||!Xn(_)||o.flags&524288||Pk(_,!1))return;const v=ds(_)?w8(_):JL(_);if(v){const S=Lg(v);if(S)return mRe(S,o)}}function Gh(o,_,v){const D=f_(Y)===1?k.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option:k.Cannot_find_module_0_or_its_corresponding_type_declarations;return $I(o,_,v?void 0:D)}function $I(o,_,v,S=!1){return Ml(_)?wD(o,_.text,v,_,S):void 0}function wD(o,_,v,S,D=!1){var L,B,K,ne,ae,Ce,qe,Ve,Dt,Vt,Kt;if(ro(_,"@types/")){const Ur=k.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1,Ia=BR(_,"@types/");ht(S,Ur,Ia,_)}const Wi=lOe(_,!0);if(Wi)return Wi;const qi=_n(o),An=Ml(o)?o:((L=qu(o)?o:o.parent&&qu(o.parent)&&o.parent.name===o?o.parent:void 0)==null?void 0:L.name)||((B=rS(o)?o:void 0)==null?void 0:B.argument.literal)||(Xn(o)&&$v(o)?o.moduleSpecifier:void 0)||(ds(o)&&o.initializer&&B_(o.initializer,!0)?o.initializer.arguments[0]:void 0)||((K=Xi(o,Gp))==null?void 0:K.arguments[0])||((ne=Xi(o,Cu))==null?void 0:ne.moduleSpecifier)||((ae=Xi(o,Lk))==null?void 0:ae.moduleReference.expression)||((Ce=Xi(o,$u))==null?void 0:Ce.moduleSpecifier),Cr=An&&Ml(An)?t.getModeForUsageLocation(qi,An):qi.impliedNodeFormat,en=f_(Y),vn=(qe=t.getResolvedModule(qi,_,Cr))==null?void 0:qe.resolvedModule,In=vn&&zce(Y,vn,qi),Nr=vn&&(!In||In===k.Module_0_was_resolved_to_1_but_jsx_is_not_set)&&t.getSourceFile(vn.resolvedFileName);if(Nr){if(In&&ht(S,In,_,vn.resolvedFileName),vn.resolvedUsingTsExtension&&xf(_)){const Ur=((Ve=Xi(o,Cu))==null?void 0:Ve.importClause)||Xi(o,lg(kd,$u));(Ur&&!Ur.isTypeOnly||Xi(o,Gp))&&ht(S,k.A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead,zr(z.checkDefined(zJ(_))))}else if(vn.resolvedUsingTsExtension&&!S3(Y,qi.fileName)){const Ur=((Dt=Xi(o,Cu))==null?void 0:Dt.importClause)||Xi(o,lg(kd,$u));if(!(Ur!=null&&Ur.isTypeOnly||Xi(o,V1))){const Ia=z.checkDefined(zJ(_));ht(S,k.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled,Ia)}}if(Nr.symbol){if(vn.isExternalLibraryImport&&!Q8(vn.extension)&&T2(!1,S,qi,Cr,vn,_),en===3||en===99){const Ur=qi.impliedNodeFormat===1&&!Xi(o,Gp)||!!Xi(o,kd),Ia=Xi(o,ta=>V1(ta)||$u(ta)||Cu(ta)||$v(ta));if(Ur&&Nr.impliedNodeFormat===99&&!qke(Ia))if(Xi(o,kd))ht(S,k.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead,_);else{let ta;const ll=qb(qi.fileName);if(ll===".ts"||ll===".js"||ll===".tsx"||ll===".jsx"){const No=qi.packageJsonScope,iu=ll===".ts"?".mts":ll===".js"?".mjs":void 0;No&&!No.contents.packageJsonContent.type?iu?ta=Ro(void 0,k.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1,iu,Hr(No.packageDirectory,"package.json")):ta=Ro(void 0,k.To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0,Hr(No.packageDirectory,"package.json")):iu?ta=Ro(void 0,k.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module,iu):ta=Ro(void 0,k.To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module)}vl.add($y(_n(S),S,Ro(ta,k.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead,_)))}}return al(Nr.symbol)}v&&ht(S,k.File_0_is_not_a_module,Nr.fileName);return}if(qd){const Ur=mre(qd,Ia=>Ia.pattern,_);if(Ur){const Ia=qh&&qh.get(_);return al(Ia||Ur.symbol)}}if(vn&&!Q8(vn.extension)&&In===void 0||In===k.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type){if(D){const Ur=k.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented;ht(S,Ur,_,vn.resolvedFileName)}else T2(ke&&!!v,S,qi,Cr,vn,_);return}if(v){if(vn){const Ur=t.getProjectReferenceRedirect(vn.resolvedFileName);if(Ur){ht(S,k.Output_file_0_has_not_been_built_from_source_file_1,Ur,vn.resolvedFileName);return}}if(In)ht(S,In,_,vn.resolvedFileName);else{const Ur=cg(_)&&!_6(_),Ia=en===3||en===99;if(!VT(Y)&&tu(_,".json")&&en!==1&&iG(Y))ht(S,k.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension,_);else if(Cr===99&&Ia&&Ur){const ta=bo(_,rs(qi.path)),ll=(Vt=dA.find(([No,iu])=>t.fileExists(ta+No)))==null?void 0:Vt[1];ll?ht(S,k.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0,_+ll):ht(S,k.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path)}else if((Kt=t.getResolvedModule(qi,_,Cr))!=null&&Kt.alternateResult){const ta=Q$(qi,t,_,Cr,_);rf(!0,S,Ro(ta,v,_))}else ht(S,v,_)}}return;function zr(Ur){const Ia=QW(_,Ur);if(tG(te)||Cr===99){const ta=xf(_)&&S3(Y);return Ia+(Ur===".mts"||Ur===".d.mts"?ta?".mts":".mjs":Ur===".cts"||Ur===".d.mts"?ta?".cts":".cjs":ta?".ts":".js")}return Ia}}function T2(o,_,v,S,{packageId:D,resolvedFileName:L},B){let K;!Zd(B)&&D&&(K=Q$(v,t,B,S,D.name)),rf(o,_,Ro(K,k.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,B,L))}function J_(o,_){if(o!=null&&o.exports){const v=Ru(o.exports.get("export="),_),S=AF(al(v),al(o));return al(S)||o}}function AF(o,_){if(!o||o===Ot||o===_||_.exports.size===1||o.flags&2097152)return o;const v=Zs(o);if(v.cjsExportMerged)return v.cjsExportMerged;const S=o.flags&33554432?o:v2(o);return S.flags=S.flags|512,S.exports===void 0&&(S.exports=ga()),_.exports.forEach((D,L)=>{L!=="export="&&S.exports.set(L,S.exports.has(L)?aC(S.exports.get(L),D):D)}),S===o&&(Zs(S).resolvedExports=void 0,Zs(S).resolvedMembers=void 0),Zs(S).cjsExportMerged=S,v.cjsExportMerged=S}function D2(o,_,v,S){var D;const L=J_(o,v);if(!v&&L){if(!S&&!(L.flags&1539)&&!Jc(L,307)){const K=te>=5?"allowSyntheticDefaultImports":"esModuleInterop";return ht(_,k.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export,K),L}const B=_.parent;if(Cu(B)&&F6(B)||Gp(B)){const K=Gp(B)?B.arguments[0]:B.moduleSpecifier,ne=Qn(L),ae=Lht(ne,L,o,K);if(ae)return fO(L,ae,B);const Ce=(D=o==null?void 0:o.declarations)==null?void 0:D.find(Ns),qe=Ce&&CD(FS(K),Ce.impliedNodeFormat);if(Xy(Y)||qe){let Ve=DZ(ne,0);if((!Ve||!Ve.length)&&(Ve=DZ(ne,1)),Ve&&Ve.length||ya(ne,"default",!0)||qe){const Dt=ne.flags&3670016?Pht(ne,L,o,K):vRe(L,L.parent);return fO(L,Dt,B)}}}}return L}function fO(o,_,v){const S=sl(o.flags,o.escapedName);S.declarations=o.declarations?o.declarations.slice():[],S.parent=o.parent,S.links.target=o,S.links.originatingImport=v,o.valueDeclaration&&(S.valueDeclaration=o.valueDeclaration),o.constEnumOnlyModule&&(S.constEnumOnlyModule=!0),o.members&&(S.members=new Map(o.members)),o.exports&&(S.exports=new Map(o.exports));const D=lv(_);return S.links.type=bi(S,D.members,x,x,D.indexInfos),S}function E2(o){return o.exports.get("export=")!==void 0}function xD(o){return aOe(nv(o))}function SA(o){const _=xD(o),v=J_(o);if(v!==o){const S=Qn(v);mx(S)&&un(_,Nl(S))}return _}function JI(o,_){nv(o).forEach((D,L)=>{XI(L)||_(D,L)});const S=J_(o);if(S!==o){const D=Qn(S);mx(D)&&bjt(D,(L,B)=>{_(L,B)})}}function Ng(o,_){const v=nv(_);if(v)return v.get(o)}function hO(o,_){const v=Ng(o,_);if(v)return v;const S=J_(_);if(S===_)return;const D=Qn(S);return mx(D)?ya(D,o):void 0}function mx(o){return!(o.flags&402784252||Rr(o)&1||_m(o)||Qa(o))}function Yp(o){return o.flags&6256?$3e(o,"resolvedExports"):o.flags&1536?nv(o):o.exports||Q}function nv(o){const _=Zs(o);if(!_.resolvedExports){const{exports:v,typeOnlyExportStarMap:S}=KI(o);_.resolvedExports=v,_.typeOnlyExportStarMap=S}return _.resolvedExports}function GI(o,_,v,S){_&&_.forEach((D,L)=>{if(L==="default")return;const B=o.get(L);if(!B)o.set(L,D),v&&S&&v.set(L,{specifierText:yu(S.moduleSpecifier)});else if(v&&S&&B&&Ru(B)!==Ru(D)){const K=v.get(L);K.exportsWithDuplicate?K.exportsWithDuplicate.push(S):K.exportsWithDuplicate=[S]}})}function KI(o){const _=[];let v;const S=new Set;o=J_(o);const D=L(o)||Q;return v&&S.forEach(B=>v.delete(B)),{exports:D,typeOnlyExportStarMap:v};function L(B,K,ne){if(!ne&&(B!=null&&B.exports)&&B.exports.forEach((qe,Ve)=>S.add(Ve)),!(B&&B.exports&&Cc(_,B)))return;const ae=new Map(B.exports),Ce=B.exports.get("__export");if(Ce){const qe=ga(),Ve=new Map;if(Ce.declarations)for(const Dt of Ce.declarations){const Vt=Gh(Dt,Dt.moduleSpecifier),Kt=L(Vt,Dt,ne||Dt.isTypeOnly);GI(qe,Kt,Ve,Dt)}Ve.forEach(({exportsWithDuplicate:Dt},Vt)=>{if(!(Vt==="export="||!(Dt&&Dt.length)||ae.has(Vt)))for(const Kt of Dt)vl.add(Kn(Kt,k.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity,Ve.get(Vt).specifierText,Ws(Vt)))}),GI(ae,qe)}return K!=null&&K.isTypeOnly&&(v??(v=new Map),ae.forEach((qe,Ve)=>v.set(Ve,K))),ae}}function al(o){let _;return o&&o.mergeId&&(_=Hn[o.mergeId])?_:o}function wr(o){return al(o.symbol&&p_e(o.symbol))}function Lg(o){return H0(o)?wr(o):void 0}function Vf(o){return al(o.parent&&p_e(o.parent))}function _O(o){var _,v;return(((_=o.valueDeclaration)==null?void 0:_.kind)===219||((v=o.valueDeclaration)==null?void 0:v.kind)===218)&&Lg(o.valueDeclaration.parent)||o}function pO(o,_){const v=_n(_),S=Tl(v),D=Zs(o);let L;if(D.extendedContainersByFile&&(L=D.extendedContainersByFile.get(S)))return L;if(v&&v.imports){for(const K of v.imports){if(oc(K))continue;const ne=Gh(_,K,!0);!ne||!yx(ne,o)||(L=xi(L,ne))}if(O(L))return(D.extendedContainersByFile||(D.extendedContainersByFile=new Map)).set(S,L),L}if(D.extendedContainers)return D.extendedContainers;const B=t.getSourceFiles();for(const K of B){if(!Td(K))continue;const ne=wr(K);yx(ne,o)&&(L=xi(L,ne))}return D.extendedContainers=L||x}function I2(o,_,v){const S=Vf(o);if(S&&!(o.flags&262144))return ne(S);const D=ns(o.declarations,Ce=>{if(!Bh(Ce)&&Ce.parent){if(gC(Ce.parent))return wr(Ce.parent);if(jv(Ce.parent)&&Ce.parent.parent&&J_(wr(Ce.parent.parent))===o)return wr(Ce.parent.parent)}if(wd(Ce)&&cr(Ce.parent)&&Ce.parent.operatorToken.kind===64&&Sc(Ce.parent.left)&&pc(Ce.parent.left.expression))return Jy(Ce.parent.left)||sI(Ce.parent.left.expression)?wr(_n(Ce)):(Vu(Ce.parent.left.expression),Tr(Ce.parent.left.expression).resolvedSymbol)});if(!O(D))return;const L=ns(D,Ce=>yx(Ce,o)?Ce:void 0);let B=[],K=[];for(const Ce of L){const[qe,...Ve]=ne(Ce);B=xi(B,qe),K=un(K,Ve)}return no(B,K);function ne(Ce){const qe=ns(Ce.declarations,ae),Ve=_&&pO(o,_),Dt=vx(Ce,v);if(_&&Ce.flags&so(v)&&Co(Ce,_,1920,!1))return xi(no(no([Ce],qe),Ve),Dt);const Vt=!(Ce.flags&so(v))&&Ce.flags&788968&&vc(Ce).flags&524288&&v===111551?ho(_,Wi=>hf(Wi,qi=>{if(qi.flags&so(v)&&Qn(qi)===vc(Ce))return qi})):void 0;let Kt=Vt?[Vt,...qe,Ce]:[...qe,Ce];return Kt=xi(Kt,Dt),Kt=un(Kt,Ve),Kt}function ae(Ce){return S&&gO(Ce,S)}}function vx(o,_){const v=!!O(o.declarations)&&ma(o.declarations);if(_&111551&&v&&v.parent&&ds(v.parent)&&(Pa(v)&&v===v.parent.initializer||p_(v)&&v===v.parent.type))return wr(v.parent)}function gO(o,_){const v=TD(o),S=v&&v.exports&&v.exports.get("export=");return S&&w0(S,_)?v:void 0}function yx(o,_){if(o===Vf(_))return _;const v=o.exports&&o.exports.get("export=");if(v&&w0(v,_))return o;const S=Yp(o),D=S.get(_.escapedName);return D&&w0(D,_)?D:hf(S,L=>{if(w0(L,_))return L})}function w0(o,_){if(al(Ru(al(o)))===al(Ru(al(_))))return o}function eg(o){return al(o&&(o.flags&1048576)!==0&&o.exportSymbol||o)}function Z1(o,_){return!!(o.flags&111551||o.flags&2097152&&op(o,!_)&111551)}function s1(o){var _;const v=new m(Mi,o);return b++,v.id=b,(_=sr)==null||_.recordType(v),v}function _C(o,_){const v=s1(o);return v.symbol=_,v}function QI(o){return new m(Mi,o)}function cd(o,_,v=0,S){x0(_,S);const D=s1(o);return D.intrinsicName=_,D.debugIntrinsicName=S,D.objectFlags=v|524288|2097152|33554432|16777216,D}function x0(o,_){const v=`${o},${_??""}`;mt.has(v)&&z.fail(`Duplicate intrinsic type name ${o}${_?` (${_})`:""}; you may need to pass a name to createIntrinsicType.`),mt.add(v)}function tg(o,_){const v=_C(524288,_);return v.objectFlags=o,v.members=void 0,v.properties=void 0,v.callSignatures=void 0,v.constructSignatures=void 0,v.indexInfos=void 0,v}function VS(){return es(Fn(jDe.keys(),G_))}function Pg(o){return _C(262144,o)}function XI(o){return o.charCodeAt(0)===95&&o.charCodeAt(1)===95&&o.charCodeAt(2)!==95&&o.charCodeAt(2)!==64&&o.charCodeAt(2)!==35}function bx(o){let _;return o.forEach((v,S)=>{H(v,S)&&(_||(_=[])).push(v)}),_||x}function H(o,_){return!XI(_)&&Z1(o)}function Ne(o){const _=bx(o),v=b_e(o);return v?no(_,[v]):_}function Jt(o,_,v,S,D){const L=o;return L.members=_,L.properties=x,L.callSignatures=v,L.constructSignatures=S,L.indexInfos=D,_!==Q&&(L.properties=bx(_)),L}function bi(o,_,v,S,D){return Jt(tg(16,o),_,v,S,D)}function cs(o){if(o.constructSignatures.length===0)return o;if(o.objectTypeWithoutAbstractConstructSignatures)return o.objectTypeWithoutAbstractConstructSignatures;const _=Ri(o.constructSignatures,S=>!(S.flags&4));if(o.constructSignatures===_)return o;const v=bi(o.symbol,o.members,o.callSignatures,Rt(_)?_:x,o.indexInfos);return o.objectTypeWithoutAbstractConstructSignatures=v,v.objectTypeWithoutAbstractConstructSignatures=v,v}function ho(o,_){let v;for(let S=o;S;S=S.parent){if(A1(S)&&S.locals&&!nS(S)&&(v=_(S.locals,void 0,!0,S)))return v;switch(S.kind){case 307:if(!ep(S))break;case 267:const D=wr(S);if(v=_((D==null?void 0:D.exports)||Q,void 0,!0,S))return v;break;case 263:case 231:case 264:let L;if((wr(S).members||Q).forEach((B,K)=>{B.flags&788968&&(L||(L=ga())).set(K,B)}),L&&(v=_(L,void 0,!1,S)))return v;break}}return _(Ue,void 0,!0)}function so(o){return o===111551?111551:1920}function Co(o,_,v,S,D=new Map){if(!(o&&!Kh(o)))return;const L=Zs(o),B=L.accessibleChainCache||(L.accessibleChainCache=new Map),K=ho(_,(qi,An,Cr,en)=>en),ne=`${S?0:1}|${K&&Tl(K)}|${v}`;if(B.has(ne))return B.get(ne);const ae=Aa(o);let Ce=D.get(ae);Ce||D.set(ae,Ce=[]);const qe=ho(_,Ve);return B.set(ne,qe),qe;function Ve(qi,An,Cr){if(!Cc(Ce,qi))return;const en=Kt(qi,An,Cr);return Ce.pop(),en}function Dt(qi,An){return!Va(qi,_,An)||!!Co(qi.parent,_,so(An),S,D)}function Vt(qi,An,Cr){return(o===(An||qi)||al(o)===al(An||qi))&&!Rt(qi.declarations,gC)&&(Cr||Dt(al(qi),v))}function Kt(qi,An,Cr){return Vt(qi.get(o.escapedName),void 0,An)?[o]:hf(qi,vn=>{if(vn.flags&2097152&&vn.escapedName!=="export="&&vn.escapedName!=="default"&&!(GJ(vn)&&_&&Td(_n(_)))&&(!S||Rt(vn.declarations,Lk))&&(!Cr||!Rt(vn.declarations,hxe))&&(An||!Jc(vn,281))){const In=sf(vn),Nr=Wi(vn,In,An);if(Nr)return Nr}if(vn.escapedName===o.escapedName&&vn.exportSymbol&&Vt(al(vn.exportSymbol),void 0,An))return[o]})||(qi===Ue?Wi(wt,wt,An):void 0)}function Wi(qi,An,Cr){if(Vt(qi,An,Cr))return[qi];const en=Yp(An),vn=en&&Ve(en,!0);if(vn&&Dt(qi,so(v)))return[qi].concat(vn)}}function Va(o,_,v){let S=!1;return ho(_,D=>{let L=al(D.get(o.escapedName));if(!L)return!1;if(L===o)return!0;const B=L.flags&2097152&&!Jc(L,281);return L=B?sf(L):L,(B?op(L):L.flags)&v?(S=!0,!0):!1}),S}function Kh(o){if(o.declarations&&o.declarations.length){for(const _ of o.declarations)switch(_.kind){case 172:case 174:case 177:case 178:continue;default:return!1}return!0}return!1}function Th(o,_){return pC(o,_,788968,!1,!0).accessibility===0}function HS(o,_){return pC(o,_,111551,!1,!0).accessibility===0}function kD(o,_,v){return pC(o,_,v,!1,!1).accessibility===0}function Bp(o,_,v,S,D,L){if(!O(o))return;let B,K=!1;for(const ne of o){const ae=Co(ne,_,S,!1);if(ae){B=ne;const Ve=N2(ae[0],D);if(Ve)return Ve}if(L&&Rt(ne.declarations,gC)){if(D){K=!0;continue}return{accessibility:0}}const Ce=I2(ne,_,S),qe=Bp(Ce,_,v,v===ne?so(S):S,D,L);if(qe)return qe}if(K)return{accessibility:0};if(B)return{accessibility:1,errorSymbolName:Js(v,_,S),errorModuleName:B!==v?Js(B,_,1920):void 0}}function rv(o,_,v,S){return pC(o,_,v,S,!0)}function pC(o,_,v,S,D){if(o&&_){const L=Bp([o],_,o,v,S,D);if(L)return L;const B=W(o.declarations,TD);if(B){const K=TD(_);if(B!==K)return{accessibility:2,errorSymbolName:Js(o,_,v),errorModuleName:Js(B),errorNode:Xn(_)?_:void 0}}return{accessibility:1,errorSymbolName:Js(o,_,v)}}return{accessibility:0}}function TD(o){const _=Xi(o,mO);return _&&wr(_)}function mO(o){return Bh(o)||o.kind===307&&ep(o)}function gC(o){return iJ(o)||o.kind===307&&ep(o)}function N2(o,_){let v;if(!Be(Ri(o.declarations,L=>L.kind!==80),S))return;return{accessibility:0,aliasesToMakeVisible:v};function S(L){var B,K;if(!mC(L)){const ne=zI(L);if(ne&&!Kr(ne,32)&&mC(ne.parent))return D(L,ne);if(ds(L)&&Ou(L.parent.parent)&&!Kr(L.parent.parent,32)&&mC(L.parent.parent.parent))return D(L,L.parent.parent);if(nJ(L)&&!Kr(L,32)&&mC(L.parent))return D(L,L);if(nl(L)){if(o.flags&2097152&&Xn(L)&&((B=L.parent)!=null&&B.parent)&&ds(L.parent.parent)&&((K=L.parent.parent.parent)!=null&&K.parent)&&Ou(L.parent.parent.parent.parent)&&!Kr(L.parent.parent.parent.parent,32)&&L.parent.parent.parent.parent.parent&&mC(L.parent.parent.parent.parent.parent))return D(L,L.parent.parent.parent.parent);if(o.flags&2){const ae=Xi(L,Ou);return Kr(ae,32)?!0:mC(ae.parent)?D(L,ae):!1}}return!1}return!0}function D(L,B){return _&&(Tr(L).isVisible=!0,v=gu(v,B)),!0}}function jS(o){let _;return o.parent.kind===186||o.parent.kind===233&&!Lv(o.parent)||o.parent.kind===167||o.parent.kind===182&&o.parent.parameterName===o?_=1160127:o.kind===166||o.kind===211||o.parent.kind===271||o.parent.kind===166&&o.parent.left===o||o.parent.kind===211&&o.parent.expression===o||o.parent.kind===212&&o.parent.expression===o?_=1920:_=788968,_}function Cx(o,_,v=!0){const S=jS(o),D=Ip(o),L=Ui(_,D.escapedText,S,void 0,!1);return L&&L.flags&262144&&S&788968?{accessibility:0}:!L&&Uw(D)&&rv(wr(u_(D,!1,!1)),D,S,!1).accessibility===0?{accessibility:0}:L?N2(L,v)||{accessibility:1,errorSymbolName:yu(D),errorNode:D}:{accessibility:3,errorSymbolName:yu(D),errorNode:D}}function Js(o,_,v,S=4,D){let L=70221824;S&2&&(L|=128),S&1&&(L|=512),S&8&&(L|=16384),S&32&&(L|=134217728),S&16&&(L|=1073741824);const B=S&4?et.symbolToNode:et.symbolToEntityName;return D?K(D).getText():_8(K);function K(ne){const ae=B(o,v,_,L),Ce=(_==null?void 0:_.kind)===307?UEe():DI(),qe=_&&_n(_);return Ce.writeNode(4,ae,qe,ne),ne}}function Sx(o,_,v=0,S,D){return D?L(D).getText():_8(L);function L(B){let K;v&262144?K=S===1?185:184:K=S===1?180:179;const ne=et.signatureToSignatureDeclaration(o,K,_,yO(v)|70221824|512),ae=QK(),Ce=_&&_n(_);return ae.writeNode(4,ne,Ce,Soe(B)),B}}function Un(o,_,v=1064960,S=RW("")){const D=Y.noErrorTruncation||v&1,L=et.typeToTypeNode(o,_,yO(v)|70221824|(D?1:0));if(L===void 0)return z.fail("should always get typenode");const B=o!==qt?DI():zEe(),K=_&&_n(_);B.writeNode(4,L,K,S);const ne=S.getText(),ae=D?Ese*2:h8*2;return ae&&ne&&ne.length>=ae?ne.substr(0,ae-3)+"...":ne}function OF(o,_){let v=wA(o.symbol)?Un(o,o.symbol.valueDeclaration):Un(o),S=wA(_.symbol)?Un(_,_.symbol.valueDeclaration):Un(_);return v===S&&(v=vO(o),S=vO(_)),[v,S]}function vO(o){return Un(o,void 0,64)}function wA(o){return o&&!!o.valueDeclaration&&Ut(o.valueDeclaration)&&!fm(o.valueDeclaration)}function yO(o=0){return o&848330095}function bO(o){return!!o.symbol&&!!(o.symbol.flags&32)&&(o===Gu(o.symbol)||!!(o.flags&524288)&&!!(Rr(o)&16777216))}function pZ(o){return As(o)}function gZ(){return{typeToTypeNode:(Ze,Pe,Di,nn)=>K(Pe,Di,nn,rr=>ae(Ze,rr)),typePredicateToTypePredicateNode:(Ze,Pe,Di,nn)=>K(Pe,Di,nn,rr=>ta(Ze,rr)),expressionOrTypeToTypeNode:(Ze,Pe,Di,nn,rr,tr)=>K(nn,rr,tr,pr=>v(pr,Ze,Pe,Di)),serializeTypeForDeclaration:(Ze,Pe,Di,nn,rr,tr)=>K(nn,rr,tr,pr=>ah(pr,Ze,Pe,Di)),serializeReturnTypeForSignature:(Ze,Pe,Di,nn)=>K(Pe,Di,nn,rr=>li(rr,Ze)),indexInfoToIndexSignatureDeclaration:(Ze,Pe,Di,nn)=>K(Pe,Di,nn,rr=>qi(Ze,rr,void 0)),signatureToSignatureDeclaration:(Ze,Pe,Di,nn,rr)=>K(Di,nn,rr,tr=>An(Ze,Pe,tr)),symbolToEntityName:(Ze,Pe,Di,nn,rr)=>K(Di,nn,rr,tr=>Eh(Ze,tr,Pe,!1)),symbolToExpression:(Ze,Pe,Di,nn,rr)=>K(Di,nn,rr,tr=>nu(Ze,tr,Pe)),symbolToTypeParameterDeclarations:(Ze,Pe,Di,nn)=>K(Pe,Di,nn,rr=>Bn(Ze,rr)),symbolToParameterDeclaration:(Ze,Pe,Di,nn)=>K(Pe,Di,nn,rr=>No(Ze,rr)),typeParameterToDeclaration:(Ze,Pe,Di,nn)=>K(Pe,Di,nn,rr=>Ia(Ze,rr)),symbolTableToDeclarationStatements:(Ze,Pe,Di,nn)=>K(Pe,Di,nn,rr=>Ha(Ze,rr)),symbolToNode:(Ze,Pe,Di,nn,rr)=>K(Di,nn,rr,tr=>B(Ze,tr,Pe))};function o(Ze,Pe,Di){const nn=pZ(Pe);if(!Ze.mapper)return nn;const rr=Ys(nn,Ze.mapper);return Di&&rr!==nn?void 0:rr}function _(Ze,Pe,Di){return(!oc(Pe)||!(Pe.flags&16)||!Ze.enclosingFile||Ze.enclosingFile!==_n(uu(Pe)))&&(Pe=G.cloneNode(Pe)),Pe===Di||!Di?Pe:!Ze.enclosingFile||Ze.enclosingFile!==_n(uu(Di))?Er(Pe,Di):zt(Er(Pe,Di),Di)}function v(Ze,Pe,Di,nn){const rr=Ze.flags;Pe&&!(Ze.flags&-2147483648)&&He.serializeTypeOfExpression(Pe,Ze,nn),Ze.flags|=-2147483648;const tr=S(Ze,Pe,Di,nn);return Ze.flags=rr,tr}function S(Ze,Pe,Di,nn){if(Pe){const rr=Ek(Pe)?Pe.type:wI(Pe)?T7(Pe):void 0;if(rr&&!V0(rr)){const tr=D(Ze,rr,Di,Pe.parent,nn);if(tr)return tr}}return nn&&(Di=Rx(Di)),ae(Di,Ze)}function D(Ze,Pe,Di,nn,rr){const tr=Di;rr&&(Di=Rx(Di,!Gs(nn)));const pr=L(Ze,Pe,Di,nn);if(pr)return rr&&udt(Di)&&!Km(o(Ze,Pe),Ms=>!!(Ms.flags&32768))?G.createUnionTypeNode([pr,G.createKeywordTypeNode(157)]):pr;if(rr&&tr!==Di){const Ms=L(Ze,Pe,tr,nn);if(Ms)return G.createUnionTypeNode([Ms,G.createKeywordTypeNode(157)])}}function L(Ze,Pe,Di,nn=Ze.enclosingDeclaration,rr=o(Ze,Pe,!0)){if(rr&&jY(nn,Di,rr)&&u5(Pe,Di)){const tr=Oa(Ze,Pe);if(tr)return tr}}function B(Ze,Pe,Di){if(Pe.flags&1073741824){if(Ze.valueDeclaration){const rr=ko(Ze.valueDeclaration);if(rr&&Ja(rr))return rr}const nn=Zs(Ze).nameType;if(nn&&nn.flags&9216)return Pe.enclosingDeclaration=nn.symbol.valueDeclaration,G.createComputedPropertyName(nu(nn.symbol,Pe,Di))}return nu(Ze,Pe,Di)}function K(Ze,Pe,Di,nn){const rr=Di!=null&&Di.trackSymbol?Di.moduleResolverHost:Pe&134217728?HPt(t):void 0,tr={enclosingDeclaration:Ze,enclosingFile:Ze&&_n(Ze),flags:Pe||0,tracker:void 0,encounteredError:!1,reportedDiagnostic:!1,visitedTypes:void 0,symbolDepth:void 0,inferTypeParameters:void 0,approximateLength:0,trackedSymbols:void 0,bundled:!!Y.outFile&&!!Ze&&ep(_n(Ze)),truncating:!1,usedSymbolNames:void 0,remappedSymbolNames:void 0,remappedSymbolReferences:void 0,reverseMappedStack:void 0,mustCreateTypeParameterSymbolList:!0,typeParameterSymbolList:void 0,mustCreateTypeParametersNamesLookups:!0,typeParameterNames:void 0,typeParameterNamesByText:void 0,typeParameterNamesByTextNextNameCount:void 0,mapper:void 0};tr.tracker=new UDe(tr,Di,rr);const pr=nn(tr);return tr.truncating&&tr.flags&1&&tr.tracker.reportTruncationError(),tr.encounteredError?void 0:pr}function ne(Ze){return Ze.truncating?Ze.truncating:Ze.truncating=Ze.approximateLength>(Ze.flags&1?Ese:h8)}function ae(Ze,Pe){const Di=Pe.flags,nn=Ce(Ze,Pe);return Pe.flags=Di,nn}function Ce(Ze,Pe){var Di,nn;u&&u.throwIfCancellationRequested&&u.throwIfCancellationRequested();const rr=Pe.flags&8388608;if(Pe.flags&=-8388609,!Ze){if(!(Pe.flags&262144)){Pe.encounteredError=!0;return}return Pe.approximateLength+=3,G.createKeywordTypeNode(133)}if(Pe.flags&536870912||(Ze=cv(Ze)),Ze.flags&1)return Ze.aliasSymbol?G.createTypeReferenceNode(Ll(Ze.aliasSymbol),Kt(Ze.aliasTypeArguments,Pe)):Ze===qt?l7(G.createKeywordTypeNode(133),3,"unresolved"):(Pe.approximateLength+=3,G.createKeywordTypeNode(Ze===ii?141:133));if(Ze.flags&2)return G.createKeywordTypeNode(159);if(Ze.flags&4)return Pe.approximateLength+=6,G.createKeywordTypeNode(154);if(Ze.flags&8)return Pe.approximateLength+=6,G.createKeywordTypeNode(150);if(Ze.flags&64)return Pe.approximateLength+=6,G.createKeywordTypeNode(163);if(Ze.flags&16&&!Ze.aliasSymbol)return Pe.approximateLength+=7,G.createKeywordTypeNode(136);if(Ze.flags&1056){if(Ze.symbol.flags&8){const Xt=Vf(Ze.symbol),Vi=kl(Xt,Pe,788968);if(vc(Xt)===Ze)return Vi;const En=xu(Ze.symbol);return wp(En,1)?Tt(Vi,G.createTypeReferenceNode(En,void 0)):V1(Vi)?(Vi.isTypeOf=!0,G.createIndexedAccessTypeNode(Vi,G.createLiteralTypeNode(G.createStringLiteral(En)))):_g(Vi)?G.createIndexedAccessTypeNode(G.createTypeQueryNode(Vi.typeName),G.createLiteralTypeNode(G.createStringLiteral(En))):z.fail("Unhandled type node kind returned from `symbolToTypeNode`.")}return kl(Ze.symbol,Pe,788968)}if(Ze.flags&128)return Pe.approximateLength+=Ze.value.length+2,G.createLiteralTypeNode(ir(G.createStringLiteral(Ze.value,!!(Pe.flags&268435456)),16777216));if(Ze.flags&256){const Xt=Ze.value;return Pe.approximateLength+=(""+Xt).length,G.createLiteralTypeNode(Xt<0?G.createPrefixUnaryExpression(41,G.createNumericLiteral(-Xt)):G.createNumericLiteral(Xt))}if(Ze.flags&2048)return Pe.approximateLength+=jT(Ze.value).length+1,G.createLiteralTypeNode(G.createBigIntLiteral(Ze.value));if(Ze.flags&512)return Pe.approximateLength+=Ze.intrinsicName.length,G.createLiteralTypeNode(Ze.intrinsicName==="true"?G.createTrue():G.createFalse());if(Ze.flags&8192){if(!(Pe.flags&1048576)){if(HS(Ze.symbol,Pe.enclosingDeclaration))return Pe.approximateLength+=6,kl(Ze.symbol,Pe,111551);Pe.tracker.reportInaccessibleUniqueSymbolError&&Pe.tracker.reportInaccessibleUniqueSymbolError()}return Pe.approximateLength+=13,G.createTypeOperatorNode(158,G.createKeywordTypeNode(155))}if(Ze.flags&16384)return Pe.approximateLength+=4,G.createKeywordTypeNode(116);if(Ze.flags&32768)return Pe.approximateLength+=9,G.createKeywordTypeNode(157);if(Ze.flags&65536)return Pe.approximateLength+=4,G.createLiteralTypeNode(G.createNull());if(Ze.flags&131072)return Pe.approximateLength+=5,G.createKeywordTypeNode(146);if(Ze.flags&4096)return Pe.approximateLength+=6,G.createKeywordTypeNode(155);if(Ze.flags&67108864)return Pe.approximateLength+=6,G.createKeywordTypeNode(151);if(r7(Ze))return Pe.flags&4194304&&(!Pe.encounteredError&&!(Pe.flags&32768)&&(Pe.encounteredError=!0),(nn=(Di=Pe.tracker).reportInaccessibleThisError)==null||nn.call(Di)),Pe.approximateLength+=4,G.createThisTypeNode();if(!rr&&Ze.aliasSymbol&&(Pe.flags&16384||Th(Ze.aliasSymbol,Pe.enclosingDeclaration))){const Xt=Kt(Ze.aliasTypeArguments,Pe);return XI(Ze.aliasSymbol.escapedName)&&!(Ze.aliasSymbol.flags&32)?G.createTypeReferenceNode(G.createIdentifier(""),Xt):O(Xt)===1&&Ze.aliasSymbol===ai.symbol?G.createArrayTypeNode(Xt[0]):kl(Ze.aliasSymbol,Pe,788968,Xt)}const tr=Rr(Ze);if(tr&4)return z.assert(!!(Ze.flags&524288)),Ze.node?dt(Ze,oi):oi(Ze);if(Ze.flags&262144||tr&3){if(Ze.flags&262144&&Mt(Pe.inferTypeParameters,Ze)){Pe.approximateLength+=xu(Ze.symbol).length+6;let Vi;const En=C_(Ze);if(En){const Bi=Xct(Ze,!0);Bi&&SC(En,Bi)||(Pe.approximateLength+=9,Vi=En&&ae(En,Pe))}return G.createInferTypeNode(zr(Ze,Pe,Vi))}if(Pe.flags&4&&Ze.flags&262144){const Vi=Ca(Ze,Pe);return Pe.approximateLength+=dr(Vi).length,G.createTypeReferenceNode(G.createIdentifier(dr(Vi)),void 0)}if(Ze.symbol)return kl(Ze.symbol,Pe,788968);const Xt=(Ze===z_||Ze===Rc)&&U&&U.symbol?(Ze===Rc?"sub-":"super-")+xu(U.symbol):"?";return G.createTypeReferenceNode(G.createIdentifier(Xt),void 0)}if(Ze.flags&1048576&&Ze.origin&&(Ze=Ze.origin),Ze.flags&3145728){const Xt=Ze.flags&1048576?hj(Ze.types):Ze.types;if(O(Xt)===1)return ae(Xt[0],Pe);const Vi=Kt(Xt,Pe,!0);if(Vi&&Vi.length>0)return Ze.flags&1048576?G.createUnionTypeNode(Vi):G.createIntersectionTypeNode(Vi);!Pe.encounteredError&&!(Pe.flags&262144)&&(Pe.encounteredError=!0);return}if(tr&48)return z.assert(!!(Ze.flags&524288)),Jl(Ze);if(Ze.flags&4194304){const Xt=Ze.type;Pe.approximateLength+=6;const Vi=ae(Xt,Pe);return G.createTypeOperatorNode(143,Vi)}if(Ze.flags&134217728){const Xt=Ze.texts,Vi=Ze.types,En=G.createTemplateHead(Xt[0]),Bi=G.createNodeArray(Yt(Vi,(qn,Pr)=>G.createTemplateLiteralTypeSpan(ae(qn,Pe),(Prpr(Xt));if(Ze.flags&33554432){const Xt=ae(Ze.baseType,Pe),Vi=LO(Ze)&&bOe("NoInfer",!1);return Vi?kl(Vi,Pe,788968,[Xt]):Xt}return z.fail("Should be unreachable.");function pr(Xt){const Vi=ae(Xt.checkType,Pe);if(Pe.approximateLength+=15,Pe.flags&4&&Xt.root.isDistributive&&!(Xt.checkType.flags&262144)){const Wn=Pg(sl(262144,"T")),Qr=Ca(Wn,Pe),Vr=G.createTypeReferenceNode(Qr);Pe.approximateLength+=37;const aa=aN(Xt.root.checkType,Wn,Xt.mapper),Sa=Pe.inferTypeParameters;Pe.inferTypeParameters=Xt.root.inferTypeParameters;const kc=ae(Ys(Xt.root.extendsType,aa),Pe);Pe.inferTypeParameters=Sa;const x_=Ms(Ys(o(Pe,Xt.root.node.trueType),aa)),Vp=Ms(Ys(o(Pe,Xt.root.node.falseType),aa));return G.createConditionalTypeNode(Vi,G.createInferTypeNode(G.createTypeParameterDeclaration(void 0,G.cloneNode(Vr.typeName))),G.createConditionalTypeNode(G.createTypeReferenceNode(G.cloneNode(Qr)),ae(Xt.checkType,Pe),G.createConditionalTypeNode(Vr,kc,x_,Vp),G.createKeywordTypeNode(146)),G.createKeywordTypeNode(146))}const En=Pe.inferTypeParameters;Pe.inferTypeParameters=Xt.root.inferTypeParameters;const Bi=ae(Xt.extendsType,Pe);Pe.inferTypeParameters=En;const qn=Ms(W2(Xt)),Pr=Ms(V2(Xt));return G.createConditionalTypeNode(Vi,Bi,qn,Pr)}function Ms(Xt){var Vi,En,Bi;return Xt.flags&1048576?(Vi=Pe.visitedTypes)!=null&&Vi.has(kf(Xt))?(Pe.flags&131072||(Pe.encounteredError=!0,(Bi=(En=Pe.tracker)==null?void 0:En.reportCyclicStructureError)==null||Bi.call(En)),qe(Pe)):dt(Xt,qn=>ae(qn,Pe)):ae(Xt,Pe)}function eo(Xt){return!!Aj(Xt)}function Eo(Xt){return!!Xt.target&&eo(Xt.target)&&!eo(Xt)}function Jo(Xt){var Vi;z.assert(!!(Xt.flags&524288));const En=Xt.declaration.readonlyToken?G.createToken(Xt.declaration.readonlyToken.kind):void 0,Bi=Xt.declaration.questionToken?G.createToken(Xt.declaration.questionToken.kind):void 0;let qn,Pr;const Wn=!DO(Xt)&&!(ND(Xt).flags&2)&&Pe.flags&4&&!(Og(Xt).flags&262144&&((Vi=C_(Og(Xt)))==null?void 0:Vi.flags)&4194304);if(DO(Xt)){if(Eo(Xt)&&Pe.flags&4){const x_=Pg(sl(262144,"T")),Vp=Ca(x_,Pe);Pr=G.createTypeReferenceNode(Vp)}qn=G.createTypeOperatorNode(143,Pr||ae(ND(Xt),Pe))}else if(Wn){const x_=Pg(sl(262144,"T")),Vp=Ca(x_,Pe);Pr=G.createTypeReferenceNode(Vp),qn=Pr}else qn=ae(Og(Xt),Pe);const Qr=zr(av(Xt),Pe,qn),Vr=Xt.declaration.nameType?ae(qS(Xt),Pe):void 0,aa=ae(TC(bC(Xt),!!(ny(Xt)&4)),Pe),Sa=G.createMappedTypeNode(En,Qr,Vr,Bi,aa,void 0);Pe.approximateLength+=10;const kc=ir(Sa,1);if(Eo(Xt)&&Pe.flags&4){const x_=Ys(C_(o(Pe,Xt.declaration.typeParameter.constraint.type))||Gt,Xt.mapper);return G.createConditionalTypeNode(ae(ND(Xt),Pe),G.createInferTypeNode(G.createTypeParameterDeclaration(void 0,G.cloneNode(Pr.typeName),x_.flags&2?void 0:ae(x_,Pe))),kc,G.createKeywordTypeNode(146))}else if(Wn)return G.createConditionalTypeNode(ae(Og(Xt),Pe),G.createInferTypeNode(G.createTypeParameterDeclaration(void 0,G.cloneNode(Pr.typeName),G.createTypeOperatorNode(143,ae(ND(Xt),Pe)))),kc,G.createKeywordTypeNode(146));return kc}function Jl(Xt){var Vi,En;const Bi=Xt.id,qn=Xt.symbol;if(qn){if(!!(Rr(Xt)&8388608)){const aa=Xt.node;if(qT(aa)){const Sa=L(Pe,aa,Xt);if(Sa)return Sa}return(Vi=Pe.visitedTypes)!=null&&Vi.has(Bi)?qe(Pe):dt(Xt,It)}const Qr=bO(Xt)?788968:111551;if(h1(qn.valueDeclaration))return kl(qn,Pe,Qr);if(qn.flags&32&&!u_e(qn)&&!(qn.valueDeclaration&&ss(qn.valueDeclaration)&&Pe.flags&2048&&(!xd(qn.valueDeclaration)||rv(qn,Pe.enclosingDeclaration,Qr,!1).accessibility!==0))||qn.flags&896||Pr())return kl(qn,Pe,Qr);if((En=Pe.visitedTypes)!=null&&En.has(Bi)){const Vr=RF(Xt);return Vr?kl(Vr,Pe,788968):qe(Pe)}else return dt(Xt,It)}else return It(Xt);function Pr(){var Wn;const Qr=!!(qn.flags&8192)&&Rt(qn.declarations,aa=>da(aa)),Vr=!!(qn.flags&16)&&(qn.parent||W(qn.declarations,aa=>aa.parent.kind===307||aa.parent.kind===268));if(Qr||Vr)return(!!(Pe.flags&4096)||((Wn=Pe.visitedTypes)==null?void 0:Wn.has(Bi)))&&(!(Pe.flags&8)||HS(qn,Pe.enclosingDeclaration))}}function dt(Xt,Vi){var En,Bi,qn;const Pr=Xt.id,Wn=Rr(Xt)&16&&Xt.symbol&&Xt.symbol.flags&32,Qr=Rr(Xt)&4&&Xt.node?"N"+Tl(Xt.node):Xt.flags&16777216?"N"+Tl(Xt.root.node):Xt.symbol?(Wn?"+":"")+Aa(Xt.symbol):void 0;Pe.visitedTypes||(Pe.visitedTypes=new Set),Qr&&!Pe.symbolDepth&&(Pe.symbolDepth=new Map);const Vr=Pe.enclosingDeclaration&&Tr(Pe.enclosingDeclaration),aa=`${kf(Xt)}|${Pe.flags}`;Vr&&(Vr.serializedTypes||(Vr.serializedTypes=new Map));const Sa=(En=Vr==null?void 0:Vr.serializedTypes)==null?void 0:En.get(aa);if(Sa)return(Bi=Sa.trackedSymbols)==null||Bi.forEach(([hp,JO,Hx])=>Pe.tracker.trackSymbol(hp,JO,Hx)),Sa.truncating&&(Pe.truncating=!0),Pe.approximateLength+=Sa.addedLength,$D(Sa.node);let kc;if(Qr){if(kc=Pe.symbolDepth.get(Qr)||0,kc>10)return qe(Pe);Pe.symbolDepth.set(Qr,kc+1)}Pe.visitedTypes.add(Pr);const x_=Pe.trackedSymbols;Pe.trackedSymbols=void 0;const Vp=Pe.approximateLength,Vx=Vi(Xt),G2=Pe.approximateLength-Vp;return!Pe.reportedDiagnostic&&!Pe.encounteredError&&((qn=Vr==null?void 0:Vr.serializedTypes)==null||qn.set(aa,{node:Vx,truncating:Pe.truncating,addedLength:G2,trackedSymbols:Pe.trackedSymbols})),Pe.visitedTypes.delete(Pr),Qr&&Pe.symbolDepth.set(Qr,kc),Pe.trackedSymbols=x_,Vx;function $D(hp){return!oc(hp)&&xo(hp)===hp?hp:_(Pe,G.cloneNode(cn(hp,$D,void 0,p1,$D)),hp)}function p1(hp,JO,Hx,JD,hz){return hp&&hp.length===0?zt(G.createNodeArray(void 0,hp.hasTrailingComma),hp):wn(hp,JO,Hx,JD,hz)}}function It(Xt){if(ap(Xt)||Xt.containsError)return Jo(Xt);const Vi=lv(Xt);if(!Vi.properties.length&&!Vi.indexInfos.length){if(!Vi.callSignatures.length&&!Vi.constructSignatures.length)return Pe.approximateLength+=2,ir(G.createTypeLiteralNode(void 0),1);if(Vi.callSignatures.length===1&&!Vi.constructSignatures.length){const Wn=Vi.callSignatures[0];return An(Wn,184,Pe)}if(Vi.constructSignatures.length===1&&!Vi.callSignatures.length){const Wn=Vi.constructSignatures[0];return An(Wn,185,Pe)}}const En=Ri(Vi.constructSignatures,Wn=>!!(Wn.flags&4));if(Rt(En)){const Wn=Yt(En,Vr=>iN(Vr));return Vi.callSignatures.length+(Vi.constructSignatures.length-En.length)+Vi.indexInfos.length+(Pe.flags&2048?$n(Vi.properties,Vr=>!(Vr.flags&4194304)):O(Vi.properties))&&Wn.push(cs(Vi)),ae(Fa(Wn),Pe)}const Bi=Pe.flags;Pe.flags|=4194304;const qn=Pi(Vi);Pe.flags=Bi;const Pr=G.createTypeLiteralNode(qn);return Pe.approximateLength+=2,ir(Pr,Pe.flags&1024?0:1),Pr}function oi(Xt){let Vi=Nc(Xt);if(Xt.target===ai||Xt.target===Sn){if(Pe.flags&2){const qn=ae(Vi[0],Pe);return G.createTypeReferenceNode(Xt.target===ai?"Array":"ReadonlyArray",[qn])}const En=ae(Vi[0],Pe),Bi=G.createArrayTypeNode(En);return Xt.target===ai?Bi:G.createTypeOperatorNode(148,Bi)}else if(Xt.target.objectFlags&8){if(Vi=Is(Vi,(En,Bi)=>TC(En,!!(Xt.target.elementFlags[Bi]&2))),Vi.length>0){const En=JS(Xt),Bi=Kt(Vi.slice(0,En),Pe);if(Bi){const{labeledElementDeclarations:qn}=Xt.target;for(let Wn=0;Wn0){const Vr=(Xt.target.typeParameters||x).length;Pr=Kt(Vi.slice(Bi,Vr),Pe)}const Wn=Pe.flags;Pe.flags|=16;const Qr=kl(Xt.symbol,Pe,788968,Pr);return Pe.flags=Wn,qn?Tt(qn,Qr):Qr}}}function Tt(Xt,Vi){if(V1(Xt)){let En=Xt.typeArguments,Bi=Xt.qualifier;Bi&&(lt(Bi)?En!==fI(Bi)&&(Bi=pS(G.cloneNode(Bi),En)):En!==fI(Bi.right)&&(Bi=G.updateQualifiedName(Bi,Bi.left,pS(G.cloneNode(Bi.right),En)))),En=Vi.typeArguments;const qn=zi(Vi);for(const Pr of qn)Bi=Bi?G.createQualifiedName(Bi,Pr):Pr;return G.updateImportTypeNode(Xt,Xt.argument,Xt.attributes,Bi,En,Xt.isTypeOf)}else{let En=Xt.typeArguments,Bi=Xt.typeName;lt(Bi)?En!==fI(Bi)&&(Bi=pS(G.cloneNode(Bi),En)):En!==fI(Bi.right)&&(Bi=G.updateQualifiedName(Bi,Bi.left,pS(G.cloneNode(Bi.right),En))),En=Vi.typeArguments;const qn=zi(Vi);for(const Pr of qn)Bi=G.createQualifiedName(Bi,Pr);return G.updateTypeReferenceNode(Xt,Bi,En)}}function zi(Xt){let Vi=Xt.typeName;const En=[];for(;!lt(Vi);)En.unshift(Vi.right),Vi=Vi.left;return En.unshift(Vi),En}function Pi(Xt){if(ne(Pe))return[G.createPropertySignature(void 0,"...",void 0,void 0)];const Vi=[];for(const qn of Xt.callSignatures)Vi.push(An(qn,179,Pe));for(const qn of Xt.constructSignatures)qn.flags&4||Vi.push(An(qn,180,Pe));for(const qn of Xt.indexInfos)Vi.push(qi(qn,Pe,Xt.objectFlags&1024?qe(Pe):void 0));const En=Xt.properties;if(!En)return Vi;let Bi=0;for(const qn of En){if(Bi++,Pe.flags&2048){if(qn.flags&4194304)continue;Qg(qn)&6&&Pe.tracker.reportPrivateInBaseOfClassExpression&&Pe.tracker.reportPrivateInBaseOfClassExpression(Ws(qn.escapedName))}if(ne(Pe)&&Bi+2!(oi.flags&32768)),0);for(const oi of It){const Tt=An(oi,173,Pe,{name:Ms,questionToken:eo});Di.push(dt(Tt))}if(It.length||!eo)return}let Eo;Ve(Ze,Pe)?Eo=qe(Pe):(rr&&(Pe.reverseMappedStack||(Pe.reverseMappedStack=[]),Pe.reverseMappedStack.push(Ze)),Eo=tr?ah(Pe,void 0,tr,Ze):G.createKeywordTypeNode(133),rr&&Pe.reverseMappedStack.pop());const Jo=hv(Ze)?[G.createToken(148)]:void 0;Jo&&(Pe.approximateLength+=9);const Jl=G.createPropertySignature(Jo,Ms,eo,Eo);Di.push(dt(Jl));function dt(It){var oi;const Tt=(oi=Ze.declarations)==null?void 0:oi.find(zi=>zi.kind===348);if(Tt){const zi=MB(Tt.comment);zi&&Vk(It,[{kind:3,text:`* + * `+zi.replace(/\n/g,` + * `)+` + `,pos:-1,end:-1,hasTrailingNewLine:!0}])}else Ze.valueDeclaration&&Vt(Pe,It,Ze.valueDeclaration);return It}}function Vt(Ze,Pe,Di){return Ze.enclosingFile&&Ze.enclosingFile===_n(Di)?Sd(Pe,Di):Pe}function Kt(Ze,Pe,Di){if(Rt(Ze)){if(ne(Pe))if(Di){if(Ze.length>2)return[ae(Ze[0],Pe),G.createTypeReferenceNode(`... ${Ze.length-2} more ...`,void 0),ae(Ze[Ze.length-1],Pe)]}else return[G.createTypeReferenceNode("...",void 0)];const rr=!(Pe.flags&64)?Ug():void 0,tr=[];let pr=0;for(const Ms of Ze){if(pr++,ne(Pe)&&pr+2{if(!Fke(eo,([Eo],[Jo])=>Wi(Eo,Jo)))for(const[Eo,Jo]of eo)tr[Jo]=ae(Eo,Pe)}),Pe.flags=Ms}return tr}}function Wi(Ze,Pe){return Ze===Pe||!!Ze.symbol&&Ze.symbol===Pe.symbol||!!Ze.aliasSymbol&&Ze.aliasSymbol===Pe.aliasSymbol}function qi(Ze,Pe,Di){const nn=Uwe(Ze)||"x",rr=ae(Ze.keyType,Pe),tr=G.createParameterDeclaration(void 0,void 0,nn,void 0,rr,void 0);return Di||(Di=ae(Ze.type||Je,Pe)),!Ze.type&&!(Pe.flags&2097152)&&(Pe.encounteredError=!0),Pe.approximateLength+=nn.length+4,G.createIndexSignature(Ze.isReadonly?[G.createToken(148)]:void 0,[tr],Di)}function An(Ze,Pe,Di,nn){var rr;let tr,pr;const Ms=Dct(Ze,!0)[0],eo=In(Di,Ze.declaration,Ms,Ze.typeParameters,Ze.parameters,Ze.mapper);Di.approximateLength+=3,Di.flags&32&&Ze.target&&Ze.mapper&&Ze.target.typeParameters?pr=Ze.target.typeParameters.map(Tt=>ae(Ys(Tt,Ze.mapper),Di)):tr=Ze.typeParameters&&Ze.typeParameters.map(Tt=>Ia(Tt,Di));const Eo=Di.flags;Di.flags&=-257;const Jo=(Rt(Ms,Tt=>Tt!==Ms[Ms.length-1]&&!!(Pu(Tt)&32768))?Ze.parameters:Ms).map(Tt=>No(Tt,Di,Pe===176)),Jl=Di.flags&33554432?void 0:Nr(Ze,Di);Jl&&Jo.unshift(Jl),Di.flags=Eo;const dt=li(Di,Ze);let It=nn==null?void 0:nn.modifiers;if(Pe===185&&Ze.flags&4){const Tt=Rv(It);It=G.createModifiersFromModifierFlags(Tt|64)}const oi=Pe===179?G.createCallSignature(tr,Jo,dt):Pe===180?G.createConstructSignature(tr,Jo,dt):Pe===173?G.createMethodSignature(It,(nn==null?void 0:nn.name)??G.createIdentifier(""),nn==null?void 0:nn.questionToken,tr,Jo,dt):Pe===174?G.createMethodDeclaration(It,void 0,(nn==null?void 0:nn.name)??G.createIdentifier(""),void 0,tr,Jo,dt,void 0):Pe===176?G.createConstructorDeclaration(It,Jo,void 0):Pe===177?G.createGetAccessorDeclaration(It,(nn==null?void 0:nn.name)??G.createIdentifier(""),Jo,dt,void 0):Pe===178?G.createSetAccessorDeclaration(It,(nn==null?void 0:nn.name)??G.createIdentifier(""),Jo,void 0):Pe===181?G.createIndexSignature(It,Jo,dt):Pe===317?G.createJSDocFunctionType(Jo,dt):Pe===184?G.createFunctionTypeNode(tr,Jo,dt??G.createTypeReferenceNode(G.createIdentifier(""))):Pe===185?G.createConstructorTypeNode(It,tr,Jo,dt??G.createTypeReferenceNode(G.createIdentifier(""))):Pe===262?G.createFunctionDeclaration(It,void 0,nn!=null&&nn.name?ua(nn.name,lt):G.createIdentifier(""),tr,Jo,dt,void 0):Pe===218?G.createFunctionExpression(It,void 0,nn!=null&&nn.name?ua(nn.name,lt):G.createIdentifier(""),tr,Jo,dt,G.createBlock([])):Pe===219?G.createArrowFunction(It,tr,Jo,dt,void 0,G.createBlock([])):z.assertNever(Pe);if(pr&&(oi.typeArguments=G.createNodeArray(pr)),((rr=Ze.declaration)==null?void 0:rr.kind)===323&&Ze.declaration.parent.kind===339){const Tt=yu(Ze.declaration.parent.parent,!0).slice(2,-2).split(/\r\n|\n|\r/).map(zi=>zi.replace(/^\s+/," ")).join(` +`);l7(oi,3,Tt,!0)}return eo==null||eo(),oi}function Cr(Ze){return Bo(Ze)||Qb(Ze)||pI(Ze)}function en(Ze){return Bo(Ze)||Qb(Ze)?Mg(Ze).typeParameters:$T(Ze)?WOe(Ze):[ID(wr(Ze.typeParameter))]}function vn(Ze){return Bo(Ze)||Qb(Ze)?Mg(Ze).parameters:void 0}function In(Ze,Pe,Di,nn,rr,tr){const pr=NC(Ze);let Ms,eo;const Eo=Ze.enclosingDeclaration,Jo=Ze.mapper;if(tr&&(Ze.mapper=tr),Ze.enclosingDeclaration&&Pe){let Jl=function(dt,It){z.assert(Ze.enclosingDeclaration);let oi;Tr(Ze.enclosingDeclaration).fakeScopeForSignatureDeclaration===dt?oi=Ze.enclosingDeclaration:Ze.enclosingDeclaration.parent&&Tr(Ze.enclosingDeclaration.parent).fakeScopeForSignatureDeclaration===dt&&(oi=Ze.enclosingDeclaration.parent),z.assertOptionalNode(oi,Ho);const Tt=(oi==null?void 0:oi.locals)??ga();let zi,Pi;if(It((Xt,Vi)=>{if(oi){const En=Tt.get(Xt);En?Pi=xi(Pi,{name:Xt,oldSymbol:En}):zi=xi(zi,Xt)}Tt.set(Xt,Vi)}),oi)return function(){W(zi,Vi=>Tt.delete(Vi)),W(Pi,Vi=>Tt.set(Vi.name,Vi.oldSymbol))};{const Xt=G.createBlock(x);Tr(Xt).fakeScopeForSignatureDeclaration=dt,Xt.locals=Tt,ml(Xt,Ze.enclosingDeclaration),Ze.enclosingDeclaration=Xt}};Ms=Rt(Di)?Jl("params",dt=>{if(Di)for(let It=0;It{if(Gs(zi)&&Qo(zi.name))return Pi(zi.name),!0;return;function Pi(Vi){W(Vi.elements,En=>{switch(En.kind){case 232:return;case 208:return Xt(En);default:return z.assertNever(En)}})}function Xt(Vi){if(Qo(Vi.name))return Pi(Vi.name);const En=wr(Vi);dt(En.escapedName,En)}})||dt(oi.escapedName,oi)}}):void 0,Ze.flags&4&&Rt(nn)&&(eo=Jl("typeParams",dt=>{for(const It of nn??x){const oi=Ca(It,Ze).escapedText;dt(oi,It.symbol)}}))}return()=>{Ms==null||Ms(),eo==null||eo(),pr(),Ze.enclosingDeclaration=Eo,Ze.mapper=Jo}}function Nr(Ze,Pe){if(Ze.thisParameter)return No(Ze.thisParameter,Pe);if(Ze.declaration&&Xn(Ze.declaration)){const Di=P$(Ze.declaration);if(Di&&Di.typeExpression)return G.createParameterDeclaration(void 0,void 0,"this",void 0,ae(o(Pe,Di.typeExpression),Pe))}}function zr(Ze,Pe,Di){const nn=Pe.flags;Pe.flags&=-513;const rr=G.createModifiersFromModifierFlags(nMe(Ze)),tr=Ca(Ze,Pe),pr=tN(Ze),Ms=pr&&ae(pr,Pe);return Pe.flags=nn,G.createTypeParameterDeclaration(rr,tr,Di,Ms)}function Ur(Ze,Pe,Di){return Pe&&L(Di,Pe,Ze)||ae(Ze,Di)}function Ia(Ze,Pe,Di=C_(Ze)){const nn=Di&&Ur(Di,S_e(Ze),Pe);return zr(Ze,Pe,nn)}function ta(Ze,Pe){const Di=Ze.kind===2||Ze.kind===3?G.createToken(131):void 0,nn=Ze.kind===1||Ze.kind===3?ir(G.createIdentifier(Ze.parameterName),16777216):G.createThisTypeNode(),rr=Ze.type&&ae(Ze.type,Pe);return G.createTypePredicateNode(Di,nn,rr)}function ll(Ze){const Pe=Jc(Ze,169);if(Pe)return Pe;if(!M1(Ze))return Jc(Ze,341)}function No(Ze,Pe,Di){const nn=ll(Ze),rr=Qn(Ze),tr=ah(Pe,nn,rr,Ze),pr=!(Pe.flags&8192)&&Di&&nn&&_0(nn)?Yt(CT(nn),G.cloneNode):void 0,eo=nn&&O1(nn)||Pu(Ze)&32768?G.createToken(26):void 0,Eo=iu(Ze,nn,Pe),Jl=nn&&EZ(nn)||Pu(Ze)&16384?G.createToken(58):void 0,dt=G.createParameterDeclaration(pr,eo,Eo,Jl,tr,void 0);return Pe.approximateLength+=xu(Ze).length+3,dt}function iu(Ze,Pe,Di){return Pe&&Pe.name?Pe.name.kind===80?ir(G.cloneNode(Pe.name),16777216):Pe.name.kind===166?ir(G.cloneNode(Pe.name.right),16777216):nn(Pe.name):xu(Ze);function nn(rr){return tr(rr);function tr(pr){Di.tracker.canTrackSymbol&&Ja(pr)&&__e(pr)&&Uf(pr.expression,Di.enclosingDeclaration,Di);let Ms=cn(pr,tr,void 0,void 0,tr);return nl(Ms)&&(Ms=G.updateBindingElement(Ms,Ms.dotDotDotToken,Ms.propertyName,Ms.name,void 0)),oc(Ms)||(Ms=G.cloneNode(Ms)),ir(Ms,16777217)}}}function Uf(Ze,Pe,Di){if(!Di.tracker.canTrackSymbol)return;const nn=Ip(Ze),rr=Ui(nn,nn.escapedText,1160127,void 0,!0);rr&&Di.tracker.trackSymbol(rr,Pe,111551)}function Iu(Ze,Pe,Di,nn){return Pe.tracker.trackSymbol(Ze,Pe.enclosingDeclaration,Di),pn(Ze,Pe,Di,nn)}function pn(Ze,Pe,Di,nn){let rr;return!(Ze.flags&262144)&&(Pe.enclosingDeclaration||Pe.flags&64)&&!(Pe.flags&134217728)?(rr=z.checkDefined(pr(Ze,Di,!0)),z.assert(rr&&rr.length>0)):rr=[Ze],rr;function pr(Ms,eo,Eo){let Jo=Co(Ms,Pe.enclosingDeclaration,eo,!!(Pe.flags&128)),Jl;if(!Jo||Va(Jo[0],Pe.enclosingDeclaration,Jo.length===1?eo:so(eo))){const It=I2(Jo?Jo[0]:Ms,Pe.enclosingDeclaration,eo);if(O(It)){Jl=It.map(zi=>Rt(zi.declarations,gC)?Ks(zi,Pe):void 0);const oi=It.map((zi,Pi)=>Pi);oi.sort(dt);const Tt=oi.map(zi=>It[zi]);for(const zi of Tt){const Pi=pr(zi,so(eo),!1);if(Pi){if(zi.exports&&zi.exports.get("export=")&&w0(zi.exports.get("export="),Ms)){Jo=Pi;break}Jo=Pi.concat(Jo||[yx(zi,Ms)||Ms]);break}}}}if(Jo)return Jo;if(Eo||!(Ms.flags&6144))return!Eo&&!nn&&W(Ms.declarations,gC)?void 0:[Ms];function dt(It,oi){const Tt=Jl[It],zi=Jl[oi];if(Tt&&zi){const Pi=cg(zi);return cg(Tt)===Pi?OK(Tt)-OK(zi):Pi?-1:1}return 0}}}function Bn(Ze,Pe){let Di;return UO(Ze).flags&524384&&(Di=G.createNodeArray(Yt(US(Ze),rr=>Ia(rr,Pe)))),Di}function Os(Ze,Pe,Di){var nn;z.assert(Ze&&0<=Pe&&PeQS(Jo,eo.links.mapper)),Di)}else pr=Bn(rr,Di)}return pr}function ur(Ze){return JT(Ze.objectType)?ur(Ze.objectType):Ze}function Ks(Ze,Pe,Di){let nn=Jc(Ze,307);if(!nn){const Eo=Z(Ze.declarations,Jo=>gO(Jo,Ze));Eo&&(nn=Jc(Eo,307))}if(nn&&nn.moduleName!==void 0)return nn.moduleName;if(!nn&&HDe.test(Ze.escapedName))return Ze.escapedName.substring(1,Ze.escapedName.length-1);if(!Pe.enclosingFile||!Pe.tracker.moduleResolverHost)return HDe.test(Ze.escapedName)?Ze.escapedName.substring(1,Ze.escapedName.length-1):_n(Wse(Ze)).fileName;const rr=Pe.enclosingFile,tr=Di||(rr==null?void 0:rr.impliedNodeFormat),pr=O7(rr.path,tr),Ms=Zs(Ze);let eo=Ms.specifierCache&&Ms.specifierCache.get(pr);if(!eo){const Eo=!!Y.outFile,{moduleResolverHost:Jo}=Pe.tracker,Jl=Eo?{...Y,baseUrl:Jo.getCommonSourceDirectory()}:Y;eo=ma(cKe(Ze,Mi,Jl,rr,Jo,{importModuleSpecifierPreference:Eo?"non-relative":"project-relative",importModuleSpecifierEnding:Eo?"minimal":tr===99?"js":void 0},{overrideImportMode:Di})),Ms.specifierCache??(Ms.specifierCache=new Map),Ms.specifierCache.set(pr,eo)}return eo}function Ll(Ze){const Pe=G.createIdentifier(Ws(Ze.escapedName));return Ze.parent?G.createQualifiedName(Ll(Ze.parent),Pe):Pe}function kl(Ze,Pe,Di,nn){const rr=Iu(Ze,Pe,Di,!(Pe.flags&16384)),tr=Di===111551;if(Rt(rr[0].declarations,gC)){const eo=rr.length>1?Ms(rr,rr.length-1,1):void 0,Eo=nn||Os(rr,0,Pe),Jo=_n(uu(Pe.enclosingDeclaration)),Jl=Z$(rr[0]);let dt,It;if((f_(Y)===3||f_(Y)===99)&&(Jl==null?void 0:Jl.impliedNodeFormat)===99&&Jl.impliedNodeFormat!==(Jo==null?void 0:Jo.impliedNodeFormat)&&(dt=Ks(rr[0],Pe,99),It=G.createImportAttributes(G.createNodeArray([G.createImportAttribute(G.createStringLiteral("resolution-mode"),G.createStringLiteral("import"))]))),dt||(dt=Ks(rr[0],Pe)),!(Pe.flags&67108864)&&f_(Y)!==1&&dt.includes("/node_modules/")){const Tt=dt;if(f_(Y)===3||f_(Y)===99){const zi=(Jo==null?void 0:Jo.impliedNodeFormat)===99?1:99;dt=Ks(rr[0],Pe,zi),dt.includes("/node_modules/")?dt=Tt:It=G.createImportAttributes(G.createNodeArray([G.createImportAttribute(G.createStringLiteral("resolution-mode"),G.createStringLiteral(zi===99?"import":"require"))]))}It||(Pe.encounteredError=!0,Pe.tracker.reportLikelyUnsafeImportRequiredError&&Pe.tracker.reportLikelyUnsafeImportRequiredError(Tt))}const oi=G.createLiteralTypeNode(G.createStringLiteral(dt));if(Pe.approximateLength+=dt.length+10,!eo||A_(eo)){if(eo){const Tt=lt(eo)?eo:eo.right;pS(Tt,void 0)}return G.createImportTypeNode(oi,It,eo,Eo,tr)}else{const Tt=ur(eo),zi=Tt.objectType.typeName;return G.createIndexedAccessTypeNode(G.createImportTypeNode(oi,It,zi,Eo,tr),Tt.indexType)}}const pr=Ms(rr,rr.length-1,0);if(JT(pr))return pr;if(tr)return G.createTypeQueryNode(pr);{const eo=lt(pr)?pr:pr.right,Eo=fI(eo);return pS(eo,void 0),G.createTypeReferenceNode(pr,Eo)}function Ms(eo,Eo,Jo){const Jl=Eo===eo.length-1?nn:Os(eo,Eo,Pe),dt=eo[Eo],It=eo[Eo-1];let oi;if(Eo===0)Pe.flags|=16777216,oi=DD(dt,Pe),Pe.approximateLength+=(oi?oi.length:0)+1,Pe.flags^=16777216;else if(It&&Yp(It)){const zi=Yp(It);hf(zi,(Pi,Xt)=>{if(w0(Pi,dt)&&!Sj(Xt)&&Xt!=="export=")return oi=Ws(Xt),!0})}if(oi===void 0){const zi=Z(dt.declarations,ko);if(zi&&Ja(zi)&&A_(zi.expression)){const Pi=Ms(eo,Eo-1,Jo);return A_(Pi)?G.createIndexedAccessTypeNode(G.createParenthesizedType(G.createTypeQueryNode(Pi)),G.createTypeQueryNode(zi.expression)):Pi}oi=DD(dt,Pe)}if(Pe.approximateLength+=oi.length+1,!(Pe.flags&16)&&It&&Dx(It)&&Dx(It).get(dt.escapedName)&&w0(Dx(It).get(dt.escapedName),dt)){const zi=Ms(eo,Eo-1,Jo);return JT(zi)?G.createIndexedAccessTypeNode(zi,G.createLiteralTypeNode(G.createStringLiteral(oi))):G.createIndexedAccessTypeNode(G.createTypeReferenceNode(zi,Jl),G.createLiteralTypeNode(G.createStringLiteral(oi)))}const Tt=ir(G.createIdentifier(oi),16777216);if(Jl&&pS(Tt,G.createNodeArray(Jl)),Tt.symbol=dt,Eo>Jo){const zi=Ms(eo,Eo-1,Jo);return A_(zi)?G.createQualifiedName(zi,Tt):z.fail("Impossible construct - an export of an indexed access cannot be reachable")}return Tt}}function oh(Ze,Pe,Di){const nn=Ui(Pe.enclosingDeclaration,Ze,788968,void 0,!1);return nn&&nn.flags&262144?nn!==Di.symbol:!1}function Ca(Ze,Pe){var Di,nn,rr,tr;if(Pe.flags&4&&Pe.typeParameterNames){const eo=Pe.typeParameterNames.get(kf(Ze));if(eo)return eo}let pr=Eh(Ze.symbol,Pe,788968,!0);if(!(pr.kind&80))return G.createIdentifier("(Missing type parameter)");const Ms=(nn=(Di=Ze.symbol)==null?void 0:Di.declarations)==null?void 0:nn[0];if(Ms&&Uc(Ms)&&(pr=_(Pe,pr,Ms.name)),Pe.flags&4){const eo=pr.escapedText;let Eo=((rr=Pe.typeParameterNamesByTextNextNameCount)==null?void 0:rr.get(eo))||0,Jo=eo;for(;(tr=Pe.typeParameterNamesByText)!=null&&tr.has(Jo)||oh(Jo,Pe,Ze);)Eo++,Jo=`${eo}_${Eo}`;if(Jo!==eo){const Jl=fI(pr);pr=G.createIdentifier(Jo),pS(pr,Jl)}Pe.mustCreateTypeParametersNamesLookups&&(Pe.mustCreateTypeParametersNamesLookups=!1,Pe.typeParameterNames=new Map(Pe.typeParameterNames),Pe.typeParameterNamesByTextNextNameCount=new Map(Pe.typeParameterNamesByTextNextNameCount),Pe.typeParameterNamesByText=new Set(Pe.typeParameterNamesByText)),Pe.typeParameterNamesByTextNextNameCount.set(eo,Eo),Pe.typeParameterNames.set(kf(Ze),pr),Pe.typeParameterNamesByText.add(Jo)}return pr}function Eh(Ze,Pe,Di,nn){const rr=Iu(Ze,Pe,Di);return nn&&rr.length!==1&&!Pe.encounteredError&&!(Pe.flags&65536)&&(Pe.encounteredError=!0),tr(rr,rr.length-1);function tr(pr,Ms){const eo=Os(pr,Ms,Pe),Eo=pr[Ms];Ms===0&&(Pe.flags|=16777216);const Jo=DD(Eo,Pe);Ms===0&&(Pe.flags^=16777216);const Jl=ir(G.createIdentifier(Jo),16777216);return eo&&pS(Jl,G.createNodeArray(eo)),Jl.symbol=Eo,Ms>0?G.createQualifiedName(tr(pr,Ms-1),Jl):Jl}}function nu(Ze,Pe,Di){const nn=Iu(Ze,Pe,Di);return rr(nn,nn.length-1);function rr(tr,pr){const Ms=Os(tr,pr,Pe),eo=tr[pr];pr===0&&(Pe.flags|=16777216);let Eo=DD(eo,Pe);pr===0&&(Pe.flags^=16777216);let Jo=Eo.charCodeAt(0);if(_W(Jo)&&Rt(eo.declarations,gC))return G.createStringLiteral(Ks(eo,Pe));if(pr===0||dae(Eo,ue)){const Jl=ir(G.createIdentifier(Eo),16777216);return Ms&&pS(Jl,G.createNodeArray(Ms)),Jl.symbol=eo,pr>0?G.createPropertyAccessExpression(rr(tr,pr-1),Jl):Jl}else{Jo===91&&(Eo=Eo.substring(1,Eo.length-1),Jo=Eo.charCodeAt(0));let Jl;if(_W(Jo)&&!(eo.flags&8)?Jl=G.createStringLiteral(Nm(Eo).replace(/\\./g,dt=>dt.substring(1)),Jo===39):""+ +Eo===Eo&&(Jl=G.createNumericLiteral(+Eo)),!Jl){const dt=ir(G.createIdentifier(Eo),16777216);Ms&&pS(dt,G.createNodeArray(Ms)),dt.symbol=eo,Jl=dt}return G.createElementAccessExpression(rr(tr,pr-1),Jl)}}}function ru(Ze){const Pe=ko(Ze);return Pe?Ja(Pe)?!!(fo(Pe.expression).flags&402653316):wc(Pe)?!!(fo(Pe.argumentExpression).flags&402653316):ja(Pe):!1}function Rg(Ze){const Pe=ko(Ze);return!!(Pe&&ja(Pe)&&(Pe.singleQuote||!oc(Pe)&&ro(yu(Pe,!1),"'")))}function Bu(Ze,Pe){const Di=!!O(Ze.declarations)&&Be(Ze.declarations,ru),nn=!!O(Ze.declarations)&&Be(Ze.declarations,Rg),rr=!!(Ze.flags&8192),tr=dd(Ze,Pe,nn,Di,rr);if(tr)return tr;const pr=Ws(Ze.escapedName);return CG(pr,il(Y),nn,Di,rr)}function dd(Ze,Pe,Di,nn,rr){const tr=Zs(Ze).nameType;if(tr){if(tr.flags&384){const pr=""+tr.value;return!wp(pr,il(Y))&&(nn||!Yy(pr))?G.createStringLiteral(pr,!!Di):Yy(pr)&&ro(pr,"-")?G.createComputedPropertyName(G.createPrefixUnaryExpression(41,G.createNumericLiteral(-pr))):CG(pr,il(Y),Di,nn,rr)}if(tr.flags&8192)return G.createComputedPropertyName(nu(tr.symbol,Pe,111551))}}function NC(Ze){const Pe=Ze.mustCreateTypeParameterSymbolList,Di=Ze.mustCreateTypeParametersNamesLookups;Ze.mustCreateTypeParameterSymbolList=!0,Ze.mustCreateTypeParametersNamesLookups=!0;const nn=Ze.typeParameterNames,rr=Ze.typeParameterNamesByText,tr=Ze.typeParameterNamesByTextNextNameCount,pr=Ze.typeParameterSymbolList;return()=>{Ze.typeParameterNames=nn,Ze.typeParameterNamesByText=rr,Ze.typeParameterNamesByTextNextNameCount=tr,Ze.typeParameterSymbolList=pr,Ze.mustCreateTypeParameterSymbolList=Pe,Ze.mustCreateTypeParametersNamesLookups=Di}}function $O(Ze,Pe){return Ze.declarations&&Me(Ze.declarations,Di=>!!oge(Di)&&(!Pe||!!Xi(Di,nn=>nn===Pe)))}function u5(Ze,Pe){if(!(Rr(Pe)&4)||!_g(Ze))return!0;NZ(Ze);const Di=Tr(Ze).resolvedSymbol,nn=Di&&vc(Di);return!nn||nn!==Pe.target?!0:O(Ze.typeArguments)>=a1(Pe.target.typeParameters)}function fz(Ze){for(;Tr(Ze).fakeScopeForSignatureDeclaration;)Ze=Ze.parent;return Ze}function ah(Ze,Pe,Di,nn){var rr,tr;const pr=Pe&&(Gs(Pe)||em(Pe))&&sge(Pe),Ms=Ze.enclosingDeclaration,eo=Ze.flags;if(Pe&&Gke(Pe)&&!(Ze.flags&-2147483648)&&He.serializeTypeOfDeclaration(Pe,Ze),Ze.flags|=-2147483648,Ms&&(!_l(Di)||Ze.flags&1)){const dt=Pe&&oge(Pe)?Pe:$O(nn);if(dt&&!rc(dt)&&!hg(dt)){const It=oge(dt),oi=pr||!!(nn.flags&4&&nn.flags&16777216&&t3(dt)&&((rr=nn.links)!=null&&rr.mappedType)&&udt(Di)),Tt=!kP(It)&&D(Ze,It,Di,dt,oi);if(Tt)return Ze.flags=eo,Tt}}Di.flags&8192&&Di.symbol===nn&&(!Ze.enclosingDeclaration||Rt(nn.declarations,dt=>_n(dt)===_n(Ze.enclosingDeclaration)))&&(Ze.flags|=1048576);const Eo=Pe??nn.valueDeclaration??((tr=nn.declarations)==null?void 0:tr[0]),Jo=Eo&&aYt(Eo)?Spt(Eo):void 0,Jl=v(Ze,Jo,Di,pr);return Ze.flags=eo,Jl}function jY(Ze,Pe,Di){return Di===Pe?!0:Ze&&(Gs(Ze)||V_(Ze)||To(Ze))&&Ze.questionToken?Gm(Pe,524288)===Di:!1}function li(Ze,Pe){const Di=Ze.flags&256,nn=Ze.flags;Di&&(Ze.flags&=-257);let rr;const tr=Ol(Pe);return tr&&!(Di&&Al(tr))?(Pe.declaration&&!(Ze.flags&-2147483648)&&He.serializeReturnTypeForSignature(Pe.declaration,Ze),Ze.flags|=-2147483648,rr=Zi(Ze,Pe)):Di||(rr=G.createKeywordTypeNode(133)),Ze.flags=nn,rr}function Zi(Ze,Pe){const Di=dm(Pe),nn=Ol(Pe);if(Ze.enclosingDeclaration&&(!_l(nn)||Ze.flags&1)&&Pe.declaration&&!oc(Pe.declaration)){const tr=mYt(Pe.declaration);if(tr){const pr=D(Ze,tr,nn,Ze.enclosingDeclaration);if(pr)return pr}}if(Di)return ta(Di,Ze);const rr=Pe.declaration&&Spt(Pe.declaration);return v(Ze,rr,nn)}function yn(Ze,Pe){let Di=!1;const nn=Ip(Ze);if(Xn(Ze)&&(sI(nn)||Jy(nn.parent)||__(nn.parent)&&eoe(nn.parent.left)&&sI(nn.parent.right)))return Di=!0,{introducesError:Di,node:Ze};const rr=jS(Ze);let tr;if(Uw(nn))return tr=wr(u_(nn,!1,!1)),rv(tr,nn,rr,!1).accessibility!==0&&(Di=!0,Pe.tracker.reportInaccessibleThisError()),{introducesError:Di,node:pr(Ze)};if(tr=Du(nn,rr,!0,!0),Pe.enclosingDeclaration&&!(tr&&tr.flags&262144)){tr=eg(tr);const Ms=Du(nn,rr,!0,!0,Pe.enclosingDeclaration);if(Ms===Ot||Ms===void 0&&tr!==void 0||Ms&&tr&&!w0(eg(Ms),tr))return Ms!==Ot&&Pe.tracker.reportInferenceFallback(Ze),Di=!0,{introducesError:Di,node:Ze,sym:tr}}if(tr)return tr.flags&1&&tr.valueDeclaration&&(Fk(tr.valueDeclaration)||em(tr.valueDeclaration))?{introducesError:Di,node:pr(Ze)}:(!(tr.flags&262144)&&!F1(Ze)&&rv(tr,Pe.enclosingDeclaration,rr,!1).accessibility!==0?(Pe.tracker.reportInferenceFallback(Ze),Di=!0):Pe.tracker.trackSymbol(tr,Pe.enclosingDeclaration,rr),{introducesError:Di,node:pr(Ze)});return{introducesError:Di,node:Ze};function pr(Ms){if(Ms===nn){const Eo=vc(tr),Jo=tr.flags&262144?Ca(Eo,Pe):G.cloneNode(Ms);return Jo.symbol=tr,_(Pe,ir(Jo,16777216),Ms)}const eo=cn(Ms,Eo=>pr(Eo),void 0);return eo!==Ms&&_(Pe,eo,Ms),eo}}function jn(Ze,Pe,Di,nn){const rr=Di?111551:788968,tr=Du(Pe,rr,!0);if(!tr)return;const pr=tr.flags&2097152?sf(tr):tr;if(rv(tr,Ze.enclosingDeclaration,rr,!1).accessibility===0)return kl(pr,Ze,rr,nn)}function xr(Ze,Pe){if(Xn(Pe)&&rS(Pe)){$ut(Pe);const Di=Tr(Pe).resolvedSymbol;return!Di||!(!Pe.isTypeOf&&!(Di.flags&788968)||!(O(Pe.typeArguments)>=a1(US(Di))))}if(s3(Pe))return Ze.mapper===void 0?!0:!!o(Ze,Pe,!0);if(_g(Pe)){if(V0(Pe))return!1;const Di=NZ(Pe),nn=Tr(Pe).resolvedSymbol;if(!nn)return!1;if(nn.flags&262144){const rr=vc(nn);if(Ze.mapper&&QS(rr,Ze.mapper)!==rr)return!1}if(dW(Pe))return u5(Pe,Di)&&!out(Pe)&&nn.flags&788968}if(Hk(Pe)&&Pe.operator===158&&Pe.type.kind===155){const Di=Ze.enclosingDeclaration&&fz(Ze.enclosingDeclaration);return!!Xi(Pe,nn=>nn===Di)}return!0}function os(Ze,Pe){const Di=o(Ze,Pe);return ae(Di,Ze)}function Oa(Ze,Pe){u&&u.throwIfCancellationRequested&&u.throwIfCancellationRequested();let Di=!1;const{finalizeBoundary:nn,startRecoveryScope:rr}=Ms(),tr=Ct(Pe,pr,gs);if(!nn())return;return Ze.approximateLength+=Pe.end-Pe.pos,tr;function pr(Tt){if(Di)return Tt;const zi=rr(),Pi=Cr(Tt)?eo(Tt):void 0,Xt=oi(Tt);return Pi==null||Pi(),Di?gs(Tt)&&!kP(Tt)?(zi(),os(Ze,Tt)):Tt:Xt?_(Ze,Xt,Tt):void 0}function Ms(){let Tt,zi;const Pi=Ze.tracker,Xt=Ze.trackedSymbols;Ze.trackedSymbols=void 0;const Vi=Ze.encounteredError;return Ze.tracker=new UDe(Ze,{...Pi.inner,reportCyclicStructureError(){En(()=>Pi.reportCyclicStructureError())},reportInaccessibleThisError(){En(()=>Pi.reportInaccessibleThisError())},reportInaccessibleUniqueSymbolError(){En(()=>Pi.reportInaccessibleUniqueSymbolError())},reportLikelyUnsafeImportRequiredError(Pr){En(()=>Pi.reportLikelyUnsafeImportRequiredError(Pr))},reportNonSerializableProperty(Pr){En(()=>Pi.reportNonSerializableProperty(Pr))},trackSymbol(Pr,Wn,Qr){return(Tt??(Tt=[])).push([Pr,Wn,Qr]),!1},moduleResolverHost:Ze.tracker.moduleResolverHost},Ze.tracker.moduleResolverHost),{startRecoveryScope:Bi,finalizeBoundary:qn};function En(Pr){Di=!0,(zi??(zi=[])).push(Pr)}function Bi(){const Pr=(Tt==null?void 0:Tt.length)??0,Wn=(zi==null?void 0:zi.length)??0;return()=>{Di=!1,Tt&&(Tt.length=Pr),zi&&(zi.length=Wn)}}function qn(){return Ze.tracker=Pi,Ze.trackedSymbols=Xt,Ze.encounteredError=Vi,zi==null||zi.forEach(Pr=>Pr()),Di?!1:(Tt==null||Tt.forEach(([Pr,Wn,Qr])=>Ze.tracker.trackSymbol(Pr,Wn,Qr)),!0)}}function eo(Tt){return In(Ze,Tt,vn(Tt),en(Tt))}function Eo(Tt){const zi=T8(Tt);switch(zi.kind){case 183:return It(zi);case 186:return dt(zi);case 199:return Jo(zi);case 198:const Pi=zi;if(Pi.operator===143)return Jl(Pi)}return Ct(Tt,pr,gs)}function Jo(Tt){const zi=Eo(Tt.objectType);if(zi!==void 0)return G.updateIndexedAccessTypeNode(Tt,zi,Ct(Tt.indexType,pr,gs))}function Jl(Tt){z.assertEqual(Tt.operator,143);const zi=Eo(Tt.type);if(zi!==void 0)return G.updateTypeOperatorNode(Tt,zi)}function dt(Tt){const{introducesError:zi,node:Pi}=yn(Tt.exprName,Ze);if(!zi)return G.updateTypeQueryNode(Tt,Pi,wn(Tt.typeArguments,pr,gs));const Xt=jn(Ze,Tt.exprName,!0);if(Xt)return _(Ze,Xt,Tt.exprName)}function It(Tt){if(xr(Ze,Tt)){const{introducesError:zi,node:Pi}=yn(Tt.typeName,Ze),Xt=wn(Tt.typeArguments,pr,gs);if(zi){const Vi=jn(Ze,Tt.typeName,!1,Xt);if(Vi)return _(Ze,Vi,Tt.typeName)}else{const Vi=G.updateTypeReferenceNode(Tt,Pi,Xt);return _(Ze,Vi,Tt)}}}function oi(Tt){if(qk(Tt))return Ct(Tt.type,pr,gs);if(oTe(Tt)||Tt.kind===319)return G.createKeywordTypeNode(133);if(aTe(Tt))return G.createKeywordTypeNode(159);if(l3(Tt))return G.createUnionTypeNode([Ct(Tt.type,pr,gs),G.createLiteralTypeNode(G.createNull())]);if(Fae(Tt))return G.createUnionTypeNode([Ct(Tt.type,pr,gs),G.createKeywordTypeNode(157)]);if($G(Tt))return Ct(Tt.type,pr);if(JG(Tt))return G.createArrayTypeNode(Ct(Tt.type,pr,gs));if(bI(Tt))return G.createTypeLiteralNode(Yt(Tt.jsDocPropertyTags,Bi=>{const qn=Ct(lt(Bi.name)?Bi.name:Bi.name.right,pr,lt),Pr=Eu(o(Ze,Tt),qn.escapedText),Wn=Pr&&Bi.typeExpression&&o(Ze,Bi.typeExpression.type)!==Pr?ae(Pr,Ze):void 0;return G.createPropertySignature(void 0,qn,Bi.isBracketed||Bi.typeExpression&&Fae(Bi.typeExpression.type)?G.createToken(58):void 0,Wn||Bi.typeExpression&&Ct(Bi.typeExpression.type,pr,gs)||G.createKeywordTypeNode(133))}));if(_g(Tt)&<(Tt.typeName)&&Tt.typeName.escapedText==="")return Er(G.createKeywordTypeNode(133),Tt);if((Gb(Tt)||_g(Tt))&&CJ(Tt))return G.createTypeLiteralNode([G.createIndexSignature(void 0,[G.createParameterDeclaration(void 0,void 0,"x",void 0,Ct(Tt.typeArguments[0],pr,gs))],Ct(Tt.typeArguments[1],pr,gs))]);if(c3(Tt))if(B6(Tt)){let Bi;return G.createConstructorTypeNode(void 0,wn(Tt.typeParameters,pr,Uc),ns(Tt.parameters,(qn,Pr)=>qn.name&<(qn.name)&&qn.name.escapedText==="new"?(Bi=qn.type,void 0):G.createParameterDeclaration(void 0,Xt(qn),_(Ze,G.createIdentifier(Vi(qn,Pr)),qn),G.cloneNode(qn.questionToken),Ct(qn.type,pr,gs),void 0)),Ct(Bi||Tt.type,pr,gs)||G.createKeywordTypeNode(133))}else return G.createFunctionTypeNode(wn(Tt.typeParameters,pr,Uc),Yt(Tt.parameters,(Bi,qn)=>G.createParameterDeclaration(void 0,Xt(Bi),_(Ze,G.createIdentifier(Vi(Bi,qn)),Bi),G.cloneNode(Bi.questionToken),Ct(Bi.type,pr,gs),void 0)),Ct(Tt.type,pr,gs)||G.createKeywordTypeNode(133));if(s3(Tt))return xr(Ze,Tt)||(Di=!0),Tt;if(Uc(Tt))return G.updateTypeParameterDeclaration(Tt,wn(Tt.modifiers,pr,Ra),_(Ze,Ca(vc(wr(Tt)),Ze),Tt),Ct(Tt.constraint,pr,gs),Ct(Tt.default,pr,gs));if(JT(Tt)){const Bi=Jo(Tt);return Bi||(Di=!0,Tt)}if(_g(Tt)){const Bi=It(Tt);return Bi||(Di=!0,Tt)}if(rS(Tt)){const Bi=Tr(Tt).resolvedSymbol;return dW(Tt)&&Bi&&(!Tt.isTypeOf&&!(Bi.flags&788968)||!(O(Tt.typeArguments)>=a1(US(Bi))))?_(Ze,ae(o(Ze,Tt),Ze),Tt):G.updateImportTypeNode(Tt,G.updateLiteralTypeNode(Tt.argument,En(Tt,Tt.argument.literal)),Ct(Tt.attributes,pr,mI),Ct(Tt.qualifier,pr,A_),wn(Tt.typeArguments,pr,gs),Tt.isTypeOf)}if(Af(Tt)&&Tt.name.kind===167&&!__e(Tt.name)){if(!Hb(Tt))return zi(Tt,pr);if(!(Ze.flags&1&&pc(Tt.name.expression)&&u1(Tt.name).flags&1))return}if(Bo(Tt)&&!Tt.type||To(Tt)&&!Tt.type&&!Tt.initializer||V_(Tt)&&!Tt.type&&!Tt.initializer||Gs(Tt)&&!Tt.type&&!Tt.initializer){let Bi=zi(Tt,pr);return Bi===Tt&&(Bi=_(Ze,G.cloneNode(Tt),Tt)),Bi.type=G.createKeywordTypeNode(133),Gs(Tt)&&(Bi.modifiers=void 0),Bi}if(qT(Tt)){const Bi=dt(Tt);return Bi||(Di=!0,Tt)}if(Ja(Tt)&&pc(Tt.expression)){const{node:Bi,introducesError:qn}=yn(Tt.expression,Ze);if(qn){const Pr=up(s8e(Tt.expression)),Wn=ae(Pr,Ze);let Qr;if(gS(Wn))Qr=Wn.literal;else{const Vr=tpt(Tt.expression),aa=typeof Vr.value=="string"?G.createStringLiteral(Vr.value,void 0):typeof Vr.value=="number"?G.createNumericLiteral(Vr.value,0):void 0;if(!aa)return V1(Wn)&&Uf(Tt.expression,Ze.enclosingDeclaration,Ze),Tt;Qr=aa}return Qr.kind===11&&wp(Qr.text,il(Y))?G.createIdentifier(Qr.text):Qr.kind===9&&!Qr.text.startsWith("-")?Qr:G.updateComputedPropertyName(Tt,Qr)}else return G.updateComputedPropertyName(Tt,Bi)}if(kP(Tt)){let Bi;if(lt(Tt.parameterName)){const{node:qn,introducesError:Pr}=yn(Tt.parameterName,Ze);Di=Di||Pr,Bi=qn}else Bi=G.cloneNode(Tt.parameterName);return G.updateTypePredicateNode(Tt,G.cloneNode(Tt.assertsModifier),Bi,Ct(Tt.type,pr,gs))}if(TP(Tt)||p_(Tt)||pI(Tt)){const Bi=zi(Tt,pr),qn=_(Ze,Bi===Tt?G.cloneNode(Tt):Bi,Tt),Pr=Ya(qn);return ir(qn,Pr|(Ze.flags&1024&&p_(Tt)?0:1)),qn}if(ja(Tt)&&Ze.flags&268435456&&!Tt.singleQuote){const Bi=G.cloneNode(Tt);return Bi.singleQuote=!0,Bi}if($T(Tt)){const Bi=Ct(Tt.checkType,pr,gs),qn=eo(Tt),Pr=Ct(Tt.extendsType,pr,gs),Wn=Ct(Tt.trueType,pr,gs);qn();const Qr=Ct(Tt.falseType,pr,gs);return G.updateConditionalTypeNode(Tt,Bi,Pr,Wn,Qr)}if(Hk(Tt)){if(Tt.operator===158&&Tt.type.kind===155){if(!xr(Ze,Tt))return Di=!0,Tt}else if(Tt.operator===143){const Bi=Jl(Tt);return Bi||(Di=!0,Tt)}}return zi(Tt,pr);function zi(Bi,qn){const Pr=!Ze.enclosingFile||Ze.enclosingFile!==_n(Bi);return cn(Bi,qn,void 0,Pr?Pi:void 0)}function Pi(Bi,qn,Pr,Wn,Qr){let Vr=wn(Bi,qn,Pr,Wn,Qr);return Vr&&(Vr.pos!==-1||Vr.end!==-1)&&(Vr===Bi&&(Vr=G.createNodeArray(Bi.slice(),Bi.hasTrailingComma)),Bv(Vr,-1,-1)),Vr}function Xt(Bi){return Bi.dotDotDotToken||(Bi.type&&JG(Bi.type)?G.createToken(26):void 0)}function Vi(Bi,qn){return Bi.name&<(Bi.name)&&Bi.name.escapedText==="this"?"this":Xt(Bi)?"args":`arg${qn}`}function En(Bi,qn){if(Ze.bundled||Ze.enclosingFile!==_n(qn)){let Pr=qn.text;const Wn=Tr(Tt).resolvedSymbol,Qr=Bi.isTypeOf?111551:788968,Vr=Wn&&rv(Wn,Ze.enclosingDeclaration,Qr,!1).accessibility===0&&Iu(Wn,Ze,Qr,!0)[0];if(Vr&&T6(Vr))Pr=Ks(Vr,Ze);else{const aa=d8e(Bi);aa&&(Pr=Ks(aa.symbol,Ze))}if(Pr.includes("/node_modules/")&&(Ze.encounteredError=!0,Ze.tracker.reportLikelyUnsafeImportRequiredError&&Ze.tracker.reportLikelyUnsafeImportRequiredError(Pr)),Pr!==qn.text)return Er(G.createStringLiteral(Pr),qn)}return Ct(qn,pr,ja)}}}function Ha(Ze,Pe){var Di;const nn=Wpt(G.createPropertyDeclaration,174,!0),rr=Wpt((ri,Br,_s,us)=>G.createPropertySignature(ri,Br,_s,us),173,!1),tr=Pe.enclosingDeclaration;let pr=[];const Ms=new Set,eo=[],Eo=Pe;Pe={...Eo,usedSymbolNames:new Set(Eo.usedSymbolNames),remappedSymbolNames:new Map,remappedSymbolReferences:new Map((Di=Eo.remappedSymbolReferences)==null?void 0:Di.entries()),tracker:void 0};const Jo={...Eo.tracker.inner,trackSymbol:(ri,Br,_s)=>{var us,Gr;if((us=Pe.remappedSymbolNames)!=null&&us.has(Aa(ri)))return!1;if(rv(ri,Br,_s,!1).accessibility===0){const _a=pn(ri,Pe,_s);if(!(ri.flags&4)){const Go=_a[0],Tc=_n(Eo.enclosingDeclaration);Rt(Go.declarations,yl=>_n(yl)===Tc)&&Wn(Go)}}else if((Gr=Eo.tracker.inner)!=null&&Gr.trackSymbol)return Eo.tracker.inner.trackSymbol(ri,Br,_s);return!1}};Pe.tracker=new UDe(Pe,Jo,Eo.tracker.moduleResolverHost),hf(Ze,(ri,Br)=>{const _s=Ws(Br);cy(ri,_s)});let Jl=!Pe.bundled;const dt=Ze.get("export=");return dt&&Ze.size>1&&dt.flags&2098688&&(Ze=ga(),Ze.set("export=",dt)),Bi(Ze),Xt(pr);function It(ri){return!!ri&&ri.kind===80}function oi(ri){return Ou(ri)?Ri(Yt(ri.declarationList.declarations,ko),It):Ri([ko(ri)],It)}function Tt(ri){const Br=Me(ri,Ec),_s=Nt(ri,qu);let us=_s!==-1?ri[_s]:void 0;if(us&&Br&&Br.isExportEquals&<(Br.expression)&<(us.name)&&dr(us.name)===dr(Br.expression)&&us.body&&jv(us.body)){const Gr=Ri(ri,Go=>!!(Wh(Go)&32)),Fl=us.name;let _a=us.body;if(O(Gr)&&(us=G.updateModuleDeclaration(us,us.modifiers,us.name,_a=G.updateModuleBlock(_a,G.createNodeArray([...us.body.statements,G.createExportDeclaration(void 0,!1,G.createNamedExports(Yt(Ln(Gr,Go=>oi(Go)),Go=>G.createExportSpecifier(!1,void 0,Go))),void 0)]))),ri=[...ri.slice(0,_s),us,...ri.slice(_s+1)]),!Me(ri,Go=>Go!==us&&PB(Go,Fl))){pr=[];const Go=!Rt(_a.statements,Tc=>Kr(Tc,32)||Ec(Tc)||$u(Tc));W(_a.statements,Tc=>{Vr(Tc,Go?32:0)}),ri=[...Ri(ri,Tc=>Tc!==us&&Tc!==Br),...pr]}}return ri}function zi(ri){const Br=Ri(ri,us=>$u(us)&&!us.moduleSpecifier&&!!us.exportClause&&Yg(us.exportClause));O(Br)>1&&(ri=[...Ri(ri,Gr=>!$u(Gr)||!!Gr.moduleSpecifier||!Gr.exportClause),G.createExportDeclaration(void 0,!1,G.createNamedExports(Ln(Br,Gr=>ua(Gr.exportClause,Yg).elements)),void 0)]);const _s=Ri(ri,us=>$u(us)&&!!us.moduleSpecifier&&!!us.exportClause&&Yg(us.exportClause));if(O(_s)>1){const us=xv(_s,Gr=>ja(Gr.moduleSpecifier)?">"+Gr.moduleSpecifier.text:">");if(us.length!==_s.length)for(const Gr of us)Gr.length>1&&(ri=[...Ri(ri,Fl=>!Gr.includes(Fl)),G.createExportDeclaration(void 0,!1,G.createNamedExports(Ln(Gr,Fl=>ua(Fl.exportClause,Yg).elements)),Gr[0].moduleSpecifier)])}return ri}function Pi(ri){const Br=Nt(ri,_s=>$u(_s)&&!_s.moduleSpecifier&&!_s.attributes&&!!_s.exportClause&&Yg(_s.exportClause));if(Br>=0){const _s=ri[Br],us=ns(_s.exportClause.elements,Gr=>{if(!Gr.propertyName){const Fl=mr(ri),_a=Ri(Fl,Go=>PB(ri[Go],Gr.name));if(O(_a)&&Be(_a,Go=>ZW(ri[Go]))){for(const Go of _a)ri[Go]=Vi(ri[Go]);return}}return Gr});O(us)?ri[Br]=G.updateExportDeclaration(_s,_s.modifiers,_s.isTypeOnly,G.updateNamedExports(_s.exportClause,us),_s.moduleSpecifier,_s.attributes):Mw(ri,Br)}return ri}function Xt(ri){return ri=Tt(ri),ri=zi(ri),ri=Pi(ri),tr&&(Ns(tr)&&ep(tr)||qu(tr))&&(!Rt(ri,UB)||!pwe(ri)&&Rt(ri,V$))&&ri.push(gV(G)),ri}function Vi(ri){const Br=(Wh(ri)|32)&-129;return G.replaceModifiers(ri,Br)}function En(ri){const Br=Wh(ri)&-33;return G.replaceModifiers(ri,Br)}function Bi(ri,Br,_s){Br||eo.push(new Map),ri.forEach(us=>{qn(us,!1,!!_s)}),Br||(eo[eo.length-1].forEach(us=>{qn(us,!0,!!_s)}),eo.pop())}function qn(ri,Br,_s){Nl(Qn(ri));const us=al(ri);if(Ms.has(Aa(us)))return;if(Ms.add(Aa(us)),!Br||O(ri.declarations)&&Rt(ri.declarations,Fl=>!!Xi(Fl,_a=>_a===tr))){const Fl=NC(Pe);Pr(ri,Br,_s),Fl()}}function Pr(ri,Br,_s,us=ri.escapedName){var Gr,Fl,_a,Go,Tc,yl;const el=Ws(us),qf=us==="default";if(Br&&!(Pe.flags&131072)&&YL(el)&&!qf){Pe.encounteredError=!0;return}let $f=qf&&!!(ri.flags&-113||ri.flags&16&&O(Nl(Qn(ri))))&&!(ri.flags&2097152),Yh=!$f&&!Br&&YL(el)&&!qf;($f||Yh)&&(Br=!0);const Hu=(Br?0:32)|(qf&&!$f?2048:0),Jf=ri.flags&1536&&ri.flags&7&&us!=="export=",K_=Jf&&_z(Qn(ri),ri);if((ri.flags&8208||K_)&&G2(Qn(ri),ri,cy(ri,el),Hu),ri.flags&524288&&aa(ri,el,Hu),ri.flags&98311&&us!=="export="&&!(ri.flags&4194304)&&!(ri.flags&32)&&!(ri.flags&8192)&&!K_)if(_s)d5(ri)&&(Yh=!1,$f=!1);else{const Qu=Qn(ri),Q_=cy(ri,el);if(Qu.symbol&&Qu.symbol!==ri&&Qu.symbol.flags&16&&Rt(Qu.symbol.declarations,Qw)&&((Gr=Qu.symbol.members)!=null&&Gr.size||(Fl=Qu.symbol.exports)!=null&&Fl.size))Pe.remappedSymbolReferences||(Pe.remappedSymbolReferences=new Map),Pe.remappedSymbolReferences.set(Aa(Qu.symbol),ri),Pr(Qu.symbol,Br,_s,us),Pe.remappedSymbolReferences.delete(Aa(Qu.symbol));else if(!(ri.flags&16)&&_z(Qu,ri))G2(Qu,ri,Q_,Hu);else{const $A=ri.flags&2?VA(ri)?2:1:(_a=ri.parent)!=null&&_a.valueDeclaration&&Ns((Go=ri.parent)==null?void 0:Go.valueDeclaration)?2:void 0,g1=$f||!(ri.flags&4)?Q_:zY(Q_,ri);let jx=ri.declarations&&Me(ri.declarations,pz=>ds(pz));jx&&wf(jx.parent)&&jx.parent.declarations.length===1&&(jx=jx.parent.parent);const zx=(Tc=ri.declarations)==null?void 0:Tc.find(Ir);if(zx&&cr(zx.parent)&<(zx.parent.right)&&((yl=Qu.symbol)!=null&&yl.valueDeclaration)&&Ns(Qu.symbol.valueDeclaration)){const pz=Q_===zx.parent.right.escapedText?void 0:zx.parent.right;Vr(G.createExportDeclaration(void 0,!1,G.createNamedExports([G.createExportSpecifier(!1,pz,Q_)])),0),Pe.tracker.trackSymbol(Qu.symbol,Pe.enclosingDeclaration,111551)}else{const pz=_(Pe,G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(g1,void 0,ah(Pe,void 0,Qu,ri))],$A)),jx);Vr(pz,g1!==Q_?Hu&-33:Hu),g1!==Q_&&!Br&&(Vr(G.createExportDeclaration(void 0,!1,G.createNamedExports([G.createExportSpecifier(!1,g1,Q_)])),0),Yh=!1,$f=!1)}}}if(ri.flags&384&&Vx(ri,el,Hu),ri.flags&32&&(ri.flags&4&&ri.valueDeclaration&&cr(ri.valueDeclaration.parent)&&wd(ri.valueDeclaration.parent.right)?hz(ri,cy(ri,el),Hu):Hx(ri,cy(ri,el),Hu)),(ri.flags&1536&&(!Jf||x_(ri))||K_)&&Vp(ri,el,Hu),ri.flags&64&&!(ri.flags&32)&&Sa(ri,el,Hu),ri.flags&2097152&&hz(ri,cy(ri,el),Hu),ri.flags&4&&ri.escapedName==="export="&&d5(ri),ri.flags&8388608&&ri.declarations)for(const Qu of ri.declarations){const Q_=Gh(Qu,Qu.moduleSpecifier);Q_&&Vr(G.createExportDeclaration(void 0,Qu.isTypeOnly,void 0,G.createStringLiteral(Ks(Q_,Pe))),0)}$f?Vr(G.createExportAssignment(void 0,!1,G.createIdentifier(cy(ri,el))),0):Yh&&Vr(G.createExportDeclaration(void 0,!1,G.createNamedExports([G.createExportSpecifier(!1,cy(ri,el),el)])),0)}function Wn(ri){if(Rt(ri.declarations,Fk))return;z.assertIsDefined(eo[eo.length-1]),zY(Ws(ri.escapedName),ri);const Br=!!(ri.flags&2097152)&&!Rt(ri.declarations,_s=>!!Xi(_s,$u)||H1(_s)||kd(_s)&&!Kb(_s.moduleReference));eo[Br?0:eo.length-1].set(Aa(ri),ri)}function Qr(ri){return Ns(ri)&&(ep(ri)||Dm(ri))||Bh(ri)&&!Iv(ri)}function Vr(ri,Br){if(_0(ri)){let _s=0;const us=Pe.enclosingDeclaration&&(Em(Pe.enclosingDeclaration)?_n(Pe.enclosingDeclaration):Pe.enclosingDeclaration);Br&32&&us&&(Qr(us)||qu(us))&&ZW(ri)&&(_s|=32),Jl&&!(_s&32)&&(!us||!(us.flags&33554432))&&(Uk(ri)||Ou(ri)||Uu(ri)||xd(ri)||qu(ri))&&(_s|=128),Br&2048&&(xd(ri)||Ff(ri)||Uu(ri))&&(_s|=2048),_s&&(ri=G.replaceModifiers(ri,_s|Wh(ri)))}pr.push(ri)}function aa(ri,Br,_s){var us;const Gr=yC(ri),Fl=Zs(ri).typeParameters,_a=Yt(Fl,$f=>Ia($f,Pe)),Go=(us=ri.declarations)==null?void 0:us.find(Em),Tc=MB(Go?Go.comment||Go.parent.comment:void 0),yl=Pe.flags;Pe.flags|=8388608;const el=Pe.enclosingDeclaration;Pe.enclosingDeclaration=Go;const qf=Go&&Go.typeExpression&&qk(Go.typeExpression)&&L(Pe,Go.typeExpression.type,Gr,void 0)||ae(Gr,Pe);Vr(Vk(G.createTypeAliasDeclaration(void 0,cy(ri,Br),_a,qf),Tc?[{kind:3,text:`* + * `+Tc.replace(/\n/g,` + * `)+` + `,pos:-1,end:-1,hasTrailingNewLine:!0}]:[]),_s),Pe.flags=yl,Pe.enclosingDeclaration=el}function Sa(ri,Br,_s){const us=Gu(ri),Gr=US(ri),Fl=Yt(Gr,Yh=>Ia(Yh,Pe)),_a=Yr(us),Go=O(_a)?Fa(_a):void 0,Tc=Ln(Nl(us),Yh=>mei(Yh,Go)),yl=m8e(0,us,Go,179),el=m8e(1,us,Go,180),qf=Vpt(us,Go),$f=O(_a)?[G.createHeritageClause(96,ns(_a,Yh=>v8e(Yh,111551)))]:void 0;Vr(G.createInterfaceDeclaration(void 0,cy(ri,Br),Fl,$f,[...qf,...el,...yl,...Tc]),_s)}function kc(ri){let Br=Fn(Yp(ri).values());const _s=al(ri);if(_s!==ri){const us=new Set(Br);for(const Gr of Yp(_s).values())op(Ru(Gr))&111551||us.add(Gr);Br=Fn(us)}return Ri(Br,us=>hp(us)&&wp(us.escapedName,99))}function x_(ri){return Be(kc(ri),Br=>!(op(Ru(Br))&111551))}function Vp(ri,Br,_s){const us=kc(ri),Gr=hh(us,Go=>Go.parent&&Go.parent===ri?"real":"merged"),Fl=Gr.get("real")||x,_a=Gr.get("merged")||x;if(O(Fl)){const Go=cy(ri,Br);p1(Fl,Go,_s,!!(ri.flags&67108880))}if(O(_a)){const Go=_n(Pe.enclosingDeclaration),Tc=cy(ri,Br),yl=G.createModuleBlock([G.createExportDeclaration(void 0,!1,G.createNamedExports(ns(Ri(_a,el=>el.escapedName!=="export="),el=>{var qf,$f;const Yh=Ws(el.escapedName),Hu=cy(el,Yh),Jf=el.declarations&&Rp(el);if(Go&&(Jf?Go!==_n(Jf):!Rt(el.declarations,Q_=>_n(Q_)===Go))){($f=(qf=Pe.tracker)==null?void 0:qf.reportNonlocalAugmentation)==null||$f.call(qf,Go,ri,el);return}const K_=Jf&&fC(Jf,!0);Wn(K_||el);const Qu=K_?cy(K_,Ws(K_.escapedName)):Hu;return G.createExportSpecifier(!1,Yh===Qu?void 0:Qu,Yh)})))]);Vr(G.createModuleDeclaration(void 0,G.createIdentifier(Tc),yl,32),0)}}function Vx(ri,Br,_s){Vr(G.createEnumDeclaration(G.createModifiersFromModifierFlags(NRe(ri)?4096:0),cy(ri,Br),Yt(Ri(Nl(Qn(ri)),us=>!!(us.flags&8)),us=>{const Gr=us.declarations&&us.declarations[0]&&nx(us.declarations[0])?l8e(us.declarations[0]):void 0;return G.createEnumMember(Ws(us.escapedName),Gr===void 0?void 0:typeof Gr=="string"?G.createStringLiteral(Gr):G.createNumericLiteral(Gr))})),_s)}function G2(ri,Br,_s,us){const Gr=ea(ri,0);for(const Fl of Gr){const _a=An(Fl,262,Pe,{name:G.createIdentifier(_s)});Vr(_(Pe,_a,$D(Fl)),us)}if(!(Br.flags&1536&&Br.exports&&Br.exports.size)){const Fl=Ri(Nl(ri),hp);p1(Fl,_s,us,!0)}}function $D(ri){if(ri.declaration&&ri.declaration.parent){if(cr(ri.declaration.parent)&&Lu(ri.declaration.parent)===5)return ri.declaration.parent;if(ds(ri.declaration.parent)&&ri.declaration.parent.parent)return ri.declaration.parent.parent}return ri.declaration}function p1(ri,Br,_s,us){if(O(ri)){const Fl=hh(ri,Hu=>!O(Hu.declarations)||Rt(Hu.declarations,Jf=>_n(Jf)===_n(Pe.enclosingDeclaration))?"local":"remote").get("local")||x;let _a=Gk.createModuleDeclaration(void 0,G.createIdentifier(Br),G.createModuleBlock([]),32);ml(_a,tr),_a.locals=ga(ri),_a.symbol=ri[0].parent;const Go=pr;pr=[];const Tc=Jl;Jl=!1;const yl={...Pe,enclosingDeclaration:_a},el=Pe;Pe=yl,Bi(ga(Fl),us,!0),Pe=el,Jl=Tc;const qf=pr;pr=Go;const $f=Yt(qf,Hu=>Ec(Hu)&&!Hu.isExportEquals&<(Hu.expression)?G.createExportDeclaration(void 0,!1,G.createNamedExports([G.createExportSpecifier(!1,Hu.expression,G.createIdentifier("default"))])):Hu),Yh=Be($f,Hu=>Kr(Hu,32))?Yt($f,En):$f;_a=G.updateModuleDeclaration(_a,_a.modifiers,_a.name,G.createModuleBlock(Yh)),Vr(_a,_s)}}function hp(ri){return!!(ri.flags&2887656)||!(ri.flags&4194304||ri.escapedName==="prototype"||ri.valueDeclaration&&da(ri.valueDeclaration)&&ss(ri.valueDeclaration.parent))}function JO(ri){const Br=ns(ri,_s=>{const us=Pe.enclosingDeclaration;Pe.enclosingDeclaration=_s;let Gr=_s.expression;if(pc(Gr)){if(lt(Gr)&&dr(Gr)==="")return Fl(void 0);let _a;if({introducesError:_a,node:Gr}=yn(Gr,Pe),_a)return Fl(void 0)}return Fl(G.createExpressionWithTypeArguments(Gr,Yt(_s.typeArguments,_a=>L(Pe,_a,o(Pe,_a))||ae(o(Pe,_a),Pe))));function Fl(_a){return Pe.enclosingDeclaration=us,_a}});if(Br.length===ri.length)return Br}function Hx(ri,Br,_s){var us,Gr;const Fl=(us=ri.declarations)==null?void 0:us.find(ss),_a=Pe.enclosingDeclaration;Pe.enclosingDeclaration=Fl||_a;const Go=US(ri),Tc=Yt(Go,m1=>Ia(m1,Pe)),yl=Wp(Gu(ri)),el=Yr(yl),qf=Fl&&H6(Fl),$f=qf&&JO(qf)||ns(Fr(yl),yei),Yh=Qn(ri),Hu=!!((Gr=Yh.symbol)!=null&&Gr.valueDeclaration)&&ss(Yh.symbol.valueDeclaration),Jf=Hu?ln(Yh):Je,K_=[...O(el)?[G.createHeritageClause(96,Yt(el,m1=>vei(m1,Jf,Br)))]:[],...O($f)?[G.createHeritageClause(119,$f)]:[]],Qu=YXt(yl,el,Nl(yl)),Q_=Ri(Qu,m1=>{const f5=m1.valueDeclaration;return!!f5&&!(Af(f5)&&Vs(f5.name))}),g1=Rt(Qu,m1=>{const f5=m1.valueDeclaration;return!!f5&&Af(f5)&&Vs(f5.name)})?[G.createPropertyDeclaration(void 0,G.createPrivateIdentifier("#private"),void 0,void 0,void 0)]:x,jx=Ln(Q_,m1=>nn(m1,!1,el[0])),zx=Ln(Ri(Nl(Yh),m1=>!(m1.flags&4194304)&&m1.escapedName!=="prototype"&&!hp(m1)),m1=>nn(m1,!0,Jf)),bei=!Hu&&!!ri.valueDeclaration&&Xn(ri.valueDeclaration)&&!Rt(ea(Yh,1))?[G.createConstructorDeclaration(G.createModifiersFromModifierFlags(2),[],void 0)]:m8e(1,Yh,Jf,176),Cei=Vpt(yl,el[0]);Pe.enclosingDeclaration=_a,Vr(_(Pe,G.createClassDeclaration(void 0,Br,Tc,K_,[...Cei,...zx,...bei,...jx,...g1]),ri.declarations&&Ri(ri.declarations,m1=>xd(m1)||wd(m1))[0]),_s)}function JD(ri){return Z(ri,Br=>{if(m_(Br)||gh(Br))return dr(Br.propertyName||Br.name);if(cr(Br)||Ec(Br)){const _s=Ec(Br)?Br.expression:Br.right;if(Ir(_s))return dr(_s.name)}if(Zn(Br)){const _s=ko(Br);if(_s&<(_s))return dr(_s)}})}function hz(ri,Br,_s){var us,Gr,Fl,_a,Go,Tc;const yl=Rp(ri);if(!yl)return z.fail();const el=al(fC(yl,!0));if(!el)return;let qf=XB(el)&&JD(ri.declarations)||Ws(el.escapedName);qf==="export="&&ye&&(qf="default");const $f=cy(el,qf);switch(Wn(el),yl.kind){case 208:if(((Gr=(us=yl.parent)==null?void 0:us.parent)==null?void 0:Gr.kind)===260){const Jf=Ks(el.parent||el,Pe),{propertyName:K_}=yl;Vr(G.createImportDeclaration(void 0,G.createImportClause(!1,void 0,G.createNamedImports([G.createImportSpecifier(!1,K_&<(K_)?G.createIdentifier(dr(K_)):void 0,G.createIdentifier(Br))])),G.createStringLiteral(Jf),void 0),0);break}z.failBadSyntaxKind(((Fl=yl.parent)==null?void 0:Fl.parent)||yl,"Unhandled binding element grandparent kind in declaration serialization");break;case 304:((Go=(_a=yl.parent)==null?void 0:_a.parent)==null?void 0:Go.kind)===226&&CN(Ws(ri.escapedName),$f);break;case 260:if(Ir(yl.initializer)){const Jf=yl.initializer,K_=G.createUniqueName(Br),Qu=Ks(el.parent||el,Pe);Vr(G.createImportEqualsDeclaration(void 0,!1,K_,G.createExternalModuleReference(G.createStringLiteral(Qu))),0),Vr(G.createImportEqualsDeclaration(void 0,!1,G.createIdentifier(Br),G.createQualifiedName(K_,Jf.name)),_s);break}case 271:if(el.escapedName==="export="&&Rt(el.declarations,Jf=>Ns(Jf)&&Dm(Jf))){d5(ri);break}const Yh=!(el.flags&512)&&!ds(yl);Vr(G.createImportEqualsDeclaration(void 0,!1,G.createIdentifier(Br),Yh?Eh(el,Pe,-1,!1):G.createExternalModuleReference(G.createStringLiteral(Ks(el,Pe)))),Yh?_s:0);break;case 270:Vr(G.createNamespaceExportDeclaration(dr(yl.name)),0);break;case 273:{const Jf=Ks(el.parent||el,Pe),K_=Pe.bundled?G.createStringLiteral(Jf):yl.parent.moduleSpecifier,Qu=Cu(yl.parent)?yl.parent.attributes:void 0,Q_=$v(yl.parent);Vr(G.createImportDeclaration(void 0,G.createImportClause(Q_,G.createIdentifier(Br),void 0),K_,Qu),0);break}case 274:{const Jf=Ks(el.parent||el,Pe),K_=Pe.bundled?G.createStringLiteral(Jf):yl.parent.parent.moduleSpecifier,Qu=$v(yl.parent.parent);Vr(G.createImportDeclaration(void 0,G.createImportClause(Qu,void 0,G.createNamespaceImport(G.createIdentifier(Br))),K_,yl.parent.attributes),0);break}case 280:Vr(G.createExportDeclaration(void 0,!1,G.createNamespaceExport(G.createIdentifier(Br)),G.createStringLiteral(Ks(el,Pe))),0);break;case 276:{const Jf=Ks(el.parent||el,Pe),K_=Pe.bundled?G.createStringLiteral(Jf):yl.parent.parent.parent.moduleSpecifier,Qu=$v(yl.parent.parent.parent);Vr(G.createImportDeclaration(void 0,G.createImportClause(Qu,void 0,G.createNamedImports([G.createImportSpecifier(!1,Br!==qf?G.createIdentifier(qf):void 0,G.createIdentifier(Br))])),K_,yl.parent.parent.parent.attributes),0);break}case 281:const Hu=yl.parent.parent.moduleSpecifier;Hu&&((Tc=yl.propertyName)==null?void 0:Tc.escapedText)==="default"&&(qf="default"),CN(Ws(ri.escapedName),Hu?qf:$f,Hu&&Ml(Hu)?G.createStringLiteral(Hu.text):void 0);break;case 277:d5(ri);break;case 226:case 211:case 212:ri.escapedName==="default"||ri.escapedName==="export="?d5(ri):CN(Br,$f);break;default:return z.failBadSyntaxKind(yl,"Unhandled alias declaration kind in symbol serializer!")}}function CN(ri,Br,_s){Vr(G.createExportDeclaration(void 0,!1,G.createNamedExports([G.createExportSpecifier(!1,ri!==Br?Br:void 0,ri)]),_s),0)}function d5(ri){var Br;if(ri.flags&4194304)return!1;const _s=Ws(ri.escapedName),us=_s==="export=",Fl=us||_s==="default",_a=ri.declarations&&Rp(ri),Go=_a&&fC(_a,!0);if(Go&&O(Go.declarations)&&Rt(Go.declarations,Tc=>_n(Tc)===_n(tr))){const Tc=_a&&(Ec(_a)||cr(_a)?coe(_a):kxe(_a)),yl=Tc&&pc(Tc)?_Zt(Tc):void 0,el=yl&&Du(yl,-1,!0,!0,tr);(el||Go)&&Wn(el||Go);const qf=Pe.tracker.disableTrackSymbol;if(Pe.tracker.disableTrackSymbol=!0,Fl)pr.push(G.createExportAssignment(void 0,us,nu(Go,Pe,-1)));else if(yl===Tc&&yl)CN(_s,dr(yl));else if(Tc&&wd(Tc))CN(_s,cy(Go,xu(Go)));else{const $f=zY(_s,ri);Vr(G.createImportEqualsDeclaration(void 0,!1,G.createIdentifier($f),Eh(Go,Pe,-1,!1)),0),CN(_s,$f)}return Pe.tracker.disableTrackSymbol=qf,!0}else{const Tc=zY(_s,ri),yl=up(Qn(al(ri)));if(_z(yl,ri))G2(yl,ri,Tc,Fl?0:32);else{const el=((Br=Pe.enclosingDeclaration)==null?void 0:Br.kind)===267&&(!(ri.flags&98304)||ri.flags&65536)?1:2,qf=G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(Tc,void 0,ah(Pe,void 0,yl,ri))],el));Vr(qf,Go&&Go.flags&4&&Go.escapedName==="export="?128:_s===Tc?32:0)}return Fl?(pr.push(G.createExportAssignment(void 0,us,G.createIdentifier(Tc))),!0):_s!==Tc?(CN(_s,Tc),!0):!1}}function _z(ri,Br){var _s;const us=_n(Pe.enclosingDeclaration);return Rr(ri)&48&&!Rt((_s=ri.symbol)==null?void 0:_s.declarations,gs)&&!O(Xh(ri))&&!bO(ri)&&!!(O(Ri(Nl(ri),hp))||O(ea(ri,0)))&&!O(ea(ri,1))&&!$O(Br,tr)&&!(ri.symbol&&Rt(ri.symbol.declarations,Gr=>_n(Gr)!==us))&&!Rt(Nl(ri),Gr=>Sj(Gr.escapedName))&&!Rt(Nl(ri),Gr=>Rt(Gr.declarations,Fl=>_n(Fl)!==us))&&Be(Nl(ri),Gr=>wp(xu(Gr),ue)?Gr.flags&98304?kx(Gr)===O2(Gr):!0:!1)}function Wpt(ri,Br,_s){return function(Gr,Fl,_a){var Go,Tc,yl,el,qf;const $f=Qg(Gr),Yh=!!($f&2);if(Fl&&Gr.flags&2887656)return[];if(Gr.flags&4194304||Gr.escapedName==="constructor"||_a&&ya(_a,Gr.escapedName)&&hv(ya(_a,Gr.escapedName))===hv(Gr)&&(Gr.flags&16777216)===(ya(_a,Gr.escapedName).flags&16777216)&&SC(Qn(Gr),Eu(_a,Gr.escapedName)))return[];const Hu=$f&-1025|(Fl?256:0),Jf=Bu(Gr,Pe),K_=(Go=Gr.declarations)==null?void 0:Go.find(lg(To,Vw,ds,V_,cr,Ir));if(Gr.flags&98304&&_s){const Qu=[];if(Gr.flags&65536){const Q_=Gr.declarations&&W(Gr.declarations,g1=>{if(g1.kind===178)return g1;if(sa(g1)&&oI(g1))return W(g1.arguments[2].properties,jx=>{const zx=ko(jx);if(zx&<(zx)&&dr(zx)==="set")return jx})});z.assert(!!Q_);const $A=rc(Q_)?Mg(Q_).parameters[0]:void 0;Qu.push(_(Pe,G.createSetAccessorDeclaration(G.createModifiersFromModifierFlags(Hu),Jf,[G.createParameterDeclaration(void 0,void 0,$A?iu($A,ll($A),Pe):"value",void 0,Yh?void 0:ah(Pe,void 0,O2(Gr),Gr))],void 0),((Tc=Gr.declarations)==null?void 0:Tc.find(Ev))||K_))}if(Gr.flags&32768){const Q_=$f&2;Qu.push(_(Pe,G.createGetAccessorDeclaration(G.createModifiersFromModifierFlags(Hu),Jf,[],Q_?void 0:ah(Pe,void 0,Qn(Gr),Gr),void 0),((yl=Gr.declarations)==null?void 0:yl.find(tS))||K_))}return Qu}else if(Gr.flags&98311)return _(Pe,ri(G.createModifiersFromModifierFlags((hv(Gr)?8:0)|Hu),Jf,Gr.flags&16777216?G.createToken(58):void 0,Yh?void 0:ah(Pe,void 0,O2(Gr),Gr),void 0),((el=Gr.declarations)==null?void 0:el.find(lg(To,ds)))||K_);if(Gr.flags&8208){const Qu=Qn(Gr),Q_=ea(Qu,0);if(Hu&2)return _(Pe,ri(G.createModifiersFromModifierFlags((hv(Gr)?8:0)|Hu),Jf,Gr.flags&16777216?G.createToken(58):void 0,void 0,void 0),((qf=Gr.declarations)==null?void 0:qf.find(rc))||Q_[0]&&Q_[0].declaration||Gr.declarations&&Gr.declarations[0]);const $A=[];for(const g1 of Q_){const jx=An(g1,Br,Pe,{name:Jf,questionToken:Gr.flags&16777216?G.createToken(58):void 0,modifiers:Hu?G.createModifiersFromModifierFlags(Hu):void 0}),zx=g1.declaration&&bW(g1.declaration.parent)?g1.declaration.parent:g1.declaration;$A.push(_(Pe,jx,zx))}return $A}return z.fail(`Unhandled class member kind! ${Gr.__debugFlags||Gr.flags}`)}}function mei(ri,Br){return rr(ri,!1,Br)}function m8e(ri,Br,_s,us){const Gr=ea(Br,ri);if(ri===1){if(!_s&&Be(Gr,Go=>O(Go.parameters)===0))return[];if(_s){const Go=ea(_s,1);if(!O(Go)&&Be(Gr,Tc=>O(Tc.parameters)===0))return[];if(Go.length===Gr.length){let Tc=!1;for(let yl=0;ylae(Gr,Pe)),us=nu(ri.target.symbol,Pe,788968)):ri.symbol&&kD(ri.symbol,tr,Br)&&(us=nu(ri.symbol,Pe,788968)),us)return G.createExpressionWithTypeArguments(us,_s)}function yei(ri){const Br=v8e(ri,788968);if(Br)return Br;if(ri.symbol)return G.createExpressionWithTypeArguments(nu(ri.symbol,Pe,788968),void 0)}function zY(ri,Br){var _s,us;const Gr=Br?Aa(Br):void 0;if(Gr&&Pe.remappedSymbolNames.has(Gr))return Pe.remappedSymbolNames.get(Gr);Br&&(ri=Hpt(Br,ri));let Fl=0;const _a=ri;for(;(_s=Pe.usedSymbolNames)!=null&&_s.has(ri);)Fl++,ri=`${_a}_${Fl}`;return(us=Pe.usedSymbolNames)==null||us.add(ri),Gr&&Pe.remappedSymbolNames.set(Gr,ri),ri}function Hpt(ri,Br){if(Br==="default"||Br==="__class"||Br==="__function"){const _s=Pe.flags;Pe.flags|=16777216;const us=DD(ri,Pe);Pe.flags=_s,Br=us.length>0&&_W(us.charCodeAt(0))?Nm(us):us}return Br==="default"?Br="_default":Br==="export="&&(Br="_exports"),Br=wp(Br,ue)&&!YL(Br)?Br:"_"+Br.replace(/[^a-zA-Z0-9]/g,"_"),Br}function cy(ri,Br){const _s=Aa(ri);return Pe.remappedSymbolNames.has(_s)?Pe.remappedSymbolNames.get(_s):(Br=Hpt(ri,Br),Pe.remappedSymbolNames.set(_s,Br),Br)}}}function Y1(o,_,v=16384,S){return S?D(S).getText():_8(D);function D(L){const B=yO(v)|70221824|512,K=et.typePredicateToTypePredicateNode(o,_,B),ne=DI(),ae=_&&_n(_);return ne.writeNode(4,K,ae,L),L}}function hj(o){const _=[];let v=0;for(let S=0;Sko(B)?B:void 0);const L=D&&ko(D);if(D&&L){if(sa(D)&&oI(D))return xu(o);if(Ja(L)&&!(Pu(o)&4096)){const B=Zs(o).nameType;if(B&&B.flags&384){const K=pj(o,_);if(K!==void 0)return K}}return sc(L)}if(D||(D=o.declarations[0]),D.parent&&D.parent.kind===260)return sc(D.parent.name);switch(D.kind){case 231:case 218:case 219:return _&&!_.encounteredError&&!(_.flags&131072)&&(_.encounteredError=!0),D.kind===231?"(Anonymous class)":"(Anonymous function)"}}const S=pj(o,_);return S!==void 0?S:xu(o)}function mC(o){if(o){const v=Tr(o);return v.isVisible===void 0&&(v.isVisible=!!_()),v.isVisible}return!1;function _(){switch(o.kind){case 338:case 346:case 340:return!!(o.parent&&o.parent.parent&&o.parent.parent.parent&&Ns(o.parent.parent.parent));case 208:return mC(o.parent.parent);case 260:if(Qo(o.name)&&!o.name.elements.length)return!1;case 267:case 263:case 264:case 265:case 262:case 266:case 271:if(DT(o))return!0;const v=ZI(o);return!(uge(o)&32)&&!(o.kind!==271&&v.kind!==307&&v.flags&33554432)?nS(v):mC(v);case 172:case 171:case 177:case 178:case 174:case 173:if(Ep(o,6))return!1;case 176:case 180:case 179:case 181:case 169:case 268:case 184:case 185:case 187:case 183:case 188:case 189:case 192:case 193:case 196:case 202:return mC(o.parent);case 273:case 274:case 276:return!1;case 168:case 307:case 270:return!0;case 277:return!1;default:return!1}}}function ED(o,_){let v;o.parent&&o.parent.kind===277?v=Ui(o,o,2998271,void 0,!1):o.parent.kind===281&&(v=Um(o.parent,2998271));let S,D;return v&&(D=new Set,D.add(Aa(v)),L(v.declarations)),S;function L(B){W(B,K=>{const ne=zI(K)||K;if(_?Tr(K).isVisible=!0:(S=S||[],Cc(S,ne)),$L(K)){const ae=K.moduleReference,Ce=Ip(ae),qe=Ui(K,Ce.escapedText,901119,void 0,!1);qe&&D&&o_(D,Aa(qe))&&L(qe.declarations)}})}}function qm(o,_){const v=CO(o,_);if(v>=0){const{length:S}=Ki;for(let D=v;D=ar;v--){if(gj(Ki[v],sn[v]))return-1;if(Ki[v]===o&&sn[v]===_)return v}return-1}function gj(o,_){switch(_){case 0:return!!Zs(o).type;case 2:return!!Zs(o).declaredType;case 1:return!!o.resolvedBaseConstructorType;case 3:return!!o.resolvedReturnType;case 4:return!!o.immediateBaseConstraint;case 5:return!!o.resolvedTypeArguments;case 6:return!!o.baseTypesResolved;case 7:return!!Zs(o).writeType;case 8:return Tr(o).parameterInitializerContainsUndefined!==void 0}return z.assertNever(_)}function ey(){return Ki.pop(),sn.pop(),Jn.pop()}function ZI(o){return Xi(Ov(o),_=>{switch(_.kind){case 260:case 261:case 276:case 275:case 274:case 273:return!1;default:return!0}}).parent}function mj(o){const _=vc(Vf(o));return _.typeParameters?$S(_,Yt(_.typeParameters,v=>Je)):_}function Eu(o,_){const v=ya(o,_);return v?Qn(v):void 0}function FF(o,_){var v;let S;return Eu(o,_)||(S=(v=NA(o,_))==null?void 0:v.type)&&va(S,!0,!0)}function Al(o){return o&&(o.flags&1)!==0}function _l(o){return o===$e||!!(o.flags&1&&o.aliasSymbol)}function xA(o,_){if(_!==0)return Ka(o,!1,_);const v=wr(o);return v&&Zs(v).type||Ka(o,!1,_)}function kA(o,_,v){if(o=ud(o,ne=>!(ne.flags&98304)),o.flags&131072)return Ps;if(o.flags&1048576)return Zc(o,ne=>kA(ne,_,v));let S=es(Yt(_,KS));const D=[],L=[];for(const ne of Nl(o)){const ae=PA(ne,8576);!ba(ae,S)&&!(Qg(ne)&6)&&L_e(ne)?D.push(ne):L.push(ae)}if(sN(o)||oN(S)){if(L.length&&(S=es([S,...L])),S.flags&131072)return o;const ne=hzt();return ne?NO(ne,[o,S]):$e}const B=ga();for(const ne of D)B.set(ne.escapedName,jOe(ne,!1));const K=bi(v,B,x,x,Xh(o));return K.objectFlags|=4194304,K}function ge(o){return!!(o.flags&465829888)&&Fu(Hf(o)||Gt,32768)}function Qe(o){const _=Km(o,ge)?Zc(o,v=>v.flags&465829888?ry(v):v):o;return Gm(_,524288)}function yt(o,_){const v=Zt(o);return v?EC(v,_):_}function Zt(o){const _=_i(o);if(_&&xW(_)&&_.flowNode){const v=an(o);if(v){const S=zt(Gk.createStringLiteral(v),o),D=M_(_)?_:Gk.createParenthesizedExpression(_),L=zt(Gk.createElementAccessExpression(D,S),o);return ml(S,L),ml(L,o),D!==_&&ml(D,L),L.flowNode=_.flowNode,L}}}function _i(o){const _=o.parent.parent;switch(_.kind){case 208:case 303:return Zt(_);case 209:return Zt(o.parent);case 260:return _.initializer;case 226:return _.right}}function an(o){const _=o.parent;return o.kind===208&&_.kind===206?jr(o.propertyName||o.name):o.kind===303||o.kind===304?jr(o.name):""+_.elements.indexOf(o)}function jr(o){const _=KS(o);return _.flags&384?""+_.value:void 0}function Bs(o){const _=o.dotDotDotToken?32:0,v=xA(o.parent.parent,_);return v&&ws(o,v,!1)}function ws(o,_,v){if(Al(_))return _;const S=o.parent;be&&o.flags&33554432&&Fk(o)?_=kC(_):be&&S.parent.initializer&&!dv(Ydt(S.parent.initializer),65536)&&(_=Gm(_,524288));let D;if(S.kind===206)if(o.dotDotDotToken){if(_=cv(_),_.flags&2||!uY(_))return ht(o,k.Rest_types_may_only_be_created_from_object_types),$e;const L=[];for(const B of S.elements)B.dotDotDotToken||L.push(B.propertyName||B.name);D=kA(_,L,o.symbol)}else{const L=o.propertyName||o.name,B=KS(L),K=lp(_,B,32,L);D=yt(o,K)}else{const L=YS(65|(o.dotDotDotToken?0:128),_,wi,S),B=S.elements.indexOf(o);if(o.dotDotDotToken){const K=Zc(_,ne=>ne.flags&58982400?ry(ne):ne);D=dp(K,Qa)?Zc(K,ne=>$F(ne,B)):sh(L)}else if(XS(_)){const K=D0(B),ne=32|(v||YF(o)?16:0),ae=Lx(_,K,ne,o.name)||$e;D=yt(o,ae)}else D=L}return o.initializer?hd(y6(o))?be&&!dv(t5(o,0),16777216)?Qe(D):D:Bpe(o,es([Qe(D),t5(o,0)],2)):D}function hs(o){const _=kk(o);if(_)return As(_)}function io(o){const _=Il(o,!0);return _.kind===106||_.kind===80&&S_(_)===Ye}function ic(o){const _=Il(o,!0);return _.kind===209&&_.elements.length===0}function va(o,_=!1,v=!0){return be&&v?Rx(o,_):o}function Ka(o,_,v){if(ds(o)&&o.parent.parent.kind===249){const B=l1(tRe(fo(o.parent.parent.expression,v)));return B.flags&4456448?Out(B):tt}if(ds(o)&&o.parent.parent.kind===250){const B=o.parent.parent;return MY(B)||Je}if(Qo(o.parent))return Bs(o);const S=To(o)&&!Mv(o)||V_(o)||cTe(o),D=_&&t3(o),L=Gn(o);if(Rse(o))return L?Al(L)||L===Gt?L:$e:Oe?Gt:Je;if(L)return va(L,S,D);if((ke||Xn(o))&&ds(o)&&!Qo(o.name)&&!(uge(o)&32)&&!(o.flags&33554432)){if(!(qD(o)&6)&&(!o.initializer||io(o.initializer)))return pt;if(o.initializer&&ic(o.initializer))return $l}if(Gs(o)){if(!o.symbol)return;const B=o.parent;if(B.kind===178&&TO(B)){const ae=Jc(wr(o.parent),177);if(ae){const Ce=Mg(ae),qe=_8e(B);return qe&&o===qe?(z.assert(!qe.type),Qn(Ce.thisParameter)):Ol(Ce)}}const K=Fjt(B,o);if(K)return K;const ne=o.symbol.escapedName==="this"?Ift(B):Nft(o);if(ne)return va(ne,!1,D)}if(tI(o)&&o.initializer){if(Xn(o)&&!Gs(o)){const K=vj(o,wr(o),w8(o));if(K)return K}const B=Bpe(o,t5(o,v));return va(B,S,D)}if(To(o)&&(ke||Xn(o)))if(_d(o)){const B=Ri(o.parent.members,bu),K=B.length?$m(o.symbol,B):Wh(o)&128?q_e(o.symbol):void 0;return K&&va(K,!0,D)}else{const B=tV(o.parent),K=B?P2(o.symbol,B):Wh(o)&128?q_e(o.symbol):void 0;return K&&va(K,!0,D)}if(qv(o))return fi;if(Qo(o.name))return A(o.name,!1,!0)}function Ag(o){if(o.valueDeclaration&&cr(o.valueDeclaration)){const _=Zs(o);return _.isConstructorDeclaredProperty===void 0&&(_.isConstructorDeclaredProperty=!1,_.isConstructorDeclaredProperty=!!vC(o)&&Be(o.declarations,v=>cr(v)&&gpe(v)&&(v.left.kind!==212||ug(v.left.argumentExpression))&&!pl(void 0,v,o,v))),_.isConstructorDeclaredProperty}return!1}function sv(o){const _=o.valueDeclaration;return _&&To(_)&&!hd(_)&&!_.initializer&&(ke||Xn(_))}function vC(o){if(o.declarations)for(const _ of o.declarations){const v=u_(_,!1,!1);if(v&&(v.kind===176||h1(v)))return v}}function wx(o){const _=_n(o.declarations[0]),v=Ws(o.escapedName),S=o.declarations.every(L=>Xn(L)&&Sc(L)&&Jy(L.expression)),D=S?G.createPropertyAccessExpression(G.createPropertyAccessExpression(G.createIdentifier("module"),G.createIdentifier("exports")),v):G.createPropertyAccessExpression(G.createIdentifier("exports"),v);return S&&ml(D.expression.expression,D.expression),ml(D.expression,D),ml(D,_),D.flowNode=_.endFlowNode,EC(D,pt,wi)}function $m(o,_){const v=ro(o.escapedName,"__#")?G.createPrivateIdentifier(o.escapedName.split("@")[1]):Ws(o.escapedName);for(const S of _){const D=G.createPropertyAccessExpression(G.createThis(),v);ml(D.expression,D),ml(D,S),D.flowNode=S.returnFlowNode;const L=BF(D,o);if(ke&&(L===pt||L===$l)&&ht(o.valueDeclaration,k.Member_0_implicitly_has_an_1_type,Js(o),Un(L)),!dp(L,hY))return lz(L)}}function P2(o,_){const v=ro(o.escapedName,"__#")?G.createPrivateIdentifier(o.escapedName.split("@")[1]):Ws(o.escapedName),S=G.createPropertyAccessExpression(G.createThis(),v);ml(S.expression,S),ml(S,_),S.flowNode=_.returnFlowNode;const D=BF(S,o);return ke&&(D===pt||D===$l)&&ht(o.valueDeclaration,k.Member_0_implicitly_has_an_1_type,Js(o),Un(D)),dp(D,hY)?void 0:lz(D)}function BF(o,_){const v=(_==null?void 0:_.valueDeclaration)&&(!sv(_)||Wh(_.valueDeclaration)&128)&&q_e(_)||wi;return EC(o,pt,v)}function SO(o,_){const v=JL(o.valueDeclaration);if(v){const K=Xn(v)?xk(v):void 0;return K&&K.typeExpression?As(K.typeExpression):o.valueDeclaration&&vj(o.valueDeclaration,o,v)||z2(Vu(v))}let S,D=!1,L=!1;if(Ag(o)&&(S=P2(o,vC(o))),!S){let K;if(o.declarations){let ne;for(const ae of o.declarations){const Ce=cr(ae)||sa(ae)?ae:Sc(ae)?cr(ae.parent)?ae.parent:ae:void 0;if(!Ce)continue;const qe=Sc(Ce)?yW(Ce):Lu(Ce);(qe===4||cr(Ce)&&gpe(Ce,qe))&&(ov(Ce)?D=!0:L=!0),sa(Ce)||(ne=pl(ne,Ce,o,ae)),ne||(K||(K=[])).push(cr(Ce)||sa(Ce)?Ad(o,_,Ce,qe):rn)}S=ne}if(!S){if(!O(K))return $e;let ne=D&&o.declarations?A2(K,o.declarations):void 0;if(L){const Ce=q_e(o);Ce&&((ne||(ne=[])).push(Ce),D=!0)}const ae=Rt(ne,Ce=>!!(Ce.flags&-98305))?ne:K;S=es(ae)}}const B=up(va(S,!1,L&&!D));return o.valueDeclaration&&Xn(o.valueDeclaration)&&ud(B,K=>!!(K.flags&-98305))===rn?(U2(o.valueDeclaration,Je),Je):B}function vj(o,_,v){var S,D;if(!Xn(o)||!v||!Pa(v)||v.properties.length)return;const L=ga();for(;cr(o)||Ir(o);){const ne=Lg(o);(S=ne==null?void 0:ne.exports)!=null&&S.size&&Xp(L,ne.exports),o=cr(o)?o.parent:o.parent.parent}const B=Lg(o);(D=B==null?void 0:B.exports)!=null&&D.size&&Xp(L,B.exports);const K=bi(_,L,x,x,x);return K.objectFlags|=4096,K}function pl(o,_,v,S){var D;const L=hd(_.parent);if(L){const B=up(As(L));if(o)!_l(o)&&!_l(B)&&!SC(o,B)&&L_t(void 0,o,S,B);else return B}if((D=v.parent)!=null&&D.valueDeclaration){const B=_O(v.parent);if(B.valueDeclaration){const K=hd(B.valueDeclaration);if(K){const ne=ya(As(K),v.escapedName);if(ne)return kx(ne)}}}return o}function Ad(o,_,v,S){if(sa(v)){if(_)return Qn(_);const B=Vu(v.arguments[2]),K=Eu(B,"value");if(K)return K;const ne=Eu(B,"get");if(ne){const Ce=mN(ne);if(Ce)return Ol(Ce)}const ae=Eu(B,"set");if(ae){const Ce=mN(ae);if(Ce)return wRe(Ce)}return Je}if(xx(v.left,v.right))return Je;const D=S===1&&(Ir(v.left)||wc(v.left))&&(Jy(v.left.expression)||lt(v.left.expression)&&sI(v.left.expression)),L=_?Qn(_):D?Zh(Vu(v.right)):z2(Vu(v.right));if(L.flags&524288&&S===2&&o.escapedName==="export="){const B=lv(L),K=ga();K$(B.members,K);const ne=K.size;_&&!_.exports&&(_.exports=ga()),(_||o).exports.forEach((Ce,qe)=>{var Ve;const Dt=K.get(qe);if(Dt&&Dt!==Ce&&!(Ce.flags&2097152))if(Ce.flags&111551&&Dt.flags&111551){if(Ce.valueDeclaration&&Dt.valueDeclaration&&_n(Ce.valueDeclaration)!==_n(Dt.valueDeclaration)){const Kt=Ws(Ce.escapedName),Wi=((Ve=$r(Dt.valueDeclaration,Af))==null?void 0:Ve.name)||Dt.valueDeclaration;fa(ht(Ce.valueDeclaration,k.Duplicate_identifier_0,Kt),Kn(Wi,k._0_was_also_declared_here,Kt)),fa(ht(Wi,k.Duplicate_identifier_0,Kt),Kn(Ce.valueDeclaration,k._0_was_also_declared_here,Kt))}const Vt=sl(Ce.flags|Dt.flags,qe);Vt.links.type=es([Qn(Ce),Qn(Dt)]),Vt.valueDeclaration=Dt.valueDeclaration,Vt.declarations=no(Dt.declarations,Ce.declarations),K.set(qe,Vt)}else K.set(qe,aC(Ce,Dt));else K.set(qe,Ce)});const ae=bi(ne!==K.size?void 0:B.symbol,K,B.callSignatures,B.constructSignatures,B.indexInfos);if(ne===K.size&&(L.aliasSymbol&&(ae.aliasSymbol=L.aliasSymbol,ae.aliasTypeArguments=L.aliasTypeArguments),Rr(L)&4)){ae.aliasSymbol=L.symbol;const Ce=Nc(L);ae.aliasTypeArguments=O(Ce)?Ce:void 0}return ae.objectFlags|=IZ([L])|Rr(L)&20608,ae.symbol&&ae.symbol.flags&32&&L===Gu(ae.symbol)&&(ae.objectFlags|=16777216),ae}return J_e(L)?(U2(v,Xl),Xl):L}function xx(o,_){return Ir(o)&&o.expression.kind===110&&MP(_,v=>Tf(o,v))}function ov(o){const _=u_(o,!1,!1);return _.kind===176||_.kind===262||_.kind===218&&!bW(_.parent)}function A2(o,_){return z.assert(o.length===_.length),o.filter((v,S)=>{const D=_[S],L=cr(D)?D:cr(D.parent)?D.parent:void 0;return L&&ov(L)})}function db(o,_,v){if(o.initializer){const S=Qo(o.name)?A(o.name,!0,!1):Gt;return va(Bpe(o,t5(o,v?0:1,S)))}return Qo(o.name)?A(o.name,_,v):(v&&!vi(o)&&U2(o,Je),_?$t:Je)}function um(o,_,v){const S=ga();let D,L=131200;W(o.elements,K=>{const ne=K.propertyName||K.name;if(K.dotDotDotToken){D=sy(tt,Je,!1);return}const ae=KS(ne);if(!Pm(ae)){L|=512;return}const Ce=Am(ae),qe=4|(K.initializer?16777216:0),Ve=sl(qe,Ce);Ve.links.type=db(K,_,v),Ve.links.bindingElement=K,S.set(Ve.escapedName,Ve)});const B=bi(void 0,S,x,x,D?[D]:x);return B.objectFlags|=L,_&&(B.pattern=o,B.objectFlags|=131072),B}function Yn(o,_,v){const S=o.elements,D=Ql(S),L=D&&D.kind===208&&D.dotDotDotToken?D:void 0;if(S.length===0||S.length===1&&L)return ue>=2?vut(Je):Xl;const B=Yt(S,Ce=>zd(Ce)?Je:db(Ce,_,v)),K=Ni(S,Ce=>!(Ce===L||zd(Ce)||YF(Ce)),S.length-1)+1,ne=Yt(S,(Ce,qe)=>Ce===L?4:qe>=K?2:1);let ae=oy(B,ne);return _&&(ae=Yct(ae),ae.pattern=o,ae.objectFlags|=131072),ae}function A(o,_=!1,v=!1){return o.kind===206?um(o,_,v):Yn(o,_,v)}function $(o,_){return gt(Ka(o,!0,0),o,_)}function se(o){const _=Tr(o);if(!_.resolvedType){const v=sl(4096,"__importAttributes"),S=ga();W(o.elements,L=>{const B=sl(4,kG(L));B.parent=v,B.links.type=pZt(L),B.links.target=B,S.set(B.escapedName,B)});const D=bi(v,S,x,x,x);D.objectFlags|=262272,_.resolvedType=D}return _.resolvedType}function De(o){const _=Lg(o),v=tzt(!1);return v&&_&&_===v}function gt(o,_,v){return o?(o.flags&4096&&De(_.parent)&&(o=zOe(_)),v&&tpe(_,o),o.flags&8192&&(nl(_)||!_.type)&&o.symbol!==wr(_)&&(o=kn),up(o)):(o=Gs(_)&&_.dotDotDotToken?Xl:Je,v&&(vi(_)||U2(_,o)),o)}function vi(o){const _=Ov(o),v=_.kind===169?_.parent:_;return NY(v)}function Gn(o){const _=hd(o);if(_)return As(_)}function vo(o){let _=o.valueDeclaration;return _?(nl(_)&&(_=y6(_)),Gs(_)?B_e(_.parent):!1):!1}function ac(o,_){const v=Zs(o);if(!v.type){const S=k0(o,_);return!v.type&&!vo(o)&&!_&&(v.type=S),S}return v.type}function k0(o,_){if(o.flags&4194304)return mj(o);if(o===ze)return Je;if(o.flags&134217728&&o.valueDeclaration){const D=wr(_n(o.valueDeclaration)),L=sl(D.flags,"exports");L.declarations=D.declarations?D.declarations.slice():[],L.parent=o,L.links.target=D,D.valueDeclaration&&(L.valueDeclaration=D.valueDeclaration),D.members&&(L.members=new Map(D.members)),D.exports&&(L.exports=new Map(D.exports));const B=ga();return B.set("exports",L),bi(o,B,x,x,x)}z.assertIsDefined(o.valueDeclaration);const v=o.valueDeclaration;if(Ns(v)&&Dm(v))return v.statements.length?up(z2(fo(v.statements[0].expression))):Ps;if(Vw(v))return yj(o);if(!qm(o,0))return o.flags&512&&!(o.flags&67108864)?WF(o):nl(v)&&_===1?$e:zS(o);let S;if(v.kind===277)S=gt(Gn(v)||Vu(v.expression),v);else if(cr(v)||Xn(v)&&(sa(v)||(Ir(v)||xJ(v))&&cr(v.parent)))S=SO(o);else if(Ir(v)||wc(v)||lt(v)||Ml(v)||W_(v)||xd(v)||Uu(v)||Au(v)&&!f0(v)||Hv(v)||Ns(v)){if(o.flags&9136)return WF(o);S=cr(v.parent)?SO(o):Gn(v)||Je}else if(pd(v))S=Gn(v)||r_t(v);else if(qv(v))S=Gn(v)||jft(v);else if(ih(v))S=Gn(v)||n5(v.name,0);else if(f0(v))S=Gn(v)||s_t(v,0);else if(Gs(v)||To(v)||V_(v)||ds(v)||nl(v)||o8(v))S=$(v,!0);else if(Uk(v))S=WF(o);else if(nx(v))S=d_e(o);else return z.fail("Unhandled declaration kind! "+z.formatSyntaxKind(v.kind)+" for "+z.formatSymbol(o));return ey()?S:o.flags&512&&!(o.flags&67108864)?WF(o):nl(v)&&_===1?S:zS(o)}function T0(o){if(o)switch(o.kind){case 177:return Dp(o);case 178:return Bxe(o);case 172:return z.assert(Mv(o)),hd(o)}}function ty(o){const _=T0(o);return _&&As(_)}function TA(o){const _=_8e(o);return _&&_.symbol}function W3e(o){return B2(Mg(o))}function yj(o){const _=Zs(o);if(!_.type){if(!qm(o,0))return $e;const v=Jc(o,177),S=Jc(o,178),D=$r(Jc(o,172),O_);let L=v&&Xn(v)&&hs(v)||ty(v)||ty(S)||ty(D)||v&&v.body&&Ope(v)||D&&D.initializer&&$(D,!0);L||(S&&!NY(S)?rf(ke,S,k.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation,Js(o)):v&&!NY(v)?rf(ke,v,k.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation,Js(o)):D&&!NY(D)&&rf(ke,D,k.Member_0_implicitly_has_an_1_type,Js(o),"any"),L=Je),ey()||(T0(v)?ht(v,k._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,Js(o)):T0(S)||T0(D)?ht(S,k._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,Js(o)):v&&ke&&ht(v,k._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,Js(o)),L=Je),_.type??(_.type=L)}return _.type}function c_e(o){const _=Zs(o);if(!_.writeType){if(!qm(o,7))return $e;const v=Jc(o,178)??$r(Jc(o,172),O_);let S=ty(v);ey()||(T0(v)&&ht(v,k._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,Js(o)),S=Je),_.writeType??(_.writeType=S||yj(o))}return _.writeType}function u_e(o){const _=ln(Gu(o));return _.flags&8650752?_:_.flags&2097152?Me(_.types,v=>!!(v.flags&8650752)):void 0}function WF(o){let _=Zs(o);const v=_;if(!_.type){const S=o.valueDeclaration&&Ppe(o.valueDeclaration,!1);if(S){const D=mRe(o,S);D&&(o=D,_=D.links)}v.type=_.type=V3e(o)}return _.type}function V3e(o){const _=o.valueDeclaration;if(o.flags&1536&&XB(o))return Je;if(_&&(_.kind===226||Sc(_)&&_.parent.kind===226))return SO(o);if(o.flags&512&&_&&Ns(_)&&_.commonJsModuleIndicator){const S=J_(o);if(S!==o){if(!qm(o,0))return $e;const D=al(o.exports.get("export=")),L=SO(D,D===S?void 0:S);return ey()?L:zS(o)}}const v=tg(16,o);if(o.flags&32){const S=u_e(o);return S?Fa([v,S]):v}else return be&&o.flags&16777216?Rx(v,!0):v}function d_e(o){const _=Zs(o);return _.type||(_.type=vct(o))}function H3e(o){const _=Zs(o);if(!_.type){if(!qm(o,0))return $e;const v=sf(o),S=o.declarations&&fC(Rp(o),!0),D=Z(S==null?void 0:S.declarations,L=>Ec(L)?Gn(L):void 0);if(_.type??(_.type=S!=null&&S.declarations&&ege(S.declarations)&&o.declarations.length?wx(S):ege(o.declarations)?pt:D||(op(v)&111551?Qn(v):$e)),!ey())return zS(S??o),_.type??(_.type=$e)}return _.type}function f_e(o){const _=Zs(o);return _.type||(_.type=Ys(Qn(_.target),_.mapper))}function j3e(o){const _=Zs(o);return _.writeType||(_.writeType=Ys(O2(_.target),_.mapper))}function zS(o){const _=o.valueDeclaration;if(_){if(hd(_))return ht(o.valueDeclaration,k._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,Js(o)),$e;ke&&(_.kind!==169||_.initializer)&&ht(o.valueDeclaration,k._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer,Js(o))}else if(o.flags&2097152){const v=Rp(o);v&&ht(v,k.Circular_definition_of_import_alias_0,Js(o))}return Je}function mZ(o){const _=Zs(o);return _.type||(z.assertIsDefined(_.deferralParent),z.assertIsDefined(_.deferralConstituents),_.type=_.deferralParent.flags&1048576?es(_.deferralConstituents):Fa(_.deferralConstituents)),_.type}function z3e(o){const _=Zs(o);return!_.writeType&&_.deferralWriteConstituents&&(z.assertIsDefined(_.deferralParent),z.assertIsDefined(_.deferralConstituents),_.writeType=_.deferralParent.flags&1048576?es(_.deferralWriteConstituents):Fa(_.deferralWriteConstituents)),_.writeType}function O2(o){const _=Pu(o);return o.flags&4?_&2?_&65536?z3e(o)||mZ(o):o.links.writeType||o.links.type:TC(Qn(o),!!(o.flags&16777216)):o.flags&98304?_&1?j3e(o):c_e(o):Qn(o)}function Qn(o,_){const v=Pu(o);return v&65536?mZ(o):v&1?f_e(o):v&262144?vjt(o):v&8192?Oqt(o):o.flags&7?ac(o,_):o.flags&9136?WF(o):o.flags&8?d_e(o):o.flags&98304?yj(o):o.flags&2097152?H3e(o):$e}function kx(o){return TC(Qn(o),!!(o.flags&16777216))}function Tx(o,_){return o!==void 0&&_!==void 0&&(Rr(o)&4)!==0&&o.target===_}function wO(o){return Rr(o)&4?o.target:o}function xO(o,_){return v(o);function v(S){if(Rr(S)&7){const D=wO(S);return D===_||Rt(Yr(D),v)}else if(S.flags&2097152)return Rt(S.types,v);return!1}}function vZ(o,_){for(const v of _)o=gu(o,ID(wr(v)));return o}function kO(o,_){for(;;){if(o=o.parent,o&&cr(o)){const v=Lu(o);if(v===6||v===3){const S=wr(o.left);S&&S.parent&&!Xi(S.parent.valueDeclaration,D=>o===D)&&(o=S.parent.valueDeclaration)}}if(!o)return;switch(o.kind){case 263:case 231:case 264:case 179:case 180:case 173:case 184:case 185:case 317:case 262:case 174:case 218:case 219:case 265:case 345:case 346:case 340:case 338:case 200:case 194:{const S=kO(o,_);if(o.kind===200)return xi(S,ID(wr(o.typeParameter)));if(o.kind===194)return no(S,WOe(o));const D=vZ(S,Bw(o)),L=_&&(o.kind===263||o.kind===231||o.kind===264||h1(o))&&Gu(wr(o)).thisType;return L?xi(D,L):D}case 341:const v=TW(o);v&&(o=v.valueDeclaration);break;case 320:{const S=kO(o,_);return o.tags?vZ(S,Ln(o.tags,D=>Rm(D)?D.typeParameters:void 0)):S}}}}function bj(o){var _;const v=o.flags&32||o.flags&16?o.valueDeclaration:(_=o.declarations)==null?void 0:_.find(S=>{if(S.kind===264)return!0;if(S.kind!==260)return!1;const D=S.initializer;return!!D&&(D.kind===218||D.kind===219)});return z.assert(!!v,"Class was missing valueDeclaration -OR- non-class had no interface declarations"),kO(v)}function US(o){if(!o.declarations)return;let _;for(const v of o.declarations)(v.kind===264||v.kind===263||v.kind===231||h1(v)||wW(v))&&(_=vZ(_,Bw(v)));return _}function U3e(o){return no(bj(o),US(o))}function yZ(o){const _=ea(o,1);if(_.length===1){const v=_[0];if(!v.typeParameters&&v.parameters.length===1&&vh(v)){const S=SY(v.parameters[0]);return Al(S)||GZ(S)===Je}}return!1}function Cj(o){if(ea(o,1).length>0)return!0;if(o.flags&8650752){const _=Hf(o);return!!_&&yZ(_)}return!1}function M2(o){const _=Ub(o.symbol);return _&&Pv(_)}function h_e(o,_,v){const S=O(_),D=Xn(v);return Ri(ea(o,1),L=>(D||S>=a1(L.typeParameters))&&S<=O(L.typeParameters))}function R2(o,_,v){const S=h_e(o,_,v),D=Yt(_,As);return Is(S,L=>Rt(L.typeParameters)?Tj(L,D,Xn(v)):L)}function ln(o){if(!o.resolvedBaseConstructorType){const _=Ub(o.symbol),v=_&&Pv(_),S=M2(o);if(!S)return o.resolvedBaseConstructorType=wi;if(!qm(o,1))return $e;const D=fo(S.expression);if(v&&S!==v&&(z.assert(!v.typeArguments),fo(v.expression)),D.flags&2621440&&lv(D),!ey())return ht(o.symbol.valueDeclaration,k._0_is_referenced_directly_or_indirectly_in_its_own_base_expression,Js(o.symbol)),o.resolvedBaseConstructorType??(o.resolvedBaseConstructorType=$e);if(!(D.flags&1)&&D!==de&&!Cj(D)){const L=ht(S.expression,k.Type_0_is_not_a_constructor_function_type,Un(D));if(D.flags&262144){const B=UF(D);let K=Gt;if(B){const ne=ea(B,1);ne[0]&&(K=Ol(ne[0]))}D.symbol.declarations&&fa(L,Kn(D.symbol.declarations[0],k.Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1,Js(D.symbol),Un(K)))}return o.resolvedBaseConstructorType??(o.resolvedBaseConstructorType=$e)}o.resolvedBaseConstructorType??(o.resolvedBaseConstructorType=D)}return o.resolvedBaseConstructorType}function Fr(o){let _=x;if(o.symbol.declarations)for(const v of o.symbol.declarations){const S=H6(v);if(S)for(const D of S){const L=As(D);_l(L)||(_===x?_=[L]:_.push(L))}}return _}function Wr(o,_){ht(o,k.Type_0_recursively_references_itself_as_a_base_type,Un(_,void 0,2))}function Yr(o){if(!o.baseTypesResolved){if(qm(o,6)&&(o.objectFlags&8?o.resolvedBaseTypes=[Ts(o)]:o.symbol.flags&96?(o.symbol.flags&32&&xl(o),o.symbol.flags&64&&iy(o)):z.fail("type must be class or interface"),!ey()&&o.symbol.declarations))for(const _ of o.symbol.declarations)(_.kind===263||_.kind===264)&&Wr(_,o);o.baseTypesResolved=!0}return o.resolvedBaseTypes}function Ts(o){const _=Is(o.typeParameters,(v,S)=>o.elementFlags[S]&8?lp(v,Ae):v);return sh(es(_||x),o.readonly)}function xl(o){o.resolvedBaseTypes=Dse;const _=Qh(ln(o));if(!(_.flags&2621441))return o.resolvedBaseTypes=x;const v=M2(o);let S;const D=_.symbol?vc(_.symbol):void 0;if(_.symbol&&_.symbol.flags&32&&lc(D))S=eut(v,_.symbol);else if(_.flags&1)S=_;else{const B=R2(_,v.typeArguments,v);if(!B.length)return ht(v.expression,k.No_base_constructor_has_the_specified_number_of_type_arguments),o.resolvedBaseTypes=x;S=Ol(B[0])}if(_l(S))return o.resolvedBaseTypes=x;const L=cv(S);if(!of(L)){const B=iOe(void 0,S),K=Ro(B,k.Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members,Un(L));return vl.add($y(_n(v.expression),v.expression,K)),o.resolvedBaseTypes=x}return o===L||xO(L,o)?(ht(o.symbol.valueDeclaration,k.Type_0_recursively_references_itself_as_a_base_type,Un(o,void 0,2)),o.resolvedBaseTypes=x):(o.resolvedBaseTypes===Dse&&(o.members=void 0),o.resolvedBaseTypes=[L])}function lc(o){const _=o.outerTypeParameters;if(_){const v=_.length-1,S=Nc(o);return _[v].symbol!==S[v].symbol}return!0}function of(o){if(o.flags&262144){const _=Hf(o);if(_)return of(_)}return!!(o.flags&67633153&&!ap(o)||o.flags&2097152&&Be(o.types,of))}function iy(o){if(o.resolvedBaseTypes=o.resolvedBaseTypes||x,o.symbol.declarations){for(const _ of o.symbol.declarations)if(_.kind===264&&I8(_))for(const v of I8(_)){const S=cv(As(v));_l(S)||(of(S)?o!==S&&!xO(S,o)?o.resolvedBaseTypes===x?o.resolvedBaseTypes=[S]:o.resolvedBaseTypes.push(S):Wr(_,o):ht(v,k.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members))}}}function o1(o){if(!o.declarations)return!0;for(const _ of o.declarations)if(_.kind===264){if(_.flags&256)return!1;const v=I8(_);if(v){for(const S of v)if(pc(S.expression)){const D=Du(S.expression,788968,!0);if(!D||!(D.flags&64)||Gu(D).thisType)return!1}}}return!0}function Gu(o){let _=Zs(o);const v=_;if(!_.declaredType){const S=o.flags&32?1:2,D=mRe(o,o.valueDeclaration&&jGt(o.valueDeclaration));D&&(o=D,_=D.links);const L=v.declaredType=_.declaredType=tg(S,o),B=bj(o),K=US(o);(B||K||S===1||!o1(o))&&(L.objectFlags|=4,L.typeParameters=no(B,K),L.outerTypeParameters=B,L.localTypeParameters=K,L.instantiations=new Map,L.instantiations.set(Jm(L.typeParameters),L),L.target=L,L.resolvedTypeArguments=L.typeParameters,L.thisType=Pg(o),L.thisType.isThisType=!0,L.thisType.constraint=L)}return _.declaredType}function yC(o){var _;const v=Zs(o);if(!v.declaredType){if(!qm(o,2))return $e;const S=z.checkDefined((_=o.declarations)==null?void 0:_.find(wW),"Type alias symbol with no valid declaration found"),D=Em(S)?S.typeExpression:S.type;let L=D?As(D):$e;if(ey()){const B=US(o);B&&(v.typeParameters=B,v.instantiations=new Map,v.instantiations.set(Jm(B),L))}else L=$e,S.kind===340?ht(S.typeExpression.type,k.Type_alias_0_circularly_references_itself,Js(o)):ht(Af(S)&&S.name||S,k.Type_alias_0_circularly_references_itself,Js(o));v.declaredType??(v.declaredType=L)}return v.declaredType}function DA(o){return o.flags&1056&&o.symbol.flags&8?vc(Vf(o.symbol)):o}function EA(o){const _=Zs(o);if(!_.declaredType){const v=[];if(o.declarations){for(const D of o.declarations)if(D.kind===266){for(const L of D.members)if(TO(L)){const B=wr(L),K=bN(L).value,ne=RA(K!==void 0?pUt(K,Aa(o),B):VF(B));Zs(B).declaredType=ne,v.push(Zh(ne))}}}const S=v.length?es(v,1,o,void 0):VF(o);S.flags&1048576&&(S.flags|=1024,S.symbol=o),_.declaredType=S}return _.declaredType}function VF(o){const _=_C(32,o),v=_C(32,o);return _.regularType=_,_.freshType=v,v.regularType=_,v.freshType=v,_}function vct(o){const _=Zs(o);if(!_.declaredType){const v=EA(Vf(o));_.declaredType||(_.declaredType=v)}return _.declaredType}function ID(o){const _=Zs(o);return _.declaredType||(_.declaredType=Pg(o))}function KHt(o){const _=Zs(o);return _.declaredType||(_.declaredType=vc(sf(o)))}function vc(o){return yct(o)||$e}function yct(o){if(o.flags&96)return Gu(o);if(o.flags&524288)return yC(o);if(o.flags&262144)return ID(o);if(o.flags&384)return EA(o);if(o.flags&8)return vct(o);if(o.flags&2097152)return KHt(o)}function bZ(o){switch(o.kind){case 133:case 159:case 154:case 150:case 163:case 136:case 155:case 151:case 116:case 157:case 146:case 201:return!0;case 188:return bZ(o.elementType);case 183:return!o.typeArguments||o.typeArguments.every(bZ)}return!1}function QHt(o){const _=C6(o);return!_||bZ(_)}function bct(o){const _=hd(o);return _?bZ(_):!iS(o)}function XHt(o){const _=Dp(o),v=Bw(o);return(o.kind===176||!!_&&bZ(_))&&o.parameters.every(bct)&&v.every(QHt)}function ZHt(o){if(o.declarations&&o.declarations.length===1){const _=o.declarations[0];if(_)switch(_.kind){case 172:case 171:return bct(_);case 174:case 173:case 176:case 177:case 178:return XHt(_)}}return!1}function Cct(o,_,v){const S=ga();for(const D of o)S.set(D.escapedName,v&&ZHt(D)?D:$Oe(D,_));return S}function Sct(o,_){for(const v of _){if(wct(v))continue;const S=o.get(v.escapedName);(!S||S.valueDeclaration&&cr(S.valueDeclaration)&&!Ag(S)&&!cxe(S.valueDeclaration))&&(o.set(v.escapedName,v),o.set(v.escapedName,v))}}function wct(o){return!!o.valueDeclaration&&Fh(o.valueDeclaration)&&da(o.valueDeclaration)}function q3e(o){if(!o.declaredProperties){const _=o.symbol,v=Dx(_);o.declaredProperties=bx(v),o.declaredCallSignatures=x,o.declaredConstructSignatures=x,o.declaredIndexInfos=x,o.declaredCallSignatures=PD(v.get("__call")),o.declaredConstructSignatures=PD(v.get("__new")),o.declaredIndexInfos=Qct(_)}return o}function __e(o){if(!Ja(o)&&!wc(o))return!1;const _=Ja(o)?o.expression:o.argumentExpression;return pc(_)&&Pm(Ja(o)?u1(o):Vu(_))}function Sj(o){return o.charCodeAt(0)===95&&o.charCodeAt(1)===95&&o.charCodeAt(2)===64}function CZ(o){const _=ko(o);return!!_&&__e(_)}function TO(o){return!Hb(o)||CZ(o)}function YHt(o){return NJ(o)&&!__e(o)}function ejt(o,_,v){z.assert(!!(Pu(o)&4096),"Expected a late-bound symbol."),o.flags|=v,Zs(_.symbol).lateSymbol=o,o.declarations?_.symbol.isReplaceableByMethod||o.declarations.push(_):o.declarations=[_],v&111551&&(!o.valueDeclaration||o.valueDeclaration.kind!==_.kind)&&(o.valueDeclaration=_)}function xct(o,_,v,S){z.assert(!!S.symbol,"The member is expected to have a symbol.");const D=Tr(S);if(!D.resolvedSymbol){D.resolvedSymbol=S.symbol;const L=cr(S)?S.left:S.name,B=wc(L)?Vu(L.argumentExpression):u1(L);if(Pm(B)){const K=Am(B),ne=S.symbol.flags;let ae=v.get(K);ae||v.set(K,ae=sl(0,K,4096));const Ce=_&&_.get(K);if(!(o.flags&32)&&ae.flags&VI(ne)){const qe=Ce?no(Ce.declarations,ae.declarations):ae.declarations,Ve=!(B.flags&8192)&&Ws(K)||sc(L);W(qe,Dt=>ht(ko(Dt)||Dt,k.Property_0_was_also_declared_here,Ve)),ht(L||S,k.Duplicate_property_0,Ve),ae=sl(0,K,4096)}return ae.links.nameType=B,ejt(ae,S,ne),ae.parent?z.assert(ae.parent===o,"Existing symbol parent should match new one"):ae.parent=o,D.resolvedSymbol=ae}}return D.resolvedSymbol}function $3e(o,_){const v=Zs(o);if(!v[_]){const S=_==="resolvedExports",D=S?o.flags&1536?KI(o).exports:o.exports:o.members;v[_]=D||Q;const L=ga();for(const ne of o.declarations||x){const ae=exe(ne);if(ae)for(const Ce of ae)S===_d(Ce)&&CZ(Ce)&&xct(o,D,L,Ce)}const B=_O(o).assignmentDeclarationMembers;if(B){const ne=Fn(B.values());for(const ae of ne){const Ce=Lu(ae),qe=Ce===3||cr(ae)&&gpe(ae,Ce)||Ce===9||Ce===6;S===!qe&&CZ(ae)&&xct(o,D,L,ae)}}let K=Ig(D,L);if(o.flags&33554432&&v.cjsExportMerged&&o.declarations)for(const ne of o.declarations){const ae=Zs(ne.symbol)[_];if(!K){K=ae;continue}ae&&ae.forEach((Ce,qe)=>{const Ve=K.get(qe);if(!Ve)K.set(qe,Ce);else{if(Ve===Ce)return;K.set(qe,aC(Ve,Ce))}})}v[_]=K||Q}return v[_]}function Dx(o){return o.flags&6256?$3e(o,"resolvedMembers"):o.members||Q}function p_e(o){if(o.flags&106500&&o.escapedName==="__computed"){const _=Zs(o);if(!_.lateSymbol&&Rt(o.declarations,CZ)){const v=al(o.parent);Rt(o.declarations,_d)?Yp(v):Dx(v)}return _.lateSymbol||(_.lateSymbol=o)}return o}function Wp(o,_,v){if(Rr(o)&4){const S=o.target,D=Nc(o);return O(S.typeParameters)===O(D)?$S(S,no(D,[_||S.thisType])):o}else if(o.flags&2097152){const S=Is(o.types,D=>Wp(D,_,v));return S!==o.types?Fa(S):o}return v?Qh(o):o}function kct(o,_,v,S){let D,L,B,K,ne;mk(v,S,0,v.length)?(L=_.symbol?Dx(_.symbol):ga(_.declaredProperties),B=_.declaredCallSignatures,K=_.declaredConstructSignatures,ne=_.declaredIndexInfos):(D=cp(v,S),L=Cct(_.declaredProperties,D,v.length===1),B=M_e(_.declaredCallSignatures,D),K=M_e(_.declaredConstructSignatures,D),ne=Xut(_.declaredIndexInfos,D));const ae=Yr(_);if(ae.length){if(_.symbol&&L===Dx(_.symbol)){const qe=ga(_.declaredProperties),Ve=fOe(_.symbol);Ve&&qe.set("__index",Ve),L=qe}Jt(o,L,B,K,ne);const Ce=Ql(S);for(const qe of ae){const Ve=Ce?Wp(Ys(qe,D),Ce):qe;Sct(L,Nl(Ve)),B=no(B,ea(Ve,0)),K=no(K,ea(Ve,1));const Dt=Ve!==Je?Xh(Ve):[sy(tt,Je,!1)];ne=no(ne,Ri(Dt,Vt=>!nOe(ne,Vt.keyType)))}}Jt(o,L,B,K,ne)}function tjt(o){kct(o,q3e(o),x,x)}function ijt(o){const _=q3e(o.target),v=no(_.typeParameters,[_.thisType]),S=Nc(o),D=S.length===v.length?S:no(S,[o]);kct(o,_,v,D)}function fb(o,_,v,S,D,L,B,K){const ne=new C(Mi,K);return ne.declaration=o,ne.typeParameters=_,ne.parameters=S,ne.thisParameter=v,ne.resolvedReturnType=D,ne.resolvedTypePredicate=L,ne.minArgumentCount=B,ne.resolvedMinArgumentCount=void 0,ne.target=void 0,ne.mapper=void 0,ne.compositeSignatures=void 0,ne.compositeKind=void 0,ne}function wj(o){const _=fb(o.declaration,o.typeParameters,o.thisParameter,o.parameters,void 0,void 0,o.minArgumentCount,o.flags&167);return _.target=o.target,_.mapper=o.mapper,_.compositeSignatures=o.compositeSignatures,_.compositeKind=o.compositeKind,_}function Tct(o,_){const v=wj(o);return v.compositeSignatures=_,v.compositeKind=1048576,v.target=void 0,v.mapper=void 0,v}function njt(o,_){if((o.flags&24)===_)return o;o.optionalCallSignatureCache||(o.optionalCallSignatureCache={});const v=_===8?"inner":"outer";return o.optionalCallSignatureCache[v]||(o.optionalCallSignatureCache[v]=rjt(o,_))}function rjt(o,_){z.assert(_===8||_===16,"An optional call signature can either be for an inner call chain or an outer call chain, but not both.");const v=wj(o);return v.flags|=_,v}function Dct(o,_){if(vh(o)){const D=o.parameters.length-1,L=o.parameters[D].escapedName,B=Qn(o.parameters[D]);if(Qa(B))return[v(B,D,L)];if(!_&&B.flags&1048576&&Be(B.types,Qa))return Yt(B.types,K=>v(K,D,L))}return[o.parameters];function v(D,L,B){const K=Nc(D),ne=S(D,B),ae=Yt(K,(Ce,qe)=>{const Ve=ne&&ne[qe]?ne[qe]:e5(o,L+qe,D),Dt=D.target.elementFlags[qe],Vt=Dt&12?32768:Dt&2?16384:0,Kt=sl(1,Ve,Vt);return Kt.links.type=Dt&4?sh(Ce):Ce,Kt});return no(o.parameters.slice(0,L),ae)}function S(D,L){const B=new Map;return Yt(D.target.labeledElementDeclarations,(K,ne)=>{const ae=SRe(K,ne,L),Ce=B.get(ae);return Ce===void 0?(B.set(ae,1),ae):(B.set(ae,Ce+1),`${ae}_${Ce}`)})}}function sjt(o){const _=ln(o),v=ea(_,1),S=Ub(o.symbol),D=!!S&&Kr(S,64);if(v.length===0)return[fb(void 0,o.localTypeParameters,void 0,x,o,void 0,0,D?4:0)];const L=M2(o),B=Xn(L),K=LZ(L),ne=O(K),ae=[];for(const Ce of v){const qe=a1(Ce.typeParameters),Ve=O(Ce.typeParameters);if(B||ne>=qe&&ne<=Ve){const Dt=Ve?y_e(Ce,Ix(K,Ce.typeParameters,qe,B)):wj(Ce);Dt.typeParameters=o.localTypeParameters,Dt.resolvedReturnType=o,Dt.flags=D?Dt.flags|4:Dt.flags&-5,ae.push(Dt)}}return ae}function g_e(o,_,v,S,D){for(const L of o)if($Z(L,_,v,S,D,v?OUt:Mj))return L}function ojt(o,_,v){if(_.typeParameters){if(v>0)return;for(let D=1;D1&&(v=v===void 0?S:-1);for(const D of o[S])if(!_||!g_e(_,D,!1,!1,!0)){const L=ojt(o,D,S);if(L){let B=D;if(L.length>1){let K=D.thisParameter;const ne=W(L,ae=>ae.thisParameter);if(ne){const ae=Fa(ns(L,Ce=>Ce.thisParameter&&Qn(Ce.thisParameter)));K=cN(ne,ae)}B=Tct(D,L),B.thisParameter=K}(_||(_=[])).push(B)}}}if(!O(_)&&v!==-1){const S=o[v!==void 0?v:0];let D=S.slice();for(const L of o)if(L!==S){const B=L[0];if(z.assert(!!B,"getUnionSignatures bails early on empty signature lists and should not have empty lists on second pass"),D=B.typeParameters&&Rt(D,K=>!!K.typeParameters&&!Ect(B.typeParameters,K.typeParameters))?void 0:Yt(D,K=>cjt(K,B)),!D)break}_=D}return _||x}function Ect(o,_){if(O(o)!==O(_))return!1;if(!o||!_)return!0;const v=cp(_,o);for(let S=0;S=D?o:_,B=L===o?_:o,K=L===o?S:D,ne=ly(o)||ly(_),ae=ne&&!ly(L),Ce=new Array(K+(ae?1:0));for(let qe=0;qe=_1(L)&&qe>=_1(B),qi=qe>=S?void 0:e5(o,qe),An=qe>=D?void 0:e5(_,qe),Cr=qi===An?qi:qi?An?void 0:qi:An,en=sl(1|(Wi&&!Kt?16777216:0),Cr||`arg${qe}`,Kt?32768:Wi?16384:0);en.links.type=Kt?sh(Vt):Vt,Ce[qe]=en}if(ae){const qe=sl(1,"args",32768);qe.links.type=sh(fv(B,K)),B===_&&(qe.links.type=Ys(qe.links.type,v)),Ce[K]=qe}return Ce}function cjt(o,_){const v=o.typeParameters||_.typeParameters;let S;o.typeParameters&&_.typeParameters&&(S=cp(_.typeParameters,o.typeParameters));const D=o.declaration,L=ljt(o,_,S),B=ajt(o.thisParameter,_.thisParameter,S),K=Math.max(o.minArgumentCount,_.minArgumentCount),ne=fb(D,v,B,L,void 0,void 0,K,(o.flags|_.flags)&167);return ne.compositeKind=1048576,ne.compositeSignatures=no(o.compositeKind!==2097152&&o.compositeSignatures||[o],[_]),S?ne.mapper=o.compositeKind!==2097152&&o.mapper&&o.compositeSignatures?BD(o.mapper,S):S:o.compositeKind!==2097152&&o.mapper&&o.compositeSignatures&&(ne.mapper=o.mapper),ne}function Ict(o){const _=Xh(o[0]);if(_){const v=[];for(const S of _){const D=S.keyType;Be(o,L=>!!hb(L,D))&&v.push(sy(D,es(Yt(o,L=>F2(L,D))),Rt(o,L=>hb(L,D).isReadonly)))}return v}return x}function ujt(o){const _=J3e(Yt(o.types,D=>D===md?[ct]:ea(D,0))),v=J3e(Yt(o.types,D=>ea(D,1))),S=Ict(o.types);Jt(o,Q,_,v,S)}function SZ(o,_){return o?_?Fa([o,_]):o:_}function Nct(o){const _=$n(o,S=>ea(S,1).length>0),v=Yt(o,yZ);if(_>0&&_===$n(v,S=>S)){const S=v.indexOf(!0);v[S]=!1}return v}function djt(o,_,v,S){const D=[];for(let L=0;L<_.length;L++)L===S?D.push(o):v[L]&&D.push(Ol(ea(_[L],1)[0]));return Fa(D)}function fjt(o){let _,v,S;const D=o.types,L=Nct(D),B=$n(L,K=>K);for(let K=0;K0&&(ae=Yt(ae,Ce=>{const qe=wj(Ce);return qe.resolvedReturnType=djt(Ol(Ce),D,L,K),qe})),v=Lct(v,ae)}_=Lct(_,ea(ne,0)),S=nd(Xh(ne),(ae,Ce)=>Pct(ae,Ce,!1),S)}Jt(o,Q,_||x,v||x,S||x)}function Lct(o,_){for(const v of _)(!o||Be(o,S=>!$Z(S,v,!1,!1,!1,Mj)))&&(o=xi(o,v));return o}function Pct(o,_,v){if(o)for(let S=0;S{var ne;!(K.flags&418)&&!(K.flags&512&&((ne=K.declarations)!=null&&ne.length)&&Be(K.declarations,Bh))&&B.set(K.escapedName,K)}),v=B}let D;if(Jt(o,v,x,x,x),_.flags&32){const B=Gu(_),K=ln(B);K.flags&11272192?(v=ga(Ne(v)),Sct(v,Nl(K))):K===Je&&(D=sy(tt,Je,!1))}const L=b_e(v);if(L?S=hOe(L):(D&&(S=xi(S,D)),_.flags&384&&(vc(_).flags&32||Rt(o.properties,B=>!!(Qn(B).flags&296)))&&(S=xi(S,mn))),Jt(o,v,x,x,S||x),_.flags&8208&&(o.callSignatures=PD(_)),_.flags&32){const B=Gu(_);let K=_.members?PD(_.members.get("__constructor")):x;_.flags&16&&(K=un(K.slice(),ns(o.callSignatures,ne=>h1(ne.declaration)?fb(ne.declaration,ne.typeParameters,ne.thisParameter,ne.parameters,B,void 0,ne.minArgumentCount,ne.flags&167):void 0))),K.length||(K=sjt(B)),o.constructSignatures=K}}function _jt(o,_,v){return Ys(o,cp([_.indexType,_.objectType],[D0(0),oy([v])]))}function pjt(o){const _=Og(o.mappedType);if(!(_.flags&1048576||_.flags&2097152))return;const v=_.flags&1048576?_.origin:_;if(!v||!(v.flags&2097152))return;const S=Fa(v.types.filter(D=>D!==o.constraintType));return S!==rn?S:void 0}function gjt(o){const _=hb(o.source,tt),v=ny(o.mappedType),S=!(v&1),D=v&4?0:16777216,L=_?[sy(tt,npe(_.type,o.mappedType,o.constraintType)||Gt,S&&_.isReadonly)]:x,B=ga(),K=pjt(o);for(const ne of Nl(o.source)){if(K){const qe=PA(ne,8576);if(!ba(qe,K))continue}const ae=8192|(S&&hv(ne)?8:0),Ce=sl(4|ne.flags&D,ne.escapedName,ae);if(Ce.declarations=ne.declarations,Ce.links.nameType=Zs(ne).nameType,Ce.links.propertyType=Qn(ne),o.constraintType.type.flags&8388608&&o.constraintType.type.objectType.flags&262144&&o.constraintType.type.indexType.flags&262144){const qe=o.constraintType.type.objectType,Ve=_jt(o.mappedType,o.constraintType.type,qe);Ce.links.mappedType=Ve,Ce.links.constraintType=l1(qe)}else Ce.links.mappedType=o.mappedType,Ce.links.constraintType=o.constraintType;B.set(ne.escapedName,Ce)}Jt(o,B,x,x,L)}function wZ(o){if(o.flags&4194304){const _=Qh(o.type);return Mx(_)?Sut(_):l1(_)}if(o.flags&16777216){if(o.root.isDistributive){const _=o.checkType,v=wZ(_);if(v!==_)return JOe(o,aN(o.root.checkType,v,o.mapper),!1)}return o}if(o.flags&1048576)return Zc(o,wZ,!0);if(o.flags&2097152){const _=o.types;return _.length===2&&_[0].flags&76&&_[1]===wh?o:Fa(Is(o.types,wZ))}return o}function G3e(o){return Pu(o)&4096}function K3e(o,_,v,S){for(const D of Nl(o))S(PA(D,_));if(o.flags&1)S(tt);else for(const D of Xh(o))(!v||D.keyType.flags&134217732)&&S(D.keyType)}function mjt(o){const _=ga();let v;Jt(o,Q,x,x,x);const S=av(o),D=Og(o),L=o.target||o,B=qS(L),K=m_e(L)!==2,ne=bC(L),ae=Qh(ND(o)),Ce=ny(o);DO(o)?K3e(ae,8576,!1,Ve):hN(wZ(D),Ve),Jt(o,_,x,x,v||x);function Ve(Vt){const Kt=B?Ys(B,Pj(o.mapper,S,Vt)):Vt;hN(Kt,Wi=>Dt(Vt,Wi))}function Dt(Vt,Kt){if(Pm(Kt)){const Wi=Am(Kt),qi=_.get(Wi);if(qi)qi.links.nameType=es([qi.links.nameType,Kt]),qi.links.keyType=es([qi.links.keyType,Vt]);else{const An=Pm(Vt)?ya(ae,Am(Vt)):void 0,Cr=!!(Ce&4||!(Ce&8)&&An&&An.flags&16777216),en=!!(Ce&1||!(Ce&2)&&An&&hv(An)),vn=be&&!Cr&&An&&An.flags&16777216,In=An?G3e(An):0,Nr=sl(4|(Cr?16777216:0),Wi,In|262144|(en?8:0)|(vn?524288:0));Nr.links.mappedType=o,Nr.links.nameType=Kt,Nr.links.keyType=Vt,An&&(Nr.links.syntheticOrigin=An,Nr.declarations=K?An.declarations:void 0),_.set(Wi,Nr)}}else if(C_e(Kt)||Kt.flags&33){const Wi=Kt.flags&5?tt:Kt.flags&40?Ae:Kt,qi=Ys(ne,Pj(o.mapper,S,Vt)),An=xj(ae,Kt),Cr=!!(Ce&1||!(Ce&2)&&(An!=null&&An.isReadonly)),en=sy(Wi,qi,Cr);v=Pct(v,en,!0)}}}function vjt(o){var _;if(!o.links.type){const v=o.links.mappedType;if(!qm(o,0))return v.containsError=!0,$e;const S=bC(v.target||v),D=Pj(v.mapper,av(v),o.links.keyType),L=Ys(S,D);let B=be&&o.flags&16777216&&!Fu(L,49152)?Rx(L,!0):o.links.checkFlags&524288?Z_e(L):L;ey()||(ht(j,k.Type_of_property_0_circularly_references_itself_in_mapped_type_1,Js(o),Un(v)),B=$e),(_=o.links).type??(_.type=B)}return o.links.type}function av(o){return o.typeParameter||(o.typeParameter=ID(wr(o.declaration.typeParameter)))}function Og(o){return o.constraintType||(o.constraintType=C_(av(o))||$e)}function qS(o){return o.declaration.nameType?o.nameType||(o.nameType=Ys(As(o.declaration.nameType),o.mapper)):void 0}function bC(o){return o.templateType||(o.templateType=o.declaration.type?Ys(va(As(o.declaration.type),!0,!!(ny(o)&4)),o.mapper):$e)}function Act(o){return C6(o.declaration.typeParameter)}function DO(o){const _=Act(o);return _.kind===198&&_.operator===143}function ND(o){if(!o.modifiersType)if(DO(o))o.modifiersType=Ys(As(Act(o).type),o.mapper);else{const _=FOe(o.declaration),v=Og(_),S=v&&v.flags&262144?C_(v):v;o.modifiersType=S&&S.flags&4194304?Ys(S.type,o.mapper):Gt}return o.modifiersType}function ny(o){const _=o.declaration;return(_.readonlyToken?_.readonlyToken.kind===41?2:1:0)|(_.questionToken?_.questionToken.kind===41?8:4:0)}function Oct(o){const _=ny(o);return _&8?-1:_&4?1:0}function HF(o){if(Rr(o)&32)return Oct(o)||HF(ND(o));if(o.flags&2097152){const _=HF(o.types[0]);return Be(o.types,(v,S)=>S===0||HF(v)===_)?_:0}return 0}function yjt(o){return!!(Rr(o)&32&&ny(o)&4)}function ap(o){if(Rr(o)&32){const _=Og(o);if(oN(_))return!0;const v=qS(o);if(v&&oN(Ys(v,FD(av(o),_))))return!0}return!1}function m_e(o){const _=qS(o);return _?ba(_,av(o))?1:2:0}function lv(o){return o.members||(o.flags&524288?o.objectFlags&4?ijt(o):o.objectFlags&3?tjt(o):o.objectFlags&1024?gjt(o):o.objectFlags&16?hjt(o):o.objectFlags&32?mjt(o):z.fail("Unhandled object type "+z.formatObjectFlags(o.objectFlags)):o.flags&1048576?ujt(o):o.flags&2097152?fjt(o):z.fail("Unhandled type "+z.formatTypeFlags(o.flags))),o}function Ex(o){return o.flags&524288?lv(o).properties:x}function LD(o,_){if(o.flags&524288){const S=lv(o).members.get(_);if(S&&Z1(S))return S}}function xZ(o){if(!o.resolvedProperties){const _=ga();for(const v of o.types){for(const S of Nl(v))if(!_.has(S.escapedName)){const D=TZ(o,S.escapedName,!!(o.flags&2097152));D&&_.set(S.escapedName,D)}if(o.flags&1048576&&Xh(v).length===0)break}o.resolvedProperties=bx(_)}return o.resolvedProperties}function Nl(o){return o=jF(o),o.flags&3145728?xZ(o):Ex(o)}function bjt(o,_){o=jF(o),o.flags&3670016&&lv(o).members.forEach((v,S)=>{H(v,S)&&_(v,S)})}function Cjt(o,_){return _.properties.some(S=>{const D=S.name&&(J0(S.name)?G_(eV(S.name)):KS(S.name)),L=D&&Pm(D)?Am(D):void 0,B=L===void 0?void 0:Eu(o,L);return!!B&&Bj(B)&&!ba(UA(S),B)})}function Sjt(o){const _=es(o);if(!(_.flags&1048576))return o8e(_);const v=ga();for(const S of o)for(const{escapedName:D}of o8e(S))if(!v.has(D)){const L=Hct(_,D);L&&v.set(D,L)}return Fn(v.values())}function YI(o){return o.flags&262144?C_(o):o.flags&8388608?xjt(o):o.flags&16777216?Fct(o):Hf(o)}function C_(o){return kZ(o)?UF(o):void 0}function wjt(o,_){const v=Aj(o);return!!v&&eN(v,_)}function eN(o,_=0){var v;return _<5&&!!(o&&(o.flags&262144&&Rt((v=o.symbol)==null?void 0:v.declarations,S=>Kr(S,4096))||o.flags&3145728&&Rt(o.types,S=>eN(S,_))||o.flags&8388608&&eN(o.objectType,_+1)||o.flags&16777216&&eN(Fct(o),_+1)||o.flags&33554432&&eN(o.baseType,_)||Rr(o)&32&&wjt(o,_)||Mx(o)&&Nt(OD(o),(S,D)=>!!(o.target.elementFlags[D]&8)&&eN(S,_))>=0))}function xjt(o){return kZ(o)?kjt(o):void 0}function Q3e(o){const _=CC(o,!1);return _!==o?_:YI(o)}function kjt(o){if(eOe(o))return I_e(o.objectType,o.indexType);const _=Q3e(o.indexType);if(_&&_!==o.indexType){const S=Lx(o.objectType,_,o.accessFlags);if(S)return S}const v=Q3e(o.objectType);if(v&&v!==o.objectType)return Lx(v,o.indexType,o.accessFlags)}function X3e(o){if(!o.resolvedDefaultConstraint){const _=uUt(o),v=V2(o);o.resolvedDefaultConstraint=Al(_)?v:Al(v)?_:es([_,v])}return o.resolvedDefaultConstraint}function Mct(o){if(o.resolvedConstraintOfDistributive!==void 0)return o.resolvedConstraintOfDistributive||void 0;if(o.root.isDistributive&&o.restrictiveInstantiation!==o){const _=CC(o.checkType,!1),v=_===o.checkType?YI(_):_;if(v&&v!==o.checkType){const S=JOe(o,aN(o.root.checkType,v,o.mapper),!0);if(!(S.flags&131072))return o.resolvedConstraintOfDistributive=S,S}}o.resolvedConstraintOfDistributive=!1}function Rct(o){return Mct(o)||X3e(o)}function Fct(o){return kZ(o)?Rct(o):void 0}function Tjt(o,_){let v,S=!1;for(const D of o)if(D.flags&465829888){let L=YI(D);for(;L&&L.flags&21233664;)L=YI(L);L&&(v=xi(v,L),_&&(v=xi(v,D)))}else(D.flags&469892092||ay(D))&&(S=!0);if(v&&(_||S)){if(S)for(const D of o)(D.flags&469892092||ay(D))&&(v=xi(v,D));return zZ(Fa(v,2),!1)}}function Hf(o){if(o.flags&464781312||Mx(o)){const _=Z3e(o);return _!==Ul&&_!==wl?_:void 0}return o.flags&4194304?$i:void 0}function ry(o){return Hf(o)||o}function kZ(o){return Z3e(o)!==wl}function Z3e(o){if(o.resolvedBaseConstraint)return o.resolvedBaseConstraint;const _=[];return o.resolvedBaseConstraint=v(o);function v(L){if(!L.immediateBaseConstraint){if(!qm(L,4))return wl;let B;const K=$_e(L);if((_.length<10||_.length<50&&!Mt(_,K))&&(_.push(K),B=D(CC(L,!1)),_.pop()),!ey()){if(L.flags&262144){const ne=S_e(L);if(ne){const ae=ht(ne,k.Type_parameter_0_has_a_circular_constraint,Un(L));j&&!OT(ne,j)&&!OT(j,ne)&&fa(ae,Kn(j,k.Circularity_originates_in_type_at_this_location))}}B=wl}L.immediateBaseConstraint??(L.immediateBaseConstraint=B||Ul)}return L.immediateBaseConstraint}function S(L){const B=v(L);return B!==Ul&&B!==wl?B:void 0}function D(L){if(L.flags&262144){const B=UF(L);return L.isThisType||!B?B:S(B)}if(L.flags&3145728){const B=L.types,K=[];let ne=!1;for(const ae of B){const Ce=S(ae);Ce?(Ce!==ae&&(ne=!0),K.push(Ce)):ne=!0}return ne?L.flags&1048576&&K.length===B.length?es(K):L.flags&2097152&&K.length?Fa(K):void 0:L}if(L.flags&4194304)return $i;if(L.flags&134217728){const B=L.types,K=ns(B,S);return K.length===B.length?nN(L.texts,K):tt}if(L.flags&268435456){const B=S(L.type);return B&&B!==L.type?AA(L.symbol,B):tt}if(L.flags&8388608){if(eOe(L))return S(I_e(L.objectType,L.indexType));const B=S(L.objectType),K=S(L.indexType),ne=B&&K&&Lx(B,K,L.accessFlags);return ne&&S(ne)}if(L.flags&16777216){const B=Rct(L);return B&&S(B)}if(L.flags&33554432)return S(vOe(L));if(Mx(L)){const B=Yt(OD(L),(K,ne)=>{const ae=K.flags&262144&&L.target.elementFlags[ne]&8&&S(K)||K;return ae!==K&&dp(ae,Ce=>j2(Ce)&&!Mx(Ce))?ae:K});return oy(B,L.target.elementFlags,L.target.readonly,L.target.labeledElementDeclarations)}return L}}function Djt(o,_){if(o===_)return o.resolvedApparentType||(o.resolvedApparentType=Wp(o,_,!0));const v=`I${kf(o)},${kf(_)}`;return p2(v)??PS(v,Wp(o,_,!0))}function Y3e(o){if(o.default)o.default===Li&&(o.default=wl);else if(o.target){const _=Y3e(o.target);o.default=_?Ys(_,o.mapper):Ul}else{o.default=Li;const _=o.symbol&&W(o.symbol.declarations,S=>Uc(S)&&S.default),v=_?As(_):Ul;o.default===Li&&(o.default=v)}return o.default}function tN(o){const _=Y3e(o);return _!==Ul&&_!==wl?_:void 0}function Ejt(o){return Y3e(o)!==wl}function Bct(o){return!!(o.symbol&&W(o.symbol.declarations,_=>Uc(_)&&_.default))}function Wct(o){return o.resolvedApparentType||(o.resolvedApparentType=Ijt(o))}function Ijt(o){const _=o.target??o,v=Aj(_);if(v&&!_.declaration.nameType){const S=ND(o),D=ap(S)?Wct(S):Hf(S);if(D&&dp(D,L=>j2(L)||Vct(L)))return Ys(_,aN(v,D,o.mapper))}return o}function Vct(o){return!!(o.flags&2097152)&&Be(o.types,j2)}function eOe(o){let _;return!!(o.flags&8388608&&Rr(_=o.objectType)&32&&!ap(_)&&oN(o.indexType)&&!(ny(_)&8)&&!_.declaration.nameType)}function Qh(o){const _=o.flags&465829888?Hf(o)||Gt:o,v=Rr(_);return v&32?Wct(_):v&4&&_!==o?Wp(_,o):_.flags&2097152?Djt(_,o):_.flags&402653316?uo:_.flags&296?rl:_.flags&2112?_zt():_.flags&528?hl:_.flags&12288?hut():_.flags&67108864?Ps:_.flags&4194304?$i:_.flags&2&&!be?Ps:_}function jF(o){return cv(Qh(cv(o)))}function Hct(o,_,v){var S,D,L;let B,K,ne;const ae=o.flags&1048576;let Ce,qe=4,Ve=ae?0:8,Dt=!1;for(const Nr of o.types){const zr=Qh(Nr);if(!(_l(zr)||zr.flags&131072)){const Ur=ya(zr,_,v),Ia=Ur?Qg(Ur):0;if(Ur){if(Ur.flags&106500&&(Ce??(Ce=ae?0:16777216),ae?Ce|=Ur.flags&16777216:Ce&=Ur.flags),!B)B=Ur;else if(Ur!==B)if((UO(Ur)||Ur)===(UO(B)||B)&&rMe(B,Ur,(ll,No)=>ll===No?-1:0)===-1)Dt=!!B.parent&&!!O(US(B.parent));else{K||(K=new Map,K.set(Aa(B),B));const ll=Aa(Ur);K.has(ll)||K.set(ll,Ur)}ae&&hv(Ur)?Ve|=8:!ae&&!hv(Ur)&&(Ve&=-9),Ve|=(Ia&6?0:256)|(Ia&4?512:0)|(Ia&2?1024:0)|(Ia&256?2048:0),YMe(Ur)||(qe=2)}else if(ae){const ta=!Sj(_)&&NA(zr,_);ta?(Ve|=32|(ta.isReadonly?8:0),ne=xi(ne,Qa(zr)?K_e(zr)||wi:ta.type)):q2(zr)&&!(Rr(zr)&2097152)?(Ve|=32,ne=xi(ne,wi)):Ve|=16}}}if(!B||ae&&(K||Ve&48)&&Ve&1536&&!(K&&Njt(K.values())))return;if(!K&&!(Ve&16)&&!ne)if(Dt){const Nr=(S=$r(B,M1))==null?void 0:S.links,zr=cN(B,Nr==null?void 0:Nr.type);return zr.parent=(L=(D=B.valueDeclaration)==null?void 0:D.symbol)==null?void 0:L.parent,zr.links.containingType=o,zr.links.mapper=Nr==null?void 0:Nr.mapper,zr.links.writeType=O2(B),zr}else return B;const Vt=K?Fn(K.values()):[B];let Kt,Wi,qi;const An=[];let Cr,en,vn=!1;for(const Nr of Vt){en?Nr.valueDeclaration&&Nr.valueDeclaration!==en&&(vn=!0):en=Nr.valueDeclaration,Kt=un(Kt,Nr.declarations);const zr=Qn(Nr);Wi||(Wi=zr,qi=Zs(Nr).nameType);const Ur=O2(Nr);(Cr||Ur!==zr)&&(Cr=xi(Cr||An.slice(),Ur)),zr!==Wi&&(Ve|=64),(Bj(zr)||rN(zr))&&(Ve|=128),zr.flags&131072&&zr!==zl&&(Ve|=131072),An.push(zr)}un(An,ne);const In=sl(4|(Ce??0),_,qe|Ve);return In.links.containingType=o,!vn&&en&&(In.valueDeclaration=en,en.symbol.parent&&(In.parent=en.symbol.parent)),In.declarations=Kt,In.links.nameType=qi,An.length>2?(In.links.checkFlags|=65536,In.links.deferralParent=o,In.links.deferralConstituents=An,In.links.deferralWriteConstituents=Cr):(In.links.type=ae?es(An):Fa(An),Cr&&(In.links.writeType=ae?es(Cr):Fa(Cr))),In}function jct(o,_,v){var S,D,L;let B=v?(S=o.propertyCacheWithoutObjectFunctionPropertyAugment)==null?void 0:S.get(_):(D=o.propertyCache)==null?void 0:D.get(_);return B||(B=Hct(o,_,v),B&&((v?o.propertyCacheWithoutObjectFunctionPropertyAugment||(o.propertyCacheWithoutObjectFunctionPropertyAugment=ga()):o.propertyCache||(o.propertyCache=ga())).set(_,B),v&&!(Pu(B)&48)&&!((L=o.propertyCache)!=null&&L.get(_))&&(o.propertyCache||(o.propertyCache=ga())).set(_,B))),B}function Njt(o){let _;for(const v of o){if(!v.declarations)return;if(!_){_=new Set(v.declarations);continue}if(_.forEach(S=>{Mt(v.declarations,S)||_.delete(S)}),_.size===0)return}return _}function TZ(o,_,v){const S=jct(o,_,v);return S&&!(Pu(S)&16)?S:void 0}function cv(o){return o.flags&1048576&&o.objectFlags&16777216?o.resolvedReducedType||(o.resolvedReducedType=Ljt(o)):o.flags&2097152?(o.objectFlags&16777216||(o.objectFlags|=16777216|(Rt(xZ(o),Pjt)?33554432:0)),o.objectFlags&33554432?rn:o):o}function Ljt(o){const _=Is(o.types,cv);if(_===o.types)return o;const v=es(_);return v.flags&1048576&&(v.resolvedReducedType=v),v}function Pjt(o){return zct(o)||Uct(o)}function zct(o){return!(o.flags&16777216)&&(Pu(o)&131264)===192&&!!(Qn(o).flags&131072)}function Uct(o){return!o.valueDeclaration&&!!(Pu(o)&1024)}function tOe(o){return!!(o.flags&1048576&&o.objectFlags&16777216&&Rt(o.types,tOe)||o.flags&2097152&&Ajt(o))}function Ajt(o){const _=o.uniqueLiteralFilledInstantiation||(o.uniqueLiteralFilledInstantiation=Ys(o,co));return cv(_)!==_}function iOe(o,_){if(_.flags&2097152&&Rr(_)&33554432){const v=Me(xZ(_),zct);if(v)return Ro(o,k.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents,Un(_,void 0,536870912),Js(v));const S=Me(xZ(_),Uct);if(S)return Ro(o,k.The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some,Un(_,void 0,536870912),Js(S))}return o}function ya(o,_,v,S){var D,L;if(o=jF(o),o.flags&524288){const B=lv(o),K=B.members.get(_);if(K&&!S&&((D=o.symbol)==null?void 0:D.flags)&512&&((L=Zs(o.symbol).typeOnlyExportStarMap)!=null&&L.has(_)))return;if(K&&Z1(K,S))return K;if(v)return;const ne=B===Mc?md:B.callSignatures.length?wg:B.constructSignatures.length?it:void 0;if(ne){const ae=LD(ne,_);if(ae)return ae}return LD(Nd,_)}if(o.flags&2097152){const B=TZ(o,_,!0);return B||(v?void 0:TZ(o,_,v))}if(o.flags&1048576)return TZ(o,_,v)}function DZ(o,_){if(o.flags&3670016){const v=lv(o);return _===0?v.callSignatures:v.constructSignatures}return x}function ea(o,_){const v=DZ(jF(o),_);if(_===0&&!O(v)&&o.flags&1048576){if(o.arrayFallbackSignatures)return o.arrayFallbackSignatures;let S;if(dp(o,D=>{var L;return!!((L=D.symbol)!=null&&L.parent)&&Ojt(D.symbol.parent)&&(S?S===D.symbol.escapedName:(S=D.symbol.escapedName,!0))})){const D=Zc(o,B=>QS((qct(B.symbol.parent)?Sn:ai).typeParameters[0],B.mapper)),L=sh(D,Km(o,B=>qct(B.symbol.parent)));return o.arrayFallbackSignatures=ea(Eu(L,S),_)}o.arrayFallbackSignatures=v}return v}function Ojt(o){return!o||!ai.symbol||!Sn.symbol?!1:!!w0(o,ai.symbol)||!!w0(o,Sn.symbol)}function qct(o){return!o||!Sn.symbol?!1:!!w0(o,Sn.symbol)}function nOe(o,_){return Me(o,v=>v.keyType===_)}function rOe(o,_){let v,S,D;for(const L of o)L.keyType===tt?v=L:IA(_,L.keyType)&&(S?(D||(D=[S])).push(L):S=L);return D?sy(Gt,Fa(Yt(D,L=>L.type)),nd(D,(L,B)=>L&&B.isReadonly,!0)):S||(v&&IA(_,tt)?v:void 0)}function IA(o,_){return ba(o,_)||_===tt&&ba(o,Ae)||_===Ae&&(o===zo||!!(o.flags&128)&&Yy(o.value))}function sOe(o){return o.flags&3670016?lv(o).indexInfos:x}function Xh(o){return sOe(jF(o))}function hb(o,_){return nOe(Xh(o),_)}function F2(o,_){var v;return(v=hb(o,_))==null?void 0:v.type}function oOe(o,_){return Xh(o).filter(v=>IA(_,v.keyType))}function xj(o,_){return rOe(Xh(o),_)}function NA(o,_){return xj(o,Sj(_)?kn:G_(Ws(_)))}function $ct(o){var _;let v;for(const S of Bw(o))v=gu(v,ID(S.symbol));return v!=null&&v.length?v:Uu(o)?(_=zF(o))==null?void 0:_.typeParameters:void 0}function aOe(o){const _=[];return o.forEach((v,S)=>{XI(S)||_.push(v)}),_}function lOe(o,_){if(Zd(o))return;const v=rh(Ue,'"'+o+'"',512);return v&&_?al(v):v}function cOe(o){return QL(o)||YW(o)||Gs(o)&&wG(o)}function EZ(o){if(cOe(o))return!0;if(!Gs(o))return!1;if(o.initializer){const v=Mg(o.parent),S=o.parent.parameters.indexOf(o);return z.assert(S>=0),S>=_1(v,3)}const _=NT(o.parent);return _?!o.type&&!o.dotDotDotToken&&o.parent.parameters.indexOf(o)>=Npe(_).length:!1}function Mjt(o){return To(o)&&!Mv(o)&&o.questionToken}function kj(o,_,v,S){return{kind:o,parameterName:_,parameterIndex:v,type:S}}function a1(o){let _=0;if(o)for(let v=0;v=v&&L<=D){const B=o?o.slice():[];for(let ne=L;nene.arguments.length&&!qi||(D=v.length)}if((o.kind===177||o.kind===178)&&TO(o)&&(!K||!L)){const Vt=o.kind===177?178:177,Kt=Jc(wr(o),Vt);Kt&&(L=TA(Kt))}B&&B.typeExpression&&(L=cN(sl(1,"this"),As(B.typeExpression)));const qe=Qb(o)?Ok(o):o,Ve=qe&&fu(qe)?Gu(al(qe.parent.symbol)):void 0,Dt=Ve?Ve.localTypeParameters:$ct(o);(Tse(o)||Xn(o)&&Rjt(o,v))&&(S|=1),(n3(o)&&Kr(o,64)||fu(o)&&Kr(o.parent,64))&&(S|=4),_.resolvedSignature=fb(o,Dt,L,v,void 0,void 0,D,S)}return _.resolvedSignature}function Rjt(o,_){if(Qb(o)||!uOe(o))return!1;const v=Ql(o.parameters),S=v?b6(v):Tk(o).filter(em),D=Z(S,B=>B.typeExpression&&JG(B.typeExpression.type)?B.typeExpression.type:void 0),L=sl(3,"args",32768);return D?L.links.type=sh(As(D.type)):(L.links.checkFlags|=65536,L.links.deferralParent=rn,L.links.deferralConstituents=[Xl],L.links.deferralWriteConstituents=[Xl]),D&&_.pop(),_.push(L),!0}function zF(o){if(!(Xn(o)&&rc(o)))return;const _=xk(o);return(_==null?void 0:_.typeExpression)&&mN(As(_.typeExpression))}function Fjt(o,_){const v=zF(o);if(!v)return;const S=o.parameters.indexOf(_);return _.dotDotDotToken?wY(v,S):fv(v,S)}function Bjt(o){const _=zF(o);return _&&Ol(_)}function uOe(o){const _=Tr(o);return _.containsArgumentsReference===void 0&&(_.flags&512?_.containsArgumentsReference=!0:_.containsArgumentsReference=v(o.body)),_.containsArgumentsReference;function v(S){if(!S)return!1;switch(S.kind){case 80:return S.escapedText===nt.escapedName&&uz(S)===nt;case 172:case 174:case 177:case 178:return S.name.kind===167&&v(S.name);case 211:case 212:return v(S.expression);case 303:return v(S.initializer);default:return!poe(S)&&!Lv(S)&&!!jo(S,v)}}}function PD(o){if(!o||!o.declarations)return x;const _=[];for(let v=0;v0&&S.body){const D=o.declarations[v-1];if(S.parent===D.parent&&S.kind===D.kind&&S.pos===D.end)continue}if(Xn(S)&&S.jsDoc){const D=soe(S);if(O(D)){for(const L of D){const B=L.typeExpression;B.type===void 0&&!fu(S)&&U2(B,Je),_.push(Mg(B))}continue}}_.push(!Qw(S)&&!f0(S)&&zF(S)||Mg(S))}}return _}function Jct(o){const _=Gh(o,o);if(_){const v=J_(_);if(v)return Qn(v)}return Je}function B2(o){if(o.thisParameter)return Qn(o.thisParameter)}function dm(o){if(!o.resolvedTypePredicate){if(o.target){const _=dm(o.target);o.resolvedTypePredicate=_?xUt(_,o.mapper):Qc}else if(o.compositeSignatures)o.resolvedTypePredicate=Wzt(o.compositeSignatures,o.compositeKind)||Qc;else{const _=o.declaration&&Dp(o.declaration);let v;if(!_){const S=zF(o.declaration);S&&o!==S&&(v=dm(S))}if(_||v)o.resolvedTypePredicate=_&&kP(_)?Wjt(_,o):v||Qc;else if(o.declaration&&rc(o.declaration)&&(!o.resolvedReturnType||o.resolvedReturnType.flags&16)&&fp(o)>0){const{declaration:S}=o;o.resolvedTypePredicate=Qc,o.resolvedTypePredicate=bKt(S)||Qc}else o.resolvedTypePredicate=Qc}z.assert(!!o.resolvedTypePredicate)}return o.resolvedTypePredicate===Qc?void 0:o.resolvedTypePredicate}function Wjt(o,_){const v=o.parameterName,S=o.type&&As(o.type);return v.kind===197?kj(o.assertsModifier?2:0,void 0,void 0,S):kj(o.assertsModifier?3:1,v.escapedText,Nt(_.parameters,D=>D.escapedName===v.escapedText),S)}function Gct(o,_,v){return _!==2097152?es(o,v):Fa(o)}function Ol(o){if(!o.resolvedReturnType){if(!qm(o,3))return $e;let _=o.target?Ys(Ol(o.target),o.mapper):o.compositeSignatures?Ys(Gct(Yt(o.compositeSignatures,Ol),o.compositeKind,2),o.mapper):EO(o.declaration)||(vu(o.declaration.body)?Je:Ope(o.declaration));if(o.flags&8?_=Idt(_):o.flags&16&&(_=Rx(_)),!ey()){if(o.declaration){const v=Dp(o.declaration);if(v)ht(v,k.Return_type_annotation_circularly_references_itself);else if(ke){const S=o.declaration,D=ko(S);D?ht(D,k._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,sc(D)):ht(S,k.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions)}}_=Je}o.resolvedReturnType??(o.resolvedReturnType=_)}return o.resolvedReturnType}function EO(o){if(o.kind===176)return Gu(al(o.parent.symbol));const _=Dp(o);if(Qb(o)){const v=W6(o);if(v&&fu(v.parent)&&!_)return Gu(al(v.parent.parent.symbol))}if(B6(o))return As(o.parameters[0].type);if(_)return As(_);if(o.kind===177&&TO(o)){const v=Xn(o)&&hs(o);if(v)return v;const S=Jc(wr(o),178),D=ty(S);if(D)return D}return Bjt(o)}function v_e(o){return o.compositeSignatures&&Rt(o.compositeSignatures,v_e)||!o.resolvedReturnType&&CO(o,3)>=0}function Vjt(o){return Kct(o)||Je}function Kct(o){if(vh(o)){const _=Qn(o.parameters[o.parameters.length-1]),v=Qa(_)?K_e(_):_;return v&&F2(v,Ae)}}function Tj(o,_,v,S){const D=dOe(o,Ix(_,o.typeParameters,a1(o.typeParameters),v));if(S){const L=ght(Ol(D));if(L){const B=wj(L);B.typeParameters=S;const K=wj(D);return K.resolvedReturnType=iN(B),K}}return D}function dOe(o,_){const v=o.instantiations||(o.instantiations=new Map),S=Jm(_);let D=v.get(S);return D||v.set(S,D=y_e(o,_)),D}function y_e(o,_){return FA(o,Hjt(o,_),!0)}function Hjt(o,_){return cp(Is(o.typeParameters,v=>v.mapper?Ys(v,v.mapper):v),_)}function Dj(o){return o.typeParameters?o.erasedSignatureCache||(o.erasedSignatureCache=jjt(o)):o}function jjt(o){return FA(o,Zut(o.typeParameters),!0)}function zjt(o){return o.typeParameters?o.canonicalSignatureCache||(o.canonicalSignatureCache=Ujt(o)):o}function Ujt(o){return Tj(o,Yt(o.typeParameters,_=>_.target&&!C_(_.target)?_.target:_),Xn(o.declaration))}function qjt(o){return o.typeParameters?o.implementationSignatureCache||(o.implementationSignatureCache=$jt(o)):o}function $jt(o){return o.typeParameters?FA(o,cp([],[])):o}function Jjt(o){const _=o.typeParameters;if(_){if(o.baseSignatureCache)return o.baseSignatureCache;const v=Zut(_),S=cp(_,Yt(_,L=>C_(L)||Gt));let D=Yt(_,L=>Ys(L,S)||Gt);for(let L=0;L<_.length-1;L++)D=_b(D,S);return D=_b(D,v),o.baseSignatureCache=FA(o,cp(_,D),!0)}return o}function iN(o,_){var v;if(!o.isolatedSignatureType){const S=(v=o.declaration)==null?void 0:v.kind,D=S===void 0||S===176||S===180||S===185,L=tg(134217744,sl(16,"__function"));o.declaration&&!oc(o.declaration)&&(L.symbol.declarations=[o.declaration],L.symbol.valueDeclaration=o.declaration),_||(_=o.declaration&&kO(o.declaration,!0)),L.outerTypeParameters=_,L.members=Q,L.properties=x,L.callSignatures=D?x:[o],L.constructSignatures=D?[o]:x,L.indexInfos=x,o.isolatedSignatureType=L}return o.isolatedSignatureType}function fOe(o){return o.members?b_e(o.members):void 0}function b_e(o){return o.get("__index")}function sy(o,_,v,S){return{keyType:o,type:_,isReadonly:v,declaration:S}}function Qct(o){const _=fOe(o);return _?hOe(_):x}function hOe(o){if(o.declarations){const _=[];for(const v of o.declarations)if(v.parameters.length===1){const S=v.parameters[0];S.type&&hN(As(S.type),D=>{C_e(D)&&!nOe(_,D)&&_.push(sy(D,v.type?As(v.type):Je,Ep(v,8),v))})}return _}return x}function C_e(o){return!!(o.flags&4108)||rN(o)||!!(o.flags&2097152)&&!OA(o)&&Rt(o.types,C_e)}function S_e(o){return ns(Ri(o.symbol&&o.symbol.declarations,Uc),C6)[0]}function Xct(o,_){var v;let S;if((v=o.symbol)!=null&&v.declarations){for(const D of o.symbol.declarations)if(D.parent.kind===195){const[L=D.parent,B]=wxe(D.parent.parent);if(B.kind===183&&!_){const K=B,ne=FRe(K);if(ne){const ae=K.typeArguments.indexOf(L);if(ae()=>pQt(K,ne,Vt))),Ve=Ys(Ce,qe);Ve!==o&&(S=xi(S,Ve))}}}}else if(B.kind===169&&B.dotDotDotToken||B.kind===191||B.kind===202&&B.dotDotDotToken)S=xi(S,sh(Gt));else if(B.kind===204)S=xi(S,tt);else if(B.kind===168&&B.parent.kind===200)S=xi(S,$i);else if(B.kind===200&&B.type&&Il(B.type)===D.parent&&B.parent.kind===194&&B.parent.extendsType===B&&B.parent.checkType.kind===200&&B.parent.checkType.type){const K=B.parent.checkType,ne=As(K.type);S=xi(S,Ys(ne,FD(ID(wr(K.typeParameter)),K.typeParameter.constraint?As(K.typeParameter.constraint):$i)))}}}return S&&Fa(S)}function UF(o){if(!o.constraint)if(o.target){const _=C_(o.target);o.constraint=_?Ys(_,o.mapper):Ul}else{const _=S_e(o);if(!_)o.constraint=Xct(o)||Ul;else{let v=As(_);v.flags&1&&!_l(v)&&(v=_.parent.parent.kind===200?$i:Gt),o.constraint=v}}return o.constraint===Ul?void 0:o.constraint}function Zct(o){const _=Jc(o.symbol,168),v=Rm(_.parent)?TJ(_.parent):_.parent;return v&&Lg(v)}function Jm(o){let _="";if(o){const v=o.length;let S=0;for(;S1&&(_+=":"+L),S+=L}}return _}function LA(o,_){return o?`@${Aa(o)}`+(_?`:${Jm(_)}`:""):""}function IZ(o,_){let v=0;for(const S of o)(_===void 0||!(S.flags&_))&&(v|=Rr(S));return v&458752}function IO(o,_){return Rt(_)&&o===za?Gt:$S(o,_)}function $S(o,_){const v=Jm(_);let S=o.instantiations.get(v);return S||(S=tg(4,o.symbol),o.instantiations.set(v,S),S.objectFlags|=_?IZ(_):0,S.target=o,S.resolvedTypeArguments=_),S}function Yct(o){const _=_C(o.flags,o.symbol);return _.objectFlags=o.objectFlags,_.target=o.target,_.resolvedTypeArguments=o.resolvedTypeArguments,_}function _Oe(o,_,v,S,D){if(!S){S=MA(_);const B=AO(S);D=v?_b(B,v):B}const L=tg(4,o.symbol);return L.target=o,L.node=_,L.mapper=v,L.aliasSymbol=S,L.aliasTypeArguments=D,L}function Nc(o){var _,v;if(!o.resolvedTypeArguments){if(!qm(o,5))return((_=o.target.localTypeParameters)==null?void 0:_.map(()=>$e))||x;const S=o.node,D=S?S.kind===183?no(o.target.outerTypeParameters,Hpe(S,o.target.localTypeParameters)):S.kind===188?[As(S.elementType)]:Yt(S.elements,As):x;ey()?o.resolvedTypeArguments??(o.resolvedTypeArguments=o.mapper?_b(D,o.mapper):D):(o.resolvedTypeArguments??(o.resolvedTypeArguments=((v=o.target.localTypeParameters)==null?void 0:v.map(()=>$e))||x),ht(o.node||j,o.target.symbol?k.Type_arguments_for_0_circularly_reference_themselves:k.Tuple_type_arguments_circularly_reference_themselves,o.target.symbol&&Js(o.target.symbol)))}return o.resolvedTypeArguments}function JS(o){return O(o.target.typeParameters)}function eut(o,_){const v=vc(al(_)),S=v.localTypeParameters;if(S){const D=O(o.typeArguments),L=a1(S),B=Xn(o);if(!(!ke&&B)&&(DS.length)){const ae=B&&Gb(o)&&!AP(o.parent),Ce=L===S.length?ae?k.Expected_0_type_arguments_provide_these_with_an_extends_tag:k.Generic_type_0_requires_1_type_argument_s:ae?k.Expected_0_1_type_arguments_provide_these_with_an_extends_tag:k.Generic_type_0_requires_between_1_and_2_type_arguments,qe=Un(v,void 0,2);if(ht(o,Ce,qe,L,S.length),!B)return $e}if(o.kind===183&&but(o,O(o.typeArguments)!==S.length))return _Oe(v,o,void 0);const ne=no(v.outerTypeParameters,Ix(LZ(o),S,L,B));return $S(v,ne)}return AD(o,_)?v:$e}function NO(o,_,v,S){const D=vc(o);if(D===ii){const ae=Gle.get(o.escapedName);if(ae!==void 0&&_&&_.length===1)return ae===4?pOe(_[0]):AA(o,_[0])}const L=Zs(o),B=L.typeParameters,K=Jm(_)+LA(v,S);let ne=L.instantiations.get(K);return ne||L.instantiations.set(K,ne=tdt(D,cp(B,Ix(_,B,a1(B),Xn(o.valueDeclaration))),v,S)),ne}function Gjt(o,_){if(Pu(_)&1048576){const D=LZ(o),L=LA(_,D);let B=Re.get(L);return B||(B=cd(1,"error",void 0,`alias ${L}`),B.aliasSymbol=_,B.aliasTypeArguments=D,Re.set(L,B)),B}const v=vc(_),S=Zs(_).typeParameters;if(S){const D=O(o.typeArguments),L=a1(S);if(DS.length)return ht(o,L===S.length?k.Generic_type_0_requires_1_type_argument_s:k.Generic_type_0_requires_between_1_and_2_type_arguments,Js(_),L,S.length),$e;const B=MA(o);let K=B&&(tut(_)||!tut(B))?B:void 0,ne;if(K)ne=AO(K);else if($$(o)){const ae=qF(o,2097152,!0);if(ae&&ae!==Ot){const Ce=sf(ae);Ce&&Ce.flags&524288&&(K=Ce,ne=LZ(o)||(S?[]:void 0))}}return NO(_,LZ(o),K,ne)}return AD(o,_)?v:$e}function tut(o){var _;const v=(_=o.declarations)==null?void 0:_.find(wW);return!!(v&&Kp(v))}function Kjt(o){switch(o.kind){case 183:return o.typeName;case 233:const _=o.expression;if(pc(_))return _}}function iut(o){return o.parent?`${iut(o.parent)}.${o.escapedName}`:o.escapedName}function w_e(o){const v=(o.kind===166?o.right:o.kind===211?o.name:o).escapedText;if(v){const S=o.kind===166?w_e(o.left):o.kind===211?w_e(o.expression):void 0,D=S?`${iut(S)}.${v}`:v;let L=Pt.get(D);return L||(Pt.set(D,L=sl(524288,v,1048576)),L.parent=S,L.links.declaredType=qt),L}return Ot}function qF(o,_,v){const S=Kjt(o);if(!S)return Ot;const D=Du(S,_,v);return D&&D!==Ot?D:v?Ot:w_e(S)}function x_e(o,_){if(_===Ot)return $e;if(_=PF(_)||_,_.flags&96)return eut(o,_);if(_.flags&524288)return Gjt(o,_);const v=yct(_);if(v)return AD(o,_)?Zh(v):$e;if(_.flags&111551&&k_e(o)){const S=Qjt(o,_);return S||(qF(o,788968),Qn(_))}return $e}function Qjt(o,_){const v=Tr(o);if(!v.resolvedJSDocType){const S=Qn(_);let D=S;if(_.valueDeclaration){const L=o.kind===205&&o.qualifier;S.symbol&&S.symbol!==_&&L&&(D=x_e(o,S.symbol))}v.resolvedJSDocType=D}return v.resolvedJSDocType}function pOe(o){return gOe(o)?nut(o,Gt):o}function gOe(o){return!!(o.flags&3145728&&Rt(o.types,gOe)||o.flags&33554432&&!LO(o)&&gOe(o.baseType)||o.flags&524288&&!ay(o)||o.flags&432275456&&!rN(o))}function LO(o){return!!(o.flags&33554432&&o.constraint.flags&2)}function mOe(o,_){return _.flags&3||_===o||o.flags&1?o:nut(o,_)}function nut(o,_){const v=`${kf(o)}>${kf(_)}`,S=fs.get(v);if(S)return S;const D=s1(33554432);return D.baseType=o,D.constraint=_,fs.set(v,D),D}function vOe(o){return LO(o)?o.baseType:Fa([o.constraint,o.baseType])}function rut(o){return o.kind===189&&o.elements.length===1}function sut(o,_,v){return rut(_)&&rut(v)?sut(o,_.elements[0],v.elements[0]):Px(As(_))===Px(o)?As(v):void 0}function Xjt(o,_){let v,S=!0;for(;_&&!Es(_)&&_.kind!==320;){const D=_.parent;if(D.kind===169&&(S=!S),(S||o.flags&8650752)&&D.kind===194&&_===D.trueType){const L=sut(o,D.checkType,D.extendsType);L&&(v=xi(v,L))}else if(o.flags&262144&&D.kind===200&&!D.nameType&&_===D.type){const L=As(D);if(av(L)===Px(o)){const B=Aj(L);if(B){const K=C_(B);K&&dp(K,j2)&&(v=xi(v,es([Ae,zo])))}}}_=D}return v?mOe(o,Fa(v)):o}function k_e(o){return!!(o.flags&16777216)&&(o.kind===183||o.kind===205)}function AD(o,_){return o.typeArguments?(ht(o,k.Type_0_is_not_generic,_?Js(_):o.typeName?sc(o.typeName):Ule),!1):!0}function out(o){if(lt(o.typeName)){const _=o.typeArguments;switch(o.typeName.escapedText){case"String":return AD(o),tt;case"Number":return AD(o),Ae;case"Boolean":return AD(o),fn;case"Void":return AD(o),or;case"Undefined":return AD(o),wi;case"Null":return AD(o),je;case"Function":case"function":return AD(o),md;case"array":return(!_||!_.length)&&!ke?Xl:void 0;case"promise":return(!_||!_.length)&&!ke?kY(Je):void 0;case"Object":if(_&&_.length===2){if(CJ(o)){const v=As(_[0]),S=As(_[1]),D=v===tt||v===Ae?[sy(v,S,!1)]:x;return bi(void 0,Q,x,x,D)}return Je}return AD(o),ke?void 0:Je}}}function Zjt(o){const _=As(o.type);return be?KZ(_,65536):_}function NZ(o){const _=Tr(o);if(!_.resolvedType){if(V0(o)&&Ek(o.parent))return _.resolvedSymbol=Ot,_.resolvedType=Vu(o.parent.expression);let v,S;const D=788968;k_e(o)&&(S=out(o),S||(v=qF(o,D,!0),v===Ot?v=qF(o,D|111551):qF(o,D),S=x_e(o,v))),S||(v=qF(o,D),S=x_e(o,v)),_.resolvedSymbol=v,_.resolvedType=S}return _.resolvedType}function LZ(o){return Yt(o.typeArguments,As)}function aut(o){const _=Tr(o);if(!_.resolvedType){const v=Rht(o);_.resolvedType=Zh(up(v))}return _.resolvedType}function lut(o,_){function v(D){const L=D.declarations;if(L)for(const B of L)switch(B.kind){case 263:case 264:case 266:return B}}if(!o)return _?za:Ps;const S=vc(o);return S.flags&524288?O(S.typeParameters)!==_?(ht(v(o),k.Global_type_0_must_have_1_type_parameter_s,xu(o),_),_?za:Ps):S:(ht(v(o),k.Global_type_0_must_be_a_class_or_interface_type,xu(o)),_?za:Ps)}function yOe(o,_){return PO(o,111551,_?k.Cannot_find_global_value_0:void 0)}function bOe(o,_){return PO(o,788968,_?k.Cannot_find_global_type_0:void 0)}function T_e(o,_,v){const S=PO(o,788968,v?k.Cannot_find_global_type_0:void 0);if(S&&(vc(S),O(Zs(S).typeParameters)!==_)){const D=S.declarations&&Me(S.declarations,Mm);ht(D,k.Global_type_0_must_have_1_type_parameter_s,xu(S),_);return}return S}function PO(o,_,v){return Ui(void 0,o,_,v,!1,!1)}function Ku(o,_,v){const S=bOe(o,v);return S||v?lut(S,_):void 0}function Yjt(){return nm||(nm=Ku("TypedPropertyDescriptor",1,!0)||za)}function ezt(){return Vn||(Vn=Ku("TemplateStringsArray",0,!0)||Ps)}function cut(){return Lr||(Lr=Ku("ImportMeta",0,!0)||Ps)}function uut(){if(!ls){const o=sl(0,"ImportMetaExpression"),_=cut(),v=sl(4,"meta",8);v.parent=o,v.links.type=_;const S=ga([v]);o.members=S,ls=bi(o,S,x,x,x)}return ls}function dut(o){return ie||(ie=Ku("ImportCallOptions",0,o))||Ps}function COe(o){return Xe||(Xe=Ku("ImportAttributes",0,o))||Ps}function fut(o){return ev||(ev=yOe("Symbol",o))}function tzt(o){return xg||(xg=bOe("SymbolConstructor",o))}function hut(){return U_||(U_=Ku("Symbol",0,!1))||Ps}function PZ(o){return kg||(kg=Ku("Promise",1,o))||za}function _ut(o){return $1||($1=Ku("PromiseLike",1,o))||za}function SOe(o){return J1||(J1=yOe("Promise",o))}function izt(o){return q_||(q_=Ku("PromiseConstructorLike",0,o))||Ps}function D_e(o){return At||(At=Ku("AsyncIterable",1,o))||za}function nzt(o){return di||(di=Ku("AsyncIterator",3,o))||za}function rzt(o){return gi||(gi=Ku("AsyncIterableIterator",1,o))||za}function szt(o){return dn||(dn=Ku("AsyncGenerator",3,o))||za}function wOe(o){return vd||(vd=Ku("Iterable",1,o))||za}function ozt(o){return G1||(G1=Ku("Iterator",3,o))||za}function azt(o){return rp||(rp=Ku("IterableIterator",1,o))||za}function lzt(o){return Xv||(Xv=Ku("Generator",3,o))||za}function czt(o){return Tg||(Tg=Ku("IteratorYieldResult",1,o))||za}function uzt(o){return me||(me=Ku("IteratorReturnResult",1,o))||za}function put(o){return ei||(ei=Ku("Disposable",0,o))||Ps}function dzt(o){return Dn||(Dn=Ku("AsyncDisposable",0,o))||Ps}function gut(o,_=0){const v=PO(o,788968,void 0);return v&&lut(v,_)}function fzt(){return Ss||(Ss=T_e("Extract",2,!0)||Ot),Ss===Ot?void 0:Ss}function hzt(){return Vo||(Vo=T_e("Omit",2,!0)||Ot),Vo===Ot?void 0:Vo}function xOe(o){return po||(po=T_e("Awaited",1,o)||(o?Ot:void 0)),po===Ot?void 0:po}function _zt(){return $o||($o=Ku("BigInt",0,!1))||Ps}function pzt(o){return hu??(hu=Ku("ClassDecoratorContext",1,o))??za}function gzt(o){return rm??(rm=Ku("ClassMethodDecoratorContext",2,o))??za}function mzt(o){return g0??(g0=Ku("ClassGetterDecoratorContext",2,o))??za}function vzt(o){return K1??(K1=Ku("ClassSetterDecoratorContext",2,o))??za}function yzt(o){return ob??(ob=Ku("ClassAccessorDecoratorContext",2,o))??za}function bzt(o){return DS??(DS=Ku("ClassAccessorDecoratorTarget",2,o))??za}function Czt(o){return ab??(ab=Ku("ClassAccessorDecoratorResult",2,o))??za}function Szt(o){return sm??(sm=Ku("ClassFieldDecoratorContext",2,o))??za}function wzt(){return Dl||(Dl=yOe("NaN",!1))}function xzt(){return Ga||(Ga=T_e("Record",2,!0)||Ot),Ga===Ot?void 0:Ga}function Ej(o,_){return o!==za?$S(o,_):Ps}function mut(o){return Ej(Yjt(),[o])}function vut(o){return Ej(wOe(!0),[o])}function sh(o,_){return Ej(_?Sn:ai,[o])}function kOe(o){switch(o.kind){case 190:return 2;case 191:return yut(o);case 202:return o.questionToken?2:o.dotDotDotToken?yut(o):1;default:return 1}}function yut(o){return FZ(o.type)?4:8}function kzt(o){const _=Ezt(o.parent);if(FZ(o))return _?Sn:ai;const S=Yt(o.elements,kOe);return TOe(S,_,Yt(o.elements,Tzt))}function Tzt(o){return r3(o)||Gs(o)?o:void 0}function but(o,_){return!!MA(o)||Cut(o)&&(o.kind===188?Nx(o.elementType):o.kind===189?Rt(o.elements,Nx):_||Rt(o.typeArguments,Nx))}function Cut(o){const _=o.parent;switch(_.kind){case 196:case 202:case 183:case 192:case 193:case 199:case 194:case 198:case 188:case 189:return Cut(_);case 265:return!0}return!1}function Nx(o){switch(o.kind){case 183:return k_e(o)||!!(qF(o,788968).flags&524288);case 186:return!0;case 198:return o.operator!==158&&Nx(o.type);case 196:case 190:case 202:case 316:case 314:case 315:case 309:return Nx(o.type);case 191:return o.type.kind!==188||Nx(o.type.elementType);case 192:case 193:return Rt(o.types,Nx);case 199:return Nx(o.objectType)||Nx(o.indexType);case 194:return Nx(o.checkType)||Nx(o.extendsType)||Nx(o.trueType)||Nx(o.falseType)}return!1}function Dzt(o){const _=Tr(o);if(!_.resolvedType){const v=kzt(o);if(v===za)_.resolvedType=Ps;else if(!(o.kind===189&&Rt(o.elements,S=>!!(kOe(S)&8)))&&but(o))_.resolvedType=o.kind===189&&o.elements.length===0?v:_Oe(v,o,void 0);else{const S=o.kind===188?[As(o.elementType)]:Yt(o.elements,As);_.resolvedType=DOe(v,S)}}return _.resolvedType}function Ezt(o){return Hk(o)&&o.operator===148}function oy(o,_,v=!1,S=[]){const D=TOe(_||Yt(o,L=>1),v,S);return D===za?Ps:o.length?DOe(D,o):D}function TOe(o,_,v){if(o.length===1&&o[0]&4)return _?Sn:ai;const S=Yt(o,L=>L&1?"#":L&2?"?":L&4?".":"*").join()+(_?"R":"")+(Rt(v,L=>!!L)?","+Yt(v,L=>L?Tl(L):"_").join(","):"");let D=Hs.get(S);return D||Hs.set(S,D=Izt(o,_,v)),D}function Izt(o,_,v){const S=o.length,D=$n(o,qe=>!!(qe&9));let L;const B=[];let K=0;if(S){L=new Array(S);for(let qe=0;qe!!(o.elementFlags[Wi]&8&&Kt.flags&1179648));if(Vt>=0)return OZ(Yt(_,(Kt,Wi)=>o.elementFlags[Wi]&8?Kt:Gt))?Zc(_[Vt],Kt=>EOe(o,IL(_,Vt,Kt))):$e}const B=[],K=[],ne=[];let ae=-1,Ce=-1,qe=-1;for(let Vt=0;Vt<_.length;Vt++){const Kt=_[Vt],Wi=o.elementFlags[Vt];if(Wi&8)if(Kt.flags&1)Dt(Kt,4,(v=o.labeledElementDeclarations)==null?void 0:v[Vt]);else if(Kt.flags&58982400||ap(Kt))Dt(Kt,8,(S=o.labeledElementDeclarations)==null?void 0:S[Vt]);else if(Qa(Kt)){const qi=OD(Kt);if(qi.length+B.length>=1e4)return ht(j,Lv(j)?k.Type_produces_a_tuple_type_that_is_too_large_to_represent:k.Expression_produces_a_tuple_type_that_is_too_large_to_represent),$e;W(qi,(An,Cr)=>{var en;return Dt(An,Kt.target.elementFlags[Cr],(en=Kt.target.labeledElementDeclarations)==null?void 0:en[Cr])})}else Dt(XS(Kt)&&F2(Kt,Ae)||$e,4,(D=o.labeledElementDeclarations)==null?void 0:D[Vt]);else Dt(Kt,Wi,(L=o.labeledElementDeclarations)==null?void 0:L[Vt])}for(let Vt=0;Vt=0&&CeK[Ce+Kt]&8?lp(Vt,Ae):Vt)),B.splice(Ce+1,qe-Ce),K.splice(Ce+1,qe-Ce),ne.splice(Ce+1,qe-Ce));const Ve=TOe(K,o.readonly,ne);return Ve===za?Ps:K.length?$S(Ve,B):Ve;function Dt(Vt,Kt,Wi){Kt&1&&(ae=K.length),Kt&4&&Ce<0&&(Ce=K.length),Kt&6&&(qe=K.length),B.push(Kt&2?va(Vt,!0):Vt),K.push(Kt),ne.push(Wi)}}function $F(o,_,v=0){const S=o.target,D=JS(o)-v;return _>S.fixedLength?pqt(o)||oy(x):oy(Nc(o).slice(_,D),S.elementFlags.slice(_,D),!1,S.labeledElementDeclarations&&S.labeledElementDeclarations.slice(_,D))}function Sut(o){return es(xi(Pn(o.target.fixedLength,_=>G_(""+_)),l1(o.target.readonly?Sn:ai)))}function Nzt(o,_){const v=Nt(o.elementFlags,S=>!(S&_));return v>=0?v:o.elementFlags.length}function Ij(o,_){return o.elementFlags.length-Ni(o.elementFlags,v=>!(v&_))-1}function IOe(o){return o.fixedLength+Ij(o,3)}function OD(o){const _=Nc(o),v=JS(o);return _.length===v?_:_.slice(0,v)}function Lzt(o){return va(As(o.type),!0)}function kf(o){return o.id}function GS(o,_){return Fy(o,_,kf,hc)>=0}function AZ(o,_){const v=Fy(o,_,kf,hc);return v<0?(o.splice(~v,0,_),!0):!1}function Pzt(o,_,v){const S=v.flags;if(!(S&131072))if(_|=S&473694207,S&465829888&&(_|=33554432),S&2097152&&Rr(v)&67108864&&(_|=536870912),v===kt&&(_|=8388608),_l(v)&&(_|=1073741824),!be&&S&98304)Rr(v)&65536||(_|=4194304);else{const D=o.length,L=D&&v.id>o[D-1].id?~D:Fy(o,v,kf,hc);L<0&&o.splice(~L,0,v)}return _}function wut(o,_,v){let S;for(const D of v)D!==S&&(_=D.flags&1048576?wut(o,_|(Bzt(D)?1048576:0),D.types):Pzt(o,_,D),S=D);return _}function Azt(o,_){var v;if(o.length<2)return o;const S=Jm(o),D=Ds.get(S);if(D)return D;const L=_&&Rt(o,ae=>!!(ae.flags&524288)&&!ap(ae)&&XOe(lv(ae))),B=o.length;let K=B,ne=0;for(;K>0;){K--;const ae=o[K];if(L||ae.flags&469499904){if(ae.flags&262144&&ry(ae).flags&1048576){c1(ae,es(Yt(o,Ve=>Ve===ae?rn:Ve)),om)&&Mw(o,K);continue}const Ce=ae.flags&61603840?Me(Nl(ae),Ve=>uv(Qn(Ve))):void 0,qe=Ce&&Zh(Qn(Ce));for(const Ve of o)if(ae!==Ve){if(ne===1e5&&ne/(B-K)*B>1e6){(v=sr)==null||v.instant(sr.Phase.CheckTypes,"removeSubtypes_DepthLimit",{typeIds:o.map(Vt=>Vt.id)}),ht(j,k.Expression_produces_a_union_type_that_is_too_complex_to_represent);return}if(ne++,Ce&&Ve.flags&61603840){const Dt=Eu(Ve,Ce.escapedName);if(Dt&&uv(Dt)&&Zh(Dt)!==qe)continue}if(c1(ae,Ve,om)&&(!(Rr(wO(ae))&1)||!(Rr(wO(Ve))&1)||H2(ae,Ve))){Mw(o,K);break}}}}return Ds.set(S,o),o}function Ozt(o,_,v){let S=o.length;for(;S>0;){S--;const D=o[S],L=D.flags;(L&402653312&&_&4||L&256&&_&8||L&2048&&_&64||L&8192&&_&4096||v&&L&32768&&_&16384||RD(D)&&GS(o,D.regularType))&&Mw(o,S)}}function Mzt(o){const _=Ri(o,rN);if(_.length){let v=o.length;for(;v>0;){v--;const S=o[v];S.flags&128&&Rt(_,D=>Rzt(S,D))&&Mw(o,v)}}}function Rzt(o,_){return _.flags&134217728?spe(o,_):rpe(o,_)}function Fzt(o){const _=[];for(const v of o)if(v.flags&2097152&&Rr(v)&67108864){const S=v.types[0].flags&8650752?0:1;Cc(_,v.types[S])}for(const v of _){const S=[];for(const L of o)if(L.flags&2097152&&Rr(L)&67108864){const B=L.types[0].flags&8650752?0:1;L.types[B]===v&&AZ(S,L.types[1-B])}const D=Hf(v);if(dp(D,L=>GS(S,L))){let L=o.length;for(;L>0;){L--;const B=o[L];if(B.flags&2097152&&Rr(B)&67108864){const K=B.types[0].flags&8650752?0:1;B.types[K]===v&&GS(S,B.types[1-K])&&Mw(o,L)}}AZ(o,v)}}}function Bzt(o){return!!(o.flags&1048576&&(o.aliasSymbol||o.origin))}function xut(o,_){for(const v of _)if(v.flags&1048576){const S=v.origin;v.aliasSymbol||S&&!(S.flags&1048576)?Cc(o,v):S&&S.flags&1048576&&xut(o,S.types)}}function NOe(o,_){const v=QI(o);return v.types=_,v}function es(o,_=1,v,S,D){if(o.length===0)return rn;if(o.length===1)return o[0];if(o.length===2&&!D&&(o[0].flags&1048576||o[1].flags&1048576)){const L=_===0?"N":_===2?"S":"L",B=o[0].id=2&&L[0]===wi&&L[1]===ut&&Mw(L,1),(B&402664352||B&16384&&B&32768)&&Ozt(L,B,!!(_&2)),B&128&&B&402653184&&Mzt(L),B&536870912&&Fzt(L),_===2&&(L=Azt(L,!!(B&524288)),!L))return $e;if(L.length===0)return B&65536?B&4194304?je:de:B&32768?B&4194304?wi:ce:rn}if(!D&&B&1048576){const ne=[];xut(ne,o);const ae=[];for(const qe of L)Rt(ne,Ve=>GS(Ve.types,qe))||ae.push(qe);if(!v&&ne.length===1&&ae.length===0)return ne[0];if(nd(ne,(qe,Ve)=>qe+Ve.types.length,0)+ae.length===L.length){for(const qe of ne)AZ(ae,qe);D=NOe(1048576,ae)}}const K=(B&36323331?0:32768)|(B&2097152?16777216:0);return POe(L,K,v,S,D)}function Wzt(o,_){let v;const S=[];for(const L of o){const B=dm(L);if(B){if(B.kind!==0&&B.kind!==1||v&&!LOe(v,B))return;v=B,S.push(B.type)}else{const K=_!==2097152?Ol(L):void 0;if(K!==Qt&&K!==ni)return}}if(!v)return;const D=Gct(S,_);return kj(v.kind,v.parameterName,v.parameterIndex,D)}function LOe(o,_){return o.kind===_.kind&&o.parameterIndex===_.parameterIndex}function POe(o,_,v,S,D){if(o.length===0)return rn;if(o.length===1)return o[0];const B=(D?D.flags&1048576?`|${Jm(D.types)}`:D.flags&2097152?`&${Jm(D.types)}`:`#${D.type.id}|${Jm(o)}`:Jm(o))+LA(v,S);let K=Wo.get(B);return K||(K=s1(1048576),K.objectFlags=_|IZ(o,98304),K.types=o,K.origin=D,K.aliasSymbol=v,K.aliasTypeArguments=S,o.length===2&&o[0].flags&512&&o[1].flags&512&&(K.flags|=16,K.intrinsicName="boolean"),Wo.set(B,K)),K}function Vzt(o){const _=Tr(o);if(!_.resolvedType){const v=MA(o);_.resolvedType=es(Yt(o.types,As),1,v,AO(v))}return _.resolvedType}function Hzt(o,_,v){const S=v.flags;return S&2097152?Tut(o,_,v.types):(ay(v)?_&16777216||(_|=16777216,o.set(v.id.toString(),v)):(S&3?(v===kt&&(_|=8388608),_l(v)&&(_|=1073741824)):(be||!(S&98304))&&(v===ut&&(_|=262144,v=wi),o.has(v.id.toString())||(v.flags&109472&&_&109472&&(_|=67108864),o.set(v.id.toString(),v))),_|=S&473694207),_)}function Tut(o,_,v){for(const S of v)_=Hzt(o,_,Zh(S));return _}function jzt(o,_){let v=o.length;for(;v>0;){v--;const S=o[v];(S.flags&4&&_&402653312||S.flags&8&&_&256||S.flags&64&&_&2048||S.flags&4096&&_&8192||S.flags&16384&&_&32768||ay(S)&&_&470302716)&&Mw(o,v)}}function zzt(o,_){for(const v of o)if(!GS(v.types,_)){const S=_.flags&128?tt:_.flags&288?Ae:_.flags&2048?Ke:_.flags&8192?kn:void 0;if(!S||!GS(v.types,S))return!1}return!0}function Uzt(o){let _=o.length;const v=Ri(o,S=>!!(S.flags&128));for(;_>0;){_--;const S=o[_];if(S.flags&402653184){for(const D of v)if(Ax(D,S)){Mw(o,_);break}else if(rN(S))return!0}}return!1}function Dut(o,_){for(let v=0;v!(S.flags&_))}function qzt(o){let _;const v=Nt(o,B=>!!(Rr(B)&32768));if(v<0)return!1;let S=v+1;for(;S!!(Vt.flags&469893116)||ay(Vt))){if(VZ(Dt,Ve))return qe;if(!(Dt.flags&1048576&&Km(Dt,Vt=>VZ(Vt,Ve)))&&!VZ(Ve,Dt))return rn;K=67108864}}}const ne=Jm(B)+(_&2?"*":LA(v,S));let ae=Fo.get(ne);if(!ae){if(L&1048576)if(qzt(B))ae=Fa(B,_,v,S);else if(Be(B,Ce=>!!(Ce.flags&1048576&&Ce.types[0].flags&32768))){const Ce=Rt(B,Vj)?ut:wi;Dut(B,32768),ae=es([Fa(B,_),Ce],1,v,S)}else if(Be(B,Ce=>!!(Ce.flags&1048576&&(Ce.types[0].flags&65536||Ce.types[1].flags&65536))))Dut(B,65536),ae=es([Fa(B,_),je],1,v,S);else if(B.length>=4){const Ce=Math.floor(B.length/2);ae=Fa([Fa(B.slice(0,Ce),_),Fa(B.slice(Ce),_)],_,v,S)}else{if(!OZ(B))return $e;const Ce=Jzt(B,_),qe=Rt(Ce,Ve=>!!(Ve.flags&2097152))&&AOe(Ce)>AOe(B)?NOe(2097152,B):void 0;ae=es(Ce,1,v,S,qe)}else ae=$zt(B,K,v,S);Fo.set(ne,ae)}return ae}function Eut(o){return nd(o,(_,v)=>v.flags&1048576?_*v.types.length:v.flags&131072?0:_,1)}function OZ(o){var _;const v=Eut(o);return v>=1e5?((_=sr)==null||_.instant(sr.Phase.CheckTypes,"checkCrossProductUnion_DepthLimit",{typeIds:o.map(S=>S.id),size:v}),ht(j,k.Expression_produces_a_union_type_that_is_too_complex_to_represent),!1):!0}function Jzt(o,_){const v=Eut(o),S=[];for(let D=0;D=0;ne--)if(o[ne].flags&1048576){const ae=o[ne].types,Ce=ae.length;L[ne]=ae[B%Ce],B=Math.floor(B/Ce)}const K=Fa(L,_);K.flags&131072||S.push(K)}return S}function Iut(o){return!(o.flags&3145728)||o.aliasSymbol?1:o.flags&1048576&&o.origin?Iut(o.origin):AOe(o.types)}function AOe(o){return nd(o,(_,v)=>_+Iut(v),0)}function Gzt(o){const _=Tr(o);if(!_.resolvedType){const v=MA(o),S=Yt(o.types,As),D=S.length===2?S.indexOf(wh):-1,L=D>=0?S[1-D]:Gt,B=!!(L.flags&76||L.flags&134217728&&rN(L));_.resolvedType=Fa(S,B?1:0,v,AO(v))}return _.resolvedType}function Nut(o,_){const v=s1(4194304);return v.type=o,v.indexFlags=_,v}function Kzt(o){const _=QI(4194304);return _.type=o,_}function Lut(o,_){return _&1?o.resolvedStringIndexType||(o.resolvedStringIndexType=Nut(o,1)):o.resolvedIndexType||(o.resolvedIndexType=Nut(o,0))}function Put(o,_){const v=av(o),S=Og(o),D=qS(o.target||o);if(!D&&!(_&2))return S;const L=[];if(oN(S)){if(DO(o))return Lut(o,_);hN(S,K)}else if(DO(o)){const ne=Qh(ND(o));K3e(ne,8576,!!(_&1),K)}else hN(wZ(S),K);const B=_&2?ud(es(L),ne=>!(ne.flags&5)):es(L);if(B.flags&1048576&&S.flags&1048576&&Jm(B.types)===Jm(S.types))return S;return B;function K(ne){const ae=D?Ys(D,Pj(o.mapper,v,ne)):ne;L.push(ae===tt?is:ae)}}function Qzt(o){const _=av(o);return v(qS(o)||_);function v(S){return S.flags&470810623?!0:S.flags&16777216?S.root.isDistributive&&S.checkType===_:S.flags&137363456?Be(S.types,v):S.flags&8388608?v(S.objectType)&&v(S.indexType):S.flags&33554432?v(S.baseType)&&v(S.constraint):S.flags&268435456?v(S.type):!1}}function KS(o){if(Vs(o))return rn;if(W_(o))return Zh(fo(o));if(Ja(o))return Zh(u1(o));const _=lI(o);return _!==void 0?G_(Ws(_)):Ut(o)?Zh(fo(o)):rn}function PA(o,_,v){if(v||!(Qg(o)&6)){let S=Zs(p_e(o)).nameType;if(!S){const D=ko(o.valueDeclaration);S=o.escapedName==="default"?G_("default"):D&&KS(D)||(PW(o)?void 0:G_(xu(o)))}if(S&&S.flags&_)return S}return rn}function Aut(o,_){return!!(o.flags&_||o.flags&2097152&&Rt(o.types,v=>Aut(v,_)))}function Xzt(o,_,v){const S=v&&(Rr(o)&7||o.aliasSymbol)?Kzt(o):void 0,D=Yt(Nl(o),B=>PA(B,_)),L=Yt(Xh(o),B=>B!==mn&&Aut(B.keyType,_)?B.keyType===tt&&_&8?is:B.keyType:rn);return es(no(D,L),1,void 0,void 0,S)}function OOe(o,_=0){return!!(o.flags&58982400||Mx(o)||ap(o)&&(!Qzt(o)||m_e(o)===2)||o.flags&1048576&&!(_&4)&&tOe(o)||o.flags&2097152&&Fu(o,465829888)&&Rt(o.types,ay))}function l1(o,_=0){return o=cv(o),LO(o)?pOe(l1(o.baseType,_)):OOe(o,_)?Lut(o,_):o.flags&1048576?Fa(Yt(o.types,v=>l1(v,_))):o.flags&2097152?es(Yt(o.types,v=>l1(v,_))):Rr(o)&32?Put(o,_):o===kt?kt:o.flags&2?rn:o.flags&131073?$i:Xzt(o,(_&2?128:402653316)|(_&1?0:12584),_===0)}function Out(o){const _=fzt();return _?NO(_,[o,tt]):tt}function Zzt(o){const _=Out(l1(o));return _.flags&131072?tt:_}function Yzt(o){const _=Tr(o);if(!_.resolvedType)switch(o.operator){case 143:_.resolvedType=l1(As(o.type));break;case 158:_.resolvedType=o.type.kind===155?zOe(DW(o.parent)):$e;break;case 148:_.resolvedType=As(o.type);break;default:z.assertNever(o.operator)}return _.resolvedType}function eUt(o){const _=Tr(o);return _.resolvedType||(_.resolvedType=nN([o.head.text,...Yt(o.templateSpans,v=>v.literal.text)],Yt(o.templateSpans,v=>As(v.type)))),_.resolvedType}function nN(o,_){const v=Nt(_,ae=>!!(ae.flags&1179648));if(v>=0)return OZ(_)?Zc(_[v],ae=>nN(o,IL(_,v,ae))):$e;if(Mt(_,kt))return kt;const S=[],D=[];let L=o[0];if(!ne(o,_))return tt;if(S.length===0)return G_(L);if(D.push(L),Be(D,ae=>ae==="")){if(Be(S,ae=>!!(ae.flags&4)))return tt;if(S.length===1&&rN(S[0]))return S[0]}const B=`${Jm(S)}|${Yt(D,ae=>ae.length).join(",")}|${D.join("")}`;let K=lr.get(B);return K||lr.set(B,K=iUt(D,S)),K;function ne(ae,Ce){for(let qe=0;qeAA(o,v)):_.flags&128?G_(Mut(o,_.value)):_.flags&134217728?nN(...nUt(o,_.texts,_.types)):_.flags&268435456&&o===_.symbol?_:_.flags&268435461||oN(_)?Rut(o,_):MZ(_)?Rut(o,nN(["",""],[_])):_}function Mut(o,_){switch(Gle.get(o.escapedName)){case 0:return _.toUpperCase();case 1:return _.toLowerCase();case 2:return _.charAt(0).toUpperCase()+_.slice(1);case 3:return _.charAt(0).toLowerCase()+_.slice(1)}return _}function nUt(o,_,v){switch(Gle.get(o.escapedName)){case 0:return[_.map(S=>S.toUpperCase()),v.map(S=>AA(o,S))];case 1:return[_.map(S=>S.toLowerCase()),v.map(S=>AA(o,S))];case 2:return[_[0]===""?_:[_[0].charAt(0).toUpperCase()+_[0].slice(1),..._.slice(1)],_[0]===""?[AA(o,v[0]),...v.slice(1)]:v];case 3:return[_[0]===""?_:[_[0].charAt(0).toLowerCase()+_[0].slice(1),..._.slice(1)],_[0]===""?[AA(o,v[0]),...v.slice(1)]:v]}return[_,v]}function Rut(o,_){const v=`${Aa(o)},${kf(_)}`;let S=as.get(v);return S||as.set(v,S=rUt(o,_)),S}function rUt(o,_){const v=_C(268435456,o);return v.type=_,v}function sUt(o,_,v,S,D){const L=s1(8388608);return L.objectType=o,L.indexType=_,L.accessFlags=v,L.aliasSymbol=S,L.aliasTypeArguments=D,L}function Nj(o){if(ke)return!1;if(Rr(o)&4096)return!0;if(o.flags&1048576)return Be(o.types,Nj);if(o.flags&2097152)return Rt(o.types,Nj);if(o.flags&465829888){const _=Z3e(o);return _!==o&&Nj(_)}return!1}function E_e(o,_){return Pm(o)?Am(o):_&&od(_)?lI(_):void 0}function MOe(o,_){if(_.flags&8208){const v=Xi(o.parent,S=>!Sc(S))||o.parent;return kT(v)?Dv(v)&<(o)&&$dt(v,o):Be(_.declarations,S=>!Bo(S)||Yv(S))}return!0}function Fut(o,_,v,S,D,L){const B=D&&D.kind===212?D:void 0,K=D&&Vs(D)?void 0:E_e(v,D);if(K!==void 0){if(L&256)return $2(_,K)||Je;const ae=ya(_,K);if(ae){if(L&64&&D&&ae.declarations&&am(ae)&&MOe(D,ae)){const qe=(B==null?void 0:B.argumentExpression)??(JT(D)?D.indexType:D);oC(qe,ae.declarations,K)}if(B){if(gY(ae,B,uht(B.expression,_.symbol)),Xht(B,ae,Mk(B))){ht(B.argumentExpression,k.Cannot_assign_to_0_because_it_is_a_read_only_property,Js(ae));return}if(L&8&&(Tr(D).resolvedSymbol=ae),iht(B,ae))return pt}const Ce=L&4?O2(ae):Qn(ae);return B&&Mk(B)!==1?EC(B,Ce):D&&JT(D)&&Vj(Ce)?es([Ce,wi]):Ce}if(dp(_,Qa)&&Yy(K)){const Ce=+K;if(D&&dp(_,qe=>!qe.target.hasRestElement)&&!(L&16)){const qe=ROe(D);if(Qa(_)){if(Ce<0)return ht(qe,k.A_tuple_type_cannot_be_indexed_with_a_negative_value),wi;ht(qe,k.Tuple_type_0_of_length_1_has_no_element_at_index_2,Un(_),JS(_),Ws(K))}else ht(qe,k.Property_0_does_not_exist_on_type_1,Ws(K),Un(_))}if(Ce>=0)return ne(hb(_,Ae)),Tdt(_,Ce,L&1?ut:void 0)}}if(!(v.flags&98304)&&jf(v,402665900)){if(_.flags&131073)return _;const ae=xj(_,v)||hb(_,tt);if(ae){if(L&2&&ae.keyType!==Ae){B&&(L&4?ht(B,k.Type_0_is_generic_and_can_only_be_indexed_for_reading,Un(o)):ht(B,k.Type_0_cannot_be_used_to_index_type_1,Un(v),Un(o)));return}if(D&&ae.keyType===tt&&!jf(v,12)){const Ce=ROe(D);return ht(Ce,k.Type_0_cannot_be_used_as_an_index_type,Un(v)),L&1?es([ae.type,ut]):ae.type}return ne(ae),L&1&&!(_.symbol&&_.symbol.flags&384&&v.symbol&&v.flags&1024&&Vf(v.symbol)===_.symbol)?es([ae.type,ut]):ae.type}if(v.flags&131072)return rn;if(Nj(_))return Je;if(B&&!Fpe(_)){if(q2(_)){if(ke&&v.flags&384)return vl.add(Kn(B,k.Property_0_does_not_exist_on_type_1,v.value,Un(_))),wi;if(v.flags&12){const Ce=Yt(_.properties,qe=>Qn(qe));return es(xi(Ce,wi))}}if(_.symbol===wt&&K!==void 0&&wt.exports.has(K)&&wt.exports.get(K).flags&418)ht(B,k.Property_0_does_not_exist_on_type_1,Ws(K),Un(_));else if(ke&&!(L&128))if(K!==void 0&&sht(K,_)){const Ce=Un(_);ht(B,k.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead,K,Ce,Ce+"["+yu(B.argumentExpression)+"]")}else if(F2(_,Ae))ht(B.argumentExpression,k.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number);else{let Ce;if(K!==void 0&&(Ce=lht(K,_)))Ce!==void 0&&ht(B.argumentExpression,k.Property_0_does_not_exist_on_type_1_Did_you_mean_2,K,Un(_),Ce);else{const qe=aGt(_,B,v);if(qe!==void 0)ht(B,k.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1,Un(_),qe);else{let Ve;if(v.flags&1024)Ve=Ro(void 0,k.Property_0_does_not_exist_on_type_1,"["+Un(v)+"]",Un(_));else if(v.flags&8192){const Dt=r1(v.symbol,B);Ve=Ro(void 0,k.Property_0_does_not_exist_on_type_1,"["+Dt+"]",Un(_))}else v.flags&128||v.flags&256?Ve=Ro(void 0,k.Property_0_does_not_exist_on_type_1,v.value,Un(_)):v.flags&12&&(Ve=Ro(void 0,k.No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1,Un(v),Un(_)));Ve=Ro(Ve,k.Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1,Un(S),Un(_)),vl.add($y(_n(B),B,Ve))}}}return}}if(Nj(_))return Je;if(D){const ae=ROe(D);v.flags&384?ht(ae,k.Property_0_does_not_exist_on_type_1,""+v.value,Un(_)):v.flags&12?ht(ae,k.Type_0_has_no_matching_index_signature_for_type_1,Un(_),Un(v)):ht(ae,k.Type_0_cannot_be_used_as_an_index_type,Un(v))}if(Al(v))return v;return;function ne(ae){ae&&ae.isReadonly&&B&&(lS(B)||aoe(B))&&ht(B,k.Index_signature_in_type_0_only_permits_reading,Un(_))}}function ROe(o){return o.kind===212?o.argumentExpression:o.kind===199?o.indexType:o.kind===167?o.expression:o}function MZ(o){if(o.flags&2097152){let _=!1;for(const v of o.types)if(v.flags&101248||MZ(v))_=!0;else if(!(v.flags&524288))return!1;return _}return!!(o.flags&77)||rN(o)}function rN(o){return!!(o.flags&134217728)&&Be(o.types,MZ)||!!(o.flags&268435456)&&MZ(o.type)}function But(o){return!!(o.flags&402653184)&&!rN(o)}function OA(o){return!!Lj(o)}function sN(o){return!!(Lj(o)&4194304)}function oN(o){return!!(Lj(o)&8388608)}function Lj(o){return o.flags&3145728?(o.objectFlags&2097152||(o.objectFlags|=2097152|nd(o.types,(_,v)=>_|Lj(v),0)),o.objectFlags&12582912):o.flags&33554432?(o.objectFlags&2097152||(o.objectFlags|=2097152|Lj(o.baseType)|Lj(o.constraint)),o.objectFlags&12582912):(o.flags&58982400||ap(o)||Mx(o)?4194304:0)|(o.flags&63176704||But(o)?8388608:0)}function CC(o,_){return o.flags&8388608?aUt(o,_):o.flags&16777216?lUt(o,_):o}function Wut(o,_,v){if(o.flags&1048576||o.flags&2097152&&!OOe(o)){const S=Yt(o.types,D=>CC(lp(D,_),v));return o.flags&2097152||v?Fa(S):es(S)}}function oUt(o,_,v){if(_.flags&1048576){const S=Yt(_.types,D=>CC(lp(o,D),v));return v?Fa(S):es(S)}}function aUt(o,_){const v=_?"simplifiedForWriting":"simplifiedForReading";if(o[v])return o[v]===wl?o:o[v];o[v]=wl;const S=CC(o.objectType,_),D=CC(o.indexType,_),L=oUt(S,D,_);if(L)return o[v]=L;if(!(D.flags&465829888)){const B=Wut(S,D,_);if(B)return o[v]=B}if(Mx(S)&&D.flags&296){const B=KF(S,D.flags&8?0:S.target.fixedLength,0,_);if(B)return o[v]=B}return ap(S)&&m_e(S)!==2?o[v]=Zc(I_e(S,o.indexType),B=>CC(B,_)):o[v]=o}function lUt(o,_){const v=o.checkType,S=o.extendsType,D=W2(o),L=V2(o);if(L.flags&131072&&Px(D)===Px(v)){if(v.flags&1||ba(lN(v),lN(S)))return CC(D,_);if(Vut(v,S))return rn}else if(D.flags&131072&&Px(L)===Px(v)){if(!(v.flags&1)&&ba(lN(v),lN(S)))return rn;if(v.flags&1||Vut(v,S))return CC(L,_)}return o}function Vut(o,_){return!!(es([SZ(o,_),rn]).flags&131072)}function I_e(o,_){const v=cp([av(o)],[_]),S=BD(o.mapper,v),D=Ys(bC(o.target||o),S),L=Oct(o)>0||(OA(o)?HF(ND(o))>0:cUt(o,_));return va(D,!0,L)}function cUt(o,_){const v=Hf(_);return!!v&&Rt(Nl(o),S=>!!(S.flags&16777216)&&ba(PA(S,8576),v))}function lp(o,_,v=0,S,D,L){return Lx(o,_,v,S,D,L)||(S?$e:Gt)}function Hut(o,_){return dp(o,v=>{if(v.flags&384){const S=Am(v);if(Yy(S)){const D=+S;return D>=0&&D<_}}return!1})}function Lx(o,_,v=0,S,D,L){if(o===kt||_===kt)return kt;if(o=cv(o),ddt(o)&&!(_.flags&98304)&&jf(_,12)&&(_=tt),Y.noUncheckedIndexedAccess&&v&32&&(v|=1),oN(_)||(S&&S.kind!==199?Mx(o)&&!Hut(_,IOe(o.target)):sN(o)&&!(Qa(o)&&Hut(_,IOe(o.target)))||tOe(o))){if(o.flags&3)return o;const K=v&1,ne=o.id+","+_.id+","+K+LA(D,L);let ae=hn.get(ne);return ae||hn.set(ne,ae=sUt(o,_,K,D,L)),ae}const B=jF(o);if(_.flags&1048576&&!(_.flags&16)){const K=[];let ne=!1;for(const ae of _.types){const Ce=Fut(o,B,ae,_,S,v|(ne?128:0));if(Ce)K.push(Ce);else if(S)ne=!0;else return}return ne?void 0:v&4?Fa(K,0,D,L):es(K,1,D,L)}return Fut(o,B,_,_,S,v|8|64)}function jut(o){const _=Tr(o);if(!_.resolvedType){const v=As(o.objectType),S=As(o.indexType),D=MA(o);_.resolvedType=lp(v,S,0,o,D,AO(D))}return _.resolvedType}function FOe(o){const _=Tr(o);if(!_.resolvedType){const v=tg(32,o.symbol);v.declaration=o,v.aliasSymbol=MA(o),v.aliasTypeArguments=AO(v.aliasSymbol),_.resolvedType=v,Og(v)}return _.resolvedType}function Px(o){return o.flags&33554432?Px(o.baseType):o.flags&8388608&&(o.objectType.flags&33554432||o.indexType.flags&33554432)?lp(Px(o.objectType),Px(o.indexType)):o}function zut(o){return TP(o)&&O(o.elements)>0&&!Rt(o.elements,_=>WG(_)||VG(_)||r3(_)&&!!(_.questionToken||_.dotDotDotToken))}function Uut(o,_){return OA(o)||_&&Qa(o)&&Rt(OD(o),OA)}function BOe(o,_,v,S,D){let L,B,K=0;for(;;){if(K===1e3)return ht(j,k.Type_instantiation_is_excessively_deep_and_possibly_infinite),$e;const ae=Ys(Px(o.checkType),_),Ce=Ys(o.extendsType,_);if(ae===$e||Ce===$e)return $e;if(ae===kt||Ce===kt)return kt;const qe=T8(o.node.checkType),Ve=T8(o.node.extendsType),Dt=zut(qe)&&zut(Ve)&&O(qe.elements)===O(Ve.elements),Vt=Uut(ae,Dt);let Kt;if(o.inferTypeParameters){const qi=jj(o.inferTypeParameters,void 0,0);_&&(qi.nonFixingMapper=BD(qi.nonFixingMapper,_)),Vt||DC(qi.inferences,ae,Ce,1536),Kt=_?BD(qi.mapper,_):qi.mapper}const Wi=Kt?Ys(o.extendsType,Kt):Ce;if(!Vt&&!Uut(Wi,Dt)){if(!(Wi.flags&3)&&(ae.flags&1||!ba(Oj(ae),Oj(Wi)))){(ae.flags&1||v&&!(Wi.flags&131072)&&Km(Oj(Wi),An=>ba(An,Oj(ae))))&&(B||(B=[])).push(Ys(As(o.node.trueType),Kt||_));const qi=As(o.node.falseType);if(qi.flags&16777216){const An=qi.root;if(An.node.parent===o.node&&(!An.isDistributive||An.checkType===o.checkType)){o=An;continue}if(ne(qi,_))continue}L=Ys(qi,_);break}if(Wi.flags&3||ba(lN(ae),lN(Wi))){const qi=As(o.node.trueType),An=Kt||_;if(ne(qi,An))continue;L=Ys(qi,An);break}}L=s1(16777216),L.root=o,L.checkType=Ys(o.checkType,_),L.extendsType=Ys(o.extendsType,_),L.mapper=_,L.combinedMapper=Kt,L.aliasSymbol=S||o.aliasSymbol,L.aliasTypeArguments=S?D:_b(o.aliasTypeArguments,_);break}return B?es(xi(B,L)):L;function ne(ae,Ce){if(ae.flags&16777216&&Ce){const qe=ae.root;if(qe.outerTypeParameters){const Ve=BD(ae.mapper,Ce),Dt=Yt(qe.outerTypeParameters,Wi=>QS(Wi,Ve)),Vt=cp(qe.outerTypeParameters,Dt),Kt=qe.isDistributive?QS(qe.checkType,Vt):void 0;if(!Kt||Kt===qe.checkType||!(Kt.flags&1179648))return o=qe,_=Vt,S=void 0,D=void 0,qe.aliasSymbol&&K++,!0}}return!1}}function W2(o){return o.resolvedTrueType||(o.resolvedTrueType=Ys(As(o.root.node.trueType),o.mapper))}function V2(o){return o.resolvedFalseType||(o.resolvedFalseType=Ys(As(o.root.node.falseType),o.mapper))}function uUt(o){return o.resolvedInferredTrueType||(o.resolvedInferredTrueType=o.combinedMapper?Ys(As(o.root.node.trueType),o.combinedMapper):W2(o))}function WOe(o){let _;return o.locals&&o.locals.forEach(v=>{v.flags&262144&&(_=xi(_,vc(v)))}),_}function dUt(o){return o.isDistributive&&(WZ(o.checkType,o.node.trueType)||WZ(o.checkType,o.node.falseType))}function fUt(o){const _=Tr(o);if(!_.resolvedType){const v=As(o.checkType),S=MA(o),D=AO(S),L=kO(o,!0),B=D?L:Ri(L,ne=>WZ(ne,o)),K={node:o,checkType:v,extendsType:As(o.extendsType),isDistributive:!!(v.flags&262144),inferTypeParameters:WOe(o),outerTypeParameters:B,instantiations:void 0,aliasSymbol:S,aliasTypeArguments:D};_.resolvedType=BOe(K,void 0,!1),B&&(K.instantiations=new Map,K.instantiations.set(Jm(B),_.resolvedType))}return _.resolvedType}function hUt(o){const _=Tr(o);return _.resolvedType||(_.resolvedType=ID(wr(o.typeParameter))),_.resolvedType}function qut(o){return lt(o)?[o]:xi(qut(o.left),o.right)}function $ut(o){var _;const v=Tr(o);if(!v.resolvedType){if(!rS(o))return ht(o.argument,k.String_literal_expected),v.resolvedSymbol=Ot,v.resolvedType=$e;const S=o.isTypeOf?111551:o.flags&16777216?900095:788968,D=Gh(o,o.argument.literal);if(!D)return v.resolvedSymbol=Ot,v.resolvedType=$e;const L=!!((_=D.exports)!=null&&_.get("export=")),B=J_(D,!1);if(vu(o.qualifier))if(B.flags&S)v.resolvedType=Jut(o,v,B,S);else{const K=S===111551?k.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here:k.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0;ht(o,K,o.argument.literal.text),v.resolvedSymbol=Ot,v.resolvedType=$e}else{const K=qut(o.qualifier);let ne=B,ae;for(;ae=K.shift();){const Ce=K.length?1920:S,qe=al(Ru(ne)),Ve=o.isTypeOf||Xn(o)&&L?ya(Qn(qe),ae.escapedText,!1,!0):void 0,Vt=(o.isTypeOf?void 0:rh(Yp(qe),ae.escapedText,Ce))??Ve;if(!Vt)return ht(ae,k.Namespace_0_has_no_exported_member_1,r1(ne),sc(ae)),v.resolvedType=$e;Tr(ae).resolvedSymbol=Vt,Tr(ae.parent).resolvedSymbol=Vt,ne=Vt}v.resolvedType=Jut(o,v,ne,S)}}return v.resolvedType}function Jut(o,_,v,S){const D=Ru(v);return _.resolvedSymbol=D,S===111551?Fht(Qn(v),o):x_e(o,D)}function Gut(o){const _=Tr(o);if(!_.resolvedType){const v=MA(o);if(Dx(o.symbol).size===0&&!v)_.resolvedType=wh;else{let S=tg(16,o.symbol);S.aliasSymbol=v,S.aliasTypeArguments=AO(v),bI(o)&&o.isArrayType&&(S=sh(S)),_.resolvedType=S}}return _.resolvedType}function MA(o){let _=o.parent;for(;_I(_)||qk(_)||Hk(_)&&_.operator===148;)_=_.parent;return wW(_)?wr(_):void 0}function AO(o){return o?US(o):void 0}function N_e(o){return!!(o.flags&524288)&&!ap(o)}function VOe(o){return wC(o)||!!(o.flags&474058748)}function HOe(o,_){if(!(o.flags&1048576))return o;if(Be(o.types,VOe))return Me(o.types,wC)||Ps;const v=Me(o.types,L=>!VOe(L));if(!v||Me(o.types,L=>L!==v&&!VOe(L)))return o;return D(v);function D(L){const B=ga();for(const ne of Nl(L))if(!(Qg(ne)&6)){if(L_e(ne)){const ae=ne.flags&65536&&!(ne.flags&32768),qe=sl(16777220,ne.escapedName,G3e(ne)|(_?8:0));qe.links.type=ae?wi:va(Qn(ne),!0),qe.declarations=ne.declarations,qe.links.nameType=Zs(ne).nameType,qe.links.syntheticOrigin=ne,B.set(ne.escapedName,qe)}}const K=bi(L.symbol,B,x,x,Xh(L));return K.objectFlags|=131200,K}}function MD(o,_,v,S,D){if(o.flags&1||_.flags&1)return Je;if(o.flags&2||_.flags&2)return Gt;if(o.flags&131072)return _;if(_.flags&131072)return o;if(o=HOe(o,D),o.flags&1048576)return OZ([o,_])?Zc(o,ae=>MD(ae,_,v,S,D)):$e;if(_=HOe(_,D),_.flags&1048576)return OZ([o,_])?Zc(_,ae=>MD(o,ae,v,S,D)):$e;if(_.flags&473960444)return o;if(sN(o)||sN(_)){if(wC(o))return _;if(o.flags&2097152){const ae=o.types,Ce=ae[ae.length-1];if(N_e(Ce)&&N_e(_))return Fa(no(ae.slice(0,ae.length-1),[MD(Ce,_,v,S,D)]))}return Fa([o,_])}const L=ga(),B=new Set,K=o===Ps?Xh(_):Ict([o,_]);for(const ae of Nl(_))Qg(ae)&6?B.add(ae.escapedName):L_e(ae)&&L.set(ae.escapedName,jOe(ae,D));for(const ae of Nl(o))if(!(B.has(ae.escapedName)||!L_e(ae)))if(L.has(ae.escapedName)){const Ce=L.get(ae.escapedName),qe=Qn(Ce);if(Ce.flags&16777216){const Ve=no(ae.declarations,Ce.declarations),Dt=4|ae.flags&16777216,Vt=sl(Dt,ae.escapedName),Kt=Qn(ae),Wi=Z_e(Kt),qi=Z_e(qe);Vt.links.type=Wi===qi?Kt:es([Kt,qi],2),Vt.links.leftSpread=ae,Vt.links.rightSpread=Ce,Vt.declarations=Ve,Vt.links.nameType=Zs(ae).nameType,L.set(ae.escapedName,Vt)}}else L.set(ae.escapedName,jOe(ae,D));const ne=bi(v,L,x,x,Is(K,ae=>_Ut(ae,D)));return ne.objectFlags|=2228352|S,ne}function L_e(o){var _;return!Rt(o.declarations,Fh)&&(!(o.flags&106496)||!((_=o.declarations)!=null&&_.some(v=>ss(v.parent))))}function jOe(o,_){const v=o.flags&65536&&!(o.flags&32768);if(!v&&_===hv(o))return o;const S=4|o.flags&16777216,D=sl(S,o.escapedName,G3e(o)|(_?8:0));return D.links.type=v?wi:Qn(o),D.declarations=o.declarations,D.links.nameType=Zs(o).nameType,D.links.syntheticOrigin=o,D}function _Ut(o,_){return o.isReadonly!==_?sy(o.keyType,o.type,_,o.declaration):o}function RZ(o,_,v,S){const D=_C(o,v);return D.value=_,D.regularType=S||D,D}function RA(o){if(o.flags&2976){if(!o.freshType){const _=RZ(o.flags,o.value,o.symbol,o);_.freshType=_,o.freshType=_}return o.freshType}return o}function Zh(o){return o.flags&2976?o.regularType:o.flags&1048576?o.regularType||(o.regularType=Zc(o,Zh)):o}function RD(o){return!!(o.flags&2976)&&o.freshType===o}function G_(o){let _;return Cn.get(o)||(Cn.set(o,_=RZ(128,o)),_)}function D0(o){let _;return Ko.get(o)||(Ko.set(o,_=RZ(256,o)),_)}function P_e(o){let _;const v=jT(o);return ot.get(v)||(ot.set(v,_=RZ(2048,o)),_)}function pUt(o,_,v){let S;const D=`${_}${typeof o=="string"?"@":"#"}${o}`,L=1024|(typeof o=="string"?128:256);return hi.get(D)||(hi.set(D,S=RZ(L,o,v)),S)}function gUt(o){if(o.literal.kind===106)return je;const _=Tr(o);return _.resolvedType||(_.resolvedType=Zh(fo(o.literal))),_.resolvedType}function mUt(o){const _=_C(8192,o);return _.escapedName=`__@${_.symbol.escapedName}@${Aa(_.symbol)}`,_}function zOe(o){if(Xn(o)&&qk(o)){const _=AT(o);_&&(o=XL(_)||_)}if(nxe(o)){const _=cJ(o)?Lg(o.left):Lg(o);if(_){const v=Zs(_);return v.uniqueESSymbolType||(v.uniqueESSymbolType=mUt(_))}}return kn}function vUt(o){const _=u_(o,!1,!1),v=_&&_.parent;if(v&&(ss(v)||v.kind===264)&&!da(_)&&(!fu(_)||OT(o,_.body)))return Gu(wr(v)).thisType;if(v&&Pa(v)&&cr(v.parent)&&Lu(v.parent)===6)return Gu(Lg(v.parent.left).parent).thisType;const S=o.flags&16777216?Ak(o):void 0;return S&&gc(S)&&cr(S.parent)&&Lu(S.parent)===3?Gu(Lg(S.parent.left).parent).thisType:h1(_)&&OT(o,_.body)?Gu(wr(_)).thisType:(ht(o,k.A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface),$e)}function A_e(o){const _=Tr(o);return _.resolvedType||(_.resolvedType=vUt(o)),_.resolvedType}function Kut(o){return As(FZ(o.type)||o.type)}function FZ(o){switch(o.kind){case 196:return FZ(o.type);case 189:if(o.elements.length===1&&(o=o.elements[0],o.kind===191||o.kind===202&&o.dotDotDotToken))return FZ(o.type);break;case 188:return o.elementType}}function yUt(o){const _=Tr(o);return _.resolvedType||(_.resolvedType=o.dotDotDotToken?Kut(o):va(As(o.type),!0,!!o.questionToken))}function As(o){return Xjt(Qut(o),o)}function Qut(o){switch(o.kind){case 133:case 312:case 313:return Je;case 159:return Gt;case 154:return tt;case 150:return Ae;case 163:return Ke;case 136:return fn;case 155:return kn;case 116:return or;case 157:return wi;case 106:return je;case 146:return rn;case 151:return o.flags&524288&&!ke?Je:Ar;case 141:return ii;case 197:case 110:return A_e(o);case 201:return gUt(o);case 183:return NZ(o);case 182:return o.assertsModifier?or:fn;case 233:return NZ(o);case 186:return aut(o);case 188:case 189:return Dzt(o);case 190:return Lzt(o);case 192:return Vzt(o);case 193:return Gzt(o);case 314:return Zjt(o);case 316:return va(As(o.type));case 202:return yUt(o);case 196:case 315:case 309:return As(o.type);case 191:return Kut(o);case 318:return kZt(o);case 184:case 185:case 187:case 322:case 317:case 323:return Gut(o);case 198:return Yzt(o);case 199:return jut(o);case 200:return FOe(o);case 194:return fUt(o);case 195:return hUt(o);case 203:return eUt(o);case 205:return $ut(o);case 80:case 166:case 211:const _=Qm(o);return _?vc(_):$e;default:return $e}}function O_e(o,_,v){if(o&&o.length)for(let S=0;SS.typeParameter),Yt(v,()=>Gt))}function BD(o,_){return o?R_e(4,o,_):_}function SUt(o,_){return o?R_e(5,o,_):_}function aN(o,_,v){return v?R_e(5,FD(o,_),v):FD(o,_)}function Pj(o,_,v){return o?R_e(5,o,FD(_,v)):FD(_,v)}function wUt(o){return!o.constraint&&!S_e(o)||o.constraint===Ul?o:o.restrictiveInstantiation||(o.restrictiveInstantiation=Pg(o.symbol),o.restrictiveInstantiation.constraint=Ul,o.restrictiveInstantiation)}function qOe(o){const _=Pg(o.symbol);return _.target=o,_}function xUt(o,_){return kj(o.kind,o.parameterName,o.parameterIndex,Ys(o.type,_))}function FA(o,_,v){let S;if(o.typeParameters&&!v){S=Yt(o.typeParameters,qOe),_=BD(cp(o.typeParameters,S),_);for(const L of S)L.mapper=_}const D=fb(o.declaration,S,o.thisParameter&&$Oe(o.thisParameter,_),O_e(o.parameters,_,$Oe),void 0,void 0,o.minArgumentCount,o.flags&167);return D.target=o,D.mapper=_,D}function $Oe(o,_){const v=Zs(o);if(v.type&&!Fx(v.type)&&(!(o.flags&65536)||v.writeType&&!Fx(v.writeType)))return o;Pu(o)&1&&(o=v.target,_=BD(v.mapper,_));const S=sl(o.flags,o.escapedName,1|Pu(o)&53256);return S.declarations=o.declarations,S.parent=o.parent,S.links.target=o,S.links.mapper=_,o.valueDeclaration&&(S.valueDeclaration=o.valueDeclaration),v.nameType&&(S.links.nameType=v.nameType),S}function kUt(o,_,v,S){const D=o.objectFlags&4||o.objectFlags&8388608?o.node:o.symbol.declarations[0],L=Tr(D),B=o.objectFlags&4?L.resolvedType:o.objectFlags&64?o.target:o;let K=o.objectFlags&134217728?o.outerTypeParameters:L.outerTypeParameters;if(!K){let ne=kO(D,!0);if(h1(D)){const Ce=$ct(D);ne=un(ne,Ce)}K=ne||x;const ae=o.objectFlags&8388612?[D]:o.symbol.declarations;K=(B.objectFlags&8388612||B.symbol.flags&8192||B.symbol.flags&2048)&&!B.aliasTypeArguments?Ri(K,Ce=>Rt(ae,qe=>WZ(Ce,qe))):K,L.outerTypeParameters=K}if(K.length){const ne=BD(o.mapper,_),ae=Yt(K,Vt=>QS(Vt,ne)),Ce=v||o.aliasSymbol,qe=v?S:_b(o.aliasTypeArguments,_),Ve=(o.objectFlags&134217728?"S":"")+Jm(ae)+LA(Ce,qe);B.instantiations||(B.instantiations=new Map,B.instantiations.set(Jm(K)+LA(B.aliasSymbol,B.aliasTypeArguments),B));let Dt=B.instantiations.get(Ve);if(!Dt){if(o.objectFlags&134217728)return Dt=F_e(o,_),B.instantiations.set(Ve,Dt),Dt;const Vt=cp(K,ae);Dt=B.objectFlags&4?_Oe(o.target,o.node,Vt,Ce,qe):B.objectFlags&32?DUt(B,Vt,Ce,qe):F_e(B,Vt,Ce,qe),B.instantiations.set(Ve,Dt);const Kt=Rr(Dt);if(Dt.flags&3899393&&!(Kt&524288)){const Wi=Rt(ae,Fx);Rr(Dt)&524288||(Kt&52?Dt.objectFlags|=524288|(Wi?1048576:0):Dt.objectFlags|=Wi?0:524288)}}return Dt}return o}function TUt(o){return!(o.parent.kind===183&&o.parent.typeArguments&&o===o.parent.typeName||o.parent.kind===205&&o.parent.typeArguments&&o===o.parent.qualifier)}function WZ(o,_){if(o.symbol&&o.symbol.declarations&&o.symbol.declarations.length===1){const S=o.symbol.declarations[0].parent;for(let D=_;D!==S;D=D.parent)if(!D||D.kind===241||D.kind===194&&jo(D.extendsType,v))return!0;return v(_)}return!0;function v(S){switch(S.kind){case 197:return!!o.isThisType;case 80:return!o.isThisType&&Lv(S)&&TUt(S)&&Qut(S)===o;case 186:const D=S.exprName,L=Ip(D);if(!Uw(L)){const B=S_(L),K=o.symbol.declarations[0],ne=K.kind===168?K.parent:o.isThisType?K:void 0;if(B.declarations&&ne)return Rt(B.declarations,ae=>OT(ae,ne))||Rt(S.typeArguments,v)}return!0;case 174:case 173:return!S.type&&!!S.body||Rt(S.typeParameters,v)||Rt(S.parameters,v)||!!S.type&&v(S.type)}return!!jo(S,v)}}function Aj(o){const _=Og(o);if(_.flags&4194304){const v=Px(_.type);if(v.flags&262144)return v}}function DUt(o,_,v,S){const D=Aj(o);if(D){const B=Ys(D,_);if(D!==B)return nft(cv(B),L,v,S)}return Ys(Og(o),_)===kt?kt:F_e(o,_,v,S);function L(B){if(B.flags&61603843&&B!==kt&&!_l(B)){if(!o.declaration.nameType){let K;if(_m(B)||B.flags&1&&CO(D,4)<0&&(K=C_(D))&&dp(K,j2))return IUt(B,o,aN(D,B,_));if(Qa(B))return EUt(B,o,D,_);if(Vct(B))return Fa(Yt(B.types,L))}return F_e(o,aN(D,B,_))}return B}}function Yut(o,_){return _&1?!0:_&2?!1:o}function EUt(o,_,v,S){const D=o.target.elementFlags,L=o.target.fixedLength,B=L?aN(v,o,S):S,K=Yt(OD(o),(qe,Ve)=>{const Dt=D[Ve];return Veqe&1?2:qe):ne&8?Yt(D,qe=>qe&2?1:qe):D,Ce=Yut(o.target.readonly,ny(_));return Mt(K,$e)?$e:oy(K,ae,Ce,o.target.labeledElementDeclarations)}function IUt(o,_,v){const S=edt(_,Ae,!0,v);return _l(S)?$e:sh(S,Yut(JF(o),ny(_)))}function edt(o,_,v,S){const D=Pj(S,av(o),_),L=Ys(bC(o.target||o),D),B=ny(o);return be&&B&4&&!Fu(L,49152)?Rx(L,!0):be&&B&8&&v?Gm(L,524288):L}function F_e(o,_,v,S){z.assert(o.symbol,"anonymous type must have symbol to be instantiated");const D=tg(o.objectFlags&-1572865|64,o.symbol);if(o.objectFlags&32){D.declaration=o.declaration;const L=av(o),B=qOe(L);D.typeParameter=B,_=BD(FD(L,B),_),B.mapper=_}return o.objectFlags&8388608&&(D.node=o.node),o.objectFlags&134217728&&(D.outerTypeParameters=o.outerTypeParameters),D.target=o,D.mapper=_,D.aliasSymbol=v||o.aliasSymbol,D.aliasTypeArguments=v?S:_b(o.aliasTypeArguments,_),D.objectFlags|=D.aliasTypeArguments?IZ(D.aliasTypeArguments):0,D}function JOe(o,_,v,S,D){const L=o.root;if(L.outerTypeParameters){const B=Yt(L.outerTypeParameters,ae=>QS(ae,_)),K=(v?"C":"")+Jm(B)+LA(S,D);let ne=L.instantiations.get(K);if(!ne){const ae=cp(L.outerTypeParameters,B),Ce=L.checkType,qe=L.isDistributive?cv(QS(Ce,ae)):void 0;ne=qe&&Ce!==qe&&qe.flags&1179648?nft(qe,Ve=>BOe(L,aN(Ce,Ve,ae),v),S,D):BOe(L,ae,v,S,D),L.instantiations.set(K,ne)}return ne}return o}function Ys(o,_){return o&&_?tdt(o,_,void 0,void 0):o}function tdt(o,_,v,S){var D;if(!Fx(o))return o;if(R===100||N>=5e6)return(D=sr)==null||D.instant(sr.Phase.CheckTypes,"instantiateType_DepthLimit",{typeId:o.id,instantiationDepth:R,instantiationCount:N}),ht(j,k.Type_instantiation_is_excessively_deep_and_possibly_infinite),$e;E++,N++,R++;const L=NUt(o,_,v,S);return R--,L}function NUt(o,_,v,S){const D=o.flags;if(D&262144)return QS(o,_);if(D&524288){const L=o.objectFlags;if(L&52){if(L&4&&!o.node){const B=o.resolvedTypeArguments,K=_b(B,_);return K!==B?DOe(o.target,K):o}return L&1024?LUt(o,_):kUt(o,_,v,S)}return o}if(D&3145728){const L=o.flags&1048576?o.origin:void 0,B=L&&L.flags&3145728?L.types:o.types,K=_b(B,_);if(K===B&&v===o.aliasSymbol)return o;const ne=v||o.aliasSymbol,ae=v?S:_b(o.aliasTypeArguments,_);return D&2097152||L&&L.flags&2097152?Fa(K,0,ne,ae):es(K,1,ne,ae)}if(D&4194304)return l1(Ys(o.type,_));if(D&134217728)return nN(o.texts,_b(o.types,_));if(D&268435456)return AA(o.symbol,Ys(o.type,_));if(D&8388608){const L=v||o.aliasSymbol,B=v?S:_b(o.aliasTypeArguments,_);return lp(Ys(o.objectType,_),Ys(o.indexType,_),o.accessFlags,void 0,L,B)}if(D&16777216)return JOe(o,BD(o.mapper,_),!1,v,S);if(D&33554432){const L=Ys(o.baseType,_);if(LO(o))return pOe(L);const B=Ys(o.constraint,_);return L.flags&8650752&&OA(B)?mOe(L,B):B.flags&3||ba(lN(L),lN(B))?L:L.flags&8650752?mOe(L,B):Fa([B,L])}return o}function LUt(o,_){const v=Ys(o.mappedType,_);if(!(Rr(v)&32))return o;const S=Ys(o.constraintType,_);if(!(S.flags&4194304))return o;const D=Odt(Ys(o.source,_),v,S);return D||o}function Oj(o){return o.flags&402915327?o:o.permissiveInstantiation||(o.permissiveInstantiation=Ys(o,Rl))}function lN(o){return o.flags&402915327?o:(o.restrictiveInstantiation||(o.restrictiveInstantiation=Ys(o,Sl),o.restrictiveInstantiation.restrictiveInstantiation=o.restrictiveInstantiation),o.restrictiveInstantiation)}function PUt(o,_){return sy(o.keyType,Ys(o.type,_),o.isReadonly,o.declaration)}function fm(o){switch(z.assert(o.kind!==174||f0(o)),o.kind){case 218:case 219:case 174:case 262:return idt(o);case 210:return Rt(o.properties,fm);case 209:return Rt(o.elements,fm);case 227:return fm(o.whenTrue)||fm(o.whenFalse);case 226:return(o.operatorToken.kind===57||o.operatorToken.kind===61)&&(fm(o.left)||fm(o.right));case 303:return fm(o.initializer);case 217:return fm(o.expression);case 292:return Rt(o.properties,fm)||Uv(o.parent)&&Rt(o.parent.parent.children,fm);case 291:{const{initializer:_}=o;return!!_&&fm(_)}case 294:{const{expression:_}=o;return!!_&&fm(_)}}return!1}function idt(o){return bG(o)||AUt(o)}function AUt(o){return o.typeParameters||Dp(o)||!o.body?!1:o.body.kind!==241?fm(o.body):!!sS(o.body,_=>!!_.expression&&fm(_.expression))}function B_e(o){return(Qw(o)||f0(o))&&idt(o)}function ndt(o){if(o.flags&524288){const _=lv(o);if(_.constructSignatures.length||_.callSignatures.length){const v=tg(16,o.symbol);return v.members=_.members,v.properties=_.properties,v.callSignatures=x,v.constructSignatures=x,v.indexInfos=x,v}}else if(o.flags&2097152)return Fa(Yt(o.types,ndt));return o}function SC(o,_){return c1(o,_,sp)}function Mj(o,_){return c1(o,_,sp)?-1:0}function GOe(o,_){return c1(o,_,$_)?-1:0}function OUt(o,_){return c1(o,_,Zv)?-1:0}function Ax(o,_){return c1(o,_,Zv)}function VZ(o,_){return c1(o,_,om)}function ba(o,_){return c1(o,_,$_)}function H2(o,_){return o.flags&1048576?Be(o.types,v=>H2(v,_)):_.flags&1048576?Rt(_.types,v=>H2(o,v)):o.flags&2097152?Rt(o.types,v=>H2(v,_)):o.flags&58982400?H2(Hf(o)||Gt,_):ay(_)?!!(o.flags&67633152):_===Nd?!!(o.flags&67633152)&&!ay(o):_===md?!!(o.flags&524288)&&EMe(o):xO(o,wO(_))||_m(_)&&!JF(_)&&H2(o,Sn)}function W_e(o,_){return c1(o,_,Mp)}function HZ(o,_){return W_e(o,_)||W_e(_,o)}function Dh(o,_,v,S,D,L){return hm(o,_,$_,v,S,D,L)}function Ox(o,_,v,S,D,L){return KOe(o,_,$_,v,S,D,L,void 0)}function KOe(o,_,v,S,D,L,B,K){return c1(o,_,v)?!0:!S||!Rj(D,o,_,v,L,B,K)?hm(o,_,v,S,L,B,K):!1}function rdt(o){return!!(o.flags&16777216||o.flags&2097152&&Rt(o.types,rdt))}function Rj(o,_,v,S,D,L,B){if(!o||rdt(v))return!1;if(!hm(_,v,S,void 0)&&MUt(o,_,v,S,D,L,B))return!0;switch(o.kind){case 234:if(!pae(o))break;case 294:case 217:return Rj(o.expression,_,v,S,D,L,B);case 226:switch(o.operatorToken.kind){case 64:case 28:return Rj(o.right,_,v,S,D,L,B)}break;case 210:return zUt(o,_,v,S,L,B);case 209:return HUt(o,_,v,S,L,B);case 292:return VUt(o,_,v,S,L,B);case 219:return RUt(o,_,v,S,L,B)}return!1}function MUt(o,_,v,S,D,L,B){const K=ea(_,0),ne=ea(_,1);for(const ae of[ne,K])if(Rt(ae,Ce=>{const qe=Ol(Ce);return!(qe.flags&131073)&&hm(qe,v,S,void 0)})){const Ce=B||{};Dh(_,v,o,D,L,Ce);const qe=Ce.errors[Ce.errors.length-1];return fa(qe,Kn(o,ae===ne?k.Did_you_mean_to_use_new_with_this_expression:k.Did_you_mean_to_call_this_expression)),!0}return!1}function RUt(o,_,v,S,D,L){if(Ho(o.body)||Rt(o.parameters,q$))return!1;const B=mN(_);if(!B)return!1;const K=ea(v,0);if(!O(K))return!1;const ne=o.body,ae=Ol(B),Ce=es(Yt(K,Ol));if(!hm(ae,Ce,S,void 0)){const qe=ne&&Rj(ne,ae,Ce,S,void 0,D,L);if(qe)return qe;const Ve=L||{};if(hm(ae,Ce,S,ne,void 0,D,Ve),Ve.errors)return v.symbol&&O(v.symbol.declarations)&&fa(Ve.errors[Ve.errors.length-1],Kn(v.symbol.declarations[0],k.The_expected_type_comes_from_the_return_type_of_this_signature)),!(ad(o)&2)&&!Eu(ae,"then")&&hm(kY(ae),Ce,S,void 0)&&fa(Ve.errors[Ve.errors.length-1],Kn(o,k.Did_you_mean_to_mark_this_function_as_async)),!0}return!1}function sdt(o,_,v){const S=Lx(_,v);if(S)return S;if(_.flags&1048576){const D=_dt(o,_);if(D)return Lx(D,v)}}function odt(o,_){cY(o,_,!1);const v=n5(o,1);return Jj(),v}function jZ(o,_,v,S,D,L){let B=!1;for(const K of o){const{errorNode:ne,innerExpression:ae,nameType:Ce,errorMessage:qe}=K;let Ve=sdt(_,v,Ce);if(!Ve||Ve.flags&8388608)continue;let Dt=Lx(_,Ce);if(!Dt)continue;const Vt=E_e(Ce,void 0);if(!hm(Dt,Ve,S,void 0)){const Kt=ae&&Rj(ae,Dt,Ve,S,void 0,D,L);if(B=!0,!Kt){const Wi=L||{},qi=ae?odt(ae,Dt):Dt;if(fe&&H_e(qi,Ve)){const An=Kn(ne,k.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target,Un(qi),Un(Ve));vl.add(An),Wi.errors=[An]}else{const An=!!(Vt&&(ya(v,Vt)||Ot).flags&16777216),Cr=!!(Vt&&(ya(_,Vt)||Ot).flags&16777216);Ve=TC(Ve,An),Dt=TC(Dt,An&&Cr),hm(qi,Ve,S,ne,qe,D,Wi)&&qi!==Dt&&hm(Dt,Ve,S,ne,qe,D,Wi)}if(Wi.errors){const An=Wi.errors[Wi.errors.length-1],Cr=Pm(Ce)?Am(Ce):void 0,en=Cr!==void 0?ya(v,Cr):void 0;let vn=!1;if(!en){const In=xj(v,Ce);In&&In.declaration&&!_n(In.declaration).hasNoDefaultLib&&(vn=!0,fa(An,Kn(In.declaration,k.The_expected_type_comes_from_this_index_signature)))}if(!vn&&(en&&O(en.declarations)||v.symbol&&O(v.symbol.declarations))){const In=en&&O(en.declarations)?en.declarations[0]:v.symbol.declarations[0];_n(In).hasNoDefaultLib||fa(An,Kn(In,k.The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1,Cr&&!(Ce.flags&8192)?Ws(Cr):Un(Ce),Un(v)))}}}}}return B}function FUt(o,_,v,S,D,L){const B=ud(v,G_e),K=ud(v,Ce=>!G_e(Ce)),ne=K!==rn?$Re(13,0,K,void 0):void 0;let ae=!1;for(let Ce=o.next();!Ce.done;Ce=o.next()){const{errorNode:qe,innerExpression:Ve,nameType:Dt,errorMessage:Vt}=Ce.value;let Kt=ne;const Wi=B!==rn?sdt(_,B,Dt):void 0;if(Wi&&!(Wi.flags&8388608)&&(Kt=ne?es([ne,Wi]):Wi),!Kt)continue;let qi=Lx(_,Dt);if(!qi)continue;const An=E_e(Dt,void 0);if(!hm(qi,Kt,S,void 0)){const Cr=Ve&&Rj(Ve,qi,Kt,S,void 0,D,L);if(ae=!0,!Cr){const en=L||{},vn=Ve?odt(Ve,qi):qi;if(fe&&H_e(vn,Kt)){const In=Kn(qe,k.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target,Un(vn),Un(Kt));vl.add(In),en.errors=[In]}else{const In=!!(An&&(ya(B,An)||Ot).flags&16777216),Nr=!!(An&&(ya(_,An)||Ot).flags&16777216);Kt=TC(Kt,In),qi=TC(qi,In&&Nr),hm(vn,Kt,S,qe,Vt,D,en)&&vn!==qi&&hm(qi,Kt,S,qe,Vt,D,en)}}}}return ae}function*BUt(o){if(O(o.properties))for(const _ of o.properties)PP(_)||KMe(eV(_.name))||(yield{errorNode:_.name,innerExpression:_.initializer,nameType:G_(eV(_.name))})}function*WUt(o,_){if(!O(o.children))return;let v=0;for(let S=0;S1;let Wi,qi;if(wOe(!1)!==za){const Cr=vut(Je);Wi=ud(Dt,en=>ba(en,Cr)),qi=ud(Dt,en=>!ba(en,Cr))}else Wi=ud(Dt,G_e),qi=ud(Dt,Cr=>!G_e(Cr));if(Kt){if(Wi!==rn){const Cr=oy(Cpe(ae,0)),en=WUt(ae,ne);B=FUt(en,Cr,Wi,S,D,L)||B}else if(!c1(lp(_,Ve),Dt,S)){B=!0;const Cr=ht(ae.openingElement.tagName,k.This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided,qe,Un(Dt));L&&L.skipLogging&&(L.errors||(L.errors=[])).push(Cr)}}else if(qi!==rn){const Cr=Vt[0],en=adt(Cr,Ve,ne);en&&(B=jZ(function*(){yield en}(),_,v,S,D,L)||B)}else if(!c1(lp(_,Ve),Dt,S)){B=!0;const Cr=ht(ae.openingElement.tagName,k.This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided,qe,Un(Dt));L&&L.skipLogging&&(L.errors||(L.errors=[])).push(Cr)}}return B;function ne(){if(!K){const ae=yu(o.parent.tagName),Ce=dY(pN(o)),qe=Ce===void 0?"children":Ws(Ce),Ve=lp(v,G_(qe)),Dt=k._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2;K={...Dt,key:"!!ALREADY FORMATTED!!",message:lP(Dt,ae,qe,Un(Ve))}}return K}}function*ldt(o,_){const v=O(o.elements);if(v)for(let S=0;Sne:_1(o)>ne))return S&&!(v&8)&&D(k.Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1,_1(o),ne),0;o.typeParameters&&o.typeParameters!==_.typeParameters&&(_=zjt(_),o=mht(o,_,void 0,B));const Ce=fp(o),qe=Zj(o),Ve=Zj(_);(qe||Ve)&&Ys(qe||Ve,K);const Dt=_.declaration?_.declaration.kind:0,Vt=!(v&3)&&_e&&Dt!==174&&Dt!==173&&Dt!==176;let Kt=-1;const Wi=B2(o);if(Wi&&Wi!==or){const Cr=B2(_);if(Cr){const en=!Vt&&B(Wi,Cr,!1)||B(Cr,Wi,S);if(!en)return S&&D(k.The_this_types_of_each_signature_are_incompatible),0;Kt&=en}}const qi=qe||Ve?Math.min(Ce,ne):Math.max(Ce,ne),An=qe||Ve?qi-1:-1;for(let Cr=0;Cr=_1(o)&&Cr<_1(_)&&B(en,vn,!1)&&(Ur=0),!Ur)return S&&D(k.Types_of_parameters_0_and_1_are_incompatible,Ws(e5(o,Cr)),Ws(e5(_,Cr))),0;Kt&=Ur}}if(!(v&4)){const Cr=v_e(_)?Je:_.declaration&&h1(_.declaration)?Gu(al(_.declaration.symbol)):Ol(_);if(Cr===or||Cr===Je)return Kt;const en=v_e(o)?Je:o.declaration&&h1(o.declaration)?Gu(al(o.declaration.symbol)):Ol(o),vn=dm(_);if(vn){const In=dm(o);if(In)Kt&=qUt(In,vn,S,D,B);else if(sxe(vn)||oxe(vn))return S&&D(k.Signature_0_must_be_a_type_predicate,Sx(o)),0}else Kt&=v&1&&B(Cr,en,!1)||B(en,Cr,S),!Kt&&S&&L&&L(en,Cr)}return Kt}function qUt(o,_,v,S,D){if(o.kind!==_.kind)return v&&(S(k.A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard),S(k.Type_predicate_0_is_not_assignable_to_1,Y1(o),Y1(_))),0;if((o.kind===1||o.kind===3)&&o.parameterIndex!==_.parameterIndex)return v&&(S(k.Parameter_0_is_not_in_the_same_position_as_parameter_1,o.parameterName,_.parameterName),S(k.Type_predicate_0_is_not_assignable_to_1,Y1(o),Y1(_))),0;const L=o.type===_.type?-1:o.type&&_.type?D(o.type,_.type,v):0;return L===0&&v&&S(k.Type_predicate_0_is_not_assignable_to_1,Y1(o),Y1(_)),L}function $Ut(o,_){const v=Dj(o),S=Dj(_),D=Ol(v),L=Ol(S);return L===or||c1(L,D,$_)||c1(D,L,$_)?UUt(v,S):!1}function XOe(o){return o!==Mc&&o.properties.length===0&&o.callSignatures.length===0&&o.constructSignatures.length===0&&o.indexInfos.length===0}function wC(o){return o.flags&524288?!ap(o)&&XOe(lv(o)):o.flags&67108864?!0:o.flags&1048576?Rt(o.types,wC):o.flags&2097152?Be(o.types,wC):!1}function ay(o){return!!(Rr(o)&16&&(o.members&&XOe(o)||o.symbol&&o.symbol.flags&2048&&Dx(o.symbol).size===0))}function JUt(o){if(be&&o.flags&1048576){if(!(o.objectFlags&33554432)){const _=o.types;o.objectFlags|=33554432|(_.length>=3&&_[0].flags&32768&&_[1].flags&65536&&Rt(_,ay)?67108864:0)}return!!(o.objectFlags&67108864)}return!1}function OO(o){return!!((o.flags&1048576?o.types[0]:o).flags&32768)}function udt(o){const _=o.flags&1048576?o.types[0]:o;return!!(_.flags&32768)&&_!==ut}function ddt(o){return o.flags&524288&&!ap(o)&&Nl(o).length===0&&Xh(o).length===1&&!!hb(o,tt)||o.flags&3145728&&Be(o.types,ddt)||!1}function ZOe(o,_,v){const S=o.flags&8?Vf(o):o,D=_.flags&8?Vf(_):_;if(S===D)return!0;if(S.escapedName!==D.escapedName||!(S.flags&256)||!(D.flags&256))return!1;const L=Aa(S)+","+Aa(D),B=LS.get(L);if(B!==void 0&&!(!(B&4)&&B&2&&v))return!!(B&1);const K=Qn(D);for(const ne of Nl(Qn(S)))if(ne.flags&8){const ae=ya(K,ne.escapedName);if(!ae||!(ae.flags&8))return v?(v(k.Property_0_is_missing_in_type_1,xu(ne),Un(vc(D),void 0,64)),LS.set(L,6)):LS.set(L,2),!1;const Ce=bN(Jc(ne,306)).value,qe=bN(Jc(ae,306)).value;if(Ce!==qe){const Ve=typeof Ce=="string",Dt=typeof qe=="string";if(Ce!==void 0&&qe!==void 0){if(!v)LS.set(L,2);else{const Vt=Ve?`"${B1(Ce)}"`:Ce,Kt=Dt?`"${B1(qe)}"`:qe;v(k.Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given,xu(D),xu(ae),Kt,Vt),LS.set(L,6)}return!1}if(Ve||Dt){if(!v)LS.set(L,2);else{const Vt=Ce??qe;z.assert(typeof Vt=="string");const Kt=`"${B1(Vt)}"`;v(k.One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value,xu(D),xu(ae),Kt),LS.set(L,6)}return!1}}}return LS.set(L,1),!0}function Fj(o,_,v,S){const D=o.flags,L=_.flags;return L&1||D&131072||o===kt||L&2&&!(v===om&&D&1)?!0:L&131072?!1:!!(D&402653316&&L&4||D&128&&D&1024&&L&128&&!(L&1024)&&o.value===_.value||D&296&&L&8||D&256&&D&1024&&L&256&&!(L&1024)&&o.value===_.value||D&2112&&L&64||D&528&&L&16||D&12288&&L&4096||D&32&&L&32&&o.symbol.escapedName===_.symbol.escapedName&&ZOe(o.symbol,_.symbol,S)||D&1024&&L&1024&&(D&1048576&&L&1048576&&ZOe(o.symbol,_.symbol,S)||D&2944&&L&2944&&o.value===_.value&&ZOe(o.symbol,_.symbol,S))||D&32768&&(!be&&!(L&3145728)||L&49152)||D&65536&&(!be&&!(L&3145728)||L&65536)||D&524288&&L&67108864&&!(v===om&&ay(o)&&!(Rr(o)&8192))||(v===$_||v===Mp)&&(D&1||D&8&&(L&32||L&256&&L&1024)||D&256&&!(D&1024)&&(L&32||L&256&&L&1024&&o.value===_.value)||JUt(_)))}function c1(o,_,v){if(RD(o)&&(o=o.regularType),RD(_)&&(_=_.regularType),o===_)return!0;if(v!==sp){if(v===Mp&&!(_.flags&131072)&&Fj(_,o,v)||Fj(o,_,v))return!0}else if(!((o.flags|_.flags)&61865984)){if(o.flags!==_.flags)return!1;if(o.flags&67358815)return!0}if(o.flags&524288&&_.flags&524288){const S=v.get(U_e(o,_,0,v,!1));if(S!==void 0)return!!(S&1)}return o.flags&469499904||_.flags&469499904?hm(o,_,v,void 0):!1}function fdt(o,_){return Rr(o)&2048&&KMe(_.escapedName)}function zZ(o,_){for(;;){const v=RD(o)?o.regularType:Mx(o)?QUt(o,_):Rr(o)&4?o.node?$S(o.target,Nc(o)):oMe(o)||o:o.flags&3145728?GUt(o,_):o.flags&33554432?_?o.baseType:vOe(o):o.flags&25165824?CC(o,_):o;if(v===o)return v;o=v}}function GUt(o,_){const v=cv(o);if(v!==o)return v;if(o.flags&2097152&&KUt(o)){const S=Is(o.types,D=>zZ(D,_));if(S!==o.types)return Fa(S)}return o}function KUt(o){let _=!1,v=!1;for(const S of o.types)if(_||(_=!!(S.flags&465829888)),v||(v=!!(S.flags&98304)||ay(S)),_&&v)return!0;return!1}function QUt(o,_){const v=OD(o),S=Is(v,D=>D.flags&25165824?CC(D,_):D);return v!==S?EOe(o.target,S):o}function hm(o,_,v,S,D,L,B){var K;let ne,ae,Ce,qe,Ve,Dt,Vt=0,Kt=0,Wi=0,qi=0,An=!1,Cr=0,en=0,vn,In,Nr=16e6-v.size>>3;z.assert(v!==sp||!S,"no error reporting in identity checking");const zr=ur(o,_,3,!!S,D);if(In&&ll(),An){const dt=U_e(o,_,0,v,!1);v.set(dt,6),(K=sr)==null||K.instant(sr.Phase.CheckTypes,"checkTypeRelatedTo_DepthLimit",{sourceId:o.id,targetId:_.id,depth:Kt,targetDepth:Wi});const It=Nr<=0?k.Excessive_complexity_comparing_types_0_and_1:k.Excessive_stack_depth_comparing_types_0_and_1,oi=ht(S||j,It,Un(o),Un(_));B&&(B.errors||(B.errors=[])).push(oi)}else if(ne){if(L){const oi=L();oi&&(_ke(oi,ne),ne=oi)}let dt;if(D&&S&&!zr&&o.symbol){const oi=Zs(o.symbol);if(oi.originatingImport&&!Gp(oi.originatingImport)&&hm(Qn(oi.target),_,v,void 0)){const zi=Kn(oi.originatingImport,k.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead);dt=xi(dt,zi)}}const It=$y(_n(S),S,ne,dt);ae&&fa(It,...ae),B&&(B.errors||(B.errors=[])).push(It),(!B||!B.skipLogging)&&vl.add(It)}return S&&B&&B.skipLogging&&zr===0&&z.assert(!!B.errors,"missed opportunity to interact with error."),zr!==0;function Ur(dt){ne=dt.errorInfo,vn=dt.lastSkippedInfo,In=dt.incompatibleStack,Cr=dt.overrideNextErrorInfo,en=dt.skipParentCounter,ae=dt.relatedInfo}function Ia(){return{errorInfo:ne,lastSkippedInfo:vn,incompatibleStack:In==null?void 0:In.slice(),overrideNextErrorInfo:Cr,skipParentCounter:en,relatedInfo:ae==null?void 0:ae.slice()}}function ta(dt,...It){Cr++,vn=void 0,(In||(In=[])).push([dt,...It])}function ll(){const dt=In||[];In=void 0;const It=vn;if(vn=void 0,dt.length===1){No(...dt[0]),It&&Iu(void 0,...It);return}let oi="";const Tt=[];for(;dt.length;){const[zi,...Pi]=dt.pop();switch(zi.code){case k.Types_of_property_0_are_incompatible.code:{oi.indexOf("new ")===0&&(oi=`(${oi})`);const Xt=""+Pi[0];oi.length===0?oi=`${Xt}`:wp(Xt,il(Y))?oi=`${oi}.${Xt}`:Xt[0]==="["&&Xt[Xt.length-1]==="]"?oi=`${oi}${Xt}`:oi=`${oi}[${Xt}]`;break}case k.Call_signature_return_types_0_and_1_are_incompatible.code:case k.Construct_signature_return_types_0_and_1_are_incompatible.code:case k.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:case k.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:{if(oi.length===0){let Xt=zi;zi.code===k.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?Xt=k.Call_signature_return_types_0_and_1_are_incompatible:zi.code===k.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code&&(Xt=k.Construct_signature_return_types_0_and_1_are_incompatible),Tt.unshift([Xt,Pi[0],Pi[1]])}else{const Xt=zi.code===k.Construct_signature_return_types_0_and_1_are_incompatible.code||zi.code===k.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?"new ":"",Vi=zi.code===k.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code||zi.code===k.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?"":"...";oi=`${Xt}${oi}(${Vi})`}break}case k.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target.code:{Tt.unshift([k.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target,Pi[0],Pi[1]]);break}case k.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target.code:{Tt.unshift([k.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target,Pi[0],Pi[1],Pi[2]]);break}default:return z.fail(`Unhandled Diagnostic: ${zi.code}`)}}oi?No(oi[oi.length-1]===")"?k.The_types_returned_by_0_are_incompatible_between_these_types:k.The_types_of_0_are_incompatible_between_these_types,oi):Tt.shift();for(const[zi,...Pi]of Tt){const Xt=zi.elidedInCompatabilityPyramid;zi.elidedInCompatabilityPyramid=!1,No(zi,...Pi),zi.elidedInCompatabilityPyramid=Xt}It&&Iu(void 0,...It)}function No(dt,...It){z.assert(!!S),In&&ll(),!dt.elidedInCompatabilityPyramid&&(en===0?ne=Ro(ne,dt,...It):en--)}function iu(dt,...It){No(dt,...It),en++}function Uf(dt){z.assert(!!ne),ae?ae.push(dt):ae=[dt]}function Iu(dt,It,oi){In&&ll();const[Tt,zi]=OF(It,oi);let Pi=It,Xt=Tt;if(Bj(It)&&!YOe(oi)&&(Pi=xC(It),z.assert(!ba(Pi,oi),"generalized source shouldn't be assignable"),Xt=vO(Pi)),(oi.flags&8388608&&!(It.flags&8388608)?oi.objectType.flags:oi.flags)&262144&&oi!==z_&&oi!==Rc){const En=Hf(oi);let Bi;En&&(ba(Pi,En)||(Bi=ba(It,En)))?No(k._0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2,Bi?Tt:Xt,zi,Un(En)):(ne=void 0,No(k._0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1,zi,Xt))}if(dt)dt===k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1&&fe&&hdt(It,oi).length&&(dt=k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties);else if(v===Mp)dt=k.Type_0_is_not_comparable_to_type_1;else if(Tt===zi)dt=k.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated;else if(fe&&hdt(It,oi).length)dt=k.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties;else{if(It.flags&128&&oi.flags&1048576){const En=lGt(It,oi);if(En){No(k.Type_0_is_not_assignable_to_type_1_Did_you_mean_2,Xt,zi,Un(En));return}}dt=k.Type_0_is_not_assignable_to_type_1}No(dt,Xt,zi)}function pn(dt,It){const oi=wA(dt.symbol)?Un(dt,dt.symbol.valueDeclaration):Un(dt),Tt=wA(It.symbol)?Un(It,It.symbol.valueDeclaration):Un(It);(uo===dt&&tt===It||rl===dt&&Ae===It||hl===dt&&fn===It||hut()===dt&&kn===It)&&No(k._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible,Tt,oi)}function Bn(dt,It,oi){return Qa(dt)?dt.target.readonly&&JZ(It)?(oi&&No(k.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1,Un(dt),Un(It)),!1):j2(It):JF(dt)&&JZ(It)?(oi&&No(k.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1,Un(dt),Un(It)),!1):Qa(It)?_m(dt):!0}function Os(dt,It,oi){return ur(dt,It,3,oi)}function ur(dt,It,oi=3,Tt=!1,zi,Pi=0){if(dt===It)return-1;if(dt.flags&524288&&It.flags&402784252)return v===Mp&&!(It.flags&131072)&&Fj(It,dt,v)||Fj(dt,It,v,Tt?No:void 0)?-1:(Tt&&Ks(dt,It,dt,It,zi),0);const Xt=zZ(dt,!1);let Vi=zZ(It,!0);if(Xt===Vi)return-1;if(v===sp)return Xt.flags!==Vi.flags?0:Xt.flags&67358815?-1:(Ll(Xt,Vi),u5(Xt,Vi,!1,0,oi));if(Xt.flags&262144&&YI(Xt)===Vi)return-1;if(Xt.flags&470302716&&Vi.flags&1048576){const En=Vi.types,Bi=En.length===2&&En[0].flags&98304?En[1]:En.length===3&&En[0].flags&98304&&En[1].flags&98304?En[2]:void 0;if(Bi&&!(Bi.flags&98304)&&(Vi=zZ(Bi,!0),Xt===Vi))return-1}if(v===Mp&&!(Vi.flags&131072)&&Fj(Vi,Xt,v)||Fj(Xt,Vi,v,Tt?No:void 0))return-1;if(Xt.flags&469499904||Vi.flags&469499904){if(!(Pi&2)&&q2(Xt)&&Rr(Xt)&8192&&oh(Xt,Vi,Tt))return Tt&&Iu(zi,Xt,It.aliasSymbol?It:Vi),0;const Bi=(v!==Mp||uv(Xt))&&!(Pi&2)&&Xt.flags&405405692&&Xt!==Nd&&Vi.flags&2621440&&tMe(Vi)&&(Nl(Xt).length>0||nge(Xt)),qn=!!(Rr(Xt)&2048);if(Bi&&!ZUt(Xt,Vi,qn)){if(Tt){const Qr=Un(dt.aliasSymbol?dt:Xt),Vr=Un(It.aliasSymbol?It:Vi),aa=ea(Xt,0),Sa=ea(Xt,1);aa.length>0&&ur(Ol(aa[0]),Vi,1,!1)||Sa.length>0&&ur(Ol(Sa[0]),Vi,1,!1)?No(k.Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it,Qr,Vr):No(k.Type_0_has_no_properties_in_common_with_type_1,Qr,Vr)}return 0}Ll(Xt,Vi);const Wn=Xt.flags&1048576&&Xt.types.length<4&&!(Vi.flags&1048576)||Vi.flags&1048576&&Vi.types.length<4&&!(Xt.flags&469499904)?Eh(Xt,Vi,Tt,Pi):u5(Xt,Vi,Tt,Pi,oi);if(Wn)return Wn}return Tt&&Ks(dt,It,Xt,Vi,zi),0}function Ks(dt,It,oi,Tt,zi){var Pi,Xt;const Vi=!!oMe(dt),En=!!oMe(It);oi=dt.aliasSymbol||Vi?dt:oi,Tt=It.aliasSymbol||En?It:Tt;let Bi=Cr>0;if(Bi&&Cr--,oi.flags&524288&&Tt.flags&524288){const qn=ne;Bn(oi,Tt,!0),ne!==qn&&(Bi=!!ne)}if(oi.flags&524288&&Tt.flags&402784252)pn(oi,Tt);else if(oi.symbol&&oi.flags&524288&&Nd===oi)No(k.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead);else if(Rr(oi)&2048&&Tt.flags&2097152){const qn=Tt.types,Pr=HD(mg.IntrinsicAttributes,S),Wn=HD(mg.IntrinsicClassAttributes,S);if(!_l(Pr)&&!_l(Wn)&&(Mt(qn,Pr)||Mt(qn,Wn)))return}else ne=iOe(ne,It);if(!zi&&Bi){const qn=Ia();Iu(zi,oi,Tt);let Pr;ne&&ne!==qn.errorInfo&&(Pr={code:ne.code,messageText:ne.messageText}),Ur(qn),Pr&&ne&&(ne.canonicalHead=Pr),vn=[oi,Tt];return}if(Iu(zi,oi,Tt),oi.flags&262144&&((Xt=(Pi=oi.symbol)==null?void 0:Pi.declarations)!=null&&Xt[0])&&!YI(oi)){const qn=qOe(oi);if(qn.constraint=Ys(Tt,FD(oi,qn)),kZ(qn)){const Pr=Un(Tt,oi.symbol.declarations[0]);Uf(Kn(oi.symbol.declarations[0],k.This_type_parameter_might_need_an_extends_0_constraint,Pr))}}}function Ll(dt,It){if(sr&&dt.flags&3145728&&It.flags&3145728){const oi=dt,Tt=It;if(oi.objectFlags&Tt.objectFlags&32768)return;const zi=oi.types.length,Pi=Tt.types.length;zi*Pi>1e6&&sr.instant(sr.Phase.CheckTypes,"traceUnionsOrIntersectionsTooLarge_DepthLimit",{sourceId:dt.id,sourceSize:zi,targetId:It.id,targetSize:Pi,pos:S==null?void 0:S.pos,end:S==null?void 0:S.end})}}function kl(dt,It){return es(nd(dt,(Tt,zi)=>{var Pi;zi=Qh(zi);const Xt=zi.flags&3145728?TZ(zi,It):LD(zi,It),Vi=Xt&&Qn(Xt)||((Pi=NA(zi,It))==null?void 0:Pi.type)||wi;return xi(Tt,Vi)},void 0)||x)}function oh(dt,It,oi){var Tt;if(!Kj(It)||!ke&&Rr(It)&4096)return!1;const zi=!!(Rr(dt)&2048);if((v===$_||v===Mp)&&(XF(Nd,It)||!zi&&wC(It)))return!1;let Pi=It,Xt;It.flags&1048576&&(Pi=Bpt(dt,It,ur)||_ei(It),Xt=Pi.flags&1048576?Pi.types:[Pi]);for(const Vi of Nl(dt))if(Ca(Vi,dt.symbol)&&!fdt(dt,Vi)){if(!wpe(Pi,Vi.escapedName,zi)){if(oi){const En=ud(Pi,Kj);if(!S)return z.fail();if(ZT(S)||eh(S)||eh(S.parent)){Vi.valueDeclaration&&qv(Vi.valueDeclaration)&&_n(S)===_n(Vi.valueDeclaration.name)&&(S=Vi.valueDeclaration.name);const Bi=Js(Vi),qn=aht(Bi,En),Pr=qn?Js(qn):void 0;Pr?No(k.Property_0_does_not_exist_on_type_1_Did_you_mean_2,Bi,Un(En),Pr):No(k.Property_0_does_not_exist_on_type_1,Bi,Un(En))}else{const Bi=((Tt=dt.symbol)==null?void 0:Tt.declarations)&&lu(dt.symbol.declarations);let qn;if(Vi.valueDeclaration&&Xi(Vi.valueDeclaration,Pr=>Pr===Bi)&&_n(Bi)===_n(S)){const Pr=Vi.valueDeclaration;z.assertNode(Pr,Fb);const Wn=Pr.name;S=Wn,lt(Wn)&&(qn=lht(Wn,En))}qn!==void 0?iu(k.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2,Js(Vi),Un(En),qn):iu(k.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,Js(Vi),Un(En))}}return!0}if(Xt&&!ur(Qn(Vi),kl(Xt,Vi.escapedName),3,oi))return oi&&ta(k.Types_of_property_0_are_incompatible,Js(Vi)),!0}return!1}function Ca(dt,It){return dt.valueDeclaration&&It.valueDeclaration&&dt.valueDeclaration.parent===It.valueDeclaration}function Eh(dt,It,oi,Tt){if(dt.flags&1048576){if(It.flags&1048576){const zi=dt.origin;if(zi&&zi.flags&2097152&&It.aliasSymbol&&Mt(zi.types,It))return-1;const Pi=It.origin;if(Pi&&Pi.flags&1048576&&dt.aliasSymbol&&Mt(Pi.types,dt))return-1}return v===Mp?Bu(dt,It,oi&&!(dt.flags&402784252),Tt):NC(dt,It,oi&&!(dt.flags&402784252),Tt)}if(It.flags&1048576)return ru(Hj(dt),It,oi&&!(dt.flags&402784252)&&!(It.flags&402784252),Tt);if(It.flags&2097152)return Rg(dt,It,oi,2);if(v===Mp&&It.flags&402784252){const zi=Is(dt.types,Pi=>Pi.flags&465829888?Hf(Pi)||Gt:Pi);if(zi!==dt.types){if(dt=Fa(zi),dt.flags&131072)return 0;if(!(dt.flags&2097152))return ur(dt,It,1,!1)||ur(It,dt,1,!1)}}return Bu(dt,It,!1,1)}function nu(dt,It){let oi=-1;const Tt=dt.types;for(const zi of Tt){const Pi=ru(zi,It,!1,0);if(!Pi)return 0;oi&=Pi}return oi}function ru(dt,It,oi,Tt){const zi=It.types;if(It.flags&1048576){if(GS(zi,dt))return-1;if(v!==Mp&&Rr(It)&32768&&!(dt.flags&1024)&&(dt.flags&2688||(v===Zv||v===om)&&dt.flags&256)){const Xt=dt===dt.regularType?dt.freshType:dt.regularType,Vi=dt.flags&128?tt:dt.flags&256?Ae:dt.flags&2048?Ke:void 0;return Vi&&GS(zi,Vi)||Xt&&GS(zi,Xt)?-1:0}const Pi=Udt(It,dt);if(Pi){const Xt=ur(dt,Pi,2,!1,void 0,Tt);if(Xt)return Xt}}for(const Pi of zi){const Xt=ur(dt,Pi,2,!1,void 0,Tt);if(Xt)return Xt}if(oi){const Pi=_dt(dt,It,ur);Pi&&ur(dt,Pi,2,!0,void 0,Tt)}return 0}function Rg(dt,It,oi,Tt){let zi=-1;const Pi=It.types;for(const Xt of Pi){const Vi=ur(dt,Xt,2,oi,void 0,Tt);if(!Vi)return 0;zi&=Vi}return zi}function Bu(dt,It,oi,Tt){const zi=dt.types;if(dt.flags&1048576&&GS(zi,It))return-1;const Pi=zi.length;for(let Xt=0;Xt=Xt.types.length&&Pi.length%Xt.types.length===0){const qn=ur(En,Xt.types[Vi%Xt.types.length],3,!1,void 0,Tt);if(qn){zi&=qn;continue}}const Bi=ur(En,It,1,oi,void 0,Tt);if(!Bi)return 0;zi&=Bi}return zi}function $O(dt=x,It=x,oi=x,Tt,zi){if(dt.length!==It.length&&v===sp)return 0;const Pi=dt.length<=It.length?dt.length:It.length;let Xt=-1;for(let Vi=0;Vi(Qr|=Sa?16:8,Wn(Sa)));let Vr;return qi===3?((Pi=sr)==null||Pi.instant(sr.Phase.CheckTypes,"recursiveTypeRelatedTo_DepthLimit",{sourceId:dt.id,sourceIdStack:Ve.map(Sa=>Sa.id),targetId:It.id,targetIdStack:Dt.map(Sa=>Sa.id),depth:Kt,targetDepth:Wi}),Vr=3):((Xt=sr)==null||Xt.push(sr.Phase.CheckTypes,"structuredTypeRelatedTo",{sourceId:dt.id,targetId:It.id}),Vr=fz(dt,It,oi,Tt),(Vi=sr)==null||Vi.pop()),ca&&(ca=Wn),zi&1&&Kt--,zi&2&&Wi--,qi=Pr,Vr?(Vr===-1||Kt===0&&Wi===0)&&aa(Vr===-1||Vr===3):(v.set(En,(oi?4:0)|2|Qr),Nr--,aa(!1)),Vr;function aa(Sa){for(let kc=qn;kcVi!==dt)&&(Pi=ur(Xt,It,1,!1,void 0,Tt))}Pi&&!(Tt&2)&&It.flags&2097152&&!sN(It)&&dt.flags&2621440?(Pi&=Oa(dt,It,oi,void 0,!1,0),Pi&&q2(dt)&&Rr(dt)&8192&&(Pi&=eo(dt,It,!1,oi,0))):Pi&&N_e(It)&&!j2(It)&&dt.flags&2097152&&Qh(dt).flags&3670016&&!Rt(dt.types,Xt=>Xt===It||!!(Rr(Xt)&262144))&&(Pi&=Oa(dt,It,oi,void 0,!0,Tt))}return Pi&&Ur(zi),Pi}function ah(dt,It){const oi=Qh(ND(It)),Tt=[];return K3e(oi,8576,!1,zi=>void Tt.push(Ys(dt,Pj(It.mapper,av(It),zi)))),es(Tt)}function jY(dt,It,oi,Tt,zi){let Pi,Xt,Vi=!1,En=dt.flags;const Bi=It.flags;if(v===sp){if(En&3145728){let Wn=nu(dt,It);return Wn&&(Wn&=nu(It,dt)),Wn}if(En&4194304)return ur(dt.type,It.type,3,!1);if(En&8388608&&(Pi=ur(dt.objectType,It.objectType,3,!1))&&(Pi&=ur(dt.indexType,It.indexType,3,!1))||En&16777216&&dt.root.isDistributive===It.root.isDistributive&&(Pi=ur(dt.checkType,It.checkType,3,!1))&&(Pi&=ur(dt.extendsType,It.extendsType,3,!1))&&(Pi&=ur(W2(dt),W2(It),3,!1))&&(Pi&=ur(V2(dt),V2(It),3,!1))||En&33554432&&(Pi=ur(dt.baseType,It.baseType,3,!1))&&(Pi&=ur(dt.constraint,It.constraint,3,!1)))return Pi;if(!(En&524288))return 0}else if(En&3145728||Bi&3145728){if(Pi=Eh(dt,It,oi,Tt))return Pi;if(!(En&465829888||En&524288&&Bi&1048576||En&2097152&&Bi&467402752))return 0}if(En&17301504&&dt.aliasSymbol&&dt.aliasTypeArguments&&dt.aliasSymbol===It.aliasSymbol&&!(j_e(dt)||j_e(It))){const Wn=pdt(dt.aliasSymbol);if(Wn===x)return 1;const Qr=Zs(dt.aliasSymbol).typeParameters,Vr=a1(Qr),aa=Ix(dt.aliasTypeArguments,Qr,Vr,Xn(dt.aliasSymbol.valueDeclaration)),Sa=Ix(It.aliasTypeArguments,Qr,Vr,Xn(dt.aliasSymbol.valueDeclaration)),kc=Pr(aa,Sa,Wn,Tt);if(kc!==void 0)return kc}if(kdt(dt)&&!dt.target.readonly&&(Pi=ur(Nc(dt)[0],It,1))||kdt(It)&&(It.target.readonly||JZ(Hf(dt)||dt))&&(Pi=ur(dt,Nc(It)[0],2)))return Pi;if(Bi&262144){if(Rr(dt)&32&&!dt.declaration.nameType&&ur(l1(It),Og(dt),3)&&!(ny(dt)&4)){const Wn=bC(dt),Qr=lp(It,av(dt));if(Pi=ur(Wn,Qr,3,oi))return Pi}if(v===Mp&&En&262144){let Wn=C_(dt);if(Wn)for(;Wn&&Km(Wn,Qr=>!!(Qr.flags&262144));){if(Pi=ur(Wn,It,1,!1))return Pi;Wn=C_(Wn)}return 0}}else if(Bi&4194304){const Wn=It.type;if(En&4194304&&(Pi=ur(Wn,dt.type,3,!1)))return Pi;if(Qa(Wn)){if(Pi=ur(dt,Sut(Wn),2,oi))return Pi}else{const Qr=Q3e(Wn);if(Qr){if(ur(dt,l1(Qr,It.indexFlags|4),2,oi)===-1)return-1}else if(ap(Wn)){const Vr=qS(Wn),aa=Og(Wn);let Sa;if(Vr&&DO(Wn)){const kc=ah(Vr,Wn);Sa=es([kc,Vr])}else Sa=Vr||aa;if(ur(dt,Sa,2,oi)===-1)return-1}}}else if(Bi&8388608){if(En&8388608){if((Pi=ur(dt.objectType,It.objectType,3,oi))&&(Pi&=ur(dt.indexType,It.indexType,3,oi)),Pi)return Pi;oi&&(Xt=ne)}if(v===$_||v===Mp){const Wn=It.objectType,Qr=It.indexType,Vr=Hf(Wn)||Wn,aa=Hf(Qr)||Qr;if(!sN(Vr)&&!oN(aa)){const Sa=4|(Vr!==Wn?2:0),kc=Lx(Vr,aa,Sa);if(kc){if(oi&&Xt&&Ur(zi),Pi=ur(dt,kc,2,oi,void 0,Tt))return Pi;oi&&Xt&&ne&&(ne=qn([Xt])<=qn([ne])?Xt:ne)}}}oi&&(Xt=void 0)}else if(ap(It)&&v!==sp){const Wn=!!It.declaration.nameType,Qr=bC(It),Vr=ny(It);if(!(Vr&8)){if(!Wn&&Qr.flags&8388608&&Qr.objectType===dt&&Qr.indexType===av(It))return-1;if(!ap(dt)){const aa=Wn?qS(It):Og(It),Sa=l1(dt,2),kc=Vr&4,x_=kc?SZ(aa,Sa):void 0;if(kc?!(x_.flags&131072):ur(aa,Sa,3)){const Vp=bC(It),Vx=av(It),G2=ZF(Vp,-98305);if(!Wn&&G2.flags&8388608&&G2.indexType===Vx){if(Pi=ur(dt,G2.objectType,2,oi))return Pi}else{const $D=Wn?x_||aa:x_?Fa([x_,Vx]):Vx,p1=lp(dt,$D);if(Pi=ur(p1,Vp,3,oi))return Pi}}Xt=ne,Ur(zi)}}}else if(Bi&16777216){if(WA(It,Dt,Wi,10))return 3;const Wn=It;if(!Wn.root.inferTypeParameters&&!dUt(Wn.root)&&!(dt.flags&16777216&&dt.root===Wn.root)){const Qr=!ba(Oj(Wn.checkType),Oj(Wn.extendsType)),Vr=!Qr&&ba(lN(Wn.checkType),lN(Wn.extendsType));if((Pi=Qr?-1:ur(dt,W2(Wn),2,!1,void 0,Tt))&&(Pi&=Vr?-1:ur(dt,V2(Wn),2,!1,void 0,Tt),Pi))return Pi}}else if(Bi&134217728){if(En&134217728){if(v===Mp)return Bqt(dt,It)?0:-1;Ys(dt,Ic)}if(spe(dt,It))return-1}else if(It.flags&268435456&&!(dt.flags&268435456)&&rpe(dt,It))return-1;if(En&8650752){if(!(En&8388608&&Bi&8388608)){const Wn=YI(dt)||Gt;if(Pi=ur(Wn,It,1,!1,void 0,Tt))return Pi;if(Pi=ur(Wp(Wn,dt),It,1,oi&&Wn!==Gt&&!(Bi&En&262144),void 0,Tt))return Pi;if(eOe(dt)){const Qr=YI(dt.indexType);if(Qr&&(Pi=ur(lp(dt.objectType,Qr),It,1,oi)))return Pi}}}else if(En&4194304){const Wn=OOe(dt.type,dt.indexFlags)&&Rr(dt.type)&32;if(Pi=ur($i,It,1,oi&&!Wn))return Pi;if(Wn){const Qr=dt.type,Vr=qS(Qr),aa=Vr&&DO(Qr)?ah(Vr,Qr):Vr||Og(Qr);if(Pi=ur(aa,It,1,oi))return Pi}}else if(En&134217728&&!(Bi&524288)){if(!(Bi&134217728)){const Wn=Hf(dt);if(Wn&&Wn!==dt&&(Pi=ur(Wn,It,1,oi)))return Pi}}else if(En&268435456)if(Bi&268435456){if(dt.symbol!==It.symbol)return 0;if(Pi=ur(dt.type,It.type,3,oi))return Pi}else{const Wn=Hf(dt);if(Wn&&(Pi=ur(Wn,It,1,oi)))return Pi}else if(En&16777216){if(WA(dt,Ve,Kt,10))return 3;if(Bi&16777216){const Vr=dt.root.inferTypeParameters;let aa=dt.extendsType,Sa;if(Vr){const kc=jj(Vr,void 0,0,Os);DC(kc.inferences,It.extendsType,aa,1536),aa=Ys(aa,kc.mapper),Sa=kc.mapper}if(SC(aa,It.extendsType)&&(ur(dt.checkType,It.checkType,3)||ur(It.checkType,dt.checkType,3))&&((Pi=ur(Ys(W2(dt),Sa),W2(It),3,oi))&&(Pi&=ur(V2(dt),V2(It),3,oi)),Pi))return Pi}const Wn=X3e(dt);if(Wn&&(Pi=ur(Wn,It,1,oi)))return Pi;const Qr=!(Bi&16777216)&&kZ(dt)?Mct(dt):void 0;if(Qr&&(Ur(zi),Pi=ur(Qr,It,1,oi)))return Pi}else{if(v!==Zv&&v!==om&&yjt(It)&&wC(dt))return-1;if(ap(It))return ap(dt)&&(Pi=li(dt,It,oi))?Pi:0;const Wn=!!(En&402784252);if(v!==sp)dt=Qh(dt),En=dt.flags;else if(ap(dt))return 0;if(Rr(dt)&4&&Rr(It)&4&&dt.target===It.target&&!Qa(dt)&&!(j_e(dt)||j_e(It))){if(J_e(dt))return-1;const Qr=iMe(dt.target);if(Qr===x)return 1;const Vr=Pr(Nc(dt),Nc(It),Qr,Tt);if(Vr!==void 0)return Vr}else{if(JF(It)?dp(dt,j2):_m(It)&&dp(dt,Qr=>Qa(Qr)&&!Qr.target.readonly))return v!==sp?ur(F2(dt,Ae)||Je,F2(It,Ae)||Je,3,oi):0;if(Mx(dt)&&Qa(It)&&!Mx(It)){const Qr=ry(dt);if(Qr!==dt)return ur(Qr,It,1,oi)}else if((v===Zv||v===om)&&wC(It)&&Rr(It)&8192&&!wC(dt))return 0}if(En&2621440&&Bi&524288){const Qr=oi&&ne===zi.errorInfo&&!Wn;if(Pi=Oa(dt,It,Qr,void 0,!1,Tt),Pi&&(Pi&=Ze(dt,It,0,Qr,Tt),Pi&&(Pi&=Ze(dt,It,1,Qr,Tt),Pi&&(Pi&=eo(dt,It,Wn,Qr,Tt)))),Vi&&Pi)ne=Xt||ne||zi.errorInfo;else if(Pi)return Pi}if(En&2621440&&Bi&1048576){const Qr=ZF(It,36175872);if(Qr.flags&1048576){const Vr=Zi(dt,Qr);if(Vr)return Vr}}}return 0;function qn(Wn){return Wn?nd(Wn,(Qr,Vr)=>Qr+1+qn(Vr.next),0):0}function Pr(Wn,Qr,Vr,aa){if(Pi=$O(Wn,Qr,Vr,oi,aa))return Pi;if(Rt(Vr,kc=>!!(kc&24))){Xt=void 0,Ur(zi);return}const Sa=Qr&&YUt(Qr,Vr);if(Vi=!Sa,Vr!==x&&!Sa){if(Vi&&!(oi&&Rt(Vr,kc=>(kc&7)===0)))return 0;Xt=ne,Ur(zi)}}}function li(dt,It,oi){if(v===Mp||(v===sp?ny(dt)===ny(It):HF(dt)<=HF(It))){let zi;const Pi=Og(It),Xt=Ys(Og(dt),HF(dt)<0?$s:Ic);if(zi=ur(Pi,Xt,3,oi)){const Vi=cp([av(dt)],[av(It)]);if(Ys(qS(dt),Vi)===Ys(qS(It),Vi))return zi&ur(Ys(bC(dt),Vi),bC(It),3,oi)}}return 0}function Zi(dt,It){var oi;const Tt=Nl(dt),zi=zdt(Tt,It);if(!zi)return 0;let Pi=1;for(const Pr of zi)if(Pi*=h$t(kx(Pr)),Pi>25)return(oi=sr)==null||oi.instant(sr.Phase.CheckTypes,"typeRelatedToDiscriminatedType_DepthLimit",{sourceId:dt.id,targetId:It.id,numCombinations:Pi}),0;const Xt=new Array(zi.length),Vi=new Set;for(let Pr=0;PrPr[Vr],!1,0,be||v===Mp))continue e}Cc(Bi,Qr,XC),Wn=!0}if(!Wn)return 0}let qn=-1;for(const Pr of Bi)if(qn&=Oa(dt,Pr,!1,Vi,!1,0),qn&&(qn&=Ze(dt,Pr,0,!1,0),qn&&(qn&=Ze(dt,Pr,1,!1,0),qn&&!(Qa(dt)&&Qa(Pr))&&(qn&=eo(dt,Pr,!1,!1,0)))),!qn)return qn;return qn}function yn(dt,It){if(!It||dt.length===0)return dt;let oi;for(let Tt=0;Tt5?No(k.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more,Un(dt),Un(It),Yt(Pi.slice(0,4),Xt=>Js(Xt)).join(", "),Pi.length-4):No(k.Type_0_is_missing_the_following_properties_from_type_1_Colon_2,Un(dt),Un(It),Yt(Pi,Xt=>Js(Xt)).join(", ")),zi&&ne&&Cr++)}function Oa(dt,It,oi,Tt,zi,Pi){if(v===sp)return Ha(dt,It,Tt);let Xt=-1;if(Qa(It)){if(j2(dt)){if(!It.target.readonly&&(JF(dt)||Qa(dt)&&dt.target.readonly))return 0;const Pr=JS(dt),Wn=JS(It),Qr=Qa(dt)?dt.target.combinedFlags&4:4,Vr=It.target.combinedFlags&4,aa=Qa(dt)?dt.target.minLength:0,Sa=It.target.minLength;if(!Qr&&Pr=Vp?Wn-1-Math.min(JO,Vx):p1,JD=It.target.elementFlags[Hx];if(JD&8&&!(hp&8))return oi&&No(k.Source_provides_no_match_for_variadic_element_at_position_0_in_target,Hx),0;if(hp&8&&!(JD&12))return oi&&No(k.Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target,p1,Hx),0;if(JD&1&&!(hp&1))return oi&&No(k.Source_provides_no_match_for_required_element_at_position_0_in_target,Hx),0;if($D&&((hp&12||JD&12)&&($D=!1),$D&&(Tt!=null&&Tt.has(""+p1))))continue;const hz=TC(kc[p1],!!(hp&JD&2)),CN=x_[Hx],d5=hp&8&&JD&4?sh(CN):TC(CN,!!(JD&2)),_z=ur(hz,d5,3,oi,void 0,Pi);if(!_z)return oi&&(Wn>1||Pr>1)&&(G2&&p1>=Vp&&JO>=Vx&&Vp!==Pr-Vx-1?ta(k.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target,Vp,Pr-Vx-1,Hx):ta(k.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target,p1,Hx)),0;Xt&=_z}return Xt}if(It.target.combinedFlags&12)return 0}const Vi=(v===Zv||v===om)&&!q2(dt)&&!J_e(dt)&&!Qa(dt),En=yMe(dt,It,Vi,!1);if(En)return oi&&Pe(dt,It)&&os(dt,It,En,Vi),0;if(q2(It)){for(const Pr of yn(Nl(dt),Tt))if(!LD(It,Pr.escapedName)&&!(Qn(Pr).flags&32768))return oi&&No(k.Property_0_does_not_exist_on_type_1,Js(Pr),Un(It)),0}const Bi=Nl(It),qn=Qa(dt)&&Qa(It);for(const Pr of yn(Bi,Tt)){const Wn=Pr.escapedName;if(!(Pr.flags&4194304)&&(!qn||Yy(Wn)||Wn==="length")&&(!zi||Pr.flags&16777216)){const Qr=ya(dt,Wn);if(Qr&&Qr!==Pr){const Vr=xr(dt,It,Qr,Pr,kx,oi,Pi,v===Mp);if(!Vr)return 0;Xt&=Vr}}}return Xt}function Ha(dt,It,oi){if(!(dt.flags&524288&&It.flags&524288))return 0;const Tt=yn(Ex(dt),oi),zi=yn(Ex(It),oi);if(Tt.length!==zi.length)return 0;let Pi=-1;for(const Xt of Tt){const Vi=LD(It,Xt.escapedName);if(!Vi)return 0;const En=rMe(Xt,Vi,ur);if(!En)return 0;Pi&=En}return Pi}function Ze(dt,It,oi,Tt,zi){var Pi,Xt;if(v===sp)return tr(dt,It,oi);if(It===Mc||dt===Mc)return-1;const Vi=dt.symbol&&h1(dt.symbol.valueDeclaration),En=It.symbol&&h1(It.symbol.valueDeclaration),Bi=ea(dt,Vi&&oi===1?0:oi),qn=ea(It,En&&oi===1?0:oi);if(oi===1&&Bi.length&&qn.length){const aa=!!(Bi[0].flags&4),Sa=!!(qn[0].flags&4);if(aa&&!Sa)return Tt&&No(k.Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type),0;if(!Jl(Bi[0],qn[0],Tt))return 0}let Pr=-1;const Wn=oi===1?nn:Di,Qr=Rr(dt),Vr=Rr(It);if(Qr&64&&Vr&64&&dt.symbol===It.symbol||Qr&4&&Vr&4&&dt.target===It.target){z.assertEqual(Bi.length,qn.length);for(let aa=0;aaSx(Vp,void 0,262144,oi);return No(k.Type_0_is_not_assignable_to_type_1,x_(Sa),x_(kc)),No(k.Types_of_construct_signatures_are_incompatible),Pr}}else e:for(const aa of qn){const Sa=Ia();let kc=Tt;for(const x_ of Bi){const Vp=rr(x_,aa,!0,kc,zi,Wn(x_,aa));if(Vp){Pr&=Vp,Ur(Sa);continue e}kc=!1}return kc&&No(k.Type_0_provides_no_match_for_the_signature_1,Un(dt),Sx(aa,void 0,void 0,oi)),0}return Pr}function Pe(dt,It){const oi=DZ(dt,0),Tt=DZ(dt,1),zi=Ex(dt);return(oi.length||Tt.length)&&!zi.length?!!(ea(It,0).length&&oi.length||ea(It,1).length&&Tt.length):!0}function Di(dt,It){return dt.parameters.length===0&&It.parameters.length===0?(oi,Tt)=>ta(k.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1,Un(oi),Un(Tt)):(oi,Tt)=>ta(k.Call_signature_return_types_0_and_1_are_incompatible,Un(oi),Un(Tt))}function nn(dt,It){return dt.parameters.length===0&&It.parameters.length===0?(oi,Tt)=>ta(k.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1,Un(oi),Un(Tt)):(oi,Tt)=>ta(k.Construct_signature_return_types_0_and_1_are_incompatible,Un(oi),Un(Tt))}function rr(dt,It,oi,Tt,zi,Pi){const Xt=v===Zv?16:v===om?24:0;return QOe(oi?Dj(dt):dt,oi?Dj(It):It,Xt,Tt,No,Pi,Vi,Ic);function Vi(En,Bi,qn){return ur(En,Bi,3,qn,void 0,zi)}}function tr(dt,It,oi){const Tt=ea(dt,oi),zi=ea(It,oi);if(Tt.length!==zi.length)return 0;let Pi=-1;for(let Xt=0;XtEn.keyType===tt);let Vi=-1;for(const En of Pi){const Bi=v!==om&&!oi&&Xt&&En.type.flags&1?-1:ap(dt)&&Xt?ur(bC(dt),En.type,3,Tt):Eo(dt,En,Tt,zi);if(!Bi)return 0;Vi&=Bi}return Vi}function Eo(dt,It,oi,Tt){const zi=xj(dt,It.keyType);return zi?Ms(zi,It,oi,Tt):!(Tt&1)&&(v!==om||Rr(dt)&8192)&&Y_e(dt)?pr(dt,It,oi,Tt):(oi&&No(k.Index_signature_for_type_0_is_missing_in_type_1,Un(It.keyType),Un(dt)),0)}function Jo(dt,It){const oi=Xh(dt),Tt=Xh(It);if(oi.length!==Tt.length)return 0;for(const zi of Tt){const Pi=hb(dt,zi.keyType);if(!(Pi&&ur(Pi.type,zi.type,3)&&Pi.isReadonly===zi.isReadonly))return 0}return-1}function Jl(dt,It,oi){if(!dt.declaration||!It.declaration)return!0;const Tt=tP(dt.declaration,6),zi=tP(It.declaration,6);return zi===2||zi===4&&Tt!==2||zi!==4&&!Tt?!0:(oi&&No(k.Cannot_assign_a_0_constructor_type_to_a_1_constructor_type,MF(Tt),MF(zi)),!1)}}function YOe(o){if(o.flags&16)return!1;if(o.flags&3145728)return!!W(o.types,YOe);if(o.flags&465829888){const _=YI(o);if(_&&_!==o)return YOe(_)}return uv(o)||!!(o.flags&134217728)||!!(o.flags&268435456)}function hdt(o,_){return Qa(o)&&Qa(_)?x:Nl(_).filter(v=>H_e(Eu(o,v.escapedName),Qn(v)))}function H_e(o,_){return!!o&&!!_&&Fu(o,32768)&&!!Vj(_)}function XUt(o){return Nl(o).filter(_=>Vj(Qn(_)))}function _dt(o,_,v=GOe){return Bpt(o,_,v)||uei(o,_)||dei(o,_)||fei(o,_)||hei(o,_)}function eMe(o,_,v){const S=o.types,D=S.map(B=>B.flags&402784252?0:-1);for(const[B,K]of _){let ne=!1;for(let ae=0;aeD[K]),0):o;return L.flags&131072?o:L}function tMe(o){if(o.flags&524288){const _=lv(o);return _.callSignatures.length===0&&_.constructSignatures.length===0&&_.indexInfos.length===0&&_.properties.length>0&&Be(_.properties,v=>!!(v.flags&16777216))}return o.flags&33554432?tMe(o.baseType):o.flags&2097152?Be(o.types,tMe):!1}function ZUt(o,_,v){for(const S of Nl(o))if(wpe(_,S.escapedName,v))return!0;return!1}function iMe(o){return o===ai||o===Sn||o.objectFlags&8?re:gdt(o.symbol,o.typeParameters)}function pdt(o){return gdt(o,Zs(o).typeParameters)}function gdt(o,_=x){var v,S;const D=Zs(o);if(!D.variances){(v=sr)==null||v.push(sr.Phase.CheckTypes,"getVariancesWorker",{arity:_.length,id:kf(vc(o))});const L=ks,B=ar;ks||(ks=!0,ar=Ki.length),D.variances=x;const K=[];for(const ne of _){const ae=nMe(ne);let Ce=ae&16384?ae&8192?0:1:ae&8192?2:void 0;if(Ce===void 0){let qe=!1,Ve=!1;const Dt=ca;ca=Wi=>Wi?Ve=!0:qe=!0;const Vt=UZ(o,ne,wu),Kt=UZ(o,ne,zh);Ce=(ba(Kt,Vt)?1:0)|(ba(Vt,Kt)?2:0),Ce===3&&ba(UZ(o,ne,Uh),Vt)&&(Ce=4),ca=Dt,(qe||Ve)&&(qe&&(Ce|=8),Ve&&(Ce|=16))}K.push(Ce)}L||(ks=!1,ar=B),D.variances=K,(S=sr)==null||S.pop({variances:K.map(z.formatVariance)})}return D.variances}function UZ(o,_,v){const S=FD(_,v),D=vc(o);if(_l(D))return D;const L=o.flags&524288?NO(o,_b(Zs(o).typeParameters,S)):$S(D,_b(D.typeParameters,S));return St.add(kf(L)),L}function j_e(o){return St.has(kf(o))}function nMe(o){var _;return nd((_=o.symbol)==null?void 0:_.declarations,(v,S)=>v|Wh(S),0)&28672}function YUt(o,_){for(let v=0;v<_.length;v++)if((_[v]&7)===1&&o[v].flags&16384)return!0;return!1}function eqt(o){return o.flags&262144&&!C_(o)}function tqt(o){return!!(Rr(o)&4)&&!o.node}function z_e(o){return tqt(o)&&Rt(Nc(o),_=>!!(_.flags&262144)||z_e(_))}function iqt(o,_,v,S){const D=[];let L="";const B=ne(o,0),K=ne(_,0);return`${L}${B},${K}${v}`;function ne(ae,Ce=0){let qe=""+ae.target.id;for(const Ve of Nc(ae)){if(Ve.flags&262144){if(S||eqt(Ve)){let Dt=D.indexOf(Ve);Dt<0&&(Dt=D.length,D.push(Ve)),qe+="="+Dt;continue}L="*"}else if(Ce<4&&z_e(Ve)){qe+="<"+ne(Ve,Ce+1)+">";continue}qe+="-"+Ve.id}return qe}}function U_e(o,_,v,S,D){if(S===sp&&o.id>_.id){const B=o;o=_,_=B}const L=v?":"+v:"";return z_e(o)&&z_e(_)?iqt(o,_,L,D):`${o.id},${_.id}${L}`}function qZ(o,_){if(Pu(o)&6){for(const v of o.links.containingType.types){const S=ya(v,o.escapedName),D=S&&qZ(S,_);if(D)return D}return}return _(o)}function BA(o){return o.parent&&o.parent.flags&32?vc(Vf(o)):void 0}function q_e(o){const _=BA(o),v=_&&Yr(_)[0];return v&&Eu(v,o.escapedName)}function nqt(o,_){return qZ(o,v=>{const S=BA(v);return S?xO(S,_):!1})}function rqt(o,_){return!qZ(_,v=>Qg(v)&4?!nqt(o,BA(v)):!1)}function mdt(o,_,v){return qZ(_,S=>Qg(S,v)&4?!xO(o,BA(S)):!1)?void 0:o}function WA(o,_,v,S=3){if(v>=S){if((Rr(o)&96)===96&&(o=vdt(o)),o.flags&2097152)return Rt(o.types,K=>WA(K,_,v,S));const D=$_e(o);let L=0,B=0;for(let K=0;K=B&&(L++,L>=S))return!0;B=ne.id}}}return!1}function vdt(o){let _;for(;(Rr(o)&96)===96&&(_=ND(o))&&(_.symbol||_.flags&2097152&&Rt(_.types,v=>!!v.symbol));)o=_;return o}function ydt(o,_){return(Rr(o)&96)===96&&(o=vdt(o)),o.flags&2097152?Rt(o.types,v=>ydt(v,_)):$_e(o)===_}function $_e(o){if(o.flags&524288&&!CMe(o)){if(Rr(o)&4&&o.node)return o.node;if(o.symbol&&!(Rr(o)&16&&o.symbol.flags&32))return o.symbol;if(Qa(o))return o.target}if(o.flags&262144)return o.symbol;if(o.flags&8388608){do o=o.objectType;while(o.flags&8388608);return o}return o.flags&16777216?o.root:o}function sqt(o,_){return rMe(o,_,Mj)!==0}function rMe(o,_,v){if(o===_)return-1;const S=Qg(o)&6,D=Qg(_)&6;if(S!==D)return 0;if(S){if(UO(o)!==UO(_))return 0}else if((o.flags&16777216)!==(_.flags&16777216))return 0;return hv(o)!==hv(_)?0:v(Qn(o),Qn(_))}function oqt(o,_,v){const S=fp(o),D=fp(_),L=_1(o),B=_1(_),K=ly(o),ne=ly(_);return!!(S===D&&L===B&&K===ne||v&&L<=B)}function $Z(o,_,v,S,D,L){if(o===_)return-1;if(!oqt(o,_,v)||O(o.typeParameters)!==O(_.typeParameters))return 0;if(_.typeParameters){const ne=cp(o.typeParameters,_.typeParameters);for(let ae=0;ae<_.typeParameters.length;ae++){const Ce=o.typeParameters[ae],qe=_.typeParameters[ae];if(!(Ce===qe||L(Ys(UF(Ce),ne)||Gt,UF(qe)||Gt)&&L(Ys(tN(Ce),ne)||Gt,tN(qe)||Gt)))return 0}o=FA(o,ne,!0)}let B=-1;if(!S){const ne=B2(o);if(ne){const ae=B2(_);if(ae){const Ce=L(ne,ae);if(!Ce)return 0;B&=Ce}}}const K=fp(_);for(let ne=0;ne_|(v.flags&1048576?bdt(v.types):v.flags),0)}function cqt(o){if(o.length===1)return o[0];const _=be?Is(o,S=>ud(S,D=>!(D.flags&98304))):o,v=lqt(_)?es(_):nd(_,(S,D)=>Ax(S,D)?D:S);return _===o?v:KZ(v,bdt(o)&98304)}function uqt(o){return nd(o,(_,v)=>Ax(v,_)?v:_)}function _m(o){return!!(Rr(o)&4)&&(o.target===ai||o.target===Sn)}function JF(o){return!!(Rr(o)&4)&&o.target===Sn}function j2(o){return _m(o)||Qa(o)}function JZ(o){return _m(o)&&!JF(o)||Qa(o)&&!o.target.readonly}function GZ(o){return _m(o)?Nc(o)[0]:void 0}function XS(o){return _m(o)||!(o.flags&98304)&&ba(o,Ju)}function sMe(o){return JZ(o)||!(o.flags&98305)&&ba(o,Xl)}function oMe(o){if(!(Rr(o)&4)||!(Rr(o.target)&3))return;if(Rr(o)&33554432)return Rr(o)&67108864?o.cachedEquivalentBaseType:void 0;o.objectFlags|=33554432;const _=o.target;if(Rr(_)&1){const D=M2(_);if(D&&D.expression.kind!==80&&D.expression.kind!==211)return}const v=Yr(_);if(v.length!==1||Dx(o.symbol).size)return;let S=O(_.typeParameters)?Ys(v[0],cp(_.typeParameters,Nc(o).slice(0,_.typeParameters.length))):v[0];return O(Nc(o))>O(_.typeParameters)&&(S=Wp(S,La(Nc(o)))),o.objectFlags|=67108864,o.cachedEquivalentBaseType=S}function Cdt(o){return be?o===Fs:o===ce}function J_e(o){const _=GZ(o);return!!_&&Cdt(_)}function GF(o){let _;return Qa(o)||!!ya(o,"0")||XS(o)&&!!(_=Eu(o,"length"))&&dp(_,v=>!!(v.flags&256))}function G_e(o){return XS(o)||GF(o)}function Sdt(o,_){const v=Eu(o,""+_);if(v)return v;if(dp(o,Qa))return Tdt(o,_,Y.noUncheckedIndexedAccess?wi:void 0)}function dqt(o){return!(o.flags&240544)}function uv(o){return!!(o.flags&109472)}function wdt(o){const _=ry(o);return _.flags&2097152?Rt(_.types,uv):uv(_)}function fqt(o){return o.flags&2097152&&Me(o.types,uv)||o}function Bj(o){return o.flags&16?!0:o.flags&1048576?o.flags&1024?!0:Be(o.types,uv):uv(o)}function xC(o){return o.flags&1056?DA(o):o.flags&402653312?tt:o.flags&256?Ae:o.flags&2048?Ke:o.flags&512?fn:o.flags&1048576?hqt(o):o}function hqt(o){const _=`B${kf(o)}`;return p2(_)??PS(_,Zc(o,xC))}function aMe(o){return o.flags&402653312?tt:o.flags&288?Ae:o.flags&2048?Ke:o.flags&512?fn:o.flags&1048576?Zc(o,aMe):o}function z2(o){return o.flags&1056&&RD(o)?DA(o):o.flags&128&&RD(o)?tt:o.flags&256&&RD(o)?Ae:o.flags&2048&&RD(o)?Ke:o.flags&512&&RD(o)?fn:o.flags&1048576?Zc(o,z2):o}function xdt(o){return o.flags&8192?kn:o.flags&1048576?Zc(o,xdt):o}function lMe(o,_){return Wpe(o,_)||(o=xdt(z2(o))),Zh(o)}function _qt(o,_,v){if(o&&uv(o)){const S=_?v?nz(_):_:void 0;o=lMe(o,S)}return o}function cMe(o,_,v,S){if(o&&uv(o)){const D=_?zD(v,_,S):void 0;o=lMe(o,D)}return o}function Qa(o){return!!(Rr(o)&4&&o.target.objectFlags&8)}function Mx(o){return Qa(o)&&!!(o.target.combinedFlags&8)}function kdt(o){return Mx(o)&&o.target.elementFlags.length===1}function K_e(o){return KF(o,o.target.fixedLength)}function Tdt(o,_,v){return Zc(o,S=>{const D=S,L=K_e(D);return L?v&&_>=IOe(D.target)?es([L,v]):L:wi})}function pqt(o){const _=K_e(o);return _&&sh(_)}function KF(o,_,v=0,S=!1,D=!1){const L=JS(o)-v;if(_(v&12)===(_.target.elementFlags[S]&12))}function Ddt({value:o}){return o.base10Value==="0"}function Edt(o){return ud(o,_=>dv(_,4194304))}function mqt(o){return Zc(o,vqt)}function vqt(o){return o.flags&4?bt:o.flags&8?si:o.flags&64?Ti:o===ni||o===Qt||o.flags&114691||o.flags&128&&o.value===""||o.flags&256&&o.value===0||o.flags&2048&&Ddt(o)?o:rn}function KZ(o,_){const v=_&~o.flags&98304;return v===0?o:es(v===32768?[o,wi]:v===65536?[o,je]:[o,wi,je])}function Rx(o,_=!1){z.assert(be);const v=_?Bt:wi;return o===v||o.flags&1048576&&o.types[0]===v?o:es([o,v])}function yqt(o){return np||(np=PO("NonNullable",524288,void 0)||Ot),np!==Ot?NO(np,[o]):Fa([o,Ps])}function kC(o){return be?fN(o,2097152):o}function Idt(o){return be?es([o,le]):o}function Q_e(o){return be?ape(o,le):o}function X_e(o,_,v){return v?r8(_)?Rx(o):Idt(o):o}function Wj(o,_){return M$(_)?kC(o):ph(_)?Q_e(o):o}function TC(o,_){return fe&&_?ape(o,ut):o}function Vj(o){return o===ut||!!(o.flags&1048576)&&o.types[0]===ut}function Z_e(o){return fe?ape(o,ut):Gm(o,524288)}function bqt(o,_){return(o.flags&524)!==0&&(_.flags&28)!==0}function Y_e(o){const _=Rr(o);return o.flags&2097152?Be(o.types,Y_e):!!(o.symbol&&o.symbol.flags&7040&&!(o.symbol.flags&32)&&!nge(o))||!!(_&4194304)||!!(_&1024&&Y_e(o.source))}function cN(o,_){const v=sl(o.flags,o.escapedName,Pu(o)&8);v.declarations=o.declarations,v.parent=o.parent,v.links.type=_,v.links.target=o,o.valueDeclaration&&(v.valueDeclaration=o.valueDeclaration);const S=Zs(o).nameType;return S&&(v.links.nameType=S),v}function Cqt(o,_){const v=ga();for(const S of Ex(o)){const D=Qn(S),L=_(D);v.set(S.escapedName,L===D?S:cN(S,L))}return v}function Hj(o){if(!(q2(o)&&Rr(o)&8192))return o;const _=o.regularType;if(_)return _;const v=o,S=Cqt(o,Hj),D=bi(v.symbol,S,v.callSignatures,v.constructSignatures,v.indexInfos);return D.flags=v.flags,D.objectFlags|=v.objectFlags&-8193,o.regularType=D,D}function Ndt(o,_,v){return{parent:o,propertyName:_,siblings:v,resolvedProperties:void 0}}function Ldt(o){if(!o.siblings){const _=[];for(const v of Ldt(o.parent))if(q2(v)){const S=LD(v,o.propertyName);S&&hN(Qn(S),D=>{_.push(D)})}o.siblings=_}return o.siblings}function Sqt(o){if(!o.resolvedProperties){const _=new Map;for(const v of Ldt(o))if(q2(v)&&!(Rr(v)&2097152))for(const S of Nl(v))_.set(S.escapedName,S);o.resolvedProperties=Fn(_.values())}return o.resolvedProperties}function wqt(o,_){if(!(o.flags&4))return o;const v=Qn(o),S=_&&Ndt(_,o.escapedName,void 0),D=uMe(v,S);return D===v?o:cN(o,D)}function xqt(o){const _=fl.get(o.escapedName);if(_)return _;const v=cN(o,Bt);return v.flags|=16777216,fl.set(o.escapedName,v),v}function kqt(o,_){const v=ga();for(const D of Ex(o))v.set(D.escapedName,wqt(D,_));if(_)for(const D of Sqt(_))v.has(D.escapedName)||v.set(D.escapedName,xqt(D));const S=bi(o.symbol,v,x,x,Is(Xh(o),D=>sy(D.keyType,up(D.type),D.isReadonly)));return S.objectFlags|=Rr(o)&266240,S}function up(o){return uMe(o,void 0)}function uMe(o,_){if(Rr(o)&196608){if(_===void 0&&o.widened)return o.widened;let v;if(o.flags&98305)v=Je;else if(q2(o))v=kqt(o,_);else if(o.flags&1048576){const S=_||Ndt(void 0,void 0,o.types),D=Is(o.types,L=>L.flags&98304?L:uMe(L,S));v=es(D,Rt(D,wC)?2:1)}else o.flags&2097152?v=Fa(Is(o.types,up)):j2(o)&&(v=$S(o.target,Is(Nc(o),up)));return v&&_===void 0&&(o.widened=v),v||o}return o}function epe(o){let _=!1;if(Rr(o)&65536){if(o.flags&1048576)if(Rt(o.types,wC))_=!0;else for(const v of o.types)epe(v)&&(_=!0);if(j2(o))for(const v of Nc(o))epe(v)&&(_=!0);if(q2(o))for(const v of Ex(o)){const S=Qn(v);Rr(S)&65536&&(epe(S)||ht(v.valueDeclaration,k.Object_literal_s_property_0_implicitly_has_an_1_type,Js(v),Un(up(S))),_=!0)}}return _}function U2(o,_,v){const S=Un(up(_));if(Xn(o)&&!Z8(_n(o),Y))return;let D;switch(o.kind){case 226:case 172:case 171:D=ke?k.Member_0_implicitly_has_an_1_type:k.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;break;case 169:const L=o;if(lt(L.name)){const B=QE(L.name);if((xP(L.parent)||Hv(L.parent)||W1(L.parent))&&L.parent.parameters.includes(L)&&(Ui(L,L.name.escapedText,788968,void 0,!0)||B&&joe(B))){const K="arg"+L.parent.parameters.indexOf(L),ne=sc(L.name)+(L.dotDotDotToken?"[]":"");rf(ke,o,k.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1,K,ne);return}}D=o.dotDotDotToken?ke?k.Rest_parameter_0_implicitly_has_an_any_type:k.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:ke?k.Parameter_0_implicitly_has_an_1_type:k.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;break;case 208:if(D=k.Binding_element_0_implicitly_has_an_1_type,!ke)return;break;case 317:ht(o,k.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,S);return;case 323:ke&&u3(o.parent)&&ht(o.parent.tagName,k.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation,S);return;case 262:case 174:case 173:case 177:case 178:case 218:case 219:if(ke&&!o.name){v===3?ht(o,k.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation,S):ht(o,k.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,S);return}D=ke?v===3?k._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type:k._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:k._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage;break;case 200:ke&&ht(o,k.Mapped_object_type_implicitly_has_an_any_template_type);return;default:D=ke?k.Variable_0_implicitly_has_an_1_type:k.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage}rf(ke,o,D,sc(ko(o)),S)}function tpe(o,_,v){a(()=>{ke&&Rr(_)&65536&&(!v||!JMe(o))&&(epe(_)||U2(o,_,v))})}function dMe(o,_,v){const S=fp(o),D=fp(_),L=Xj(o),B=Xj(_),K=B?D-1:D,ne=L?K:Math.min(S,K),ae=B2(o);if(ae){const Ce=B2(_);Ce&&v(ae,Ce)}for(let Ce=0;Ce_.typeParameter),Yt(o.inferences,(_,v)=>()=>(_.isFixed||(Iqt(o),ipe(o.inferences),_.isFixed=!0),SMe(o,v))))}function Eqt(o){return UOe(Yt(o.inferences,_=>_.typeParameter),Yt(o.inferences,(_,v)=>()=>SMe(o,v)))}function ipe(o){for(const _ of o)_.isFixed||(_.inferredType=void 0)}function _Me(o,_,v){(o.intraExpressionInferenceSites??(o.intraExpressionInferenceSites=[])).push({node:_,type:v})}function Iqt(o){if(o.intraExpressionInferenceSites){for(const{node:_,type:v}of o.intraExpressionInferenceSites){const S=_.kind===174?Oft(_,2):w_(_,2);S&&DC(o.inferences,v,S)}o.intraExpressionInferenceSites=void 0}}function pMe(o){return{typeParameter:o,candidates:void 0,contraCandidates:void 0,inferredType:void 0,priority:void 0,topLevel:!0,isFixed:!1,impliedArity:void 0}}function Pdt(o){return{typeParameter:o.typeParameter,candidates:o.candidates&&o.candidates.slice(),contraCandidates:o.contraCandidates&&o.contraCandidates.slice(),inferredType:o.inferredType,priority:o.priority,topLevel:o.topLevel,isFixed:o.isFixed,impliedArity:o.impliedArity}}function Nqt(o){const _=Ri(o.inferences,zO);return _.length?hMe(Yt(_,Pdt),o.signature,o.flags,o.compareTypes):void 0}function gMe(o){return o&&o.mapper}function Fx(o){const _=Rr(o);if(_&524288)return!!(_&1048576);const v=!!(o.flags&465829888||o.flags&524288&&!Adt(o)&&(_&4&&(o.node||Rt(Nc(o),Fx))||_&134217728&&O(o.outerTypeParameters)||_&16&&o.symbol&&o.symbol.flags&14384&&o.symbol.declarations||_&12583968)||o.flags&3145728&&!(o.flags&1024)&&!Adt(o)&&Rt(o.types,Fx));return o.flags&3899393&&(o.objectFlags|=524288|(v?1048576:0)),v}function Adt(o){if(o.aliasSymbol&&!o.aliasTypeArguments){const _=Jc(o.aliasSymbol,265);return!!(_&&Xi(_.parent,v=>v.kind===307?!0:v.kind===267?!1:"quit"))}return!1}function zj(o,_,v=0){return!!(o===_||o.flags&3145728&&Rt(o.types,S=>zj(S,_,v))||v<3&&o.flags&16777216&&(zj(W2(o),_,v+1)||zj(V2(o),_,v+1)))}function Lqt(o,_){const v=dm(o);return v?!!v.type&&zj(v.type,_):zj(Ol(o),_)}function Pqt(o){const _=ga();hN(o,S=>{if(!(S.flags&128))return;const D=du(S.value),L=sl(4,D);L.links.type=Je,S.symbol&&(L.declarations=S.symbol.declarations,L.valueDeclaration=S.symbol.valueDeclaration),_.set(D,L)});const v=o.flags&4?[sy(tt,Ps,!1)]:x;return bi(void 0,_,x,x,v)}function Odt(o,_,v){const S=o.id+","+_.id+","+v.id;if(Ud.has(S))return Ud.get(S);const D=Aqt(o,_,v);return Ud.set(S,D),D}function mMe(o){return!(Rr(o)&262144)||q2(o)&&Rt(Nl(o),_=>mMe(Qn(_)))||Qa(o)&&Rt(OD(o),mMe)}function Aqt(o,_,v){if(!(hb(o,tt)||Nl(o).length!==0&&mMe(o)))return;if(_m(o)){const D=npe(Nc(o)[0],_,v);return D?sh(D,JF(o)):void 0}if(Qa(o)){const D=Yt(OD(o),B=>npe(B,_,v));if(!Be(D,B=>!!B))return;const L=ny(_)&4?Is(o.target.elementFlags,B=>B&2?1:B):o.target.elementFlags;return oy(D,L,o.target.readonly,o.target.labeledElementDeclarations)}const S=tg(1040,void 0);return S.source=o,S.mappedType=_,S.constraintType=v,S}function Oqt(o){const _=Zs(o);return _.type||(_.type=npe(o.links.propertyType,o.links.mappedType,o.links.constraintType)||Gt),_.type}function Mqt(o,_,v){const S=lp(v.type,av(_)),D=bC(_),L=pMe(S);return DC([L],o,D),Mdt(L)||Gt}function npe(o,_,v){const S=o.id+","+_.id+","+v.id;if($c.has(S))return $c.get(S)||Gt;gD.push(o),lb.push(_);const D=mD;WA(o,gD,gD.length,2)&&(mD|=1),WA(_,lb,lb.length,2)&&(mD|=2);let L;return mD!==3&&(L=Mqt(o,_,v)),gD.pop(),lb.pop(),mD=D,$c.set(S,L),L}function*vMe(o,_,v,S){const D=Nl(_);for(const L of D)if(!wct(L)&&(v||!(L.flags&16777216||Pu(L)&48))){const B=ya(o,L.escapedName);if(!B)yield L;else if(S){const K=Qn(L);if(K.flags&109472){const ne=Qn(B);ne.flags&1||Zh(ne)===Zh(K)||(yield L)}}}}function yMe(o,_,v,S){return Pw(vMe(o,_,v,S))}function Rqt(o,_){return!(_.target.combinedFlags&8)&&_.target.minLength>o.target.minLength||!_.target.hasRestElement&&(o.target.hasRestElement||_.target.fixedLengthAA(L,D),o)===o&&rpe(o,_)}return!1}function Bdt(o,_){if(_.flags&2097152)return Be(_.types,v=>v===wh||Bdt(o,v));if(_.flags&4||ba(o,_))return!0;if(o.flags&128){const v=o.value;return!!(_.flags&8&&Fdt(v,!1)||_.flags&64&&yG(v,!1)||_.flags&98816&&v===_.intrinsicName||_.flags&268435456&&rpe(G_(v),_)||_.flags&134217728&&spe(o,_))}if(o.flags&134217728){const v=o.texts;return v.length===2&&v[0]===""&&v[1]===""&&ba(o.types[0],_)}return!1}function Wdt(o,_){return o.flags&128?Vdt([o.value],x,_):o.flags&134217728?pi(o.texts,_.texts)?Yt(o.types,(v,S)=>ba(ry(v),ry(_.types[S]))?v:Vqt(v)):Vdt(o.texts,o.types,_):void 0}function spe(o,_){const v=Wdt(o,_);return!!v&&Be(v,(S,D)=>Bdt(S,_.types[D]))}function Vqt(o){return o.flags&402653317?o:nN(["",""],[o])}function Vdt(o,_,v){const S=o.length-1,D=o[0],L=o[S],B=v.texts,K=B.length-1,ne=B[0],ae=B[K];if(S===0&&D.length0){let An=Ve,Cr=Dt;for(;Cr=Vt(An).indexOf(qi,Cr),!(Cr>=0);){if(An++,An===o.length)return;Cr=0}Kt(An,Cr),Dt+=qi.length}else if(Dt!Mt(ur,Ll)):pn,Ks?Ri(Bn,Ll=>!Mt(Ks,Ll)):Bn]}function An(pn,Bn,Os){const ur=pn.length!!vn(Ks));if(!ur||Bn&&ur!==Bn)return;Bn=ur}return Bn}function Nr(pn,Bn,Os){let ur=0;if(Os&1048576){let Ks;const Ll=pn.flags&1048576?pn.types:[pn],kl=new Array(Ll.length);let oh=!1;for(const Ca of Bn)if(vn(Ca))Ks=Ca,ur++;else for(let Eh=0;Ehkl[nu]?void 0:Eh);if(Ca.length){Ve(es(Ca),Ks);return}}}else for(const Ks of Bn)vn(Ks)?ur++:Ve(pn,Ks);if(Os&2097152?ur===1:ur>0)for(const Ks of Bn)vn(Ks)&&Dt(pn,Ks,1)}function zr(pn,Bn,Os){if(Os.flags&1048576||Os.flags&2097152){let ur=!1;for(const Ks of Os.types)ur=zr(pn,Bn,Ks)||ur;return ur}if(Os.flags&4194304){const ur=vn(Os.type);if(ur&&!ur.isFixed&&!Rdt(pn)){const Ks=Odt(pn,Bn,Os);Ks&&Dt(Ks,ur.typeParameter,Rr(pn)&262144?16:8)}return!0}if(Os.flags&262144){Dt(l1(pn,pn.pattern?2:0),Os,32);const ur=YI(Os);if(ur&&zr(pn,Bn,ur))return!0;const Ks=Yt(Nl(pn),Qn),Ll=Yt(Xh(pn),kl=>kl!==mn?kl.type:rn);return Ve(es(no(Ks,Ll)),bC(Bn)),!0}return!1}function Ur(pn,Bn){if(pn.flags&16777216)Ve(pn.checkType,Bn.checkType),Ve(pn.extendsType,Bn.extendsType),Ve(W2(pn),W2(Bn)),Ve(V2(pn),V2(Bn));else{const Os=[W2(Bn),V2(Bn)];Kt(pn,Os,Bn.flags,D?64:0)}}function Ia(pn,Bn){const Os=Wdt(pn,Bn),ur=Bn.types;if(Os||Be(Bn.texts,Ks=>Ks.length===0))for(let Ks=0;Ksru|Rg.flags,0);if(!(nu&4)){const ru=Ll.value;nu&296&&!Fdt(ru,!0)&&(nu&=-297),nu&2112&&!yG(ru,!0)&&(nu&=-2113);const Rg=nd(Eh,(Bu,dd)=>dd.flags&nu?Bu.flags&4?Bu:dd.flags&4?Ll:Bu.flags&134217728?Bu:dd.flags&134217728&&spe(Ll,dd)?Ll:Bu.flags&268435456?Bu:dd.flags&268435456&&ru===Mut(dd.symbol,ru)?Ll:Bu.flags&128?Bu:dd.flags&128&&dd.value===ru?dd:Bu.flags&8?Bu:dd.flags&8?D0(+ru):Bu.flags&32?Bu:dd.flags&32?D0(+ru):Bu.flags&256?Bu:dd.flags&256&&dd.value===+ru?dd:Bu.flags&64?Bu:dd.flags&64?Wqt(ru):Bu.flags&2048?Bu:dd.flags&2048&&jT(dd.value)===ru?dd:Bu.flags&16?Bu:dd.flags&16?ru==="true"?fi:ru==="false"?Qt:fn:Bu.flags&512?Bu:dd.flags&512&&dd.intrinsicName===ru?dd:Bu.flags&32768?Bu:dd.flags&32768&&dd.intrinsicName===ru?dd:Bu.flags&65536?Bu:dd.flags&65536&&dd.intrinsicName===ru?dd:Bu:Bu,rn);if(!(Rg.flags&131072)){Ve(Rg,kl);continue}}}}Ve(Ll,kl)}}function ta(pn,Bn){Ve(Og(pn),Og(Bn)),Ve(bC(pn),bC(Bn));const Os=qS(pn),ur=qS(Bn);Os&&ur&&Ve(Os,ur)}function ll(pn,Bn){var Os,ur;if(Rr(pn)&4&&Rr(Bn)&4&&(pn.target===Bn.target||_m(pn)&&_m(Bn))){An(Nc(pn),Nc(Bn),iMe(pn.target));return}if(ap(pn)&&ap(Bn)&&ta(pn,Bn),Rr(Bn)&32&&!Bn.declaration.nameType){const Ks=Og(Bn);if(zr(pn,Bn,Ks))return}if(!Fqt(pn,Bn)){if(j2(pn)){if(Qa(Bn)){const Ks=JS(pn),Ll=JS(Bn),kl=Nc(Bn),oh=Bn.target.elementFlags;if(Qa(pn)&&gqt(pn,Bn)){for(let nu=0;nu0){const Ll=ea(Bn,Os),kl=Ll.length;for(let oh=0;oh1){const _=Ri(o,CMe);if(_.length){const v=es(_,2);return no(Ri(o,S=>!CMe(S)),[v])}}return o}function $qt(o){return o.priority&416?Fa(o.contraCandidates):uqt(o.contraCandidates)}function Jqt(o,_){const v=qqt(o.candidates),S=Uqt(o.typeParameter)||eN(o.typeParameter),D=!S&&o.topLevel&&(o.isFixed||!Lqt(_,o.typeParameter)),L=S?Is(v,Zh):D?Is(v,z2):v,B=o.priority&416?es(L,2):cqt(L);return up(B)}function SMe(o,_){const v=o.inferences[_];if(!v.inferredType){let S,D;if(o.signature){const B=v.candidates?Jqt(v,o.signature):void 0,K=v.contraCandidates?$qt(v):void 0;if(B||K){const ne=B&&(!K||!(B.flags&131072)&&Rt(v.contraCandidates,ae=>Ax(B,ae))&&Be(o.inferences,ae=>ae!==v&&C_(ae.typeParameter)!==v.typeParameter||Be(ae.candidates,Ce=>Ax(Ce,B))));S=ne?B:K,D=ne?K:B}else if(o.flags&1)S=_r;else{const ne=tN(v.typeParameter);ne&&(S=Ys(ne,SUt(CUt(o,_),o.nonFixingMapper)))}}else S=Mdt(v);v.inferredType=S||wMe(!!(o.flags&2));const L=C_(v.typeParameter);if(L){const B=Ys(L,o.nonFixingMapper);(!S||!o.compareTypes(S,Wp(B,S)))&&(v.inferredType=D&&o.compareTypes(D,Wp(B,D))?D:B)}}return v.inferredType}function wMe(o){return o?Je:Gt}function xMe(o){const _=[];for(let v=0;vFf(_)||Mm(_)||p_(_)))}function QZ(o,_,v,S){switch(o.kind){case 80:if(!BT(o)){const B=S_(o);return B!==Ot?`${S?Tl(S):"-1"}|${kf(_)}|${kf(v)}|${Aa(B)}`:void 0}case 110:return`0|${S?Tl(S):"-1"}|${kf(_)}|${kf(v)}`;case 235:case 217:return QZ(o.expression,_,v,S);case 166:const D=QZ(o.left,_,v,S);return D&&`${D}.${o.right.escapedText}`;case 211:case 212:const L=uN(o);if(L!==void 0){const B=QZ(o.expression,_,v,S);return B&&`${B}.${L}`}if(wc(o)&<(o.argumentExpression)){const B=S_(o.argumentExpression);if(VA(B)||$j(B)&&!sY(B)){const K=QZ(o.expression,_,v,S);return K&&`${K}.@${Aa(B)}`}}break;case 206:case 207:case 262:case 218:case 219:case 174:return`${Tl(o)}#${kf(_)}`}}function Tf(o,_){switch(_.kind){case 217:case 235:return Tf(o,_.expression);case 226:return Yd(_)&&Tf(o,_.left)||cr(_)&&_.operatorToken.kind===28&&Tf(o,_.right)}switch(o.kind){case 236:return _.kind===236&&o.keywordToken===_.keywordToken&&o.name.escapedText===_.name.escapedText;case 80:case 81:return BT(o)?_.kind===110:_.kind===80&&S_(o)===S_(_)||(ds(_)||nl(_))&&eg(S_(o))===wr(_);case 110:return _.kind===110;case 108:return _.kind===108;case 235:case 217:return Tf(o.expression,_);case 211:case 212:const v=uN(o);if(v!==void 0){const S=Sc(_)?uN(_):void 0;if(S!==void 0)return S===v&&Tf(o.expression,_.expression)}if(wc(o)&&wc(_)&<(o.argumentExpression)&<(_.argumentExpression)){const S=S_(o.argumentExpression);if(S===S_(_.argumentExpression)&&(VA(S)||$j(S)&&!sY(S)))return Tf(o.expression,_.expression)}break;case 166:return Sc(_)&&o.right.escapedText===uN(_)&&Tf(o.left,_.expression);case 226:return cr(o)&&o.operatorToken.kind===28&&Tf(o.right,_)}return!1}function uN(o){if(Ir(o))return o.name.escapedText;if(wc(o))return Gqt(o);if(nl(o)){const _=an(o);return _?du(_):void 0}if(Gs(o))return""+o.parent.parameters.indexOf(o)}function TMe(o){return o.flags&8192?o.escapedName:o.flags&384?du(""+o.value):void 0}function Gqt(o){return ug(o.argumentExpression)?du(o.argumentExpression.text):pc(o.argumentExpression)?Kqt(o.argumentExpression):void 0}function Kqt(o){const _=Du(o,111551,!0);if(!_||!(VA(_)||_.flags&8))return;const v=_.valueDeclaration;if(v===void 0)return;const S=Gn(v);if(S){const D=TMe(S);if(D!==void 0)return D}if(tI(v)&&b0(v,o)){const D=pW(v);if(D){const L=Qo(v.parent)?Bs(v):zf(D);return L&&TMe(L)}if(nx(v))return UL(v.name)}}function jdt(o,_){for(;Sc(o);)if(o=o.expression,Tf(o,_))return!0;return!1}function dN(o,_){for(;ph(o);)if(o=o.expression,Tf(o,_))return!0;return!1}function QF(o,_){if(o&&o.flags&1048576){const v=jct(o,_);if(v&&Pu(v)&2)return v.links.isDiscriminantProperty===void 0&&(v.links.isDiscriminantProperty=(v.links.checkFlags&192)===192&&!OA(Qn(v))),!!v.links.isDiscriminantProperty}return!1}function zdt(o,_){let v;for(const S of o)if(QF(_,S.escapedName)){if(v){v.push(S);continue}v=[S]}return v}function Qqt(o,_){const v=new Map;let S=0;for(const D of o)if(D.flags&61603840){const L=Eu(D,_);if(L){if(!Bj(L))return;let B=!1;hN(L,K=>{const ne=kf(Zh(K)),ae=v.get(ne);ae?ae!==Gt&&(v.set(ne,Gt),B=!0):v.set(ne,D)}),B||S++}}return S>=10&&S*2>=o.length?v:void 0}function XZ(o){const _=o.types;if(!(_.length<10||Rr(o)&32768||$n(_,v=>!!(v.flags&59506688))<10)){if(o.keyPropertyName===void 0){const v=W(_,D=>D.flags&59506688?W(Nl(D),L=>uv(Qn(L))?L.escapedName:void 0):void 0),S=v&&Qqt(_,v);o.keyPropertyName=S?v:"",o.constituentMap=S}return o.keyPropertyName.length?o.keyPropertyName:void 0}}function ZZ(o,_){var v;const S=(v=o.constituentMap)==null?void 0:v.get(kf(Zh(_)));return S!==Gt?S:void 0}function Udt(o,_){const v=XZ(o),S=v&&Eu(_,v);return S&&ZZ(o,S)}function Xqt(o,_){const v=XZ(o),S=v&&Me(_.properties,L=>L.symbol&&L.kind===303&&L.symbol.escapedName===v&&lY(L.initializer)),D=S&&IY(S.initializer);return D&&ZZ(o,D)}function qdt(o,_){return Tf(o,_)||jdt(o,_)}function $dt(o,_){if(o.arguments){for(const v of o.arguments)if(qdt(_,v)||dN(v,_))return!0}return!!(o.expression.kind===211&&qdt(_,o.expression.expression))}function DMe(o){return o.id<=0&&(o.id=wKe,wKe++),o.id}function Zqt(o,_){if(!(o.flags&1048576))return ba(o,_);for(const v of o.types)if(ba(v,_))return!0;return!1}function Yqt(o,_){if(o===_)return o;if(_.flags&131072)return _;const v=`A${kf(o)},${kf(_)}`;return p2(v)??PS(v,e$t(o,_))}function e$t(o,_){const v=ud(o,D=>Zqt(_,D)),S=_.flags&512&&RD(_)?Zc(v,RA):v;return ba(_,S)?S:o}function EMe(o){const _=lv(o);return!!(_.callSignatures.length||_.constructSignatures.length||_.members.get("bind")&&Ax(o,md))}function MO(o,_){return IMe(o,_)&_}function dv(o,_){return MO(o,_)!==0}function IMe(o,_){o.flags&467927040&&(o=Hf(o)||Gt);const v=o.flags;if(v&268435460)return be?16317953:16776705;if(v&134217856){const S=v&128&&o.value==="";return be?S?12123649:7929345:S?12582401:16776705}if(v&40)return be?16317698:16776450;if(v&256){const S=o.value===0;return be?S?12123394:7929090:S?12582146:16776450}if(v&64)return be?16317188:16775940;if(v&2048){const S=Ddt(o);return be?S?12122884:7928580:S?12581636:16775940}return v&16?be?16316168:16774920:v&528?be?o===Qt||o===ni?12121864:7927560:o===Qt||o===ni?12580616:16774920:v&524288?_&(be?83427327:83886079)?Rr(o)&16&&wC(o)?be?83427327:83886079:EMe(o)?be?7880640:16728e3:be?7888800:16736160:0:v&16384?9830144:v&32768?26607360:v&65536?42917664:v&12288?be?7925520:16772880:v&67108864?be?7888800:16736160:v&131072?0:v&1048576?nd(o.types,(S,D)=>S|IMe(D,_),0):v&2097152?t$t(o,_):83886079}function t$t(o,_){const v=Fu(o,402784252);let S=0,D=134217727;for(const L of o.types)if(!(v&&L.flags&524288)){const B=IMe(L,_);S|=B,D&=B}return S&8256|D&134209471}function Gm(o,_){return ud(o,v=>dv(v,_))}function fN(o,_){const v=Gdt(Gm(be&&o.flags&2?Wf:o,_));if(be)switch(_){case 524288:return Jdt(v,65536,131072,33554432,je);case 1048576:return Jdt(v,131072,65536,16777216,wi);case 2097152:case 4194304:return Zc(v,S=>dv(S,262144)?yqt(S):S)}return v}function Jdt(o,_,v,S,D){const L=MO(o,50528256);if(!(L&_))return o;const B=es([Ps,D]);return Zc(o,K=>dv(K,_)?Fa([K,!(L&S)&&dv(K,v)?B:Ps]):K)}function Gdt(o){return o===Wf?Gt:o}function NMe(o,_){return _?es([Qe(o),zf(_)]):o}function Kdt(o,_){var v;const S=KS(_);if(!Pm(S))return $e;const D=Am(S);return Eu(o,D)||Uj((v=NA(o,D))==null?void 0:v.type)||$e}function Qdt(o,_){return dp(o,GF)&&Sdt(o,_)||Uj(YS(65,o,wi,void 0))||$e}function Uj(o){return o&&(Y.noUncheckedIndexedAccess?es([o,ut]):o)}function Xdt(o){return sh(YS(65,o,wi,void 0)||$e)}function i$t(o){return o.parent.kind===209&&LMe(o.parent)||o.parent.kind===303&&LMe(o.parent.parent)?NMe(YZ(o),o.right):zf(o.right)}function LMe(o){return o.parent.kind===226&&o.parent.left===o||o.parent.kind===250&&o.parent.initializer===o}function n$t(o,_){return Qdt(YZ(o),o.elements.indexOf(_))}function r$t(o){return Xdt(YZ(o.parent))}function Zdt(o){return Kdt(YZ(o.parent),o.name)}function s$t(o){return NMe(Zdt(o),o.objectAssignmentInitializer)}function YZ(o){const{parent:_}=o;switch(_.kind){case 249:return tt;case 250:return MY(_)||$e;case 226:return i$t(_);case 220:return wi;case 209:return n$t(_,o);case 230:return r$t(_);case 303:return Zdt(_);case 304:return s$t(_)}return $e}function o$t(o){const _=o.parent,v=eft(_.parent),S=_.kind===206?Kdt(v,o.propertyName||o.name):o.dotDotDotToken?Xdt(v):Qdt(v,_.elements.indexOf(o));return NMe(S,o.initializer)}function Ydt(o){return Tr(o).resolvedType||zf(o)}function a$t(o){return o.initializer?Ydt(o.initializer):o.parent.parent.kind===249?tt:o.parent.parent.kind===250&&MY(o.parent.parent)||$e}function eft(o){return o.kind===260?a$t(o):o$t(o)}function l$t(o){return o.kind===260&&o.initializer&&ic(o.initializer)||o.kind!==208&&o.parent.kind===226&&ic(o.parent.right)}function WD(o){switch(o.kind){case 217:return WD(o.expression);case 226:switch(o.operatorToken.kind){case 64:case 76:case 77:case 78:return WD(o.left);case 28:return WD(o.right)}}return o}function tft(o){const{parent:_}=o;return _.kind===217||_.kind===226&&_.operatorToken.kind===64&&_.left===o||_.kind===226&&_.operatorToken.kind===28&&_.right===o?tft(_):o}function c$t(o){return o.kind===296?Zh(zf(o.expression)):rn}function ope(o){const _=Tr(o);if(!_.switchTypes){_.switchTypes=[];for(const v of o.caseBlock.clauses)_.switchTypes.push(c$t(v))}return _.switchTypes}function ift(o){if(Rt(o.caseBlock.clauses,v=>v.kind===296&&!Ml(v.expression)))return;const _=[];for(const v of o.caseBlock.clauses){const S=v.kind===296?v.expression.text:void 0;_.push(S&&!Mt(_,S)?S:void 0)}return _}function u$t(o,_){return o.flags&1048576?!W(o.types,v=>!Mt(_,v)):Mt(_,o)}function XF(o,_){return!!(o===_||o.flags&131072||_.flags&1048576&&d$t(o,_))}function d$t(o,_){if(o.flags&1048576){for(const v of o.types)if(!GS(_.types,v))return!1;return!0}return o.flags&1056&&DA(o)===_?!0:GS(_.types,o)}function hN(o,_){return o.flags&1048576?W(o.types,_):_(o)}function Km(o,_){return o.flags&1048576?Rt(o.types,_):_(o)}function dp(o,_){return o.flags&1048576?Be(o.types,_):_(o)}function f$t(o,_){return o.flags&3145728?Be(o.types,_):_(o)}function ud(o,_){if(o.flags&1048576){const v=o.types,S=Ri(v,_);if(S===v)return o;const D=o.origin;let L;if(D&&D.flags&1048576){const B=D.types,K=Ri(B,ne=>!!(ne.flags&1048576)||_(ne));if(B.length-K.length===v.length-S.length){if(K.length===1)return K[0];L=NOe(1048576,K)}}return POe(S,o.objectFlags&16809984,void 0,void 0,L)}return o.flags&131072||_(o)?o:rn}function ape(o,_){return ud(o,v=>v!==_)}function h$t(o){return o.flags&1048576?o.types.length:1}function Zc(o,_,v){if(o.flags&131072)return o;if(!(o.flags&1048576))return _(o);const S=o.origin,D=S&&S.flags&1048576?S.types:o.types;let L,B=!1;for(const K of D){const ne=K.flags&1048576?Zc(K,_,v):_(K);B||(B=K!==ne),ne&&(L?L.push(ne):L=[ne])}return B?L&&es(L,v?0:1):o}function nft(o,_,v,S){return o.flags&1048576&&v?es(Yt(o.types,_),1,v,S):Zc(o,_)}function ZF(o,_){return ud(o,v=>(v.flags&_)!==0)}function rft(o,_){return Fu(o,134217804)&&Fu(_,402655616)?Zc(o,v=>v.flags&4?ZF(_,402653316):rN(v)&&!Fu(_,402653188)?ZF(_,128):v.flags&8?ZF(_,264):v.flags&64?ZF(_,2112):v):o}function RO(o){return o.flags===0}function _N(o){return o.flags===0?o.type:o}function FO(o,_){return _?{flags:0,type:o.flags&131072?_r:o}:o}function _$t(o){const _=tg(256);return _.elementType=o,_}function PMe(o){return ji[o.id]||(ji[o.id]=_$t(o))}function sft(o,_){const v=Hj(xC(IY(_)));return XF(v,o.elementType)?o:PMe(es([o.elementType,v]))}function p$t(o){return o.flags&131072?$l:sh(o.flags&1048576?es(o.types,2):o)}function g$t(o){return o.finalArrayType||(o.finalArrayType=p$t(o.elementType))}function eY(o){return Rr(o)&256?g$t(o):o}function m$t(o){return Rr(o)&256?o.elementType:rn}function v$t(o){let _=!1;for(const v of o)if(!(v.flags&131072)){if(!(Rr(v)&256))return!1;_=!0}return _}function oft(o){const _=tft(o),v=_.parent,S=Ir(v)&&(v.name.escapedText==="length"||v.parent.kind===213&<(v.name)&&_oe(v.name)),D=v.kind===212&&v.expression===_&&v.parent.kind===226&&v.parent.operatorToken.kind===64&&v.parent.left===v&&!lS(v.parent)&&jf(zf(v.argumentExpression),296);return S||D}function y$t(o){return(ds(o)||To(o)||V_(o)||Gs(o))&&!!(hd(o)||Xn(o)&&iS(o)&&o.initializer&&Qw(o.initializer)&&Dp(o.initializer))}function lpe(o,_){if(o=Ru(o),o.flags&8752)return Qn(o);if(o.flags&7){if(Pu(o)&262144){const S=o.links.syntheticOrigin;if(S&&lpe(S))return Qn(o)}const v=o.valueDeclaration;if(v){if(y$t(v))return Qn(o);if(ds(v)&&v.parent.parent.kind===250){const S=v.parent.parent,D=tY(S.expression,void 0);if(D){const L=S.awaitModifier?15:13;return YS(L,D,wi,void 0)}}_&&fa(_,Kn(v,k._0_needs_an_explicit_type_annotation,Js(o)))}}}function tY(o,_){if(!(o.flags&67108864))switch(o.kind){case 80:const v=eg(S_(o));return lpe(v,_);case 110:return V$t(o);case 108:return _pe(o);case 211:{const S=tY(o.expression,_);if(S){const D=o.name;let L;if(Vs(D)){if(!S.symbol)return;L=ya(S,LW(S.symbol,D.escapedText))}else L=ya(S,D.escapedText);return L&&lpe(L,_)}return}case 217:return tY(o.expression,_)}}function iY(o){const _=Tr(o);let v=_.effectsSignature;if(v===void 0){let S;if(cr(o)){const B=WO(o.right);S=LRe(B)}else o.parent.kind===244?S=tY(o.expression,void 0):o.expression.kind!==108&&(ph(o)?S=d1(Wj(fo(o.expression),o.expression),o.expression):S=WO(o.expression));const D=ea(S&&Qh(S)||Gt,0),L=D.length===1&&!D[0].typeParameters?D[0]:Rt(D,aft)?HO(o):void 0;v=_.effectsSignature=L&&aft(L)?L:ct}return v===ct?void 0:v}function aft(o){return!!(dm(o)||o.declaration&&(EO(o.declaration)||Gt).flags&131072)}function b$t(o,_){if(o.kind===1||o.kind===3)return _.arguments[o.parameterIndex];const v=Il(_.expression);return Sc(v)?Il(v.expression):void 0}function C$t(o){const _=Xi(o,vse),v=_n(o),S=R1(v,_.statements.pos);vl.add(ef(v,S.start,S.length,k.The_containing_function_or_module_body_is_too_large_for_control_flow_analysis))}function nY(o){const _=cpe(o,!1);return nC=o,hx=_,_}function rY(o){const _=Il(o,!0);return _.kind===97||_.kind===226&&(_.operatorToken.kind===56&&(rY(_.left)||rY(_.right))||_.operatorToken.kind===57&&rY(_.left)&&rY(_.right))}function cpe(o,_){for(;;){if(o===nC)return hx;const v=o.flags;if(v&4096){if(!_){const S=DMe(o),D=iO[S];return D!==void 0?D:iO[S]=cpe(o,!0)}_=!1}if(v&368)o=o.antecedent;else if(v&512){const S=iY(o.node);if(S){const D=dm(S);if(D&&D.kind===3&&!D.type){const L=o.node.arguments[D.parameterIndex];if(L&&rY(L))return!1}if(Ol(S).flags&131072)return!1}o=o.antecedent}else{if(v&4)return Rt(o.antecedent,S=>cpe(S,!1));if(v&8){const S=o.antecedent;if(S===void 0||S.length===0)return!1;o=S[0]}else if(v&128){const S=o.node;if(S.clauseStart===S.clauseEnd&&Ght(S.switchStatement))return!1;o=o.antecedent}else if(v&1024){nC=void 0;const S=o.node.target,D=S.antecedent;S.antecedent=o.node.antecedents;const L=cpe(o.antecedent,!1);return S.antecedent=D,L}else return!(v&1)}}}function upe(o,_){for(;;){const v=o.flags;if(v&4096){if(!_){const S=DMe(o),D=uA[S];return D!==void 0?D:uA[S]=upe(o,!0)}_=!1}if(v&496)o=o.antecedent;else if(v&512){if(o.node.expression.kind===108)return!0;o=o.antecedent}else{if(v&4)return Be(o.antecedent,S=>upe(S,!1));if(v&8)o=o.antecedent[0];else if(v&1024){const S=o.node.target,D=S.antecedent;S.antecedent=o.node.antecedents;const L=upe(o.antecedent,!1);return S.antecedent=D,L}else return!!(v&1)}}}function AMe(o){switch(o.kind){case 110:return!0;case 80:if(!BT(o)){const v=S_(o);return VA(v)||$j(v)&&!sY(v)||!!v.valueDeclaration&&gc(v.valueDeclaration)}break;case 211:case 212:return AMe(o.expression)&&hv(Tr(o).resolvedSymbol||Ot);case 206:case 207:const _=Ov(o.parent);return Gs(_)||Hke(_)?!OMe(_):ds(_)&&dz(_)}return!1}function EC(o,_,v=_,S,D=(L=>(L=$r(o,xW))==null?void 0:L.flowNode)()){let L,B=!1,K=0;if(m0)return $e;if(!D)return _;ES++;const ne=$h,ae=_N(Ve(D));$h=ne;const Ce=Rr(ae)&256&&oft(o)?$l:eY(ae);if(Ce===to||o.parent&&o.parent.kind===235&&!(Ce.flags&131072)&&Gm(Ce,2097152).flags&131072)return _;return Ce;function qe(){return B?L:(B=!0,L=QZ(o,_,v,S))}function Ve(li){var Zi;if(K===2e3)return(Zi=sr)==null||Zi.instant(sr.Phase.CheckTypes,"getTypeAtFlowNode_DepthLimit",{flowId:li.id}),m0=!0,C$t(o),$e;K++;let yn;for(;;){const jn=li.flags;if(jn&4096){for(let os=ne;os<$h;os++)if(jm[os]===li)return K--,cA[os];yn=li}let xr;if(jn&16){if(xr=Vt(li),!xr){li=li.antecedent;continue}}else if(jn&512){if(xr=Wi(li),!xr){li=li.antecedent;continue}}else if(jn&96)xr=An(li);else if(jn&128)xr=Cr(li);else if(jn&12){if(li.antecedent.length===1){li=li.antecedent[0];continue}xr=jn&4?en(li):vn(li)}else if(jn&256){if(xr=qi(li),!xr){li=li.antecedent;continue}}else if(jn&1024){const os=li.node.target,Oa=os.antecedent;os.antecedent=li.node.antecedents,xr=Ve(li.antecedent),os.antecedent=Oa}else if(jn&2){const os=li.node;if(os&&os!==S&&o.kind!==211&&o.kind!==212&&!(o.kind===110&&os.kind!==219)){li=os.flowNode;continue}xr=v}else xr=lz(_);return yn&&(jm[$h]=yn,cA[$h]=xr,$h++),K--,xr}}function Dt(li){const Zi=li.node;return MMe(Zi.kind===260||Zi.kind===208?eft(Zi):YZ(Zi),o)}function Vt(li){const Zi=li.node;if(Tf(o,Zi)){if(!nY(li))return to;if(Mk(Zi)===2){const jn=Ve(li.antecedent);return FO(xC(_N(jn)),RO(jn))}if(_===pt||_===$l){if(l$t(Zi))return PMe(rn);const jn=z2(Dt(li));return ba(jn,_)?jn:Xl}const yn=ooe(Zi)?xC(_):_;return yn.flags&1048576?Yqt(yn,Dt(li)):yn}if(jdt(o,Zi)){if(!nY(li))return to;if(ds(Zi)&&(Xn(Zi)||dz(Zi))){const yn=w8(Zi);if(yn&&(yn.kind===218||yn.kind===219))return Ve(li.antecedent)}return _}if(ds(Zi)&&Zi.parent.parent.kind===249&&(Tf(o,Zi.parent.parent.expression)||dN(Zi.parent.parent.expression,o)))return tRe(eY(_N(Ve(li.antecedent))))}function Kt(li,Zi){const yn=Il(Zi,!0);if(yn.kind===97)return to;if(yn.kind===226){if(yn.operatorToken.kind===56)return Kt(Kt(li,yn.left),yn.right);if(yn.operatorToken.kind===57)return es([Kt(li,yn.left),Kt(li,yn.right)])}return ah(li,yn,!0)}function Wi(li){const Zi=iY(li.node);if(Zi){const yn=dm(Zi);if(yn&&(yn.kind===2||yn.kind===3)){const jn=Ve(li.antecedent),xr=eY(_N(jn)),os=yn.type?fz(xr,yn,li.node,!0):yn.kind===3&&yn.parameterIndex>=0&&yn.parameterIndex!(os.flags&163840)):Zi.kind===221&&dN(Zi.expression,o)&&(jn=Ll(jn,li.node,os=>!(os.flags&131072||os.flags&128&&os.value==="undefined"))));const xr=zr(Zi,jn);xr&&(jn=ta(jn,xr,li.node))}return FO(jn,RO(yn))}function en(li){const Zi=[];let yn=!1,jn=!1,xr;for(const os of li.antecedent){if(!xr&&os.flags&128&&os.node.clauseStart===os.node.clauseEnd){xr=os;continue}const Oa=Ve(os),Ha=_N(Oa);if(Ha===_&&_===v)return Ha;Cc(Zi,Ha),XF(Ha,v)||(yn=!0),RO(Oa)&&(jn=!0)}if(xr){const os=Ve(xr),Oa=_N(os);if(!(Oa.flags&131072)&&!Mt(Zi,Oa)&&!Ght(xr.node.switchStatement)){if(Oa===_&&_===v)return Oa;Zi.push(Oa),XF(Oa,v)||(yn=!0),RO(os)&&(jn=!0)}}return FO(In(Zi,yn?2:1),jn)}function vn(li){const Zi=DMe(li),yn=nf[Zi]||(nf[Zi]=new Map),jn=qe();if(!jn)return _;const xr=yn.get(jn);if(xr)return xr;for(let Pe=Zl;Pe{const Pe=FF(Ze,jn)||Gt;return!(Pe.flags&131072)&&!(Ha.flags&131072)&&HZ(Ha,Pe)})}function Ia(li,Zi,yn,jn,xr){if((yn===37||yn===38)&&li.flags&1048576){const os=XZ(li);if(os&&os===uN(Zi)){const Oa=ZZ(li,zf(jn));if(Oa)return yn===(xr?37:38)?Oa:uv(Eu(Oa,os)||Gt)?ape(li,Oa):li}}return Ur(li,Zi,os=>Os(os,yn,jn,xr))}function ta(li,Zi,yn){if(yn.clauseStartZZ(li,os)||Gt));if(xr!==Gt)return xr}return Ur(li,Zi,jn=>kl(jn,yn))}function ll(li,Zi,yn){if(Tf(o,Zi))return fN(li,yn?4194304:8388608);be&&yn&&dN(Zi,o)&&(li=fN(li,2097152));const jn=zr(Zi,li);return jn?Ur(li,jn,xr=>Gm(xr,yn?4194304:8388608)):li}function No(li,Zi,yn){const jn=ya(li,Zi);return jn?!!(jn.flags&16777216||Pu(jn)&48)||yn:!!NA(li,Zi)||!yn}function iu(li,Zi,yn){const jn=Am(Zi);if(Km(li,os=>No(os,jn,!0)))return ud(li,os=>No(os,jn,yn));if(yn){const os=xzt();if(os)return Fa([li,NO(os,[Zi,Gt])])}return li}function Uf(li,Zi,yn,jn,xr){return xr=xr!==(yn.kind===112)!=(jn!==38&&jn!==36),ah(li,Zi,xr)}function Iu(li,Zi,yn){switch(Zi.operatorToken.kind){case 64:case 76:case 77:case 78:return ll(ah(li,Zi.right,yn),Zi.left,yn);case 35:case 36:case 37:case 38:const jn=Zi.operatorToken.kind,xr=WD(Zi.left),os=WD(Zi.right);if(xr.kind===221&&Ml(os))return ur(li,xr,jn,os,yn);if(os.kind===221&&Ml(xr))return ur(li,os,jn,xr,yn);if(Tf(o,xr))return Os(li,jn,os,yn);if(Tf(o,os))return Os(li,jn,xr,yn);be&&(dN(xr,o)?li=Bn(li,jn,os,yn):dN(os,o)&&(li=Bn(li,jn,xr,yn)));const Oa=zr(xr,li);if(Oa)return Ia(li,Oa,jn,os,yn);const Ha=zr(os,li);if(Ha)return Ia(li,Ha,jn,xr,yn);if(ru(xr))return Rg(li,jn,os,yn);if(ru(os))return Rg(li,jn,xr,yn);if(u8(os)&&!Sc(xr))return Uf(li,xr,os,jn,yn);if(u8(xr)&&!Sc(os))return Uf(li,os,xr,jn,yn);break;case 104:return Bu(li,Zi,yn);case 103:if(Vs(Zi.left))return pn(li,Zi,yn);const Ze=WD(Zi.right);if(Vj(li)&&Sc(o)&&Tf(o.expression,Ze)){const Pe=zf(Zi.left);if(Pm(Pe)&&uN(o)===Am(Pe))return Gm(li,yn?524288:65536)}if(Tf(o,Ze)){const Pe=zf(Zi.left);if(Pm(Pe))return iu(li,Pe,yn)}break;case 28:return ah(li,Zi.right,yn);case 56:return yn?ah(ah(li,Zi.left,!0),Zi.right,!0):es([ah(li,Zi.left,!1),ah(li,Zi.right,!1)]);case 57:return yn?es([ah(li,Zi.left,!0),ah(li,Zi.right,!0)]):ah(ah(li,Zi.left,!1),Zi.right,!1)}return li}function pn(li,Zi,yn){const jn=WD(Zi.right);if(!Tf(o,jn))return li;z.assertNode(Zi.left,Vs);const xr=kpe(Zi.left);if(xr===void 0)return li;const os=xr.parent,Oa=_d(z.checkDefined(xr.valueDeclaration,"should always have a declaration"))?Qn(os):vc(os);return NC(li,Oa,yn,!0)}function Bn(li,Zi,yn,jn){const xr=Zi===35||Zi===37,os=Zi===35||Zi===36?98304:32768,Oa=zf(yn);return xr!==jn&&dp(Oa,Ze=>!!(Ze.flags&os))||xr===jn&&dp(Oa,Ze=>!(Ze.flags&(3|os)))?fN(li,2097152):li}function Os(li,Zi,yn,jn){if(li.flags&1)return li;(Zi===36||Zi===38)&&(jn=!jn);const xr=zf(yn),os=Zi===35||Zi===36;if(xr.flags&98304){if(!be)return li;const Oa=os?jn?262144:2097152:xr.flags&65536?jn?131072:1048576:jn?65536:524288;return fN(li,Oa)}if(jn){if(!os&&(li.flags&2||Km(li,ay))){if(xr.flags&469893116||ay(xr))return xr;if(xr.flags&524288)return Ar}const Oa=ud(li,Ha=>HZ(Ha,xr)||os&&bqt(Ha,xr));return rft(Oa,xr)}return uv(xr)?ud(li,Oa=>!(wdt(Oa)&&HZ(Oa,xr))):li}function ur(li,Zi,yn,jn,xr){(yn===36||yn===38)&&(xr=!xr);const os=WD(Zi.expression);if(!Tf(o,os)){be&&dN(os,o)&&xr===(jn.text!=="undefined")&&(li=fN(li,2097152));const Oa=zr(os,li);return Oa?Ur(li,Oa,Ha=>Ks(Ha,jn,xr)):li}return Ks(li,jn,xr)}function Ks(li,Zi,yn){return yn?oh(li,Zi.text):fN(li,jDe.get(Zi.text)||32768)}function Ll(li,{switchStatement:Zi,clauseStart:yn,clauseEnd:jn},xr){return yn!==jn&&Be(ope(Zi).slice(yn,jn),xr)?Gm(li,2097152):li}function kl(li,{switchStatement:Zi,clauseStart:yn,clauseEnd:jn}){const xr=ope(Zi);if(!xr.length)return li;const os=xr.slice(yn,jn),Oa=yn===jn||Mt(os,rn);if(li.flags&2&&!Oa){let Di;for(let nn=0;nnHZ(Ha,Di)),Ha);if(!Oa)return Ze;const Pe=ud(li,Di=>!(wdt(Di)&&Mt(xr,Di.flags&32768?wi:Zh(fqt(Di)))));return Ze.flags&131072?Pe:es([Ze,Pe])}function oh(li,Zi){switch(Zi){case"string":return Ca(li,tt,1);case"number":return Ca(li,Ae,2);case"bigint":return Ca(li,Ke,4);case"boolean":return Ca(li,fn,8);case"symbol":return Ca(li,kn,16);case"object":return li.flags&1?li:es([Ca(li,Ar,32),Ca(li,je,131072)]);case"function":return li.flags&1?li:Ca(li,md,64);case"undefined":return Ca(li,wi,65536)}return Ca(li,Ar,128)}function Ca(li,Zi,yn){return Zc(li,jn=>c1(jn,Zi,om)?dv(jn,yn)?jn:rn:Ax(Zi,jn)?Zi:dv(jn,yn)?Fa([jn,Zi]):rn)}function Eh(li,{switchStatement:Zi,clauseStart:yn,clauseEnd:jn}){const xr=ift(Zi);if(!xr)return li;const os=Nt(Zi.caseBlock.clauses,Ze=>Ze.kind===297);if(yn===jn||os>=yn&&osMO(Pe,Ze)===Ze)}const Ha=xr.slice(yn,jn);return es(Yt(Ha,Ze=>Ze?oh(li,Ze):rn))}function nu(li,{switchStatement:Zi,clauseStart:yn,clauseEnd:jn}){const xr=Nt(Zi.caseBlock.clauses,Ha=>Ha.kind===297),os=yn===jn||xr>=yn&&xrHa.kind===296?ah(li,Ha.expression,!0):rn))}function ru(li){return(Ir(li)&&dr(li.name)==="constructor"||wc(li)&&Ml(li.argumentExpression)&&li.argumentExpression.text==="constructor")&&Tf(o,li.expression)}function Rg(li,Zi,yn,jn){if(jn?Zi!==35&&Zi!==37:Zi!==36&&Zi!==38)return li;const xr=zf(yn);if(!c8e(xr)&&!Cj(xr))return li;const os=ya(xr,"prototype");if(!os)return li;const Oa=Qn(os),Ha=Al(Oa)?void 0:Oa;if(!Ha||Ha===Nd||Ha===md)return li;if(Al(li))return Ha;return ud(li,Pe=>Ze(Pe,Ha));function Ze(Pe,Di){return Pe.flags&524288&&Rr(Pe)&1||Di.flags&524288&&Rr(Di)&1?Pe.symbol===Di.symbol:Ax(Pe,Di)}}function Bu(li,Zi,yn){const jn=WD(Zi.left);if(!Tf(o,jn))return yn&&be&&dN(jn,o)?fN(li,2097152):li;const xr=Zi.right,os=zf(xr);if(!H2(os,Nd))return li;const Oa=iY(Zi),Ha=Oa&&dm(Oa);if(Ha&&Ha.kind===1&&Ha.parameterIndex===0)return NC(li,Ha.type,yn,!0);if(!H2(os,md))return li;const Ze=Zc(os,dd);return Al(li)&&(Ze===Nd||Ze===md)||!yn&&!(Ze.flags&524288&&!ay(Ze))?li:NC(li,Ze,yn,!0)}function dd(li){const Zi=Eu(li,"prototype");if(Zi&&!Al(Zi))return Zi;const yn=ea(li,1);return yn.length?es(Yt(yn,jn=>Ol(Dj(jn)))):Ps}function NC(li,Zi,yn,jn){const xr=li.flags&1048576?`N${kf(li)},${kf(Zi)},${(yn?1:0)|(jn?2:0)}`:void 0;return p2(xr)??PS(xr,$O(li,Zi,yn,jn))}function $O(li,Zi,yn,jn){if(!yn){if(li===Zi)return rn;if(jn)return ud(li,Ze=>!H2(Ze,Zi));const Ha=NC(li,Zi,!0,!1);return ud(li,Ze=>!XF(Ze,Ha))}if(li.flags&3||li===Zi)return Zi;const xr=jn?H2:Ax,os=li.flags&1048576?XZ(li):void 0,Oa=Zc(Zi,Ha=>{const Ze=os&&Eu(Ha,os),Pe=Ze&&ZZ(li,Ze),Di=Zc(Pe||li,jn?nn=>H2(nn,Ha)?nn:H2(Ha,nn)?Ha:rn:nn=>VZ(nn,Ha)?nn:VZ(Ha,nn)?Ha:Ax(nn,Ha)?nn:Ax(Ha,nn)?Ha:rn);return Di.flags&131072?Zc(li,nn=>Fu(nn,465829888)&&xr(Ha,Hf(nn)||Gt)?Fa([nn,Ha]):rn):Di});return Oa.flags&131072?Ax(Zi,li)?Zi:ba(li,Zi)?li:ba(Zi,li)?Zi:Fa([li,Zi]):Oa}function u5(li,Zi,yn){if($dt(Zi,o)){const jn=yn||!XE(Zi)?iY(Zi):void 0,xr=jn&&dm(jn);if(xr&&(xr.kind===0||xr.kind===1))return fz(li,xr,Zi,yn)}if(Vj(li)&&Sc(o)&&Ir(Zi.expression)){const jn=Zi.expression;if(Tf(o.expression,WD(jn.expression))&<(jn.name)&&jn.name.escapedText==="hasOwnProperty"&&Zi.arguments.length===1){const xr=Zi.arguments[0];if(Ml(xr)&&uN(o)===du(xr.text))return Gm(li,yn?524288:65536)}}return li}function fz(li,Zi,yn,jn){if(Zi.type&&!(Al(li)&&(Zi.type===Nd||Zi.type===md))){const xr=b$t(Zi,yn);if(xr){if(Tf(o,xr))return NC(li,Zi.type,jn,!1);be&&dN(xr,o)&&(jn&&!dv(Zi.type,65536)||!jn&&dp(Zi.type,hY))&&(li=fN(li,2097152));const os=zr(xr,li);if(os)return Ur(li,os,Oa=>NC(Oa,Zi.type,jn,!1))}}return li}function ah(li,Zi,yn){if(M$(Zi)||cr(Zi.parent)&&(Zi.parent.operatorToken.kind===61||Zi.parent.operatorToken.kind===78)&&Zi.parent.left===Zi)return jY(li,Zi,yn);switch(Zi.kind){case 80:if(!Tf(o,Zi)&&F<5){const jn=S_(Zi);if(VA(jn)){const xr=jn.valueDeclaration;if(xr&&ds(xr)&&!xr.type&&xr.initializer&&AMe(o)){F++;const os=ah(li,xr.initializer,yn);return F--,os}}}case 110:case 108:case 211:case 212:return ll(li,Zi,yn);case 213:return u5(li,Zi,yn);case 217:case 235:return ah(li,Zi.expression,yn);case 226:return Iu(li,Zi,yn);case 224:if(Zi.operator===54)return ah(li,Zi.operand,!yn);break}return li}function jY(li,Zi,yn){if(Tf(o,Zi))return fN(li,yn?2097152:262144);const jn=zr(Zi,li);return jn?Ur(li,jn,xr=>Gm(xr,yn?2097152:262144)):li}}function S$t(o,_){if(o=eg(o),(_.kind===80||_.kind===81)&&(B8(_)&&(_=_.parent),z0(_)&&(!lS(_)||rP(_)))){const v=Q_e(rP(_)&&_.kind===211?xpe(_,void 0,!0):zf(_));if(eg(Tr(_).resolvedSymbol)===o)return v}return F1(_)&&Ev(_.parent)&&T0(_.parent)?c_e(_.parent.symbol):Aoe(_)&&rP(_.parent)?O2(o):kx(o)}function qj(o){return Xi(o.parent,_=>Bo(_)&&!NT(_)||_.kind===268||_.kind===307||_.kind===172)}function sY(o){return!lft(o,void 0)}function lft(o,_){const v=Xi(o.valueDeclaration,dpe);if(!v)return!1;const S=Tr(v);return S.flags&131072||(S.flags|=131072,w$t(v)||uft(v)),!o.lastAssignmentPos||_&&o.lastAssignmentPos<_.pos}function OMe(o){return z.assert(ds(o)||Gs(o)),cft(o.name)}function cft(o){return o.kind===80?sY(wr(o.parent)):Rt(o.elements,_=>_.kind!==232&&cft(_.name))}function w$t(o){return!!Xi(o.parent,_=>dpe(_)&&!!(Tr(_).flags&131072))}function dpe(o){return rc(o)||Ns(o)}function uft(o){switch(o.kind){case 80:if(lS(o)){const v=S_(o);if($j(v)&&v.lastAssignmentPos!==Number.MAX_VALUE){const S=Xi(o,dpe),D=Xi(v.valueDeclaration,dpe);v.lastAssignmentPos=S===D?x$t(o,v.valueDeclaration):Number.MAX_VALUE}}return;case 281:const _=o.parent.parent;if(!o.isTypeOnly&&!_.isTypeOnly&&!_.moduleSpecifier){const v=Du(o.propertyName||o.name,111551,!0,!0);v&&$j(v)&&(v.lastAssignmentPos=Number.MAX_VALUE)}return;case 264:case 265:case 266:return}gs(o)||jo(o,uft)}function x$t(o,_){let v=o.pos;for(;o&&o.pos>_.pos;){switch(o.kind){case 243:case 244:case 245:case 246:case 247:case 248:case 249:case 250:case 254:case 255:case 258:case 263:v=o.end}o=o.parent}return v}function VA(o){return o.flags&3&&(ZMe(o)&6)!==0}function $j(o){const _=o.valueDeclaration&&Ov(o.valueDeclaration);return!!_&&(Gs(_)||ds(_)&&(YT(_.parent)||k$t(_)))}function k$t(o){return!!(o.parent.flags&1)&&!(wk(o)&32||o.parent.parent.kind===243&&nS(o.parent.parent.parent))}function T$t(o){const _=Tr(o);if(_.parameterInitializerContainsUndefined===void 0){if(!qm(o,8))return zS(o.symbol),!0;const v=!!dv(t5(o,0),16777216);if(!ey())return zS(o.symbol),!0;_.parameterInitializerContainsUndefined??(_.parameterInitializerContainsUndefined=v)}return _.parameterInitializerContainsUndefined}function D$t(o,_){return be&&_.kind===169&&_.initializer&&dv(o,16777216)&&!T$t(_)?Gm(o,524288):o}function E$t(o,_){const v=_.parent;return v.kind===211||v.kind===166||v.kind===213&&v.expression===_||v.kind===214&&v.expression===_||v.kind===212&&v.expression===_&&!(Km(o,fft)&&oN(zf(v.argumentExpression)))}function dft(o){return o.flags&2097152?Rt(o.types,dft):!!(o.flags&465829888&&ry(o).flags&1146880)}function fft(o){return o.flags&2097152?Rt(o.types,fft):!!(o.flags&465829888&&!Fu(ry(o),98304))}function I$t(o,_){const v=(lt(o)||Ir(o)||wc(o))&&!((Uv(o.parent)||vI(o.parent))&&o.parent.tagName===o)&&(_&&_&32?w_(o,8):w_(o,void 0));return v&&!OA(v)}function MMe(o,_,v){return LO(o)&&(o=o.baseType),!(v&&v&2)&&Km(o,dft)&&(E$t(o,_)||I$t(_,v))?Zc(o,ry):o}function hft(o){return!!Xi(o,_=>{const v=_.parent;return v===void 0?"quit":Ec(v)?v.expression===_&&pc(_):gh(v)?v.name===_||v.propertyName===_:!1})}function HA(o,_,v,S){if(xt&&!(o.flags&33554432&&!V_(o)&&!To(o)))switch(_){case 1:return fpe(o);case 2:return _ft(o,v,S);case 3:return pft(o);case 4:return RMe(o);case 5:return gft(o);case 6:return mft(o);case 7:return vft(o);case 8:return yft(o);case 0:{if(lt(o)&&(z0(o)||ih(o.parent)||kd(o.parent)&&o.parent.moduleReference===o)&&wft(o)){if(zB(o.parent)&&(Ir(o.parent)?o.parent.expression:o.parent.left)!==o)return;fpe(o);return}if(zB(o)){let D=o;for(;zB(D);){if(Lv(D))return;D=D.parent}return _ft(o)}return Ec(o)?pft(o):eh(o)||yI(o)?RMe(o):kd(o)?$L(o)||Xpe(o)?mft(o):void 0:gh(o)?vft(o):((rc(o)||Hv(o))&&gft(o),!Y.emitDecoratorMetadata||!eD(o)||!dg(o)||!o.modifiers||!cW(Se,o,o.parent,o.parent.parent)?void 0:yft(o))}default:z.assertNever(_,`Unhandled reference hint: ${_}`)}}function fpe(o){const _=S_(o);_&&_!==nt&&_!==Ot&&!BT(o)&&oY(_,o)}function _ft(o,_,v){const S=Ir(o)?o.expression:o.left;if(Uw(S)||!lt(S))return;const D=S_(S);if(!D||D===Ot)return;if(Xg(Y)||HT(Y)&&hft(o)){oY(D,o);return}const L=v||Vu(S);if(Al(L)||L===_r){oY(D,o);return}let B=_;if(!B&&!v){const K=Ir(o)?o.name:o.right,ne=Vs(K)&&_Y(K.escapedText,K),ae=Mk(o),Ce=Qh(ae!==0||iRe(o)?up(L):L);B=Vs(K)?ne&&Tpe(Ce,ne)||void 0:ya(Ce,K.escapedText)}B&&(cz(B)||B.flags&8&&o.parent.kind===306)||oY(D,o)}function pft(o){if(lt(o.expression)){const _=o.expression,v=eg(Du(_,-1,!0,!0,o));v&&oY(v,_)}}function RMe(o){if(!QMe(o)){const _=vl&&Y.jsx===2?k.Cannot_find_name_0:void 0,v=g2(o),S=eh(o)?o.tagName:o;let D;if(yI(o)&&v==="null"||(D=Ui(S,v,111551,_,!0)),D&&(D.isReferenced=-1,xt&&D.flags&2097152&&!n1(D)&&hpe(D)),yI(o)){const L=_n(o),B=hA(L);B&&Ui(S,B,111551,_,!0)}}}function gft(o){if(ue<2&&ad(o)&2){const _=Dp(o);N$t(_)}}function mft(o){Kr(o,32)&&bft(o)}function vft(o){if(!o.parent.parent.moduleSpecifier&&!o.isTypeOnly&&!o.parent.parent.isTypeOnly){const _=o.propertyName||o.name,v=Ui(_,_.escapedText,2998271,void 0,!0);if(!(v&&(v===Ye||v===wt||v.declarations&&nS(ZI(v.declarations[0]))))){const S=v&&(v.flags&2097152?sf(v):v);(!S||op(S)&111551)&&(bft(o),fpe(o.propertyName||o.name))}return}}function yft(o){if(Y.emitDecoratorMetadata){const _=Me(o.modifiers,jd);if(!_)return;switch($d(_,16),o.kind){case 263:const v=Gy(o);if(v)for(const B of v.parameters)BO(qpe(B));break;case 177:case 178:const S=o.kind===177?178:177,D=Jc(wr(o),S);BO(T0(o)||D&&T0(D));break;case 174:for(const B of o.parameters)BO(qpe(B));BO(Dp(o));break;case 172:BO(hd(o));break;case 169:BO(qpe(o));const L=o.parent;for(const B of L.parameters)BO(qpe(B));BO(Dp(L));break}}}function oY(o,_){if(xt&&i1(o,111551)&&!eP(_)){const v=sf(o);op(o,!0)&1160127&&(Xg(Y)||HT(Y)&&hft(_)||!cz(eg(v)))&&hpe(o)}}function hpe(o){z.assert(xt);const _=Zs(o);if(!_.referenced){_.referenced=!0;const v=Rp(o);if(!v)return z.fail();if($L(v)&&op(Ru(o))&111551){const S=Ip(v.moduleReference);fpe(S)}}}function bft(o){const _=wr(o),v=sf(_);v&&(v===Ot||op(_,!0)&111551&&!cz(v))&&hpe(_)}function Cft(o,_){if(!o)return;const v=Ip(o),S=(o.kind===80?788968:1920)|2097152,D=Ui(v,v.escapedText,S,void 0,!0);if(D&&D.flags&2097152){if(xt&&Z1(D)&&!cz(sf(D))&&!n1(D))hpe(D);else if(_&&Xg(Y)&&Vh(Y)>=5&&!Z1(D)&&!Rt(D.declarations,Dk)){const L=ht(o,k.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled),B=Me(D.declarations||x,Zn);B&&fa(L,Kn(B,k._0_was_imported_here,dr(v)))}}}function N$t(o){Cft(o&&lW(o),!1)}function BO(o){const _=VRe(o);_&&A_(_)&&Cft(_,!0)}function L$t(o,_,v){var S;const D=Qn(o,v),L=o.valueDeclaration;if(L){if(nl(L)&&!L.initializer&&!L.dotDotDotToken&&L.parent.elements.length>=2){const B=L.parent.parent,K=Ov(B);if(K.kind===260&&qD(K)&6||K.kind===169){const ne=Tr(B);if(!(ne.flags&4194304)){ne.flags|=4194304;const ae=xA(B,0),Ce=ae&&Zc(ae,ry);if(ne.flags&=-4194305,Ce&&Ce.flags&1048576&&!(K.kind===169&&OMe(K))){const qe=L.parent,Ve=EC(qe,Ce,Ce,void 0,_.flowNode);return Ve.flags&131072?rn:ws(L,Ve,!0)}}}}if(Gs(L)&&!L.type&&!L.initializer&&!L.dotDotDotToken){const B=L.parent;if(B.parameters.length>=2&&B_e(B)){const K=Gj(B);if(K&&K.parameters.length===1&&vh(K)){const ne=jF(Ys(Qn(K.parameters[0]),(S=VD(B))==null?void 0:S.nonFixingMapper));if(ne.flags&1048576&&dp(ne,Qa)&&!Rt(B.parameters,OMe)){const ae=EC(B,ne,ne,void 0,_.flowNode),Ce=B.parameters.indexOf(L)-(RT(B)?1:0);return lp(ae,D0(Ce))}}}}}return D}function Sft(o,_){if(BT(o))return;if(_===nt){if(sRe(o)){ht(o,k.arguments_cannot_be_referenced_in_property_initializers);return}let L=Kp(o);if(L)for(ue<2&&(L.kind===219?ht(o,k.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression):Kr(L,1024)&&ht(o,k.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method)),Tr(L).flags|=512;L&&Dc(L);)L=Kp(L),L&&(Tr(L).flags|=512);return}const v=eg(_),S=e8e(v,o);am(S)&&MOe(o,S)&&S.declarations&&oC(o,S.declarations,o.escapedText);const D=v.valueDeclaration;if(D&&v.flags&32&&ss(D)&&D.name!==o){let L=u_(o,!1,!1);for(;L.kind!==307&&L.parent!==D;)L=u_(L,!1,!1);L.kind!==307&&(Tr(D).flags|=262144,Tr(L).flags|=262144,Tr(o).flags|=536870912)}R$t(o,_)}function P$t(o,_){if(BT(o))return aY(o);const v=S_(o);if(v===Ot)return $e;if(Sft(o,v),v===nt)return sRe(o)?$e:Qn(v);wft(o)&&HA(o,1);const S=eg(v);let D=S.valueDeclaration,L=L$t(S,o,_);const B=Mk(o);if(B){if(!(S.flags&3)&&!(Xn(o)&&S.flags&512)){const Cr=S.flags&384?k.Cannot_assign_to_0_because_it_is_an_enum:S.flags&32?k.Cannot_assign_to_0_because_it_is_a_class:S.flags&1536?k.Cannot_assign_to_0_because_it_is_a_namespace:S.flags&16?k.Cannot_assign_to_0_because_it_is_a_function:S.flags&2097152?k.Cannot_assign_to_0_because_it_is_an_import:k.Cannot_assign_to_0_because_it_is_not_a_variable;return ht(o,Cr,Js(v)),$e}if(hv(S))return S.flags&3?ht(o,k.Cannot_assign_to_0_because_it_is_a_constant,Js(v)):ht(o,k.Cannot_assign_to_0_because_it_is_a_read_only_property,Js(v)),$e}const K=S.flags&2097152;if(S.flags&3){if(B===1)return ooe(o)?xC(L):L}else if(K)D=Rp(v);else return L;if(!D)return L;L=MMe(L,o,_);const ne=Ov(D).kind===169,ae=qj(D);let Ce=qj(o);const qe=Ce!==ae,Ve=o.parent&&o.parent.parent&&ib(o.parent)&&LMe(o.parent.parent),Dt=v.flags&134217728,Vt=L===pt||L===$l,Kt=Vt&&o.parent.kind===235;for(;Ce!==ae&&(Ce.kind===218||Ce.kind===219||uJ(Ce))&&(VA(S)&&L!==$l||$j(S)&&lft(S,o));)Ce=qj(Ce);const Wi=ne||K||qe||Ve||Dt||A$t(o,D)||L!==pt&&L!==$l&&(!be||(L.flags&16387)!==0||eP(o)||kMe(o)||o.parent.kind===281)||o.parent.kind===235||D.kind===260&&D.exclamationToken||D.flags&33554432,qi=Kt?wi:Wi?ne?D$t(L,D):L:Vt?wi:Rx(L),An=Kt?kC(EC(o,L,qi,Ce)):EC(o,L,qi,Ce);if(!oft(o)&&(L===pt||L===$l)){if(An===pt||An===$l)return ke&&(ht(ko(D),k.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined,Js(v),Un(An)),ht(o,k.Variable_0_implicitly_has_an_1_type,Js(v),Un(An))),lz(An)}else if(!Wi&&!OO(L)&&OO(An))return ht(o,k.Variable_0_is_used_before_being_assigned,Js(v)),L;return B?xC(An):An}function A$t(o,_){if(nl(_)){const v=Xi(o,nl);return v&&Ov(v)===Ov(_)}}function wft(o){var _;const v=o.parent;if(v){if(Ir(v)&&v.expression===o||gh(v)&&v.isTypeOnly)return!1;const S=(_=v.parent)==null?void 0:_.parent;if(S&&$u(S)&&S.isTypeOnly)return!1}return!0}function O$t(o,_){return!!Xi(o,v=>v===_?"quit":Bo(v)||v.parent&&To(v.parent)&&!_d(v.parent)&&v.parent.initializer===v)}function M$t(o,_){return Xi(o,v=>v===_?"quit":v===_.initializer||v===_.condition||v===_.incrementor||v===_.statement)}function FMe(o){return Xi(o,_=>!_||poe(_)?"quit":Hw(_,!1))}function R$t(o,_){if(ue>=2||!(_.flags&34)||!_.valueDeclaration||Ns(_.valueDeclaration)||_.valueDeclaration.parent.kind===299)return;const v=j0(_.valueDeclaration),S=O$t(o,v),D=FMe(v);if(D){if(S){let L=!0;if(zk(v)){const B=Rk(_.valueDeclaration,261);if(B&&B.parent===v){const K=M$t(o.parent,v);if(K){const ne=Tr(K);ne.flags|=8192;const ae=ne.capturedBlockScopeBindings||(ne.capturedBlockScopeBindings=[]);Cc(ae,_),K===v.initializer&&(L=!1)}}}L&&(Tr(D).flags|=4096)}if(zk(v)){const L=Rk(_.valueDeclaration,261);L&&L.parent===v&&B$t(o,v)&&(Tr(_.valueDeclaration).flags|=65536)}Tr(_.valueDeclaration).flags|=32768}S&&(Tr(_.valueDeclaration).flags|=16384)}function F$t(o,_){const v=Tr(o);return!!v&&Mt(v.capturedBlockScopeBindings,wr(_))}function B$t(o,_){let v=o;for(;v.parent.kind===217;)v=v.parent;let S=!1;if(lS(v))S=!0;else if(v.parent.kind===224||v.parent.kind===225){const D=v.parent;S=D.operator===46||D.operator===47}return S?!!Xi(v,D=>D===_?"quit":D===_.statement):!1}function BMe(o,_){if(Tr(o).flags|=2,_.kind===172||_.kind===176){const v=_.parent;Tr(v).flags|=4}else Tr(_).flags|=4}function xft(o){return rI(o)?o:Bo(o)?void 0:jo(o,xft)}function WMe(o){const _=wr(o),v=vc(_);return ln(v)===de}function kft(o,_,v){const S=_.parent;MT(S)&&!WMe(S)&&xW(o)&&o.flowNode&&!upe(o.flowNode,!1)&&ht(o,v)}function W$t(o,_){To(_)&&_d(_)&&Se&&_.initializer&&IB(_.initializer,o.pos)&&dg(_.parent)&&ht(o,k.Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class)}function aY(o){const _=eP(o);let v=u_(o,!0,!0),S=!1,D=!1;for(v.kind===176&&kft(o,v,k.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class);;){if(v.kind===219&&(v=u_(v,!1,!D),S=!0),v.kind===167){v=u_(v,!S,!1),D=!0;continue}break}if(W$t(o,v),D)ht(o,k.this_cannot_be_referenced_in_a_computed_property_name);else switch(v.kind){case 267:ht(o,k.this_cannot_be_referenced_in_a_module_or_namespace_body);break;case 266:ht(o,k.this_cannot_be_referenced_in_current_location);break}!_&&S&&ue<2&&BMe(o,v);const L=VMe(o,!0,v);if(Fe){const B=Qn(wt);if(L===B&&S)ht(o,k.The_containing_arrow_function_captures_the_global_value_of_this);else if(!L){const K=ht(o,k.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation);if(!Ns(v)){const ne=VMe(v);ne&&ne!==B&&fa(K,Kn(v,k.An_outer_value_of_this_is_shadowed_by_this_container))}}}return L||Je}function VMe(o,_=!0,v=u_(o,!1,!1)){const S=Xn(o);if(Bo(v)&&(!jMe(o)||RT(v))){let D=W3e(v)||S&&j$t(v);if(!D){const L=H$t(v);if(S&&L){const B=fo(L).symbol;B&&B.members&&B.flags&16&&(D=vc(B).thisType)}else h1(v)&&(D=vc(al(v.symbol)).thisType);D||(D=Ift(v))}if(D)return EC(o,D)}if(ss(v.parent)){const D=wr(v.parent),L=da(v)?Qn(D):vc(D).thisType;return EC(o,L)}if(Ns(v))if(v.commonJsModuleIndicator){const D=wr(v);return D&&Qn(D)}else{if(v.externalModuleIndicator)return wi;if(_)return Qn(wt)}}function V$t(o){const _=u_(o,!1,!1);if(Bo(_)){const v=Mg(_);if(v.thisParameter)return lpe(v.thisParameter)}if(ss(_.parent)){const v=wr(_.parent);return da(_)?Qn(v):vc(v).thisType}}function H$t(o){if(o.kind===218&&cr(o.parent)&&Lu(o.parent)===3)return o.parent.left.expression.expression;if(o.kind===174&&o.parent.kind===210&&cr(o.parent.parent)&&Lu(o.parent.parent)===6)return o.parent.parent.left.expression;if(o.kind===218&&o.parent.kind===303&&o.parent.parent.kind===210&&cr(o.parent.parent.parent)&&Lu(o.parent.parent.parent)===6)return o.parent.parent.parent.left.expression;if(o.kind===218&&pd(o.parent)&<(o.parent.name)&&(o.parent.name.escapedText==="value"||o.parent.name.escapedText==="get"||o.parent.name.escapedText==="set")&&Pa(o.parent.parent)&&sa(o.parent.parent.parent)&&o.parent.parent.parent.arguments[2]===o.parent.parent&&Lu(o.parent.parent.parent)===9)return o.parent.parent.parent.arguments[0].expression;if(Au(o)&<(o.name)&&(o.name.escapedText==="value"||o.name.escapedText==="get"||o.name.escapedText==="set")&&Pa(o.parent)&&sa(o.parent.parent)&&o.parent.parent.arguments[2]===o.parent&&Lu(o.parent.parent)===9)return o.parent.parent.arguments[0].expression}function j$t(o){const _=P$(o);if(_&&_.typeExpression)return As(_.typeExpression);const v=zF(o);if(v)return B2(v)}function z$t(o,_){return!!Xi(o,v=>rc(v)?"quit":v.kind===169&&v.parent===_)}function _pe(o){const _=o.parent.kind===213&&o.parent.expression===o,v=oW(o,!0);let S=v,D=!1,L=!1;if(!_){for(;S&&S.kind===219;)Kr(S,1024)&&(L=!0),S=oW(S,!0),D=ue<2;S&&Kr(S,1024)&&(L=!0)}let B=0;if(!S||!Ce(S)){const qe=Xi(o,Ve=>Ve===S?"quit":Ve.kind===167);return qe&&qe.kind===167?ht(o,k.super_cannot_be_referenced_in_a_computed_property_name):_?ht(o,k.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors):!S||!S.parent||!(ss(S.parent)||S.parent.kind===210)?ht(o,k.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions):ht(o,k.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class),$e}if(!_&&v.kind===176&&kft(o,S,k.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class),da(S)||_?(B=32,!_&&ue>=2&&ue<=8&&(To(S)||bu(S))&&zwe(o.parent,qe=>{(!Ns(qe)||ep(qe))&&(Tr(qe).flags|=2097152)})):B=16,Tr(o).flags|=B,S.kind===174&&L&&(R_(o.parent)&&lS(o.parent)?Tr(S).flags|=256:Tr(S).flags|=128),D&&BMe(o.parent,S),S.parent.kind===210)return ue<2?(ht(o,k.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher),$e):Je;const K=S.parent;if(!MT(K))return ht(o,k.super_can_only_be_referenced_in_a_derived_class),$e;if(WMe(K))return _?$e:de;const ne=vc(wr(K)),ae=ne&&Yr(ne)[0];if(!ae)return $e;if(S.kind===176&&z$t(o,S))return ht(o,k.super_cannot_be_referenced_in_constructor_arguments),$e;return B===32?ln(ne):Wp(ae,ne.thisType);function Ce(qe){return _?qe.kind===176:ss(qe.parent)||qe.parent.kind===210?da(qe)?qe.kind===174||qe.kind===173||qe.kind===177||qe.kind===178||qe.kind===172||qe.kind===175:qe.kind===174||qe.kind===173||qe.kind===177||qe.kind===178||qe.kind===172||qe.kind===171||qe.kind===176:!1}}function Tft(o){return(o.kind===174||o.kind===177||o.kind===178)&&o.parent.kind===210?o.parent:o.kind===218&&o.parent.kind===303?o.parent.parent:void 0}function Dft(o){return Rr(o)&4&&o.target===Ld?Nc(o)[0]:void 0}function U$t(o){return Zc(o,_=>_.flags&2097152?W(_.types,Dft):Dft(_))}function Eft(o,_){let v=o,S=_;for(;S;){const D=U$t(S);if(D)return D;if(v.parent.kind!==303)break;v=v.parent.parent,S=J2(v,void 0)}}function Ift(o){if(o.kind===219)return;if(B_e(o)){const v=Gj(o);if(v){const S=v.thisParameter;if(S)return Qn(S)}}const _=Xn(o);if(Fe||_){const v=Tft(o);if(v){const D=J2(v,void 0),L=Eft(v,D);return L?Ys(L,gMe(VD(v))):up(D?kC(D):Vu(v))}const S=Vb(o.parent);if(Yd(S)){const D=S.left;if(Sc(D)){const{expression:L}=D;if(_&<(L)){const B=_n(S);if(B.commonJsModuleIndicator&&S_(L)===B.symbol)return}return up(Vu(L))}}}}function Nft(o){const _=o.parent;if(!B_e(_))return;const v=NT(_);if(v&&v.arguments){const D=Npe(v),L=_.parameters.indexOf(o);if(o.dotDotDotToken)return hRe(D,L,D.length,Je,void 0,0);const B=Tr(v),K=B.resolvedSignature;B.resolvedSignature=J;const ne=L0)return A(v.name,!0,!1)}}function G$t(o,_){const v=Kp(o);if(v){let S=ppe(v,_);if(S){const D=ad(v);if(D&1){const L=(D&2)!==0;S.flags&1048576&&(S=ud(S,K=>!!zD(1,K,L)));const B=zD(1,S,(D&2)!==0);if(!B)return;S=B}if(D&2){const L=Zc(S,ZS);return L&&es([L,qht(L)])}return S}}}function K$t(o,_){const v=w_(o,_);if(v){const S=ZS(v);return S&&es([S,qht(S)])}}function Q$t(o,_){const v=Kp(o);if(v){const S=ad(v);let D=ppe(v,_);if(D){const L=(S&2)!==0;if(!o.asteriskToken&&D.flags&1048576&&(D=ud(D,B=>!!zD(1,B,L))),o.asteriskToken){const B=ZRe(D,L),K=(B==null?void 0:B.yieldType)??_r,ne=w_(o,_)??_r,ae=(B==null?void 0:B.nextType)??Gt,Ce=Mpe(K,ne,ae,!1);if(L){const qe=Mpe(K,ne,ae,!0);return es([Ce,qe])}return Ce}return zD(0,D,L)}}}function jMe(o){let _=!1;for(;o.parent&&!Bo(o.parent);){if(Gs(o.parent)&&(_||o.parent.initializer===o))return!0;nl(o.parent)&&o.parent.initializer===o&&(_=!0),o=o.parent}return!1}function Lft(o,_){const v=!!(ad(_)&2),S=ppe(_,void 0);if(S)return zD(o,S,v)||void 0}function ppe(o,_){const v=EO(o);if(v)return v;const S=JMe(o);if(S&&!v_e(S)){const L=Ol(S),B=ad(o);return B&1?ud(L,K=>!!(K.flags&58998787)||MRe(K,B,void 0)):B&2?ud(L,K=>!!(K.flags&58998787)||!!r5(K)):L}const D=NT(o);if(D)return w_(D,_)}function Pft(o,_){const S=Npe(o).indexOf(_);return S===-1?void 0:zMe(o,S)}function zMe(o,_){if(Gp(o))return _===0?tt:_===1?dut(!1):Je;const v=Tr(o).resolvedSignature===Wt?Wt:HO(o);if(eh(o)&&_===0)return ype(v,o);const S=v.parameters.length-1;return vh(v)&&_>=S?lp(Qn(v.parameters[S]),D0(_-S),256):fv(v,_)}function X$t(o){const _=TRe(o);return _?iN(_):void 0}function Z$t(o,_){if(o.parent.kind===215)return Pft(o.parent,_)}function Y$t(o,_){const v=o.parent,{left:S,operatorToken:D,right:L}=v;switch(D.kind){case 64:case 77:case 76:case 78:return o===L?tJt(v):void 0;case 57:case 61:const B=w_(v,_);return o===L&&(B&&B.pattern||!B&&!pxe(v))?zf(S):B;case 56:case 28:return o===L?w_(v,_):void 0;default:return}}function eJt(o){if(H0(o)&&o.symbol)return o.symbol;if(lt(o))return S_(o);if(Ir(o)){const v=zf(o.expression);return Vs(o.name)?_(v,o.name):ya(v,o.name.escapedText)}if(wc(o)){const v=Vu(o.argumentExpression);if(!Pm(v))return;const S=zf(o.expression);return ya(S,Am(v))}return;function _(v,S){const D=_Y(S.escapedText,S);return D&&Tpe(v,D)}}function tJt(o){var _,v;const S=Lu(o);switch(S){case 0:case 4:const D=eJt(o.left),L=D&&D.valueDeclaration;if(L&&(To(L)||V_(L))){const ne=hd(L);return ne&&Ys(As(ne),Zs(D).mapper)||(To(L)?L.initializer&&zf(o.left):void 0)}return S===0?zf(o.left):Aft(o);case 5:if(gpe(o,S))return Aft(o);if(!H0(o.left)||!o.left.symbol)return zf(o.left);{const ne=o.left.symbol.valueDeclaration;if(!ne)return;const ae=ua(o.left,Sc),Ce=hd(ne);if(Ce)return As(Ce);if(lt(ae.expression)){const qe=ae.expression,Ve=Ui(qe,qe.escapedText,111551,void 0,!0);if(Ve){const Dt=Ve.valueDeclaration&&hd(Ve.valueDeclaration);if(Dt){const Vt=Wb(ae);if(Vt!==void 0)return $2(As(Dt),Vt)}return}}return Xn(ne)||ne===o.left?void 0:zf(o.left)}case 1:case 6:case 3:case 2:let B;S!==2&&(B=H0(o.left)?(_=o.left.symbol)==null?void 0:_.valueDeclaration:void 0),B||(B=(v=o.symbol)==null?void 0:v.valueDeclaration);const K=B&&hd(B);return K?As(K):void 0;case 7:case 8:case 9:return z.fail("Does not apply");default:return z.assertNever(S)}}function gpe(o,_=Lu(o)){if(_===4)return!0;if(!Xn(o)||_!==5||!lt(o.left.expression))return!1;const v=o.left.expression.escapedText,S=Ui(o.left,v,111551,void 0,!0,!0);return pJ(S==null?void 0:S.valueDeclaration)}function Aft(o){if(!o.symbol)return zf(o.left);if(o.symbol.valueDeclaration){const D=hd(o.symbol.valueDeclaration);if(D){const L=As(D);if(L)return L}}const _=ua(o.left,Sc);if(!f0(u_(_.expression,!1,!1)))return;const v=aY(_.expression),S=Wb(_);return S!==void 0&&$2(v,S)||void 0}function iJt(o){return!!(Pu(o)&262144&&!o.links.type&&CO(o,0)>=0)}function $2(o,_,v){return Zc(o,S=>{var D;if(ap(S)&&!S.declaration.nameType){const L=Og(S),B=Hf(L)||L,K=v||G_(Ws(_));if(ba(K,B))return I_e(S,K)}else if(S.flags&3670016){const L=ya(S,_);if(L)return iJt(L)?void 0:TC(Qn(L),!!(L.flags&16777216));if(Qa(S)&&Yy(_)&&+_>=0){const B=KF(S,S.target.fixedLength,0,!1,!0);if(B)return B}return(D=rOe(sOe(S),v||G_(Ws(_))))==null?void 0:D.type}},!0)}function Oft(o,_){if(z.assert(f0(o)),!(o.flags&67108864))return UMe(o,_)}function UMe(o,_){const v=o.parent,S=pd(o)&&HMe(o,_);if(S)return S;const D=J2(v,_);if(D){if(TO(o)){const L=wr(o);return $2(D,L.escapedName,Zs(L).nameType)}if(Hb(o)){const L=ko(o);if(L&&Ja(L)){const B=fo(L.expression),K=Pm(B)&&$2(D,Am(B));if(K)return K}}if(o.name){const L=KS(o.name);return Zc(D,B=>{var K;return(K=rOe(sOe(B),L))==null?void 0:K.type},!0)}}}function nJt(o){let _,v;for(let S=0;S{if(Qa(L)){if((S===void 0||_D)?v-_:0,K=B>0&&L.target.hasRestElement?Ij(L.target,3):0;return B>0&&B<=K?Nc(L)[JS(L)-B]:KF(L,S===void 0?L.target.fixedLength:Math.min(L.target.fixedLength,S),v===void 0||D===void 0?K:Math.min(K,v-D),!1,!0)}return(!S||_XS(ne)?lp(ne,D0(B)):ne,!0))}function oJt(o,_){const v=o.parent;return j$(v)?w_(o,_):tb(v)?sJt(v,o,_):void 0}function Mft(o,_){if(qv(o)){const v=J2(o.parent,_);return!v||Al(v)?void 0:$2(v,s7(o.name))}else return w_(o.parent,_)}function lY(o){switch(o.kind){case 11:case 9:case 10:case 15:case 228:case 112:case 97:case 106:case 80:case 157:return!0;case 211:case 217:return lY(o.expression);case 294:return!o.expression||lY(o.expression)}return!1}function aJt(o,_){const v=`D${Tl(o)},${kf(_)}`;return p2(v)??PS(v,Xqt(_,o)??eMe(_,no(Yt(Ri(o.properties,S=>S.symbol?S.kind===303?lY(S.initializer)&&QF(_,S.symbol.escapedName):S.kind===304?QF(_,S.symbol.escapedName):!1:!1),S=>[()=>IY(S.kind===303?S.initializer:S.name),S.symbol.escapedName]),Yt(Ri(Nl(_),S=>{var D;return!!(S.flags&16777216)&&!!((D=o==null?void 0:o.symbol)!=null&&D.members)&&!o.symbol.members.has(S.escapedName)&&QF(_,S.escapedName)}),S=>[()=>wi,S.escapedName])),ba))}function lJt(o,_){const v=`D${Tl(o)},${kf(_)}`,S=p2(v);if(S)return S;const D=dY(pN(o));return PS(v,eMe(_,no(Yt(Ri(o.properties,L=>!!L.symbol&&L.kind===291&&QF(_,L.symbol.escapedName)&&(!L.initializer||lY(L.initializer))),L=>[L.initializer?()=>IY(L.initializer):()=>fi,L.symbol.escapedName]),Yt(Ri(Nl(_),L=>{var B;if(!(L.flags&16777216)||!((B=o==null?void 0:o.symbol)!=null&&B.members))return!1;const K=o.parent.parent;return L.escapedName===D&&tb(K)&&z6(K.children).length?!1:!o.symbol.members.has(L.escapedName)&&QF(_,L.escapedName)}),L=>[()=>wi,L.escapedName])),ba))}function J2(o,_){const v=f0(o)?Oft(o,_):w_(o,_),S=mpe(v,o,_);if(S&&!(_&&_&2&&S.flags&8650752)){const D=Zc(S,L=>Rr(L)&32?L:Qh(L),!0);return D.flags&1048576&&Pa(o)?aJt(o,D):D.flags&1048576&&ZT(o)?lJt(o,D):D}}function mpe(o,_,v){if(o&&Fu(o,465829888)){const S=VD(_);if(S&&v&1&&Rt(S.inferences,KKt))return vpe(o,S.nonFixingMapper);if(S!=null&&S.returnMapper){const D=vpe(o,S.returnMapper);return D.flags&1048576&&GS(D.types,ni)&&GS(D.types,Gi)?ud(D,L=>L!==ni&&L!==Gi):D}}return o}function vpe(o,_){return o.flags&465829888?Ys(o,_):o.flags&1048576?es(Yt(o.types,v=>vpe(v,_)),0):o.flags&2097152?Fa(Yt(o.types,v=>vpe(v,_))):o}function w_(o,_){var v;if(o.flags&67108864)return;const S=Fft(o,!_);if(S>=0)return Vm[S];const{parent:D}=o;switch(D.kind){case 260:case 169:case 172:case 171:case 208:return J$t(o,_);case 219:case 253:return G$t(o,_);case 229:return Q$t(D,_);case 223:return K$t(D,_);case 213:case 214:return Pft(D,o);case 170:return X$t(D);case 216:case 234:return V0(D.type)?w_(D,_):As(D.type);case 226:return Y$t(o,_);case 303:case 304:return UMe(D,_);case 305:return w_(D.parent,_);case 209:{const L=D,B=J2(L,_),K=I6(L.elements,o),ne=(v=Tr(L)).spreadIndices??(v.spreadIndices=nJt(L.elements));return qMe(B,K,L.elements.length,ne.first,ne.last)}case 227:return rJt(o,_);case 239:return z.assert(D.parent.kind===228),Z$t(D.parent,o);case 217:{if(Xn(D)){if(fae(D))return As(hae(D));const L=xk(D);if(L&&!V0(L.typeExpression.type))return As(L.typeExpression.type)}return w_(D,_)}case 235:return w_(D,_);case 238:return As(D.type);case 277:return Gn(D);case 294:return oJt(D,_);case 291:case 293:return Mft(D,_);case 286:case 285:return fJt(D,_);case 301:return dJt(D)}}function Rft(o){cY(o,w_(o,void 0),!0)}function cY(o,_,v){_x[tv]=o,Vm[tv]=_,u2[tv]=v,tv++}function Jj(){tv--}function Fft(o,_){for(let v=tv-1;v>=0;v--)if(o===_x[v]&&(_||!u2[v]))return v;return-1}function cJt(o,_){Eg[rt]=o,rC[rt]=_,rt++}function uJt(){rt--}function VD(o){for(let _=rt-1;_>=0;_--)if(OT(o,Eg[_]))return rC[_]}function dJt(o){return $2(COe(!1),kG(o))}function fJt(o,_){if(Uv(o)&&_!==4){const v=Fft(o.parent,!_);if(v>=0)return Vm[v]}return zMe(o,0)}function ype(o,_){return bht(_)!==0?hJt(o,_):gJt(o,_)}function hJt(o,_){let v=xRe(o,Gt);v=Bft(_,pN(_),v);const S=HD(mg.IntrinsicAttributes,_);return _l(S)||(v=SZ(S,v)),v}function _Jt(o,_){if(o.compositeSignatures){const S=[];for(const D of o.compositeSignatures){const L=Ol(D);if(Al(L))return L;const B=Eu(L,_);if(!B)return;S.push(B)}return Fa(S)}const v=Ol(o);return Al(v)?v:Eu(v,_)}function pJt(o){if(jA(o.tagName)){const v=Jft(o),S=Lpe(o,v);return iN(S)}const _=Vu(o.tagName);if(_.flags&128){const v=$ft(_,o);if(!v)return $e;const S=Lpe(o,v);return iN(S)}return _}function Bft(o,_,v){const S=BJt(_);if(S){const D=pJt(o),L=Qft(S,Xn(o),D,v);if(L)return L}return v}function gJt(o,_){const v=pN(_),S=VJt(v);let D=S===void 0?xRe(o,Gt):S===""?Ol(o):_Jt(o,S);if(!D)return S&&O(_.attributes.properties)&&ht(_,k.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property,Ws(S)),Gt;if(D=Bft(_,v,D),Al(D))return D;{let L=D;const B=HD(mg.IntrinsicClassAttributes,_);if(!_l(B)){const ne=US(B.symbol),ae=Ol(o);let Ce;if(ne){const qe=Ix([ae],ne,a1(ne),Xn(_));Ce=Ys(B,cp(ne,qe))}else Ce=B;L=SZ(Ce,L)}const K=HD(mg.IntrinsicAttributes,_);return _l(K)||(L=SZ(K,L)),L}}function mJt(o){return Hh(Y,"noImplicitAny")?nd(o,(_,v)=>_===v||!_?_:Ect(_.typeParameters,v.typeParameters)?bJt(_,v):void 0):void 0}function vJt(o,_,v){if(!o||!_)return o||_;const S=es([Qn(o),Ys(Qn(_),v)]);return cN(o,S)}function yJt(o,_,v){const S=fp(o),D=fp(_),L=S>=D?o:_,B=L===o?_:o,K=L===o?S:D,ne=ly(o)||ly(_),ae=ne&&!ly(L),Ce=new Array(K+(ae?1:0));for(let qe=0;qe=_1(L)&&qe>=_1(B),qi=qe>=S?void 0:e5(o,qe),An=qe>=D?void 0:e5(_,qe),Cr=qi===An?qi:qi?An?void 0:qi:An,en=sl(1|(Wi&&!Kt?16777216:0),Cr||`arg${qe}`);en.links.type=Kt?sh(Vt):Vt,Ce[qe]=en}if(ae){const qe=sl(1,"args");qe.links.type=sh(fv(B,K)),B===_&&(qe.links.type=Ys(qe.links.type,v)),Ce[K]=qe}return Ce}function bJt(o,_){const v=o.typeParameters||_.typeParameters;let S;o.typeParameters&&_.typeParameters&&(S=cp(_.typeParameters,o.typeParameters));const D=o.declaration,L=yJt(o,_,S),B=vJt(o.thisParameter,_.thisParameter,S),K=Math.max(o.minArgumentCount,_.minArgumentCount),ne=fb(D,v,B,L,void 0,void 0,K,(o.flags|_.flags)&167);return ne.compositeKind=2097152,ne.compositeSignatures=no(o.compositeKind===2097152&&o.compositeSignatures||[o],[_]),S&&(ne.mapper=o.compositeKind===2097152&&o.mapper&&o.compositeSignatures?BD(o.mapper,S):S),ne}function $Me(o,_){const v=ea(o,0),S=Ri(v,D=>!CJt(D,_));return S.length===1?S[0]:mJt(S)}function CJt(o,_){let v=0;for(;v<_.parameters.length;v++){const S=_.parameters[v];if(S.initializer||S.questionToken||S.dotDotDotToken||wG(S))break}return _.parameters.length&&FT(_.parameters[0])&&v--,!ly(o)&&fp(o){const B=h.getTokenEnd();if(S.category===3&&v&&B===v.start&&D===v.length){const K=oP(_.fileName,_.text,B,D,S,L);fa(v,K)}else(!v||B!==v.start)&&(v=ef(_,B,D,S,L),vl.add(v))}),h.setText(_.text,o.pos,o.end-o.pos);try{return h.scan(),z.assert(h.reScanSlashToken(!0)===14,"Expected scanner to rescan RegularExpressionLiteral"),!!v}finally{h.setText(""),h.setOnError(void 0)}}return!1}function wJt(o){const _=Tr(o);return _.flags&1||(_.flags|=1,a(()=>SJt(o))),Mu}function xJt(o,_){ue<2&&$d(o,Y.downlevelIteration?1536:1024);const v=fo(o.expression,_);return YS(33,v,wi,o.expression)}function kJt(o){return o.isSpread?lp(o.type,Ae):o.type}function YF(o){return o.kind===208&&!!o.initializer||o.kind===226&&o.operatorToken.kind===64}function TJt(o){const _=Vb(o.parent);return Zg(_)&&Dv(_.parent)}function Wft(o,_,v){const S=o.elements,D=S.length,L=[],B=[];Rft(o);const K=lS(o),ne=i5(o),ae=J2(o,void 0),Ce=TJt(o)||!!ae&&Km(ae,Ve=>GF(Ve)||ap(Ve)&&!Ve.nameType&&!!Aj(Ve.target||Ve));let qe=!1;for(let Ve=0;VeB[Dt]&8?Lx(Ve,Ae)||Je:Ve),2):be?Fs:ce,ne))}function Vft(o){if(!(Rr(o)&4))return o;let _=o.literalType;return _||(_=o.literalType=Yct(o),_.objectFlags|=147456),_}function DJt(o){switch(o.kind){case 167:return EJt(o);case 80:return Yy(o.escapedText);case 9:case 11:return Yy(o.text);default:return!1}}function EJt(o){return jf(u1(o),296)}function u1(o){const _=Tr(o.expression);if(!_.resolvedType){if((p_(o.parent.parent)||ss(o.parent.parent)||Ff(o.parent.parent))&&cr(o.expression)&&o.expression.operatorToken.kind===103&&o.parent.kind!==177&&o.parent.kind!==178)return _.resolvedType=$e;if(_.resolvedType=fo(o.expression),To(o.parent)&&!_d(o.parent)&&wd(o.parent.parent)){const v=j0(o.parent.parent),S=FMe(v);S&&(Tr(S).flags|=4096,Tr(o).flags|=32768,Tr(o.parent.parent).flags|=32768)}(_.resolvedType.flags&98304||!jf(_.resolvedType,402665900)&&!ba(_.resolvedType,$i))&&ht(o,k.A_computed_property_name_must_be_of_type_string_number_symbol_or_any)}return _.resolvedType}function IJt(o){var _;const v=(_=o.declarations)==null?void 0:_[0];return Yy(o.escapedName)||v&&Af(v)&&DJt(v.name)}function Hft(o){var _;const v=(_=o.declarations)==null?void 0:_[0];return PW(o)||v&&Af(v)&&Ja(v.name)&&jf(u1(v.name),4096)}function GMe(o,_,v,S){const D=[];for(let B=_;B0&&(K=MD(K,vn(),o.symbol,Kt,Ce),B=[],L=ga(),qi=!1,An=!1,Cr=!1);const Ur=cv(fo(In.expression,_&2));if(uY(Ur)){const Ia=HOe(Ur,Ce);if(D&&zft(Ia,D,In),en=B.length,_l(K))continue;K=MD(K,Ia,o.symbol,Kt,Ce)}else ht(In,k.Spread_types_may_only_be_created_from_object_types),K=$e;continue}else z.assert(In.kind===177||In.kind===178),zA(In);zr&&!(zr.flags&8576)?ba(zr,$i)&&(ba(zr,Ae)?An=!0:ba(zr,kn)?Cr=!0:qi=!0,S&&(Wi=!0)):L.set(Nr.escapedName,Nr),B.push(Nr)}if(Jj(),ae){const In=Xi(ne.pattern.parent,zr=>zr.kind===260||zr.kind===226||zr.kind===169);if(Xi(o,zr=>zr===In||zr.kind===305).kind!==305)for(const zr of Nl(ne))!L.get(zr.escapedName)&&!ya(K,zr.escapedName)&&(zr.flags&16777216||ht(zr.valueDeclaration||((v=$r(zr,M1))==null?void 0:v.links.bindingElement),k.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value),L.set(zr.escapedName,zr),B.push(zr))}if(_l(K))return $e;if(K!==Ps)return B.length>0&&(K=MD(K,vn(),o.symbol,Kt,Ce),B=[],L=ga(),qi=!1,An=!1),Zc(K,In=>In===Ps?vn():In);return vn();function vn(){const In=[];qi&&In.push(GMe(o,en,B,tt)),An&&In.push(GMe(o,en,B,Ae)),Cr&&In.push(GMe(o,en,B,kn));const Nr=bi(o.symbol,L,x,x,In);return Nr.objectFlags|=Kt|128|131072,Vt&&(Nr.objectFlags|=4096),Wi&&(Nr.objectFlags|=512),S&&(Nr.pattern=o),Nr}}function uY(o){const _=Edt(Zc(o,ry));return!!(_.flags&126615553||_.flags&3145728&&Be(_.types,uY))}function LJt(o){XMe(o)}function PJt(o,_){return zA(o),fY(o)||Je}function AJt(o){XMe(o.openingElement),jA(o.closingElement.tagName)?Spe(o.closingElement):fo(o.closingElement.tagName),Cpe(o)}function OJt(o,_){return zA(o),fY(o)||Je}function MJt(o){XMe(o.openingFragment);const _=_n(o);return sG(Y)&&(Y.jsxFactory||_.pragmas.has("jsx"))&&!Y.jsxFragmentFactory&&!_.pragmas.has("jsxfrag")&&ht(o,Y.jsxFactory?k.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option:k.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments),Cpe(o),fY(o)||Je}function KMe(o){return o.includes("-")}function jA(o){return lt(o)&&U6(o.escapedText)||J0(o)}function jft(o,_){return o.initializer?n5(o.initializer,_):fi}function RJt(o,_=0){const v=o.attributes,S=w_(v,0),D=be?ga():void 0;let L=ga(),B=pf,K=!1,ne,ae=!1,Ce=2048;const qe=dY(pN(o));for(const Vt of v.properties){const Kt=Vt.symbol;if(qv(Vt)){const Wi=jft(Vt,_);Ce|=Rr(Wi)&458752;const qi=sl(4|Kt.flags,Kt.escapedName);if(qi.declarations=Kt.declarations,qi.parent=Kt.parent,Kt.valueDeclaration&&(qi.valueDeclaration=Kt.valueDeclaration),qi.links.type=Wi,qi.links.target=Kt,L.set(qi.escapedName,qi),D==null||D.set(qi.escapedName,qi),s7(Vt.name)===qe&&(ae=!0),S){const An=ya(S,Kt.escapedName);An&&An.declarations&&am(An)&<(Vt.name)&&oC(Vt.name,An.declarations,Vt.name.escapedText)}if(S&&_&2&&!(_&4)&&fm(Vt)){const An=VD(v);z.assert(An);const Cr=Vt.initializer.expression;_Me(An,Cr,Wi)}}else{z.assert(Vt.kind===293),L.size>0&&(B=MD(B,Dt(),v.symbol,Ce,!1),L=ga());const Wi=cv(fo(Vt.expression,_&2));Al(Wi)&&(K=!0),uY(Wi)?(B=MD(B,Wi,v.symbol,Ce,!1),D&&zft(Wi,D,Vt)):(ht(Vt.expression,k.Spread_types_may_only_be_created_from_object_types),ne=ne?Fa([ne,Wi]):Wi)}}K||L.size>0&&(B=MD(B,Dt(),v.symbol,Ce,!1));const Ve=o.parent.kind===284?o.parent:void 0;if(Ve&&Ve.openingElement===o&&z6(Ve.children).length>0){const Vt=Cpe(Ve,_);if(!K&&qe&&qe!==""){ae&&ht(v,k._0_are_specified_twice_The_attribute_named_0_will_be_overwritten,Ws(qe));const Kt=J2(o.attributes,void 0),Wi=Kt&&$2(Kt,qe),qi=sl(4,qe);qi.links.type=Vt.length===1?Vt[0]:Wi&&Km(Wi,GF)?oy(Vt):sh(es(Vt)),qi.valueDeclaration=G.createPropertySignature(void 0,Ws(qe),void 0,void 0),ml(qi.valueDeclaration,v),qi.valueDeclaration.symbol=qi;const An=ga();An.set(qe,qi),B=MD(B,bi(v.symbol,An,x,x,x),v.symbol,Ce,!1)}}if(K)return Je;if(ne&&B!==pf)return Fa([ne,B]);return ne||(B===pf?Dt():B);function Dt(){Ce|=8192;const Vt=bi(v.symbol,L,x,x,x);return Vt.objectFlags|=Ce|128|131072,Vt}}function Cpe(o,_){const v=[];for(const S of o.children)if(S.kind===12)S.containsOnlyTriviaWhiteSpaces||v.push(tt);else{if(S.kind===294&&!S.expression)continue;v.push(n5(S,_))}return v}function zft(o,_,v){for(const S of Nl(o))if(!(S.flags&16777216)){const D=_.get(S.escapedName);if(D){const L=ht(D.valueDeclaration,k._0_is_specified_more_than_once_so_this_usage_will_be_overwritten,Ws(D.escapedName));fa(L,Kn(v,k.This_spread_always_overwrites_this_property))}}}function FJt(o,_){return RJt(o.parent,_)}function HD(o,_){const v=pN(_),S=v&&Yp(v),D=S&&rh(S,o,788968);return D?vc(D):$e}function Spe(o){const _=Tr(o);if(!_.resolvedSymbol){const v=HD(mg.IntrinsicElements,o);if(_l(v))return ke&&ht(o,k.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists,Ws(mg.IntrinsicElements)),_.resolvedSymbol=Ot;{if(!lt(o.tagName)&&!J0(o.tagName))return z.fail();const S=J0(o.tagName)?hP(o.tagName):o.tagName.escapedText,D=ya(v,S);if(D)return _.jsxFlags|=1,_.resolvedSymbol=D;const L=fpt(v,G_(Ws(S)));return L?(_.jsxFlags|=2,_.resolvedSymbol=L):FF(v,S)?(_.jsxFlags|=2,_.resolvedSymbol=v.symbol):(ht(o,k.Property_0_does_not_exist_on_type_1,_ae(o.tagName),"JSX."+mg.IntrinsicElements),_.resolvedSymbol=Ot)}}return _.resolvedSymbol}function QMe(o){const _=o&&_n(o),v=_&&Tr(_);if(v&&v.jsxImplicitImportContainer===!1)return;if(v&&v.jsxImplicitImportContainer)return v.jsxImplicitImportContainer;const S=aG(oG(Y,_),Y);if(!S)return;const L=f_(Y)===1?k.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option:k.Cannot_find_module_0_or_its_corresponding_type_declarations,B=pei(_,S),K=wD(B||o,S,L,o),ne=K&&K!==Ot?al(Ru(K)):void 0;return v&&(v.jsxImplicitImportContainer=ne||!1),ne}function pN(o){const _=o&&Tr(o);if(_&&_.jsxNamespace)return _.jsxNamespace;if(!_||_.jsxNamespace!==!1){let S=QMe(o);if(!S||S===Ot){const D=g2(o);S=Ui(o,D,1920,void 0,!1)}if(S){const D=Ru(rh(Yp(Ru(S)),mg.JSX,1920));if(D&&D!==Ot)return _&&(_.jsxNamespace=D),D}_&&(_.jsxNamespace=!1)}const v=Ru(PO(mg.JSX,1920,void 0));if(v!==Ot)return v}function Uft(o,_){const v=_&&rh(_.exports,o,788968),S=v&&vc(v),D=S&&Nl(S);if(D){if(D.length===0)return"";if(D.length===1)return D[0].escapedName;D.length>1&&v.declarations&&ht(v.declarations[0],k.The_global_type_JSX_0_may_not_have_more_than_one_property,Ws(o))}}function BJt(o){return o&&rh(o.exports,mg.LibraryManagedAttributes,788968)}function WJt(o){return o&&rh(o.exports,mg.ElementType,788968)}function VJt(o){return Uft(mg.ElementAttributesPropertyNameContainer,o)}function dY(o){return Uft(mg.ElementChildrenAttributeNameContainer,o)}function qft(o,_){if(o.flags&4)return[J];if(o.flags&128){const D=$ft(o,_);return D?[Lpe(_,D)]:(ht(_,k.Property_0_does_not_exist_on_type_1,o.value,"JSX."+mg.IntrinsicElements),x)}const v=Qh(o);let S=ea(v,1);return S.length===0&&(S=ea(v,0)),S.length===0&&v.flags&1048576&&(S=J3e(Yt(v.types,D=>qft(D,_)))),S}function $ft(o,_){const v=HD(mg.IntrinsicElements,_);if(!_l(v)){const S=o.value,D=ya(v,du(S));if(D)return Qn(D);const L=F2(v,tt);return L||void 0}return Je}function HJt(o,_,v){if(o===1){const D=Kft(v);D&&hm(_,D,$_,v.tagName,k.Its_return_type_0_is_not_a_valid_JSX_element,S)}else if(o===0){const D=Gft(v);D&&hm(_,D,$_,v.tagName,k.Its_instance_type_0_is_not_a_valid_JSX_element,S)}else{const D=Kft(v),L=Gft(v);if(!D||!L)return;const B=es([D,L]);hm(_,B,$_,v.tagName,k.Its_element_type_0_is_not_a_valid_JSX_element,S)}function S(){const D=yu(v.tagName);return Ro(void 0,k._0_cannot_be_used_as_a_JSX_component,D)}}function Jft(o){var _;z.assert(jA(o.tagName));const v=Tr(o);if(!v.resolvedJsxElementAttributesType){const S=Spe(o);if(v.jsxFlags&1)return v.resolvedJsxElementAttributesType=Qn(S)||$e;if(v.jsxFlags&2){const D=J0(o.tagName)?hP(o.tagName):o.tagName.escapedText;return v.resolvedJsxElementAttributesType=((_=NA(HD(mg.IntrinsicElements,o),D))==null?void 0:_.type)||$e}else return v.resolvedJsxElementAttributesType=$e}return v.resolvedJsxElementAttributesType}function Gft(o){const _=HD(mg.ElementClass,o);if(!_l(_))return _}function fY(o){return HD(mg.Element,o)}function Kft(o){const _=fY(o);if(_)return es([_,je])}function jJt(o){const _=pN(o);if(!_)return;const v=WJt(_);if(!v)return;const S=Qft(v,Xn(o));if(!(!S||_l(S)))return S}function Qft(o,_,...v){const S=vc(o);if(o.flags&524288){const D=Zs(o).typeParameters;if(O(D)>=v.length){const L=Ix(v,D,v.length,_);return O(L)===0?S:NO(o,L)}}if(O(S.typeParameters)>=v.length){const D=Ix(v,S.typeParameters,v.length,_);return $S(S,D)}}function zJt(o){const _=HD(mg.IntrinsicElements,o);return _?Nl(_):x}function UJt(o){(Y.jsx||0)===0&&ht(o,k.Cannot_use_JSX_unless_the_jsx_flag_is_provided),fY(o)===void 0&&ke&&ht(o,k.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist)}function XMe(o){const _=eh(o);if(_&&WYt(o),UJt(o),RMe(o),_){const v=o,S=HO(v);Ape(S,o);const D=jJt(v);if(D!==void 0){const L=v.tagName,B=jA(L)?G_(_ae(L)):fo(L);hm(B,D,$_,L,k.Its_type_0_is_not_a_valid_JSX_element_type,()=>{const K=yu(L);return Ro(void 0,k._0_cannot_be_used_as_a_JSX_component,K)})}else HJt(bht(v),Ol(S),v)}}function wpe(o,_,v){if(o.flags&524288&&(LD(o,_)||NA(o,_)||Sj(_)&&hb(o,tt)||v&&KMe(_)))return!0;if(o.flags&33554432)return wpe(o.baseType,_,v);if(o.flags&3145728&&Kj(o)){for(const S of o.types)if(wpe(S,_,v))return!0}return!1}function Kj(o){return!!(o.flags&524288&&!(Rr(o)&512)||o.flags&67108864||o.flags&33554432&&Kj(o.baseType)||o.flags&1048576&&Rt(o.types,Kj)||o.flags&2097152&&Be(o.types,Kj))}function qJt(o,_){if(HYt(o),o.expression){const v=fo(o.expression,_);return o.dotDotDotToken&&v!==Je&&!_m(v)&&ht(o,k.JSX_spread_child_must_be_an_array_type),v}else return $e}function ZMe(o){return o.valueDeclaration?qD(o.valueDeclaration):0}function YMe(o){if(o.flags&8192||Pu(o)&4)return!0;if(Xn(o.valueDeclaration)){const _=o.valueDeclaration.parent;return _&&cr(_)&&Lu(_)===3}}function eRe(o,_,v,S,D,L=!0){const B=L?o.kind===166?o.right:o.kind===205?o:o.kind===208&&o.propertyName?o.propertyName:o.name:void 0;return Xft(o,_,v,S,D,B)}function Xft(o,_,v,S,D,L){var B;const K=Qg(D,v);if(_){if(ue<2&&Zft(D))return L&&ht(L,k.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword),!1;if(K&64)return L&&ht(L,k.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression,Js(D),Un(BA(D))),!1;if(!(K&256)&&((B=D.declarations)!=null&&B.some(lwe)))return L&&ht(L,k.Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super,Js(D)),!1}if(K&64&&Zft(D)&&(aW(o)||fxe(o)||pg(o.parent)&&pJ(o.parent.parent))){const ae=Ub(Vf(D));if(ae&&MZt(o))return L&&ht(L,k.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor,Js(D),Im(ae.name)),!1}if(!(K&6))return!0;if(K&2){const ae=Ub(Vf(D));return r8e(o,ae)?!0:(L&&ht(L,k.Property_0_is_private_and_only_accessible_within_class_1,Js(D),Un(BA(D))),!1)}if(_)return!0;let ne=upt(o,ae=>{const Ce=vc(wr(ae));return mdt(Ce,D,v)});return!ne&&(ne=$Jt(o),ne=ne&&mdt(ne,D,v),K&256||!ne)?(L&&ht(L,k.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses,Js(D),Un(BA(D)||S)),!1):K&256?!0:(S.flags&262144&&(S=S.isThisType?C_(S):Hf(S)),!S||!xO(S,ne)?(L&&ht(L,k.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2,Js(D),Un(ne),Un(S)),!1):!0)}function $Jt(o){const _=JJt(o);let v=(_==null?void 0:_.type)&&As(_.type);if(v&&v.flags&262144&&(v=C_(v)),v&&Rr(v)&7)return wO(v)}function JJt(o){const _=u_(o,!1,!1);return _&&Bo(_)?RT(_):void 0}function Zft(o){return!!qZ(o,_=>!(_.flags&8192))}function WO(o){return d1(fo(o),o)}function hY(o){return dv(o,50331648)}function tRe(o){return hY(o)?kC(o):o}function GJt(o,_){const v=pc(o)?kp(o):void 0;if(o.kind===106){ht(o,k.The_value_0_cannot_be_used_here,"null");return}if(v!==void 0&&v.length<100){if(lt(o)&&v==="undefined"){ht(o,k.The_value_0_cannot_be_used_here,"undefined");return}ht(o,_&16777216?_&33554432?k._0_is_possibly_null_or_undefined:k._0_is_possibly_undefined:k._0_is_possibly_null,v)}else ht(o,_&16777216?_&33554432?k.Object_is_possibly_null_or_undefined:k.Object_is_possibly_undefined:k.Object_is_possibly_null)}function KJt(o,_){ht(o,_&16777216?_&33554432?k.Cannot_invoke_an_object_which_is_possibly_null_or_undefined:k.Cannot_invoke_an_object_which_is_possibly_undefined:k.Cannot_invoke_an_object_which_is_possibly_null)}function Yft(o,_,v){if(be&&o.flags&2){if(pc(_)){const D=kp(_);if(D.length<100)return ht(_,k._0_is_of_type_unknown,D),$e}return ht(_,k.Object_is_of_type_unknown),$e}const S=MO(o,50331648);if(S&50331648){v(_,S);const D=kC(o);return D.flags&229376?$e:D}return o}function d1(o,_){return Yft(o,_,GJt)}function eht(o,_){const v=d1(o,_);if(v.flags&16384){if(pc(_)){const S=kp(_);if(lt(_)&&S==="undefined")return ht(_,k.The_value_0_cannot_be_used_here,S),v;if(S.length<100)return ht(_,k._0_is_possibly_undefined,S),v}ht(_,k.Object_is_possibly_undefined)}return v}function xpe(o,_,v){return o.flags&64?QJt(o,_):nRe(o,o.expression,WO(o.expression),o.name,_,v)}function QJt(o,_){const v=fo(o.expression),S=Wj(v,o.expression);return X_e(nRe(o,o.expression,d1(S,o.expression),o.name,_),o,S!==v)}function tht(o,_){const v=vJ(o)&&Uw(o.left)?d1(aY(o.left),o.left):WO(o.left);return nRe(o,o.left,v,o.right,_)}function iRe(o){for(;o.parent.kind===217;)o=o.parent;return Dv(o.parent)&&o.parent.expression===o}function _Y(o,_){for(let v=hJ(_);v;v=Sf(v)){const{symbol:S}=v,D=LW(S,o),L=S.members&&S.members.get(D)||S.exports&&S.exports.get(D);if(L)return L}}function XJt(o){if(!Sf(o))return on(o,k.Private_identifiers_are_not_allowed_outside_class_bodies);if(!qG(o.parent)){if(!z0(o))return on(o,k.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression);const _=cr(o.parent)&&o.parent.operatorToken.kind===103;if(!kpe(o)&&!_)return on(o,k.Cannot_find_name_0,dr(o))}return!1}function ZJt(o){XJt(o);const _=kpe(o);return _&&gY(_,void 0,!1),Je}function kpe(o){if(!z0(o))return;const _=Tr(o);return _.resolvedSymbol===void 0&&(_.resolvedSymbol=_Y(o.escapedText,o)),_.resolvedSymbol}function Tpe(o,_){return ya(o,_.escapedName)}function YJt(o,_,v){let S;const D=Nl(o);D&&W(D,B=>{const K=B.valueDeclaration;if(K&&Af(K)&&Vs(K.name)&&K.name.escapedText===_.escapedText)return S=B,!0});const L=Zp(_);if(S){const B=z.checkDefined(S.valueDeclaration),K=z.checkDefined(Sf(B));if(v!=null&&v.valueDeclaration){const ne=v.valueDeclaration,ae=Sf(ne);if(z.assert(!!ae),Xi(ae,Ce=>K===Ce)){const Ce=ht(_,k.The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling,L,Un(o));return fa(Ce,Kn(ne,k.The_shadowing_declaration_of_0_is_defined_here,L),Kn(B,k.The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here,L)),!0}}return ht(_,k.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier,L,Zp(K.name||Ule)),!0}return!1}function iht(o,_){return(Ag(_)||aW(o)&&sv(_))&&u_(o,!0,!1)===vC(_)}function nRe(o,_,v,S,D,L){const B=Tr(_).resolvedSymbol,K=Mk(o),ne=Qh(K!==0||iRe(o)?up(v):v),ae=Al(ne)||ne===_r;let Ce;if(Vs(S)){(ue<9||ue<99||!oe)&&(K!==0&&$d(o,1048576),K!==1&&$d(o,524288));const Ve=_Y(S.escapedText,S);if(K&&Ve&&Ve.valueDeclaration&&Au(Ve.valueDeclaration)&&on(S,k.Cannot_assign_to_private_method_0_Private_methods_are_not_writable,dr(S)),ae){if(Ve)return _l(ne)?$e:ne;if(hJ(S)===void 0)return on(S,k.Private_identifiers_are_not_allowed_outside_class_bodies),Je}if(Ce=Ve&&Tpe(v,Ve),Ce===void 0){if(YJt(v,S,Ve))return $e;const Dt=hJ(S);Dt&&p8(_n(Dt),Y.checkJs)&&on(S,k.Private_field_0_must_be_declared_in_an_enclosing_class,dr(S))}else Ce.flags&65536&&!(Ce.flags&32768)&&K!==1&&ht(o,k.Private_accessor_was_defined_without_a_getter)}else{if(ae)return lt(_)&&B&&HA(o,2,void 0,v),_l(ne)?$e:ne;Ce=ya(ne,S.escapedText,Fpe(ne),o.kind===166)}HA(o,2,Ce,v);let qe;if(Ce){const Ve=e8e(Ce,S);if(am(Ve)&&MOe(o,Ve)&&Ve.declarations&&oC(S,Ve.declarations,S.escapedText),eGt(Ce,o,S),gY(Ce,o,uht(_,B)),Tr(o).resolvedSymbol=Ce,eRe(o,_.kind===108,rP(o),ne,Ce),Xht(o,Ce,K))return ht(S,k.Cannot_assign_to_0_because_it_is_a_read_only_property,dr(S)),$e;qe=iht(o,Ce)?pt:L||JJ(o)?O2(Ce):Qn(Ce)}else{const Ve=!Vs(S)&&(K===0||!sN(v)||r7(v))?NA(ne,S.escapedText):void 0;if(!(Ve&&Ve.type)){const Dt=rRe(o,v.symbol,!0);return!Dt&&Nj(v)?Je:v.symbol===wt?(wt.exports.has(S.escapedText)&&wt.exports.get(S.escapedText).flags&418?ht(S,k.Property_0_does_not_exist_on_type_1,Ws(S.escapedText),Un(v)):ke&&ht(S,k.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature,Un(v)),Je):(S.escapedText&&!mc(o)&&rht(S,r7(v)?ne:v,Dt),$e)}Ve.isReadonly&&(lS(o)||aoe(o))&&ht(o,k.Index_signature_in_type_0_only_permits_reading,Un(ne)),qe=Ve.type,Y.noUncheckedIndexedAccess&&Mk(o)!==1&&(qe=es([qe,ut])),Y.noPropertyAccessFromIndexSignature&&Ir(o)&&ht(S,k.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0,Ws(S.escapedText)),Ve.declaration&&Yv(Ve.declaration)&&oC(S,[Ve.declaration],S.escapedText)}return nht(o,Ce,qe,S,D)}function rRe(o,_,v){var S;const D=_n(o);if(D&&Y.checkJs===void 0&&D.checkJsDirective===void 0&&(D.scriptKind===1||D.scriptKind===2)){const L=W(_==null?void 0:_.declarations,_n),B=!(_!=null&&_.valueDeclaration)||!ss(_.valueDeclaration)||((S=_.valueDeclaration.heritageClauses)==null?void 0:S.length)||oS(!1,_.valueDeclaration);return!(D!==L&&L&&nS(L))&&!(v&&_&&_.flags&32&&B)&&!(o&&v&&Ir(o)&&o.expression.kind===110&&B)}return!1}function nht(o,_,v,S,D){const L=Mk(o);if(L===1)return TC(v,!!(_&&_.flags&16777216));if(_&&!(_.flags&98311)&&!(_.flags&8192&&v.flags&1048576)&&!ege(_.declarations))return v;if(v===pt)return BF(o,_);v=MMe(v,o,D);let B=!1;if(be&&Ee&&Sc(o)&&o.expression.kind===110){const ne=_&&_.valueDeclaration;if(ne&&Z_t(ne)&&!da(ne)){const ae=qj(o);ae.kind===176&&ae.parent===ne.parent&&!(ne.flags&33554432)&&(B=!0)}}else be&&_&&_.valueDeclaration&&Ir(_.valueDeclaration)&&yW(_.valueDeclaration)&&qj(o)===qj(_.valueDeclaration)&&(B=!0);const K=EC(o,v,B?Rx(v):v);return B&&!OO(v)&&OO(K)?(ht(S,k.Property_0_is_used_before_being_assigned,Js(_)),v):L?xC(K):K}function eGt(o,_,v){const{valueDeclaration:S}=o;if(!S||_n(_).isDeclarationFile)return;let D;const L=dr(v);sRe(_)&&!Mjt(S)&&!(Sc(_)&&Sc(_.expression))&&!b0(S,v)&&!(Au(S)&&uge(S)&256)&&(oe||!tGt(o))?D=ht(v,k.Property_0_is_used_before_its_initialization,L):S.kind===263&&_.parent.kind!==183&&!(S.flags&33554432)&&!b0(S,v)&&(D=ht(v,k.Class_0_used_before_its_declaration,L)),D&&fa(D,Kn(S,k._0_is_declared_here,L))}function sRe(o){return!!Xi(o,_=>{switch(_.kind){case 172:return!0;case 303:case 174:case 177:case 178:case 305:case 167:case 239:case 294:case 291:case 292:case 293:case 286:case 233:case 298:return!1;case 219:case 244:return Ho(_.parent)&&bu(_.parent.parent)?!0:"quit";default:return z0(_)?!1:"quit"}})}function tGt(o){if(!(o.parent.flags&32))return!1;let _=Qn(o.parent);for(;;){if(_=_.symbol&&iGt(_),!_)return!1;const v=ya(_,o.escapedName);if(v&&v.valueDeclaration)return!0}}function iGt(o){const _=Yr(o);if(_.length!==0)return Fa(_)}function rht(o,_,v){let S,D;if(!Vs(o)&&_.flags&1048576&&!(_.flags&402784252)){for(const B of _.types)if(!ya(B,o.escapedText)&&!NA(B,o.escapedText)){S=Ro(S,k.Property_0_does_not_exist_on_type_1,sc(o),Un(B));break}}if(sht(o.escapedText,_)){const B=sc(o),K=Un(_);S=Ro(S,k.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead,B,K,K+"."+B)}else{const B=nz(_);if(B&&ya(B,o.escapedText))S=Ro(S,k.Property_0_does_not_exist_on_type_1,sc(o),Un(_)),D=Kn(o,k.Did_you_forget_to_use_await);else{const K=sc(o),ne=Un(_),ae=sGt(K,_);if(ae!==void 0)S=Ro(S,k.Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later,K,ne,ae);else{const Ce=oRe(o,_);if(Ce!==void 0){const qe=xu(Ce),Ve=v?k.Property_0_may_not_exist_on_type_1_Did_you_mean_2:k.Property_0_does_not_exist_on_type_1_Did_you_mean_2;S=Ro(S,Ve,K,ne,qe),D=Ce.valueDeclaration&&Kn(Ce.valueDeclaration,k._0_is_declared_here,qe)}else{const qe=nGt(_)?k.Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom:k.Property_0_does_not_exist_on_type_1;S=Ro(iOe(S,_),qe,K,ne)}}}}const L=$y(_n(o),o,S);D&&fa(L,D),v0(!v||S.code!==k.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code,L)}function nGt(o){return Y.lib&&!Y.lib.includes("dom")&&f$t(o,_=>_.symbol&&/^(EventTarget|Node|((HTML[a-zA-Z]*)?Element))$/.test(Ws(_.symbol.escapedName)))&&wC(o)}function sht(o,_){const v=_.symbol&&ya(Qn(_.symbol),o);return v!==void 0&&!!v.valueDeclaration&&da(v.valueDeclaration)}function rGt(o){const _=Zp(o),S=Ose().get(_);return S&&vT(S.keys())}function sGt(o,_){const v=Qh(_).symbol;if(!v)return;const S=xu(v),L=Ose().get(S);if(L){for(const[B,K]of L)if(Mt(K,o))return B}}function oht(o,_){return pY(o,Nl(_),106500)}function oRe(o,_){let v=Nl(_);if(typeof o!="string"){const S=o.parent;Ir(S)&&(v=Ri(v,D=>dht(S,_,D))),o=dr(o)}return pY(o,v,111551)}function aht(o,_){const v=mo(o)?o:dr(o),S=Nl(_);return(v==="for"?Me(S,L=>xu(L)==="htmlFor"):v==="class"?Me(S,L=>xu(L)==="className"):void 0)??pY(v,S,111551)}function lht(o,_){const v=oRe(o,_);return v&&xu(v)}function oGt(o,_,v){const S=rh(o,_,v);if(S)return S;let D;return o===Ue?D=ns(["string","number","boolean","object","bigint","symbol"],B=>o.has(B.charAt(0).toUpperCase()+B.slice(1))?sl(524288,B):void 0).concat(Fn(o.values())):D=Fn(o.values()),pY(Ws(_),D,v)}function cht(o,_,v){return z.assert(_!==void 0,"outername should always be defined"),bn(o,_,v,void 0,!1,!1)}function aRe(o,_){return _.exports&&pY(dr(o),xD(_),2623475)}function aGt(o,_,v){function S(B){const K=LD(o,B);if(K){const ne=mN(Qn(K));return!!ne&&_1(ne)>=1&&ba(v,fv(ne,0))}return!1}const D=lS(_)?"set":"get";if(!S(D))return;let L=jW(_.expression);return L===void 0?L=D:L+="."+D,L}function lGt(o,_){const v=_.types.filter(S=>!!(S.flags&128));return qE(o.value,v,S=>S.value)}function pY(o,_,v){return qE(o,_,S);function S(D){const L=xu(D);if(!ro(L,'"')){if(D.flags&v)return L;if(D.flags&2097152){const B=hC(D);if(B&&B.flags&v)return L}}}}function gY(o,_,v){const S=o&&o.flags&106500&&o.valueDeclaration;if(!S)return;const D=Ep(S,2),L=o.valueDeclaration&&Af(o.valueDeclaration)&&Vs(o.valueDeclaration.name);if(!(!D&&!L)&&!(_&&JJ(_)&&!(o.flags&65536))){if(v){const B=Xi(_,rc);if(B&&B.symbol===o)return}(Pu(o)&1?Zs(o).target:o).isReferenced=-1}}function uht(o,_){return o.kind===110||!!_&&pc(o)&&_===S_(Ip(o))}function cGt(o,_){switch(o.kind){case 211:return lRe(o,o.expression.kind===108,_,up(fo(o.expression)));case 166:return lRe(o,!1,_,up(fo(o.left)));case 205:return lRe(o,!1,_,As(o))}}function dht(o,_,v){return cRe(o,o.kind===211&&o.expression.kind===108,!1,_,v)}function lRe(o,_,v,S){if(Al(S))return!0;const D=ya(S,v);return!!D&&cRe(o,_,!1,S,D)}function cRe(o,_,v,S,D){if(Al(S))return!0;if(D.valueDeclaration&&Fh(D.valueDeclaration)){const L=Sf(D.valueDeclaration);return!ph(o)&&!!Xi(o,B=>B===L)}return Xft(o,_,v,S,D)}function uGt(o){const _=o.initializer;if(_.kind===261){const v=_.declarations[0];if(v&&!Qo(v.name))return wr(v)}else if(_.kind===80)return S_(_)}function dGt(o){return Xh(o).length===1&&!!hb(o,Ae)}function fGt(o){const _=Il(o);if(_.kind===80){const v=S_(_);if(v.flags&3){let S=o,D=o.parent;for(;D;){if(D.kind===249&&S===D.statement&&uGt(D)===v&&dGt(zf(D.expression)))return!0;S=D,D=D.parent}}}return!1}function hGt(o,_){return o.flags&64?_Gt(o,_):fht(o,WO(o.expression),_)}function _Gt(o,_){const v=fo(o.expression),S=Wj(v,o.expression);return X_e(fht(o,d1(S,o.expression),_),o,S!==v)}function fht(o,_,v){const S=Mk(o)!==0||iRe(o)?up(_):_,D=o.argumentExpression,L=fo(D);if(_l(S)||S===_r)return S;if(Fpe(S)&&!Ml(D))return ht(D,k.A_const_enum_member_can_only_be_accessed_using_a_string_literal),$e;const B=fGt(D)?Ae:L,K=Mk(o);let ne;K===0?ne=32:(ne=4|(sN(S)&&!r7(S)?2:0),K===2&&(ne|=32));const ae=Lx(S,B,ne,o)||$e;return v_t(nht(o,Tr(o).resolvedSymbol,ae,D,v),o)}function hht(o){return Dv(o)||KT(o)||eh(o)}function gN(o){return hht(o)&&W(o.typeArguments,Ua),o.kind===215?fo(o.template):eh(o)?fo(o.attributes):cr(o)?fo(o.left):Dv(o)&&W(o.arguments,_=>{fo(_)}),J}function f1(o){return gN(o),ct}function pGt(o,_,v){let S,D,L=0,B,K=-1,ne;z.assert(!_.length);for(const ae of o){const Ce=ae.declaration&&wr(ae.declaration),qe=ae.declaration&&ae.declaration.parent;!D||Ce===D?S&&qe===S?B=B+1:(S=qe,B=L):(B=L=_.length,S=qe),D=Ce,Qle(ae)?(K++,ne=K,L++):ne=B,_.splice(ne,0,v?njt(ae,v):ae)}}function Dpe(o){return!!o&&(o.kind===230||o.kind===237&&o.isSpread)}function uRe(o){return Nt(o,Dpe)}function _ht(o){return!!(o.flags&16384)}function gGt(o){return!!(o.flags&49155)}function Epe(o,_,v,S=!1){let D,L=!1,B=fp(v),K=_1(v);if(o.kind===215)if(D=_.length,o.template.kind===228){const ne=La(o.template.templateSpans);L=vu(ne.literal)||!!ne.literal.isUnterminated}else{const ne=o.template;z.assert(ne.kind===15),L=!!ne.isUnterminated}else if(o.kind===170)D=Sht(o,v);else if(o.kind===226)D=1;else if(eh(o)){if(L=o.attributes.end===o.end,L)return!0;D=K===0?_.length:1,B=_.length===0?B:1,K=Math.min(K,1)}else if(o.arguments){D=S?_.length+1:_.length,L=o.arguments.end===o.end;const ne=uRe(_);if(ne>=0)return ne>=_1(v)&&(ly(v)||neB)return!1;if(L||D>=K)return!0;for(let ne=D;ne=S&&_.length<=v}function pht(o,_){let v;return!!(o.target&&(v=jD(o.target,_))&&OA(v))}function mN(o){return Qj(o,0,!1)}function ght(o){return Qj(o,0,!1)||Qj(o,1,!1)}function Qj(o,_,v){if(o.flags&524288){const S=lv(o);if(v||S.properties.length===0&&S.indexInfos.length===0){if(_===0&&S.callSignatures.length===1&&S.constructSignatures.length===0)return S.callSignatures[0];if(_===1&&S.constructSignatures.length===1&&S.callSignatures.length===0)return S.constructSignatures[0]}}}function mht(o,_,v,S){const D=jj(o.typeParameters,o,0,S),L=Xj(_),B=v&&(L&&L.flags&262144?v.nonFixingMapper:v.mapper),K=B?FA(_,B):_;return dMe(K,o,(ne,ae)=>{DC(D.inferences,ne,ae)}),v||fMe(_,o,(ne,ae)=>{DC(D.inferences,ne,ae,128)}),Tj(o,xMe(D),Xn(_.declaration))}function mGt(o,_,v,S){const D=ype(_,o),L=jO(o.attributes,D,S,v);return DC(S.inferences,L,D),xMe(S)}function vht(o){if(!o)return or;const _=fo(o);return Xxe(o)?_:n8(o.parent)?kC(_):ph(o.parent)?Q_e(_):_}function fRe(o,_,v,S,D){if(eh(o))return mGt(o,_,S,D);if(o.kind!==170&&o.kind!==226){const ne=Be(_.typeParameters,Ce=>!!tN(Ce)),ae=w_(o,ne?8:0);if(ae){const Ce=Ol(_);if(Fx(Ce)){const qe=VD(o);if(!(!ne&&w_(o,8)!==ae)){const Kt=gMe(Tqt(qe,1)),Wi=Ys(ae,Kt),qi=mN(Wi),An=qi&&qi.typeParameters?iN(dOe(qi,qi.typeParameters)):Wi;DC(D.inferences,An,Ce,128)}const Dt=jj(_.typeParameters,_,D.flags),Vt=Ys(ae,qe&&qe.returnMapper);DC(Dt.inferences,Vt,Ce),D.returnMapper=Rt(Dt.inferences,zO)?gMe(Nqt(Dt)):void 0}}}const L=Zj(_),B=L?Math.min(fp(_)-1,v.length):v.length;if(L&&L.flags&262144){const ne=Me(D.inferences,ae=>ae.typeParameter===L);ne&&(ne.impliedArity=Nt(v,Dpe,B)<0?v.length-B:void 0)}const K=B2(_);if(K&&Fx(K)){const ne=Cht(o);DC(D.inferences,vht(ne),K)}for(let ne=0;ne=v-1){const Ce=o[v-1];if(Dpe(Ce)){const qe=Ce.kind===237?Ce.type:jO(Ce.expression,S,D,L);return XS(qe)?yht(qe):sh(YS(33,qe,wi,Ce.kind===230?Ce.expression:Ce),B)}}const K=[],ne=[],ae=[];for(let Ce=_;CeRo(void 0,k.Type_0_does_not_satisfy_the_constraint_1):void 0,qe=S||k.Type_0_does_not_satisfy_the_constraint_1;K||(K=cp(L,B));const Ve=B[ne];if(!Dh(Ve,Wp(Ys(ae,K),Ve),v?_[ne]:void 0,qe,Ce))return}}return B}function bht(o){if(jA(o.tagName))return 2;const _=Qh(fo(o.tagName));return O(ea(_,1))?0:O(ea(_,0))?1:2}function vGt(o,_,v,S,D,L,B){const K=ype(_,o),ne=jO(o.attributes,K,void 0,S),ae=S&4?Hj(ne):ne;return Ce()&&KOe(ae,K,v,D?o.tagName:void 0,o.attributes,void 0,L,B);function Ce(){var qe;if(QMe(o))return!0;const Ve=(Uv(o)||vI(o))&&!(jA(o.tagName)||J0(o.tagName))?fo(o.tagName):void 0;if(!Ve)return!0;const Dt=ea(Ve,0);if(!O(Dt))return!0;const Vt=xpt(o);if(!Vt)return!0;const Kt=Du(Vt,111551,!0,!1,o);if(!Kt)return!0;const Wi=Qn(Kt),qi=ea(Wi,0);if(!O(qi))return!0;let An=!1,Cr=0;for(const vn of qi){const In=fv(vn,0),Nr=ea(In,0);if(O(Nr))for(const zr of Nr){if(An=!0,ly(zr))return!0;const Ur=fp(zr);Ur>Cr&&(Cr=Ur)}}if(!An)return!0;let en=1/0;for(const vn of Dt){const In=_1(vn);In{D.push(L.expression)}),D}if(o.kind===170)return yGt(o);if(o.kind===226)return[o.left];if(eh(o))return o.attributes.properties.length>0||Uv(o)&&o.parent.children.length>0?[o.attributes]:x;const _=o.arguments||x,v=uRe(_);if(v>=0){const S=_.slice(0,v);for(let D=v;D<_.length;D++){const L=_[D],B=L.kind===230&&(nh?fo(L.expression):Vu(L.expression));B&&Qa(B)?W(OD(B),(K,ne)=>{var ae;const Ce=B.target.elementFlags[ne],qe=vY(L,Ce&4?sh(K):K,!!(Ce&12),(ae=B.target.labeledElementDeclarations)==null?void 0:ae[ne]);S.push(qe)}):S.push(L)}return S}return _}function yGt(o){const _=o.expression,v=TRe(o);if(v){const S=[];for(const D of v.parameters){const L=Qn(D);S.push(vY(_,L))}return S}return z.fail()}function Sht(o,_){return Y.experimentalDecorators?bGt(o,_):Math.min(Math.max(fp(_),1),2)}function bGt(o,_){switch(o.parent.kind){case 263:case 231:return 1;case 172:return Mv(o.parent)?3:2;case 174:case 177:case 178:return _.parameters.length<=2?2:3;case 169:return 3;default:return z.fail()}}function wht(o){const _=_n(o),{start:v,length:S}=nI(_,Ir(o.expression)?o.expression.name:o.expression);return{start:v,length:S,sourceFile:_}}function yY(o,_,...v){if(sa(o)){const{sourceFile:S,start:D,length:L}=wht(o);return"message"in _?ef(S,D,L,_,...v):qse(S,_)}else return"message"in _?Kn(o,_,...v):$y(_n(o),o,_)}function CGt(o){return Dv(o)?Ir(o.expression)?o.expression.name:o.expression:KT(o)?Ir(o.tag)?o.tag.name:o.tag:eh(o)?o.tagName:o}function SGt(o){if(!sa(o)||!lt(o.expression))return!1;const _=Ui(o.expression,o.expression.escapedText,111551,void 0,!1),v=_==null?void 0:_.valueDeclaration;if(!v||!Gs(v)||!Qw(v.parent)||!GT(v.parent.parent)||!lt(v.parent.parent.expression))return!1;const S=SOe(!1);return S?Qm(v.parent.parent.expression,!0)===S:!1}function xht(o,_,v,S){var D;const L=uRe(v);if(L>-1)return Kn(v[L],k.A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter);let B=Number.POSITIVE_INFINITY,K=Number.NEGATIVE_INFINITY,ne=Number.NEGATIVE_INFINITY,ae=Number.POSITIVE_INFINITY,Ce;for(const Kt of _){const Wi=_1(Kt),qi=fp(Kt);Wine&&(ne=Wi),v.lengthD?B=Math.min(B,ne):ae1&&(Cr=In(Ve,Zv,Vt,en)),Cr||(Cr=In(Ve,$_,Vt,en)),Cr)return Cr;if(Cr=xGt(o,Ve,Dt,!!v,S),Tr(o).resolvedSignature=Cr,Ce)if(!L&&ae&&(L=k.The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method),Wi)if(Wi.length===1||Wi.length>3){const Nr=Wi[Wi.length-1];let zr;Wi.length>3&&(zr=Ro(zr,k.The_last_overload_gave_the_following_error),zr=Ro(zr,k.No_overload_matches_this_call)),L&&(zr=Ro(zr,L));const Ur=mY(o,Dt,Nr,$_,0,!0,()=>zr,void 0);if(Ur)for(const Ia of Ur)Nr.declaration&&Wi.length>3&&fa(Ia,Kn(Nr.declaration,k.The_last_overload_is_declared_here)),vn(Nr,Ia),vl.add(Ia);else z.fail("No error for last overload signature")}else{const Nr=[];let zr=0,Ur=Number.MAX_VALUE,Ia=0,ta=0;for(const Iu of Wi){const Bn=mY(o,Dt,Iu,$_,0,!0,()=>Ro(void 0,k.Overload_0_of_1_2_gave_the_following_error,ta+1,Ve.length,Sx(Iu)),void 0);Bn?(Bn.length<=Ur&&(Ur=Bn.length,Ia=ta),zr=Math.max(zr,Bn.length),Nr.push(Bn)):z.fail("No error for 3 or fewer overload signatures"),ta++}const ll=zr>1?Nr[Ia]:zs(Nr);z.assert(ll.length>0,"No errors reported for 3 or fewer overload signatures");let No=Ro(Yt(ll,$we),k.No_overload_matches_this_call);L&&(No=Ro(No,L));const iu=[...Ln(ll,Iu=>Iu.relatedInformation)];let Uf;if(Be(ll,Iu=>Iu.start===ll[0].start&&Iu.length===ll[0].length&&Iu.file===ll[0].file)){const{file:Iu,start:pn,length:Bn}=ll[0];Uf={file:Iu,start:pn,length:Bn,code:No.code,category:No.category,messageText:No,relatedInformation:iu}}else Uf=$y(_n(o),CGt(o),No,iu);vn(Wi[0],Uf),vl.add(Uf)}else if(qi)vl.add(xht(o,[qi],Dt,L));else if(An)_Re(An,o.typeArguments,!0,L);else{const Nr=Ri(_,zr=>dRe(zr,qe));Nr.length===0?vl.add(wGt(o,_,qe,L)):vl.add(xht(o,Nr,Dt,L))}return Cr;function vn(Nr,zr){var Ur,Ia;const ta=Wi,ll=qi,No=An,iu=((Ia=(Ur=Nr.declaration)==null?void 0:Ur.symbol)==null?void 0:Ia.declarations)||x,Iu=iu.length>1?Me(iu,pn=>rc(pn)&&Tm(pn.body)):void 0;if(Iu){const pn=Mg(Iu),Bn=!pn.typeParameters;In([pn],$_,Bn)&&fa(zr,Kn(Iu,k.The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible))}Wi=ta,qi=ll,An=No}function In(Nr,zr,Ur,Ia=!1){var ta,ll;if(Wi=void 0,qi=void 0,An=void 0,Ur){const No=Nr[0];if(Rt(qe)||!Epe(o,Dt,No,Ia))return;if(mY(o,Dt,No,zr,0,!1,void 0,void 0)){Wi=[No];return}return No}for(let No=0;Nour===Bn)&&(iu=qjt(iu));let Os;if(Rt(qe)){if(Os=_Re(iu,qe,!1),!Os){An=iu;continue}}else Iu=jj(iu.typeParameters,iu,Xn(o)?2:0),Os=_b(fRe(o,iu,Dt,Kt|8,Iu),Iu.nonFixingMapper),Kt|=Iu.flags&4?8:0;if(Uf=Tj(iu,Os,Xn(iu.declaration),Iu&&Iu.inferredTypeParameters),Zj(iu)&&!Epe(o,Dt,Uf,Ia)){qi=Uf;continue}}else Uf=iu;if(mY(o,Dt,Uf,zr,Kt,!1,void 0,Iu)){(Wi||(Wi=[])).push(Uf);continue}if(Kt){if(Kt=0,Iu){const pn=_b(fRe(o,iu,Dt,Kt,Iu),Iu.mapper);if(Uf=Tj(iu,pn,Xn(iu.declaration),Iu.inferredTypeParameters),Zj(iu)&&!Epe(o,Dt,Uf,Ia)){qi=Uf;continue}}if(mY(o,Dt,Uf,zr,Kt,!1,void 0,Iu)){(Wi||(Wi=[])).push(Uf);continue}}return Nr[No]=Uf,Uf}}}function xGt(o,_,v,S,D){return z.assert(_.length>0),zA(o),S||_.length===1||_.some(L=>!!L.typeParameters)?DGt(o,_,v,D):kGt(_)}function kGt(o){const _=ns(o,ne=>ne.thisParameter);let v;_.length&&(v=kht(_,_.map(SY)));const{min:S,max:D}=Oke(o,TGt),L=[];for(let ne=0;nevh(Ce)?nejD(Ce,ne))))}const B=ns(o,ne=>vh(ne)?La(ne.parameters):void 0);let K=128;if(B.length!==0){const ne=sh(es(ns(o,Kct),2));L.push(Tht(B,ne)),K|=1}return o.some(Qle)&&(K|=2),fb(o[0].declaration,void 0,v,L,Fa(o.map(Ol)),void 0,S,K)}function TGt(o){const _=o.parameters.length;return vh(o)?_-1:_}function kht(o,_){return Tht(o,es(_,2))}function Tht(o,_){return cN(ma(o),_)}function DGt(o,_,v,S){const D=NGt(_,Et===void 0?v.length:Et),L=_[D],{typeParameters:B}=L;if(!B)return L;const K=hht(o)?o.typeArguments:void 0,ne=K?y_e(L,EGt(K,B,Xn(o))):IGt(o,B,L,v,S);return _[D]=ne,ne}function EGt(o,_,v){const S=o.map(UA);for(;S.length>_.length;)S.pop();for(;S.length<_.length;)S.push(tN(_[S.length])||C_(_[S.length])||wMe(v));return S}function IGt(o,_,v,S,D){const L=jj(_,v,Xn(o)?2:0),B=fRe(o,v,S,D|4|8,L);return y_e(v,B)}function NGt(o,_){let v=-1,S=-1;for(let D=0;D=_)return D;B>S&&(S=B,v=D)}return v}function LGt(o,_,v){if(o.expression.kind===108){const ne=_pe(o.expression);if(Al(ne)){for(const ae of o.arguments)fo(ae);return J}if(!_l(ne)){const ae=Pv(Sf(o));if(ae){const Ce=R2(ne,ae.typeArguments,ae);return VO(o,Ce,_,v,0)}}return gN(o)}let S,D=fo(o.expression);if(XE(o)){const ne=Wj(D,o.expression);S=ne===D?0:r8(o)?16:8,D=ne}else S=0;if(D=Yft(D,o.expression,KJt),D===_r)return mi;const L=Qh(D);if(_l(L))return f1(o);const B=ea(L,0),K=ea(L,1).length;if(bY(D,L,B.length,K))return!_l(D)&&o.typeArguments&&ht(o,k.Untyped_function_calls_may_not_accept_type_arguments),gN(o);if(!B.length){if(K)ht(o,k.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new,Un(D));else{let ne;if(o.arguments.length===1){const ae=_n(o).text;_h(ae.charCodeAt(qa(ae,o.expression.end,!0)-1))&&(ne=Kn(o.expression,k.Are_you_missing_a_semicolon))}gRe(o.expression,L,0,ne)}return f1(o)}return v&8&&!o.typeArguments&&B.some(PGt)?(a_t(o,v),Wt):B.some(ne=>Xn(ne.declaration)&&!!ase(ne.declaration))?(ht(o,k.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new,Un(D)),f1(o)):VO(o,B,_,v,S)}function PGt(o){return!!(o.typeParameters&&c8e(Ol(o)))}function bY(o,_,v,S){return Al(o)||Al(_)&&!!(o.flags&262144)||!v&&!S&&!(_.flags&1048576)&&!(cv(_).flags&131072)&&ba(o,md)}function AGt(o,_,v){let S=WO(o.expression);if(S===_r)return mi;if(S=Qh(S),_l(S))return f1(o);if(Al(S))return o.typeArguments&&ht(o,k.Untyped_function_calls_may_not_accept_type_arguments),gN(o);const D=ea(S,1);if(D.length){if(!OGt(o,D[0]))return f1(o);if(Dht(D,K=>!!(K.flags&4)))return ht(o,k.Cannot_create_an_instance_of_an_abstract_class),f1(o);const B=S.symbol&&Ub(S.symbol);return B&&Kr(B,64)?(ht(o,k.Cannot_create_an_instance_of_an_abstract_class),f1(o)):VO(o,D,_,v,0)}const L=ea(S,0);if(L.length){const B=VO(o,L,_,v,0);return ke||(B.declaration&&!h1(B.declaration)&&Ol(B)!==or&&ht(o,k.Only_a_void_function_can_be_called_with_the_new_keyword),B2(B)===or&&ht(o,k.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void)),B}return gRe(o.expression,S,1),f1(o)}function Dht(o,_){return Lo(o)?Rt(o,v=>Dht(v,_)):o.compositeKind===1048576?Rt(o.compositeSignatures,_):_(o)}function pRe(o,_){const v=Yr(_);if(!O(v))return!1;const S=v[0];if(S.flags&2097152){const D=S.types,L=Nct(D);let B=0;for(const K of S.types){if(!L[B]&&Rr(K)&3&&(K.symbol===o||pRe(o,K)))return!0;B++}return!1}return S.symbol===o?!0:pRe(o,S)}function OGt(o,_){if(!_||!_.declaration)return!0;const v=_.declaration,S=tP(v,6);if(!S||v.kind!==176)return!0;const D=Ub(v.parent.symbol),L=vc(v.parent.symbol);if(!r8e(o,D)){const B=Sf(o);if(B&&S&4){const K=UA(B);if(pRe(v.parent.symbol,K))return!0}return S&2&&ht(o,k.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration,Un(L)),S&4&&ht(o,k.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration,Un(L)),!1}return!0}function Eht(o,_,v){let S;const D=v===0,L=yN(_),B=L&&ea(L,v).length>0;if(_.flags&1048576){const ne=_.types;let ae=!1;for(const Ce of ne)if(ea(Ce,v).length!==0){if(ae=!0,S)break}else if(S||(S=Ro(S,D?k.Type_0_has_no_call_signatures:k.Type_0_has_no_construct_signatures,Un(Ce)),S=Ro(S,D?k.Not_all_constituents_of_type_0_are_callable:k.Not_all_constituents_of_type_0_are_constructable,Un(_))),ae)break;ae||(S=Ro(void 0,D?k.No_constituent_of_type_0_is_callable:k.No_constituent_of_type_0_is_constructable,Un(_))),S||(S=Ro(S,D?k.Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other:k.Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other,Un(_)))}else S=Ro(S,D?k.Type_0_has_no_call_signatures:k.Type_0_has_no_construct_signatures,Un(_));let K=D?k.This_expression_is_not_callable:k.This_expression_is_not_constructable;if(sa(o.parent)&&o.parent.arguments.length===0){const{resolvedSymbol:ne}=Tr(o);ne&&ne.flags&32768&&(K=k.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without)}return{messageChain:Ro(S,K),relatedMessage:B?k.Did_you_forget_to_use_await:void 0}}function gRe(o,_,v,S){const{messageChain:D,relatedMessage:L}=Eht(o,_,v),B=$y(_n(o),o,D);if(L&&fa(B,Kn(o,L)),sa(o.parent)){const{start:K,length:ne}=wht(o.parent);B.start=K,B.length=ne}vl.add(B),Iht(_,v,S?fa(B,S):B)}function Iht(o,_,v){if(!o.symbol)return;const S=Zs(o.symbol).originatingImport;if(S&&!Gp(S)){const D=ea(Qn(Zs(o.symbol).target),_);if(!D||!D.length)return;fa(v,Kn(S,k.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead))}}function MGt(o,_,v){const S=fo(o.tag),D=Qh(S);if(_l(D))return f1(o);const L=ea(D,0),B=ea(D,1).length;if(bY(S,D,L.length,B))return gN(o);if(!L.length){if(Rf(o.parent)){const K=Kn(o.tag,k.It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked);return vl.add(K),f1(o)}return gRe(o.tag,D,0),f1(o)}return VO(o,L,_,v,0)}function RGt(o){switch(o.parent.kind){case 263:case 231:return k.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression;case 169:return k.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression;case 172:return k.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression;case 174:case 177:case 178:return k.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression;default:return z.fail()}}function FGt(o,_,v){const S=fo(o.expression),D=Qh(S);if(_l(D))return f1(o);const L=ea(D,0),B=ea(D,1).length;if(bY(S,D,L.length,B))return gN(o);if(VGt(o,L)&&!g_(o.expression)){const ne=yu(o.expression,!1);return ht(o,k._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0,ne),f1(o)}const K=RGt(o);if(!L.length){const ne=Eht(o.expression,D,0),ae=Ro(ne.messageChain,K),Ce=$y(_n(o.expression),o.expression,ae);return ne.relatedMessage&&fa(Ce,Kn(o.expression,ne.relatedMessage)),vl.add(Ce),Iht(D,0,Ce),f1(o)}return VO(o,L,_,v,0,K)}function Lpe(o,_){const v=pN(o),S=v&&Yp(v),D=S&&rh(S,mg.Element,788968),L=D&&et.symbolToEntityName(D,788968,o),B=G.createFunctionTypeNode(void 0,[G.createParameterDeclaration(void 0,void 0,"props",void 0,et.typeToTypeNode(_,o))],L?G.createTypeReferenceNode(L,void 0):G.createKeywordTypeNode(133)),K=sl(1,"props");return K.links.type=_,fb(B,void 0,void 0,[K],D?vc(D):$e,void 0,1,0)}function BGt(o,_,v){if(jA(o.tagName)){const B=Jft(o),K=Lpe(o,B);return Ox(jO(o.attributes,ype(K,o),void 0,0),B,o.tagName,o.attributes),O(o.typeArguments)&&(W(o.typeArguments,Ua),vl.add(N6(_n(o),o.typeArguments,k.Expected_0_type_arguments_but_got_1,0,O(o.typeArguments)))),K}const S=fo(o.tagName),D=Qh(S);if(_l(D))return f1(o);const L=qft(S,o);return bY(S,D,L.length,0)?gN(o):L.length===0?(ht(o.tagName,k.JSX_element_type_0_does_not_have_any_construct_or_call_signatures,yu(o.tagName)),f1(o)):VO(o,L,_,v,0)}function WGt(o,_,v){const S=fo(o.right);if(!Al(S)){const D=LRe(S);if(D){const L=Qh(D);if(_l(L))return f1(o);const B=ea(L,0),K=ea(L,1);if(bY(D,L,B.length,K.length))return gN(o);if(B.length)return VO(o,B,_,v,0)}else if(!(nge(S)||Ax(S,md)))return ht(o.right,k.The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method),f1(o)}return J}function VGt(o,_){return _.length&&Be(_,v=>v.minArgumentCount===0&&!vh(v)&&v.parameters.length1?Vu(o.arguments[1]):void 0;for(let L=2;L{const B=up(D);W_e(L,B)||cdt(D,L,v,k.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first)})}function KGt(o){const _=fo(o.expression),v=Wj(_,o.expression);return X_e(kC(v),o,v!==_)}function QGt(o){return o.flags&64?KGt(o):kC(fo(o.expression))}function Rht(o){if(Dpt(o),W(o.typeArguments,Ua),o.kind===233){const v=Vb(o.parent);v.kind===226&&v.operatorToken.kind===104&&OT(o,v.right)&&ht(o,k.The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression)}const _=o.kind===233?fo(o.expression):Uw(o.exprName)?aY(o.exprName):fo(o.exprName);return Fht(_,o)}function Fht(o,_){const v=_.typeArguments;if(o===_r||_l(o)||!Rt(v))return o;let S=!1,D;const L=K(o),B=S?D:o;return B&&vl.add(N6(_n(_),v,k.Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable,Un(B))),L;function K(ae){let Ce=!1,qe=!1;const Ve=Dt(ae);return S||(S=qe),Ce&&!qe&&(D??(D=ae)),Ve;function Dt(Vt){if(Vt.flags&524288){const Kt=lv(Vt),Wi=ne(Kt.callSignatures),qi=ne(Kt.constructSignatures);if(Ce||(Ce=Kt.callSignatures.length!==0||Kt.constructSignatures.length!==0),qe||(qe=Wi.length!==0||qi.length!==0),Wi!==Kt.callSignatures||qi!==Kt.constructSignatures){const An=bi(sl(0,"__instantiationExpression"),Kt.members,Wi,qi,Kt.indexInfos);return An.objectFlags|=8388608,An.node=_,An}}else if(Vt.flags&58982400){const Kt=Hf(Vt);if(Kt){const Wi=Dt(Kt);if(Wi!==Kt)return Wi}}else{if(Vt.flags&1048576)return Zc(Vt,K);if(Vt.flags&2097152)return Fa(Is(Vt.types,Dt))}return Vt}}function ne(ae){const Ce=Ri(ae,qe=>!!qe.typeParameters&&dRe(qe,v));return Is(Ce,qe=>{const Ve=_Re(qe,v,!0);return Ve?Tj(qe,Ve,Xn(qe.declaration)):qe})}}function XGt(o){return Ua(o.type),bRe(o.expression,o.type)}function bRe(o,_,v){const S=fo(o,v),D=As(_);if(_l(D))return D;const L=Xi(_.parent,B=>B.kind===238||B.kind===350);return Ox(S,D,L,o,k.Type_0_does_not_satisfy_the_expected_type_1),S}function ZGt(o){return XYt(o),o.keywordToken===105?CRe(o):o.keywordToken===102?YGt(o):z.assertNever(o.keywordToken)}function Bht(o){switch(o.keywordToken){case 102:return uut();case 105:const _=CRe(o);return _l(_)?$e:gKt(_);default:z.assertNever(o.keywordToken)}}function CRe(o){const _=dxe(o);if(_)if(_.kind===176){const v=wr(_.parent);return Qn(v)}else{const v=wr(_);return Qn(v)}else return ht(o,k.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor,"new.target"),$e}function YGt(o){te===100||te===199?_n(o).impliedNodeFormat!==99&&ht(o,k.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output):te<6&&te!==4&&ht(o,k.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext);const _=_n(o);return z.assert(!!(_.flags&8388608),"Containing file is missing import meta node flag."),o.name.escapedText==="meta"?cut():$e}function SY(o){const _=o.valueDeclaration;return va(Qn(o),!1,!!_&&(iS(_)||t3(_)))}function SRe(o,_,v="arg"){return o?(z.assert(lt(o.name)),o.name.escapedText):`${v}_${_}`}function e5(o,_,v){const S=o.parameters.length-(vh(o)?1:0);if(_=S-1)return _===S-1?L:sh(lp(L,Ae));const B=[],K=[],ne=[];for(let ae=_;ae!(ne&1)),K=B<0?L.target.fixedLength:B;K>0&&(D=o.parameters.length-1+K)}}if(D===void 0){if(!v&&o.flags&32)return 0;D=o.minArgumentCount}if(S)return D;for(let L=D-1;L>=0;L--){const B=fv(o,L);if(ud(B,_ht).flags&131072)break;D=L}o.resolvedMinArgumentCount=D}return o.resolvedMinArgumentCount}function ly(o){if(vh(o)){const _=Qn(o.parameters[o.parameters.length-1]);return!Qa(_)||_.target.hasRestElement}return!1}function Xj(o){if(vh(o)){const _=Qn(o.parameters[o.parameters.length-1]);if(!Qa(_))return Al(_)?Xl:_;if(_.target.hasRestElement)return $F(_,_.target.fixedLength)}}function Zj(o){const _=Xj(o);return _&&!_m(_)&&!Al(_)?_:void 0}function wRe(o){return xRe(o,rn)}function xRe(o,_){return o.parameters.length>0?fv(o,0):_}function jht(o,_,v){const S=o.parameters.length-(vh(o)?1:0);for(let D=0;D=0);const L=fu(S.parent)?Qn(wr(S.parent.parent)):hpt(S.parent),B=fu(S.parent)?wi:_pt(S.parent),K=D0(D),ne=y0("target",L),ae=y0("propertyKey",B),Ce=y0("parameterIndex",K);v.decoratorSignature=sz(void 0,void 0,[ne,ae,Ce],or);break}case 174:case 177:case 178:case 172:{const S=_;if(!ss(S.parent))break;const D=hpt(S),L=y0("target",D),B=_pt(S),K=y0("propertyKey",B),ne=To(S)?or:mut(UA(S));if(!To(_)||Mv(_)){const Ce=mut(UA(S)),qe=y0("descriptor",Ce);v.decoratorSignature=sz(void 0,void 0,[L,K,qe],es([ne,or]))}else v.decoratorSignature=sz(void 0,void 0,[L,K],es([ne,or]));break}}return v.decoratorSignature===J?void 0:v.decoratorSignature}function TRe(o){return Se?pKt(o):_Kt(o)}function kY(o){const _=PZ(!0);return _!==za?(o=ZS(s5(o))||Gt,$S(_,[o])):Gt}function qht(o){const _=_ut(!0);return _!==za?(o=ZS(s5(o))||Gt,$S(_,[o])):Gt}function TY(o,_){const v=kY(_);return v===Gt?(ht(o,Gp(o)?k.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:k.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option),$e):(SOe(!0)||ht(o,Gp(o)?k.A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:k.An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option),v)}function gKt(o){const _=sl(0,"NewTargetExpression"),v=sl(4,"target",8);v.parent=_,v.links.type=o;const S=ga([v]);return _.members=S,bi(_,S,x,x,x)}function Ope(o,_){if(!o.body)return $e;const v=ad(o),S=(v&2)!==0,D=(v&1)!==0;let L,B,K,ne=or;if(o.body.kind!==241)L=Vu(o.body,_&&_&-9),S&&(L=s5(rz(L,!1,o,k.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)));else if(D){const ae=Kht(o,_);ae?ae.length>0&&(L=es(ae,2)):ne=rn;const{yieldTypes:Ce,nextTypes:qe}=mKt(o,_);B=Rt(Ce)?es(Ce,2):void 0,K=Rt(qe)?Fa(qe):void 0}else{const ae=Kht(o,_);if(!ae)return v&2?TY(o,rn):rn;if(ae.length===0){const Ce=ppe(o,void 0),qe=Ce&&(RY(Ce,v)||or).flags&32768?wi:or;return v&2?TY(o,qe):qe}L=es(ae,2)}if(L||B||K){if(B&&tpe(o,B,3),L&&tpe(o,L,1),K&&tpe(o,K,2),L&&uv(L)||B&&uv(B)||K&&uv(K)){const ae=JMe(o),Ce=ae?ae===Mg(o)?D?void 0:L:mpe(Ol(ae),o,void 0):void 0;D?(B=cMe(B,Ce,0,S),L=cMe(L,Ce,1,S),K=cMe(K,Ce,2,S)):L=_qt(L,Ce,S)}B&&(B=up(B)),L&&(L=up(L)),K&&(K=up(K))}return D?Mpe(B||rn,L||ne,K||Lft(2,o)||Gt,S):S?kY(L||ne):L||ne}function Mpe(o,_,v,S){const D=S?ql:Xc,L=D.getGlobalGeneratorType(!1);if(o=D.resolveIterationType(o,void 0)||Gt,_=D.resolveIterationType(_,void 0)||Gt,v=D.resolveIterationType(v,void 0)||Gt,L===za){const B=D.getGlobalIterableIteratorType(!1),K=B!==za?M_t(B,D):void 0,ne=K?K.returnType:Je,ae=K?K.nextType:wi;return ba(_,ne)&&ba(ae,v)?B!==za?Ej(B,[o]):(D.getGlobalIterableIteratorType(!0),Ps):(D.getGlobalGeneratorType(!0),Ps)}return Ej(L,[o,_,v])}function mKt(o,_){const v=[],S=[],D=(ad(o)&2)!==0;return Ywe(o.body,L=>{const B=L.expression?fo(L.expression,_):ce;Cc(v,$ht(L,B,Je,D));let K;if(L.asteriskToken){const ne=Kpe(B,D?19:17,L.expression);K=ne&&ne.nextType}else K=w_(L,void 0);K&&Cc(S,K)}),{yieldTypes:v,nextTypes:S}}function $ht(o,_,v,S){const D=o.expression||o,L=o.asteriskToken?YS(S?19:17,_,v,D):_;return S?yN(L,D,o.asteriskToken?k.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:k.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member):L}function Jht(o,_,v){let S=0;for(let D=0;D=_?v[D]:void 0;S|=L!==void 0?jDe.get(L)||32768:0}return S}function Ght(o){const _=Tr(o);if(_.isExhaustive===void 0){_.isExhaustive=0;const v=vKt(o);_.isExhaustive===0&&(_.isExhaustive=v)}else _.isExhaustive===0&&(_.isExhaustive=!1);return _.isExhaustive}function vKt(o){if(o.expression.kind===221){const S=ift(o);if(!S)return!1;const D=ry(Vu(o.expression.expression)),L=Jht(0,0,S);return D.flags&3?(556800&L)===556800:!Km(D,B=>MO(B,L)===L)}const _=Vu(o.expression);if(!Bj(_))return!1;const v=ope(o);return!v.length||Rt(v,dqt)?!1:u$t(Zc(_,Zh),v)}function DRe(o){return o.endFlowNode&&nY(o.endFlowNode)}function Kht(o,_){const v=ad(o),S=[];let D=DRe(o),L=!1;if(sS(o.body,B=>{let K=B.expression;if(K){if(K=Il(K,!0),v&2&&K.kind===223&&(K=Il(K.expression,!0)),K.kind===213&&K.expression.kind===80&&Vu(K.expression).symbol===al(o.symbol)&&(!Qw(o.symbol.valueDeclaration)||AMe(K.expression))){L=!0;return}let ne=Vu(K,_&&_&-9);v&2&&(ne=s5(rz(ne,!1,o,k.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member))),ne.flags&131072&&(L=!0),Cc(S,ne)}else D=!0}),!(S.length===0&&!D&&(L||yKt(o))))return be&&S.length&&D&&!(h1(o)&&S.some(B=>B.symbol===o.symbol))&&Cc(S,wi),S}function yKt(o){switch(o.kind){case 218:case 219:return!0;case 174:return o.parent.kind===210;default:return!1}}function bKt(o){switch(o.kind){case 176:case 177:case 178:return}if(ad(o)!==0)return;let v;if(o.body&&o.body.kind!==241)v=o.body;else if(sS(o.body,D=>{if(v||!D.expression)return!0;v=D.expression})||!v||DRe(o))return;return CKt(o,v)}function CKt(o,_){if(_=Il(_,!0),!!(Vu(_).flags&16))return W(o.parameters,(S,D)=>{const L=Qn(S.symbol);if(!L||L.flags&16||!lt(S.name)||sY(S.symbol)||O1(S))return;const B=SKt(o,_,S,L);if(B)return kj(1,Ws(S.name.escapedText),D,B)})}function SKt(o,_,v,S){const D=_.flowNode||_.parent.kind===253&&_.parent.flowNode||j1(2,void 0,void 0),L=j1(32,_,D),B=EC(v.name,S,S,o,L);if(B===S)return;const K=j1(64,_,D);return EC(v.name,S,B,o,K).flags&131072?B:void 0}function ERe(o,_){a(v);return;function v(){const S=ad(o),D=_&&RY(_,S);if(D&&(Fu(D,16384)||D.flags&32769)||o.kind===173||vu(o.body)||o.body.kind!==241||!DRe(o))return;const L=o.flags&1024,B=Dp(o)||o;if(D&&D.flags&131072)ht(B,k.A_function_returning_never_cannot_have_a_reachable_end_point);else if(D&&!L)ht(B,k.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value);else if(D&&be&&!ba(wi,D))ht(B,k.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);else if(Y.noImplicitReturns){if(!D){if(!L)return;const K=Ol(Mg(o));if(j_t(o,K))return}ht(B,k.Not_all_code_paths_return_a_value)}}}function Qht(o,_){if(z.assert(o.kind!==174||f0(o)),zA(o),gc(o)&&o5(o,o.name),_&&_&4&&fm(o)){if(!Dp(o)&&!bG(o)){const S=Gj(o);if(S&&Fx(Ol(S))){const D=Tr(o);if(D.contextFreeType)return D.contextFreeType;const L=Ope(o,_),B=fb(void 0,void 0,void 0,x,L,void 0,0,64),K=bi(o.symbol,Q,[B],x,x);return K.objectFlags|=262144,D.contextFreeType=K}}return Mc}return!lge(o)&&o.kind===218&&f8e(o),wKt(o,_),Qn(wr(o))}function wKt(o,_){const v=Tr(o);if(!(v.flags&64)){const S=Gj(o);if(!(v.flags&64)){v.flags|=64;const D=lu(ea(Qn(wr(o)),0));if(!D)return;if(fm(o))if(S){const L=VD(o);let B;if(_&&_&2){jht(D,S,L);const K=Xj(S);K&&K.flags&262144&&(B=FA(S,L.nonFixingMapper))}B||(B=L?FA(S,L.mapper):S),iKt(D,B)}else nKt(D);else if(S&&!o.typeParameters&&S.parameters.length>o.parameters.length){const L=VD(o);_&&_&2&&jht(D,S,L)}if(S&&!EO(o)&&!D.resolvedReturnType){const L=Ope(o,_);D.resolvedReturnType||(D.resolvedReturnType=L)}tz(o)}}}function xKt(o){z.assert(o.kind!==174||f0(o));const _=ad(o),v=EO(o);if(ERe(o,v),o.body)if(Dp(o)||Ol(Mg(o)),o.body.kind===241)Ua(o.body);else{const S=fo(o.body),D=v&&RY(v,_);if(D){const L=Ipe(o.body);if((_&3)===2){const B=rz(S,!1,L,k.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);Ox(B,D,L,L)}else Ox(S,D,L,L)}}}function Rpe(o,_,v,S=!1){if(!ba(_,Tn)){const D=S&&r5(_);return m2(o,!!D&&ba(D,Tn),v),!1}return!0}function kKt(o){if(!sa(o)||!oI(o))return!1;const _=Vu(o.arguments[2]);if(Eu(_,"value")){const D=ya(_,"writable"),L=D&&Qn(D);if(!L||L===Qt||L===ni)return!0;if(D&&D.valueDeclaration&&pd(D.valueDeclaration)){const B=D.valueDeclaration.initializer,K=fo(B);if(K===Qt||K===ni)return!0}return!1}return!ya(_,"set")}function hv(o){return!!(Pu(o)&8||o.flags&4&&Qg(o)&8||o.flags&3&&ZMe(o)&6||o.flags&98304&&!(o.flags&65536)||o.flags&8||Rt(o.declarations,kKt))}function Xht(o,_,v){var S,D;if(v===0)return!1;if(hv(_)){if(_.flags&4&&Sc(o)&&o.expression.kind===110){const L=Kp(o);if(!(L&&(L.kind===176||h1(L))))return!0;if(_.valueDeclaration){const B=cr(_.valueDeclaration),K=L.parent===_.valueDeclaration.parent,ne=L===_.valueDeclaration.parent,ae=B&&((S=_.parent)==null?void 0:S.valueDeclaration)===L.parent,Ce=B&&((D=_.parent)==null?void 0:D.valueDeclaration)===L;return!(K||ne||ae||Ce)}}return!0}if(Sc(o)){const L=Il(o.expression);if(L.kind===80){const B=Tr(L).resolvedSymbol;if(B.flags&2097152){const K=Rp(B);return!!K&&K.kind===274}}}return!1}function Yj(o,_,v){const S=ld(o,7);return S.kind!==80&&!Sc(S)?(ht(o,_),!1):S.flags&64?(ht(o,v),!1):!0}function TKt(o){fo(o.expression);const _=Il(o.expression);if(!Sc(_))return ht(_,k.The_operand_of_a_delete_operator_must_be_a_property_reference),fn;Ir(_)&&Vs(_.name)&&ht(_,k.The_operand_of_a_delete_operator_cannot_be_a_private_identifier);const v=Tr(_),S=eg(v.resolvedSymbol);return S&&(hv(S)?ht(_,k.The_operand_of_a_delete_operator_cannot_be_a_read_only_property):DKt(_,S)),fn}function DKt(o,_){const v=Qn(_);be&&!(v.flags&131075)&&!(fe?_.flags&16777216:dv(v,16777216))&&ht(o,k.The_operand_of_a_delete_operator_must_be_optional)}function EKt(o){return fo(o.expression),BI}function IKt(o){return zA(o),ce}function Zht(o){let _=!1;const v=fJ(o);if(v&&bu(v)){const S=ex(o)?k.await_expression_cannot_be_used_inside_a_class_static_block:k.await_using_statements_cannot_be_used_inside_a_class_static_block;ht(o,S),_=!0}else if(!(o.flags&65536))if(_J(o)){const S=_n(o);if(!Wx(S)){let D;if(!jL(S,Y)){D??(D=R1(S,o.pos));const L=ex(o)?k.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:k.await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module,B=ef(S,D.start,D.length,L);vl.add(B),_=!0}switch(te){case 100:case 199:if(S.impliedNodeFormat===1){D??(D=R1(S,o.pos)),vl.add(ef(S,D.start,D.length,k.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level)),_=!0;break}case 7:case 99:case 200:case 4:if(ue>=4)break;default:D??(D=R1(S,o.pos));const L=ex(o)?k.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:k.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher;vl.add(ef(S,D.start,D.length,L)),_=!0;break}}}else{const S=_n(o);if(!Wx(S)){const D=R1(S,o.pos),L=ex(o)?k.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:k.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules,B=ef(S,D.start,D.length,L);if(v&&v.kind!==176&&!(ad(v)&2)){const K=Kn(v,k.Did_you_mean_to_mark_this_function_as_async);fa(B,K)}vl.add(B),_=!0}}return ex(o)&&jMe(o)&&(ht(o,k.await_expressions_cannot_be_used_in_a_parameter_initializer),_=!0),_}function NKt(o){a(()=>Zht(o));const _=fo(o.expression),v=rz(_,!0,o,k.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);return v===_&&!_l(v)&&!(_.flags&3)&&v0(!1,Kn(o,k.await_has_no_effect_on_the_type_of_this_expression)),v}function LKt(o){const _=fo(o.operand);if(_===_r)return _r;switch(o.operand.kind){case 9:switch(o.operator){case 41:return RA(D0(-o.operand.text));case 40:return RA(D0(+o.operand.text))}break;case 10:if(o.operator===41)return RA(P_e({negative:!0,base10Value:e7(o.operand.text)}))}switch(o.operator){case 40:case 41:case 55:return d1(_,o.operand),DY(_,12288)&&ht(o.operand,k.The_0_operator_cannot_be_applied_to_type_symbol,Ta(o.operator)),o.operator===40?(DY(_,2112)&&ht(o.operand,k.Operator_0_cannot_be_applied_to_type_1,Ta(o.operator),Un(xC(_))),Ae):IRe(_);case 54:URe(_,o.operand);const v=MO(_,12582912);return v===4194304?Qt:v===8388608?fi:fn;case 46:case 47:return Rpe(o.operand,d1(_,o.operand),k.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type)&&Yj(o.operand,k.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access,k.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access),IRe(_)}return $e}function PKt(o){const _=fo(o.operand);return _===_r?_r:(Rpe(o.operand,d1(_,o.operand),k.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type)&&Yj(o.operand,k.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access,k.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access),IRe(_))}function IRe(o){return Fu(o,2112)?jf(o,3)||Fu(o,296)?Tn:Ke:Ae}function DY(o,_){if(Fu(o,_))return!0;const v=ry(o);return!!v&&Fu(v,_)}function Fu(o,_){if(o.flags&_)return!0;if(o.flags&3145728){const v=o.types;for(const S of v)if(Fu(S,_))return!0}return!1}function jf(o,_,v){return o.flags&_?!0:v&&o.flags&114691?!1:!!(_&296)&&ba(o,Ae)||!!(_&2112)&&ba(o,Ke)||!!(_&402653316)&&ba(o,tt)||!!(_&528)&&ba(o,fn)||!!(_&16384)&&ba(o,or)||!!(_&131072)&&ba(o,rn)||!!(_&65536)&&ba(o,je)||!!(_&32768)&&ba(o,wi)||!!(_&4096)&&ba(o,kn)||!!(_&67108864)&&ba(o,Ar)}function ez(o,_,v){return o.flags&1048576?Be(o.types,S=>ez(S,_,v)):jf(o,_,v)}function Fpe(o){return!!(Rr(o)&16)&&!!o.symbol&&NRe(o.symbol)}function NRe(o){return(o.flags&128)!==0}function LRe(o){const _=F_t("hasInstance");if(ez(o,67108864)){const v=ya(o,_);if(v){const S=Qn(v);if(S&&ea(S,0).length!==0)return S}}}function AKt(o,_,v,S,D){if(v===_r||S===_r)return _r;!Al(v)&&ez(v,402784252)&&ht(o,k.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter),z.assert(jJ(o.parent));const L=HO(o.parent,void 0,D);if(L===Wt)return _r;const B=Ol(L);return Dh(B,fn,_,k.An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression),fn}function OKt(o){return Km(o,_=>_===Tu||!!(_.flags&2097152)&&ay(ry(_)))}function MKt(o,_,v,S){if(v===_r||S===_r)return _r;if(Vs(o)){if((ue<9||ue<99||!oe)&&$d(o,2097152),!Tr(o).resolvedSymbol&&Sf(o)){const D=rRe(o,S.symbol,!0);rht(o,S,D)}}else Dh(d1(v,o),$i,o);return Dh(d1(S,_),Ar,_)&&OKt(S)&&ht(_,k.Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator,Un(S)),fn}function RKt(o,_,v){const S=o.properties;if(be&&S.length===0)return d1(_,o);for(let D=0;D$F(ae,v)):sh(S);return vN(K,ne,D)}}}}function vN(o,_,v,S){let D;if(o.kind===304){const L=o;L.objectAssignmentInitializer&&(be&&!dv(fo(L.objectAssignmentInitializer),16777216)&&(_=Gm(_,524288)),HKt(L.name,L.equalsToken,L.objectAssignmentInitializer,v)),D=o.name}else D=o;return D.kind===226&&D.operatorToken.kind===64&&(Ie(D,v),D=D.left,be&&(_=Gm(_,524288))),D.kind===210?RKt(D,_,S):D.kind===209?FKt(D,_,v):BKt(D,_,v)}function BKt(o,_,v){const S=fo(o,v),D=o.parent.kind===305?k.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access:k.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access,L=o.parent.kind===305?k.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access:k.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access;return Yj(o,D,L)&&Ox(_,S,o,o),S6(o)&&$d(o.parent,1048576),_}function EY(o){switch(o=Il(o),o.kind){case 80:case 11:case 14:case 215:case 228:case 15:case 9:case 10:case 112:case 97:case 106:case 157:case 218:case 231:case 219:case 209:case 210:case 221:case 235:case 285:case 284:return!0;case 227:return EY(o.whenTrue)&&EY(o.whenFalse);case 226:return jb(o.operatorToken.kind)?!1:EY(o.left)&&EY(o.right);case 224:case 225:switch(o.operator){case 54:case 40:case 41:case 55:return!0}return!1;case 222:case 216:case 234:default:return!1}}function PRe(o,_){return(_.flags&98304)!==0||W_e(o,_)}function WKt(){const o=rK(_,v,S,D,L,B);return(Ve,Dt)=>{const Vt=o(Ve,Dt);return z.assertIsDefined(Vt),Vt};function _(Ve,Dt,Vt){return Dt?(Dt.stackIndex++,Dt.skip=!1,ae(Dt,void 0),qe(Dt,void 0)):Dt={checkMode:Vt,skip:!1,stackIndex:0,typeStack:[void 0,void 0]},Xn(Ve)&&JL(Ve)?(Dt.skip=!0,qe(Dt,fo(Ve.right,Vt)),Dt):(VKt(Ve),Ve.operatorToken.kind===64&&(Ve.left.kind===210||Ve.left.kind===209)&&(Dt.skip=!0,qe(Dt,vN(Ve.left,fo(Ve.right,Vt),Vt,Ve.right.kind===110))),Dt)}function v(Ve,Dt,Vt){if(!Dt.skip)return K(Dt,Ve)}function S(Ve,Dt,Vt){if(!Dt.skip){const Kt=Ce(Dt);z.assertIsDefined(Kt),ae(Dt,Kt),qe(Dt,void 0);const Wi=Ve.kind;if(BW(Wi)){let qi=Vt.parent;for(;qi.kind===217||WW(qi);)qi=qi.parent;(Wi===56||jk(qi))&&zRe(Vt.left,Kt,jk(qi)?qi.thenStatement:void 0),URe(Kt,Vt.left)}}}function D(Ve,Dt,Vt){if(!Dt.skip)return K(Dt,Ve)}function L(Ve,Dt){let Vt;if(Dt.skip)Vt=Ce(Dt);else{const Kt=ne(Dt);z.assertIsDefined(Kt);const Wi=Ce(Dt);z.assertIsDefined(Wi),Vt=t_t(Ve.left,Ve.operatorToken,Ve.right,Kt,Wi,Dt.checkMode,Ve)}return Dt.skip=!1,ae(Dt,void 0),qe(Dt,void 0),Dt.stackIndex--,Vt}function B(Ve,Dt,Vt){return qe(Ve,Dt),Ve}function K(Ve,Dt){if(cr(Dt))return Dt;qe(Ve,fo(Dt,Ve.checkMode))}function ne(Ve){return Ve.typeStack[Ve.stackIndex]}function ae(Ve,Dt){Ve.typeStack[Ve.stackIndex]=Dt}function Ce(Ve){return Ve.typeStack[Ve.stackIndex+1]}function qe(Ve,Dt){Ve.typeStack[Ve.stackIndex+1]=Dt}}function VKt(o){const{left:_,operatorToken:v,right:S}=o;v.kind===61&&(cr(_)&&(_.operatorToken.kind===57||_.operatorToken.kind===56)&&on(_,k._0_and_1_operations_cannot_be_mixed_without_parentheses,Ta(_.operatorToken.kind),Ta(v.kind)),cr(S)&&(S.operatorToken.kind===57||S.operatorToken.kind===56)&&on(S,k._0_and_1_operations_cannot_be_mixed_without_parentheses,Ta(S.operatorToken.kind),Ta(v.kind)))}function HKt(o,_,v,S,D){const L=_.kind;if(L===64&&(o.kind===210||o.kind===209))return vN(o,fo(v,S),S,v.kind===110);let B;BW(L)?B=a5(o,S):B=fo(o,S);const K=fo(v,S);return t_t(o,_,v,B,K,S,D)}function t_t(o,_,v,S,D,L,B){const K=_.kind;switch(K){case 42:case 43:case 67:case 68:case 44:case 69:case 45:case 70:case 41:case 66:case 48:case 71:case 49:case 72:case 50:case 73:case 52:case 75:case 53:case 79:case 51:case 74:if(S===_r||D===_r)return _r;S=d1(S,o),D=d1(D,v);let en;if(S.flags&528&&D.flags&528&&(en=Ve(_.kind))!==void 0)return ht(B||_,k.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead,Ta(_.kind),Ta(en)),Ae;{const Nr=Rpe(o,S,k.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type,!0),zr=Rpe(v,D,k.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type,!0);let Ur;if(jf(S,3)&&jf(D,3)||!(Fu(S,2112)||Fu(D,2112)))Ur=Ae;else if(ne(S,D)){switch(K){case 50:case 73:Wi();break;case 43:case 68:ue<3&&ht(B,k.Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later)}Ur=Ke}else Wi(ne),Ur=$e;return Nr&&zr&&Dt(Ur),Ur}case 40:case 65:if(S===_r||D===_r)return _r;!jf(S,402653316)&&!jf(D,402653316)&&(S=d1(S,o),D=d1(D,v));let vn;return jf(S,296,!0)&&jf(D,296,!0)?vn=Ae:jf(S,2112,!0)&&jf(D,2112,!0)?vn=Ke:jf(S,402653316,!0)||jf(D,402653316,!0)?vn=tt:(Al(S)||Al(D))&&(vn=_l(S)||_l(D)?$e:Je),vn&&!qe(K)?vn:vn?(K===65&&Dt(vn),vn):(Wi((zr,Ur)=>jf(zr,402655727)&&jf(Ur,402655727)),Je);case 30:case 32:case 33:case 34:return qe(K)&&(S=aMe(d1(S,o)),D=aMe(d1(D,v)),Kt((Nr,zr)=>{if(Al(Nr)||Al(zr))return!0;const Ur=ba(Nr,Tn),Ia=ba(zr,Tn);return Ur&&Ia||!Ur&&!Ia&&HZ(Nr,zr)})),fn;case 35:case 36:case 37:case 38:if(!(L&&L&64)){if((pse(o)||pse(v))&&(!Xn(o)||K===37||K===38)){const Nr=K===35||K===37;ht(B,k.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value,Nr?"false":"true")}An(B,K,o,v),Kt((Nr,zr)=>PRe(Nr,zr)||PRe(zr,Nr))}return fn;case 104:return AKt(o,v,S,D,L);case 103:return MKt(o,v,S,D);case 56:case 77:{const Nr=dv(S,4194304)?es([mqt(be?S:xC(D)),D]):S;return K===77&&Dt(D),Nr}case 57:case 76:{const Nr=dv(S,8388608)?es([kC(Edt(S)),D],2):S;return K===76&&Dt(D),Nr}case 61:case 78:{const Nr=dv(S,262144)?es([kC(S),D],2):S;return K===78&&Dt(D),Nr}case 64:const In=cr(o.parent)?Lu(o.parent):0;return ae(In,D),Vt(In)?((!(D.flags&524288)||In!==2&&In!==6&&!wC(D)&&!EMe(D)&&!(Rr(D)&1))&&Dt(D),S):(Dt(D),D);case 28:if(!Y.allowUnreachableCode&&EY(o)&&!Ce(o.parent)){const Nr=_n(o),zr=Nr.text,Ur=qa(zr,o.pos);Nr.parseDiagnostics.some(ta=>ta.code!==k.JSX_expressions_must_have_one_parent_element.code?!1:nse(ta,Ur))||ht(o,k.Left_side_of_comma_operator_is_unused_and_has_no_side_effects)}return D;default:return z.fail()}function ne(en,vn){return jf(en,2112)&&jf(vn,2112)}function ae(en,vn){if(en===2)for(const In of Ex(vn)){const Nr=Qn(In);if(Nr.symbol&&Nr.symbol.flags&32){const zr=In.escapedName,Ur=Ui(In.valueDeclaration,zr,788968,void 0,!1);Ur!=null&&Ur.declarations&&Ur.declarations.some(CI)&&(lC(Ur,k.Duplicate_identifier_0,Ws(zr),In),lC(In,k.Duplicate_identifier_0,Ws(zr),Ur))}}}function Ce(en){return en.parent.kind===217&&W_(en.left)&&en.left.text==="0"&&(sa(en.parent.parent)&&en.parent.parent.expression===en.parent||en.parent.parent.kind===215)&&(Sc(en.right)||lt(en.right)&&en.right.escapedText==="eval")}function qe(en){const vn=DY(S,12288)?o:DY(D,12288)?v:void 0;return vn?(ht(vn,k.The_0_operator_cannot_be_applied_to_type_symbol,Ta(en)),!1):!0}function Ve(en){switch(en){case 52:case 75:return 57;case 53:case 79:return 38;case 51:case 74:return 56;default:return}}function Dt(en){jb(K)&&a(vn);function vn(){let In=S;if(V7(_.kind)&&o.kind===211&&(In=xpe(o,void 0,!0)),Yj(o,k.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access,k.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access)){let Nr;if(fe&&Ir(o)&&Fu(en,32768)){const zr=Eu(zf(o.expression),o.name.escapedText);H_e(en,zr)&&(Nr=k.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target)}Ox(en,In,o,v,Nr)}}}function Vt(en){var vn;switch(en){case 2:return!0;case 1:case 5:case 6:case 3:case 4:const In=Lg(o),Nr=JL(v);return!!Nr&&Pa(Nr)&&!!((vn=In==null?void 0:In.exports)!=null&&vn.size);default:return!1}}function Kt(en){return en(S,D)?!1:(Wi(en),!0)}function Wi(en){let vn=!1;const In=B||_;if(en){const ta=ZS(S),ll=ZS(D);vn=!(ta===S&&ll===D)&&!!(ta&&ll)&&en(ta,ll)}let Nr=S,zr=D;!vn&&en&&([Nr,zr]=jKt(S,D,en));const[Ur,Ia]=OF(Nr,zr);qi(In,vn,Ur,Ia)||m2(In,vn,k.Operator_0_cannot_be_applied_to_types_1_and_2,Ta(_.kind),Ur,Ia)}function qi(en,vn,In,Nr){switch(_.kind){case 37:case 35:case 38:case 36:return m2(en,vn,k.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap,In,Nr);default:return}}function An(en,vn,In,Nr){const zr=Cr(Il(In)),Ur=Cr(Il(Nr));if(zr||Ur){const Ia=ht(en,k.This_condition_will_always_return_0,Ta(vn===37||vn===35?97:112));if(zr&&Ur)return;const ta=vn===38||vn===36?Ta(54):"",ll=zr?Nr:In,No=Il(ll);fa(Ia,Kn(ll,k.Did_you_mean_0,`${ta}Number.isNaN(${pc(No)?kp(No):"..."})`))}}function Cr(en){if(lt(en)&&en.escapedText==="NaN"){const vn=wzt();return!!vn&&vn===S_(en)}return!1}}function jKt(o,_,v){let S=o,D=_;const L=xC(o),B=xC(_);return v(L,B)||(S=L,D=B),[S,D]}function zKt(o){a(Ve);const _=Kp(o);if(!_)return Je;const v=ad(_);if(!(v&1))return Je;const S=(v&2)!==0;o.asteriskToken&&(S&&ue<5&&$d(o,26624),!S&&ue<2&&Y.downlevelIteration&&$d(o,256));let D=EO(_);D&&D.flags&1048576&&(D=ud(D,Dt=>MRe(Dt,v,void 0)));const L=D&&ZRe(D,S),B=L&&L.yieldType||Je,K=L&&L.nextType||Je,ne=S?yN(K)||Je:K,ae=o.expression?fo(o.expression):ce,Ce=$ht(o,ae,ne,S);if(D&&Ce&&Ox(Ce,B,o.expression||o,o.expression),o.asteriskToken)return $Re(S?19:17,1,ae,o.expression)||Je;if(D)return zD(2,D,S)||Je;let qe=Lft(2,_);return qe||(qe=Je,a(()=>{if(ke&&!Wke(o)){const Dt=w_(o,void 0);(!Dt||Al(Dt))&&ht(o,k.yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation)}})),qe;function Ve(){o.flags&16384||Df(o,k.A_yield_expression_is_only_allowed_in_a_generator_body),jMe(o)&&ht(o,k.yield_expressions_cannot_be_used_in_a_parameter_initializer)}}function UKt(o,_){const v=a5(o.condition,_);zRe(o.condition,v,o.whenTrue);const S=fo(o.whenTrue,_),D=fo(o.whenFalse,_);return es([S,D],2)}function i_t(o){const _=o.parent;return g_(_)&&i_t(_)||wc(_)&&_.argumentExpression===o}function qKt(o){const _=[o.head.text],v=[];for(const D of o.templateSpans){const L=fo(D.expression);DY(L,12288)&&ht(D.expression,k.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String),_.push(D.literal.text),v.push(ba(L,ki)?L:tt)}const S=o.parent.kind!==215&&We(o).value;return S?RA(G_(S)):i5(o)||i_t(o)||Km(w_(o,void 0)||Gt,$Kt)?nN(_,v):tt}function $Kt(o){return!!(o.flags&134217856||o.flags&58982400&&Fu(Hf(o)||Gt,402653316))}function JKt(o){return ZT(o)&&!vI(o.parent)?o.parent.parent:o}function jO(o,_,v,S){const D=JKt(o);cY(D,_,!1),cJt(D,v);const L=fo(o,S|1|(v?2:0));v&&v.intraExpressionInferenceSites&&(v.intraExpressionInferenceSites=void 0);const B=Fu(L,2944)&&Wpe(L,mpe(_,o,void 0))?Zh(L):L;return uJt(),Jj(),B}function Vu(o,_){if(_)return fo(o,_);const v=Tr(o);if(!v.resolvedType){const S=Zl,D=Wm;Zl=nh,Wm=void 0,v.resolvedType=fo(o,_),Wm=D,Zl=S}return v.resolvedType}function n_t(o){return o=Il(o,!0),o.kind===216||o.kind===234||wI(o)}function t5(o,_,v){const S=pW(o);if(Xn(o)){const L=xG(o);if(L)return bRe(S,L,_)}const D=ORe(S)||(v?jO(S,v,void 0,_||0):Vu(S,_));return Gs(o)&&o.name.kind===207&&Qa(D)&&!D.target.hasRestElement&&JS(D)Wpe(o,S))}if(_.flags&58982400){const v=Hf(_)||Gt;return Fu(v,4)&&Fu(o,128)||Fu(v,8)&&Fu(o,256)||Fu(v,64)&&Fu(o,2048)||Fu(v,4096)&&Fu(o,8192)||Wpe(o,v)}return!!(_.flags&406847616&&Fu(o,128)||_.flags&256&&Fu(o,256)||_.flags&2048&&Fu(o,2048)||_.flags&512&&Fu(o,512)||_.flags&8192&&Fu(o,8192))}return!1}function i5(o){const _=o.parent;return Ek(_)&&V0(_.type)||wI(_)&&V0(T7(_))||yRe(o)&&eN(w_(o,0))||(g_(_)||Rf(_)||Zg(_))&&i5(_)||(pd(_)||ih(_)||m7(_))&&i5(_.parent)}function n5(o,_,v){const S=fo(o,_,v);return i5(o)||ixe(o)?Zh(S):n_t(o)?S:lMe(S,mpe(w_(o,void 0),o,void 0))}function r_t(o,_){return o.name.kind===167&&u1(o.name),n5(o.initializer,_)}function s_t(o,_){Npt(o),o.name.kind===167&&u1(o.name);const v=Qht(o,_);return o_t(o,v,_)}function o_t(o,_,v){if(v&&v&10){const S=Qj(_,0,!0),D=Qj(_,1,!0),L=S||D;if(L&&L.typeParameters){const B=J2(o,2);if(B){const K=Qj(kC(B),S?0:1,!1);if(K&&!K.typeParameters){if(v&8)return a_t(o,v),Mc;const ne=VD(o),ae=ne.signature&&Ol(ne.signature),Ce=ae&&ght(ae);if(Ce&&!Ce.typeParameters&&!Be(ne.inferences,zO)){const qe=ZKt(ne,L.typeParameters),Ve=dOe(L,qe),Dt=Yt(ne.inferences,Vt=>pMe(Vt.typeParameter));if(dMe(Ve,K,(Vt,Kt)=>{DC(Dt,Vt,Kt,0,!0)}),Rt(Dt,zO)&&(fMe(Ve,K,(Vt,Kt)=>{DC(Dt,Vt,Kt)}),!QKt(ne.inferences,Dt)))return XKt(ne.inferences,Dt),ne.inferredTypeParameters=no(ne.inferredTypeParameters,qe),iN(Ve)}return iN(mht(L,K,ne),Ln(rC,qe=>qe&&Yt(qe.inferences,Ve=>Ve.typeParameter)).slice())}}}}return _}function a_t(o,_){if(_&2){const v=VD(o);v.flags|=4}}function zO(o){return!!(o.candidates||o.contraCandidates)}function KKt(o){return!!(o.candidates||o.contraCandidates||Bct(o.typeParameter))}function QKt(o,_){for(let v=0;vv.symbol.escapedName===_)}function YKt(o,_){let v=_.length;for(;v>1&&_.charCodeAt(v-1)>=48&&_.charCodeAt(v-1)<=57;)v--;const S=_.slice(0,v);for(let D=1;;D++){const L=S+D;if(!ARe(o,L))return L}}function l_t(o){const _=mN(o);if(_&&!_.typeParameters)return Ol(_)}function eQt(o){const _=fo(o.expression),v=Wj(_,o.expression),S=l_t(_);return S&&X_e(S,o,v!==_)}function zf(o){const _=ORe(o);if(_)return _;if(o.flags&268435456&&Wm){const D=Wm[Tl(o)];if(D)return D}const v=ES,S=fo(o,64);if(ES!==v){const D=Wm||(Wm=[]);D[Tl(o)]=S,Bke(o,o.flags|268435456)}return S}function ORe(o){let _=Il(o,!0);if(wI(_)){const v=T7(_);if(!V0(v))return As(v)}if(_=Il(o),ex(_)){const v=ORe(_.expression);return v?yN(v):void 0}if(sa(_)&&_.expression.kind!==108&&!B_(_,!0)&&!Nht(_))return XE(_)?eQt(_):l_t(WO(_.expression));if(Ek(_)&&!V0(_.type))return As(_.type);if(wT(o)||u8(o))return fo(o)}function IY(o){const _=Tr(o);if(_.contextFreeType)return _.contextFreeType;cY(o,Je,!1);const v=_.contextFreeType=fo(o,4);return Jj(),v}function fo(o,_,v){var S,D;(S=sr)==null||S.push(sr.Phase.Check,"checkExpression",{kind:o.kind,pos:o.pos,end:o.end,path:o.tracingPath});const L=j;j=o,N=0;const B=nQt(o,_,v),K=o_t(o,B,_);return Fpe(K)&&tQt(o,K),j=L,(D=sr)==null||D.pop(),K}function tQt(o,_){if(o.parent.kind===211&&o.parent.expression===o||o.parent.kind===212&&o.parent.expression===o||(o.kind===80||o.kind===166)&&tge(o)||o.parent.kind===186&&o.parent.exprName===o||o.parent.kind===281||ht(o,k.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query),Xg(Y)){z.assert(!!(_.symbol.flags&128));const S=_.symbol.valueDeclaration,D=t.getRedirectReferenceForResolutionFromSourceOfProject(_n(S).resolvedPath);S.flags&33554432&&!Wk(o)&&(!D||!HT(D.commandLine.options))&&ht(o,k.Cannot_access_ambient_const_enums_when_0_is_enabled,st)}}function iQt(o,_){if(Jp(o)){if(fae(o))return bRe(o.expression,hae(o),_);if(wI(o))return Oht(o,_)}return fo(o.expression,_)}function nQt(o,_,v){const S=o.kind;if(u)switch(S){case 231:case 218:case 219:u.throwIfCancellationRequested()}switch(S){case 80:return P$t(o,_);case 81:return ZJt(o);case 110:return aY(o);case 108:return _pe(o);case 106:return de;case 15:case 11:return bMe(o)?Ci:RA(G_(o.text));case 9:return Rpt(o),RA(D0(+o.text));case 10:return sei(o),RA(P_e({negative:!1,base10Value:e7(o.text)}));case 112:return fi;case 97:return Qt;case 228:return qKt(o);case 14:return wJt(o);case 209:return Wft(o,_,v);case 210:return NJt(o,_);case 211:return xpe(o,_);case 166:return tht(o,_);case 212:return hGt(o,_);case 213:if(o.expression.kind===102)return qGt(o);case 214:return UGt(o,_);case 215:return $Gt(o);case 217:return iQt(o,_);case 231:return qXt(o);case 218:case 219:return Qht(o,_);case 221:return EKt(o);case 216:case 234:return JGt(o,_);case 235:return QGt(o);case 233:return Rht(o);case 238:return XGt(o);case 236:return ZGt(o);case 220:return TKt(o);case 222:return IKt(o);case 223:return NKt(o);case 224:return LKt(o);case 225:return PKt(o);case 226:return Ie(o,_);case 227:return UKt(o,_);case 230:return xJt(o,_);case 232:return ce;case 229:return zKt(o);case 237:return kJt(o);case 294:return qJt(o,_);case 284:return OJt(o);case 285:return PJt(o);case 288:return MJt(o);case 292:return FJt(o,_);case 286:z.fail("Shouldn't ever directly check a JsxOpeningElement")}return $e}function c_t(o){gb(o),o.expression&&Df(o.expression,k.Type_expected),Ua(o.constraint),Ua(o.default);const _=ID(wr(o));Hf(_),Ejt(_)||ht(o.default,k.Type_parameter_0_has_a_circular_default,Un(_));const v=C_(_),S=tN(_);v&&S&&Dh(S,Wp(Ys(v,FD(_,S)),S),o.default,k.Type_0_does_not_satisfy_the_constraint_1),zA(o),a(()=>l5(o.name,k.Type_parameter_name_cannot_be_0))}function rQt(o){var _,v;if(Ff(o.parent)||ss(o.parent)||Mm(o.parent)){const S=ID(wr(o)),D=nMe(S)&24576;if(D){const L=wr(o.parent);if(Mm(o.parent)&&!(Rr(vc(L))&52))ht(o,k.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types);else if(D===8192||D===16384){(_=sr)==null||_.push(sr.Phase.CheckTypes,"checkTypeParameterDeferred",{parent:kf(vc(L)),id:kf(S)});const B=UZ(L,S,D===16384?Rc:z_),K=UZ(L,S,D===16384?z_:Rc),ne=S;U=S,Dh(B,K,o,k.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation),U=ne,(v=sr)==null||v.pop()}}}}function u_t(o){gb(o),OY(o);const _=Kp(o);Kr(o,31)&&(_.kind===176&&Tm(_.body)||ht(o,k.A_parameter_property_is_only_allowed_in_a_constructor_implementation),_.kind===176&<(o.name)&&o.name.escapedText==="constructor"&&ht(o.name,k.constructor_cannot_be_used_as_a_parameter_property_name)),!o.initializer&&t3(o)&&Qo(o.name)&&_.body&&ht(o,k.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature),o.name&<(o.name)&&(o.name.escapedText==="this"||o.name.escapedText==="new")&&(_.parameters.indexOf(o)!==0&&ht(o,k.A_0_parameter_must_be_the_first_parameter,o.name.escapedText),(_.kind===176||_.kind===180||_.kind===185)&&ht(o,k.A_constructor_cannot_have_a_this_parameter),_.kind===219&&ht(o,k.An_arrow_function_cannot_have_a_this_parameter),(_.kind===177||_.kind===178)&&ht(o,k.get_and_set_accessors_cannot_declare_this_parameters)),o.dotDotDotToken&&!Qo(o.name)&&!ba(cv(Qn(o.symbol)),Ju)&&ht(o,k.A_rest_parameter_must_be_of_an_array_type)}function sQt(o){const _=oQt(o);if(!_){ht(o,k.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);return}const v=Mg(_),S=dm(v);if(!S)return;Ua(o.type);const{parameterName:D}=o;if(S.kind===0||S.kind===2)A_e(D);else if(S.parameterIndex>=0){if(vh(v)&&S.parameterIndex===v.parameters.length-1)ht(D,k.A_type_predicate_cannot_reference_a_rest_parameter);else if(S.type){const L=()=>Ro(void 0,k.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type);Dh(S.type,Qn(v.parameters[S.parameterIndex]),o.type,void 0,L)}}else if(D){let L=!1;for(const{name:B}of _.parameters)if(Qo(B)&&d_t(B,D,S.parameterName)){L=!0;break}L||ht(o.parameterName,k.Cannot_find_parameter_0,S.parameterName)}}function oQt(o){switch(o.parent.kind){case 219:case 179:case 262:case 218:case 184:case 174:case 173:const _=o.parent;if(o===_.type)return _}}function d_t(o,_,v){for(const S of o.elements){if(zd(S))continue;const D=S.name;if(D.kind===80&&D.escapedText===v)return ht(_,k.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern,v),!0;if((D.kind===207||D.kind===206)&&d_t(D,_,v))return!0}}function tz(o){o.kind===181?AYt(o):(o.kind===184||o.kind===262||o.kind===185||o.kind===179||o.kind===176||o.kind===180)&&lge(o);const _=ad(o);_&4||((_&3)===3&&ue<5&&$d(o,6144),(_&3)===2&&ue<4&&$d(o,64),_&3&&ue<2&&$d(o,128)),FY(Bw(o)),jXt(o),W(o.parameters,u_t),o.type&&Ua(o.type),a(v);function v(){sXt(o);let S=Dp(o),D=S;if(Xn(o)){const L=xk(o);if(L&&L.typeExpression&&_g(L.typeExpression.type)){const B=mN(As(L.typeExpression));B&&B.declaration&&(S=Dp(B.declaration),D=L.typeExpression.type)}}if(ke&&!S)switch(o.kind){case 180:ht(o,k.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);break;case 179:ht(o,k.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);break}if(S&&D){const L=ad(o);if((L&5)===1){const B=As(S);B===or?ht(D,k.A_generator_cannot_have_a_void_type_annotation):MRe(B,L,D)}else(L&3)===2&&FQt(o,S,D)}o.kind!==181&&o.kind!==317&&Bx(o)}}function MRe(o,_,v){const S=zD(0,o,(_&2)!==0)||Je,D=zD(1,o,(_&2)!==0)||S,L=zD(2,o,(_&2)!==0)||Gt,B=Mpe(S,D,L,!!(_&2));return Dh(B,o,v)}function aQt(o){const _=new Map,v=new Map,S=new Map;for(const L of o.members)if(L.kind===176)for(const B of L.parameters)xp(B,L)&&!Qo(B.name)&&D(_,B.name,B.name.escapedText,3);else{const B=da(L),K=L.name;if(!K)continue;const ne=Vs(K),ae=ne&&B?16:0,Ce=ne?S:B?v:_,qe=K&&g8e(K);if(qe)switch(L.kind){case 177:D(Ce,K,qe,1|ae);break;case 178:D(Ce,K,qe,2|ae);break;case 172:D(Ce,K,qe,3|ae);break;case 174:D(Ce,K,qe,8|ae);break}}function D(L,B,K,ne){const ae=L.get(K);if(ae)if((ae&16)!==(ne&16))ht(B,k.Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name,yu(B));else{const Ce=!!(ae&8),qe=!!(ne&8);Ce||qe?Ce!==qe&&ht(B,k.Duplicate_identifier_0,yu(B)):ae&ne&-17?ht(B,k.Duplicate_identifier_0,yu(B)):L.set(K,ae|ne)}else L.set(K,ne)}}function lQt(o){for(const _ of o.members){const v=_.name;if(da(_)&&v){const D=g8e(v);switch(D){case"name":case"length":case"caller":case"arguments":if(oe)break;case"prototype":const L=k.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1,B=DD(wr(o));ht(v,L,D,B);break}}}}function f_t(o){const _=new Map;for(const v of o.members)if(v.kind===171){let S;const D=v.name;switch(D.kind){case 11:case 9:S=D.text;break;case 80:S=dr(D);break;default:continue}_.get(S)?(ht(ko(v.symbol.valueDeclaration),k.Duplicate_identifier_0,S),ht(v.name,k.Duplicate_identifier_0,S)):_.set(S,!0)}}function RRe(o){if(o.kind===264){const v=wr(o);if(v.declarations&&v.declarations.length>0&&v.declarations[0]!==o)return}const _=fOe(wr(o));if(_!=null&&_.declarations){const v=new Map;for(const S of _.declarations)S.parameters.length===1&&S.parameters[0].type&&hN(As(S.parameters[0].type),D=>{const L=v.get(kf(D));L?L.declarations.push(S):v.set(kf(D),{type:D,declarations:[S]})});v.forEach(S=>{if(S.declarations.length>1)for(const D of S.declarations)ht(D,k.Duplicate_index_signature_for_type_0,Un(S.type))})}}function h_t(o){!gb(o)&&!tei(o)&&cge(o.name),OY(o),Vpe(o),Kr(o,64)&&o.kind===172&&o.initializer&&ht(o,k.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract,sc(o.name))}function cQt(o){return Vs(o.name)&&ht(o,k.Private_identifiers_are_not_allowed_outside_class_bodies),h_t(o)}function uQt(o){Npt(o)||cge(o.name),Au(o)&&o.asteriskToken&<(o.name)&&dr(o.name)==="constructor"&&ht(o.name,k.Class_constructor_may_not_be_a_generator),k_t(o),Kr(o,64)&&o.kind===174&&o.body&&ht(o,k.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract,sc(o.name)),Vs(o.name)&&!Sf(o)&&ht(o,k.Private_identifiers_are_not_allowed_outside_class_bodies),Vpe(o)}function Vpe(o){if(Vs(o.name)&&(ue<9||ue<99||!oe)){for(let _=j0(o);_;_=j0(_))Tr(_).flags|=1048576;if(wd(o.parent)){const _=FMe(o.parent);_&&(Tr(o.name).flags|=32768,Tr(_).flags|=4096)}}}function dQt(o){gb(o),jo(o,Ua)}function fQt(o){tz(o),YYt(o)||eei(o),Ua(o.body);const _=wr(o),v=Jc(_,o.kind);if(o===v&&zpe(_),vu(o.body))return;a(D);return;function S(L){return Fh(L)?!0:L.kind===172&&!da(L)&&!!L.initializer}function D(){const L=o.parent;if(MT(L)){BMe(o.parent,L);const B=WMe(L),K=xft(o.body);if(K){if(B&&ht(K,k.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null),!pe&&(Rt(o.parent.members,S)||Rt(o.parameters,ae=>Kr(ae,31))))if(!hQt(K,o.body))ht(K,k.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers);else{let ae;for(const Ce of o.body.statements){if(_f(Ce)&&rI(ld(Ce.expression))){ae=Ce;break}if(__t(Ce))break}ae===void 0&&ht(o,k.A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers)}}else B||ht(o,k.Constructors_for_derived_classes_must_contain_a_super_call)}}}function hQt(o,_){const v=Vb(o.parent);return _f(v)&&v.parent===_}function __t(o){return o.kind===108||o.kind===110?!0:uxe(o)?!1:!!jo(o,__t)}function p_t(o){lt(o.name)&&dr(o.name)==="constructor"&&ss(o.parent)&&ht(o.name,k.Class_constructor_may_not_be_an_accessor),a(_),Ua(o.body),Vpe(o);function _(){if(!lge(o)&&!jYt(o)&&cge(o.name),LY(o),tz(o),o.kind===177&&!(o.flags&33554432)&&Tm(o.body)&&o.flags&512&&(o.flags&1024||ht(o.name,k.A_get_accessor_must_return_a_value)),o.name.kind===167&&u1(o.name),TO(o)){const S=wr(o),D=Jc(S,177),L=Jc(S,178);if(D&&L&&!(qO(D)&1)){Tr(D).flags|=1;const B=Wh(D),K=Wh(L);(B&64)!==(K&64)&&(ht(D.name,k.Accessors_must_both_be_abstract_or_non_abstract),ht(L.name,k.Accessors_must_both_be_abstract_or_non_abstract)),(B&4&&!(K&6)||B&2&&!(K&2))&&(ht(D.name,k.A_get_accessor_must_be_at_least_as_accessible_as_the_setter),ht(L.name,k.A_get_accessor_must_be_at_least_as_accessible_as_the_setter))}}const v=yj(wr(o));o.kind===177&&ERe(o,v)}}function _Qt(o){LY(o)}function pQt(o,_,v){return o.typeArguments&&v{const S=FRe(o);S&&g_t(o,S)});const v=Tr(o).resolvedSymbol;v&&Rt(v.declarations,S=>fP(S)&&!!(S.flags&536870912))&&oC(CY(o),v.declarations,v.escapedName)}}function mQt(o){const _=$r(o.parent,$$);if(!_)return;const v=FRe(_);if(!v)return;const S=C_(v[_.typeArguments.indexOf(o)]);return S&&Ys(S,cp(v,Hpe(_,v)))}function vQt(o){aut(o)}function yQt(o){W(o.members,Ua),a(_);function _(){const v=Gut(o);Qpe(v,v.symbol),RRe(o),f_t(o)}}function bQt(o){Ua(o.elementType)}function CQt(o){let _=!1,v=!1;for(const S of o.elements){let D=kOe(S);if(D&8){const L=As(S.type);if(!XS(L)){ht(S,k.A_rest_element_type_must_be_an_array_type);break}(_m(L)||Qa(L)&&L.target.combinedFlags&4)&&(D|=4)}if(D&4){if(v){on(S,k.A_rest_element_cannot_follow_another_rest_element);break}v=!0}else if(D&2){if(v){on(S,k.An_optional_element_cannot_follow_a_rest_element);break}_=!0}else if(D&1&&_){on(S,k.A_required_element_cannot_follow_an_optional_element);break}}W(o.elements,Ua),As(o)}function SQt(o){W(o.types,Ua),As(o)}function v_t(o,_){if(!(o.flags&8388608))return o;const v=o.objectType,S=o.indexType,D=ap(v)&&m_e(v)===2?Put(v,0):l1(v,0),L=!!hb(v,Ae);if(dp(S,B=>ba(B,D)||L&&IA(B,Ae)))return _.kind===212&&lS(_)&&Rr(v)&32&&ny(v)&1&&ht(_,k.Index_signature_in_type_0_only_permits_reading,Un(v)),o;if(sN(v)){const B=E_e(S,_);if(B){const K=hN(Qh(v),ne=>ya(ne,B));if(K&&Qg(K)&6)return ht(_,k.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter,Ws(B)),$e}}return ht(_,k.Type_0_cannot_be_used_to_index_type_1,Un(S),Un(v)),$e}function wQt(o){Ua(o.objectType),Ua(o.indexType),v_t(jut(o),o)}function xQt(o){kQt(o),Ua(o.typeParameter),Ua(o.nameType),Ua(o.type),o.type||U2(o,Je);const _=FOe(o),v=qS(_);if(v)Dh(v,$i,o.nameType);else{const S=Og(_);Dh(S,$i,C6(o.typeParameter))}}function kQt(o){var _;if((_=o.members)!=null&&_.length)return on(o.members[0],k.A_mapped_type_may_not_declare_properties_or_methods)}function TQt(o){A_e(o)}function DQt(o){UYt(o),Ua(o.type)}function EQt(o){jo(o,Ua)}function IQt(o){Xi(o,v=>v.parent&&v.parent.kind===194&&v.parent.extendsType===v)||on(o,k.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type),Ua(o.typeParameter);const _=wr(o.typeParameter);if(_.declarations&&_.declarations.length>1){const v=Zs(_);if(!v.typeParametersChecked){v.typeParametersChecked=!0;const S=ID(_),D=kwe(_,168);if(!q_t(D,[S],L=>[L])){const L=Js(_);for(const B of D)ht(B.name,k.All_declarations_of_0_must_have_identical_constraints,L)}}}Bx(o)}function NQt(o){for(const _ of o.templateSpans){Ua(_.type);const v=As(_.type);Dh(v,ki,_.type)}As(o)}function LQt(o){Ua(o.argument),o.attributes&&T3(o.attributes,on),m_t(o)}function PQt(o){o.dotDotDotToken&&o.questionToken&&on(o,k.A_tuple_member_cannot_be_both_optional_and_rest),o.type.kind===190&&on(o.type,k.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type),o.type.kind===191&&on(o.type,k.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type),Ua(o.type),As(o)}function NY(o){return(Ep(o,2)||Fh(o))&&!!(o.flags&33554432)}function jpe(o,_){let v=uge(o);if(o.parent.kind!==264&&o.parent.kind!==263&&o.parent.kind!==231&&o.flags&33554432){const S=rJ(o);S&&S.flags&128&&!(v&128)&&!(jv(o.parent)&&qu(o.parent.parent)&&Iv(o.parent.parent))&&(v|=32),v|=128}return v&_}function zpe(o){a(()=>AQt(o))}function AQt(o){function _(en,vn){return vn!==void 0&&vn.parent===en[0].parent?vn:en[0]}function v(en,vn,In,Nr,zr){if((Nr^zr)!==0){const Ia=jpe(_(en,vn),In);W(en,ta=>{const ll=jpe(ta,In)^Ia;ll&32?ht(ko(ta),k.Overload_signatures_must_all_be_exported_or_non_exported):ll&128?ht(ko(ta),k.Overload_signatures_must_all_be_ambient_or_non_ambient):ll&6?ht(ko(ta)||ta,k.Overload_signatures_must_all_be_public_private_or_protected):ll&64&&ht(ko(ta),k.Overload_signatures_must_all_be_abstract_or_non_abstract)})}}function S(en,vn,In,Nr){if(In!==Nr){const zr=QL(_(en,vn));W(en,Ur=>{QL(Ur)!==zr&&ht(ko(Ur),k.Overload_signatures_must_all_be_optional_or_required)})}}const D=230;let L=0,B=D,K=!1,ne=!0,ae=!1,Ce,qe,Ve;const Dt=o.declarations,Vt=(o.flags&16384)!==0;function Kt(en){if(en.name&&vu(en.name))return;let vn=!1;const In=jo(en.parent,zr=>{if(vn)return zr;vn=zr===en});if(In&&In.pos===en.end&&In.kind===en.kind){const zr=In.name||In,Ur=In.name;if(en.name&&Ur&&(Vs(en.name)&&Vs(Ur)&&en.name.escapedText===Ur.escapedText||Ja(en.name)&&Ja(Ur)&&SC(u1(en.name),u1(Ur))||Av(en.name)&&Av(Ur)&&L8(en.name)===L8(Ur))){if((en.kind===174||en.kind===173)&&da(en)!==da(In)){const ta=da(en)?k.Function_overload_must_be_static:k.Function_overload_must_not_be_static;ht(zr,ta)}return}if(Tm(In.body)){ht(zr,k.Function_implementation_name_must_be_0,sc(en.name));return}}const Nr=en.name||en;Vt?ht(Nr,k.Constructor_implementation_is_missing):Kr(en,64)?ht(Nr,k.All_declarations_of_an_abstract_method_must_be_consecutive):ht(Nr,k.Function_implementation_is_missing_or_not_immediately_following_the_declaration)}let Wi=!1,qi=!1,An=!1;const Cr=[];if(Dt)for(const en of Dt){const vn=en,In=vn.flags&33554432,Nr=vn.parent&&(vn.parent.kind===264||vn.parent.kind===187)||In;if(Nr&&(Ve=void 0),(vn.kind===263||vn.kind===231)&&!In&&(An=!0),vn.kind===262||vn.kind===174||vn.kind===173||vn.kind===176){Cr.push(vn);const zr=jpe(vn,D);L|=zr,B&=zr,K=K||QL(vn),ne=ne&&QL(vn);const Ur=Tm(vn.body);Ur&&Ce?Vt?qi=!0:Wi=!0:(Ve==null?void 0:Ve.parent)===vn.parent&&Ve.end!==vn.pos&&Kt(Ve),Ur?Ce||(Ce=vn):ae=!0,Ve=vn,Nr||(qe=vn)}Xn(en)&&Bo(en)&&en.jsDoc&&(ae=O(soe(en))>0)}if(qi&&W(Cr,en=>{ht(en,k.Multiple_constructor_implementations_are_not_allowed)}),Wi&&W(Cr,en=>{ht(ko(en)||en,k.Duplicate_function_implementation)}),An&&!Vt&&o.flags&16&&Dt){const en=Ri(Dt,vn=>vn.kind===263).map(vn=>Kn(vn,k.Consider_adding_a_declare_modifier_to_this_class));W(Dt,vn=>{const In=vn.kind===263?k.Class_declaration_cannot_implement_overload_list_for_0:vn.kind===262?k.Function_with_bodies_can_only_merge_with_classes_that_are_ambient:void 0;In&&fa(ht(ko(vn)||vn,In,xu(o)),...en)})}if(qe&&!qe.body&&!Kr(qe,64)&&!qe.questionToken&&Kt(qe),ae&&(Dt&&(v(Dt,Ce,D,L,B),S(Dt,Ce,K,ne)),Ce)){const en=PD(o),vn=Mg(Ce);for(const In of en)if(!$Ut(vn,In)){const Nr=In.declaration&&Qb(In.declaration)?In.declaration.parent.tagName:In.declaration;fa(ht(Nr,k.This_overload_signature_is_not_compatible_with_its_implementation_signature),Kn(Ce,k.The_implementation_signature_is_declared_here));break}}}function iz(o){a(()=>OQt(o))}function OQt(o){let _=o.localSymbol;if(!_&&(_=wr(o),!_.exportSymbol)||Jc(_,o.kind)!==o)return;let v=0,S=0,D=0;for(const ae of _.declarations){const Ce=ne(ae),qe=jpe(ae,2080);qe&32?qe&2048?D|=Ce:v|=Ce:S|=Ce}const L=v|S,B=v&S,K=D&L;if(B||K)for(const ae of _.declarations){const Ce=ne(ae),qe=ko(ae);Ce&K?ht(qe,k.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead,sc(qe)):Ce&B&&ht(qe,k.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local,sc(qe))}function ne(ae){let Ce=ae;switch(Ce.kind){case 264:case 265:case 346:case 338:case 340:return 2;case 267:return Bh(Ce)||Yb(Ce)!==0?5:4;case 263:case 266:case 306:return 3;case 307:return 7;case 277:case 226:const qe=Ce,Ve=Ec(qe)?qe.expression:qe.right;if(!pc(Ve))return 1;Ce=Ve;case 271:case 274:case 273:let Dt=0;const Vt=sf(wr(Ce));return W(Vt.declarations,Kt=>{Dt|=ne(Kt)}),Dt;case 260:case 208:case 262:case 276:case 80:return 1;case 173:case 171:return 2;default:return z.failBadSyntaxKind(Ce)}}}function r5(o,_,v,...S){const D=nz(o,_);return D&&yN(D,_,v,...S)}function nz(o,_,v){if(Al(o))return;const S=o;if(S.promisedTypeOfPromise)return S.promisedTypeOfPromise;if(Tx(o,PZ(!1)))return S.promisedTypeOfPromise=Nc(o)[0];if(ez(ry(o),402915324))return;const D=Eu(o,"then");if(Al(D))return;const L=D?ea(D,0):x;if(L.length===0){_&&ht(_,k.A_promise_must_have_a_then_method);return}let B,K;for(const Ce of L){const qe=B2(Ce);qe&&qe!==or&&!c1(o,qe,Zv)?B=qe:K=xi(K,Ce)}if(!K){z.assertIsDefined(B),v&&(v.value=B),_&&ht(_,k.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1,Un(o),Un(B));return}const ne=Gm(es(Yt(K,wRe)),2097152);if(Al(ne))return;const ae=ea(ne,0);if(ae.length===0){_&&ht(_,k.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback);return}return S.promisedTypeOfPromise=es(Yt(ae,wRe),2)}function rz(o,_,v,S,...D){return(_?yN(o,v,S,...D):ZS(o,v,S,...D))||$e}function y_t(o){if(ez(ry(o),402915324))return!1;const _=Eu(o,"then");return!!_&&ea(Gm(_,2097152),0).length>0}function Upe(o){var _;if(o.flags&16777216){const v=xOe(!1);return!!v&&o.aliasSymbol===v&&((_=o.aliasTypeArguments)==null?void 0:_.length)===1}return!1}function s5(o){return o.flags&1048576?Zc(o,s5):Upe(o)?o.aliasTypeArguments[0]:o}function b_t(o){if(Al(o)||Upe(o))return!1;if(sN(o)){const _=Hf(o);if(_?_.flags&3||wC(_)||Km(_,y_t):Fu(o,8650752))return!0}return!1}function MQt(o){const _=xOe(!0);if(_)return NO(_,[s5(o)])}function RQt(o){return b_t(o)?MQt(o)??o:(z.assert(Upe(o)||nz(o)===void 0,"type provided should not be a non-generic 'promise'-like."),o)}function yN(o,_,v,...S){const D=ZS(o,_,v,...S);return D&&RQt(D)}function ZS(o,_,v,...S){if(Al(o)||Upe(o))return o;const D=o;if(D.awaitedTypeOfType)return D.awaitedTypeOfType;if(o.flags&1048576){if(NS.lastIndexOf(o.id)>=0){_&&ht(_,k.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method);return}const K=_?ae=>ZS(ae,_,v,...S):ZS;NS.push(o.id);const ne=Zc(o,K);return NS.pop(),D.awaitedTypeOfType=ne}if(b_t(o))return D.awaitedTypeOfType=o;const L={value:void 0},B=nz(o,void 0,L);if(B){if(o.id===B.id||NS.lastIndexOf(B.id)>=0){_&&ht(_,k.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method);return}NS.push(o.id);const K=ZS(B,_,v,...S);return NS.pop(),K?D.awaitedTypeOfType=K:void 0}if(y_t(o)){if(_){z.assertIsDefined(v);let K;L.value&&(K=Ro(K,k.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1,Un(o),Un(L.value))),K=Ro(K,v,...S),vl.add($y(_n(_),_,K))}return}return D.awaitedTypeOfType=o}function FQt(o,_,v){const S=As(_);if(ue>=2){if(_l(S))return;const L=PZ(!0);if(L!==za&&!Tx(S,L)){D(k.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0,_,v,Un(ZS(S)||or));return}}else{if(HA(o,5),_l(S))return;const L=lW(_);if(L===void 0){D(k.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,_,v,Un(S));return}const B=Du(L,111551,!0),K=B?Qn(B):$e;if(_l(K)){L.kind===80&&L.escapedText==="Promise"&&wO(S)===PZ(!1)?ht(v,k.An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option):D(k.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,_,v,kp(L));return}const ne=izt(!0);if(ne===Ps){D(k.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,_,v,kp(L));return}const ae=k.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value;if(!Dh(K,ne,v,ae,()=>_===v?void 0:Ro(void 0,k.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type)))return;const qe=L&&Ip(L),Ve=rh(o.locals,qe.escapedText,111551);if(Ve){ht(Ve.valueDeclaration,k.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions,dr(qe),kp(L));return}}rz(S,!1,o,k.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);function D(L,B,K,ne){if(B===K)ht(K,L,ne);else{const ae=ht(K,k.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type);fa(ae,Kn(B,L,ne))}}}function BQt(o){const _=_n(o);if(!Wx(_)){let v=o.expression;if(g_(v))return!1;let S=!0,D;for(;;){if(Gb(v)||NP(v)){v=v.expression;continue}if(sa(v)){S||(D=v),v.questionDotToken&&(D=v.questionDotToken),v=v.expression,S=!1;continue}if(Ir(v)){v.questionDotToken&&(D=v.questionDotToken),v=v.expression,S=!1;continue}lt(v)||(D=v);break}if(D)return fa(ht(o.expression,k.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator),Kn(D,k.Invalid_syntax_in_decorator)),!0}return!1}function WQt(o){BQt(o);const _=HO(o);Ape(_,o);const v=Ol(_);if(v.flags&1)return;const S=TRe(o);if(!(S!=null&&S.resolvedReturnType))return;let D;const L=S.resolvedReturnType;switch(o.parent.kind){case 263:case 231:D=k.Decorator_function_return_type_0_is_not_assignable_to_type_1;break;case 172:if(!Se){D=k.Decorator_function_return_type_0_is_not_assignable_to_type_1;break}case 169:D=k.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any;break;case 174:case 177:case 178:D=k.Decorator_function_return_type_0_is_not_assignable_to_type_1;break;default:return z.failBadSyntaxKind(o.parent)}Dh(v,L,o.expression,D)}function sz(o,_,v,S,D,L=v.length,B=0){const K=G.createFunctionTypeNode(void 0,x,G.createKeywordTypeNode(133));return fb(K,o,_,v,S,D,L,B)}function WRe(o,_,v,S,D,L,B){const K=sz(o,_,v,S,D,L,B);return iN(K)}function C_t(o){return WRe(void 0,void 0,x,o)}function S_t(o){const _=y0("value",o);return WRe(void 0,void 0,[_],or)}function VRe(o){if(o)switch(o.kind){case 193:case 192:return w_t(o.types);case 194:return w_t([o.trueType,o.falseType]);case 196:case 202:return VRe(o.type);case 183:return o.typeName}}function w_t(o){let _;for(let v of o){for(;v.kind===196||v.kind===202;)v=v.type;if(v.kind===146||!be&&(v.kind===201&&v.literal.kind===106||v.kind===157))continue;const S=VRe(v);if(!S)return;if(_){if(!lt(_)||!lt(S)||_.escapedText!==S.escapedText)return}else _=S}return _}function qpe(o){const _=hd(o);return O1(o)?Gse(_):_}function LY(o){if(!eD(o)||!dg(o)||!o.modifiers||!cW(Se,o,o.parent,o.parent.parent))return;const _=Me(o.modifiers,jd);if(_){Se?($d(_,8),o.kind===169&&$d(_,32)):ue<99&&($d(_,8),xd(o)?o.name?$_t(o)&&$d(_,4194304):$d(_,4194304):wd(o)||(Vs(o.name)&&(Au(o)||Vw(o)||O_(o))&&$d(_,4194304),Ja(o.name)&&$d(_,8388608))),HA(o,8);for(const v of o.modifiers)jd(v)&&WQt(v)}}function VQt(o){a(_);function _(){k_t(o),f8e(o),o5(o,o.name)}}function HQt(o){o.typeExpression||ht(o.name,k.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags),o.name&&l5(o.name,k.Type_alias_name_cannot_be_0),Ua(o.typeExpression),FY(Bw(o))}function jQt(o){Ua(o.constraint);for(const _ of o.typeParameters)Ua(_)}function zQt(o){Ua(o.typeExpression)}function UQt(o){Ua(o.typeExpression);const _=Ok(o);if(_){const v=A$(_,XG);if(O(v)>1)for(let S=1;S0),v.length>1&&ht(v[1],k.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag);const S=x_t(o.class.expression),D=MT(_);if(D){const L=x_t(D.expression);L&&S.escapedText!==L.escapedText&&ht(S,k.JSDoc_0_1_does_not_match_the_extends_2_clause,dr(o.tagName),dr(S),dr(L))}}function YQt(o){const _=AT(o);_&&Fh(_)&&ht(o,k.An_accessibility_modifier_cannot_be_used_with_a_private_identifier)}function x_t(o){switch(o.kind){case 80:return o;case 211:return o.name;default:return}}function k_t(o){var _;LY(o),tz(o);const v=ad(o);if(o.name&&o.name.kind===167&&u1(o.name),TO(o)){const L=wr(o),B=o.localSymbol||L,K=(_=B.declarations)==null?void 0:_.find(ne=>ne.kind===o.kind&&!(ne.flags&524288));o===K&&zpe(B),L.parent&&zpe(L)}const S=o.kind===173?void 0:o.body;if(Ua(S),ERe(o,EO(o)),a(D),Xn(o)){const L=xk(o);L&&L.typeExpression&&!$Me(As(L.typeExpression),o)&&ht(L.typeExpression.type,k.The_type_of_a_function_declaration_must_match_the_function_s_signature)}function D(){Dp(o)||(vu(S)&&!NY(o)&&U2(o,Je),v&1&&Tm(S)&&Ol(Mg(o)))}}function Bx(o){a(_);function _(){const v=_n(o);let S=Dg.get(v.path);S||(S=[],Dg.set(v.path,S)),S.push(o)}}function T_t(o,_){for(const v of o)switch(v.kind){case 263:case 231:eXt(v,_),HRe(v,_);break;case 307:case 267:case 241:case 269:case 248:case 249:case 250:I_t(v,_);break;case 176:case 218:case 262:case 219:case 174:case 177:case 178:v.body&&I_t(v,_),HRe(v,_);break;case 173:case 179:case 180:case 184:case 185:case 265:case 264:HRe(v,_);break;case 195:tXt(v,_);break;default:z.assertNever(v,"Node should not have been registered for unused identifiers check")}}function D_t(o,_,v){const S=ko(o)||o,D=fP(o)?k._0_is_declared_but_never_used:k._0_is_declared_but_its_value_is_never_read;v(o,0,Kn(S,D,_))}function oz(o){return lt(o)&&dr(o).charCodeAt(0)===95}function eXt(o,_){for(const v of o.members)switch(v.kind){case 174:case 172:case 177:case 178:if(v.kind===178&&v.symbol.flags&32768)break;const S=wr(v);!S.isReferenced&&(Ep(v,2)||Af(v)&&Vs(v.name))&&!(v.flags&33554432)&&_(v,0,Kn(v.name,k._0_is_declared_but_its_value_is_never_read,Js(S)));break;case 176:for(const D of v.parameters)!D.symbol.isReferenced&&Kr(D,2)&&_(D,0,Kn(D.name,k.Property_0_is_declared_but_its_value_is_never_read,xu(D.symbol)));break;case 181:case 240:case 175:break;default:z.fail("Unexpected class member")}}function tXt(o,_){const{typeParameter:v}=o;jRe(v)&&_(o,1,Kn(o,k._0_is_declared_but_its_value_is_never_read,dr(v.name)))}function HRe(o,_){const v=wr(o).declarations;if(!v||La(v)!==o)return;const S=Bw(o),D=new Set;for(const L of S){if(!jRe(L))continue;const B=dr(L.name),{parent:K}=L;if(K.kind!==195&&K.typeParameters.every(jRe)){if(o_(D,K)){const ne=_n(K),ae=Rm(K)?oae(K):aae(ne,K.typeParameters),qe=K.typeParameters.length===1?[k._0_is_declared_but_its_value_is_never_read,B]:[k.All_type_parameters_are_unused];_(L,1,ef(ne,ae.pos,ae.end-ae.pos,...qe))}}else _(L,1,Kn(L,k._0_is_declared_but_its_value_is_never_read,B))}}function jRe(o){return!(al(o.symbol).isReferenced&262144)&&!oz(o.name)}function PY(o,_,v,S){const D=String(S(_)),L=o.get(D);L?L[1].push(v):o.set(D,[_,[v]])}function E_t(o){return $r(Ov(o),Gs)}function iXt(o){return nl(o)?pg(o.parent)?!!(o.propertyName&&oz(o.name)):oz(o.name):Bh(o)||(ds(o)&&eI(o.parent.parent)||N_t(o))&&oz(o.name)}function I_t(o,_){const v=new Map,S=new Map,D=new Map;o.locals.forEach(L=>{if(!(L.flags&262144?!(L.flags&3&&!(L.isReferenced&3)):L.isReferenced||L.exportSymbol)&&L.declarations){for(const B of L.declarations)if(!iXt(B))if(N_t(B))PY(v,rXt(B),B,Tl);else if(nl(B)&&pg(B.parent)){const K=La(B.parent.elements);(B===K||!La(B.parent.elements).dotDotDotToken)&&PY(S,B.parent,B,Tl)}else if(ds(B)){const K=qD(B)&7,ne=ko(B);(K!==4&&K!==6||!ne||!oz(ne))&&PY(D,B.parent,B,Tl)}else{const K=L.valueDeclaration&&E_t(L.valueDeclaration),ne=L.valueDeclaration&&ko(L.valueDeclaration);K&&ne?!xp(K,K.parent)&&!FT(K)&&!oz(ne)&&(nl(B)&&mS(B.parent)?PY(S,B.parent,B,Tl):_(K,1,Kn(ne,k._0_is_declared_but_its_value_is_never_read,xu(L)))):D_t(B,xu(L),_)}}}),v.forEach(([L,B])=>{const K=L.parent;if((L.name?1:0)+(L.namedBindings?L.namedBindings.kind===274?1:L.namedBindings.elements.length:0)===B.length)_(K,0,B.length===1?Kn(K,k._0_is_declared_but_its_value_is_never_read,dr(ma(B).name)):Kn(K,k.All_imports_in_import_declaration_are_unused));else for(const ae of B)D_t(ae,dr(ae.name),_)}),S.forEach(([L,B])=>{const K=E_t(L.parent)?1:0;if(L.elements.length===B.length)B.length===1&&L.parent.kind===260&&L.parent.parent.kind===261?PY(D,L.parent.parent,L.parent,Tl):_(L,K,B.length===1?Kn(L,k._0_is_declared_but_its_value_is_never_read,AY(ma(B).name)):Kn(L,k.All_destructured_elements_are_unused));else for(const ne of B)_(ne,K,Kn(ne,k._0_is_declared_but_its_value_is_never_read,AY(ne.name)))}),D.forEach(([L,B])=>{if(L.declarations.length===B.length)_(L,0,B.length===1?Kn(ma(B).name,k._0_is_declared_but_its_value_is_never_read,AY(ma(B).name)):Kn(L.parent.kind===243?L.parent:L,k.All_variables_are_unused));else for(const K of B)_(K,0,Kn(K,k._0_is_declared_but_its_value_is_never_read,AY(K.name)))})}function nXt(){var o;for(const _ of RI)if(!((o=wr(_))!=null&&o.isReferenced)){const v=y6(_);z.assert(Fk(v),"Only parameter declaration should be checked here");const S=Kn(_.name,k._0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation,sc(_.name),sc(_.propertyName));v.type||fa(S,ef(_n(v),v.end,1,k.We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here,sc(_.propertyName))),vl.add(S)}}function AY(o){switch(o.kind){case 80:return dr(o);case 207:case 206:return AY(ua(ma(o.elements),nl).name);default:return z.assertNever(o)}}function N_t(o){return o.kind===273||o.kind===276||o.kind===274}function rXt(o){return o.kind===273?o:o.kind===274?o.parent:o.parent.parent}function $pe(o){if(o.kind===241&&IC(o),vse(o)){const _=m0;W(o.statements,Ua),m0=_}else W(o.statements,Ua);o.locals&&Bx(o)}function sXt(o){ue>=2||!Tse(o)||o.flags&33554432||vu(o.body)||W(o.parameters,_=>{_.name&&!Qo(_.name)&&_.name.escapedText===nt.escapedName&&iv("noEmit",_,k.Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters)})}function az(o,_,v){if((_==null?void 0:_.escapedText)!==v||o.kind===172||o.kind===171||o.kind===174||o.kind===173||o.kind===177||o.kind===178||o.kind===303||o.flags&33554432||($0(o)||kd(o)||m_(o))&&Dk(o))return!1;const S=Ov(o);return!(Gs(S)&&vu(S.parent.body))}function oXt(o){Xi(o,_=>qO(_)&4?(o.kind!==80?ht(ko(o),k.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference):ht(o,k.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference),!0):!1)}function aXt(o){Xi(o,_=>qO(_)&8?(o.kind!==80?ht(ko(o),k.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference):ht(o,k.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference),!0):!1)}function lXt(o,_){if(te>=5&&!(te>=100&&_n(o).impliedNodeFormat===1)||!_||!az(o,_,"require")&&!az(o,_,"exports")||qu(o)&&Yb(o)!==1)return;const v=ZI(o);v.kind===307&&ep(v)&&iv("noEmit",_,k.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module,sc(_),sc(_))}function cXt(o,_){if(!_||ue>=4||!az(o,_,"Promise")||qu(o)&&Yb(o)!==1)return;const v=ZI(o);v.kind===307&&ep(v)&&v.flags&4096&&iv("noEmit",_,k.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions,sc(_),sc(_))}function uXt(o,_){ue<=8&&(az(o,_,"WeakMap")||az(o,_,"WeakSet"))&&f2.push(o)}function dXt(o){const _=j0(o);qO(_)&1048576&&(z.assert(Af(o)&<(o.name)&&typeof o.name.escapedText=="string","The target of a WeakMap/WeakSet collision check should be an identifier"),iv("noEmit",o,k.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel,o.name.escapedText))}function fXt(o,_){_&&ue>=2&&ue<=8&&az(o,_,"Reflect")&&h2.push(o)}function hXt(o){let _=!1;if(wd(o)){for(const v of o.members)if(qO(v)&2097152){_=!0;break}}else if(gc(o))qO(o)&2097152&&(_=!0);else{const v=j0(o);v&&qO(v)&2097152&&(_=!0)}_&&(z.assert(Af(o)&<(o.name),"The target of a Reflect collision check should be an identifier"),iv("noEmit",o,k.Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers,sc(o.name),"Reflect"))}function o5(o,_){_&&(lXt(o,_),cXt(o,_),uXt(o,_),fXt(o,_),ss(o)?(l5(_,k.Class_name_cannot_be_0),o.flags&33554432||HXt(_)):Uk(o)&&l5(_,k.Enum_name_cannot_be_0))}function _Xt(o){if(qD(o)&7||Fk(o))return;const _=wr(o);if(_.flags&1){if(!lt(o.name))return z.fail();const v=Ui(o,o.name.escapedText,3,void 0,!1);if(v&&v!==_&&v.flags&2&&ZMe(v)&7){const S=Rk(v.valueDeclaration,261),D=S.parent.kind===243&&S.parent.parent?S.parent.parent:void 0;if(!(D&&(D.kind===241&&Bo(D.parent)||D.kind===268||D.kind===267||D.kind===307))){const B=Js(v);ht(o,k.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1,B,B)}}}}function lz(o){return o===pt?Je:o===$l?Xl:o}function OY(o){var _;if(LY(o),nl(o)||Ua(o.type),!o.name)return;if(o.name.kind===167&&(u1(o.name),tI(o)&&o.initializer&&Vu(o.initializer)),nl(o)){if(o.propertyName&<(o.name)&&Fk(o)&&vu(Kp(o).body)){RI.push(o);return}pg(o.parent)&&o.dotDotDotToken&&ue<5&&$d(o,4),o.propertyName&&o.propertyName.kind===167&&u1(o.propertyName);const D=o.parent.parent,L=o.dotDotDotToken?32:0,B=xA(D,L),K=o.propertyName||o.name;if(B&&!Qo(K)){const ne=KS(K);if(Pm(ne)){const ae=Am(ne),Ce=ya(B,ae);Ce&&(gY(Ce,void 0,!1),eRe(o,!!D.initializer&&D.initializer.kind===108,!1,B,Ce))}}}if(Qo(o.name)&&(o.name.kind===207&&ue<2&&Y.downlevelIteration&&$d(o,512),W(o.name.elements,Ua)),o.initializer&&Fk(o)&&vu(Kp(o).body)){ht(o,k.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);return}if(Qo(o.name)){if(kMe(o))return;const D=tI(o)&&o.initializer&&o.parent.parent.kind!==249,L=!Rt(o.name.elements,d$(zd));if(D||L){const B=$(o);if(D){const K=Vu(o.initializer);be&&L?eht(K,o):Ox(K,$(o),o,o.initializer)}L&&(mS(o.name)?YS(65,B,wi,o):be&&eht(B,o))}return}const v=wr(o);if(v.flags&2097152&&(LT(o)||_xe(o))){Zpe(o);return}const S=lz(Qn(v));if(o===v.valueDeclaration){const D=tI(o)&&pW(o);if(D&&!(Xn(o)&&Pa(D)&&(D.properties.length===0||$w(o.name))&&!!((_=v.exports)!=null&&_.size))&&o.parent.parent.kind!==249){const B=Vu(D);Ox(B,S,o,D,void 0);const K=qD(o)&7;if(K===6){const ne=dzt(!0),ae=put(!0);if(ne!==Ps&&ae!==Ps){const Ce=es([ne,ae,je,wi]);Dh(B,Ce,D,k.The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined)}}else if(K===4){const ne=put(!0);if(ne!==Ps){const ae=es([ne,je,wi]);Dh(B,ae,D,k.The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined)}}}v.declarations&&v.declarations.length>1&&Rt(v.declarations,L=>L!==o&&qL(L)&&!P_t(L,o))&&ht(o.name,k.All_declarations_of_0_must_have_identical_modifiers,sc(o.name))}else{const D=lz($(o));!_l(S)&&!_l(D)&&!SC(S,D)&&!(v.flags&67108864)&&L_t(v.valueDeclaration,S,o,D),tI(o)&&o.initializer&&Ox(Vu(o.initializer),D,o,o.initializer,void 0),v.valueDeclaration&&!P_t(o,v.valueDeclaration)&&ht(o.name,k.All_declarations_of_0_must_have_identical_modifiers,sc(o.name))}o.kind!==172&&o.kind!==171&&(iz(o),(o.kind===260||o.kind===208)&&_Xt(o),o5(o,o.name))}function L_t(o,_,v,S){const D=ko(v),L=v.kind===172||v.kind===171?k.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:k.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2,B=sc(D),K=ht(D,L,B,Un(_),Un(S));o&&fa(K,Kn(o,k._0_was_also_declared_here,B))}function P_t(o,_){if(o.kind===169&&_.kind===260||o.kind===260&&_.kind===169)return!0;if(QL(o)!==QL(_))return!1;const v=1358;return tP(o,v)===tP(_,v)}function pXt(o){var _,v;(_=sr)==null||_.push(sr.Phase.Check,"checkVariableDeclaration",{kind:o.kind,pos:o.pos,end:o.end,path:o.tracingPath}),KYt(o),OY(o),(v=sr)==null||v.pop()}function gXt(o){return $Yt(o),OY(o)}function Jpe(o){const _=Rb(o)&7;(_===4||_===6)&&ue<99&&$d(o,16777216),W(o.declarations,Ua)}function mXt(o){!gb(o)&&!p8e(o.declarationList)&&QYt(o),Jpe(o.declarationList)}function vXt(o){IC(o),fo(o.expression)}function yXt(o){IC(o);const _=a5(o.expression);zRe(o.expression,_,o.thenStatement),Ua(o.thenStatement),o.thenStatement.kind===242&&ht(o.thenStatement,k.The_body_of_an_if_statement_cannot_be_the_empty_statement),Ua(o.elseStatement)}function zRe(o,_,v){if(!be)return;S(o,v);function S(L,B){for(L=Il(L),D(L,B);cr(L)&&(L.operatorToken.kind===57||L.operatorToken.kind===61);)L=Il(L.left),D(L,B)}function D(L,B){const K=WW(L)?Il(L.right):L;if(Jy(K))return;if(WW(K)){S(K,B);return}const ne=K===L?_:a5(K);if(ne.flags&1024&&Ir(K)&&(Tr(K.expression).resolvedSymbol??Ot).flags&384){ht(K,k.This_condition_will_always_return_0,ne.value?"true":"false");return}const ae=Ir(K)&&n_t(K.expression);if(!dv(ne,4194304)||ae)return;const Ce=ea(ne,0),qe=!!r5(ne);if(Ce.length===0&&!qe)return;const Ve=lt(K)?K:Ir(K)?K.name:void 0,Dt=Ve&&Qm(Ve);if(!Dt&&!qe)return;Dt&&cr(L.parent)&&CXt(L.parent,Dt)||Dt&&B&&bXt(L,B,Ve,Dt)||(qe?m2(K,!0,k.This_condition_will_always_return_true_since_this_0_is_always_defined,vO(ne)):ht(K,k.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead))}}function bXt(o,_,v,S){return!!jo(_,function D(L){if(lt(L)){const B=Qm(L);if(B&&B===S){if(lt(o)||lt(v)&&cr(v.parent))return!0;let K=v.parent,ne=L.parent;for(;K&≠){if(lt(K)&<(ne)||K.kind===110&&ne.kind===110)return Qm(K)===Qm(ne);if(Ir(K)&&Ir(ne)){if(Qm(K.name)!==Qm(ne.name))return!1;ne=ne.expression,K=K.expression}else if(sa(K)&&sa(ne))ne=ne.expression,K=K.expression;else return!1}}}return jo(L,D)})}function CXt(o,_){for(;cr(o)&&o.operatorToken.kind===56;){if(jo(o.right,function S(D){if(lt(D)){const L=Qm(D);if(L&&L===_)return!0}return jo(D,S)}))return!0;o=o.parent}return!1}function SXt(o){IC(o),Ua(o.statement),a5(o.expression)}function wXt(o){IC(o),a5(o.expression),Ua(o.statement)}function URe(o,_){return o.flags&16384&&ht(_,k.An_expression_of_type_void_cannot_be_tested_for_truthiness),o}function a5(o,_){return URe(fo(o,_),o)}function xXt(o){IC(o)||o.initializer&&o.initializer.kind===261&&p8e(o.initializer),o.initializer&&(o.initializer.kind===261?Jpe(o.initializer):fo(o.initializer)),o.condition&&a5(o.condition),o.incrementor&&fo(o.incrementor),Ua(o.statement),o.locals&&Bx(o)}function kXt(o){Ipt(o);const _=fJ(o);if(o.awaitModifier?_&&bu(_)?on(o.awaitModifier,k.for_await_loops_cannot_be_used_inside_a_class_static_block):(ad(_)&6)===2&&ue<5&&$d(o,16384):Y.downlevelIteration&&ue<2&&$d(o,256),o.initializer.kind===261)Jpe(o.initializer);else{const v=o.initializer,S=MY(o);if(v.kind===209||v.kind===210)vN(v,S||$e);else{const D=fo(v);Yj(v,k.The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access,k.The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access),S&&Ox(S,D,v,o.expression)}}Ua(o.statement),o.locals&&Bx(o)}function TXt(o){Ipt(o);const _=tRe(fo(o.expression));if(o.initializer.kind===261){const v=o.initializer.declarations[0];v&&Qo(v.name)&&ht(v.name,k.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern),Jpe(o.initializer)}else{const v=o.initializer,S=fo(v);v.kind===209||v.kind===210?ht(v,k.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern):ba(Zzt(_),S)?Yj(v,k.The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access,k.The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access):ht(v,k.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any)}(_===rn||!jf(_,126091264))&&ht(o.expression,k.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0,Un(_)),Ua(o.statement),o.locals&&Bx(o)}function MY(o){const _=o.awaitModifier?15:13;return YS(_,WO(o.expression),wi,o.expression)}function YS(o,_,v,S){return Al(_)?_:qRe(o,_,v,S,!0)||Je}function qRe(o,_,v,S,D){const L=(o&2)!==0;if(_===rn){S&&QRe(S,_,L);return}const B=ue>=2,K=!B&&Y.downlevelIteration,ne=Y.noUncheckedIndexedAccess&&!!(o&128);if(B||K||L){const Dt=Kpe(_,o,B?S:void 0);if(D&&Dt){const Vt=o&8?k.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0:o&32?k.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0:o&64?k.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0:o&16?k.Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0:void 0;Vt&&Dh(v,Dt.nextType,S,Vt)}if(Dt||B)return ne?Uj(Dt&&Dt.yieldType):Dt&&Dt.yieldType}let ae=_,Ce=!1;if(o&4){if(ae.flags&1048576){const Dt=_.types,Vt=Ri(Dt,Kt=>!(Kt.flags&402653316));Vt!==Dt&&(ae=es(Vt,2))}else ae.flags&402653316&&(ae=rn);if(Ce=ae!==_,Ce&&ae.flags&131072)return ne?Uj(tt):tt}if(!XS(ae)){if(S){const Dt=!!(o&4)&&!Ce,[Vt,Kt]=Ve(Dt,K);m2(S,Kt&&!!r5(ae),Vt,Un(ae))}return Ce?ne?Uj(tt):tt:void 0}const qe=F2(ae,Ae);if(Ce&&qe)return qe.flags&402653316&&!Y.noUncheckedIndexedAccess?tt:es(ne?[qe,tt,wi]:[qe,tt],2);return o&128?Uj(qe):qe;function Ve(Dt,Vt){var Kt;return Vt?Dt?[k.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator,!0]:[k.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator,!0]:$Re(o,0,_,void 0)?[k.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher,!1]:DXt((Kt=_.symbol)==null?void 0:Kt.escapedName)?[k.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher,!0]:Dt?[k.Type_0_is_not_an_array_type_or_a_string_type,!0]:[k.Type_0_is_not_an_array_type,!0]}}function DXt(o){switch(o){case"Float32Array":case"Float64Array":case"Int16Array":case"Int32Array":case"Int8Array":case"NodeList":case"Uint16Array":case"Uint32Array":case"Uint8Array":case"Uint8ClampedArray":return!0}return!1}function $Re(o,_,v,S){if(Al(v))return;const D=Kpe(v,o,S);return D&&D[DKe(_)]}function ew(o=rn,_=rn,v=Gt){if(o.flags&67359327&&_.flags&180227&&v.flags&180227){const S=Jm([o,_,v]);let D=Zr.get(S);return D||(D={yieldType:o,returnType:_,nextType:v},Zr.set(S,D)),D}return{yieldType:o,returnType:_,nextType:v}}function A_t(o){let _,v,S;for(const D of o)if(!(D===void 0||D===Fi)){if(D===br)return br;_=xi(_,D.yieldType),v=xi(v,D.returnType),S=xi(S,D.nextType)}return _||v||S?ew(_&&es(_),v&&es(v),S&&Fa(S)):Fi}function Gpe(o,_){return o[_]}function pb(o,_,v){return o[_]=v}function Kpe(o,_,v){var S,D;if(Al(o))return br;if(!(o.flags&1048576)){const ae=v?{errors:void 0}:void 0,Ce=O_t(o,_,v,ae);if(Ce===Fi){if(v){const qe=QRe(v,o,!!(_&2));ae!=null&&ae.errors&&fa(qe,...ae.errors)}return}else if((S=ae==null?void 0:ae.errors)!=null&&S.length)for(const qe of ae.errors)vl.add(qe);return Ce}const L=_&2?"iterationTypesOfAsyncIterable":"iterationTypesOfIterable",B=Gpe(o,L);if(B)return B===Fi?void 0:B;let K;for(const ae of o.types){const Ce=v?{errors:void 0}:void 0,qe=O_t(ae,_,v,Ce);if(qe===Fi){if(v){const Ve=QRe(v,o,!!(_&2));Ce!=null&&Ce.errors&&fa(Ve,...Ce.errors)}pb(o,L,Fi);return}else if((D=Ce==null?void 0:Ce.errors)!=null&&D.length)for(const Ve of Ce.errors)vl.add(Ve);K=xi(K,qe)}const ne=K?A_t(K):Fi;return pb(o,L,ne),ne===Fi?void 0:ne}function JRe(o,_){if(o===Fi)return Fi;if(o===br)return br;const{yieldType:v,returnType:S,nextType:D}=o;return _&&xOe(!0),ew(yN(v,_)||Je,yN(S,_)||Je,D)}function O_t(o,_,v,S){if(Al(o))return br;let D=!1;if(_&2){const L=GRe(o,ql)||R_t(o,ql);if(L)if(L===Fi&&v)D=!0;else return _&8?JRe(L,v):L}if(_&1){let L=GRe(o,Xc)||R_t(o,Xc);if(L)if(L===Fi&&v)D=!0;else if(_&2){if(L!==Fi)return L=JRe(L,v),D?L:pb(o,"iterationTypesOfAsyncIterable",L)}else return L}if(_&2){const L=KRe(o,ql,v,S,D);if(L!==Fi)return L}if(_&1){let L=KRe(o,Xc,v,S,D);if(L!==Fi)return _&2?(L=JRe(L,v),D?L:pb(o,"iterationTypesOfAsyncIterable",L)):L}return Fi}function GRe(o,_){return Gpe(o,_.iterableCacheKey)}function M_t(o,_){const v=GRe(o,_)||KRe(o,_,void 0,void 0,!1);return v===Fi?xs:v}function R_t(o,_){let v;if(Tx(o,v=_.getGlobalIterableType(!1))||Tx(o,v=_.getGlobalIterableIteratorType(!1))){const[S]=Nc(o),{returnType:D,nextType:L}=M_t(v,_);return pb(o,_.iterableCacheKey,ew(_.resolveIterationType(S,void 0)||S,_.resolveIterationType(D,void 0)||D,L))}if(Tx(o,_.getGlobalGeneratorType(!1))){const[S,D,L]=Nc(o);return pb(o,_.iterableCacheKey,ew(_.resolveIterationType(S,void 0)||S,_.resolveIterationType(D,void 0)||D,L))}}function F_t(o){const _=fut(!1),v=_&&Eu(Qn(_),du(o));return v&&Pm(v)?Am(v):`__@${o}`}function KRe(o,_,v,S,D){const L=ya(o,F_t(_.iteratorSymbolName)),B=L&&!(L.flags&16777216)?Qn(L):void 0;if(Al(B))return D?br:pb(o,_.iterableCacheKey,br);const K=B?ea(B,0):void 0;if(!Rt(K))return D?Fi:pb(o,_.iterableCacheKey,Fi);const ne=Fa(Yt(K,Ol)),ae=B_t(ne,_,v,S,D)??Fi;return D?ae:pb(o,_.iterableCacheKey,ae)}function QRe(o,_,v){const S=v?k.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:k.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator,D=!!r5(_)||!v&&hV(o.parent)&&o.parent.expression===o&&D_e(!1)!==za&&ba(_,D_e(!1));return m2(o,D,S,Un(_))}function EXt(o,_,v,S){return B_t(o,_,v,S,!1)}function B_t(o,_,v,S,D){if(Al(o))return br;let L=W_t(o,_)||IXt(o,_);return L===Fi&&v&&(L=void 0,D=!0),L??(L=H_t(o,_,v,S,D)),L===Fi?void 0:L}function W_t(o,_){return Gpe(o,_.iteratorCacheKey)}function IXt(o,_){const v=_.getGlobalIterableIteratorType(!1);if(Tx(o,v)){const[S]=Nc(o),D=W_t(v,_)||H_t(v,_,void 0,void 0,!1),{returnType:L,nextType:B}=D===Fi?xs:D;return pb(o,_.iteratorCacheKey,ew(S,L,B))}if(Tx(o,_.getGlobalIteratorType(!1))||Tx(o,_.getGlobalGeneratorType(!1))){const[S,D,L]=Nc(o);return pb(o,_.iteratorCacheKey,ew(S,D,L))}}function V_t(o,_){const v=Eu(o,"done")||Qt;return ba(_===0?Qt:fi,v)}function NXt(o){return V_t(o,0)}function LXt(o){return V_t(o,1)}function PXt(o){if(Al(o))return br;const _=Gpe(o,"iterationTypesOfIteratorResult");if(_)return _;if(Tx(o,czt(!1))){const B=Nc(o)[0];return pb(o,"iterationTypesOfIteratorResult",ew(B,void 0,void 0))}if(Tx(o,uzt(!1))){const B=Nc(o)[0];return pb(o,"iterationTypesOfIteratorResult",ew(void 0,B,void 0))}const v=ud(o,NXt),S=v!==rn?Eu(v,"value"):void 0,D=ud(o,LXt),L=D!==rn?Eu(D,"value"):void 0;return!S&&!L?pb(o,"iterationTypesOfIteratorResult",Fi):pb(o,"iterationTypesOfIteratorResult",ew(S,L||or,void 0))}function XRe(o,_,v,S,D){var L,B,K,ne;const ae=ya(o,v);if(!ae&&v!=="next")return;const Ce=ae&&!(v==="next"&&ae.flags&16777216)?v==="next"?Qn(ae):Gm(Qn(ae),2097152):void 0;if(Al(Ce))return v==="next"?br:Cs;const qe=Ce?ea(Ce,0):x;if(qe.length===0){if(S){const en=v==="next"?_.mustHaveANextMethodDiagnostic:_.mustBeAMethodDiagnostic;D?(D.errors??(D.errors=[]),D.errors.push(Kn(S,en,v))):ht(S,en,v)}return v==="next"?Fi:void 0}if(Ce!=null&&Ce.symbol&&qe.length===1){const en=_.getGlobalGeneratorType(!1),vn=_.getGlobalIteratorType(!1),In=((B=(L=en.symbol)==null?void 0:L.members)==null?void 0:B.get(v))===Ce.symbol,Nr=!In&&((ne=(K=vn.symbol)==null?void 0:K.members)==null?void 0:ne.get(v))===Ce.symbol;if(In||Nr){const zr=In?en:vn,{mapper:Ur}=Ce;return ew(QS(zr.typeParameters[0],Ur),QS(zr.typeParameters[1],Ur),v==="next"?QS(zr.typeParameters[2],Ur):void 0)}}let Ve,Dt;for(const en of qe)v!=="throw"&&Rt(en.parameters)&&(Ve=xi(Ve,fv(en,0))),Dt=xi(Dt,Ol(en));let Vt,Kt;if(v!=="throw"){const en=Ve?es(Ve):Gt;if(v==="next")Kt=en;else if(v==="return"){const vn=_.resolveIterationType(en,S)||Je;Vt=xi(Vt,vn)}}let Wi;const qi=Dt?Fa(Dt):rn,An=_.resolveIterationType(qi,S)||Je,Cr=PXt(An);return Cr===Fi?(S&&(D?(D.errors??(D.errors=[]),D.errors.push(Kn(S,_.mustHaveAValueDiagnostic,v))):ht(S,_.mustHaveAValueDiagnostic,v)),Wi=Je,Vt=xi(Vt,Je)):(Wi=Cr.yieldType,Vt=xi(Vt,Cr.returnType)),ew(Wi,es(Vt),Kt)}function H_t(o,_,v,S,D){const L=A_t([XRe(o,_,"next",v,S),XRe(o,_,"return",v,S),XRe(o,_,"throw",v,S)]);return D?L:pb(o,_.iteratorCacheKey,L)}function zD(o,_,v){if(Al(_))return;const S=ZRe(_,v);return S&&S[DKe(o)]}function ZRe(o,_){if(Al(o))return br;const v=_?2:1,S=_?ql:Xc;return Kpe(o,v,void 0)||EXt(o,S,void 0,void 0)}function AXt(o){IC(o)||qYt(o)}function RY(o,_){const v=!!(_&1),S=!!(_&2);if(v){const D=zD(1,o,S);return D?S?ZS(s5(D)):D:$e}return S?ZS(o)||$e:o}function j_t(o,_){const v=RY(_,ad(o));return!!(v&&(Fu(v,16384)||v.flags&32769))}function OXt(o){if(IC(o))return;const _=fJ(o);if(_&&bu(_)){Df(o,k.A_return_statement_cannot_be_used_inside_a_class_static_block);return}if(!_){Df(o,k.A_return_statement_can_only_be_used_within_a_function_body);return}const v=Mg(_),S=Ol(v),D=ad(_);if(be||o.expression||S.flags&131072){const L=o.expression?Vu(o.expression):wi;if(_.kind===178)o.expression&&ht(o,k.Setters_cannot_return_a_value);else if(_.kind===176)o.expression&&!Ox(L,S,o,o.expression)&&ht(o,k.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);else if(EO(_)){const B=RY(S,D)??S,K=D&2?rz(L,!1,o,k.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member):L;B&&Ox(K,B,o,o.expression)}}else _.kind!==176&&Y.noImplicitReturns&&!j_t(_,S)&&ht(o,k.Not_all_code_paths_return_a_value)}function MXt(o){IC(o)||o.flags&65536&&Df(o,k.with_statements_are_not_allowed_in_an_async_function_block),fo(o.expression);const _=_n(o);if(!Wx(_)){const v=R1(_,o.pos).start,S=o.statement.pos;UD(_,v,S-v,k.The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any)}}function RXt(o){IC(o);let _,v=!1;const S=fo(o.expression);W(o.caseBlock.clauses,D=>{D.kind===297&&!v&&(_===void 0?_=D:(on(D,k.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement),v=!0)),D.kind===296&&a(L(D)),W(D.statements,Ua),Y.noFallthroughCasesInSwitch&&D.fallthroughFlowNode&&nY(D.fallthroughFlowNode)&&ht(D,k.Fallthrough_case_in_switch);function L(B){return()=>{const K=fo(B.expression);PRe(S,K)||cdt(K,S,B.expression,void 0)}}}),o.caseBlock.locals&&Bx(o.caseBlock)}function FXt(o){IC(o)||Xi(o.parent,_=>Bo(_)?"quit":_.kind===256&&_.label.escapedText===o.label.escapedText?(on(o.label,k.Duplicate_label_0,yu(o.label)),!0):!1),Ua(o.statement)}function BXt(o){IC(o)||lt(o.expression)&&!o.expression.escapedText&&oei(o,k.Line_break_not_permitted_here),o.expression&&fo(o.expression)}function WXt(o){IC(o),$pe(o.tryBlock);const _=o.catchClause;if(_){if(_.variableDeclaration){const v=_.variableDeclaration;OY(v);const S=hd(v);if(S){const D=As(S);D&&!(D.flags&3)&&Df(S,k.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified)}else if(v.initializer)Df(v.initializer,k.Catch_clause_variable_cannot_have_an_initializer);else{const D=_.block.locals;D&&Bb(_.locals,L=>{const B=D.get(L);B!=null&&B.valueDeclaration&&B.flags&2&&on(B.valueDeclaration,k.Cannot_redeclare_identifier_0_in_catch_clause,Ws(L))})}}$pe(_.block)}o.finallyBlock&&$pe(o.finallyBlock)}function Qpe(o,_,v){const S=Xh(o);if(S.length===0)return;for(const L of Ex(o))v&&L.flags&4194304||z_t(o,L,PA(L,8576,!0),kx(L));const D=_.valueDeclaration;if(D&&ss(D)){for(const L of D.members)if(!da(L)&&!TO(L)){const B=wr(L);z_t(o,B,zf(L.name.expression),kx(B))}}if(S.length>1)for(const L of S)VXt(o,L)}function z_t(o,_,v,S){const D=_.valueDeclaration,L=ko(D);if(L&&Vs(L))return;const B=oOe(o,v),K=Rr(o)&2?Jc(o.symbol,264):void 0,ne=D&&D.kind===226||L&&L.kind===167?D:void 0,ae=Vf(_)===o.symbol?D:void 0;for(const Ce of B){const qe=Ce.declaration&&Vf(wr(Ce.declaration))===o.symbol?Ce.declaration:void 0,Ve=ae||qe||(K&&!Rt(Yr(o),Dt=>!!LD(Dt,_.escapedName)&&!!F2(Dt,Ce.keyType))?K:void 0);if(Ve&&!ba(S,Ce.type)){const Dt=WI(Ve,k.Property_0_of_type_1_is_not_assignable_to_2_index_type_3,Js(_),Un(S),Un(Ce.keyType),Un(Ce.type));ne&&Ve!==ne&&fa(Dt,Kn(ne,k._0_is_declared_here,Js(_))),vl.add(Dt)}}}function VXt(o,_){const v=_.declaration,S=oOe(o,_.keyType),D=Rr(o)&2?Jc(o.symbol,264):void 0,L=v&&Vf(wr(v))===o.symbol?v:void 0;for(const B of S){if(B===_)continue;const K=B.declaration&&Vf(wr(B.declaration))===o.symbol?B.declaration:void 0,ne=L||K||(D&&!Rt(Yr(o),ae=>!!hb(ae,_.keyType)&&!!F2(ae,B.keyType))?D:void 0);ne&&!ba(_.type,B.type)&&ht(ne,k._0_index_type_1_is_not_assignable_to_2_index_type_3,Un(_.keyType),Un(_.type),Un(B.keyType),Un(B.type))}}function l5(o,_){switch(o.escapedText){case"any":case"unknown":case"never":case"number":case"bigint":case"boolean":case"string":case"symbol":case"void":case"object":case"undefined":ht(o,_,o.escapedText)}}function HXt(o){ue>=1&&o.escapedText==="Object"&&(te<5||_n(o).impliedNodeFormat===1)&&ht(o,k.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0,yB[te])}function jXt(o){const _=Ri(Tk(o),em);if(!O(_))return;const v=Xn(o),S=new Set,D=new Set;if(W(o.parameters,({name:B},K)=>{lt(B)&&S.add(B.escapedText),Qo(B)&&D.add(K)}),uOe(o)){const B=_.length-1,K=_[B];v&&K&<(K.name)&&K.typeExpression&&K.typeExpression.type&&!S.has(K.name.escapedText)&&!D.has(B)&&!_m(As(K.typeExpression.type))&&ht(K.name,k.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type,dr(K.name))}else W(_,({name:B,isNameFirst:K},ne)=>{D.has(ne)||lt(B)&&S.has(B.escapedText)||(__(B)?v&&ht(B,k.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1,kp(B),kp(B.left)):K||rf(v,B,k.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name,dr(B)))})}function FY(o){let _=!1;if(o)for(let S=0;S{S.default?(_=!0,zXt(S.default,o,D)):_&&ht(S,k.Required_type_parameters_may_not_follow_optional_type_parameters);for(let L=0;LS)return!1;for(let ne=0;ne_d(v)&&Fh(v))&&on(_,k.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator),!o.name&&!Kr(o,2048)&&Df(o,k.A_class_declaration_without_the_default_modifier_must_have_a_name),J_t(o),W(o.members,Ua),Bx(o)}function J_t(o){NYt(o),LY(o),o5(o,o.name),FY(Bw(o)),iz(o);const _=wr(o),v=vc(_),S=Wp(v),D=Qn(_);U_t(_),zpe(_),aQt(o),!!(o.flags&33554432)||lQt(o);const B=Pv(o);if(B){W(B.typeArguments,Ua),ue<2&&$d(B.parent,1);const ae=MT(o);ae&&ae!==B&&fo(ae.expression);const Ce=Yr(v);Ce.length&&a(()=>{const qe=Ce[0],Ve=ln(v),Dt=Qh(Ve);if(KXt(Dt,B),Ua(B.expression),Rt(B.typeArguments)){W(B.typeArguments,Ua);for(const Kt of h_e(Dt,B.typeArguments,B))if(!g_t(B,Kt.typeParameters))break}const Vt=Wp(qe,v.thisType);if(Dh(S,Vt,void 0)?Dh(D,ndt(Dt),o.name||o,k.Class_static_side_0_incorrectly_extends_base_class_static_side_1):Q_t(o,S,Vt,k.Class_0_incorrectly_extends_base_class_1),Ve.flags&8650752&&(yZ(D)?ea(Ve,1).some(Wi=>Wi.flags&4)&&!Kr(o,64)&&ht(o.name||o,k.A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract):ht(o.name||o,k.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any)),!(Dt.symbol&&Dt.symbol.flags&32)&&!(Ve.flags&8650752)){const Kt=R2(Dt,B.typeArguments,B);W(Kt,Wi=>!h1(Wi.declaration)&&!SC(Ol(Wi),qe))&&ht(B.expression,k.Base_constructors_must_all_have_the_same_return_type)}ZXt(v,qe)})}GXt(o,v,S,D);const K=H6(o);if(K)for(const ae of K)(!pc(ae.expression)||ph(ae.expression))&&ht(ae.expression,k.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments),BRe(ae),a(ne(ae));a(()=>{Qpe(v,_),Qpe(D,_,!0),RRe(o),tZt(o)});function ne(ae){return()=>{const Ce=cv(As(ae));if(!_l(Ce))if(of(Ce)){const qe=Ce.symbol&&Ce.symbol.flags&32?k.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:k.Class_0_incorrectly_implements_interface_1,Ve=Wp(Ce,v.thisType);Dh(S,Ve,void 0)||Q_t(o,S,Ve,qe)}else ht(ae,k.A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members)}}}function GXt(o,_,v,S){const L=Pv(o)&&Yr(_),B=L!=null&&L.length?Wp(ma(L),_.thisType):void 0,K=ln(_);for(const ne of o.members)Eoe(ne)||(fu(ne)&&W(ne.parameters,ae=>{xp(ae,ne)&&G_t(o,S,K,B,_,v,ae,!0)}),G_t(o,S,K,B,_,v,ne,!1))}function G_t(o,_,v,S,D,L,B,K,ne=!0){const ae=B.name&&Qm(B.name)||Qm(B);return ae?K_t(o,_,v,S,D,L,VJ(B),WT(B),da(B),K,xu(ae),ne?B:void 0):0}function K_t(o,_,v,S,D,L,B,K,ne,ae,Ce,qe){const Ve=Xn(o),Dt=!!(o.flags&33554432);if(S&&(B||Y.noImplicitOverride)){const Vt=du(Ce),Kt=ne?_:L,Wi=ne?v:S,qi=ya(Kt,Vt),An=ya(Wi,Vt),Cr=Un(S);if(qi&&!An&&B){if(qe){const en=oht(Ce,Wi);en?ht(qe,Ve?k.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:k.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1,Cr,Js(en)):ht(qe,Ve?k.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0:k.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0,Cr)}return 2}else if(qi&&(An!=null&&An.declarations)&&Y.noImplicitOverride&&!Dt){const en=Rt(An.declarations,WT);if(B)return 0;if(en){if(K&&en)return qe&&ht(qe,k.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0,Cr),1}else{if(qe){const vn=ae?Ve?k.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:k.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0:Ve?k.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:k.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0;ht(qe,vn,Cr)}return 1}}}else if(B){if(qe){const Vt=Un(D);ht(qe,Ve?k.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class:k.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class,Vt)}return 2}return 0}function Q_t(o,_,v,S){let D=!1;for(const L of o.members){if(da(L))continue;const B=L.name&&Qm(L.name)||Qm(L);if(B){const K=ya(_,B.escapedName),ne=ya(v,B.escapedName);if(K&&ne){const ae=()=>Ro(void 0,k.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2,Js(B),Un(_),Un(v));Dh(Qn(K),Qn(ne),L.name||L,void 0,ae)||(D=!0)}}}D||Dh(_,v,o.name||o,S)}function KXt(o,_){const v=ea(o,1);if(v.length){const S=v[0].declaration;if(S&&Ep(S,2)){const D=Ub(o.symbol);r8e(_,D)||ht(_,k.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private,r1(o.symbol))}}}function QXt(o,_,v){if(!_.name)return 0;const S=wr(o),D=vc(S),L=Wp(D),B=Qn(S),ne=Pv(o)&&Yr(D),ae=ne!=null&&ne.length?Wp(ma(ne),D.thisType):void 0,Ce=ln(D),qe=_.parent?VJ(_):Kr(_,16);return K_t(o,B,Ce,ae,D,L,qe,WT(_),da(_),!1,xu(v))}function UO(o){return Pu(o)&1?o.links.target:o}function XXt(o){return Ri(o.declarations,_=>_.kind===263||_.kind===264)}function ZXt(o,_){var v,S,D,L,B;const K=Nl(_),ne=new Map;e:for(const ae of K){const Ce=UO(ae);if(Ce.flags&4194304)continue;const qe=LD(o,Ce.escapedName);if(!qe)continue;const Ve=UO(qe),Dt=Qg(Ce);if(z.assert(!!Ve,"derived should point to something, even if it is the base class' declaration."),Ve===Ce){const Vt=Ub(o.symbol);if(Dt&64&&(!Vt||!Kr(Vt,64))){for(const Cr of Yr(o)){if(Cr===_)continue;const en=LD(Cr,Ce.escapedName),vn=en&&UO(en);if(vn&&vn!==Ce)continue e}const Kt=Un(_),Wi=Un(o),qi=Js(ae),An=xi((v=ne.get(Vt))==null?void 0:v.missedProperties,qi);ne.set(Vt,{baseTypeName:Kt,typeName:Wi,missedProperties:An})}}else{const Vt=Qg(Ve);if(Dt&2||Vt&2)continue;let Kt;const Wi=Ce.flags&98308,qi=Ve.flags&98308;if(Wi&&qi){if((Pu(Ce)&6?(S=Ce.declarations)!=null&&S.some(en=>X_t(en,Dt)):(D=Ce.declarations)!=null&&D.every(en=>X_t(en,Dt)))||Pu(Ce)&262144||Ve.valueDeclaration&&cr(Ve.valueDeclaration))continue;const An=Wi!==4&&qi===4;if(An||Wi===4&&qi!==4){const en=An?k._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property:k._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor;ht(ko(Ve.valueDeclaration)||Ve.valueDeclaration,en,Js(Ce),Un(_),Un(o))}else if(oe){const en=(L=Ve.declarations)==null?void 0:L.find(vn=>vn.kind===172&&!vn.initializer);if(en&&!(Ve.flags&33554432)&&!(Dt&64)&&!(Vt&64)&&!((B=Ve.declarations)!=null&&B.some(vn=>!!(vn.flags&33554432)))){const vn=tV(Ub(o.symbol)),In=en.name;if(en.exclamationToken||!vn||!lt(In)||!be||!Y_t(In,o,vn)){const Nr=k.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration;ht(ko(Ve.valueDeclaration)||Ve.valueDeclaration,Nr,Js(Ce),Un(_))}}}continue}else if(YMe(Ce)){if(YMe(Ve)||Ve.flags&4)continue;z.assert(!!(Ve.flags&98304)),Kt=k.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor}else Ce.flags&98304?Kt=k.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:Kt=k.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function;ht(ko(Ve.valueDeclaration)||Ve.valueDeclaration,Kt,Un(_),Js(Ce),Un(o))}}for(const[ae,Ce]of ne)if(O(Ce.missedProperties)===1)wd(ae)?ht(ae,k.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1,ma(Ce.missedProperties),Ce.baseTypeName):ht(ae,k.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,Ce.typeName,ma(Ce.missedProperties),Ce.baseTypeName);else if(O(Ce.missedProperties)>5){const qe=Yt(Ce.missedProperties.slice(0,4),Dt=>`'${Dt}'`).join(", "),Ve=O(Ce.missedProperties)-4;wd(ae)?ht(ae,k.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more,Ce.baseTypeName,qe,Ve):ht(ae,k.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more,Ce.typeName,Ce.baseTypeName,qe,Ve)}else{const qe=Yt(Ce.missedProperties,Ve=>`'${Ve}'`).join(", ");wd(ae)?ht(ae,k.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1,Ce.baseTypeName,qe):ht(ae,k.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2,Ce.typeName,Ce.baseTypeName,qe)}}function X_t(o,_){return _&64&&(!To(o)||!o.initializer)||Ff(o.parent)}function YXt(o,_,v){if(!O(_))return v;const S=new Map;W(v,D=>{S.set(D.escapedName,D)});for(const D of _){const L=Nl(Wp(D,o.thisType));for(const B of L){const K=S.get(B.escapedName);K&&B.parent===K.parent&&S.delete(B.escapedName)}}return Fn(S.values())}function eZt(o,_){const v=Yr(o);if(v.length<2)return!0;const S=new Map;W(q3e(o).declaredProperties,L=>{S.set(L.escapedName,{prop:L,containingType:o})});let D=!0;for(const L of v){const B=Nl(Wp(L,o.thisType));for(const K of B){const ne=S.get(K.escapedName);if(!ne)S.set(K.escapedName,{prop:K,containingType:L});else if(ne.containingType!==o&&!sqt(ne.prop,K)){D=!1;const Ce=Un(ne.containingType),qe=Un(L);let Ve=Ro(void 0,k.Named_property_0_of_types_1_and_2_are_not_identical,Js(K),Ce,qe);Ve=Ro(Ve,k.Interface_0_cannot_simultaneously_extend_types_1_and_2,Un(o),Ce,qe),vl.add($y(_n(_),_,Ve))}}}return D}function tZt(o){if(!be||!Ee||o.flags&33554432)return;const _=tV(o);for(const v of o.members)if(!(Wh(v)&128)&&!da(v)&&Z_t(v)){const S=v.name;if(lt(S)||Vs(S)||Ja(S)){const D=Qn(wr(v));D.flags&3||OO(D)||(!_||!Y_t(S,D,_))&&ht(v.name,k.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor,sc(S))}}}function Z_t(o){return o.kind===172&&!WT(o)&&!o.exclamationToken&&!o.initializer}function iZt(o,_,v,S,D){for(const L of v)if(L.pos>=S&&L.pos<=D){const B=G.createPropertyAccessExpression(G.createThis(),o);ml(B.expression,B),ml(B,L),B.flowNode=L.returnFlowNode;const K=EC(B,_,Rx(_));if(!OO(K))return!0}return!1}function Y_t(o,_,v){const S=Ja(o)?G.createElementAccessExpression(G.createThis(),o.expression):G.createPropertyAccessExpression(G.createThis(),o);ml(S.expression,S),ml(S,v),S.flowNode=v.returnFlowNode;const D=EC(S,_,Rx(_));return!OO(D)}function nZt(o){gb(o)||FYt(o),FY(o.typeParameters),a(()=>{l5(o.name,k.Interface_name_cannot_be_0),iz(o);const _=wr(o);U_t(_);const v=Jc(_,264);if(o===v){const S=vc(_),D=Wp(S);if(eZt(S,o.name)){for(const L of Yr(S))Dh(D,Wp(L,S.thisType),o.name,k.Interface_0_incorrectly_extends_interface_1);Qpe(S,_)}}f_t(o)}),W(I8(o),_=>{(!pc(_.expression)||ph(_.expression))&&ht(_.expression,k.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments),BRe(_)}),W(o.members,Ua),a(()=>{RRe(o),Bx(o)})}function rZt(o){gb(o),l5(o.name,k.Type_alias_name_cannot_be_0),iz(o),FY(o.typeParameters),o.type.kind===141?(!Gle.has(o.name.escapedText)||O(o.typeParameters)!==1)&&ht(o.type,k.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types):(Ua(o.type),Bx(o))}function ept(o){const _=Tr(o);if(!(_.flags&1024)){_.flags|=1024;let v=0,S;for(const D of o.members){const L=sZt(D,v,S);Tr(D).enumMemberValue=L,v=typeof L.value=="number"?L.value+1:void 0,S=D}}}function sZt(o,_,v){if(YB(o.name))ht(o.name,k.Computed_property_names_are_not_allowed_in_enums);else{const S=UL(o.name);Yy(S)&&!n7(S)&&ht(o.name,k.An_enum_member_cannot_have_a_numeric_name)}if(o.initializer)return oZt(o);if(o.parent.flags&33554432&&!ET(o.parent))return Hd(void 0);if(_===void 0)return ht(o.name,k.Enum_member_must_have_initializer),Hd(void 0);if(Xg(Y)&&(v!=null&&v.initializer)){const S=bN(v);typeof S.value=="number"&&!S.resolvedOtherFiles||ht(o.name,k.Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled)}return Hd(_)}function oZt(o){const _=ET(o.parent),v=o.initializer,S=We(v,o);return S.value!==void 0?_&&typeof S.value=="number"&&!isFinite(S.value)?ht(v,isNaN(S.value)?k.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:k.const_enum_member_initializer_was_evaluated_to_a_non_finite_value):Xg(Y)&&typeof S.value=="string"&&!S.isSyntacticallyString&&ht(v,k._0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled,`${dr(o.parent.name)}.${UL(o.name)}`):_?ht(v,k.const_enum_member_initializers_must_be_constant_expressions):o.parent.flags&33554432?ht(v,k.In_ambient_enum_declarations_member_initializer_must_be_constant_expression):Dh(fo(v),Ae,v,k.Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values),S}function tpt(o,_){const v=Du(o,111551,!0);if(!v)return Hd(void 0);if(o.kind===80){const S=o;if(n7(S.escapedText)&&v===PO(S.escapedText,111551,void 0))return Hd(+S.escapedText,!1)}if(v.flags&8)return _?ipt(o,v,_):bN(v.valueDeclaration);if(VA(v)){const S=v.valueDeclaration;if(S&&ds(S)&&!S.type&&S.initializer&&(!_||S!==_&&b0(S,_))){const D=We(S.initializer,S);return _&&_n(_)!==_n(S)?Hd(D.value,!1,!0,!0):Hd(D.value,D.isSyntacticallyString,D.resolvedOtherFiles,!0)}}return Hd(void 0)}function aZt(o,_){const v=o.expression;if(pc(v)&&Ml(o.argumentExpression)){const S=Du(v,111551,!0);if(S&&S.flags&384){const D=du(o.argumentExpression.text),L=S.exports.get(D);if(L)return z.assert(_n(L.valueDeclaration)===_n(S.valueDeclaration)),_?ipt(o,L,_):bN(L.valueDeclaration)}}return Hd(void 0)}function ipt(o,_,v){const S=_.valueDeclaration;if(!S||S===v)return ht(o,k.Property_0_is_used_before_being_assigned,Js(_)),Hd(void 0);if(!b0(S,v))return ht(o,k.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums),Hd(0);const D=bN(S);return v.parent!==S.parent?Hd(D.value,D.isSyntacticallyString,D.resolvedOtherFiles,!0):D}function lZt(o){a(()=>cZt(o))}function cZt(o){gb(o),o5(o,o.name),iz(o),o.members.forEach(uZt),ept(o);const _=wr(o),v=Jc(_,o.kind);if(o===v){if(_.declarations&&_.declarations.length>1){const D=ET(o);W(_.declarations,L=>{Uk(L)&&ET(L)!==D&&ht(ko(L),k.Enum_declarations_must_all_be_const_or_non_const)})}let S=!1;W(_.declarations,D=>{if(D.kind!==266)return!1;const L=D;if(!L.members.length)return!1;const B=L.members[0];B.initializer||(S?ht(B.name,k.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element):S=!0)})}}function uZt(o){Vs(o.name)&&ht(o,k.An_enum_member_cannot_be_named_with_a_private_identifier),o.initializer&&fo(o.initializer)}function dZt(o){const _=o.declarations;if(_){for(const v of _)if((v.kind===263||v.kind===262&&Tm(v.body))&&!(v.flags&33554432))return v}}function fZt(o,_){const v=j0(o),S=j0(_);return nS(v)?nS(S):nS(S)?!1:v===S}function hZt(o){o.body&&(Ua(o.body),Iv(o)||Bx(o)),a(_);function _(){var v,S;const D=Iv(o),L=o.flags&33554432;D&&!L&&ht(o.name,k.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context);const B=Bh(o),K=B?k.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:k.A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module;if(BY(o,K))return;gb(o)||!L&&o.name.kind===11&&on(o.name,k.Only_ambient_modules_can_use_quoted_names),lt(o.name)&&o5(o,o.name),iz(o);const ne=wr(o);if(ne.flags&512&&!L&&Kle(o,HT(Y))){if(Xg(Y)&&!_n(o).externalModuleIndicator&&ht(o.name,k.Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement,st),((v=ne.declarations)==null?void 0:v.length)>1){const ae=dZt(ne);ae&&(_n(o)!==_n(ae)?ht(o.name,k.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged):o.posCe.kind===95);ae&&ht(ae,k.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled)}}if(B)if(DT(o)){if((D||wr(o).flags&33554432)&&o.body)for(const Ce of o.body.statements)YRe(Ce,D)}else nS(o.parent)?D?ht(o.name,k.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations):Zd(Im(o.name))&&ht(o.name,k.Ambient_module_declaration_cannot_specify_relative_module_name):D?ht(o.name,k.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations):ht(o.name,k.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces)}}function YRe(o,_){switch(o.kind){case 243:for(const S of o.declarationList.declarations)YRe(S,_);break;case 277:case 278:Df(o,k.Exports_and_export_assignments_are_not_permitted_in_module_augmentations);break;case 271:case 272:Df(o,k.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module);break;case 208:case 260:const v=o.name;if(Qo(v)){for(const S of v.elements)YRe(S,_);break}case 263:case 266:case 262:case 264:case 267:case 265:if(_)return;break}}function _Zt(o){switch(o.kind){case 80:return o;case 166:do o=o.left;while(o.kind!==80);return o;case 211:do{if(Jy(o.expression)&&!Vs(o.name))return o.name;o=o.expression}while(o.kind!==80);return o}}function Xpe(o){const _=GL(o);if(!_||vu(_))return!1;if(!ja(_))return ht(_,k.String_literal_expected),!1;const v=o.parent.kind===268&&Bh(o.parent.parent);if(o.parent.kind!==307&&!v)return ht(_,o.kind===278?k.Export_declarations_are_not_permitted_in_a_namespace:k.Import_declarations_in_a_namespace_cannot_reference_a_module),!1;if(v&&Zd(_.text)&&!_j(o))return ht(o,k.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name),!1;if(!kd(o)&&o.attributes){const S=o.attributes.token===118?k.Import_attribute_values_must_be_string_literal_expressions:k.Import_assertion_values_must_be_string_literal_expressions;let D=!1;for(const L of o.attributes.elements)ja(L.value)||(D=!0,ht(L.value,S));return!D}return!0}function Zpe(o){var _,v,S,D;let L=wr(o);const B=sf(L);if(B!==Ot){if(L=al(L.exportSymbol||L),Xn(o)&&!(B.flags&111551)&&!Dk(o)){const ae=FL(o)?o.propertyName||o.name:Af(o)?o.name:o;if(z.assert(o.kind!==280),o.kind===281){const Ce=ht(ae,k.Types_cannot_appear_in_export_declarations_in_JavaScript_files),qe=(v=(_=_n(o).symbol)==null?void 0:_.exports)==null?void 0:v.get((o.propertyName||o.name).escapedText);if(qe===B){const Ve=(S=qe.declarations)==null?void 0:S.find(x6);Ve&&fa(Ce,Kn(Ve,k._0_is_automatically_exported_here,Ws(qe.escapedName)))}}else{z.assert(o.kind!==260);const Ce=Xi(o,lg(Cu,kd)),qe=(Ce&&((D=x8(Ce))==null?void 0:D.text))??"...",Ve=Ws(lt(ae)?ae.escapedText:L.escapedName);ht(ae,k._0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation,Ve,`import("${qe}").${Ve}`)}return}const K=op(B),ne=(L.flags&1160127?111551:0)|(L.flags&788968?788968:0)|(L.flags&1920?1920:0);if(K&ne){const ae=o.kind===281?k.Export_declaration_conflicts_with_exported_declaration_of_0:k.Import_declaration_conflicts_with_local_declaration_of_0;ht(o,ae,Js(L))}else o.kind!==281&&Y.isolatedModules&&!Xi(o,Dk)&&L.flags&1160127&&ht(o,k.Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled,Js(L),st);if(Xg(Y)&&!Dk(o)&&!(o.flags&33554432)){const ae=n1(L),Ce=!(K&111551);if(Ce||ae)switch(o.kind){case 273:case 276:case 271:{if(Y.verbatimModuleSyntax){z.assertIsDefined(o.name,"An ImportClause with a symbol should have a name");const qe=Y.verbatimModuleSyntax&&$L(o)?k.An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled:Ce?k._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:k._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled,Ve=dr(o.kind===276&&o.propertyName||o.name);b2(ht(o,qe,Ve),Ce?void 0:ae,Ve)}Ce&&o.kind===271&&Ep(o,32)&&ht(o,k.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled,st);break}case 281:if(Y.verbatimModuleSyntax||_n(ae)!==_n(o)){const qe=dr(o.propertyName||o.name),Ve=Ce?ht(o,k.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type,st):ht(o,k._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled,qe,st);b2(Ve,Ce?void 0:ae,qe);break}}Y.verbatimModuleSyntax&&o.kind!==271&&!Xn(o)&&(te===1||_n(o).impliedNodeFormat===1)&&ht(o,k.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled)}if(m_(o)){const ae=e8e(L,o);am(ae)&&ae.declarations&&oC(o,ae.declarations,ae.escapedName)}}}function e8e(o,_){if(!(o.flags&2097152)||am(o)||!Rp(o))return o;const v=sf(o);if(v===Ot)return v;for(;o.flags&2097152;){const S=bpe(o);if(S){if(S===v)break;if(S.declarations&&O(S.declarations))if(am(S)){oC(_,S.declarations,S.escapedName);break}else{if(o===v)break;o=S}}else break}return v}function Ype(o){o5(o,o.name),Zpe(o),o.kind===276&&dr(o.propertyName||o.name)==="default"&&Xy(Y)&&te!==4&&(te<5||_n(o).impliedNodeFormat===1)&&$d(o,131072)}function t8e(o){var _;const v=o.attributes;if(v){const S=COe(!0);S!==Ps&&Dh(se(v),KZ(S,32768),v);const D=Lce(o),L=T3(v,D?on:void 0),B=o.attributes.token===118;if(D&&L)return;if((te===199&&o.moduleSpecifier&&FS(o.moduleSpecifier))!==99&&te!==99&&te!==200){const ae=B?te===199?k.Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:k.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve:te===199?k.Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:k.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve;return on(v,ae)}if($v(o)||(Cu(o)?(_=o.importClause)==null?void 0:_.isTypeOnly:o.isTypeOnly))return on(v,B?k.Import_attributes_cannot_be_used_with_type_only_imports_or_exports:k.Import_assertions_cannot_be_used_with_type_only_imports_or_exports);if(L)return on(v,k.resolution_mode_can_only_be_set_for_type_only_imports)}}function pZt(o){return Zh(Vu(o.value))}function gZt(o){if(!BY(o,Xn(o)?k.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:k.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)){if(!gb(o)&&o.modifiers&&Df(o,k.An_import_declaration_cannot_have_modifiers),Xpe(o)){const _=o.importClause;_&&!lei(_)&&(_.name&&Ype(_),_.namedBindings&&(_.namedBindings.kind===274?(Ype(_.namedBindings),te!==4&&(te<5||_n(o).impliedNodeFormat===1)&&Xy(Y)&&$d(o,65536)):Gh(o,o.moduleSpecifier)&&W(_.namedBindings.elements,Ype)))}t8e(o)}}function mZt(o){if(!BY(o,Xn(o)?k.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:k.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)&&(gb(o),$L(o)||Xpe(o)))if(Ype(o),HA(o,6),o.moduleReference.kind!==283){const _=sf(wr(o));if(_!==Ot){const v=op(_);if(v&111551){const S=Ip(o.moduleReference);Du(S,112575).flags&1920||ht(S,k.Module_0_is_hidden_by_a_local_declaration_with_the_same_name,sc(S))}v&788968&&l5(o.name,k.Import_name_cannot_be_0)}o.isTypeOnly&&on(o,k.An_import_alias_cannot_use_import_type)}else te>=5&&te!==200&&_n(o).impliedNodeFormat===void 0&&!o.isTypeOnly&&!(o.flags&33554432)&&on(o,k.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead)}function vZt(o){if(!BY(o,Xn(o)?k.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module:k.An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)){if(!gb(o)&&Uxe(o)&&Df(o,k.An_export_declaration_cannot_have_modifiers),yZt(o),!o.moduleSpecifier||Xpe(o))if(o.exportClause&&!H1(o.exportClause)){W(o.exportClause.elements,bZt);const _=o.parent.kind===268&&Bh(o.parent.parent),v=!_&&o.parent.kind===268&&!o.moduleSpecifier&&o.flags&33554432;o.parent.kind!==307&&!_&&!v&&ht(o,k.Export_declarations_are_not_permitted_in_a_namespace)}else{const _=Gh(o,o.moduleSpecifier);_&&E2(_)?ht(o.moduleSpecifier,k.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk,Js(_)):o.exportClause&&Zpe(o.exportClause),te!==4&&(te<5||_n(o).impliedNodeFormat===1)&&(o.exportClause?Xy(Y)&&$d(o,65536):$d(o,32768))}t8e(o)}}function yZt(o){var _;return o.isTypeOnly&&((_=o.exportClause)==null?void 0:_.kind)===279?Fpt(o.exportClause):!1}function BY(o,_){const v=o.parent.kind===307||o.parent.kind===268||o.parent.kind===267;return v||Df(o,_),!v}function bZt(o){if(Zpe(o),fg(Y)&&ED(o.propertyName||o.name,!0),o.parent.parent.moduleSpecifier)Xy(Y)&&te!==4&&(te<5||_n(o).impliedNodeFormat===1)&&dr(o.propertyName||o.name)==="default"&&$d(o,131072);else{const _=o.propertyName||o.name,v=Ui(_,_.escapedText,2998271,void 0,!0);v&&(v===Ye||v===wt||v.declarations&&nS(ZI(v.declarations[0])))?ht(_,k.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module,dr(_)):HA(o,7)}}function CZt(o){const _=o.isExportEquals?k.An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration:k.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration;if(BY(o,_))return;const v=o.parent.kind===307?o.parent:o.parent.parent;if(v.kind===267&&!Bh(v)){o.isExportEquals?ht(o,k.An_export_assignment_cannot_be_used_in_a_namespace):ht(o,k.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);return}!gb(o)&&Doe(o)&&Df(o,k.An_export_assignment_cannot_have_modifiers);const S=hd(o);S&&Dh(Vu(o.expression),As(S),o.expression);const D=!o.isExportEquals&&!(o.flags&33554432)&&Y.verbatimModuleSyntax&&(te===1||_n(o).impliedNodeFormat===1);if(o.expression.kind===80){const L=o.expression,B=eg(Du(L,-1,!0,!0,o));if(B){HA(o,3);const K=n1(B,111551);if(op(B)&111551?(Vu(L),!D&&!(o.flags&33554432)&&Y.verbatimModuleSyntax&&K&&ht(L,o.isExportEquals?k.An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:k.An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration,dr(L))):!D&&!(o.flags&33554432)&&Y.verbatimModuleSyntax&&ht(L,o.isExportEquals?k.An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:k.An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type,dr(L)),!D&&!(o.flags&33554432)&&Xg(Y)&&!(B.flags&111551)){const ne=op(B,!1,!0);B.flags&2097152&&ne&788968&&!(ne&111551)&&(!K||_n(K)!==_n(o))?ht(L,o.isExportEquals?k._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:k._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,dr(L),st):K&&_n(K)!==_n(o)&&b2(ht(L,o.isExportEquals?k._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:k._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,dr(L),st),K,dr(L))}}else Vu(L);fg(Y)&&ED(L,!0)}else Vu(o.expression);D&&ht(o,k.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled),npt(v),o.flags&33554432&&!pc(o.expression)&&on(o.expression,k.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context),o.isExportEquals&&(te>=5&&te!==200&&(o.flags&33554432&&_n(o).impliedNodeFormat===99||!(o.flags&33554432)&&_n(o).impliedNodeFormat!==1)?on(o,k.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead):te===4&&!(o.flags&33554432)&&on(o,k.Export_assignment_is_not_supported_when_module_flag_is_system))}function SZt(o){return hf(o.exports,(_,v)=>v!=="export=")}function npt(o){const _=wr(o),v=Zs(_);if(!v.exportsChecked){const S=_.exports.get("export=");if(S&&SZt(_)){const L=Rp(S)||S.valueDeclaration;L&&!_j(L)&&!Xn(L)&&ht(L,k.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements)}const D=nv(_);D&&D.forEach(({declarations:L,flags:B},K)=>{if(K==="__export"||B&1920)return;const ne=$n(L,u$(BPt,d$(Ff)));if(!(B&524288&&ne<=2)&&ne>1&&!ege(L))for(const ae of L)kKe(ae)&&vl.add(Kn(ae,k.Cannot_redeclare_exported_variable_0,Ws(K)))}),v.exportsChecked=!0}}function ege(o){return o&&o.length>1&&o.every(_=>Xn(_)&&Sc(_)&&(sI(_.expression)||Jy(_.expression)))}function Ua(o){if(o){const _=j;j=o,N=0,wZt(o),j=_}}function wZt(o){kW(o)&&W(o.jsDoc,({comment:v,tags:S})=>{rpt(v),W(S,D=>{rpt(D.comment),Xn(o)&&Ua(D)})});const _=o.kind;if(u)switch(_){case 267:case 263:case 264:case 262:u.throwIfCancellationRequested()}switch(_>=243&&_<=259&&xW(o)&&o.flowNode&&!nY(o.flowNode)&&rf(Y.allowUnreachableCode===!1,o,k.Unreachable_code_detected),_){case 168:return c_t(o);case 169:return u_t(o);case 172:return h_t(o);case 171:return cQt(o);case 185:case 184:case 179:case 180:case 181:return tz(o);case 174:case 173:return uQt(o);case 175:return dQt(o);case 176:return fQt(o);case 177:case 178:return p_t(o);case 183:return BRe(o);case 182:return sQt(o);case 186:return vQt(o);case 187:return yQt(o);case 188:return bQt(o);case 189:return CQt(o);case 192:case 193:return SQt(o);case 196:case 190:case 191:return Ua(o.type);case 197:return TQt(o);case 198:return DQt(o);case 194:return EQt(o);case 195:return IQt(o);case 203:return NQt(o);case 205:return LQt(o);case 202:return PQt(o);case 328:return ZQt(o);case 329:return XQt(o);case 346:case 338:case 340:return HQt(o);case 345:return jQt(o);case 344:return zQt(o);case 324:case 325:case 326:return qQt(o);case 341:return $Qt(o);case 348:return JQt(o);case 317:GQt(o);case 315:case 314:case 312:case 313:case 322:spt(o),jo(o,Ua);return;case 318:xZt(o);return;case 309:return Ua(o.type);case 333:case 335:case 334:return YQt(o);case 350:return UQt(o);case 343:return KQt(o);case 351:return QQt(o);case 199:return wQt(o);case 200:return xQt(o);case 262:return VQt(o);case 241:case 268:return $pe(o);case 243:return mXt(o);case 244:return vXt(o);case 245:return yXt(o);case 246:return SXt(o);case 247:return wXt(o);case 248:return xXt(o);case 249:return TXt(o);case 250:return kXt(o);case 251:case 252:return AXt(o);case 253:return OXt(o);case 254:return MXt(o);case 255:return RXt(o);case 256:return FXt(o);case 257:return BXt(o);case 258:return WXt(o);case 260:return pXt(o);case 208:return gXt(o);case 263:return JXt(o);case 264:return nZt(o);case 265:return rZt(o);case 266:return lZt(o);case 267:return hZt(o);case 272:return gZt(o);case 271:return mZt(o);case 278:return vZt(o);case 277:return CZt(o);case 242:case 259:IC(o);return;case 282:return _Qt(o)}}function rpt(o){Lo(o)&&W(o,_=>{HL(_)&&Ua(_)})}function spt(o){if(!Xn(o))if($G(o)||l3(o)){const _=Ta($G(o)?54:58),v=o.postfix?k._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:k._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1,S=o.type,D=As(S);on(o,v,_,Un(l3(o)&&!(D===rn||D===or)?es(xi([D,wi],o.postfix?void 0:je)):D))}else on(o,k.JSDoc_types_can_only_be_used_inside_documentation_comments)}function xZt(o){spt(o),Ua(o.type);const{parent:_}=o;if(Gs(_)&&c3(_.parent)){La(_.parent.parameters)!==_&&ht(o,k.A_rest_parameter_must_be_last_in_a_parameter_list);return}qk(_)||ht(o,k.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature);const v=o.parent.parent;if(!em(v)){ht(o,k.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature);return}const S=TW(v);if(!S)return;const D=Ak(v);(!D||La(D.parameters).symbol!==S)&&ht(o,k.A_rest_parameter_must_be_last_in_a_parameter_list)}function kZt(o){const _=As(o.type),{parent:v}=o,S=o.parent.parent;if(qk(o.parent)&&em(S)){const D=Ak(S),L=Bae(S.parent.parent);if(D||L){const B=Ql(L?S.parent.parent.typeExpression.parameters:D.parameters),K=TW(S);if(!B||K&&B.symbol===K&&O1(B))return sh(_)}}return Gs(v)&&c3(v.parent)?sh(_):va(_)}function zA(o){const _=_n(o),v=Tr(_);v.flags&1?z.assert(!v.deferredNodes,"A type-checked file should have no deferred nodes."):(v.deferredNodes||(v.deferredNodes=new Set),v.deferredNodes.add(o))}function TZt(o){const _=Tr(o);_.deferredNodes&&_.deferredNodes.forEach(DZt),_.deferredNodes=void 0}function DZt(o){var _,v;(_=sr)==null||_.push(sr.Phase.Check,"checkDeferredNode",{kind:o.kind,pos:o.pos,end:o.end,path:o.tracingPath});const S=j;switch(j=o,N=0,o.kind){case 213:case 214:case 215:case 170:case 286:gN(o);break;case 218:case 219:case 174:case 173:xKt(o);break;case 177:case 178:p_t(o);break;case 231:$Xt(o);break;case 168:rQt(o);break;case 285:LJt(o);break;case 284:AJt(o);break;case 216:case 234:case 217:GGt(o);break;case 222:fo(o.expression);break;case 226:jJ(o)&&gN(o);break}j=S,(v=sr)==null||v.pop()}function EZt(o){var _,v;(_=sr)==null||_.push(sr.Phase.Check,"checkSourceFile",{path:o.path},!0),cu("beforeCheck"),IZt(o),cu("afterCheck"),qg("Check","beforeCheck","afterCheck"),(v=sr)==null||v.pop()}function opt(o,_){if(_)return!1;switch(o){case 0:return!!Y.noUnusedLocals;case 1:return!!Y.noUnusedParameters;default:return z.assertNever(o)}}function apt(o){return Dg.get(o.path)||x}function IZt(o){const _=Tr(o);if(!(_.flags&1)){if(Y8(o,Y,t))return;rei(o),Xs(pD),Xs(d2),Xs(f2),Xs(h2),Xs(RI),W(o.statements,Ua),Ua(o.endOfFileToken),TZt(o),ep(o)&&Bx(o),a(()=>{!o.isDeclarationFile&&(Y.noUnusedLocals||Y.noUnusedParameters)&&T_t(apt(o),(v,S,D)=>{!E6(v)&&opt(S,!!(v.flags&33554432))&&vl.add(D)}),o.isDeclarationFile||nXt()}),ep(o)&&npt(o),pD.length&&(W(pD,oXt),Xs(pD)),d2.length&&(W(d2,aXt),Xs(d2)),f2.length&&(W(f2,dXt),Xs(f2)),h2.length&&(W(h2,hXt),Xs(h2)),_.flags|=1}}function lpt(o,_){try{return u=_,NZt(o)}finally{u=void 0}}function i8e(){for(const o of r)o();r=[]}function n8e(o){i8e();const _=a;a=v=>v(),EZt(o),a=_}function NZt(o){if(o){i8e();const _=vl.getGlobalDiagnostics(),v=_.length;n8e(o);const S=vl.getDiagnostics(o.fileName),D=vl.getGlobalDiagnostics();if(D!==_){const L=ul(_,D,q8);return no(L,S)}else if(v===0&&D.length>0)return no(D,S);return S}return W(t.getSourceFiles(),n8e),vl.getDiagnostics()}function LZt(){return i8e(),vl.getGlobalDiagnostics()}function PZt(o,_){if(o.flags&67108864)return[];const v=ga();let S=!1;return D(),v.delete("this"),aOe(v);function D(){for(;o;){switch(A1(o)&&o.locals&&!nS(o)&&B(o.locals,_),o.kind){case 307:if(!Td(o))break;case 267:K(wr(o).exports,_&2623475);break;case 266:B(wr(o).exports,_&8);break;case 231:o.name&&L(o.symbol,_);case 263:case 264:S||B(Dx(wr(o)),_&788968);break;case 218:o.name&&L(o.symbol,_);break}rxe(o)&&L(nt,_),S=da(o),o=o.parent}B(Ue,_)}function L(ne,ae){if(K6(ne)&ae){const Ce=ne.escapedName;v.has(Ce)||v.set(Ce,ne)}}function B(ne,ae){ae&&ne.forEach(Ce=>{L(Ce,ae)})}function K(ne,ae){ae&&ne.forEach(Ce=>{!Jc(Ce,281)&&!Jc(Ce,280)&&Ce.escapedName!=="default"&&L(Ce,ae)})}}function AZt(o){return o.kind===80&&fP(o.parent)&&ko(o.parent)===o}function cpt(o){for(;o.parent.kind===166;)o=o.parent;return o.parent.kind===183}function OZt(o){for(;o.parent.kind===211;)o=o.parent;return o.parent.kind===233}function upt(o,_){let v,S=Sf(o);for(;S&&!(v=_(S));)S=Sf(S);return v}function MZt(o){return!!Xi(o,_=>fu(_)&&Tm(_.body)||To(_)?!0:ss(_)||rc(_)?"quit":!1)}function r8e(o,_){return!!upt(o,v=>v===_)}function RZt(o){for(;o.parent.kind===166;)o=o.parent;if(o.parent.kind===271)return o.parent.moduleReference===o?o.parent:void 0;if(o.parent.kind===277)return o.parent.expression===o?o.parent:void 0}function tge(o){return RZt(o)!==void 0}function FZt(o){switch(Lu(o.parent.parent)){case 1:case 3:return Lg(o.parent);case 5:if(Ir(o.parent)&&Q6(o.parent)===o)return;case 4:case 2:return wr(o.parent.parent)}}function BZt(o){let _=o.parent;for(;__(_);)o=_,_=_.parent;if(_&&_.kind===205&&_.qualifier===o)return _}function WZt(o){if(o.expression.kind===110){const _=u_(o,!1,!1);if(Bo(_)){const v=Tft(_);if(v){const S=J2(v,void 0),D=Eft(v,S);return D&&!Al(D)}}}}function dpt(o){if(F1(o))return Lg(o.parent);if(Xn(o)&&o.parent.kind===211&&o.parent===o.parent.parent.left&&!Vs(o)&&!$k(o)&&!WZt(o.parent)){const _=FZt(o);if(_)return _}if(o.parent.kind===277&&pc(o)){const _=Du(o,2998271,!0);if(_&&_!==Ot)return _}else if(A_(o)&&tge(o)){const _=Rk(o,271);return z.assert(_!==void 0),CA(o,!0)}if(A_(o)){const _=BZt(o);if(_){As(_);const v=Tr(o).resolvedSymbol;return v===Ot?void 0:v}}for(;Qxe(o);)o=o.parent;if(OZt(o)){let _=0;o.parent.kind===233?(_=Lv(o)?788968:111551,HJ(o.parent)&&(_|=111551)):_=1920,_|=2097152;const v=pc(o)?Du(o,_,!0):void 0;if(v)return v}if(o.parent.kind===341)return TW(o.parent);if(o.parent.kind===168&&o.parent.parent.kind===345){z.assert(!Xn(o));const _=yxe(o.parent);return _&&_.symbol}if(z0(o)){if(vu(o))return;const _=Xi(o,lg(HL,S7,$k)),v=_?901119:111551;if(o.kind===80){if(M6(o)&&jA(o)){const D=Spe(o.parent);return D===Ot?void 0:D}const S=Du(o,v,!0,!0,Ak(o));if(!S&&_){const D=Xi(o,lg(ss,Ff));if(D)return WY(o,!0,wr(D))}if(S&&_){const D=AT(o);if(D&&nx(D)&&D===S.valueDeclaration)return Du(o,v,!0,!0,_n(D))||S}return S}else{if(Vs(o))return kpe(o);if(o.kind===211||o.kind===166){const S=Tr(o);return S.resolvedSymbol?S.resolvedSymbol:(o.kind===211?(xpe(o,0),S.resolvedSymbol||(S.resolvedSymbol=fpt(Vu(o.expression),KS(o.name)))):tht(o,0),!S.resolvedSymbol&&_&&__(o)?WY(o):S.resolvedSymbol)}else if($k(o))return WY(o)}}else if(cpt(o)){const _=o.parent.kind===183?788968:1920,v=Du(o,_,!1,!0);return v&&v!==Ot?v:w_e(o)}if(o.parent.kind===182)return Du(o,1)}function fpt(o,_){const v=oOe(o,_);if(v.length&&o.members){const S=b_e(lv(o).members);if(v===Xh(o))return S;if(S){const D=Zs(S),L=ns(v,K=>K.declaration),B=Yt(L,Tl).join(",");if(D.filteredIndexSymbolCache||(D.filteredIndexSymbolCache=new Map),D.filteredIndexSymbolCache.has(B))return D.filteredIndexSymbolCache.get(B);{const K=sl(131072,"__index");return K.declarations=ns(v,ne=>ne.declaration),K.parent=o.aliasSymbol?o.aliasSymbol:o.symbol?o.symbol:Qm(K.declarations[0].parent),D.filteredIndexSymbolCache.set(B,K),K}}}}function WY(o,_,v){if(A_(o)){let B=Du(o,901119,_,!0,Ak(o));if(!B&<(o)&&v&&(B=al(rh(Yp(v),o.escapedText,901119))),B)return B}const S=lt(o)?v:WY(o.left,_,v),D=lt(o)?o.escapedText:o.right.escapedText;if(S){const L=S.flags&111551&&ya(Qn(S),"prototype"),B=L?Qn(L):vc(S);return ya(B,D)}}function Qm(o,_){if(Ns(o))return Td(o)?al(o.symbol):void 0;const{parent:v}=o,S=v.parent;if(!(o.flags&67108864)){if(TKe(o)){const D=wr(v);return FL(o.parent)&&o.parent.propertyName===o?bpe(D):D}else if(EW(o))return wr(v.parent);if(o.kind===80){if(tge(o))return dpt(o);if(v.kind===208&&S.kind===206&&o===v.propertyName){const D=UA(S),L=ya(D,o.escapedText);if(L)return L}else if(p7(v)&&v.name===o)return v.keywordToken===105&&dr(o)==="target"?CRe(v).symbol:v.keywordToken===102&&dr(o)==="meta"?uut().members.get("meta"):void 0}switch(o.kind){case 80:case 81:case 211:case 166:if(!BT(o))return dpt(o);case 110:const D=u_(o,!1,!1);if(Bo(D)){const K=Mg(D);if(K.thisParameter)return K.thisParameter}if(mJ(o))return fo(o).symbol;case 197:return A_e(o).symbol;case 108:return fo(o).symbol;case 137:const L=o.parent;return L&&L.kind===176?L.parent.symbol:void 0;case 11:case 15:if(Lk(o.parent.parent)&&C8(o.parent.parent)===o||(o.parent.kind===272||o.parent.kind===278)&&o.parent.moduleSpecifier===o||Xn(o)&&$v(o.parent)&&o.parent.moduleSpecifier===o||Xn(o)&&B_(o.parent,!1)||Gp(o.parent)||gS(o.parent)&&rS(o.parent.parent)&&o.parent.parent.argument===o.parent)return Gh(o,o,_);if(sa(v)&&oI(v)&&v.arguments[1]===o)return wr(v);case 9:const B=wc(v)?v.argumentExpression===o?zf(v.expression):void 0:gS(v)&&JT(S)?As(S.objectType):void 0;return B&&ya(B,du(o.text));case 90:case 100:case 39:case 86:return Lg(o.parent);case 205:return rS(o)?Qm(o.argument.literal,_):void 0;case 95:return Ec(o.parent)?z.checkDefined(o.parent.symbol):void 0;case 102:case 105:return p7(o.parent)?Bht(o.parent).symbol:void 0;case 104:if(cr(o.parent)){const K=zf(o.parent.right),ne=LRe(K);return(ne==null?void 0:ne.symbol)??K.symbol}return;case 236:return fo(o).symbol;case 295:if(M6(o)&&jA(o)){const K=Spe(o.parent);return K===Ot?void 0:K}default:return}}}function VZt(o){if(lt(o)&&Ir(o.parent)&&o.parent.name===o){const _=KS(o),v=zf(o.parent.expression),S=v.flags&1048576?v.types:[v];return Ln(S,D=>Ri(Xh(D),L=>IA(_,L.keyType)))}}function HZt(o){if(o&&o.kind===304)return Du(o.name,2208703)}function jZt(o){return gh(o)?o.parent.parent.moduleSpecifier?S2(o.parent.parent,o):Du(o.propertyName||o.name,2998271):Du(o,2998271)}function UA(o){if(Ns(o)&&!Td(o)||o.flags&67108864)return $e;const _=Poe(o),v=_&&Gu(wr(_.class));if(Lv(o)){const S=As(o);return v?Wp(S,v.thisType):S}if(z0(o))return s8e(o);if(v&&!_.isImplements){const S=lu(Yr(v));return S?Wp(S,v.thisType):$e}if(fP(o)){const S=wr(o);return vc(S)}if(AZt(o)){const S=Qm(o);return S?vc(S):$e}if(nl(o))return Ka(o,!0,0)||$e;if(Yf(o)){const S=wr(o);return S?Qn(S):$e}if(TKe(o)){const S=Qm(o);return S?Qn(S):$e}if(Qo(o))return Ka(o.parent,!0,0)||$e;if(tge(o)){const S=Qm(o);if(S){const D=vc(S);return _l(D)?Qn(S):D}}return p7(o.parent)&&o.parent.keywordToken===o.kind?Bht(o.parent):mI(o)?COe(!1):$e}function ige(o){if(z.assert(o.kind===210||o.kind===209),o.parent.kind===250){const D=MY(o.parent);return vN(o,D||$e)}if(o.parent.kind===226){const D=zf(o.parent.right);return vN(o,D||$e)}if(o.parent.kind===303){const D=ua(o.parent.parent,Pa),L=ige(D)||$e,B=I6(D.properties,o.parent);return Yht(D,L,B)}const _=ua(o.parent,Rf),v=ige(_)||$e,S=YS(65,v,wi,o.parent)||$e;return e_t(_,v,_.elements.indexOf(o),S)}function zZt(o){const _=ige(ua(o.parent.parent,d8));return _&&ya(_,o.escapedText)}function s8e(o){return B8(o)&&(o=o.parent),Zh(zf(o))}function hpt(o){const _=Lg(o.parent);return da(o)?Qn(_):vc(_)}function _pt(o){const _=o.name;switch(_.kind){case 80:return G_(dr(_));case 9:case 11:return G_(_.text);case 167:const v=u1(_);return jf(v,12288)?v:tt;default:return z.fail("Unsupported property name.")}}function o8e(o){o=Qh(o);const _=ga(Nl(o)),v=ea(o,0).length?wg:ea(o,1).length?it:void 0;return v&&W(Nl(v),S=>{_.has(S.escapedName)||_.set(S.escapedName,S)}),bx(_)}function nge(o){return ea(o,0).length!==0||ea(o,1).length!==0}function ppt(o){const _=UZt(o);return _?Ln(_,ppt):[o]}function UZt(o){if(Pu(o)&6)return ns(Zs(o).containingType.types,_=>ya(_,o.escapedName));if(o.flags&33554432){const{links:{leftSpread:_,rightSpread:v,syntheticOrigin:S}}=o;return _?[_,v]:S?[S]:PL(qZt(o))}}function qZt(o){let _,v=o;for(;v=Zs(v).target;)_=v;return _}function $Zt(o){if(jc(o))return!1;const _=xo(o,lt);if(!_)return!1;const v=_.parent;return v?!((Ir(v)||pd(v))&&v.name===_)&&uz(_)===nt:!1}function JZt(o){return qB(o.parent)&&o===o.parent.name}function GZt(o,_){var v;const S=xo(o,lt);if(S){let D=uz(S,JZt(S));if(D){if(D.flags&1048576){const B=al(D.exportSymbol);if(!_&&B.flags&944&&!(B.flags&3))return;D=B}const L=Vf(D);if(L){if(L.flags&512&&((v=L.valueDeclaration)==null?void 0:v.kind)===307){const B=L.valueDeclaration,K=_n(S);return B!==K?void 0:B}return Xi(S.parent,B=>qB(B)&&wr(B)===L)}}}}function KZt(o){const _=u2e(o);if(_)return _;const v=xo(o,lt);if(v){const S=dYt(v);if(i1(S,111551)&&!n1(S,111551))return Rp(S)}}function QZt(o){return o.valueDeclaration&&nl(o.valueDeclaration)&&y6(o.valueDeclaration).parent.kind===299}function gpt(o){if(o.flags&418&&o.valueDeclaration&&!Ns(o.valueDeclaration)){const _=Zs(o);if(_.isDeclarationWithCollidingName===void 0){const v=j0(o.valueDeclaration);if(Lwe(v)||QZt(o))if(Ui(v.parent,o.escapedName,111551,void 0,!1))_.isDeclarationWithCollidingName=!0;else if(a8e(o.valueDeclaration,16384)){const S=a8e(o.valueDeclaration,32768),D=Hw(v,!1),L=v.kind===241&&Hw(v.parent,!1);_.isDeclarationWithCollidingName=!Wwe(v)&&(!S||!D&&!L)}else _.isDeclarationWithCollidingName=!1}return _.isDeclarationWithCollidingName}return!1}function XZt(o){if(!jc(o)){const _=xo(o,lt);if(_){const v=uz(_);if(v&&gpt(v))return v.valueDeclaration}}}function ZZt(o){const _=xo(o,Yf);if(_){const v=wr(_);if(v)return gpt(v)}return!1}function mpt(o){switch(z.assert(xt),o.kind){case 271:return rge(wr(o));case 273:case 274:case 276:case 281:const _=wr(o);return!!_&&rge(_,!0);case 278:const v=o.exportClause;return!!v&&(H1(v)||Rt(v.elements,mpt));case 277:return o.expression&&o.expression.kind===80?rge(wr(o),!0):!0}return!1}function YZt(o){const _=xo(o,kd);return _===void 0||_.parent.kind!==307||!$L(_)?!1:rge(wr(_))&&_.moduleReference&&!vu(_.moduleReference)}function rge(o,_){if(!o)return!1;const v=_n(o.valueDeclaration),S=v&&wr(v);J_(S);const D=eg(sf(o));return D===Ot?!_||!n1(o):!!(op(o,_,!0)&111551)&&(HT(Y)||!cz(D))}function cz(o){return NRe(o)||!!o.constEnumOnlyModule}function vpt(o,_){if(z.assert(xt),Zn(o)){const v=wr(o),S=v&&Zs(v);if(S!=null&&S.referenced)return!0;const D=Zs(v).aliasTarget;if(D&&Wh(o)&32&&op(D)&111551&&(HT(Y)||!cz(D)))return!0}return _?!!jo(o,v=>vpt(v,_)):!1}function ypt(o){if(Tm(o.body)){if(tS(o)||Ev(o))return!1;const _=wr(o),v=PD(_);return v.length>1||v.length===1&&v[0].declaration!==o}return!1}function eYt(o){const _=oge(o);if(!_)return!1;const v=As(_);return OO(v)}function sge(o){return(tYt(o)||iYt(o))&&!eYt(o)}function tYt(o){return!!be&&!EZ(o)&&!em(o)&&!!o.initializer&&!Kr(o,31)}function iYt(o){return be&&EZ(o)&&(em(o)||!o.initializer)&&Kr(o,31)}function bpt(o){const _=xo(o,S=>Uu(S)||ds(S));if(!_)return!1;let v;if(ds(_)){if(_.type||!Xn(_)&&!dz(_))return!1;const S=w8(_);if(!S||!H0(S))return!1;v=wr(S)}else v=wr(_);return!v||!(v.flags&16|3)?!1:!!hf(Yp(v),S=>S.flags&111551&&_P(S.valueDeclaration))}function nYt(o){const _=xo(o,Uu);if(!_)return x;const v=wr(_);return v&&Nl(Qn(v))||x}function qO(o){var _;const v=o.id||0;return v<0||v>=Wa.length?0:((_=Wa[v])==null?void 0:_.flags)||0}function a8e(o,_){return rYt(o,_),!!(qO(o)&_)}function rYt(o,_){if(!Y.noCheck&&XW(_n(o),Y)||Tr(o).calculatedFlags&_)return;switch(_){case 16:case 32:return B(o);case 128:case 256:case 2097152:return L(o);case 512:case 8192:case 65536:case 262144:return ne(o);case 536870912:return Ce(o);case 4096:case 32768:case 16384:return Ve(o);default:return z.assertNever(_,`Unhandled node check flag calculation: ${z.formatNodeCheckFlags(_)}`)}function S(Vt,Kt){const Wi=Kt(Vt,Vt.parent);if(Wi!=="skip")return Wi||MP(Vt,Kt)}function D(Vt){const Kt=Tr(Vt);if(Kt.calculatedFlags&_)return"skip";Kt.calculatedFlags|=2097536,B(Vt)}function L(Vt){S(Vt,D)}function B(Vt){const Kt=Tr(Vt);Kt.calculatedFlags|=48,Vt.kind===108&&_pe(Vt)}function K(Vt){const Kt=Tr(Vt);if(Kt.calculatedFlags&_)return"skip";Kt.calculatedFlags|=336384,Ce(Vt)}function ne(Vt){S(Vt,K)}function ae(Vt){return z0(Vt)||ih(Vt.parent)&&(Vt.parent.objectAssignmentInitializer??Vt.parent.name)===Vt}function Ce(Vt){const Kt=Tr(Vt);if(Kt.calculatedFlags|=536920064,lt(Vt)&&ae(Vt)&&!(Ir(Vt.parent)&&Vt.parent.name===Vt)){const Wi=S_(Vt);Wi&&Wi!==Ot&&Sft(Vt,Wi)}}function qe(Vt){const Kt=Tr(Vt);if(Kt.calculatedFlags&_)return"skip";Kt.calculatedFlags|=53248,Dt(Vt)}function Ve(Vt){const Kt=j0(F1(Vt)?Vt.parent:Vt);S(Kt,qe)}function Dt(Vt){Ce(Vt),Ja(Vt)&&u1(Vt),Vs(Vt)&&Vd(Vt.parent)&&Vpe(Vt.parent)}}function bN(o){return ept(o.parent),Tr(o).enumMemberValue??Hd(void 0)}function Cpt(o){switch(o.kind){case 306:case 211:case 212:return!0}return!1}function l8e(o){if(o.kind===306)return bN(o).value;Tr(o).resolvedSymbol||Vu(o);const _=Tr(o).resolvedSymbol||(pc(o)?Du(o,111551,!0):void 0);if(_&&_.flags&8){const v=_.valueDeclaration;if(ET(v.parent))return bN(v).value}}function c8e(o){return!!(o.flags&524288)&&ea(o,0).length>0}function sYt(o,_){var v;const S=xo(o,A_);if(!S||_&&(_=xo(_),!_))return 0;let D=!1;if(__(S)){const Ce=Du(Ip(S),111551,!0,!0,_);D=!!((v=Ce==null?void 0:Ce.declarations)!=null&&v.every(Dk))}const L=Du(S,111551,!0,!0,_),B=L&&L.flags&2097152?sf(L):L;D||(D=!!(L&&n1(L,111551)));const K=Du(S,788968,!0,!0,_),ne=K&&K.flags&2097152?sf(K):K;if(L||D||(D=!!(K&&n1(K,788968))),B&&B===ne){const Ce=SOe(!1);if(Ce&&B===Ce)return 9;const qe=Qn(B);if(qe&&Cj(qe))return D?10:1}if(!ne)return D?11:0;const ae=vc(ne);return _l(ae)?D?11:0:ae.flags&3?11:jf(ae,245760)?2:jf(ae,528)?6:jf(ae,296)?3:jf(ae,2112)?4:jf(ae,402653316)?5:Qa(ae)?7:jf(ae,12288)?8:c8e(ae)?10:_m(ae)?7:11}function oYt(o,_,v,S){const D=xo(o,txe);if(!D)return G.createToken(133);const L=wr(D),B=L&&!(L.flags&133120)?z2(Qn(L)):$e;return et.serializeTypeForDeclaration(D,B,L,_,v|1024,S)}function aYt(o){return Bo(o)||Ec(o)||qL(o)}function VY(o){o=xo(o,RB);const _=o.kind===178?177:178,v=Jc(wr(o),_),S=v&&v.pos{if(!_)_=S.expression;else return _=void 0,!0}):_=v}return _}function lYt(o,_,v,S){const D=xo(o,Bo);return D?et.serializeReturnTypeForSignature(Mg(D),_,v|1024,S):G.createToken(133)}function cYt(o,_,v,S){const D=xo(o,Ut);if(!D)return G.createToken(133);const L=up(s8e(D));return et.expressionOrTypeToTypeNode(D,L,void 0,_,v|1024,S)}function uYt(o){return Ue.has(du(o))}function uz(o,_){const v=Tr(o).resolvedSymbol;if(v)return v;let S=o;if(_){const D=o.parent;Yf(D)&&o===D.name&&(S=ZI(D))}return Ui(S,o.escapedText,3257279,void 0,!0)}function dYt(o){const _=Tr(o).resolvedSymbol;return _&&_!==Ot?_:Ui(o,o.escapedText,3257279,void 0,!0,void 0)}function fYt(o){if(!jc(o)){const _=xo(o,lt);if(_){const v=uz(_);if(v)return eg(v).valueDeclaration}}}function hYt(o){if(!jc(o)){const _=xo(o,lt);if(_){const v=uz(_);if(v)return Ri(eg(v).declarations,S=>{switch(S.kind){case 260:case 169:case 208:case 172:case 303:case 304:case 306:case 210:case 262:case 218:case 219:case 263:case 231:case 266:case 174:case 177:case 178:case 267:return!0}return!1})}}}function _Yt(o){return tW(o)||ds(o)&&dz(o)?RD(Qn(wr(o))):!1}function pYt(o,_,v){const S=o.flags&1056?et.symbolToExpression(o.symbol,111551,_,void 0,v):o===fi?G.createTrue():o===Qt&&G.createFalse();if(S)return S;const D=o.value;return typeof D=="object"?G.createBigIntLiteral(D):typeof D=="string"?G.createStringLiteral(D):D<0?G.createPrefixUnaryExpression(41,G.createNumericLiteral(-D)):G.createNumericLiteral(D)}function gYt(o,_){const v=Qn(wr(o));return pYt(v,o,_)}function xpt(o){return o?(g2(o),_n(o).localJsxFactory||sC):sC}function u8e(o){if(o){const _=_n(o);if(_){if(_.localJsxFragmentFactory)return _.localJsxFragmentFactory;const v=_.pragmas.get("jsxfrag"),S=Lo(v)?v[0]:v;if(S)return _.localJsxFragmentFactory=FP(S.arguments.factory,ue),_.localJsxFragmentFactory}}if(Y.jsxFragmentFactory)return FP(Y.jsxFragmentFactory,ue)}function oge(o){const _=hd(o);if(_)return _;if(o.kind===169&&o.parent.kind===178){const v=VY(o.parent).getAccessor;if(v)return Dp(v)}}function mYt(o){const _=Dp(o);if(_)return _;if(o.kind===177){const v=VY(o).setAccessor;if(v){const S=J6(v);if(S)return hd(S)}}}function vYt(){return{getReferencedExportContainer:GZt,getReferencedImportDeclaration:KZt,getReferencedDeclarationWithCollidingName:XZt,isDeclarationWithCollidingName:ZZt,isValueAliasDeclaration:_=>{const v=xo(_);return v&&xt?mpt(v):!0},hasGlobalName:uYt,isReferencedAliasDeclaration:(_,v)=>{const S=xo(_);return S&&xt?vpt(S,v):!0},hasNodeCheckFlag:(_,v)=>{const S=xo(_);return S?a8e(S,v):!1},isTopLevelValueImportEqualsWithEntityName:YZt,isDeclarationVisible:mC,isImplementationOfOverload:ypt,requiresAddingImplicitUndefined:sge,isExpandoFunctionDeclaration:bpt,getPropertiesOfContainerFunction:nYt,createTypeOfDeclaration:oYt,createReturnTypeOfSignatureDeclaration:lYt,createTypeOfExpression:cYt,createLiteralConstValue:gYt,isSymbolAccessible:rv,isEntityNameVisible:Cx,getConstantValue:_=>{const v=xo(_,Cpt);return v?l8e(v):void 0},getEnumMemberValue:_=>{const v=xo(_,nx);return v?bN(v):void 0},collectLinkedAliases:ED,markLinkedReferences:_=>{const v=xo(_);return v&&HA(v,0)},getReferencedValueDeclaration:fYt,getReferencedValueDeclarations:hYt,getTypeReferenceSerializationKind:sYt,isOptionalParameter:EZ,isArgumentsLocalBinding:$Zt,getExternalModuleFileFromDeclaration:_=>{const v=xo(_,jwe);return v&&d8e(v)},isLiteralConstDeclaration:_Yt,isLateBound:_=>{const v=xo(_,Yf),S=v&&wr(v);return!!(S&&Pu(S)&4096)},getJsxFactoryEntity:xpt,getJsxFragmentFactoryEntity:u8e,isBindingCapturedByNode:(_,v)=>{const S=xo(_),D=xo(v);return!!S&&!!D&&(ds(D)||nl(D))&&F$t(S,D)},getDeclarationStatementsForSourceFile:(_,v,S)=>{const D=xo(_);z.assert(D&&D.kind===307,"Non-sourcefile node passed into getDeclarationsForSourceFile");const L=wr(_);return L?(J_(L),L.exports?et.symbolTableToDeclarationStatements(L.exports,_,v,S):[]):_.locals?et.symbolTableToDeclarationStatements(_.locals,_,v,S):[]},isImportRequiredByAugmentation:o,isDefinitelyReferenceToGlobalSymbolObject:fA};function o(_){const v=_n(_);if(!v.symbol)return!1;const S=d8e(_);if(!S||S===v)return!1;const D=nv(v.symbol);for(const L of Fn(D.values()))if(L.mergeId){const B=al(L);if(B.declarations){for(const K of B.declarations)if(_n(K)===S)return!0}}return!1}}function d8e(o){const _=o.kind===267?$r(o.name,ja):GL(o),v=$I(_,_,void 0);if(v)return Jc(v,307)}function yYt(){for(const _ of t.getSourceFiles())ODe(_,Y);Id=new Map;let o;for(const _ of t.getSourceFiles())if(!_.redirectInfo){if(!ep(_)){const v=_.locals.get("globalThis");if(v!=null&&v.declarations)for(const S of v.declarations)vl.add(Kn(S,k.Declaration_name_conflicts_with_built_in_global_identifier_0,"globalThis"));Xp(Ue,_.locals)}_.jsGlobalAugmentations&&Xp(Ue,_.jsGlobalAugmentations),_.patternAmbientModules&&_.patternAmbientModules.length&&(qd=no(qd,_.patternAmbientModules)),_.moduleAugmentations.length&&(o||(o=[])).push(_.moduleAugmentations),_.symbol&&_.symbol.globalExports&&_.symbol.globalExports.forEach((S,D)=>{Ue.has(D)||Ue.set(D,S)})}if(o)for(const _ of o)for(const v of _)Iv(v.parent)&&OS(v);if(MS(),Zs(Ye).type=ce,Zs(nt).type=Ku("IArguments",0,!0),Zs(Ot).type=$e,Zs(wt).type=tg(16,wt),ai=Ku("Array",1,!0),Nd=Ku("Object",0,!0),md=Ku("Function",0,!0),wg=ve&&Ku("CallableFunction",0,!0)||md,it=ve&&Ku("NewableFunction",0,!0)||md,uo=Ku("String",0,!0),rl=Ku("Number",0,!0),hl=Ku("Boolean",0,!0),Mu=Ku("RegExp",0,!0),Xl=sh(Je),$l=sh(pt),$l===Ps&&($l=bi(void 0,Q,x,x,x)),Sn=gut("ReadonlyArray",1)||ai,Ju=Sn?Ej(Sn,[Je]):Xl,Ld=gut("ThisType",1),o)for(const _ of o)for(const v of _)Iv(v.parent)||OS(v);Id.forEach(({firstFile:_,secondFile:v,conflictingSymbols:S})=>{if(S.size<8)S.forEach(({isBlockScoped:D,firstFileLocations:L,secondFileLocations:B},K)=>{const ne=D?k.Cannot_redeclare_block_scoped_variable_0:k.Duplicate_identifier_0;for(const ae of L)y2(ae,ne,K,B);for(const ae of B)y2(ae,ne,K,L)});else{const D=Fn(S.keys()).join(", ");vl.add(fa(Kn(_,k.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0,D),Kn(v,k.Conflicts_are_in_this_file))),vl.add(fa(Kn(v,k.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0,D),Kn(_,k.Conflicts_are_in_this_file)))}}),Id=void 0}function $d(o,_){if(Y.importHelpers){const v=_n(o);if(jL(v,Y)&&!(o.flags&33554432)){const S=CYt(v,o);if(S!==Ot){const D=Zs(S);if(D.requestedExternalEmitHelpers??(D.requestedExternalEmitHelpers=0),(D.requestedExternalEmitHelpers&_)!==_){const L=_&~D.requestedExternalEmitHelpers;for(let B=1;B<=16777216;B<<=1)if(L&B)for(const K of bYt(B)){const ne=Ru(rh(nv(S),du(K),111551));ne?B&524288?Rt(PD(ne),ae=>fp(ae)>3)||ht(o,k.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0,Ik,K,4):B&1048576?Rt(PD(ne),ae=>fp(ae)>4)||ht(o,k.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0,Ik,K,5):B&1024&&(Rt(PD(ne),ae=>fp(ae)>2)||ht(o,k.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0,Ik,K,3)):ht(o,k.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0,Ik,K)}}D.requestedExternalEmitHelpers|=_}}}}function bYt(o){switch(o){case 1:return["__extends"];case 2:return["__assign"];case 4:return["__rest"];case 8:return Se?["__decorate"]:["__esDecorate","__runInitializers"];case 16:return["__metadata"];case 32:return["__param"];case 64:return["__awaiter"];case 128:return["__generator"];case 256:return["__values"];case 512:return["__read"];case 1024:return["__spreadArray"];case 2048:return["__await"];case 4096:return["__asyncGenerator"];case 8192:return["__asyncDelegator"];case 16384:return["__asyncValues"];case 32768:return["__exportStar"];case 65536:return["__importStar"];case 131072:return["__importDefault"];case 262144:return["__makeTemplateObject"];case 524288:return["__classPrivateFieldGet"];case 1048576:return["__classPrivateFieldSet"];case 2097152:return["__classPrivateFieldIn"];case 4194304:return["__setFunctionName"];case 8388608:return["__propKey"];case 16777216:return["__addDisposableResource","__disposeResources"];default:return z.fail("Unrecognized helper")}}function CYt(o,_){const v=Tr(o);return v.externalHelpersModule||(v.externalHelpersModule=wD(gei(o),Ik,k.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found,_)||Ot),v.externalHelpersModule}function gb(o){var _;const v=xYt(o)||SYt(o);if(v!==void 0)return v;if(Gs(o)&&FT(o))return Df(o,k.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters);const S=Ou(o)?o.declarationList.flags&7:0;let D,L,B,K,ne,ae=0,Ce=!1,qe=!1;for(const Ve of o.modifiers)if(jd(Ve)){if(cW(Se,o,o.parent,o.parent.parent)){if(Se&&(o.kind===177||o.kind===178)){const Dt=VY(o);if(dg(Dt.firstAccessor)&&o===Dt.secondAccessor)return Df(o,k.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name)}}else return o.kind===174&&!Tm(o.body)?Df(o,k.A_decorator_can_only_decorate_a_method_implementation_not_an_overload):Df(o,k.Decorators_are_not_valid_here);if(ae&-34849)return on(Ve,k.Decorators_are_not_valid_here);if(qe&&ae&98303){z.assertIsDefined(ne);const Dt=_n(Ve);return Wx(Dt)?!1:(fa(ht(Ve,k.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),Kn(ne,k.Decorator_used_before_export_here)),!0)}ae|=32768,ae&98303?ae&32&&(Ce=!0):qe=!0,ne??(ne=Ve)}else{if(Ve.kind!==148){if(o.kind===171||o.kind===173)return on(Ve,k._0_modifier_cannot_appear_on_a_type_member,Ta(Ve.kind));if(o.kind===181&&(Ve.kind!==126||!ss(o.parent)))return on(Ve,k._0_modifier_cannot_appear_on_an_index_signature,Ta(Ve.kind))}if(Ve.kind!==103&&Ve.kind!==147&&Ve.kind!==87&&o.kind===168)return on(Ve,k._0_modifier_cannot_appear_on_a_type_parameter,Ta(Ve.kind));switch(Ve.kind){case 87:{if(o.kind!==266&&o.kind!==168)return on(o,k.A_class_member_cannot_have_the_0_keyword,Ta(87));const Kt=Rm(o.parent)&&Ok(o.parent)||o.parent;if(o.kind===168&&!(rc(Kt)||ss(Kt)||W1(Kt)||n3(Kt)||xP(Kt)||dV(Kt)||Hv(Kt)))return on(Ve,k._0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class,Ta(Ve.kind));break}case 164:if(ae&16)return on(Ve,k._0_modifier_already_seen,"override");if(ae&128)return on(Ve,k._0_modifier_cannot_be_used_with_1_modifier,"override","declare");if(ae&8)return on(Ve,k._0_modifier_must_precede_1_modifier,"override","readonly");if(ae&512)return on(Ve,k._0_modifier_must_precede_1_modifier,"override","accessor");if(ae&1024)return on(Ve,k._0_modifier_must_precede_1_modifier,"override","async");ae|=16,K=Ve;break;case 125:case 124:case 123:const Dt=MF(iP(Ve.kind));if(ae&7)return on(Ve,k.Accessibility_modifier_already_seen);if(ae&16)return on(Ve,k._0_modifier_must_precede_1_modifier,Dt,"override");if(ae&256)return on(Ve,k._0_modifier_must_precede_1_modifier,Dt,"static");if(ae&512)return on(Ve,k._0_modifier_must_precede_1_modifier,Dt,"accessor");if(ae&8)return on(Ve,k._0_modifier_must_precede_1_modifier,Dt,"readonly");if(ae&1024)return on(Ve,k._0_modifier_must_precede_1_modifier,Dt,"async");if(o.parent.kind===268||o.parent.kind===307)return on(Ve,k._0_modifier_cannot_appear_on_a_module_or_namespace_element,Dt);if(ae&64)return Ve.kind===123?on(Ve,k._0_modifier_cannot_be_used_with_1_modifier,Dt,"abstract"):on(Ve,k._0_modifier_must_precede_1_modifier,Dt,"abstract");if(Fh(o))return on(Ve,k.An_accessibility_modifier_cannot_be_used_with_a_private_identifier);ae|=iP(Ve.kind);break;case 126:if(ae&256)return on(Ve,k._0_modifier_already_seen,"static");if(ae&8)return on(Ve,k._0_modifier_must_precede_1_modifier,"static","readonly");if(ae&1024)return on(Ve,k._0_modifier_must_precede_1_modifier,"static","async");if(ae&512)return on(Ve,k._0_modifier_must_precede_1_modifier,"static","accessor");if(o.parent.kind===268||o.parent.kind===307)return on(Ve,k._0_modifier_cannot_appear_on_a_module_or_namespace_element,"static");if(o.kind===169)return on(Ve,k._0_modifier_cannot_appear_on_a_parameter,"static");if(ae&64)return on(Ve,k._0_modifier_cannot_be_used_with_1_modifier,"static","abstract");if(ae&16)return on(Ve,k._0_modifier_must_precede_1_modifier,"static","override");ae|=256,D=Ve;break;case 129:if(ae&512)return on(Ve,k._0_modifier_already_seen,"accessor");if(ae&8)return on(Ve,k._0_modifier_cannot_be_used_with_1_modifier,"accessor","readonly");if(ae&128)return on(Ve,k._0_modifier_cannot_be_used_with_1_modifier,"accessor","declare");if(o.kind!==172)return on(Ve,k.accessor_modifier_can_only_appear_on_a_property_declaration);ae|=512;break;case 148:if(ae&8)return on(Ve,k._0_modifier_already_seen,"readonly");if(o.kind!==172&&o.kind!==171&&o.kind!==181&&o.kind!==169)return on(Ve,k.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature);if(ae&512)return on(Ve,k._0_modifier_cannot_be_used_with_1_modifier,"readonly","accessor");ae|=8;break;case 95:if(Y.verbatimModuleSyntax&&!(o.flags&33554432)&&o.kind!==265&&o.kind!==264&&o.kind!==267&&o.parent.kind===307&&(te===1||_n(o).impliedNodeFormat===1))return on(Ve,k.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);if(ae&32)return on(Ve,k._0_modifier_already_seen,"export");if(ae&128)return on(Ve,k._0_modifier_must_precede_1_modifier,"export","declare");if(ae&64)return on(Ve,k._0_modifier_must_precede_1_modifier,"export","abstract");if(ae&1024)return on(Ve,k._0_modifier_must_precede_1_modifier,"export","async");if(ss(o.parent))return on(Ve,k._0_modifier_cannot_appear_on_class_elements_of_this_kind,"export");if(o.kind===169)return on(Ve,k._0_modifier_cannot_appear_on_a_parameter,"export");if(S===4)return on(Ve,k._0_modifier_cannot_appear_on_a_using_declaration,"export");if(S===6)return on(Ve,k._0_modifier_cannot_appear_on_an_await_using_declaration,"export");ae|=32;break;case 90:const Vt=o.parent.kind===307?o.parent:o.parent.parent;if(Vt.kind===267&&!Bh(Vt))return on(Ve,k.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);if(S===4)return on(Ve,k._0_modifier_cannot_appear_on_a_using_declaration,"default");if(S===6)return on(Ve,k._0_modifier_cannot_appear_on_an_await_using_declaration,"default");if(ae&32){if(Ce)return on(ne,k.Decorators_are_not_valid_here)}else return on(Ve,k._0_modifier_must_precede_1_modifier,"export","default");ae|=2048;break;case 138:if(ae&128)return on(Ve,k._0_modifier_already_seen,"declare");if(ae&1024)return on(Ve,k._0_modifier_cannot_be_used_in_an_ambient_context,"async");if(ae&16)return on(Ve,k._0_modifier_cannot_be_used_in_an_ambient_context,"override");if(ss(o.parent)&&!To(o))return on(Ve,k._0_modifier_cannot_appear_on_class_elements_of_this_kind,"declare");if(o.kind===169)return on(Ve,k._0_modifier_cannot_appear_on_a_parameter,"declare");if(S===4)return on(Ve,k._0_modifier_cannot_appear_on_a_using_declaration,"declare");if(S===6)return on(Ve,k._0_modifier_cannot_appear_on_an_await_using_declaration,"declare");if(o.parent.flags&33554432&&o.parent.kind===268)return on(Ve,k.A_declare_modifier_cannot_be_used_in_an_already_ambient_context);if(Fh(o))return on(Ve,k._0_modifier_cannot_be_used_with_a_private_identifier,"declare");if(ae&512)return on(Ve,k._0_modifier_cannot_be_used_with_1_modifier,"declare","accessor");ae|=128,L=Ve;break;case 128:if(ae&64)return on(Ve,k._0_modifier_already_seen,"abstract");if(o.kind!==263&&o.kind!==185){if(o.kind!==174&&o.kind!==172&&o.kind!==177&&o.kind!==178)return on(Ve,k.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration);if(!(o.parent.kind===263&&Kr(o.parent,64))){const Kt=o.kind===172?k.Abstract_properties_can_only_appear_within_an_abstract_class:k.Abstract_methods_can_only_appear_within_an_abstract_class;return on(Ve,Kt)}if(ae&256)return on(Ve,k._0_modifier_cannot_be_used_with_1_modifier,"static","abstract");if(ae&2)return on(Ve,k._0_modifier_cannot_be_used_with_1_modifier,"private","abstract");if(ae&1024&&B)return on(B,k._0_modifier_cannot_be_used_with_1_modifier,"async","abstract");if(ae&16)return on(Ve,k._0_modifier_must_precede_1_modifier,"abstract","override");if(ae&512)return on(Ve,k._0_modifier_must_precede_1_modifier,"abstract","accessor")}if(Af(o)&&o.name.kind===81)return on(Ve,k._0_modifier_cannot_be_used_with_a_private_identifier,"abstract");ae|=64;break;case 134:if(ae&1024)return on(Ve,k._0_modifier_already_seen,"async");if(ae&128||o.parent.flags&33554432)return on(Ve,k._0_modifier_cannot_be_used_in_an_ambient_context,"async");if(o.kind===169)return on(Ve,k._0_modifier_cannot_appear_on_a_parameter,"async");if(ae&64)return on(Ve,k._0_modifier_cannot_be_used_with_1_modifier,"async","abstract");ae|=1024,B=Ve;break;case 103:case 147:{const Kt=Ve.kind===103?8192:16384,Wi=Ve.kind===103?"in":"out",qi=Rm(o.parent)&&(Ok(o.parent)||Me((_=W6(o.parent))==null?void 0:_.tags,CI))||o.parent;if(o.kind!==168||qi&&!(Ff(qi)||ss(qi)||Mm(qi)||CI(qi)))return on(Ve,k._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias,Wi);if(ae&Kt)return on(Ve,k._0_modifier_already_seen,Wi);if(Kt&8192&&ae&16384)return on(Ve,k._0_modifier_must_precede_1_modifier,"in","out");ae|=Kt;break}}}return o.kind===176?ae&256?on(D,k._0_modifier_cannot_appear_on_a_constructor_declaration,"static"):ae&16?on(K,k._0_modifier_cannot_appear_on_a_constructor_declaration,"override"):ae&1024?on(B,k._0_modifier_cannot_appear_on_a_constructor_declaration,"async"):!1:(o.kind===272||o.kind===271)&&ae&128?on(L,k.A_0_modifier_cannot_be_used_with_an_import_declaration,"declare"):o.kind===169&&ae&31&&Qo(o.name)?on(o,k.A_parameter_property_may_not_be_declared_using_a_binding_pattern):o.kind===169&&ae&31&&o.dotDotDotToken?on(o,k.A_parameter_property_cannot_be_declared_using_a_rest_parameter):ae&1024?TYt(o,B):!1}function SYt(o){if(!o.modifiers)return!1;const _=wYt(o);return _&&Df(_,k.Modifiers_cannot_appear_here)}function age(o,_){const v=Me(o.modifiers,Ra);return v&&v.kind!==_?v:void 0}function wYt(o){switch(o.kind){case 177:case 178:case 176:case 172:case 171:case 174:case 173:case 181:case 267:case 272:case 271:case 278:case 277:case 218:case 219:case 169:case 168:return;case 175:case 303:case 304:case 270:case 282:return Me(o.modifiers,Ra);default:if(o.parent.kind===268||o.parent.kind===307)return;switch(o.kind){case 262:return age(o,134);case 263:case 185:return age(o,128);case 231:case 264:case 265:return Me(o.modifiers,Ra);case 243:return o.declarationList.flags&4?age(o,135):Me(o.modifiers,Ra);case 266:return age(o,87);default:z.assertNever(o)}}}function xYt(o){const _=kYt(o);return _&&Df(_,k.Decorators_are_not_valid_here)}function kYt(o){return tle(o)?Me(o.modifiers,jd):void 0}function TYt(o,_){switch(o.kind){case 174:case 262:case 218:case 219:return!1}return on(_,k._0_modifier_cannot_be_used_here,"async")}function qA(o,_=k.Trailing_comma_not_allowed){return o&&o.hasTrailingComma?UD(o[0],o.end-1,1,_):!1}function kpt(o,_){if(o&&o.length===0){const v=o.pos-1,S=qa(_.text,o.end)+1;return UD(_,v,S-v,k.Type_parameter_list_cannot_be_empty)}return!1}function DYt(o){let _=!1;const v=o.length;for(let S=0;S!!_.initializer||Qo(_.name)||O1(_))}function IYt(o){if(ue>=3){const _=o.body&&Ho(o.body)&&Xae(o.body.statements);if(_){const v=EYt(o.parameters);if(O(v)){W(v,D=>{fa(ht(D,k.This_parameter_is_not_allowed_with_use_strict_directive),Kn(_,k.use_strict_directive_used_here))});const S=v.map((D,L)=>L===0?Kn(D,k.Non_simple_parameter_declared_here):Kn(D,k.and_here));return fa(ht(_,k.use_strict_directive_cannot_be_used_with_non_simple_parameter_list),...S),!0}}}return!1}function lge(o){const _=_n(o);return gb(o)||kpt(o.typeParameters,_)||DYt(o.parameters)||LYt(o,_)||rc(o)&&IYt(o)}function NYt(o){const _=_n(o);return RYt(o)||kpt(o.typeParameters,_)}function LYt(o,_){if(!Dc(o))return!1;o.typeParameters&&!(O(o.typeParameters)>1||o.typeParameters.hasTrailingComma||o.typeParameters[0].constraint)&&_&&rd(_.fileName,[".mts",".cts"])&&on(o.typeParameters[0],k.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint);const{equalsGreaterThanToken:v}=o,S=Da(_,v.pos).line,D=Da(_,v.end).line;return S!==D&&on(v,k.Line_terminator_not_permitted_before_arrow)}function PYt(o){const _=o.parameters[0];if(o.parameters.length!==1)return on(_?_.name:o,k.An_index_signature_must_have_exactly_one_parameter);if(qA(o.parameters,k.An_index_signature_cannot_have_a_trailing_comma),_.dotDotDotToken)return on(_.dotDotDotToken,k.An_index_signature_cannot_have_a_rest_parameter);if(Doe(_))return on(_.name,k.An_index_signature_parameter_cannot_have_an_accessibility_modifier);if(_.questionToken)return on(_.questionToken,k.An_index_signature_parameter_cannot_have_a_question_mark);if(_.initializer)return on(_.name,k.An_index_signature_parameter_cannot_have_an_initializer);if(!_.type)return on(_.name,k.An_index_signature_parameter_must_have_a_type_annotation);const v=As(_.type);return Km(v,S=>!!(S.flags&8576))||OA(v)?on(_.name,k.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead):dp(v,C_e)?o.type?!1:on(o,k.An_index_signature_must_have_a_type_annotation):on(_.name,k.An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type)}function AYt(o){return gb(o)||PYt(o)}function OYt(o,_){if(_&&_.length===0){const v=_n(o),S=_.pos-1,D=qa(v.text,_.end)+1;return UD(v,S,D-S,k.Type_argument_list_cannot_be_empty)}return!1}function HY(o,_){return qA(_)||OYt(o,_)}function MYt(o){return o.questionDotToken||o.flags&64?on(o.template,k.Tagged_template_expressions_are_not_permitted_in_an_optional_chain):!1}function Tpt(o){const _=o.types;if(qA(_))return!0;if(_&&_.length===0){const v=Ta(o.token);return UD(o,_.pos,0,k._0_list_cannot_be_empty,v)}return Rt(_,Dpt)}function Dpt(o){return Gb(o)&&h7(o.expression)&&o.typeArguments?on(o,k.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments):HY(o,o.typeArguments)}function RYt(o){let _=!1,v=!1;if(!gb(o)&&o.heritageClauses)for(const S of o.heritageClauses){if(S.token===96){if(_)return Df(S,k.extends_clause_already_seen);if(v)return Df(S,k.extends_clause_must_precede_implements_clause);if(S.types.length>1)return Df(S.types[1],k.Classes_can_only_extend_a_single_class);_=!0}else{if(z.assert(S.token===119),v)return Df(S,k.implements_clause_already_seen);v=!0}Tpt(S)}}function FYt(o){let _=!1;if(o.heritageClauses)for(const v of o.heritageClauses){if(v.token===96){if(_)return Df(v,k.extends_clause_already_seen);_=!0}else return z.assert(v.token===119),Df(v,k.Interface_declaration_cannot_have_implements_clause);Tpt(v)}return!1}function cge(o){if(o.kind!==167)return!1;const _=o;return _.expression.kind===226&&_.expression.operatorToken.kind===28?on(_.expression,k.A_comma_expression_is_not_allowed_in_a_computed_property_name):!1}function f8e(o){if(o.asteriskToken){if(z.assert(o.kind===262||o.kind===218||o.kind===174),o.flags&33554432)return on(o.asteriskToken,k.Generators_are_not_allowed_in_an_ambient_context);if(!o.body)return on(o.asteriskToken,k.An_overload_signature_cannot_be_declared_as_a_generator)}}function h8e(o,_){return!!o&&on(o,_)}function Ept(o,_){return!!o&&on(o,_)}function BYt(o,_){const v=new Map;for(const S of o.properties){if(S.kind===305){if(_){const B=Il(S.expression);if(Rf(B)||Pa(B))return on(S.expression,k.A_rest_element_cannot_contain_a_binding_pattern)}continue}const D=S.name;if(D.kind===167&&cge(D),S.kind===304&&!_&&S.objectAssignmentInitializer&&on(S.equalsToken,k.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern),D.kind===81&&on(D,k.Private_identifiers_are_not_allowed_outside_class_bodies),_0(S)&&S.modifiers)for(const B of S.modifiers)Ra(B)&&(B.kind!==134||S.kind!==174)&&on(B,k._0_modifier_cannot_be_used_here,yu(B));else if(STe(S)&&S.modifiers)for(const B of S.modifiers)Ra(B)&&on(B,k._0_modifier_cannot_be_used_here,yu(B));let L;switch(S.kind){case 304:case 303:Ept(S.exclamationToken,k.A_definite_assignment_assertion_is_not_permitted_in_this_context),h8e(S.questionToken,k.An_object_member_cannot_be_declared_optional),D.kind===9&&Rpt(D),L=4;break;case 174:L=8;break;case 177:L=1;break;case 178:L=2;break;default:z.assertNever(S,"Unexpected syntax kind:"+S.kind)}if(!_){const B=g8e(D);if(B===void 0)continue;const K=v.get(B);if(!K)v.set(B,L);else if(L&8&&K&8)on(D,k.Duplicate_identifier_0,yu(D));else if(L&4&&K&4)on(D,k.An_object_literal_cannot_have_multiple_properties_with_the_same_name,yu(D));else if(L&3&&K&3)if(K!==3&&L!==K)v.set(B,L|K);else return on(D,k.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name);else return on(D,k.An_object_literal_cannot_have_property_and_accessor_with_the_same_name)}}}function WYt(o){VYt(o.tagName),HY(o,o.typeArguments);const _=new Map;for(const v of o.attributes.properties){if(v.kind===293)continue;const{name:S,initializer:D}=v,L=s7(S);if(!_.get(L))_.set(L,!0);else return on(S,k.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);if(D&&D.kind===294&&!D.expression)return on(D,k.JSX_attributes_must_only_be_assigned_a_non_empty_expression)}}function VYt(o){if(Ir(o)&&J0(o.expression))return on(o.expression,k.JSX_property_access_expressions_cannot_include_JSX_namespace_names);if(J0(o)&&sG(Y)&&!U6(o.namespace.escapedText))return on(o,k.React_components_cannot_include_JSX_namespace_names)}function HYt(o){if(o.expression&&k7(o.expression))return on(o.expression,k.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array)}function Ipt(o){if(IC(o))return!0;if(o.kind===250&&o.awaitModifier&&!(o.flags&65536)){const _=_n(o);if(_J(o)){if(!Wx(_))switch(jL(_,Y)||vl.add(Kn(o.awaitModifier,k.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module)),te){case 100:case 199:if(_.impliedNodeFormat===1){vl.add(Kn(o.awaitModifier,k.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level));break}case 7:case 99:case 4:if(ue>=4)break;default:vl.add(Kn(o.awaitModifier,k.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher));break}}else if(!Wx(_)){const v=Kn(o.awaitModifier,k.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules),S=Kp(o);if(S&&S.kind!==176){z.assert((ad(S)&2)===0,"Enclosing function should never be an async function.");const D=Kn(S,k.Did_you_mean_to_mark_this_function_as_async);fa(v,D)}return vl.add(v),!0}}if(hV(o)&&!(o.flags&65536)&<(o.initializer)&&o.initializer.escapedText==="async")return on(o.initializer,k.The_left_hand_side_of_a_for_of_statement_may_not_be_async),!1;if(o.initializer.kind===261){const _=o.initializer;if(!p8e(_)){const v=_.declarations;if(!v.length)return!1;if(v.length>1){const D=o.kind===249?k.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:k.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement;return Df(_.declarations[1],D)}const S=v[0];if(S.initializer){const D=o.kind===249?k.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:k.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer;return on(S.name,D)}if(S.type){const D=o.kind===249?k.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:k.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation;return on(S,D)}}}return!1}function jYt(o){if(!(o.flags&33554432)&&o.parent.kind!==187&&o.parent.kind!==264){if(ue<2&&Vs(o.name))return on(o.name,k.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(o.body===void 0&&!Kr(o,64))return UD(o,o.end-1,1,k._0_expected,"{")}if(o.body){if(Kr(o,64))return on(o,k.An_abstract_accessor_cannot_have_an_implementation);if(o.parent.kind===187||o.parent.kind===264)return on(o.body,k.An_implementation_cannot_be_declared_in_ambient_contexts)}if(o.typeParameters)return on(o.name,k.An_accessor_cannot_have_type_parameters);if(!zYt(o))return on(o.name,o.kind===177?k.A_get_accessor_cannot_have_parameters:k.A_set_accessor_must_have_exactly_one_parameter);if(o.kind===178){if(o.type)return on(o.name,k.A_set_accessor_cannot_have_a_return_type_annotation);const _=z.checkDefined(J6(o),"Return value does not match parameter count assertion.");if(_.dotDotDotToken)return on(_.dotDotDotToken,k.A_set_accessor_cannot_have_rest_parameter);if(_.questionToken)return on(_.questionToken,k.A_set_accessor_cannot_have_an_optional_parameter);if(_.initializer)return on(o.name,k.A_set_accessor_parameter_cannot_have_an_initializer)}return!1}function zYt(o){return _8e(o)||o.parameters.length===(o.kind===177?0:1)}function _8e(o){if(o.parameters.length===(o.kind===177?1:2))return RT(o)}function UYt(o){if(o.operator===158){if(o.type.kind!==155)return on(o.type,k._0_expected,Ta(155));let _=DW(o.parent);if(Xn(_)&&qk(_)){const v=AT(_);v&&(_=XL(v)||v)}switch(_.kind){case 260:const v=_;if(v.name.kind!==80)return on(o,k.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name);if(!v8(v))return on(o,k.unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement);if(!(v.parent.flags&2))return on(_.name,k.A_variable_whose_type_is_a_unique_symbol_type_must_be_const);break;case 172:if(!da(_)||!R8(_))return on(_.name,k.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly);break;case 171:if(!Kr(_,8))return on(_.name,k.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly);break;default:return on(o,k.unique_symbol_types_are_not_allowed_here)}}else if(o.operator===148&&o.type.kind!==188&&o.type.kind!==189)return Df(o,k.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types,Ta(155))}function c5(o,_){if(YHt(o))return on(o,_)}function Npt(o){if(lge(o))return!0;if(o.kind===174){if(o.parent.kind===210){if(o.modifiers&&!(o.modifiers.length===1&&ma(o.modifiers).kind===134))return Df(o,k.Modifiers_cannot_appear_here);if(h8e(o.questionToken,k.An_object_member_cannot_be_declared_optional))return!0;if(Ept(o.exclamationToken,k.A_definite_assignment_assertion_is_not_permitted_in_this_context))return!0;if(o.body===void 0)return UD(o,o.end-1,1,k._0_expected,"{")}if(f8e(o))return!0}if(ss(o.parent)){if(ue<2&&Vs(o.name))return on(o.name,k.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(o.flags&33554432)return c5(o.name,k.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(o.kind===174&&!o.body)return c5(o.name,k.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}else{if(o.parent.kind===264)return c5(o.name,k.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(o.parent.kind===187)return c5(o.name,k.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}}function qYt(o){let _=o;for(;_;){if(w6(_))return on(o,k.Jump_target_cannot_cross_function_boundary);switch(_.kind){case 256:if(o.label&&_.label.escapedText===o.label.escapedText)return o.kind===251&&!Hw(_.statement,!0)?on(o,k.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement):!1;break;case 255:if(o.kind===252&&!o.label)return!1;break;default:if(Hw(_,!1)&&!o.label)return!1;break}_=_.parent}if(o.label){const v=o.kind===252?k.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:k.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement;return on(o,v)}else{const v=o.kind===252?k.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:k.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement;return on(o,v)}}function $Yt(o){if(o.dotDotDotToken){const _=o.parent.elements;if(o!==La(_))return on(o,k.A_rest_element_must_be_last_in_a_destructuring_pattern);if(qA(_,k.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma),o.propertyName)return on(o.name,k.A_rest_element_cannot_have_a_property_name)}if(o.dotDotDotToken&&o.initializer)return UD(o,o.initializer.pos-1,1,k.A_rest_element_cannot_have_an_initializer)}function Lpt(o){return ug(o)||o.kind===224&&o.operator===41&&o.operand.kind===9}function JYt(o){return o.kind===10||o.kind===224&&o.operator===41&&o.operand.kind===10}function GYt(o){if((Ir(o)||wc(o)&&Lpt(o.argumentExpression))&&pc(o.expression))return!!(Vu(o).flags&1056)}function Ppt(o){const _=o.initializer;if(_){const v=!(Lpt(_)||GYt(_)||_.kind===112||_.kind===97||JYt(_));if((tW(o)||ds(o)&&dz(o))&&!o.type){if(v)return on(_,k.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference)}else return on(_,k.Initializers_are_not_allowed_in_ambient_contexts)}}function KYt(o){const _=qD(o),v=_&7;if(Qo(o.name))switch(v){case 6:return on(o,k._0_declarations_may_not_have_binding_patterns,"await using");case 4:return on(o,k._0_declarations_may_not_have_binding_patterns,"using")}if(o.parent.parent.kind!==249&&o.parent.parent.kind!==250){if(_&33554432)Ppt(o);else if(!o.initializer){if(Qo(o.name)&&!Qo(o.parent))return on(o,k.A_destructuring_declaration_must_have_an_initializer);switch(v){case 6:return on(o,k._0_declarations_must_be_initialized,"await using");case 4:return on(o,k._0_declarations_must_be_initialized,"using");case 2:return on(o,k._0_declarations_must_be_initialized,"const")}}}if(o.exclamationToken&&(o.parent.parent.kind!==243||!o.type||o.initializer||_&33554432)){const S=o.initializer?k.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:o.type?k.A_definite_assignment_assertion_is_not_permitted_in_this_context:k.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations;return on(o.exclamationToken,S)}return(te<5||_n(o).impliedNodeFormat===1)&&te!==4&&!(o.parent.parent.flags&33554432)&&Kr(o.parent.parent,32)&&Apt(o.name),!!v&&Opt(o.name)}function Apt(o){if(o.kind===80){if(dr(o)==="__esModule")return ZYt("noEmit",o,k.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules)}else{const _=o.elements;for(const v of _)if(!zd(v))return Apt(v.name)}return!1}function Opt(o){if(o.kind===80){if(o.escapedText==="let")return on(o,k.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations)}else{const _=o.elements;for(const v of _)zd(v)||Opt(v.name)}return!1}function p8e(o){const _=o.declarations;if(qA(o.declarations))return!0;if(!o.declarations.length)return UD(o,_.pos,_.end-_.pos,k.Variable_declaration_list_cannot_be_empty);const v=o.flags&7;return(v===4||v===6)&&qG(o.parent)?on(o,v===4?k.The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration:k.The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration):v===6?Zht(o):!1}function Mpt(o){switch(o.kind){case 245:case 246:case 247:case 254:case 248:case 249:case 250:return!1;case 256:return Mpt(o.parent)}return!0}function QYt(o){if(!Mpt(o.parent)){const _=qD(o.declarationList)&7;if(_){const v=_===1?"let":_===2?"const":_===4?"using":_===6?"await using":z.fail("Unknown BlockScope flag");return on(o,k._0_declarations_can_only_be_declared_inside_a_block,v)}}}function XYt(o){const _=o.name.escapedText;switch(o.keywordToken){case 105:if(_!=="target")return on(o.name,k._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2,Ws(o.name.escapedText),Ta(o.keywordToken),"target");break;case 102:if(_!=="meta")return on(o.name,k._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2,Ws(o.name.escapedText),Ta(o.keywordToken),"meta");break}}function Wx(o){return o.parseDiagnostics.length>0}function Df(o,_,...v){const S=_n(o);if(!Wx(S)){const D=R1(S,o.pos);return vl.add(ef(S,D.start,D.length,_,...v)),!0}return!1}function UD(o,_,v,S,...D){const L=_n(o);return Wx(L)?!1:(vl.add(ef(L,_,v,S,...D)),!0)}function ZYt(o,_,v,...S){const D=_n(_);return Wx(D)?!1:(iv(o,_,v,...S),!0)}function on(o,_,...v){const S=_n(o);return Wx(S)?!1:(vl.add(Kn(o,_,...v)),!0)}function YYt(o){const _=Xn(o)?WJ(o):void 0,v=o.typeParameters||_&&lu(_);if(v){const S=v.pos===v.end?v.pos:qa(_n(o).text,v.pos);return UD(o,S,v.end-S,k.Type_parameters_cannot_appear_on_a_constructor_declaration)}}function eei(o){const _=o.type||Dp(o);if(_)return on(_,k.Type_annotation_cannot_appear_on_a_constructor_declaration)}function tei(o){if(Ja(o.name)&&cr(o.name.expression)&&o.name.expression.operatorToken.kind===103)return on(o.parent.members[0],k.A_mapped_type_may_not_declare_properties_or_methods);if(ss(o.parent)){if(ja(o.name)&&o.name.text==="constructor")return on(o.name,k.Classes_may_not_have_a_field_named_constructor);if(c5(o.name,k.A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type))return!0;if(ue<2&&Vs(o.name))return on(o.name,k.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(ue<2&&O_(o))return on(o.name,k.Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(O_(o)&&h8e(o.questionToken,k.An_accessor_property_cannot_be_declared_optional))return!0}else if(o.parent.kind===264){if(c5(o.name,k.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type))return!0;if(z.assertNode(o,V_),o.initializer)return on(o.initializer,k.An_interface_property_cannot_have_an_initializer)}else if(p_(o.parent)){if(c5(o.name,k.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type))return!0;if(z.assertNode(o,V_),o.initializer)return on(o.initializer,k.A_type_literal_property_cannot_have_an_initializer)}if(o.flags&33554432&&Ppt(o),To(o)&&o.exclamationToken&&(!ss(o.parent)||!o.type||o.initializer||o.flags&33554432||da(o)||WT(o))){const _=o.initializer?k.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:o.type?k.A_definite_assignment_assertion_is_not_permitted_in_this_context:k.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations;return on(o.exclamationToken,_)}}function iei(o){return o.kind===264||o.kind===265||o.kind===272||o.kind===271||o.kind===278||o.kind===277||o.kind===270||Kr(o,2208)?!1:Df(o,k.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier)}function nei(o){for(const _ of o.statements)if((Yf(_)||_.kind===243)&&iei(_))return!0;return!1}function rei(o){return!!(o.flags&33554432)&&nei(o)}function IC(o){if(o.flags&33554432){if(!Tr(o).hasReportedStatementInAmbientContext&&(Bo(o.parent)||Vw(o.parent)))return Tr(o).hasReportedStatementInAmbientContext=Df(o,k.An_implementation_cannot_be_declared_in_ambient_contexts);if(o.parent.kind===241||o.parent.kind===268||o.parent.kind===307){const v=Tr(o.parent);if(!v.hasReportedStatementInAmbientContext)return v.hasReportedStatementInAmbientContext=Df(o,k.Statements_are_not_allowed_in_ambient_contexts)}}return!1}function Rpt(o){const _=yu(o).includes("."),v=o.numericLiteralFlags&16;_||v||+o.text<=2**53-1||v0(!1,Kn(o,k.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers))}function sei(o){return!!(!(gS(o.parent)||tx(o.parent)&&gS(o.parent.parent))&&ue<7&&on(o,k.BigInt_literals_are_not_available_when_targeting_lower_than_ES2020))}function oei(o,_,...v){const S=_n(o);if(!Wx(S)){const D=R1(S,o.pos);return vl.add(ef(S,zu(D),0,_,...v)),!0}return!1}function aei(){return Fc||(Fc=[],Ue.forEach((o,_)=>{HDe.test(_)&&Fc.push(o)})),Fc}function lei(o){var _;return o.isTypeOnly&&o.name&&o.namedBindings?on(o,k.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both):o.isTypeOnly&&((_=o.namedBindings)==null?void 0:_.kind)===275?Fpt(o.namedBindings):!1}function Fpt(o){return!!W(o.elements,_=>{if(_.isTypeOnly)return Df(_,_.kind===276?k.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement:k.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement)})}function cei(o){if(Y.verbatimModuleSyntax&&te===1)return on(o,k.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);if(te===5)return on(o,k.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext);if(o.typeArguments)return on(o,k.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments);const _=o.arguments;if(te!==99&&te!==199&&te!==100&&(qA(_),_.length>1)){const S=_[1];return on(S,k.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext)}if(_.length===0||_.length>2)return on(o,k.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments);const v=Me(_,Zg);return v?on(v,k.Argument_of_dynamic_import_cannot_be_spread_element):!1}function uei(o,_){const v=Rr(o);if(v&20&&_.flags&1048576)return Me(_.types,S=>{if(S.flags&524288){const D=v&Rr(S);if(D&4)return o.target===S.target;if(D&16)return!!o.aliasSymbol&&o.aliasSymbol===S.aliasSymbol}return!1})}function dei(o,_){if(Rr(o)&128&&Km(_,XS))return Me(_.types,v=>!XS(v))}function fei(o,_){let v=0;if(ea(o,v).length>0||(v=1,ea(o,v).length>0))return Me(_.types,D=>ea(D,v).length>0)}function hei(o,_){let v;if(!(o.flags&406978556)){let S=0;for(const D of _.types)if(!(D.flags&406978556)){const L=Fa([l1(o),l1(D)]);if(L.flags&4194304)return D;if(uv(L)||L.flags&1048576){const B=L.flags&1048576?$n(L.types,uv):1;B>=S&&(v=D,S=B)}}}return v}function _ei(o){if(Fu(o,67108864)){const _=ud(o,v=>!(v.flags&402784252));if(!(_.flags&131072))return _}return o}function Bpt(o,_,v){if(_.flags&1048576&&o.flags&2621440){const S=Udt(_,o);if(S)return S;const D=Nl(o);if(D){const L=zdt(D,_);if(L){const B=eMe(_,Yt(L,K=>[()=>Qn(K),K.escapedName]),v);if(B!==_)return B}}}}function g8e(o){const _=lI(o);return _||(Ja(o)?TMe(zf(o.expression)):void 0)}function uge(o){return Oi===o||(Oi=o,Ji=wk(o)),Ji}function qD(o){return ft===o||(ft=o,Ht=Rb(o)),Ht}function dz(o){const _=qD(o)&7;return _===2||_===4||_===6}function pei(o,_){const v=Y.importHelpers?1:0,S=o==null?void 0:o.imports[v];return S&&z.assert(oc(S)&&S.text===_,`Expected sourceFile.imports[${v}] to be the synthesized JSX runtime import`),S}function gei(o){z.assert(Y.importHelpers,"Expected importHelpers to be enabled");const _=o.imports[0];return z.assert(_&&oc(_)&&_.text==="tslib","Expected sourceFile.imports[0] to be the synthesized tslib import"),_}}function VPt(t){return!Vw(t)}function kKe(t){return t.kind!==262&&t.kind!==174||!!t.body}function TKe(t){switch(t.parent.kind){case 276:case 281:return lt(t);default:return F1(t)}}var mg;(t=>{t.JSX="JSX",t.IntrinsicElements="IntrinsicElements",t.ElementClass="ElementClass",t.ElementAttributesPropertyNameContainer="ElementAttributesProperty",t.ElementChildrenAttributeNameContainer="ElementChildrenAttribute",t.Element="Element",t.ElementType="ElementType",t.IntrinsicAttributes="IntrinsicAttributes",t.IntrinsicClassAttributes="IntrinsicClassAttributes",t.LibraryManagedAttributes="LibraryManagedAttributes"})(mg||(mg={}));function DKe(t){switch(t){case 0:return"yieldType";case 1:return"returnType";case 2:return"nextType"}}function vh(t){return!!(t.flags&1)}function Qle(t){return!!(t.flags&2)}function HPt(t){return{getCommonSourceDirectory:t.getCommonSourceDirectory?()=>t.getCommonSourceDirectory():()=>"",getCurrentDirectory:()=>t.getCurrentDirectory(),getSymlinkCache:la(t,t.getSymlinkCache),getPackageJsonInfoCache:()=>{var r;return(r=t.getPackageJsonInfoCache)==null?void 0:r.call(t)},useCaseSensitiveFileNames:la(t,t.useCaseSensitiveFileNames),redirectTargetsMap:t.redirectTargetsMap,getProjectReferenceRedirect:r=>t.getProjectReferenceRedirect(r),isSourceOfProjectReferenceRedirect:r=>t.isSourceOfProjectReferenceRedirect(r),fileExists:r=>t.fileExists(r),getFileIncludeReasons:()=>t.getFileIncludeReasons(),readFile:t.readFile?r=>t.readFile(r):void 0}}var UDe=class XDt{constructor(r,a,u){this.moduleResolverHost=void 0,this.inner=void 0,this.disableTrackSymbol=!1;for(var h;a instanceof XDt;)a=a.inner;this.inner=a,this.moduleResolverHost=u,this.context=r,this.canTrackSymbol=!!((h=this.inner)!=null&&h.trackSymbol)}trackSymbol(r,a,u){var h,p;if((h=this.inner)!=null&&h.trackSymbol&&!this.disableTrackSymbol){if(this.inner.trackSymbol(r,a,u))return this.onDiagnosticReported(),!0;r.flags&262144||((p=this.context).trackedSymbols??(p.trackedSymbols=[])).push([r,a,u])}return!1}reportInaccessibleThisError(){var r;(r=this.inner)!=null&&r.reportInaccessibleThisError&&(this.onDiagnosticReported(),this.inner.reportInaccessibleThisError())}reportPrivateInBaseOfClassExpression(r){var a;(a=this.inner)!=null&&a.reportPrivateInBaseOfClassExpression&&(this.onDiagnosticReported(),this.inner.reportPrivateInBaseOfClassExpression(r))}reportInaccessibleUniqueSymbolError(){var r;(r=this.inner)!=null&&r.reportInaccessibleUniqueSymbolError&&(this.onDiagnosticReported(),this.inner.reportInaccessibleUniqueSymbolError())}reportCyclicStructureError(){var r;(r=this.inner)!=null&&r.reportCyclicStructureError&&(this.onDiagnosticReported(),this.inner.reportCyclicStructureError())}reportLikelyUnsafeImportRequiredError(r){var a;(a=this.inner)!=null&&a.reportLikelyUnsafeImportRequiredError&&(this.onDiagnosticReported(),this.inner.reportLikelyUnsafeImportRequiredError(r))}reportTruncationError(){var r;(r=this.inner)!=null&&r.reportTruncationError&&(this.onDiagnosticReported(),this.inner.reportTruncationError())}reportNonlocalAugmentation(r,a,u){var h;(h=this.inner)!=null&&h.reportNonlocalAugmentation&&(this.onDiagnosticReported(),this.inner.reportNonlocalAugmentation(r,a,u))}reportNonSerializableProperty(r){var a;(a=this.inner)!=null&&a.reportNonSerializableProperty&&(this.onDiagnosticReported(),this.inner.reportNonSerializableProperty(r))}onDiagnosticReported(){this.context.reportedDiagnostic=!0}reportInferenceFallback(r){var a;(a=this.inner)!=null&&a.reportInferenceFallback&&this.inner.reportInferenceFallback(r)}};function Ct(t,r,a,u){if(t===void 0)return t;const h=r(t);let p;if(h!==void 0)return Lo(h)?p=(u||JPt)(h):p=h,z.assertNode(p,a),p}function wn(t,r,a,u,h){if(t===void 0)return t;const p=t.length;(u===void 0||u<0)&&(u=0),(h===void 0||h>p-u)&&(h=p-u);let m,C=-1,b=-1;u>0||hp-u)&&(h=p-u),EKe(t,r,a,u,h)}function EKe(t,r,a,u,h){let p;const m=t.length;(u>0||h=2&&(h=jPt(h,a)),a.setLexicalEnvironmentFlags(1,!1)),a.suspendLexicalEnvironment(),h}function jPt(t,r){let a;for(let u=0;u{const m=uC,addSource:Fe,setSourceContent:Oe,addName:fe,addMapping:et,appendSourceMap:He,toJSON:nt,toString:()=>JSON.stringify(nt())};function Fe(st){p();const xt=OL(u,st,t.getCurrentDirectory(),t.getCanonicalFileName,!0);let Et=T.get(xt);return Et===void 0&&(Et=b.length,b.push(xt),C.push(st),T.set(xt,Et)),m(),Et}function Oe(st,xt){if(p(),xt!==null){for(E||(E=[]);E.lengthxt||ye===xt&&be>Et)}function et(st,xt,Et,ft,Ht,Oi){z.assert(st>=Se,"generatedLine cannot backtrack"),z.assert(xt>=0,"generatedCharacter cannot be negative"),z.assert(Et===void 0||Et>=0,"sourceIndex cannot be negative"),z.assert(ft===void 0||ft>=0,"sourceLine cannot be negative"),z.assert(Ht===void 0||Ht>=0,"sourceCharacter cannot be negative"),p(),(Ie(st,xt)||Le(Et,ft,Ht))&&(Ye(),Se=st,oe=xt,Ee=!1,ke=!1,ve=!0),Et!==void 0&&ft!==void 0&&Ht!==void 0&&(pe=Et,ye=ft,be=Ht,Ee=!0,Oi!==void 0&&(_e=Oi,ke=!0)),m()}function He(st,xt,Et,ft,Ht,Oi){z.assert(st>=Se,"generatedLine cannot backtrack"),z.assert(xt>=0,"generatedCharacter cannot be negative"),p();const Ji=[];let Ui;const bn=tce(Et.mappings);for(const Mi of bn){if(Oi&&(Mi.generatedLine>Oi.line||Mi.generatedLine===Oi.line&&Mi.generatedCharacter>Oi.character))break;if(Ht&&(Mi.generatedLine=1024&&wt()}function Ye(){if(!(!ve||!We())){if(p(),U0&&(j+=String.fromCharCode.apply(void 0,F),F.length=0)}function nt(){return Ye(),wt(),{version:3,file:r,sourceRoot:a,sources:b,names:N,mappings:j,sourcesContent:E}}function ze(st){st<0?st=(-st<<1)+1:st=st<<1;do{let xt=st&31;st=st>>5,st>0&&(xt=xt|32),Ue(KPt(xt))}while(st>0)}}var $De=/\/\/[@#] source[M]appingURL=(.+)\r?\n?$/,Zle=/^\/\/[@#] source[M]appingURL=(.+)\r?\n?$/,Yle=/^\s*(\/\/[@#] .*)?$/;function ece(t,r){return{getLineCount:()=>r.length,getLineText:a=>t.substring(r[a],r[a+1])}}function JDe(t){for(let r=t.getLineCount()-1;r>=0;r--){const a=t.getLineText(r),u=Zle.exec(a);if(u)return u[1].trimEnd();if(!a.match(Yle))break}}function GPt(t){return typeof t=="string"||t===null}function GDe(t){return t!==null&&typeof t=="object"&&t.version===3&&typeof t.file=="string"&&typeof t.mappings=="string"&&Lo(t.sources)&&Be(t.sources,mo)&&(t.sourceRoot===void 0||t.sourceRoot===null||typeof t.sourceRoot=="string")&&(t.sourcesContent===void 0||t.sourcesContent===null||Lo(t.sourcesContent)&&Be(t.sourcesContent,GPt))&&(t.names===void 0||t.names===null||Lo(t.names)&&Be(t.names,mo))}function KDe(t){try{const r=JSON.parse(t);if(GDe(r))return r}catch{}}function tce(t){let r=!1,a=0,u=0,h=0,p=0,m=0,C=0,b=0,T;return{get pos(){return a},get error(){return T},get state(){return E(!0,!0)},next(){for(;!r&&a=t.length)return R("Error in decoding base64VLQFormatDecode, past the mapping string"),-1;const ue=QPt(t.charCodeAt(a));if(ue===-1)return R("Invalid character in VLQ"),-1;Q=(ue&32)!==0,Y=Y|(ue&31)<>1,Y=-Y):Y=Y>>1,Y}}function IKe(t,r){return t===r||t.generatedLine===r.generatedLine&&t.generatedCharacter===r.generatedCharacter&&t.sourceIndex===r.sourceIndex&&t.sourceLine===r.sourceLine&&t.sourceCharacter===r.sourceCharacter&&t.nameIndex===r.nameIndex}function QDe(t){return t.sourceIndex!==void 0&&t.sourceLine!==void 0&&t.sourceCharacter!==void 0}function KPt(t){return t>=0&&t<26?65+t:t>=26&&t<52?97+t-26:t>=52&&t<62?48+t-52:t===62?43:t===63?47:z.fail(`${t}: not a base64 value`)}function QPt(t){return t>=65&&t<=90?t-65:t>=97&&t<=122?t-97+26:t>=48&&t<=57?t-48+52:t===43?62:t===47?63:-1}function NKe(t){return t.sourceIndex!==void 0&&t.sourcePosition!==void 0}function LKe(t,r){return t.generatedPosition===r.generatedPosition&&t.sourceIndex===r.sourceIndex&&t.sourcePosition===r.sourcePosition}function XPt(t,r){return z.assert(t.sourceIndex===r.sourceIndex),hc(t.sourcePosition,r.sourcePosition)}function ZPt(t,r){return hc(t.generatedPosition,r.generatedPosition)}function YPt(t){return t.sourcePosition}function eAt(t){return t.generatedPosition}function XDe(t,r,a){const u=rs(a),h=r.sourceRoot?bo(r.sourceRoot,u):u,p=bo(r.file,u),m=t.getSourceFileLike(p),C=r.sources.map(re=>bo(re,h)),b=new Map(C.map((re,Y)=>[t.getCanonicalFileName(re),Y]));let T,E,N;return{getSourcePosition:Q,getGeneratedPosition:q};function R(re){const Y=m!==void 0?wB(m,re.generatedLine,re.generatedCharacter,!0):-1;let ue,te;if(QDe(re)){const Se=t.getSourceFileLike(C[re.sourceIndex]);ue=r.sources[re.sourceIndex],te=Se!==void 0?wB(Se,re.sourceLine,re.sourceCharacter,!0):-1}return{generatedPosition:Y,source:ue,sourceIndex:re.sourceIndex,sourcePosition:te,nameIndex:re.nameIndex}}function F(){if(T===void 0){const re=tce(r.mappings),Y=Fn(re,R);re.error!==void 0?(t.log&&t.log(`Encountered error while decoding sourcemap: ${re.error}`),T=x):T=Y}return T}function j(re){if(N===void 0){const Y=[];for(const ue of F()){if(!NKe(ue))continue;let te=Y[ue.sourceIndex];te||(Y[ue.sourceIndex]=te=[]),te.push(ue)}N=Y.map(ue=>fr(ue,XPt,LKe))}return N[re]}function U(){if(E===void 0){const re=[];for(const Y of F())re.push(Y);E=fr(re,ZPt,LKe)}return E}function q(re){const Y=b.get(t.getCanonicalFileName(re.fileName));if(Y===void 0)return re;const ue=j(Y);if(!Rt(ue))return re;let te=QC(ue,re.pos,YPt,hc);te<0&&(te=~te);const Se=ue[te];return Se===void 0||Se.sourceIndex!==Y?re:{fileName:p,pos:Se.generatedPosition}}function Q(re){const Y=U();if(!Rt(Y))return re;let ue=QC(Y,re.pos,eAt,hc);ue<0&&(ue=~ue);const te=Y[ue];return te===void 0||!NKe(te)?re:{fileName:C[te.sourceIndex],pos:te.sourcePosition}}}var ice={getSourcePosition:fc,getGeneratedPosition:fc};function y_(t){return t=uu(t),t?Tl(t):0}function PKe(t){return!t||!zv(t)&&!Yg(t)?!1:Rt(t.elements,AKe)}function AKe(t){return t.propertyName!==void 0?t.propertyName.escapedText==="default":t.name.escapedText==="default"}function Q0(t,r){return a;function a(h){return h.kind===307?r(h):u(h)}function u(h){return t.factory.createBundle(Yt(h.sourceFiles,r))}}function ZDe(t){return!!F6(t)}function FK(t){if(F6(t))return!0;const r=t.importClause&&t.importClause.namedBindings;if(!r||!zv(r))return!1;let a=0;for(const u of r.elements)AKe(u)&&a++;return a>0&&a!==r.elements.length||!!(r.elements.length-a)&&KL(t)}function nce(t){return!FK(t)&&(KL(t)||!!t.importClause&&zv(t.importClause.namedBindings)&&PKe(t.importClause.namedBindings))}function rce(t,r){const a=t.getEmitResolver(),u=t.getCompilerOptions(),h=[],p=new YDe,m=[],C=new Map,b=new Set;let T,E=!1,N,R=!1,F=!1,j=!1;for(const re of r.statements)switch(re.kind){case 272:h.push(re),!F&&FK(re)&&(F=!0),!j&&nce(re)&&(j=!0);break;case 271:re.moduleReference.kind===283&&h.push(re);break;case 278:if(re.moduleSpecifier)if(!re.exportClause)h.push(re),R=!0;else if(h.push(re),Yg(re.exportClause))q(re),j||(j=PKe(re.exportClause));else{const Y=re.exportClause.name;C.get(dr(Y))||(W7(m,y_(re),Y),C.set(dr(Y),!0),T=xi(T,Y)),F=!0}else q(re);break;case 277:re.isExportEquals&&!N&&(N=re);break;case 243:if(Kr(re,32))for(const Y of re.declarationList.declarations)T=OKe(Y,C,T,m);break;case 262:Kr(re,32)&&Q(re,void 0,Kr(re,2048));break;case 263:if(Kr(re,32))if(Kr(re,2048))E||(W7(m,y_(re),t.factory.getDeclarationName(re)),E=!0);else{const Y=re.name;Y&&!C.get(dr(Y))&&(W7(m,y_(re),Y),C.set(dr(Y),!0),T=xi(T,Y))}break}const U=Zae(t.factory,t.getEmitHelperFactory(),r,u,R,F,j);return U&&h.unshift(U),{externalImports:h,exportSpecifiers:p,exportEquals:N,hasExportStarsToExportValues:R,exportedBindings:m,exportedNames:T,exportedFunctions:b,externalHelpersImportDeclaration:U};function q(re){for(const Y of ua(re.exportClause,Yg).elements)if(!C.get(dr(Y.name))){const ue=Y.propertyName||Y.name;re.moduleSpecifier||p.add(ue,Y);const te=a.getReferencedImportDeclaration(ue)||a.getReferencedValueDeclaration(ue);if(te){if(te.kind===262){Q(te,Y.name,Y.name.escapedText==="default");continue}W7(m,y_(te),Y.name)}C.set(dr(Y.name),!0),T=xi(T,Y.name)}}function Q(re,Y,ue){b.add(re),ue?E||(W7(m,y_(re),Y??t.factory.getDeclarationName(re)),E=!0):(Y??(Y=re.name),C.get(dr(Y))||(W7(m,y_(re),Y),C.set(dr(Y),!0)))}}function OKe(t,r,a,u){if(Qo(t.name))for(const h of t.name.elements)zd(h)||(a=OKe(h,r,a,u));else if(!jc(t.name)){const h=dr(t.name);r.get(h)||(r.set(h,!0),a=xi(a,t.name),Xb(t.name)&&W7(u,y_(t),t.name))}return a}function W7(t,r,a){let u=t[r];return u?u.push(a):t[r]=u=[a],u}var w3=class lM{constructor(){this._map=new Map}get size(){return this._map.size}has(r){return this._map.has(lM.toKey(r))}get(r){return this._map.get(lM.toKey(r))}set(r,a){return this._map.set(lM.toKey(r),a),this}delete(r){var a;return((a=this._map)==null?void 0:a.delete(lM.toKey(r)))??!1}clear(){this._map.clear()}values(){return this._map.values()}static toKey(r){if(ZE(r)||jc(r)){const a=r.emitNode.autoGenerate;if((a.flags&7)===4){const u=SV(r),h=Uy(u)&&u!==r?lM.toKey(u):`(generated@${Tl(u)})`;return Jk(!1,a.prefix,h,a.suffix,lM.toKey)}else{const u=`(auto@${a.id})`;return Jk(!1,a.prefix,u,a.suffix,lM.toKey)}}return Vs(r)?dr(r).slice(1):dr(r)}},YDe=class extends w3{add(t,r){let a=this.get(t);return a?a.push(r):this.set(t,a=[r]),a}remove(t,r){const a=this.get(t);a&&(LL(a,r),a.length||this.delete(t))}};function iD(t){return Ml(t)||t.kind===9||d_(t.kind)||lt(t)}function z1(t){return!lt(t)&&iD(t)}function V7(t){return t>=65&&t<=79}function H7(t){switch(t){case 65:return 40;case 66:return 41;case 67:return 42;case 68:return 43;case 69:return 44;case 70:return 45;case 71:return 48;case 72:return 49;case 73:return 50;case 74:return 51;case 75:return 52;case 79:return 53;case 76:return 57;case 77:return 56;case 78:return 61}}function BK(t){if(!_f(t))return;const r=Il(t.expression);return rI(r)?r:void 0}function MKe(t,r,a){for(let u=r;uiAt(u,r,a))}function tAt(t){return nAt(t)||bu(t)}function VK(t){return Ri(t.members,tAt)}function iAt(t,r,a){return To(t)&&(!!t.initializer||!r)&&_d(t)===a}function nAt(t){return To(t)&&_d(t)}function WV(t){return t.kind===172&&t.initializer!==void 0}function eEe(t){return!da(t)&&(WL(t)||O_(t))&&Vs(t.name)}function tEe(t){let r;if(t){const a=t.parameters,u=a.length>0&&FT(a[0]),h=u?1:0,p=u?a.length-1:a.length;for(let m=0;mace(a.privateEnv,r))}function sEe(t){return!t.initializer&<(t.name)}function VV(t){return Be(t,sEe)}var oEe=(t=>(t[t.All=0]="All",t[t.ObjectRest=1]="ObjectRest",t))(oEe||{});function TI(t,r,a,u,h,p){let m=t,C;if(dS(t))for(C=t.right;Zxe(t.left)||Ooe(t.left);)if(dS(C))m=t=C,C=t.right;else return z.checkDefined(Ct(C,r,Ut));let b;const T={context:a,level:u,downlevelIteration:!!a.getCompilerOptions().downlevelIteration,hoistTempVariables:!0,emitExpression:E,emitBindingOrAssignment:N,createArrayBindingOrAssignmentPattern:R=>hAt(a.factory,R),createObjectBindingOrAssignmentPattern:R=>pAt(a.factory,R),createArrayBindingOrAssignmentElement:mAt,visitor:r};if(C&&(C=Ct(C,r,Ut),z.assert(C),lt(C)&&aEe(t,C.escapedText)||lEe(t)?C=jP(T,C,!1,m):h?C=jP(T,C,!0,m):oc(t)&&(m=C)),j7(T,t,C,m,dS(t)),C&&h){if(!Rt(b))return C;b.push(C)}return a.factory.inlineExpressions(b)||a.factory.createOmittedExpression();function E(R){b=xi(b,R)}function N(R,F,j,U){z.assertNode(R,p?lt:Ut);const q=p?p(R,F,j):zt(a.factory.createAssignment(z.checkDefined(Ct(R,r,Ut)),F),j);q.original=U,E(q)}}function aEe(t,r){const a=rx(t);return VB(a)?oAt(a,r):lt(a)?a.escapedText===r:!1}function oAt(t,r){const a=h3(t);for(const u of a)if(aEe(u,r))return!0;return!1}function lEe(t){const r=nK(t);if(r&&Ja(r)&&!wT(r.expression))return!0;const a=rx(t);return!!a&&VB(a)&&aAt(a)}function aAt(t){return!!W(h3(t),lEe)}function nD(t,r,a,u,h,p=!1,m){let C;const b=[],T=[],E={context:a,level:u,downlevelIteration:!!a.getCompilerOptions().downlevelIteration,hoistTempVariables:p,emitExpression:N,emitBindingOrAssignment:R,createArrayBindingOrAssignmentPattern:F=>fAt(a.factory,F),createObjectBindingOrAssignmentPattern:F=>_At(a.factory,F),createArrayBindingOrAssignmentElement:F=>gAt(a.factory,F),visitor:r};if(ds(t)){let F=bV(t);F&&(lt(F)&&aEe(t,F.escapedText)||lEe(t))&&(F=jP(E,z.checkDefined(Ct(F,E.visitor,Ut)),!1,F),t=a.factory.updateVariableDeclaration(t,t.name,void 0,void 0,F))}if(j7(E,t,h,t,m),C){const F=a.factory.createTempVariable(void 0);if(p){const j=a.factory.inlineExpressions(C);C=void 0,R(F,j,void 0,void 0)}else{a.hoistVariableDeclaration(F);const j=La(b);j.pendingExpressions=xi(j.pendingExpressions,a.factory.createAssignment(F,j.value)),un(j.pendingExpressions,C),j.value=F}}for(const{pendingExpressions:F,name:j,value:U,location:q,original:Q}of b){const re=a.factory.createVariableDeclaration(j,void 0,void 0,F?a.factory.inlineExpressions(xi(F,U)):U);re.original=Q,zt(re,q),T.push(re)}return T;function N(F){C=xi(C,F)}function R(F,j,U,q){z.assertNode(F,YE),C&&(j=a.factory.inlineExpressions(xi(C,j)),C=void 0),b.push({pendingExpressions:C,name:F,value:j,location:U,original:q})}}function j7(t,r,a,u,h){const p=rx(r);if(!h){const m=Ct(bV(r),t.visitor,Ut);m?a?(a=uAt(t,a,m,u),!z1(m)&&VB(p)&&(a=jP(t,a,!0,u))):a=m:a||(a=t.context.factory.createVoidZero())}yse(p)?lAt(t,r,p,a,u):bse(p)?cAt(t,r,p,a,u):t.emitBindingOrAssignment(p,a,u,r)}function lAt(t,r,a,u,h){const p=h3(a),m=p.length;if(m!==1){const T=!WB(r)||m!==0;u=jP(t,u,T,h)}let C,b;for(let T=0;T=1&&!(E.transformFlags&98304)&&!(rx(E).transformFlags&98304)&&!Ja(N))C=xi(C,Ct(E,t.visitor,uwe));else{C&&(t.emitBindingOrAssignment(t.createObjectBindingOrAssignmentPattern(C),u,h,a),C=void 0);const R=dAt(t,u,N);Ja(N)&&(b=xi(b,R.argumentExpression)),j7(t,E,R,E)}}}C&&t.emitBindingOrAssignment(t.createObjectBindingOrAssignmentPattern(C),u,h,a)}function cAt(t,r,a,u,h){const p=h3(a),m=p.length;if(t.level<1&&t.downlevelIteration)u=jP(t,zt(t.context.getEmitHelperFactory().createReadHelper(u,m>0&&iK(p[m-1])?void 0:m),h),!1,h);else if(m!==1&&(t.level<1||m===0)||Be(p,zd)){const T=!WB(r)||m!==0;u=jP(t,u,T,h)}let C,b;for(let T=0;T=1)if(E.transformFlags&65536||t.hasTransformedPriorElement&&!FKe(E)){t.hasTransformedPriorElement=!0;const N=t.context.factory.createTempVariable(void 0);t.hoistTempVariables&&t.context.hoistVariableDeclaration(N),b=xi(b,[N,E]),C=xi(C,t.createArrayBindingOrAssignmentElement(N))}else C=xi(C,E);else{if(zd(E))continue;if(iK(E)){if(T===m-1){const N=t.context.factory.createArraySliceCall(u,T);j7(t,E,N,E)}}else{const N=t.context.factory.createElementAccessExpression(u,T);j7(t,E,N,E)}}}if(C&&t.emitBindingOrAssignment(t.createArrayBindingOrAssignmentPattern(C),u,h,a),b)for(const[T,E]of b)j7(t,E,T,E)}function FKe(t){const r=rx(t);if(!r||zd(r))return!0;const a=nK(t);if(a&&!Av(a))return!1;const u=bV(t);return u&&!z1(u)?!1:VB(r)?Be(h3(r),FKe):lt(r)}function uAt(t,r,a,u){return r=jP(t,r,!0,u),t.context.factory.createConditionalExpression(t.context.factory.createTypeCheck(r,"undefined"),void 0,a,void 0,r)}function dAt(t,r,a){const{factory:u}=t.context;if(Ja(a)){const h=jP(t,z.checkDefined(Ct(a.expression,t.visitor,Ut)),!1,a);return t.context.factory.createElementAccessExpression(r,h)}else if(ug(a)){const h=u.cloneNode(a);return t.context.factory.createElementAccessExpression(r,h)}else{const h=t.context.factory.createIdentifier(dr(a));return t.context.factory.createPropertyAccessExpression(r,h)}}function jP(t,r,a,u){if(lt(r)&&a)return r;{const h=t.context.factory.createTempVariable(void 0);return t.hoistTempVariables?(t.context.hoistVariableDeclaration(h),t.emitExpression(zt(t.context.factory.createAssignment(h,r),u))):t.emitBindingOrAssignment(h,r,u,void 0),h}}function fAt(t,r){return z.assertEachNode(r,W$),t.createArrayBindingPattern(r)}function hAt(t,r){return z.assertEachNode(r,jB),t.createArrayLiteralExpression(Yt(r,t.converters.convertToArrayAssignmentElement))}function _At(t,r){return z.assertEachNode(r,nl),t.createObjectBindingPattern(r)}function pAt(t,r){return z.assertEachNode(r,HB),t.createObjectLiteralExpression(Yt(r,t.converters.convertToObjectAssignmentElement))}function gAt(t,r){return t.createBindingElement(void 0,void 0,r)}function mAt(t){return t}function cEe(t,r,a=t.createThis()){const u=t.createAssignment(r,a),h=t.createExpressionStatement(u),p=t.createBlock([h],!1),m=t.createClassStaticBlockDeclaration(p);return th(m).classThis=r,m}function z7(t){var r;if(!bu(t)||t.body.statements.length!==1)return!1;const a=t.body.statements[0];return _f(a)&&Yd(a.expression,!0)&<(a.expression.left)&&((r=t.emitNode)==null?void 0:r.classThis)===a.expression.left&&a.expression.right.kind===110}function lce(t){var r;return!!((r=t.emitNode)!=null&&r.classThis)&&Rt(t.members,z7)}function uEe(t,r,a,u){if(lce(r))return r;const h=cEe(t,a,u);r.name&&$a(h.body.statements[0],r.name);const p=t.createNodeArray([h,...r.members]);zt(p,r.members);const m=xd(r)?t.updateClassDeclaration(r,r.modifiers,r.name,r.typeParameters,r.heritageClauses,p):t.updateClassExpression(r,r.modifiers,r.name,r.typeParameters,r.heritageClauses,p);return th(m).classThis=a,m}function U7(t,r,a){const u=uu(ld(a));return(xd(u)||Uu(u))&&!u.name&&Kr(u,2048)?t.createStringLiteral("default"):t.createStringLiteralFromNode(r)}function BKe(t,r,a){const{factory:u}=t;if(a!==void 0)return{assignedName:u.createStringLiteral(a),name:r};if(Av(r)||Vs(r))return{assignedName:u.createStringLiteralFromNode(r),name:r};if(Av(r.expression)&&!lt(r.expression))return{assignedName:u.createStringLiteralFromNode(r.expression),name:r};const h=u.getGeneratedNameForNode(r);t.hoistVariableDeclaration(h);const p=t.getEmitHelperFactory().createPropKeyHelper(r.expression),m=u.createAssignment(h,p),C=u.updateComputedPropertyName(r,m);return{assignedName:h,name:C}}function dEe(t,r,a=t.factory.createThis()){const{factory:u}=t,h=t.getEmitHelperFactory().createSetFunctionNameHelper(a,r),p=u.createExpressionStatement(h),m=u.createBlock([p],!1),C=u.createClassStaticBlockDeclaration(m);return th(C).assignedName=r,C}function zP(t){var r;if(!bu(t)||t.body.statements.length!==1)return!1;const a=t.body.statements[0];return _f(a)&&u7(a.expression,"___setFunctionName")&&a.expression.arguments.length>=2&&a.expression.arguments[1]===((r=t.emitNode)==null?void 0:r.assignedName)}function jK(t){var r;return!!((r=t.emitNode)!=null&&r.assignedName)&&Rt(t.members,zP)}function cce(t){return!!t.name||jK(t)}function zK(t,r,a,u){if(jK(r))return r;const{factory:h}=t,p=dEe(t,a,u);r.name&&$a(p.body.statements[0],r.name);const m=Nt(r.members,z7)+1,C=r.members.slice(0,m),b=r.members.slice(m),T=h.createNodeArray([...C,p,...b]);return zt(T,r.members),r=xd(r)?h.updateClassDeclaration(r,r.modifiers,r.name,r.typeParameters,r.heritageClauses,T):h.updateClassExpression(r,r.modifiers,r.name,r.typeParameters,r.heritageClauses,T),th(r).assignedName=a,r}function x3(t,r,a,u){if(u&&ja(a)&&Xse(a))return r;const{factory:h}=t,p=ld(r),m=wd(p)?ua(zK(t,p,a),wd):t.getEmitHelperFactory().createSetFunctionNameHelper(p,a);return h.restoreOuterExpressions(r,m)}function vAt(t,r,a,u){const{factory:h}=t,{assignedName:p,name:m}=BKe(t,r.name,u),C=x3(t,r.initializer,p,a);return h.updatePropertyAssignment(r,m,C)}function yAt(t,r,a,u){const{factory:h}=t,p=u!==void 0?h.createStringLiteral(u):U7(h,r.name,r.objectAssignmentInitializer),m=x3(t,r.objectAssignmentInitializer,p,a);return h.updateShorthandPropertyAssignment(r,r.name,m)}function bAt(t,r,a,u){const{factory:h}=t,p=u!==void 0?h.createStringLiteral(u):U7(h,r.name,r.initializer),m=x3(t,r.initializer,p,a);return h.updateVariableDeclaration(r,r.name,r.exclamationToken,r.type,m)}function CAt(t,r,a,u){const{factory:h}=t,p=u!==void 0?h.createStringLiteral(u):U7(h,r.name,r.initializer),m=x3(t,r.initializer,p,a);return h.updateParameterDeclaration(r,r.modifiers,r.dotDotDotToken,r.name,r.questionToken,r.type,m)}function SAt(t,r,a,u){const{factory:h}=t,p=u!==void 0?h.createStringLiteral(u):U7(h,r.name,r.initializer),m=x3(t,r.initializer,p,a);return h.updateBindingElement(r,r.dotDotDotToken,r.propertyName,r.name,m)}function wAt(t,r,a,u){const{factory:h}=t,{assignedName:p,name:m}=BKe(t,r.name,u),C=x3(t,r.initializer,p,a);return h.updatePropertyDeclaration(r,r.modifiers,m,r.questionToken??r.exclamationToken,r.type,C)}function xAt(t,r,a,u){const{factory:h}=t,p=u!==void 0?h.createStringLiteral(u):U7(h,r.left,r.right),m=x3(t,r.right,p,a);return h.updateBinaryExpression(r,r.left,r.operatorToken,m)}function kAt(t,r,a,u){const{factory:h}=t,p=u!==void 0?h.createStringLiteral(u):h.createStringLiteral(r.isExportEquals?"":"default"),m=x3(t,r.expression,p,a);return h.updateExportAssignment(r,r.modifiers,m)}function Pp(t,r,a,u){switch(r.kind){case 303:return vAt(t,r,a,u);case 304:return yAt(t,r,a,u);case 260:return bAt(t,r,a,u);case 169:return CAt(t,r,a,u);case 208:return SAt(t,r,a,u);case 172:return wAt(t,r,a,u);case 226:return xAt(t,r,a,u);case 277:return kAt(t,r,a,u)}}var fEe=(t=>(t[t.LiftRestriction=0]="LiftRestriction",t[t.All=1]="All",t))(fEe||{});function uce(t,r,a,u,h,p){const m=Ct(r.tag,a,Ut);z.assert(m);const C=[void 0],b=[],T=[],E=r.template;if(p===0&&!boe(E))return cn(r,a,t);const{factory:N}=t;if(bP(E))b.push(hEe(N,E)),T.push(_Ee(N,E,u));else{b.push(hEe(N,E.head)),T.push(_Ee(N,E.head,u));for(const F of E.templateSpans)b.push(hEe(N,F.literal)),T.push(_Ee(N,F.literal,u)),C.push(z.checkDefined(Ct(F.expression,a,Ut)))}const R=t.getEmitHelperFactory().createTemplateObjectHelper(N.createArrayLiteralExpression(b),N.createArrayLiteralExpression(T));if(Td(u)){const F=N.createUniqueName("templateObject");h(F),C[0]=N.createLogicalOr(F,N.createAssignment(F,R))}else C[0]=R;return N.createCallExpression(m,void 0,C)}function hEe(t,r){return r.templateFlags&26656?t.createVoidZero():t.createStringLiteral(r.text)}function _Ee(t,r,a){let u=r.rawText;if(u===void 0){z.assertIsDefined(a,"Template literal node is missing 'rawText' and does not have a source file. Possibly bad transform."),u=TT(a,r);const h=r.kind===15||r.kind===18;u=u.substring(1,u.length-(h?1:2))}return u=u.replace(/\r\n?/g,` +`),zt(t.createStringLiteral(u),r)}function pEe(t){const{factory:r,getEmitHelperFactory:a,startLexicalEnvironment:u,resumeLexicalEnvironment:h,endLexicalEnvironment:p,hoistVariableDeclaration:m}=t,C=t.getEmitResolver(),b=t.getCompilerOptions(),T=il(b),E=Vh(b),N=!!b.experimentalDecorators,R=b.emitDecoratorMetadata?mEe(t):void 0,F=t.onEmitNode,j=t.onSubstituteNode;t.onEmitNode=Wf,t.onSubstituteNode=za,t.enableSubstitution(211),t.enableSubstitution(212);let U,q,Q,re,Y,ue,te,Se;return oe;function oe(J){return J.kind===308?pe(J):ye(J)}function pe(J){return r.createBundle(J.sourceFiles.map(ye))}function ye(J){if(J.isDeclarationFile)return J;U=J;const ct=be(J,st);return Jb(ct,t.readEmitHelpers()),U=void 0,ct}function be(J,ct){const Wt=re,mi=Y,mn=ue;_e(J);const Zr=ct(J);return re!==Wt&&(Y=mi),re=Wt,ue=mn,Zr}function _e(J){switch(J.kind){case 307:case 269:case 268:case 241:re=J,Y=void 0;break;case 263:case 262:if(Kr(J,128))break;J.name?je(J):z.assert(J.kind===263||Kr(J,2048));break}}function ve(J){return be(J,Ee)}function Ee(J){return J.transformFlags&1?ze(J):J}function ke(J){return be(J,Fe)}function Fe(J){switch(J.kind){case 272:case 271:case 277:case 278:return fe(J);default:return Ee(J)}}function Oe(J){const ct=xo(J);if(ct===J||Ec(J))return!1;if(!ct||ct.kind!==J.kind)return!0;switch(J.kind){case 272:if(z.assertNode(ct,Cu),J.importClause!==ct.importClause||J.attributes!==ct.attributes)return!0;break;case 271:if(z.assertNode(ct,kd),J.name!==ct.name||J.isTypeOnly!==ct.isTypeOnly||J.moduleReference!==ct.moduleReference&&(A_(J.moduleReference)||A_(ct.moduleReference)))return!0;break;case 278:if(z.assertNode(ct,$u),J.exportClause!==ct.exportClause||J.attributes!==ct.attributes)return!0;break}return!1}function fe(J){if(Oe(J))return J.transformFlags&1?cn(J,ve,t):J;switch(J.kind){case 272:return fi(J);case 271:return $i(J);case 277:return or(J);case 278:return rn(J);default:z.fail("Unhandled ellided statement")}}function Ie(J){return be(J,Le)}function Le(J){if(!(J.kind===278||J.kind===272||J.kind===273||J.kind===271&&J.moduleReference.kind===283))return J.transformFlags&1||Kr(J,32)?ze(J):J}function et(J){return ct=>be(ct,Wt=>He(Wt,J))}function He(J,ct){switch(J.kind){case 176:return hi(J);case 172:return ot(J,ct);case 177:return ha(J,ct);case 178:return Yo(J,ct);case 174:return fs(J,ct);case 175:return cn(J,ve,t);case 240:return J;case 181:return;default:return z.failBadSyntaxKind(J)}}function We(J){return ct=>be(ct,Wt=>Ue(Wt,J))}function Ue(J,ct){switch(J.kind){case 303:case 304:case 305:return ve(J);case 177:return ha(J,ct);case 178:return Yo(J,ct);case 174:return fs(J,ct);default:return z.failBadSyntaxKind(J)}}function Ye(J){return jd(J)?void 0:ve(J)}function wt(J){return Ra(J)?void 0:ve(J)}function nt(J){if(!jd(J)&&!(iP(J.kind)&28895)&&!(q&&J.kind===95))return J}function ze(J){if(Es(J)&&Kr(J,128))return r.createNotEmittedStatement(J);switch(J.kind){case 95:case 90:return q?void 0:J;case 125:case 123:case 124:case 128:case 164:case 87:case 138:case 148:case 103:case 147:case 188:case 189:case 190:case 191:case 187:case 182:case 168:case 133:case 159:case 136:case 154:case 150:case 146:case 116:case 155:case 185:case 184:case 186:case 183:case 192:case 193:case 194:case 196:case 197:case 198:case 199:case 200:case 201:case 181:return;case 265:return r.createNotEmittedStatement(J);case 270:return;case 264:return r.createNotEmittedStatement(J);case 263:return Oi(J);case 231:return Ji(J);case 298:return Fo(J);case 233:return Cn(J);case 210:return xt(J);case 176:case 172:case 174:case 177:case 178:case 175:return z.fail("Class and object literal elements must be visited with their respective visitors");case 262:return ji(J);case 218:return fl(J);case 219:return St(J);case 169:return Ot(J);case 217:return mt(J);case 216:case 234:return Je(J);case 238:return kt(J);case 213:return Ci(J);case 214:return $e(J);case 215:return qt(J);case 235:return pt(J);case 266:return wi(J);case 243:return xe(J);case 260:return Re(J);case 267:return Ke(J);case 271:return $i(J);case 285:return $t(J);case 286:return ii(J);default:return cn(J,ve,t)}}function st(J){const ct=Hh(b,"alwaysStrict")&&!(Td(J)&&E>=5)&&!Dm(J);return r.updateSourceFile(J,Xle(J.statements,ke,t,0,ct))}function xt(J){return r.updateObjectLiteralExpression(J,wn(J.properties,We(J),Fb))}function Et(J){let ct=0;Rt(sce(J,!0,!0))&&(ct|=1);const Wt=Pv(J);return Wt&&ld(Wt.expression).kind!==106&&(ct|=64),oS(N,J)&&(ct|=2),b8(N,J)&&(ct|=4),Tn(J)?ct|=8:Sl(J)?ct|=32:zo(J)&&(ct|=16),ct}function ft(J){return!!(J.transformFlags&8192)}function Ht(J){return dg(J)||Rt(J.typeParameters)||Rt(J.heritageClauses,ft)||Rt(J.members,ft)}function Oi(J){const ct=Et(J),Wt=T<=1&&!!(ct&7);if(!Ht(J)&&!oS(N,J)&&!Tn(J))return r.updateClassDeclaration(J,wn(J.modifiers,nt,Ra),J.name,void 0,wn(J.heritageClauses,ve,Lp),wn(J.members,et(J),Vd));Wt&&t.startLexicalEnvironment();const mi=Wt||ct&8;let mn=mi?wn(J.modifiers,wt,zc):wn(J.modifiers,ve,zc);ct&2&&(mn=bn(mn,J));const Fi=mi&&!J.name||ct&4||ct&1?J.name??r.getGeneratedNameForNode(J):J.name,br=r.updateClassDeclaration(J,mn,Fi,void 0,wn(J.heritageClauses,ve,Lp),Ui(J));let Cs=Ya(J);ct&1&&(Cs|=64),ir(br,Cs);let xs;if(Wt){const ql=[br],Xc=Roe(qa(U.text,J.members.end),20),Id=r.getInternalName(J),$c=r.createPartiallyEmittedExpression(Id);e3($c,Xc.end),ir($c,3072);const Ud=r.createReturnStatement($c);t7(Ud,Xc.pos),ir(Ud,3840),ql.push(Ud),qy(ql,t.endLexicalEnvironment());const Fc=r.createImmediatelyInvokedArrowFunction(ql);sV(Fc,1);const qd=r.createVariableDeclaration(r.getLocalName(J,!1,!1),void 0,void 0,Fc);Er(qd,J);const qh=r.createVariableStatement(void 0,r.createVariableDeclarationList([qd],1));Er(qh,J),Sd(qh,J),$a(qh,zb(J)),mh(qh),xs=qh}else xs=br;if(mi){if(ct&8)return[xs,Rl(J)];if(ct&32)return[xs,r.createExportDefault(r.getLocalName(J,!1,!0))];if(ct&16)return[xs,r.createExternalModuleExport(r.getDeclarationName(J,!1,!0))]}return xs}function Ji(J){let ct=wn(J.modifiers,wt,zc);return oS(N,J)&&(ct=bn(ct,J)),r.updateClassExpression(J,ct,J.name,void 0,wn(J.heritageClauses,ve,Lp),Ui(J))}function Ui(J){const ct=wn(J.members,et(J),Vd);let Wt;const mi=Gy(J),mn=mi&&Ri(mi.parameters,Zr=>xp(Zr,mi));if(mn)for(const Zr of mn){const Fi=r.createPropertyDeclaration(void 0,Zr.name,void 0,void 0,void 0);Er(Fi,Zr),Wt=xi(Wt,Fi)}return Wt?(Wt=un(Wt,ct),zt(r.createNodeArray(Wt),J.members)):ct}function bn(J,ct){const Wt=Ai(ct,ct);if(Rt(Wt)){const mi=[];un(mi,yre(J,CV)),un(mi,Ri(J,jd)),un(mi,Wt),un(mi,Ri(aCe(J,CV),Ra)),J=zt(r.createNodeArray(mi),J)}return J}function Mi(J,ct,Wt){if(ss(Wt)&&Qse(N,ct,Wt)){const mi=Ai(ct,Wt);if(Rt(mi)){const mn=[];un(mn,Ri(J,jd)),un(mn,mi),un(mn,Ri(J,Ra)),J=zt(r.createNodeArray(mn),J)}}return J}function Ai(J,ct){if(N)return Rn(J,ct)}function Rn(J,ct){if(R){let Wt;if(bs(J)){const mi=a().createMetadataHelper("design:type",R.serializeTypeOfNode({currentLexicalScope:re,currentNameScope:ct},J,ct));Wt=xi(Wt,r.createDecorator(mi))}if(Hs(J)){const mi=a().createMetadataHelper("design:paramtypes",R.serializeParameterTypesOfNode({currentLexicalScope:re,currentNameScope:ct},J,ct));Wt=xi(Wt,r.createDecorator(mi))}if(Hi(J)){const mi=a().createMetadataHelper("design:returntype",R.serializeReturnTypeOfNode({currentLexicalScope:re,currentNameScope:ct},J));Wt=xi(Wt,r.createDecorator(mi))}return Wt}}function bs(J){const ct=J.kind;return ct===174||ct===177||ct===178||ct===172}function Hi(J){return J.kind===174}function Hs(J){switch(J.kind){case 263:case 231:return Gy(J)!==void 0;case 174:case 177:case 178:return!0}return!1}function Wo(J,ct){const Wt=J.name;return Vs(Wt)?r.createIdentifier(""):Ja(Wt)?Wt.expression:lt(Wt)?r.createStringLiteral(dr(Wt)):r.cloneNode(Wt)}function ts(J){const ct=J.name;if(Ja(ct)&&(!_d(J)&&ue||dg(J)&&N)){const Wt=Ct(ct.expression,ve,Ut);z.assert(Wt);const mi=u0(Wt);if(!z1(mi)){const mn=r.getGeneratedNameForNode(ct);return m(mn),r.updateComputedPropertyName(ct,r.createAssignment(mn,Wt))}}return z.checkDefined(Ct(ct,ve,od))}function Fo(J){if(J.token!==119)return cn(J,ve,t)}function Cn(J){return r.updateExpressionWithTypeArguments(J,z.checkDefined(Ct(J.expression,ve,M_)),void 0)}function Ko(J){return!vu(J.body)}function ot(J,ct){const Wt=J.flags&33554432||Kr(J,64);if(Wt&&!(N&&dg(J)))return;let mi=ss(ct)?Wt?wn(J.modifiers,wt,zc):wn(J.modifiers,ve,zc):wn(J.modifiers,Ye,zc);return mi=Mi(mi,J,ct),Wt?r.updatePropertyDeclaration(J,no(mi,r.createModifiersFromModifierFlags(128)),z.checkDefined(Ct(J.name,ve,od)),void 0,void 0,void 0):r.updatePropertyDeclaration(J,mi,ts(J),void 0,void 0,Ct(J.initializer,ve,Ut))}function hi(J){if(Ko(J))return r.updateConstructorDeclaration(J,void 0,Su(J.parameters,ve,t),lr(J.body,J))}function hn(J,ct,Wt,mi,mn,Zr){const Fi=mi[mn],br=ct[Fi];if(un(J,wn(ct,ve,Es,Wt,Fi-Wt)),gI(br)){const Cs=[];hn(Cs,br.tryBlock.statements,0,mi,mn+1,Zr);const xs=r.createNodeArray(Cs);zt(xs,br.tryBlock.statements),J.push(r.updateTryStatement(br,r.updateBlock(br.tryBlock,Cs),Ct(br.catchClause,ve,YT),Ct(br.finallyBlock,ve,Ho)))}else un(J,wn(ct,ve,Es,Fi,1)),un(J,Zr);un(J,wn(ct,ve,Es,Fi+1))}function lr(J,ct){const Wt=ct&&Ri(ct.parameters,Cs=>xp(Cs,ct));if(!Rt(Wt))return vg(J,ve,t);let mi=[];h();const mn=r.copyPrologue(J.statements,mi,!1,ve),Zr=WK(J.statements,mn),Fi=ns(Wt,as);Zr.length?hn(mi,J.statements,mn,Zr,0,Fi):(un(mi,Fi),un(mi,wn(J.statements,ve,Es,mn))),mi=r.mergeLexicalEnvironment(mi,p());const br=r.createBlock(zt(r.createNodeArray(mi),J.statements),!0);return zt(br,J),Er(br,J),br}function as(J){const ct=J.name;if(!lt(ct))return;const Wt=ml(zt(r.cloneNode(ct),ct),ct.parent);ir(Wt,3168);const mi=ml(zt(r.cloneNode(ct),ct),ct.parent);return ir(mi,3072),mh(rV(zt(Er(r.createExpressionStatement(r.createAssignment(zt(r.createPropertyAccessExpression(r.createThis(),Wt),J.name),mi)),J),Bk(J,-1))))}function fs(J,ct){if(!(J.transformFlags&1))return J;if(!Ko(J))return;let Wt=ss(ct)?wn(J.modifiers,ve,zc):wn(J.modifiers,Ye,zc);return Wt=Mi(Wt,J,ct),r.updateMethodDeclaration(J,Wt,J.asteriskToken,ts(J),void 0,void 0,Su(J.parameters,ve,t),void 0,vg(J.body,ve,t))}function Ds(J){return!(vu(J.body)&&Kr(J,64))}function ha(J,ct){if(!(J.transformFlags&1))return J;if(!Ds(J))return;let Wt=ss(ct)?wn(J.modifiers,ve,zc):wn(J.modifiers,Ye,zc);return Wt=Mi(Wt,J,ct),r.updateGetAccessorDeclaration(J,Wt,ts(J),Su(J.parameters,ve,t),void 0,vg(J.body,ve,t)||r.createBlock([]))}function Yo(J,ct){if(!(J.transformFlags&1))return J;if(!Ds(J))return;let Wt=ss(ct)?wn(J.modifiers,ve,zc):wn(J.modifiers,Ye,zc);return Wt=Mi(Wt,J,ct),r.updateSetAccessorDeclaration(J,Wt,ts(J),Su(J.parameters,ve,t),vg(J.body,ve,t)||r.createBlock([]))}function ji(J){if(!Ko(J))return r.createNotEmittedStatement(J);const ct=r.updateFunctionDeclaration(J,wn(J.modifiers,nt,Ra),J.asteriskToken,J.name,void 0,Su(J.parameters,ve,t),void 0,vg(J.body,ve,t)||r.createBlock([]));if(Tn(J)){const Wt=[ct];return zl(Wt,J),Wt}return ct}function fl(J){return Ko(J)?r.updateFunctionExpression(J,wn(J.modifiers,nt,Ra),J.asteriskToken,J.name,void 0,Su(J.parameters,ve,t),void 0,vg(J.body,ve,t)||r.createBlock([])):r.createOmittedExpression()}function St(J){return r.updateArrowFunction(J,wn(J.modifiers,nt,Ra),void 0,Su(J.parameters,ve,t),void 0,J.equalsGreaterThanToken,vg(J.body,ve,t))}function Ot(J){if(FT(J))return;const ct=r.updateParameterDeclaration(J,wn(J.modifiers,Wt=>jd(Wt)?ve(Wt):void 0,zc),J.dotDotDotToken,z.checkDefined(Ct(J.name,ve,YE)),void 0,void 0,Ct(J.initializer,ve,Ut));return ct!==J&&(Sd(ct,J),zt(ct,Fv(J)),$a(ct,Fv(J)),ir(ct.name,64)),ct}function xe(J){if(Tn(J)){const ct=j8(J.declarationList);return ct.length===0?void 0:zt(r.createExpressionStatement(r.inlineExpressions(Yt(ct,Pt))),J)}else return cn(J,ve,t)}function Pt(J){const ct=J.name;return Qo(ct)?TI(J,ve,t,0,!1,ca):zt(r.createAssignment(Ic(ct),z.checkDefined(Ct(J.initializer,ve,Ut))),J)}function Re(J){const ct=r.updateVariableDeclaration(J,z.checkDefined(Ct(J.name,ve,YE)),void 0,void 0,Ct(J.initializer,ve,Ut));return J.type&&a2e(ct.name,J.type),ct}function mt(J){const ct=ld(J.expression,-7);if(Ek(ct)||zG(ct)){const Wt=Ct(J.expression,ve,Ut);return z.assert(Wt),r.createPartiallyEmittedExpression(Wt,J)}return cn(J,ve,t)}function Je(J){const ct=Ct(J.expression,ve,Ut);return z.assert(ct),r.createPartiallyEmittedExpression(ct,J)}function pt(J){const ct=Ct(J.expression,ve,M_);return z.assert(ct),r.createPartiallyEmittedExpression(ct,J)}function kt(J){const ct=Ct(J.expression,ve,Ut);return z.assert(ct),r.createPartiallyEmittedExpression(ct,J)}function Ci(J){return r.updateCallExpression(J,z.checkDefined(Ct(J.expression,ve,Ut)),void 0,wn(J.arguments,ve,Ut))}function $e(J){return r.updateNewExpression(J,z.checkDefined(Ct(J.expression,ve,Ut)),void 0,wn(J.arguments,ve,Ut))}function qt(J){return r.updateTaggedTemplateExpression(J,z.checkDefined(Ct(J.tag,ve,Ut)),void 0,z.checkDefined(Ct(J.template,ve,VL)))}function $t(J){return r.updateJsxSelfClosingElement(J,z.checkDefined(Ct(J.tagName,ve,f8)),void 0,z.checkDefined(Ct(J.attributes,ve,ZT)))}function ii(J){return r.updateJsxOpeningElement(J,z.checkDefined(Ct(J.tagName,ve,f8)),void 0,z.checkDefined(Ct(J.attributes,ve,ZT)))}function Gt(J){return!ET(J)||HT(b)}function wi(J){if(!Gt(J))return r.createNotEmittedStatement(J);const ct=[];let Wt=4;const mi=Ae(ct,J);mi&&(E!==4||re!==U)&&(Wt|=1024);const mn=$s(J),Zr=Ps(J),Fi=Tn(J)?r.getExternalModuleOrNamespaceExportName(Q,J,!1,!0):r.getDeclarationName(J,!1,!0);let br=r.createLogicalOr(Fi,r.createAssignment(Fi,r.createObjectLiteralExpression()));if(Tn(J)){const xs=r.getLocalName(J,!1,!0);br=r.createAssignment(xs,br)}const Cs=r.createExpressionStatement(r.createCallExpression(r.createFunctionExpression(void 0,void 0,void 0,void 0,[r.createParameterDeclaration(void 0,void 0,mn)],void 0,ce(J,Zr)),void 0,[br]));return Er(Cs,J),mi&&(Vk(Cs,void 0),mP(Cs,void 0)),zt(Cs,J),Wv(Cs,Wt),ct.push(Cs),ct}function ce(J,ct){const Wt=Q;Q=ct;const mi=[];u();const mn=Yt(J.members,ut);return qy(mi,p()),un(mi,mn),Q=Wt,r.createBlock(zt(r.createNodeArray(mi),J.members),!0)}function ut(J){const ct=Wo(J),Wt=C.getEnumMemberValue(J),mi=Bt(J,Wt==null?void 0:Wt.value),mn=r.createAssignment(r.createElementAccessExpression(Q,ct),mi),Zr=typeof(Wt==null?void 0:Wt.value)=="string"||Wt!=null&&Wt.isSyntacticallyString?mn:r.createAssignment(r.createElementAccessExpression(Q,mn),ct);return zt(r.createExpressionStatement(zt(Zr,J)),J)}function Bt(J,ct){return ct!==void 0?typeof ct=="string"?r.createStringLiteral(ct):ct<0?r.createPrefixUnaryExpression(41,r.createNumericLiteral(-ct)):r.createNumericLiteral(ct):(pf(),J.initializer?z.checkDefined(Ct(J.initializer,ve,Ut)):r.createVoidZero())}function le(J){const ct=xo(J,qu);return ct?Kle(ct,HT(b)):!0}function je(J){Y||(Y=new Map);const ct=tt(J);Y.has(ct)||Y.set(ct,J)}function de(J){if(Y){const ct=tt(J);return Y.get(ct)===J}return!0}function tt(J){return z.assertNode(J.name,lt),J.name.escapedText}function Ae(J,ct){const Wt=r.createVariableDeclaration(r.getLocalName(ct,!1,!0)),mi=re.kind===307?0:1,mn=r.createVariableStatement(wn(ct.modifiers,nt,Ra),r.createVariableDeclarationList([Wt],mi));return Er(Wt,ct),Vk(Wt,void 0),mP(Wt,void 0),Er(mn,ct),je(ct),de(ct)?(ct.kind===266?$a(mn.declarationList,ct):$a(mn,ct),Sd(mn,ct),Wv(mn,2048),J.push(mn),!0):!1}function Ke(J){if(!le(J))return r.createNotEmittedStatement(J);z.assertNode(J.name,lt,"A TypeScript namespace should have an Identifier name."),qc();const ct=[];let Wt=4;const mi=Ae(ct,J);mi&&(E!==4||re!==U)&&(Wt|=1024);const mn=$s(J),Zr=Ps(J),Fi=Tn(J)?r.getExternalModuleOrNamespaceExportName(Q,J,!1,!0):r.getDeclarationName(J,!1,!0);let br=r.createLogicalOr(Fi,r.createAssignment(Fi,r.createObjectLiteralExpression()));if(Tn(J)){const xs=r.getLocalName(J,!1,!0);br=r.createAssignment(xs,br)}const Cs=r.createExpressionStatement(r.createCallExpression(r.createFunctionExpression(void 0,void 0,void 0,void 0,[r.createParameterDeclaration(void 0,void 0,mn)],void 0,Qt(J,Zr)),void 0,[br]));return Er(Cs,J),mi&&(Vk(Cs,void 0),mP(Cs,void 0)),zt(Cs,J),Wv(Cs,Wt),ct.push(Cs),ct}function Qt(J,ct){const Wt=Q,mi=q,mn=Y;Q=ct,q=J,Y=void 0;const Zr=[];u();let Fi,br;if(J.body)if(J.body.kind===268)be(J.body,xs=>un(Zr,wn(xs.statements,Ie,Es))),Fi=J.body.statements,br=J.body;else{const xs=Ke(J.body);xs&&(Lo(xs)?un(Zr,xs):Zr.push(xs));const ql=ni(J).body;Fi=Bk(ql.statements,-1)}qy(Zr,p()),Q=Wt,q=mi,Y=mn;const Cs=r.createBlock(zt(r.createNodeArray(Zr),Fi),!0);return zt(Cs,br),(!J.body||J.body.kind!==268)&&ir(Cs,Ya(Cs)|3072),Cs}function ni(J){if(J.body.kind===267)return ni(J.body)||J.body}function fi(J){if(!J.importClause)return J;if(J.importClause.isTypeOnly)return;const ct=Ct(J.importClause,Gi,$0);return ct?r.updateImportDeclaration(J,void 0,ct,J.moduleSpecifier,J.attributes):void 0}function Gi(J){z.assert(!J.isTypeOnly);const ct=Qc(J)?J.name:void 0,Wt=Ct(J.namedBindings,fn,xse);return ct||Wt?r.updateImportClause(J,!1,ct,Wt):void 0}function fn(J){if(J.kind===274)return Qc(J)?J:void 0;{const ct=b.verbatimModuleSyntax,Wt=wn(J.elements,kn,m_);return ct||Rt(Wt)?r.updateNamedImports(J,Wt):void 0}}function kn(J){return!J.isTypeOnly&&Qc(J)?J:void 0}function or(J){return b.verbatimModuleSyntax||C.isValueAliasDeclaration(J)?cn(J,ve,t):void 0}function rn(J){if(J.isTypeOnly)return;if(!J.exportClause||H1(J.exportClause))return J;const ct=!!b.verbatimModuleSyntax,Wt=Ct(J.exportClause,mi=>to(mi,ct),hse);return Wt?r.updateExportDeclaration(J,void 0,J.isTypeOnly,Wt,J.moduleSpecifier,J.attributes):void 0}function _r(J,ct){const Wt=wn(J.elements,Ar,gh);return ct||Rt(Wt)?r.updateNamedExports(J,Wt):void 0}function Fs(J){return r.updateNamespaceExport(J,z.checkDefined(Ct(J.name,ve,lt)))}function to(J,ct){return H1(J)?Fs(J):_r(J,ct)}function Ar(J){return!J.isTypeOnly&&(b.verbatimModuleSyntax||C.isValueAliasDeclaration(J))?J:void 0}function is(J){return Qc(J)||!Td(U)&&C.isTopLevelValueImportEqualsWithEntityName(J)}function $i(J){if(J.isTypeOnly)return;if(Lk(J))return Qc(J)?cn(J,ve,t):void 0;if(!is(J))return;const ct=mV(r,J.moduleReference);return ir(ct,7168),zo(J)||!Tn(J)?Er(zt(r.createVariableStatement(wn(J.modifiers,nt,Ra),r.createVariableDeclarationList([Er(r.createVariableDeclaration(J.name,void 0,void 0,ct),J)])),J),J):Er(co(J.name,ct,J),J)}function Tn(J){return q!==void 0&&Kr(J,32)}function ki(J){return q===void 0&&Kr(J,32)}function zo(J){return ki(J)&&!Kr(J,2048)}function Sl(J){return ki(J)&&Kr(J,2048)}function Rl(J){const ct=r.createAssignment(r.getExternalModuleOrNamespaceExportName(Q,J,!1,!0),r.getLocalName(J));$a(ct,Gg(J.name?J.name.pos:J.pos,J.end));const Wt=r.createExpressionStatement(ct);return $a(Wt,Gg(-1,J.end)),Wt}function zl(J,ct){J.push(Rl(ct))}function co(J,ct,Wt){return zt(r.createExpressionStatement(r.createAssignment(r.getNamespaceMemberName(Q,J,!1,!0),ct)),Wt)}function ca(J,ct,Wt){return zt(r.createAssignment(Ic(J),ct),Wt)}function Ic(J){return r.getNamespaceMemberName(Q,J,!1,!0)}function $s(J){const ct=r.getGeneratedNameForNode(J);return $a(ct,J.name),ct}function Ps(J){return r.getGeneratedNameForNode(J)}function pf(){te&8||(te|=8,t.enableSubstitution(80))}function qc(){te&2||(te|=2,t.enableSubstitution(80),t.enableSubstitution(304),t.enableEmitNotification(267))}function wh(J){return uu(J).kind===267}function Tu(J){return uu(J).kind===266}function Wf(J,ct,Wt){const mi=Se,mn=U;Ns(ct)&&(U=ct),te&2&&wh(ct)&&(Se|=2),te&8&&Tu(ct)&&(Se|=8),F(J,ct,Wt),Se=mi,U=mn}function za(J,ct){return ct=j(J,ct),J===1?Ul(ct):ih(ct)?Mc(ct):ct}function Mc(J){if(te&2){const ct=J.name,Wt=Li(ct);if(Wt){if(J.objectAssignmentInitializer){const mi=r.createAssignment(Wt,J.objectAssignmentInitializer);return zt(r.createPropertyAssignment(ct,mi),J)}return zt(r.createPropertyAssignment(ct,Wt),J)}}return J}function Ul(J){switch(J.kind){case 80:return wl(J);case 211:return wu(J);case 212:return zh(J)}return J}function wl(J){return Li(J)||J}function Li(J){if(te&Se&&!jc(J)&&!Xb(J)){const ct=C.getReferencedExportContainer(J,!1);if(ct&&ct.kind!==307&&(Se&2&&ct.kind===267||Se&8&&ct.kind===266))return zt(r.createPropertyAccessExpression(r.getGeneratedNameForNode(ct),J),J)}}function wu(J){return z_(J)}function zh(J){return z_(J)}function Uh(J){return J.replace(/\*\//g,"*_/")}function z_(J){const ct=Rc(J);if(ct!==void 0){s2e(J,ct);const Wt=typeof ct=="string"?r.createStringLiteral(ct):ct<0?r.createPrefixUnaryExpression(41,r.createNumericLiteral(-ct)):r.createNumericLiteral(ct);if(!b.removeComments){const mi=uu(J,Sc);NG(Wt,3,` ${Uh(yu(mi))} `)}return Wt}return J}function Rc(J){if(!Xg(b))return Ir(J)||wc(J)?C.getConstantValue(J):void 0}function Qc(J){return b.verbatimModuleSyntax||Xn(J)||C.isReferencedAliasDeclaration(J)}}function gEe(t){const{factory:r,getEmitHelperFactory:a,hoistVariableDeclaration:u,endLexicalEnvironment:h,startLexicalEnvironment:p,resumeLexicalEnvironment:m,addBlockScopedVariable:C}=t,b=t.getEmitResolver(),T=t.getCompilerOptions(),E=il(T),N=JW(T),R=!!T.experimentalDecorators,F=!N,j=N&&E<9,U=F||j,q=E<9,Q=E<99?-1:N?0:3,re=E<9,Y=re&&E>=2,ue=U||q||Q===-1,te=t.onSubstituteNode;t.onSubstituteNode=zh;const Se=t.onEmitNode;t.onEmitNode=wu;let oe=!1,pe,ye,be,_e,ve;const Ee=new Map,ke=new Set;let Fe,Oe,fe=!1,Ie=!1;return Q0(t,Le);function Le(J){if(J.isDeclarationFile||(ve=void 0,oe=!!(d0(J)&32),!ue&&!oe))return J;const ct=cn(J,He,t);return Jb(ct,t.readEmitHelpers()),ct}function et(J){switch(J.kind){case 129:return hi()?void 0:J;default:return $r(J,Ra)}}function He(J){if(!(J.transformFlags&16777216)&&!(J.transformFlags&134234112))return J;switch(J.kind){case 129:return z.fail("Use `modifierVisitor` instead.");case 263:return Gt(J);case 231:return ce(J);case 175:case 172:return z.fail("Use `classElementVisitor` instead.");case 303:return ft(J);case 243:return Ht(J);case 260:return Oi(J);case 169:return Ji(J);case 208:return Ui(J);case 277:return bn(J);case 81:return xt(J);case 211:return ha(J);case 212:return Yo(J);case 224:case 225:return ji(J,!1);case 226:return Je(J,!1);case 217:return kt(J,!1);case 213:return xe(J);case 244:return St(J);case 215:return Pt(J);case 248:return fl(J);case 110:return le(J);case 262:case 218:return Hs(void 0,We,J);case 176:case 174:case 177:case 178:return Hs(J,We,J);default:return We(J)}}function We(J){return cn(J,He,t)}function Ue(J){switch(J.kind){case 224:case 225:return ji(J,!0);case 226:return Je(J,!0);case 355:return pt(J);case 217:return kt(J,!0);default:return He(J)}}function Ye(J){switch(J.kind){case 298:return cn(J,Ye,t);case 233:return $t(J);default:return He(J)}}function wt(J){switch(J.kind){case 210:case 209:return Li(J);default:return He(J)}}function nt(J){switch(J.kind){case 176:return Hs(J,Rn,J);case 177:case 178:case 174:return Hs(J,Hi,J);case 172:return Hs(J,hn,J);case 175:return Hs(J,Bt,J);case 167:return Ai(J);case 240:return J;default:return zc(J)?et(J):He(J)}}function ze(J){switch(J.kind){case 167:return Ai(J);default:return He(J)}}function st(J){switch(J.kind){case 172:return ot(J);case 177:case 178:return nt(J);default:z.assertMissingNode(J,"Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration");break}}function xt(J){return!q||Es(J.parent)?J:Er(r.createIdentifier(""),J)}function Et(J){const ct=Ps(J.left);if(ct){const Wt=Ct(J.right,He,Ut);return Er(a().createClassPrivateFieldInHelper(ct.brandCheckIdentifier,Wt),J)}return cn(J,He,t)}function ft(J){return Tp(J,mt)&&(J=Pp(t,J)),cn(J,He,t)}function Ht(J){const ct=_e;_e=[];const Wt=cn(J,He,t),mi=Rt(_e)?[Wt,..._e]:Wt;return _e=ct,mi}function Oi(J){return Tp(J,mt)&&(J=Pp(t,J)),cn(J,He,t)}function Ji(J){return Tp(J,mt)&&(J=Pp(t,J)),cn(J,He,t)}function Ui(J){return Tp(J,mt)&&(J=Pp(t,J)),cn(J,He,t)}function bn(J){return Tp(J,mt)&&(J=Pp(t,J,!0,J.isExportEquals?"":"default")),cn(J,He,t)}function Mi(J){return Rt(be)&&(g_(J)?(be.push(J.expression),J=r.updateParenthesizedExpression(J,r.inlineExpressions(be))):(be.push(J),J=r.inlineExpressions(be)),be=void 0),J}function Ai(J){const ct=Ct(J.expression,He,Ut);return r.updateComputedPropertyName(J,Mi(ct))}function Rn(J){return Fe?tt(J,Fe):We(J)}function bs(J){return!!(q||_d(J)&&d0(J)&32)}function Hi(J){if(z.assert(!dg(J)),!Fh(J)||!bs(J))return cn(J,nt,t);const ct=Ps(J.name);if(z.assert(ct,"Undeclared private name for property declaration."),!ct.isValid)return J;const Wt=Wo(J);Wt&&Tn().push(r.createAssignment(Wt,r.createFunctionExpression(Ri(J.modifiers,mi=>Ra(mi)&&!wP(mi)&&!G2e(mi)),J.asteriskToken,Wt,void 0,Su(J.parameters,He,t),void 0,vg(J.body,He,t))))}function Hs(J,ct,Wt){if(J!==Oe){const mi=Oe;Oe=J;const mn=ct(Wt);return Oe=mi,mn}return ct(Wt)}function Wo(J){z.assert(Vs(J.name));const ct=Ps(J.name);if(z.assert(ct,"Undeclared private name for property declaration."),ct.kind==="m")return ct.methodName;if(ct.kind==="a"){if(tS(J))return ct.getterName;if(Ev(J))return ct.setterName}}function ts(){const J=is();return J.classThis??J.classConstructor??(Fe==null?void 0:Fe.name)}function Fo(J){const ct=Vv(J),Wt=_S(J),mi=J.name;let mn=mi,Zr=mi;if(Ja(mi)&&!z1(mi.expression)){const Id=sK(mi);if(Id)mn=r.updateComputedPropertyName(mi,Ct(mi.expression,He,Ut)),Zr=r.updateComputedPropertyName(mi,Id.left);else{const $c=r.createTempVariable(u);$a($c,mi.expression);const Ud=Ct(mi.expression,He,Ut),Fc=r.createAssignment($c,Ud);$a(Fc,mi.expression),mn=r.updateComputedPropertyName(mi,Fc),Zr=r.updateComputedPropertyName(mi,$c)}}const Fi=wn(J.modifiers,et,Ra),br=rle(r,J,Fi,J.initializer);Er(br,J),ir(br,3072),$a(br,Wt);const Cs=da(J)?ts()??r.createThis():r.createThis(),xs=NTe(r,J,Fi,mn,Cs);Er(xs,J),Sd(xs,ct),$a(xs,Wt);const ql=r.createModifiersFromModifierFlags(Rv(Fi)),Xc=LTe(r,J,ql,Zr,Cs);return Er(Xc,J),ir(Xc,3072),$a(Xc,Wt),BV([br,xs,Xc],st,Vd)}function Cn(J){if(bs(J)){const ct=Ps(J.name);if(z.assert(ct,"Undeclared private name for property declaration."),!ct.isValid)return J;if(ct.isStatic&&!q){const Wt=ni(J,r.createThis());if(Wt)return r.createClassStaticBlockDeclaration(r.createBlock([Wt],!0))}return}return F&&!da(J)&&(ve!=null&&ve.data)&&ve.data.facts&16?r.updatePropertyDeclaration(J,wn(J.modifiers,He,zc),J.name,void 0,void 0,void 0):(Tp(J,mt)&&(J=Pp(t,J)),r.updatePropertyDeclaration(J,wn(J.modifiers,et,Ra),Ct(J.name,ze,od),void 0,void 0,Ct(J.initializer,He,Ut)))}function Ko(J){if(U&&!O_(J)){const ct=Fs(J.name,!!J.initializer||N);if(ct&&Tn().push(...PTe(ct)),da(J)&&!q){const Wt=ni(J,r.createThis());if(Wt){const mi=r.createClassStaticBlockDeclaration(r.createBlock([Wt]));return Er(mi,J),Sd(mi,J),Sd(Wt,{pos:-1,end:-1}),Vk(Wt,void 0),mP(Wt,void 0),mi}}return}return r.updatePropertyDeclaration(J,wn(J.modifiers,et,Ra),Ct(J.name,ze,od),void 0,void 0,Ct(J.initializer,He,Ut))}function ot(J){return z.assert(!dg(J),"Decorators should already have been transformed and elided."),Fh(J)?Cn(J):Ko(J)}function hi(){return Q===-1||Q===3&&!!(ve!=null&&ve.data)&&!!(ve.data.facts&16)}function hn(J){return O_(J)&&(hi()||_d(J)&&d0(J)&32)?Fo(J):ot(J)}function lr(){return!!Oe&&_d(Oe)&&Vw(Oe)&&O_(uu(Oe))}function as(J){if(lr()){const ct=ld(J);ct.kind===110&&ke.add(ct)}}function fs(J,ct){return ct=Ct(ct,He,Ut),as(ct),Ds(J,ct)}function Ds(J,ct){switch(Sd(ct,Bk(ct,-1)),J.kind){case"a":return a().createClassPrivateFieldGetHelper(ct,J.brandCheckIdentifier,J.kind,J.getterName);case"m":return a().createClassPrivateFieldGetHelper(ct,J.brandCheckIdentifier,J.kind,J.methodName);case"f":return a().createClassPrivateFieldGetHelper(ct,J.brandCheckIdentifier,J.kind,J.isStatic?J.variableName:void 0);case"untransformed":return z.fail("Access helpers should not be created for untransformed private elements");default:z.assertNever(J,"Unknown private element type")}}function ha(J){if(Vs(J.name)){const ct=Ps(J.name);if(ct)return zt(Er(fs(ct,J.expression),J),J)}if(Y&&Oe&&R_(J)&<(J.name)&&q7(Oe)&&(ve!=null&&ve.data)){const{classConstructor:ct,superClassReference:Wt,facts:mi}=ve.data;if(mi&1)return _r(J);if(ct&&Wt){const mn=r.createReflectGetCall(Wt,r.createStringLiteralFromNode(J.name),ct);return Er(mn,J.expression),zt(mn,J.expression),mn}}return cn(J,He,t)}function Yo(J){if(Y&&Oe&&R_(J)&&q7(Oe)&&(ve!=null&&ve.data)){const{classConstructor:ct,superClassReference:Wt,facts:mi}=ve.data;if(mi&1)return _r(J);if(ct&&Wt){const mn=r.createReflectGetCall(Wt,Ct(J.argumentExpression,He,Ut),ct);return Er(mn,J.expression),zt(mn,J.expression),mn}}return cn(J,He,t)}function ji(J,ct){if(J.operator===46||J.operator===47){const Wt=Il(J.operand);if(S6(Wt)){let mi;if(mi=Ps(Wt.name)){const mn=Ct(Wt.expression,He,Ut);as(mn);const{readExpression:Zr,initializeExpression:Fi}=Ot(mn);let br=fs(mi,Zr);const Cs=tx(J)||ct?void 0:r.createTempVariable(u);return br=ZG(r,J,br,u,Cs),br=Ci(mi,Fi||Zr,br,64),Er(br,J),zt(br,J),Cs&&(br=r.createComma(br,Cs),zt(br,J)),br}}else if(Y&&Oe&&R_(Wt)&&q7(Oe)&&(ve!=null&&ve.data)){const{classConstructor:mi,superClassReference:mn,facts:Zr}=ve.data;if(Zr&1){const Fi=_r(Wt);return tx(J)?r.updatePrefixUnaryExpression(J,Fi):r.updatePostfixUnaryExpression(J,Fi)}if(mi&&mn){let Fi,br;if(Ir(Wt)?lt(Wt.name)&&(br=Fi=r.createStringLiteralFromNode(Wt.name)):z1(Wt.argumentExpression)?br=Fi=Wt.argumentExpression:(br=r.createTempVariable(u),Fi=r.createAssignment(br,Ct(Wt.argumentExpression,He,Ut))),Fi&&br){let Cs=r.createReflectGetCall(mn,br,mi);zt(Cs,Wt);const xs=ct?void 0:r.createTempVariable(u);return Cs=ZG(r,J,Cs,u,xs),Cs=r.createReflectSetCall(mn,Fi,Cs,mi),Er(Cs,J),zt(Cs,J),xs&&(Cs=r.createComma(Cs,xs),zt(Cs,J)),Cs}}}}return cn(J,He,t)}function fl(J){return r.updateForStatement(J,Ct(J.initializer,Ue,$g),Ct(J.condition,He,Ut),Ct(J.incrementor,Ue,Ut),v_(J.statement,He,t))}function St(J){return r.updateExpressionStatement(J,Ct(J.expression,Ue,Ut))}function Ot(J){const ct=oc(J)?J:r.cloneNode(J);if(J.kind===110&&ke.has(J)&&ke.add(ct),z1(J))return{readExpression:ct,initializeExpression:void 0};const Wt=r.createTempVariable(u),mi=r.createAssignment(Wt,ct);return{readExpression:Wt,initializeExpression:mi}}function xe(J){var ct;if(S6(J.expression)&&Ps(J.expression.name)){const{thisArg:Wt,target:mi}=r.createCallBinding(J.expression,u,E);return XE(J)?r.updateCallChain(J,r.createPropertyAccessChain(Ct(mi,He,Ut),J.questionDotToken,"call"),void 0,void 0,[Ct(Wt,He,Ut),...wn(J.arguments,He,Ut)]):r.updateCallExpression(J,r.createPropertyAccessExpression(Ct(mi,He,Ut),"call"),void 0,[Ct(Wt,He,Ut),...wn(J.arguments,He,Ut)])}if(Y&&Oe&&R_(J.expression)&&q7(Oe)&&((ct=ve==null?void 0:ve.data)!=null&&ct.classConstructor)){const Wt=r.createFunctionCallCall(Ct(J.expression,He,Ut),ve.data.classConstructor,wn(J.arguments,He,Ut));return Er(Wt,J),zt(Wt,J),Wt}return cn(J,He,t)}function Pt(J){var ct;if(S6(J.tag)&&Ps(J.tag.name)){const{thisArg:Wt,target:mi}=r.createCallBinding(J.tag,u,E);return r.updateTaggedTemplateExpression(J,r.createCallExpression(r.createPropertyAccessExpression(Ct(mi,He,Ut),"bind"),void 0,[Ct(Wt,He,Ut)]),void 0,Ct(J.template,He,VL))}if(Y&&Oe&&R_(J.tag)&&q7(Oe)&&((ct=ve==null?void 0:ve.data)!=null&&ct.classConstructor)){const Wt=r.createFunctionBindCall(Ct(J.tag,He,Ut),ve.data.classConstructor,[]);return Er(Wt,J),zt(Wt,J),r.updateTaggedTemplateExpression(J,Wt,void 0,Ct(J.template,He,VL))}return cn(J,He,t)}function Re(J){if(ve&&Ee.set(uu(J),ve),q){if(z7(J)){const mi=Ct(J.body.statements[0].expression,He,Ut);return Yd(mi,!0)&&mi.left===mi.right?void 0:mi}if(zP(J))return Ct(J.body.statements[0].expression,He,Ut);p();let ct=Hs(J,mi=>wn(mi,He,Es),J.body.statements);ct=r.mergeLexicalEnvironment(ct,h());const Wt=r.createImmediatelyInvokedArrowFunction(ct);return Er(Il(Wt.expression),J),Wv(Il(Wt.expression),4),Er(Wt,J),zt(Wt,J),Wt}}function mt(J){if(wd(J)&&!J.name){const ct=VK(J);return Rt(ct,zP)?!1:(q||!!d0(J))&&Rt(ct,mi=>bu(mi)||Fh(mi)||U&&WV(mi))}return!1}function Je(J,ct){if(dS(J)){const Wt=be;be=void 0,J=r.updateBinaryExpression(J,Ct(J.left,wt,Ut),J.operatorToken,Ct(J.right,He,Ut));const mi=Rt(be)?r.inlineExpressions(Mo([...be,J])):J;return be=Wt,mi}if(Yd(J)){Tp(J,mt)&&(J=Pp(t,J),z.assertNode(J,Yd));const Wt=ld(J.left,9);if(S6(Wt)){const mi=Ps(Wt.name);if(mi)return zt(Er(Ci(mi,Wt.expression,J.right,J.operatorToken.kind),J),J)}else if(Y&&Oe&&R_(J.left)&&q7(Oe)&&(ve!=null&&ve.data)){const{classConstructor:mi,superClassReference:mn,facts:Zr}=ve.data;if(Zr&1)return r.updateBinaryExpression(J,_r(J.left),J.operatorToken,Ct(J.right,He,Ut));if(mi&&mn){let Fi=wc(J.left)?Ct(J.left.argumentExpression,He,Ut):lt(J.left.name)?r.createStringLiteralFromNode(J.left.name):void 0;if(Fi){let br=Ct(J.right,He,Ut);if(V7(J.operatorToken.kind)){let xs=Fi;z1(Fi)||(xs=r.createTempVariable(u),Fi=r.createAssignment(xs,Fi));const ql=r.createReflectGetCall(mn,xs,mi);Er(ql,J.left),zt(ql,J.left),br=r.createBinaryExpression(ql,H7(J.operatorToken.kind),br),zt(br,J)}const Cs=ct?void 0:r.createTempVariable(u);return Cs&&(br=r.createAssignment(Cs,br),zt(Cs,J)),br=r.createReflectSetCall(mn,Fi,br,mi),Er(br,J),zt(br,J),Cs&&(br=r.createComma(br,Cs),zt(br,J)),br}}}}return NAt(J)?Et(J):cn(J,He,t)}function pt(J,ct){const Wt=RK(J.elements,Ue);return r.updateCommaListExpression(J,Wt)}function kt(J,ct){const Wt=ct?Ue:He,mi=Ct(J.expression,Wt,Ut);return r.updateParenthesizedExpression(J,mi)}function Ci(J,ct,Wt,mi){if(ct=Ct(ct,He,Ut),Wt=Ct(Wt,He,Ut),as(ct),V7(mi)){const{readExpression:mn,initializeExpression:Zr}=Ot(ct);ct=Zr||mn,Wt=r.createBinaryExpression(Ds(J,mn),H7(mi),Wt)}switch(Sd(ct,Bk(ct,-1)),J.kind){case"a":return a().createClassPrivateFieldSetHelper(ct,J.brandCheckIdentifier,Wt,J.kind,J.setterName);case"m":return a().createClassPrivateFieldSetHelper(ct,J.brandCheckIdentifier,Wt,J.kind,void 0);case"f":return a().createClassPrivateFieldSetHelper(ct,J.brandCheckIdentifier,Wt,J.kind,J.isStatic?J.variableName:void 0);case"untransformed":return z.fail("Access helpers should not be created for untransformed private elements");default:z.assertNever(J,"Unknown private element type")}}function $e(J){return Ri(J.members,eEe)}function qt(J){var ct;let Wt=0;const mi=uu(J);ss(mi)&&oS(R,mi)&&(Wt|=1),q&&(lce(J)||jK(J))&&(Wt|=2);let mn=!1,Zr=!1,Fi=!1,br=!1;for(const xs of J.members)da(xs)?((xs.name&&(Vs(xs.name)||O_(xs))&&q||O_(xs)&&Q===-1&&!J.name&&!((ct=J.emitNode)!=null&&ct.classThis))&&(Wt|=2),(To(xs)||bu(xs))&&(re&&xs.transformFlags&16384&&(Wt|=8,Wt&1||(Wt|=2)),Y&&xs.transformFlags&134217728&&(Wt&1||(Wt|=6)))):WT(uu(xs))||(O_(xs)?(br=!0,Fi||(Fi=Fh(xs))):Fh(xs)?(Fi=!0,b.hasNodeCheckFlag(xs,262144)&&(Wt|=2)):To(xs)&&(mn=!0,Zr||(Zr=!!xs.initializer)));return(j&&mn||F&&Zr||q&&Fi||q&&br&&Q===-1)&&(Wt|=16),Wt}function $t(J){var ct;if((((ct=ve==null?void 0:ve.data)==null?void 0:ct.facts)||0)&4){const mi=r.createTempVariable(u,!0);return is().superClassReference=mi,r.updateExpressionWithTypeArguments(J,r.createAssignment(mi,Ct(J.expression,He,Ut)),void 0)}return cn(J,He,t)}function ii(J,ct){var Wt;const mi=Fe,mn=be,Zr=ve;Fe=J,be=void 0,to();const Fi=d0(J)&32;if(q||Fi){const xs=ko(J);if(xs&<(xs))$i().data.className=xs;else if((Wt=J.emitNode)!=null&&Wt.assignedName&&ja(J.emitNode.assignedName)){if(J.emitNode.assignedName.textSourceNode&<(J.emitNode.assignedName.textSourceNode))$i().data.className=J.emitNode.assignedName.textSourceNode;else if(wp(J.emitNode.assignedName.text,E)){const ql=r.createIdentifier(J.emitNode.assignedName.text);$i().data.className=ql}}}if(q){const xs=$e(J);Rt(xs)&&($i().data.weakSetName=Ic("instances",xs[0].name))}const br=qt(J);br&&(is().facts=br),br&8&&or();const Cs=ct(J,br);return Ar(),z.assert(ve===Zr),Fe=mi,be=mn,Cs}function Gt(J){return ii(J,wi)}function wi(J,ct){var Wt,mi;let mn;if(ct&2)if(q&&((Wt=J.emitNode)!=null&&Wt.classThis))is().classConstructor=J.emitNode.classThis,mn=r.createAssignment(J.emitNode.classThis,r.getInternalName(J));else{const Fc=r.createTempVariable(u,!0);is().classConstructor=r.cloneNode(Fc),mn=r.createAssignment(Fc,r.getInternalName(J))}(mi=J.emitNode)!=null&&mi.classThis&&(is().classThis=J.emitNode.classThis);const Zr=b.hasNodeCheckFlag(J,262144),Fi=Kr(J,32),br=Kr(J,2048);let Cs=wn(J.modifiers,et,Ra);const xs=wn(J.heritageClauses,Ye,Lp),{members:ql,prologue:Xc}=je(J),Id=[];if(mn&&Tn().unshift(mn),Rt(be)&&Id.push(r.createExpressionStatement(r.inlineExpressions(be))),F||q||d0(J)&32){const Fc=VK(J);Rt(Fc)&&Qt(Id,Fc,r.getInternalName(J))}Id.length>0&&Fi&&br&&(Cs=wn(Cs,Fc=>CV(Fc)?void 0:Fc,Ra),Id.push(r.createExportAssignment(void 0,!1,r.getLocalName(J,!1,!0))));const $c=is().classConstructor;Zr&&$c&&(kn(),ye[y_(J)]=$c);const Ud=r.updateClassDeclaration(J,Cs,J.name,void 0,xs,ql);return Id.unshift(Ud),Xc&&Id.unshift(r.createExpressionStatement(Xc)),Id}function ce(J){return ii(J,ut)}function ut(J,ct){var Wt,mi,mn;const Zr=!!(ct&1),Fi=VK(J),br=b.hasNodeCheckFlag(J,262144),Cs=b.hasNodeCheckFlag(J,32768);let xs;function ql(){var Nd;if(q&&((Nd=J.emitNode)!=null&&Nd.classThis))return is().classConstructor=J.emitNode.classThis;const md=r.createTempVariable(Cs?C:u,!0);return is().classConstructor=r.cloneNode(md),md}(Wt=J.emitNode)!=null&&Wt.classThis&&(is().classThis=J.emitNode.classThis),ct&2&&(xs??(xs=ql()));const Xc=wn(J.modifiers,et,Ra),Id=wn(J.heritageClauses,Ye,Lp),{members:$c,prologue:Ud}=je(J),Fc=r.updateClassExpression(J,Xc,J.name,void 0,Id,$c),qd=[];if(Ud&&qd.push(Ud),(q||d0(J)&32)&&Rt(Fi,Nd=>bu(Nd)||Fh(Nd)||U&&WV(Nd))||Rt(be))if(Zr)z.assertIsDefined(_e,"Decorated classes transformed by TypeScript are expected to be within a variable declaration."),Rt(be)&&un(_e,Yt(be,r.createExpressionStatement)),Rt(Fi)&&Qt(_e,Fi,((mi=J.emitNode)==null?void 0:mi.classThis)??r.getInternalName(J)),xs?qd.push(r.createAssignment(xs,Fc)):q&&((mn=J.emitNode)!=null&&mn.classThis)?qd.push(r.createAssignment(J.emitNode.classThis,Fc)):qd.push(Fc);else{if(xs??(xs=ql()),br){kn();const Nd=r.cloneNode(xs);Nd.emitNode.autoGenerate.flags&=-9,ye[y_(J)]=Nd}qd.push(r.createAssignment(xs,Fc)),un(qd,be),un(qd,fi(Fi,xs)),qd.push(r.cloneNode(xs))}else qd.push(Fc);return qd.length>1&&(Wv(Fc,131072),qd.forEach(mh)),r.inlineExpressions(qd)}function Bt(J){if(!q)return cn(J,He,t)}function le(J){if(re&&Oe&&bu(Oe)&&(ve!=null&&ve.data)){const{classThis:ct,classConstructor:Wt}=ve.data;return ct??Wt??J}return J}function je(J){const ct=!!(d0(J)&32);if(q||oe){for(const Fi of J.members)if(Fh(Fi))if(bs(Fi))ca(Fi,Fi.name,ki);else{const br=$i();kI(br,Fi.name,{kind:"untransformed"})}if(q&&Rt($e(J))&&de(),hi()){for(const Fi of J.members)if(O_(Fi)){const br=r.getGeneratedPrivateNameForNode(Fi.name,void 0,"_accessor_storage");if(q||ct&&_d(Fi))ca(Fi,br,zo);else{const Cs=$i();kI(Cs,br,{kind:"untransformed"})}}}}let Wt=wn(J.members,nt,Vd),mi;Rt(Wt,fu)||(mi=tt(void 0,J));let mn,Zr;if(!q&&Rt(be)){let Fi=r.createExpressionStatement(r.inlineExpressions(be));if(Fi.transformFlags&134234112){const Cs=r.createTempVariable(u),xs=r.createArrowFunction(void 0,void 0,[],void 0,void 0,r.createBlock([Fi]));mn=r.createAssignment(Cs,xs),Fi=r.createExpressionStatement(r.createCallExpression(Cs,void 0,[]))}const br=r.createBlock([Fi]);Zr=r.createClassStaticBlockDeclaration(br),be=void 0}if(mi||Zr){let Fi;const br=Me(Wt,z7),Cs=Me(Wt,zP);Fi=xi(Fi,br),Fi=xi(Fi,Cs),Fi=xi(Fi,mi),Fi=xi(Fi,Zr);const xs=br||Cs?Ri(Wt,ql=>ql!==br&&ql!==Cs):Wt;Fi=un(Fi,xs),Wt=zt(r.createNodeArray(Fi),J.members)}return{members:Wt,prologue:mn}}function de(){const{weakSetName:J}=$i().data;z.assert(J,"weakSetName should be set in private identifier environment"),Tn().push(r.createAssignment(J,r.createNewExpression(r.createIdentifier("WeakSet"),void 0,[])))}function tt(J,ct){if(J=Ct(J,He,fu),!(ve!=null&&ve.data)||!(ve.data.facts&16))return J;const Wt=Pv(ct),mi=!!(Wt&&ld(Wt.expression).kind!==106),mn=Su(J?J.parameters:void 0,He,t),Zr=Ke(ct,J,mi);return Zr?J?(z.assert(mn),r.updateConstructorDeclaration(J,void 0,mn,Zr)):mh(Er(zt(r.createConstructorDeclaration(void 0,mn??[],Zr),J||ct),J)):J}function Ae(J,ct,Wt,mi,mn,Zr,Fi){const br=mi[mn],Cs=ct[br];if(un(J,wn(ct,He,Es,Wt,br-Wt)),Wt=br+1,gI(Cs)){const xs=[];Ae(xs,Cs.tryBlock.statements,0,mi,mn+1,Zr,Fi);const ql=r.createNodeArray(xs);zt(ql,Cs.tryBlock.statements),J.push(r.updateTryStatement(Cs,r.updateBlock(Cs.tryBlock,xs),Ct(Cs.catchClause,He,YT),Ct(Cs.finallyBlock,He,Ho)))}else{for(un(J,wn(ct,He,Es,br,1));Wt!!$c.initializer||Vs($c.name)||Mv($c)));const Zr=$e(J),Fi=Rt(mn)||Rt(Zr);if(!ct&&!Fi)return vg(void 0,He,t);m();const br=!ct&&Wt;let Cs=0,xs=[];const ql=[],Xc=r.createThis();if(rn(ql,Zr,Xc),ct){const $c=Ri(mi,Fc=>xp(uu(Fc),ct)),Ud=Ri(mn,Fc=>!xp(uu(Fc),ct));Qt(ql,$c,Xc),Qt(ql,Ud,Xc)}else Qt(ql,mn,Xc);if(ct!=null&&ct.body){Cs=r.copyPrologue(ct.body.statements,xs,!1,He);const $c=WK(ct.body.statements,Cs);if($c.length)Ae(xs,ct.body.statements,Cs,$c,0,ql,ct);else{for(;Cs=xs.length?ct.body.multiLine??xs.length>0:xs.length>0;return zt(r.createBlock(zt(r.createNodeArray(xs),ct?ct.body.statements:J.members),Id),ct?ct.body:void 0)}function Qt(J,ct,Wt){for(const mi of ct){if(da(mi)&&!q)continue;const mn=ni(mi,Wt);mn&&J.push(mn)}}function ni(J,ct){const Wt=bu(J)?Hs(J,Re,J):Gi(J,ct);if(!Wt)return;const mi=r.createExpressionStatement(Wt);Er(mi,J),Wv(mi,Ya(J)&3072),Sd(mi,J);const mn=uu(J);return Gs(mn)?($a(mi,mn),rV(mi)):$a(mi,Fv(J)),Vk(Wt,void 0),mP(Wt,void 0),Mv(mn)&&Wv(mi,3072),mi}function fi(J,ct){const Wt=[];for(const mi of J){const mn=bu(mi)?Hs(mi,Re,mi):Hs(mi,()=>Gi(mi,ct),void 0);mn&&(mh(mn),Er(mn,mi),Wv(mn,Ya(mi)&3072),$a(mn,Fv(mi)),Sd(mn,mi),Wt.push(mn))}return Wt}function Gi(J,ct){var Wt;const mi=Oe,mn=fn(J,ct);return mn&&_d(J)&&((Wt=ve==null?void 0:ve.data)!=null&&Wt.facts)&&(Er(mn,J),Wv(mn,4),$a(mn,_S(J.name)),Ee.set(uu(J),ve)),Oe=mi,mn}function fn(J,ct){const Wt=!N;Tp(J,mt)&&(J=Pp(t,J));const mi=Mv(J)?r.getGeneratedPrivateNameForNode(J.name):Ja(J.name)&&!z1(J.name.expression)?r.updateComputedPropertyName(J.name,r.getGeneratedNameForNode(J.name)):J.name;if(_d(J)&&(Oe=J),Vs(mi)&&bs(J)){const Fi=Ps(mi);if(Fi)return Fi.kind==="f"?Fi.isStatic?TAt(r,Fi.variableName,Ct(J.initializer,He,Ut)):DAt(r,ct,Ct(J.initializer,He,Ut),Fi.brandCheckIdentifier):void 0;z.fail("Undeclared private name for property declaration.")}if((Vs(mi)||_d(J))&&!J.initializer)return;const mn=uu(J);if(Kr(mn,64))return;let Zr=Ct(J.initializer,He,Ut);if(xp(mn,mn.parent)&<(mi)){const Fi=r.cloneNode(mi);Zr?(g_(Zr)&&vV(Zr.expression)&&u7(Zr.expression.left,"___runInitializers")&&EP(Zr.expression.right)&&W_(Zr.expression.right.expression)&&(Zr=Zr.expression.left),Zr=r.inlineExpressions([Zr,Fi])):Zr=Fi,ir(mi,3168),$a(Fi,mn.name),ir(Fi,3072)}else Zr??(Zr=r.createVoidZero());if(Wt||Vs(mi)){const Fi=SI(r,ct,mi,mi);return Wv(Fi,1024),r.createAssignment(Fi,Zr)}else{const Fi=Ja(mi)?mi.expression:lt(mi)?r.createStringLiteral(Ws(mi.escapedText)):mi,br=r.createPropertyDescriptor({value:Zr,configurable:!0,writable:!0,enumerable:!0});return r.createObjectDefinePropertyCall(ct,Fi,br)}}function kn(){pe&1||(pe|=1,t.enableSubstitution(80),ye=[])}function or(){pe&2||(pe|=2,t.enableSubstitution(110),t.enableEmitNotification(262),t.enableEmitNotification(218),t.enableEmitNotification(176),t.enableEmitNotification(177),t.enableEmitNotification(178),t.enableEmitNotification(174),t.enableEmitNotification(172),t.enableEmitNotification(167))}function rn(J,ct,Wt){if(!q||!Rt(ct))return;const{weakSetName:mi}=$i().data;z.assert(mi,"weakSetName should be set in private identifier environment"),J.push(r.createExpressionStatement(EAt(r,Wt,mi)))}function _r(J){return Ir(J)?r.updatePropertyAccessExpression(J,r.createVoidZero(),J.name):r.updateElementAccessExpression(J,r.createVoidZero(),Ct(J.argumentExpression,He,Ut))}function Fs(J,ct){if(Ja(J)){const Wt=sK(J),mi=Ct(J.expression,He,Ut),mn=u0(mi),Zr=z1(mn);if(!(!!Wt||Yd(mn)&&jc(mn.left))&&!Zr&&ct){const br=r.getGeneratedNameForNode(J);return b.hasNodeCheckFlag(J,32768)?C(br):u(br),r.createAssignment(br,mi)}return Zr||lt(mn)?void 0:mi}}function to(){ve={previous:ve,data:void 0}}function Ar(){ve=ve==null?void 0:ve.previous}function is(){return z.assert(ve),ve.data??(ve.data={facts:0,classConstructor:void 0,classThis:void 0,superClassReference:void 0})}function $i(){return z.assert(ve),ve.privateEnv??(ve.privateEnv=nEe({className:void 0,weakSetName:void 0}))}function Tn(){return be??(be=[])}function ki(J,ct,Wt,mi,mn,Zr,Fi){O_(J)?co(J,ct,Wt,mi,mn,Zr):To(J)?zo(J,ct,Wt,mi,mn,Zr):Au(J)?Sl(J,ct,Wt,mi,mn,Zr):hg(J)?Rl(J,ct,Wt,mi,mn,Zr,Fi):Np(J)&&zl(J,ct,Wt,mi,mn,Zr,Fi)}function zo(J,ct,Wt,mi,mn,Zr,Fi){if(mn){const br=z.checkDefined(Wt.classThis??Wt.classConstructor,"classConstructor should be set in private identifier environment"),Cs=$s(ct);kI(mi,ct,{kind:"f",isStatic:!0,brandCheckIdentifier:br,variableName:Cs,isValid:Zr})}else{const br=$s(ct);kI(mi,ct,{kind:"f",isStatic:!1,brandCheckIdentifier:br,isValid:Zr}),Tn().push(r.createAssignment(br,r.createNewExpression(r.createIdentifier("WeakMap"),void 0,[])))}}function Sl(J,ct,Wt,mi,mn,Zr,Fi){const br=$s(ct),Cs=mn?z.checkDefined(Wt.classThis??Wt.classConstructor,"classConstructor should be set in private identifier environment"):z.checkDefined(mi.data.weakSetName,"weakSetName should be set in private identifier environment");kI(mi,ct,{kind:"m",methodName:br,brandCheckIdentifier:Cs,isStatic:mn,isValid:Zr})}function Rl(J,ct,Wt,mi,mn,Zr,Fi){const br=$s(ct,"_get"),Cs=mn?z.checkDefined(Wt.classThis??Wt.classConstructor,"classConstructor should be set in private identifier environment"):z.checkDefined(mi.data.weakSetName,"weakSetName should be set in private identifier environment");(Fi==null?void 0:Fi.kind)==="a"&&Fi.isStatic===mn&&!Fi.getterName?Fi.getterName=br:kI(mi,ct,{kind:"a",getterName:br,setterName:void 0,brandCheckIdentifier:Cs,isStatic:mn,isValid:Zr})}function zl(J,ct,Wt,mi,mn,Zr,Fi){const br=$s(ct,"_set"),Cs=mn?z.checkDefined(Wt.classThis??Wt.classConstructor,"classConstructor should be set in private identifier environment"):z.checkDefined(mi.data.weakSetName,"weakSetName should be set in private identifier environment");(Fi==null?void 0:Fi.kind)==="a"&&Fi.isStatic===mn&&!Fi.setterName?Fi.setterName=br:kI(mi,ct,{kind:"a",getterName:void 0,setterName:br,brandCheckIdentifier:Cs,isStatic:mn,isValid:Zr})}function co(J,ct,Wt,mi,mn,Zr,Fi){const br=$s(ct,"_get"),Cs=$s(ct,"_set"),xs=mn?z.checkDefined(Wt.classThis??Wt.classConstructor,"classConstructor should be set in private identifier environment"):z.checkDefined(mi.data.weakSetName,"weakSetName should be set in private identifier environment");kI(mi,ct,{kind:"a",getterName:br,setterName:Cs,brandCheckIdentifier:xs,isStatic:mn,isValid:Zr})}function ca(J,ct,Wt){const mi=is(),mn=$i(),Zr=ace(mn,ct),Fi=_d(J),br=!IAt(ct)&&Zr===void 0;Wt(J,ct,mi,mn,Fi,br,Zr)}function Ic(J,ct,Wt){const{className:mi}=$i().data,mn=mi?{prefix:"_",node:mi,suffix:"_"}:"_",Zr=typeof J=="object"?r.getGeneratedNameForNode(J,24,mn,Wt):typeof J=="string"?r.createUniqueName(J,16,mn,Wt):r.createTempVariable(void 0,!0,mn,Wt);return b.hasNodeCheckFlag(ct,32768)?C(Zr):u(Zr),Zr}function $s(J,ct){const Wt=m8(J);return Ic((Wt==null?void 0:Wt.substring(1))??J,J,ct)}function Ps(J){const ct=rEe(ve,J);return(ct==null?void 0:ct.kind)==="untransformed"?void 0:ct}function pf(J){const ct=r.getGeneratedNameForNode(J),Wt=Ps(J.name);if(!Wt)return cn(J,He,t);let mi=J.expression;return(aW(J)||R_(J)||!iD(J.expression))&&(mi=r.createTempVariable(u,!0),Tn().push(r.createBinaryExpression(mi,64,Ct(J.expression,He,Ut)))),r.createAssignmentTargetWrapper(ct,Ci(Wt,mi,ct,64))}function qc(J){if(Pa(J)||Rf(J))return Li(J);if(S6(J))return pf(J);if(Y&&Oe&&R_(J)&&q7(Oe)&&(ve!=null&&ve.data)){const{classConstructor:ct,superClassReference:Wt,facts:mi}=ve.data;if(mi&1)return _r(J);if(ct&&Wt){const mn=wc(J)?Ct(J.argumentExpression,He,Ut):lt(J.name)?r.createStringLiteralFromNode(J.name):void 0;if(mn){const Zr=r.createTempVariable(void 0);return r.createAssignmentTargetWrapper(Zr,r.createReflectSetCall(Wt,mn,Zr,ct))}}}return cn(J,He,t)}function wh(J){if(Tp(J,mt)&&(J=Pp(t,J)),Yd(J,!0)){const ct=qc(J.left),Wt=Ct(J.right,He,Ut);return r.updateBinaryExpression(J,ct,J.operatorToken,Wt)}return qc(J)}function Tu(J){if(M_(J.expression)){const ct=qc(J.expression);return r.updateSpreadElement(J,ct)}return cn(J,He,t)}function Wf(J){if(jB(J)){if(Zg(J))return Tu(J);if(!zd(J))return wh(J)}return cn(J,He,t)}function za(J){const ct=Ct(J.name,He,od);if(Yd(J.initializer,!0)){const Wt=wh(J.initializer);return r.updatePropertyAssignment(J,ct,Wt)}if(M_(J.initializer)){const Wt=qc(J.initializer);return r.updatePropertyAssignment(J,ct,Wt)}return cn(J,He,t)}function Mc(J){return Tp(J,mt)&&(J=Pp(t,J)),cn(J,He,t)}function Ul(J){if(M_(J.expression)){const ct=qc(J.expression);return r.updateSpreadAssignment(J,ct)}return cn(J,He,t)}function wl(J){return z.assertNode(J,HB),ib(J)?Ul(J):ih(J)?Mc(J):pd(J)?za(J):cn(J,He,t)}function Li(J){return Rf(J)?r.updateArrayLiteralExpression(J,wn(J.elements,Wf,Ut)):r.updateObjectLiteralExpression(J,wn(J.properties,wl,Fb))}function wu(J,ct,Wt){const mi=uu(ct),mn=Ee.get(mi);if(mn){const Zr=ve,Fi=Ie;ve=mn,Ie=fe,fe=!bu(mi)||!(d0(mi)&32),Se(J,ct,Wt),fe=Ie,Ie=Fi,ve=Zr;return}switch(ct.kind){case 218:if(Dc(mi)||Ya(ct)&524288)break;case 262:case 176:case 177:case 178:case 174:case 172:{const Zr=ve,Fi=Ie;ve=void 0,Ie=fe,fe=!1,Se(J,ct,Wt),fe=Ie,Ie=Fi,ve=Zr;return}case 167:{const Zr=ve,Fi=fe;ve=ve==null?void 0:ve.previous,fe=Ie,Se(J,ct,Wt),fe=Fi,ve=Zr;return}}Se(J,ct,Wt)}function zh(J,ct){return ct=te(J,ct),J===1?Uh(ct):ct}function Uh(J){switch(J.kind){case 80:return Rc(J);case 110:return z_(J)}return J}function z_(J){if(pe&2&&(ve!=null&&ve.data)&&!ke.has(J)){const{facts:ct,classConstructor:Wt,classThis:mi}=ve.data,mn=fe?mi??Wt:Wt;if(mn)return zt(Er(r.cloneNode(mn),J),J);if(ct&1&&R)return r.createParenthesizedExpression(r.createVoidZero())}return J}function Rc(J){return Qc(J)||J}function Qc(J){if(pe&1&&b.hasNodeCheckFlag(J,536870912)){const ct=b.getReferencedValueDeclaration(J);if(ct){const Wt=ye[ct.id];if(Wt){const mi=r.cloneNode(Wt);return $a(mi,J),Sd(mi,J),mi}}}}}function TAt(t,r,a){return t.createAssignment(r,t.createObjectLiteralExpression([t.createPropertyAssignment("value",a||t.createVoidZero())]))}function DAt(t,r,a,u){return t.createCallExpression(t.createPropertyAccessExpression(u,"set"),void 0,[r,a||t.createVoidZero()])}function EAt(t,r,a){return t.createCallExpression(t.createPropertyAccessExpression(a,"add"),void 0,[r])}function IAt(t){return!ZE(t)&&t.escapedText==="#constructor"}function NAt(t){return Vs(t.left)&&t.operatorToken.kind===103}function LAt(t){return To(t)&&_d(t)}function q7(t){return bu(t)||LAt(t)}function mEe(t){const{factory:r,hoistVariableDeclaration:a}=t,u=t.getEmitResolver(),h=t.getCompilerOptions(),p=il(h),m=Hh(h,"strictNullChecks");let C,b;return{serializeTypeNode:(be,_e)=>T(be,U,_e),serializeTypeOfNode:(be,_e,ve)=>T(be,N,_e,ve),serializeParameterTypesOfNode:(be,_e,ve)=>T(be,R,_e,ve),serializeReturnTypeOfNode:(be,_e)=>T(be,j,_e)};function T(be,_e,ve,Ee){const ke=C,Fe=b;C=be.currentLexicalScope,b=be.currentNameScope;const Oe=Ee===void 0?_e(ve):_e(ve,Ee);return C=ke,b=Fe,Oe}function E(be,_e){const ve=qw(_e.members,be);return ve.setAccessor&&Rxe(ve.setAccessor)||ve.getAccessor&&Dp(ve.getAccessor)}function N(be,_e){switch(be.kind){case 172:case 169:return U(be.type);case 178:case 177:return U(E(be,_e));case 263:case 231:case 174:return r.createIdentifier("Function");default:return r.createVoidZero()}}function R(be,_e){const ve=ss(be)?Gy(be):Bo(be)&&Tm(be.body)?be:void 0,Ee=[];if(ve){const ke=F(ve,_e),Fe=ke.length;for(let Oe=0;Oeke.parent&&$T(ke.parent)&&(ke.parent.trueType===ke||ke.parent.falseType===ke)))return r.createIdentifier("Object");const ve=te(be.typeName),Ee=r.createTempVariable(a);return r.createConditionalExpression(r.createTypeCheck(r.createAssignment(Ee,ve),"function"),void 0,Ee,void 0,r.createIdentifier("Object"));case 1:return Se(be.typeName);case 2:return r.createVoidZero();case 4:return ye("BigInt",7);case 6:return r.createIdentifier("Boolean");case 3:return r.createIdentifier("Number");case 5:return r.createIdentifier("String");case 7:return r.createIdentifier("Array");case 8:return ye("Symbol",2);case 10:return r.createIdentifier("Function");case 9:return r.createIdentifier("Promise");case 11:return r.createIdentifier("Object");default:return z.assertNever(_e)}}function ue(be,_e){return r.createLogicalAnd(r.createStrictInequality(r.createTypeOfExpression(be),r.createStringLiteral("undefined")),_e)}function te(be){if(be.kind===80){const Ee=Se(be);return ue(Ee,Ee)}if(be.left.kind===80)return ue(Se(be.left),Se(be));const _e=te(be.left),ve=r.createTempVariable(a);return r.createLogicalAnd(r.createLogicalAnd(_e.left,r.createStrictInequality(r.createAssignment(ve,_e.right),r.createVoidZero())),r.createPropertyAccessExpression(ve,be.right))}function Se(be){switch(be.kind){case 80:const _e=ml(zt(Gk.cloneNode(be),be),be.parent);return _e.original=void 0,ml(_e,xo(C)),_e;case 166:return oe(be)}}function oe(be){return r.createPropertyAccessExpression(Se(be.left),be.right)}function pe(be){return r.createConditionalExpression(r.createTypeCheck(r.createIdentifier(be),"function"),void 0,r.createIdentifier(be),void 0,r.createIdentifier("Object"))}function ye(be,_e){return p<_e?pe(be):r.createIdentifier(be)}}function vEe(t){const{factory:r,getEmitHelperFactory:a,hoistVariableDeclaration:u}=t,h=t.getEmitResolver(),p=t.getCompilerOptions(),m=il(p),C=t.onSubstituteNode;t.onSubstituteNode=ze;let b;return Q0(t,T);function T(ft){const Ht=cn(ft,N,t);return Jb(Ht,t.readEmitHelpers()),Ht}function E(ft){return jd(ft)?void 0:ft}function N(ft){if(!(ft.transformFlags&33554432))return ft;switch(ft.kind){case 170:return;case 263:return R(ft);case 231:return Y(ft);case 176:return ue(ft);case 174:return Se(ft);case 178:return pe(ft);case 177:return oe(ft);case 172:return ye(ft);case 169:return be(ft);default:return cn(ft,N,t)}}function R(ft){if(!(oS(!0,ft)||b8(!0,ft)))return cn(ft,N,t);const Ht=oS(!0,ft)?re(ft,ft.name):Q(ft,ft.name);return ag(Ht)}function F(ft){return!!(ft.transformFlags&536870912)}function j(ft){return Rt(ft,F)}function U(ft){for(const Ht of ft.members){if(!eD(Ht))continue;const Oi=HK(Ht,ft,!0);if(Rt(Oi==null?void 0:Oi.decorators,F)||Rt(Oi==null?void 0:Oi.parameters,j))return!0}return!1}function q(ft,Ht){let Oi=[];return Ee(Oi,ft,!1),Ee(Oi,ft,!0),U(ft)&&(Ht=zt(r.createNodeArray([...Ht,r.createClassStaticBlockDeclaration(r.createBlock(Oi,!0))]),Ht),Oi=void 0),{decorationStatements:Oi,members:Ht}}function Q(ft,Ht){const Oi=wn(ft.modifiers,E,Ra),Ji=wn(ft.heritageClauses,N,Lp);let Ui=wn(ft.members,N,Vd),bn=[];({members:Ui,decorationStatements:bn}=q(ft,Ui));const Mi=r.updateClassDeclaration(ft,Oi,Ht,void 0,Ji,Ui);return un([Mi],bn)}function re(ft,Ht){const Oi=Kr(ft,32),Ji=Kr(ft,2048),Ui=wn(ft.modifiers,hi=>CV(hi)||jd(hi)?void 0:hi,zc),bn=Fv(ft),Mi=Ye(ft),Ai=m<2?r.getInternalName(ft,!1,!0):r.getLocalName(ft,!1,!0),Rn=wn(ft.heritageClauses,N,Lp);let bs=wn(ft.members,N,Vd),Hi=[];({members:bs,decorationStatements:Hi}=q(ft,bs));const Hs=m>=9&&!!Mi&&Rt(bs,hi=>To(hi)&&Kr(hi,256)||bu(hi));Hs&&(bs=zt(r.createNodeArray([r.createClassStaticBlockDeclaration(r.createBlock([r.createExpressionStatement(r.createAssignment(Mi,r.createThis()))])),...bs]),bs));const Wo=r.createClassExpression(Ui,Ht&&jc(Ht)?void 0:Ht,void 0,Rn,bs);Er(Wo,ft),zt(Wo,bn);const ts=Mi&&!Hs?r.createAssignment(Mi,Wo):Wo,Fo=r.createVariableDeclaration(Ai,void 0,void 0,ts);Er(Fo,ft);const Cn=r.createVariableDeclarationList([Fo],1),Ko=r.createVariableStatement(void 0,Cn);Er(Ko,ft),zt(Ko,bn),Sd(Ko,ft);const ot=[Ko];if(un(ot,Hi),Ie(ot,ft),Oi)if(Ji){const hi=r.createExportDefault(Ai);ot.push(hi)}else{const hi=r.createExternalModuleExport(r.getDeclarationName(ft));ot.push(hi)}return ot}function Y(ft){return r.updateClassExpression(ft,wn(ft.modifiers,E,Ra),ft.name,void 0,wn(ft.heritageClauses,N,Lp),wn(ft.members,N,Vd))}function ue(ft){return r.updateConstructorDeclaration(ft,wn(ft.modifiers,E,Ra),wn(ft.parameters,N,Gs),Ct(ft.body,N,Ho))}function te(ft,Ht){return ft!==Ht&&(Sd(ft,Ht),$a(ft,Fv(Ht))),ft}function Se(ft){return te(r.updateMethodDeclaration(ft,wn(ft.modifiers,E,Ra),ft.asteriskToken,z.checkDefined(Ct(ft.name,N,od)),void 0,void 0,wn(ft.parameters,N,Gs),void 0,Ct(ft.body,N,Ho)),ft)}function oe(ft){return te(r.updateGetAccessorDeclaration(ft,wn(ft.modifiers,E,Ra),z.checkDefined(Ct(ft.name,N,od)),wn(ft.parameters,N,Gs),void 0,Ct(ft.body,N,Ho)),ft)}function pe(ft){return te(r.updateSetAccessorDeclaration(ft,wn(ft.modifiers,E,Ra),z.checkDefined(Ct(ft.name,N,od)),wn(ft.parameters,N,Gs),Ct(ft.body,N,Ho)),ft)}function ye(ft){if(!(ft.flags&33554432||Kr(ft,128)))return te(r.updatePropertyDeclaration(ft,wn(ft.modifiers,E,Ra),z.checkDefined(Ct(ft.name,N,od)),void 0,void 0,Ct(ft.initializer,N,Ut)),ft)}function be(ft){const Ht=r.updateParameterDeclaration(ft,ITe(r,ft.modifiers),ft.dotDotDotToken,z.checkDefined(Ct(ft.name,N,YE)),void 0,void 0,Ct(ft.initializer,N,Ut));return Ht!==ft&&(Sd(Ht,ft),zt(Ht,Fv(ft)),$a(Ht,Fv(ft)),ir(Ht.name,64)),Ht}function _e(ft){return u7(ft.expression,"___metadata")}function ve(ft){if(!ft)return;const{false:Ht,true:Oi}=d6(ft.decorators,_e),Ji=[];return un(Ji,Yt(Ht,et)),un(Ji,Ln(ft.parameters,He)),un(Ji,Yt(Oi,et)),Ji}function Ee(ft,Ht,Oi){un(ft,Yt(Oe(Ht,Oi),Ji=>r.createExpressionStatement(Ji)))}function ke(ft,Ht,Oi){return uW(!0,ft,Oi)&&Ht===da(ft)}function Fe(ft,Ht){return Ri(ft.members,Oi=>ke(Oi,Ht,ft))}function Oe(ft,Ht){const Oi=Fe(ft,Ht);let Ji;for(const Ui of Oi)Ji=xi(Ji,fe(ft,Ui));return Ji}function fe(ft,Ht){const Oi=HK(Ht,ft,!0),Ji=ve(Oi);if(!Ji)return;const Ui=nt(ft,Ht),bn=We(Ht,!Kr(Ht,128)),Mi=To(Ht)&&!Mv(Ht)?r.createVoidZero():r.createNull(),Ai=a().createDecorateHelper(Ji,Ui,bn,Mi);return ir(Ai,3072),$a(Ai,Fv(Ht)),Ai}function Ie(ft,Ht){const Oi=Le(Ht);Oi&&ft.push(Er(r.createExpressionStatement(Oi),Ht))}function Le(ft){const Ht=oce(ft),Oi=ve(Ht);if(!Oi)return;const Ji=b&&b[y_(ft)],Ui=m<2?r.getInternalName(ft,!1,!0):r.getDeclarationName(ft,!1,!0),bn=a().createDecorateHelper(Oi,Ui),Mi=r.createAssignment(Ui,Ji?r.createAssignment(Ji,bn):bn);return ir(Mi,3072),$a(Mi,Fv(ft)),Mi}function et(ft){return z.checkDefined(Ct(ft.expression,N,Ut))}function He(ft,Ht){let Oi;if(ft){Oi=[];for(const Ji of ft){const Ui=a().createParamHelper(et(Ji),Ht);zt(Ui,Ji.expression),ir(Ui,3072),Oi.push(Ui)}}return Oi}function We(ft,Ht){const Oi=ft.name;return Vs(Oi)?r.createIdentifier(""):Ja(Oi)?Ht&&!z1(Oi.expression)?r.getGeneratedNameForNode(Oi):Oi.expression:lt(Oi)?r.createStringLiteral(dr(Oi)):r.cloneNode(Oi)}function Ue(){b||(t.enableSubstitution(80),b=[])}function Ye(ft){if(h.hasNodeCheckFlag(ft,262144)){Ue();const Ht=r.createUniqueName(ft.name&&!jc(ft.name)?dr(ft.name):"default");return b[y_(ft)]=Ht,u(Ht),Ht}}function wt(ft){return r.createPropertyAccessExpression(r.getDeclarationName(ft),"prototype")}function nt(ft,Ht){return da(Ht)?r.getDeclarationName(ft):wt(ft)}function ze(ft,Ht){return Ht=C(ft,Ht),ft===1?st(Ht):Ht}function st(ft){switch(ft.kind){case 80:return xt(ft)}return ft}function xt(ft){return Et(ft)??ft}function Et(ft){if(b&&h.hasNodeCheckFlag(ft,536870912)){const Ht=h.getReferencedValueDeclaration(ft);if(Ht){const Oi=b[Ht.id];if(Oi){const Ji=r.cloneNode(Oi);return $a(Ji,ft),Sd(Ji,ft),Ji}}}}}function yEe(t){const{factory:r,getEmitHelperFactory:a,startLexicalEnvironment:u,endLexicalEnvironment:h,hoistVariableDeclaration:p}=t,m=il(t.getCompilerOptions());let C,b,T,E,N,R;return Q0(t,F);function F(le){C=void 0,R=!1;const je=cn(le,pe,t);return Jb(je,t.readEmitHelpers()),R&&(gP(je,32),R=!1),je}function j(){switch(b=void 0,T=void 0,E=void 0,C==null?void 0:C.kind){case"class":b=C.classInfo;break;case"class-element":b=C.next.classInfo,T=C.classThis,E=C.classSuper;break;case"name":const le=C.next.next.next;(le==null?void 0:le.kind)==="class-element"&&(b=le.next.classInfo,T=le.classThis,E=le.classSuper);break}}function U(le){C={kind:"class",next:C,classInfo:le,savedPendingExpressions:N},N=void 0,j()}function q(){z.assert((C==null?void 0:C.kind)==="class","Incorrect value for top.kind.",()=>`Expected top.kind to be 'class' but got '${C==null?void 0:C.kind}' instead.`),N=C.savedPendingExpressions,C=C.next,j()}function Q(le){var je,de;z.assert((C==null?void 0:C.kind)==="class","Incorrect value for top.kind.",()=>`Expected top.kind to be 'class' but got '${C==null?void 0:C.kind}' instead.`),C={kind:"class-element",next:C},(bu(le)||To(le)&&_d(le))&&(C.classThis=(je=C.next.classInfo)==null?void 0:je.classThis,C.classSuper=(de=C.next.classInfo)==null?void 0:de.classSuper),j()}function re(){var le;z.assert((C==null?void 0:C.kind)==="class-element","Incorrect value for top.kind.",()=>`Expected top.kind to be 'class-element' but got '${C==null?void 0:C.kind}' instead.`),z.assert(((le=C.next)==null?void 0:le.kind)==="class","Incorrect value for top.next.kind.",()=>{var je;return`Expected top.next.kind to be 'class' but got '${(je=C.next)==null?void 0:je.kind}' instead.`}),C=C.next,j()}function Y(){z.assert((C==null?void 0:C.kind)==="class-element","Incorrect value for top.kind.",()=>`Expected top.kind to be 'class-element' but got '${C==null?void 0:C.kind}' instead.`),C={kind:"name",next:C},j()}function ue(){z.assert((C==null?void 0:C.kind)==="name","Incorrect value for top.kind.",()=>`Expected top.kind to be 'name' but got '${C==null?void 0:C.kind}' instead.`),C=C.next,j()}function te(){(C==null?void 0:C.kind)==="other"?(z.assert(!N),C.depth++):(C={kind:"other",next:C,depth:0,savedPendingExpressions:N},N=void 0,j())}function Se(){z.assert((C==null?void 0:C.kind)==="other","Incorrect value for top.kind.",()=>`Expected top.kind to be 'other' but got '${C==null?void 0:C.kind}' instead.`),C.depth>0?(z.assert(!N),C.depth--):(N=C.savedPendingExpressions,C=C.next,j())}function oe(le){return!!(le.transformFlags&33554432)||!!T&&!!(le.transformFlags&16384)||!!T&&!!E&&!!(le.transformFlags&134217728)}function pe(le){if(!oe(le))return le;switch(le.kind){case 170:return z.fail("Use `modifierVisitor` instead.");case 263:return Le(le);case 231:return et(le);case 176:case 172:case 175:return z.fail("Not supported outside of a class. Use 'classElementVisitor' instead.");case 169:return bn(le);case 226:return Hi(le,!1);case 303:return Ko(le);case 260:return ot(le);case 208:return hi(le);case 277:return St(le);case 110:return ft(le);case 248:return Rn(le);case 244:return bs(le);case 355:return Wo(le,!1);case 217:return Ot(le,!1);case 354:return xe(le);case 213:return Ht(le);case 215:return Oi(le);case 224:case 225:return Hs(le,!1);case 211:return Ji(le);case 212:return Ui(le);case 167:return Cn(le);case 174:case 178:case 177:case 218:case 262:{te();const je=cn(le,ye,t);return Se(),je}default:return cn(le,ye,t)}}function ye(le){switch(le.kind){case 170:return;default:return pe(le)}}function be(le){switch(le.kind){case 170:return;default:return le}}function _e(le){switch(le.kind){case 176:return Ue(le);case 174:return nt(le);case 177:return ze(le);case 178:return st(le);case 172:return Et(le);case 175:return xt(le);default:return pe(le)}}function ve(le){switch(le.kind){case 224:case 225:return Hs(le,!0);case 226:return Hi(le,!0);case 355:return Wo(le,!0);case 217:return Ot(le,!0);default:return pe(le)}}function Ee(le){let je=le.name&<(le.name)&&!jc(le.name)?dr(le.name):le.name&&Vs(le.name)&&!jc(le.name)?dr(le.name).slice(1):le.name&&ja(le.name)&&wp(le.name.text,99)?le.name.text:ss(le)?"class":"member";return tS(le)&&(je=`get_${je}`),Ev(le)&&(je=`set_${je}`),le.name&&Vs(le.name)&&(je=`private_${je}`),da(le)&&(je=`static_${je}`),"_"+je}function ke(le,je){return r.createUniqueName(`${Ee(le)}_${je}`,24)}function Fe(le,je){return r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(le,void 0,void 0,je)],1))}function Oe(le){const je=r.createUniqueName("_metadata",48);let de,tt,Ae=!1,Ke=!1,Qt=!1,ni,fi,Gi;if(O6(!1,le)){const fn=Rt(le.members,kn=>(Fh(kn)||O_(kn))&&_d(kn));ni=r.createUniqueName("_classThis",fn?24:48)}for(const fn of le.members){if(WL(fn)&&uW(!1,fn,le))if(_d(fn)){if(!tt){tt=r.createUniqueName("_staticExtraInitializers",48);const kn=a().createRunInitializersHelper(ni??r.createThis(),tt);$a(kn,le.name??zb(le)),fi??(fi=[]),fi.push(kn)}}else{if(!de){de=r.createUniqueName("_instanceExtraInitializers",48);const kn=a().createRunInitializersHelper(r.createThis(),de);$a(kn,le.name??zb(le)),Gi??(Gi=[]),Gi.push(kn)}de??(de=r.createUniqueName("_instanceExtraInitializers",48))}if(bu(fn)?zP(fn)||(Ae=!0):To(fn)&&(_d(fn)?Ae||(Ae=!!fn.initializer||dg(fn)):Ke||(Ke=!Hse(fn))),(Fh(fn)||O_(fn))&&_d(fn)&&(Qt=!0),tt&&de&&Ae&&Ke&&Qt)break}return{class:le,classThis:ni,metadataReference:je,instanceMethodExtraInitializersName:de,staticMethodExtraInitializersName:tt,hasStaticInitializers:Ae,hasNonAmbientInstanceFields:Ke,hasStaticPrivateClassElements:Qt,pendingStaticInitializers:fi,pendingInstanceInitializers:Gi}}function fe(le){u(),!cce(le)&&oS(!1,le)&&(le=zK(t,le,r.createStringLiteral("")));const je=r.getLocalName(le,!1,!1,!0),de=Oe(le),tt=[];let Ae,Ke,Qt,ni,fi=!1;const Gi=Je(oce(le));Gi&&(de.classDecoratorsName=r.createUniqueName("_classDecorators",48),de.classDescriptorName=r.createUniqueName("_classDescriptor",48),de.classExtraInitializersName=r.createUniqueName("_classExtraInitializers",48),z.assertIsDefined(de.classThis),tt.push(Fe(de.classDecoratorsName,r.createArrayLiteralExpression(Gi)),Fe(de.classDescriptorName),Fe(de.classExtraInitializersName,r.createArrayLiteralExpression()),Fe(de.classThis)),de.hasStaticPrivateClassElements&&(fi=!0,R=!0));const fn=NW(le.heritageClauses,96),kn=fn&&lu(fn.types),or=kn&&Ct(kn.expression,pe,Ut);if(or){de.classSuper=r.createUniqueName("_classSuper",48);const $i=ld(or),Tn=wd($i)&&!$i.name||gc($i)&&!$i.name||Dc($i)?r.createComma(r.createNumericLiteral(0),or):or;tt.push(Fe(de.classSuper,Tn));const ki=r.updateExpressionWithTypeArguments(kn,de.classSuper,void 0),zo=r.updateHeritageClause(fn,[ki]);ni=r.createNodeArray([zo])}const rn=de.classThis??r.createThis();U(de),Ae=xi(Ae,ce(de.metadataReference,de.classSuper));let _r=le.members;if(_r=wn(_r,$i=>fu($i)?$i:_e($i),Vd),_r=wn(_r,$i=>fu($i)?_e($i):$i,Vd),N){let $i;for(let Tn of N){Tn=Ct(Tn,function zo(Sl){if(!(Sl.transformFlags&16384))return Sl;switch(Sl.kind){case 110:return $i||($i=r.createUniqueName("_outerThis",16),tt.unshift(Fe($i,r.createThis()))),$i;default:return cn(Sl,zo,t)}},Ut);const ki=r.createExpressionStatement(Tn);Ae=xi(Ae,ki)}N=void 0}if(q(),Rt(de.pendingInstanceInitializers)&&!Gy(le)){const $i=He(le,de);if($i){const Tn=Pv(le),ki=!!(Tn&&ld(Tn.expression).kind!==106),zo=[];if(ki){const Rl=r.createSpreadElement(r.createIdentifier("arguments")),zl=r.createCallExpression(r.createSuper(),void 0,[Rl]);zo.push(r.createExpressionStatement(zl))}un(zo,$i);const Sl=r.createBlock(zo,!0);Qt=r.createConstructorDeclaration(void 0,[],Sl)}}if(de.staticMethodExtraInitializersName&&tt.push(Fe(de.staticMethodExtraInitializersName,r.createArrayLiteralExpression())),de.instanceMethodExtraInitializersName&&tt.push(Fe(de.instanceMethodExtraInitializersName,r.createArrayLiteralExpression())),de.memberInfos&&hf(de.memberInfos,($i,Tn)=>{da(Tn)&&(tt.push(Fe($i.memberDecoratorsName)),$i.memberInitializersName&&tt.push(Fe($i.memberInitializersName,r.createArrayLiteralExpression())),$i.memberExtraInitializersName&&tt.push(Fe($i.memberExtraInitializersName,r.createArrayLiteralExpression())),$i.memberDescriptorName&&tt.push(Fe($i.memberDescriptorName)))}),de.memberInfos&&hf(de.memberInfos,($i,Tn)=>{da(Tn)||(tt.push(Fe($i.memberDecoratorsName)),$i.memberInitializersName&&tt.push(Fe($i.memberInitializersName,r.createArrayLiteralExpression())),$i.memberExtraInitializersName&&tt.push(Fe($i.memberExtraInitializersName,r.createArrayLiteralExpression())),$i.memberDescriptorName&&tt.push(Fe($i.memberDescriptorName)))}),Ae=un(Ae,de.staticNonFieldDecorationStatements),Ae=un(Ae,de.nonStaticNonFieldDecorationStatements),Ae=un(Ae,de.staticFieldDecorationStatements),Ae=un(Ae,de.nonStaticFieldDecorationStatements),de.classDescriptorName&&de.classDecoratorsName&&de.classExtraInitializersName&&de.classThis){Ae??(Ae=[]);const $i=r.createPropertyAssignment("value",rn),Tn=r.createObjectLiteralExpression([$i]),ki=r.createAssignment(de.classDescriptorName,Tn),zo=r.createPropertyAccessExpression(rn,"name"),Sl=a().createESDecorateHelper(r.createNull(),ki,de.classDecoratorsName,{kind:"class",name:zo,metadata:de.metadataReference},r.createNull(),de.classExtraInitializersName),Rl=r.createExpressionStatement(Sl);$a(Rl,zb(le)),Ae.push(Rl);const zl=r.createPropertyAccessExpression(de.classDescriptorName,"value"),co=r.createAssignment(de.classThis,zl),ca=r.createAssignment(je,co);Ae.push(r.createExpressionStatement(ca))}if(Ae.push(ut(rn,de.metadataReference)),Rt(de.pendingStaticInitializers)){for(const $i of de.pendingStaticInitializers){const Tn=r.createExpressionStatement($i);$a(Tn,_S($i)),Ke=xi(Ke,Tn)}de.pendingStaticInitializers=void 0}if(de.classExtraInitializersName){const $i=a().createRunInitializersHelper(rn,de.classExtraInitializersName),Tn=r.createExpressionStatement($i);$a(Tn,le.name??zb(le)),Ke=xi(Ke,Tn)}Ae&&Ke&&!de.hasStaticInitializers&&(un(Ae,Ke),Ke=void 0);const Fs=Ae&&r.createClassStaticBlockDeclaration(r.createBlock(Ae,!0));Fs&&fi&&sV(Fs,32);const to=Ke&&r.createClassStaticBlockDeclaration(r.createBlock(Ke,!0));if(Fs||Qt||to){const $i=[],Tn=_r.findIndex(zP);Fs?(un($i,_r,0,Tn+1),$i.push(Fs),un($i,_r,Tn+1)):un($i,_r),Qt&&$i.push(Qt),to&&$i.push(to),_r=zt(r.createNodeArray($i),_r)}const Ar=h();let is;if(Gi){is=r.createClassExpression(void 0,void 0,void 0,ni,_r),de.classThis&&(is=uEe(r,is,de.classThis));const $i=r.createVariableDeclaration(je,void 0,void 0,is),Tn=r.createVariableDeclarationList([$i]),ki=de.classThis?r.createAssignment(je,de.classThis):je;tt.push(r.createVariableStatement(void 0,Tn),r.createReturnStatement(ki))}else is=r.createClassExpression(void 0,le.name,void 0,ni,_r),tt.push(r.createReturnStatement(is));if(fi){gP(is,32);for(const $i of is.members)(Fh($i)||O_($i))&&_d($i)&&gP($i,32)}return Er(is,le),r.createImmediatelyInvokedArrowFunction(r.mergeLexicalEnvironment(tt,Ar))}function Ie(le){return oS(!1,le)||b8(!1,le)}function Le(le){if(Ie(le)){const je=[],de=uu(le,ss)??le,tt=de.name?r.createStringLiteralFromNode(de.name):r.createStringLiteral("default"),Ae=Kr(le,32),Ke=Kr(le,2048);if(le.name||(le=zK(t,le,tt)),Ae&&Ke){const Qt=fe(le);if(le.name){const ni=r.createVariableDeclaration(r.getLocalName(le),void 0,void 0,Qt);Er(ni,le);const fi=r.createVariableDeclarationList([ni],1),Gi=r.createVariableStatement(void 0,fi);je.push(Gi);const fn=r.createExportDefault(r.getDeclarationName(le));Er(fn,le),Sd(fn,Vv(le)),$a(fn,zb(le)),je.push(fn)}else{const ni=r.createExportDefault(Qt);Er(ni,le),Sd(ni,Vv(le)),$a(ni,zb(le)),je.push(ni)}}else{z.assertIsDefined(le.name,"A class declaration that is not a default export must have a name.");const Qt=fe(le),ni=Ae?rn=>SP(rn)?void 0:be(rn):be,fi=wn(le.modifiers,ni,Ra),Gi=r.getLocalName(le,!1,!0),fn=r.createVariableDeclaration(Gi,void 0,void 0,Qt);Er(fn,le);const kn=r.createVariableDeclarationList([fn],1),or=r.createVariableStatement(fi,kn);if(Er(or,le),Sd(or,Vv(le)),je.push(or),Ae){const rn=r.createExternalModuleExport(Gi);Er(rn,le),je.push(rn)}}return ag(je)}else{const je=wn(le.modifiers,be,Ra),de=wn(le.heritageClauses,pe,Lp);U(void 0);const tt=wn(le.members,_e,Vd);return q(),r.updateClassDeclaration(le,je,le.name,void 0,de,tt)}}function et(le){if(Ie(le)){const je=fe(le);return Er(je,le),je}else{const je=wn(le.modifiers,be,Ra),de=wn(le.heritageClauses,pe,Lp);U(void 0);const tt=wn(le.members,_e,Vd);return q(),r.updateClassExpression(le,je,le.name,void 0,de,tt)}}function He(le,je){if(Rt(je.pendingInstanceInitializers)){const de=[];return de.push(r.createExpressionStatement(r.inlineExpressions(je.pendingInstanceInitializers))),je.pendingInstanceInitializers=void 0,de}}function We(le,je,de,tt,Ae,Ke){const Qt=tt[Ae],ni=je[Qt];if(un(le,wn(je,pe,Es,de,Qt-de)),gI(ni)){const fi=[];We(fi,ni.tryBlock.statements,0,tt,Ae+1,Ke);const Gi=r.createNodeArray(fi);zt(Gi,ni.tryBlock.statements),le.push(r.updateTryStatement(ni,r.updateBlock(ni.tryBlock,fi),Ct(ni.catchClause,pe,YT),Ct(ni.finallyBlock,pe,Ho)))}else un(le,wn(je,pe,Es,Qt,1)),un(le,Ke);un(le,wn(je,pe,Es,Qt+1))}function Ue(le){Q(le);const je=wn(le.modifiers,be,Ra),de=wn(le.parameters,pe,Gs);let tt;if(le.body&&b){const Ae=He(b.class,b);if(Ae){const Ke=[],Qt=r.copyPrologue(le.body.statements,Ke,!1,pe),ni=WK(le.body.statements,Qt);ni.length>0?We(Ke,le.body.statements,Qt,ni,0,Ae):(un(Ke,Ae),un(Ke,wn(le.body.statements,pe,Es))),tt=r.createBlock(Ke,!0),Er(tt,le.body),zt(tt,le.body)}}return tt??(tt=Ct(le.body,pe,Ho)),re(),r.updateConstructorDeclaration(le,je,de,tt)}function Ye(le,je){return le!==je&&(Sd(le,je),$a(le,zb(je))),le}function wt(le,je,de){let tt,Ae,Ke,Qt,ni,fi;if(!je){const kn=wn(le.modifiers,be,Ra);return Y(),Ae=Fo(le.name),ue(),{modifiers:kn,referencedName:tt,name:Ae,initializersName:Ke,descriptorName:fi,thisArg:ni}}const Gi=Je(HK(le,je.class,!1)),fn=wn(le.modifiers,be,Ra);if(Gi){const kn=ke(le,"decorators"),or=r.createArrayLiteralExpression(Gi),rn=r.createAssignment(kn,or),_r={memberDecoratorsName:kn};je.memberInfos??(je.memberInfos=new Map),je.memberInfos.set(le,_r),N??(N=[]),N.push(rn);const Fs=WL(le)||O_(le)?da(le)?je.staticNonFieldDecorationStatements??(je.staticNonFieldDecorationStatements=[]):je.nonStaticNonFieldDecorationStatements??(je.nonStaticNonFieldDecorationStatements=[]):To(le)&&!O_(le)?da(le)?je.staticFieldDecorationStatements??(je.staticFieldDecorationStatements=[]):je.nonStaticFieldDecorationStatements??(je.nonStaticFieldDecorationStatements=[]):z.fail(),to=hg(le)?"getter":Np(le)?"setter":Au(le)?"method":O_(le)?"accessor":To(le)?"field":z.fail();let Ar;if(lt(le.name)||Vs(le.name))Ar={computed:!1,name:le.name};else if(Av(le.name))Ar={computed:!0,name:r.createStringLiteralFromNode(le.name)};else{const $i=le.name.expression;Av($i)&&!lt($i)?Ar={computed:!0,name:r.createStringLiteralFromNode($i)}:(Y(),{referencedName:tt,name:Ae}=ts(le.name),Ar={computed:!0,name:tt},ue())}const is={kind:to,name:Ar,static:da(le),private:Vs(le.name),access:{get:To(le)||hg(le)||Au(le),set:To(le)||Np(le)},metadata:je.metadataReference};if(WL(le)){const $i=da(le)?je.staticMethodExtraInitializersName:je.instanceMethodExtraInitializersName;z.assertIsDefined($i);let Tn;Fh(le)&&de&&(Tn=de(le,wn(fn,Sl=>$r(Sl,d7),Ra)),_r.memberDescriptorName=fi=ke(le,"descriptor"),Tn=r.createAssignment(fi,Tn));const ki=a().createESDecorateHelper(r.createThis(),Tn??r.createNull(),kn,is,r.createNull(),$i),zo=r.createExpressionStatement(ki);$a(zo,zb(le)),Fs.push(zo)}else if(To(le)){Ke=_r.memberInitializersName??(_r.memberInitializersName=ke(le,"initializers")),Qt=_r.memberExtraInitializersName??(_r.memberExtraInitializersName=ke(le,"extraInitializers")),da(le)&&(ni=je.classThis);let $i;Fh(le)&&Mv(le)&&de&&($i=de(le,void 0),_r.memberDescriptorName=fi=ke(le,"descriptor"),$i=r.createAssignment(fi,$i));const Tn=a().createESDecorateHelper(O_(le)?r.createThis():r.createNull(),$i??r.createNull(),kn,is,Ke,Qt),ki=r.createExpressionStatement(Tn);$a(ki,zb(le)),Fs.push(ki)}}return Ae===void 0&&(Y(),Ae=Fo(le.name),ue()),!Rt(fn)&&(Au(le)||To(le))&&ir(Ae,1024),{modifiers:fn,referencedName:tt,name:Ae,initializersName:Ke,extraInitializersName:Qt,descriptorName:fi,thisArg:ni}}function nt(le){Q(le);const{modifiers:je,name:de,descriptorName:tt}=wt(le,b,Ci);if(tt)return re(),Ye(ii(je,de,tt),le);{const Ae=wn(le.parameters,pe,Gs),Ke=Ct(le.body,pe,Ho);return re(),Ye(r.updateMethodDeclaration(le,je,le.asteriskToken,de,void 0,void 0,Ae,void 0,Ke),le)}}function ze(le){Q(le);const{modifiers:je,name:de,descriptorName:tt}=wt(le,b,$e);if(tt)return re(),Ye(Gt(je,de,tt),le);{const Ae=wn(le.parameters,pe,Gs),Ke=Ct(le.body,pe,Ho);return re(),Ye(r.updateGetAccessorDeclaration(le,je,de,Ae,void 0,Ke),le)}}function st(le){Q(le);const{modifiers:je,name:de,descriptorName:tt}=wt(le,b,qt);if(tt)return re(),Ye(wi(je,de,tt),le);{const Ae=wn(le.parameters,pe,Gs),Ke=Ct(le.body,pe,Ho);return re(),Ye(r.updateSetAccessorDeclaration(le,je,de,Ae,Ke),le)}}function xt(le){Q(le);let je;if(zP(le))je=cn(le,pe,t);else if(z7(le)){const de=T;T=void 0,je=cn(le,pe,t),T=de}else if(le=cn(le,pe,t),je=le,b&&(b.hasStaticInitializers=!0,Rt(b.pendingStaticInitializers))){const de=[];for(const Ke of b.pendingStaticInitializers){const Qt=r.createExpressionStatement(Ke);$a(Qt,_S(Ke)),de.push(Qt)}const tt=r.createBlock(de,!0);je=[r.createClassStaticBlockDeclaration(tt),je],b.pendingStaticInitializers=void 0}return re(),je}function Et(le){Tp(le,Mi)&&(le=Pp(t,le,Ai(le.initializer))),Q(le),z.assert(!Hse(le),"Not yet implemented.");const{modifiers:je,name:de,initializersName:tt,extraInitializersName:Ae,descriptorName:Ke,thisArg:Qt}=wt(le,b,Mv(le)?$t:void 0);u();let ni=Ct(le.initializer,pe,Ut);tt&&(ni=a().createRunInitializersHelper(Qt??r.createThis(),tt,ni??r.createVoidZero())),da(le)&&b&&ni&&(b.hasStaticInitializers=!0);const fi=h();if(Rt(fi)&&(ni=r.createImmediatelyInvokedArrowFunction([...fi,r.createReturnStatement(ni)])),b&&(da(le)?(ni=mt(b,!0,ni),Ae&&(b.pendingStaticInitializers??(b.pendingStaticInitializers=[]),b.pendingStaticInitializers.push(a().createRunInitializersHelper(b.classThis??r.createThis(),Ae)))):(ni=mt(b,!1,ni),Ae&&(b.pendingInstanceInitializers??(b.pendingInstanceInitializers=[]),b.pendingInstanceInitializers.push(a().createRunInitializersHelper(r.createThis(),Ae))))),re(),Mv(le)&&Ke){const Gi=Vv(le),fn=_S(le),kn=le.name;let or=kn,rn=kn;if(Ja(kn)&&!z1(kn.expression)){const is=sK(kn);if(is)or=r.updateComputedPropertyName(kn,Ct(kn.expression,pe,Ut)),rn=r.updateComputedPropertyName(kn,is.left);else{const $i=r.createTempVariable(p);$a($i,kn.expression);const Tn=Ct(kn.expression,pe,Ut),ki=r.createAssignment($i,Tn);$a(ki,kn.expression),or=r.updateComputedPropertyName(kn,ki),rn=r.updateComputedPropertyName(kn,$i)}}const _r=wn(je,is=>is.kind!==129?is:void 0,Ra),Fs=rle(r,le,_r,ni);Er(Fs,le),ir(Fs,3072),$a(Fs,fn),$a(Fs.name,le.name);const to=Gt(_r,or,Ke);Er(to,le),Sd(to,Gi),$a(to,fn);const Ar=wi(_r,rn,Ke);return Er(Ar,le),ir(Ar,3072),$a(Ar,fn),[Fs,to,Ar]}return Ye(r.updatePropertyDeclaration(le,je,de,void 0,void 0,ni),le)}function ft(le){return T??le}function Ht(le){if(R_(le.expression)&&T){const je=Ct(le.expression,pe,Ut),de=wn(le.arguments,pe,Ut),tt=r.createFunctionCallCall(je,T,de);return Er(tt,le),zt(tt,le),tt}return cn(le,pe,t)}function Oi(le){if(R_(le.tag)&&T){const je=Ct(le.tag,pe,Ut),de=r.createFunctionBindCall(je,T,[]);Er(de,le),zt(de,le);const tt=Ct(le.template,pe,VL);return r.updateTaggedTemplateExpression(le,de,void 0,tt)}return cn(le,pe,t)}function Ji(le){if(R_(le)&<(le.name)&&T&&E){const je=r.createStringLiteralFromNode(le.name),de=r.createReflectGetCall(E,je,T);return Er(de,le.expression),zt(de,le.expression),de}return cn(le,pe,t)}function Ui(le){if(R_(le)&&T&&E){const je=Ct(le.argumentExpression,pe,Ut),de=r.createReflectGetCall(E,je,T);return Er(de,le.expression),zt(de,le.expression),de}return cn(le,pe,t)}function bn(le){Tp(le,Mi)&&(le=Pp(t,le,Ai(le.initializer)));const je=r.updateParameterDeclaration(le,void 0,le.dotDotDotToken,Ct(le.name,pe,YE),void 0,void 0,Ct(le.initializer,pe,Ut));return je!==le&&(Sd(je,le),zt(je,Fv(le)),$a(je,Fv(le)),ir(je.name,64)),je}function Mi(le){return wd(le)&&!le.name&&Ie(le)}function Ai(le){const je=ld(le);return wd(je)&&!je.name&&!oS(!1,je)}function Rn(le){return r.updateForStatement(le,Ct(le.initializer,ve,$g),Ct(le.condition,pe,Ut),Ct(le.incrementor,ve,Ut),v_(le.statement,pe,t))}function bs(le){return cn(le,ve,t)}function Hi(le,je){if(dS(le)){const de=fl(le.left),tt=Ct(le.right,pe,Ut);return r.updateBinaryExpression(le,de,le.operatorToken,tt)}if(Yd(le)){if(Tp(le,Mi))return le=Pp(t,le,Ai(le.right)),cn(le,pe,t);if(R_(le.left)&&T&&E){let de=wc(le.left)?Ct(le.left.argumentExpression,pe,Ut):lt(le.left.name)?r.createStringLiteralFromNode(le.left.name):void 0;if(de){let tt=Ct(le.right,pe,Ut);if(V7(le.operatorToken.kind)){let Ke=de;z1(de)||(Ke=r.createTempVariable(p),de=r.createAssignment(Ke,de));const Qt=r.createReflectGetCall(E,Ke,T);Er(Qt,le.left),zt(Qt,le.left),tt=r.createBinaryExpression(Qt,H7(le.operatorToken.kind),tt),zt(tt,le)}const Ae=je?void 0:r.createTempVariable(p);return Ae&&(tt=r.createAssignment(Ae,tt),zt(Ae,le)),tt=r.createReflectSetCall(E,de,tt,T),Er(tt,le),zt(tt,le),Ae&&(tt=r.createComma(tt,Ae),zt(tt,le)),tt}}}if(le.operatorToken.kind===28){const de=Ct(le.left,ve,Ut),tt=Ct(le.right,je?ve:pe,Ut);return r.updateBinaryExpression(le,de,le.operatorToken,tt)}return cn(le,pe,t)}function Hs(le,je){if(le.operator===46||le.operator===47){const de=Il(le.operand);if(R_(de)&&T&&E){let tt=wc(de)?Ct(de.argumentExpression,pe,Ut):lt(de.name)?r.createStringLiteralFromNode(de.name):void 0;if(tt){let Ae=tt;z1(tt)||(Ae=r.createTempVariable(p),tt=r.createAssignment(Ae,tt));let Ke=r.createReflectGetCall(E,Ae,T);Er(Ke,le),zt(Ke,le);const Qt=je?void 0:r.createTempVariable(p);return Ke=ZG(r,le,Ke,p,Qt),Ke=r.createReflectSetCall(E,tt,Ke,T),Er(Ke,le),zt(Ke,le),Qt&&(Ke=r.createComma(Ke,Qt),zt(Ke,le)),Ke}}}return cn(le,pe,t)}function Wo(le,je){const de=je?RK(le.elements,ve):RK(le.elements,pe,ve);return r.updateCommaListExpression(le,de)}function ts(le){if(Av(le)||Vs(le)){const Ke=r.createStringLiteralFromNode(le),Qt=Ct(le,pe,od);return{referencedName:Ke,name:Qt}}if(Av(le.expression)&&!lt(le.expression)){const Ke=r.createStringLiteralFromNode(le.expression),Qt=Ct(le,pe,od);return{referencedName:Ke,name:Qt}}const je=r.getGeneratedNameForNode(le);p(je);const de=a().createPropKeyHelper(Ct(le.expression,pe,Ut)),tt=r.createAssignment(je,de),Ae=r.updateComputedPropertyName(le,Re(tt));return{referencedName:je,name:Ae}}function Fo(le){return Ja(le)?Cn(le):Ct(le,pe,od)}function Cn(le){let je=Ct(le.expression,pe,Ut);return z1(je)||(je=Re(je)),r.updateComputedPropertyName(le,je)}function Ko(le){return Tp(le,Mi)&&(le=Pp(t,le,Ai(le.initializer))),cn(le,pe,t)}function ot(le){return Tp(le,Mi)&&(le=Pp(t,le,Ai(le.initializer))),cn(le,pe,t)}function hi(le){return Tp(le,Mi)&&(le=Pp(t,le,Ai(le.initializer))),cn(le,pe,t)}function hn(le){if(Pa(le)||Rf(le))return fl(le);if(R_(le)&&T&&E){const je=wc(le)?Ct(le.argumentExpression,pe,Ut):lt(le.name)?r.createStringLiteralFromNode(le.name):void 0;if(je){const de=r.createTempVariable(void 0),tt=r.createAssignmentTargetWrapper(de,r.createReflectSetCall(E,je,de,T));return Er(tt,le),zt(tt,le),tt}}return cn(le,pe,t)}function lr(le){if(Yd(le,!0)){Tp(le,Mi)&&(le=Pp(t,le,Ai(le.right)));const je=hn(le.left),de=Ct(le.right,pe,Ut);return r.updateBinaryExpression(le,je,le.operatorToken,de)}else return hn(le)}function as(le){if(M_(le.expression)){const je=hn(le.expression);return r.updateSpreadElement(le,je)}return cn(le,pe,t)}function fs(le){return z.assertNode(le,jB),Zg(le)?as(le):zd(le)?cn(le,pe,t):lr(le)}function Ds(le){const je=Ct(le.name,pe,od);if(Yd(le.initializer,!0)){const de=lr(le.initializer);return r.updatePropertyAssignment(le,je,de)}if(M_(le.initializer)){const de=hn(le.initializer);return r.updatePropertyAssignment(le,je,de)}return cn(le,pe,t)}function ha(le){return Tp(le,Mi)&&(le=Pp(t,le,Ai(le.objectAssignmentInitializer))),cn(le,pe,t)}function Yo(le){if(M_(le.expression)){const je=hn(le.expression);return r.updateSpreadAssignment(le,je)}return cn(le,pe,t)}function ji(le){return z.assertNode(le,HB),ib(le)?Yo(le):ih(le)?ha(le):pd(le)?Ds(le):cn(le,pe,t)}function fl(le){if(Rf(le)){const je=wn(le.elements,fs,Ut);return r.updateArrayLiteralExpression(le,je)}else{const je=wn(le.properties,ji,Fb);return r.updateObjectLiteralExpression(le,je)}}function St(le){return Tp(le,Mi)&&(le=Pp(t,le,Ai(le.expression))),cn(le,pe,t)}function Ot(le,je){const de=je?ve:pe,tt=Ct(le.expression,de,Ut);return r.updateParenthesizedExpression(le,tt)}function xe(le,je){const de=pe,tt=Ct(le.expression,de,Ut);return r.updatePartiallyEmittedExpression(le,tt)}function Pt(le,je){return Rt(le)&&(je?g_(je)?(le.push(je.expression),je=r.updateParenthesizedExpression(je,r.inlineExpressions(le))):(le.push(je),je=r.inlineExpressions(le)):je=r.inlineExpressions(le)),je}function Re(le){const je=Pt(N,le);return z.assertIsDefined(je),je!==le&&(N=void 0),je}function mt(le,je,de){const tt=Pt(je?le.pendingStaticInitializers:le.pendingInstanceInitializers,de);return tt!==de&&(je?le.pendingStaticInitializers=void 0:le.pendingInstanceInitializers=void 0),tt}function Je(le){if(!le)return;const je=[];return un(je,Yt(le.decorators,pt)),je}function pt(le){const je=Ct(le.expression,pe,Ut);ir(je,3072);const de=ld(je);if(Sc(de)){const{target:tt,thisArg:Ae}=r.createCallBinding(je,p,m,!0);return r.restoreOuterExpressions(je,r.createFunctionBindCall(tt,Ae,[]))}return je}function kt(le,je,de,tt,Ae,Ke,Qt){const ni=r.createFunctionExpression(de,tt,void 0,void 0,Ke,void 0,Qt??r.createBlock([]));Er(ni,le),$a(ni,zb(le)),ir(ni,3072);const fi=Ae==="get"||Ae==="set"?Ae:void 0,Gi=r.createStringLiteralFromNode(je,void 0),fn=a().createSetFunctionNameHelper(ni,Gi,fi),kn=r.createPropertyAssignment(r.createIdentifier(Ae),fn);return Er(kn,le),$a(kn,zb(le)),ir(kn,3072),kn}function Ci(le,je){return r.createObjectLiteralExpression([kt(le,le.name,je,le.asteriskToken,"value",wn(le.parameters,pe,Gs),Ct(le.body,pe,Ho))])}function $e(le,je){return r.createObjectLiteralExpression([kt(le,le.name,je,void 0,"get",[],Ct(le.body,pe,Ho))])}function qt(le,je){return r.createObjectLiteralExpression([kt(le,le.name,je,void 0,"set",wn(le.parameters,pe,Gs),Ct(le.body,pe,Ho))])}function $t(le,je){return r.createObjectLiteralExpression([kt(le,le.name,je,void 0,"get",[],r.createBlock([r.createReturnStatement(r.createPropertyAccessExpression(r.createThis(),r.getGeneratedPrivateNameForNode(le.name)))])),kt(le,le.name,je,void 0,"set",[r.createParameterDeclaration(void 0,void 0,"value")],r.createBlock([r.createExpressionStatement(r.createAssignment(r.createPropertyAccessExpression(r.createThis(),r.getGeneratedPrivateNameForNode(le.name)),r.createIdentifier("value")))]))])}function ii(le,je,de){return le=wn(le,tt=>wP(tt)?tt:void 0,Ra),r.createGetAccessorDeclaration(le,je,[],void 0,r.createBlock([r.createReturnStatement(r.createPropertyAccessExpression(de,r.createIdentifier("value")))]))}function Gt(le,je,de){return le=wn(le,tt=>wP(tt)?tt:void 0,Ra),r.createGetAccessorDeclaration(le,je,[],void 0,r.createBlock([r.createReturnStatement(r.createFunctionCallCall(r.createPropertyAccessExpression(de,r.createIdentifier("get")),r.createThis(),[]))]))}function wi(le,je,de){return le=wn(le,tt=>wP(tt)?tt:void 0,Ra),r.createSetAccessorDeclaration(le,je,[r.createParameterDeclaration(void 0,void 0,"value")],r.createBlock([r.createReturnStatement(r.createFunctionCallCall(r.createPropertyAccessExpression(de,r.createIdentifier("set")),r.createThis(),[r.createIdentifier("value")]))]))}function ce(le,je){const de=r.createVariableDeclaration(le,void 0,void 0,r.createConditionalExpression(r.createLogicalAnd(r.createTypeCheck(r.createIdentifier("Symbol"),"function"),r.createPropertyAccessExpression(r.createIdentifier("Symbol"),"metadata")),r.createToken(58),r.createCallExpression(r.createPropertyAccessExpression(r.createIdentifier("Object"),"create"),void 0,[je?Bt(je):r.createNull()]),r.createToken(59),r.createVoidZero()));return r.createVariableStatement(void 0,r.createVariableDeclarationList([de],2))}function ut(le,je){const de=r.createObjectDefinePropertyCall(le,r.createPropertyAccessExpression(r.createIdentifier("Symbol"),"metadata"),r.createPropertyDescriptor({configurable:!0,writable:!0,enumerable:!0,value:je},!0));return ir(r.createIfStatement(je,r.createExpressionStatement(de)),1)}function Bt(le){return r.createBinaryExpression(r.createElementAccessExpression(le,r.createPropertyAccessExpression(r.createIdentifier("Symbol"),"metadata")),61,r.createNull())}}function bEe(t){const{factory:r,getEmitHelperFactory:a,resumeLexicalEnvironment:u,endLexicalEnvironment:h,hoistVariableDeclaration:p}=t,m=t.getEmitResolver(),C=t.getCompilerOptions(),b=il(C);let T,E=0,N,R,F,j;const U=[];let q=0;const Q=t.onEmitNode,re=t.onSubstituteNode;return t.onEmitNode=bs,t.onSubstituteNode=Hi,Q0(t,Y);function Y(ot){if(ot.isDeclarationFile)return ot;ue(1,!1),ue(2,!Vse(ot,C));const hi=cn(ot,_e,t);return Jb(hi,t.readEmitHelpers()),hi}function ue(ot,hi){q=hi?q|ot:q&~ot}function te(ot){return(q&ot)!==0}function Se(){return!te(1)}function oe(){return te(2)}function pe(ot,hi,hn){const lr=ot&~q;if(lr){ue(lr,!0);const as=hi(hn);return ue(lr,!1),as}return hi(hn)}function ye(ot){return cn(ot,_e,t)}function be(ot){switch(ot.kind){case 218:case 262:case 174:case 177:case 178:case 176:return ot;case 169:case 208:case 260:break;case 80:if(j&&m.isArgumentsLocalBinding(ot))return j;break}return cn(ot,be,t)}function _e(ot){if(!(ot.transformFlags&256))return j?be(ot):ot;switch(ot.kind){case 134:return;case 223:return Ie(ot);case 174:return pe(3,et,ot);case 262:return pe(3,Ue,ot);case 218:return pe(3,Ye,ot);case 219:return pe(1,wt,ot);case 211:return R&&Ir(ot)&&ot.expression.kind===108&&R.add(ot.name.escapedText),cn(ot,_e,t);case 212:return R&&ot.expression.kind===108&&(F=!0),cn(ot,_e,t);case 177:return pe(3,He,ot);case 178:return pe(3,We,ot);case 176:return pe(3,Le,ot);case 263:case 231:return pe(3,ye,ot);default:return cn(ot,_e,t)}}function ve(ot){if(Sxe(ot))switch(ot.kind){case 243:return ke(ot);case 248:return fe(ot);case 249:return Fe(ot);case 250:return Oe(ot);case 299:return Ee(ot);case 241:case 255:case 269:case 296:case 297:case 258:case 246:case 247:case 245:case 254:case 256:return cn(ot,ve,t);default:return z.assertNever(ot,"Unhandled node.")}return _e(ot)}function Ee(ot){const hi=new Set;nt(ot.variableDeclaration,hi);let hn;if(hi.forEach((lr,as)=>{N.has(as)&&(hn||(hn=new Set(N)),hn.delete(as))}),hn){const lr=N;N=hn;const as=cn(ot,ve,t);return N=lr,as}else return cn(ot,ve,t)}function ke(ot){if(ze(ot.declarationList)){const hi=st(ot.declarationList,!1);return hi?r.createExpressionStatement(hi):void 0}return cn(ot,_e,t)}function Fe(ot){return r.updateForInStatement(ot,ze(ot.initializer)?st(ot.initializer,!0):z.checkDefined(Ct(ot.initializer,_e,$g)),z.checkDefined(Ct(ot.expression,_e,Ut)),v_(ot.statement,ve,t))}function Oe(ot){return r.updateForOfStatement(ot,Ct(ot.awaitModifier,_e,Iae),ze(ot.initializer)?st(ot.initializer,!0):z.checkDefined(Ct(ot.initializer,_e,$g)),z.checkDefined(Ct(ot.expression,_e,Ut)),v_(ot.statement,ve,t))}function fe(ot){const hi=ot.initializer;return r.updateForStatement(ot,ze(hi)?st(hi,!1):Ct(ot.initializer,_e,$g),Ct(ot.condition,_e,Ut),Ct(ot.incrementor,_e,Ut),v_(ot.statement,ve,t))}function Ie(ot){return Se()?cn(ot,_e,t):Er(zt(r.createYieldExpression(void 0,Ct(ot.expression,_e,Ut)),ot),ot)}function Le(ot){const hi=j;j=void 0;const hn=r.updateConstructorDeclaration(ot,wn(ot.modifiers,_e,Ra),Su(ot.parameters,_e,t),Oi(ot));return j=hi,hn}function et(ot){let hi;const hn=ad(ot),lr=j;j=void 0;const as=r.updateMethodDeclaration(ot,wn(ot.modifiers,_e,zc),ot.asteriskToken,ot.name,void 0,void 0,hi=hn&2?Ui(ot):Su(ot.parameters,_e,t),void 0,hn&2?bn(ot,hi):Oi(ot));return j=lr,as}function He(ot){const hi=j;j=void 0;const hn=r.updateGetAccessorDeclaration(ot,wn(ot.modifiers,_e,zc),ot.name,Su(ot.parameters,_e,t),void 0,Oi(ot));return j=hi,hn}function We(ot){const hi=j;j=void 0;const hn=r.updateSetAccessorDeclaration(ot,wn(ot.modifiers,_e,zc),ot.name,Su(ot.parameters,_e,t),Oi(ot));return j=hi,hn}function Ue(ot){let hi;const hn=j;j=void 0;const lr=ad(ot),as=r.updateFunctionDeclaration(ot,wn(ot.modifiers,_e,zc),ot.asteriskToken,ot.name,void 0,hi=lr&2?Ui(ot):Su(ot.parameters,_e,t),void 0,lr&2?bn(ot,hi):vg(ot.body,_e,t));return j=hn,as}function Ye(ot){let hi;const hn=j;j=void 0;const lr=ad(ot),as=r.updateFunctionExpression(ot,wn(ot.modifiers,_e,Ra),ot.asteriskToken,ot.name,void 0,hi=lr&2?Ui(ot):Su(ot.parameters,_e,t),void 0,lr&2?bn(ot,hi):vg(ot.body,_e,t));return j=hn,as}function wt(ot){let hi;const hn=ad(ot);return r.updateArrowFunction(ot,wn(ot.modifiers,_e,Ra),void 0,hi=hn&2?Ui(ot):Su(ot.parameters,_e,t),void 0,ot.equalsGreaterThanToken,hn&2?bn(ot,hi):vg(ot.body,_e,t))}function nt({name:ot},hi){if(lt(ot))hi.add(ot.escapedText);else for(const hn of ot.elements)zd(hn)||nt(hn,hi)}function ze(ot){return!!ot&&wf(ot)&&!(ot.flags&7)&&ot.declarations.some(Ht)}function st(ot,hi){xt(ot);const hn=j8(ot);return hn.length===0?hi?Ct(r.converters.convertToAssignmentElementTarget(ot.declarations[0].name),_e,Ut):void 0:r.inlineExpressions(Yt(hn,ft))}function xt(ot){W(ot.declarations,Et)}function Et({name:ot}){if(lt(ot))p(ot);else for(const hi of ot.elements)zd(hi)||Et(hi)}function ft(ot){const hi=$a(r.createAssignment(r.converters.convertToAssignmentElementTarget(ot.name),ot.initializer),ot);return z.checkDefined(Ct(hi,_e,Ut))}function Ht({name:ot}){if(lt(ot))return N.has(ot.escapedText);for(const hi of ot.elements)if(!zd(hi)&&Ht(hi))return!0;return!1}function Oi(ot){z.assertIsDefined(ot.body);const hi=R,hn=F;R=new Set,F=!1;let lr=vg(ot.body,_e,t);const as=uu(ot,rc);if(b>=2&&(m.hasNodeCheckFlag(ot,256)||m.hasNodeCheckFlag(ot,128))&&(ad(as)&3)!==3){if(Rn(),R.size){const Ds=UK(r,m,ot,R);U[Tl(Ds)]=!0;const ha=lr.statements.slice();qy(ha,[Ds]),lr=r.updateBlock(lr,ha)}F&&(m.hasNodeCheckFlag(ot,256)?vP(lr,OG):m.hasNodeCheckFlag(ot,128)&&vP(lr,AG))}return R=hi,F=hn,lr}function Ji(){z.assert(j);const ot=r.createVariableDeclaration(j,void 0,void 0,r.createIdentifier("arguments")),hi=r.createVariableStatement(void 0,[ot]);return mh(hi),Wv(hi,2097152),hi}function Ui(ot){if(VV(ot.parameters))return Su(ot.parameters,_e,t);const hi=[];for(const lr of ot.parameters){if(lr.initializer||lr.dotDotDotToken){if(ot.kind===219){const fs=r.createParameterDeclaration(void 0,r.createToken(26),r.createUniqueName("args",8));hi.push(fs)}break}const as=r.createParameterDeclaration(void 0,void 0,r.getGeneratedNameForNode(lr.name,8));hi.push(as)}const hn=r.createNodeArray(hi);return zt(hn,ot.parameters),hn}function bn(ot,hi){const hn=VV(ot.parameters)?void 0:Su(ot.parameters,_e,t);u();const as=uu(ot,Bo).type,fs=b<2?Ai(as):void 0,Ds=ot.kind===219,ha=j,ji=m.hasNodeCheckFlag(ot,512)&&!j;ji&&(j=r.createUniqueName("arguments"));let fl;if(hn)if(Ds){const Je=[];z.assert(hi.length<=ot.parameters.length);for(let pt=0;pt=2&&(m.hasNodeCheckFlag(ot,256)||m.hasNodeCheckFlag(ot,128));if(pt&&(Rn(),R.size)){const Ci=UK(r,m,ot,R);U[Tl(Ci)]=!0,qy(Je,[Ci])}ji&&qy(Je,[Ji()]);const kt=r.createBlock(Je,!0);zt(kt,ot.body),pt&&F&&(m.hasNodeCheckFlag(ot,256)?vP(kt,OG):m.hasNodeCheckFlag(ot,128)&&vP(kt,AG)),mt=kt}return N=St,Ds||(R=Ot,F=xe,j=ha),mt}function Mi(ot,hi){return Ho(ot)?r.updateBlock(ot,wn(ot.statements,ve,Es,hi)):r.converters.convertToFunctionBlock(z.checkDefined(Ct(ot,ve,H$)))}function Ai(ot){const hi=ot&&lW(ot);if(hi&&A_(hi)){const hn=m.getTypeReferenceSerializationKind(hi);if(hn===1||hn===0)return hi}}function Rn(){T&1||(T|=1,t.enableSubstitution(213),t.enableSubstitution(211),t.enableSubstitution(212),t.enableEmitNotification(263),t.enableEmitNotification(174),t.enableEmitNotification(177),t.enableEmitNotification(178),t.enableEmitNotification(176),t.enableEmitNotification(243))}function bs(ot,hi,hn){if(T&1&&Cn(hi)){const lr=(m.hasNodeCheckFlag(hi,128)?128:0)|(m.hasNodeCheckFlag(hi,256)?256:0);if(lr!==E){const as=E;E=lr,Q(ot,hi,hn),E=as;return}}else if(T&&U[Tl(hi)]){const lr=E;E=0,Q(ot,hi,hn),E=lr;return}Q(ot,hi,hn)}function Hi(ot,hi){return hi=re(ot,hi),ot===1&&E?Hs(hi):hi}function Hs(ot){switch(ot.kind){case 211:return Wo(ot);case 212:return ts(ot);case 213:return Fo(ot)}return ot}function Wo(ot){return ot.expression.kind===108?zt(r.createPropertyAccessExpression(r.createUniqueName("_super",48),ot.name),ot):ot}function ts(ot){return ot.expression.kind===108?Ko(ot.argumentExpression,ot):ot}function Fo(ot){const hi=ot.expression;if(R_(hi)){const hn=Ir(hi)?Wo(hi):ts(hi);return r.createCallExpression(r.createPropertyAccessExpression(hn,"call"),void 0,[r.createThis(),...ot.arguments])}return ot}function Cn(ot){const hi=ot.kind;return hi===263||hi===176||hi===174||hi===177||hi===178}function Ko(ot,hi){return E&256?zt(r.createPropertyAccessExpression(r.createCallExpression(r.createUniqueName("_superIndex",48),void 0,[ot]),"value"),hi):zt(r.createCallExpression(r.createUniqueName("_superIndex",48),void 0,[ot]),hi)}}function UK(t,r,a,u){const h=r.hasNodeCheckFlag(a,256),p=[];return u.forEach((m,C)=>{const b=Ws(C),T=[];T.push(t.createPropertyAssignment("get",t.createArrowFunction(void 0,void 0,[],void 0,void 0,ir(t.createPropertyAccessExpression(ir(t.createSuper(),8),b),8)))),h&&T.push(t.createPropertyAssignment("set",t.createArrowFunction(void 0,void 0,[t.createParameterDeclaration(void 0,void 0,"v",void 0,void 0,void 0)],void 0,void 0,t.createAssignment(ir(t.createPropertyAccessExpression(ir(t.createSuper(),8),b),8),t.createIdentifier("v"))))),p.push(t.createPropertyAssignment(b,t.createObjectLiteralExpression(T)))}),t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(t.createUniqueName("_super",48),void 0,void 0,t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"create"),void 0,[t.createNull(),t.createObjectLiteralExpression(p,!0)]))],2))}function CEe(t){const{factory:r,getEmitHelperFactory:a,resumeLexicalEnvironment:u,endLexicalEnvironment:h,hoistVariableDeclaration:p}=t,m=t.getEmitResolver(),C=t.getCompilerOptions(),b=il(C),T=t.onEmitNode;t.onEmitNode=ha;const E=t.onSubstituteNode;t.onSubstituteNode=Yo;let N=!1,R,F,j,U=0,q=0,Q,re,Y,ue;const te=[];return Q0(t,be);function Se(Re,mt){return q!==(q&~Re|mt)}function oe(Re,mt){const Je=q;return q=(q&~Re|mt)&3,Je}function pe(Re){q=Re}function ye(Re){re=xi(re,r.createVariableDeclaration(Re))}function be(Re){if(Re.isDeclarationFile)return Re;Q=Re;const mt=wt(Re);return Jb(mt,t.readEmitHelpers()),Q=void 0,re=void 0,mt}function _e(Re){return Oe(Re,!1)}function ve(Re){return Oe(Re,!0)}function Ee(Re){if(Re.kind!==134)return Re}function ke(Re,mt,Je,pt){if(Se(Je,pt)){const kt=oe(Je,pt),Ci=Re(mt);return pe(kt),Ci}return Re(mt)}function Fe(Re){return cn(Re,_e,t)}function Oe(Re,mt){if(!(Re.transformFlags&128))return Re;switch(Re.kind){case 223:return fe(Re);case 229:return Ie(Re);case 253:return Le(Re);case 256:return et(Re);case 210:return We(Re);case 226:return ze(Re,mt);case 355:return st(Re,mt);case 299:return xt(Re);case 243:return Et(Re);case 260:return ft(Re);case 246:case 247:case 249:return ke(Fe,Re,0,2);case 250:return Ui(Re,void 0);case 248:return ke(Oi,Re,0,2);case 222:return Ji(Re);case 176:return ke(Wo,Re,2,1);case 174:return ke(Cn,Re,2,1);case 177:return ke(ts,Re,2,1);case 178:return ke(Fo,Re,2,1);case 262:return ke(Ko,Re,2,1);case 218:return ke(hi,Re,2,1);case 219:return ke(ot,Re,2,0);case 169:return Hi(Re);case 244:return Ue(Re);case 217:return Ye(Re,mt);case 215:return nt(Re);case 211:return Y&&Ir(Re)&&Re.expression.kind===108&&Y.add(Re.name.escapedText),cn(Re,_e,t);case 212:return Y&&Re.expression.kind===108&&(ue=!0),cn(Re,_e,t);case 263:case 231:return ke(Fe,Re,2,1);default:return cn(Re,_e,t)}}function fe(Re){return F&2&&F&1?Er(zt(r.createYieldExpression(void 0,a().createAwaitHelper(Ct(Re.expression,_e,Ut))),Re),Re):cn(Re,_e,t)}function Ie(Re){if(F&2&&F&1){if(Re.asteriskToken){const mt=Ct(z.checkDefined(Re.expression),_e,Ut);return Er(zt(r.createYieldExpression(void 0,a().createAwaitHelper(r.updateYieldExpression(Re,Re.asteriskToken,zt(a().createAsyncDelegatorHelper(zt(a().createAsyncValuesHelper(mt),mt)),mt)))),Re),Re)}return Er(zt(r.createYieldExpression(void 0,Ai(Re.expression?Ct(Re.expression,_e,Ut):r.createVoidZero())),Re),Re)}return cn(Re,_e,t)}function Le(Re){return F&2&&F&1?r.updateReturnStatement(Re,Ai(Re.expression?Ct(Re.expression,_e,Ut):r.createVoidZero())):cn(Re,_e,t)}function et(Re){if(F&2){const mt=Kse(Re);return mt.kind===250&&mt.awaitModifier?Ui(mt,Re):r.restoreEnclosingLabel(Ct(mt,_e,Es,r.liftToBlock),Re)}return cn(Re,_e,t)}function He(Re){let mt;const Je=[];for(const pt of Re)if(pt.kind===305){mt&&(Je.push(r.createObjectLiteralExpression(mt)),mt=void 0);const kt=pt.expression;Je.push(Ct(kt,_e,Ut))}else mt=xi(mt,pt.kind===303?r.createPropertyAssignment(pt.name,Ct(pt.initializer,_e,Ut)):Ct(pt,_e,Fb));return mt&&Je.push(r.createObjectLiteralExpression(mt)),Je}function We(Re){if(Re.transformFlags&65536){const mt=He(Re.properties);mt.length&&mt[0].kind!==210&&mt.unshift(r.createObjectLiteralExpression());let Je=mt[0];if(mt.length>1){for(let pt=1;pt=2&&(m.hasNodeCheckFlag(Re,256)||m.hasNodeCheckFlag(Re,128));if(qt){Ds();const ii=UK(r,m,Re,Y);te[Tl(ii)]=!0,qy(kt,[ii])}kt.push($e);const $t=r.updateBlock(Re.body,kt);return qt&&ue&&(m.hasNodeCheckFlag(Re,256)?vP($t,OG):m.hasNodeCheckFlag(Re,128)&&vP($t,AG)),Y=Je,ue=pt,$t}function as(Re){u();let mt=0;const Je=[],pt=Ct(Re.body,_e,H$)??r.createBlock([]);Ho(pt)&&(mt=r.copyPrologue(pt.statements,Je,!1,_e)),un(Je,fs(void 0,Re));const kt=h();if(mt>0||Rt(Je)||Rt(kt)){const Ci=r.converters.convertToFunctionBlock(pt,!0);return qy(Je,kt),un(Je,Ci.statements.slice(mt)),r.updateBlock(Ci,zt(r.createNodeArray(Je),Ci.statements))}return pt}function fs(Re,mt){let Je=!1;for(const pt of mt.parameters)if(Je){if(Qo(pt.name)){if(pt.name.elements.length>0){const kt=nD(pt,_e,t,0,r.getGeneratedNameForNode(pt));if(Rt(kt)){const Ci=r.createVariableDeclarationList(kt),$e=r.createVariableStatement(void 0,Ci);ir($e,2097152),Re=xi(Re,$e)}}else if(pt.initializer){const kt=r.getGeneratedNameForNode(pt),Ci=Ct(pt.initializer,_e,Ut),$e=r.createAssignment(kt,Ci),qt=r.createExpressionStatement($e);ir(qt,2097152),Re=xi(Re,qt)}}else if(pt.initializer){const kt=r.cloneNode(pt.name);zt(kt,pt.name),ir(kt,96);const Ci=Ct(pt.initializer,_e,Ut);Wv(Ci,3168);const $e=r.createAssignment(kt,Ci);zt($e,pt),ir($e,3072);const qt=r.createBlock([r.createExpressionStatement($e)]);zt(qt,pt),ir(qt,3905);const $t=r.createTypeCheck(r.cloneNode(pt.name),"undefined"),ii=r.createIfStatement($t,qt);mh(ii),zt(ii,pt),ir(ii,2101056),Re=xi(Re,ii)}}else if(pt.transformFlags&65536){Je=!0;const kt=nD(pt,_e,t,1,r.getGeneratedNameForNode(pt),!1,!0);if(Rt(kt)){const Ci=r.createVariableDeclarationList(kt),$e=r.createVariableStatement(void 0,Ci);ir($e,2097152),Re=xi(Re,$e)}}return Re}function Ds(){R&1||(R|=1,t.enableSubstitution(213),t.enableSubstitution(211),t.enableSubstitution(212),t.enableEmitNotification(263),t.enableEmitNotification(174),t.enableEmitNotification(177),t.enableEmitNotification(178),t.enableEmitNotification(176),t.enableEmitNotification(243))}function ha(Re,mt,Je){if(R&1&&xe(mt)){const pt=(m.hasNodeCheckFlag(mt,128)?128:0)|(m.hasNodeCheckFlag(mt,256)?256:0);if(pt!==U){const kt=U;U=pt,T(Re,mt,Je),U=kt;return}}else if(R&&te[Tl(mt)]){const pt=U;U=0,T(Re,mt,Je),U=pt;return}T(Re,mt,Je)}function Yo(Re,mt){return mt=E(Re,mt),Re===1&&U?ji(mt):mt}function ji(Re){switch(Re.kind){case 211:return fl(Re);case 212:return St(Re);case 213:return Ot(Re)}return Re}function fl(Re){return Re.expression.kind===108?zt(r.createPropertyAccessExpression(r.createUniqueName("_super",48),Re.name),Re):Re}function St(Re){return Re.expression.kind===108?Pt(Re.argumentExpression,Re):Re}function Ot(Re){const mt=Re.expression;if(R_(mt)){const Je=Ir(mt)?fl(mt):St(mt);return r.createCallExpression(r.createPropertyAccessExpression(Je,"call"),void 0,[r.createThis(),...Re.arguments])}return Re}function xe(Re){const mt=Re.kind;return mt===263||mt===176||mt===174||mt===177||mt===178}function Pt(Re,mt){return U&256?zt(r.createPropertyAccessExpression(r.createCallExpression(r.createIdentifier("_superIndex"),void 0,[Re]),"value"),mt):zt(r.createCallExpression(r.createIdentifier("_superIndex"),void 0,[Re]),mt)}}function SEe(t){const r=t.factory;return Q0(t,a);function a(p){return p.isDeclarationFile?p:cn(p,u,t)}function u(p){if(!(p.transformFlags&64))return p;switch(p.kind){case 299:return h(p);default:return cn(p,u,t)}}function h(p){return p.variableDeclaration?cn(p,u,t):r.updateCatchClause(p,r.createVariableDeclaration(r.createTempVariable(void 0)),Ct(p.block,u,Ho))}}function wEe(t){const{factory:r,hoistVariableDeclaration:a}=t;return Q0(t,u);function u(j){return j.isDeclarationFile?j:cn(j,h,t)}function h(j){if(!(j.transformFlags&32))return j;switch(j.kind){case 213:{const U=b(j,!1);return z.assertNotNode(U,LP),U}case 211:case 212:if(ph(j)){const U=E(j,!1,!1);return z.assertNotNode(U,LP),U}return cn(j,h,t);case 226:return j.operatorToken.kind===61?R(j):cn(j,h,t);case 220:return F(j);default:return cn(j,h,t)}}function p(j){z.assertNotNode(j,R$);const U=[j];for(;!j.questionDotToken&&!KT(j);)j=ua(u0(j.expression),ph),z.assertNotNode(j,R$),U.unshift(j);return{expression:j.expression,chain:U}}function m(j,U,q){const Q=T(j.expression,U,q);return LP(Q)?r.createSyntheticReferenceExpression(r.updateParenthesizedExpression(j,Q.expression),Q.thisArg):r.updateParenthesizedExpression(j,Q)}function C(j,U,q){if(ph(j))return E(j,U,q);let Q=Ct(j.expression,h,Ut);z.assertNotNode(Q,LP);let re;return U&&(iD(Q)?re=Q:(re=r.createTempVariable(a),Q=r.createAssignment(re,Q))),Q=j.kind===211?r.updatePropertyAccessExpression(j,Q,Ct(j.name,h,lt)):r.updateElementAccessExpression(j,Q,Ct(j.argumentExpression,h,Ut)),re?r.createSyntheticReferenceExpression(Q,re):Q}function b(j,U){if(ph(j))return E(j,U,!1);if(g_(j.expression)&&ph(Il(j.expression))){const q=m(j.expression,!0,!1),Q=wn(j.arguments,h,Ut);return LP(q)?zt(r.createFunctionCallCall(q.expression,q.thisArg,Q),j):r.updateCallExpression(j,q,void 0,Q)}return cn(j,h,t)}function T(j,U,q){switch(j.kind){case 217:return m(j,U,q);case 211:case 212:return C(j,U,q);case 213:return b(j,U);default:return Ct(j,h,Ut)}}function E(j,U,q){const{expression:Q,chain:re}=p(j),Y=T(u0(Q),XE(re[0]),!1);let ue=LP(Y)?Y.thisArg:void 0,te=LP(Y)?Y.expression:Y,Se=r.restoreOuterExpressions(Q,te,8);iD(te)||(te=r.createTempVariable(a),Se=r.createAssignment(te,Se));let oe=te,pe;for(let be=0;beOe&&un(fe,wn(ke.statements,N,Es,Oe,Ie-Oe));break}Ie++}z.assert(Ieq(fe,Oe))))],Oe,Fe===2)}return cn(ke,N,t)}function re(ke,Fe,Oe,fe,Ie){const Le=[];for(let We=Fe;Wer&&(r=u)}return r}function AAt(t){let r=0;for(const a of t){const u=dce(a.statements);if(u===2)return 2;u>r&&(r=u)}return r}function EEe(t){const{factory:r,getEmitHelperFactory:a}=t,u=t.getCompilerOptions();let h,p;return Q0(t,N);function m(){if(p.filenameDeclaration)return p.filenameDeclaration.name;const nt=r.createVariableDeclaration(r.createUniqueName("_jsxFileName",48),void 0,void 0,r.createStringLiteral(h.fileName));return p.filenameDeclaration=nt,p.filenameDeclaration.name}function C(nt){return u.jsx===5?"jsxDEV":nt?"jsxs":"jsx"}function b(nt){const ze=C(nt);return E(ze)}function T(){return E("Fragment")}function E(nt){var ze,st;const xt=nt==="createElement"?p.importSpecifier:aG(p.importSpecifier,u),Et=(st=(ze=p.utilizedImplicitRuntimeImports)==null?void 0:ze.get(xt))==null?void 0:st.get(nt);if(Et)return Et.name;p.utilizedImplicitRuntimeImports||(p.utilizedImplicitRuntimeImports=new Map);let ft=p.utilizedImplicitRuntimeImports.get(xt);ft||(ft=new Map,p.utilizedImplicitRuntimeImports.set(xt,ft));const Ht=r.createUniqueName(`_${nt}`,112),Oi=r.createImportSpecifier(!1,r.createIdentifier(nt),Ht);return c2e(Ht,Oi),ft.set(nt,Oi),Ht}function N(nt){if(nt.isDeclarationFile)return nt;h=nt,p={},p.importSpecifier=oG(u,nt);let ze=cn(nt,R,t);Jb(ze,t.readEmitHelpers());let st=ze.statements;if(p.filenameDeclaration&&(st=iI(st.slice(),r.createVariableStatement(void 0,r.createVariableDeclarationList([p.filenameDeclaration],2)))),p.utilizedImplicitRuntimeImports){for(const[xt,Et]of Fn(p.utilizedImplicitRuntimeImports.entries()))if(Td(nt)){const ft=r.createImportDeclaration(void 0,r.createImportClause(!1,void 0,r.createNamedImports(Fn(Et.values()))),r.createStringLiteral(xt),void 0);$b(ft,!1),st=iI(st.slice(),ft)}else if(ep(nt)){const ft=r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(r.createObjectBindingPattern(Fn(Et.values(),Ht=>r.createBindingElement(void 0,Ht.propertyName,Ht.name))),void 0,void 0,r.createCallExpression(r.createIdentifier("require"),void 0,[r.createStringLiteral(xt)]))],2));$b(ft,!1),st=iI(st.slice(),ft)}}return st!==ze.statements&&(ze=r.updateSourceFile(ze,st)),p=void 0,ze}function R(nt){return nt.transformFlags&2?F(nt):nt}function F(nt){switch(nt.kind){case 284:return re(nt,!1);case 285:return Y(nt,!1);case 288:return ue(nt,!1);case 294:return wt(nt);default:return cn(nt,R,t)}}function j(nt){switch(nt.kind){case 12:return Ie(nt);case 294:return wt(nt);case 284:return re(nt,!0);case 285:return Y(nt,!0);case 288:return ue(nt,!0);default:return z.failBadSyntaxKind(nt)}}function U(nt){return nt.properties.some(ze=>pd(ze)&&(lt(ze.name)&&dr(ze.name)==="__proto__"||ja(ze.name)&&ze.name.text==="__proto__"))}function q(nt){let ze=!1;for(const st of nt.attributes.properties)if(PP(st)&&(!Pa(st.expression)||st.expression.properties.some(ib)))ze=!0;else if(ze&&qv(st)&<(st.name)&&st.name.escapedText==="key")return!0;return!1}function Q(nt){return p.importSpecifier===void 0||q(nt)}function re(nt,ze){return(Q(nt.openingElement)?ye:oe)(nt.openingElement,nt.children,ze,nt)}function Y(nt,ze){return(Q(nt)?ye:oe)(nt,void 0,ze,nt)}function ue(nt,ze){return(p.importSpecifier===void 0?_e:be)(nt.openingFragment,nt.children,ze,nt)}function te(nt){const ze=Se(nt);return ze&&r.createObjectLiteralExpression([ze])}function Se(nt){const ze=z6(nt);if(O(ze)===1&&!ze[0].dotDotDotToken){const xt=j(ze[0]);return xt&&r.createPropertyAssignment("children",xt)}const st=ns(nt,j);return O(st)?r.createPropertyAssignment("children",r.createArrayLiteralExpression(st)):void 0}function oe(nt,ze,st,xt){const Et=Ue(nt),ft=ze&&ze.length?Se(ze):void 0,Ht=Me(nt.attributes.properties,Ui=>!!Ui.name&<(Ui.name)&&Ui.name.escapedText==="key"),Oi=Ht?Ri(nt.attributes.properties,Ui=>Ui!==Ht):nt.attributes.properties,Ji=O(Oi)?Ee(Oi,ft):r.createObjectLiteralExpression(ft?[ft]:x);return pe(Et,Ji,Ht,ze||x,st,xt)}function pe(nt,ze,st,xt,Et,ft){var Ht;const Oi=z6(xt),Ji=O(Oi)>1||!!((Ht=Oi[0])!=null&&Ht.dotDotDotToken),Ui=[nt,ze];if(st&&Ui.push(fe(st.initializer)),u.jsx===5){const Mi=uu(h);if(Mi&&Ns(Mi)){st===void 0&&Ui.push(r.createVoidZero()),Ui.push(Ji?r.createTrue():r.createFalse());const Ai=Da(Mi,ft.pos);Ui.push(r.createObjectLiteralExpression([r.createPropertyAssignment("fileName",m()),r.createPropertyAssignment("lineNumber",r.createNumericLiteral(Ai.line+1)),r.createPropertyAssignment("columnNumber",r.createNumericLiteral(Ai.character+1))])),Ui.push(r.createThis())}}const bn=zt(r.createCallExpression(b(Ji),void 0,Ui),ft);return Et&&mh(bn),bn}function ye(nt,ze,st,xt){const Et=Ue(nt),ft=nt.attributes.properties,Ht=O(ft)?Ee(ft):r.createNull(),Oi=p.importSpecifier===void 0?Jae(r,t.getEmitResolver().getJsxFactoryEntity(h),u.reactNamespace,nt):E("createElement"),Ji=_Te(r,Oi,Et,Ht,ns(ze,j),xt);return st&&mh(Ji),Ji}function be(nt,ze,st,xt){let Et;if(ze&&ze.length){const ft=te(ze);ft&&(Et=ft)}return pe(T(),Et||r.createObjectLiteralExpression([]),void 0,ze,st,xt)}function _e(nt,ze,st,xt){const Et=pTe(r,t.getEmitResolver().getJsxFactoryEntity(h),t.getEmitResolver().getJsxFragmentFactoryEntity(h),u.reactNamespace,ns(ze,j),nt,xt);return st&&mh(Et),Et}function ve(nt){return Pa(nt.expression)&&!U(nt.expression)?Is(nt.expression.properties,ze=>z.checkDefined(Ct(ze,R,Fb))):r.createSpreadAssignment(z.checkDefined(Ct(nt.expression,R,Ut)))}function Ee(nt,ze){const st=il(u);return st&&st>=5?r.createObjectLiteralExpression(ke(nt,ze)):Fe(nt,ze)}function ke(nt,ze){const st=zs(F0(nt,PP,(xt,Et)=>zs(Yt(xt,ft=>Et?ve(ft):Oe(ft)))));return ze&&st.push(ze),st}function Fe(nt,ze){const st=[];let xt=[];for(const ft of nt){if(PP(ft)){if(Pa(ft.expression)&&!U(ft.expression)){for(const Ht of ft.expression.properties){if(ib(Ht)){Et(),st.push(z.checkDefined(Ct(Ht.expression,R,Ut)));continue}xt.push(z.checkDefined(Ct(Ht,R)))}continue}Et(),st.push(z.checkDefined(Ct(ft.expression,R,Ut)));continue}xt.push(Oe(ft))}return ze&&xt.push(ze),Et(),st.length&&!Pa(st[0])&&st.unshift(r.createObjectLiteralExpression()),a_(st)||a().createAssignHelper(st);function Et(){xt.length&&(st.push(r.createObjectLiteralExpression(xt)),xt=[])}}function Oe(nt){const ze=Ye(nt),st=fe(nt.initializer);return r.createPropertyAssignment(ze,st)}function fe(nt){if(nt===void 0)return r.createTrue();if(nt.kind===11){const ze=nt.singleQuote!==void 0?nt.singleQuote:!SJ(nt,h),st=r.createStringLiteral(We(nt.text)||nt.text,ze);return zt(st,nt)}return nt.kind===294?nt.expression===void 0?r.createTrue():z.checkDefined(Ct(nt.expression,R,Ut)):tb(nt)?re(nt,!1):vI(nt)?Y(nt,!1):XT(nt)?ue(nt,!1):z.failBadSyntaxKind(nt)}function Ie(nt){const ze=Le(nt.text);return ze===void 0?void 0:r.createStringLiteral(ze)}function Le(nt){let ze,st=0,xt=-1;for(let Et=0;Et{if(ft)return e8(parseInt(ft,10));if(Ht)return e8(parseInt(Ht,16));{const Ji=OAt.get(Oi);return Ji?e8(Ji):ze}})}function We(nt){const ze=He(nt);return ze===nt?void 0:ze}function Ue(nt){if(nt.kind===284)return Ue(nt.openingElement);{const ze=nt.tagName;return lt(ze)&&U6(ze.escapedText)?r.createStringLiteral(dr(ze)):J0(ze)?r.createStringLiteral(dr(ze.namespace)+":"+dr(ze.name)):mV(r,ze)}}function Ye(nt){const ze=nt.name;if(lt(ze)){const st=dr(ze);return/^[A-Za-z_]\w*$/.test(st)?ze:r.createStringLiteral(st)}return r.createStringLiteral(dr(ze.namespace)+":"+dr(ze.name))}function wt(nt){const ze=Ct(nt.expression,R,Ut);return nt.dotDotDotToken?r.createSpreadElement(ze):ze}}var OAt=new Map(Object.entries({quot:34,amp:38,apos:39,lt:60,gt:62,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,copy:169,ordf:170,laquo:171,not:172,shy:173,reg:174,macr:175,deg:176,plusmn:177,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,sup1:185,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,Agrave:192,Aacute:193,Acirc:194,Atilde:195,Auml:196,Aring:197,AElig:198,Ccedil:199,Egrave:200,Eacute:201,Ecirc:202,Euml:203,Igrave:204,Iacute:205,Icirc:206,Iuml:207,ETH:208,Ntilde:209,Ograve:210,Oacute:211,Ocirc:212,Otilde:213,Ouml:214,times:215,Oslash:216,Ugrave:217,Uacute:218,Ucirc:219,Uuml:220,Yacute:221,THORN:222,szlig:223,agrave:224,aacute:225,acirc:226,atilde:227,auml:228,aring:229,aelig:230,ccedil:231,egrave:232,eacute:233,ecirc:234,euml:235,igrave:236,iacute:237,icirc:238,iuml:239,eth:240,ntilde:241,ograve:242,oacute:243,ocirc:244,otilde:245,ouml:246,divide:247,oslash:248,ugrave:249,uacute:250,ucirc:251,uuml:252,yacute:253,thorn:254,yuml:255,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830}));function IEe(t){const{factory:r,hoistVariableDeclaration:a}=t;return Q0(t,u);function u(b){return b.isDeclarationFile?b:cn(b,h,t)}function h(b){if(!(b.transformFlags&512))return b;switch(b.kind){case 226:return p(b);default:return cn(b,h,t)}}function p(b){switch(b.operatorToken.kind){case 68:return m(b);case 43:return C(b);default:return cn(b,h,t)}}function m(b){let T,E;const N=Ct(b.left,h,Ut),R=Ct(b.right,h,Ut);if(wc(N)){const F=r.createTempVariable(a),j=r.createTempVariable(a);T=zt(r.createElementAccessExpression(zt(r.createAssignment(F,N.expression),N.expression),zt(r.createAssignment(j,N.argumentExpression),N.argumentExpression)),N),E=zt(r.createElementAccessExpression(F,j),N)}else if(Ir(N)){const F=r.createTempVariable(a);T=zt(r.createPropertyAccessExpression(zt(r.createAssignment(F,N.expression),N.expression),N.name),N),E=zt(r.createPropertyAccessExpression(F,N.name),N)}else T=N,E=N;return zt(r.createAssignment(T,zt(r.createGlobalMethodCall("Math","pow",[E,R]),b)),b)}function C(b){const T=Ct(b.left,h,Ut),E=Ct(b.right,h,Ut);return zt(r.createGlobalMethodCall("Math","pow",[T,E]),b)}}function HKe(t,r){return{kind:t,expression:r}}function NEe(t){const{factory:r,getEmitHelperFactory:a,startLexicalEnvironment:u,resumeLexicalEnvironment:h,endLexicalEnvironment:p,hoistVariableDeclaration:m}=t,C=t.getCompilerOptions(),b=t.getEmitResolver(),T=t.onSubstituteNode,E=t.onEmitNode;t.onEmitNode=xg,t.onSubstituteNode=kg;let N,R,F,j;function U(me){j=xi(j,r.createVariableDeclaration(me))}let q,Q;return Q0(t,re);function re(me){if(me.isDeclarationFile)return me;N=me,R=me.text;const At=Ee(me);return Jb(At,t.readEmitHelpers()),N=void 0,R=void 0,j=void 0,F=0,At}function Y(me,At){const di=F;return F=(F&~me|At)&32767,di}function ue(me,At,di){F=(F&~At|di)&-32768|me}function te(me){return(F&8192)!==0&&me.kind===253&&!me.expression}function Se(me){return me.transformFlags&4194304&&(Om(me)||jk(me)||Y2e(me)||v7(me)||y7(me)||a3(me)||C7(me)||gI(me)||YT(me)||ix(me)||Hw(me,!1)||Ho(me))}function oe(me){return(me.transformFlags&1024)!==0||q!==void 0||F&8192&&Se(me)||Hw(me,!1)&&$s(me)||(d0(me)&1)!==0}function pe(me){return oe(me)?ve(me,!1):me}function ye(me){return oe(me)?ve(me,!0):me}function be(me){if(oe(me)){const At=uu(me);if(To(At)&&_d(At)){const di=Y(32670,16449),gi=ve(me,!1);return ue(di,229376,0),gi}return ve(me,!1)}return me}function _e(me){return me.kind===108?np(me,!0):pe(me)}function ve(me,At){switch(me.kind){case 126:return;case 263:return Ue(me);case 231:return Ye(me);case 169:return Yo(me);case 262:return Gt(me);case 219:return $t(me);case 218:return ii(me);case 260:return Gi(me);case 80:return He(me);case 261:return Ke(me);case 255:return ke(me);case 269:return Fe(me);case 241:return ut(me);case 252:case 251:return We(me);case 256:return or(me);case 246:case 247:return Fs(me,void 0);case 248:return to(me,void 0);case 249:return is(me,void 0);case 250:return $i(me,void 0);case 244:return Bt(me);case 210:return Rl(me);case 299:return Cs(me);case 304:return Id(me);case 167:return $c(me);case 209:return Fc(me);case 213:return qd(me);case 214:return md(me);case 217:return le(me,At);case 226:return je(me,At);case 355:return de(me,At);case 15:case 16:case 17:case 18:return hl(me);case 11:return Mu(me);case 9:return Ld(me);case 215:return Xl(me);case 228:return $l(me);case 229:return Ud(me);case 230:return rl(me);case 108:return np(me,!1);case 110:return Le(me);case 236:return ev(me);case 174:return ql(me);case 177:case 178:return Xc(me);case 243:return Ae(me);case 253:return Ie(me);case 222:return et(me);default:return cn(me,pe,t)}}function Ee(me){const At=Y(8064,64),di=[],gi=[];u();const dn=r.copyPrologue(me.statements,di,!1,pe);return un(gi,wn(me.statements,pe,Es,dn)),j&&gi.push(r.createVariableStatement(void 0,r.createVariableDeclarationList(j))),r.mergeLexicalEnvironment(di,p()),Re(di,me),ue(At,0,0),r.updateSourceFile(me,zt(r.createNodeArray(no(di,gi)),me.statements))}function ke(me){if(q!==void 0){const At=q.allowedNonLabeledJumps;q.allowedNonLabeledJumps|=2;const di=cn(me,pe,t);return q.allowedNonLabeledJumps=At,di}return cn(me,pe,t)}function Fe(me){const At=Y(7104,0),di=cn(me,pe,t);return ue(At,0,0),di}function Oe(me){return Er(r.createReturnStatement(fe()),me)}function fe(){return r.createUniqueName("_this",48)}function Ie(me){return q?(q.nonLocalJumps|=8,te(me)&&(me=Oe(me)),r.createReturnStatement(r.createObjectLiteralExpression([r.createPropertyAssignment(r.createIdentifier("value"),me.expression?z.checkDefined(Ct(me.expression,pe,Ut)):r.createVoidZero())]))):te(me)?Oe(me):cn(me,pe,t)}function Le(me){return F|=65536,F&2&&!(F&16384)&&(F|=131072),q?F&2?(q.containsLexicalThis=!0,me):q.thisName||(q.thisName=r.createUniqueName("this")):me}function et(me){return cn(me,ye,t)}function He(me){return q&&b.isArgumentsLocalBinding(me)?q.argumentsName||(q.argumentsName=r.createUniqueName("arguments")):me.flags&256?Er(zt(r.createIdentifier(Ws(me.escapedText)),me),me):me}function We(me){if(q){const At=me.kind===252?2:4;if(!(me.label&&q.labels&&q.labels.get(dr(me.label))||!me.label&&q.allowedNonLabeledJumps&At)){let gi;const dn=me.label;dn?me.kind===252?(gi=`break-${dn.escapedText}`,ct(q,!0,dr(dn),gi)):(gi=`continue-${dn.escapedText}`,ct(q,!1,dr(dn),gi)):me.kind===252?(q.nonLocalJumps|=2,gi="break"):(q.nonLocalJumps|=4,gi="continue");let Vn=r.createStringLiteral(gi);if(q.loopOutParameters.length){const Lr=q.loopOutParameters;let ls;for(let ie=0;ielt(At.name)&&!At.initializer)}function Ht(me){if(rI(me))return!0;if(!(me.transformFlags&134217728))return!1;switch(me.kind){case 219:case 218:case 262:case 176:case 175:return!1;case 177:case 178:case 174:case 172:{const At=me;return Ja(At.name)?!!jo(At.name,Ht):!1}}return!!jo(me,Ht)}function Oi(me,At,di,gi){const dn=!!di&&ld(di.expression).kind!==106;if(!me)return Et(At,dn);const Vn=[],Lr=[];h();const ls=r.copyStandardPrologue(me.body.statements,Vn,0);(gi||Ht(me.body))&&(F|=8192),un(Lr,wn(me.body.statements,pe,Es,ls));const ie=dn||F&8192;fl(Vn,me),Pt(Vn,me,gi),Je(Vn,me),ie?mt(Vn,me,Ds()):Re(Vn,me),r.mergeLexicalEnvironment(Vn,p()),ie&&!fs(me.body)&&Lr.push(r.createReturnStatement(fe()));const Xe=r.createBlock(zt(r.createNodeArray([...Vn,...Lr]),me.body.statements),!0);return zt(Xe,me.body),as(Xe,me.body,gi)}function Ji(me){return jc(me)&&dr(me)==="_this"}function Ui(me){return jc(me)&&dr(me)==="_super"}function bn(me){return Ou(me)&&me.declarationList.declarations.length===1&&Mi(me.declarationList.declarations[0])}function Mi(me){return ds(me)&&Ji(me.name)&&!!me.initializer}function Ai(me){return Yd(me,!0)&&Ji(me.left)}function Rn(me){return sa(me)&&Ir(me.expression)&&Ui(me.expression.expression)&<(me.expression.name)&&(dr(me.expression.name)==="call"||dr(me.expression.name)==="apply")&&me.arguments.length>=1&&me.arguments[0].kind===110}function bs(me){return cr(me)&&me.operatorToken.kind===57&&me.right.kind===110&&Rn(me.left)}function Hi(me){return cr(me)&&me.operatorToken.kind===56&&cr(me.left)&&me.left.operatorToken.kind===38&&Ui(me.left.left)&&me.left.right.kind===106&&Rn(me.right)&&dr(me.right.expression.name)==="apply"}function Hs(me){return cr(me)&&me.operatorToken.kind===57&&me.right.kind===110&&Hi(me.left)}function Wo(me){return Ai(me)&&bs(me.right)}function ts(me){return Ai(me)&&Hs(me.right)}function Fo(me){return Rn(me)||bs(me)||Wo(me)||Hi(me)||Hs(me)||ts(me)}function Cn(me){for(let At=0;At0;gi--){const dn=me.statements[gi];if(Om(dn)&&dn.expression&&Ji(dn.expression)){const Vn=me.statements[gi-1];let Lr;if(_f(Vn)&&Wo(ld(Vn.expression)))Lr=Vn.expression;else if(di&&bn(Vn)){const Xe=Vn.declarationList.declarations[0];Fo(ld(Xe.initializer))&&(Lr=r.createAssignment(fe(),Xe.initializer))}if(!Lr)break;const ls=r.createReturnStatement(Lr);Er(ls,Vn),zt(ls,Vn);const ie=r.createNodeArray([...me.statements.slice(0,gi-1),ls,...me.statements.slice(gi+1)]);return zt(ie,me.statements),r.updateBlock(me,ie)}}return me}function ot(me){if(bn(me)){if(me.declarationList.declarations[0].initializer.kind===110)return}else if(Ai(me))return r.createPartiallyEmittedExpression(me.right,me);switch(me.kind){case 219:case 218:case 262:case 176:case 175:return me;case 177:case 178:case 174:case 172:{const At=me;return Ja(At.name)?r.replacePropertyName(At,cn(At.name,ot,void 0)):me}}return cn(me,ot,void 0)}function hi(me,At){if(At.transformFlags&16384||F&65536||F&131072)return me;for(const di of At.statements)if(di.transformFlags&134217728&&!BK(di))return me;return r.updateBlock(me,wn(me.statements,ot,Es))}function hn(me){if(Rn(me)&&me.arguments.length===2&<(me.arguments[1])&&dr(me.arguments[1])==="arguments")return r.createLogicalAnd(r.createStrictInequality(Ju(),r.createNull()),me);switch(me.kind){case 219:case 218:case 262:case 176:case 175:return me;case 177:case 178:case 174:case 172:{const At=me;return Ja(At.name)?r.replacePropertyName(At,cn(At.name,hn,void 0)):me}}return cn(me,hn,void 0)}function lr(me){return r.updateBlock(me,wn(me.statements,hn,Es))}function as(me,At,di){const gi=me;return me=Cn(me),me=Ko(me,At),me!==gi&&(me=hi(me,At)),di&&(me=lr(me)),me}function fs(me){if(me.kind===253)return!0;if(me.kind===245){const At=me;if(At.elseStatement)return fs(At.thenStatement)&&fs(At.elseStatement)}else if(me.kind===241){const At=Ql(me.statements);if(At&&fs(At))return!0}return!1}function Ds(){return ir(r.createThis(),8)}function ha(){return r.createLogicalOr(r.createLogicalAnd(r.createStrictInequality(Ju(),r.createNull()),r.createFunctionApplyCall(Ju(),Ds(),r.createIdentifier("arguments"))),Ds())}function Yo(me){if(!me.dotDotDotToken)return Qo(me.name)?Er(zt(r.createParameterDeclaration(void 0,void 0,r.getGeneratedNameForNode(me),void 0,void 0,void 0),me),me):me.initializer?Er(zt(r.createParameterDeclaration(void 0,void 0,me.name,void 0,void 0,void 0),me),me):me}function ji(me){return me.initializer!==void 0||Qo(me.name)}function fl(me,At){if(!Rt(At.parameters,ji))return!1;let di=!1;for(const gi of At.parameters){const{name:dn,initializer:Vn,dotDotDotToken:Lr}=gi;Lr||(Qo(dn)?di=St(me,gi,dn,Vn)||di:Vn&&(Ot(me,gi,dn,Vn),di=!0))}return di}function St(me,At,di,gi){return di.elements.length>0?(iI(me,ir(r.createVariableStatement(void 0,r.createVariableDeclarationList(nD(At,pe,t,0,r.getGeneratedNameForNode(At)))),2097152)),!0):gi?(iI(me,ir(r.createExpressionStatement(r.createAssignment(r.getGeneratedNameForNode(At),z.checkDefined(Ct(gi,pe,Ut)))),2097152)),!0):!1}function Ot(me,At,di,gi){gi=z.checkDefined(Ct(gi,pe,Ut));const dn=r.createIfStatement(r.createTypeCheck(r.cloneNode(di),"undefined"),ir(zt(r.createBlock([r.createExpressionStatement(ir(zt(r.createAssignment(ir(ml(zt(r.cloneNode(di),di),di.parent),96),ir(gi,96|Ya(gi)|3072)),At),3072))]),At),3905));mh(dn),zt(dn,At),ir(dn,2101056),iI(me,dn)}function xe(me,At){return!!(me&&me.dotDotDotToken&&!At)}function Pt(me,At,di){const gi=[],dn=Ql(At.parameters);if(!xe(dn,di))return!1;const Vn=dn.name.kind===80?ml(zt(r.cloneNode(dn.name),dn.name),dn.name.parent):r.createTempVariable(void 0);ir(Vn,96);const Lr=dn.name.kind===80?r.cloneNode(dn.name):Vn,ls=At.parameters.length-1,ie=r.createLoopVariable();gi.push(ir(zt(r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(Vn,void 0,void 0,r.createArrayLiteralExpression([]))])),dn),2097152));const Xe=r.createForStatement(zt(r.createVariableDeclarationList([r.createVariableDeclaration(ie,void 0,void 0,r.createNumericLiteral(ls))]),dn),zt(r.createLessThan(ie,r.createPropertyAccessExpression(r.createIdentifier("arguments"),"length")),dn),zt(r.createPostfixIncrement(ie),dn),r.createBlock([mh(zt(r.createExpressionStatement(r.createAssignment(r.createElementAccessExpression(Lr,ls===0?ie:r.createSubtract(ie,r.createNumericLiteral(ls))),r.createElementAccessExpression(r.createIdentifier("arguments"),ie))),dn))]));return ir(Xe,2097152),mh(Xe),gi.push(Xe),dn.name.kind!==80&&gi.push(ir(zt(r.createVariableStatement(void 0,r.createVariableDeclarationList(nD(dn,pe,t,0,Lr))),dn),2097152)),Lse(me,gi),!0}function Re(me,At){return F&131072&&At.kind!==219?(mt(me,At,r.createThis()),!0):!1}function mt(me,At,di){nm();const gi=r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(fe(),void 0,void 0,di)]));ir(gi,2100224),$a(gi,At),iI(me,gi)}function Je(me,At){if(F&32768){let di;switch(At.kind){case 219:return me;case 174:case 177:case 178:di=r.createVoidZero();break;case 176:di=r.createPropertyAccessExpression(ir(r.createThis(),8),"constructor");break;case 262:case 218:di=r.createConditionalExpression(r.createLogicalAnd(ir(r.createThis(),8),r.createBinaryExpression(ir(r.createThis(),8),104,r.getLocalName(At))),void 0,r.createPropertyAccessExpression(ir(r.createThis(),8),"constructor"),void 0,r.createVoidZero());break;default:return z.failBadSyntaxKind(At)}const gi=r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(r.createUniqueName("_newTarget",48),void 0,void 0,di)]));ir(gi,2100224),iI(me,gi)}return me}function pt(me,At){for(const di of At.members)switch(di.kind){case 240:me.push(kt(di));break;case 174:me.push(Ci(Xv(At,di),di,At));break;case 177:case 178:const gi=qw(At.members,di);di===gi.firstAccessor&&me.push($e(Xv(At,di),gi,At));break;case 176:case 175:break;default:z.failBadSyntaxKind(di,N&&N.fileName);break}}function kt(me){return zt(r.createEmptyStatement(),me)}function Ci(me,At,di){const gi=Vv(At),dn=_S(At),Vn=wi(At,At,void 0,di),Lr=Ct(At.name,pe,od);z.assert(Lr);let ls;if(!Vs(Lr)&&JW(t.getCompilerOptions())){const Xe=Ja(Lr)?Lr.expression:lt(Lr)?r.createStringLiteral(Ws(Lr.escapedText)):Lr;ls=r.createObjectDefinePropertyCall(me,Xe,r.createPropertyDescriptor({value:Vn,enumerable:!1,writable:!0,configurable:!0}))}else{const Xe=SI(r,me,Lr,At.name);ls=r.createAssignment(Xe,Vn)}ir(Vn,3072),$a(Vn,dn);const ie=zt(r.createExpressionStatement(ls),At);return Er(ie,At),Sd(ie,gi),ir(ie,96),ie}function $e(me,At,di){const gi=r.createExpressionStatement(qt(me,At,di,!1));return ir(gi,3072),$a(gi,_S(At.firstAccessor)),gi}function qt(me,{firstAccessor:At,getAccessor:di,setAccessor:gi},dn,Vn){const Lr=ml(zt(r.cloneNode(me),me),me.parent);ir(Lr,3136),$a(Lr,At.name);const ls=Ct(At.name,pe,od);if(z.assert(ls),Vs(ls))return z.failBadSyntaxKind(ls,"Encountered unhandled private identifier while transforming ES2015.");const ie=Kae(r,ls);ir(ie,3104),$a(ie,At.name);const Xe=[];if(di){const Dn=wi(di,void 0,void 0,dn);$a(Dn,_S(di)),ir(Dn,1024);const Ss=r.createPropertyAssignment("get",Dn);Sd(Ss,Vv(di)),Xe.push(Ss)}if(gi){const Dn=wi(gi,void 0,void 0,dn);$a(Dn,_S(gi)),ir(Dn,1024);const Ss=r.createPropertyAssignment("set",Dn);Sd(Ss,Vv(gi)),Xe.push(Ss)}Xe.push(r.createPropertyAssignment("enumerable",di||gi?r.createFalse():r.createTrue()),r.createPropertyAssignment("configurable",r.createTrue()));const ei=r.createCallExpression(r.createPropertyAccessExpression(r.createIdentifier("Object"),"defineProperty"),void 0,[Lr,ie,r.createObjectLiteralExpression(Xe,!0)]);return Vn&&mh(ei),ei}function $t(me){me.transformFlags&16384&&!(F&16384)&&(F|=131072);const At=q;q=void 0;const di=Y(15232,66),gi=r.createFunctionExpression(void 0,void 0,void 0,void 0,Su(me.parameters,pe,t),void 0,ce(me));return zt(gi,me),Er(gi,me),ir(gi,16),ue(di,0,0),q=At,gi}function ii(me){const At=Ya(me)&524288?Y(32662,69):Y(32670,65),di=q;q=void 0;const gi=Su(me.parameters,pe,t),dn=ce(me),Vn=F&32768?r.getLocalName(me):me.name;return ue(At,229376,0),q=di,r.updateFunctionExpression(me,void 0,me.asteriskToken,Vn,void 0,gi,void 0,dn)}function Gt(me){const At=q;q=void 0;const di=Y(32670,65),gi=Su(me.parameters,pe,t),dn=ce(me),Vn=F&32768?r.getLocalName(me):me.name;return ue(di,229376,0),q=At,r.updateFunctionDeclaration(me,wn(me.modifiers,pe,Ra),me.asteriskToken,Vn,void 0,gi,void 0,dn)}function wi(me,At,di,gi){const dn=q;q=void 0;const Vn=gi&&ss(gi)&&!da(me)?Y(32670,73):Y(32670,65),Lr=Su(me.parameters,pe,t),ls=ce(me);return F&32768&&!di&&(me.kind===262||me.kind===218)&&(di=r.getGeneratedNameForNode(me)),ue(Vn,229376,0),q=dn,Er(zt(r.createFunctionExpression(void 0,me.asteriskToken,di,void 0,Lr,void 0,ls),At),me)}function ce(me){let At=!1,di=!1,gi,dn;const Vn=[],Lr=[],ls=me.body;let ie;if(h(),Ho(ls)&&(ie=r.copyStandardPrologue(ls.statements,Vn,0,!1),ie=r.copyCustomPrologue(ls.statements,Lr,ie,pe,aJ),ie=r.copyCustomPrologue(ls.statements,Lr,ie,pe,lJ)),At=fl(Lr,me)||At,At=Pt(Lr,me,!1)||At,Ho(ls))ie=r.copyCustomPrologue(ls.statements,Lr,ie,pe),gi=ls.statements,un(Lr,wn(ls.statements,pe,Es,ie)),!At&&ls.multiLine&&(At=!0);else{z.assert(me.kind===219),gi=qJ(ls,-1);const ei=me.equalsGreaterThanToken;!oc(ei)&&!oc(ls)&&(zW(ei,ls,N)?di=!0:At=!0);const Dn=Ct(ls,pe,Ut),Ss=r.createReturnStatement(Dn);zt(Ss,ls),n2e(Ss,ls),ir(Ss,2880),Lr.push(Ss),dn=ls}if(r.mergeLexicalEnvironment(Vn,p()),Je(Vn,me),Re(Vn,me),Rt(Vn)&&(At=!0),Lr.unshift(...Vn),Ho(ls)&&qs(Lr,ls.statements))return ls;const Xe=r.createBlock(zt(r.createNodeArray(Lr),gi),At);return zt(Xe,me.body),!At&&di&&ir(Xe,1),dn&&i2e(Xe,20,dn),Er(Xe,me.body),Xe}function ut(me,At){const di=F&256?Y(7104,512):Y(6976,128),gi=cn(me,pe,t);return ue(di,0,0),gi}function Bt(me){return cn(me,ye,t)}function le(me,At){return cn(me,At?ye:pe,t)}function je(me,At){return dS(me)?TI(me,pe,t,0,!At):me.operatorToken.kind===28?r.updateBinaryExpression(me,z.checkDefined(Ct(me.left,ye,Ut)),me.operatorToken,z.checkDefined(Ct(me.right,At?ye:pe,Ut))):cn(me,pe,t)}function de(me,At){if(At)return cn(me,ye,t);let di;for(let dn=0;dnie.name)),ls=gi?r.createYieldExpression(r.createToken(42),ir(Lr,8388608)):Lr;if(Vn)dn.push(r.createExpressionStatement(ls)),Rc(At.loopOutParameters,1,0,dn);else{const ie=r.createUniqueName("state"),Xe=r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(ie,void 0,void 0,ls)]));if(dn.push(Xe),Rc(At.loopOutParameters,1,0,dn),At.nonLocalJumps&8){let ei;di?(di.nonLocalJumps|=8,ei=r.createReturnStatement(ie)):ei=r.createReturnStatement(r.createPropertyAccessExpression(ie,"value")),dn.push(r.createIfStatement(r.createTypeCheck(ie,"object"),ei))}if(At.nonLocalJumps&2&&dn.push(r.createIfStatement(r.createStrictEquality(ie,r.createStringLiteral("break")),r.createBreakStatement())),At.labeledNonLocalBreaks||At.labeledNonLocalContinues){const ei=[];Wt(At.labeledNonLocalBreaks,!0,ie,di,ei),Wt(At.labeledNonLocalContinues,!1,ie,di,ei),dn.push(r.createSwitchStatement(ie,r.createCaseBlock(ei)))}}return dn}function ct(me,At,di,gi){At?(me.labeledNonLocalBreaks||(me.labeledNonLocalBreaks=new Map),me.labeledNonLocalBreaks.set(di,gi)):(me.labeledNonLocalContinues||(me.labeledNonLocalContinues=new Map),me.labeledNonLocalContinues.set(di,gi))}function Wt(me,At,di,gi,dn){me&&me.forEach((Vn,Lr)=>{const ls=[];if(!gi||gi.labels&&gi.labels.get(Lr)){const ie=r.createIdentifier(Lr);ls.push(At?r.createBreakStatement(ie):r.createContinueStatement(ie))}else ct(gi,At,Lr,Vn),ls.push(r.createReturnStatement(di));dn.push(r.createCaseClause(r.createStringLiteral(Vn),ls))})}function mi(me,At,di,gi,dn){const Vn=At.name;if(Qo(Vn))for(const Lr of Vn.elements)zd(Lr)||mi(me,Lr,di,gi,dn);else{di.push(r.createParameterDeclaration(void 0,void 0,Vn));const Lr=b.hasNodeCheckFlag(At,65536);if(Lr||dn){const ls=r.createUniqueName("out_"+dr(Vn));let ie=0;Lr&&(ie|=1),zk(me)&&(me.initializer&&b.isBindingCapturedByNode(me.initializer,At)&&(ie|=2),(me.condition&&b.isBindingCapturedByNode(me.condition,At)||me.incrementor&&b.isBindingCapturedByNode(me.incrementor,At))&&(ie|=1)),gi.push({flags:ie,originalName:Vn,outParamName:ls})}}}function mn(me,At,di,gi){const dn=At.properties,Vn=dn.length;for(let Lr=gi;LrOu(hu)&&!!ma(hu.declarationList.declarations).initializer,gi=q;q=void 0;const dn=wn(At.statements,be,Es);q=gi;const Vn=Ri(dn,di),Lr=Ri(dn,hu=>!di(hu)),ie=ua(ma(Vn),Ou).declarationList.declarations[0],Xe=ld(ie.initializer);let ei=$r(Xe,Yd);!ei&&cr(Xe)&&Xe.operatorToken.kind===28&&(ei=$r(Xe.left,Yd));const Dn=ua(ei?ld(ei.right):Xe,sa),Ss=ua(ld(Dn.expression),gc),Vo=Ss.body.statements;let po=0,$o=-1;const Dl=[];if(ei){const hu=$r(Vo[po],_f);hu&&(Dl.push(hu),po++),Dl.push(Vo[po]),po++,Dl.push(r.createExpressionStatement(r.createAssignment(ei.left,ua(ie.name,lt))))}for(;!Om(bp(Vo,$o));)$o--;un(Dl,Vo,po,$o),$o<-1&&un(Dl,Vo,$o+1);const Ga=$r(bp(Vo,$o),Om);for(const hu of Lr)Om(hu)&&(Ga!=null&&Ga.expression)&&!lt(Ga.expression)?Dl.push(Ga):Dl.push(hu);return un(Dl,Vn,1),r.restoreOuterExpressions(me.expression,r.restoreOuterExpressions(ie.initializer,r.restoreOuterExpressions(ei&&ei.right,r.updateCallExpression(Dn,r.restoreOuterExpressions(Dn.expression,r.updateFunctionExpression(Ss,void 0,void 0,void 0,void 0,Ss.parameters,void 0,r.updateBlock(Ss.body,Dl))),void 0,Dn.arguments))))}function Nd(me,At){if(me.transformFlags&32768||me.expression.kind===108||R_(ld(me.expression))){const{target:di,thisArg:gi}=r.createCallBinding(me.expression,m);me.expression.kind===108&&ir(gi,8);let dn;if(me.transformFlags&32768?dn=r.createFunctionApplyCall(z.checkDefined(Ct(di,_e,Ut)),me.expression.kind===108?gi:z.checkDefined(Ct(gi,pe,Ut)),wg(me.arguments,!0,!1,!1)):dn=zt(r.createFunctionCallCall(z.checkDefined(Ct(di,_e,Ut)),me.expression.kind===108?gi:z.checkDefined(Ct(gi,pe,Ut)),wn(me.arguments,pe,Ut)),me),me.expression.kind===108){const Vn=r.createLogicalOr(dn,Ds());dn=r.createAssignment(fe(),Vn)}return Er(dn,me)}return rI(me)&&(F|=131072),cn(me,pe,t)}function md(me){if(Rt(me.arguments,Zg)){const{target:At,thisArg:di}=r.createCallBinding(r.createPropertyAccessExpression(me.expression,"bind"),m);return r.createNewExpression(r.createFunctionApplyCall(z.checkDefined(Ct(At,pe,Ut)),di,wg(r.createNodeArray([r.createVoidZero(),...me.arguments]),!0,!1,!1)),void 0,[])}return cn(me,pe,t)}function wg(me,At,di,gi){const dn=me.length,Vn=zs(F0(me,it,(Xe,ei,Dn,Ss)=>ei(Xe,di,gi&&Ss===dn)));if(Vn.length===1){const Xe=Vn[0];if(At&&!C.downlevelIteration||uae(Xe.expression)||u7(Xe.expression,"___spreadArray"))return Xe.expression}const Lr=a(),ls=Vn[0].kind!==0;let ie=ls?r.createArrayLiteralExpression():Vn[0].expression;for(let Xe=ls?0:1;Xe0&&gi.push(r.createStringLiteral(di.literal.text)),At=r.createCallExpression(r.createPropertyAccessExpression(At,"concat"),void 0,gi)}return zt(At,me)}function Ju(){return r.createUniqueName("_super",48)}function np(me,At){const di=F&8&&!At?r.createPropertyAccessExpression(Er(Ju(),me),"prototype"):Ju();return Er(di,me),Sd(di,me),$a(di,me),di}function ev(me){return me.keywordToken===105&&me.name.escapedText==="target"?(F|=32768,r.createUniqueName("_newTarget",48)):me}function xg(me,At,di){if(Q&1&&Bo(At)){const gi=Y(32670,Ya(At)&16?81:65);E(me,At,di),ue(gi,0,0);return}E(me,At,di)}function U_(){Q&2||(Q|=2,t.enableSubstitution(80))}function nm(){Q&1||(Q|=1,t.enableSubstitution(110),t.enableEmitNotification(176),t.enableEmitNotification(174),t.enableEmitNotification(177),t.enableEmitNotification(178),t.enableEmitNotification(219),t.enableEmitNotification(218),t.enableEmitNotification(262))}function kg(me,At){return At=T(me,At),me===1?q_(At):lt(At)?$1(At):At}function $1(me){if(Q&2&&!Qae(me)){const At=xo(me,lt);if(At&&J1(At))return zt(r.getGeneratedNameForNode(At),me)}return me}function J1(me){switch(me.parent.kind){case 208:case 263:case 266:case 260:return me.parent.name===me&&b.isDeclarationWithCollidingName(me.parent)}return!1}function q_(me){switch(me.kind){case 80:return vd(me);case 110:return rp(me)}return me}function vd(me){if(Q&2&&!Qae(me)){const At=b.getReferencedDeclarationWithCollidingName(me);if(At&&!(ss(At)&&G1(At,me)))return zt(r.getGeneratedNameForNode(ko(At)),me)}return me}function G1(me,At){let di=xo(At);if(!di||di===me||di.end<=me.pos||di.pos>=me.end)return!1;const gi=j0(me);for(;di;){if(di===gi||di===me)return!1;if(Vd(di)&&di.parent===me)return!0;di=di.parent}return!1}function rp(me){return Q&1&&F&16?zt(fe(),me):me}function Xv(me,At){return da(At)?r.getInternalName(me):r.createPropertyAccessExpression(r.getInternalName(me),"prototype")}function Tg(me,At){if(!me||!At||Rt(me.parameters))return!1;const di=lu(me.body.statements);if(!di||!oc(di)||di.kind!==244)return!1;const gi=di.expression;if(!oc(gi)||gi.kind!==213)return!1;const dn=gi.expression;if(!oc(dn)||dn.kind!==108)return!1;const Vn=a_(gi.arguments);if(!Vn||!oc(Vn)||Vn.kind!==230)return!1;const Lr=Vn.expression;return lt(Lr)&&Lr.escapedText==="arguments"}}function MAt(t){switch(t){case 2:return"return";case 3:return"break";case 4:return"yield";case 5:return"yield*";case 7:return"endfinally";default:return}}function LEe(t){const{factory:r,getEmitHelperFactory:a,resumeLexicalEnvironment:u,endLexicalEnvironment:h,hoistFunctionDeclaration:p,hoistVariableDeclaration:m}=t,C=t.getCompilerOptions(),b=il(C),T=t.getEmitResolver(),E=t.onSubstituteNode;t.onSubstituteNode=Bt;let N,R,F,j,U,q,Q,re,Y,ue,te=1,Se,oe,pe,ye,be=0,_e=0,ve,Ee,ke,Fe,Oe,fe,Ie,Le;return Q0(t,et);function et(it){if(it.isDeclarationFile||!(it.transformFlags&2048))return it;const ai=cn(it,He,t);return Jb(ai,t.readEmitHelpers()),ai}function He(it){const ai=it.transformFlags;return j?We(it):F?Ue(it):rc(it)&&it.asteriskToken?wt(it):ai&2048?cn(it,He,t):it}function We(it){switch(it.kind){case 246:return ha(it);case 247:return ji(it);case 255:return qt(it);case 256:return ii(it);default:return Ue(it)}}function Ue(it){switch(it.kind){case 262:return nt(it);case 218:return ze(it);case 177:case 178:return st(it);case 243:return Et(it);case 248:return St(it);case 249:return xe(it);case 252:return Je(it);case 251:return Re(it);case 253:return kt(it);default:return it.transformFlags&1048576?Ye(it):it.transformFlags&4196352?cn(it,He,t):it}}function Ye(it){switch(it.kind){case 226:return ft(it);case 355:return Ui(it);case 227:return Mi(it);case 229:return Ai(it);case 209:return Rn(it);case 210:return Hi(it);case 212:return Hs(it);case 213:return Wo(it);case 214:return ts(it);default:return cn(it,He,t)}}function wt(it){switch(it.kind){case 262:return nt(it);case 218:return ze(it);default:return z.failBadSyntaxKind(it)}}function nt(it){if(it.asteriskToken)it=Er(zt(r.createFunctionDeclaration(it.modifiers,void 0,it.name,void 0,Su(it.parameters,He,t),void 0,xt(it.body)),it),it);else{const ai=F,Sn=j;F=!1,j=!1,it=cn(it,He,t),F=ai,j=Sn}if(F){p(it);return}else return it}function ze(it){if(it.asteriskToken)it=Er(zt(r.createFunctionExpression(void 0,void 0,it.name,void 0,Su(it.parameters,He,t),void 0,xt(it.body)),it),it);else{const ai=F,Sn=j;F=!1,j=!1,it=cn(it,He,t),F=ai,j=Sn}return it}function st(it){const ai=F,Sn=j;return F=!1,j=!1,it=cn(it,He,t),F=ai,j=Sn,it}function xt(it){const ai=[],Sn=F,uo=j,rl=U,hl=q,Mu=Q,Ld=re,Xl=Y,$l=ue,Ju=te,np=Se,ev=oe,xg=pe,U_=ye;F=!0,j=!1,U=void 0,q=void 0,Q=void 0,re=void 0,Y=void 0,ue=void 0,te=1,Se=void 0,oe=void 0,pe=void 0,ye=r.createTempVariable(void 0),u();const nm=r.copyPrologue(it.statements,ai,!1,He);Fo(it.statements,nm);const kg=ct();return qy(ai,h()),ai.push(r.createReturnStatement(kg)),F=Sn,j=uo,U=rl,q=hl,Q=Mu,re=Ld,Y=Xl,ue=$l,te=Ju,Se=np,oe=ev,pe=xg,ye=U_,zt(r.createBlock(ai,it.multiLine),it)}function Et(it){if(it.transformFlags&1048576){lr(it.declarationList);return}else{if(Ya(it)&2097152)return it;for(const Sn of it.declarationList.declarations)m(Sn.name);const ai=j8(it.declarationList);return ai.length===0?void 0:$a(r.createExpressionStatement(r.inlineExpressions(Yt(ai,as))),it)}}function ft(it){const ai=goe(it);switch(ai){case 0:return Oi(it);case 1:return Ht(it);default:return z.assertNever(ai)}}function Ht(it){const{left:ai,right:Sn}=it;if(ce(Sn)){let uo;switch(ai.kind){case 211:uo=r.updatePropertyAccessExpression(ai,de(z.checkDefined(Ct(ai.expression,He,M_))),ai.name);break;case 212:uo=r.updateElementAccessExpression(ai,de(z.checkDefined(Ct(ai.expression,He,M_))),de(z.checkDefined(Ct(ai.argumentExpression,He,Ut))));break;default:uo=z.checkDefined(Ct(ai,He,Ut));break}const rl=it.operatorToken.kind;return V7(rl)?zt(r.createAssignment(uo,zt(r.createBinaryExpression(de(uo),H7(rl),z.checkDefined(Ct(Sn,He,Ut))),it)),it):r.updateBinaryExpression(it,uo,it.operatorToken,z.checkDefined(Ct(Sn,He,Ut)))}return cn(it,He,t)}function Oi(it){return ce(it.right)?Kxe(it.operatorToken.kind)?bn(it):it.operatorToken.kind===28?Ji(it):r.updateBinaryExpression(it,de(z.checkDefined(Ct(it.left,He,Ut))),it.operatorToken,z.checkDefined(Ct(it.right,He,Ut))):cn(it,He,t)}function Ji(it){let ai=[];return Sn(it.left),Sn(it.right),r.inlineExpressions(ai);function Sn(uo){cr(uo)&&uo.operatorToken.kind===28?(Sn(uo.left),Sn(uo.right)):(ce(uo)&&ai.length>0&&(J(1,[r.createExpressionStatement(r.inlineExpressions(ai))]),ai=[]),ai.push(z.checkDefined(Ct(uo,He,Ut))))}}function Ui(it){let ai=[];for(const Sn of it.elements)cr(Sn)&&Sn.operatorToken.kind===28?ai.push(Ji(Sn)):(ce(Sn)&&ai.length>0&&(J(1,[r.createExpressionStatement(r.inlineExpressions(ai))]),ai=[]),ai.push(z.checkDefined(Ct(Sn,He,Ut))));return r.inlineExpressions(ai)}function bn(it){const ai=Ae(),Sn=tt();return Ul(Sn,z.checkDefined(Ct(it.left,He,Ut)),it.left),it.operatorToken.kind===56?wu(ai,Sn,it.left):Li(ai,Sn,it.left),Ul(Sn,z.checkDefined(Ct(it.right,He,Ut)),it.right),Ke(ai),Sn}function Mi(it){if(ce(it.whenTrue)||ce(it.whenFalse)){const ai=Ae(),Sn=Ae(),uo=tt();return wu(ai,z.checkDefined(Ct(it.condition,He,Ut)),it.condition),Ul(uo,z.checkDefined(Ct(it.whenTrue,He,Ut)),it.whenTrue),wl(Sn),Ke(ai),Ul(uo,z.checkDefined(Ct(it.whenFalse,He,Ut)),it.whenFalse),Ke(Sn),uo}return cn(it,He,t)}function Ai(it){const ai=Ae(),Sn=Ct(it.expression,He,Ut);if(it.asteriskToken){const uo=Ya(it.expression)&8388608?Sn:zt(a().createValuesHelper(Sn),it);zh(uo,it)}else Uh(Sn,it);return Ke(ai),Wf(it)}function Rn(it){return bs(it.elements,void 0,void 0,it.multiLine)}function bs(it,ai,Sn,uo){const rl=ut(it);let hl;if(rl>0){hl=tt();const Xl=wn(it,He,Ut,0,rl);Ul(hl,r.createArrayLiteralExpression(ai?[ai,...Xl]:Xl)),ai=void 0}const Mu=nd(it,Ld,[],rl);return hl?r.createArrayConcatCall(hl,[r.createArrayLiteralExpression(Mu,uo)]):zt(r.createArrayLiteralExpression(ai?[ai,...Mu]:Mu,uo),Sn);function Ld(Xl,$l){if(ce($l)&&Xl.length>0){const Ju=hl!==void 0;hl||(hl=tt()),Ul(hl,Ju?r.createArrayConcatCall(hl,[r.createArrayLiteralExpression(Xl,uo)]):r.createArrayLiteralExpression(ai?[ai,...Xl]:Xl,uo)),ai=void 0,Xl=[]}return Xl.push(z.checkDefined(Ct($l,He,Ut))),Xl}}function Hi(it){const ai=it.properties,Sn=it.multiLine,uo=ut(ai),rl=tt();Ul(rl,r.createObjectLiteralExpression(wn(ai,He,Fb,0,uo),Sn));const hl=nd(ai,Mu,[],uo);return hl.push(Sn?mh(ml(zt(r.cloneNode(rl),rl),rl.parent)):rl),r.inlineExpressions(hl);function Mu(Ld,Xl){ce(Xl)&&Ld.length>0&&(Mc(r.createExpressionStatement(r.inlineExpressions(Ld))),Ld=[]);const $l=gTe(r,it,Xl,rl),Ju=Ct($l,He,Ut);return Ju&&(Sn&&mh(Ju),Ld.push(Ju)),Ld}}function Hs(it){return ce(it.argumentExpression)?r.updateElementAccessExpression(it,de(z.checkDefined(Ct(it.expression,He,M_))),z.checkDefined(Ct(it.argumentExpression,He,Ut))):cn(it,He,t)}function Wo(it){if(!Gp(it)&&W(it.arguments,ce)){const{target:ai,thisArg:Sn}=r.createCallBinding(it.expression,m,b,!0);return Er(zt(r.createFunctionApplyCall(de(z.checkDefined(Ct(ai,He,M_))),Sn,bs(it.arguments)),it),it)}return cn(it,He,t)}function ts(it){if(W(it.arguments,ce)){const{target:ai,thisArg:Sn}=r.createCallBinding(r.createPropertyAccessExpression(it.expression,"bind"),m);return Er(zt(r.createNewExpression(r.createFunctionApplyCall(de(z.checkDefined(Ct(ai,He,Ut))),Sn,bs(it.arguments,r.createVoidZero())),void 0,[]),it),it)}return cn(it,He,t)}function Fo(it,ai=0){const Sn=it.length;for(let uo=ai;uo0)break;rl.push(as(Mu))}rl.length&&(Mc(r.createExpressionStatement(r.inlineExpressions(rl))),uo+=rl.length,rl=[])}}function as(it){return $a(r.createAssignment($a(r.cloneNode(it.name),it.name),z.checkDefined(Ct(it.initializer,He,Ut))),it)}function fs(it){if(ce(it))if(ce(it.thenStatement)||ce(it.elseStatement)){const ai=Ae(),Sn=it.elseStatement?Ae():void 0;wu(it.elseStatement?Sn:ai,z.checkDefined(Ct(it.expression,He,Ut)),it.expression),Cn(it.thenStatement),it.elseStatement&&(wl(ai),Ke(Sn),Cn(it.elseStatement)),Ke(ai)}else Mc(Ct(it,He,Es));else Mc(Ct(it,He,Es))}function Ds(it){if(ce(it)){const ai=Ae(),Sn=Ae();Ar(ai),Ke(Sn),Cn(it.statement),Ke(ai),Li(Sn,z.checkDefined(Ct(it.expression,He,Ut))),is()}else Mc(Ct(it,He,Es))}function ha(it){return j?(to(),it=cn(it,He,t),is(),it):cn(it,He,t)}function Yo(it){if(ce(it)){const ai=Ae(),Sn=Ar(ai);Ke(ai),wu(Sn,z.checkDefined(Ct(it.expression,He,Ut))),Cn(it.statement),wl(ai),is()}else Mc(Ct(it,He,Es))}function ji(it){return j?(to(),it=cn(it,He,t),is(),it):cn(it,He,t)}function fl(it){if(ce(it)){const ai=Ae(),Sn=Ae(),uo=Ar(Sn);if(it.initializer){const rl=it.initializer;wf(rl)?lr(rl):Mc(zt(r.createExpressionStatement(z.checkDefined(Ct(rl,He,Ut))),rl))}Ke(ai),it.condition&&wu(uo,z.checkDefined(Ct(it.condition,He,Ut))),Cn(it.statement),Ke(Sn),it.incrementor&&Mc(zt(r.createExpressionStatement(z.checkDefined(Ct(it.incrementor,He,Ut))),it.incrementor)),wl(ai),is()}else Mc(Ct(it,He,Es))}function St(it){j&&to();const ai=it.initializer;if(ai&&wf(ai)){for(const uo of ai.declarations)m(uo.name);const Sn=j8(ai);it=r.updateForStatement(it,Sn.length>0?r.inlineExpressions(Yt(Sn,as)):void 0,Ct(it.condition,He,Ut),Ct(it.incrementor,He,Ut),v_(it.statement,He,t))}else it=cn(it,He,t);return j&&is(),it}function Ot(it){if(ce(it)){const ai=tt(),Sn=tt(),uo=tt(),rl=r.createLoopVariable(),hl=it.initializer;m(rl),Ul(ai,z.checkDefined(Ct(it.expression,He,Ut))),Ul(Sn,r.createArrayLiteralExpression()),Mc(r.createForInStatement(uo,ai,r.createExpressionStatement(r.createCallExpression(r.createPropertyAccessExpression(Sn,"push"),void 0,[uo])))),Ul(rl,r.createNumericLiteral(0));const Mu=Ae(),Ld=Ae(),Xl=Ar(Ld);Ke(Mu),wu(Xl,r.createLessThan(rl,r.createPropertyAccessExpression(Sn,"length"))),Ul(uo,r.createElementAccessExpression(Sn,rl)),wu(Ld,r.createBinaryExpression(uo,103,ai));let $l;if(wf(hl)){for(const Ju of hl.declarations)m(Ju.name);$l=r.cloneNode(hl.declarations[0].name)}else $l=z.checkDefined(Ct(hl,He,Ut)),z.assert(M_($l));Ul($l,uo),Cn(it.statement),Ke(Ld),Mc(r.createExpressionStatement(r.createPostfixIncrement(rl))),wl(Mu),is()}else Mc(Ct(it,He,Es))}function xe(it){j&&to();const ai=it.initializer;if(wf(ai)){for(const Sn of ai.declarations)m(Sn.name);it=r.updateForInStatement(it,ai.declarations[0].name,z.checkDefined(Ct(it.expression,He,Ut)),z.checkDefined(Ct(it.statement,He,Es,r.liftToBlock)))}else it=cn(it,He,t);return j&&is(),it}function Pt(it){const ai=Ps(it.label?dr(it.label):void 0);ai>0?wl(ai,it):Mc(it)}function Re(it){if(j){const ai=Ps(it.label&&dr(it.label));if(ai>0)return wh(ai,it)}return cn(it,He,t)}function mt(it){const ai=$s(it.label?dr(it.label):void 0);ai>0?wl(ai,it):Mc(it)}function Je(it){if(j){const ai=$s(it.label&&dr(it.label));if(ai>0)return wh(ai,it)}return cn(it,He,t)}function pt(it){z_(Ct(it.expression,He,Ut),it)}function kt(it){return Tu(Ct(it.expression,He,Ut),it)}function Ci(it){ce(it)?(fn(de(z.checkDefined(Ct(it.expression,He,Ut)))),Cn(it.statement),kn()):Mc(Ct(it,He,Es))}function $e(it){if(ce(it.caseBlock)){const ai=it.caseBlock,Sn=ai.clauses.length,uo=Tn(),rl=de(z.checkDefined(Ct(it.expression,He,Ut))),hl=[];let Mu=-1;for(let $l=0;$l0)break;Xl.push(r.createCaseClause(z.checkDefined(Ct(np.expression,He,Ut)),[wh(hl[Ju],np.expression)]))}else $l++}Xl.length&&(Mc(r.createSwitchStatement(rl,r.createCaseBlock(Xl))),Ld+=Xl.length,Xl=[]),$l>0&&(Ld+=$l,$l=0)}Mu>=0?wl(hl[Mu]):wl(uo);for(let $l=0;$l=0;Sn--){const uo=re[Sn];if(co(uo)){if(uo.labelText===it)return!0}else break}return!1}function $s(it){if(re)if(it)for(let ai=re.length-1;ai>=0;ai--){const Sn=re[ai];if(co(Sn)&&Sn.labelText===it)return Sn.breakLabel;if(zl(Sn)&&Ic(it,ai-1))return Sn.breakLabel}else for(let ai=re.length-1;ai>=0;ai--){const Sn=re[ai];if(zl(Sn))return Sn.breakLabel}return 0}function Ps(it){if(re)if(it)for(let ai=re.length-1;ai>=0;ai--){const Sn=re[ai];if(ca(Sn)&&Ic(it,ai-1))return Sn.continueLabel}else for(let ai=re.length-1;ai>=0;ai--){const Sn=re[ai];if(ca(Sn))return Sn.continueLabel}return 0}function pf(it){if(it!==void 0&&it>0){ue===void 0&&(ue=[]);const ai=r.createNumericLiteral(Number.MAX_SAFE_INTEGER);return ue[it]===void 0?ue[it]=[ai]:ue[it].push(ai),ai}return r.createOmittedExpression()}function qc(it){const ai=r.createNumericLiteral(it);return NG(ai,3,MAt(it)),ai}function wh(it,ai){return z.assertLessThan(0,it,"Invalid label"),zt(r.createReturnStatement(r.createArrayLiteralExpression([qc(3),pf(it)])),ai)}function Tu(it,ai){return zt(r.createReturnStatement(r.createArrayLiteralExpression(it?[qc(2),it]:[qc(2)])),ai)}function Wf(it){return zt(r.createCallExpression(r.createPropertyAccessExpression(ye,"sent"),void 0,[]),it)}function za(){J(0)}function Mc(it){it?J(1,[it]):za()}function Ul(it,ai,Sn){J(2,[it,ai],Sn)}function wl(it,ai){J(3,[it],ai)}function Li(it,ai,Sn){J(4,[it,ai],Sn)}function wu(it,ai,Sn){J(5,[it,ai],Sn)}function zh(it,ai){J(7,[it],ai)}function Uh(it,ai){J(6,[it],ai)}function z_(it,ai){J(8,[it],ai)}function Rc(it,ai){J(9,[it],ai)}function Qc(){J(10)}function J(it,ai,Sn){Se===void 0&&(Se=[],oe=[],pe=[]),Y===void 0&&Ke(Ae());const uo=Se.length;Se[uo]=it,oe[uo]=ai,pe[uo]=Sn}function ct(){be=0,_e=0,ve=void 0,Ee=!1,ke=!1,Fe=void 0,Oe=void 0,fe=void 0,Ie=void 0,Le=void 0;const it=Wt();return a().createGeneratorHelper(ir(r.createFunctionExpression(void 0,void 0,void 0,void 0,[r.createParameterDeclaration(void 0,void 0,ye)],void 0,r.createBlock(it,it.length>0)),1048576))}function Wt(){if(Se){for(let it=0;it=0;ai--){const Sn=Le[ai];Oe=[r.createWithStatement(Sn.expression,r.createBlock(Oe))]}if(Ie){const{startLabel:ai,catchLabel:Sn,finallyLabel:uo,endLabel:rl}=Ie;Oe.unshift(r.createExpressionStatement(r.createCallExpression(r.createPropertyAccessExpression(r.createPropertyAccessExpression(ye,"trys"),"push"),void 0,[r.createArrayLiteralExpression([pf(ai),pf(Sn),pf(uo),pf(rl)])]))),Ie=void 0}it&&Oe.push(r.createExpressionStatement(r.createAssignment(r.createPropertyAccessExpression(ye,"label"),r.createNumericLiteral(_e+1))))}Fe.push(r.createCaseClause(r.createNumericLiteral(_e),Oe||[])),Oe=void 0}function br(it){if(Y)for(let ai=0;aia.createAssignment(a.createPropertyAccessExpression(a.createIdentifier("exports"),a.createIdentifier(dr(Ke))),Ae),a.createVoidZero())));for(const de of q.exportedFunctions)St(ut,de);xi(ut,Ct(q.externalHelpersImportDeclaration,ve,Es)),un(ut,wn(ce.statements,ve,Es,le)),_e(ut,!1),qy(ut,p());const je=a.updateSourceFile(ce,zt(a.createNodeArray(ut),ce.statements));return Jb(je,t.readEmitHelpers()),je}function Se(ce){const ut=a.createIdentifier("define"),Bt=yV(a,ce,T,C),le=Dm(ce)&&ce,{aliasedModuleNames:je,unaliasedModuleNames:de,importAliasNames:tt}=pe(ce,!0),Ae=a.updateSourceFile(ce,zt(a.createNodeArray([a.createExpressionStatement(a.createCallExpression(ut,void 0,[...Bt?[Bt]:[],a.createArrayLiteralExpression(le?x:[a.createStringLiteral("require"),a.createStringLiteral("exports"),...je,...de]),le?le.statements.length?le.statements[0].expression:a.createObjectLiteralExpression():a.createFunctionExpression(void 0,void 0,void 0,void 0,[a.createParameterDeclaration(void 0,void 0,"require"),a.createParameterDeclaration(void 0,void 0,"exports"),...tt],void 0,be(ce))]))]),ce.statements));return Jb(Ae,t.readEmitHelpers()),Ae}function oe(ce){const{aliasedModuleNames:ut,unaliasedModuleNames:Bt,importAliasNames:le}=pe(ce,!1),je=yV(a,ce,T,C),de=a.createFunctionExpression(void 0,void 0,void 0,void 0,[a.createParameterDeclaration(void 0,void 0,"factory")],void 0,zt(a.createBlock([a.createIfStatement(a.createLogicalAnd(a.createTypeCheck(a.createIdentifier("module"),"object"),a.createTypeCheck(a.createPropertyAccessExpression(a.createIdentifier("module"),"exports"),"object")),a.createBlock([a.createVariableStatement(void 0,[a.createVariableDeclaration("v",void 0,void 0,a.createCallExpression(a.createIdentifier("factory"),void 0,[a.createIdentifier("require"),a.createIdentifier("exports")]))]),ir(a.createIfStatement(a.createStrictInequality(a.createIdentifier("v"),a.createIdentifier("undefined")),a.createExpressionStatement(a.createAssignment(a.createPropertyAccessExpression(a.createIdentifier("module"),"exports"),a.createIdentifier("v")))),1)]),a.createIfStatement(a.createLogicalAnd(a.createTypeCheck(a.createIdentifier("define"),"function"),a.createPropertyAccessExpression(a.createIdentifier("define"),"amd")),a.createBlock([a.createExpressionStatement(a.createCallExpression(a.createIdentifier("define"),void 0,[...je?[je]:[],a.createArrayLiteralExpression([a.createStringLiteral("require"),a.createStringLiteral("exports"),...ut,...Bt]),a.createIdentifier("factory")]))])))],!0),void 0)),tt=a.updateSourceFile(ce,zt(a.createNodeArray([a.createExpressionStatement(a.createCallExpression(de,void 0,[a.createFunctionExpression(void 0,void 0,void 0,void 0,[a.createParameterDeclaration(void 0,void 0,"require"),a.createParameterDeclaration(void 0,void 0,"exports"),...le],void 0,be(ce))]))]),ce.statements));return Jb(tt,t.readEmitHelpers()),tt}function pe(ce,ut){const Bt=[],le=[],je=[];for(const de of ce.amdDependencies)de.name?(Bt.push(a.createStringLiteral(de.path)),je.push(a.createParameterDeclaration(void 0,void 0,de.name))):le.push(a.createStringLiteral(de.path));for(const de of q.externalImports){const tt=OP(a,de,U,T,b,C),Ae=f3(a,de,U);tt&&(ut&&Ae?(ir(Ae,8),Bt.push(tt),je.push(a.createParameterDeclaration(void 0,void 0,Ae))):le.push(tt))}return{aliasedModuleNames:Bt,unaliasedModuleNames:le,importAliasNames:je}}function ye(ce){if(kd(ce)||$u(ce)||!OP(a,ce,U,T,b,C))return;const ut=f3(a,ce,U),Bt=Wo(ce,ut);if(Bt!==ut)return a.createExpressionStatement(a.createAssignment(ut,Bt))}function be(ce){h();const ut=[],Bt=a.copyPrologue(ce.statements,ut,!0,ve);ue()&&xi(ut,Pt()),Rt(q.exportedNames)&&xi(ut,a.createExpressionStatement(nd(q.exportedNames,(je,de)=>a.createAssignment(a.createPropertyAccessExpression(a.createIdentifier("exports"),a.createIdentifier(dr(de))),je),a.createVoidZero())));for(const je of q.exportedFunctions)St(ut,je);xi(ut,Ct(q.externalHelpersImportDeclaration,ve,Es)),N===2&&un(ut,ns(q.externalImports,ye)),un(ut,wn(ce.statements,ve,Es,Bt)),_e(ut,!0),qy(ut,p());const le=a.createBlock(ut,!0);return re&&vP(le,RAt),le}function _e(ce,ut){if(q.exportEquals){const Bt=Ct(q.exportEquals.expression,Fe,Ut);if(Bt)if(ut){const le=a.createReturnStatement(Bt);zt(le,q.exportEquals),ir(le,3840),ce.push(le)}else{const le=a.createExpressionStatement(a.createAssignment(a.createPropertyAccessExpression(a.createIdentifier("module"),"exports"),Bt));zt(le,q.exportEquals),ir(le,3072),ce.push(le)}}}function ve(ce){switch(ce.kind){case 272:return ts(ce);case 271:return Cn(ce);case 278:return Ko(ce);case 277:return ot(ce);default:return Ee(ce)}}function Ee(ce){switch(ce.kind){case 243:return lr(ce);case 262:return hi(ce);case 263:return hn(ce);case 248:return Le(ce,!0);case 249:return et(ce);case 250:return He(ce);case 246:return We(ce);case 247:return Ue(ce);case 256:return Ye(ce);case 254:return wt(ce);case 245:return nt(ce);case 255:return ze(ce);case 269:return st(ce);case 296:return xt(ce);case 297:return Et(ce);case 258:return ft(ce);case 299:return Ht(ce);case 241:return Oi(ce);default:return Fe(ce)}}function ke(ce,ut){if(!(ce.transformFlags&276828160))return ce;switch(ce.kind){case 248:return Le(ce,!1);case 244:return Ji(ce);case 217:return Ui(ce,ut);case 354:return bn(ce,ut);case 213:if(Gp(ce)&&U.impliedNodeFormat===void 0)return Ai(ce);break;case 226:if(dS(ce))return Ie(ce,ut);break;case 224:case 225:return Mi(ce,ut)}return cn(ce,Fe,t)}function Fe(ce){return ke(ce,!1)}function Oe(ce){return ke(ce,!0)}function fe(ce){if(Pa(ce))for(const ut of ce.properties)switch(ut.kind){case 303:if(fe(ut.initializer))return!0;break;case 304:if(fe(ut.name))return!0;break;case 305:if(fe(ut.expression))return!0;break;case 174:case 177:case 178:return!1;default:z.assertNever(ut,"Unhandled object member kind")}else if(Rf(ce)){for(const ut of ce.elements)if(Zg(ut)){if(fe(ut.expression))return!0}else if(fe(ut))return!0}else if(lt(ce))return O(wi(ce))>(YG(ce)?1:0);return!1}function Ie(ce,ut){return fe(ce.left)?TI(ce,Fe,t,0,!ut,as):cn(ce,Fe,t)}function Le(ce,ut){if(ut&&ce.initializer&&wf(ce.initializer)&&!(ce.initializer.flags&7)){const Bt=ji(void 0,ce.initializer,!1);if(Bt){const le=[],je=Ct(ce.initializer,Oe,wf),de=a.createVariableStatement(void 0,je);le.push(de),un(le,Bt);const tt=Ct(ce.condition,Fe,Ut),Ae=Ct(ce.incrementor,Oe,Ut),Ke=v_(ce.statement,ut?Ee:Fe,t);return le.push(a.updateForStatement(ce,void 0,tt,Ae,Ke)),le}}return a.updateForStatement(ce,Ct(ce.initializer,Oe,$g),Ct(ce.condition,Fe,Ut),Ct(ce.incrementor,Oe,Ut),v_(ce.statement,ut?Ee:Fe,t))}function et(ce){if(wf(ce.initializer)&&!(ce.initializer.flags&7)){const ut=ji(void 0,ce.initializer,!0);if(Rt(ut)){const Bt=Ct(ce.initializer,Oe,$g),le=Ct(ce.expression,Fe,Ut),je=v_(ce.statement,Ee,t),de=Ho(je)?a.updateBlock(je,[...ut,...je.statements]):a.createBlock([...ut,je],!0);return a.updateForInStatement(ce,Bt,le,de)}}return a.updateForInStatement(ce,Ct(ce.initializer,Oe,$g),Ct(ce.expression,Fe,Ut),v_(ce.statement,Ee,t))}function He(ce){if(wf(ce.initializer)&&!(ce.initializer.flags&7)){const ut=ji(void 0,ce.initializer,!0),Bt=Ct(ce.initializer,Oe,$g),le=Ct(ce.expression,Fe,Ut);let je=v_(ce.statement,Ee,t);return Rt(ut)&&(je=Ho(je)?a.updateBlock(je,[...ut,...je.statements]):a.createBlock([...ut,je],!0)),a.updateForOfStatement(ce,ce.awaitModifier,Bt,le,je)}return a.updateForOfStatement(ce,ce.awaitModifier,Ct(ce.initializer,Oe,$g),Ct(ce.expression,Fe,Ut),v_(ce.statement,Ee,t))}function We(ce){return a.updateDoStatement(ce,v_(ce.statement,Ee,t),Ct(ce.expression,Fe,Ut))}function Ue(ce){return a.updateWhileStatement(ce,Ct(ce.expression,Fe,Ut),v_(ce.statement,Ee,t))}function Ye(ce){return a.updateLabeledStatement(ce,ce.label,z.checkDefined(Ct(ce.statement,Ee,Es,a.liftToBlock)))}function wt(ce){return a.updateWithStatement(ce,Ct(ce.expression,Fe,Ut),z.checkDefined(Ct(ce.statement,Ee,Es,a.liftToBlock)))}function nt(ce){return a.updateIfStatement(ce,Ct(ce.expression,Fe,Ut),z.checkDefined(Ct(ce.thenStatement,Ee,Es,a.liftToBlock)),Ct(ce.elseStatement,Ee,Es,a.liftToBlock))}function ze(ce){return a.updateSwitchStatement(ce,Ct(ce.expression,Fe,Ut),z.checkDefined(Ct(ce.caseBlock,Ee,y7)))}function st(ce){return a.updateCaseBlock(ce,wn(ce.clauses,Ee,z$))}function xt(ce){return a.updateCaseClause(ce,Ct(ce.expression,Fe,Ut),wn(ce.statements,Ee,Es))}function Et(ce){return cn(ce,Ee,t)}function ft(ce){return cn(ce,Ee,t)}function Ht(ce){return a.updateCatchClause(ce,ce.variableDeclaration,z.checkDefined(Ct(ce.block,Ee,Ho)))}function Oi(ce){return ce=cn(ce,Ee,t),ce}function Ji(ce){return a.updateExpressionStatement(ce,Ct(ce.expression,Oe,Ut))}function Ui(ce,ut){return a.updateParenthesizedExpression(ce,Ct(ce.expression,ut?Oe:Fe,Ut))}function bn(ce,ut){return a.updatePartiallyEmittedExpression(ce,Ct(ce.expression,ut?Oe:Fe,Ut))}function Mi(ce,ut){if((ce.operator===46||ce.operator===47)&<(ce.operand)&&!jc(ce.operand)&&!Xb(ce.operand)&&!Boe(ce.operand)){const Bt=wi(ce.operand);if(Bt){let le,je=Ct(ce.operand,Fe,Ut);tx(ce)?je=a.updatePrefixUnaryExpression(ce,je):(je=a.updatePostfixUnaryExpression(ce,je),ut||(le=a.createTempVariable(m),je=a.createAssignment(le,je),zt(je,ce)),je=a.createComma(je,a.cloneNode(ce.operand)),zt(je,ce));for(const de of Bt)Q[Tl(je)]=!0,je=mt(de,je),zt(je,ce);return le&&(Q[Tl(je)]=!0,je=a.createComma(je,le),zt(je,ce)),je}}return cn(ce,Fe,t)}function Ai(ce){if(N===0&&E>=7)return cn(ce,Fe,t);const ut=OP(a,ce,U,T,b,C),Bt=Ct(lu(ce.arguments),Fe,Ut),le=ut&&(!Bt||!ja(Bt)||Bt.text!==ut.text)?ut:Bt,je=!!(ce.transformFlags&16384);switch(C.module){case 2:return bs(le,je);case 3:return Rn(le??a.createVoidZero(),je);case 1:default:return Hi(le)}}function Rn(ce,ut){if(re=!0,iD(ce)){const Bt=jc(ce)?ce:ja(ce)?a.createStringLiteralFromNode(ce):ir(zt(a.cloneNode(ce),ce),3072);return a.createConditionalExpression(a.createIdentifier("__syncRequire"),void 0,Hi(ce),void 0,bs(Bt,ut))}else{const Bt=a.createTempVariable(m);return a.createComma(a.createAssignment(Bt,ce),a.createConditionalExpression(a.createIdentifier("__syncRequire"),void 0,Hi(Bt,!0),void 0,bs(Bt,ut)))}}function bs(ce,ut){const Bt=a.createUniqueName("resolve"),le=a.createUniqueName("reject"),je=[a.createParameterDeclaration(void 0,void 0,Bt),a.createParameterDeclaration(void 0,void 0,le)],de=a.createBlock([a.createExpressionStatement(a.createCallExpression(a.createIdentifier("require"),void 0,[a.createArrayLiteralExpression([ce||a.createOmittedExpression()]),Bt,le]))]);let tt;E>=2?tt=a.createArrowFunction(void 0,void 0,je,void 0,void 0,de):(tt=a.createFunctionExpression(void 0,void 0,void 0,void 0,je,void 0,de),ut&&ir(tt,16));const Ae=a.createNewExpression(a.createIdentifier("Promise"),void 0,[tt]);return Xy(C)?a.createCallExpression(a.createPropertyAccessExpression(Ae,a.createIdentifier("then")),void 0,[u().createImportStarCallbackHelper()]):Ae}function Hi(ce,ut){const Bt=ce&&!z1(ce)&&!ut,le=a.createCallExpression(a.createPropertyAccessExpression(a.createIdentifier("Promise"),"resolve"),void 0,Bt?E>=2?[a.createTemplateExpression(a.createTemplateHead(""),[a.createTemplateSpan(ce,a.createTemplateTail(""))])]:[a.createCallExpression(a.createPropertyAccessExpression(a.createStringLiteral(""),"concat"),void 0,[ce])]:[]);let je=a.createCallExpression(a.createIdentifier("require"),void 0,Bt?[a.createIdentifier("s")]:ce?[ce]:[]);Xy(C)&&(je=u().createImportStarHelper(je));const de=Bt?[a.createParameterDeclaration(void 0,void 0,"s")]:[];let tt;return E>=2?tt=a.createArrowFunction(void 0,void 0,de,void 0,void 0,je):tt=a.createFunctionExpression(void 0,void 0,void 0,void 0,de,void 0,a.createBlock([a.createReturnStatement(je)])),a.createCallExpression(a.createPropertyAccessExpression(le,"then"),void 0,[tt])}function Hs(ce,ut){return!Xy(C)||d0(ce)&2?ut:ZDe(ce)?u().createImportStarHelper(ut):ut}function Wo(ce,ut){return!Xy(C)||d0(ce)&2?ut:FK(ce)?u().createImportStarHelper(ut):nce(ce)?u().createImportDefaultHelper(ut):ut}function ts(ce){let ut;const Bt=F6(ce);if(N!==2)if(ce.importClause){const le=[];Bt&&!KL(ce)?le.push(a.createVariableDeclaration(a.cloneNode(Bt.name),void 0,void 0,Wo(ce,Fo(ce)))):(le.push(a.createVariableDeclaration(a.getGeneratedNameForNode(ce),void 0,void 0,Wo(ce,Fo(ce)))),Bt&&KL(ce)&&le.push(a.createVariableDeclaration(a.cloneNode(Bt.name),void 0,void 0,a.getGeneratedNameForNode(ce)))),ut=xi(ut,Er(zt(a.createVariableStatement(void 0,a.createVariableDeclarationList(le,E>=2?2:0)),ce),ce))}else return Er(zt(a.createExpressionStatement(Fo(ce)),ce),ce);else Bt&&KL(ce)&&(ut=xi(ut,a.createVariableStatement(void 0,a.createVariableDeclarationList([Er(zt(a.createVariableDeclaration(a.cloneNode(Bt.name),void 0,void 0,a.getGeneratedNameForNode(ce)),ce),ce)],E>=2?2:0))));return ut=Ds(ut,ce),ag(ut)}function Fo(ce){const ut=OP(a,ce,U,T,b,C),Bt=[];return ut&&Bt.push(ut),a.createCallExpression(a.createIdentifier("require"),void 0,Bt)}function Cn(ce){z.assert(Lk(ce),"import= for internal module references should be handled in an earlier transformer.");let ut;return N!==2?Kr(ce,32)?ut=xi(ut,Er(zt(a.createExpressionStatement(mt(ce.name,Fo(ce))),ce),ce)):ut=xi(ut,Er(zt(a.createVariableStatement(void 0,a.createVariableDeclarationList([a.createVariableDeclaration(a.cloneNode(ce.name),void 0,void 0,Fo(ce))],E>=2?2:0)),ce),ce)):Kr(ce,32)&&(ut=xi(ut,Er(zt(a.createExpressionStatement(mt(a.getExportName(ce),a.getLocalName(ce))),ce),ce))),ut=ha(ut,ce),ag(ut)}function Ko(ce){if(!ce.moduleSpecifier)return;const ut=a.getGeneratedNameForNode(ce);if(ce.exportClause&&Yg(ce.exportClause)){const Bt=[];N!==2&&Bt.push(Er(zt(a.createVariableStatement(void 0,a.createVariableDeclarationList([a.createVariableDeclaration(ut,void 0,void 0,Fo(ce))])),ce),ce));for(const le of ce.exportClause.elements){const je=!!Xy(C)&&!(d0(ce)&2)&&dr(le.propertyName||le.name)==="default",de=a.createPropertyAccessExpression(je?u().createImportDefaultHelper(ut):ut,le.propertyName||le.name);Bt.push(Er(zt(a.createExpressionStatement(mt(a.getExportName(le),de,void 0,!0)),le),le))}return ag(Bt)}else if(ce.exportClause){const Bt=[];return Bt.push(Er(zt(a.createExpressionStatement(mt(a.cloneNode(ce.exportClause.name),Hs(ce,N!==2?Fo(ce):tJ(ce)?ut:a.createIdentifier(dr(ce.exportClause.name))))),ce),ce)),ag(Bt)}else return Er(zt(a.createExpressionStatement(u().createExportStarHelper(N!==2?Fo(ce):ut)),ce),ce)}function ot(ce){if(!ce.isExportEquals)return Re(a.createIdentifier("default"),Ct(ce.expression,Fe,Ut),ce,!0)}function hi(ce){let ut;return Kr(ce,32)?ut=xi(ut,Er(zt(a.createFunctionDeclaration(wn(ce.modifiers,Je,Ra),ce.asteriskToken,a.getDeclarationName(ce,!0,!0),void 0,wn(ce.parameters,Fe,Gs),void 0,cn(ce.body,Fe,t)),ce),ce)):ut=xi(ut,cn(ce,Fe,t)),ag(ut)}function hn(ce){let ut;return Kr(ce,32)?ut=xi(ut,Er(zt(a.createClassDeclaration(wn(ce.modifiers,Je,zc),a.getDeclarationName(ce,!0,!0),void 0,wn(ce.heritageClauses,Fe,Lp),wn(ce.members,Fe,Vd)),ce),ce)):ut=xi(ut,cn(ce,Fe,t)),ut=St(ut,ce),ag(ut)}function lr(ce){let ut,Bt,le;if(Kr(ce,32)){let je,de=!1;for(const tt of ce.declarationList.declarations)if(lt(tt.name)&&Xb(tt.name))if(je||(je=wn(ce.modifiers,Je,Ra)),tt.initializer){const Ae=a.updateVariableDeclaration(tt,tt.name,void 0,void 0,mt(tt.name,Ct(tt.initializer,Fe,Ut)));Bt=xi(Bt,Ae)}else Bt=xi(Bt,tt);else if(tt.initializer)if(!Qo(tt.name)&&(Dc(tt.initializer)||gc(tt.initializer)||wd(tt.initializer))){const Ae=a.createAssignment(zt(a.createPropertyAccessExpression(a.createIdentifier("exports"),tt.name),tt.name),a.createIdentifier(Im(tt.name))),Ke=a.createVariableDeclaration(tt.name,tt.exclamationToken,tt.type,Ct(tt.initializer,Fe,Ut));Bt=xi(Bt,Ke),le=xi(le,Ae),de=!0}else le=xi(le,fs(tt));if(Bt&&(ut=xi(ut,a.updateVariableStatement(ce,je,a.updateVariableDeclarationList(ce.declarationList,Bt)))),le){const tt=Er(zt(a.createExpressionStatement(a.inlineExpressions(le)),ce),ce);de&&rV(tt),ut=xi(ut,tt)}}else ut=xi(ut,cn(ce,Fe,t));return ut=Yo(ut,ce),ag(ut)}function as(ce,ut,Bt){const le=wi(ce);if(le){let je=YG(ce)?ut:a.createAssignment(ce,ut);for(const de of le)ir(je,8),je=mt(de,je,Bt);return je}return a.createAssignment(ce,ut)}function fs(ce){return Qo(ce.name)?TI(Ct(ce,Fe,UW),Fe,t,0,!1,as):a.createAssignment(zt(a.createPropertyAccessExpression(a.createIdentifier("exports"),ce.name),ce.name),ce.initializer?Ct(ce.initializer,Fe,Ut):a.createVoidZero())}function Ds(ce,ut){if(q.exportEquals)return ce;const Bt=ut.importClause;if(!Bt)return ce;const le=new w3;Bt.name&&(ce=Ot(ce,le,Bt));const je=Bt.namedBindings;if(je)switch(je.kind){case 274:ce=Ot(ce,le,je);break;case 275:for(const de of je.elements)ce=Ot(ce,le,de,!0);break}return ce}function ha(ce,ut){return q.exportEquals?ce:Ot(ce,new w3,ut)}function Yo(ce,ut){return ji(ce,ut.declarationList,!1)}function ji(ce,ut,Bt){if(q.exportEquals)return ce;for(const le of ut.declarations)ce=fl(ce,le,Bt);return ce}function fl(ce,ut,Bt){if(q.exportEquals)return ce;if(Qo(ut.name))for(const le of ut.name.elements)zd(le)||(ce=fl(ce,le,Bt));else!jc(ut.name)&&(!ds(ut)||ut.initializer||Bt)&&(ce=Ot(ce,new w3,ut));return ce}function St(ce,ut){if(q.exportEquals)return ce;const Bt=new w3;if(Kr(ut,32)){const le=Kr(ut,2048)?a.createIdentifier("default"):a.getDeclarationName(ut);ce=xe(ce,Bt,le,a.getLocalName(ut),ut)}return ut.name&&(ce=Ot(ce,Bt,ut)),ce}function Ot(ce,ut,Bt,le){const je=a.getDeclarationName(Bt),de=q.exportSpecifiers.get(je);if(de)for(const tt of de)ce=xe(ce,ut,tt.name,je,tt.name,void 0,le);return ce}function xe(ce,ut,Bt,le,je,de,tt){return ut.has(Bt)||(ut.set(Bt,!0),ce=xi(ce,Re(Bt,le,je,de,tt))),ce}function Pt(){const ce=a.createExpressionStatement(a.createCallExpression(a.createPropertyAccessExpression(a.createIdentifier("Object"),"defineProperty"),void 0,[a.createIdentifier("exports"),a.createStringLiteral("__esModule"),a.createObjectLiteralExpression([a.createPropertyAssignment("value",a.createTrue())])]));return ir(ce,2097152),ce}function Re(ce,ut,Bt,le,je){const de=zt(a.createExpressionStatement(mt(ce,ut,void 0,je)),Bt);return mh(de),le||ir(de,3072),de}function mt(ce,ut,Bt,le){return zt(le?a.createCallExpression(a.createPropertyAccessExpression(a.createIdentifier("Object"),"defineProperty"),void 0,[a.createIdentifier("exports"),a.createStringLiteralFromNode(ce),a.createObjectLiteralExpression([a.createPropertyAssignment("enumerable",a.createTrue()),a.createPropertyAssignment("get",a.createFunctionExpression(void 0,void 0,void 0,void 0,[],void 0,a.createBlock([a.createReturnStatement(ut)])))])]):a.createAssignment(a.createPropertyAccessExpression(a.createIdentifier("exports"),a.cloneNode(ce)),ut),Bt)}function Je(ce){switch(ce.kind){case 95:case 90:return}return ce}function pt(ce,ut,Bt){ut.kind===307?(U=ut,q=j[y_(U)],F(ce,ut,Bt),U=void 0,q=void 0):F(ce,ut,Bt)}function kt(ce,ut){return ut=R(ce,ut),ut.id&&Q[ut.id]?ut:ce===1?$e(ut):ih(ut)?Ci(ut):ut}function Ci(ce){const ut=ce.name,Bt=ii(ut);if(Bt!==ut){if(ce.objectAssignmentInitializer){const le=a.createAssignment(Bt,ce.objectAssignmentInitializer);return zt(a.createPropertyAssignment(ut,le),ce)}return zt(a.createPropertyAssignment(ut,Bt),ce)}return ce}function $e(ce){switch(ce.kind){case 80:return ii(ce);case 213:return qt(ce);case 215:return $t(ce);case 226:return Gt(ce)}return ce}function qt(ce){if(lt(ce.expression)){const ut=ii(ce.expression);if(Q[Tl(ut)]=!0,!lt(ut)&&!(Ya(ce.expression)&8192))return gP(a.updateCallExpression(ce,ut,void 0,ce.arguments),16)}return ce}function $t(ce){if(lt(ce.tag)){const ut=ii(ce.tag);if(Q[Tl(ut)]=!0,!lt(ut)&&!(Ya(ce.tag)&8192))return gP(a.updateTaggedTemplateExpression(ce,ut,void 0,ce.template),16)}return ce}function ii(ce){var ut,Bt;if(Ya(ce)&8192){const le=tK(U);return le?a.createPropertyAccessExpression(le,ce):ce}else if(!(jc(ce)&&!(ce.emitNode.autoGenerate.flags&64))&&!Xb(ce)){const le=b.getReferencedExportContainer(ce,YG(ce));if(le&&le.kind===307)return zt(a.createPropertyAccessExpression(a.createIdentifier("exports"),a.cloneNode(ce)),ce);const je=b.getReferencedImportDeclaration(ce);if(je){if($0(je))return zt(a.createPropertyAccessExpression(a.getGeneratedNameForNode(je.parent),a.createIdentifier("default")),ce);if(m_(je)){const de=je.propertyName||je.name;return zt(a.createPropertyAccessExpression(a.getGeneratedNameForNode(((Bt=(ut=je.parent)==null?void 0:ut.parent)==null?void 0:Bt.parent)||je),a.cloneNode(de)),ce)}}}return ce}function Gt(ce){if(jb(ce.operatorToken.kind)&<(ce.left)&&(!jc(ce.left)||BB(ce.left))&&!Xb(ce.left)){const ut=wi(ce.left);if(ut){let Bt=ce;for(const le of ut)Q[Tl(Bt)]=!0,Bt=mt(le,Bt,ce);return Bt}}return ce}function wi(ce){if(jc(ce)){if(BB(ce)){const ut=q==null?void 0:q.exportSpecifiers.get(ce);if(ut){const Bt=[];for(const le of ut)Bt.push(le.name);return Bt}}}else{const ut=b.getReferencedImportDeclaration(ce);if(ut)return q==null?void 0:q.exportedBindings[y_(ut)];const Bt=new Set,le=b.getReferencedValueDeclarations(ce);if(le){for(const je of le){const de=q==null?void 0:q.exportedBindings[y_(je)];if(de)for(const tt of de)Bt.add(tt)}if(Bt.size)return Fn(Bt)}}}}var RAt={name:"typescript:dynamicimport-sync-require",scoped:!0,text:` + var __syncRequire = typeof module === "object" && typeof module.exports === "object";`};function PEe(t){const{factory:r,startLexicalEnvironment:a,endLexicalEnvironment:u,hoistVariableDeclaration:h}=t,p=t.getCompilerOptions(),m=t.getEmitResolver(),C=t.getEmitHost(),b=t.onSubstituteNode,T=t.onEmitNode;t.onSubstituteNode=mt,t.onEmitNode=Re,t.enableSubstitution(80),t.enableSubstitution(304),t.enableSubstitution(226),t.enableSubstitution(236),t.enableEmitNotification(307);const E=[],N=[],R=[],F=[];let j,U,q,Q,re,Y,ue;return Q0(t,te);function te(ce){if(ce.isDeclarationFile||!(jL(ce,p)||ce.transformFlags&8388608))return ce;const ut=y_(ce);j=ce,Y=ce,U=E[ut]=rce(t,ce),q=r.createUniqueName("exports"),N[ut]=q,Q=F[ut]=r.createUniqueName("context");const Bt=Se(U.externalImports),le=oe(ce,Bt),je=r.createFunctionExpression(void 0,void 0,void 0,void 0,[r.createParameterDeclaration(void 0,void 0,q),r.createParameterDeclaration(void 0,void 0,Q)],void 0,le),de=yV(r,ce,C,p),tt=r.createArrayLiteralExpression(Yt(Bt,Ke=>Ke.name)),Ae=ir(r.updateSourceFile(ce,zt(r.createNodeArray([r.createExpressionStatement(r.createCallExpression(r.createPropertyAccessExpression(r.createIdentifier("System"),"register"),void 0,de?[de,tt,je]:[tt,je]))]),ce.statements)),2048);return p.outFile||o2e(Ae,le,Ke=>!Ke.scoped),ue&&(R[ut]=ue,ue=void 0),j=void 0,U=void 0,q=void 0,Q=void 0,re=void 0,Y=void 0,Ae}function Se(ce){const ut=new Map,Bt=[];for(const le of ce){const je=OP(r,le,j,C,m,p);if(je){const de=je.text,tt=ut.get(de);tt!==void 0?Bt[tt].externalImports.push(le):(ut.set(de,Bt.length),Bt.push({name:je,externalImports:[le]}))}}return Bt}function oe(ce,ut){const Bt=[];a();const le=Hh(p,"alwaysStrict")||Td(j),je=r.copyPrologue(ce.statements,Bt,le,_e);Bt.push(r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration("__moduleName",void 0,void 0,r.createLogicalAnd(Q,r.createPropertyAccessExpression(Q,"id")))]))),Ct(U.externalHelpersImportDeclaration,_e,Es);const de=wn(ce.statements,_e,Es,je);un(Bt,re),qy(Bt,u());const tt=pe(Bt),Ae=ce.transformFlags&2097152?r.createModifiersFromModifierFlags(1024):void 0,Ke=r.createObjectLiteralExpression([r.createPropertyAssignment("setters",be(tt,ut)),r.createPropertyAssignment("execute",r.createFunctionExpression(Ae,void 0,void 0,void 0,[],void 0,r.createBlock(de,!0)))],!0);return Bt.push(r.createReturnStatement(Ke)),r.createBlock(Bt,!0)}function pe(ce){if(!U.hasExportStarsToExportValues)return;if(!Rt(U.exportedNames)&&U.exportedFunctions.size===0&&U.exportSpecifiers.size===0){let je=!1;for(const de of U.externalImports)if(de.kind===278&&de.exportClause){je=!0;break}if(!je){const de=ye(void 0);return ce.push(de),de.name}}const ut=[];if(U.exportedNames)for(const je of U.exportedNames)je.escapedText!=="default"&&ut.push(r.createPropertyAssignment(r.createStringLiteralFromNode(je),r.createTrue()));for(const je of U.exportedFunctions)Kr(je,2048)||(z.assert(!!je.name),ut.push(r.createPropertyAssignment(r.createStringLiteralFromNode(je.name),r.createTrue())));const Bt=r.createUniqueName("exportedNames");ce.push(r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(Bt,void 0,void 0,r.createObjectLiteralExpression(ut,!0))])));const le=ye(Bt);return ce.push(le),le.name}function ye(ce){const ut=r.createUniqueName("exportStar"),Bt=r.createIdentifier("m"),le=r.createIdentifier("n"),je=r.createIdentifier("exports");let de=r.createStrictInequality(le,r.createStringLiteral("default"));return ce&&(de=r.createLogicalAnd(de,r.createLogicalNot(r.createCallExpression(r.createPropertyAccessExpression(ce,"hasOwnProperty"),void 0,[le])))),r.createFunctionDeclaration(void 0,void 0,ut,void 0,[r.createParameterDeclaration(void 0,void 0,Bt)],void 0,r.createBlock([r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(je,void 0,void 0,r.createObjectLiteralExpression([]))])),r.createForInStatement(r.createVariableDeclarationList([r.createVariableDeclaration(le)]),Bt,r.createBlock([ir(r.createIfStatement(de,r.createExpressionStatement(r.createAssignment(r.createElementAccessExpression(je,le),r.createElementAccessExpression(Bt,le)))),1)])),r.createExpressionStatement(r.createCallExpression(q,void 0,[je]))],!0))}function be(ce,ut){const Bt=[];for(const le of ut){const je=W(le.externalImports,Ae=>f3(r,Ae,j)),de=je?r.getGeneratedNameForNode(je):r.createUniqueName(""),tt=[];for(const Ae of le.externalImports){const Ke=f3(r,Ae,j);switch(Ae.kind){case 272:if(!Ae.importClause)break;case 271:z.assert(Ke!==void 0),tt.push(r.createExpressionStatement(r.createAssignment(Ke,de))),Kr(Ae,32)&&tt.push(r.createExpressionStatement(r.createCallExpression(q,void 0,[r.createStringLiteral(dr(Ke)),de])));break;case 278:if(z.assert(Ke!==void 0),Ae.exportClause)if(Yg(Ae.exportClause)){const Qt=[];for(const ni of Ae.exportClause.elements)Qt.push(r.createPropertyAssignment(r.createStringLiteral(dr(ni.name)),r.createElementAccessExpression(de,r.createStringLiteral(dr(ni.propertyName||ni.name)))));tt.push(r.createExpressionStatement(r.createCallExpression(q,void 0,[r.createObjectLiteralExpression(Qt,!0)])))}else tt.push(r.createExpressionStatement(r.createCallExpression(q,void 0,[r.createStringLiteral(dr(Ae.exportClause.name)),de])));else tt.push(r.createExpressionStatement(r.createCallExpression(ce,void 0,[de])));break}}Bt.push(r.createFunctionExpression(void 0,void 0,void 0,void 0,[r.createParameterDeclaration(void 0,void 0,de)],void 0,r.createBlock(tt,!0)))}return r.createArrayLiteralExpression(Bt,!0)}function _e(ce){switch(ce.kind){case 272:return ve(ce);case 271:return ke(ce);case 278:return Ee(ce);case 277:return Fe(ce);default:return Ji(ce)}}function ve(ce){let ut;return ce.importClause&&h(f3(r,ce,j)),ag(wt(ut,ce))}function Ee(ce){z.assertIsDefined(ce)}function ke(ce){z.assert(Lk(ce),"import= for internal module references should be handled in an earlier transformer.");let ut;return h(f3(r,ce,j)),ag(nt(ut,ce))}function Fe(ce){if(ce.isExportEquals)return;const ut=Ct(ce.expression,fs,Ut);return Ht(r.createIdentifier("default"),ut,!0)}function Oe(ce){Kr(ce,32)?re=xi(re,r.updateFunctionDeclaration(ce,wn(ce.modifiers,Pt,zc),ce.asteriskToken,r.getDeclarationName(ce,!0,!0),void 0,wn(ce.parameters,fs,Gs),void 0,Ct(ce.body,fs,Ho))):re=xi(re,cn(ce,fs,t)),re=xt(re,ce)}function fe(ce){let ut;const Bt=r.getLocalName(ce);return h(Bt),ut=xi(ut,zt(r.createExpressionStatement(r.createAssignment(Bt,zt(r.createClassExpression(wn(ce.modifiers,Pt,zc),ce.name,void 0,wn(ce.heritageClauses,fs,Lp),wn(ce.members,fs,Vd)),ce))),ce)),ut=xt(ut,ce),ag(ut)}function Ie(ce){if(!et(ce.declarationList))return Ct(ce,fs,Es);let ut;if(nW(ce.declarationList)||iW(ce.declarationList)){const Bt=wn(ce.modifiers,Pt,zc),le=[];for(const de of ce.declarationList.declarations)le.push(r.updateVariableDeclaration(de,r.getGeneratedNameForNode(de.name),void 0,void 0,He(de,!1)));const je=r.updateVariableDeclarationList(ce.declarationList,le);ut=xi(ut,r.updateVariableStatement(ce,Bt,je))}else{let Bt;const le=Kr(ce,32);for(const je of ce.declarationList.declarations)je.initializer?Bt=xi(Bt,He(je,le)):Le(je);Bt&&(ut=xi(ut,zt(r.createExpressionStatement(r.inlineExpressions(Bt)),ce)))}return ut=ze(ut,ce,!1),ag(ut)}function Le(ce){if(Qo(ce.name))for(const ut of ce.name.elements)zd(ut)||Le(ut);else h(r.cloneNode(ce.name))}function et(ce){return(Ya(ce)&4194304)===0&&(Y.kind===307||(uu(ce).flags&7)===0)}function He(ce,ut){const Bt=ut?We:Ue;return Qo(ce.name)?TI(ce,fs,t,0,!1,Bt):ce.initializer?Bt(ce.name,Ct(ce.initializer,fs,Ut)):ce.name}function We(ce,ut,Bt){return Ye(ce,ut,Bt,!0)}function Ue(ce,ut,Bt){return Ye(ce,ut,Bt,!1)}function Ye(ce,ut,Bt,le){return h(r.cloneNode(ce)),le?Oi(ce,Gt(zt(r.createAssignment(ce,ut),Bt))):Gt(zt(r.createAssignment(ce,ut),Bt))}function wt(ce,ut){if(U.exportEquals)return ce;const Bt=ut.importClause;if(!Bt)return ce;Bt.name&&(ce=Et(ce,Bt));const le=Bt.namedBindings;if(le)switch(le.kind){case 274:ce=Et(ce,le);break;case 275:for(const je of le.elements)ce=Et(ce,je);break}return ce}function nt(ce,ut){return U.exportEquals?ce:Et(ce,ut)}function ze(ce,ut,Bt){if(U.exportEquals)return ce;for(const le of ut.declarationList.declarations)(le.initializer||Bt)&&(ce=st(ce,le));return ce}function st(ce,ut,Bt){if(U.exportEquals)return ce;if(Qo(ut.name))for(const le of ut.name.elements)zd(le)||(ce=st(ce,le));else jc(ut.name)||(ce=Et(ce,ut,void 0));return ce}function xt(ce,ut){if(U.exportEquals)return ce;let Bt;if(Kr(ut,32)){const le=Kr(ut,2048)?r.createStringLiteral("default"):ut.name;ce=ft(ce,le,r.getLocalName(ut)),Bt=Im(le)}return ut.name&&(ce=Et(ce,ut,Bt)),ce}function Et(ce,ut,Bt){if(U.exportEquals)return ce;const le=r.getDeclarationName(ut),je=U.exportSpecifiers.get(le);if(je)for(const de of je)de.name.escapedText!==Bt&&(ce=ft(ce,de.name,le));return ce}function ft(ce,ut,Bt,le){return ce=xi(ce,Ht(ut,Bt,le)),ce}function Ht(ce,ut,Bt){const le=r.createExpressionStatement(Oi(ce,ut));return mh(le),Bt||ir(le,3072),le}function Oi(ce,ut){const Bt=lt(ce)?r.createStringLiteralFromNode(ce):ce;return ir(ut,Ya(ut)|3072),Sd(r.createCallExpression(q,void 0,[Bt,ut]),ut)}function Ji(ce){switch(ce.kind){case 243:return Ie(ce);case 262:return Oe(ce);case 263:return fe(ce);case 248:return Ui(ce,!0);case 249:return bn(ce);case 250:return Mi(ce);case 246:return bs(ce);case 247:return Hi(ce);case 256:return Hs(ce);case 254:return Wo(ce);case 245:return ts(ce);case 255:return Fo(ce);case 269:return Cn(ce);case 296:return Ko(ce);case 297:return ot(ce);case 258:return hi(ce);case 299:return hn(ce);case 241:return lr(ce);default:return fs(ce)}}function Ui(ce,ut){const Bt=Y;return Y=ce,ce=r.updateForStatement(ce,Ct(ce.initializer,ut?Rn:Ds,$g),Ct(ce.condition,fs,Ut),Ct(ce.incrementor,Ds,Ut),v_(ce.statement,ut?Ji:fs,t)),Y=Bt,ce}function bn(ce){const ut=Y;return Y=ce,ce=r.updateForInStatement(ce,Rn(ce.initializer),Ct(ce.expression,fs,Ut),v_(ce.statement,Ji,t)),Y=ut,ce}function Mi(ce){const ut=Y;return Y=ce,ce=r.updateForOfStatement(ce,ce.awaitModifier,Rn(ce.initializer),Ct(ce.expression,fs,Ut),v_(ce.statement,Ji,t)),Y=ut,ce}function Ai(ce){return wf(ce)&&et(ce)}function Rn(ce){if(Ai(ce)){let ut;for(const Bt of ce.declarations)ut=xi(ut,He(Bt,!1)),Bt.initializer||Le(Bt);return ut?r.inlineExpressions(ut):r.createOmittedExpression()}else return Ct(ce,Ds,$g)}function bs(ce){return r.updateDoStatement(ce,v_(ce.statement,Ji,t),Ct(ce.expression,fs,Ut))}function Hi(ce){return r.updateWhileStatement(ce,Ct(ce.expression,fs,Ut),v_(ce.statement,Ji,t))}function Hs(ce){return r.updateLabeledStatement(ce,ce.label,z.checkDefined(Ct(ce.statement,Ji,Es,r.liftToBlock)))}function Wo(ce){return r.updateWithStatement(ce,Ct(ce.expression,fs,Ut),z.checkDefined(Ct(ce.statement,Ji,Es,r.liftToBlock)))}function ts(ce){return r.updateIfStatement(ce,Ct(ce.expression,fs,Ut),z.checkDefined(Ct(ce.thenStatement,Ji,Es,r.liftToBlock)),Ct(ce.elseStatement,Ji,Es,r.liftToBlock))}function Fo(ce){return r.updateSwitchStatement(ce,Ct(ce.expression,fs,Ut),z.checkDefined(Ct(ce.caseBlock,Ji,y7)))}function Cn(ce){const ut=Y;return Y=ce,ce=r.updateCaseBlock(ce,wn(ce.clauses,Ji,z$)),Y=ut,ce}function Ko(ce){return r.updateCaseClause(ce,Ct(ce.expression,fs,Ut),wn(ce.statements,Ji,Es))}function ot(ce){return cn(ce,Ji,t)}function hi(ce){return cn(ce,Ji,t)}function hn(ce){const ut=Y;return Y=ce,ce=r.updateCatchClause(ce,ce.variableDeclaration,z.checkDefined(Ct(ce.block,Ji,Ho))),Y=ut,ce}function lr(ce){const ut=Y;return Y=ce,ce=cn(ce,Ji,t),Y=ut,ce}function as(ce,ut){if(!(ce.transformFlags&276828160))return ce;switch(ce.kind){case 248:return Ui(ce,!1);case 244:return ha(ce);case 217:return Yo(ce,ut);case 354:return ji(ce,ut);case 226:if(dS(ce))return St(ce,ut);break;case 213:if(Gp(ce))return fl(ce);break;case 224:case 225:return xe(ce,ut)}return cn(ce,fs,t)}function fs(ce){return as(ce,!1)}function Ds(ce){return as(ce,!0)}function ha(ce){return r.updateExpressionStatement(ce,Ct(ce.expression,Ds,Ut))}function Yo(ce,ut){return r.updateParenthesizedExpression(ce,Ct(ce.expression,ut?Ds:fs,Ut))}function ji(ce,ut){return r.updatePartiallyEmittedExpression(ce,Ct(ce.expression,ut?Ds:fs,Ut))}function fl(ce){const ut=OP(r,ce,j,C,m,p),Bt=Ct(lu(ce.arguments),fs,Ut),le=ut&&(!Bt||!ja(Bt)||Bt.text!==ut.text)?ut:Bt;return r.createCallExpression(r.createPropertyAccessExpression(Q,r.createIdentifier("import")),void 0,le?[le]:[])}function St(ce,ut){return Ot(ce.left)?TI(ce,fs,t,0,!ut):cn(ce,fs,t)}function Ot(ce){if(Yd(ce,!0))return Ot(ce.left);if(Zg(ce))return Ot(ce.expression);if(Pa(ce))return Rt(ce.properties,Ot);if(Rf(ce))return Rt(ce.elements,Ot);if(ih(ce))return Ot(ce.name);if(pd(ce))return Ot(ce.initializer);if(lt(ce)){const ut=m.getReferencedExportContainer(ce);return ut!==void 0&&ut.kind===307}else return!1}function xe(ce,ut){if((ce.operator===46||ce.operator===47)&<(ce.operand)&&!jc(ce.operand)&&!Xb(ce.operand)&&!Boe(ce.operand)){const Bt=$t(ce.operand);if(Bt){let le,je=Ct(ce.operand,fs,Ut);tx(ce)?je=r.updatePrefixUnaryExpression(ce,je):(je=r.updatePostfixUnaryExpression(ce,je),ut||(le=r.createTempVariable(h),je=r.createAssignment(le,je),zt(je,ce)),je=r.createComma(je,r.cloneNode(ce.operand)),zt(je,ce));for(const de of Bt)je=Oi(de,Gt(je));return le&&(je=r.createComma(je,le),zt(je,ce)),je}}return cn(ce,fs,t)}function Pt(ce){switch(ce.kind){case 95:case 90:return}return ce}function Re(ce,ut,Bt){if(ut.kind===307){const le=y_(ut);j=ut,U=E[le],q=N[le],ue=R[le],Q=F[le],ue&&delete R[le],T(ce,ut,Bt),j=void 0,U=void 0,q=void 0,Q=void 0,ue=void 0}else T(ce,ut,Bt)}function mt(ce,ut){return ut=b(ce,ut),wi(ut)?ut:ce===1?kt(ut):ce===4?Je(ut):ut}function Je(ce){switch(ce.kind){case 304:return pt(ce)}return ce}function pt(ce){var ut,Bt;const le=ce.name;if(!jc(le)&&!Xb(le)){const je=m.getReferencedImportDeclaration(le);if(je){if($0(je))return zt(r.createPropertyAssignment(r.cloneNode(le),r.createPropertyAccessExpression(r.getGeneratedNameForNode(je.parent),r.createIdentifier("default"))),ce);if(m_(je))return zt(r.createPropertyAssignment(r.cloneNode(le),r.createPropertyAccessExpression(r.getGeneratedNameForNode(((Bt=(ut=je.parent)==null?void 0:ut.parent)==null?void 0:Bt.parent)||je),r.cloneNode(je.propertyName||je.name))),ce)}}return ce}function kt(ce){switch(ce.kind){case 80:return Ci(ce);case 226:return $e(ce);case 236:return qt(ce)}return ce}function Ci(ce){var ut,Bt;if(Ya(ce)&8192){const le=tK(j);return le?r.createPropertyAccessExpression(le,ce):ce}if(!jc(ce)&&!Xb(ce)){const le=m.getReferencedImportDeclaration(ce);if(le){if($0(le))return zt(r.createPropertyAccessExpression(r.getGeneratedNameForNode(le.parent),r.createIdentifier("default")),ce);if(m_(le))return zt(r.createPropertyAccessExpression(r.getGeneratedNameForNode(((Bt=(ut=le.parent)==null?void 0:ut.parent)==null?void 0:Bt.parent)||le),r.cloneNode(le.propertyName||le.name)),ce)}}return ce}function $e(ce){if(jb(ce.operatorToken.kind)&<(ce.left)&&(!jc(ce.left)||BB(ce.left))&&!Xb(ce.left)){const ut=$t(ce.left);if(ut){let Bt=ce;for(const le of ut)Bt=Oi(le,Gt(Bt));return Bt}}return ce}function qt(ce){return P6(ce)?r.createPropertyAccessExpression(Q,r.createIdentifier("meta")):ce}function $t(ce){let ut;const Bt=ii(ce);if(Bt){const le=m.getReferencedExportContainer(ce,!1);le&&le.kind===307&&(ut=xi(ut,r.getDeclarationName(Bt))),ut=un(ut,U==null?void 0:U.exportedBindings[y_(Bt)])}else if(jc(ce)&&BB(ce)){const le=U==null?void 0:U.exportSpecifiers.get(ce);if(le){const je=[];for(const de of le)je.push(de.name);return je}}return ut}function ii(ce){if(!jc(ce)){const ut=m.getReferencedImportDeclaration(ce);if(ut)return ut;const Bt=m.getReferencedValueDeclaration(ce);if(Bt&&(U!=null&&U.exportedBindings[y_(Bt)]))return Bt;const le=m.getReferencedValueDeclarations(ce);if(le){for(const je of le)if(je!==Bt&&(U!=null&&U.exportedBindings[y_(je)]))return je}return Bt}}function Gt(ce){return ue===void 0&&(ue=[]),ue[Tl(ce)]=!0,ce}function wi(ce){return ue&&ce.id&&ue[ce.id]}}function hce(t){const{factory:r,getEmitHelperFactory:a}=t,u=t.getEmitHost(),h=t.getEmitResolver(),p=t.getCompilerOptions(),m=il(p),C=t.onEmitNode,b=t.onSubstituteNode;t.onEmitNode=ue,t.onSubstituteNode=te,t.enableEmitNotification(307),t.enableSubstitution(80);let T,E,N;return Q0(t,R);function R(oe){if(oe.isDeclarationFile)return oe;if(Td(oe)||Xg(p)){E=oe,N=void 0;let pe=F(oe);return E=void 0,N&&(pe=r.updateSourceFile(pe,zt(r.createNodeArray(Lse(pe.statements.slice(),N)),pe.statements))),!Td(oe)||Vh(p)===200||Rt(pe.statements,UB)?pe:r.updateSourceFile(pe,zt(r.createNodeArray([...pe.statements,gV(r)]),pe.statements))}return oe}function F(oe){const pe=Zae(r,a(),oe,p);if(pe){const ye=[],be=r.copyPrologue(oe.statements,ye);return xi(ye,pe),un(ye,wn(oe.statements,j,Es,be)),r.updateSourceFile(oe,zt(r.createNodeArray(ye),oe.statements))}else return cn(oe,j,t)}function j(oe){switch(oe.kind){case 271:return Vh(p)>=100?q(oe):void 0;case 277:return re(oe);case 278:return Y(oe)}return oe}function U(oe){const pe=OP(r,oe,z.checkDefined(E),u,h,p),ye=[];if(pe&&ye.push(pe),Vh(p)===200)return r.createCallExpression(r.createIdentifier("require"),void 0,ye);if(!N){const _e=r.createUniqueName("_createRequire",48),ve=r.createImportDeclaration(void 0,r.createImportClause(!1,void 0,r.createNamedImports([r.createImportSpecifier(!1,r.createIdentifier("createRequire"),_e)])),r.createStringLiteral("module"),void 0),Ee=r.createUniqueName("__require",48),ke=r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(Ee,void 0,void 0,r.createCallExpression(r.cloneNode(_e),void 0,[r.createPropertyAccessExpression(r.createMetaProperty(102,r.createIdentifier("meta")),r.createIdentifier("url"))]))],m>=2?2:0));N=[ve,ke]}const be=N[1].declarationList.declarations[0].name;return z.assertNode(be,lt),r.createCallExpression(r.cloneNode(be),void 0,ye)}function q(oe){z.assert(Lk(oe),"import= for internal module references should be handled in an earlier transformer.");let pe;return pe=xi(pe,Er(zt(r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(r.cloneNode(oe.name),void 0,void 0,U(oe))],m>=2?2:0)),oe),oe)),pe=Q(pe,oe),ag(pe)}function Q(oe,pe){return Kr(pe,32)&&(oe=xi(oe,r.createExportDeclaration(void 0,pe.isTypeOnly,r.createNamedExports([r.createExportSpecifier(!1,void 0,dr(pe.name))])))),oe}function re(oe){return oe.isExportEquals?Vh(p)===200?Er(r.createExpressionStatement(r.createAssignment(r.createPropertyAccessExpression(r.createIdentifier("module"),"exports"),oe.expression)),oe):void 0:oe}function Y(oe){if(p.module!==void 0&&p.module>5||!oe.exportClause||!H1(oe.exportClause)||!oe.moduleSpecifier)return oe;const pe=oe.exportClause.name,ye=r.getGeneratedNameForNode(pe),be=r.createImportDeclaration(void 0,r.createImportClause(!1,void 0,r.createNamespaceImport(ye)),oe.moduleSpecifier,oe.attributes);Er(be,oe.exportClause);const _e=tJ(oe)?r.createExportDefault(ye):r.createExportDeclaration(void 0,!1,r.createNamedExports([r.createExportSpecifier(!1,ye,pe)]));return Er(_e,oe),[be,_e]}function ue(oe,pe,ye){Ns(pe)?((Td(pe)||Xg(p))&&p.importHelpers&&(T=new Map),C(oe,pe,ye),T=void 0):C(oe,pe,ye)}function te(oe,pe){return pe=b(oe,pe),T&<(pe)&&Ya(pe)&8192?Se(pe):pe}function Se(oe){const pe=dr(oe);let ye=T.get(pe);return ye||T.set(pe,ye=r.createUniqueName(pe,48)),ye}}function AEe(t){const r=t.onSubstituteNode,a=t.onEmitNode,u=hce(t),h=t.onSubstituteNode,p=t.onEmitNode;t.onSubstituteNode=r,t.onEmitNode=a;const m=fce(t),C=t.onSubstituteNode,b=t.onEmitNode;t.onSubstituteNode=E,t.onEmitNode=N,t.enableSubstitution(307),t.enableEmitNotification(307);let T;return j;function E(q,Q){return Ns(Q)?(T=Q,r(q,Q)):T?T.impliedNodeFormat===99?h(q,Q):C(q,Q):r(q,Q)}function N(q,Q,re){return Ns(Q)&&(T=Q),T?T.impliedNodeFormat===99?p(q,Q,re):b(q,Q,re):a(q,Q,re)}function R(q){return q.impliedNodeFormat===99?u:m}function F(q){if(q.isDeclarationFile)return q;T=q;const Q=R(q)(q);return T=void 0,z.assert(Ns(Q)),Q}function j(q){return q.kind===307?F(q):U(q)}function U(q){return t.factory.createBundle(Yt(q.sourceFiles,F))}}function qK(t){return ds(t)||To(t)||V_(t)||nl(t)||Ev(t)||tS(t)||dV(t)||xP(t)||Au(t)||Hv(t)||Uu(t)||Gs(t)||Uc(t)||Gb(t)||kd(t)||Mm(t)||fu(t)||UT(t)||Ir(t)||wc(t)||cr(t)||Em(t)}function OEe(t){if(Ev(t)||tS(t))return r;return Hv(t)||Au(t)?u:vS(t);function r(p){const m=a(p);return m!==void 0?{diagnosticMessage:m,errorNode:t,typeName:t.name}:void 0}function a(p){return da(t)?p.errorModuleName?p.accessibility===2?k.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:k.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:t.parent.kind===263?p.errorModuleName?p.accessibility===2?k.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:k.Public_property_0_of_exported_class_has_or_is_using_private_name_1:p.errorModuleName?k.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:k.Property_0_of_exported_interface_has_or_is_using_private_name_1}function u(p){const m=h(p);return m!==void 0?{diagnosticMessage:m,errorNode:t,typeName:t.name}:void 0}function h(p){return da(t)?p.errorModuleName?p.accessibility===2?k.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:k.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:t.parent.kind===263?p.errorModuleName?p.accessibility===2?k.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:k.Public_method_0_of_exported_class_has_or_is_using_private_name_1:p.errorModuleName?k.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:k.Method_0_of_exported_interface_has_or_is_using_private_name_1}}function vS(t){if(ds(t)||To(t)||V_(t)||Ir(t)||wc(t)||cr(t)||nl(t)||fu(t))return a;return Ev(t)||tS(t)?u:dV(t)||xP(t)||Au(t)||Hv(t)||Uu(t)||UT(t)?h:Gs(t)?xp(t,t.parent)&&Kr(t.parent,2)?a:p:Uc(t)?C:Gb(t)?b:kd(t)?T:Mm(t)||Em(t)?E:z.assertNever(t,`Attempted to set a declaration diagnostic context for unhandled node kind: ${z.formatSyntaxKind(t.kind)}`);function r(N){if(t.kind===260||t.kind===208)return N.errorModuleName?N.accessibility===2?k.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Exported_variable_0_has_or_is_using_name_1_from_private_module_2:k.Exported_variable_0_has_or_is_using_private_name_1;if(t.kind===172||t.kind===211||t.kind===212||t.kind===226||t.kind===171||t.kind===169&&Kr(t.parent,2))return da(t)?N.errorModuleName?N.accessibility===2?k.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:k.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:t.parent.kind===263||t.kind===169?N.errorModuleName?N.accessibility===2?k.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:k.Public_property_0_of_exported_class_has_or_is_using_private_name_1:N.errorModuleName?k.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:k.Property_0_of_exported_interface_has_or_is_using_private_name_1}function a(N){const R=r(N);return R!==void 0?{diagnosticMessage:R,errorNode:t,typeName:t.name}:void 0}function u(N){let R;return t.kind===178?da(t)?R=N.errorModuleName?k.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:k.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:R=N.errorModuleName?k.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:k.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:da(t)?R=N.errorModuleName?N.accessibility===2?k.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:k.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:R=N.errorModuleName?N.accessibility===2?k.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:k.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1,{diagnosticMessage:R,errorNode:t.name,typeName:t.name}}function h(N){let R;switch(t.kind){case 180:R=N.errorModuleName?k.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:k.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 179:R=N.errorModuleName?k.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:k.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 181:R=N.errorModuleName?k.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:k.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 174:case 173:da(t)?R=N.errorModuleName?N.accessibility===2?k.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:k.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:k.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:t.parent.kind===263?R=N.errorModuleName?N.accessibility===2?k.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:k.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:k.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:R=N.errorModuleName?k.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:k.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0;break;case 262:R=N.errorModuleName?N.accessibility===2?k.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:k.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:k.Return_type_of_exported_function_has_or_is_using_private_name_0;break;default:return z.fail("This is unknown kind for signature: "+t.kind)}return{diagnosticMessage:R,errorNode:t.name||t}}function p(N){const R=m(N);return R!==void 0?{diagnosticMessage:R,errorNode:t,typeName:t.name}:void 0}function m(N){switch(t.parent.kind){case 176:return N.errorModuleName?N.accessibility===2?k.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:k.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1;case 180:case 185:return N.errorModuleName?k.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:k.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;case 179:return N.errorModuleName?k.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:k.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;case 181:return N.errorModuleName?k.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:k.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1;case 174:case 173:return da(t.parent)?N.errorModuleName?N.accessibility===2?k.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:k.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:t.parent.parent.kind===263?N.errorModuleName?N.accessibility===2?k.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:k.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:N.errorModuleName?k.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:k.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;case 262:case 184:return N.errorModuleName?N.accessibility===2?k.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:k.Parameter_0_of_exported_function_has_or_is_using_private_name_1;case 178:case 177:return N.errorModuleName?N.accessibility===2?k.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2:k.Parameter_0_of_accessor_has_or_is_using_private_name_1;default:return z.fail(`Unknown parent for parameter: ${z.formatSyntaxKind(t.parent.kind)}`)}}function C(){let N;switch(t.parent.kind){case 263:N=k.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1;break;case 264:N=k.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;break;case 200:N=k.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1;break;case 185:case 180:N=k.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 179:N=k.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 174:case 173:da(t.parent)?N=k.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:t.parent.parent.kind===263?N=k.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:N=k.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;break;case 184:case 262:N=k.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;break;case 195:N=k.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1;break;case 265:N=k.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1;break;default:return z.fail("This is unknown parent for type parameter: "+t.parent.kind)}return{diagnosticMessage:N,errorNode:t,typeName:t.name}}function b(){let N;return xd(t.parent.parent)?N=Lp(t.parent)&&t.parent.token===119?k.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:t.parent.parent.name?k.extends_clause_of_exported_class_0_has_or_is_using_private_name_1:k.extends_clause_of_exported_class_has_or_is_using_private_name_0:N=k.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1,{diagnosticMessage:N,errorNode:t,typeName:ko(t.parent.parent)}}function T(){return{diagnosticMessage:k.Import_declaration_0_is_using_private_name_1,errorNode:t,typeName:t.name}}function E(N){return{diagnosticMessage:N.errorModuleName?k.Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2:k.Exported_type_alias_0_has_or_is_using_private_name_1,errorNode:Em(t)?z.checkDefined(t.typeExpression):t.type,typeName:Em(t)?ko(t):t.name}}}function MEe(t){const r={219:k.Add_a_return_type_to_the_function_expression,218:k.Add_a_return_type_to_the_function_expression,174:k.Add_a_return_type_to_the_method,177:k.Add_a_return_type_to_the_get_accessor_declaration,178:k.Add_a_type_to_parameter_of_the_set_accessor_declaration,262:k.Add_a_return_type_to_the_function_declaration,180:k.Add_a_return_type_to_the_function_declaration,169:k.Add_a_type_annotation_to_the_parameter_0,260:k.Add_a_type_annotation_to_the_variable_0,172:k.Add_a_type_annotation_to_the_property_0,171:k.Add_a_type_annotation_to_the_property_0,277:k.Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it},a={218:k.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,262:k.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,219:k.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,174:k.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,180:k.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,177:k.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,178:k.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,169:k.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations,260:k.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations,172:k.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations,171:k.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations,167:k.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations,305:k.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations,304:k.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations,209:k.Only_const_arrays_can_be_inferred_with_isolatedDeclarations,277:k.Default_exports_can_t_be_inferred_with_isolatedDeclarations,230:k.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations};return u;function u(q){if(Xi(q,Lp))return Kn(q,k.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations);if((Lv(q)||qT(q.parent))&&(A_(q)||pc(q)))return j(q);switch(z.type(q),q.kind){case 177:case 178:return p(q);case 167:case 304:case 305:return C(q);case 209:case 230:return b(q);case 174:case 180:case 218:case 219:case 262:return T(q);case 208:return E(q);case 172:case 260:return N(q);case 169:return R(q);case 303:return U(q.initializer);case 231:return F(q);default:return U(q)}}function h(q){const Q=Xi(q,re=>Ec(re)||Es(re)||ds(re)||To(re)||Gs(re));if(Q)return Ec(Q)?Q:Om(Q)?Xi(Q,re=>rc(re)&&!fu(re)):Es(Q)?void 0:Q}function p(q){const{getAccessor:Q,setAccessor:re}=qw(q.symbol.declarations,q),Y=(Ev(q)?q.parameters[0]:q)??q,ue=Kn(Y,a[q.kind]);return re&&fa(ue,Kn(re,r[re.kind])),Q&&fa(ue,Kn(Q,r[Q.kind])),ue}function m(q,Q){const re=h(q);if(re){const Y=Ec(re)||!re.name?"":yu(re.name,!1);fa(Q,Kn(re,r[re.kind],Y))}return Q}function C(q){const Q=Kn(q,a[q.kind]);return m(q,Q),Q}function b(q){const Q=Kn(q,a[q.kind]);return m(q,Q),Q}function T(q){const Q=Kn(q,a[q.kind]);return m(q,Q),fa(Q,Kn(q,r[q.kind])),Q}function E(q){return Kn(q,k.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations)}function N(q){const Q=Kn(q,a[q.kind]),re=yu(q.name,!1);return fa(Q,Kn(q,r[q.kind],re)),Q}function R(q){if(Ev(q.parent))return p(q.parent);const Q=t.requiresAddingImplicitUndefined(q);if(!Q&&q.initializer)return U(q.initializer);const re=Q?k.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations:a[q.kind],Y=Kn(q,re),ue=yu(q.name,!1);return fa(Y,Kn(q,r[q.kind],ue)),Y}function F(q){return U(q,k.Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations)}function j(q){const Q=Kn(q,k.Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations,yu(q,!1));return m(q,Q),Q}function U(q,Q){const re=h(q);let Y;if(re){const ue=Ec(re)||!re.name?"":yu(re.name,!1),te=Xi(q.parent,Se=>Ec(Se)||(Es(Se)?"quit":!g_(Se)&&!Lae(Se)&&!_7(Se)));re===te?(Y=Kn(q,Q??a[re.kind]),fa(Y,Kn(re,r[re.kind],ue))):(Y=Kn(q,Q??k.Expression_type_can_t_be_inferred_with_isolatedDeclarations),fa(Y,Kn(re,r[re.kind],ue)),fa(Y,Kn(q,k.Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit)))}else Y=Kn(q,Q??k.Expression_type_can_t_be_inferred_with_isolatedDeclarations);return Y}}function REe(t,r,a){const u=t.getCompilerOptions(),h=Ri(RJ(t,a),bJ);return zV(r,t,G,u,a?Mt(h,a)?[a]:x:h,[_ce],!1).diagnostics}var HV=531469;function _ce(t){const r=()=>z.fail("Diagnostic emitted without context");let a=r,u=!0,h=!1,p=!1,m=!1,C=!1,b,T,E,N;const{factory:R}=t,F=t.getEmitHost(),j={trackSymbol:Ee,reportInaccessibleThisError:Ie,reportInaccessibleUniqueSymbolError:Oe,reportCyclicStructureError:fe,reportPrivateInBaseOfClassExpression:ke,reportLikelyUnsafeImportRequiredError:Le,reportTruncationError:et,moduleResolverHost:F,reportNonlocalAugmentation:He,reportNonSerializableProperty:We,reportInferenceFallback:_e};let U,q,Q,re,Y,ue;const te=t.getEmitResolver(),Se=t.getCompilerOptions(),oe=MEe(te),{stripInternal:pe,isolatedDeclarations:ye}=Se;return Ye;function be(xe){te.getPropertiesOfContainerFunction(xe).forEach(Pt=>{if(_P(Pt.valueDeclaration)){const Re=cr(Pt.valueDeclaration)?Pt.valueDeclaration.left:Pt.valueDeclaration;t.addDiagnostic(Kn(Re,k.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function))}})}function _e(xe){!ye||F_(Q)||_n(xe)===Q&&(ds(xe)&&te.isExpandoFunctionDeclaration(xe)?be(xe):t.addDiagnostic(oe(xe)))}function ve(xe){if(xe.accessibility===0){if(xe.aliasesToMakeVisible)if(!T)T=xe.aliasesToMakeVisible;else for(const Pt of xe.aliasesToMakeVisible)Cc(T,Pt)}else if(xe.accessibility!==3){const Pt=a(xe);if(Pt)return Pt.typeName?t.addDiagnostic(Kn(xe.errorNode||Pt.errorNode,Pt.diagnosticMessage,yu(Pt.typeName),xe.errorSymbolName,xe.errorModuleName)):t.addDiagnostic(Kn(xe.errorNode||Pt.errorNode,Pt.diagnosticMessage,xe.errorSymbolName,xe.errorModuleName)),!0}return!1}function Ee(xe,Pt,Re){return xe.flags&262144?!1:ve(te.isSymbolAccessible(xe,Pt,Re,!0))}function ke(xe){(U||q)&&t.addDiagnostic(Kn(U||q,k.Property_0_of_exported_class_expression_may_not_be_private_or_protected,xe))}function Fe(){return U?sc(U):q&&ko(q)?sc(ko(q)):q&&Ec(q)?q.isExportEquals?"export=":"default":"(Missing)"}function Oe(){(U||q)&&t.addDiagnostic(Kn(U||q,k.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,Fe(),"unique symbol"))}function fe(){(U||q)&&t.addDiagnostic(Kn(U||q,k.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary,Fe()))}function Ie(){(U||q)&&t.addDiagnostic(Kn(U||q,k.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,Fe(),"this"))}function Le(xe){(U||q)&&t.addDiagnostic(Kn(U||q,k.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary,Fe(),xe))}function et(){(U||q)&&t.addDiagnostic(Kn(U||q,k.The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed))}function He(xe,Pt,Re){var mt;const Je=(mt=Pt.declarations)==null?void 0:mt.find(kt=>_n(kt)===xe),pt=Ri(Re.declarations,kt=>_n(kt)!==xe);if(Je&&pt)for(const kt of pt)t.addDiagnostic(fa(Kn(kt,k.Declaration_augments_declaration_in_another_file_This_cannot_be_serialized),Kn(Je,k.This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file)))}function We(xe){(U||q)&&t.addDiagnostic(Kn(U||q,k.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized,xe))}function Ue(xe){const Pt=a;a=mt=>mt.errorNode&&qK(mt.errorNode)?vS(mt.errorNode)(mt):{diagnosticMessage:mt.errorModuleName?k.Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit:k.Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit,errorNode:mt.errorNode||xe};const Re=te.getDeclarationStatementsForSourceFile(xe,HV,j);return a=Pt,Re}function Ye(xe){if(xe.kind===307&&xe.isDeclarationFile)return xe;if(xe.kind===308){h=!0,re=[],Y=[],ue=[];let $e=!1;const qt=R.createBundle(Yt(xe.sourceFiles,ii=>{if(ii.isDeclarationFile)return;if($e=$e||ii.hasNoDefaultLib,Q=ii,b=ii,T=void 0,N=!1,E=new Map,a=r,m=!1,C=!1,mt(ii),ep(ii)||Dm(ii)){p=!1,u=!1;const wi=F_(ii)?R.createNodeArray(Ue(ii)):wn(ii.statements,Cn,Es);return R.updateSourceFile(ii,[R.createModuleDeclaration([R.createModifier(138)],R.createStringLiteral(woe(t.getEmitHost(),ii)),R.createModuleBlock(zt(R.createNodeArray(Wo(wi)),ii.statements)))],!0,[],[],!1,[])}u=!0;const Gt=F_(ii)?R.createNodeArray(Ue(ii)):wn(ii.statements,Cn,Es);return R.updateSourceFile(ii,Wo(Gt),!0,[],[],!1,[])})),$t=rs(Lf(J7(xe,F,!0).declarationFilePath));return qt.syntheticFileReferences=Ci($t),qt.syntheticTypeReferences=pt(),qt.syntheticLibReferences=kt(),qt.hasNoDefaultLib=$e,qt}u=!0,m=!1,C=!1,b=xe,Q=xe,a=r,h=!1,p=!1,N=!1,T=void 0,E=new Map,re=[],Y=[],ue=[],mt(Q);let Pt;if(F_(Q))Pt=R.createNodeArray(Ue(xe));else{const $e=wn(xe.statements,Cn,Es);Pt=zt(R.createNodeArray(Wo($e)),xe.statements),Td(xe)&&(!p||m&&!C)&&(Pt=zt(R.createNodeArray([...Pt,gV(R)]),Pt))}const Re=rs(Lf(J7(xe,F,!0).declarationFilePath));return R.updateSourceFile(xe,Pt,!0,Ci(Re),pt(),xe.hasNoDefaultLib,kt());function mt($e){re=no(re,Yt($e.referencedFiles,qt=>[$e,qt])),Y=no(Y,$e.typeReferenceDirectives),ue=no(ue,$e.libReferenceDirectives)}function Je($e){const qt={...$e};return qt.pos=-1,qt.end=-1,qt}function pt(){return ns(Y,$e=>{if($e.preserve)return Je($e)})}function kt(){return ns(ue,$e=>{if($e.preserve)return Je($e)})}function Ci($e){return ns(re,([qt,$t])=>{if(!$t.preserve)return;const ii=F.getSourceFileFromReference(qt,$t);if(!ii)return;let Gt;if(ii.isDeclarationFile)Gt=ii.fileName;else{if(h&&Mt(xe.sourceFiles,ii))return;const ut=J7(ii,F,!0);Gt=ut.declarationFilePath||ut.jsFilePath||ii.fileName}if(!Gt)return;const wi=OL($e,Gt,F.getCurrentDirectory(),F.getCanonicalFileName,!1),ce=Je($t);return ce.fileName=wi,ce})}}function wt(xe){if(xe.kind===80)return xe;return xe.kind===207?R.updateArrayBindingPattern(xe,wn(xe.elements,Pt,W$)):R.updateObjectBindingPattern(xe,wn(xe.elements,Pt,nl));function Pt(Re){return Re.kind===232?Re:(Re.propertyName&&Ja(Re.propertyName)&&pc(Re.propertyName.expression)&&Mi(Re.propertyName.expression,b),R.updateBindingElement(Re,Re.dotDotDotToken,Re.propertyName,wt(Re.name),void 0))}}function nt(xe,Pt,Re){let mt;N||(mt=a,a=vS(xe));const Je=R.updateParameterDeclaration(xe,BAt(R,xe,Pt),xe.dotDotDotToken,wt(xe.name),te.isOptionalParameter(xe)?xe.questionToken||R.createToken(58):void 0,xt(xe,Re||xe.type,!0),st(xe));return N||(a=mt),Je}function ze(xe){return zKe(xe)&&!!xe.initializer&&te.isLiteralConstDeclaration(xo(xe))}function st(xe){if(ze(xe)){const Pt=Jke(xe.initializer);return TG(Pt)||_e(xe),te.createLiteralConstValue(xo(xe,zKe),j)}}function xt(xe,Pt,Re){if(!Re&&Ep(xe,2)||ze(xe))return;const mt=xe.kind===169&&te.requiresAddingImplicitUndefined(xe);if(Pt&&!mt)return Ct(Pt,ts,gs);U=xe.name;let Je;N||(Je=a,a=vS(xe));let pt;switch(xe.kind){case 169:case 171:case 172:case 208:case 260:pt=te.createTypeOfDeclaration(xe,b,HV,j);break;case 262:case 180:case 173:case 174:case 177:case 179:pt=te.createReturnTypeOfSignatureDeclaration(xe,b,HV,j);break;default:z.assertNever(xe)}return U=void 0,N||(a=Je),pt??R.createKeywordTypeNode(133)}function Et(xe){switch(xe=xo(xe),xe.kind){case 262:case 267:case 264:case 263:case 265:case 266:return!te.isDeclarationVisible(xe);case 260:return!Ht(xe);case 271:case 272:case 278:case 277:return!1;case 175:return!0}return!1}function ft(xe){var Pt;if(xe.body)return!0;const Re=(Pt=xe.symbol.declarations)==null?void 0:Pt.filter(mt=>Uu(mt)&&!mt.body);return!Re||Re.indexOf(xe)===Re.length-1}function Ht(xe){return zd(xe)?!1:Qo(xe.name)?Rt(xe.name.elements,Ht):te.isDeclarationVisible(xe)}function Oi(xe,Pt,Re){if(Ep(xe,2))return R.createNodeArray();const mt=Yt(Pt,Je=>nt(Je,Re));return mt?R.createNodeArray(mt,Pt.hasTrailingComma):R.createNodeArray()}function Ji(xe,Pt){let Re;if(!Pt){const mt=RT(xe);mt&&(Re=[nt(mt)])}if(Np(xe)){let mt;if(!Pt){const Je=J6(xe);if(Je){const pt=St(xe,qw(Pa(xe.parent)?xe.parent.properties:xe.parent.members,xe));mt=nt(Je,void 0,pt)}}mt||(mt=R.createParameterDeclaration(void 0,void 0,"value")),Re=xi(Re,mt)}return R.createNodeArray(Re||x)}function Ui(xe,Pt){return Ep(xe,2)?void 0:wn(Pt,ts,Uc)}function bn(xe){return Ns(xe)||Mm(xe)||qu(xe)||xd(xe)||Ff(xe)||Bo(xe)||UT(xe)||pI(xe)}function Mi(xe,Pt){const Re=te.isEntityNameVisible(xe,Pt);ve(Re)}function Ai(xe,Pt){return Jp(xe)&&Jp(Pt)&&(xe.jsDoc=Pt.jsDoc),Sd(xe,Vv(Pt))}function Rn(xe,Pt){if(Pt){if(p=p||xe.kind!==267&&xe.kind!==205,Ml(Pt)&&h){const Re=Pxe(t.getEmitHost(),te,xe);if(Re)return R.createStringLiteral(Re)}return Pt}}function bs(xe){if(te.isDeclarationVisible(xe))if(xe.moduleReference.kind===283){const Pt=C8(xe);return R.updateImportEqualsDeclaration(xe,xe.modifiers,xe.isTypeOnly,xe.name,R.updateExternalModuleReference(xe.moduleReference,Rn(xe,Pt)))}else{const Pt=a;return a=vS(xe),Mi(xe.moduleReference,b),a=Pt,xe}}function Hi(xe){if(!xe.importClause)return R.updateImportDeclaration(xe,xe.modifiers,xe.importClause,Rn(xe,xe.moduleSpecifier),Hs(xe.attributes));const Pt=xe.importClause&&xe.importClause.name&&te.isDeclarationVisible(xe.importClause)?xe.importClause.name:void 0;if(!xe.importClause.namedBindings)return Pt&&R.updateImportDeclaration(xe,xe.modifiers,R.updateImportClause(xe.importClause,xe.importClause.isTypeOnly,Pt,void 0),Rn(xe,xe.moduleSpecifier),Hs(xe.attributes));if(xe.importClause.namedBindings.kind===274){const mt=te.isDeclarationVisible(xe.importClause.namedBindings)?xe.importClause.namedBindings:void 0;return Pt||mt?R.updateImportDeclaration(xe,xe.modifiers,R.updateImportClause(xe.importClause,xe.importClause.isTypeOnly,Pt,mt),Rn(xe,xe.moduleSpecifier),Hs(xe.attributes)):void 0}const Re=ns(xe.importClause.namedBindings.elements,mt=>te.isDeclarationVisible(mt)?mt:void 0);if(Re&&Re.length||Pt)return R.updateImportDeclaration(xe,xe.modifiers,R.updateImportClause(xe.importClause,xe.importClause.isTypeOnly,Pt,Re&&Re.length?R.updateNamedImports(xe.importClause.namedBindings,Re):void 0),Rn(xe,xe.moduleSpecifier),Hs(xe.attributes));if(te.isImportRequiredByAugmentation(xe))return ye&&t.addDiagnostic(Kn(xe,k.Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations)),R.updateImportDeclaration(xe,xe.modifiers,void 0,Rn(xe,xe.moduleSpecifier),Hs(xe.attributes))}function Hs(xe){const Pt=T3(xe);return xe&&Pt!==void 0?xe:void 0}function Wo(xe){for(;O(T);){const Re=T.shift();if(!nJ(Re))return z.fail(`Late replaced statement was found which is not handled by the declaration transformer!: ${z.formatSyntaxKind(Re.kind)}`);const mt=u;u=Re.parent&&Ns(Re.parent)&&!(Td(Re.parent)&&h);const Je=hi(Re);u=mt,E.set(y_(Re),Je)}return wn(xe,Pt,Es);function Pt(Re){if(nJ(Re)){const mt=y_(Re);if(E.has(mt)){const Je=E.get(mt);return E.delete(mt),Je&&((Lo(Je)?Rt(Je,V$):V$(Je))&&(m=!0),Ns(Re.parent)&&(Lo(Je)?Rt(Je,UB):UB(Je))&&(p=!0)),Je}}return Re}}function ts(xe){if(Ds(xe))return;if(Yf(xe)){if(Et(xe))return;if(Hb(xe)){if(ye){if(!te.isDefinitelyReferenceToGlobalSymbolObject(xe.name.expression)){if(xd(xe.parent)||Pa(xe.parent)){t.addDiagnostic(Kn(xe,k.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations));return}else if((Ff(xe.parent)||p_(xe.parent))&&!pc(xe.name.expression)){t.addDiagnostic(Kn(xe,k.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations));return}}}else if(!te.isLateBound(xo(xe))||!pc(xe.name.expression))return}}if(Bo(xe)&&te.isImplementationOfOverload(xe)||Z2e(xe))return;let Pt;bn(xe)&&(Pt=b,b=xe);const Re=a,mt=qK(xe),Je=N;let pt=(xe.kind===187||xe.kind===200)&&xe.parent.kind!==265;if((Au(xe)||Hv(xe))&&Ep(xe,2))return xe.symbol&&xe.symbol.declarations&&xe.symbol.declarations[0]!==xe?void 0:kt(R.createPropertyDeclaration(ji(xe),xe.name,void 0,void 0,void 0));if(mt&&!N&&(a=vS(xe)),qT(xe)&&Mi(xe.exprName,b),pt&&(N=!0),VAt(xe))switch(xe.kind){case 233:{(A_(xe.expression)||pc(xe.expression))&&Mi(xe.expression,b);const Ci=cn(xe,ts,t);return kt(R.updateExpressionWithTypeArguments(Ci,Ci.expression,Ci.typeArguments))}case 183:{Mi(xe.typeName,b);const Ci=cn(xe,ts,t);return kt(R.updateTypeReferenceNode(Ci,Ci.typeName,Ci.typeArguments))}case 180:return kt(R.updateConstructSignature(xe,Ui(xe,xe.typeParameters),Oi(xe,xe.parameters),xt(xe,xe.type)));case 176:{const Ci=R.createConstructorDeclaration(ji(xe),Oi(xe,xe.parameters,0),void 0);return kt(Ci)}case 174:{if(Vs(xe.name))return kt(void 0);const Ci=R.createMethodDeclaration(ji(xe),void 0,xe.name,xe.questionToken,Ui(xe,xe.typeParameters),Oi(xe,xe.parameters),xt(xe,xe.type),void 0);return kt(Ci)}case 177:{if(Vs(xe.name))return kt(void 0);const Ci=St(xe,qw(Pa(xe.parent)?xe.parent.properties:xe.parent.members,xe));return kt(R.updateGetAccessorDeclaration(xe,ji(xe),xe.name,Ji(xe,Ep(xe,2)),xt(xe,Ci),void 0))}case 178:return Vs(xe.name)?kt(void 0):kt(R.updateSetAccessorDeclaration(xe,ji(xe),xe.name,Ji(xe,Ep(xe,2)),void 0));case 172:return Vs(xe.name)?kt(void 0):kt(R.updatePropertyDeclaration(xe,ji(xe),xe.name,xe.questionToken,xt(xe,xe.type),st(xe)));case 171:return Vs(xe.name)?kt(void 0):kt(R.updatePropertySignature(xe,ji(xe),xe.name,xe.questionToken,xt(xe,xe.type)));case 173:return Vs(xe.name)?kt(void 0):kt(R.updateMethodSignature(xe,ji(xe),xe.name,xe.questionToken,Ui(xe,xe.typeParameters),Oi(xe,xe.parameters),xt(xe,xe.type)));case 179:return kt(R.updateCallSignature(xe,Ui(xe,xe.typeParameters),Oi(xe,xe.parameters),xt(xe,xe.type)));case 181:return kt(R.updateIndexSignature(xe,ji(xe),Oi(xe,xe.parameters),Ct(xe.type,ts,gs)||R.createKeywordTypeNode(133)));case 260:return Qo(xe.name)?lr(xe.name):(pt=!0,N=!0,kt(R.updateVariableDeclaration(xe,xe.name,void 0,xt(xe,xe.type),st(xe))));case 168:return Fo(xe)&&(xe.default||xe.constraint)?kt(R.updateTypeParameterDeclaration(xe,xe.modifiers,xe.name,void 0,void 0)):kt(cn(xe,ts,t));case 194:{const Ci=Ct(xe.checkType,ts,gs),$e=Ct(xe.extendsType,ts,gs),qt=b;b=xe.trueType;const $t=Ct(xe.trueType,ts,gs);b=qt;const ii=Ct(xe.falseType,ts,gs);return z.assert(Ci),z.assert($e),z.assert($t),z.assert(ii),kt(R.updateConditionalTypeNode(xe,Ci,$e,$t,ii))}case 184:return kt(R.updateFunctionTypeNode(xe,wn(xe.typeParameters,ts,Uc),Oi(xe,xe.parameters),z.checkDefined(Ct(xe.type,ts,gs))));case 185:return kt(R.updateConstructorTypeNode(xe,ji(xe),wn(xe.typeParameters,ts,Uc),Oi(xe,xe.parameters),z.checkDefined(Ct(xe.type,ts,gs))));case 205:return rS(xe)?kt(R.updateImportTypeNode(xe,R.updateLiteralTypeNode(xe.argument,Rn(xe,xe.argument.literal)),xe.attributes,xe.qualifier,wn(xe.typeArguments,ts,gs),xe.isTypeOf)):kt(xe);default:z.assertNever(xe,`Attempted to process unhandled node kind: ${z.formatSyntaxKind(xe.kind)}`)}return TP(xe)&&Da(Q,xe.pos).line===Da(Q,xe.end).line&&ir(xe,1),kt(cn(xe,ts,t));function kt(Ci){return Ci&&mt&&Hb(xe)&&fs(xe),bn(xe)&&(b=Pt),mt&&!N&&(a=Re),pt&&(N=Je),Ci===xe?Ci:Ci&&Er(Ai(Ci,xe),xe)}}function Fo(xe){return xe.parent.kind===174&&Ep(xe.parent,2)}function Cn(xe){if(!WAt(xe)||Ds(xe))return;switch(xe.kind){case 278:return Ns(xe.parent)&&(p=!0),C=!0,R.updateExportDeclaration(xe,xe.modifiers,xe.isTypeOnly,xe.exportClause,Rn(xe,xe.moduleSpecifier),Hs(xe.attributes));case 277:{if(Ns(xe.parent)&&(p=!0),C=!0,xe.expression.kind===80)return xe;{const Re=R.createUniqueName("_default",16);a=()=>({diagnosticMessage:k.Default_export_of_the_module_has_or_is_using_private_name_0,errorNode:xe}),q=xe;const mt=R.createVariableDeclaration(Re,void 0,te.createTypeOfExpression(xe.expression,xe,HV,j),void 0);q=void 0;const Je=R.createVariableStatement(u?[R.createModifier(138)]:[],R.createVariableDeclarationList([mt],2));return Ai(Je,xe),rV(xe),[Je,R.updateExportAssignment(xe,xe.modifiers,Re)]}}}const Pt=hi(xe);return E.set(y_(xe),Pt),xe}function Ko(xe){if(kd(xe)||Ep(xe,2048)||!_0(xe))return xe;const Pt=R.createModifiersFromModifierFlags(Wh(xe)&131039);return R.replaceModifiers(xe,Pt)}function ot(xe,Pt,Re,mt){const Je=R.updateModuleDeclaration(xe,Pt,Re,mt);if(Bh(Je)||Je.flags&32)return Je;const pt=R.createModuleDeclaration(Je.modifiers,Je.name,Je.body,Je.flags|32);return Er(pt,Je),zt(pt,Je),pt}function hi(xe){if(T)for(;FR(T,xe););if(Ds(xe))return;switch(xe.kind){case 271:return bs(xe);case 272:return Hi(xe)}if(Yf(xe)&&Et(xe)||$v(xe)||Bo(xe)&&te.isImplementationOfOverload(xe))return;let Pt;bn(xe)&&(Pt=b,b=xe);const Re=qK(xe),mt=a;Re&&(a=vS(xe));const Je=u;switch(xe.kind){case 265:{u=!1;const kt=pt(R.updateTypeAliasDeclaration(xe,ji(xe),xe.name,wn(xe.typeParameters,ts,Uc),z.checkDefined(Ct(xe.type,ts,gs))));return u=Je,kt}case 264:return pt(R.updateInterfaceDeclaration(xe,ji(xe),xe.name,Ui(xe,xe.typeParameters),Ot(xe.heritageClauses),wn(xe.members,ts,xT)));case 262:{const kt=pt(R.updateFunctionDeclaration(xe,ji(xe),void 0,xe.name,Ui(xe,xe.typeParameters),Oi(xe,xe.parameters),xt(xe,xe.type),void 0));if(kt&&te.isExpandoFunctionDeclaration(xe)&&ft(xe)){const Ci=te.getPropertiesOfContainerFunction(xe);ye&&be(xe);const $e=Gk.createModuleDeclaration(void 0,kt.name||R.createIdentifier("_default"),R.createModuleBlock([]),32);ml($e,b),$e.locals=ga(Ci),$e.symbol=Ci[0].parent;const qt=[];let $t=ns(Ci,Bt=>{if(!_P(Bt.valueDeclaration))return;const le=Ws(Bt.escapedName);if(!wp(le,99))return;a=vS(Bt.valueDeclaration);const je=te.createTypeOfDeclaration(Bt.valueDeclaration,$e,HV|-2147483648,j);a=mt;const de=YL(le),tt=de?R.getGeneratedNameForNode(Bt.valueDeclaration):R.createIdentifier(le);de&&qt.push([tt,le]);const Ae=R.createVariableDeclaration(tt,void 0,je,void 0);return R.createVariableStatement(de?void 0:[R.createToken(95)],R.createVariableDeclarationList([Ae]))});qt.length?$t.push(R.createExportDeclaration(void 0,!1,R.createNamedExports(Yt(qt,([Bt,le])=>R.createExportSpecifier(!1,Bt,le))))):$t=ns($t,Bt=>R.replaceModifiers(Bt,0));const ii=R.createModuleDeclaration(ji(xe),xe.name,R.createModuleBlock($t),32);if(!Ep(kt,2048))return[kt,ii];const Gt=R.createModifiersFromModifierFlags(Wh(kt)&-2081|128),wi=R.updateFunctionDeclaration(kt,Gt,void 0,kt.name,kt.typeParameters,kt.parameters,kt.type,void 0),ce=R.updateModuleDeclaration(ii,Gt,ii.name,ii.body),ut=R.createExportAssignment(void 0,!1,ii.name);return Ns(xe.parent)&&(p=!0),C=!0,[wi,ce,ut]}else return kt}case 267:{u=!1;const kt=xe.body;if(kt&&kt.kind===268){const Ci=m,$e=C;C=!1,m=!1;const qt=wn(kt.statements,Cn,Es);let $t=Wo(qt);xe.flags&33554432&&(m=!1),!Iv(xe)&&!Yo($t)&&!C&&(m?$t=R.createNodeArray([...$t,gV(R)]):$t=wn($t,Ko,Es));const ii=R.updateModuleBlock(kt,$t);u=Je,m=Ci,C=$e;const Gt=ji(xe);return pt(ot(xe,Gt,DT(xe)?Rn(xe,xe.name):xe.name,ii))}else{u=Je;const Ci=ji(xe);u=!1,Ct(kt,Cn);const $e=y_(kt),qt=E.get($e);return E.delete($e),pt(ot(xe,Ci,xe.name,qt))}}case 263:{U=xe.name,q=xe;const kt=R.createNodeArray(ji(xe)),Ci=Ui(xe,xe.typeParameters),$e=Gy(xe);let qt;if($e){const ut=a;qt=Mo(Ln($e.parameters,Bt=>{if(!Kr(Bt,31)||Ds(Bt))return;if(a=vS(Bt),Bt.name.kind===80)return Ai(R.createPropertyDeclaration(ji(Bt),Bt.name,Bt.questionToken,xt(Bt,Bt.type),st(Bt)),Bt);return le(Bt.name);function le(je){let de;for(const tt of je.elements)zd(tt)||(Qo(tt.name)&&(de=no(de,le(tt.name))),de=de||[],de.push(R.createPropertyDeclaration(ji(Bt),tt.name,void 0,xt(tt,void 0),void 0)));return de}})),a=ut}const ii=Rt(xe.members,ut=>!!ut.name&&Vs(ut.name))?[R.createPropertyDeclaration(void 0,R.createPrivateIdentifier("#private"),void 0,void 0,void 0)]:void 0,Gt=no(no(ii,qt),wn(xe.members,ts,Vd)),wi=R.createNodeArray(Gt),ce=Pv(xe);if(ce&&!pc(ce.expression)&&ce.expression.kind!==106){const ut=xe.name?Ws(xe.name.escapedText):"default",Bt=R.createUniqueName(`${ut}_base`,16);a=()=>({diagnosticMessage:k.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,errorNode:ce,typeName:xe.name});const le=R.createVariableDeclaration(Bt,void 0,te.createTypeOfExpression(ce.expression,xe,HV,j),void 0),je=R.createVariableStatement(u?[R.createModifier(138)]:[],R.createVariableDeclarationList([le],2)),de=R.createNodeArray(Yt(xe.heritageClauses,tt=>{if(tt.token===96){const Ae=a;a=vS(tt.types[0]);const Ke=R.updateHeritageClause(tt,Yt(tt.types,Qt=>R.updateExpressionWithTypeArguments(Qt,Bt,wn(Qt.typeArguments,ts,gs))));return a=Ae,Ke}return R.updateHeritageClause(tt,wn(R.createNodeArray(Ri(tt.types,Ae=>pc(Ae.expression)||Ae.expression.kind===106)),ts,Gb))}));return[je,pt(R.updateClassDeclaration(xe,kt,xe.name,Ci,de,wi))]}else{const ut=Ot(xe.heritageClauses);return pt(R.updateClassDeclaration(xe,kt,xe.name,Ci,ut,wi))}}case 243:return pt(hn(xe));case 266:return pt(R.updateEnumDeclaration(xe,R.createNodeArray(ji(xe)),xe.name,R.createNodeArray(ns(xe.members,kt=>{if(Ds(kt))return;const Ci=te.getEnumMemberValue(kt),$e=Ci==null?void 0:Ci.value;ye&&kt.initializer&&(Ci!=null&&Ci.hasExternalReferences)&&!Ja(kt.name)&&t.addDiagnostic(Kn(kt,k.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations));const qt=$e===void 0?void 0:typeof $e=="string"?R.createStringLiteral($e):$e<0?R.createPrefixUnaryExpression(41,R.createNumericLiteral(-$e)):R.createNumericLiteral($e);return Ai(R.updateEnumMember(kt,kt.name,qt),kt)}))))}return z.assertNever(xe,`Unhandled top-level node in declaration emit: ${z.formatSyntaxKind(xe.kind)}`);function pt(kt){return bn(xe)&&(b=Pt),Re&&(a=mt),xe.kind===267&&(u=Je),kt===xe?kt:(q=void 0,U=void 0,kt&&Er(Ai(kt,xe),xe))}}function hn(xe){if(!W(xe.declarationList.declarations,Ht))return;const Pt=wn(xe.declarationList.declarations,ts,ds);if(!O(Pt))return;const Re=R.createNodeArray(ji(xe));let mt;return nW(xe.declarationList)||iW(xe.declarationList)?(mt=R.createVariableDeclarationList(Pt,2),Er(mt,xe.declarationList),zt(mt,xe.declarationList),Sd(mt,xe.declarationList)):mt=R.updateVariableDeclarationList(xe.declarationList,Pt),R.updateVariableStatement(xe,Re,mt)}function lr(xe){return zs(ns(xe.elements,Pt=>as(Pt)))}function as(xe){if(xe.kind!==232&&xe.name)return Ht(xe)?Qo(xe.name)?lr(xe.name):R.createVariableDeclaration(xe.name,void 0,xt(xe,void 0),void 0):void 0}function fs(xe){let Pt;N||(Pt=a,a=OEe(xe)),U=xe.name,z.assert(Hb(xe));const mt=xe.name.expression;Mi(mt,b),N||(a=Pt),U=void 0}function Ds(xe){return!!pe&&!!xe&&xwe(xe,Q)}function ha(xe){return Ec(xe)||$u(xe)}function Yo(xe){return Rt(xe,ha)}function ji(xe){const Pt=Wh(xe),Re=fl(xe);return Pt===Re?BV(xe.modifiers,mt=>$r(mt,Ra),Ra):R.createModifiersFromModifierFlags(Re)}function fl(xe){let Pt=130030,Re=u&&!FAt(xe)?128:0;const mt=xe.parent.kind===307;return(!mt||h&&mt&&Td(xe.parent))&&(Pt^=128,Re=0),jKe(xe,Pt,Re)}function St(xe,Pt){let Re=FEe(xe);return!Re&&xe!==Pt.firstAccessor&&(Re=FEe(Pt.firstAccessor),a=vS(Pt.firstAccessor)),!Re&&Pt.secondAccessor&&xe!==Pt.secondAccessor&&(Re=FEe(Pt.secondAccessor),a=vS(Pt.secondAccessor)),Re}function Ot(xe){return R.createNodeArray(Ri(Yt(xe,Pt=>R.updateHeritageClause(Pt,wn(R.createNodeArray(Ri(Pt.types,Re=>pc(Re.expression)||Pt.token===96&&Re.expression.kind===106)),ts,Gb))),Pt=>Pt.types&&!!Pt.types.length))}}function FAt(t){return t.kind===264}function BAt(t,r,a,u){return t.createModifiersFromModifierFlags(jKe(r,a,u))}function jKe(t,r=131070,a=0){let u=Wh(t)&r|a;return u&2048&&!(u&32)&&(u^=32),u&2048&&u&128&&(u^=128),u}function FEe(t){if(t)return t.kind===177?t.type:t.parameters.length>0?t.parameters[0].type:void 0}function zKe(t){switch(t.kind){case 172:case 171:return!Ep(t,2);case 169:case 260:return!0}return!1}function WAt(t){switch(t.kind){case 262:case 267:case 271:case 264:case 263:case 265:case 266:case 243:case 272:case 278:case 277:return!0}return!1}function VAt(t){switch(t.kind){case 180:case 176:case 174:case 177:case 178:case 172:case 171:case 173:case 179:case 181:case 260:case 168:case 233:case 183:case 194:case 184:case 185:case 205:return!0}return!1}function HAt(t){switch(t){case 99:case 7:case 6:case 5:case 200:return hce;case 4:return PEe;case 100:case 199:return AEe;default:return fce}}var BEe={scriptTransformers:x,declarationTransformers:x};function WEe(t,r,a){return{scriptTransformers:jAt(t,r,a),declarationTransformers:zAt(r)}}function jAt(t,r,a){if(a)return x;const u=il(t),h=Vh(t),p=JW(t),m=[];return un(m,r&&Yt(r.before,qKe)),m.push(pEe),t.experimentalDecorators&&m.push(vEe),sG(t)&&m.push(EEe),u<99&&m.push(kEe),!t.experimentalDecorators&&(u<99||!p)&&m.push(yEe),m.push(gEe),u<8&&m.push(xEe),u<7&&m.push(wEe),u<6&&m.push(SEe),u<5&&m.push(CEe),u<4&&m.push(bEe),u<3&&m.push(IEe),u<2&&(m.push(NEe),m.push(LEe)),m.push(HAt(h)),un(m,r&&Yt(r.after,qKe)),m}function zAt(t){const r=[];return r.push(_ce),un(r,t&&Yt(t.afterDeclarations,qAt)),r}function UAt(t){return r=>nTe(r)?t.transformBundle(r):t.transformSourceFile(r)}function UKe(t,r){return a=>{const u=t(a);return typeof u=="function"?r(a,u):UAt(u)}}function qKe(t){return UKe(t,Q0)}function qAt(t){return UKe(t,(r,a)=>a)}function $7(t,r){return r}function jV(t,r,a){a(t,r)}function zV(t,r,a,u,h,p,m){var C,b;const T=new Array(357);let E,N,R,F=0,j=[],U=[],q=[],Q=[],re=0,Y=!1,ue=[],te=0,Se,oe,pe=$7,ye=jV,be=0;const _e=[],ve={factory:a,getCompilerOptions:()=>u,getEmitResolver:()=>t,getEmitHost:()=>r,getEmitHelperFactory:l_(()=>f2e(ve)),startLexicalEnvironment:nt,suspendLexicalEnvironment:ze,resumeLexicalEnvironment:st,endLexicalEnvironment:xt,setLexicalEnvironmentFlags:Et,getLexicalEnvironmentFlags:ft,hoistVariableDeclaration:Ue,hoistFunctionDeclaration:Ye,addInitializationStatement:wt,startBlockScope:Ht,endBlockScope:Oi,addBlockScopedVariable:Ji,requestEmitHelper:Ui,readEmitHelpers:bn,enableSubstitution:fe,enableEmitNotification:et,isSubstitutionEnabled:Ie,isEmitNotificationEnabled:He,get onSubstituteNode(){return pe},set onSubstituteNode(Ai){z.assert(be<1,"Cannot modify transformation hooks after initialization has completed."),z.assert(Ai!==void 0,"Value must not be 'undefined'"),pe=Ai},get onEmitNode(){return ye},set onEmitNode(Ai){z.assert(be<1,"Cannot modify transformation hooks after initialization has completed."),z.assert(Ai!==void 0,"Value must not be 'undefined'"),ye=Ai},addDiagnostic(Ai){_e.push(Ai)}};for(const Ai of h)yae(_n(xo(Ai)));cu("beforeTransform");const Ee=p.map(Ai=>Ai(ve)),ke=Ai=>{for(const Rn of Ee)Ai=Rn(Ai);return Ai};be=1;const Fe=[];for(const Ai of h)(C=sr)==null||C.push(sr.Phase.Emit,"transformNodes",Ai.kind===307?{path:Ai.path}:{kind:Ai.kind,pos:Ai.pos,end:Ai.end}),Fe.push((m?ke:Oe)(Ai)),(b=sr)==null||b.pop();return be=2,cu("afterTransform"),qg("transformTime","beforeTransform","afterTransform"),{transformed:Fe,substituteNode:Le,emitNodeWithNotification:We,isEmitNotificationEnabled:He,dispose:Mi,diagnostics:_e};function Oe(Ai){return Ai&&(!Ns(Ai)||!Ai.isDeclarationFile)?ke(Ai):Ai}function fe(Ai){z.assert(be<2,"Cannot modify the transformation context after transformation has completed."),T[Ai]|=1}function Ie(Ai){return(T[Ai.kind]&1)!==0&&(Ya(Ai)&8)===0}function Le(Ai,Rn){return z.assert(be<3,"Cannot substitute a node after the result is disposed."),Rn&&Ie(Rn)&&pe(Ai,Rn)||Rn}function et(Ai){z.assert(be<2,"Cannot modify the transformation context after transformation has completed."),T[Ai]|=2}function He(Ai){return(T[Ai.kind]&2)!==0||(Ya(Ai)&4)!==0}function We(Ai,Rn,bs){z.assert(be<3,"Cannot invoke TransformationResult callbacks after the result is disposed."),Rn&&(He(Rn)?ye(Ai,Rn,bs):bs(Ai,Rn))}function Ue(Ai){z.assert(be>0,"Cannot modify the lexical environment during initialization."),z.assert(be<2,"Cannot modify the lexical environment after transformation has completed.");const Rn=ir(a.createVariableDeclaration(Ai),128);E?E.push(Rn):E=[Rn],F&1&&(F|=2)}function Ye(Ai){z.assert(be>0,"Cannot modify the lexical environment during initialization."),z.assert(be<2,"Cannot modify the lexical environment after transformation has completed."),ir(Ai,2097152),N?N.push(Ai):N=[Ai]}function wt(Ai){z.assert(be>0,"Cannot modify the lexical environment during initialization."),z.assert(be<2,"Cannot modify the lexical environment after transformation has completed."),ir(Ai,2097152),R?R.push(Ai):R=[Ai]}function nt(){z.assert(be>0,"Cannot modify the lexical environment during initialization."),z.assert(be<2,"Cannot modify the lexical environment after transformation has completed."),z.assert(!Y,"Lexical environment is suspended."),j[re]=E,U[re]=N,q[re]=R,Q[re]=F,re++,E=void 0,N=void 0,R=void 0,F=0}function ze(){z.assert(be>0,"Cannot modify the lexical environment during initialization."),z.assert(be<2,"Cannot modify the lexical environment after transformation has completed."),z.assert(!Y,"Lexical environment is already suspended."),Y=!0}function st(){z.assert(be>0,"Cannot modify the lexical environment during initialization."),z.assert(be<2,"Cannot modify the lexical environment after transformation has completed."),z.assert(Y,"Lexical environment is not suspended."),Y=!1}function xt(){z.assert(be>0,"Cannot modify the lexical environment during initialization."),z.assert(be<2,"Cannot modify the lexical environment after transformation has completed."),z.assert(!Y,"Lexical environment is suspended.");let Ai;if(E||N||R){if(N&&(Ai=[...N]),E){const Rn=a.createVariableStatement(void 0,a.createVariableDeclarationList(E));ir(Rn,2097152),Ai?Ai.push(Rn):Ai=[Rn]}R&&(Ai?Ai=[...Ai,...R]:Ai=[...R])}return re--,E=j[re],N=U[re],R=q[re],F=Q[re],re===0&&(j=[],U=[],q=[],Q=[]),Ai}function Et(Ai,Rn){F=Rn?F|Ai:F&~Ai}function ft(){return F}function Ht(){z.assert(be>0,"Cannot start a block scope during initialization."),z.assert(be<2,"Cannot start a block scope after transformation has completed."),ue[te]=Se,te++,Se=void 0}function Oi(){z.assert(be>0,"Cannot end a block scope during initialization."),z.assert(be<2,"Cannot end a block scope after transformation has completed.");const Ai=Rt(Se)?[a.createVariableStatement(void 0,a.createVariableDeclarationList(Se.map(Rn=>a.createVariableDeclaration(Rn)),1))]:void 0;return te--,Se=ue[te],te===0&&(ue=[]),Ai}function Ji(Ai){z.assert(te>0,"Cannot add a block scoped variable outside of an iteration body."),(Se||(Se=[])).push(Ai)}function Ui(Ai){if(z.assert(be>0,"Cannot modify the transformation context during initialization."),z.assert(be<2,"Cannot modify the transformation context after transformation has completed."),z.assert(!Ai.scoped,"Cannot request a scoped emit helper."),Ai.dependencies)for(const Rn of Ai.dependencies)Ui(Rn);oe=xi(oe,Ai)}function bn(){z.assert(be>0,"Cannot modify the transformation context during initialization."),z.assert(be<2,"Cannot modify the transformation context after transformation has completed.");const Ai=oe;return oe=void 0,Ai}function Mi(){if(be<3){for(const Ai of h)yae(_n(xo(Ai)));E=void 0,j=void 0,N=void 0,U=void 0,pe=void 0,ye=void 0,oe=void 0,be=3}}}var UV={factory:G,getCompilerOptions:()=>({}),getEmitResolver:pa,getEmitHost:pa,getEmitHelperFactory:pa,startLexicalEnvironment:dl,resumeLexicalEnvironment:dl,suspendLexicalEnvironment:dl,endLexicalEnvironment:yT,setLexicalEnvironmentFlags:dl,getLexicalEnvironmentFlags:()=>0,hoistVariableDeclaration:dl,hoistFunctionDeclaration:dl,addInitializationStatement:dl,startBlockScope:dl,endBlockScope:yT,addBlockScopedVariable:dl,requestEmitHelper:dl,readEmitHelpers:pa,enableSubstitution:dl,enableEmitNotification:dl,isSubstitutionEnabled:pa,isEmitNotificationEnabled:pa,onSubstituteNode:$7,onEmitNode:jV,addDiagnostic:dl},$Ke=$At();function VEe(t){return tu(t,".tsbuildinfo")}function pce(t,r,a,u=!1,h,p){const m=Lo(a)?a:RJ(t,a,u),C=t.getCompilerOptions();if(C.outFile){if(m.length){const b=G.createBundle(m),T=r(J7(b,t,u),b);if(T)return T}}else{if(!h)for(const b of m){const T=r(J7(b,t,u),b);if(T)return T}if(p){const b=yS(C);if(b)return r({buildInfoPath:b},void 0)}}}function yS(t){const r=t.configFilePath;if(!$8(t))return;if(t.tsBuildInfoFile)return t.tsBuildInfoFile;const a=t.outFile;let u;if(a)u=h_(a);else{if(!r)return;const h=h_(r);u=t.outDir?t.rootDir?Ck(t.outDir,W0(t.rootDir,h,!0)):Hr(t.outDir,fd(h)):h}return u+".tsbuildinfo"}function $K(t,r){const a=t.outFile,u=t.emitDeclarationOnly?void 0:a,h=u&&JKe(u,t),p=r||fg(t)?h_(a)+".d.ts":void 0,m=p&&eG(t)?p+".map":void 0,C=yS(t);return{jsFilePath:u,sourceMapFilePath:h,declarationFilePath:p,declarationMapPath:m,buildInfoPath:C}}function J7(t,r,a){const u=r.getCompilerOptions();if(t.kind===308)return $K(u,a);{const h=Axe(t.fileName,r,JK(t.fileName,u)),p=Dm(t),m=p&&Mb(t.fileName,h,r.getCurrentDirectory(),!r.useCaseSensitiveFileNames())===0,C=u.emitDeclarationOnly||m?void 0:h,b=!C||Dm(t)?void 0:JKe(C,u),T=a||fg(u)&&!p?Oxe(t.fileName,r):void 0,E=T&&eG(u)?T+".map":void 0;return{jsFilePath:C,sourceMapFilePath:b,declarationFilePath:T,declarationMapPath:E,buildInfoPath:void 0}}}function JKe(t,r){return r.sourceMap&&!r.inlineSourceMap?t+".map":void 0}function JK(t,r){return tu(t,".json")?".json":r.jsx===1&&rd(t,[".jsx",".tsx"])?".jsx":rd(t,[".mts",".mjs"])?".mjs":rd(t,[".cts",".cjs"])?".cjs":".js"}function GKe(t,r,a,u){return a?Ck(a,W0(u(),t,r)):t}function k3(t,r,a,u=()=>UP(r,a)){return gce(t,r.options,a,u)}function gce(t,r,a,u){return Kw(GKe(t,a,r.declarationDir||r.outDir,u),OJ(t))}function KKe(t,r,a,u=()=>UP(r,a)){if(r.options.emitDeclarationOnly)return;const h=tu(t,".json"),p=mce(t,r.options,a,u);return!h||Mb(t,p,z.checkDefined(r.options.configFilePath),a)!==0?p:void 0}function mce(t,r,a,u){return Kw(GKe(t,a,r.outDir,u),JK(t,r))}function QKe(){let t;return{addOutput:r,getOutputs:a};function r(u){u&&(t||(t=[])).push(u)}function a(){return t||x}}function XKe(t,r){const{jsFilePath:a,sourceMapFilePath:u,declarationFilePath:h,declarationMapPath:p,buildInfoPath:m}=$K(t.options,!1);r(a),r(u),r(h),r(p),r(m)}function ZKe(t,r,a,u,h){if(xf(r))return;const p=KKe(r,t,a,h);if(u(p),!tu(r,".json")&&(p&&t.options.sourceMap&&u(`${p}.map`),fg(t.options))){const m=k3(r,t,a,h);u(m),t.options.declarationMap&&u(`${m}.map`)}}function G7(t,r,a,u,h){let p;return t.rootDir?(p=bo(t.rootDir,a),h==null||h(t.rootDir)):t.composite&&t.configFilePath?(p=rs(Lf(t.configFilePath)),h==null||h(p)):p=GEe(r(),a,u),p&&p[p.length-1]!==Hc&&(p+=Hc),p}function UP({options:t,fileNames:r},a){return G7(t,()=>Ri(r,u=>!(t.noEmitForJsFiles&&rd(u,Z6))&&!xf(u)),rs(Lf(z.checkDefined(t.configFilePath))),Zf(!a))}function GK(t,r){const{addOutput:a,getOutputs:u}=QKe();if(t.options.outFile)XKe(t,a);else{const h=l_(()=>UP(t,r));for(const p of t.fileNames)ZKe(t,p,r,a,h);a(yS(t.options))}return u()}function YKe(t,r,a){r=ra(r),z.assert(Mt(t.fileNames,r),"Expected fileName to be present in command line");const{addOutput:u,getOutputs:h}=QKe();return t.options.outFile?XKe(t,u):ZKe(t,r,a,u),h()}function vce(t,r){if(t.options.outFile){const{jsFilePath:h,declarationFilePath:p}=$K(t.options,!1);return z.checkDefined(h||p,`project ${t.options.configFilePath} expected to have at least one output`)}const a=l_(()=>UP(t,r));for(const h of t.fileNames){if(xf(h))continue;const p=KKe(h,t,r,a);if(p)return p;if(!tu(h,".json")&&fg(t.options))return k3(h,t,r,a)}const u=yS(t.options);return u||z.fail(`project ${t.options.configFilePath} expected to have at least one output`)}function yce(t,r){return!!r&&!!t}function bce(t,r,a,{scriptTransformers:u,declarationTransformers:h},p,m,C){var b=r.getCompilerOptions(),T=b.sourceMap||b.inlineSourceMap||eG(b)?[]:void 0,E=b.listEmittedFiles?[]:void 0,N=O8(),R=fS(b),F=RW(R),{enter:j,exit:U}=Cre("printTime","beforePrint","afterPrint"),q=!1;return j(),pce(r,Q,RJ(r,a,C),C,m,!a),U(),{emitSkipped:q,diagnostics:N.getDiagnostics(),emittedFiles:E,sourceMaps:T};function Q({jsFilePath:ve,sourceMapFilePath:Ee,declarationFilePath:ke,declarationMapPath:Fe,buildInfoPath:Oe},fe){var Ie,Le,et,He,We,Ue;(Ie=sr)==null||Ie.push(sr.Phase.Emit,"emitJsFileOrBundle",{jsFilePath:ve}),Y(fe,ve,Ee),(Le=sr)==null||Le.pop(),(et=sr)==null||et.push(sr.Phase.Emit,"emitDeclarationFileOrBundle",{declarationFilePath:ke}),ue(fe,ke,Fe),(He=sr)==null||He.pop(),(We=sr)==null||We.push(sr.Phase.Emit,"emitBuildInfo",{buildInfoPath:Oe}),re(Oe),(Ue=sr)==null||Ue.pop()}function re(ve){if(!ve||a||q)return;if(r.isEmitBlocked(ve)){q=!0;return}const Ee=r.getBuildInfo()||KK(void 0);FW(r,N,ve,HEe(Ee),!1,void 0,{buildInfo:Ee}),E==null||E.push(ve)}function Y(ve,Ee,ke){if(!ve||p||!Ee)return;if(r.isEmitBlocked(Ee)||b.noEmit){q=!0;return}(Ns(ve)?[ve]:Ri(ve.sourceFiles,bJ)).forEach(Ie=>{(b.noCheck||!XW(Ie,b))&&Se(Ie)});const Fe=zV(t,r,G,b,[ve],u,!1),Oe={removeComments:b.removeComments,newLine:b.newLine,noEmitHelpers:b.noEmitHelpers,module:Vh(b),target:il(b),sourceMap:b.sourceMap,inlineSourceMap:b.inlineSourceMap,inlineSources:b.inlineSources,extendedDiagnostics:b.extendedDiagnostics},fe=ax(Oe,{hasGlobalName:t.hasGlobalName,onEmitNode:Fe.emitNodeWithNotification,isEmitNotificationEnabled:Fe.isEmitNotificationEnabled,substituteNode:Fe.substituteNode});z.assert(Fe.transformed.length===1,"Should only see one output from the transform"),oe(Ee,ke,Fe,fe,b),Fe.dispose(),E&&(E.push(Ee),ke&&E.push(ke))}function ue(ve,Ee,ke){if(!ve||p===0)return;if(!Ee){(p||b.emitDeclarationOnly)&&(q=!0);return}const Fe=Ns(ve)?[ve]:ve.sourceFiles,Oe=C?Fe:Ri(Fe,bJ),fe=b.outFile?[G.createBundle(Oe)]:Oe;Oe.forEach(et=>{(p&&!fg(b)||b.noCheck||yce(p,C)||!XW(et,b))&&te(et)});const Ie=zV(t,r,G,b,fe,h,!1);if(O(Ie.diagnostics))for(const et of Ie.diagnostics)N.add(et);const Le=!!Ie.diagnostics&&!!Ie.diagnostics.length||!!r.isEmitBlocked(Ee)||!!b.noEmit;if(q=q||Le,!Le||C){z.assert(Ie.transformed.length===1,"Should only see one output from the decl transform");const et={removeComments:b.removeComments,newLine:b.newLine,noEmitHelpers:!0,module:b.module,target:b.target,sourceMap:p!==2&&b.declarationMap,inlineSourceMap:b.inlineSourceMap,extendedDiagnostics:b.extendedDiagnostics,onlyPrintJsDocStyle:!0,omitBraceSourceMapPositions:!0},He=ax(et,{hasGlobalName:t.hasGlobalName,onEmitNode:Ie.emitNodeWithNotification,isEmitNotificationEnabled:Ie.isEmitNotificationEnabled,substituteNode:Ie.substituteNode});oe(Ee,ke,Ie,He,{sourceMap:et.sourceMap,sourceRoot:b.sourceRoot,mapRoot:b.mapRoot,extendedDiagnostics:b.extendedDiagnostics}),E&&(E.push(Ee),ke&&E.push(ke))}Ie.dispose()}function te(ve){if(Ec(ve)){ve.expression.kind===80&&t.collectLinkedAliases(ve.expression,!0);return}else if(gh(ve)){t.collectLinkedAliases(ve.propertyName||ve.name,!0);return}jo(ve,te)}function Se(ve){MP(ve,Ee=>{if(kd(Ee)&&!(uS(Ee)&32)||Cu(Ee))return"skip";t.markLinkedReferences(Ee)})}function oe(ve,Ee,ke,Fe,Oe){const fe=ke.transformed[0],Ie=fe.kind===308?fe:void 0,Le=fe.kind===307?fe:void 0,et=Ie?Ie.sourceFiles:[Le];let He;pe(Oe,fe)&&(He=qDe(r,fd(Lf(ve)),ye(Oe),be(Oe,ve,Le),Oe)),Ie?Fe.writeBundle(Ie,F,He):Fe.writeFile(Le,F,He);let We;if(He){T&&T.push({inputSourceFileNames:He.getSources(),sourceMap:He.toJSON()});const Ye=_e(Oe,He,ve,Ee,Le);if(Ye&&(F.isAtStartOfLine()||F.rawWrite(R),We=F.getTextPos(),F.writeComment(`//# sourceMappingURL=${Ye}`)),Ee){const wt=He.toString();FW(r,N,Ee,wt,!1,et)}}else F.writeLine();const Ue=F.getText();FW(r,N,ve,Ue,!!b.emitBOM,et,{sourceMapUrlPos:We,diagnostics:ke.diagnostics}),F.clear()}function pe(ve,Ee){return(ve.sourceMap||ve.inlineSourceMap)&&(Ee.kind!==307||!tu(Ee.fileName,".json"))}function ye(ve){const Ee=Lf(ve.sourceRoot||"");return Ee&&Xd(Ee)}function be(ve,Ee,ke){if(ve.sourceRoot)return r.getCommonSourceDirectory();if(ve.mapRoot){let Fe=Lf(ve.mapRoot);return ke&&(Fe=rs(FJ(ke.fileName,r,Fe))),L1(Fe)===0&&(Fe=Hr(r.getCommonSourceDirectory(),Fe)),Fe}return rs(ra(Ee))}function _e(ve,Ee,ke,Fe,Oe){if(ve.inlineSourceMap){const Ie=Ee.toString();return`data:application/json;base64,${eke(Wd,Ie)}`}const fe=fd(Lf(z.checkDefined(Fe)));if(ve.mapRoot){let Ie=Lf(ve.mapRoot);return Oe&&(Ie=rs(FJ(Oe.fileName,r,Ie))),L1(Ie)===0?(Ie=Hr(r.getCommonSourceDirectory(),Ie),encodeURI(OL(rs(ra(ke)),Hr(Ie,fe),r.getCurrentDirectory(),r.getCanonicalFileName,!0))):encodeURI(Hr(Ie,fe))}return encodeURI(fe)}}function KK(t){return{program:t,version:y}}function HEe(t){return JSON.stringify(t)}function Cce(t,r){return Moe(t,r)}var jEe={hasGlobalName:pa,getReferencedExportContainer:pa,getReferencedImportDeclaration:pa,getReferencedDeclarationWithCollidingName:pa,isDeclarationWithCollidingName:pa,isValueAliasDeclaration:pa,isReferencedAliasDeclaration:pa,isTopLevelValueImportEqualsWithEntityName:pa,hasNodeCheckFlag:pa,isDeclarationVisible:pa,isLateBound:t=>!1,collectLinkedAliases:pa,markLinkedReferences:pa,isImplementationOfOverload:pa,requiresAddingImplicitUndefined:pa,isExpandoFunctionDeclaration:pa,getPropertiesOfContainerFunction:pa,createTypeOfDeclaration:pa,createReturnTypeOfSignatureDeclaration:pa,createTypeOfExpression:pa,createLiteralConstValue:pa,isSymbolAccessible:pa,isEntityNameVisible:pa,getConstantValue:pa,getEnumMemberValue:pa,getReferencedValueDeclaration:pa,getReferencedValueDeclarations:pa,getTypeReferenceSerializationKind:pa,isOptionalParameter:pa,isArgumentsLocalBinding:pa,getExternalModuleFileFromDeclaration:pa,isLiteralConstDeclaration:pa,getJsxFactoryEntity:pa,getJsxFragmentFactoryEntity:pa,isBindingCapturedByNode:pa,getDeclarationStatementsForSourceFile:pa,isImportRequiredByAugmentation:pa,isDefinitelyReferenceToGlobalSymbolObject:pa},zEe=l_(()=>ax({})),DI=l_(()=>ax({removeComments:!0})),UEe=l_(()=>ax({removeComments:!0,neverAsciiEscape:!0})),QK=l_(()=>ax({removeComments:!0,omitTrailingSemicolon:!0}));function ax(t={},r={}){var{hasGlobalName:a,onEmitNode:u=jV,isEmitNotificationEnabled:h,substituteNode:p=$7,onBeforeEmitNode:m,onAfterEmitNode:C,onBeforeEmitNodeArray:b,onAfterEmitNodeArray:T,onBeforeEmitToken:E,onAfterEmitToken:N}=r,R=!!t.extendedDiagnostics,F=!!t.omitBraceSourceMapPositions,j=fS(t),U=Vh(t),q=new Map,Q,re,Y,ue,te,Se,oe,pe,ye,be,_e,ve,Ee,ke,Fe,Oe=t.preserveSourceNewlines,fe,Ie,Le,et=LF,He,We=!0,Ue,Ye,wt=-1,nt,ze=-1,st=-1,xt=-1,Et=-1,ft,Ht,Oi=!1,Ji=!!t.removeComments,Ui,bn,{enter:Mi,exit:Ai}=KUe(R,"commentTime","beforeComment","afterComment"),Rn=G.parenthesizer,bs={select:H=>H===0?Rn.parenthesizeLeadingTypeArgument:void 0},Hi=Ld();return ha(),{printNode:Hs,printList:Wo,printFile:Fo,printBundle:ts,writeNode:Cn,writeList:Ko,writeFile:hi,writeBundle:ot};function Hs(H,Ne,Jt){switch(H){case 0:z.assert(Ns(Ne),"Expected a SourceFile node.");break;case 2:z.assert(lt(Ne),"Expected an Identifier node.");break;case 1:z.assert(Ut(Ne),"Expected an Expression node.");break}switch(Ne.kind){case 307:return Fo(Ne);case 308:return ts(Ne)}return Cn(H,Ne,Jt,hn()),lr()}function Wo(H,Ne,Jt){return Ko(H,Ne,Jt,hn()),lr()}function ts(H){return ot(H,hn(),void 0),lr()}function Fo(H){return hi(H,hn(),void 0),lr()}function Cn(H,Ne,Jt,bi){const cs=Ie;Ds(bi,void 0),as(H,Ne,Jt),ha(),Ie=cs}function Ko(H,Ne,Jt,bi){const cs=Ie;Ds(bi,void 0),Jt&&fs(Jt),mc(void 0,Ne,H),ha(),Ie=cs}function ot(H,Ne,Jt){He=!1;const bi=Ie;Ds(Ne,Jt),lC(H),aC(H),Gt(H),NF(H);for(const cs of H.sourceFiles)as(0,cs,cs);ha(),Ie=bi}function hi(H,Ne,Jt){He=!0;const bi=Ie;Ds(Ne,Jt),lC(H),aC(H),as(0,H,H),ha(),Ie=bi}function hn(){return Le||(Le=RW(j))}function lr(){const H=Le.getText();return Le.clear(),H}function as(H,Ne,Jt){Jt&&fs(Jt),Re(H,Ne,void 0)}function fs(H){Q=H,ft=void 0,Ht=void 0,H&&Pg(H)}function Ds(H,Ne){H&&t.omitTrailingSemicolon&&(H=Soe(H)),Ie=H,Ue=Ne,We=!Ie||!Ue}function ha(){re=[],Y=[],ue=[],te=new Set,Se=[],oe=new Map,pe=[],ye=0,be=[],_e=0,ve=[],Ee=void 0,ke=[],Fe=void 0,Q=void 0,ft=void 0,Ht=void 0,Ds(void 0,void 0)}function Yo(){return ft||(ft=Wy(z.checkDefined(Q)))}function ji(H,Ne){H!==void 0&&Re(4,H,Ne)}function fl(H){H!==void 0&&Re(2,H,void 0)}function St(H,Ne){H!==void 0&&Re(1,H,Ne)}function Ot(H){Re(ja(H)?6:4,H)}function xe(H){Oe&&d0(H)&4&&(Oe=!1)}function Pt(H){Oe=H}function Re(H,Ne,Jt){bn=Jt,pt(0,H,Ne)(H,Ne),bn=void 0}function mt(H){return!Ji&&!Ns(H)}function Je(H){return!We&&!Ns(H)&&!yJ(H)}function pt(H,Ne,Jt){switch(H){case 0:if(u!==jV&&(!h||h(Jt)))return Ci;case 1:if(p!==$7&&(Ui=p(Ne,Jt)||Jt)!==Jt)return bn&&(Ui=bn(Ui)),ii;case 2:if(mt(Jt))return wD;case 3:if(Je(Jt))return s1;case 4:return $e;default:return z.assertNever(H)}}function kt(H,Ne,Jt){return pt(H+1,Ne,Jt)}function Ci(H,Ne){const Jt=kt(0,H,Ne);u(H,Ne,Jt)}function $e(H,Ne){if(m==null||m(Ne),Oe){const Jt=Oe;xe(Ne),qt(H,Ne),Pt(Jt)}else qt(H,Ne);C==null||C(Ne),bn=void 0}function qt(H,Ne,Jt=!0){if(Jt){const bi=bae(Ne);if(bi)return Bt(H,Ne,bi)}if(H===0)return oC(ua(Ne,Ns));if(H===2)return de(ua(Ne,lt));if(H===6)return ut(ua(Ne,ja),!0);if(H===3)return $t(ua(Ne,Uc));if(H===7)return nr(ua(Ne,mI));if(H===5)return z.assertNode(Ne,Aae),rp(!0);if(H===4){switch(Ne.kind){case 16:case 17:case 18:return ut(Ne,!1);case 80:return de(Ne);case 81:return tt(Ne);case 166:return Ae(Ne);case 167:return Qt(Ne);case 168:return ni(Ne);case 169:return fi(Ne);case 170:return Gi(Ne);case 171:return fn(Ne);case 172:return kn(Ne);case 173:return or(Ne);case 174:return rn(Ne);case 175:return _r(Ne);case 176:return Fs(Ne);case 177:case 178:return to(Ne);case 179:return Ar(Ne);case 180:return is(Ne);case 181:return $i(Ne);case 182:return zo(Ne);case 183:return Sl(Ne);case 184:return Rl(Ne);case 185:return pf(Ne);case 186:return qc(Ne);case 187:return wh(Ne);case 188:return Tu(Ne);case 189:return za(Ne);case 190:return Ul(Ne);case 192:return wl(Ne);case 193:return Li(Ne);case 194:return wu(Ne);case 195:return zh(Ne);case 196:return Uh(Ne);case 233:return xg(Ne);case 197:return z_();case 198:return Rc(Ne);case 199:return Qc(Ne);case 200:return J(Ne);case 201:return ct(Ne);case 202:return Mc(Ne);case 203:return Wt(Ne);case 204:return Tn(Ne);case 205:return mi(Ne);case 206:return mn(Ne);case 207:return Zr(Ne);case 208:return Fi(Ne);case 239:return J1(Ne);case 240:return ki();case 241:return q_(Ne);case 243:return G1(Ne);case 242:return rp(!1);case 244:return Xv(Ne);case 245:return Tg(Ne);case 246:return At(Ne);case 247:return di(Ne);case 248:return gi(Ne);case 249:return dn(Ne);case 250:return Vn(Ne);case 251:return ls(Ne);case 252:return ie(Ne);case 253:return po(Ne);case 254:return $o(Ne);case 255:return Dl(Ne);case 256:return Ga(Ne);case 257:return hu(Ne);case 258:return rm(Ne);case 259:return g0(Ne);case 260:return K1(Ne);case 261:return ob(Ne);case 262:return DS(Ne);case 263:return hx(Ne);case 264:return _x(Ne);case 265:return Vm(Ne);case 266:return u2(Ne);case 267:return tv(Ne);case 268:return Eg(Ne);case 269:return rC(Ne);case 270:return Do(Ne);case 271:return rt(Ne);case 272:return si(Ne);case 273:return Ti(Ne);case 274:return Ki(Ne);case 280:return Wa(Ne);case 275:return Jn(Ne);case 276:return sn(Ne);case 277:return ar(Ne);case 278:return ks(Ne);case 279:return nf(Ne);case 281:return xh(Ne);case 300:return ps(Ne);case 301:return Hn(Ne);case 282:return;case 283:return jm(Ne);case 12:return d2(Ne);case 286:case 289:return pD(Ne);case 287:case 290:return f2(Ne);case 291:return RI(Ne);case 292:return h2(Ne);case 293:return NS(Ne);case 294:return vl(Ne);case 295:return FI(Ne);case 296:return _2(Ne);case 297:return sC(Ne);case 298:return om(Ne);case 299:return $_(Ne);case 303:return Mp(Ne);case 304:return sp(Ne);case 305:return LS(Ne);case 306:return dA(Ne);case 307:return oC(Ne);case 308:return z.fail("Bundles should be printed using printBundle");case 309:return Yv(Ne);case 310:return hA(Ne);case 312:return vr("*");case 313:return vr("?");case 314:return Ic(Ne);case 315:return $s(Ne);case 316:return Ps(Ne);case 317:return ca(Ne);case 191:case 318:return Wf(Ne);case 319:return;case 320:return fA(Ne);case 322:return v0(Ne);case 323:return rf(Ne);case 327:case 332:case 337:return ht(Ne);case 328:case 329:return Pd(Ne);case 330:case 331:return;case 333:case 334:case 335:case 336:return;case 338:return iv(Ne);case 339:return WI(Ne);case 341:case 348:return m2(Ne);case 340:case 342:case 343:case 344:case 349:case 350:return p2(Ne);case 345:return AS(Ne);case 346:return _A(Ne);case 347:return PS(Ne);case 351:return g2(Ne);case 353:return}if(Ut(Ne)&&(H=1,p!==$7)){const bi=p(H,Ne)||Ne;bi!==Ne&&(Ne=bi,bn&&(Ne=bn(Ne)))}}if(H===1)switch(Ne.kind){case 9:case 10:return ce(Ne);case 11:case 14:case 15:return ut(Ne,!1);case 80:return de(Ne);case 81:return tt(Ne);case 209:return br(Ne);case 210:return Cs(Ne);case 211:return xs(Ne);case 212:return Xc(Ne);case 213:return Id(Ne);case 214:return $c(Ne);case 215:return Ud(Ne);case 216:return Fc(Ne);case 217:return qd(Ne);case 218:return qh(Ne);case 219:return Nd(Ne);case 220:return it(Ne);case 221:return ai(Ne);case 222:return Sn(Ne);case 223:return uo(Ne);case 224:return rl(Ne);case 225:return Mu(Ne);case 226:return Hi(Ne);case 227:return Xl(Ne);case 228:return $l(Ne);case 229:return Ju(Ne);case 230:return np(Ne);case 231:return ev(Ne);case 232:return;case 234:return U_(Ne);case 235:return nm(Ne);case 233:return xg(Ne);case 238:return kg(Ne);case 236:return $1(Ne);case 237:return z.fail("SyntheticExpression should never be printed.");case 282:return;case 284:return cA(Ne);case 285:return iO(Ne);case 288:return uA(Ne);case 352:return z.fail("SyntaxList should not be printed");case 353:return;case 354:return VI(Ne);case 355:return HI(Ne);case 356:return z.fail("SyntheticReferenceExpression should not be printed")}if(d_(Ne.kind))return CD(Ne,Ao);if(_se(Ne.kind))return CD(Ne,vr);z.fail(`Unhandled SyntaxKind: ${z.formatSyntaxKind(Ne.kind)}.`)}function $t(H){ji(H.name),Zn(),Ao("in"),Zn(),ji(H.constraint)}function ii(H,Ne){const Jt=kt(1,H,Ne);z.assertIsDefined(Ui),Ne=Ui,Ui=void 0,Jt(H,Ne)}function Gt(H){let Ne=!1;const Jt=H.kind===308?H:void 0;if(Jt&&U===0)return;const bi=Jt?Jt.sourceFiles.length:1;for(let cs=0;cs")}function co(H){Zn(),ji(H.type)}function ca(H){Ao("function"),cC(H,H.parameters),vr(":"),ji(H.type)}function Ic(H){vr("?"),ji(H.type)}function $s(H){vr("!"),ji(H.type)}function Ps(H){ji(H.type),vr("=")}function pf(H){Xp(H,H.modifiers),Ao("new"),Zn(),sm(H,zl,co)}function qc(H){Ao("typeof"),Zn(),ji(H.exprName),X1(H,H.typeArguments)}function wh(H){BS(H),W(H.members,fC),vr("{");const Ne=Ya(H)&1?768:32897;mc(H,H.members,Ne|524288),vr("}"),Um(H)}function Tu(H){ji(H.elementType,Rn.parenthesizeNonArrayTypeOfPostfixType),vr("["),vr("]")}function Wf(H){vr("..."),ji(H.type)}function za(H){Xe(23,H.pos,vr,H);const Ne=Ya(H)&1?528:657;mc(H,H.elements,Ne|524288,Rn.parenthesizeElementTypeOfTupleType),Xe(24,H.elements.end,vr,H)}function Mc(H){ji(H.dotDotDotToken),ji(H.name),ji(H.questionToken),Xe(59,H.name.end,vr,H),Zn(),ji(H.type)}function Ul(H){ji(H.type,Rn.parenthesizeTypeOfOptionalType),vr("?")}function wl(H){mc(H,H.types,516,Rn.parenthesizeConstituentTypeOfUnionType)}function Li(H){mc(H,H.types,520,Rn.parenthesizeConstituentTypeOfIntersectionType)}function wu(H){ji(H.checkType,Rn.parenthesizeCheckTypeOfConditionalType),Zn(),Ao("extends"),Zn(),ji(H.extendsType,Rn.parenthesizeExtendsTypeOfConditionalType),Zn(),vr("?"),Zn(),ji(H.trueType),Zn(),vr(":"),Zn(),ji(H.falseType)}function zh(H){Ao("infer"),Zn(),ji(H.typeParameter)}function Uh(H){vr("("),ji(H.type),vr(")")}function z_(){Ao("this")}function Rc(H){e1(H.operator,Ao),Zn();const Ne=H.operator===148?Rn.parenthesizeOperandOfReadonlyTypeOperator:Rn.parenthesizeOperandOfTypeOperator;ji(H.type,Ne)}function Qc(H){ji(H.objectType,Rn.parenthesizeNonArrayTypeOfPostfixType),vr("["),ji(H.indexType),vr("]")}function J(H){const Ne=Ya(H);vr("{"),Ne&1?Zn():(Jh(),C0()),H.readonlyToken&&(ji(H.readonlyToken),H.readonlyToken.kind!==148&&Ao("readonly"),Zn()),vr("["),Re(3,H.typeParameter),H.nameType&&(Zn(),Ao("as"),Zn(),ji(H.nameType)),vr("]"),H.questionToken&&(ji(H.questionToken),H.questionToken.kind!==58&&vr("?")),vr(":"),Zn(),ji(H.type),kh(),Ne&1?Zn():(Jh(),zm()),mc(H,H.members,2),vr("}")}function ct(H){St(H.literal)}function Wt(H){ji(H.head),mc(H,H.templateSpans,262144)}function mi(H){H.isTypeOf&&(Ao("typeof"),Zn()),Ao("import"),vr("("),ji(H.argument),H.attributes&&(vr(","),Zn(),Re(7,H.attributes)),vr(")"),H.qualifier&&(vr("."),ji(H.qualifier)),X1(H,H.typeArguments)}function mn(H){vr("{"),mc(H,H.elements,525136),vr("}")}function Zr(H){vr("["),mc(H,H.elements,524880),vr("]")}function Fi(H){ji(H.dotDotDotToken),H.propertyName&&(ji(H.propertyName),vr(":"),Zn()),ji(H.name),MS(H.initializer,H.name.end,H,Rn.parenthesizeExpressionForDisallowedComma)}function br(H){const Ne=H.elements,Jt=H.multiLine?65536:0;cb(H,Ne,8914|Jt,Rn.parenthesizeExpressionForDisallowedComma)}function Cs(H){BS(H),W(H.properties,fC);const Ne=Ya(H)&131072;Ne&&C0();const Jt=H.multiLine?65536:0,bi=Q&&Q.languageVersion>=1&&!Dm(Q)?64:0;mc(H,H.properties,526226|bi|Jt),Ne&&zm(),Um(H)}function xs(H){St(H.expression,Rn.parenthesizeLeftSideOfAccess);const Ne=H.questionDotToken||Bv(G.createToken(25),H.expression.end,H.name.pos),Jt=S0(H,H.expression,Ne),bi=S0(H,Ne,H.name);lm(Jt,!1),Ne.kind!==29&&ql(H.expression)&&!Ie.hasTrailingComment()&&!Ie.hasTrailingWhitespace()&&vr("."),H.questionDotToken?ji(Ne):Xe(Ne.kind,H.expression.end,vr,H),lm(bi,!1),ji(H.name),ub(Jt,bi)}function ql(H){if(H=u0(H),W_(H)){const Ne=dC(H,!0,!1);return!(H.numericLiteralFlags&448)&&!Ne.includes(Ta(25))&&!Ne.includes("E")&&!Ne.includes("e")}else if(Sc(H)){const Ne=r2e(H);return typeof Ne=="number"&&isFinite(Ne)&&Ne>=0&&Math.floor(Ne)===Ne}}function Xc(H){St(H.expression,Rn.parenthesizeLeftSideOfAccess),ji(H.questionDotToken),Xe(23,H.expression.end,vr,H),St(H.argumentExpression),Xe(24,H.argumentExpression.end,vr,H)}function Id(H){const Ne=d0(H)&16;Ne&&(vr("("),bD("0"),vr(","),Zn()),St(H.expression,Rn.parenthesizeLeftSideOfAccess),Ne&&vr(")"),ji(H.questionDotToken),X1(H,H.typeArguments),cb(H,H.arguments,2576,Rn.parenthesizeExpressionForDisallowedComma)}function $c(H){Xe(105,H.pos,Ao,H),Zn(),St(H.expression,Rn.parenthesizeExpressionOfNew),X1(H,H.typeArguments),cb(H,H.arguments,18960,Rn.parenthesizeExpressionForDisallowedComma)}function Ud(H){const Ne=d0(H)&16;Ne&&(vr("("),bD("0"),vr(","),Zn()),St(H.tag,Rn.parenthesizeLeftSideOfAccess),Ne&&vr(")"),X1(H,H.typeArguments),Zn(),St(H.template)}function Fc(H){vr("<"),ji(H.type),vr(">"),St(H.expression,Rn.parenthesizeOperandOfPrefixUnary)}function qd(H){const Ne=Xe(21,H.pos,vr,H),Jt=aO(H.expression,H);St(H.expression,void 0),qI(H.expression,H),ub(Jt),Xe(22,H.expression?H.expression.end:Ne,vr,H)}function qh(H){i1(H.name),ab(H)}function Nd(H){Xp(H,H.modifiers),sm(H,md,wg)}function md(H){RS(H,H.typeParameters),b2(H,H.parameters),OS(H.type),Zn(),ji(H.equalsGreaterThanToken)}function wg(H){Ho(H.body)?m0(H.body):(Zn(),St(H.body,Rn.parenthesizeConciseBodyOfArrowFunction))}function it(H){Xe(91,H.pos,Ao,H),Zn(),St(H.expression,Rn.parenthesizeOperandOfPrefixUnary)}function ai(H){Xe(114,H.pos,Ao,H),Zn(),St(H.expression,Rn.parenthesizeOperandOfPrefixUnary)}function Sn(H){Xe(116,H.pos,Ao,H),Zn(),St(H.expression,Rn.parenthesizeOperandOfPrefixUnary)}function uo(H){Xe(135,H.pos,Ao,H),Zn(),St(H.expression,Rn.parenthesizeOperandOfPrefixUnary)}function rl(H){e1(H.operator,uC),hl(H)&&Zn(),St(H.operand,Rn.parenthesizeOperandOfPrefixUnary)}function hl(H){const Ne=H.operand;return Ne.kind===224&&(H.operator===40&&(Ne.operator===40||Ne.operator===46)||H.operator===41&&(Ne.operator===41||Ne.operator===47))}function Mu(H){St(H.operand,Rn.parenthesizeOperandOfPostfixUnary),e1(H.operator,uC)}function Ld(){return rK(H,Ne,Jt,bi,cs,void 0);function H(so,Co){if(Co){Co.stackIndex++,Co.preserveSourceNewlinesStack[Co.stackIndex]=Oe,Co.containerPosStack[Co.stackIndex]=st,Co.containerEndStack[Co.stackIndex]=xt,Co.declarationListContainerEndStack[Co.stackIndex]=Et;const Va=Co.shouldEmitCommentsStack[Co.stackIndex]=mt(so),Kh=Co.shouldEmitSourceMapsStack[Co.stackIndex]=Je(so);m==null||m(so),Va&&T2(so),Kh&&_C(so),xe(so)}else Co={stackIndex:0,preserveSourceNewlinesStack:[void 0],containerPosStack:[-1],containerEndStack:[-1],declarationListContainerEndStack:[-1],shouldEmitCommentsStack:[!1],shouldEmitSourceMapsStack:[!1]};return Co}function Ne(so,Co,Va){return ho(so,Va,"left")}function Jt(so,Co,Va){const Kh=so.kind!==28,Th=S0(Va,Va.left,so),HS=S0(Va,so,Va.right);lm(Th,Kh),al(so.pos),CD(so,so.kind===103?Ao:uC),Vf(so.end,!0),lm(HS,!0)}function bi(so,Co,Va){return ho(so,Va,"right")}function cs(so,Co){const Va=S0(so,so.left,so.operatorToken),Kh=S0(so,so.operatorToken,so.right);if(ub(Va,Kh),Co.stackIndex>0){const Th=Co.preserveSourceNewlinesStack[Co.stackIndex],HS=Co.containerPosStack[Co.stackIndex],kD=Co.containerEndStack[Co.stackIndex],Bp=Co.declarationListContainerEndStack[Co.stackIndex],rv=Co.shouldEmitCommentsStack[Co.stackIndex],pC=Co.shouldEmitSourceMapsStack[Co.stackIndex];Pt(Th),pC&&QI(so),rv&&J_(so,HS,kD,Bp),C==null||C(so),Co.stackIndex--}}function ho(so,Co,Va){const Kh=Va==="left"?Rn.getParenthesizeLeftSideOfBinaryForOperator(Co.operatorToken.kind):Rn.getParenthesizeRightSideOfBinaryForOperator(Co.operatorToken.kind);let Th=pt(0,1,so);if(Th===ii&&(z.assertIsDefined(Ui),so=Kh(ua(Ui,Ut)),Th=kt(1,1,so),Ui=void 0),(Th===wD||Th===s1||Th===$e)&&cr(so))return so;bn=Kh,Th(1,so)}}function Xl(H){const Ne=S0(H,H.condition,H.questionToken),Jt=S0(H,H.questionToken,H.whenTrue),bi=S0(H,H.whenTrue,H.colonToken),cs=S0(H,H.colonToken,H.whenFalse);St(H.condition,Rn.parenthesizeConditionOfConditionalExpression),lm(Ne,!0),ji(H.questionToken),lm(Jt,!0),St(H.whenTrue,Rn.parenthesizeBranchOfConditionalExpression),ub(Ne,Jt),lm(bi,!0),ji(H.colonToken),lm(cs,!0),St(H.whenFalse,Rn.parenthesizeBranchOfConditionalExpression),ub(bi,cs)}function $l(H){ji(H.head),mc(H,H.templateSpans,262144)}function Ju(H){Xe(127,H.pos,Ao,H),ji(H.asteriskToken),rh(H.expression&&Ss(H.expression),Vo)}function np(H){Xe(26,H.pos,vr,H),St(H.expression,Rn.parenthesizeExpressionForDisallowedComma)}function ev(H){i1(H.name),Wm(H)}function xg(H){St(H.expression,Rn.parenthesizeLeftSideOfAccess),X1(H,H.typeArguments)}function U_(H){St(H.expression,void 0),H.type&&(Zn(),Ao("as"),Zn(),ji(H.type))}function nm(H){St(H.expression,Rn.parenthesizeLeftSideOfAccess),uC("!")}function kg(H){St(H.expression,void 0),H.type&&(Zn(),Ao("satisfies"),Zn(),ji(H.type))}function $1(H){FS(H.keywordToken,H.pos,vr),vr("."),ji(H.name)}function J1(H){St(H.expression),ji(H.literal)}function q_(H){vd(H,!H.multiLine&&lO(H))}function vd(H,Ne){Xe(19,H.pos,vr,H);const Jt=Ne||Ya(H)&1?768:129;mc(H,H.statements,Jt),Xe(20,H.statements.end,vr,H,!!(Jt&1))}function G1(H){Ig(H,H.modifiers,!1),ji(H.declarationList),kh()}function rp(H){H?vr(";"):kh()}function Xv(H){St(H.expression,Rn.parenthesizeExpressionOfExpressionStatement),(!Q||!Dm(Q)||oc(H.expression))&&kh()}function Tg(H){const Ne=Xe(101,H.pos,Ao,H);Zn(),Xe(21,Ne,vr,H),St(H.expression),Xe(22,H.expression.end,vr,H),b0(H,H.thenStatement),H.elseStatement&&(Fp(H,H.thenStatement,H.elseStatement),Xe(93,H.thenStatement.end,Ao,H),H.elseStatement.kind===245?(Zn(),ji(H.elseStatement)):b0(H,H.elseStatement))}function me(H,Ne){const Jt=Xe(117,Ne,Ao,H);Zn(),Xe(21,Jt,vr,H),St(H.expression),Xe(22,H.expression.end,vr,H)}function At(H){Xe(92,H.pos,Ao,H),b0(H,H.statement),Ho(H.statement)&&!Oe?Zn():Fp(H,H.statement,H.expression),me(H,H.statement.end),kh()}function di(H){me(H,H.pos),b0(H,H.statement)}function gi(H){const Ne=Xe(99,H.pos,Ao,H);Zn();let Jt=Xe(21,Ne,vr,H);Lr(H.initializer),Jt=Xe(27,H.initializer?H.initializer.end:Jt,vr,H),rh(H.condition),Jt=Xe(27,H.condition?H.condition.end:Jt,vr,H),rh(H.incrementor),Xe(22,H.incrementor?H.incrementor.end:Jt,vr,H),b0(H,H.statement)}function dn(H){const Ne=Xe(99,H.pos,Ao,H);Zn(),Xe(21,Ne,vr,H),Lr(H.initializer),Zn(),Xe(103,H.initializer.end,Ao,H),Zn(),St(H.expression),Xe(22,H.expression.end,vr,H),b0(H,H.statement)}function Vn(H){const Ne=Xe(99,H.pos,Ao,H);Zn(),nO(H.awaitModifier),Xe(21,Ne,vr,H),Lr(H.initializer),Zn(),Xe(165,H.initializer.end,Ao,H),Zn(),St(H.expression),Xe(22,H.expression.end,vr,H),b0(H,H.statement)}function Lr(H){H!==void 0&&(H.kind===261?ji(H):St(H))}function ls(H){Xe(88,H.pos,Ao,H),Tr(H.label),kh()}function ie(H){Xe(83,H.pos,Ao,H),Tr(H.label),kh()}function Xe(H,Ne,Jt,bi,cs){const ho=xo(bi),so=ho&&ho.kind===bi.kind,Co=Ne;if(so&&Q&&(Ne=qa(Q.text,Ne)),so&&bi.pos!==Co){const Va=cs&&Q&&!Kg(Co,Ne,Q);Va&&C0(),al(Co),Va&&zm()}if(!F&&(H===19||H===20)?Ne=FS(H,Ne,Jt,bi):Ne=e1(H,Jt,Ne),so&&bi.end!==Ne){const Va=bi.kind===294;Vf(Ne,!Va,Va)}return Ne}function ei(H){return H.kind===2||!!H.hasTrailingNewLine}function Dn(H){if(!Q)return!1;const Ne=Hy(Q.text,H.pos);if(Ne){const Jt=xo(H);if(Jt&&g_(Jt.parent))return!0}return Rt(Ne,ei)||Rt(i3(H),ei)?!0:UG(H)?H.pos!==H.expression.pos&&Rt(Rw(Q.text,H.expression.pos),ei)?!0:Dn(H.expression):!1}function Ss(H){if(!Ji&&UG(H)&&Dn(H)){const Ne=xo(H);if(Ne&&g_(Ne)){const Jt=G.createParenthesizedExpression(H.expression);return Er(Jt,H),zt(Jt,Ne),Jt}return G.createParenthesizedExpression(H)}return H}function Vo(H){return Ss(Rn.parenthesizeExpressionForDisallowedComma(H))}function po(H){Xe(107,H.pos,Ao,H),rh(H.expression&&Ss(H.expression),Ss),kh()}function $o(H){const Ne=Xe(118,H.pos,Ao,H);Zn(),Xe(21,Ne,vr,H),St(H.expression),Xe(22,H.expression.end,vr,H),b0(H,H.statement)}function Dl(H){const Ne=Xe(109,H.pos,Ao,H);Zn(),Xe(21,Ne,vr,H),St(H.expression),Xe(22,H.expression.end,vr,H),Zn(),ji(H.caseBlock)}function Ga(H){ji(H.label),Xe(59,H.label.end,vr,H),Zn(),ji(H.statement)}function hu(H){Xe(111,H.pos,Ao,H),rh(Ss(H.expression),Ss),kh()}function rm(H){Xe(113,H.pos,Ao,H),Zn(),ji(H.tryBlock),H.catchClause&&(Fp(H,H.tryBlock,H.catchClause),ji(H.catchClause)),H.finallyBlock&&(Fp(H,H.catchClause||H.tryBlock,H.finallyBlock),Xe(98,(H.catchClause||H.tryBlock).end,Ao,H),Zn(),ji(H.finallyBlock))}function g0(H){FS(89,H.pos,Ao),kh()}function K1(H){var Ne,Jt,bi;ji(H.name),ji(H.exclamationToken),OS(H.type),MS(H.initializer,((Ne=H.type)==null?void 0:Ne.end)??((bi=(Jt=H.name.emitNode)==null?void 0:Jt.typeNode)==null?void 0:bi.end)??H.name.end,H,Rn.parenthesizeExpressionForDisallowedComma)}function ob(H){if(iW(H))Ao("await"),Zn(),Ao("using");else{const Ne=oJ(H)?"let":L6(H)?"const":nW(H)?"using":"var";Ao(Ne)}Zn(),mc(H,H.declarations,528)}function DS(H){ab(H)}function ab(H){Ig(H,H.modifiers,!1),Ao("function"),ji(H.asteriskToken),Zn(),fl(H.name),sm(H,nh,Dg)}function sm(H,Ne,Jt){const bi=Ya(H)&131072;bi&&C0(),BS(H),W(H.parameters,gf),Ne(H),Jt(H),Um(H),bi&&zm()}function Dg(H){const Ne=H.body;Ne?m0(Ne):kh()}function Zl(H){kh()}function nh(H){RS(H,H.typeParameters),cC(H,H.parameters),OS(H.type)}function $h(H){if(Ya(H)&1)return!0;if(H.multiLine||!oc(H)&&Q&&!dI(H,Q)||C2(H,lu(H.statements),2)||UI(H,Ql(H.statements),2,H.statements))return!1;let Ne;for(const Jt of H.statements){if(yA(Ne,Jt,2)>0)return!1;Ne=Jt}return!0}function m0(H){gf(H),m==null||m(H),Zn(),vr("{"),C0();const Ne=$h(H)?ES:nC;JI(H,H.statements,Ne),zm(),FS(20,H.statements.end,vr,H),C==null||C(H)}function ES(H){nC(H,!0)}function nC(H,Ne){const Jt=v2(H.statements),bi=Ie.getTextPos();Gt(H),Jt===0&&bi===Ie.getTextPos()&&Ne?(zm(),mc(H,H.statements,768),C0()):mc(H,H.statements,1,void 0,Jt)}function hx(H){Wm(H)}function Wm(H){Ig(H,H.modifiers,!0),Xe(86,Fv(H).pos,Ao,H),H.name&&(Zn(),fl(H.name));const Ne=Ya(H)&131072;Ne&&C0(),RS(H,H.typeParameters),mc(H,H.heritageClauses,0),Zn(),vr("{"),BS(H),W(H.members,fC),mc(H,H.members,129),Um(H),vr("}"),Ne&&zm()}function _x(H){Ig(H,H.modifiers,!1),Ao("interface"),Zn(),ji(H.name),RS(H,H.typeParameters),mc(H,H.heritageClauses,512),Zn(),vr("{"),BS(H),W(H.members,fC),mc(H,H.members,129),Um(H),vr("}")}function Vm(H){Ig(H,H.modifiers,!1),Ao("type"),Zn(),ji(H.name),RS(H,H.typeParameters),Zn(),vr("="),Zn(),ji(H.type),kh()}function u2(H){Ig(H,H.modifiers,!1),Ao("enum"),Zn(),ji(H.name),Zn(),vr("{"),mc(H,H.members,145),vr("}")}function tv(H){Ig(H,H.modifiers,!1),~H.flags&2048&&(Ao(H.flags&32?"namespace":"module"),Zn()),ji(H.name);let Ne=H.body;if(!Ne)return kh();for(;Ne&&qu(Ne);)vr("."),ji(Ne.name),Ne=Ne.body;Zn(),ji(Ne)}function Eg(H){BS(H),W(H.statements,gf),vd(H,lO(H)),Um(H)}function rC(H){Xe(19,H.pos,vr,H),mc(H,H.clauses,129),Xe(20,H.clauses.end,vr,H,!0)}function rt(H){Ig(H,H.modifiers,!1),Xe(102,H.modifiers?H.modifiers.end:H.pos,Ao,H),Zn(),H.isTypeOnly&&(Xe(156,H.pos,Ao,H),Zn()),ji(H.name),Zn(),Xe(64,H.name.end,vr,H),Zn(),bt(H.moduleReference),kh()}function bt(H){H.kind===80?St(H):ji(H)}function si(H){Ig(H,H.modifiers,!1),Xe(102,H.modifiers?H.modifiers.end:H.pos,Ao,H),Zn(),H.importClause&&(ji(H.importClause),Zn(),Xe(161,H.importClause.end,Ao,H),Zn()),St(H.moduleSpecifier),H.attributes&&Tr(H.attributes),kh()}function Ti(H){H.isTypeOnly&&(Xe(156,H.pos,Ao,H),Zn()),ji(H.name),H.name&&H.namedBindings&&(Xe(28,H.name.end,vr,H),Zn()),ji(H.namedBindings)}function Ki(H){const Ne=Xe(42,H.pos,vr,H);Zn(),Xe(130,Ne,Ao,H),Zn(),ji(H.name)}function Jn(H){Hm(H)}function sn(H){IS(H)}function ar(H){const Ne=Xe(95,H.pos,Ao,H);Zn(),H.isExportEquals?Xe(64,Ne,uC,H):Xe(90,Ne,Ao,H),Zn(),St(H.expression,H.isExportEquals?Rn.getParenthesizeRightSideOfBinaryForOperator(64):Rn.parenthesizeExpressionOfExportDefault),kh()}function ks(H){Ig(H,H.modifiers,!1);let Ne=Xe(95,H.pos,Ao,H);if(Zn(),H.isTypeOnly&&(Ne=Xe(156,Ne,Ao,H),Zn()),H.exportClause?ji(H.exportClause):Ne=Xe(42,Ne,vr,H),H.moduleSpecifier){Zn();const Jt=H.exportClause?H.exportClause.end:Ne;Xe(161,Jt,Ao,H),Zn(),St(H.moduleSpecifier)}H.attributes&&Tr(H.attributes),kh()}function nr(H){vr("{"),Zn(),Ao(H.token===132?"assert":"with"),vr(":"),Zn();const Ne=H.elements;mc(H,Ne,526226),Zn(),vr("}")}function ps(H){Xe(H.token,H.pos,Ao,H),Zn();const Ne=H.elements;mc(H,Ne,526226)}function Hn(H){ji(H.name),vr(":"),Zn();const Ne=H.value;if(!(Ya(Ne)&1024)){const Jt=Vv(Ne);Vf(Jt.pos)}ji(Ne)}function Do(H){let Ne=Xe(95,H.pos,Ao,H);Zn(),Ne=Xe(130,Ne,Ao,H),Zn(),Ne=Xe(145,Ne,Ao,H),Zn(),ji(H.name),kh()}function Wa(H){const Ne=Xe(42,H.pos,vr,H);Zn(),Xe(130,Ne,Ao,H),Zn(),ji(H.name)}function nf(H){Hm(H)}function xh(H){IS(H)}function Hm(H){vr("{"),mc(H,H.elements,525136),vr("}")}function IS(H){H.isTypeOnly&&(Ao("type"),Zn()),H.propertyName&&(ji(H.propertyName),Zn(),Xe(130,H.propertyName.end,Ao,H),Zn()),ji(H.name)}function jm(H){Ao("require"),vr("("),St(H.expression),vr(")")}function cA(H){ji(H.openingElement),mc(H,H.children,262144),ji(H.closingElement)}function iO(H){vr("<"),BI(H.tagName),X1(H,H.typeArguments),Zn(),ji(H.attributes),vr("/>")}function uA(H){ji(H.openingFragment),mc(H,H.children,262144),ji(H.closingFragment)}function pD(H){if(vr("<"),Uv(H)){const Ne=aO(H.tagName,H);BI(H.tagName),X1(H,H.typeArguments),H.attributes.properties&&H.attributes.properties.length>0&&Zn(),ji(H.attributes),qI(H.attributes,H),ub(Ne)}vr(">")}function d2(H){Ie.writeLiteral(H.text)}function f2(H){vr("")}function h2(H){mc(H,H.properties,262656)}function RI(H){ji(H.name),Zs("=",vr,H.initializer,Ot)}function NS(H){vr("{..."),St(H.expression),vr("}")}function gD(H){let Ne=!1;return TB((Q==null?void 0:Q.text)||"",H+1,()=>Ne=!0),Ne}function lb(H){let Ne=!1;return kB((Q==null?void 0:Q.text)||"",H+1,()=>Ne=!0),Ne}function mD(H){return gD(H)||lb(H)}function vl(H){var Ne;if(H.expression||!Ji&&!oc(H)&&mD(H.pos)){const Jt=Q&&!oc(H)&&Da(Q,H.pos).line!==Da(Q,H.end).line;Jt&&Ie.increaseIndent();const bi=Xe(19,H.pos,vr,H);ji(H.dotDotDotToken),St(H.expression),Xe(20,((Ne=H.expression)==null?void 0:Ne.end)||bi,vr,H),Jt&&Ie.decreaseIndent()}}function FI(H){fl(H.namespace),vr(":"),fl(H.name)}function BI(H){H.kind===80?St(H):ji(H)}function _2(H){Xe(84,H.pos,Ao,H),Zn(),St(H.expression,Rn.parenthesizeExpressionForDisallowedComma),Zv(H,H.statements,H.expression.end)}function sC(H){const Ne=Xe(90,H.pos,Ao,H);Zv(H,H.statements,Ne)}function Zv(H,Ne,Jt){const bi=Ne.length===1&&(!Q||oc(H)||oc(Ne[0])||$J(H,Ne[0],Q));let cs=163969;bi?(FS(59,Jt,vr,H),Zn(),cs&=-130):Xe(59,Jt,vr,H),mc(H,Ne,cs)}function om(H){Zn(),e1(H.token,Ao),Zn(),mc(H,H.types,528)}function $_(H){const Ne=Xe(85,H.pos,Ao,H);Zn(),H.variableDeclaration&&(Xe(21,Ne,vr,H),ji(H.variableDeclaration),Xe(22,H.variableDeclaration.end,vr,H),Zn()),ji(H.block)}function Mp(H){ji(H.name),vr(":"),Zn();const Ne=H.initializer;if(!(Ya(Ne)&1024)){const Jt=Vv(Ne);Vf(Jt.pos)}St(Ne,Rn.parenthesizeExpressionForDisallowedComma)}function sp(H){ji(H.name),H.objectAssignmentInitializer&&(Zn(),vr("="),Zn(),St(H.objectAssignmentInitializer,Rn.parenthesizeExpressionForDisallowedComma))}function LS(H){H.expression&&(Xe(26,H.pos,vr,H),St(H.expression,Rn.parenthesizeExpressionForDisallowedComma))}function dA(H){ji(H.name),MS(H.initializer,H.name.end,H,Rn.parenthesizeExpressionForDisallowedComma)}function fA(H){if(et("/**"),H.comment){const Ne=MB(H.comment);if(Ne){const Jt=Ne.split(/\r\n?|\n/g);for(const bi of Jt)Jh(),Zn(),vr("*"),Zn(),et(bi)}}H.tags&&(H.tags.length===1&&H.tags[0].kind===344&&!H.comment?(Zn(),ji(H.tags[0])):mc(H,H.tags,33)),Zn(),et("*/")}function p2(H){Q1(H.tagName),Yv(H.typeExpression),am(H.comment)}function PS(H){Q1(H.tagName),ji(H.name),am(H.comment)}function g2(H){Q1(H.tagName),Zn(),H.importClause&&(ji(H.importClause),Zn(),Xe(161,H.importClause.end,Ao,H),Zn()),St(H.moduleSpecifier),H.attributes&&Tr(H.attributes),am(H.comment)}function hA(H){Zn(),vr("{"),ji(H.name),vr("}")}function Pd(H){Q1(H.tagName),Zn(),vr("{"),ji(H.class),vr("}"),am(H.comment)}function AS(H){Q1(H.tagName),Yv(H.constraint),Zn(),mc(H,H.typeParameters,528),am(H.comment)}function _A(H){Q1(H.tagName),H.typeExpression&&(H.typeExpression.kind===309?Yv(H.typeExpression):(Zn(),vr("{"),et("Object"),H.typeExpression.isArrayType&&(vr("["),vr("]")),vr("}"))),H.fullName&&(Zn(),ji(H.fullName)),am(H.comment),H.typeExpression&&H.typeExpression.kind===322&&v0(H.typeExpression)}function iv(H){Q1(H.tagName),H.name&&(Zn(),ji(H.name)),am(H.comment),rf(H.typeExpression)}function WI(H){am(H.comment),rf(H.typeExpression)}function ht(H){Q1(H.tagName),am(H.comment)}function v0(H){mc(H,G.createNodeArray(H.jsDocPropertyTags),33)}function rf(H){H.typeParameters&&mc(H,G.createNodeArray(H.typeParameters),33),H.parameters&&mc(H,G.createNodeArray(H.parameters),33),H.type&&(Jh(),Zn(),vr("*"),Zn(),ji(H.type))}function m2(H){Q1(H.tagName),Yv(H.typeExpression),Zn(),H.isBracketed&&vr("["),ji(H.name),H.isBracketed&&vr("]"),am(H.comment)}function Q1(H){vr("@"),ji(H)}function am(H){const Ne=MB(H);Ne&&(Zn(),et(Ne))}function Yv(H){H&&(Zn(),vr("{"),ji(H.type),vr("}"))}function oC(H){Jh();const Ne=H.statements;if(Ne.length===0||!Nv(Ne[0])||oc(Ne[0])){JI(H,Ne,vD);return}vD(H)}function NF(H){y0(!!H.hasNoDefaultLib,H.syntheticFileReferences||[],H.syntheticTypeReferences||[],H.syntheticLibReferences||[])}function sl(H){H.isDeclarationFile&&y0(H.hasNoDefaultLib,H.referencedFiles,H.typeReferenceDirectives,H.libReferenceDirectives)}function y0(H,Ne,Jt,bi){if(H&&(Rp('/// '),Jh()),Q&&Q.moduleName&&(Rp(`/// `),Jh()),Q&&Q.amdDependencies)for(const ho of Q.amdDependencies)ho.name?Rp(`/// `):Rp(`/// `),Jh();function cs(ho,so){for(const Co of so){const Va=Co.resolutionMode?`resolution-mode="${Co.resolutionMode===99?"import":"require"}" `:"",Kh=Co.preserve?'preserve="true" ':"";Rp(`/// `),Jh()}}cs("path",Ne),cs("types",Jt),cs("lib",bi)}function vD(H){const Ne=H.statements;BS(H),W(H.statements,gf),Gt(H);const Jt=Nt(Ne,bi=>!Nv(bi));sl(H),mc(H,Ne,1,void 0,Jt===-1?Ne.length:Jt),Um(H)}function VI(H){const Ne=Ya(H);!(Ne&1024)&&H.pos!==H.expression.pos&&Vf(H.expression.pos),St(H.expression),!(Ne&2048)&&H.end!==H.expression.end&&al(H.expression.end)}function HI(H){cb(H,H.elements,528,void 0)}function v2(H,Ne,Jt){let bi=!!Ne;for(let cs=0;cs=Jt.length||so===0;if(Va&&bi&32768){b==null||b(Jt),T==null||T(Jt);return}bi&15360&&(vr(JAt(bi)),Va&&Jt&&Vf(Jt.pos,!0)),b==null||b(Jt),Va?bi&1&&!(Oe&&(!Ne||Q&&dI(Ne,Q)))?Jh():bi&256&&!(bi&524288)&&Zn():jI(H,Ne,Jt,bi,cs,ho,so,Jt.hasTrailingComma,Jt),T==null||T(Jt),bi&15360&&(Va&&Jt&&al(Jt.end),vr(GAt(bi)))}function jI(H,Ne,Jt,bi,cs,ho,so,Co,Va){const Kh=(bi&262144)===0;let Th=Kh;const HS=C2(Ne,Jt[ho],bi);HS?(Jh(HS),Th=!1):bi&256&&Zn(),bi&128&&C0();const kD=ZAt(H,cs);let Bp,rv=!1;for(let N2=0;N20){if(bi&131||(C0(),rv=!0),Th&&bi&60&&!q0(jS.pos)){const Js=Vv(jS);Vf(Js.pos,!!(bi&512),!0)}Jh(Cx),Th=!1}else Bp&&bi&512&&Zn()}if(Th){const Cx=Vv(jS);Vf(Cx.pos)}else Th=Kh;fe=jS.pos,kD(jS,H,cs,N2),rv&&(zm(),rv=!1),Bp=jS}const pC=Bp?Ya(Bp):0,TD=Ji||!!(pC&2048),mO=Co&&bi&64&&bi&16;mO&&(Bp&&!TD?Xe(28,Bp.end,vr,Bp):vr(",")),Bp&&(Ne?Ne.end:-1)!==Bp.end&&bi&60&&!TD&&al(mO&&(Va!=null&&Va.end)?Va.end:Bp.end),bi&128&&zm();const gC=UI(Ne,Jt[ho+so-1],bi,Va);gC?Jh(gC):bi&2097408&&Zn()}function bD(H){Ie.writeLiteral(H)}function gA(H){Ie.writeStringLiteral(H)}function LF(H){Ie.write(H)}function oO(H,Ne){Ie.writeSymbol(H,Ne)}function vr(H){Ie.writePunctuation(H)}function kh(){Ie.writeTrailingSemicolon(";")}function Ao(H){Ie.writeKeyword(H)}function uC(H){Ie.writeOperator(H)}function zI(H){Ie.writeParameter(H)}function Rp(H){Ie.writeComment(H)}function Zn(){Ie.writeSpace(" ")}function mA(H){Ie.writeProperty(H)}function vA(H){Ie.nonEscapingWrite?Ie.nonEscapingWrite(H):Ie.write(H)}function Jh(H=1){for(let Ne=0;Ne0)}function C0(){Ie.increaseIndent()}function zm(){Ie.decreaseIndent()}function FS(H,Ne,Jt,bi){return We?e1(H,Jt,Ne):VS(bi,H,Jt,Ne,e1)}function CD(H,Ne){E&&E(H),Ne(Ta(H.kind)),N&&N(H)}function e1(H,Ne,Jt){const bi=Ta(H);return Ne(bi),Jt<0?Jt:Jt+bi.length}function Fp(H,Ne,Jt){if(Ya(H)&1)Zn();else if(Oe){const bi=S0(H,Ne,Jt);bi?Jh(bi):Zn()}else Jh()}function t1(H){const Ne=H.split(/\r\n?|\n/g),Jt=wwe(Ne);for(const bi of Ne){const cs=Jt?bi.slice(Jt):bi;cs.length&&(Jh(),et(cs))}}function lm(H,Ne){H?(C0(),Jh(H)):Ne&&Zn()}function ub(H,Ne){H&&zm(),Ne&&zm()}function C2(H,Ne,Jt){if(Jt&2||Oe){if(Jt&65536)return 1;if(Ne===void 0)return!H||Q&&dI(H,Q)?0:1;if(Ne.pos===fe||Ne.kind===12)return 0;if(Q&&H&&!q0(H.pos)&&!oc(Ne)&&(!Ne.parent||uu(Ne.parent)===uu(H)))return Oe?SD(bi=>ske(Ne.pos,H.pos,Q,bi)):$J(H,Ne,Q)?0:1;if(S2(Ne,Jt))return 1}return Jt&1?1:0}function yA(H,Ne,Jt){if(Jt&2||Oe){if(H===void 0||Ne===void 0||Ne.kind===12)return 0;if(Q&&!oc(H)&&!oc(Ne))return Oe&&hO(H,Ne)?SD(bi=>Foe(H,Ne,Q,bi)):!Oe&&Ng(H,Ne)?zW(H,Ne,Q)?0:1:Jt&65536?1:0;if(S2(H,Jt)||S2(Ne,Jt))return 1}else if(a7(Ne))return 1;return Jt&1?1:0}function UI(H,Ne,Jt,bi){if(Jt&2||Oe){if(Jt&65536)return 1;if(Ne===void 0)return!H||Q&&dI(H,Q)?0:1;if(Q&&H&&!q0(H.pos)&&!oc(Ne)&&(!Ne.parent||Ne.parent===H)){if(Oe){const cs=bi&&!q0(bi.end)?bi.end:Ne.end;return SD(ho=>oke(cs,H.end,Q,ho))}return ike(H,Ne,Q)?0:1}if(S2(Ne,Jt))return 1}return Jt&1&&!(Jt&131072)?1:0}function SD(H){z.assert(!!Oe);const Ne=H(!0);return Ne===0?H(!1):Ne}function aO(H,Ne){const Jt=Oe&&C2(Ne,H,0);return Jt&&lm(Jt,!1),!!Jt}function qI(H,Ne){const Jt=Oe&&UI(Ne,H,0,void 0);Jt&&Jh(Jt)}function S2(H,Ne){if(oc(H)){const Jt=a7(H);return Jt===void 0?(Ne&65536)!==0:Jt}return(Ne&65536)!==0}function S0(H,Ne,Jt){return Ya(H)&262144?0:(H=w2(H),Ne=w2(Ne),Jt=w2(Jt),a7(Jt)?1:Q&&!oc(H)&&!oc(Ne)&&!oc(Jt)?Oe?SD(bi=>Foe(Ne,Jt,Q,bi)):zW(Ne,Jt,Q)?0:1:0)}function lO(H){return H.statements.length===0&&(!Q||zW(H,H,Q))}function w2(H){for(;H.kind===217&&oc(H);)H=H.expression;return H}function px(H,Ne){if(jc(H)||ZE(H))return Ru(H);if(ja(H)&&H.textSourceNode)return px(H.textSourceNode,Ne);const Jt=Q,bi=!!Jt&&!!H.parent&&!oc(H);if(Uy(H)){if(!bi||_n(H)!==uu(Jt))return dr(H)}else if(J0(H)){if(!bi||_n(H)!==uu(Jt))return o7(H)}else if(z.assertNode(H,wT),!bi)return H.text;return TT(Jt,H,Ne)}function dC(H,Ne,Jt){if(H.kind===11&&H.textSourceNode){const cs=H.textSourceNode;if(lt(cs)||Vs(cs)||W_(cs)||J0(cs)){const ho=W_(cs)?cs.text:px(cs);return Jt?`"${Coe(ho)}"`:Ne||Ya(H)&16777216?`"${B1(ho)}"`:`"${LJ(ho)}"`}else return dC(cs,Ne,Jt)}const bi=(Ne?1:0)|(Jt?2:0)|(t.terminateUnterminatedLiterals?4:0)|(t.target&&t.target>=8?8:0);return Mwe(H,Q,bi)}function BS(H){pe.push(ye),ye=0,ke.push(Fe),!(H&&Ya(H)&1048576)&&(be.push(_e),_e=0,Se.push(oe),oe=void 0,ve.push(Ee))}function Um(H){ye=pe.pop(),Fe=ke.pop(),!(H&&Ya(H)&1048576)&&(_e=be.pop(),oe=Se.pop(),Ee=ve.pop())}function WS(H){(!Ee||Ee===Ql(ve))&&(Ee=new Set),Ee.add(H)}function x2(H){(!Fe||Fe===Ql(ke))&&(Fe=new Set),Fe.add(H)}function gf(H){if(H)switch(H.kind){case 241:W(H.statements,gf);break;case 256:case 254:case 246:case 247:gf(H.statement);break;case 245:gf(H.thenStatement),gf(H.elseStatement);break;case 248:case 250:case 249:gf(H.initializer),gf(H.statement);break;case 255:gf(H.caseBlock);break;case 269:W(H.clauses,gf);break;case 296:case 297:W(H.statements,gf);break;case 258:gf(H.tryBlock),gf(H.catchClause),gf(H.finallyBlock);break;case 299:gf(H.variableDeclaration),gf(H.block);break;case 243:gf(H.declarationList);break;case 261:W(H.declarations,gf);break;case 260:case 169:case 208:case 263:i1(H.name);break;case 262:i1(H.name),Ya(H)&1048576&&(W(H.parameters,gf),gf(H.body));break;case 206:case 207:W(H.elements,gf);break;case 272:gf(H.importClause);break;case 273:i1(H.name),gf(H.namedBindings);break;case 274:i1(H.name);break;case 280:i1(H.name);break;case 275:W(H.elements,gf);break;case 276:i1(H.propertyName||H.name);break}}function fC(H){if(H)switch(H.kind){case 303:case 304:case 172:case 171:case 174:case 173:case 177:case 178:i1(H.name);break}}function i1(H){H&&(jc(H)||ZE(H)?Ru(H):Qo(H)&&gf(H))}function Ru(H){const Ne=H.emitNode.autoGenerate;if((Ne.flags&7)===4)return sf(SV(H),Vs(H),Ne.flags,Ne.prefix,Ne.suffix);{const Jt=Ne.id;return ue[Jt]||(ue[Jt]=$I(H))}}function sf(H,Ne,Jt,bi,cs){const ho=Tl(H),so=Ne?Y:re;return so[ho]||(so[ho]=Gh(H,Ne,Jt??0,_3(bi,Ru),_3(cs)))}function hC(H,Ne){return cm(H)&&!op(H,Ne)&&!te.has(H)}function op(H,Ne){let Jt,bi;if(Ne?(Jt=Fe,bi=ke):(Jt=Ee,bi=ve),Jt!=null&&Jt.has(H))return!0;for(let cs=bi.length-1;cs>=0;cs--)if(Jt!==bi[cs]&&(Jt=bi[cs],Jt!=null&&Jt.has(H)))return!0;return!1}function cm(H,Ne){return Q?Y$(Q,H,a):!0}function bA(H,Ne){for(let Jt=Ne;Jt&&OT(Jt,Ne);Jt=Jt.nextContainer)if(A1(Jt)&&Jt.locals){const bi=Jt.locals.get(du(H));if(bi&&bi.flags&3257279)return!1}return!0}function n1(H){switch(H){case"":return _e;case"#":return ye;default:return(oe==null?void 0:oe.get(H))??0}}function CA(H,Ne){switch(H){case"":_e=Ne;break;case"#":ye=Ne;break;default:oe??(oe=new Map),oe.set(H,Ne);break}}function r1(H,Ne,Jt,bi,cs){bi.length>0&&bi.charCodeAt(0)===35&&(bi=bi.slice(1));const ho=Jk(Jt,bi,"",cs);let so=n1(ho);if(H&&!(so&H)){const Va=Jk(Jt,bi,H===268435456?"_i":"_n",cs);if(hC(Va,Jt))return so|=H,Jt?x2(Va):Ne&&WS(Va),CA(ho,so),Va}for(;;){const Co=so&268435455;if(so++,Co!==8&&Co!==13){const Va=Co<26?"_"+String.fromCharCode(97+Co):"_"+(Co-26),Kh=Jk(Jt,bi,Va,cs);if(hC(Kh,Jt))return Jt?x2(Kh):Ne&&WS(Kh),CA(ho,so),Kh}}}function gx(H,Ne=hC,Jt,bi,cs,ho,so){if(H.length>0&&H.charCodeAt(0)===35&&(H=H.slice(1)),ho.length>0&&ho.charCodeAt(0)===35&&(ho=ho.slice(1)),Jt){const Va=Jk(cs,ho,H,so);if(Ne(Va,cs))return cs?x2(Va):bi?WS(Va):te.add(Va),Va}H.charCodeAt(H.length-1)!==95&&(H+="_");let Co=1;for(;;){const Va=Jk(cs,ho,H+Co,so);if(Ne(Va,cs))return cs?x2(Va):bi?WS(Va):te.add(Va),Va;Co++}}function cO(H){return gx(H,cm,!0,!1,!1,"","")}function Du(H){const Ne=px(H.name);return bA(Ne,$r(H,A1))?Ne:gx(Ne,hC,!1,!1,!1,"","")}function uO(H){const Ne=GL(H),Jt=ja(Ne)?Fwe(Ne.text):"module";return gx(Jt,hC,!1,!1,!1,"","")}function dO(){return gx("default",hC,!1,!1,!1,"","")}function k2(){return gx("class",hC,!1,!1,!1,"","")}function PF(H,Ne,Jt,bi){return lt(H.name)?sf(H.name,Ne):r1(0,!1,Ne,Jt,bi)}function Gh(H,Ne,Jt,bi,cs){switch(H.kind){case 80:case 81:return gx(px(H),hC,!!(Jt&16),!!(Jt&8),Ne,bi,cs);case 267:case 266:return z.assert(!bi&&!cs&&!Ne),Du(H);case 272:case 278:return z.assert(!bi&&!cs&&!Ne),uO(H);case 262:case 263:{z.assert(!bi&&!cs&&!Ne);const ho=H.name;return ho&&!jc(ho)?Gh(ho,!1,Jt,bi,cs):dO()}case 277:return z.assert(!bi&&!cs&&!Ne),dO();case 231:return z.assert(!bi&&!cs&&!Ne),k2();case 174:case 177:case 178:return PF(H,Ne,bi,cs);case 167:return r1(0,!0,Ne,bi,cs);default:return r1(0,!1,Ne,bi,cs)}}function $I(H){const Ne=H.emitNode.autoGenerate,Jt=_3(Ne.prefix,Ru),bi=_3(Ne.suffix);switch(Ne.flags&7){case 1:return r1(0,!!(Ne.flags&8),Vs(H),Jt,bi);case 2:return z.assertNode(H,lt),r1(268435456,!!(Ne.flags&8),!1,Jt,bi);case 3:return gx(dr(H),Ne.flags&32?cm:hC,!!(Ne.flags&16),!!(Ne.flags&8),Vs(H),Jt,bi)}return z.fail(`Unsupported GeneratedIdentifierKind: ${z.formatEnum(Ne.flags&7,Ere,!0)}.`)}function wD(H,Ne){const Jt=kt(2,H,Ne),bi=st,cs=xt,ho=Et;T2(Ne),Jt(H,Ne),J_(Ne,bi,cs,ho)}function T2(H){const Ne=Ya(H),Jt=Vv(H);AF(H,Ne,Jt.pos,Jt.end),Ne&4096&&(Ji=!0)}function J_(H,Ne,Jt,bi){const cs=Ya(H),ho=Vv(H);cs&4096&&(Ji=!1),D2(H,cs,ho.pos,ho.end,Ne,Jt,bi);const so=l2e(H);so&&D2(H,cs,so.pos,so.end,Ne,Jt,bi)}function AF(H,Ne,Jt,bi){Mi(),Oi=!1;const cs=Jt<0||(Ne&1024)!==0||H.kind===12,ho=bi<0||(Ne&2048)!==0||H.kind===12;(Jt>0||bi>0)&&Jt!==bi&&(cs||mx(Jt,H.kind!==353),(!cs||Jt>=0&&Ne&1024)&&(st=Jt),(!ho||bi>=0&&Ne&2048)&&(xt=bi,H.kind===261&&(Et=bi))),W(i3(H),fO),Ai()}function D2(H,Ne,Jt,bi,cs,ho,so){Mi();const Co=bi<0||(Ne&2048)!==0||H.kind===12;W(oV(H),E2),(Jt>0||bi>0)&&Jt!==bi&&(st=cs,xt=ho,Et=so,!Co&&H.kind!==353&&wr(bi)),Ai()}function fO(H){(H.hasLeadingNewline||H.kind===2)&&Ie.writeLine(),xD(H),H.hasTrailingNewLine||H.kind===2?Ie.writeLine():Ie.writeSpace(" ")}function E2(H){Ie.isAtStartOfLine()||Ie.writeSpace(" "),xD(H),H.hasTrailingNewLine&&Ie.writeLine()}function xD(H){const Ne=SA(H),Jt=H.kind===3?ML(Ne):void 0;G6(Ne,Jt,Ie,0,Ne.length,j)}function SA(H){return H.kind===3?`/*${H.text}*/`:`//${H.text}`}function JI(H,Ne,Jt){Mi();const{pos:bi,end:cs}=Ne,ho=Ya(H),so=bi<0||(ho&1024)!==0,Co=Ji||cs<0||(ho&2048)!==0;so||w0(Ne),Ai(),ho&4096&&!Ji?(Ji=!0,Jt(H),Ji=!1):Jt(H),Mi(),Co||(mx(Ne.end,!0),Oi&&!Ie.isAtStartOfLine()&&Ie.writeLine()),Ai()}function Ng(H,Ne){return H=uu(H),H.parent&&H.parent===uu(Ne).parent}function hO(H,Ne){if(Ne.pos-1&&bi.indexOf(Ne)===cs+1}function mx(H,Ne){Oi=!1,Ne?H===0&&(Q!=null&&Q.isDeclarationFile)?I2(H,nv):I2(H,KI):H===0&&I2(H,Yp)}function Yp(H,Ne,Jt,bi,cs){Z1(H,Ne)&&KI(H,Ne,Jt,bi,cs)}function nv(H,Ne,Jt,bi,cs){Z1(H,Ne)||KI(H,Ne,Jt,bi,cs)}function GI(H,Ne){return t.onlyPrintJsDocStyle?sle(H,Ne)||eJ(H,Ne):!0}function KI(H,Ne,Jt,bi,cs){!Q||!GI(Q.text,H)||(Oi||(Hxe(Yo(),Ie,cs,H),Oi=!0),x0(H),G6(Q.text,Yo(),Ie,H,Ne,j),x0(Ne),bi?Ie.writeLine():Jt===3&&Ie.writeSpace(" "))}function al(H){Ji||H===-1||mx(H,!0)}function wr(H){vx(H,Lg)}function Lg(H,Ne,Jt,bi){!Q||!GI(Q.text,H)||(Ie.isAtStartOfLine()||Ie.writeSpace(" "),x0(H),G6(Q.text,Yo(),Ie,H,Ne,j),x0(Ne),bi&&Ie.writeLine())}function Vf(H,Ne,Jt){Ji||(Mi(),vx(H,Ne?Lg:Jt?_O:pO),Ai())}function _O(H,Ne,Jt){Q&&(x0(H),G6(Q.text,Yo(),Ie,H,Ne,j),x0(Ne),Jt===2&&Ie.writeLine())}function pO(H,Ne,Jt,bi){Q&&(x0(H),G6(Q.text,Yo(),Ie,H,Ne,j),x0(Ne),bi?Ie.writeLine():Ie.writeSpace(" "))}function I2(H,Ne){Q&&(st===-1||H!==st)&&(gO(H)?yx(Ne):kB(Q.text,H,Ne,H))}function vx(H,Ne){Q&&(xt===-1||H!==xt&&H!==Et)&&TB(Q.text,H,Ne)}function gO(H){return Ht!==void 0&&La(Ht).nodePos===H}function yx(H){if(!Q)return;const Ne=La(Ht).detachedCommentEndPos;Ht.length-1?Ht.pop():Ht=void 0,kB(Q.text,Ne,H,Ne)}function w0(H){const Ne=Q&&zxe(Q.text,Yo(),Ie,eg,H,j,Ji);Ne&&(Ht?Ht.push(Ne):Ht=[Ne])}function eg(H,Ne,Jt,bi,cs,ho){!Q||!GI(Q.text,bi)||(x0(bi),G6(H,Ne,Jt,bi,cs,ho),x0(cs))}function Z1(H,Ne){return!!Q&&Pse(Q.text,H,Ne)}function s1(H,Ne){const Jt=kt(3,H,Ne);_C(Ne),Jt(H,Ne),QI(Ne)}function _C(H){const Ne=Ya(H),Jt=_S(H),bi=Jt.source||Ye;H.kind!==353&&!(Ne&32)&&Jt.pos>=0&&tg(Jt.source||Ye,cd(bi,Jt.pos)),Ne&128&&(We=!0)}function QI(H){const Ne=Ya(H),Jt=_S(H);Ne&128&&(We=!1),H.kind!==353&&!(Ne&64)&&Jt.end>=0&&tg(Jt.source||Ye,Jt.end)}function cd(H,Ne){return H.skipTrivia?H.skipTrivia(Ne):qa(H.text,Ne)}function x0(H){if(We||q0(H)||bx(Ye))return;const{line:Ne,character:Jt}=Da(Ye,H);Ue.addMapping(Ie.getLine(),Ie.getColumn(),wt,Ne,Jt,void 0)}function tg(H,Ne){if(H!==Ye){const Jt=Ye,bi=wt;Pg(H),x0(Ne),XI(Jt,bi)}else x0(Ne)}function VS(H,Ne,Jt,bi,cs){if(We||H&&yJ(H))return cs(Ne,Jt,bi);const ho=H&&H.emitNode,so=ho&&ho.flags||0,Co=ho&&ho.tokenSourceMapRanges&&ho.tokenSourceMapRanges[Ne],Va=Co&&Co.source||Ye;return bi=cd(Va,Co?Co.pos:bi),!(so&256)&&bi>=0&&tg(Va,bi),bi=cs(Ne,Jt,bi),Co&&(bi=Co.end),!(so&512)&&bi>=0&&tg(Va,bi),bi}function Pg(H){if(!We){if(Ye=H,H===nt){wt=ze;return}bx(H)||(wt=Ue.addSource(H.fileName),t.inlineSources&&Ue.setSourceContent(wt,H.text),nt=H,ze=wt)}}function XI(H,Ne){Ye=H,wt=Ne}function bx(H){return tu(H.fileName,".json")}}function $At(){const t=[];return t[1024]=["{","}"],t[2048]=["(",")"],t[4096]=["<",">"],t[8192]=["[","]"],t}function JAt(t){return $Ke[t&15360][0]}function GAt(t){return $Ke[t&15360][1]}function KAt(t,r,a,u){r(t)}function QAt(t,r,a,u){r(t,a.select(u))}function XAt(t,r,a,u){r(t,a)}function ZAt(t,r){return t.length===1?KAt:typeof r=="object"?QAt:XAt}function XK(t,r,a){if(!t.getDirectories||!t.readDirectory)return;const u=new Map,h=Zf(a);return{useCaseSensitiveFileNames:a,fileExists:F,readFile:(oe,pe)=>t.readFile(oe,pe),directoryExists:t.directoryExists&&j,getDirectories:q,readDirectory:Q,createDirectory:t.createDirectory&&U,writeFile:t.writeFile&&R,addOrDeleteFileOrDirectory:Y,addOrDeleteFile:ue,clearCache:Se,realpath:t.realpath&&re};function p(oe){return _c(oe,r,h)}function m(oe){return u.get(Xd(oe))}function C(oe){const pe=m(rs(oe));return pe&&(pe.sortedAndCanonicalizedFiles||(pe.sortedAndCanonicalizedFiles=pe.files.map(h).sort(),pe.sortedAndCanonicalizedDirectories=pe.directories.map(h).sort()),pe)}function b(oe){return fd(ra(oe))}function T(oe,pe){var ye;if(!t.realpath||Xd(p(t.realpath(oe)))===pe){const be={files:Yt(t.readDirectory(oe,void 0,void 0,["*.*"]),b)||[],directories:t.getDirectories(oe)||[]};return u.set(Xd(pe),be),be}if((ye=t.directoryExists)!=null&&ye.call(t,oe))return u.set(pe,!1),!1}function E(oe,pe){pe=Xd(pe);const ye=m(pe);if(ye)return ye;try{return T(oe,pe)}catch{z.assert(!u.has(Xd(pe)));return}}function N(oe,pe){return Fy(oe,pe,fc,Xf)>=0}function R(oe,pe,ye){const be=p(oe),_e=C(be);return _e&&te(_e,b(oe),!0),t.writeFile(oe,pe,ye)}function F(oe){const pe=p(oe),ye=C(pe);return ye&&N(ye.sortedAndCanonicalizedFiles,h(b(oe)))||t.fileExists(oe)}function j(oe){const pe=p(oe);return u.has(Xd(pe))||t.directoryExists(oe)}function U(oe){const pe=p(oe),ye=C(pe);if(ye){const be=b(oe),_e=h(be),ve=ye.sortedAndCanonicalizedDirectories;Ei(ve,_e,Xf)&&ye.directories.push(be)}t.createDirectory(oe)}function q(oe){const pe=p(oe),ye=E(oe,pe);return ye?ye.directories.slice():t.getDirectories(oe)}function Q(oe,pe,ye,be,_e){const ve=p(oe),Ee=E(oe,ve);let ke;if(Ee!==void 0)return eae(oe,pe,ye,be,a,r,_e,Fe,re);return t.readDirectory(oe,pe,ye,be,_e);function Fe(fe){const Ie=p(fe);if(Ie===ve)return Ee||Oe(fe,Ie);const Le=E(fe,Ie);return Le!==void 0?Le||Oe(fe,Ie):nae}function Oe(fe,Ie){if(ke&&Ie===ve)return ke;const Le={files:Yt(t.readDirectory(fe,void 0,void 0,["*.*"]),b)||x,directories:t.getDirectories(fe)||x};return Ie===ve&&(ke=Le),Le}}function re(oe){return t.realpath?t.realpath(oe):oe}function Y(oe,pe){if(m(pe)!==void 0){Se();return}const be=C(pe);if(!be)return;if(!t.directoryExists){Se();return}const _e=b(oe),ve={fileExists:t.fileExists(oe),directoryExists:t.directoryExists(oe)};return ve.directoryExists||N(be.sortedAndCanonicalizedDirectories,h(_e))?Se():te(be,_e,ve.fileExists),ve}function ue(oe,pe,ye){if(ye===1)return;const be=C(pe);be&&te(be,b(oe),ye===0)}function te(oe,pe,ye){const be=oe.sortedAndCanonicalizedFiles,_e=h(pe);if(ye)Ei(be,_e,Xf)&&oe.files.push(pe);else{const ve=Fy(be,_e,fc,Xf);if(ve>=0){be.splice(ve,1);const Ee=oe.files.findIndex(ke=>h(ke)===_e);oe.files.splice(Ee,1)}}}function Se(){u.clear()}}var qEe=(t=>(t[t.Update=0]="Update",t[t.RootNamesAndUpdate=1]="RootNamesAndUpdate",t[t.Full=2]="Full",t))(qEe||{});function ZK(t,r,a,u,h){var p;const m=P_(((p=r==null?void 0:r.configFile)==null?void 0:p.extendedSourceFiles)||x,h);a.forEach((C,b)=>{m.has(b)||(C.projects.delete(t),C.close())}),m.forEach((C,b)=>{const T=a.get(b);T?T.projects.add(t):a.set(b,{projects:new Set([t]),watcher:u(C,b),close:()=>{const E=a.get(b);!E||E.projects.size!==0||(E.watcher.close(),a.delete(b))}})})}function Sce(t,r){r.forEach(a=>{a.projects.delete(t)&&a.close()})}function YK(t,r,a){t.delete(r)&&t.forEach(({extendedResult:u},h)=>{var p;(p=u.extendedSourceFiles)!=null&&p.some(m=>a(m)===r)&&YK(t,h,a)})}function wce(t,r,a){U8(r,t.getMissingFilePaths(),{createNewValue:a,onDeleteValue:h0})}function qV(t,r,a){r?U8(t,new Map(Object.entries(r)),{createNewValue:u,onDeleteValue:tm,onExistingValue:h}):tp(t,tm);function u(p,m){return{watcher:a(p,m),flags:m}}function h(p,m,C){p.flags!==m&&(p.watcher.close(),t.set(C,u(C,m)))}}function $V({watchedDirPath:t,fileOrDirectory:r,fileOrDirectoryPath:a,configFileName:u,options:h,program:p,extraFileExtensions:m,currentDirectory:C,useCaseSensitiveFileNames:b,writeLog:T,toPath:E,getScriptKind:N}){const R=lQ(a);if(!R)return T(`Project: ${u} Detected ignored path: ${r}`),!0;if(a=R,a===t)return!1;if(_6(a)&&!(Lke(r,h,m)||Q()))return T(`Project: ${u} Detected file add/remove of non supported extension: ${r}`),!0;if(oDe(r,h.configFile.configFileSpecs,bo(rs(u),C),b,C))return T(`Project: ${u} Detected excluded file: ${r}`),!0;if(!p||h.outFile||h.outDir)return!1;if(xf(a)){if(h.declarationDir)return!1}else if(!rd(a,Z6))return!1;const F=h_(a),j=Lo(p)?void 0:YAt(p)?p.getProgramOrUndefined():p,U=!j&&!Lo(p)?p:void 0;if(q(F+".ts")||q(F+".tsx"))return T(`Project: ${u} Detected output file: ${r}`),!0;return!1;function q(re){return j?!!j.getSourceFileByPath(re):U?U.getState().fileInfos.has(re):!!Me(p,Y=>E(Y)===re)}function Q(){if(!N)return!1;switch(N(r)){case 3:case 4:case 7:case 5:return!0;case 1:case 2:return Jw(h);case 6:return VT(h);case 0:return!1}}}function YAt(t){return!!t.getState}function $Ee(t,r){return t?t.isEmittedFile(r):!1}var JEe=(t=>(t[t.None=0]="None",t[t.TriggerOnly=1]="TriggerOnly",t[t.Verbose=2]="Verbose",t))(JEe||{});function xce(t,r,a,u){bSe(r===2?a:dl);const h={watchFile:(U,q,Q,re)=>t.watchFile(U,q,Q,re),watchDirectory:(U,q,Q,re)=>t.watchDirectory(U,q,(Q&1)!==0,re)},p=r!==0?{watchFile:F("watchFile"),watchDirectory:F("watchDirectory")}:void 0,m=r===2?{watchFile:N,watchDirectory:R}:p||h,C=r===2?E:Y7;return{watchFile:b("watchFile"),watchDirectory:b("watchDirectory")};function b(U){return(q,Q,re,Y,ue,te)=>{var Se;return CK(q,U==="watchFile"?Y==null?void 0:Y.excludeFiles:Y==null?void 0:Y.excludeDirectories,T(),((Se=t.getCurrentDirectory)==null?void 0:Se.call(t))||"")?C(q,re,Y,ue,te):m[U].call(void 0,q,Q,re,Y,ue,te)}}function T(){return typeof t.useCaseSensitiveFileNames=="boolean"?t.useCaseSensitiveFileNames:t.useCaseSensitiveFileNames()}function E(U,q,Q,re,Y){return a(`ExcludeWatcher:: Added:: ${j(U,q,Q,re,Y,u)}`),{close:()=>a(`ExcludeWatcher:: Close:: ${j(U,q,Q,re,Y,u)}`)}}function N(U,q,Q,re,Y,ue){a(`FileWatcher:: Added:: ${j(U,Q,re,Y,ue,u)}`);const te=p.watchFile(U,q,Q,re,Y,ue);return{close:()=>{a(`FileWatcher:: Close:: ${j(U,Q,re,Y,ue,u)}`),te.close()}}}function R(U,q,Q,re,Y,ue){const te=`DirectoryWatcher:: Added:: ${j(U,Q,re,Y,ue,u)}`;a(te);const Se=Vc(),oe=p.watchDirectory(U,q,Q,re,Y,ue),pe=Vc()-Se;return a(`Elapsed:: ${pe}ms ${te}`),{close:()=>{const ye=`DirectoryWatcher:: Close:: ${j(U,Q,re,Y,ue,u)}`;a(ye);const be=Vc();oe.close();const _e=Vc()-be;a(`Elapsed:: ${_e}ms ${ye}`)}}}function F(U){return(q,Q,re,Y,ue,te)=>h[U].call(void 0,q,(...Se)=>{const oe=`${U==="watchFile"?"FileWatcher":"DirectoryWatcher"}:: Triggered with ${Se[0]} ${Se[1]!==void 0?Se[1]:""}:: ${j(q,re,Y,ue,te,u)}`;a(oe);const pe=Vc();Q.call(void 0,...Se);const ye=Vc()-pe;a(`Elapsed:: ${ye}ms ${oe}`)},re,Y,ue,te)}function j(U,q,Q,re,Y,ue){return`WatchInfo: ${U} ${q} ${JSON.stringify(Q)} ${ue?ue(re,Y):Y===void 0?re:`${re} ${Y}`}`}}function JV(t){const r=t==null?void 0:t.fallbackPolling;return{watchFile:r!==void 0?r:1}}function tm(t){t.watcher.close()}function kce(t,r,a="tsconfig.json"){return c0(t,u=>{const h=Hr(u,a);return r(h)?h:void 0})}function Tce(t,r){const a=rs(r),u=Sp(t)?t:Hr(a,t);return ra(u)}function GEe(t,r,a){let u;return W(t,p=>{const m=CB(p,r);if(m.pop(),!u){u=m;return}const C=Math.min(u.length,m.length);for(let b=0;b{let p;try{cu("beforeIORead"),p=t(a),cu("afterIORead"),qg("I/O Read","beforeIORead","afterIORead")}catch(m){h&&h(m.message),p=""}return p!==void 0?RP(a,p,u,r):void 0}}function Ece(t,r,a){return(u,h,p,m)=>{try{cu("beforeIOWrite"),koe(u,h,p,t,r,a),cu("afterIOWrite"),qg("I/O Write","beforeIOWrite","afterIOWrite")}catch(C){m&&m(C.message)}}}function eQ(t,r,a=Wd){const u=new Map,h=Zf(a.useCaseSensitiveFileNames);function p(E){return u.has(E)?!0:(T.directoryExists||a.directoryExists)(E)?(u.set(E,!0),!0):!1}function m(){return rs(ra(a.getExecutingFilePath()))}const C=fS(t),b=a.realpath&&(E=>a.realpath(E)),T={getSourceFile:Dce(E=>T.readFile(E),r),getDefaultLibLocation:m,getDefaultLibFileName:E=>Hr(m(),EB(E)),writeFile:Ece((E,N,R)=>a.writeFile(E,N,R),E=>(T.createDirectory||a.createDirectory)(E),E=>p(E)),getCurrentDirectory:l_(()=>a.getCurrentDirectory()),useCaseSensitiveFileNames:()=>a.useCaseSensitiveFileNames,getCanonicalFileName:h,getNewLine:()=>C,fileExists:E=>a.fileExists(E),readFile:E=>a.readFile(E),trace:E=>a.write(E+C),directoryExists:E=>a.directoryExists(E),getEnvironmentVariable:E=>a.getEnvironmentVariable?a.getEnvironmentVariable(E):"",getDirectories:E=>a.getDirectories(E),realpath:b,readDirectory:(E,N,R,F,j)=>a.readDirectory(E,N,R,F,j),createDirectory:E=>a.createDirectory(E),createHash:la(a,a.createHash)};return T}function K7(t,r,a){const u=t.readFile,h=t.fileExists,p=t.directoryExists,m=t.createDirectory,C=t.writeFile,b=new Map,T=new Map,E=new Map,N=new Map,R=U=>{const q=r(U),Q=b.get(q);return Q!==void 0?Q!==!1?Q:void 0:F(q,U)},F=(U,q)=>{const Q=u.call(t,q);return b.set(U,Q!==void 0?Q:!1),Q};t.readFile=U=>{const q=r(U),Q=b.get(q);return Q!==void 0?Q!==!1?Q:void 0:!tu(U,".json")&&!VEe(U)?u.call(t,U):F(q,U)};const j=a?(U,q,Q,re)=>{const Y=r(U),ue=typeof q=="object"?q.impliedNodeFormat:void 0,te=N.get(ue),Se=te==null?void 0:te.get(Y);if(Se)return Se;const oe=a(U,q,Q,re);return oe&&(xf(U)||tu(U,".json"))&&N.set(ue,(te||new Map).set(Y,oe)),oe}:void 0;return t.fileExists=U=>{const q=r(U),Q=T.get(q);if(Q!==void 0)return Q;const re=h.call(t,U);return T.set(q,!!re),re},C&&(t.writeFile=(U,q,...Q)=>{const re=r(U);T.delete(re);const Y=b.get(re);Y!==void 0&&Y!==q?(b.delete(re),N.forEach(ue=>ue.delete(re))):j&&N.forEach(ue=>{const te=ue.get(re);te&&te.text!==q&&ue.delete(re)}),C.call(t,U,q,...Q)}),p&&(t.directoryExists=U=>{const q=r(U),Q=E.get(q);if(Q!==void 0)return Q;const re=p.call(t,U);return E.set(q,!!re),re},m&&(t.createDirectory=U=>{const q=r(U);E.delete(q),m.call(t,U)})),{originalReadFile:u,originalFileExists:h,originalDirectoryExists:p,originalCreateDirectory:m,originalWriteFile:C,getSourceFileWithCache:j,readFileWithCache:R}}function eQe(t,r,a){let u;return u=un(u,t.getConfigFileParsingDiagnostics()),u=un(u,t.getOptionsDiagnostics(a)),u=un(u,t.getSyntacticDiagnostics(r,a)),u=un(u,t.getGlobalDiagnostics(a)),u=un(u,t.getSemanticDiagnostics(r,a)),fg(t.getCompilerOptions())&&(u=un(u,t.getDeclarationDiagnostics(r,a))),v6(u||x)}function tQe(t,r){let a="";for(const u of t)a+=Ice(u,r);return a}function Ice(t,r){const a=`${JE(t)} TS${t.code}: ${Jv(t.messageText,r.getNewLine())}${r.getNewLine()}`;if(t.file){const{line:u,character:h}=Da(t.file,t.start),p=t.file.fileName;return`${GR(p,r.getCurrentDirectory(),C=>r.getCanonicalFileName(C))}(${u+1},${h+1}): `+a}return a}var QEe=(t=>(t.Grey="\x1B[90m",t.Red="\x1B[91m",t.Yellow="\x1B[93m",t.Blue="\x1B[94m",t.Cyan="\x1B[96m",t))(QEe||{}),XEe="\x1B[7m",ZEe=" ",iQe="\x1B[0m",nQe="...",e4t=" ",rQe=" ";function sQe(t){switch(t){case 1:return"\x1B[91m";case 0:return"\x1B[93m";case 2:return z.fail("Should never get an Info diagnostic on the command line.");case 3:return"\x1B[94m"}}function rD(t,r){return r+t+iQe}function oQe(t,r,a,u,h,p){const{line:m,character:C}=Da(t,r),{line:b,character:T}=Da(t,r+a),E=Da(t,t.text.length).line,N=b-m>=4;let R=(b+1+"").length;N&&(R=Math.max(nQe.length,R));let F="";for(let j=m;j<=b;j++){F+=p.getNewLine(),N&&m+1a.getCanonicalFileName(b)):t.fileName;let C="";return C+=u(m,"\x1B[96m"),C+=":",C+=u(`${h+1}`,"\x1B[93m"),C+=":",C+=u(`${p+1}`,"\x1B[93m"),C}function YEe(t,r){let a="";for(const u of t){if(u.file){const{file:h,start:p}=u;a+=Nce(h,p,r),a+=" - "}if(a+=rD(JE(u),sQe(u.category)),a+=rD(` TS${u.code}: `,"\x1B[90m"),a+=Jv(u.messageText,r.getNewLine()),u.file&&u.code!==k.File_appears_to_be_binary.code&&(a+=r.getNewLine(),a+=oQe(u.file,u.start,u.length,"",sQe(u.category),r)),u.relatedInformation){a+=r.getNewLine();for(const{file:h,start:p,length:m,messageText:C}of u.relatedInformation)h&&(a+=r.getNewLine(),a+=e4t+Nce(h,p,r),a+=oQe(h,p,m,rQe,"\x1B[96m",r)),a+=r.getNewLine(),a+=rQe+Jv(C,r.getNewLine())}a+=r.getNewLine()}return a}function Jv(t,r,a=0){if(mo(t))return t;if(t===void 0)return"";let u="";if(a){u+=r;for(let h=0;hPce(r,t,a)};function Mce(t,r,a,u,h){return{nameAndMode:Oce,resolve:(p,m)=>HP(p,t,a,u,h,r,m)}}function Rce(t){return mo(t)?t:t.fileName}var t4t={getName:Rce,getMode:(t,r)=>GV(t,r==null?void 0:r.impliedNodeFormat)};function tQ(t,r,a,u,h){return{nameAndMode:t4t,resolve:(p,m)=>gDe(p,t,a,u,r,h,m)}}function KV(t,r,a,u,h,p,m,C){if(t.length===0)return x;const b=[],T=new Map,E=C(r,a,u,p,m);for(const N of t){const R=E.nameAndMode.getName(N),F=E.nameAndMode.getMode(N,h,(a==null?void 0:a.commandLine.options)||u),j=O7(R,F);let U=T.get(j);U||T.set(j,U=E.resolve(R,F)),b.push(U)}return b}function Fce(t,r){return iQ(void 0,t,(a,u)=>a&&r(a,u))}function iQ(t,r,a,u){let h;return p(t,r,void 0);function p(m,C,b){if(u){const T=u(m,b);if(T)return T}return W(C,(T,E)=>{if(T&&(h!=null&&h.has(T.sourceFile.path)))return;const N=a(T,b,E);return N||!T?N:((h||(h=new Set)).add(T.sourceFile.path),p(T.commandLine.projectReferences,T.references,T))})}}var Q7="__inferred type names__.ts";function nQ(t,r,a){const u=t.configFilePath?rs(t.configFilePath):r;return Hr(u,`__lib_node_modules_lookup_${a}__.ts`)}function Bce(t){const r=t.split(".");let a=r[1],u=2;for(;r[u]&&r[u]!=="d";)a+=(u===2?"/":"-")+r[u],u++;return"@typescript/lib-"+a}function lQe(t){return Ow(t.fileName)}function cQe(t){const r=lQe(t);return dle.get(r)}function t2(t){switch(t==null?void 0:t.kind){case 3:case 4:case 5:case 7:return!0;default:return!1}}function D3(t){return t.pos!==void 0}function X7(t,r){var a,u,h,p;const m=z.checkDefined(t.getSourceFileByPath(r.file)),{kind:C,index:b}=r;let T,E,N;switch(C){case 3:const R=ZV(m,b);if(N=(u=(a=t.getResolvedModuleFromModuleSpecifier(R,m))==null?void 0:a.resolvedModule)==null?void 0:u.packageId,R.pos===-1)return{file:m,packageId:N,text:R.text};T=qa(m.text,R.pos),E=R.end;break;case 4:({pos:T,end:E}=m.referencedFiles[b]);break;case 5:({pos:T,end:E}=m.typeReferenceDirectives[b]),N=(p=(h=t.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(m.typeReferenceDirectives[b],m))==null?void 0:h.resolvedTypeReferenceDirective)==null?void 0:p.packageId;break;case 7:({pos:T,end:E}=m.libReferenceDirectives[b]);break;default:return z.assertNever(C)}return{file:m,pos:T,end:E,packageId:N}}function Wce(t,r,a,u,h,p,m,C,b,T){if(!t||C!=null&&C()||!qs(t.getRootFileNames(),r))return!1;let E;if(!qs(t.getProjectReferences(),T,U)||t.getSourceFiles().some(F))return!1;const N=t.getMissingFilePaths();if(N&&hf(N,h))return!1;const R=t.getCompilerOptions();if(!Voe(R,a)||t.resolvedLibReferences&&hf(t.resolvedLibReferences,(Q,re)=>m(re)))return!1;if(R.configFile&&a.configFile)return R.configFile.text===a.configFile.text;return!0;function F(Q){return!j(Q)||p(Q.path)}function j(Q){return Q.version===u(Q.resolvedPath,Q.fileName)}function U(Q,re,Y){return Ise(Q,re)&&q(t.getResolvedProjectReferences()[Y],Q)}function q(Q,re){if(Q){if(Mt(E,Q))return!0;const ue=E3(re),te=b(ue);return!te||Q.commandLine.options.configFile!==te.options.configFile||!qs(Q.commandLine.fileNames,te.fileNames)?!1:((E||(E=[])).push(Q),!W(Q.references,(Se,oe)=>!q(Se,Q.commandLine.projectReferences[oe])))}const Y=E3(re);return!b(Y)}}function sD(t){return t.options.configFile?[...t.options.configFile.parseDiagnostics,...t.errors]:t.errors}function QV(t,r,a,u){const h=rQ(t,r,a,u);return typeof h=="object"?h.impliedNodeFormat:h}function rQ(t,r,a,u){switch(f_(u)){case 3:case 99:return rd(t,[".d.mts",".mts",".mjs"])?99:rd(t,[".d.cts",".cts",".cjs"])?1:rd(t,[".d.ts",".ts",".tsx",".js",".jsx"])?h():void 0;default:return}function h(){const p=M7(r,a,u),m=[];p.failedLookupLocations=m,p.affectingLocations=m;const C=R7(t,p);return{impliedNodeFormat:(C==null?void 0:C.contents.packageJsonContent.type)==="module"?99:1,packageJsonLocations:m,packageJsonScope:C}}}var Vce=new Set([k.Cannot_redeclare_block_scoped_variable_0.code,k.A_module_cannot_have_multiple_default_exports.code,k.Another_export_default_is_here.code,k.The_first_export_default_is_here.code,k.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module.code,k.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode.code,k.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here.code,k.constructor_is_a_reserved_word.code,k.delete_cannot_be_called_on_an_identifier_in_strict_mode.code,k.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode.code,k.Invalid_use_of_0_Modules_are_automatically_in_strict_mode.code,k.Invalid_use_of_0_in_strict_mode.code,k.A_label_is_not_allowed_here.code,k.with_statements_are_not_allowed_in_strict_mode.code,k.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement.code,k.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement.code,k.A_class_declaration_without_the_default_modifier_must_have_a_name.code,k.A_class_member_cannot_have_the_0_keyword.code,k.A_comma_expression_is_not_allowed_in_a_computed_property_name.code,k.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement.code,k.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.code,k.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.code,k.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement.code,k.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration.code,k.A_definite_assignment_assertion_is_not_permitted_in_this_context.code,k.A_destructuring_declaration_must_have_an_initializer.code,k.A_get_accessor_cannot_have_parameters.code,k.A_rest_element_cannot_contain_a_binding_pattern.code,k.A_rest_element_cannot_have_a_property_name.code,k.A_rest_element_cannot_have_an_initializer.code,k.A_rest_element_must_be_last_in_a_destructuring_pattern.code,k.A_rest_parameter_cannot_have_an_initializer.code,k.A_rest_parameter_must_be_last_in_a_parameter_list.code,k.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma.code,k.A_return_statement_cannot_be_used_inside_a_class_static_block.code,k.A_set_accessor_cannot_have_rest_parameter.code,k.A_set_accessor_must_have_exactly_one_parameter.code,k.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module.code,k.An_export_declaration_cannot_have_modifiers.code,k.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module.code,k.An_import_declaration_cannot_have_modifiers.code,k.An_object_member_cannot_be_declared_optional.code,k.Argument_of_dynamic_import_cannot_be_spread_element.code,k.Cannot_assign_to_private_method_0_Private_methods_are_not_writable.code,k.Cannot_redeclare_identifier_0_in_catch_clause.code,k.Catch_clause_variable_cannot_have_an_initializer.code,k.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator.code,k.Classes_can_only_extend_a_single_class.code,k.Classes_may_not_have_a_field_named_constructor.code,k.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code,k.Duplicate_label_0.code,k.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code,k.for_await_loops_cannot_be_used_inside_a_class_static_block.code,k.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code,k.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code,k.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array.code,k.JSX_property_access_expressions_cannot_include_JSX_namespace_names.code,k.Jump_target_cannot_cross_function_boundary.code,k.Line_terminator_not_permitted_before_arrow.code,k.Modifiers_cannot_appear_here.code,k.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement.code,k.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement.code,k.Private_identifiers_are_not_allowed_outside_class_bodies.code,k.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.code,k.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier.code,k.Tagged_template_expressions_are_not_permitted_in_an_optional_chain.code,k.The_left_hand_side_of_a_for_of_statement_may_not_be_async.code,k.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer.code,k.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer.code,k.Trailing_comma_not_allowed.code,k.Variable_declaration_list_cannot_be_empty.code,k._0_and_1_operations_cannot_be_mixed_without_parentheses.code,k._0_expected.code,k._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2.code,k._0_list_cannot_be_empty.code,k._0_modifier_already_seen.code,k._0_modifier_cannot_appear_on_a_constructor_declaration.code,k._0_modifier_cannot_appear_on_a_module_or_namespace_element.code,k._0_modifier_cannot_appear_on_a_parameter.code,k._0_modifier_cannot_appear_on_class_elements_of_this_kind.code,k._0_modifier_cannot_be_used_here.code,k._0_modifier_must_precede_1_modifier.code,k._0_declarations_can_only_be_declared_inside_a_block.code,k._0_declarations_must_be_initialized.code,k.extends_clause_already_seen.code,k.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code,k.Class_constructor_may_not_be_a_generator.code,k.Class_constructor_may_not_be_an_accessor.code,k.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,k.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,k.Private_field_0_must_be_declared_in_an_enclosing_class.code,k.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value.code]);function i4t(t,r){return t?D6(t.getCompilerOptions(),r,_le):!1}function n4t(t,r,a,u,h,p){return{rootNames:t,options:r,host:a,oldProgram:u,configFileParsingDiagnostics:h,typeScriptVersion:p}}function XV(t,r,a,u,h){var p,m,C,b,T,E,N,R,F,j,U,q,Q,re,Y,ue;const te=Lo(t)?n4t(t,r,a,u,h):t,{rootNames:Se,options:oe,configFileParsingDiagnostics:pe,projectReferences:ye,typeScriptVersion:be}=te;let{oldProgram:_e}=te;for(const rt of JTe)if(Vl(oe,rt.name)&&typeof oe[rt.name]=="string")throw new Error(`${rt.name} is a string value; tsconfig JSON must be parsed with parseJsonSourceFileConfigFileContent or getParsedCommandLineOfConfigFile before passing to createProgram`);const ve=l_(()=>nh("ignoreDeprecations",k.Invalid_value_for_ignoreDeprecations));let Ee,ke,Fe,Oe,fe,Ie,Le;const et=new Map;let He=Ug(),We,Ue,Ye;const wt={},nt={};let ze,st,xt,Et,ft,Ht,Oi,Ji,Ui,bn;const Mi=typeof oe.maxNodeModuleJsDepth=="number"?oe.maxNodeModuleJsDepth:0;let Ai=0;const Rn=new Map,bs=new Map;(p=sr)==null||p.push(sr.Phase.Program,"createProgram",{configFilePath:oe.configFilePath,rootDir:oe.rootDir},!0),cu("beforeProgram");const Hi=te.host||KEe(oe),Hs=oQ(Hi);let Wo=oe.noLib;const ts=l_(()=>Hi.getDefaultLibFileName(oe)),Fo=Hi.getDefaultLibLocation?Hi.getDefaultLibLocation():rs(ts()),Cn=O8();let Ko=[];const ot=Hi.getCurrentDirectory(),hi=K8(oe),hn=GW(oe,hi),lr=new Map;let as,fs,Ds,ha;const Yo=Hi.hasInvalidatedResolutions||kv;Hi.resolveModuleNameLiterals?(ha=Hi.resolveModuleNameLiterals.bind(Hi),Ds=(m=Hi.getModuleResolutionCache)==null?void 0:m.call(Hi)):Hi.resolveModuleNames?(ha=(rt,bt,si,Ti,Ki,Jn)=>Hi.resolveModuleNames(rt.map(tIe),bt,Jn==null?void 0:Jn.map(tIe),si,Ti,Ki).map(sn=>sn?sn.extension!==void 0?{resolvedModule:sn}:{resolvedModule:{...sn,extension:X8(sn.resolvedFileName)}}:aQe),Ds=(C=Hi.getModuleResolutionCache)==null?void 0:C.call(Hi)):(Ds=y3(ot,Lr,oe),ha=(rt,bt,si,Ti,Ki)=>KV(rt,bt,si,Ti,Ki,Hi,Ds,Mce));let ji;if(Hi.resolveTypeReferenceDirectiveReferences)ji=Hi.resolveTypeReferenceDirectiveReferences.bind(Hi);else if(Hi.resolveTypeReferenceDirectives)ji=(rt,bt,si,Ti,Ki)=>Hi.resolveTypeReferenceDirectives(rt.map(Rce),bt,si,Ti,Ki==null?void 0:Ki.impliedNodeFormat).map(Jn=>({resolvedTypeReferenceDirective:Jn}));else{const rt=TK(ot,Lr,void 0,Ds==null?void 0:Ds.getPackageJsonInfoCache(),Ds==null?void 0:Ds.optionsToRedirectsKey);ji=(bt,si,Ti,Ki,Jn)=>KV(bt,si,Ti,Ki,Jn,Hi,rt,tQ)}const fl=Hi.hasInvalidatedLibResolutions||kv;let St;if(Hi.resolveLibrary)St=Hi.resolveLibrary.bind(Hi);else{const rt=y3(ot,Lr,oe,Ds==null?void 0:Ds.getPackageJsonInfoCache());St=(bt,si,Ti)=>DK(bt,si,Ti,Hi,rt)}const Ot=new Map;let xe=new Map,Pt=Ug(),Re=!1;const mt=new Map;let Je=new Map;const pt=Hi.useCaseSensitiveFileNames()?new Map:void 0;let kt,Ci,$e,qt;const $t=!!((b=Hi.useSourceOfProjectReferenceRedirect)!=null&&b.call(Hi))&&!oe.disableSourceOfProjectReferenceRedirect,{onProgramCreateComplete:ii,fileExists:Gt,directoryExists:wi}=r4t({compilerHost:Hi,getSymlinkCache:tv,useSourceOfProjectReferenceRedirect:$t,toPath:ki,getResolvedProjectReferences:pf,getSourceOfProjectReferenceRedirect:G1,forEachResolvedProjectReference:vd}),ce=Hi.readFile.bind(Hi);(T=sr)==null||T.push(sr.Phase.Program,"shouldProgramCreateNewSourceFiles",{hasOldProgram:!!_e});const ut=i4t(_e,oe);(E=sr)==null||E.pop();let Bt;if((N=sr)==null||N.push(sr.Phase.Program,"tryReuseStructureFromOldProgram",{}),Bt=ca(),(R=sr)==null||R.pop(),Bt!==2){if(Ee=[],ke=[],ye&&(kt||(kt=ye.map(Xe)),Se.length&&(kt==null||kt.forEach((rt,bt)=>{if(!rt)return;const si=rt.commandLine.options.outFile;if($t){if(si||Vh(rt.commandLine.options)===0)for(const Ti of rt.commandLine.fileNames)Ld(Ti,{kind:1,index:bt})}else if(si)Ld(Kw(si,".d.ts"),{kind:2,index:bt});else if(Vh(rt.commandLine.options)===0){const Ti=l_(()=>UP(rt.commandLine,!Hi.useCaseSensitiveFileNames()));for(const Ki of rt.commandLine.fileNames)!xf(Ki)&&!tu(Ki,".json")&&Ld(k3(Ki,rt.commandLine,!Hi.useCaseSensitiveFileNames(),Ti),{kind:2,index:bt})}}))),(F=sr)==null||F.push(sr.Phase.Program,"processRootFiles",{count:Se.length}),W(Se,(rt,bt)=>md(rt,!1,!1,{kind:0,index:bt})),(j=sr)==null||j.pop(),st??(st=Se.length?xK(oe,Hi):x),xt=v3(),st.length){(U=sr)==null||U.push(sr.Phase.Program,"processTypeReferences",{count:st.length});const rt=oe.configFilePath?rs(oe.configFilePath):ot,bt=Hr(rt,Q7),si=zl(st,bt);for(let Ti=0;Ti{md(gi(bt),!0,!1,{kind:6,index:si})})}Fe=$p(Ee,$i).concat(ke),Ee=void 0,ke=void 0,We=void 0}if(_e&&Hi.onReleaseOldSourceFile){const rt=_e.getSourceFiles();for(const bt of rt){const si=Li(bt.resolvedPath);(ut||!si||si.impliedNodeFormat!==bt.impliedNodeFormat||bt.resolvedPath===bt.path&&si.resolvedPath!==bt.path)&&Hi.onReleaseOldSourceFile(bt,_e.getCompilerOptions(),!!Li(bt.path))}Hi.getParsedCommandLine||_e.forEachResolvedProjectReference(bt=>{Xv(bt.sourceFile.path)||Hi.onReleaseOldSourceFile(bt.sourceFile,_e.getCompilerOptions(),!1)})}_e&&Hi.onReleaseParsedCommandLine&&iQ(_e.getProjectReferences(),_e.getResolvedProjectReferences(),(rt,bt,si)=>{const Ti=(bt==null?void 0:bt.commandLine.projectReferences[si])||_e.getProjectReferences()[si],Ki=E3(Ti);Ci!=null&&Ci.has(ki(Ki))||Hi.onReleaseParsedCommandLine(Ki,rt,_e.getCompilerOptions())}),_e=void 0,ft=void 0,Oi=void 0,Ui=void 0;const le={getRootFileNames:()=>Se,getSourceFile:wl,getSourceFileByPath:Li,getSourceFiles:()=>Fe,getMissingFilePaths:()=>Je,getModuleResolutionCache:()=>Ds,getFilesByNameMap:()=>mt,getCompilerOptions:()=>oe,getSyntacticDiagnostics:zh,getOptionsDiagnostics:Fc,getGlobalDiagnostics:qh,getSemanticDiagnostics:Uh,getCachedSemanticDiagnostics:z_,getSuggestionDiagnostics:Cs,getDeclarationDiagnostics:J,getBindAndCheckDiagnostics:Rc,getProgramDiagnostics:Qc,getTypeChecker:Wf,getClassifiableNames:Sl,getCommonSourceDirectory:zo,emit:za,getCurrentDirectory:()=>ot,getNodeCount:()=>Wf().getNodeCount(),getIdentifierCount:()=>Wf().getIdentifierCount(),getSymbolCount:()=>Wf().getSymbolCount(),getTypeCount:()=>Wf().getTypeCount(),getInstantiationCount:()=>Wf().getInstantiationCount(),getRelationCacheSizes:()=>Wf().getRelationCacheSizes(),getFileProcessingDiagnostics:()=>ze,getAutomaticTypeDirectiveNames:()=>st,getAutomaticTypeDirectiveResolutions:()=>xt,isSourceFileFromExternalLibrary:wh,isSourceFileDefaultLibrary:Tu,getModeForUsageLocation:Eg,getModeForResolutionAtIndex:rC,getSourceFileFromReference:rl,getLibFileFromReference:uo,sourceFileToPackageName:xe,redirectTargetsMap:Pt,usesUriStyleNodeCoreModules:Re,resolvedModules:Ht,resolvedTypeReferenceDirectiveNames:Ji,resolvedLibReferences:Et,getResolvedModule:tt,getResolvedModuleFromModuleSpecifier:Ae,getResolvedTypeReferenceDirective:Ke,getResolvedTypeReferenceDirectiveFromTypeReferenceDirective:Qt,forEachResolvedModule:ni,forEachResolvedTypeReferenceDirective:fi,getCurrentPackagesMap:()=>bn,typesPackageExists:kn,packageBundlesTypes:or,isEmittedFile:Vm,getConfigFileParsingDiagnostics:Nd,getProjectReferences:qc,getResolvedProjectReferences:pf,getProjectReferenceRedirect:kg,getResolvedProjectReferenceToRedirect:q_,getResolvedProjectReferenceByPath:Xv,forEachResolvedProjectReference:vd,isSourceOfProjectReferenceRedirect:rp,getRedirectReferenceForResolutionFromSourceOfProject:is,emitBuildInfo:Ps,fileExists:Gt,readFile:ce,directoryExists:wi,getSymlinkCache:tv,realpath:(Y=Hi.realpath)==null?void 0:Y.bind(Hi),useCaseSensitiveFileNames:()=>Hi.useCaseSensitiveFileNames(),getCanonicalFileName:Lr,getFileIncludeReasons:()=>He,structureIsReused:Bt,writeFile:$s};return ii(),ei(),cu("afterProgram"),qg("Program","beforeProgram","afterProgram"),(ue=sr)==null||ue.pop(),le;function je(){return Ko&&(ze==null||ze.forEach(rt=>{switch(rt.kind){case 1:return Cn.add($o(rt.file&&Li(rt.file),rt.fileProcessingReason,rt.diagnostic,rt.args||x));case 0:return Cn.add(de(rt));case 2:return rt.diagnostics.forEach(bt=>Cn.add(bt));default:z.assertNever(rt)}}),Ko.forEach(({file:rt,diagnostic:bt,args:si})=>Cn.add($o(rt,void 0,bt,si))),Ko=void 0,Ue=void 0,Ye=void 0),Cn}function de({reason:rt}){const{file:bt,pos:si,end:Ti}=X7(le,rt),Ki=bt.libReferenceDirectives[rt.index],Jn=lQe(Ki),sn=h6(BR(Jn,"lib."),".d.ts"),ar=qE(sn,lK,fc);return ef(bt,z.checkDefined(si),z.checkDefined(Ti)-si,ar?k.Cannot_find_lib_definition_for_0_Did_you_mean_1:k.Cannot_find_lib_definition_for_0,Jn,ar)}function tt(rt,bt,si){var Ti;return(Ti=Ht==null?void 0:Ht.get(rt.path))==null?void 0:Ti.get(bt,si)}function Ae(rt,bt){return bt??(bt=_n(rt)),z.assertIsDefined(bt,"`moduleSpecifier` must have a `SourceFile` ancestor. Use `program.getResolvedModule` instead to provide the containing file and resolution mode."),tt(bt,rt.text,Eg(bt,rt))}function Ke(rt,bt,si){var Ti;return(Ti=Ji==null?void 0:Ji.get(rt.path))==null?void 0:Ti.get(bt,si)}function Qt(rt,bt){return Ke(bt,rt.fileName,rt.resolutionMode||bt.impliedNodeFormat)}function ni(rt,bt){Gi(Ht,rt,bt)}function fi(rt,bt){Gi(Ji,rt,bt)}function Gi(rt,bt,si){var Ti;si?(Ti=rt==null?void 0:rt.get(si.path))==null||Ti.forEach((Ki,Jn,sn)=>bt(Ki,Jn,sn,si.path)):rt==null||rt.forEach((Ki,Jn)=>Ki.forEach((sn,ar,ks)=>bt(sn,ar,ks,Jn)))}function fn(){return bn||(bn=new Map,ni(({resolvedModule:rt})=>{rt!=null&&rt.packageId&&bn.set(rt.packageId.name,rt.extension===".d.ts"||!!bn.get(rt.packageId.name))}),bn)}function kn(rt){return fn().has(LK(rt))}function or(rt){return!!fn().get(rt)}function rn(rt){var bt;(bt=rt.resolutionDiagnostics)!=null&&bt.length&&(ze??(ze=[])).push({kind:2,diagnostics:rt.resolutionDiagnostics})}function _r(rt,bt,si,Ti){if(Hi.resolveModuleNameLiterals||!Hi.resolveModuleNames)return rn(si);if(!Ds||Zd(bt))return;const Ki=bo(rt.originalFileName,ot),Jn=rs(Ki),sn=Ar(rt),ar=Ds.getFromNonRelativeNameCache(bt,Ti,Jn,sn);ar&&rn(ar)}function Fs(rt,bt,si){var Ti,Ki;if(!rt.length)return x;const Jn=bo(bt.originalFileName,ot),sn=Ar(bt);(Ti=sr)==null||Ti.push(sr.Phase.Program,"resolveModuleNamesWorker",{containingFileName:Jn}),cu("beforeResolveModule");const ar=ha(rt,Jn,sn,oe,bt,si);return cu("afterResolveModule"),qg("ResolveModule","beforeResolveModule","afterResolveModule"),(Ki=sr)==null||Ki.pop(),ar}function to(rt,bt,si){var Ti,Ki;if(!rt.length)return[];const Jn=mo(bt)?void 0:bt,sn=mo(bt)?bt:bo(bt.originalFileName,ot),ar=Jn&&Ar(Jn);(Ti=sr)==null||Ti.push(sr.Phase.Program,"resolveTypeReferenceDirectiveNamesWorker",{containingFileName:sn}),cu("beforeResolveTypeReference");const ks=ji(rt,sn,ar,oe,Jn,si);return cu("afterResolveTypeReference"),qg("ResolveTypeReference","beforeResolveTypeReference","afterResolveTypeReference"),(Ki=sr)==null||Ki.pop(),ks}function Ar(rt){const bt=q_(rt.originalFileName);if(bt||!xf(rt.originalFileName))return bt;const si=is(rt.path);if(si)return si;if(!Hi.realpath||!oe.preserveSymlinks||!rt.originalFileName.includes(nb))return;const Ti=ki(Hi.realpath(rt.originalFileName));return Ti===rt.path?void 0:is(Ti)}function is(rt){const bt=G1(rt);if(mo(bt))return q_(bt);if(bt)return vd(si=>{const Ti=si.commandLine.options.outFile;if(Ti)return ki(Ti)===rt?si:void 0})}function $i(rt,bt){return hc(Tn(rt),Tn(bt))}function Tn(rt){if(l0(Fo,rt.fileName,!1)){const bt=fd(rt.fileName);if(bt==="lib.d.ts"||bt==="lib.es6.d.ts")return 0;const si=h6(BR(bt,"lib."),".d.ts"),Ti=lK.indexOf(si);if(Ti!==-1)return Ti+1}return lK.length+2}function ki(rt){return _c(rt,ot,Lr)}function zo(){if(fe===void 0){const rt=Ri(Fe,bt=>cI(bt,le));fe=G7(oe,()=>ns(rt,bt=>bt.isDeclarationFile?void 0:bt.fileName),ot,Lr,bt=>ie(rt,bt))}return fe}function Sl(){var rt;if(!Le){Wf(),Le=new Set;for(const bt of Fe)(rt=bt.classifiableNames)==null||rt.forEach(si=>Le.add(si))}return Le}function Rl(rt,bt){if(Bt===0&&!bt.ambientModuleNames.length)return Fs(rt,bt,void 0);let si,Ti,Ki;const Jn=aQe,sn=_e&&_e.getSourceFile(bt.fileName);for(let ps=0;ps{const Ti=(bt?bt.commandLine.projectReferences:ye)[si],Ki=Xe(Ti);return rt?!Ki||Ki.sourceFile!==rt.sourceFile||!qs(rt.commandLine.fileNames,Ki.commandLine.fileNames):Ki!==void 0},(rt,bt)=>{const si=bt?Xv(bt.sourceFile.path).commandLine.projectReferences:ye;return!qs(rt,si,Ise)})}function ca(){var rt;if(!_e)return 0;const bt=_e.getCompilerOptions();if(G$(bt,oe))return 0;const si=_e.getRootFileNames();if(!qs(si,Se)||!co())return 0;ye&&(kt=ye.map(Xe));const Ti=[],Ki=[];if(Bt=2,hf(_e.getMissingFilePaths(),nr=>Hi.fileExists(nr)))return 0;const Jn=_e.getSourceFiles();let sn;(nr=>{nr[nr.Exists=0]="Exists",nr[nr.Modified=1]="Modified"})(sn||(sn={}));const ar=new Map;for(const nr of Jn){const ps=np(nr.fileName,Ds,Hi,oe);let Hn=Hi.getSourceFileByPath?Hi.getSourceFileByPath(nr.fileName,nr.resolvedPath,ps,void 0,ut):Hi.getSourceFile(nr.fileName,ps,void 0,ut);if(!Hn)return 0;Hn.packageJsonLocations=(rt=ps.packageJsonLocations)!=null&&rt.length?ps.packageJsonLocations:void 0,Hn.packageJsonScope=ps.packageJsonScope,z.assert(!Hn.redirectInfo,"Host should not return a redirect source file from `getSourceFile`");let Do;if(nr.redirectInfo){if(Hn!==nr.redirectInfo.unredirected)return 0;Do=!1,Hn=nr}else if(_e.redirectTargetsMap.has(nr.path)){if(Hn!==nr)return 0;Do=!1}else Do=Hn!==nr;Hn.path=nr.path,Hn.originalFileName=nr.originalFileName,Hn.resolvedPath=nr.resolvedPath,Hn.fileName=nr.fileName;const Wa=_e.sourceFileToPackageName.get(nr.path);if(Wa!==void 0){const nf=ar.get(Wa),xh=Do?1:0;if(nf!==void 0&&xh===1||nf===1)return 0;ar.set(Wa,xh)}if(Do)nr.impliedNodeFormat!==Hn.impliedNodeFormat?Bt=1:qs(nr.libReferenceDirectives,Hn.libReferenceDirectives,wg)?nr.hasNoDefaultLib!==Hn.hasNoDefaultLib?Bt=1:qs(nr.referencedFiles,Hn.referencedFiles,wg)?(Sn(Hn),qs(nr.imports,Hn.imports,it)&&qs(nr.moduleAugmentations,Hn.moduleAugmentations,it)?(nr.flags&12582912)!==(Hn.flags&12582912)?Bt=1:qs(nr.typeReferenceDirectives,Hn.typeReferenceDirectives,wg)||(Bt=1):Bt=1):Bt=1:Bt=1,Ki.push(Hn);else if(Yo(nr.path))Bt=1,Ki.push(Hn);else for(const nf of nr.ambientModuleNames)et.set(nf,nr.fileName);Ti.push(Hn)}if(Bt!==2)return Bt;for(const nr of Ki){const ps=uQe(nr),Hn=Rl(ps,nr);(Oi??(Oi=new Map)).set(nr.path,Hn),Nse(ps,Hn,Hm=>_e.getResolvedModule(nr,Hm.text,Eg(nr,Hm)),Iwe)&&(Bt=1);const Wa=nr.typeReferenceDirectives,nf=zl(Wa,nr);(Ui??(Ui=new Map)).set(nr.path,nf),Nse(Wa,nf,Hm=>_e.getResolvedTypeReferenceDirective(nr,Rce(Hm),GV(Hm,nr.impliedNodeFormat)),Nwe)&&(Bt=1)}if(Bt!==2)return Bt;if(Dwe(bt,oe)||_e.resolvedLibReferences&&hf(_e.resolvedLibReferences,(nr,ps)=>dn(ps).actual!==nr.actual))return 1;if(Hi.hasChangedAutomaticTypeDirectiveNames){if(Hi.hasChangedAutomaticTypeDirectiveNames())return 1}else if(st=xK(oe,Hi),!qs(_e.getAutomaticTypeDirectiveNames(),st))return 1;Je=_e.getMissingFilePaths(),z.assert(Ti.length===_e.getSourceFiles().length);for(const nr of Ti)mt.set(nr.path,nr);return _e.getFilesByNameMap().forEach((nr,ps)=>{if(!nr){mt.set(ps,nr);return}if(nr.path===ps){_e.isSourceFileFromExternalLibrary(nr)&&bs.set(nr.path,!0);return}mt.set(ps,mt.get(nr.path))}),Fe=Ti,He=_e.getFileIncludeReasons(),ze=_e.getFileProcessingDiagnostics(),st=_e.getAutomaticTypeDirectiveNames(),xt=_e.getAutomaticTypeDirectiveResolutions(),xe=_e.sourceFileToPackageName,Pt=_e.redirectTargetsMap,Re=_e.usesUriStyleNodeCoreModules,Ht=_e.resolvedModules,Ji=_e.resolvedTypeReferenceDirectiveNames,Et=_e.resolvedLibReferences,bn=_e.getCurrentPackagesMap(),2}function Ic(rt){return{getCanonicalFileName:Lr,getCommonSourceDirectory:le.getCommonSourceDirectory,getCompilerOptions:le.getCompilerOptions,getCurrentDirectory:()=>ot,getSourceFile:le.getSourceFile,getSourceFileByPath:le.getSourceFileByPath,getSourceFiles:le.getSourceFiles,isSourceFileFromExternalLibrary:wh,getResolvedProjectReferenceToRedirect:q_,getProjectReferenceRedirect:kg,isSourceOfProjectReferenceRedirect:rp,getSymlinkCache:tv,writeFile:rt||$s,isEmitBlocked:Mc,readFile:bt=>Hi.readFile(bt),fileExists:bt=>{const si=ki(bt);return Li(si)?!0:Je.has(si)?!1:Hi.fileExists(bt)},realpath:la(Hi,Hi.realpath),useCaseSensitiveFileNames:()=>Hi.useCaseSensitiveFileNames(),getBuildInfo:()=>{var bt;return(bt=le.getBuildInfo)==null?void 0:bt.call(le)},getSourceFileFromReference:(bt,si)=>le.getSourceFileFromReference(bt,si),redirectTargetsMap:Pt,getFileIncludeReasons:le.getFileIncludeReasons,createHash:la(Hi,Hi.createHash),getModuleResolutionCache:()=>le.getModuleResolutionCache(),trace:la(Hi,Hi.trace)}}function $s(rt,bt,si,Ti,Ki,Jn){Hi.writeFile(rt,bt,si,Ti,Ki,Jn)}function Ps(rt){var bt,si;z.assert(!oe.outFile),(bt=sr)==null||bt.push(sr.Phase.Emit,"emitBuildInfo",{},!0),cu("beforeEmit");const Ti=bce(jEe,Ic(rt),void 0,BEe,!1,!0);return cu("afterEmit"),qg("Emit","beforeEmit","afterEmit"),(si=sr)==null||si.pop(),Ti}function pf(){return kt}function qc(){return ye}function wh(rt){return!!bs.get(rt.path)}function Tu(rt){if(!rt.isDeclarationFile)return!1;if(rt.hasNoDefaultLib)return!0;if(!oe.noLib)return!1;const bt=Hi.useCaseSensitiveFileNames()?UE:yk;return oe.lib?Rt(oe.lib,si=>bt(rt.fileName,Et.get(si).actual)):bt(rt.fileName,ts())}function Wf(){return Ie||(Ie=zDe(le))}function za(rt,bt,si,Ti,Ki,Jn){var sn,ar;(sn=sr)==null||sn.push(sr.Phase.Emit,"emit",{path:rt==null?void 0:rt.path},!0);const ks=Wt(()=>Ul(le,rt,bt,si,Ti,Ki,Jn));return(ar=sr)==null||ar.pop(),ks}function Mc(rt){return lr.has(ki(rt))}function Ul(rt,bt,si,Ti,Ki,Jn,sn){if(!sn){const ps=jce(rt,bt,si,Ti);if(ps)return ps}const ar=Wf(),ks=ar.getEmitResolver(oe.outFile?void 0:bt,Ti,yce(Ki,sn));cu("beforeEmit");const nr=ar.runWithCancellationToken(Ti,()=>bce(ks,Ic(si),bt,WEe(oe,Jn,Ki),Ki,!1,sn));return cu("afterEmit"),qg("Emit","beforeEmit","afterEmit"),nr}function wl(rt){return Li(ki(rt))}function Li(rt){return mt.get(rt)||void 0}function wu(rt,bt,si){return v6(rt?bt(rt,si):Ln(le.getSourceFiles(),Ti=>(si&&si.throwIfCancellationRequested(),bt(Ti,si))))}function zh(rt,bt){return wu(rt,ct,bt)}function Uh(rt,bt){return wu(rt,mi,bt)}function z_(rt){var bt;return rt?(bt=wt.perFile)==null?void 0:bt.get(rt.path):wt.allDiagnostics}function Rc(rt,bt){return mn(rt,bt)}function Qc(rt){var bt;if(Y8(rt,oe,le))return x;const si=je().getDiagnostics(rt.fileName);return(bt=rt.commentDirectives)!=null&&bt.length?br(rt,rt.commentDirectives,si).diagnostics:si}function J(rt,bt){const si=le.getCompilerOptions();return!rt||si.outFile?Xc(rt,bt):wu(rt,Ud,bt)}function ct(rt){return F_(rt)?(rt.additionalSyntacticDiagnostics||(rt.additionalSyntacticDiagnostics=ql(rt)),no(rt.additionalSyntacticDiagnostics,rt.parseDiagnostics)):rt.parseDiagnostics}function Wt(rt){try{return rt()}catch(bt){throw bt instanceof UR&&(Ie=void 0),bt}}function mi(rt,bt){return no(sQ(mn(rt,bt),oe),Qc(rt))}function mn(rt,bt){return $c(rt,bt,wt,Zr)}function Zr(rt,bt){return Wt(()=>{if(Y8(rt,oe,le))return x;const si=Wf();z.assert(!!rt.bindDiagnostics);const Ki=(rt.scriptKind===1||rt.scriptKind===2)&&Z8(rt,oe),Jn=p8(rt,oe.checkJs);let sn=rt.bindDiagnostics,ar=si.getDiagnostics(rt,bt);return Jn&&(sn=Ri(sn,ks=>Vce.has(ks.code)),ar=Ri(ar,ks=>Vce.has(ks.code))),Fi(rt,!Jn,sn,ar,Ki?rt.jsDocDiagnostics:void 0)})}function Fi(rt,bt,...si){var Ti;const Ki=zs(si);if(!bt||!((Ti=rt.commentDirectives)!=null&&Ti.length))return Ki;const{diagnostics:Jn,directives:sn}=br(rt,rt.commentDirectives,Ki);for(const ar of sn.getUnusedExpectations())Jn.push(Jwe(rt,ar.range,k.Unused_ts_expect_error_directive));return Jn}function br(rt,bt,si){const Ti=Awe(rt,bt);return{diagnostics:si.filter(Jn=>xs(Jn,Ti)===-1),directives:Ti}}function Cs(rt,bt){return Wt(()=>Wf().getSuggestionDiagnostics(rt,bt))}function xs(rt,bt){const{file:si,start:Ti}=rt;if(!si)return-1;const Ki=Wy(si);let Jn=g6(Ki,Ti).line-1;for(;Jn>=0;){if(bt.markUsed(Jn))return Jn;const sn=si.text.slice(Ki[Jn],Ki[Jn+1]).trim();if(sn!==""&&!/^(\s*)\/\/(.*)$/.test(sn))return-1;Jn--}return-1}function ql(rt){return Wt(()=>{const bt=[];return si(rt,rt),MP(rt,si,Ti),bt;function si(ar,ks){switch(ks.kind){case 169:case 172:case 174:if(ks.questionToken===ar)return bt.push(sn(ar,k.The_0_modifier_can_only_be_used_in_TypeScript_files,"?")),"skip";case 173:case 176:case 177:case 178:case 218:case 262:case 219:case 260:if(ks.type===ar)return bt.push(sn(ar,k.Type_annotations_can_only_be_used_in_TypeScript_files)),"skip"}switch(ar.kind){case 273:if(ar.isTypeOnly)return bt.push(sn(ks,k._0_declarations_can_only_be_used_in_TypeScript_files,"import type")),"skip";break;case 278:if(ar.isTypeOnly)return bt.push(sn(ar,k._0_declarations_can_only_be_used_in_TypeScript_files,"export type")),"skip";break;case 276:case 281:if(ar.isTypeOnly)return bt.push(sn(ar,k._0_declarations_can_only_be_used_in_TypeScript_files,m_(ar)?"import...type":"export...type")),"skip";break;case 271:return bt.push(sn(ar,k.import_can_only_be_used_in_TypeScript_files)),"skip";case 277:if(ar.isExportEquals)return bt.push(sn(ar,k.export_can_only_be_used_in_TypeScript_files)),"skip";break;case 298:if(ar.token===119)return bt.push(sn(ar,k.implements_clauses_can_only_be_used_in_TypeScript_files)),"skip";break;case 264:const ps=Ta(120);return z.assertIsDefined(ps),bt.push(sn(ar,k._0_declarations_can_only_be_used_in_TypeScript_files,ps)),"skip";case 267:const Hn=ar.flags&32?Ta(145):Ta(144);return z.assertIsDefined(Hn),bt.push(sn(ar,k._0_declarations_can_only_be_used_in_TypeScript_files,Hn)),"skip";case 265:return bt.push(sn(ar,k.Type_aliases_can_only_be_used_in_TypeScript_files)),"skip";case 176:case 174:case 262:return ar.body?void 0:(bt.push(sn(ar,k.Signature_declarations_can_only_be_used_in_TypeScript_files)),"skip");case 266:const Do=z.checkDefined(Ta(94));return bt.push(sn(ar,k._0_declarations_can_only_be_used_in_TypeScript_files,Do)),"skip";case 235:return bt.push(sn(ar,k.Non_null_assertions_can_only_be_used_in_TypeScript_files)),"skip";case 234:return bt.push(sn(ar.type,k.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)),"skip";case 238:return bt.push(sn(ar.type,k.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)),"skip";case 216:z.fail()}}function Ti(ar,ks){if(tle(ks)){const nr=Me(ks.modifiers,jd);nr&&bt.push(sn(nr,k.Decorators_are_not_valid_here))}else if(eD(ks)&&ks.modifiers){const nr=Nt(ks.modifiers,jd);if(nr>=0){if(Gs(ks)&&!oe.experimentalDecorators)bt.push(sn(ks.modifiers[nr],k.Decorators_are_not_valid_here));else if(xd(ks)){const ps=Nt(ks.modifiers,SP);if(ps>=0){const Hn=Nt(ks.modifiers,BG);if(nr>ps&&Hn>=0&&nr=0&&nr=0&&bt.push(fa(sn(ks.modifiers[Do],k.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),sn(ks.modifiers[nr],k.Decorator_used_before_export_here)))}}}}}switch(ks.kind){case 263:case 231:case 174:case 176:case 177:case 178:case 218:case 262:case 219:if(ar===ks.typeParameters)return bt.push(Jn(ar,k.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)),"skip";case 243:if(ar===ks.modifiers)return Ki(ks.modifiers,ks.kind===243),"skip";break;case 172:if(ar===ks.modifiers){for(const nr of ar)Ra(nr)&&nr.kind!==126&&nr.kind!==129&&bt.push(sn(nr,k.The_0_modifier_can_only_be_used_in_TypeScript_files,Ta(nr.kind)));return"skip"}break;case 169:if(ar===ks.modifiers&&Rt(ar,Ra))return bt.push(Jn(ar,k.Parameter_modifiers_can_only_be_used_in_TypeScript_files)),"skip";break;case 213:case 214:case 233:case 285:case 286:case 215:if(ar===ks.typeArguments)return bt.push(Jn(ar,k.Type_arguments_can_only_be_used_in_TypeScript_files)),"skip";break}}function Ki(ar,ks){for(const nr of ar)switch(nr.kind){case 87:if(ks)continue;case 125:case 123:case 124:case 148:case 138:case 128:case 164:case 103:case 147:bt.push(sn(nr,k.The_0_modifier_can_only_be_used_in_TypeScript_files,Ta(nr.kind)));break;case 126:case 95:case 90:case 129:}}function Jn(ar,ks,...nr){const ps=ar.pos;return ef(rt,ps,ar.end-ps,ks,...nr)}function sn(ar,ks,...nr){return Jg(rt,ar,ks,...nr)}})}function Xc(rt,bt){return $c(rt,bt,nt,Id)}function Id(rt,bt){return Wt(()=>{const si=Wf().getEmitResolver(rt,bt);return REe(Ic(dl),si,rt)||x})}function $c(rt,bt,si,Ti){var Ki;const Jn=rt?(Ki=si.perFile)==null?void 0:Ki.get(rt.path):si.allDiagnostics;if(Jn)return Jn;const sn=Ti(rt,bt);return rt?(si.perFile||(si.perFile=new Map)).set(rt.path,sn):si.allDiagnostics=sn,sn}function Ud(rt,bt){return rt.isDeclarationFile?[]:Xc(rt,bt)}function Fc(){return v6(no(je().getGlobalDiagnostics(),qd()))}function qd(){if(!oe.configFile)return x;let rt=je().getDiagnostics(oe.configFile.fileName);return vd(bt=>{rt=no(rt,je().getDiagnostics(bt.sourceFile.fileName))}),rt}function qh(){return Se.length?v6(Wf().getGlobalDiagnostics().slice()):x}function Nd(){return pe||x}function md(rt,bt,si,Ti){Mu(ra(rt),bt,si,void 0,Ti)}function wg(rt,bt){return rt.fileName===bt.fileName}function it(rt,bt){return rt.kind===80?bt.kind===80&&rt.escapedText===bt.escapedText:bt.kind===11&&rt.text===bt.text}function ai(rt,bt){const si=G.createStringLiteral(rt),Ti=G.createImportDeclaration(void 0,void 0,si);return gP(Ti,2),ml(si,Ti),ml(Ti,bt),si.flags&=-17,Ti.flags&=-17,si}function Sn(rt){if(rt.imports)return;const bt=F_(rt),si=Td(rt);let Ti,Ki,Jn;if(bt||!rt.isDeclarationFile&&(Xg(oe)||Td(rt))){oe.importHelpers&&(Ti=[ai(Ik,rt)]);const nr=aG(oG(oe,rt),oe);nr&&(Ti||(Ti=[])).push(ai(nr,rt))}for(const nr of rt.statements)sn(nr,!1);(rt.flags&4194304||bt)&&ar(rt),rt.imports=Ti||x,rt.moduleAugmentations=Ki||x,rt.ambientModuleNames=Jn||x;return;function sn(nr,ps){if(ZB(nr)){const Hn=GL(nr);Hn&&ja(Hn)&&Hn.text&&(!ps||!Zd(Hn.text))&&($b(nr,!1),Ti=xi(Ti,Hn),!Re&&Ai===0&&!rt.isDeclarationFile&&(Re=ro(Hn.text,"node:")))}else if(qu(nr)&&Bh(nr)&&(ps||Kr(nr,128)||rt.isDeclarationFile)){nr.name.parent=nr;const Hn=Im(nr.name);if(si||ps&&!Zd(Hn))(Ki||(Ki=[])).push(nr.name);else if(!ps){rt.isDeclarationFile&&(Jn||(Jn=[])).push(Hn);const Do=nr.body;if(Do)for(const Wa of Do.statements)sn(Wa,!0)}}}function ar(nr){const ps=/import|require/g;for(;ps.exec(nr.text)!==null;){const Hn=ks(nr,ps.lastIndex);if(bt&&B_(Hn,!0))$b(Hn,!1),Ti=xi(Ti,Hn.arguments[0]);else if(Gp(Hn)&&Hn.arguments.length>=1&&Ml(Hn.arguments[0]))$b(Hn,!1),Ti=xi(Ti,Hn.arguments[0]);else if(rS(Hn))$b(Hn,!1),Ti=xi(Ti,Hn.argument.literal);else if(bt&&$v(Hn)){const Do=GL(Hn);Do&&ja(Do)&&Do.text&&($b(Hn,!1),Ti=xi(Ti,Do))}}}function ks(nr,ps){let Hn=nr;const Do=Wa=>{if(Wa.pos<=ps&&(pstu(Ki,sn))){si&&(Zy(Ki)?si(k.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option,rt):si(k.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1,rt,"'"+zs(hi).join("', '")+"'"));return}const Jn=bt(rt);if(si)if(Jn)t2(Ti)&&Ki===Hi.getCanonicalFileName(Li(Ti.file).fileName)&&si(k.A_file_cannot_have_a_reference_to_itself);else{const sn=kg(rt);sn?si(k.Output_file_0_has_not_been_built_from_source_file_1,sn,rt):si(k.File_0_not_found,rt)}return Jn}else{const Ki=oe.allowNonTsExtensions&&bt(rt);if(Ki)return Ki;if(si&&oe.allowNonTsExtensions){si(k.File_0_not_found,rt);return}const Jn=W(hi[0],sn=>bt(rt+sn));return si&&!Jn&&si(k.Could_not_resolve_the_path_0_with_the_extensions_Colon_1,rt,"'"+zs(hi).join("', '")+"'"),Jn}}function Mu(rt,bt,si,Ti,Ki){hl(rt,Jn=>Ju(Jn,bt,si,Ki,Ti),(Jn,...sn)=>Dl(void 0,Ki,Jn,sn),Ki)}function Ld(rt,bt){return Mu(rt,!1,!1,void 0,bt)}function Xl(rt,bt,si){!t2(si)&&Rt(He.get(bt.path),t2)?Dl(bt,si,k.Already_included_file_name_0_differs_from_file_name_1_only_in_casing,[bt.fileName,rt]):Dl(bt,si,k.File_name_0_differs_from_already_included_file_name_1_only_in_casing,[rt,bt.fileName])}function $l(rt,bt,si,Ti,Ki,Jn,sn){var ar;const ks=Gk.createRedirectedSourceFile({redirectTarget:rt,unredirected:bt});return ks.fileName=si,ks.path=Ti,ks.resolvedPath=Ki,ks.originalFileName=Jn,ks.packageJsonLocations=(ar=sn.packageJsonLocations)!=null&&ar.length?sn.packageJsonLocations:void 0,ks.packageJsonScope=sn.packageJsonScope,bs.set(Ti,Ai>0),ks}function Ju(rt,bt,si,Ti,Ki){var Jn,sn;(Jn=sr)==null||Jn.push(sr.Phase.Program,"findSourceFile",{fileName:rt,isDefaultLib:bt||void 0,fileIncludeKind:Ire[Ti.kind]});const ar=ev(rt,bt,si,Ti,Ki);return(sn=sr)==null||sn.pop(),ar}function np(rt,bt,si,Ti){const Ki=rQ(bo(rt,ot),bt==null?void 0:bt.getPackageJsonInfoCache(),si,Ti),Jn=il(Ti),sn=$W(Ti);return typeof Ki=="object"?{...Ki,languageVersion:Jn,setExternalModuleIndicator:sn,jsDocParsingMode:si.jsDocParsingMode}:{languageVersion:Jn,impliedNodeFormat:Ki,setExternalModuleIndicator:sn,jsDocParsingMode:si.jsDocParsingMode}}function ev(rt,bt,si,Ti,Ki){var Jn;const sn=ki(rt);if($t){let Hn=G1(sn);if(!Hn&&Hi.realpath&&oe.preserveSymlinks&&xf(rt)&&rt.includes(nb)){const Do=ki(Hi.realpath(rt));Do!==sn&&(Hn=G1(Do))}if(Hn){const Do=mo(Hn)?Ju(Hn,bt,si,Ti,Ki):void 0;return Do&&U_(Do,sn,rt,void 0),Do}}const ar=rt;if(mt.has(sn)){const Hn=mt.get(sn),Do=xg(Hn||void 0,Ti,!0);if(Hn&&Do&&oe.forceConsistentCasingInFileNames!==!1){const Wa=Hn.fileName;ki(Wa)!==ki(rt)&&(rt=kg(rt)||rt);const xh=Jre(Wa,ot),Hm=Jre(rt,ot);xh!==Hm&&Xl(rt,Hn,Ti)}return Hn&&bs.get(Hn.path)&&Ai===0?(bs.set(Hn.path,!1),oe.noResolve||(Tg(Hn,bt),me(Hn)),oe.noLib||Vn(Hn),Rn.set(Hn.path,!1),ls(Hn)):Hn&&Rn.get(Hn.path)&&AiDl(void 0,Ti,k.Cannot_read_file_0_Colon_1,[rt,Hn]),ut);if(Ki){const Hn=jw(Ki),Do=Ot.get(Hn);if(Do){const Wa=$l(Do,ps,rt,sn,ki(rt),ar,nr);return Pt.add(Do.path,rt),U_(Wa,sn,rt,ks),xg(Wa,Ti,!1),xe.set(sn,X$(Ki)),ke.push(Wa),Wa}else ps&&(Ot.set(Hn,ps),xe.set(sn,X$(Ki)))}if(U_(ps,sn,rt,ks),ps){if(bs.set(sn,Ai>0),ps.fileName=rt,ps.path=sn,ps.resolvedPath=ki(rt),ps.originalFileName=ar,ps.packageJsonLocations=(Jn=nr.packageJsonLocations)!=null&&Jn.length?nr.packageJsonLocations:void 0,ps.packageJsonScope=nr.packageJsonScope,xg(ps,Ti,!1),Hi.useCaseSensitiveFileNames()){const Hn=Ow(sn),Do=pt.get(Hn);Do?Xl(rt,Do,Ti):pt.set(Hn,ps)}Wo=Wo||ps.hasNoDefaultLib&&!si,oe.noResolve||(Tg(ps,bt),me(ps)),oe.noLib||Vn(ps),ls(ps),bt?Ee.push(ps):ke.push(ps),(We??(We=new Set)).add(ps.path)}return ps}function xg(rt,bt,si){return rt&&(!si||!t2(bt)||!(We!=null&&We.has(bt.file)))?(He.add(rt.path,bt),!0):!1}function U_(rt,bt,si,Ti){Ti?(nm(si,Ti,rt),nm(si,bt,rt||!1)):nm(si,bt,rt)}function nm(rt,bt,si){mt.set(bt,si),si!==void 0?Je.delete(bt):Je.set(bt,rt)}function kg(rt){const bt=$1(rt);return bt&&J1(bt,rt)}function $1(rt){if(!(!kt||!kt.length||xf(rt)||tu(rt,".json")))return q_(rt)}function J1(rt,bt){const si=rt.commandLine.options.outFile;return si?Kw(si,".d.ts"):k3(bt,rt.commandLine,!Hi.useCaseSensitiveFileNames())}function q_(rt){$e===void 0&&($e=new Map,vd(si=>{ki(oe.configFilePath)!==si.sourceFile.path&&si.commandLine.fileNames.forEach(Ti=>$e.set(ki(Ti),si.sourceFile.path))}));const bt=$e.get(ki(rt));return bt&&Xv(bt)}function vd(rt){return Fce(kt,rt)}function G1(rt){if(xf(rt))return qt===void 0&&(qt=new Map,vd(bt=>{const si=bt.commandLine.options.outFile;if(si){const Ti=Kw(si,".d.ts");qt.set(ki(Ti),!0)}else{const Ti=l_(()=>UP(bt.commandLine,!Hi.useCaseSensitiveFileNames()));W(bt.commandLine.fileNames,Ki=>{if(!xf(Ki)&&!tu(Ki,".json")){const Jn=k3(Ki,bt.commandLine,!Hi.useCaseSensitiveFileNames(),Ti);qt.set(ki(Jn),Ki)}})}})),qt.get(rt)}function rp(rt){return $t&&!!q_(rt)}function Xv(rt){if(Ci)return Ci.get(rt)||void 0}function Tg(rt,bt){W(rt.referencedFiles,(si,Ti)=>{Mu(Tce(si.fileName,rt.fileName),bt,!1,void 0,{kind:4,file:rt.path,index:Ti})})}function me(rt){const bt=rt.typeReferenceDirectives;if(!bt.length)return;const si=(Ui==null?void 0:Ui.get(rt.path))||zl(bt,rt),Ti=v3();(Ji??(Ji=new Map)).set(rt.path,Ti);for(let Ki=0;Ki{const Ti=cQe(bt);Ti?md(gi(Ti),!0,!0,{kind:7,file:rt.path,index:si}):(ze||(ze=[])).push({kind:0,reason:{kind:7,file:rt.path,index:si}})})}function Lr(rt){return Hi.getCanonicalFileName(rt)}function ls(rt){var bt;if(Sn(rt),rt.imports.length||rt.moduleAugmentations.length){const si=uQe(rt),Ti=(Oi==null?void 0:Oi.get(rt.path))||Rl(si,rt);z.assert(Ti.length===si.length);const Ki=((bt=Ar(rt))==null?void 0:bt.commandLine.options)||oe,Jn=v3();(Ht??(Ht=new Map)).set(rt.path,Jn);for(let sn=0;snMi,xh=Wa&&!zce(Ki,ar,rt)&&!Ki.noResolve&&snTd(sn)&&!sn.isDeclarationFile);if(oe.isolatedModules||oe.verbatimModuleSyntax)oe.module===0&&bt<2&&oe.isolatedModules&&Zl(k.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher,"isolatedModules","target"),oe.preserveConstEnums===!1&&Zl(k.Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled,oe.verbatimModuleSyntax?"verbatimModuleSyntax":"isolatedModules","preserveConstEnums");else if(si&&bt<2&&oe.module===0){const sn=nI(si,typeof si.externalModuleIndicator=="boolean"?si:si.externalModuleIndicator);Cn.add(ef(si,sn.start,sn.length,k.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none))}if(rt&&!oe.emitDeclarationOnly){if(oe.module&&!(oe.module===2||oe.module===4))Zl(k.Only_amd_and_system_modules_are_supported_alongside_0,"outFile","module");else if(oe.module===void 0&&si){const sn=nI(si,typeof si.externalModuleIndicator=="boolean"?si:si.externalModuleIndicator);Cn.add(ef(si,sn.start,sn.length,k.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system,"outFile"))}}if(VT(oe)&&(f_(oe)===1?Zl(k.Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic,"resolveJsonModule"):iG(oe)||Zl(k.Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd,"resolveJsonModule","module")),oe.outDir||oe.rootDir||oe.sourceRoot||oe.mapRoot||fg(oe)&&oe.declarationDir){const sn=zo();oe.outDir&&sn===""&&Fe.some(ar=>L1(ar.fileName)>1)&&Zl(k.Cannot_find_the_common_subdirectory_path_for_the_input_files,"outDir")}oe.checkJs&&!Jw(oe)&&Zl(k.Option_0_cannot_be_specified_without_specifying_option_1,"checkJs","allowJs"),oe.emitDeclarationOnly&&(fg(oe)||Zl(k.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"emitDeclarationOnly","declaration","composite"),oe.noEmit&&Zl(k.Option_0_cannot_be_specified_with_option_1,"emitDeclarationOnly","noEmit")),oe.noCheck&&oe.noEmit&&Zl(k.Option_0_cannot_be_specified_with_option_1,"noCheck","noEmit"),oe.emitDecoratorMetadata&&!oe.experimentalDecorators&&Zl(k.Option_0_cannot_be_specified_without_specifying_option_1,"emitDecoratorMetadata","experimentalDecorators"),oe.jsxFactory?(oe.reactNamespace&&Zl(k.Option_0_cannot_be_specified_with_option_1,"reactNamespace","jsxFactory"),(oe.jsx===4||oe.jsx===5)&&Zl(k.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxFactory",TV.get(""+oe.jsx)),FP(oe.jsxFactory,bt)||nh("jsxFactory",k.Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name,oe.jsxFactory)):oe.reactNamespace&&!wp(oe.reactNamespace,bt)&&nh("reactNamespace",k.Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier,oe.reactNamespace),oe.jsxFragmentFactory&&(oe.jsxFactory||Zl(k.Option_0_cannot_be_specified_without_specifying_option_1,"jsxFragmentFactory","jsxFactory"),(oe.jsx===4||oe.jsx===5)&&Zl(k.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxFragmentFactory",TV.get(""+oe.jsx)),FP(oe.jsxFragmentFactory,bt)||nh("jsxFragmentFactory",k.Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name,oe.jsxFragmentFactory)),oe.reactNamespace&&(oe.jsx===4||oe.jsx===5)&&Zl(k.Option_0_cannot_be_specified_when_option_jsx_is_1,"reactNamespace",TV.get(""+oe.jsx)),oe.jsxImportSource&&oe.jsx===2&&Zl(k.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxImportSource",TV.get(""+oe.jsx));const Ti=Vh(oe);oe.verbatimModuleSyntax&&(Ti===2||Ti===3||Ti===4)&&Zl(k.Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System,"verbatimModuleSyntax"),oe.allowImportingTsExtensions&&!(oe.noEmit||oe.emitDeclarationOnly)&&nh("allowImportingTsExtensions",k.Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set);const Ki=f_(oe);if(oe.resolvePackageJsonExports&&!uP(Ki)&&Zl(k.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler,"resolvePackageJsonExports"),oe.resolvePackageJsonImports&&!uP(Ki)&&Zl(k.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler,"resolvePackageJsonImports"),oe.customConditions&&!uP(Ki)&&Zl(k.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler,"customConditions"),Ki===100&&!tG(Ti)&&Ti!==200&&nh("moduleResolution",k.Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later,"bundler"),yB[Ti]&&100<=Ti&&Ti<=199&&!(3<=Ki&&Ki<=99)){const sn=yB[Ti];nh("moduleResolution",k.Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1,sn,sn)}else if(qR[Ki]&&3<=Ki&&Ki<=99&&!(100<=Ti&&Ti<=199)){const sn=qR[Ki];nh("module",k.Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1,sn,sn)}if(!oe.noEmit&&!oe.suppressOutputPathCheck){const sn=Ic(),ar=new Set;pce(sn,ks=>{oe.emitDeclarationOnly||Jn(ks.jsFilePath,ar),Jn(ks.declarationFilePath,ar)})}function Jn(sn,ar){if(sn){const ks=ki(sn);if(mt.has(ks)){let ps;oe.configFilePath||(ps=Ro(void 0,k.Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig)),ps=Ro(ps,k.Cannot_write_file_0_because_it_would_overwrite_input_file,sn),_x(sn,XJ(ps))}const nr=Hi.useCaseSensitiveFileNames()?ks:Ow(ks);ar.has(nr)?_x(sn,Gc(k.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files,sn)):ar.add(nr)}}}function Dn(){const rt=oe.ignoreDeprecations;if(rt){if(rt==="5.0")return new B0(rt);ve()}return B0.zero}function Ss(rt,bt,si,Ti,Ki){const Jn=new B0(rt),sn=new B0(si),ar=new B0(be||g),ks=Dn(),nr=sn.compareTo(ar)!==1,ps=!nr&&ks.compareTo(Jn)===-1;(nr||ps)&&Ki((Hn,Do,Wa)=>{nr?Do===void 0?Ti(Hn,Do,Wa,k.Option_0_has_been_removed_Please_remove_it_from_your_configuration,Hn):Ti(Hn,Do,Wa,k.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration,Hn,Do):Do===void 0?Ti(Hn,Do,Wa,k.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error,Hn,bt,rt):Ti(Hn,Do,Wa,k.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error,Hn,Do,bt,rt)})}function Vo(){function rt(bt,si,Ti,Ki,...Jn){if(Ti){const sn=Ro(void 0,k.Use_0_instead,Ti),ar=Ro(sn,Ki,...Jn);m0(!si,bt,void 0,ar)}else m0(!si,bt,void 0,Ki,...Jn)}Ss("5.0","5.5","6.0",rt,bt=>{oe.target===0&&bt("target","ES3"),oe.noImplicitUseStrict&&bt("noImplicitUseStrict"),oe.keyofStringsOnly&&bt("keyofStringsOnly"),oe.suppressExcessPropertyErrors&&bt("suppressExcessPropertyErrors"),oe.suppressImplicitAnyIndexErrors&&bt("suppressImplicitAnyIndexErrors"),oe.noStrictGenericChecks&&bt("noStrictGenericChecks"),oe.charset&&bt("charset"),oe.out&&bt("out",void 0,"outFile"),oe.importsNotUsedAsValues&&bt("importsNotUsedAsValues",void 0,"verbatimModuleSyntax"),oe.preserveValueImports&&bt("preserveValueImports",void 0,"verbatimModuleSyntax")})}function po(rt,bt,si){function Ti(Ki,Jn,sn,ar,...ks){$h(bt,si,ar,...ks)}Ss("5.0","5.5","6.0",Ti,Ki=>{rt.prepend&&Ki("prepend")})}function $o(rt,bt,si,Ti){let Ki;const Jn=rt&&He.get(rt.path);let sn,ar,ks=t2(bt)?bt:void 0,nr,ps,Hn=rt&&(Ue==null?void 0:Ue.get(rt.path)),Do;Hn?(Hn.fileIncludeReasonDetails?(Ki=new Set(Jn),Jn==null||Jn.forEach(Hm)):Jn==null||Jn.forEach(xh),ps=Hn.redirectInfo):(Jn==null||Jn.forEach(xh),ps=rt&&rue(rt)),bt&&xh(bt);const Wa=(Ki==null?void 0:Ki.size)!==(Jn==null?void 0:Jn.length);ks&&(Ki==null?void 0:Ki.size)===1&&(Ki=void 0),Ki&&Hn&&(Hn.details&&!Wa?Do=Ro(Hn.details,si,...Ti||x):Hn.fileIncludeReasonDetails&&(Wa?IS()?sn=xi(Hn.fileIncludeReasonDetails.next.slice(0,Jn.length),sn[0]):sn=[...Hn.fileIncludeReasonDetails.next,sn[0]]:IS()?sn=Hn.fileIncludeReasonDetails.next.slice(0,Jn.length):nr=Hn.fileIncludeReasonDetails)),Do||(nr||(nr=Ki&&Ro(sn,k.The_file_is_in_the_program_because_Colon)),Do=Ro(ps?nr?[nr,...ps]:ps:nr,si,...Ti||x)),rt&&(Hn?(!Hn.fileIncludeReasonDetails||!Wa&&nr)&&(Hn.fileIncludeReasonDetails=nr):(Ue??(Ue=new Map)).set(rt.path,Hn={fileIncludeReasonDetails:nr,redirectInfo:ps}),!Hn.details&&!Wa&&(Hn.details=Do.next));const nf=ks&&X7(le,ks);return nf&&D3(nf)?sJ(nf.file,nf.pos,nf.end-nf.pos,Do,ar):XJ(Do,ar);function xh(jm){Ki!=null&&Ki.has(jm)||((Ki??(Ki=new Set)).add(jm),(sn??(sn=[])).push(aue(le,jm)),Hm(jm))}function Hm(jm){!ks&&t2(jm)?ks=jm:ks!==jm&&(ar=xi(ar,hu(jm)))}function IS(){var jm;return((jm=Hn.fileIncludeReasonDetails.next)==null?void 0:jm.length)!==(Jn==null?void 0:Jn.length)}}function Dl(rt,bt,si,Ti){(ze||(ze=[])).push({kind:1,file:rt&&rt.path,fileProcessingReason:bt,diagnostic:si,args:Ti})}function Ga(rt,bt,si){Ko.push({file:rt,diagnostic:bt,args:si})}function hu(rt){let bt=Ye==null?void 0:Ye.get(rt);return bt===void 0&&(Ye??(Ye=new Map)).set(rt,bt=rm(rt)??!1),bt||void 0}function rm(rt){if(t2(rt)){const Ti=X7(le,rt);let Ki;switch(rt.kind){case 3:Ki=k.File_is_included_via_import_here;break;case 4:Ki=k.File_is_included_via_reference_here;break;case 5:Ki=k.File_is_included_via_type_library_reference_here;break;case 7:Ki=k.File_is_included_via_library_reference_here;break;default:z.assertNever(rt)}return D3(Ti)?ef(Ti.file,Ti.pos,Ti.end-Ti.pos,Ki):void 0}if(!oe.configFile)return;let bt,si;switch(rt.kind){case 0:if(!oe.configFile.configFileSpecs)return;const Ti=bo(Se[rt.index],ot),Ki=sue(le,Ti);if(Ki){bt=dJ(oe.configFile,"files",Ki),si=k.File_is_matched_by_files_list_specified_here;break}const Jn=oue(le,Ti);if(!Jn||!mo(Jn))return;bt=dJ(oe.configFile,"include",Jn),si=k.File_is_matched_by_include_pattern_specified_here;break;case 1:case 2:const sn=z.checkDefined(kt==null?void 0:kt[rt.index]),ar=iQ(ye,kt,(Do,Wa,nf)=>Do===sn?{sourceFile:(Wa==null?void 0:Wa.sourceFile)||oe.configFile,index:nf}:void 0);if(!ar)return;const{sourceFile:ks,index:nr}=ar,ps=sW(ks,"references",Do=>Rf(Do.initializer)?Do.initializer:void 0);return ps&&ps.elements.length>nr?Jg(ks,ps.elements[nr],rt.kind===2?k.File_is_output_from_referenced_project_specified_here:k.File_is_source_from_referenced_project_specified_here):void 0;case 8:if(!oe.types)return;bt=Dg("types",rt.typeReference),si=k.File_is_entry_point_of_type_library_specified_here;break;case 6:if(rt.index!==void 0){bt=Dg("lib",oe.lib[rt.index]),si=k.File_is_library_specified_here;break}const Hn=nG(il(oe));bt=Hn?sm("target",Hn):void 0,si=k.File_is_default_library_for_target_specified_here;break;default:z.assertNever(rt)}return bt&&Jg(oe.configFile,bt,si)}function g0(){const rt=oe.suppressOutputPathCheck?void 0:yS(oe);iQ(ye,kt,(bt,si,Ti)=>{const Ki=(si?si.commandLine.projectReferences:ye)[Ti],Jn=si&&si.sourceFile;if(po(Ki,Jn,Ti),!bt){$h(Jn,Ti,k.File_0_not_found,Ki.path);return}const sn=bt.commandLine.options;(!sn.composite||sn.noEmit)&&(si?si.commandLine.fileNames:Se).length&&(sn.composite||$h(Jn,Ti,k.Referenced_project_0_must_have_setting_composite_Colon_true,Ki.path),sn.noEmit&&$h(Jn,Ti,k.Referenced_project_0_may_not_disable_emit,Ki.path)),!si&&rt&&rt===yS(sn)&&($h(Jn,Ti,k.Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1,rt,Ki.path),lr.set(ki(rt),!0))})}function K1(rt,bt,si,...Ti){let Ki=!0;ab(Jn=>{Pa(Jn.initializer)&&A6(Jn.initializer,rt,sn=>{const ar=sn.initializer;Rf(ar)&&ar.elements.length>bt&&(Cn.add(Jg(oe.configFile,ar.elements[bt],si,...Ti)),Ki=!1)})}),Ki&&ES(si,...Ti)}function ob(rt,bt,si,...Ti){let Ki=!0;ab(Jn=>{Pa(Jn.initializer)&&Wm(Jn.initializer,rt,bt,void 0,si,...Ti)&&(Ki=!1)}),Ki&&ES(si,...Ti)}function DS(rt,bt){return A6(nC(),rt,bt)}function ab(rt){return DS("paths",rt)}function sm(rt,bt){return DS(rt,si=>ja(si.initializer)&&si.initializer.text===bt?si.initializer:void 0)}function Dg(rt,bt){const si=nC();return si&&axe(si,rt,bt)}function Zl(rt,bt,si,Ti){m0(!0,bt,si,rt,bt,si,Ti)}function nh(rt,bt,...si){m0(!1,rt,void 0,bt,...si)}function $h(rt,bt,si,...Ti){const Ki=sW(rt||oe.configFile,"references",Jn=>Rf(Jn.initializer)?Jn.initializer:void 0);Ki&&Ki.elements.length>bt?Cn.add(Jg(rt||oe.configFile,Ki.elements[bt],si,...Ti)):Cn.add(Gc(si,...Ti))}function m0(rt,bt,si,Ti,...Ki){const Jn=nC();(!Jn||!Wm(Jn,rt,bt,si,Ti,...Ki))&&ES(Ti,...Ki)}function ES(rt,...bt){const si=hx();si?"messageText"in rt?Cn.add($y(oe.configFile,si.name,rt)):Cn.add(Jg(oe.configFile,si.name,rt,...bt)):"messageText"in rt?Cn.add(XJ(rt)):Cn.add(Gc(rt,...bt))}function nC(){if(as===void 0){const rt=hx();as=rt&&$r(rt.initializer,Pa)||!1}return as||void 0}function hx(){return fs===void 0&&(fs=A6(y8(oe.configFile),"compilerOptions",fc)||!1),fs||void 0}function Wm(rt,bt,si,Ti,Ki,...Jn){let sn=!1;return A6(rt,si,ar=>{"messageText"in Ki?Cn.add($y(oe.configFile,bt?ar.name:ar.initializer,Ki)):Cn.add(Jg(oe.configFile,bt?ar.name:ar.initializer,Ki,...Jn)),sn=!0},Ti),sn}function _x(rt,bt){lr.set(ki(rt),!0),Cn.add(bt)}function Vm(rt){if(oe.noEmit)return!1;const bt=ki(rt);if(Li(bt))return!1;const si=oe.outFile;if(si)return u2(bt,si)||u2(bt,h_(si)+".d.ts");if(oe.declarationDir&&l0(oe.declarationDir,bt,ot,!Hi.useCaseSensitiveFileNames()))return!0;if(oe.outDir)return l0(oe.outDir,bt,ot,!Hi.useCaseSensitiveFileNames());if(rd(bt,Z6)||xf(bt)){const Ti=h_(bt);return!!Li(Ti+".ts")||!!Li(Ti+".tsx")}return!1}function u2(rt,bt){return Mb(rt,bt,ot,!Hi.useCaseSensitiveFileNames())===0}function tv(){return Hi.getSymlinkCache?Hi.getSymlinkCache():(Oe||(Oe=Xoe(ot,Lr)),Fe&&!Oe.hasProcessedResolutions()&&Oe.setSymlinksFromResolutions(ni,fi,xt),Oe)}function Eg(rt,bt){var si;const Ti=((si=Ar(rt))==null?void 0:si.commandLine.options)||oe;return Ace(rt,bt,Ti)}function rC(rt,bt){return Eg(rt,ZV(rt,bt))}}function r4t(t){let r;const a=t.compilerHost.fileExists,u=t.compilerHost.directoryExists,h=t.compilerHost.getDirectories,p=t.compilerHost.realpath;if(!t.useSourceOfProjectReferenceRedirect)return{onProgramCreateComplete:dl,fileExists:b};t.compilerHost.fileExists=b;let m;return u&&(m=t.compilerHost.directoryExists=F=>u.call(t.compilerHost,F)?(N(F),!0):t.getResolvedProjectReferences()?(r||(r=new Set,t.forEachResolvedProjectReference(j=>{const U=j.commandLine.options.outFile;if(U)r.add(rs(t.toPath(U)));else{const q=j.commandLine.options.declarationDir||j.commandLine.options.outDir;q&&r.add(t.toPath(q))}})),R(F,!1)):!1),h&&(t.compilerHost.getDirectories=F=>!t.getResolvedProjectReferences()||u&&u.call(t.compilerHost,F)?h.call(t.compilerHost,F):[]),p&&(t.compilerHost.realpath=F=>{var j;return((j=t.getSymlinkCache().getSymlinkedFiles())==null?void 0:j.get(t.toPath(F)))||p.call(t.compilerHost,F)}),{onProgramCreateComplete:C,fileExists:b,directoryExists:m};function C(){t.compilerHost.fileExists=a,t.compilerHost.directoryExists=u,t.compilerHost.getDirectories=h}function b(F){return a.call(t.compilerHost,F)?!0:!t.getResolvedProjectReferences()||!xf(F)?!1:R(F,!0)}function T(F){const j=t.getSourceOfProjectReferenceRedirect(t.toPath(F));return j!==void 0?mo(j)?a.call(t.compilerHost,j):!0:void 0}function E(F){const j=t.toPath(F),U=`${j}${Hc}`;return Bb(r,q=>j===q||ro(q,U)||ro(j,`${q}/`))}function N(F){var j;if(!t.getResolvedProjectReferences()||i7(F)||!p||!F.includes(nb))return;const U=t.getSymlinkCache(),q=Xd(t.toPath(F));if((j=U.getSymlinkedDirectories())!=null&&j.has(q))return;const Q=ra(p.call(t.compilerHost,F));let re;if(Q===F||(re=Xd(t.toPath(Q)))===q){U.setSymlinkedDirectory(q,!1);return}U.setSymlinkedDirectory(F,{real:Xd(Q),realPath:re})}function R(F,j){var U;const q=j?te=>T(te):te=>E(te),Q=q(F);if(Q!==void 0)return Q;const re=t.getSymlinkCache(),Y=re.getSymlinkedDirectories();if(!Y)return!1;const ue=t.toPath(F);return ue.includes(nb)?j&&((U=re.getSymlinkedFiles())!=null&&U.has(ue))?!0:ee(Y.entries(),([te,Se])=>{if(!Se||!ro(ue,te))return;const oe=q(ue.replace(te,Se.realPath));if(j&&oe){const pe=bo(F,t.compilerHost.getCurrentDirectory());re.setSymlinkedFile(ue,`${Se.real}${pe.replace(new RegExp(te,"i"),"")}`)}return oe})||!1:!1}}var Hce={diagnostics:x,sourceMaps:void 0,emittedFiles:void 0,emitSkipped:!0};function jce(t,r,a,u){const h=t.getCompilerOptions();if(h.noEmit)return t.getSemanticDiagnostics(r,u),r||h.outFile?Hce:t.emitBuildInfo(a,u);if(!h.noEmitOnError)return;let p=[...t.getOptionsDiagnostics(u),...t.getSyntacticDiagnostics(r,u),...t.getGlobalDiagnostics(u),...t.getSemanticDiagnostics(r,u)];if(p.length===0&&fg(t.getCompilerOptions())&&(p=t.getDeclarationDiagnostics(void 0,u)),!p.length)return;let m;if(!r&&!h.outFile){const C=t.emitBuildInfo(a,u);C.diagnostics&&(p=[...p,...C.diagnostics]),m=C.emittedFiles}return{diagnostics:p,sourceMaps:void 0,emittedFiles:m,emitSkipped:!0}}function sQ(t,r){return Ri(t,a=>!a.skippedOn||!r[a.skippedOn])}function oQ(t,r=t){return{fileExists:a=>r.fileExists(a),readDirectory(a,u,h,p,m){return z.assertIsDefined(r.readDirectory,"'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"),r.readDirectory(a,u,h,p,m)},readFile:a=>r.readFile(a),directoryExists:la(r,r.directoryExists),getDirectories:la(r,r.getDirectories),realpath:la(r,r.realpath),useCaseSensitiveFileNames:t.useCaseSensitiveFileNames(),getCurrentDirectory:()=>t.getCurrentDirectory(),onUnRecoverableConfigFileDiagnostic:t.onUnRecoverableConfigFileDiagnostic||yT,trace:t.trace?a=>t.trace(a):void 0}}function E3(t){return gue(t.path)}function zce(t,{extension:r},{isDeclarationFile:a}){switch(r){case".ts":case".d.ts":case".mts":case".d.mts":case".cts":case".d.cts":return;case".tsx":return u();case".jsx":return u()||h();case".js":case".mjs":case".cjs":return h();case".json":return p();default:return m()}function u(){return t.jsx?void 0:k.Module_0_was_resolved_to_1_but_jsx_is_not_set}function h(){return Jw(t)||!Hh(t,"noImplicitAny")?void 0:k.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type}function p(){return VT(t)?void 0:k.Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used}function m(){return a||t.allowArbitraryExtensions?void 0:k.Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set}}function uQe({imports:t,moduleAugmentations:r}){const a=t.map(u=>u);for(const u of r)u.kind===11&&a.push(u);return a}function ZV({imports:t,moduleAugmentations:r},a){if(a(t[t.ComputedDts=0]="ComputedDts",t[t.StoredSignatureAtEmit=1]="StoredSignatureAtEmit",t[t.UsedVersion=2]="UsedVersion",t))(nIe||{}),X0;(t=>{function r(){function be(_e,ve,Ee){const ke={getKeys:Fe=>ve.get(Fe),getValues:Fe=>_e.get(Fe),keys:()=>_e.keys(),size:()=>_e.size,deleteKey:Fe=>{(Ee||(Ee=new Set)).add(Fe);const Oe=_e.get(Fe);return Oe?(Oe.forEach(fe=>u(ve,fe,Fe)),_e.delete(Fe),!0):!1},set:(Fe,Oe)=>{Ee==null||Ee.delete(Fe);const fe=_e.get(Fe);return _e.set(Fe,Oe),fe==null||fe.forEach(Ie=>{Oe.has(Ie)||u(ve,Ie,Fe)}),Oe.forEach(Ie=>{fe!=null&&fe.has(Ie)||a(ve,Ie,Fe)}),ke}};return ke}return be(new Map,new Map,void 0)}t.createManyToManyPathMap=r;function a(be,_e,ve){let Ee=be.get(_e);Ee||(Ee=new Set,be.set(_e,Ee)),Ee.add(ve)}function u(be,_e,ve){const Ee=be.get(_e);return Ee!=null&&Ee.delete(ve)?(Ee.size||be.delete(_e),!0):!1}function h(be){return ns(be.declarations,_e=>{var ve;return(ve=_n(_e))==null?void 0:ve.resolvedPath})}function p(be,_e){const ve=be.getSymbolAtLocation(_e);return ve&&h(ve)}function m(be,_e,ve,Ee){return _c(be.getProjectReferenceRedirect(_e)||_e,ve,Ee)}function C(be,_e,ve){let Ee;if(_e.imports&&_e.imports.length>0){const fe=be.getTypeChecker();for(const Ie of _e.imports){const Le=p(fe,Ie);Le==null||Le.forEach(Oe)}}const ke=rs(_e.resolvedPath);if(_e.referencedFiles&&_e.referencedFiles.length>0)for(const fe of _e.referencedFiles){const Ie=m(be,fe.fileName,ke,ve);Oe(Ie)}if(be.forEachResolvedTypeReferenceDirective(({resolvedTypeReferenceDirective:fe})=>{if(!fe)return;const Ie=fe.resolvedFileName,Le=m(be,Ie,ke,ve);Oe(Le)},_e),_e.moduleAugmentations.length){const fe=be.getTypeChecker();for(const Ie of _e.moduleAugmentations){if(!ja(Ie))continue;const Le=fe.getSymbolAtLocation(Ie);Le&&Fe(Le)}}for(const fe of be.getTypeChecker().getAmbientModules())fe.declarations&&fe.declarations.length>1&&Fe(fe);return Ee;function Fe(fe){if(fe.declarations)for(const Ie of fe.declarations){const Le=_n(Ie);Le&&Le!==_e&&Oe(Le.resolvedPath)}}function Oe(fe){(Ee||(Ee=new Set)).add(fe)}}function b(be,_e){return _e&&!_e.referencedMap==!be}t.canReuseOldState=b;function T(be){return be.module!==0&&!be.outFile?r():void 0}t.createReferencedMap=T;function E(be,_e,ve){var Ee,ke;const Fe=new Map,Oe=be.getCompilerOptions(),fe=T(Oe),Ie=b(fe,_e);be.getTypeChecker();for(const Le of be.getSourceFiles()){const et=z.checkDefined(Le.version,"Program intended to be used with Builder should have source files with versions set"),He=Ie?(Ee=_e.oldSignatures)==null?void 0:Ee.get(Le.resolvedPath):void 0,We=He===void 0?Ie?(ke=_e.fileInfos.get(Le.resolvedPath))==null?void 0:ke.signature:void 0:He||void 0;if(fe){const Ue=C(be,Le,be.getCanonicalFileName);Ue&&fe.set(Le.resolvedPath,Ue)}Fe.set(Le.resolvedPath,{version:et,signature:We,affectsGlobalScope:Oe.outFile?void 0:Se(Le)||void 0,impliedFormat:Le.impliedNodeFormat})}return{fileInfos:Fe,referencedMap:fe,useFileVersionAsSignature:!ve&&!Ie}}t.create=E;function N(be){be.allFilesExcludingDefaultLibraryFile=void 0,be.allFileNames=void 0}t.releaseCache=N;function R(be,_e,ve,Ee,ke){var Fe;const Oe=F(be,_e,ve,Ee,ke);return(Fe=be.oldSignatures)==null||Fe.clear(),Oe}t.getFilesAffectedBy=R;function F(be,_e,ve,Ee,ke){const Fe=_e.getSourceFileByPath(ve);return Fe?q(be,_e,Fe,Ee,ke)?(be.referencedMap?ye:pe)(be,_e,Fe,Ee,ke):[Fe]:x}t.getFilesAffectedByWithOldState=F;function j(be,_e,ve){be.fileInfos.get(ve).signature=_e,(be.hasCalledUpdateShapeSignature||(be.hasCalledUpdateShapeSignature=new Set)).add(ve)}t.updateSignatureOfFile=j;function U(be,_e,ve,Ee,ke){be.emit(_e,(Fe,Oe,fe,Ie,Le,et)=>{z.assert(xf(Fe),`File extension for signature expected to be dts: Got:: ${Fe}`),ke(Uce(be,_e,Oe,Ee,et),Le)},ve,2,void 0,!0)}t.computeDtsSignature=U;function q(be,_e,ve,Ee,ke,Fe=be.useFileVersionAsSignature){var Oe;if((Oe=be.hasCalledUpdateShapeSignature)!=null&&Oe.has(ve.resolvedPath))return!1;const fe=be.fileInfos.get(ve.resolvedPath),Ie=fe.signature;let Le;return!ve.isDeclarationFile&&!Fe&&U(_e,ve,Ee,ke,et=>{Le=et,ke.storeSignatureInfo&&(be.signatureInfo??(be.signatureInfo=new Map)).set(ve.resolvedPath,0)}),Le===void 0&&(Le=ve.version,ke.storeSignatureInfo&&(be.signatureInfo??(be.signatureInfo=new Map)).set(ve.resolvedPath,2)),(be.oldSignatures||(be.oldSignatures=new Map)).set(ve.resolvedPath,Ie||!1),(be.hasCalledUpdateShapeSignature||(be.hasCalledUpdateShapeSignature=new Set)).add(ve.resolvedPath),fe.signature=Le,Le!==Ie}t.updateShapeSignature=q;function Q(be,_e,ve){if(_e.getCompilerOptions().outFile||!be.referencedMap||Se(ve))return re(be,_e);const ke=new Set,Fe=[ve.resolvedPath];for(;Fe.length;){const Oe=Fe.pop();if(!ke.has(Oe)){ke.add(Oe);const fe=be.referencedMap.getValues(Oe);if(fe)for(const Ie of fe.keys())Fe.push(Ie)}}return Fn(fh(ke.keys(),Oe=>{var fe;return((fe=_e.getSourceFileByPath(Oe))==null?void 0:fe.fileName)??Oe}))}t.getAllDependencies=Q;function re(be,_e){if(!be.allFileNames){const ve=_e.getSourceFiles();be.allFileNames=ve===x?x:ve.map(Ee=>Ee.fileName)}return be.allFileNames}function Y(be,_e){const ve=be.referencedMap.getKeys(_e);return ve?Fn(ve.keys()):[]}t.getReferencedByPaths=Y;function ue(be){for(const _e of be.statements)if(!iJ(_e))return!1;return!0}function te(be){return Rt(be.moduleAugmentations,_e=>Iv(_e.parent))}function Se(be){return te(be)||!ep(be)&&!Dm(be)&&!ue(be)}function oe(be,_e,ve){if(be.allFilesExcludingDefaultLibraryFile)return be.allFilesExcludingDefaultLibraryFile;let Ee;ve&&ke(ve);for(const Fe of _e.getSourceFiles())Fe!==ve&&ke(Fe);return be.allFilesExcludingDefaultLibraryFile=Ee||x,be.allFilesExcludingDefaultLibraryFile;function ke(Fe){_e.isSourceFileDefaultLibrary(Fe)||(Ee||(Ee=[])).push(Fe)}}t.getAllFilesExcludingDefaultLibraryFile=oe;function pe(be,_e,ve){const Ee=_e.getCompilerOptions();return Ee&&Ee.outFile?[ve]:oe(be,_e,ve)}function ye(be,_e,ve,Ee,ke){if(Se(ve))return oe(be,_e,ve);const Fe=_e.getCompilerOptions();if(Fe&&(Xg(Fe)||Fe.outFile))return[ve];const Oe=new Map;Oe.set(ve.resolvedPath,ve);const fe=Y(be,ve.resolvedPath);for(;fe.length>0;){const Ie=fe.pop();if(!Oe.has(Ie)){const Le=_e.getSourceFileByPath(Ie);Oe.set(Ie,Le),Le&&q(be,_e,Le,Ee,ke)&&fe.push(...Y(be,Le.resolvedPath))}}return Fn(fh(Oe.values(),Ie=>Ie))}})(X0||(X0={}));var rIe=(t=>(t[t.None=0]="None",t[t.Js=1]="Js",t[t.JsMap=2]="JsMap",t[t.JsInlineMap=4]="JsInlineMap",t[t.Dts=8]="Dts",t[t.DtsMap=16]="DtsMap",t[t.AllJs=7]="AllJs",t[t.AllDts=24]="AllDts",t[t.All=31]="All",t))(rIe||{});function lx(t){let r=1;return t.sourceMap&&(r=r|2),t.inlineSourceMap&&(r=r|4),fg(t)&&(r=r|8),t.declarationMap&&(r=r|16),t.emitDeclarationOnly&&(r=r&24),r}function I3(t,r){const a=r&&(Aw(r)?r:lx(r)),u=Aw(t)?t:lx(t);if(a===u)return 0;if(!a||!u)return u;const h=a^u;let p=0;return h&7&&(p=u&7),h&24&&(p=p|u&24),p}function s4t(t,r){return t===r||t!==void 0&&r!==void 0&&t.size===r.size&&!Bb(t,a=>!r.has(a))}function o4t(t,r){var a,u;const h=X0.create(t,r,!1);h.program=t;const p=t.getCompilerOptions();h.compilerOptions=p;const m=p.outFile;m?p.composite&&(r!=null&&r.outSignature)&&m===r.compilerOptions.outFile&&(h.outSignature=r.outSignature&&fQe(p,r.compilerOptions,r.outSignature)):h.semanticDiagnosticsPerFile=new Map,h.changedFilesSet=new Set,h.latestChangedDtsFile=p.composite?r==null?void 0:r.latestChangedDtsFile:void 0;const C=X0.canReuseOldState(h.referencedMap,r),b=C?r.compilerOptions:void 0,T=C&&r.semanticDiagnosticsPerFile&&!!h.semanticDiagnosticsPerFile&&!vke(p,b),E=p.composite&&(r==null?void 0:r.emitSignatures)&&!m&&!bke(p,r.compilerOptions);C?((a=r.changedFilesSet)==null||a.forEach(U=>h.changedFilesSet.add(U)),!m&&((u=r.affectedFilesPendingEmit)!=null&&u.size)&&(h.affectedFilesPendingEmit=new Map(r.affectedFilesPendingEmit),h.seenAffectedFiles=new Set),h.programEmitPending=r.programEmitPending):h.buildInfoEmitPending=!0;const N=h.referencedMap,R=C?r.referencedMap:void 0,F=T&&!p.skipLibCheck==!b.skipLibCheck,j=F&&!p.skipDefaultLibCheck==!b.skipDefaultLibCheck;if(h.fileInfos.forEach((U,q)=>{var Q;let re,Y;if(!C||!(re=r.fileInfos.get(q))||re.version!==U.version||re.impliedFormat!==U.impliedFormat||!s4t(Y=N&&N.getValues(q),R&&R.getValues(q))||Y&&Bb(Y,ue=>!h.fileInfos.has(ue)&&r.fileInfos.has(ue)))dQe(h,q);else{const ue=t.getSourceFileByPath(q),te=(Q=r.emitDiagnosticsPerFile)==null?void 0:Q.get(q);if(te&&(h.emitDiagnosticsPerFile??(h.emitDiagnosticsPerFile=new Map)).set(q,r.hasReusableDiagnostic?pQe(te,q,t):hQe(te,t)),T){if(ue.isDeclarationFile&&!F||ue.hasNoDefaultLib&&!j)return;const Se=r.semanticDiagnosticsPerFile.get(q);Se&&(h.semanticDiagnosticsPerFile.set(q,r.hasReusableDiagnostic?pQe(Se,q,t):hQe(Se,t)),(h.semanticDiagnosticsFromOldState??(h.semanticDiagnosticsFromOldState=new Set)).add(q))}}if(E){const ue=r.emitSignatures.get(q);ue&&(h.emitSignatures??(h.emitSignatures=new Map)).set(q,fQe(p,r.compilerOptions,ue))}}),C&&hf(r.fileInfos,(U,q)=>h.fileInfos.has(q)?!1:m||U.affectsGlobalScope?!0:(h.buildInfoEmitPending=!0,!1)))X0.getAllFilesExcludingDefaultLibraryFile(h,t,void 0).forEach(U=>dQe(h,U.resolvedPath));else if(b){const U=yke(p,b)?lx(p):I3(p,b);U!==0&&(m?h.programEmitPending=h.programEmitPending?h.programEmitPending|U:U:(t.getSourceFiles().forEach(q=>{h.changedFilesSet.has(q.resolvedPath)||$ce(h,q.resolvedPath,U)}),z.assert(!h.seenAffectedFiles||!h.seenAffectedFiles.size),h.seenAffectedFiles=h.seenAffectedFiles||new Set,h.buildInfoEmitPending=!0))}return h}function dQe(t,r){t.changedFilesSet.add(r),t.buildInfoEmitPending=!0,t.programEmitPending=void 0}function fQe(t,r,a){return!!t.declarationMap==!!r.declarationMap?a:mo(a)?[a]:a[0]}function hQe(t,r){return t.length?Is(t,a=>{if(mo(a.messageText))return a;const u=sIe(a.messageText,a.file,r,h=>{var p;return(p=h.repopulateInfo)==null?void 0:p.call(h)});return u===a.messageText?a:{...a,messageText:u}}):t}function sIe(t,r,a,u){const h=u(t);if(h)return{...Q$(r,a,h.moduleReference,h.mode,h.packageName||h.moduleReference),next:_Qe(t.next,r,a,u)};const p=_Qe(t.next,r,a,u);return p===t.next?t:{...t,next:p}}function _Qe(t,r,a,u){return Is(t,h=>sIe(h,r,a,u))}function pQe(t,r,a){if(!t.length)return x;let u;return t.map(p=>{const m=gQe(p,r,a,h);m.reportsUnnecessary=p.reportsUnnecessary,m.reportsDeprecated=p.reportDeprecated,m.source=p.source,m.skippedOn=p.skippedOn;const{relatedInformation:C}=p;return m.relatedInformation=C?C.length?C.map(b=>gQe(b,r,a,h)):[]:void 0,m});function h(p){return u??(u=rs(bo(yS(a.getCompilerOptions()),a.getCurrentDirectory()))),_c(p,u,a.getCanonicalFileName)}}function gQe(t,r,a,u){const{file:h}=t,p=h!==!1?a.getSourceFileByPath(h?u(h):r):void 0;return{...t,file:p,messageText:mo(t.messageText)?t.messageText:sIe(t.messageText,p,a,m=>m.info)}}function a4t(t){X0.releaseCache(t),t.program=void 0}function l4t(t){const r=t.compilerOptions.outFile;return z.assert(!t.changedFilesSet.size||r),{affectedFilesPendingEmit:t.affectedFilesPendingEmit&&new Map(t.affectedFilesPendingEmit),seenEmittedFiles:t.seenEmittedFiles&&new Map(t.seenEmittedFiles),programEmitPending:t.programEmitPending,emitSignatures:t.emitSignatures&&new Map(t.emitSignatures),outSignature:t.outSignature,latestChangedDtsFile:t.latestChangedDtsFile,hasChangedEmitSignature:t.hasChangedEmitSignature,changedFilesSet:r?new Set(t.changedFilesSet):void 0,buildInfoEmitPending:t.buildInfoEmitPending,emitDiagnosticsPerFile:t.emitDiagnosticsPerFile&&new Map(t.emitDiagnosticsPerFile)}}function c4t(t,r){t.affectedFilesPendingEmit=r.affectedFilesPendingEmit,t.seenEmittedFiles=r.seenEmittedFiles,t.programEmitPending=r.programEmitPending,t.emitSignatures=r.emitSignatures,t.outSignature=r.outSignature,t.latestChangedDtsFile=r.latestChangedDtsFile,t.hasChangedEmitSignature=r.hasChangedEmitSignature,t.buildInfoEmitPending=r.buildInfoEmitPending,t.emitDiagnosticsPerFile=r.emitDiagnosticsPerFile,r.changedFilesSet&&(t.changedFilesSet=r.changedFilesSet)}function mQe(t,r){z.assert(!r||!t.affectedFiles||t.affectedFiles[t.affectedFilesIndex-1]!==r||!t.semanticDiagnosticsPerFile.has(r.resolvedPath))}function vQe(t,r,a){for(var u;;){const{affectedFiles:h}=t;if(h){const b=t.seenAffectedFiles;let T=t.affectedFilesIndex;for(;T{const p=u&7;p?t.affectedFilesPendingEmit.set(h,p):t.affectedFilesPendingEmit.delete(h)})}}function d4t(t,r){var a;if((a=t.affectedFilesPendingEmit)!=null&&a.size)return hf(t.affectedFilesPendingEmit,(u,h)=>{var p;const m=t.program.getSourceFileByPath(h);if(!m||!cI(m,t.program)){t.affectedFilesPendingEmit.delete(h);return}const C=(p=t.seenEmittedFiles)==null?void 0:p.get(m.resolvedPath);let b=I3(u,C);if(r&&(b=b&24),b)return{affectedFile:m,emitKind:b}})}function f4t(t){var r;if((r=t.emitDiagnosticsPerFile)!=null&&r.size)return hf(t.emitDiagnosticsPerFile,(a,u)=>{var h;const p=t.program.getSourceFileByPath(u);if(!p||!cI(p,t.program)){t.emitDiagnosticsPerFile.delete(u);return}const m=((h=t.seenEmittedFiles)==null?void 0:h.get(p.resolvedPath))||0;if(!(m&24))return{affectedFile:p,diagnostics:a,seenKind:m}})}function yQe(t){if(!t.cleanedDiagnosticsOfLibFiles){t.cleanedDiagnosticsOfLibFiles=!0;const r=z.checkDefined(t.program),a=r.getCompilerOptions();W(r.getSourceFiles(),u=>r.isSourceFileDefaultLibrary(u)&&!Y8(u,a,r)&&aIe(t,u.resolvedPath))}}function h4t(t,r,a,u){if(aIe(t,r.resolvedPath),t.allFilesExcludingDefaultLibraryFile===t.affectedFiles){yQe(t),X0.updateShapeSignature(t,z.checkDefined(t.program),r,a,u);return}t.compilerOptions.assumeChangesOnlyAffectDirectDependencies||_4t(t,r,a,u)}function oIe(t,r,a,u,h){if(aIe(t,r),!t.changedFilesSet.has(r)){const p=z.checkDefined(t.program),m=p.getSourceFileByPath(r);m&&(X0.updateShapeSignature(t,p,m,u,h,!0),a?$ce(t,r,lx(t.compilerOptions)):fg(t.compilerOptions)&&$ce(t,r,t.compilerOptions.declarationMap?24:8))}}function aIe(t,r){return t.semanticDiagnosticsFromOldState?(t.semanticDiagnosticsFromOldState.delete(r),t.semanticDiagnosticsPerFile.delete(r),!t.semanticDiagnosticsFromOldState.size):!0}function bQe(t,r){const a=z.checkDefined(t.oldSignatures).get(r)||void 0;return z.checkDefined(t.fileInfos.get(r)).signature!==a}function lIe(t,r,a,u,h){var p;return(p=t.fileInfos.get(r))!=null&&p.affectsGlobalScope?(X0.getAllFilesExcludingDefaultLibraryFile(t,t.program,void 0).forEach(m=>oIe(t,m.resolvedPath,a,u,h)),yQe(t),!0):!1}function _4t(t,r,a,u){var h,p;if(!t.referencedMap||!t.changedFilesSet.has(r.resolvedPath)||!bQe(t,r.resolvedPath))return;if(Xg(t.compilerOptions)){const b=new Map;b.set(r.resolvedPath,!0);const T=X0.getReferencedByPaths(t,r.resolvedPath);for(;T.length>0;){const E=T.pop();if(!b.has(E)){if(b.set(E,!0),lIe(t,E,!1,a,u))return;if(oIe(t,E,!1,a,u),bQe(t,E)){const N=z.checkDefined(t.program).getSourceFileByPath(E);T.push(...X0.getReferencedByPaths(t,N.resolvedPath))}}}}const m=new Set,C=!!((h=r.symbol)!=null&&h.exports)&&!!hf(r.symbol.exports,b=>{if(b.flags&128)return!0;const T=Of(b,t.program.getTypeChecker());return T===b?!1:(T.flags&128)!==0&&Rt(T.declarations,E=>_n(E)===r)});(p=t.referencedMap.getKeys(r.resolvedPath))==null||p.forEach(b=>{if(lIe(t,b,C,a,u))return!0;const T=t.referencedMap.getKeys(b);return T&&Bb(T,E=>CQe(t,E,C,m,a,u))})}function CQe(t,r,a,u,h,p){var m;if(o_(u,r)){if(lIe(t,r,a,h,p))return!0;oIe(t,r,a,h,p),(m=t.referencedMap.getKeys(r))==null||m.forEach(C=>CQe(t,C,a,u,h,p))}}function cIe(t,r,a){return no(p4t(t,r,a),z.checkDefined(t.program).getProgramDiagnostics(r))}function p4t(t,r,a){const u=r.resolvedPath;if(t.semanticDiagnosticsPerFile){const p=t.semanticDiagnosticsPerFile.get(u);if(p)return sQ(p,t.compilerOptions)}const h=z.checkDefined(t.program).getBindAndCheckDiagnostics(r,a);return t.semanticDiagnosticsPerFile&&t.semanticDiagnosticsPerFile.set(u,h),sQ(h,t.compilerOptions)}function uIe(t){var r;return!!((r=t.options)!=null&&r.outFile)}function g4t(t){var r,a;const u=z.checkDefined(t.program).getCurrentDirectory(),h=rs(bo(yS(t.compilerOptions),u)),p=t.latestChangedDtsFile?ue(t.latestChangedDtsFile):void 0,m=[],C=new Map,b=new Set(t.program.getRootFileNames().map(Ie=>_c(Ie,u,t.program.getCanonicalFileName))),T=[];if(t.compilerOptions.outFile){const Ie=Fn(t.fileInfos.entries(),([et,He])=>{const We=Se(et);return pe(et,We),He.impliedFormat?{version:He.version,impliedFormat:He.impliedFormat,signature:void 0,affectsGlobalScope:void 0}:He.version}),Le={fileNames:m,fileInfos:Ie,root:T,resolvedRoot:ye(),options:be(t.compilerOptions),outSignature:t.outSignature,latestChangedDtsFile:p,pendingEmit:t.programEmitPending?t.programEmitPending===lx(t.compilerOptions)?!1:t.programEmitPending:void 0};return KK(Le)}let E,N,R;const F=Fn(t.fileInfos.entries(),([Ie,Le])=>{var et,He;const We=Se(Ie);pe(Ie,We),z.assert(m[We-1]===te(Ie));const Ue=(et=t.oldSignatures)==null?void 0:et.get(Ie),Ye=Ue!==void 0?Ue||void 0:Le.signature;if(t.compilerOptions.composite){const wt=t.program.getSourceFileByPath(Ie);if(!Dm(wt)&&cI(wt,t.program)){const nt=(He=t.emitSignatures)==null?void 0:He.get(Ie);nt!==Ye&&(R=xi(R,nt===void 0?We:[We,!mo(nt)&&nt[0]===Ye?x:nt]))}}return Le.version===Ye?Le.affectsGlobalScope||Le.impliedFormat?{version:Le.version,signature:void 0,affectsGlobalScope:Le.affectsGlobalScope,impliedFormat:Le.impliedFormat}:Le.version:Ye!==void 0?Ue===void 0?Le:{version:Le.version,signature:Ye,affectsGlobalScope:Le.affectsGlobalScope,impliedFormat:Le.impliedFormat}:{version:Le.version,signature:!1,affectsGlobalScope:Le.affectsGlobalScope,impliedFormat:Le.impliedFormat}});let j;(r=t.referencedMap)!=null&&r.size()&&(j=Fn(t.referencedMap.keys()).sort(Xf).map(Ie=>[Se(Ie),oe(t.referencedMap.getValues(Ie))]));const U=ve();let q;if((a=t.affectedFilesPendingEmit)!=null&&a.size){const Ie=lx(t.compilerOptions),Le=new Set;for(const et of Fn(t.affectedFilesPendingEmit.keys()).sort(Xf))if(o_(Le,et)){const He=t.program.getSourceFileByPath(et);if(!He||!cI(He,t.program))continue;const We=Se(et),Ue=t.affectedFilesPendingEmit.get(et);q=xi(q,Ue===Ie?We:Ue===8?[We]:[We,Ue])}}let Q;if(t.changedFilesSet.size)for(const Ie of Fn(t.changedFilesSet.keys()).sort(Xf))Q=xi(Q,Se(Ie));const re=Ee(),Y={fileNames:m,fileInfos:F,root:T,resolvedRoot:ye(),options:be(t.compilerOptions),fileIdsList:E,referencedMap:j,semanticDiagnosticsPerFile:U,emitDiagnosticsPerFile:re,affectedFilesPendingEmit:q,changeFileSet:Q,emitSignatures:R,latestChangedDtsFile:p};return KK(Y);function ue(Ie){return te(bo(Ie,u))}function te(Ie){return KE(W0(h,Ie,t.program.getCanonicalFileName))}function Se(Ie){let Le=C.get(Ie);return Le===void 0&&(m.push(te(Ie)),C.set(Ie,Le=m.length)),Le}function oe(Ie){const Le=Fn(Ie.keys(),Se).sort(hc),et=Le.join();let He=N==null?void 0:N.get(et);return He===void 0&&(E=xi(E,Le),(N??(N=new Map)).set(et,He=E.length)),He}function pe(Ie,Le){const et=t.program.getSourceFile(Ie);if(!t.program.getFileIncludeReasons().get(et.path).some(Ye=>Ye.kind===0))return;if(!T.length)return T.push(Le);const He=T[T.length-1],We=Lo(He);if(We&&He[1]===Le-1)return He[1]=Le;if(We||T.length===1||He!==Le-1)return T.push(Le);const Ue=T[T.length-2];return!Aw(Ue)||Ue!==He-1?T.push(Le):(T[T.length-2]=[Ue,Le],T.length=T.length-1)}function ye(){let Ie;return b.forEach(Le=>{const et=t.program.getSourceFileByPath(Le);et&&Le!==et.resolvedPath&&(Ie=xi(Ie,[Se(et.resolvedPath),Se(Le)]))}),Ie}function be(Ie){let Le;const{optionsNameMap:et}=g3();for(const He of wm(Ie).sort(Xf)){const We=et.get(He.toLowerCase());We!=null&&We.affectsBuildInfo&&((Le||(Le={}))[He]=_e(We,Ie[He]))}return Le}function _e(Ie,Le){if(Ie){if(z.assert(Ie.type!=="listOrElement"),Ie.type==="list"){const et=Le;if(Ie.element.isFilePath&&et.length)return et.map(ue)}else if(Ie.isFilePath)return ue(Le)}return Le}function ve(){let Ie;return t.fileInfos.forEach((Le,et)=>{var He;const We=(He=t.semanticDiagnosticsPerFile)==null?void 0:He.get(et);We?We.length&&(Ie=xi(Ie,[Se(et),ke(We,et)])):t.changedFilesSet.has(et)||(Ie=xi(Ie,Se(et)))}),Ie}function Ee(){var Ie;let Le;if(!((Ie=t.emitDiagnosticsPerFile)!=null&&Ie.size))return Le;for(const et of Fn(t.emitDiagnosticsPerFile.keys()).sort(Xf)){const He=t.emitDiagnosticsPerFile.get(et);Le=xi(Le,[Se(et),ke(He,et)])}return Le}function ke(Ie,Le){return z.assert(!!Ie.length),Ie.map(et=>{const He=Fe(et,Le);He.reportsUnnecessary=et.reportsUnnecessary,He.reportDeprecated=et.reportsDeprecated,He.source=et.source,He.skippedOn=et.skippedOn;const{relatedInformation:We}=et;return He.relatedInformation=We?We.length?We.map(Ue=>Fe(Ue,Le)):[]:void 0,He})}function Fe(Ie,Le){const{file:et}=Ie;return{...Ie,file:et?et.resolvedPath===Le?void 0:te(et.resolvedPath):!1,messageText:mo(Ie.messageText)?Ie.messageText:Oe(Ie.messageText)}}function Oe(Ie){if(Ie.repopulateInfo)return{info:Ie.repopulateInfo(),next:fe(Ie.next)};const Le=fe(Ie.next);return Le===Ie.next?Ie:{...Ie,next:Le}}function fe(Ie){return Ie&&(W(Ie,(Le,et)=>{const He=Oe(Le);if(Le===He)return;const We=et>0?Ie.slice(0,et-1):[];We.push(He);for(let Ue=et+1;Ue(t[t.SemanticDiagnosticsBuilderProgram=0]="SemanticDiagnosticsBuilderProgram",t[t.EmitAndSemanticDiagnosticsBuilderProgram=1]="EmitAndSemanticDiagnosticsBuilderProgram",t))(dIe||{});function aQ(t,r,a,u,h,p){let m,C,b;return t===void 0?(z.assert(r===void 0),m=a,b=u,z.assert(!!b),C=b.getProgram()):Lo(t)?(b=u,C=XV({rootNames:t,options:r,host:a,oldProgram:b&&b.getProgramOrUndefined(),configFileParsingDiagnostics:h,projectReferences:p}),m=a):(C=t,m=r,b=a,h=u),{host:m,newProgram:C,oldProgram:b,configFileParsingDiagnostics:h||x}}function SQe(t,r){return(r==null?void 0:r.sourceMapUrlPos)!==void 0?t.substring(0,r.sourceMapUrlPos):t}function Uce(t,r,a,u,h){var p;a=SQe(a,h);let m;return(p=h==null?void 0:h.diagnostics)!=null&&p.length&&(a+=h.diagnostics.map(T=>`${b(T)}${g$[T.category]}${T.code}: ${C(T.messageText)}`).join(` +`)),(u.createHash??$R)(a);function C(T){return mo(T)?T:T===void 0?"":T.next?T.messageText+T.next.map(C).join(` +`):T.messageText}function b(T){return T.file.resolvedPath===r.resolvedPath?`(${T.start},${T.length})`:(m===void 0&&(m=rs(r.resolvedPath)),`${KE(W0(m,T.file.resolvedPath,t.getCanonicalFileName))}(${T.start},${T.length})`)}}function fIe(t,r,a){return(r.createHash??$R)(SQe(t,a))}function qce(t,{newProgram:r,host:a,oldProgram:u,configFileParsingDiagnostics:h}){let p=u&&u.getState();if(p&&r===p.program&&h===r.getConfigFileParsingDiagnostics())return r=void 0,p=void 0,u;const m=o4t(r,p);r.getBuildInfo=()=>g4t(m),r=void 0,u=void 0,p=void 0;const C=()=>m,b=Gce(C,h);return b.getState=C,b.saveEmitState=()=>l4t(m),b.restoreEmitState=U=>c4t(m,U),b.hasChangedEmitSignature=()=>!!m.hasChangedEmitSignature,b.getAllDependencies=U=>X0.getAllDependencies(m,z.checkDefined(m.program),U),b.getSemanticDiagnostics=j,b.emit=R,b.releaseProgram=()=>a4t(m),t===0?b.getSemanticDiagnosticsOfNextAffectedFile=F:t===1?(b.getSemanticDiagnosticsOfNextAffectedFile=F,b.emitNextAffectedFile=E,b.emitBuildInfo=T):pa(),b;function T(U,q){if(m.buildInfoEmitPending){const Q=z.checkDefined(m.program).emitBuildInfo(U||la(a,a.writeFile),q);return m.buildInfoEmitPending=!1,Q}return Hce}function E(U,q,Q,re){var Y,ue,te;let Se=vQe(m,q,a);const oe=lx(m.compilerOptions);let pe=Q?oe&24:oe;if(!Se)if(m.compilerOptions.outFile){if(!m.programEmitPending||(pe=m.programEmitPending,Q&&(pe=pe&24),!pe))return;Se=m.program}else{const _e=d4t(m,Q);if(!_e){const ve=f4t(m);if(ve)return(m.seenEmittedFiles??(m.seenEmittedFiles=new Map)).set(ve.affectedFile.resolvedPath,ve.seenKind|24),{result:{emitSkipped:!0,diagnostics:ve.diagnostics},affected:ve.affectedFile};if(!m.buildInfoEmitPending)return;const Ee=m.program,ke=Ee.emitBuildInfo(U||la(a,a.writeFile),q);return m.buildInfoEmitPending=!1,{result:ke,affected:Ee}}({affectedFile:Se,emitKind:pe}=_e)}let ye;pe&7&&(ye=0),pe&24&&(ye=ye===void 0?1:void 0),Se===m.program&&(m.programEmitPending=m.changedFilesSet.size?I3(oe,pe):m.programEmitPending?I3(m.programEmitPending,pe):void 0);const be=m.program.emit(Se===m.program?void 0:Se,N(U,re),q,ye,re);if(Se!==m.program){const _e=Se;m.seenAffectedFiles.add(_e.resolvedPath),m.affectedFilesIndex!==void 0&&m.affectedFilesIndex++,m.buildInfoEmitPending=!0;const ve=((Y=m.seenEmittedFiles)==null?void 0:Y.get(_e.resolvedPath))||0;(m.seenEmittedFiles??(m.seenEmittedFiles=new Map)).set(_e.resolvedPath,pe|ve);const Ee=((ue=m.affectedFilesPendingEmit)==null?void 0:ue.get(_e.resolvedPath))||oe,ke=I3(Ee,pe|ve);ke?(m.affectedFilesPendingEmit??(m.affectedFilesPendingEmit=new Map)).set(_e.resolvedPath,ke):(te=m.affectedFilesPendingEmit)==null||te.delete(_e.resolvedPath),be.diagnostics.length&&(m.emitDiagnosticsPerFile??(m.emitDiagnosticsPerFile=new Map)).set(_e.resolvedPath,be.diagnostics)}else m.changedFilesSet.clear();return{result:be,affected:Se}}function N(U,q){return fg(m.compilerOptions)?(Q,re,Y,ue,te,Se)=>{var oe,pe,ye;if(xf(Q))if(m.compilerOptions.outFile){if(m.compilerOptions.composite){const _e=be(m.outSignature,void 0);if(!_e)return;m.outSignature=_e}}else{z.assert((te==null?void 0:te.length)===1);let _e;if(!q){const ve=te[0],Ee=m.fileInfos.get(ve.resolvedPath);if(Ee.signature===ve.version){const ke=Uce(m.program,ve,re,a,Se);(oe=Se==null?void 0:Se.diagnostics)!=null&&oe.length||(_e=ke),ke!==ve.version&&(a.storeSignatureInfo&&(m.signatureInfo??(m.signatureInfo=new Map)).set(ve.resolvedPath,1),m.affectedFiles&&((pe=m.oldSignatures)==null?void 0:pe.get(ve.resolvedPath))===void 0&&(m.oldSignatures??(m.oldSignatures=new Map)).set(ve.resolvedPath,Ee.signature||!1),Ee.signature=ke)}}if(m.compilerOptions.composite){const ve=te[0].resolvedPath;if(_e=be((ye=m.emitSignatures)==null?void 0:ye.get(ve),_e),!_e)return;(m.emitSignatures??(m.emitSignatures=new Map)).set(ve,_e)}}U?U(Q,re,Y,ue,te,Se):a.writeFile?a.writeFile(Q,re,Y,ue,te,Se):m.program.writeFile(Q,re,Y,ue,te,Se);function be(_e,ve){const Ee=!_e||mo(_e)?_e:_e[0];if(ve??(ve=fIe(re,a,Se)),ve===Ee){if(_e===Ee)return;Se?Se.differsOnlyInMap=!0:Se={differsOnlyInMap:!0}}else m.hasChangedEmitSignature=!0,m.latestChangedDtsFile=Q;return ve}}:U||la(a,a.writeFile)}function R(U,q,Q,re,Y){t===1&&mQe(m,U);const ue=jce(b,U,q,Q);if(ue)return ue;if(!U)if(t===1){let te=[],Se=!1,oe,pe=[],ye;for(;ye=E(q,Q,re,Y);)Se=Se||ye.result.emitSkipped,oe=un(oe,ye.result.diagnostics),pe=un(pe,ye.result.emittedFiles),te=un(te,ye.result.sourceMaps);return{emitSkipped:Se,diagnostics:oe||x,emittedFiles:pe,sourceMaps:te}}else u4t(m,re);return z.checkDefined(m.program).emit(U,N(q,Y),Q,re,Y)}function F(U,q){for(;;){const Q=vQe(m,U,a);let re;if(Q)if(Q!==m.program){const Y=Q;if((!q||!q(Y))&&(re=cIe(m,Y,U)),m.seenAffectedFiles.add(Y.resolvedPath),m.affectedFilesIndex++,m.buildInfoEmitPending=!0,!re)continue}else re=m.program.getSemanticDiagnostics(void 0,U),m.changedFilesSet.clear(),m.programEmitPending=lx(m.compilerOptions);else return;return{result:re,affected:Q}}}function j(U,q){if(mQe(m,U),z.checkDefined(m.program).getCompilerOptions().outFile)return z.assert(!m.semanticDiagnosticsPerFile),z.checkDefined(m.program).getSemanticDiagnostics(U,q);if(U)return cIe(m,U,q);for(;F(q););let re;for(const Y of z.checkDefined(m.program).getSourceFiles())re=un(re,cIe(m,Y,q));return re||x}}function $ce(t,r,a){var u,h;const p=((u=t.affectedFilesPendingEmit)==null?void 0:u.get(r))||0;(t.affectedFilesPendingEmit??(t.affectedFilesPendingEmit=new Map)).set(r,p|a),(h=t.emitDiagnosticsPerFile)==null||h.delete(r)}function hIe(t){return mo(t)?{version:t,signature:t,affectsGlobalScope:void 0,impliedFormat:void 0}:mo(t.signature)?t:{version:t.version,signature:t.signature===!1?void 0:t.version,affectsGlobalScope:t.affectsGlobalScope,impliedFormat:t.impliedFormat}}function _Ie(t,r){return Aw(t)?r:t[1]||8}function pIe(t,r){return t||lx(r||{})}function gIe(t,r,a){var u,h,p,m;const C=t.program,b=rs(bo(r,a.getCurrentDirectory())),T=Zf(a.useCaseSensitiveFileNames());let E;const N=(u=C.fileNames)==null?void 0:u.map(j);let R;const F=C.latestChangedDtsFile?U(C.latestChangedDtsFile):void 0;if(uIe(C)){const te=new Map;C.fileInfos.forEach((Se,oe)=>{const pe=q(oe+1);te.set(pe,mo(Se)?{version:Se,signature:void 0,affectsGlobalScope:void 0,impliedFormat:void 0}:Se)}),E={fileInfos:te,compilerOptions:C.options?mK(C.options,U):{},latestChangedDtsFile:F,outSignature:C.outSignature,programEmitPending:C.pendingEmit===void 0?void 0:pIe(C.pendingEmit,C.options)}}else{R=(h=C.fileIdsList)==null?void 0:h.map(ye=>new Set(ye.map(q)));const te=new Map,Se=(p=C.options)!=null&&p.composite&&!C.options.outFile?new Map:void 0;C.fileInfos.forEach((ye,be)=>{const _e=q(be+1),ve=hIe(ye);te.set(_e,ve),Se&&ve.signature&&Se.set(_e,ve.signature)}),(m=C.emitSignatures)==null||m.forEach(ye=>{if(Aw(ye))Se.delete(q(ye));else{const be=q(ye[0]);Se.set(be,!mo(ye[1])&&!ye[1].length?[Se.get(be)]:ye[1])}});const oe=new Set(Yt(C.changeFileSet,q)),pe=C.affectedFilesPendingEmit?lx(C.options||{}):void 0;E={fileInfos:te,compilerOptions:C.options?mK(C.options,U):{},referencedMap:re(C.referencedMap,C.options??{}),semanticDiagnosticsPerFile:Y(C.semanticDiagnosticsPerFile,te,oe),emitDiagnosticsPerFile:ue(C.emitDiagnosticsPerFile),hasReusableDiagnostic:!0,affectedFilesPendingEmit:C.affectedFilesPendingEmit&&P_(C.affectedFilesPendingEmit,ye=>q(Aw(ye)?ye:ye[0]),ye=>_Ie(ye,pe)),changedFilesSet:oe,latestChangedDtsFile:F,emitSignatures:Se!=null&&Se.size?Se:void 0}}return{getState:()=>E,saveEmitState:dl,restoreEmitState:dl,getProgram:pa,getProgramOrUndefined:yT,releaseProgram:dl,getCompilerOptions:()=>E.compilerOptions,getSourceFile:pa,getSourceFiles:pa,getOptionsDiagnostics:pa,getGlobalDiagnostics:pa,getConfigFileParsingDiagnostics:pa,getSyntacticDiagnostics:pa,getDeclarationDiagnostics:pa,getSemanticDiagnostics:pa,emit:pa,getAllDependencies:pa,getCurrentDirectory:pa,emitNextAffectedFile:pa,getSemanticDiagnosticsOfNextAffectedFile:pa,emitBuildInfo:pa,close:dl,hasChangedEmitSignature:kv};function j(te){return _c(te,b,T)}function U(te){return bo(te,b)}function q(te){return N[te-1]}function Q(te){return R[te-1]}function re(te,Se){const oe=X0.createReferencedMap(Se);return!oe||!te||te.forEach(([pe,ye])=>oe.set(q(pe),Q(ye))),oe}function Y(te,Se,oe){const pe=new Map(fh(Se.keys(),ye=>oe.has(ye)?void 0:[ye,x]));return te==null||te.forEach(ye=>{Aw(ye)?pe.delete(q(ye)):pe.set(q(ye[0]),ye[1])}),pe.size?pe:void 0}function ue(te){return te&&P_(te,Se=>q(Se[0]),Se=>Se[1])}}function Jce(t,r,a){const u=rs(bo(r,a.getCurrentDirectory())),h=Zf(a.useCaseSensitiveFileNames()),p=new Map;let m=0;const C=new Map,b=new Map(t.resolvedRoot);return t.fileInfos.forEach((E,N)=>{const R=_c(t.fileNames[N],u,h),F=mo(E)?E:E.version;if(p.set(R,F),mt().program,releaseProgram:()=>t().program=void 0,getCompilerOptions:()=>t().compilerOptions,getSourceFile:u=>a().getSourceFile(u),getSourceFiles:()=>a().getSourceFiles(),getOptionsDiagnostics:u=>a().getOptionsDiagnostics(u),getGlobalDiagnostics:u=>a().getGlobalDiagnostics(u),getConfigFileParsingDiagnostics:()=>r,getSyntacticDiagnostics:(u,h)=>a().getSyntacticDiagnostics(u,h),getDeclarationDiagnostics:(u,h)=>a().getDeclarationDiagnostics(u,h),getSemanticDiagnostics:(u,h)=>a().getSemanticDiagnostics(u,h),emit:(u,h,p,m,C)=>a().emit(u,h,p,m,C),emitBuildInfo:(u,h)=>a().emitBuildInfo(u,h),getAllDependencies:pa,getCurrentDirectory:()=>a().getCurrentDirectory(),close:dl};function a(){return z.checkDefined(t().program)}}function wQe(t,r,a,u,h,p){return qce(0,aQ(t,r,a,u,h,p))}function Kce(t,r,a,u,h,p){return qce(1,aQ(t,r,a,u,h,p))}function xQe(t,r,a,u,h,p){const{newProgram:m,configFileParsingDiagnostics:C}=aQ(t,r,a,u,h,p);return Gce(()=>({program:m,compilerOptions:m.getCompilerOptions()}),C)}function lQ(t){return mu(t,"/node_modules/.staging")?h6(t,"/.staging"):Rt(y$,r=>t.includes(r))?void 0:t}function mIe(t,r){if(r<=1)return 1;let a=1,u=t[0].search(/[a-zA-Z]:/)===0;if(t[0]!==Hc&&!u&&t[1].search(/[a-zA-Z]\$$/)===0){if(r===2)return 2;a=2,u=!0}return u&&!t[a].match(/^users$/i)?a:t[a].match(/^workspaces$/i)?a+1:a+2}function cQ(t,r){if(r===void 0&&(r=t.length),r<=2)return!1;const a=mIe(t,r);return r>a+1}function vIe(t){return TQe(rs(t))}function kQe(t,r){if(r.lengthh.length+1?bIe(C,m,Math.max(h.length+1,b+1),E):{dir:a,dirPath:u,nonRecursive:!0}:DQe(C,m,m.length-1,b,T,h,E)}function DQe(t,r,a,u,h,p,m){if(h!==-1)return bIe(t,r,h+1,m);let C=!0,b=a;for(let T=0;T=a&&u+2m4t(u,h,p,t,a,r,m)}}function m4t(t,r,a,u,h,p,m){const C=uQ(t),b=HP(a,u,h,C,r,p,m);if(!t.getGlobalCache)return b;const T=t.getGlobalCache();if(T!==void 0&&!Zd(a)&&!(b.resolvedModule&&mG(b.resolvedModule.extension))){const{resolvedModule:E,failedLookupLocations:N,affectingLocations:R,resolutionDiagnostics:F}=NDe(z.checkDefined(t.globalCacheResolutionModuleName)(a),t.projectName,h,C,T,r);if(E)return b.resolvedModule=E,b.failedLookupLocations=m3(b.failedLookupLocations,N),b.affectingLocations=m3(b.affectingLocations,R),b.resolutionDiagnostics=m3(b.resolutionDiagnostics,F),b}return b}function Xce(t,r,a){let u,h,p;const m=Ug(),C=new Set,b=new Set,T=new Map,E=new Map;let N=!1,R,F,j,U,q,Q=!1;const re=l_(()=>t.getCurrentDirectory()),Y=t.getCachedDirectoryStructureHost(),ue=new Map,te=y3(re(),t.getCanonicalFileName,t.getCompilationSettings()),Se=new Map,oe=TK(re(),t.getCanonicalFileName,t.getCompilationSettings(),te.getPackageJsonInfoCache(),te.optionsToRedirectsKey),pe=new Map,ye=y3(re(),t.getCanonicalFileName,Ole(t.getCompilationSettings()),te.getPackageJsonInfoCache()),be=new Map,_e=new Map,ve=SIe(r,re),Ee=t.toPath(ve),ke=Qd(Ee),Fe=new Map,Oe=new Map,fe=new Map,Ie=new Map;return{rootDirForResolution:r,resolvedModuleNames:ue,resolvedTypeReferenceDirectives:Se,resolvedLibraries:pe,resolvedFileToResolution:T,resolutionsWithFailedLookups:C,resolutionsWithOnlyAffectingLocations:b,directoryWatchesOfFailedLookups:be,fileWatchesOfAffectingLocations:_e,packageDirWatchers:Oe,dirPathToSymlinkPackageRefCount:fe,watchFailedLookupLocationsOfExternalModuleResolutions:Rn,getModuleResolutionCache:()=>te,startRecordingFilesWithChangedResolutions:Ue,finishRecordingFilesWithChangedResolutions:Ye,startCachingPerDirectoryResolution:ze,finishCachingPerDirectoryResolution:xt,resolveModuleNameLiterals:Ui,resolveTypeReferenceDirectiveReferences:Ji,resolveLibrary:bn,resolveSingleModuleNameWithoutWatching:Mi,removeResolutionsFromProjectReferenceRedirects:Ds,removeResolutionsOfFile:ha,hasChangedAutomaticTypeDirectiveNames:()=>N,invalidateResolutionOfFile:ji,invalidateResolutionsOfFailedLookupLocations:xe,setFilesWithInvalidatedNonRelativeUnresolvedImports:fl,createHasInvalidatedResolutions:nt,isFileWithInvalidatedNonRelativeUnresolvedImports:wt,updateTypeRootsWatch:kt,closeTypeRootsWatch:Je,clear:He,onChangesAffectModuleResolution:We};function Le($e){return $e.resolvedModule}function et($e){return $e.resolvedTypeReferenceDirective}function He(){tp(be,tm),tp(_e,tm),Fe.clear(),Oe.clear(),fe.clear(),m.clear(),Je(),ue.clear(),Se.clear(),T.clear(),C.clear(),b.clear(),j=void 0,U=void 0,q=void 0,F=void 0,R=void 0,Q=!1,te.clear(),oe.clear(),te.update(t.getCompilationSettings()),oe.update(t.getCompilationSettings()),ye.clear(),E.clear(),pe.clear(),N=!1}function We(){Q=!0,te.clearAllExceptPackageJsonInfoCache(),oe.clearAllExceptPackageJsonInfoCache(),te.update(t.getCompilationSettings()),oe.update(t.getCompilationSettings())}function Ue(){u=[]}function Ye(){const $e=u;return u=void 0,$e}function wt($e){if(!p)return!1;const qt=p.get($e);return!!qt&&!!qt.length}function nt($e,qt){xe();const $t=h;return h=void 0,{hasInvalidatedResolutions:ii=>$e(ii)||Q||!!($t!=null&&$t.has(ii))||wt(ii),hasInvalidatedLibResolutions:ii=>{var Gt;return qt(ii)||!!((Gt=pe==null?void 0:pe.get(ii))!=null&&Gt.isInvalidated)}}}function ze(){te.isReadonly=void 0,oe.isReadonly=void 0,ye.isReadonly=void 0,te.getPackageJsonInfoCache().isReadonly=void 0,te.clearAllExceptPackageJsonInfoCache(),oe.clearAllExceptPackageJsonInfoCache(),ye.clearAllExceptPackageJsonInfoCache(),m.forEach(Fo),m.clear(),Fe.clear()}function st($e){pe.forEach((qt,$t)=>{var ii;(ii=$e==null?void 0:$e.resolvedLibReferences)!=null&&ii.has($t)||(hn(qt,t.toPath(nQ(t.getCompilationSettings(),re(),$t)),Le),pe.delete($t))})}function xt($e,qt){p=void 0,Q=!1,m.forEach(Fo),m.clear(),$e!==qt&&(st($e),$e==null||$e.getSourceFiles().forEach($t=>{var ii;const Gt=ep($t)?((ii=$t.packageJsonLocations)==null?void 0:ii.length)??0:0,wi=E.get($t.resolvedPath)??x;for(let ce=wi.length;ceGt)for(let ce=Gt;ce{const Gt=$e==null?void 0:$e.getSourceFileByPath(ii);(!Gt||Gt.resolvedPath!==ii)&&($t.forEach(wi=>_e.get(wi).files--),E.delete(ii))})),be.forEach(ft),_e.forEach(Ht),Oe.forEach(Et),N=!1,te.isReadonly=!0,oe.isReadonly=!0,ye.isReadonly=!0,te.getPackageJsonInfoCache().isReadonly=!0,Fe.clear()}function Et($e,qt){$e.dirPathToWatcher.size===0&&Oe.delete(qt)}function ft($e,qt){$e.refCount===0&&(be.delete(qt),$e.watcher.close())}function Ht($e,qt){var $t;$e.files===0&&$e.resolutions===0&&!(($t=$e.symlinks)!=null&&$t.size)&&(_e.delete(qt),$e.watcher.close())}function Oi({entries:$e,containingFile:qt,containingSourceFile:$t,redirectedReference:ii,options:Gt,perFileCache:wi,reusedNames:ce,loader:ut,getResolutionWithResolvedFileName:Bt,deferWatchingNonRelativeResolution:le,shouldRetryResolution:je,logChanges:de}){const tt=t.toPath(qt),Ae=wi.get(tt)||wi.set(tt,v3()).get(tt),Ke=[],Qt=de&&wt(tt),ni=t.getCurrentProgram(),fi=ni&&ni.getResolvedProjectReferenceToRedirect(qt),Gi=fi?!ii||ii.sourceFile.path!==fi.sourceFile.path:!!ii,fn=v3();for(const or of $e){const rn=ut.nameAndMode.getName(or),_r=ut.nameAndMode.getMode(or,$t,(ii==null?void 0:ii.commandLine.options)||Gt);let Fs=Ae.get(rn,_r);if(!fn.has(rn,_r)&&(Q||Gi||!Fs||Fs.isInvalidated||Qt&&!Zd(rn)&&je(Fs))){const to=Fs;Fs=ut.resolve(rn,_r),t.onDiscoveredSymlink&&v4t(Fs)&&t.onDiscoveredSymlink(),Ae.set(rn,_r,Fs),Fs!==to&&(Rn(rn,Fs,tt,Bt,le),to&&hn(to,tt,Bt)),de&&u&&!kn(to,Fs)&&(u.push(tt),de=!1)}else{const to=uQ(t);if(Zb(Gt,to)&&!fn.has(rn,_r)){const Ar=Bt(Fs);lo(to,wi===ue?Ar!=null&&Ar.resolvedFileName?Ar.packageId?k.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:k.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:k.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved:Ar!=null&&Ar.resolvedFileName?Ar.packageId?k.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:k.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2:k.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved,rn,qt,Ar==null?void 0:Ar.resolvedFileName,(Ar==null?void 0:Ar.packageId)&&jw(Ar.packageId))}}z.assert(Fs!==void 0&&!Fs.isInvalidated),fn.set(rn,_r,!0),Ke.push(Fs)}return ce==null||ce.forEach(or=>fn.set(ut.nameAndMode.getName(or),ut.nameAndMode.getMode(or,$t,(ii==null?void 0:ii.commandLine.options)||Gt),!0)),Ae.size()!==fn.size()&&Ae.forEach((or,rn,_r)=>{fn.has(rn,_r)||(hn(or,tt,Bt),Ae.delete(rn,_r))}),Ke;function kn(or,rn){if(or===rn)return!0;if(!or||!rn)return!1;const _r=Bt(or),Fs=Bt(rn);return _r===Fs?!0:!_r||!Fs?!1:_r.resolvedFileName===Fs.resolvedFileName}}function Ji($e,qt,$t,ii,Gt,wi){return Oi({entries:$e,containingFile:qt,containingSourceFile:Gt,redirectedReference:$t,options:ii,reusedNames:wi,perFileCache:Se,loader:tQ(qt,$t,ii,uQ(t),oe),getResolutionWithResolvedFileName:et,shouldRetryResolution:ce=>ce.resolvedTypeReferenceDirective===void 0,deferWatchingNonRelativeResolution:!1})}function Ui($e,qt,$t,ii,Gt,wi){return Oi({entries:$e,containingFile:qt,containingSourceFile:Gt,redirectedReference:$t,options:ii,reusedNames:wi,perFileCache:ue,loader:wIe(qt,$t,ii,t,te),getResolutionWithResolvedFileName:Le,shouldRetryResolution:ce=>!ce.resolvedModule||!Q8(ce.resolvedModule.extension),logChanges:a,deferWatchingNonRelativeResolution:!0})}function bn($e,qt,$t,ii){const Gt=uQ(t);let wi=pe==null?void 0:pe.get(ii);if(!wi||wi.isInvalidated){const ce=wi;wi=DK($e,qt,$t,Gt,ye);const ut=t.toPath(qt);Rn($e,wi,ut,Le,!1),pe.set(ii,wi),ce&&hn(ce,ut,Le)}else if(Zb($t,Gt)){const ce=Le(wi);lo(Gt,ce!=null&&ce.resolvedFileName?ce.packageId?k.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:k.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:k.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved,$e,qt,ce==null?void 0:ce.resolvedFileName,(ce==null?void 0:ce.packageId)&&jw(ce.packageId))}return wi}function Mi($e,qt){var $t,ii;const Gt=t.toPath(qt),wi=ue.get(Gt),ce=wi==null?void 0:wi.get($e,void 0);if(ce&&!ce.isInvalidated)return ce;const ut=($t=t.beforeResolveSingleModuleNameWithoutWatching)==null?void 0:$t.call(t,te),Bt=uQ(t),le=HP($e,qt,t.getCompilationSettings(),Bt,te);return(ii=t.afterResolveSingleModuleNameWithoutWatching)==null||ii.call(t,te,$e,qt,le,ut),le}function Ai($e){return mu($e,"/node_modules/@types")}function Rn($e,qt,$t,ii,Gt){var wi;if(qt.refCount)qt.refCount++,z.assertIsDefined(qt.files);else{qt.refCount=1,z.assert(!((wi=qt.files)!=null&&wi.size)),!Gt||Zd($e)?Hi(qt):m.add($e,qt);const ce=ii(qt);if(ce&&ce.resolvedFileName){const ut=t.toPath(ce.resolvedFileName);let Bt=T.get(ut);Bt||T.set(ut,Bt=new Set),Bt.add(qt)}}(qt.files??(qt.files=new Set)).add($t)}function bs($e,qt){const $t=t.toPath($e),ii=Qce($e,$t,ve,Ee,ke,re);if(ii){const{dir:Gt,dirPath:wi,nonRecursive:ce,packageDir:ut,packageDirPath:Bt}=ii;wi===Ee?(z.assert(ce),z.assert(!ut),qt=!0):Ko(Gt,wi,ut,Bt,ce)}return qt}function Hi($e){z.assert(!!$e.refCount);const{failedLookupLocations:qt,affectingLocations:$t,alternateResult:ii}=$e;if(!(qt!=null&&qt.length)&&!($t!=null&&$t.length)&&!ii)return;(qt!=null&&qt.length||ii)&&C.add($e);let Gt=!1;if(qt)for(const wi of qt)Gt=bs(wi,Gt);ii&&(Gt=bs(ii,Gt)),Gt&&Ko(ve,Ee,void 0,void 0,!0),Hs($e,!(qt!=null&&qt.length)&&!ii)}function Hs($e,qt){z.assert(!!$e.refCount);const{affectingLocations:$t}=$e;if($t!=null&&$t.length){qt&&b.add($e);for(const ii of $t)Wo(ii,!0)}}function Wo($e,qt){const $t=_e.get($e);if($t){qt?$t.resolutions++:$t.files++;return}let ii=$e,Gt=!1,wi;t.realpath&&(ii=t.realpath($e),$e!==ii&&(Gt=!0,wi=_e.get(ii)));const ce=qt?1:0,ut=qt?0:1;if(!Gt||!wi){const Bt={watcher:yIe(t.toPath(ii))?t.watchAffectingFileLocation(ii,(le,je)=>{Y==null||Y.addOrDeleteFile(le,t.toPath(ii),je),ts(ii,te.getPackageJsonInfoCache().getInternalMap()),t.scheduleInvalidateResolutionsOfFailedLookupLocations()}):Z7,resolutions:Gt?0:ce,files:Gt?0:ut,symlinks:void 0};_e.set(ii,Bt),Gt&&(wi=Bt)}if(Gt){z.assert(!!wi);const Bt={watcher:{close:()=>{var le;const je=_e.get(ii);(le=je==null?void 0:je.symlinks)!=null&&le.delete($e)&&!je.symlinks.size&&!je.resolutions&&!je.files&&(_e.delete(ii),je.watcher.close())}},resolutions:ce,files:ut,symlinks:void 0};_e.set($e,Bt),(wi.symlinks??(wi.symlinks=new Set)).add($e)}}function ts($e,qt){var $t;const ii=_e.get($e);ii!=null&&ii.resolutions&&(F??(F=new Set)).add($e),ii!=null&&ii.files&&(R??(R=new Set)).add($e),($t=ii==null?void 0:ii.symlinks)==null||$t.forEach(Gt=>ts(Gt,qt)),qt==null||qt.delete(t.toPath($e))}function Fo($e,qt){const $t=t.getCurrentProgram();!$t||!$t.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(qt)?$e.forEach(Hi):$e.forEach(ii=>Hs(ii,!0))}function Cn($e,qt,$t,ii,Gt){z.assert(!Gt);let wi=Fe.get(ii),ce=Oe.get(ii);if(wi===void 0){const le=t.realpath($t);wi=le!==$t&&t.toPath(le)!==ii,Fe.set(ii,wi),ce?ce.isSymlink!==wi&&(ce.dirPathToWatcher.forEach(je=>{lr(ce.isSymlink?ii:qt,!1),je.watcher=Bt()}),ce.isSymlink=wi):Oe.set(ii,ce={dirPathToWatcher:new Map,isSymlink:wi})}else z.assertIsDefined(ce),z.assert(wi===ce.isSymlink);const ut=ce.dirPathToWatcher.get(qt);ut?ut.refCount++:(ce.dirPathToWatcher.set(qt,{watcher:Bt(),refCount:1}),wi&&fe.set(qt,(fe.get(qt)??0)+1));function Bt(){return wi?ot($t,ii,Gt):ot($e,qt,Gt)}}function Ko($e,qt,$t,ii,Gt){!ii||!t.realpath?ot($e,qt,Gt):Cn($e,qt,$t,ii,Gt)}function ot($e,qt,$t){let ii=be.get(qt);return ii?(z.assert(!!$t==!!ii.nonRecursive),ii.refCount++):be.set(qt,ii={watcher:as($e,qt,$t),refCount:1,nonRecursive:$t}),ii}function hi($e,qt,$t){const ii=t.toPath($e),Gt=Qce($e,ii,ve,Ee,ke,re);if(Gt){const{dirPath:wi,packageDirPath:ce}=Gt;if(wi===Ee)qt=!0;else if(ce&&t.realpath){const ut=Oe.get(ce),Bt=ut.dirPathToWatcher.get(wi);if(Bt.refCount--,Bt.refCount===0){if(lr(ut.isSymlink?ce:wi,$t),ut.dirPathToWatcher.delete(wi),ut.isSymlink){const le=fe.get(wi)-1;le===0?fe.delete(wi):fe.set(wi,le)}$t&&Et(ut,ce)}}else lr(wi,$t)}return qt}function hn($e,qt,$t,ii){if(z.checkDefined($e.files).delete(qt),$e.refCount--,$e.refCount)return;const Gt=$t($e);if(Gt&&Gt.resolvedFileName){const Bt=t.toPath(Gt.resolvedFileName),le=T.get(Bt);le!=null&&le.delete($e)&&!le.size&&T.delete(Bt)}const{failedLookupLocations:wi,affectingLocations:ce,alternateResult:ut}=$e;if(C.delete($e)){let Bt=!1;if(wi)for(const le of wi)Bt=hi(le,Bt,ii);ut&&(Bt=hi(ut,Bt,ii)),Bt&&lr(Ee,ii)}else ce!=null&&ce.length&&b.delete($e);if(ce)for(const Bt of ce){const le=_e.get(Bt);le.resolutions--,ii&&Ht(le,Bt)}}function lr($e,qt){const $t=be.get($e);$t.refCount--,qt&&ft($t,$e)}function as($e,qt,$t){return t.watchDirectoryOfFailedLookupLocation($e,ii=>{const Gt=t.toPath(ii);Y&&Y.addOrDeleteFileOrDirectory(ii,Gt),St(Gt,qt===Gt)},$t?0:1)}function fs($e,qt,$t,ii){const Gt=$e.get(qt);Gt&&(Gt.forEach(wi=>hn(wi,qt,$t,ii)),$e.delete(qt))}function Ds($e){if(!tu($e,".json"))return;const qt=t.getCurrentProgram();if(!qt)return;const $t=qt.getResolvedProjectReferenceByPath($e);$t&&$t.commandLine.fileNames.forEach(ii=>ha(t.toPath(ii)))}function ha($e,qt){fs(ue,$e,Le,qt),fs(Se,$e,et,qt)}function Yo($e,qt){if(!$e)return!1;let $t=!1;return $e.forEach(ii=>{if(!(ii.isInvalidated||!qt(ii))){ii.isInvalidated=$t=!0;for(const Gt of z.checkDefined(ii.files))(h??(h=new Set)).add(Gt),N=N||mu(Gt,Q7)}}),$t}function ji($e){ha($e);const qt=N;Yo(T.get($e),vk)&&N&&!qt&&t.onChangedAutomaticTypeDirectiveNames()}function fl($e){z.assert(p===$e||p===void 0),p=$e}function St($e,qt){if(qt)(q||(q=new Set)).add($e);else{const $t=lQ($e);if(!$t||($e=$t,t.fileIsOpen($e)))return!1;const ii=rs($e);if(Ai($e)||S$($e)||Ai(ii)||S$(ii))(j||(j=new Set)).add($e),(U||(U=new Set)).add($e);else{if($Ee(t.getCurrentProgram(),$e)||tu($e,".map"))return!1;(j||(j=new Set)).add($e);const Gt=OV($e,!0);Gt&&(U||(U=new Set)).add(Gt)}}t.scheduleInvalidateResolutionsOfFailedLookupLocations()}function Ot(){const $e=te.getPackageJsonInfoCache().getInternalMap();$e&&(j||U||q)&&$e.forEach((qt,$t)=>Re($t)?$e.delete($t):void 0)}function xe(){var $e;if(Q)return R=void 0,Ot(),(j||U||q||F)&&Yo(pe,Pt),j=void 0,U=void 0,q=void 0,F=void 0,!0;let qt=!1;return R&&(($e=t.getCurrentProgram())==null||$e.getSourceFiles().forEach($t=>{Rt($t.packageJsonLocations,ii=>R.has(ii))&&((h??(h=new Set)).add($t.path),qt=!0)}),R=void 0),!j&&!U&&!q&&!F||(qt=Yo(C,Pt)||qt,Ot(),j=void 0,U=void 0,q=void 0,qt=Yo(b,mt)||qt,F=void 0),qt}function Pt($e){var qt;return mt($e)?!0:!j&&!U&&!q?!1:((qt=$e.failedLookupLocations)==null?void 0:qt.some($t=>Re(t.toPath($t))))||!!$e.alternateResult&&Re(t.toPath($e.alternateResult))}function Re($e){return(j==null?void 0:j.has($e))||ee((U==null?void 0:U.keys())||[],qt=>ro($e,qt)?!0:void 0)||ee((q==null?void 0:q.keys())||[],qt=>$e.length>qt.length&&ro($e,qt)&&(qre(qt)||$e[qt.length]===Hc)?!0:void 0)}function mt($e){var qt;return!!F&&((qt=$e.affectingLocations)==null?void 0:qt.some($t=>F.has($t)))}function Je(){tp(Ie,h0)}function pt($e){return Ci($e)?t.watchTypeRootsDirectory($e,qt=>{const $t=t.toPath(qt);Y&&Y.addOrDeleteFileOrDirectory(qt,$t),N=!0,t.onChangedAutomaticTypeDirectiveNames();const ii=CIe($e,t.toPath($e),Ee,ke,re,Gt=>be.has(Gt)||fe.has(Gt));ii&&St($t,ii===$t)},1):Z7}function kt(){const $e=t.getCompilationSettings();if($e.types){Je();return}const qt=A7($e,{getCurrentDirectory:re});qt?U8(Ie,new Set(qt),{createNewValue:pt,onDeleteValue:h0}):Je()}function Ci($e){return t.getCompilationSettings().typeRoots?!0:vIe(t.toPath($e))}}function v4t(t){var r,a;return!!((r=t.resolvedModule)!=null&&r.originalPath||(a=t.resolvedTypeReferenceDirective)!=null&&a.originalPath)}var IQe=Wd?{getCurrentDirectory:()=>Wd.getCurrentDirectory(),getNewLine:()=>Wd.newLine,getCanonicalFileName:Zf(Wd.useCaseSensitiveFileNames)}:void 0;function qP(t,r){const a=t===Wd&&IQe?IQe:{getCurrentDirectory:()=>t.getCurrentDirectory(),getNewLine:()=>t.newLine,getCanonicalFileName:Zf(t.useCaseSensitiveFileNames)};if(!r)return h=>t.write(Ice(h,a));const u=new Array(1);return h=>{u[0]=h,t.write(YEe(u,a)+a.getNewLine()),u[0]=void 0}}function NQe(t,r,a){return t.clearScreen&&!a.preserveWatchOutput&&!a.extendedDiagnostics&&!a.diagnostics&&Mt(Zce,r.code)?(t.clearScreen(),!0):!1}var Zce=[k.Starting_compilation_in_watch_mode.code,k.File_change_detected_Starting_incremental_compilation.code];function y4t(t,r){return Mt(Zce,t.code)?r+r:r}function YV(t){return t.now?t.now().toLocaleTimeString("en-US",{timeZone:"UTC"}).replace(" "," "):new Date().toLocaleTimeString()}function Yce(t,r){return r?(a,u,h)=>{NQe(t,a,h);let p=`[${rD(YV(t),"\x1B[90m")}] `;p+=`${Jv(a.messageText,t.newLine)}${u+u}`,t.write(p)}:(a,u,h)=>{let p="";NQe(t,a,h)||(p+=u),p+=`${YV(t)} - `,p+=`${Jv(a.messageText,t.newLine)}${y4t(a,u)}`,t.write(p)}}function xIe(t,r,a,u,h,p){const m=h;m.onUnRecoverableConfigFileDiagnostic=b=>AQe(h,p,b);const C=EV(t,r,m,a,u);return m.onUnRecoverableConfigFileDiagnostic=void 0,C}function dQ(t){return $n(t,r=>r.category===1)}function fQ(t){return Ri(t,a=>a.category===1).map(a=>{if(a.file!==void 0)return`${a.file.fileName}`}).map(a=>{if(a===void 0)return;const u=Me(t,h=>h.file!==void 0&&h.file.fileName===a);if(u!==void 0){const{line:h}=Da(u.file,u.start);return{fileName:a,line:h+1}}})}function eue(t){return t===1?k.Found_1_error_Watching_for_file_changes:k.Found_0_errors_Watching_for_file_changes}function LQe(t,r){const a=rD(":"+t.line,"\x1B[90m");return JR(t.fileName)&&JR(r)?W0(r,t.fileName,!1)+a:t.fileName+a}function tue(t,r,a,u){if(t===0)return"";const h=r.filter(E=>E!==void 0),p=h.map(E=>`${E.fileName}:${E.line}`).filter((E,N,R)=>R.indexOf(E)===N),m=h[0]&&LQe(h[0],u.getCurrentDirectory());let C;t===1?C=r[0]!==void 0?[k.Found_1_error_in_0,m]:[k.Found_1_error]:C=p.length===0?[k.Found_0_errors,t]:p.length===1?[k.Found_0_errors_in_the_same_file_starting_at_Colon_1,t,m]:[k.Found_0_errors_in_1_files,t,p.length];const b=Gc(...C),T=p.length>1?b4t(h,u):"";return`${a}${Jv(b.messageText,a)}${a}${a}${T}`}function b4t(t,r){const a=t.filter((N,R,F)=>R===F.findIndex(j=>(j==null?void 0:j.fileName)===(N==null?void 0:N.fileName)));if(a.length===0)return"";const u=N=>Math.log(N)*Math.LOG10E+1,h=a.map(N=>[N,$n(t,R=>R.fileName===N.fileName)]),p=h.reduce((N,R)=>Math.max(N,R[1]||0),0),m=k.Errors_Files.message,C=m.split(" ")[0].length,b=Math.max(C,u(p)),T=Math.max(u(p)-C,0);let E="";return E+=" ".repeat(T)+m+` +`,h.forEach(N=>{const[R,F]=N,j=Math.log(F)*Math.LOG10E+1|0,U=j{r(u.fileName)})}function nue(t,r){var a,u;const h=t.getFileIncludeReasons(),p=m=>GR(m,t.getCurrentDirectory(),t.getCanonicalFileName);for(const m of t.getSourceFiles())r(`${N3(m,p)}`),(a=h.get(m.path))==null||a.forEach(C=>r(` ${aue(t,C,p).messageText}`)),(u=rue(m,p))==null||u.forEach(C=>r(` ${C.messageText}`))}function rue(t,r){var a;let u;if(t.path!==t.resolvedPath&&(u??(u=[])).push(Ro(void 0,k.File_is_output_of_project_reference_source_0,N3(t.originalFileName,r))),t.redirectInfo&&(u??(u=[])).push(Ro(void 0,k.File_redirects_to_file_0,N3(t.redirectInfo.redirectTarget,r))),ep(t))switch(t.impliedNodeFormat){case 99:t.packageJsonScope&&(u??(u=[])).push(Ro(void 0,k.File_is_ECMAScript_module_because_0_has_field_type_with_value_module,N3(La(t.packageJsonLocations),r)));break;case 1:t.packageJsonScope?(u??(u=[])).push(Ro(void 0,t.packageJsonScope.contents.packageJsonContent.type?k.File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module:k.File_is_CommonJS_module_because_0_does_not_have_field_type,N3(La(t.packageJsonLocations),r))):(a=t.packageJsonLocations)!=null&&a.length&&(u??(u=[])).push(Ro(void 0,k.File_is_CommonJS_module_because_package_json_was_not_found));break}return u}function sue(t,r){var a;const u=t.getCompilerOptions().configFile;if(!((a=u==null?void 0:u.configFileSpecs)!=null&&a.validatedFilesSpec))return;const h=t.getCanonicalFileName(r),p=rs(bo(u.fileName,t.getCurrentDirectory())),m=Nt(u.configFileSpecs.validatedFilesSpec,C=>t.getCanonicalFileName(bo(C,p))===h);return m!==-1?u.configFileSpecs.validatedFilesSpecBeforeSubstitution[m]:void 0}function oue(t,r){var a,u;const h=t.getCompilerOptions().configFile;if(!((a=h==null?void 0:h.configFileSpecs)!=null&&a.validatedIncludeSpecs))return;if(h.configFileSpecs.isDefaultIncludeSpec)return!0;const p=tu(r,".json"),m=rs(bo(h.fileName,t.getCurrentDirectory())),C=t.useCaseSensitiveFileNames(),b=Nt((u=h==null?void 0:h.configFileSpecs)==null?void 0:u.validatedIncludeSpecs,T=>{if(p&&!mu(T,".json"))return!1;const E=kke(T,m,"files");return!!E&&Gw(`(${E})$`,C).test(r)});return b!==-1?h.configFileSpecs.validatedIncludeSpecsBeforeSubstitution[b]:void 0}function aue(t,r,a){var u,h;const p=t.getCompilerOptions();if(t2(r)){const m=X7(t,r),C=D3(m)?m.file.text.substring(m.pos,m.end):`"${m.text}"`;let b;switch(z.assert(D3(m)||r.kind===3,"Only synthetic references are imports"),r.kind){case 3:D3(m)?b=m.packageId?k.Imported_via_0_from_file_1_with_packageId_2:k.Imported_via_0_from_file_1:m.text===Ik?b=m.packageId?k.Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions:k.Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions:b=m.packageId?k.Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions:k.Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions;break;case 4:z.assert(!m.packageId),b=k.Referenced_via_0_from_file_1;break;case 5:b=m.packageId?k.Type_library_referenced_via_0_from_file_1_with_packageId_2:k.Type_library_referenced_via_0_from_file_1;break;case 7:z.assert(!m.packageId),b=k.Library_referenced_via_0_from_file_1;break;default:z.assertNever(r)}return Ro(void 0,b,C,N3(m.file,a),m.packageId&&jw(m.packageId))}switch(r.kind){case 0:if(!((u=p.configFile)!=null&&u.configFileSpecs))return Ro(void 0,k.Root_file_specified_for_compilation);const m=bo(t.getRootFileNames()[r.index],t.getCurrentDirectory());if(sue(t,m))return Ro(void 0,k.Part_of_files_list_in_tsconfig_json);const b=oue(t,m);return mo(b)?Ro(void 0,k.Matched_by_include_pattern_0_in_1,b,N3(p.configFile,a)):Ro(void 0,b?k.Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk:k.Root_file_specified_for_compilation);case 1:case 2:const T=r.kind===2,E=z.checkDefined((h=t.getResolvedProjectReferences())==null?void 0:h[r.index]);return Ro(void 0,p.outFile?T?k.Output_from_referenced_project_0_included_because_1_specified:k.Source_from_referenced_project_0_included_because_1_specified:T?k.Output_from_referenced_project_0_included_because_module_is_specified_as_none:k.Source_from_referenced_project_0_included_because_module_is_specified_as_none,N3(E.sourceFile.fileName,a),p.outFile?"--outFile":"--out");case 8:{const N=p.types?r.packageId?[k.Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1,r.typeReference,jw(r.packageId)]:[k.Entry_point_of_type_library_0_specified_in_compilerOptions,r.typeReference]:r.packageId?[k.Entry_point_for_implicit_type_library_0_with_packageId_1,r.typeReference,jw(r.packageId)]:[k.Entry_point_for_implicit_type_library_0,r.typeReference];return Ro(void 0,...N)}case 6:{if(r.index!==void 0)return Ro(void 0,k.Library_0_specified_in_compilerOptions,p.lib[r.index]);const N=nG(il(p)),R=N?[k.Default_library_for_target_0,N]:[k.Default_library];return Ro(void 0,...R)}default:z.assertNever(r)}}function N3(t,r){const a=mo(t)?t:t.fileName;return r?r(a):a}function hQ(t,r,a,u,h,p,m,C){const b=!!t.getCompilerOptions().listFilesOnly,T=t.getConfigFileParsingDiagnostics().slice(),E=T.length;un(T,t.getSyntacticDiagnostics(void 0,p)),T.length===E&&(un(T,t.getOptionsDiagnostics(p)),b||(un(T,t.getGlobalDiagnostics(p)),T.length===E&&un(T,t.getSemanticDiagnostics(void 0,p))));const N=b?{emitSkipped:!0,diagnostics:x}:t.emit(void 0,h,p,m,C),{emittedFiles:R,diagnostics:F}=N;un(T,F);const j=v6(T);if(j.forEach(r),a){const U=t.getCurrentDirectory();W(R,q=>{const Q=bo(q,U);a(`TSFILE: ${Q}`)}),iue(t,a)}return u&&u(dQ(j),fQ(j)),{emitResult:N,diagnostics:j}}function lue(t,r,a,u,h,p,m,C){const{emitResult:b,diagnostics:T}=hQ(t,r,a,u,h,p,m,C);return b.emitSkipped&&T.length>0?1:T.length>0?2:0}var Z7={close:dl},Y7=()=>Z7;function cue(t=Wd,r){return{onWatchStatusChange:r||Yce(t),watchFile:la(t,t.watchFile)||Y7,watchDirectory:la(t,t.watchDirectory)||Y7,setTimeout:la(t,t.setTimeout)||dl,clearTimeout:la(t,t.clearTimeout)||dl}}var tf={ConfigFile:"Config file",ExtendedConfigFile:"Extended config file",SourceFile:"Source file",MissingFile:"Missing file",WildcardDirectory:"Wild card directory",FailedLookupLocations:"Failed Lookup Locations",AffectingFileLocation:"File location affecting resolution",TypeRoots:"Type roots",ConfigFileOfReferencedProject:"Config file of referened project",ExtendedConfigOfReferencedProject:"Extended config file of referenced project",WildcardDirectoryOfReferencedProject:"Wild card directory of referenced project",PackageJson:"package.json file",ClosedScriptInfo:"Closed Script info",ConfigFileForInferredRoot:"Config file for the inferred project root",NodeModules:"node_modules for closed script infos and package.jsons affecting module specifier cache",MissingSourceMapFile:"Missing source map file",NoopConfigFileForInferredRoot:"Noop Config file for the inferred project root",MissingGeneratedFile:"Missing generated file",NodeModulesForModuleSpecifierCache:"node_modules for module specifier cache invalidation",TypingInstallerLocationFile:"File location for typing installer",TypingInstallerLocationDirectory:"Directory location for typing installer"};function uue(t,r){const a=t.trace?r.extendedDiagnostics?2:r.diagnostics?1:0:0,u=a!==0?p=>t.trace(p):dl,h=xce(t,a,u);return h.writeLog=u,h}function due(t,r,a=t){const u=t.useCaseSensitiveFileNames(),h={getSourceFile:Dce((p,m)=>m?t.readFile(p,m):h.readFile(p),void 0),getDefaultLibLocation:la(t,t.getDefaultLibLocation),getDefaultLibFileName:p=>t.getDefaultLibFileName(p),writeFile:Ece((p,m,C)=>t.writeFile(p,m,C),p=>t.createDirectory(p),p=>t.directoryExists(p)),getCurrentDirectory:l_(()=>t.getCurrentDirectory()),useCaseSensitiveFileNames:()=>u,getCanonicalFileName:Zf(u),getNewLine:()=>fS(r()),fileExists:p=>t.fileExists(p),readFile:p=>t.readFile(p),trace:la(t,t.trace),directoryExists:la(a,a.directoryExists),getDirectories:la(a,a.getDirectories),realpath:la(t,t.realpath),getEnvironmentVariable:la(t,t.getEnvironmentVariable)||(()=>""),createHash:la(t,t.createHash),readDirectory:la(t,t.readDirectory),storeSignatureInfo:t.storeSignatureInfo,jsDocParsingMode:t.jsDocParsingMode};return h}function _Q(t,r){if(r.match($De)){let a=r.length,u=a;for(let h=a-1;h>=0;h--){const p=r.charCodeAt(h);switch(p){case 10:h&&r.charCodeAt(h-1)===13&&h--;case 13:break;default:if(p<127||!_h(p)){u=h;continue}break}const m=r.substring(u,a);if(m.match(Zle)){r=r.substring(0,u);break}else if(!m.match(Yle))break;a=u}}return(t.createHash||$R)(r)}function pQ(t){const r=t.getSourceFile;t.getSourceFile=(...a)=>{const u=r.call(t,...a);return u&&(u.version=_Q(t,u.text)),u}}function fue(t,r){const a=l_(()=>rs(ra(t.getExecutingFilePath())));return{useCaseSensitiveFileNames:()=>t.useCaseSensitiveFileNames,getNewLine:()=>t.newLine,getCurrentDirectory:l_(()=>t.getCurrentDirectory()),getDefaultLibLocation:a,getDefaultLibFileName:u=>Hr(a(),EB(u)),fileExists:u=>t.fileExists(u),readFile:(u,h)=>t.readFile(u,h),directoryExists:u=>t.directoryExists(u),getDirectories:u=>t.getDirectories(u),readDirectory:(u,h,p,m,C)=>t.readDirectory(u,h,p,m,C),realpath:la(t,t.realpath),getEnvironmentVariable:la(t,t.getEnvironmentVariable),trace:u=>t.write(u+t.newLine),createDirectory:u=>t.createDirectory(u),writeFile:(u,h,p)=>t.writeFile(u,h,p),createHash:la(t,t.createHash),createProgram:r||Kce,storeSignatureInfo:t.storeSignatureInfo,now:la(t,t.now)}}function PQe(t=Wd,r,a,u){const h=m=>t.write(m+t.newLine),p=fue(t,r);return dre(p,cue(t,u)),p.afterProgramCreate=m=>{const C=m.getCompilerOptions(),b=fS(C);hQ(m,a,h,T=>p.onWatchStatusChange(Gc(eue(T),T),b,C,T))},p}function AQe(t,r,a){r(a),t.exit(1)}function hue({configFileName:t,optionsToExtend:r,watchOptionsToExtend:a,extraFileExtensions:u,system:h,createProgram:p,reportDiagnostic:m,reportWatchStatus:C}){const b=m||qP(h),T=PQe(h,p,b,C);return T.onUnRecoverableConfigFileDiagnostic=E=>AQe(h,b,E),T.configFileName=t,T.optionsToExtend=r,T.watchOptionsToExtend=a,T.extraFileExtensions=u,T}function _ue({rootFiles:t,options:r,watchOptions:a,projectReferences:u,system:h,createProgram:p,reportDiagnostic:m,reportWatchStatus:C}){const b=PQe(h,p,m||qP(h),C);return b.rootFiles=t,b.options=r,b.watchOptions=a,b.projectReferences=u,b}function TIe(t){const r=t.system||Wd,a=t.host||(t.host=mQ(t.options,r)),u=DIe(t),h=lue(u,t.reportDiagnostic||qP(r),p=>a.trace&&a.trace(p),t.reportErrorSummary||t.options.pretty?(p,m)=>r.write(tue(p,m,r.newLine,a)):void 0);return t.afterProgramEmitAndDiagnostics&&t.afterProgramEmitAndDiagnostics(u),h}function gQ(t,r){const a=yS(t);if(!a)return;let u;if(r.getBuildInfo)u=r.getBuildInfo(a,t.configFilePath);else{const h=r.readFile(a);if(!h)return;u=Cce(a,h)}if(!(!u||u.version!==y||!u.program))return gIe(u,a,r)}function mQ(t,r=Wd){const a=eQ(t,void 0,r);return a.createHash=la(r,r.createHash),a.storeSignatureInfo=r.storeSignatureInfo,pQ(a),K7(a,u=>_c(u,a.getCurrentDirectory(),a.getCanonicalFileName)),a}function DIe({rootNames:t,options:r,configFileParsingDiagnostics:a,projectReferences:u,host:h,createProgram:p}){h=h||mQ(r),p=p||Kce;const m=gQ(r,h);return p(t,r,h,m,a,u)}function OQe(t,r,a,u,h,p,m,C){return Lo(t)?_ue({rootFiles:t,options:r,watchOptions:C,projectReferences:m,system:a,createProgram:u,reportDiagnostic:h,reportWatchStatus:p}):hue({configFileName:t,optionsToExtend:r,watchOptionsToExtend:m,extraFileExtensions:C,system:a,createProgram:u,reportDiagnostic:h,reportWatchStatus:p})}function pue(t){let r,a,u,h,p,m,C,b,T=t.extendedConfigCache,E=!1;const N=new Map;let R,F=!1;const j=t.useCaseSensitiveFileNames(),U=t.getCurrentDirectory(),{configFileName:q,optionsToExtend:Q={},watchOptionsToExtend:re,extraFileExtensions:Y,createProgram:ue}=t;let{rootFiles:te,options:Se,watchOptions:oe,projectReferences:pe}=t,ye,be,_e=!1,ve=!1;const Ee=q===void 0?void 0:XK(t,U,j),ke=Ee||t,Fe=oQ(t,ke);let Oe=Ui();q&&t.configFileParsingResult&&(Yo(t.configFileParsingResult),Oe=Ui()),ts(k.Starting_compilation_in_watch_mode),q&&!t.configFileParsingResult&&(Oe=fS(Q),z.assert(!te),ha(),Oe=Ui()),z.assert(Se),z.assert(te);const{watchFile:fe,watchDirectory:Ie,writeLog:Le}=uue(t,Se),et=Zf(j);Le(`Current directory: ${U} CaseSensitiveFileNames: ${j}`);let He;q&&(He=fe(q,hn,2e3,oe,tf.ConfigFile));const We=due(t,()=>Se,ke);pQ(We);const Ue=We.getSourceFile;We.getSourceFile=($e,...qt)=>bs($e,bn($e),...qt),We.getSourceFileByPath=bs,We.getNewLine=()=>Oe,We.fileExists=Rn,We.onReleaseOldSourceFile=Wo,We.onReleaseParsedCommandLine=St,We.toPath=bn,We.getCompilationSettings=()=>Se,We.useSourceOfProjectReferenceRedirect=la(t,t.useSourceOfProjectReferenceRedirect),We.watchDirectoryOfFailedLookupLocation=($e,qt,$t)=>Ie($e,qt,$t,oe,tf.FailedLookupLocations),We.watchAffectingFileLocation=($e,qt)=>fe($e,qt,2e3,oe,tf.AffectingFileLocation),We.watchTypeRootsDirectory=($e,qt,$t)=>Ie($e,qt,$t,oe,tf.TypeRoots),We.getCachedDirectoryStructureHost=()=>Ee,We.scheduleInvalidateResolutionsOfFailedLookupLocations=Ko,We.onInvalidatedResolution=hi,We.onChangedAutomaticTypeDirectiveNames=hi,We.fileIsOpen=kv,We.getCurrentProgram=ft,We.writeLog=Le,We.getParsedCommandLine=ji;const Ye=Xce(We,q?rs(bo(q,U)):U,!1);We.resolveModuleNameLiterals=la(t,t.resolveModuleNameLiterals),We.resolveModuleNames=la(t,t.resolveModuleNames),!We.resolveModuleNameLiterals&&!We.resolveModuleNames&&(We.resolveModuleNameLiterals=Ye.resolveModuleNameLiterals.bind(Ye)),We.resolveTypeReferenceDirectiveReferences=la(t,t.resolveTypeReferenceDirectiveReferences),We.resolveTypeReferenceDirectives=la(t,t.resolveTypeReferenceDirectives),!We.resolveTypeReferenceDirectiveReferences&&!We.resolveTypeReferenceDirectives&&(We.resolveTypeReferenceDirectiveReferences=Ye.resolveTypeReferenceDirectiveReferences.bind(Ye)),We.resolveLibrary=t.resolveLibrary?t.resolveLibrary.bind(t):Ye.resolveLibrary.bind(Ye),We.getModuleResolutionCache=t.resolveModuleNameLiterals||t.resolveModuleNames?la(t,t.getModuleResolutionCache):()=>Ye.getModuleResolutionCache();const nt=!!t.resolveModuleNameLiterals||!!t.resolveTypeReferenceDirectiveReferences||!!t.resolveModuleNames||!!t.resolveTypeReferenceDirectives?la(t,t.hasInvalidatedResolutions)||vk:kv,ze=t.resolveLibrary?la(t,t.hasInvalidatedLibResolutions)||vk:kv;return r=gQ(Se,We),Ht(),Je(),q&&kt(bn(q),Se,oe,tf.ExtendedConfigFile),q?{getCurrentProgram:Et,getProgram:as,close:st,getResolutionCache:xt}:{getCurrentProgram:Et,getProgram:as,updateRootFileNames:Ji,close:st,getResolutionCache:xt};function st(){Cn(),Ye.clear(),tp(N,$e=>{$e&&$e.fileWatcher&&($e.fileWatcher.close(),$e.fileWatcher=void 0)}),He&&(He.close(),He=void 0),T==null||T.clear(),T=void 0,b&&(tp(b,tm),b=void 0),h&&(tp(h,tm),h=void 0),u&&(tp(u,h0),u=void 0),C&&(tp(C,$e=>{var qt;(qt=$e.watcher)==null||qt.close(),$e.watcher=void 0,$e.watchedDirectories&&tp($e.watchedDirectories,tm),$e.watchedDirectories=void 0}),C=void 0),r=void 0}function xt(){return Ye}function Et(){return r}function ft(){return r&&r.getProgramOrUndefined()}function Ht(){Le("Synchronizing program"),z.assert(Se),z.assert(te),Cn();const $e=Et();F&&(Oe=Ui(),$e&&G$($e.getCompilerOptions(),Se)&&Ye.onChangesAffectModuleResolution());const{hasInvalidatedResolutions:qt,hasInvalidatedLibResolutions:$t}=Ye.createHasInvalidatedResolutions(nt,ze),{originalReadFile:ii,originalFileExists:Gt,originalDirectoryExists:wi,originalCreateDirectory:ce,originalWriteFile:ut,readFileWithCache:Bt}=K7(We,bn);return Wce(ft(),te,Se,le=>Hs(le,Bt),le=>We.fileExists(le),qt,$t,Fo,ji,pe)?ve&&(E&&ts(k.File_change_detected_Starting_incremental_compilation),r=ue(void 0,void 0,We,r,be,pe),ve=!1):(E&&ts(k.File_change_detected_Starting_incremental_compilation),Oi(qt,$t)),E=!1,t.afterProgramCreate&&$e!==r&&t.afterProgramCreate(r),We.readFile=ii,We.fileExists=Gt,We.directoryExists=wi,We.createDirectory=ce,We.writeFile=ut,r}function Oi($e,qt){Le("CreatingProgramWith::"),Le(` roots: ${JSON.stringify(te)}`),Le(` options: ${JSON.stringify(Se)}`),pe&&Le(` projectReferences: ${JSON.stringify(pe)}`);const $t=F||!ft();F=!1,ve=!1,Ye.startCachingPerDirectoryResolution(),We.hasInvalidatedResolutions=$e,We.hasInvalidatedLibResolutions=qt,We.hasChangedAutomaticTypeDirectiveNames=Fo;const ii=ft();if(r=ue(te,Se,We,r,be,pe),Ye.finishCachingPerDirectoryResolution(r.getProgram(),ii),wce(r.getProgram(),u||(u=new Map),Re),$t&&Ye.updateTypeRootsWatch(),R){for(const Gt of R)u.has(Gt)||N.delete(Gt);R=void 0}}function Ji($e){z.assert(!q,"Cannot update root file names with config file watch mode"),te=$e,hi()}function Ui(){return fS(Se||Q)}function bn($e){return _c($e,U,et)}function Mi($e){return typeof $e=="boolean"}function Ai($e){return typeof $e.version=="boolean"}function Rn($e){const qt=bn($e);return Mi(N.get(qt))?!1:ke.fileExists($e)}function bs($e,qt,$t,ii,Gt){const wi=N.get(qt);if(Mi(wi))return;const ce=typeof $t=="object"?$t.impliedNodeFormat:void 0;if(wi===void 0||Gt||Ai(wi)||wi.sourceFile.impliedNodeFormat!==ce){const ut=Ue($e,$t,ii);if(wi)ut?(wi.sourceFile=ut,wi.version=ut.version,wi.fileWatcher||(wi.fileWatcher=Ot(qt,$e,xe,250,oe,tf.SourceFile))):(wi.fileWatcher&&wi.fileWatcher.close(),N.set(qt,!1));else if(ut){const Bt=Ot(qt,$e,xe,250,oe,tf.SourceFile);N.set(qt,{sourceFile:ut,version:ut.version,fileWatcher:Bt})}else N.set(qt,!1);return ut}return wi.sourceFile}function Hi($e){const qt=N.get($e);qt!==void 0&&(Mi(qt)?N.set($e,{version:!1}):qt.version=!1)}function Hs($e,qt){const $t=N.get($e);if(!$t)return;if($t.version)return $t.version;const ii=qt($e);return ii!==void 0?_Q(We,ii):void 0}function Wo($e,qt,$t){const ii=N.get($e.resolvedPath);ii!==void 0&&(Mi(ii)?(R||(R=[])).push($e.path):ii.sourceFile===$e&&(ii.fileWatcher&&ii.fileWatcher.close(),N.delete($e.resolvedPath),$t||Ye.removeResolutionsOfFile($e.path)))}function ts($e){t.onWatchStatusChange&&t.onWatchStatusChange(Gc($e),Oe,Se||Q)}function Fo(){return Ye.hasChangedAutomaticTypeDirectiveNames()}function Cn(){return m?(t.clearTimeout(m),m=void 0,!0):!1}function Ko(){if(!t.setTimeout||!t.clearTimeout)return Ye.invalidateResolutionsOfFailedLookupLocations();const $e=Cn();Le(`Scheduling invalidateFailedLookup${$e?", Cancelled earlier one":""}`),m=t.setTimeout(ot,250,"timerToInvalidateFailedLookupResolutions")}function ot(){m=void 0,Ye.invalidateResolutionsOfFailedLookupLocations()&&hi()}function hi(){!t.setTimeout||!t.clearTimeout||(p&&t.clearTimeout(p),Le("Scheduling update"),p=t.setTimeout(lr,250,"timerToUpdateProgram"))}function hn(){z.assert(!!q),a=2,hi()}function lr(){p=void 0,E=!0,as()}function as(){var $e,qt,$t,ii;switch(a){case 1:($e=c_)==null||$e.logStartUpdateProgram("PartialConfigReload"),fs();break;case 2:(qt=c_)==null||qt.logStartUpdateProgram("FullConfigReload"),Ds();break;default:($t=c_)==null||$t.logStartUpdateProgram("SynchronizeProgram"),Ht();break}return(ii=c_)==null||ii.logStopUpdateProgram("Done"),Et()}function fs(){Le("Reloading new file names and options"),z.assert(Se),z.assert(q),a=0,te=L7(Se.configFile.configFileSpecs,bo(rs(q),U),Se,Fe,Y),bK(te,bo(q,U),Se.configFile.configFileSpecs,be,_e)&&(ve=!0),Ht()}function Ds(){z.assert(q),Le(`Reloading config file: ${q}`),a=0,Ee&&Ee.clearCache(),ha(),F=!0,Ht(),Je(),kt(bn(q),Se,oe,tf.ExtendedConfigFile)}function ha(){z.assert(q),Yo(EV(q,Q,Fe,T||(T=new Map),re,Y))}function Yo($e){te=$e.fileNames,Se=$e.options,oe=$e.watchOptions,pe=$e.projectReferences,ye=$e.wildcardDirectories,be=sD($e).slice(),_e=N7($e.raw),ve=!0}function ji($e){const qt=bn($e);let $t=C==null?void 0:C.get(qt);if($t){if(!$t.updateLevel)return $t.parsedCommandLine;if($t.parsedCommandLine&&$t.updateLevel===1&&!t.getParsedCommandLine){Le("Reloading new file names and options"),z.assert(Se);const Gt=L7($t.parsedCommandLine.options.configFile.configFileSpecs,bo(rs($e),U),Se,Fe);return $t.parsedCommandLine={...$t.parsedCommandLine,fileNames:Gt},$t.updateLevel=void 0,$t.parsedCommandLine}}Le(`Loading config file: ${$e}`);const ii=t.getParsedCommandLine?t.getParsedCommandLine($e):fl($e);return $t?($t.parsedCommandLine=ii,$t.updateLevel=void 0):(C||(C=new Map)).set(qt,$t={parsedCommandLine:ii}),Ci($e,qt,$t),ii}function fl($e){const qt=Fe.onUnRecoverableConfigFileDiagnostic;Fe.onUnRecoverableConfigFileDiagnostic=dl;const $t=EV($e,void 0,Fe,T||(T=new Map),re);return Fe.onUnRecoverableConfigFileDiagnostic=qt,$t}function St($e){var qt;const $t=bn($e),ii=C==null?void 0:C.get($t);ii&&(C.delete($t),ii.watchedDirectories&&tp(ii.watchedDirectories,tm),(qt=ii.watcher)==null||qt.close(),Sce($t,b))}function Ot($e,qt,$t,ii,Gt,wi){return fe(qt,(ce,ut)=>$t(ce,ut,$e),ii,Gt,wi)}function xe($e,qt,$t){Pt($e,$t,qt),qt===2&&N.has($t)&&Ye.invalidateResolutionOfFile($t),Hi($t),hi()}function Pt($e,qt,$t){Ee&&Ee.addOrDeleteFile($e,qt,$t)}function Re($e,qt){return C!=null&&C.has($e)?Z7:Ot($e,qt,mt,500,oe,tf.MissingFile)}function mt($e,qt,$t){Pt($e,$t,qt),qt===0&&u.has($t)&&(u.get($t).close(),u.delete($t),Hi($t),hi())}function Je(){qV(h||(h=new Map),ye,pt)}function pt($e,qt){return Ie($e,$t=>{z.assert(q),z.assert(Se);const ii=bn($t);Ee&&Ee.addOrDeleteFileOrDirectory($t,ii),Hi(ii),!$V({watchedDirPath:bn($e),fileOrDirectory:$t,fileOrDirectoryPath:ii,configFileName:q,extraFileExtensions:Y,options:Se,program:Et()||te,currentDirectory:U,useCaseSensitiveFileNames:j,writeLog:Le,toPath:bn})&&a!==2&&(a=1,hi())},qt,oe,tf.WildcardDirectory)}function kt($e,qt,$t,ii){ZK($e,qt,b||(b=new Map),(Gt,wi)=>fe(Gt,(ce,ut)=>{var Bt;Pt(Gt,wi,ut),T&&YK(T,wi,bn);const le=(Bt=b.get(wi))==null?void 0:Bt.projects;le!=null&&le.size&&le.forEach(je=>{if(q&&bn(q)===je)a=2;else{const de=C==null?void 0:C.get(je);de&&(de.updateLevel=2),Ye.removeResolutionsFromProjectReferenceRedirects(je)}hi()})},2e3,$t,ii),bn)}function Ci($e,qt,$t){var ii,Gt,wi,ce;$t.watcher||($t.watcher=fe($e,(ut,Bt)=>{Pt($e,qt,Bt);const le=C==null?void 0:C.get(qt);le&&(le.updateLevel=2),Ye.removeResolutionsFromProjectReferenceRedirects(qt),hi()},2e3,((ii=$t.parsedCommandLine)==null?void 0:ii.watchOptions)||oe,tf.ConfigFileOfReferencedProject)),qV($t.watchedDirectories||($t.watchedDirectories=new Map),(Gt=$t.parsedCommandLine)==null?void 0:Gt.wildcardDirectories,(ut,Bt)=>{var le;return Ie(ut,je=>{const de=bn(je);Ee&&Ee.addOrDeleteFileOrDirectory(je,de),Hi(de);const tt=C==null?void 0:C.get(qt);tt!=null&&tt.parsedCommandLine&&($V({watchedDirPath:bn(ut),fileOrDirectory:je,fileOrDirectoryPath:de,configFileName:$e,options:tt.parsedCommandLine.options,program:tt.parsedCommandLine.fileNames,currentDirectory:U,useCaseSensitiveFileNames:j,writeLog:Le,toPath:bn})||tt.updateLevel!==2&&(tt.updateLevel=1,hi()))},Bt,((le=$t.parsedCommandLine)==null?void 0:le.watchOptions)||oe,tf.WildcardDirectoryOfReferencedProject)}),kt(qt,(wi=$t.parsedCommandLine)==null?void 0:wi.options,((ce=$t.parsedCommandLine)==null?void 0:ce.watchOptions)||oe,tf.ExtendedConfigOfReferencedProject)}}var EIe=(t=>(t[t.Unbuildable=0]="Unbuildable",t[t.UpToDate=1]="UpToDate",t[t.UpToDateWithUpstreamTypes=2]="UpToDateWithUpstreamTypes",t[t.OutputMissing=3]="OutputMissing",t[t.ErrorReadingFile=4]="ErrorReadingFile",t[t.OutOfDateWithSelf=5]="OutOfDateWithSelf",t[t.OutOfDateWithUpstream=6]="OutOfDateWithUpstream",t[t.OutOfDateBuildInfo=7]="OutOfDateBuildInfo",t[t.OutOfDateOptions=8]="OutOfDateOptions",t[t.OutOfDateRoots=9]="OutOfDateRoots",t[t.UpstreamOutOfDate=10]="UpstreamOutOfDate",t[t.UpstreamBlocked=11]="UpstreamBlocked",t[t.ComputingUpstream=12]="ComputingUpstream",t[t.TsVersionOutputOfDate=13]="TsVersionOutputOfDate",t[t.UpToDateWithInputFileText=14]="UpToDateWithInputFileText",t[t.ContainerOnly=15]="ContainerOnly",t[t.ForceBuild=16]="ForceBuild",t))(EIe||{});function gue(t){return tu(t,".json")?t:Hr(t,"tsconfig.json")}var C4t=new Date(-864e13),S4t=new Date(864e13);function w4t(t,r,a){const u=t.get(r);let h;return u||(h=a(),t.set(r,h)),u||h}function IIe(t,r){return w4t(t,r,()=>new Map)}function eH(t){return t.now?t.now():new Date}function $P(t){return!!t&&!!t.buildOrder}function tH(t){return $P(t)?t.buildOrder:t}function vQ(t,r){return a=>{let u=r?`[${rD(YV(t),"\x1B[90m")}] `:`${YV(t)} - `;u+=`${Jv(a.messageText,t.newLine)}${t.newLine+t.newLine}`,t.write(u)}}function MQe(t,r,a,u){const h=fue(t,r);return h.getModifiedTime=t.getModifiedTime?p=>t.getModifiedTime(p):yT,h.setModifiedTime=t.setModifiedTime?(p,m)=>t.setModifiedTime(p,m):dl,h.deleteFile=t.deleteFile?p=>t.deleteFile(p):dl,h.reportDiagnostic=a||qP(t),h.reportSolutionBuilderStatus=u||vQ(t),h.now=la(t,t.now),h}function NIe(t=Wd,r,a,u,h){const p=MQe(t,r,a,u);return p.reportErrorSummary=h,p}function LIe(t=Wd,r,a,u,h){const p=MQe(t,r,a,u),m=cue(t,h);return dre(p,m),p}function x4t(t){const r={};return cK.forEach(a=>{Vl(t,a.name)&&(r[a.name]=t[a.name])}),r}function PIe(t,r,a){return rXe(!1,t,r,a)}function AIe(t,r,a,u){return rXe(!0,t,r,a,u)}function k4t(t,r,a,u,h){const p=r,m=r,C=x4t(u),b=due(p,()=>U.projectCompilerOptions);pQ(b),b.getParsedCommandLine=q=>L3(U,q,U1(U,q)),b.resolveModuleNameLiterals=la(p,p.resolveModuleNameLiterals),b.resolveTypeReferenceDirectiveReferences=la(p,p.resolveTypeReferenceDirectiveReferences),b.resolveLibrary=la(p,p.resolveLibrary),b.resolveModuleNames=la(p,p.resolveModuleNames),b.resolveTypeReferenceDirectives=la(p,p.resolveTypeReferenceDirectives),b.getModuleResolutionCache=la(p,p.getModuleResolutionCache);let T,E;!b.resolveModuleNameLiterals&&!b.resolveModuleNames&&(T=y3(b.getCurrentDirectory(),b.getCanonicalFileName),b.resolveModuleNameLiterals=(q,Q,re,Y,ue)=>KV(q,Q,re,Y,ue,p,T,Mce),b.getModuleResolutionCache=()=>T),!b.resolveTypeReferenceDirectiveReferences&&!b.resolveTypeReferenceDirectives&&(E=TK(b.getCurrentDirectory(),b.getCanonicalFileName,void 0,T==null?void 0:T.getPackageJsonInfoCache(),T==null?void 0:T.optionsToRedirectsKey),b.resolveTypeReferenceDirectiveReferences=(q,Q,re,Y,ue)=>KV(q,Q,re,Y,ue,p,E,tQ));let N;b.resolveLibrary||(N=y3(b.getCurrentDirectory(),b.getCanonicalFileName,void 0,T==null?void 0:T.getPackageJsonInfoCache()),b.resolveLibrary=(q,Q,re)=>DK(q,Q,re,p,N)),b.getBuildInfo=(q,Q)=>KQe(U,q,U1(U,Q),void 0);const{watchFile:R,watchDirectory:F,writeLog:j}=uue(m,u),U={host:p,hostWithWatch:m,parseConfigFileHost:oQ(p),write:la(p,p.trace),options:u,baseCompilerOptions:C,rootNames:a,baseWatchOptions:h,resolvedConfigFilePaths:new Map,configFileCache:new Map,projectStatus:new Map,extendedConfigCache:new Map,buildInfoCache:new Map,outputTimeStamps:new Map,builderPrograms:new Map,diagnostics:new Map,projectPendingBuild:new Map,projectErrorsReported:new Map,compilerHost:b,moduleResolutionCache:T,typeReferenceDirectiveResolutionCache:E,libraryResolutionCache:N,buildOrder:void 0,readFileWithCache:q=>p.readFile(q),projectCompilerOptions:C,cache:void 0,allProjectBuildPending:!0,needsSummary:!0,watchAllProjectsPending:t,watch:t,allWatchedWildcardDirectories:new Map,allWatchedInputFiles:new Map,allWatchedConfigFiles:new Map,allWatchedExtendedConfigFiles:new Map,allWatchedPackageJsonFiles:new Map,filesWatched:new Map,lastCachedPackageJsonLookups:new Map,timerToBuildInvalidatedProject:void 0,reportFileChangeDetected:!1,watchFile:R,watchDirectory:F,writeLog:j};return U}function p0(t,r){return _c(r,t.compilerHost.getCurrentDirectory(),t.compilerHost.getCanonicalFileName)}function U1(t,r){const{resolvedConfigFilePaths:a}=t,u=a.get(r);if(u!==void 0)return u;const h=p0(t,r);return a.set(r,h),h}function RQe(t){return!!t.options}function T4t(t,r){const a=t.configFileCache.get(r);return a&&RQe(a)?a:void 0}function L3(t,r,a){const{configFileCache:u}=t,h=u.get(a);if(h)return RQe(h)?h:void 0;cu("SolutionBuilder::beforeConfigFileParsing");let p;const{parseConfigFileHost:m,baseCompilerOptions:C,baseWatchOptions:b,extendedConfigCache:T,host:E}=t;let N;return E.getParsedCommandLine?(N=E.getParsedCommandLine(r),N||(p=Gc(k.File_0_not_found,r))):(m.onUnRecoverableConfigFileDiagnostic=R=>p=R,N=EV(r,C,m,T,b),m.onUnRecoverableConfigFileDiagnostic=dl),u.set(a,N||p),cu("SolutionBuilder::afterConfigFileParsing"),qg("SolutionBuilder::Config file parsing","SolutionBuilder::beforeConfigFileParsing","SolutionBuilder::afterConfigFileParsing"),N}function iH(t,r){return gue(Ck(t.compilerHost.getCurrentDirectory(),r))}function FQe(t,r){const a=new Map,u=new Map,h=[];let p,m;for(const b of r)C(b);return m?{buildOrder:p||x,circularDiagnostics:m}:p||x;function C(b,T){const E=U1(t,b);if(u.has(E))return;if(a.has(E)){T||(m||(m=[])).push(Gc(k.Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0,h.join(`\r +`)));return}a.set(E,!0),h.push(b);const N=L3(t,b,E);if(N&&N.projectReferences)for(const R of N.projectReferences){const F=iH(t,R.path);C(F,T||R.circular)}h.pop(),u.set(E,!0),(p||(p=[])).push(b)}}function yQ(t){return t.buildOrder||D4t(t)}function D4t(t){const r=FQe(t,t.rootNames.map(h=>iH(t,h)));t.resolvedConfigFilePaths.clear();const a=new Set(tH(r).map(h=>U1(t,h))),u={onDeleteValue:dl};return Ky(t.configFileCache,a,u),Ky(t.projectStatus,a,u),Ky(t.builderPrograms,a,u),Ky(t.diagnostics,a,u),Ky(t.projectPendingBuild,a,u),Ky(t.projectErrorsReported,a,u),Ky(t.buildInfoCache,a,u),Ky(t.outputTimeStamps,a,u),Ky(t.lastCachedPackageJsonLookups,a,u),t.watch&&(Ky(t.allWatchedConfigFiles,a,{onDeleteValue:h0}),t.allWatchedExtendedConfigFiles.forEach(h=>{h.projects.forEach(p=>{a.has(p)||h.projects.delete(p)}),h.close()}),Ky(t.allWatchedWildcardDirectories,a,{onDeleteValue:h=>h.forEach(tm)}),Ky(t.allWatchedInputFiles,a,{onDeleteValue:h=>h.forEach(h0)}),Ky(t.allWatchedPackageJsonFiles,a,{onDeleteValue:h=>h.forEach(h0)})),t.buildOrder=r}function BQe(t,r,a){const u=r&&iH(t,r),h=yQ(t);if($P(h))return h;if(u){const m=U1(t,u);if(Nt(h,b=>U1(t,b)===m)===-1)return}const p=u?FQe(t,[u]):h;return z.assert(!$P(p)),z.assert(!a||u!==void 0),z.assert(!a||p[p.length-1]===u),a?p.slice(0,p.length-1):p}function WQe(t){t.cache&&OIe(t);const{compilerHost:r,host:a}=t,u=t.readFileWithCache,h=r.getSourceFile,{originalReadFile:p,originalFileExists:m,originalDirectoryExists:C,originalCreateDirectory:b,originalWriteFile:T,getSourceFileWithCache:E,readFileWithCache:N}=K7(a,R=>p0(t,R),(...R)=>h.call(r,...R));t.readFileWithCache=N,r.getSourceFile=E,t.cache={originalReadFile:p,originalFileExists:m,originalDirectoryExists:C,originalCreateDirectory:b,originalWriteFile:T,originalReadFileWithCache:u,originalGetSourceFile:h}}function OIe(t){if(!t.cache)return;const{cache:r,host:a,compilerHost:u,extendedConfigCache:h,moduleResolutionCache:p,typeReferenceDirectiveResolutionCache:m,libraryResolutionCache:C}=t;a.readFile=r.originalReadFile,a.fileExists=r.originalFileExists,a.directoryExists=r.originalDirectoryExists,a.createDirectory=r.originalCreateDirectory,a.writeFile=r.originalWriteFile,u.getSourceFile=r.originalGetSourceFile,t.readFileWithCache=r.originalReadFileWithCache,h.clear(),p==null||p.clear(),m==null||m.clear(),C==null||C.clear(),t.cache=void 0}function VQe(t,r){t.projectStatus.delete(r),t.diagnostics.delete(r)}function HQe({projectPendingBuild:t},r,a){const u=t.get(r);(u===void 0||ut.projectPendingBuild.set(U1(t,u),0)),r&&r.throwIfCancellationRequested()}var MIe=(t=>(t[t.Build=0]="Build",t[t.UpdateOutputFileStamps=1]="UpdateOutputFileStamps",t))(MIe||{});function zQe(t,r){return t.projectPendingBuild.delete(r),t.diagnostics.has(r)?1:0}function E4t(t,r,a,u,h){let p=!0;return{kind:1,project:r,projectPath:a,buildOrder:h,getCompilerOptions:()=>u.options,getCurrentDirectory:()=>t.compilerHost.getCurrentDirectory(),updateOutputFileStatmps:()=>{XQe(t,u,a),p=!1},done:()=>(p&&XQe(t,u,a),cu("SolutionBuilder::Timestamps only updates"),zQe(t,a))}}function I4t(t,r,a,u,h,p){let m=0,C,b;return{kind:0,project:r,projectPath:a,buildOrder:p,getCompilerOptions:()=>h.options,getCurrentDirectory:()=>t.compilerHost.getCurrentDirectory(),getBuilderProgram:()=>E(fc),getProgram:()=>E(ue=>ue.getProgramOrUndefined()),getSourceFile:ue=>E(te=>te.getSourceFile(ue)),getSourceFiles:()=>N(ue=>ue.getSourceFiles()),getOptionsDiagnostics:ue=>N(te=>te.getOptionsDiagnostics(ue)),getGlobalDiagnostics:ue=>N(te=>te.getGlobalDiagnostics(ue)),getConfigFileParsingDiagnostics:()=>N(ue=>ue.getConfigFileParsingDiagnostics()),getSyntacticDiagnostics:(ue,te)=>N(Se=>Se.getSyntacticDiagnostics(ue,te)),getAllDependencies:ue=>N(te=>te.getAllDependencies(ue)),getSemanticDiagnostics:(ue,te)=>N(Se=>Se.getSemanticDiagnostics(ue,te)),getSemanticDiagnosticsOfNextAffectedFile:(ue,te)=>E(Se=>Se.getSemanticDiagnosticsOfNextAffectedFile&&Se.getSemanticDiagnosticsOfNextAffectedFile(ue,te)),emit:(ue,te,Se,oe,pe)=>{if(ue||oe)return E(ye=>{var be,_e;return ye.emit(ue,te,Se,oe,pe||((_e=(be=t.host).getCustomTransformers)==null?void 0:_e.call(be,r)))});if(Y(2,Se),m===4)return Q(te,Se);if(m===3)return q(te,Se,pe)},done:T};function T(ue,te,Se){return Y(6,ue,te,Se),cu("SolutionBuilder::Projects built"),zQe(t,a)}function E(ue){return Y(0),C&&ue(C)}function N(ue){return E(ue)||x}function R(){var ue,te,Se;if(z.assert(C===void 0),t.options.dry){Qp(t,k.A_non_dry_build_would_build_project_0,r),b=1,m=5;return}if(t.options.verbose&&Qp(t,k.Building_project_0,r),h.fileNames.length===0){eF(t,a,sD(h)),b=0,m=5;return}const{host:oe,compilerHost:pe}=t;if(t.projectCompilerOptions=h.options,(ue=t.moduleResolutionCache)==null||ue.update(h.options),(te=t.typeReferenceDirectiveResolutionCache)==null||te.update(h.options),C=oe.createProgram(h.fileNames,h.options,pe,N4t(t,a,h),sD(h),h.projectReferences),t.watch){const ye=(Se=t.moduleResolutionCache)==null?void 0:Se.getPackageJsonInfoCache().getInternalMap();t.lastCachedPackageJsonLookups.set(a,ye&&new Set(Fn(ye.values(),be=>t.host.realpath&&(kK(be)||be.directoryExists)?t.host.realpath(Hr(be.packageDirectory,"package.json")):Hr(be.packageDirectory,"package.json")))),t.builderPrograms.set(a,C)}m++}function F(ue,te,Se){ue.length?{buildResult:b,step:m}=BIe(t,a,C,h,ue,te,Se):m++}function j(ue){z.assertIsDefined(C),F([...C.getConfigFileParsingDiagnostics(),...C.getOptionsDiagnostics(ue),...C.getGlobalDiagnostics(ue),...C.getSyntacticDiagnostics(void 0,ue)],8,"Syntactic")}function U(ue){F(z.checkDefined(C).getSemanticDiagnostics(void 0,ue),16,"Semantic")}function q(ue,te,Se){var oe,pe,ye;z.assertIsDefined(C),z.assert(m===3);const be=C.saveEmitState();let _e;const ve=Ye=>(_e||(_e=[])).push(Ye),Ee=[],{emitResult:ke}=hQ(C,ve,void 0,void 0,(Ye,wt,nt,ze,st,xt)=>Ee.push({name:Ye,text:wt,writeByteOrderMark:nt,data:xt}),te,!1,Se||((pe=(oe=t.host).getCustomTransformers)==null?void 0:pe.call(oe,r)));if(_e)return C.restoreEmitState(be),{buildResult:b,step:m}=BIe(t,a,C,h,_e,32,"Declaration file"),{emitSkipped:!0,diagnostics:ke.diagnostics};const{host:Fe,compilerHost:Oe}=t,fe=(ye=C.hasChangedEmitSignature)!=null&&ye.call(C)?0:2,Ie=O8(),Le=new Map,et=C.getCompilerOptions(),He=$8(et);let We,Ue;return Ee.forEach(({name:Ye,text:wt,writeByteOrderMark:nt,data:ze})=>{const st=p0(t,Ye);Le.set(p0(t,Ye),Ye),ze!=null&&ze.buildInfo&&GQe(t,ze.buildInfo,a,et,fe);const xt=ze!=null&&ze.differsOnlyInMap?AL(t.host,Ye):void 0;FW(ue?{writeFile:ue}:Oe,Ie,Ye,wt,nt),ze!=null&&ze.differsOnlyInMap?t.host.setModifiedTime(Ye,xt):!He&&t.watch&&(We||(We=WIe(t,a))).set(st,Ue||(Ue=eH(t.host)))}),re(Ie,Le,Ee.length?Ee[0].name:vce(h,!Fe.useCaseSensitiveFileNames()),fe),ke}function Q(ue,te){z.assertIsDefined(C),z.assert(m===4);const Se=C.emitBuildInfo((oe,pe,ye,be,_e,ve)=>{ve!=null&&ve.buildInfo&&GQe(t,ve.buildInfo,a,C.getCompilerOptions(),2),ue?ue(oe,pe,ye,be,_e,ve):t.compilerHost.writeFile(oe,pe,ye,be,_e,ve)},te);return Se.diagnostics.length&&(CQ(t,Se.diagnostics),t.diagnostics.set(a,[...t.diagnostics.get(a),...Se.diagnostics]),b=64&b),Se.emittedFiles&&t.write&&Se.emittedFiles.forEach(oe=>$Qe(t,h,oe)),FIe(t,C),m=5,Se}function re(ue,te,Se,oe){const pe=ue.getDiagnostics();return pe.length?({buildResult:b,step:m}=BIe(t,a,C,h,pe,64,"Emit"),pe):(t.write&&te.forEach(ye=>$Qe(t,h,ye)),QQe(t,h,a,k.Updating_unchanged_output_timestamps_of_project_0,te),t.diagnostics.delete(a),t.projectStatus.set(a,{type:1,oldestOutputFileName:Se}),FIe(t,C),m=5,b=oe,pe)}function Y(ue,te,Se,oe){for(;m<=ue&&m<6;){const pe=m;switch(m){case 0:R();break;case 1:j(te);break;case 2:U(te);break;case 3:q(Se,te,oe);break;case 4:Q(Se,te);break;case 5:O4t(t,r,a,u,h,p,z.checkDefined(b)),m++;break}z.assert(m>pe)}}}function UQe(t,r,a){if(!t.projectPendingBuild.size||$P(r))return;const{options:u,projectPendingBuild:h}=t;for(let p=0;p{const F=z.checkDefined(t.filesWatched.get(C));z.assert(mue(F)),F.modifiedTime=R,F.callbacks.forEach(j=>j(E,N,R))},u,h,p,m);t.filesWatched.set(C,{callbacks:[a],watcher:T,modifiedTime:b})}return{close:()=>{const T=z.checkDefined(t.filesWatched.get(C));z.assert(mue(T)),T.callbacks.length===1?(t.filesWatched.delete(C),tm(T)):LL(T.callbacks,a)}}}function WIe(t,r){if(!t.watch)return;let a=t.outputTimeStamps.get(r);return a||t.outputTimeStamps.set(r,a=new Map),a}function GQe(t,r,a,u,h){const p=yS(u),m=VIe(t,p,a),C=eH(t.host);m?(m.buildInfo=r,m.modifiedTime=C,h&2||(m.latestChangedDtsTime=C)):t.buildInfoCache.set(a,{path:p0(t,p),buildInfo:r,modifiedTime:C,latestChangedDtsTime:h&2?void 0:C})}function VIe(t,r,a){const u=p0(t,r),h=t.buildInfoCache.get(a);return(h==null?void 0:h.path)===u?h:void 0}function KQe(t,r,a,u){const h=p0(t,r),p=t.buildInfoCache.get(a);if(p!==void 0&&p.path===h)return p.buildInfo||void 0;const m=t.readFileWithCache(r),C=m?Cce(r,m):void 0;return t.buildInfoCache.set(a,{path:h,buildInfo:C||!1,modifiedTime:u||Cp}),C}function HIe(t,r,a,u){const h=JQe(t,r);if(aQ&&(q=be,Q=_e),j&&Y.add(ve)}if(j){U||(U=Jce(j,E,T));const be=hf(U.roots,(_e,ve)=>Y.has(ve)?void 0:ve);if(be)return{type:9,buildInfoFile:E,inputFile:be}}if(!E){const be=GK(r,!T.useCaseSensitiveFileNames()),_e=WIe(t,a);for(const ve of be){const Ee=p0(t,ve);let ke=_e==null?void 0:_e.get(Ee);if(ke||(ke=AL(t.host,ve),_e==null||_e.set(Ee,ke)),ke===Cp)return{type:3,missingOutputFileName:ve};if(keHIe(t,be,R,N));if(oe)return oe;const pe=t.lastCachedPackageJsonLookups.get(a),ye=pe&&Bb(pe,be=>HIe(t,be,R,N));return ye||{type:te?2:re?14:1,newestInputFileTime:Q,newestInputFileName:q,oldestOutputFileName:N}}function P4t(t,r,a){return t.buildInfoCache.get(a).path===r.path}function jIe(t,r,a){if(r===void 0)return{type:0,reason:"File deleted mid-build"};const u=t.projectStatus.get(a);if(u!==void 0)return u;cu("SolutionBuilder::beforeUpToDateCheck");const h=L4t(t,r,a);return cu("SolutionBuilder::afterUpToDateCheck"),qg("SolutionBuilder::Up-to-date check","SolutionBuilder::beforeUpToDateCheck","SolutionBuilder::afterUpToDateCheck"),t.projectStatus.set(a,h),h}function QQe(t,r,a,u,h){if(r.options.noEmit)return;let p;const m=yS(r.options);if(m){h!=null&&h.has(p0(t,m))||(t.options.verbose&&Qp(t,u,r.options.configFilePath),t.host.setModifiedTime(m,p=eH(t.host)),VIe(t,m,a).modifiedTime=p),t.outputTimeStamps.delete(a);return}const{host:C}=t,b=GK(r,!C.useCaseSensitiveFileNames()),T=WIe(t,a),E=T?new Set:void 0;if(!h||b.length!==h.size){let N=!!t.options.verbose;for(const R of b){const F=p0(t,R);h!=null&&h.has(F)||(N&&(N=!1,Qp(t,u,r.options.configFilePath)),C.setModifiedTime(R,p||(p=eH(t.host))),T&&(T.set(F,p),E.add(F)))}}T==null||T.forEach((N,R)=>{!(h!=null&&h.has(R))&&!E.has(R)&&T.delete(R)})}function A4t(t,r,a){if(!r.composite)return;const u=z.checkDefined(t.buildInfoCache.get(a));if(u.latestChangedDtsTime!==void 0)return u.latestChangedDtsTime||void 0;const h=u.buildInfo&&u.buildInfo.program&&u.buildInfo.program.latestChangedDtsFile?t.host.getModifiedTime(bo(u.buildInfo.program.latestChangedDtsFile,rs(u.path))):void 0;return u.latestChangedDtsTime=h||!1,h}function XQe(t,r,a){if(t.options.dry)return Qp(t,k.A_non_dry_build_would_update_timestamps_for_output_of_project_0,r.options.configFilePath);QQe(t,r,a,k.Updating_output_timestamps_of_project_0),t.projectStatus.set(a,{type:1,oldestOutputFileName:vce(r,!t.host.useCaseSensitiveFileNames())})}function O4t(t,r,a,u,h,p,m){if(!(m&124)&&h.options.composite)for(let C=u+1;Ct.diagnostics.has(U1(t,T)))?b?2:1:0}function YQe(t,r,a){cu("SolutionBuilder::beforeClean");const u=R4t(t,r,a);return cu("SolutionBuilder::afterClean"),qg("SolutionBuilder::Clean","SolutionBuilder::beforeClean","SolutionBuilder::afterClean"),u}function R4t(t,r,a){const u=BQe(t,r,a);if(!u)return 3;if($P(u))return CQ(t,u.circularDiagnostics),4;const{options:h,host:p}=t,m=h.dry?[]:void 0;for(const C of u){const b=U1(t,C),T=L3(t,C,b);if(T===void 0){sXe(t,b);continue}const E=GK(T,!p.useCaseSensitiveFileNames());if(!E.length)continue;const N=new Set(T.fileNames.map(R=>p0(t,R)));for(const R of E)N.has(p0(t,R))||p.fileExists(R)&&(m?m.push(R):(p.deleteFile(R),zIe(t,b,0)))}return m&&Qp(t,k.A_non_dry_build_would_delete_the_following_files_Colon_0,m.map(C=>`\r + * ${C}`).join("")),0}function zIe(t,r,a){t.host.getParsedCommandLine&&a===1&&(a=2),a===2&&(t.configFileCache.delete(r),t.buildOrder=void 0),t.needsSummary=!0,VQe(t,r),HQe(t,r,a),WQe(t)}function bQ(t,r,a){t.reportFileChangeDetected=!0,zIe(t,r,a),eXe(t,250,!0)}function eXe(t,r,a){const{hostWithWatch:u}=t;!u.setTimeout||!u.clearTimeout||(t.timerToBuildInvalidatedProject&&u.clearTimeout(t.timerToBuildInvalidatedProject),t.timerToBuildInvalidatedProject=u.setTimeout(F4t,r,"timerToBuildInvalidatedProject",t,a))}function F4t(t,r,a){cu("SolutionBuilder::beforeBuild");const u=B4t(r,a);cu("SolutionBuilder::afterBuild"),qg("SolutionBuilder::Build","SolutionBuilder::beforeBuild","SolutionBuilder::afterBuild"),u&&oXe(r,u)}function B4t(t,r){t.timerToBuildInvalidatedProject=void 0,t.reportFileChangeDetected&&(t.reportFileChangeDetected=!1,t.projectErrorsReported.clear(),$Ie(t,k.File_change_detected_Starting_incremental_compilation));let a=0;const u=yQ(t),h=RIe(t,u,!1);if(h)for(h.done(),a++;t.projectPendingBuild.size;){if(t.timerToBuildInvalidatedProject)return;const p=UQe(t,u,!1);if(!p)break;if(p.kind!==1&&(r||a===5)){eXe(t,100,!1);return}qQe(t,p,u).done(),p.kind!==1&&a++}return OIe(t),u}function tXe(t,r,a,u){!t.watch||t.allWatchedConfigFiles.has(a)||t.allWatchedConfigFiles.set(a,vue(t,r,()=>bQ(t,a,2),2e3,u==null?void 0:u.watchOptions,tf.ConfigFile,r))}function iXe(t,r,a){ZK(r,a==null?void 0:a.options,t.allWatchedExtendedConfigFiles,(u,h)=>vue(t,u,()=>{var p;return(p=t.allWatchedExtendedConfigFiles.get(h))==null?void 0:p.projects.forEach(m=>bQ(t,m,2))},2e3,a==null?void 0:a.watchOptions,tf.ExtendedConfigFile),u=>p0(t,u))}function nXe(t,r,a,u){t.watch&&qV(IIe(t.allWatchedWildcardDirectories,a),u.wildcardDirectories,(h,p)=>t.watchDirectory(h,m=>{var C;$V({watchedDirPath:p0(t,h),fileOrDirectory:m,fileOrDirectoryPath:p0(t,m),configFileName:r,currentDirectory:t.compilerHost.getCurrentDirectory(),options:u.options,program:t.builderPrograms.get(a)||((C=T4t(t,a))==null?void 0:C.fileNames),useCaseSensitiveFileNames:t.parseConfigFileHost.useCaseSensitiveFileNames,writeLog:b=>t.writeLog(b),toPath:b=>p0(t,b)})||bQ(t,a,1)},p,u==null?void 0:u.watchOptions,tf.WildcardDirectory,r))}function UIe(t,r,a,u){t.watch&&U8(IIe(t.allWatchedInputFiles,a),new Set(u.fileNames),{createNewValue:h=>vue(t,h,()=>bQ(t,a,0),250,u==null?void 0:u.watchOptions,tf.SourceFile,r),onDeleteValue:h0})}function qIe(t,r,a,u){!t.watch||!t.lastCachedPackageJsonLookups||U8(IIe(t.allWatchedPackageJsonFiles,a),t.lastCachedPackageJsonLookups.get(a),{createNewValue:h=>vue(t,h,()=>bQ(t,a,0),2e3,u==null?void 0:u.watchOptions,tf.PackageJson,r),onDeleteValue:h0})}function W4t(t,r){if(t.watchAllProjectsPending){cu("SolutionBuilder::beforeWatcherCreation"),t.watchAllProjectsPending=!1;for(const a of tH(r)){const u=U1(t,a),h=L3(t,a,u);tXe(t,a,u,h),iXe(t,u,h),h&&(nXe(t,a,u,h),UIe(t,a,u,h),qIe(t,a,u,h))}cu("SolutionBuilder::afterWatcherCreation"),qg("SolutionBuilder::Watcher creation","SolutionBuilder::beforeWatcherCreation","SolutionBuilder::afterWatcherCreation")}}function V4t(t){tp(t.allWatchedConfigFiles,h0),tp(t.allWatchedExtendedConfigFiles,tm),tp(t.allWatchedWildcardDirectories,r=>tp(r,tm)),tp(t.allWatchedInputFiles,r=>tp(r,h0)),tp(t.allWatchedPackageJsonFiles,r=>tp(r,h0))}function rXe(t,r,a,u,h){const p=k4t(t,r,a,u,h);return{build:(m,C,b,T)=>ZQe(p,m,C,b,T),clean:m=>YQe(p,m),buildReferences:(m,C,b,T)=>ZQe(p,m,C,b,T,!0),cleanReferences:m=>YQe(p,m,!0),getNextInvalidatedProject:m=>(jQe(p,m),RIe(p,yQ(p),!1)),getBuildOrder:()=>yQ(p),getUpToDateStatusOfProject:m=>{const C=iH(p,m),b=U1(p,C);return jIe(p,L3(p,C,b),b)},invalidateProject:(m,C)=>zIe(p,m,C||0),close:()=>V4t(p)}}function yh(t,r){return GR(r,t.compilerHost.getCurrentDirectory(),t.compilerHost.getCanonicalFileName)}function Qp(t,r,...a){t.host.reportSolutionBuilderStatus(Gc(r,...a))}function $Ie(t,r,...a){var u,h;(h=(u=t.hostWithWatch).onWatchStatusChange)==null||h.call(u,Gc(r,...a),t.host.getNewLine(),t.baseCompilerOptions)}function CQ({host:t},r){r.forEach(a=>t.reportDiagnostic(a))}function eF(t,r,a){CQ(t,a),t.projectErrorsReported.set(r,!0),a.length&&t.diagnostics.set(r,a)}function sXe(t,r){eF(t,r,[t.configFileCache.get(r)])}function oXe(t,r){if(!t.needsSummary)return;t.needsSummary=!1;const a=t.watch||!!t.host.reportErrorSummary,{diagnostics:u}=t;let h=0,p=[];$P(r)?(aXe(t,r.buildOrder),CQ(t,r.circularDiagnostics),a&&(h+=dQ(r.circularDiagnostics)),a&&(p=[...p,...fQ(r.circularDiagnostics)])):(r.forEach(m=>{const C=U1(t,m);t.projectErrorsReported.has(C)||CQ(t,u.get(C)||x)}),a&&u.forEach(m=>h+=dQ(m)),a&&u.forEach(m=>[...p,...fQ(m)])),t.watch?$Ie(t,eue(h),h):t.host.reportErrorSummary&&t.host.reportErrorSummary(h,p)}function aXe(t,r){t.options.verbose&&Qp(t,k.Projects_in_this_build_Colon_0,r.map(a=>`\r + * `+yh(t,a)).join(""))}function H4t(t,r,a){switch(a.type){case 5:return Qp(t,k.Project_0_is_out_of_date_because_output_1_is_older_than_input_2,yh(t,r),yh(t,a.outOfDateOutputFileName),yh(t,a.newerInputFileName));case 6:return Qp(t,k.Project_0_is_out_of_date_because_output_1_is_older_than_input_2,yh(t,r),yh(t,a.outOfDateOutputFileName),yh(t,a.newerProjectName));case 3:return Qp(t,k.Project_0_is_out_of_date_because_output_file_1_does_not_exist,yh(t,r),yh(t,a.missingOutputFileName));case 4:return Qp(t,k.Project_0_is_out_of_date_because_there_was_error_reading_file_1,yh(t,r),yh(t,a.fileName));case 7:return Qp(t,k.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted,yh(t,r),yh(t,a.buildInfoFile));case 8:return Qp(t,k.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions,yh(t,r),yh(t,a.buildInfoFile));case 9:return Qp(t,k.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more,yh(t,r),yh(t,a.buildInfoFile),yh(t,a.inputFile));case 1:if(a.newestInputFileTime!==void 0)return Qp(t,k.Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2,yh(t,r),yh(t,a.newestInputFileName||""),yh(t,a.oldestOutputFileName||""));break;case 2:return Qp(t,k.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies,yh(t,r));case 14:return Qp(t,k.Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files,yh(t,r));case 10:return Qp(t,k.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date,yh(t,r),yh(t,a.upstreamProjectName));case 11:return Qp(t,a.upstreamProjectBlocked?k.Project_0_can_t_be_built_because_its_dependency_1_was_not_built:k.Project_0_can_t_be_built_because_its_dependency_1_has_errors,yh(t,r),yh(t,a.upstreamProjectName));case 0:return Qp(t,k.Failed_to_parse_file_0_Colon_1,yh(t,r),a.reason);case 13:return Qp(t,k.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2,yh(t,r),a.version,y);case 16:return Qp(t,k.Project_0_is_being_forcibly_rebuilt,yh(t,r))}}function yue(t,r,a){t.options.verbose&&H4t(t,r,a)}var JIe=(t=>(t[t.time=0]="time",t[t.count=1]="count",t[t.memory=2]="memory",t))(JIe||{});function j4t(t){const r=z4t();return W(t.getSourceFiles(),a=>{const u=U4t(t,a),h=Wy(a).length;r.set(u,r.get(u)+h)}),r}function z4t(){const t=new Map;return t.set("Library",0),t.set("Definitions",0),t.set("TypeScript",0),t.set("JavaScript",0),t.set("JSON",0),t.set("Other",0),t}function U4t(t,r){if(t.isSourceFileDefaultLibrary(r))return"Library";if(r.isDeclarationFile)return"Definitions";const a=r.path;return rd(a,tae)?"TypeScript":rd(a,Z6)?"JavaScript":tu(a,".json")?"JSON":"Other"}function bue(t,r,a){return SQ(t,a)?qP(t,!0):r}function lXe(t){return!!t.writeOutputIsTTY&&t.writeOutputIsTTY()&&!t.getEnvironmentVariable("NO_COLOR")}function SQ(t,r){return!r||typeof r.pretty>"u"?lXe(t):r.pretty}function cXe(t){return t.options.all?tc(K0,(r,a)=>pB(r.name,a.name)):Ri(K0.slice(),r=>!!r.showInSimplifiedHelpView)}function Cue(t){t.write(H_(k.Version_0,y)+t.newLine)}function Sue(t){if(!lXe(t))return{bold:E=>E,blue:E=>E,blueBackground:E=>E,brightWhite:E=>E};function a(E){return`\x1B[1m${E}\x1B[22m`}const u=t.getEnvironmentVariable("OS")&&t.getEnvironmentVariable("OS").toLowerCase().includes("windows"),h=t.getEnvironmentVariable("WT_SESSION"),p=t.getEnvironmentVariable("TERM_PROGRAM")&&t.getEnvironmentVariable("TERM_PROGRAM")==="vscode";function m(E){return u&&!h&&!p?T(E):`\x1B[94m${E}\x1B[39m`}const C=t.getEnvironmentVariable("COLORTERM")==="truecolor"||t.getEnvironmentVariable("TERM")==="xterm-256color";function b(E){return C?`\x1B[48;5;68m${E}\x1B[39;49m`:`\x1B[44m${E}\x1B[39;49m`}function T(E){return`\x1B[97m${E}\x1B[39m`}return{bold:a,blue:m,brightWhite:T,blueBackground:b}}function uXe(t){return`--${t.name}${t.shortName?`, -${t.shortName}`:""}`}function q4t(t,r,a,u){var h;const p=[],m=Sue(t),C=uXe(r),b=j(r),T=typeof r.defaultValueDescription=="object"?H_(r.defaultValueDescription):N(r.defaultValueDescription,r.type==="list"||r.type==="listOrElement"?r.element.type:r.type),E=((h=t.getWidthOfTerminal)==null?void 0:h.call(t))??0;if(E>=80){let U="";r.description&&(U=H_(r.description)),p.push(...F(C,U,a,u,E,!0),t.newLine),R(b,r)&&(b&&p.push(...F(b.valueType,b.possibleValues,a,u,E,!1),t.newLine),T&&p.push(...F(H_(k.default_Colon),T,a,u,E,!1),t.newLine)),p.push(t.newLine)}else{if(p.push(m.blue(C),t.newLine),r.description){const U=H_(r.description);p.push(U)}if(p.push(t.newLine),R(b,r)){if(b&&p.push(`${b.valueType} ${b.possibleValues}`),T){b&&p.push(t.newLine);const U=H_(k.default_Colon);p.push(`${U} ${T}`)}p.push(t.newLine)}p.push(t.newLine)}return p;function N(U,q){return U!==void 0&&typeof q=="object"?Fn(q.entries()).filter(([,Q])=>Q===U).map(([Q])=>Q).join("/"):String(U)}function R(U,q){const Q=["string"],re=[void 0,"false","n/a"],Y=q.defaultValueDescription;return!(q.category===k.Command_line_Options||Mt(Q,U==null?void 0:U.possibleValues)&&Mt(re,Y))}function F(U,q,Q,re,Y,ue){const te=[];let Se=!0,oe=q;const pe=Y-re;for(;oe.length>0;){let ye="";Se?(ye=U.padStart(Q),ye=ye.padEnd(re),ye=ue?m.blue(ye):ye):ye="".padStart(re);const be=oe.substr(0,pe);oe=oe.slice(pe),te.push(`${ye}${be}`),Se=!1}return te}function j(U){if(U.type==="object")return;return{valueType:q(U),possibleValues:Q(U)};function q(re){switch(z.assert(re.type!=="listOrElement"),re.type){case"string":case"number":case"boolean":return H_(k.type_Colon);case"list":return H_(k.one_or_more_Colon);default:return H_(k.one_of_Colon)}}function Q(re){let Y;switch(re.type){case"string":case"number":case"boolean":Y=re.type;break;case"list":case"listOrElement":Y=Q(re.element);break;case"object":Y="";break;default:const ue={};return re.type.forEach((te,Se)=>{var oe;(oe=re.deprecatedKeys)!=null&&oe.has(Se)||(ue[te]||(ue[te]=[])).push(Se)}),Object.entries(ue).map(([,te])=>te.join("/")).join(", ")}return Y}}}function dXe(t,r){let a=0;for(const m of r){const C=uXe(m).length;a=a>C?a:C}const u=a+2,h=u+2;let p=[];for(const m of r){const C=q4t(t,m,u,h);p=[...p,...C]}return p[p.length-2]!==t.newLine&&p.push(t.newLine),p}function nH(t,r,a,u,h,p){let m=[];if(m.push(Sue(t).bold(r)+t.newLine+t.newLine),h&&m.push(h+t.newLine+t.newLine),!u)return m=[...m,...dXe(t,a)],p&&m.push(p+t.newLine+t.newLine),m;const C=new Map;for(const b of a){if(!b.category)continue;const T=H_(b.category),E=C.get(T)??[];E.push(b),C.set(T,E)}return C.forEach((b,T)=>{m.push(`### ${T}${t.newLine}${t.newLine}`),m=[...m,...dXe(t,b)]}),p&&m.push(p+t.newLine+t.newLine),m}function $4t(t,r){const a=Sue(t);let u=[...wue(t,`${H_(k.tsc_Colon_The_TypeScript_Compiler)} - ${H_(k.Version_0,y)}`)];u.push(a.bold(H_(k.COMMON_COMMANDS))+t.newLine+t.newLine),m("tsc",k.Compiles_the_current_project_tsconfig_json_in_the_working_directory),m("tsc app.ts util.ts",k.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options),m("tsc -b",k.Build_a_composite_project_in_the_working_directory),m("tsc --init",k.Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory),m("tsc -p ./path/to/tsconfig.json",k.Compiles_the_TypeScript_project_located_at_the_specified_path),m("tsc --help --all",k.An_expanded_version_of_this_information_showing_all_possible_compiler_options),m(["tsc --noEmit","tsc --target esnext"],k.Compiles_the_current_project_with_additional_settings);const h=r.filter(C=>C.isCommandLineOnly||C.category===k.Command_line_Options),p=r.filter(C=>!Mt(h,C));u=[...u,...nH(t,H_(k.COMMAND_LINE_FLAGS),h,!1,void 0,void 0),...nH(t,H_(k.COMMON_COMPILER_OPTIONS),p,!1,void 0,lP(k.You_can_learn_about_all_of_the_compiler_options_at_0,"https://aka.ms/tsc"))];for(const C of u)t.write(C);function m(C,b){const T=typeof C=="string"?[C]:C;for(const E of T)u.push(" "+a.blue(E)+t.newLine);u.push(" "+H_(b)+t.newLine+t.newLine)}}function J4t(t,r,a,u){let h=[...wue(t,`${H_(k.tsc_Colon_The_TypeScript_Compiler)} - ${H_(k.Version_0,y)}`)];h=[...h,...nH(t,H_(k.ALL_COMPILER_OPTIONS),r,!0,void 0,lP(k.You_can_learn_about_all_of_the_compiler_options_at_0,"https://aka.ms/tsc"))],h=[...h,...nH(t,H_(k.WATCH_OPTIONS),u,!1,H_(k.Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon))],h=[...h,...nH(t,H_(k.BUILD_OPTIONS),a,!1,lP(k.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0,"https://aka.ms/tsc-composite-builds"))];for(const p of h)t.write(p)}function fXe(t,r){let a=[...wue(t,`${H_(k.tsc_Colon_The_TypeScript_Compiler)} - ${H_(k.Version_0,y)}`)];a=[...a,...nH(t,H_(k.BUILD_OPTIONS),r,!1,lP(k.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0,"https://aka.ms/tsc-composite-builds"))];for(const u of a)t.write(u)}function wue(t,r){var a;const u=Sue(t),h=[],p=((a=t.getWidthOfTerminal)==null?void 0:a.call(t))??0,m=5,C=u.blueBackground("".padStart(m)),b=u.blueBackground(u.brightWhite("TS ".padStart(m)));if(p>=r.length+m){const E=(p>120?120:p)-m;h.push(r.padEnd(E)+C+t.newLine),h.push("".padStart(E)+b+t.newLine)}else h.push(r+t.newLine),h.push(t.newLine);return h}function hXe(t,r){r.options.all?J4t(t,cXe(r),ple,BP):$4t(t,cXe(r))}function _Xe(t,r,a){let u=qP(t);if(a.options.build)return u(Gc(k.Option_build_must_be_the_first_command_line_argument)),t.exit(1);let h;if(a.options.locale&&sse(a.options.locale,t,a.errors),a.errors.length>0)return a.errors.forEach(u),t.exit(1);if(a.options.init)return X4t(t,u,a.options,a.fileNames),t.exit(0);if(a.options.version)return Cue(t),t.exit(0);if(a.options.help||a.options.all)return hXe(t,a),t.exit(0);if(a.options.watch&&a.options.listFilesOnly)return u(Gc(k.Options_0_and_1_cannot_be_combined,"watch","listFilesOnly")),t.exit(1);if(a.options.project){if(a.fileNames.length!==0)return u(Gc(k.Option_project_cannot_be_mixed_with_source_files_on_a_command_line)),t.exit(1);const C=ra(a.options.project);if(!C||t.directoryExists(C)){if(h=Hr(C,"tsconfig.json"),!t.fileExists(h))return u(Gc(k.Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0,a.options.project)),t.exit(1)}else if(h=C,!t.fileExists(h))return u(Gc(k.The_specified_path_does_not_exist_Colon_0,a.options.project)),t.exit(1)}else if(a.fileNames.length===0){const C=ra(t.getCurrentDirectory());h=kce(C,b=>t.fileExists(b))}if(a.fileNames.length===0&&!h)return a.options.showConfig?u(Gc(k.Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0,ra(t.getCurrentDirectory()))):(Cue(t),hXe(t,a)),t.exit(1);const p=t.getCurrentDirectory(),m=mK(a.options,C=>bo(C,p));if(h){const C=new Map,b=xIe(h,m,C,a.watchOptions,t,u);if(m.showConfig)return b.errors.length!==0?(u=bue(t,u,b.options),b.errors.forEach(u),t.exit(1)):(t.write(JSON.stringify(wle(b,h,t),null,4)+t.newLine),t.exit(0));if(u=bue(t,u,b.options),Woe(b.options))return KIe(t,u)?void 0:G4t(t,r,u,b,m,a.watchOptions,C);$8(b.options)?vXe(t,r,u,b):mXe(t,r,u,b)}else{if(m.showConfig)return t.write(JSON.stringify(wle(a,Hr(p,"tsconfig.json"),t),null,4)+t.newLine),t.exit(0);if(u=bue(t,u,m),Woe(m))return KIe(t,u)?void 0:K4t(t,r,u,a.fileNames,m,a.watchOptions);$8(m)?vXe(t,r,u,{...a,options:m}):mXe(t,r,u,{...a,options:m})}}function GIe(t){if(t.length>0&&t[0].charCodeAt(0)===45){const r=t[0].slice(t[0].charCodeAt(1)===45?2:1).toLowerCase();return r==="build"||r==="b"}return!1}function pXe(t,r,a){if(GIe(a)){const{buildOptions:h,watchOptions:p,projects:m,errors:C}=YTe(a.slice(1));if(h.generateCpuProfile&&t.enableCPUProfiler)t.enableCPUProfiler(h.generateCpuProfile,()=>gXe(t,r,h,p,m,C));else return gXe(t,r,h,p,m,C)}const u=XTe(a,h=>t.readFile(h));if(u.options.generateCpuProfile&&t.enableCPUProfiler)t.enableCPUProfiler(u.options.generateCpuProfile,()=>_Xe(t,r,u));else return _Xe(t,r,u)}function KIe(t,r){return!t.watchFile||!t.watchDirectory?(r(Gc(k.The_current_host_does_not_support_the_0_option,"--watch")),t.exit(1),!0):!1}var wQ=2;function gXe(t,r,a,u,h,p){const m=bue(t,qP(t),a);if(a.locale&&sse(a.locale,t,p),p.length>0)return p.forEach(m),t.exit(1);if(a.help||h.length===0)return Cue(t),fXe(t,DV),t.exit(0);if(!t.getModifiedTime||!t.setModifiedTime||a.clean&&!t.deleteFile)return m(Gc(k.The_current_host_does_not_support_the_0_option,"--build")),t.exit(1);if(a.watch){if(KIe(t,m))return;const N=LIe(t,void 0,m,vQ(t,SQ(t,a)),XIe(t,a));N.jsDocParsingMode=wQ;const R=SXe(t,a);yXe(t,r,N,R);const F=N.onWatchStatusChange;let j=!1;N.onWatchStatusChange=(q,Q,re,Y)=>{F==null||F(q,Q,re,Y),j&&(q.code===k.Found_0_errors_Watching_for_file_changes.code||q.code===k.Found_1_error_Watching_for_file_changes.code)&&ZIe(U,R)};const U=AIe(N,h,a,u);return U.build(),ZIe(U,R),j=!0,U}const C=NIe(t,void 0,m,vQ(t,SQ(t,a)),QIe(t,a));C.jsDocParsingMode=wQ;const b=SXe(t,a);yXe(t,r,C,b);const T=PIe(C,h,a),E=a.clean?T.clean():T.build();return ZIe(T,b),vCe(),t.exit(E)}function QIe(t,r){return SQ(t,r)?(a,u)=>t.write(tue(a,u,t.newLine,t)):void 0}function mXe(t,r,a,u){const{fileNames:h,options:p,projectReferences:m}=u,C=eQ(p,void 0,t);C.jsDocParsingMode=wQ;const b=C.getCurrentDirectory(),T=Zf(C.useCaseSensitiveFileNames());K7(C,F=>_c(F,b,T)),YIe(t,p,!1);const E={rootNames:h,options:p,projectReferences:m,host:C,configFileParsingDiagnostics:sD(u)},N=XV(E),R=lue(N,a,F=>t.write(F+t.newLine),QIe(t,p));return kue(t,N,void 0),r(N),t.exit(R)}function vXe(t,r,a,u){const{options:h,fileNames:p,projectReferences:m}=u;YIe(t,h,!1);const C=mQ(h,t);C.jsDocParsingMode=wQ;const b=TIe({host:C,system:t,rootNames:p,options:h,configFileParsingDiagnostics:sD(u),projectReferences:m,reportDiagnostic:a,reportErrorSummary:QIe(t,h),afterProgramEmitAndDiagnostics:T=>{kue(t,T.getProgram(),void 0),r(T)}});return t.exit(b)}function yXe(t,r,a,u){bXe(t,a,!0),a.afterProgramEmitAndDiagnostics=h=>{kue(t,h.getProgram(),u),r(h)}}function bXe(t,r,a){const u=r.createProgram;r.createProgram=(h,p,m,C,b,T)=>(z.assert(h!==void 0||p===void 0&&!!C),p!==void 0&&YIe(t,p,a),u(h,p,m,C,b,T))}function CXe(t,r,a){a.jsDocParsingMode=wQ,bXe(t,a,!1);const u=a.afterProgramCreate;a.afterProgramCreate=h=>{u(h),kue(t,h.getProgram(),void 0),r(h)}}function XIe(t,r){return Yce(t,SQ(t,r))}function G4t(t,r,a,u,h,p,m){const C=hue({configFileName:u.options.configFilePath,optionsToExtend:h,watchOptionsToExtend:p,system:t,reportDiagnostic:a,reportWatchStatus:XIe(t,u.options)});return CXe(t,r,C),C.configFileParsingResult=u,C.extendedConfigCache=m,pue(C)}function K4t(t,r,a,u,h,p){const m=_ue({rootFiles:u,options:h,watchOptions:p,system:t,reportDiagnostic:a,reportWatchStatus:XIe(t,h)});return CXe(t,r,m),pue(m)}function SXe(t,r){if(t===Wd&&r.extendedDiagnostics)return wre(),Q4t()}function Q4t(){let t;return{addAggregateStatistic:r,forEachAggregateStatistics:a,clear:u};function r(h){const p=t==null?void 0:t.get(h.name);p?p.type===2?p.value=Math.max(p.value,h.value):p.value+=h.value:(t??(t=new Map)).set(h.name,h)}function a(h){t==null||t.forEach(h)}function u(){t=void 0}}function ZIe(t,r){if(!r)return;if(!pCe()){Wd.write(k.Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found.message+` +`);return}const a=[];a.push({name:"Projects in scope",value:tH(t.getBuildOrder()).length,type:1}),u("SolutionBuilder::Projects built"),u("SolutionBuilder::Timestamps only updates"),u("SolutionBuilder::Bundles updated"),r.forEachAggregateStatistics(p=>{p.name=`Aggregate ${p.name}`,a.push(p)}),Sre((p,m)=>{xue(p)&&a.push({name:`${h(p)} time`,value:m,type:0})}),gCe(),wre(),r.clear(),kXe(Wd,a);function u(p){const m=XUe(p);m&&a.push({name:h(p),value:m,type:1})}function h(p){return p.replace("SolutionBuilder::","")}}function wXe(t,r){return t===Wd&&(r.diagnostics||r.extendedDiagnostics)}function xXe(t,r){return t===Wd&&r.generateTrace}function YIe(t,r,a){wXe(t,r)&&wre(t),xXe(t,r)&&mCe(a?"build":"project",r.generateTrace,r.configFilePath)}function xue(t){return ro(t,"SolutionBuilder::")}function kue(t,r,a){var u;const h=r.getCompilerOptions();xXe(t,h)&&((u=sr)==null||u.stopTracing());let p;if(wXe(t,h)){p=[];const T=t.getMemoryUsage?t.getMemoryUsage():-1;C("Files",r.getSourceFiles().length);const E=j4t(r);if(h.extendedDiagnostics)for(const[q,Q]of E.entries())C("Lines of "+q,Q);else C("Lines",he(E.values(),(q,Q)=>q+Q,0));C("Identifiers",r.getIdentifierCount()),C("Symbols",r.getSymbolCount()),C("Types",r.getTypeCount()),C("Instantiations",r.getInstantiationCount()),T>=0&&m({name:"Memory used",value:T,type:2},!0);const N=pCe(),R=N?zR("Program"):0,F=N?zR("Bind"):0,j=N?zR("Check"):0,U=N?zR("Emit"):0;if(h.extendedDiagnostics){const q=r.getRelationCacheSizes();C("Assignability cache size",q.assignable),C("Identity cache size",q.identity),C("Subtype cache size",q.subtype),C("Strict subtype cache size",q.strictSubtype),N&&Sre((Q,re)=>{xue(Q)||b(`${Q} time`,re,!0)})}else N&&(b("I/O read",zR("I/O Read"),!0),b("I/O write",zR("I/O Write"),!0),b("Parse time",R,!0),b("Bind time",F,!0),b("Check time",j,!0),b("Emit time",U,!0));N&&b("Total time",R+F+j+U,!1),kXe(t,p),N?a?(Sre(q=>{xue(q)||YUe(q)}),ZUe(q=>{xue(q)||eqe(q)})):gCe():t.write(k.Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found.message+` +`)}function m(T,E){p.push(T),E&&(a==null||a.addAggregateStatistic(T))}function C(T,E){m({name:T,value:E,type:1},!0)}function b(T,E,N){m({name:T,value:E,type:0},N)}}function kXe(t,r){let a=0,u=0;for(const h of r){h.name.length>a&&(a=h.name.length);const p=TXe(h);p.length>u&&(u=p.length)}for(const h of r)t.write(`${h.name}:`.padEnd(a+2)+TXe(h).toString().padStart(u)+t.newLine)}function TXe(t){switch(t.type){case 1:return""+t.value;case 0:return(t.value/1e3).toFixed(2)+"s";case 2:return Math.round(t.value/1e3)+"K";default:z.assertNever(t.type)}}function X4t(t,r,a,u){const h=t.getCurrentDirectory(),p=ra(Hr(h,"tsconfig.json"));if(t.fileExists(p))r(Gc(k.A_tsconfig_json_file_is_already_defined_at_Colon_0,p));else{t.writeFile(p,rDe(a,u,t.newLine));const m=[t.newLine,...wue(t,"Created a new tsconfig.json with:")];m.push(nDe(a,t.newLine)+t.newLine+t.newLine),m.push("You can learn more at https://aka.ms/tsconfig"+t.newLine);for(const C of m)t.write(C)}}function eNe(t,r){const a=Hh(t,"strictNullChecks");return{typeFromExpression:re,serializeTypeOfDeclaration:p,serializeReturnTypeForSignature:m,serializeTypeOfExpression:h};function u(fe,Ie){return fe!==void 0&&(!Ie||fe&&ke(fe))?!0:void 0}function h(fe,Ie,Le,et){return re(fe,Ie,!1,Le,et)??j(fe,Ie)}function p(fe,Ie){switch(fe.kind){case 171:return u(hd(fe));case 169:return N(fe,Ie);case 260:return E(fe,Ie);case 172:return R(fe,Ie);case 208:return F(fe,Ie);case 277:return h(fe.expression,Ie,void 0,!0);case 211:case 212:case 226:return u(hd(fe))||F(fe,Ie);case 303:return re(fe.initializer,Ie)||F(fe,Ie);default:z.assertNever(fe,`Node needs to be an inferrable node, found ${z.formatSyntaxKind(fe.kind)}`)}}function m(fe,Ie){switch(fe.kind){case 177:return T(fe,Ie);case 174:case 262:case 180:case 173:case 179:case 176:case 178:case 181:case 184:case 185:case 218:case 219:case 317:case 323:return Fe(fe,Ie);default:z.assertNever(fe,`Node needs to be an inferrable node, found ${z.formatSyntaxKind(fe.kind)}`)}}function C(fe){if(fe)return fe.kind===177?Dp(fe):fe.parameters.length>0?hd(fe.parameters[0]):void 0}function b(fe,Ie){let Le=C(fe);return!Le&&fe!==Ie.firstAccessor&&(Le=C(Ie.firstAccessor)),!Le&&Ie.secondAccessor&&fe!==Ie.secondAccessor&&(Le=C(Ie.secondAccessor)),Le}function T(fe,Ie){const Le=r.getAllAccessorDeclarations(fe),et=b(fe,Le);return et?u(et):Le.getAccessor?Fe(Le.getAccessor,Ie):!1}function E(fe,Ie){const Le=hd(fe);if(Le)return u(Le);let et;return fe.initializer&&(r.isExpandoFunctionDeclaration(fe)||(et=re(fe.initializer,Ie,void 0,void 0,Qwe(fe)))),et??F(fe,Ie)}function N(fe,Ie){const Le=fe.parent;if(Le.kind===178)return T(Le,Ie);const et=hd(fe),He=r.requiresAddingImplicitUndefined(fe);let We;return et?We=u(et,He):fe.initializer&<(fe.name)&&(We=re(fe.initializer,Ie,void 0,He)),We??F(fe,Ie)}function R(fe,Ie){const Le=hd(fe);if(Le)return u(Le);let et;if(fe.initializer){const He=tW(fe);et=re(fe.initializer,Ie,void 0,void 0,He)}return et??F(fe,Ie)}function F(fe,Ie){return Ie.tracker.reportInferenceFallback(fe),!1}function j(fe,Ie){return Ie.tracker.reportInferenceFallback(fe),!1}function U(fe,Ie){return Ie.tracker.reportInferenceFallback(fe),!1}function q(fe,Ie,Le){return fe.kind===177?Fe(fe,Le):(Le.tracker.reportInferenceFallback(fe),!1)}function Q(fe,Ie,Le,et){return V0(Ie)?re(fe,Le,!0,et):(et&&!ke(Ie)&&Le.tracker.reportInferenceFallback(Ie),u(Ie))}function re(fe,Ie,Le=!1,et=!1,He=!1){switch(fe.kind){case 217:return wI(fe)?Q(fe.expression,T7(fe),Ie,et):re(fe.expression,Ie,Le,et);case 80:if(r.isUndefinedIdentifierExpression(fe))return!0;break;case 106:return!0;case 219:case 218:return Y(fe,Ie);case 216:case 234:const We=fe;return Q(We.expression,We.type,Ie,et);case 224:const Ue=fe;if(TG(Ue)&&(Ue.operand.kind===10||Ue.operand.kind===9))return Ee();break;case 9:return Ee();case 228:if(!Le&&!He)return!0;break;case 15:case 11:return Ee();case 10:return Ee();case 112:case 97:return Ee();case 209:return te(fe,Ie,Le);case 210:return oe(fe,Ie,Le);case 231:return j(fe,Ie)}}function Y(fe,Ie){const Le=u(fe.type)??Fe(fe,Ie),et=be(fe.typeParameters),He=fe.parameters.every(We=>ye(We,Ie));return Le&&et&&He}function ue(fe,Ie,Le){if(!Le)return Ie.tracker.reportInferenceFallback(fe),!1;for(const et of fe.elements)if(et.kind===230)return Ie.tracker.reportInferenceFallback(et),!1;return!0}function te(fe,Ie,Le){if(!ue(fe,Ie,Le))return!1;let et=!0;for(const He of fe.elements)z.assert(He.kind!==230),He.kind!==232&&(et=(re(He,Ie,Le)??j(He,Ie))&&et);return!0}function Se(fe,Ie){let Le=!0;for(const et of fe.properties){if(et.flags&262144){Le=!1;break}if(et.kind===304||et.kind===305)Ie.tracker.reportInferenceFallback(et),Le=!1;else if(et.name.flags&262144){Le=!1;break}else if(et.name.kind===81)Le=!1;else if(et.name.kind===167){const He=et.name.expression;!TG(He,!1)&&!r.isDefinitelyReferenceToGlobalSymbolObject(He)&&(Ie.tracker.reportInferenceFallback(et.name),Le=!1)}}return Le}function oe(fe,Ie,Le){if(!Se(fe,Ie))return!1;let et=!0;for(const He of fe.properties){z.assert(!ih(He)&&!ib(He));const We=He.name;switch(He.kind){case 174:et=!!_e(He,We,Ie)&&et;break;case 303:et=!!pe(He,We,Ie,Le)&&et;break;case 178:case 177:et=!!ve(He,We,Ie)&&et;break}}return et}function pe(fe,Ie,Le,et){return re(fe.initializer,Le,et)??F(fe,Le)}function ye(fe,Ie){return N(fe,Ie)}function be(fe){return(fe==null?void 0:fe.every(Ie=>u(Ie.constraint)&&u(Ie.default)))??!0}function _e(fe,Ie,Le){const et=Fe(fe,Le),He=be(fe.typeParameters),We=fe.parameters.every(Ue=>ye(Ue,Le));return et&&He&&We}function ve(fe,Ie,Le){const et=r.getAllAccessorDeclarations(fe),He=et.getAccessor&&C(et.getAccessor),We=et.setAccessor&&C(et.setAccessor);if(He!==void 0&&We!==void 0){const Ue=fe.parameters.every(Ye=>ye(Ye,Le));return tS(fe)?Ue&&u(He):Ue}else if(et.firstAccessor===fe){const Ue=He??We;return Ue?u(Ue):q(fe,et,Le)}return!1}function Ee(){return!0}function ke(fe){return!a||d_(fe.kind)||fe.kind===201||fe.kind===184||fe.kind===185||fe.kind===188||fe.kind===189||fe.kind===187||fe.kind===203||fe.kind===197?!0:fe.kind===196?ke(fe.type):fe.kind===192||fe.kind===193?fe.types.every(ke):!1}function Fe(fe,Ie){let Le;const et=Dp(fe);return et&&(Le=u(et)),!Le&&ZL(fe)&&(Le=Oe(fe,Ie)),Le??U(fe,Ie)}function Oe(fe,Ie){let Le;if(fe&&!vu(fe.body)){if(ad(fe)&3)return;const et=fe.body;et&&Ho(et)?sS(et,He=>{if(!Le)Le=He.expression;else return Le=void 0,!0}):Le=et}if(Le)return re(Le,Ie)}}var Gv={};l(Gv,{NameValidationResult:()=>FXe,discoverTypings:()=>e6t,isTypingUpToDate:()=>LXe,loadSafeList:()=>Z4t,loadTypesMap:()=>Y4t,nodeCoreModuleList:()=>OXe,nodeCoreModules:()=>MXe,nonRelativeModuleNameForTypingCache:()=>RXe,prefixedNodeCoreModuleList:()=>AXe,renderPackageNameValidationFailure:()=>i6t,validatePackageName:()=>t6t});var xQ="action::set",kQ="action::invalidate",TQ="action::packageInstalled",Tue="event::typesRegistry",Due="event::beginInstallTypes",Eue="event::endInstallTypes",tNe="event::initializationFailed",rH="action::watchTypingLocations",Iue;(t=>{t.GlobalCacheLocation="--globalTypingsCacheLocation",t.LogFile="--logFile",t.EnableTelemetry="--enableTelemetry",t.TypingSafeListLocation="--typingSafeListLocation",t.TypesMapLocation="--typesMapLocation",t.NpmLocation="--npmLocation",t.ValidateDefaultNpmLocation="--validateDefaultNpmLocation"})(Iue||(Iue={}));function DXe(t){return Wd.args.includes(t)}function EXe(t){const r=Wd.args.indexOf(t);return r>=0&&r`node:${t}`),OXe=[...PXe,...AXe],MXe=new Set(OXe);function RXe(t){return MXe.has(t)?"node":t}function Z4t(t,r){const a=IV(r,u=>t.readFile(u));return new Map(Object.entries(a.config))}function Y4t(t,r){var a;const u=IV(r,h=>t.readFile(h));if((a=u.config)!=null&&a.simpleMap)return new Map(Object.entries(u.config.simpleMap))}function e6t(t,r,a,u,h,p,m,C,b,T){if(!m||!m.enable)return{cachedTypingPaths:[],newTypingNames:[],filesToWatch:[]};const E=new Map;a=ns(a,ue=>{const te=ra(ue);if(Zy(te))return te});const N=[];m.include&&Q(m.include,"Explicitly included types");const R=m.exclude||[];if(!T.types){const ue=new Set(a.map(rs));ue.add(u),ue.forEach(te=>{re(te,"bower.json","bower_components",N),re(te,"package.json","node_modules",N)})}if(m.disableFilenameBasedTypeAcquisition||Y(a),C){const ue=jt(C.map(RXe),UE,Xf);Q(ue,"Inferred typings from unresolved imports")}for(const ue of R)E.delete(ue)&&r&&r(`Typing for ${ue} is in exclude list, will be ignored.`);p.forEach((ue,te)=>{const Se=b.get(te);E.get(te)===!1&&Se!==void 0&&LXe(ue,Se)&&E.set(te,ue.typingLocation)});const F=[],j=[];E.forEach((ue,te)=>{ue?j.push(ue):F.push(te)});const U={cachedTypingPaths:j,newTypingNames:F,filesToWatch:N};return r&&r(`Finished typings discovery:${i2(U)}`),U;function q(ue){E.has(ue)||E.set(ue,!1)}function Q(ue,te){r&&r(`${te}: ${JSON.stringify(ue)}`),W(ue,q)}function re(ue,te,Se,oe){const pe=Hr(ue,te);let ye,be;t.fileExists(pe)&&(oe.push(pe),ye=IV(pe,ke=>t.readFile(ke)).config,be=Ln([ye.dependencies,ye.devDependencies,ye.optionalDependencies,ye.peerDependencies],wm),Q(be,`Typing names in '${pe}' dependencies`));const _e=Hr(ue,Se);if(oe.push(_e),!t.directoryExists(_e))return;const ve=[],Ee=be?be.map(ke=>Hr(_e,ke,te)):t.readDirectory(_e,[".json"],void 0,void 0,3).filter(ke=>{if(fd(ke)!==te)return!1;const Fe=Qd(ra(ke)),Oe=Fe[Fe.length-3][0]==="@";return Oe&&Ow(Fe[Fe.length-4])===Se||!Oe&&Ow(Fe[Fe.length-3])===Se});r&&r(`Searching for typing names in ${_e}; all files: ${JSON.stringify(Ee)}`);for(const ke of Ee){const Fe=ra(ke),fe=IV(Fe,Le=>t.readFile(Le)).config;if(!fe.name)continue;const Ie=fe.types||fe.typings;if(Ie){const Le=bo(Ie,rs(Fe));t.fileExists(Le)?(r&&r(` Package '${fe.name}' provides its own types.`),E.set(fe.name,Le)):r&&r(` Package '${fe.name}' provides its own types but they are missing.`)}else ve.push(fe.name)}Q(ve," Found package names")}function Y(ue){const te=ns(ue,oe=>{if(!Zy(oe))return;const pe=h_(Ow(fd(oe))),ye=pre(pe);return h.get(ye)});te.length&&Q(te,"Inferred typings from file names"),Rt(ue,oe=>tu(oe,".jsx"))&&(r&&r("Inferred 'react' typings due to presence of '.jsx' extension"),q("react"))}}var FXe=(t=>(t[t.Ok=0]="Ok",t[t.EmptyName=1]="EmptyName",t[t.NameTooLong=2]="NameTooLong",t[t.NameStartsWithDot=3]="NameStartsWithDot",t[t.NameStartsWithUnderscore=4]="NameStartsWithUnderscore",t[t.NameContainsNonURISafeCharacters=5]="NameContainsNonURISafeCharacters",t))(FXe||{}),BXe=214;function t6t(t){return iNe(t,!0)}function iNe(t,r){if(!t)return 1;if(t.length>BXe)return 2;if(t.charCodeAt(0)===46)return 3;if(t.charCodeAt(0)===95)return 4;if(r){const a=/^@([^/]+)\/([^/]+)$/.exec(t);if(a){const u=iNe(a[1],!1);if(u!==0)return{name:a[1],isScopeName:!0,result:u};const h=iNe(a[2],!1);return h!==0?{name:a[2],isScopeName:!1,result:h}:0}}return encodeURIComponent(t)!==t?5:0}function i6t(t,r){return typeof t=="object"?WXe(r,t.result,t.name,t.isScopeName):WXe(r,t,r,!1)}function WXe(t,r,a,u){const h=u?"Scope":"Package";switch(r){case 1:return`'${t}':: ${h} name '${a}' cannot be empty`;case 2:return`'${t}':: ${h} name '${a}' should be less than ${BXe} characters`;case 3:return`'${t}':: ${h} name '${a}' cannot start with '.'`;case 4:return`'${t}':: ${h} name '${a}' cannot start with '_'`;case 5:return`'${t}':: ${h} name '${a}' contains non URI safe characters`;case 0:return z.fail();default:z.assertNever(r)}}var DQ;(t=>{class r{constructor(h){this.text=h}getText(h,p){return h===0&&p===this.text.length?this.text:this.text.substring(h,p)}getLength(){return this.text.length}getChangeRange(){}}function a(u){return new r(u)}t.fromString=a})(DQ||(DQ={}));var nNe=(t=>(t[t.Dependencies=1]="Dependencies",t[t.DevDependencies=2]="DevDependencies",t[t.PeerDependencies=4]="PeerDependencies",t[t.OptionalDependencies=8]="OptionalDependencies",t[t.All=15]="All",t))(nNe||{}),rNe=(t=>(t[t.Off=0]="Off",t[t.On=1]="On",t[t.Auto=2]="Auto",t))(rNe||{}),sNe=(t=>(t[t.Semantic=0]="Semantic",t[t.PartialSemantic=1]="PartialSemantic",t[t.Syntactic=2]="Syntactic",t))(sNe||{}),Fm={},oNe=(t=>(t.Original="original",t.TwentyTwenty="2020",t))(oNe||{}),Nue=(t=>(t.All="All",t.SortAndCombine="SortAndCombine",t.RemoveUnused="RemoveUnused",t))(Nue||{}),Lue=(t=>(t[t.Invoked=1]="Invoked",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.TriggerForIncompleteCompletions=3]="TriggerForIncompleteCompletions",t))(Lue||{}),aNe=(t=>(t.Type="Type",t.Parameter="Parameter",t.Enum="Enum",t))(aNe||{}),lNe=(t=>(t.none="none",t.definition="definition",t.reference="reference",t.writtenReference="writtenReference",t))(lNe||{}),cNe=(t=>(t[t.None=0]="None",t[t.Block=1]="Block",t[t.Smart=2]="Smart",t))(cNe||{}),Pue=(t=>(t.Ignore="ignore",t.Insert="insert",t.Remove="remove",t))(Pue||{});function EQ(t){return{indentSize:4,tabSize:4,newLineCharacter:t||` +`,convertTabsToSpaces:!0,indentStyle:2,insertSpaceAfterConstructor:!1,insertSpaceAfterCommaDelimiter:!0,insertSpaceAfterSemicolonInForStatements:!0,insertSpaceBeforeAndAfterBinaryOperators:!0,insertSpaceAfterKeywordsInControlFlowStatements:!0,insertSpaceAfterFunctionKeywordForAnonymousFunctions:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces:!0,insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces:!1,insertSpaceBeforeFunctionParenthesis:!1,placeOpenBraceOnNewLineForFunctions:!1,placeOpenBraceOnNewLineForControlBlocks:!1,semicolons:"ignore",trimTrailingWhitespace:!0,indentSwitchCase:!0}}var VXe=EQ(` +`),IQ=(t=>(t[t.aliasName=0]="aliasName",t[t.className=1]="className",t[t.enumName=2]="enumName",t[t.fieldName=3]="fieldName",t[t.interfaceName=4]="interfaceName",t[t.keyword=5]="keyword",t[t.lineBreak=6]="lineBreak",t[t.numericLiteral=7]="numericLiteral",t[t.stringLiteral=8]="stringLiteral",t[t.localName=9]="localName",t[t.methodName=10]="methodName",t[t.moduleName=11]="moduleName",t[t.operator=12]="operator",t[t.parameterName=13]="parameterName",t[t.propertyName=14]="propertyName",t[t.punctuation=15]="punctuation",t[t.space=16]="space",t[t.text=17]="text",t[t.typeParameterName=18]="typeParameterName",t[t.enumMemberName=19]="enumMemberName",t[t.functionName=20]="functionName",t[t.regularExpressionLiteral=21]="regularExpressionLiteral",t[t.link=22]="link",t[t.linkName=23]="linkName",t[t.linkText=24]="linkText",t))(IQ||{}),uNe=(t=>(t[t.None=0]="None",t[t.MayIncludeAutoImports=1]="MayIncludeAutoImports",t[t.IsImportStatementCompletion=2]="IsImportStatementCompletion",t[t.IsContinuation=4]="IsContinuation",t[t.ResolvedModuleSpecifiers=8]="ResolvedModuleSpecifiers",t[t.ResolvedModuleSpecifiersBeyondLimit=16]="ResolvedModuleSpecifiersBeyondLimit",t[t.MayIncludeMethodSnippets=32]="MayIncludeMethodSnippets",t))(uNe||{}),dNe=(t=>(t.Comment="comment",t.Region="region",t.Code="code",t.Imports="imports",t))(dNe||{}),fNe=(t=>(t[t.JavaScript=0]="JavaScript",t[t.SourceMap=1]="SourceMap",t[t.Declaration=2]="Declaration",t))(fNe||{}),hNe=(t=>(t[t.None=0]="None",t[t.InMultiLineCommentTrivia=1]="InMultiLineCommentTrivia",t[t.InSingleQuoteStringLiteral=2]="InSingleQuoteStringLiteral",t[t.InDoubleQuoteStringLiteral=3]="InDoubleQuoteStringLiteral",t[t.InTemplateHeadOrNoSubstitutionTemplate=4]="InTemplateHeadOrNoSubstitutionTemplate",t[t.InTemplateMiddleOrTail=5]="InTemplateMiddleOrTail",t[t.InTemplateSubstitutionPosition=6]="InTemplateSubstitutionPosition",t))(hNe||{}),_Ne=(t=>(t[t.Punctuation=0]="Punctuation",t[t.Keyword=1]="Keyword",t[t.Operator=2]="Operator",t[t.Comment=3]="Comment",t[t.Whitespace=4]="Whitespace",t[t.Identifier=5]="Identifier",t[t.NumberLiteral=6]="NumberLiteral",t[t.BigIntLiteral=7]="BigIntLiteral",t[t.StringLiteral=8]="StringLiteral",t[t.RegExpLiteral=9]="RegExpLiteral",t))(_Ne||{}),pNe=(t=>(t.unknown="",t.warning="warning",t.keyword="keyword",t.scriptElement="script",t.moduleElement="module",t.classElement="class",t.localClassElement="local class",t.interfaceElement="interface",t.typeElement="type",t.enumElement="enum",t.enumMemberElement="enum member",t.variableElement="var",t.localVariableElement="local var",t.variableUsingElement="using",t.variableAwaitUsingElement="await using",t.functionElement="function",t.localFunctionElement="local function",t.memberFunctionElement="method",t.memberGetAccessorElement="getter",t.memberSetAccessorElement="setter",t.memberVariableElement="property",t.memberAccessorVariableElement="accessor",t.constructorImplementationElement="constructor",t.callSignatureElement="call",t.indexSignatureElement="index",t.constructSignatureElement="construct",t.parameterElement="parameter",t.typeParameterElement="type parameter",t.primitiveType="primitive type",t.label="label",t.alias="alias",t.constElement="const",t.letElement="let",t.directory="directory",t.externalModuleName="external module name",t.jsxAttribute="JSX attribute",t.string="string",t.link="link",t.linkName="link name",t.linkText="link text",t))(pNe||{}),gNe=(t=>(t.none="",t.publicMemberModifier="public",t.privateMemberModifier="private",t.protectedMemberModifier="protected",t.exportedModifier="export",t.ambientModifier="declare",t.staticModifier="static",t.abstractModifier="abstract",t.optionalModifier="optional",t.deprecatedModifier="deprecated",t.dtsModifier=".d.ts",t.tsModifier=".ts",t.tsxModifier=".tsx",t.jsModifier=".js",t.jsxModifier=".jsx",t.jsonModifier=".json",t.dmtsModifier=".d.mts",t.mtsModifier=".mts",t.mjsModifier=".mjs",t.dctsModifier=".d.cts",t.ctsModifier=".cts",t.cjsModifier=".cjs",t))(gNe||{}),mNe=(t=>(t.comment="comment",t.identifier="identifier",t.keyword="keyword",t.numericLiteral="number",t.bigintLiteral="bigint",t.operator="operator",t.stringLiteral="string",t.whiteSpace="whitespace",t.text="text",t.punctuation="punctuation",t.className="class name",t.enumName="enum name",t.interfaceName="interface name",t.moduleName="module name",t.typeParameterName="type parameter name",t.typeAliasName="type alias name",t.parameterName="parameter name",t.docCommentTagName="doc comment tag name",t.jsxOpenTagName="jsx open tag name",t.jsxCloseTagName="jsx close tag name",t.jsxSelfClosingTagName="jsx self closing tag name",t.jsxAttribute="jsx attribute",t.jsxText="jsx text",t.jsxAttributeStringLiteralValue="jsx attribute string literal value",t))(mNe||{}),Aue=(t=>(t[t.comment=1]="comment",t[t.identifier=2]="identifier",t[t.keyword=3]="keyword",t[t.numericLiteral=4]="numericLiteral",t[t.operator=5]="operator",t[t.stringLiteral=6]="stringLiteral",t[t.regularExpressionLiteral=7]="regularExpressionLiteral",t[t.whiteSpace=8]="whiteSpace",t[t.text=9]="text",t[t.punctuation=10]="punctuation",t[t.className=11]="className",t[t.enumName=12]="enumName",t[t.interfaceName=13]="interfaceName",t[t.moduleName=14]="moduleName",t[t.typeParameterName=15]="typeParameterName",t[t.typeAliasName=16]="typeAliasName",t[t.parameterName=17]="parameterName",t[t.docCommentTagName=18]="docCommentTagName",t[t.jsxOpenTagName=19]="jsxOpenTagName",t[t.jsxCloseTagName=20]="jsxCloseTagName",t[t.jsxSelfClosingTagName=21]="jsxSelfClosingTagName",t[t.jsxAttribute=22]="jsxAttribute",t[t.jsxText=23]="jsxText",t[t.jsxAttributeStringLiteralValue=24]="jsxAttributeStringLiteralValue",t[t.bigintLiteral=25]="bigintLiteral",t))(Aue||{}),jh=zy(99,!0),vNe=(t=>(t[t.None=0]="None",t[t.Value=1]="Value",t[t.Type=2]="Type",t[t.Namespace=4]="Namespace",t[t.All=7]="All",t))(vNe||{});function NQ(t){switch(t.kind){case 260:return Xn(t)&&cse(t)?7:1;case 169:case 208:case 172:case 171:case 303:case 304:case 174:case 173:case 176:case 177:case 178:case 262:case 218:case 219:case 299:case 291:return 1;case 168:case 264:case 265:case 187:return 2;case 346:return t.name===void 0?3:2;case 306:case 263:return 3;case 267:return Bh(t)||Yb(t)===1?5:4;case 266:case 275:case 276:case 271:case 272:case 277:case 278:return 7;case 307:return 5}return 7}function EI(t){t=$ue(t);const r=t.parent;return t.kind===307?1:Ec(r)||gh(r)||Kb(r)||m_(r)||$0(r)||kd(r)&&t===r.name?7:LQ(t)?n6t(t):F1(t)?NQ(r):A_(t)&&Xi(t,lg(S7,HL,$k))?7:a6t(t)?2:r6t(t)?4:Uc(r)?(z.assert(Rm(r.parent)),2):gS(r)?3:1}function n6t(t){const r=t.kind===166?t:__(t.parent)&&t.parent.right===t?t.parent:void 0;return r&&r.parent.kind===271?7:4}function LQ(t){for(;t.parent.kind===166;)t=t.parent;return $L(t.parent)&&t.parent.moduleReference===t}function r6t(t){return s6t(t)||o6t(t)}function s6t(t){let r=t,a=!0;if(r.parent.kind===166){for(;r.parent&&r.parent.kind===166;)r=r.parent;a=r.right===t}return r.parent.kind===183&&!a}function o6t(t){let r=t,a=!0;if(r.parent.kind===211){for(;r.parent&&r.parent.kind===211;)r=r.parent;a=r.name===t}if(!a&&r.parent.kind===233&&r.parent.parent.kind===298){const u=r.parent.parent.parent;return u.kind===263&&r.parent.parent.token===119||u.kind===264&&r.parent.parent.token===96}return!1}function a6t(t){switch(B8(t)&&(t=t.parent),t.kind){case 110:return!z0(t);case 197:return!0}switch(t.parent.kind){case 183:return!0;case 205:return!t.parent.isTypeOf;case 233:return Lv(t.parent)}return!1}function Oue(t,r=!1,a=!1){return sH(t,sa,Rue,r,a)}function iF(t,r=!1,a=!1){return sH(t,GT,Rue,r,a)}function Mue(t,r=!1,a=!1){return sH(t,Dv,Rue,r,a)}function yNe(t,r=!1,a=!1){return sH(t,KT,l6t,r,a)}function bNe(t,r=!1,a=!1){return sH(t,jd,Rue,r,a)}function CNe(t,r=!1,a=!1){return sH(t,eh,c6t,r,a)}function Rue(t){return t.expression}function l6t(t){return t.tag}function c6t(t){return t.tagName}function sH(t,r,a,u,h){let p=u?SNe(t):PQ(t);return h&&(p=ld(p)),!!p&&!!p.parent&&r(p.parent)&&a(p.parent)===p}function PQ(t){return P3(t)?t.parent:t}function SNe(t){return P3(t)||Vue(t)?t.parent:t}function AQ(t,r){for(;t;){if(t.kind===256&&t.label.escapedText===r)return t.label;t=t.parent}}function oH(t,r){return Ir(t.expression)?t.expression.name.text===r:!1}function aH(t){var r;return lt(t)&&((r=$r(t.parent,s8))==null?void 0:r.label)===t}function Fue(t){var r;return lt(t)&&((r=$r(t.parent,ix))==null?void 0:r.label)===t}function Bue(t){return Fue(t)||aH(t)}function Wue(t){var r;return((r=$r(t.parent,k6))==null?void 0:r.tagName)===t}function wNe(t){var r;return((r=$r(t.parent,__))==null?void 0:r.right)===t}function P3(t){var r;return((r=$r(t.parent,Ir))==null?void 0:r.name)===t}function Vue(t){var r;return((r=$r(t.parent,wc))==null?void 0:r.argumentExpression)===t}function Hue(t){var r;return((r=$r(t.parent,qu))==null?void 0:r.name)===t}function jue(t){var r;return lt(t)&&((r=$r(t.parent,Bo))==null?void 0:r.name)===t}function OQ(t){switch(t.parent.kind){case 172:case 171:case 303:case 306:case 174:case 173:case 177:case 178:case 267:return ko(t.parent)===t;case 212:return t.parent.argumentExpression===t;case 167:return!0;case 201:return t.parent.parent.kind===199;default:return!1}}function xNe(t){return Lk(t.parent.parent)&&C8(t.parent.parent)===t}function II(t){for(Em(t)&&(t=t.parent.parent);;){if(t=t.parent,!t)return;switch(t.kind){case 307:case 174:case 173:case 262:case 218:case 177:case 178:case 263:case 264:case 266:case 267:return t}}}function oD(t){switch(t.kind){case 307:return Td(t)?"module":"script";case 267:return"module";case 263:case 231:return"class";case 264:return"interface";case 265:case 338:case 346:return"type";case 266:return"enum";case 260:return r(t);case 208:return r(Ov(t));case 219:case 262:case 218:return"function";case 177:return"getter";case 178:return"setter";case 174:case 173:return"method";case 303:const{initializer:a}=t;return Bo(a)?"method":"property";case 172:case 171:case 304:case 305:return"property";case 181:return"index";case 180:return"construct";case 179:return"call";case 176:case 175:return"constructor";case 168:return"type parameter";case 306:return"enum member";case 169:return Kr(t,31)?"property":"parameter";case 271:case 276:case 281:case 274:case 280:return"alias";case 226:const u=Lu(t),{right:h}=t;switch(u){case 7:case 8:case 9:case 0:return"";case 1:case 2:const m=oD(h);return m===""?"const":m;case 3:return gc(h)?"method":"property";case 4:return"property";case 5:return gc(h)?"method":"property";case 6:return"local class";default:return""}case 80:return $0(t.parent)?"alias":"";case 277:const p=oD(t.expression);return p===""?"const":p;default:return""}function r(a){return L6(a)?"const":oJ(a)?"let":"var"}}function A3(t){switch(t.kind){case 110:return!0;case 80:return Toe(t)&&t.parent.kind===169;default:return!1}}var u6t=/^\/\/\/\s*=a.end}function uH(t,r,a){return t.pos<=r&&t.end>=a}function nF(t,r,a){return RQ(t.pos,t.end,r,a)}function MQ(t,r,a,u){return RQ(t.getStart(r),t.end,a,u)}function RQ(t,r,a,u){const h=Math.max(t,a),p=Math.min(r,u);return hu.kind===r)}function FQ(t){const r=Me(t.parent.getChildren(),a=>d3(a)&&yg(a,t));return z.assert(!r||Mt(r.getChildren(),t)),r}function HXe(t){return t.kind===90}function d6t(t){return t.kind===86}function f6t(t){return t.kind===100}function h6t(t){if(Af(t))return t.name;if(xd(t)){const r=t.modifiers&&Me(t.modifiers,HXe);if(r)return r}if(wd(t)){const r=Me(t.getChildren(),d6t);if(r)return r}}function _6t(t){if(Af(t))return t.name;if(Uu(t)){const r=Me(t.modifiers,HXe);if(r)return r}if(gc(t)){const r=Me(t.getChildren(),f6t);if(r)return r}}function p6t(t){let r;return Xi(t,a=>(gs(a)&&(r=a),!__(a.parent)&&!gs(a.parent)&&!xT(a.parent))),r}function BQ(t,r){if(t.flags&16777216)return;const a=iX(t,r);if(a)return a;const u=p6t(t);return u&&r.getTypeAtLocation(u)}function g6t(t,r){if(!r)switch(t.kind){case 263:case 231:return h6t(t);case 262:case 218:return _6t(t);case 176:return t}if(Af(t))return t.name}function jXe(t,r){if(t.importClause){if(t.importClause.name&&t.importClause.namedBindings)return;if(t.importClause.name)return t.importClause.name;if(t.importClause.namedBindings){if(zv(t.importClause.namedBindings)){const a=a_(t.importClause.namedBindings.elements);return a?a.name:void 0}else if(eb(t.importClause.namedBindings))return t.importClause.namedBindings.name}}if(!r)return t.moduleSpecifier}function zXe(t,r){if(t.exportClause){if(Yg(t.exportClause))return a_(t.exportClause.elements)?t.exportClause.elements[0].name:void 0;if(H1(t.exportClause))return t.exportClause.name}if(!r)return t.moduleSpecifier}function m6t(t){if(t.types.length===1)return t.types[0].expression}function UXe(t,r){const{parent:a}=t;if(Ra(t)&&(r||t.kind!==90)?_0(a)&&Mt(a.modifiers,t):t.kind===86?xd(a)||wd(t):t.kind===100?Uu(a)||gc(t):t.kind===120?Ff(a):t.kind===94?Uk(a):t.kind===156?Mm(a):t.kind===145||t.kind===144?qu(a):t.kind===102?kd(a):t.kind===139?hg(a):t.kind===153&&Np(a)){const u=g6t(a,r);if(u)return u}if((t.kind===115||t.kind===87||t.kind===121)&&wf(a)&&a.declarations.length===1){const u=a.declarations[0];if(lt(u.name))return u.name}if(t.kind===156){if($0(a)&&a.isTypeOnly){const u=jXe(a.parent,r);if(u)return u}if($u(a)&&a.isTypeOnly){const u=zXe(a,r);if(u)return u}}if(t.kind===130){if(m_(a)&&a.propertyName||gh(a)&&a.propertyName||eb(a)||H1(a))return a.name;if($u(a)&&a.exportClause&&H1(a.exportClause))return a.exportClause.name}if(t.kind===102&&Cu(a)){const u=jXe(a,r);if(u)return u}if(t.kind===95){if($u(a)){const u=zXe(a,r);if(u)return u}if(Ec(a))return ld(a.expression)}if(t.kind===149&&Kb(a))return a.expression;if(t.kind===161&&(Cu(a)||$u(a))&&a.moduleSpecifier)return a.moduleSpecifier;if((t.kind===96||t.kind===119)&&Lp(a)&&a.token===t.kind){const u=m6t(a);if(u)return u}if(t.kind===96){if(Uc(a)&&a.constraint&&_g(a.constraint))return a.constraint.typeName;if($T(a)&&_g(a.extendsType))return a.extendsType.typeName}if(t.kind===140&&hI(a))return a.typeParameter.name;if(t.kind===103&&Uc(a)&&pI(a.parent))return a.name;if(t.kind===143&&Hk(a)&&a.operator===143&&_g(a.type))return a.type.typeName;if(t.kind===148&&Hk(a)&&a.operator===148&&fV(a.type)&&_g(a.type.elementType))return a.type.elementType.typeName;if(!r){if((t.kind===105&>(a)||t.kind===116&&EP(a)||t.kind===114&&o3(a)||t.kind===135&&ex(a)||t.kind===127&&jG(a)||t.kind===91&&X2e(a))&&a.expression)return ld(a.expression);if((t.kind===103||t.kind===104)&&cr(a)&&a.operatorToken===t)return ld(a.right);if(t.kind===130&&_7(a)&&_g(a.type))return a.type.typeName;if(t.kind===103&&qG(a)||t.kind===165&&hV(a))return ld(a.expression)}return t}function $ue(t){return UXe(t,!1)}function WQ(t){return UXe(t,!0)}function j_(t,r){return O3(t,r,a=>Av(a)||d_(a.kind)||Vs(a))}function O3(t,r,a){return qXe(t,r,!1,a,!1)}function Rs(t,r){return qXe(t,r,!0,void 0,!1)}function qXe(t,r,a,u,h){let p=t,m;e:for(;;){const b=p.getChildren(t),T=QC(b,r,(E,N)=>N,(E,N)=>{const R=b[E].getEnd();if(Rr?1:C(b[E],F,R)?b[E-1]&&C(b[E-1])?1:0:u&&F===r&&b[E-1]&&b[E-1].getEnd()===r&&C(b[E-1])?1:-1});if(m)return m;if(T>=0&&b[T]){p=b[T];continue e}return p}function C(b,T,E){if(E??(E=b.getEnd()),Er))return!1;if(ra.getStart(t)&&r(p.pos<=t.pos&&p.end>t.end||p.pos===t.end)&&ONe(p,a)?u(p):void 0)}}function Dd(t,r,a,u){const h=p(a||r);return z.assert(!(h&&HQ(h))),h;function p(m){if($Xe(m)&&m.kind!==1)return m;const C=m.getChildren(r),b=QC(C,t,(E,N)=>N,(E,N)=>t=C[E-1].end?0:1:-1);if(b>=0&&C[b]){const E=C[b];if(t=t||!ONe(E,r)||HQ(E)){const F=INe(C,b,r,m.kind);return F?!u&&U$(F)&&F.getChildren(r).length?p(F):ENe(F,r):void 0}else return p(E)}z.assert(a!==void 0||m.kind===307||m.kind===1||U$(m));const T=INe(C,C.length,r,m.kind);return T&&ENe(T,r)}}function $Xe(t){return RL(t)&&!HQ(t)}function ENe(t,r){if($Xe(t))return t;const a=t.getChildren(r);if(a.length===0)return t;const u=INe(a,a.length,r,t.kind);return u&&ENe(u,r)}function INe(t,r,a,u){for(let h=r-1;h>=0;h--){const p=t[h];if(HQ(p))h===0&&(u===12||u===285)&&z.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`");else if(ONe(t[h],a))return t[h]}}function JP(t,r,a=Dd(r,t)){if(a&&gse(a)){const u=a.getStart(t),h=a.getEnd();if(ua.getStart(t)}function LNe(t,r){const a=Rs(t,r);return!!(yP(a)||a.kind===19&&b7(a.parent)&&tb(a.parent.parent)||a.kind===30&&eh(a.parent)&&tb(a.parent.parent))}function jQ(t,r){function a(u){for(;u;)if(u.kind>=285&&u.kind<=294||u.kind===12||u.kind===30||u.kind===32||u.kind===80||u.kind===20||u.kind===19||u.kind===44)u=u.parent;else if(u.kind===284){if(r>u.getStart(t))return!0;u=u.parent}else return!1;return!1}return a(Rs(t,r))}function zQ(t,r,a){const u=Ta(t.kind),h=Ta(r),p=t.getFullStart(),m=a.text.lastIndexOf(h,p);if(m===-1)return;if(a.text.lastIndexOf(u,p-1)!!p.typeParameters&&p.typeParameters.length>=r)}function Kue(t,r){if(r.text.lastIndexOf("<",t?t.pos:r.text.length)===-1)return;let a=t,u=0,h=0;for(;a;){switch(a.kind){case 30:if(a=Dd(a.getFullStart(),r),a&&a.kind===29&&(a=Dd(a.getFullStart(),r)),!a||!lt(a))return;if(!u)return F1(a)?void 0:{called:a,nTypeArguments:h};u--;break;case 50:u=3;break;case 49:u=2;break;case 32:u++;break;case 20:if(a=zQ(a,19,r),!a)return;break;case 22:if(a=zQ(a,21,r),!a)return;break;case 24:if(a=zQ(a,23,r),!a)return;break;case 28:h++;break;case 39:case 80:case 11:case 9:case 10:case 112:case 97:case 114:case 96:case 143:case 25:case 52:case 58:case 59:break;default:if(gs(a))break;return}a=Dd(a.getFullStart(),r)}}function bS(t,r,a){return gd.getRangeOfEnclosingComment(t,r,void 0,a)}function ANe(t,r){const a=Rs(t,r);return!!Xi(a,G0)}function ONe(t,r){return t.kind===1?!!t.jsDoc:t.getWidth(r)!==0}function rF(t,r=0){const a=[],u=Yf(t)?rse(t)&~r:0;return u&2&&a.push("private"),u&4&&a.push("protected"),u&1&&a.push("public"),(u&256||bu(t))&&a.push("static"),u&64&&a.push("abstract"),u&32&&a.push("export"),u&65536&&a.push("deprecated"),t.flags&33554432&&a.push("declare"),t.kind===277&&a.push("export"),a.length>0?a.join(","):""}function MNe(t){if(t.kind===183||t.kind===213)return t.typeArguments;if(Bo(t)||t.kind===263||t.kind===264)return t.typeParameters}function UQ(t){return t===2||t===3}function Que(t){return!!(t===11||t===14||Ww(t))}function JXe(t,r,a){return!!(r.flags&4)&&t.isEmptyAnonymousObjectType(a)}function RNe(t){if(!t.isIntersection())return!1;const{types:r,checker:a}=t;return r.length===2&&(JXe(a,r[0],r[1])||JXe(a,r[1],r[0]))}function hH(t,r,a){return Ww(t.kind)&&t.getStart(a){const a=Tl(r);return!t[a]&&(t[a]=!0)}}function GP(t){return t.getText(0,t.getLength())}function pH(t,r){let a="";for(let u=0;u!r.isDeclarationFile&&!t.isSourceFileFromExternalLibrary(r)&&!!(r.externalModuleIndicator||r.commonJsModuleIndicator))}function VNe(t){return t.getSourceFiles().some(r=>!r.isDeclarationFile&&!t.isSourceFileFromExternalLibrary(r)&&!!r.externalModuleIndicator)}function sde(t){return!!t.module||il(t)>=2||!!t.noEmit}function KP(t,r){return{fileExists:a=>t.fileExists(a),getCurrentDirectory:()=>r.getCurrentDirectory(),readFile:la(r,r.readFile),useCaseSensitiveFileNames:la(r,r.useCaseSensitiveFileNames),getSymlinkCache:la(r,r.getSymlinkCache)||t.getSymlinkCache,getModuleSpecifierCache:la(r,r.getModuleSpecifierCache),getPackageJsonInfoCache:()=>{var a;return(a=t.getModuleResolutionCache())==null?void 0:a.getPackageJsonInfoCache()},getGlobalTypingsCacheLocation:la(r,r.getGlobalTypingsCacheLocation),redirectTargetsMap:t.redirectTargetsMap,getProjectReferenceRedirect:a=>t.getProjectReferenceRedirect(a),isSourceOfProjectReferenceRedirect:a=>t.isSourceOfProjectReferenceRedirect(a),getNearestAncestorDirectoryWithPackageJson:la(r,r.getNearestAncestorDirectoryWithPackageJson),getFileIncludeReasons:()=>t.getFileIncludeReasons(),getCommonSourceDirectory:()=>t.getCommonSourceDirectory()}}function ode(t,r){return{...KP(t,r),getCommonSourceDirectory:()=>t.getCommonSourceDirectory()}}function GQ(t){return t===2||t>=3&&t<=99||t===100}function ux(t,r,a,u,h){return G.createImportDeclaration(void 0,t||r?G.createImportClause(!!h,t,r&&r.length?G.createNamedImports(r):void 0):void 0,typeof a=="string"?oF(a,u):a,void 0)}function oF(t,r){return G.createStringLiteral(t,r===0)}var HNe=(t=>(t[t.Single=0]="Single",t[t.Double=1]="Double",t))(HNe||{});function ade(t,r){return SJ(t,r)?1:0}function bg(t,r){if(r.quotePreference&&r.quotePreference!=="auto")return r.quotePreference==="single"?0:1;{const a=aS(t)&&t.imports&&Me(t.imports,u=>ja(u)&&!oc(u.parent));return a?ade(a,t):1}}function lde(t){switch(t){case 0:return"'";case 1:return'"';default:return z.assertNever(t)}}function cde(t){const r=KQ(t);return r===void 0?void 0:Ws(r)}function KQ(t){return t.escapedName!=="default"?t.escapedName:Z(t.declarations,r=>{const a=ko(r);return a&&a.kind===80?a.escapedText:void 0})}function QQ(t){return Ml(t)&&(Kb(t.parent)||Cu(t.parent)||$v(t.parent)||B_(t.parent,!1)&&t.parent.arguments[0]===t||Gp(t.parent)&&t.parent.arguments[0]===t)}function mH(t){return nl(t)&&pg(t.parent)&<(t.name)&&!t.propertyName}function XQ(t,r){const a=t.getTypeAtLocation(r.parent);return a&&t.getPropertyOfType(a,r.name.text)}function vH(t,r,a){if(t)for(;t.parent;){if(Ns(t.parent)||!v6t(a,t.parent,r))return t;t=t.parent}}function v6t(t,r,a){return nse(t,r.getStart(a))&&r.getEnd()<=zu(t)}function R3(t,r){return _0(t)?Me(t.modifiers,a=>a.kind===r):void 0}function ude(t,r,a,u,h){var p;const C=(Lo(a)?a[0]:a).kind===243?hW:zL,b=Ri(r.statements,C),{comparer:T,isSorted:E}=c2.getOrganizeImportsStringComparerWithDetection(b,h),N=Lo(a)?$p(a,(R,F)=>c2.compareImportsOrRequireStatements(R,F,T)):[a];if(!(b!=null&&b.length)){if(aS(r))t.insertNodesAtTopOfFile(r,N,u);else for(const R of N)t.insertStatementsInNewFile(r.fileName,[R],(p=uu(R))==null?void 0:p.getSourceFile());return}if(z.assert(aS(r)),b&&E)for(const R of N){const F=c2.getImportDeclarationInsertionIndex(b,R,T);if(F===0){const j=b[0]===r.statements[0]?{leadingTriviaOption:er.LeadingTriviaOption.Exclude}:{};t.insertNodeBefore(r,b[0],R,!1,j)}else{const j=b[F-1];t.insertNodeAfter(r,j,R)}}else{const R=Ql(b);R?t.insertNodesAfter(r,R,N):t.insertNodesAtTopOfFile(r,N,u)}}function dde(t,r){return z.assert(t.isTypeOnly),ua(t.getChildAt(0,r),nde)}function F3(t,r){return!!t&&!!r&&t.start===r.start&&t.length===r.length}function fde(t,r,a){return(a?UE:yk)(t.fileName,r.fileName)&&F3(t.textSpan,r.textSpan)}function hde(t){return(r,a)=>fde(r,a,t)}function _de(t,r){if(t){for(let a=0;aGs(a)?!0:nl(a)||pg(a)||mS(a)?!1:"quit")}var zNe=y6t();function y6t(){const t=h8*10;let r,a,u,h;E();const p=N=>C(N,17);return{displayParts:()=>{const N=r.length&&r[r.length-1].text;return h>t&&N&&N!=="..."&&(Vy(N.charCodeAt(N.length-1))||r.push(ip(" ",16)),r.push(ip("...",15))),r},writeKeyword:N=>C(N,5),writeOperator:N=>C(N,12),writePunctuation:N=>C(N,15),writeTrailingSemicolon:N=>C(N,15),writeSpace:N=>C(N,16),writeStringLiteral:N=>C(N,8),writeParameter:N=>C(N,13),writeProperty:N=>C(N,14),writeLiteral:N=>C(N,8),writeSymbol:b,writeLine:T,write:p,writeComment:p,getText:()=>"",getTextPos:()=>0,getColumn:()=>0,getLine:()=>0,isAtStartOfLine:()=>!1,hasTrailingWhitespace:()=>!1,hasTrailingComment:()=>!1,rawWrite:pa,getIndent:()=>u,increaseIndent:()=>{u++},decreaseIndent:()=>{u--},clear:E};function m(){if(!(h>t)&&a){const N=PJ(u);N&&(h+=N.length,r.push(ip(N,16))),a=!1}}function C(N,R){h>t||(m(),h+=N.length,r.push(ip(N,R)))}function b(N,R){h>t||(m(),h+=N.length,r.push(UNe(N,R)))}function T(){h>t||(h+=1,r.push(B3()),a=!0)}function E(){r=[],a=!0,u=0,h=0}}function UNe(t,r){return ip(t,a(r));function a(u){const h=u.flags;return h&3?gde(u)?13:9:h&4||h&32768||h&65536?14:h&8?19:h&16?20:h&32?1:h&64?4:h&384?2:h&1536?11:h&8192?10:h&262144?18:h&524288||h&2097152?0:17}}function ip(t,r){return{text:t,kind:IQ[r]}}function ku(){return ip(" ",16)}function Ap(t){return ip(Ta(t),5)}function bh(t){return ip(Ta(t),15)}function lF(t){return ip(Ta(t),12)}function qNe(t){return ip(t,13)}function $Ne(t){return ip(t,14)}function mde(t){const r=bT(t);return r===void 0?Cg(t):Ap(r)}function Cg(t){return ip(t,17)}function JNe(t){return ip(t,0)}function GNe(t){return ip(t,18)}function YQ(t){return ip(t,24)}function KNe(t,r){return{text:t,kind:IQ[23],target:{fileName:_n(r).fileName,textSpan:b_(r)}}}function vde(t){return ip(t,22)}function QNe(t,r){var a;const u=rTe(t)?"link":sTe(t)?"linkcode":"linkplain",h=[vde(`{@${u} `)];if(!t.name)t.text&&h.push(YQ(t.text));else{const p=r==null?void 0:r.getSymbolAtLocation(t.name),m=p&&r?Cde(p,r):void 0,C=C6t(t.text),b=yu(t.name)+t.text.slice(0,C),T=b6t(t.text.slice(C)),E=(m==null?void 0:m.valueDeclaration)||((a=m==null?void 0:m.declarations)==null?void 0:a[0]);if(E)h.push(KNe(b,E)),T&&h.push(YQ(T));else{const N=C===0||t.text.charCodeAt(C)===124&&b.charCodeAt(b.length-1)!==32?" ":"";h.push(YQ(b+N+T))}}return h.push(vde("}")),h}function b6t(t){let r=0;if(t.charCodeAt(r++)===124){for(;r"&&a--,u++,!a)return u}return 0}var S6t=` +`;function SS(t,r){var a;return(r==null?void 0:r.newLineCharacter)||((a=t.getNewLine)==null?void 0:a.call(t))||S6t}function B3(){return ip(` +`,6)}function dx(t){try{return t(zNe),zNe.displayParts()}finally{zNe.clear()}}function yH(t,r,a,u=0){return dx(h=>{t.writeType(r,a,u|1024|16384,h)})}function cF(t,r,a,u,h=0){return dx(p=>{t.writeSymbol(r,a,u,h|8,p)})}function yde(t,r,a,u=0){return u|=25632,dx(h=>{t.writeSignature(r,a,u,void 0,h)})}function KXe(t,r){const a=r.getSourceFile();return dx(u=>{QK().writeNode(4,t,a,u)})}function XNe(t){return!!t.parent&&FL(t.parent)&&t.parent.propertyName===t}function bde(t,r){return dG(t,r.getScriptKind&&r.getScriptKind(t))}function Cde(t,r){let a=t;for(;w6t(a)||M1(a)&&a.links.target;)M1(a)&&a.links.target?a=a.links.target:a=Of(a,r);return a}function w6t(t){return(t.flags&2097152)!==0}function ZNe(t,r){return Aa(Of(t,r))}function YNe(t,r){for(;Vy(t.charCodeAt(r));)r+=1;return r}function eX(t,r){for(;r>-1&&Tv(t.charCodeAt(r));)r-=1;return r+1}function Pl(t,r=!0){const a=t&&QXe(t);return a&&!r&&Op(a),$b(a,!1)}function bH(t,r,a){let u=a(t);return u?Er(u,t):u=QXe(t,a),u&&!r&&Op(u),u}function QXe(t,r){const a=r?p=>bH(p,!0,r):Pl,h=cn(t,a,void 0,r?p=>p&&Sde(p,!0,r):p=>p&&lD(p),a);if(h===t){const p=ja(t)?Er(G.createStringLiteralFromNode(t),t):W_(t)?Er(G.createNumericLiteral(t.text,t.numericLiteralFlags),t):G.cloneNode(t);return zt(p,t)}return h.parent=void 0,h}function lD(t,r=!0){if(t){const a=G.createNodeArray(t.map(u=>Pl(u,r)),t.hasTrailingComma);return zt(a,t),a}return t}function Sde(t,r,a){return G.createNodeArray(t.map(u=>bH(u,r,a)),t.hasTrailingComma)}function Op(t){wde(t),eLe(t)}function wde(t){tLe(t,1024,k6t)}function eLe(t){tLe(t,2048,Hoe)}function NI(t,r){const a=t.getSourceFile(),u=a.text;x6t(t,u)?W3(t,r,a):SH(t,r,a),uF(t,r,a)}function x6t(t,r){const a=t.getFullStart(),u=t.getStart();for(let h=a;hr)}function LI(t,r){let a=t;for(let u=1;!Y$(r,a);u++)a=`${t}_${u}`;return a}function CH(t,r,a,u){let h=0,p=-1;for(const{fileName:m,textChanges:C}of t){z.assert(m===r);for(const b of C){const{span:T,newText:E}=b,N=T6t(E,B1(a));if(N!==-1&&(p=T.start+h+N,!u))return p;h+=E.length-T.length}}return z.assert(u),z.assert(p>=0),p}function W3(t,r,a,u,h){kB(a.text,t.pos,iLe(r,a,u,h,l7))}function uF(t,r,a,u,h){TB(a.text,t.end,iLe(r,a,u,h,NG))}function SH(t,r,a,u,h){TB(a.text,t.pos,iLe(r,a,u,h,l7))}function iLe(t,r,a,u,h){return(p,m,C,b)=>{C===3?(p+=2,m-=2):p+=2,h(t,a||C,r.text.slice(p,m),u!==void 0?u:b)}}function T6t(t,r){if(ro(t,r))return 0;let a=t.indexOf(" "+r);return a===-1&&(a=t.indexOf("."+r)),a===-1&&(a=t.indexOf('"'+r)),a===-1?-1:a+1}function tX(t){return cr(t)&&t.operatorToken.kind===28||Pa(t)||(_7(t)||zG(t))&&Pa(t.expression)}function iX(t,r,a){const u=Vb(t.parent);switch(u.kind){case 214:return r.getContextualType(u,a);case 226:{const{left:h,operatorToken:p,right:m}=u;return nX(p.kind)?r.getTypeAtLocation(t===m?h:m):r.getContextualType(t,a)}case 296:return kde(u,r);default:return r.getContextualType(t,a)}}function dF(t,r,a){const u=bg(t,r),h=JSON.stringify(a);return u===0?`'${Nm(h).replace(/'/g,()=>"\\'").replace(/\\"/g,'"')}'`:h}function nX(t){switch(t){case 37:case 35:case 38:case 36:return!0;default:return!1}}function nLe(t){switch(t.kind){case 11:case 15:case 228:case 215:return!0;default:return!1}}function xde(t){return!!t.getStringIndexType()||!!t.getNumberIndexType()}function kde(t,r){return r.getTypeAtLocation(t.parent.parent.expression)}var Tde="anonymous function";function fF(t,r,a,u){const h=a.getTypeChecker();let p=!0;const m=()=>p=!1,C=h.typeToTypeNode(t,r,1,{trackSymbol:(b,T,E)=>(p=p&&h.isSymbolAccessible(b,T,E,!1).accessibility===0,!p),reportInaccessibleThisError:m,reportPrivateInBaseOfClassExpression:m,reportInaccessibleUniqueSymbolError:m,moduleResolverHost:ode(a,u)});return p?C:void 0}function rLe(t){return t===179||t===180||t===181||t===171||t===173}function XXe(t){return t===262||t===176||t===174||t===177||t===178}function ZXe(t){return t===267}function rX(t){return t===243||t===244||t===246||t===251||t===252||t===253||t===257||t===259||t===172||t===265||t===272||t===271||t===278||t===270||t===277}var sLe=lg(rLe,XXe,ZXe,rX);function D6t(t,r){const a=t.getLastToken(r);if(a&&a.kind===27)return!1;if(rLe(t.kind)){if(a&&a.kind===28)return!1}else if(ZXe(t.kind)){const C=La(t.getChildren(r));if(C&&jv(C))return!1}else if(XXe(t.kind)){const C=La(t.getChildren(r));if(C&&IT(C))return!1}else if(!rX(t.kind))return!1;if(t.kind===246)return!0;const u=Xi(t,C=>!C.parent),h=aD(t,u,r);if(!h||h.kind===20)return!0;const p=r.getLineAndCharacterOfPosition(t.getEnd()).line,m=r.getLineAndCharacterOfPosition(h.getStart(r)).line;return p!==m}function sX(t,r,a){const u=Xi(r,h=>h.end!==t?"quit":sLe(h.kind));return!!u&&D6t(u,a)}function wH(t){let r=0,a=0;const u=5;return jo(t,function h(p){if(rX(p.kind)){const m=p.getLastToken(t);(m==null?void 0:m.kind)===27?r++:a++}else if(rLe(p.kind)){const m=p.getLastToken(t);if((m==null?void 0:m.kind)===27)r++;else if(m&&m.kind!==28){const C=Da(t,m.getStart(t)).line,b=Da(t,R1(t,m.end).start).line;C!==b&&a++}}return r+a>=u?!0:jo(p,h)}),r===0&&a<=1?!0:r/a>1/u}function oX(t,r){return cX(t,t.getDirectories,r)||[]}function Dde(t,r,a,u,h){return cX(t,t.readDirectory,r,a,u,h)||x}function xH(t,r){return cX(t,t.fileExists,r)}function aX(t,r){return lX(()=>U0(r,t))||!1}function lX(t){try{return t()}catch{return}}function cX(t,r,...a){return lX(()=>r&&r.apply(t,a))}function Ede(t,r,a){const u=[];return c0(t,h=>{if(h===a)return!0;const p=Hr(h,"package.json");xH(r,p)&&u.push(p)}),u}function oLe(t,r){let a;return c0(t,u=>{if(u==="node_modules"||(a=kce(u,h=>xH(r,h),"package.json"),a))return!0}),a}function aLe(t,r){if(!r.fileExists)return[];const a=[];return c0(rs(t),u=>{const h=Hr(u,"package.json");if(r.fileExists(h)){const p=Ide(h,r);p&&a.push(p)}}),a}function Ide(t,r){if(!r.readFile)return;const a=["dependencies","devDependencies","optionalDependencies","peerDependencies"],u=r.readFile(t)||"",h=UJ(u),p={};if(h)for(const b of a){const T=h[b];if(!T)continue;const E=new Map;for(const N in T)E.set(N,T[N]);p[b]=E}const m=[[1,p.dependencies],[2,p.devDependencies],[8,p.optionalDependencies],[4,p.peerDependencies]];return{...p,parseable:!!h,fileName:t,get:C,has(b,T){return!!C(b,T)}};function C(b,T=15){for(const[E,N]of m)if(N&&T&E){const R=N.get(b);if(R!==void 0)return R}}}function V3(t,r,a){const u=(a.getPackageJsonsVisibleToFile&&a.getPackageJsonsVisibleToFile(t.fileName)||aLe(t.fileName,a)).filter(j=>j.parseable);let h,p,m;return{allowsImportingAmbientModule:b,allowsImportingSourceFile:T,allowsImportingSpecifier:E};function C(j){const U=F(j);for(const q of u)if(q.has(U)||q.has(LK(U)))return!0;return!1}function b(j,U){if(!u.length||!j.valueDeclaration)return!0;if(!p)p=new Map;else{const ue=p.get(j);if(ue!==void 0)return ue}const q=Nm(j.getName());if(N(q))return p.set(j,!0),!0;const Q=j.valueDeclaration.getSourceFile(),re=R(Q.fileName,U);if(typeof re>"u")return p.set(j,!0),!0;const Y=C(re)||C(q);return p.set(j,Y),Y}function T(j,U){if(!u.length)return!0;if(!m)m=new Map;else{const re=m.get(j);if(re!==void 0)return re}const q=R(j.fileName,U);if(!q)return m.set(j,!0),!0;const Q=C(q);return m.set(j,Q),Q}function E(j){return!u.length||N(j)||cg(j)||Sp(j)?!0:C(j)}function N(j){return!!(aS(t)&&F_(t)&&Gv.nodeCoreModules.has(j)&&(h===void 0&&(h=uX(t)),h))}function R(j,U){if(!j.includes("node_modules"))return;const q=e2.getNodeModulesPackageName(a.getCompilationSettings(),t,j,U,r);if(q&&!cg(q)&&!Sp(q))return F(q)}function F(j){const U=Qd(F7(j)).slice(1);return ro(U[0],"@")?`${U[0]}/${U[1]}`:U[0]}}function uX(t){return Rt(t.imports,({text:r})=>Gv.nodeCoreModules.has(r))}function kH(t){return Mt(Qd(t),"node_modules")}function Nde(t){return t.file!==void 0&&t.start!==void 0&&t.length!==void 0}function lLe(t,r){const a=b_(t),u=QC(r,a,fc,l$);if(u>=0){const h=r[u];return z.assertEqual(h.file,t.getSourceFile(),"Diagnostics proided to 'findDiagnosticForNode' must be from a single SourceFile"),ua(h,Nde)}}function cLe(t,r){var a;let u=QC(r,t.start,m=>m.start,hc);for(u<0&&(u=~u);((a=r[u-1])==null?void 0:a.start)===t.start;)u--;const h=[],p=zu(t);for(;;){const m=$r(r[u],Nde);if(!m||m.start>p)break;MSe(t,m)&&h.push(m),u++}return h}function QP({startPosition:t,endPosition:r}){return sd(t,r===void 0?t:r)}function Lde(t,r){const a=Rs(t,r.start);return Xi(a,h=>h.getStart(t)zu(r)?"quit":Ut(h)&&F3(r,b_(h,t)))}function Pde(t,r,a=fc){return t?Lo(t)?a(Yt(t,r)):r(t,0):void 0}function Ade(t){return Lo(t)?ma(t):t}function uLe(t,r){if(YXe(t)){const a=fX(t);if(a)return a;const u=hF(hX(t),r,!1),h=hF(hX(t),r,!0);return u===h?u:[u,h]}return t.name}function dX(t,r,a){return YXe(t)?fX(t)||hF(hX(t),r,!!a):t.name}function YXe(t){return!(t.flags&33554432)&&(t.escapedName==="export="||t.escapedName==="default")}function fX(t){return Z(t.declarations,r=>{var a,u,h;return Ec(r)?(a=$r(ld(r.expression),lt))==null?void 0:a.text:gh(r)&&r.symbol.flags===2097152?(u=$r(r.propertyName,lt))==null?void 0:u.text:(h=$r(ko(r),lt))==null?void 0:h.text})}function hX(t){var r;return z.checkDefined(t.parent,`Symbol parent was undefined. Flags: ${z.formatSymbolFlags(t.flags)}. Declarations: ${(r=t.declarations)==null?void 0:r.map(a=>{const u=z.formatSyntaxKind(a.kind),h=Xn(a),{expression:p}=a;return(h?"[JS]":"")+u+(p?` (expression: ${z.formatSyntaxKind(p.kind)})`:"")}).join(", ")}.`)}function hF(t,r,a){return TH(h_(Nm(t.name)),r,a)}function TH(t,r,a){const u=fd(h6(t,"/index"));let h="",p=!0;const m=u.charCodeAt(0);jy(m,r)?(h+=String.fromCharCode(m),a&&(h=h.toUpperCase())):p=!1;for(let C=1;Ct.length)return!1;for(let h=0;hqu(a)&&Iv(a))}function _X(t){return!!(rse(t)&65536)}function pX(t,r){return Z(t.imports,u=>{if(Gv.nodeCoreModules.has(u.text))return ro(u.text,"node:")})??r.usesUriStyleNodeCoreModules}function DH(t){return t===` +`?1:0}function cD(t){return Lo(t)?Qy(Po(t[0]),t.slice(1)):Po(t)}function gX({options:t},r){const a=!t.semicolons||t.semicolons==="ignore",u=t.semicolons==="remove"||a&&!wH(r);return{...t,semicolons:u?"remove":"ignore"}}function Mde(t){return t===2||t===3}function H3(t,r){return t.isSourceFileFromExternalLibrary(r)||t.isSourceFileDefaultLibrary(r)}function mX(t,r){const a=new Set,u=new Set,h=new Set;for(const C of r)if(!C7(C)){const b=Il(C.expression);if(wT(b))switch(b.kind){case 15:case 11:a.add(b.text);break;case 9:u.add(parseInt(b.text));break;case 10:const T=Mke(mu(b.text,"n")?b.text.slice(0,-1):b.text);T&&h.add(jT(T));break}else{const T=t.getSymbolAtLocation(C.expression);if(T&&T.valueDeclaration&&nx(T.valueDeclaration)){const E=t.getConstantValue(T.valueDeclaration);E!==void 0&&p(E)}}}return{addValue:p,hasValue:m};function p(C){switch(typeof C){case"string":a.add(C);break;case"number":u.add(C)}}function m(C){switch(typeof C){case"string":return a.has(C);case"number":return u.has(C);case"object":return h.has(jT(C))}}}function Rde(t,r,a,u){var h;const p=typeof t=="string"?t:t.fileName;if(!Zy(p))return!1;const m=r.getCompilerOptions(),C=Vh(m),b=typeof t=="string"?QV(_c(t,a.getCurrentDirectory(),cS(a)),(h=r.getPackageJsonInfoCache)==null?void 0:h.call(r),a,m):t.impliedNodeFormat;if(b===99)return!1;if(b===1||m.verbatimModuleSyntax&&C===1)return!0;if(m.verbatimModuleSyntax&&tG(C))return!1;if(typeof t=="object"){if(t.commonJsModuleIndicator)return!0;if(t.externalModuleIndicator)return!1}return u}function j3(t){switch(t.kind){case 241:case 307:case 268:case 296:return!0;default:return!1}}function vX(t,r,a,u){var h;const p=rQ(t,(h=a.getPackageJsonInfoCache)==null?void 0:h.call(a),u,a.getCompilerOptions());let m,C;return typeof p=="object"&&(m=p.impliedNodeFormat,C=p.packageJsonScope),{path:_c(t,a.getCurrentDirectory(),a.getCanonicalFileName),fileName:t,externalModuleIndicator:r===99?!0:void 0,commonJsModuleIndicator:r===1?!0:void 0,impliedNodeFormat:m,packageJsonScope:C,statements:x,imports:x}}var hLe=(t=>(t[t.Named=0]="Named",t[t.Default=1]="Default",t[t.Namespace=2]="Namespace",t[t.CommonJS=3]="CommonJS",t))(hLe||{}),_Le=(t=>(t[t.Named=0]="Named",t[t.Default=1]="Default",t[t.ExportEquals=2]="ExportEquals",t[t.UMD=3]="UMD",t))(_Le||{});function Fde(t){let r=1;const a=Ug(),u=new Map,h=new Map;let p;const m={isUsableByFile:F=>F===p,isEmpty:()=>!a.size,clear:()=>{a.clear(),u.clear(),p=void 0},add:(F,j,U,q,Q,re,Y,ue)=>{F!==p&&(m.clear(),p=F);let te;if(Q){const Oe=SG(Q.fileName);if(Oe){const{topLevelNodeModulesIndex:fe,topLevelPackageNameIndex:Ie,packageRootIndex:Le}=Oe;if(te=RV(F7(Q.fileName.substring(Ie+1,Le))),ro(F,Q.path.substring(0,fe))){const et=h.get(te),He=Q.fileName.substring(0,Ie+1);if(et){const We=et.indexOf(nb);fe>We&&h.set(te,He)}else h.set(te,He)}}}const oe=re===1&&W8(j)||j,pe=re===0||T6(oe)?Ws(U):uLe(oe,void 0),ye=typeof pe=="string"?pe:pe[0],be=typeof pe=="string"?void 0:pe[1],_e=Nm(q.name),ve=r++,Ee=Of(j,ue),ke=j.flags&33554432?void 0:j,Fe=q.flags&33554432?void 0:q;(!ke||!Fe)&&u.set(ve,[j,q]),a.add(b(ye,j,Zd(_e)?void 0:_e,ue),{id:ve,symbolTableKey:U,symbolName:ye,capitalizedSymbolName:be,moduleName:_e,moduleFile:Q,moduleFileName:Q==null?void 0:Q.fileName,packageName:te,exportKind:re,targetFlags:Ee.flags,isFromPackageJson:Y,symbol:ke,moduleSymbol:Fe})},get:(F,j)=>{if(F!==p)return;const U=a.get(j);return U==null?void 0:U.map(C)},search:(F,j,U,q)=>{if(F===p)return hf(a,(Q,re)=>{const{symbolName:Y,ambientModuleName:ue}=T(re),te=j&&Q[0].capitalizedSymbolName||Y;if(U(te,Q[0].targetFlags)){const oe=Q.map(C).filter((pe,ye)=>R(pe,Q[ye].packageName));if(oe.length){const pe=q(oe,te,!!ue,re);if(pe!==void 0)return pe}}})},releaseSymbols:()=>{u.clear()},onFileChanged:(F,j,U)=>E(F)&&E(j)?!1:p&&p!==j.path||U&&uX(F)!==uX(j)||!qs(F.moduleAugmentations,j.moduleAugmentations)||!N(F,j)?(m.clear(),!0):(p=j.path,!1)};return z.isDebugging&&Object.defineProperty(m,"__cache",{value:a}),m;function C(F){if(F.symbol&&F.moduleSymbol)return F;const{id:j,exportKind:U,targetFlags:q,isFromPackageJson:Q,moduleFileName:re}=F,[Y,ue]=u.get(j)||x;if(Y&&ue)return{symbol:Y,moduleSymbol:ue,moduleFileName:re,exportKind:U,targetFlags:q,isFromPackageJson:Q};const te=(Q?t.getPackageJsonAutoImportProvider():t.getCurrentProgram()).getTypeChecker(),Se=F.moduleSymbol||ue||z.checkDefined(F.moduleFile?te.getMergedSymbol(F.moduleFile.symbol):te.tryFindAmbientModule(F.moduleName)),oe=F.symbol||Y||z.checkDefined(U===2?te.resolveExternalModuleSymbol(Se):te.tryGetMemberInModuleExportsAndProperties(Ws(F.symbolTableKey),Se),`Could not find symbol '${F.symbolName}' by key '${F.symbolTableKey}' in module ${Se.name}`);return u.set(j,[oe,Se]),{symbol:oe,moduleSymbol:Se,moduleFileName:re,exportKind:U,targetFlags:q,isFromPackageJson:Q}}function b(F,j,U,q){const Q=U||"";return`${F.length} ${Aa(Of(j,q))} ${F} ${Q}`}function T(F){const j=F.indexOf(" "),U=F.indexOf(" ",j+1),q=parseInt(F.substring(0,j),10),Q=F.substring(U+1),re=Q.substring(0,q),Y=Q.substring(q+1);return{symbolName:re,ambientModuleName:Y===""?void 0:Y}}function E(F){return!F.commonJsModuleIndicator&&!F.externalModuleIndicator&&!F.moduleAugmentations&&!F.ambientModuleNames}function N(F,j){if(!qs(F.ambientModuleNames,j.ambientModuleNames))return!1;let U=-1,q=-1;for(const Q of j.ambientModuleNames){const re=Y=>Fse(Y)&&Y.name.text===Q;if(U=Nt(F.statements,re,U+1),q=Nt(j.statements,re,q+1),F.statements[U]!==j.statements[q])return!1}return!0}function R(F,j){if(!j||!F.moduleFileName)return!0;const U=t.getGlobalTypingsCacheLocation();if(U&&ro(F.moduleFileName,U))return!0;const q=h.get(j);return!q||ro(F.moduleFileName,q)}}function Bde(t,r,a,u,h,p,m){var C;if(r===a)return!1;const b=m==null?void 0:m.get(r.path,a.path,u,{});if((b==null?void 0:b.isBlockedByPackageJsonDependencies)!==void 0)return!b.isBlockedByPackageJsonDependencies;const T=cS(p),E=(C=p.getGlobalTypingsCacheLocation)==null?void 0:C.call(p),N=!!e2.forEachFileNameOfModule(r.fileName,a.fileName,p,!1,R=>{const F=t.getSourceFile(R);return(F===a||!F)&&E6t(r.fileName,R,T,E)});if(h){const R=N&&h.allowsImportingSourceFile(a,p);return m==null||m.setBlockedByPackageJsonDependencies(r.path,a.path,u,{},!R),R}return N}function E6t(t,r,a,u){const h=c0(r,m=>fd(m)==="node_modules"?m:void 0),p=h&&rs(a(h));return p===void 0||ro(a(t),p)||!!u&&ro(a(u),p)}function Wde(t,r,a,u,h){var p,m;const C=$6(r),b=a.autoImportFileExcludePatterns&&ns(a.autoImportFileExcludePatterns,E=>{const N=cG(E,"","exclude");return N?Gw(N,C):void 0});tZe(t.getTypeChecker(),t.getSourceFiles(),b,r,(E,N)=>h(E,N,t,!1));const T=u&&((p=r.getPackageJsonAutoImportProvider)==null?void 0:p.call(r));if(T){const E=Vc(),N=t.getTypeChecker();tZe(T.getTypeChecker(),T.getSourceFiles(),b,r,(R,F)=>{(F&&!t.getSourceFile(F.fileName)||!F&&!N.resolveName(R.name,void 0,1536,!1))&&h(R,F,T,!0)}),(m=r.log)==null||m.call(r,`forEachExternalModuleToImportFrom autoImportProvider: ${Vc()-E}`)}}function tZe(t,r,a,u,h){var p,m;const C=(p=u.getSymlinkCache)==null?void 0:p.call(u).getSymlinkedDirectoriesByRealpath(),b=a&&(({fileName:T,path:E})=>{if(a.some(N=>N.test(T)))return!0;if(C!=null&&C.size&&Zk(T)){let N=rs(T);return c0(rs(E),R=>{const F=C.get(Xd(R));if(F)return F.some(j=>a.some(U=>U.test(T.replace(N,j))));N=rs(N)})??!1}return!1});for(const T of t.getAmbientModules())!T.name.includes("*")&&!(a&&((m=T.declarations)!=null&&m.every(E=>b(E.getSourceFile()))))&&h(T,void 0);for(const T of r)ep(T)&&!(b!=null&&b(T))&&h(t.getMergedSymbol(T.symbol),T)}function EH(t,r,a,u,h){var p,m,C,b,T;const E=Vc();(p=r.getPackageJsonAutoImportProvider)==null||p.call(r);const N=((m=r.getCachedExportInfoMap)==null?void 0:m.call(r))||Fde({getCurrentProgram:()=>a,getPackageJsonAutoImportProvider:()=>{var F;return(F=r.getPackageJsonAutoImportProvider)==null?void 0:F.call(r)},getGlobalTypingsCacheLocation:()=>{var F;return(F=r.getGlobalTypingsCacheLocation)==null?void 0:F.call(r)}});if(N.isUsableByFile(t.path))return(C=r.log)==null||C.call(r,"getExportInfoMap: cache hit"),N;(b=r.log)==null||b.call(r,"getExportInfoMap: cache miss or empty; calculating new results");let R=0;try{Wde(a,r,u,!0,(F,j,U,q)=>{++R%100===0&&(h==null||h.throwIfCancellationRequested());const Q=new Map,re=U.getTypeChecker(),Y=yX(F,re);Y&&iZe(Y.symbol,re)&&N.add(t.path,Y.symbol,Y.exportKind===1?"default":"export=",F,j,Y.exportKind,q,re),re.forEachExportAndPropertyOfModule(F,(ue,te)=>{ue!==(Y==null?void 0:Y.symbol)&&iZe(ue,re)&&Lm(Q,te)&&N.add(t.path,ue,te,F,j,0,q,re)})})}catch(F){throw N.clear(),F}return(T=r.log)==null||T.call(r,`getExportInfoMap: done in ${Vc()-E} ms`),N}function yX(t,r){const a=r.resolveExternalModuleSymbol(t);if(a!==t)return{symbol:a,exportKind:2};const u=r.tryGetMemberInModuleExports("default",t);if(u)return{symbol:u,exportKind:1}}function iZe(t,r){return!r.isUndefinedSymbol(t)&&!r.isUnknownSymbol(t)&&!PW(t)&&!Dxe(t)}function Vde(t,r,a,u,h){let p,m=t;const C=new Map;for(;m;){const b=fX(m);if(b){const T=h(b);if(T)return T}if(m.escapedName!=="default"&&m.escapedName!=="export="){const T=h(m.name);if(T)return T}if(p=xi(p,m),!Lm(C,m))break;m=m.flags&2097152?r.getImmediateAliasedSymbol(m):void 0}for(const b of p??x)if(b.parent&&T6(b.parent)){const T=h(hF(b.parent,il(a),u));if(T)return T}}function nZe(){const t=zy(99,!1);function r(u,h,p){return P6t(a(u,h,p),u)}function a(u,h,p){let m=0,C=0;const b=[],{prefix:T,pushTemplate:E}=M6t(h);u=T+u;const N=T.length;E&&b.push(16),t.setText(u);let R=0;const F=[];let j=0;do{m=t.scan(),j6(m)||(U(),C=m);const q=t.getTokenEnd();if(L6t(t.getTokenStart(),q,N,B6t(m),F),q>=u.length){const Q=N6t(t,m,Ql(b));Q!==void 0&&(R=Q)}}while(m!==1);function U(){switch(m){case 44:case 69:!I6t[C]&&t.reScanSlashToken()===14&&(m=14);break;case 30:C===80&&j++;break;case 32:j>0&&j--;break;case 133:case 154:case 150:case 136:case 155:j>0&&!p&&(m=80);break;case 16:b.push(m);break;case 19:b.length>0&&b.push(m);break;case 20:if(b.length>0){const q=Ql(b);q===16?(m=t.reScanTemplateToken(!1),m===18?b.pop():z.assertEqual(m,17,"Should have been a template middle.")):(z.assertEqual(q,19,"Should have been an open brace"),b.pop())}break;default:if(!d_(m))break;(C===25||d_(C)&&d_(m)&&!O6t(C,m))&&(m=80)}}return{endOfLineState:R,spans:F}}return{getClassificationsForLine:r,getEncodedLexicalClassifications:a}}var I6t=By([80,11,9,10,14,110,46,47,22,24,20,112,97],t=>t,()=>!0);function N6t(t,r,a){switch(r){case 11:{if(!t.isUnterminated())return;const u=t.getTokenText(),h=u.length-1;let p=0;for(;u.charCodeAt(h-p)===92;)p++;return p&1?u.charCodeAt(0)===34?3:2:void 0}case 3:return t.isUnterminated()?1:void 0;default:if(Ww(r)){if(!t.isUnterminated())return;switch(r){case 18:return 5;case 15:return 4;default:return z.fail("Only 'NoSubstitutionTemplateLiteral's and 'TemplateTail's can be unterminated; got SyntaxKind #"+r)}}return a===16?6:void 0}}function L6t(t,r,a,u,h){if(u===8)return;t===0&&a>0&&(t+=a);const p=r-t;p>0&&h.push(t-a,p,u)}function P6t(t,r){const a=[],u=t.spans;let h=0;for(let m=0;m=0){const E=C-h;E>0&&a.push({length:E,classification:4})}a.push({length:b,classification:A6t(T)}),h=C+b}const p=r.length-h;return p>0&&a.push({length:p,classification:4}),{entries:a,finalLexState:t.endOfLineState}}function A6t(t){switch(t){case 1:return 3;case 3:return 1;case 4:return 6;case 25:return 7;case 5:return 2;case 6:return 8;case 8:return 4;case 10:return 0;case 2:case 11:case 12:case 13:case 14:case 15:case 16:case 9:case 17:return 5;default:return}}function O6t(t,r){if(!Xue(t))return!0;switch(r){case 139:case 153:case 137:case 126:case 129:return!0;default:return!1}}function M6t(t){switch(t){case 3:return{prefix:`"\\ +`};case 2:return{prefix:`'\\ +`};case 1:return{prefix:`/* +`};case 4:return{prefix:"`\n"};case 5:return{prefix:`} +`,pushTemplate:!0};case 6:return{prefix:"",pushTemplate:!0};case 0:return{prefix:""};default:return z.assertNever(t)}}function R6t(t){switch(t){case 42:case 44:case 45:case 40:case 41:case 48:case 49:case 50:case 30:case 32:case 33:case 34:case 104:case 103:case 130:case 152:case 35:case 36:case 37:case 38:case 51:case 53:case 52:case 56:case 57:case 75:case 74:case 79:case 71:case 72:case 73:case 65:case 66:case 67:case 69:case 70:case 64:case 28:case 61:case 76:case 77:case 78:return!0;default:return!1}}function F6t(t){switch(t){case 40:case 41:case 55:case 54:case 46:case 47:return!0;default:return!1}}function B6t(t){if(d_(t))return 3;if(R6t(t)||F6t(t))return 5;if(t>=19&&t<=79)return 10;switch(t){case 9:return 4;case 10:return 25;case 11:return 6;case 14:return 7;case 7:case 3:case 2:return 1;case 5:case 4:return 8;case 80:default:return Ww(t)?6:2}}function pLe(t,r,a,u,h){return oZe(Hde(t,r,a,u,h))}function rZe(t,r){switch(r){case 267:case 263:case 264:case 262:case 231:case 218:case 219:t.throwIfCancellationRequested()}}function Hde(t,r,a,u,h){const p=[];return a.forEachChild(function C(b){if(!(!b||!E$(h,b.pos,b.getFullWidth()))){if(rZe(r,b.kind),lt(b)&&!vu(b)&&u.has(b.escapedText)){const T=t.getSymbolAtLocation(b),E=T&&sZe(T,EI(b),t);E&&m(b.getStart(a),b.getEnd(),E)}b.forEachChild(C)}}),{spans:p,endOfLineState:0};function m(C,b,T){const E=b-C;z.assert(E>0,`Classification had non-positive length of ${E}`),p.push(C),p.push(E),p.push(T)}}function sZe(t,r,a){const u=t.getFlags();if(u&2885600)return u&32?11:u&384?12:u&524288?16:u&1536?r&4||r&1&&W6t(t)?14:void 0:u&2097152?sZe(a.getAliasedSymbol(t),r,a):r&2?u&64?13:u&262144?15:void 0:void 0}function W6t(t){return Rt(t.declarations,r=>qu(r)&&Yb(r)===1)}function V6t(t){switch(t){case 1:return"comment";case 2:return"identifier";case 3:return"keyword";case 4:return"number";case 25:return"bigint";case 5:return"operator";case 6:return"string";case 8:return"whitespace";case 9:return"text";case 10:return"punctuation";case 11:return"class name";case 12:return"enum name";case 13:return"interface name";case 14:return"module name";case 15:return"type parameter name";case 16:return"type alias name";case 17:return"parameter name";case 18:return"doc comment tag name";case 19:return"jsx open tag name";case 20:return"jsx close tag name";case 21:return"jsx self closing tag name";case 22:return"jsx attribute";case 23:return"jsx text";case 24:return"jsx attribute string literal value";default:return}}function oZe(t){z.assert(t.spans.length%3===0);const r=t.spans,a=[];for(let u=0;u])*)(\/>)?)?/im,pe=/(\s)(\S+)(\s*)(=)(\s*)('[^']+'|"[^"]+")/img,ye=r.text.substr(te,Se),be=oe.exec(ye);if(!be||!be[3]||!(be[3]in m$))return!1;let _e=te;N(_e,be[1].length),_e+=be[1].length,b(_e,be[2].length,10),_e+=be[2].length,b(_e,be[3].length,21),_e+=be[3].length;const ve=be[4];let Ee=_e;for(;;){const Fe=pe.exec(ve);if(!Fe)break;const Oe=_e+Fe.index+Fe[1].length;Oe>Ee&&(N(Ee,Oe-Ee),Ee=Oe),b(Ee,Fe[2].length,22),Ee+=Fe[2].length,Fe[3].length&&(N(Ee,Fe[3].length),Ee+=Fe[3].length),b(Ee,Fe[4].length,5),Ee+=Fe[4].length,Fe[5].length&&(N(Ee,Fe[5].length),Ee+=Fe[5].length),b(Ee,Fe[6].length,24),Ee+=Fe[6].length}_e+=be[4].length,_e>Ee&&N(Ee,_e-Ee),be[5]&&(b(_e,be[5].length,10),_e+=be[5].length);const ke=te+Se;return _e=0),pe>0){const ye=Se||Y(te.kind,te);ye&&b(oe,pe,ye)}return!0}function re(te){switch(te.parent&&te.parent.kind){case 286:if(te.parent.tagName===te)return 19;break;case 287:if(te.parent.tagName===te)return 20;break;case 285:if(te.parent.tagName===te)return 21;break;case 291:if(te.parent.name===te)return 22;break}}function Y(te,Se){if(d_(te))return 3;if((te===30||te===32)&&Se&&MNe(Se.parent))return 10;if(uoe(te)){if(Se){const oe=Se.parent;if(te===64&&(oe.kind===260||oe.kind===172||oe.kind===169||oe.kind===291)||oe.kind===226||oe.kind===224||oe.kind===225||oe.kind===227)return 5}return 10}else{if(te===9)return 4;if(te===10)return 25;if(te===11)return Se&&Se.parent.kind===291?24:6;if(te===14)return 6;if(Ww(te))return 6;if(te===12)return 23;if(te===80){if(Se){switch(Se.parent.kind){case 263:return Se.parent.name===Se?11:void 0;case 168:return Se.parent.name===Se?15:void 0;case 264:return Se.parent.name===Se?13:void 0;case 266:return Se.parent.name===Se?12:void 0;case 267:return Se.parent.name===Se?14:void 0;case 169:return Se.parent.name===Se?Uw(Se)?3:17:void 0}if(V0(Se.parent))return 3}return 2}}}function ue(te){if(te&&NB(u,h,te.pos,te.getFullWidth())){rZe(t,te.kind);for(const Se of te.getChildren(r))Q(Se)||ue(Se)}}}var bX;(t=>{function r(_e,ve,Ee,ke,Fe){const Oe=j_(Ee,ke);if(Oe.parent&&(Uv(Oe.parent)&&Oe.parent.tagName===Oe||QT(Oe.parent))){const{openingElement:fe,closingElement:Ie}=Oe.parent.parent,Le=[fe,Ie].map(({tagName:et})=>a(et,Ee));return[{fileName:Ee.fileName,highlightSpans:Le}]}return u(ke,Oe,_e,ve,Fe)||h(Oe,Ee)}t.getDocumentHighlights=r;function a(_e,ve){return{fileName:ve.fileName,textSpan:b_(_e,ve),kind:"none"}}function u(_e,ve,Ee,ke,Fe){const Oe=new Set(Fe.map(et=>et.fileName)),fe=xc.getReferenceEntriesForNode(_e,ve,Ee,Fe,ke,void 0,Oe);if(!fe)return;const Ie=hh(fe.map(xc.toHighlightSpan),et=>et.fileName,et=>et.span),Le=Zf(Ee.useCaseSensitiveFileNames());return Fn(fh(Ie.entries(),([et,He])=>{if(!Oe.has(et)){if(!Ee.redirectTargetsMap.has(_c(et,Ee.getCurrentDirectory(),Le)))return;const We=Ee.getSourceFile(et);et=Me(Fe,Ye=>!!Ye.redirectInfo&&Ye.redirectInfo.redirectTarget===We).fileName,z.assert(Oe.has(et))}return{fileName:et,highlightSpans:He}}))}function h(_e,ve){const Ee=p(_e,ve);return Ee&&[{fileName:ve.fileName,highlightSpans:Ee}]}function p(_e,ve){switch(_e.kind){case 101:case 93:return jk(_e.parent)?pe(_e.parent,ve):void 0;case 107:return ke(_e.parent,Om,ue);case 111:return ke(_e.parent,Mae,Y);case 113:case 85:case 98:const Oe=_e.kind===85?_e.parent.parent:_e.parent;return ke(Oe,gI,re);case 109:return ke(_e.parent,v7,Q);case 84:case 90:return C7(_e.parent)||a3(_e.parent)?ke(_e.parent.parent.parent,v7,Q):void 0;case 83:case 88:return ke(_e.parent,s8,q);case 99:case 117:case 92:return ke(_e.parent,fe=>Hw(fe,!0),U);case 137:return Ee(fu,[137]);case 139:case 153:return Ee(Vw,[139,153]);case 135:return ke(_e.parent,ex,te);case 134:return Fe(te(_e));case 127:return Fe(Se(_e));case 103:case 147:return;default:return eS(_e.kind)&&(Yf(_e.parent)||Ou(_e.parent))?Fe(R(_e.kind,_e.parent)):void 0}function Ee(Oe,fe){return ke(_e.parent,Oe,Ie=>{var Le;return ns((Le=$r(Ie,H0))==null?void 0:Le.symbol.declarations,et=>Oe(et)?Me(et.getChildren(ve),He=>Mt(fe,He.kind)):void 0)})}function ke(Oe,fe,Ie){return fe(Oe)?Fe(Ie(Oe,ve)):void 0}function Fe(Oe){return Oe&&Oe.map(fe=>a(fe,ve))}}function m(_e){return Mae(_e)?[_e]:gI(_e)?no(_e.catchClause?m(_e.catchClause):_e.tryBlock&&m(_e.tryBlock),_e.finallyBlock&&m(_e.finallyBlock)):Bo(_e)?void 0:T(_e,m)}function C(_e){let ve=_e;for(;ve.parent;){const Ee=ve.parent;if(IT(Ee)||Ee.kind===307)return Ee;if(gI(Ee)&&Ee.tryBlock===ve&&Ee.catchClause)return ve;ve=Ee}}function b(_e){return s8(_e)?[_e]:Bo(_e)?void 0:T(_e,b)}function T(_e,ve){const Ee=[];return _e.forEachChild(ke=>{const Fe=ve(ke);Fe!==void 0&&Ee.push(...NL(Fe))}),Ee}function E(_e,ve){const Ee=N(ve);return!!Ee&&Ee===_e}function N(_e){return Xi(_e,ve=>{switch(ve.kind){case 255:if(_e.kind===251)return!1;case 248:case 249:case 250:case 247:case 246:return!_e.label||be(ve,_e.label.escapedText);default:return Bo(ve)&&"quit"}})}function R(_e,ve){return ns(F(ve,iP(_e)),Ee=>R3(Ee,_e))}function F(_e,ve){const Ee=_e.parent;switch(Ee.kind){case 268:case 307:case 241:case 296:case 297:return ve&64&&xd(_e)?[..._e.members,_e]:Ee.statements;case 176:case 174:case 262:return[...Ee.parameters,...ss(Ee.parent)?Ee.parent.members:[]];case 263:case 231:case 264:case 187:const ke=Ee.members;if(ve&15){const Fe=Me(Ee.members,fu);if(Fe)return[...ke,...Fe.parameters]}else if(ve&64)return[...ke,Ee];return ke;case 210:return;default:z.assertNever(Ee,"Invalid container kind.")}}function j(_e,ve,...Ee){return ve&&Mt(Ee,ve.kind)?(_e.push(ve),!0):!1}function U(_e){const ve=[];if(j(ve,_e.getFirstToken(),99,117,92)&&_e.kind===246){const Ee=_e.getChildren();for(let ke=Ee.length-1;ke>=0&&!j(ve,Ee[ke],117);ke--);}return W(b(_e.statement),Ee=>{E(_e,Ee)&&j(ve,Ee.getFirstToken(),83,88)}),ve}function q(_e){const ve=N(_e);if(ve)switch(ve.kind){case 248:case 249:case 250:case 246:case 247:return U(ve);case 255:return Q(ve)}}function Q(_e){const ve=[];return j(ve,_e.getFirstToken(),109),W(_e.caseBlock.clauses,Ee=>{j(ve,Ee.getFirstToken(),84,90),W(b(Ee),ke=>{E(_e,ke)&&j(ve,ke.getFirstToken(),83)})}),ve}function re(_e,ve){const Ee=[];if(j(Ee,_e.getFirstToken(),113),_e.catchClause&&j(Ee,_e.catchClause.getFirstToken(),85),_e.finallyBlock){const ke=Hl(_e,98,ve);j(Ee,ke,98)}return Ee}function Y(_e,ve){const Ee=C(_e);if(!Ee)return;const ke=[];return W(m(Ee),Fe=>{ke.push(Hl(Fe,111,ve))}),IT(Ee)&&sS(Ee,Fe=>{ke.push(Hl(Fe,107,ve))}),ke}function ue(_e,ve){const Ee=Kp(_e);if(!Ee)return;const ke=[];return sS(ua(Ee.body,Ho),Fe=>{ke.push(Hl(Fe,107,ve))}),W(m(Ee.body),Fe=>{ke.push(Hl(Fe,111,ve))}),ke}function te(_e){const ve=Kp(_e);if(!ve)return;const Ee=[];return ve.modifiers&&ve.modifiers.forEach(ke=>{j(Ee,ke,134)}),jo(ve,ke=>{oe(ke,Fe=>{ex(Fe)&&j(Ee,Fe.getFirstToken(),135)})}),Ee}function Se(_e){const ve=Kp(_e);if(!ve)return;const Ee=[];return jo(ve,ke=>{oe(ke,Fe=>{jG(Fe)&&j(Ee,Fe.getFirstToken(),127)})}),Ee}function oe(_e,ve){ve(_e),!Bo(_e)&&!ss(_e)&&!Ff(_e)&&!qu(_e)&&!Mm(_e)&&!gs(_e)&&jo(_e,Ee=>oe(Ee,ve))}function pe(_e,ve){const Ee=ye(_e,ve),ke=[];for(let Fe=0;Fe=Oe.end;Le--)if(!Tv(ve.text.charCodeAt(Le))){Ie=!1;break}if(Ie){ke.push({fileName:ve.fileName,textSpan:sd(Oe.getStart(),fe.end),kind:"reference"}),Fe++;continue}}ke.push(a(Ee[Fe],ve))}return ke}function ye(_e,ve){const Ee=[];for(;jk(_e.parent)&&_e.parent.elseStatement===_e;)_e=_e.parent;for(;;){const ke=_e.getChildren(ve);j(Ee,ke[0],101);for(let Fe=ke.length-1;Fe>=0&&!j(Ee,ke[Fe],93);Fe--);if(!_e.elseStatement||!jk(_e.elseStatement))break;_e=_e.elseStatement}return Ee}function be(_e,ve){return!!Xi(_e.parent,Ee=>ix(Ee)?Ee.label.escapedText===ve:"quit")}})(bX||(bX={}));function IH(t){return!!t.sourceFile}function mLe(t,r,a){return zde(t,r,a)}function zde(t,r="",a,u){const h=new Map,p=Zf(!!t);function m(){const q=Fn(h.keys()).filter(Q=>Q&&Q.charAt(0)==="_").map(Q=>{const re=h.get(Q),Y=[];return re.forEach((ue,te)=>{IH(ue)?Y.push({name:te,scriptKind:ue.sourceFile.scriptKind,refCount:ue.languageServiceRefCount}):ue.forEach((Se,oe)=>Y.push({name:te,scriptKind:oe,refCount:Se.languageServiceRefCount}))}),Y.sort((ue,te)=>te.refCount-ue.refCount),{bucket:Q,sourceFiles:Y}});return JSON.stringify(q,void 0,2)}function C(q){return typeof q.getCompilationSettings=="function"?q.getCompilationSettings():q}function b(q,Q,re,Y,ue,te){const Se=_c(q,r,p),oe=Ude(C(Q));return T(q,Se,Q,oe,re,Y,ue,te)}function T(q,Q,re,Y,ue,te,Se,oe){return F(q,Q,re,Y,ue,te,!0,Se,oe)}function E(q,Q,re,Y,ue,te){const Se=_c(q,r,p),oe=Ude(C(Q));return N(q,Se,Q,oe,re,Y,ue,te)}function N(q,Q,re,Y,ue,te,Se,oe){return F(q,Q,C(re),Y,ue,te,!1,Se,oe)}function R(q,Q){const re=IH(q)?q:q.get(z.checkDefined(Q,"If there are more than one scriptKind's for same document the scriptKind should be provided"));return z.assert(Q===void 0||!re||re.sourceFile.scriptKind===Q,`Script kind should match provided ScriptKind:${Q} and sourceFile.scriptKind: ${re==null?void 0:re.sourceFile.scriptKind}, !entry: ${!re}`),re}function F(q,Q,re,Y,ue,te,Se,oe,pe){var ye,be,_e,ve;oe=dG(q,oe);const Ee=C(re),ke=re===Ee?void 0:re,Fe=oe===6?100:il(Ee),Oe=typeof pe=="object"?pe:{languageVersion:Fe,impliedNodeFormat:ke&&QV(Q,(ve=(_e=(be=(ye=ke.getCompilerHost)==null?void 0:ye.call(ke))==null?void 0:be.getModuleResolutionCache)==null?void 0:_e.call(be))==null?void 0:ve.getPackageJsonInfoCache(),ke,Ee),setExternalModuleIndicator:$W(Ee),jsDocParsingMode:a};Oe.languageVersion=Fe,z.assertEqual(a,Oe.jsDocParsingMode);const fe=h.size,Ie=vLe(Y,Oe.impliedNodeFormat),Le=ka(h,Ie,()=>new Map);if(sr){h.size>fe&&sr.instant(sr.Phase.Session,"createdDocumentRegistryBucket",{configFilePath:Ee.configFilePath,key:Ie});const Ue=!xf(Q)&&hf(h,(Ye,wt)=>wt!==Ie&&Ye.has(Q)&&wt);Ue&&sr.instant(sr.Phase.Session,"documentRegistryBucketOverlap",{path:Q,key1:Ue,key2:Ie})}const et=Le.get(Q);let He=et&&R(et,oe);if(!He&&u){const Ue=u.getDocument(Ie,Q);Ue&&Ue.scriptKind===oe&&Ue.text===GP(ue)&&(z.assert(Se),He={sourceFile:Ue,languageServiceRefCount:0},We())}if(He)He.sourceFile.version!==te&&(He.sourceFile=wfe(He.sourceFile,ue,te,ue.getChangeRange(He.sourceFile.scriptSnapshot)),u&&u.setDocument(Ie,Q,He.sourceFile)),Se&&He.languageServiceRefCount++;else{const Ue=RX(q,ue,Oe,te,!1,oe);u&&u.setDocument(Ie,Q,Ue),He={sourceFile:Ue,languageServiceRefCount:1},We()}return z.assert(He.languageServiceRefCount!==0),He.sourceFile;function We(){if(!et)Le.set(Q,He);else if(IH(et)){const Ue=new Map;Ue.set(et.sourceFile.scriptKind,et),Ue.set(oe,He),Le.set(Q,Ue)}else et.set(oe,He)}}function j(q,Q,re,Y){const ue=_c(q,r,p),te=Ude(Q);return U(ue,te,re,Y)}function U(q,Q,re,Y){const ue=z.checkDefined(h.get(vLe(Q,Y))),te=ue.get(q),Se=R(te,re);Se.languageServiceRefCount--,z.assert(Se.languageServiceRefCount>=0),Se.languageServiceRefCount===0&&(IH(te)?ue.delete(q):(te.delete(re),te.size===1&&ue.set(q,ee(te.values(),fc))))}return{acquireDocument:b,acquireDocumentWithKey:T,updateDocument:E,updateDocumentWithKey:N,releaseDocument:j,releaseDocumentWithKey:U,getKeyForCompilationSettings:Ude,getDocumentRegistryBucketKeyWithMode:vLe,reportStats:m,getBuckets:()=>h}}function Ude(t){return Ple(t,_le)}function vLe(t,r){return r?`${t}|${r}`:t}function yLe(t,r,a,u,h,p,m){const C=$6(u),b=Zf(C),T=qde(r,a,b,m),E=qde(a,r,b,m);return er.ChangeTracker.with({host:u,formatContext:h,preferences:p},N=>{j6t(t,N,T,r,a,u.getCurrentDirectory(),C),z6t(t,N,T,E,u,b)})}function qde(t,r,a,u){const h=a(t);return m=>{const C=u&&u.tryGetSourcePosition({fileName:m,pos:0}),b=p(C?C.fileName:m);return C?b===void 0?void 0:H6t(C.fileName,b,m,a):b};function p(m){if(a(m)===h)return r;const C=Zoe(m,h,a);return C===void 0?void 0:r+"/"+C}}function H6t(t,r,a,u){const h=KR(t,r,u);return bLe(rs(a),h)}function j6t(t,r,a,u,h,p,m){const{configFile:C}=t.getCompilerOptions();if(!C)return;const b=rs(C.fileName),T=y8(C);if(!T)return;CLe(T,(F,j)=>{switch(j){case"files":case"include":case"exclude":{if(E(F)||j!=="include"||!Rf(F.initializer))return;const q=ns(F.initializer.elements,re=>ja(re)?re.text:void 0);if(q.length===0)return;const Q=uG(b,[],q,m,p);Gw(z.checkDefined(Q.includeFilePattern),m).test(u)&&!Gw(z.checkDefined(Q.includeFilePattern),m).test(h)&&r.insertNodeAfter(C,La(F.initializer.elements),G.createStringLiteral(R(h)));return}case"compilerOptions":CLe(F.initializer,(U,q)=>{const Q=vle(q);z.assert((Q==null?void 0:Q.type)!=="listOrElement"),Q&&(Q.isFilePath||Q.type==="list"&&Q.element.isFilePath)?E(U):q==="paths"&&CLe(U.initializer,re=>{if(Rf(re.initializer))for(const Y of re.initializer.elements)N(Y)})});return}});function E(F){const j=Rf(F.initializer)?F.initializer.elements:[F.initializer];let U=!1;for(const q of j)U=N(q)||U;return U}function N(F){if(!ja(F))return!1;const j=bLe(b,F.text),U=a(j);return U!==void 0?(r.replaceRangeWithText(C,lZe(F,C),R(U)),!0):!1}function R(F){return W0(b,F,!m)}}function z6t(t,r,a,u,h,p){const m=t.getSourceFiles();for(const C of m){const b=a(C.fileName),T=b??C.fileName,E=rs(T),N=u(C.fileName),R=N||C.fileName,F=rs(R),j=b!==void 0||N!==void 0;$6t(C,r,U=>{if(!cg(U))return;const q=bLe(F,U),Q=a(q);return Q===void 0?void 0:KE(W0(E,Q,p))},U=>{const q=t.getTypeChecker().getSymbolAtLocation(U);if(q!=null&&q.declarations&&q.declarations.some(re=>Bh(re)))return;const Q=N!==void 0?aZe(U,HP(U.text,R,t.getCompilerOptions(),h),a,m):q6t(q,U,C,t,h,a);return Q!==void 0&&(Q.updated||j&&cg(U.text))?e2.updateModuleSpecifier(t.getCompilerOptions(),C,T,Q.newFileName,KP(t,h),U.text):void 0})}}function U6t(t,r){return ra(Hr(t,r))}function bLe(t,r){return KE(U6t(t,r))}function q6t(t,r,a,u,h,p){if(t){const m=Me(t.declarations,Ns).fileName,C=p(m);return C===void 0?{newFileName:m,updated:!1}:{newFileName:C,updated:!0}}else{const m=u.getModeForUsageLocation(a,r),C=h.resolveModuleNameLiterals||!h.resolveModuleNames?u.getResolvedModuleFromModuleSpecifier(r,a):h.getResolvedModuleWithFailedLookupLocationsFromCache&&h.getResolvedModuleWithFailedLookupLocationsFromCache(r.text,a.fileName,m);return aZe(r,C,p,u.getSourceFiles())}}function aZe(t,r,a,u){if(!r)return;if(r.resolvedModule){const b=C(r.resolvedModule.resolvedFileName);if(b)return b}const h=W(r.failedLookupLocations,p)||cg(t.text)&&W(r.failedLookupLocations,m);if(h)return h;return r.resolvedModule&&{newFileName:r.resolvedModule.resolvedFileName,updated:!1};function p(b){const T=a(b);return T&&Me(u,E=>E.fileName===T)?m(b):void 0}function m(b){return mu(b,"/package.json")?void 0:C(b)}function C(b){const T=a(b);return T&&{newFileName:T,updated:!0}}}function $6t(t,r,a,u){for(const h of t.referencedFiles||x){const p=a(h.fileName);p!==void 0&&p!==t.text.slice(h.pos,h.end)&&r.replaceRangeWithText(t,h,p)}for(const h of t.imports){const p=u(h);p!==void 0&&p!==h.text&&r.replaceRangeWithText(t,lZe(h,t),p)}}function lZe(t,r){return Gg(t.getStart(r)+1,t.end-1)}function CLe(t,r){if(Pa(t))for(const a of t.properties)pd(a)&&ja(a.name)&&r(a,a.name.text)}var $de=(t=>(t[t.exact=0]="exact",t[t.prefix=1]="prefix",t[t.substring=2]="substring",t[t.camelCase=3]="camelCase",t))($de||{});function _F(t,r){return{kind:t,isCaseSensitive:r}}function SLe(t){const r=new Map,a=t.trim().split(".").map(u=>Q6t(u.trim()));if(a.length===1&&a[0].totalTextChunk.text==="")return{getMatchForLastSegmentOfPattern:()=>_F(2,!0),getFullMatch:()=>_F(2,!0),patternContainsDots:!1};if(!a.some(u=>!u.subWordTextChunks.length))return{getFullMatch:(u,h)=>J6t(u,h,a,r),getMatchForLastSegmentOfPattern:u=>wLe(u,La(a),r),patternContainsDots:a.length>1}}function J6t(t,r,a,u){if(!wLe(r,La(a),u)||a.length-1>t.length)return;let p;for(let m=a.length-2,C=t.length-1;m>=0;m-=1,C-=1)p=dZe(p,wLe(t[C],a[m],u));return p}function cZe(t,r){let a=r.get(t);return a||r.set(t,a=ILe(t)),a}function uZe(t,r,a){const u=X6t(t,r.textLowerCase);if(u===0)return _F(r.text.length===t.length?0:1,ro(t,r.text));if(r.isLowerCase){if(u===-1)return;const h=cZe(t,a);for(const p of h)if(xLe(t,p,r.text,!0))return _F(2,xLe(t,p,r.text,!1));if(r.text.length0)return _F(2,!0);if(r.characterSpans.length>0){const h=cZe(t,a),p=fZe(t,h,r,!1)?!0:fZe(t,h,r,!0)?!1:void 0;if(p!==void 0)return _F(3,p)}}}function wLe(t,r,a){if(Jde(r.totalTextChunk.text,p=>p!==32&&p!==42)){const p=uZe(t,r.totalTextChunk,a);if(p)return p}const u=r.subWordTextChunks;let h;for(const p of u)h=dZe(h,uZe(t,p,a));return h}function dZe(t,r){return hre([t,r],G6t)}function G6t(t,r){return t===void 0?1:r===void 0?-1:hc(t.kind,r.kind)||bk(!t.isCaseSensitive,!r.isCaseSensitive)}function xLe(t,r,a,u,h={start:0,length:a.length}){return h.length<=r.length&&gZe(0,h.length,p=>K6t(a.charCodeAt(h.start+p),t.charCodeAt(r.start+p),u))}function K6t(t,r,a){return a?kLe(t)===kLe(r):t===r}function fZe(t,r,a,u){const h=a.characterSpans;let p=0,m=0;for(;;){if(m===h.length)return!0;if(p===r.length)return!1;let C=r[p],b=!1;for(;m=65&&t<=90)return!0;if(t<127||!x$(t,99))return!1;const r=String.fromCharCode(t);return r===r.toUpperCase()}function hZe(t){if(t>=97&&t<=122)return!0;if(t<127||!x$(t,99))return!1;const r=String.fromCharCode(t);return r===r.toLowerCase()}function X6t(t,r){const a=t.length-r.length;for(let u=0;u<=a;u++)if(Jde(r,(h,p)=>kLe(t.charCodeAt(p+u))===h))return u;return-1}function kLe(t){return t>=65&&t<=90?97+(t-65):t<127?t:String.fromCharCode(t).toLowerCase().charCodeAt(0)}function TLe(t){return t>=48&&t<=57}function Z6t(t){return z3(t)||hZe(t)||TLe(t)||t===95||t===36}function Y6t(t){const r=[];let a=0,u=0;for(let h=0;h0&&(r.push(DLe(t.substr(a,u))),u=0)}return u>0&&r.push(DLe(t.substr(a,u))),r}function DLe(t){const r=t.toLowerCase();return{text:t,textLowerCase:r,isLowerCase:t===r,characterSpans:ELe(t)}}function ELe(t){return _Ze(t,!1)}function ILe(t){return _Ze(t,!0)}function _Ze(t,r){const a=[];let u=0;for(let h=1;hNLe(u)&&u!==95,r,a)}function e3t(t,r,a){return r!==a&&r+1r(t.charCodeAt(h),h))}function mZe(t,r=!0,a=!1){const u={languageVersion:1,pragmas:void 0,checkJsDirective:void 0,referencedFiles:[],typeReferenceDirectives:[],libReferenceDirectives:[],amdDependencies:[],hasNoDefaultLib:void 0,moduleName:void 0},h=[];let p,m,C,b=0,T=!1;function E(){return m=C,C=jh.scan(),C===19?b++:C===20&&b--,C}function N(){const te=jh.getTokenValue(),Se=jh.getTokenStart();return{fileName:te,pos:Se,end:Se+te.length}}function R(){p||(p=[]),p.push({ref:N(),depth:b})}function F(){h.push(N()),j()}function j(){b===0&&(T=!0)}function U(){let te=jh.getToken();return te===138?(te=E(),te===144&&(te=E(),te===11&&R()),!0):!1}function q(){if(m===25)return!1;let te=jh.getToken();if(te===102){if(te=E(),te===21){if(te=E(),te===11||te===15)return F(),!0}else{if(te===11)return F(),!0;if(te===156&&jh.lookAhead(()=>{const oe=jh.scan();return oe!==161&&(oe===42||oe===19||oe===80||d_(oe))})&&(te=E()),te===80||d_(te))if(te=E(),te===161){if(te=E(),te===11)return F(),!0}else if(te===64){if(re(!0))return!0}else if(te===28)te=E();else return!0;if(te===19){for(te=E();te!==20&&te!==1;)te=E();te===20&&(te=E(),te===161&&(te=E(),te===11&&F()))}else te===42&&(te=E(),te===130&&(te=E(),(te===80||d_(te))&&(te=E(),te===161&&(te=E(),te===11&&F()))))}return!0}return!1}function Q(){let te=jh.getToken();if(te===95){if(j(),te=E(),te===156&&jh.lookAhead(()=>{const oe=jh.scan();return oe===42||oe===19})&&(te=E()),te===19){for(te=E();te!==20&&te!==1;)te=E();te===20&&(te=E(),te===161&&(te=E(),te===11&&F()))}else if(te===42)te=E(),te===161&&(te=E(),te===11&&F());else if(te===102&&(te=E(),te===156&&jh.lookAhead(()=>{const oe=jh.scan();return oe===80||d_(oe)})&&(te=E()),(te===80||d_(te))&&(te=E(),te===64&&re(!0))))return!0;return!0}return!1}function re(te,Se=!1){let oe=te?E():jh.getToken();return oe===149?(oe=E(),oe===21&&(oe=E(),(oe===11||Se&&oe===15)&&F()),!0):!1}function Y(){let te=jh.getToken();if(te===80&&jh.getTokenValue()==="define"){if(te=E(),te!==21)return!0;if(te=E(),te===11||te===15)if(te=E(),te===28)te=E();else return!0;if(te!==23)return!0;for(te=E();te!==24&&te!==1;)(te===11||te===15)&&F(),te=E();return!0}return!1}function ue(){for(jh.setText(t),E();jh.getToken()!==1;){if(jh.getToken()===16){const te=[jh.getToken()];e:for(;O(te);){const Se=jh.scan();switch(Se){case 1:break e;case 102:q();break;case 16:te.push(Se);break;case 19:O(te)&&te.push(Se);break;case 20:O(te)&&(Ql(te)===16?jh.reScanTemplateToken(!1)===18&&te.pop():te.pop());break}}E()}U()||q()||Q()||a&&(re(!1,!0)||Y())||E()}jh.setText(void 0)}if(r&&ue(),cle(u,t),ule(u,dl),T){if(p)for(const te of p)h.push(te.ref);return{referencedFiles:u.referencedFiles,typeReferenceDirectives:u.typeReferenceDirectives,libReferenceDirectives:u.libReferenceDirectives,importedFiles:h,isLibFile:!!u.hasNoDefaultLib,ambientExternalModules:void 0}}else{let te;if(p)for(const Se of p)Se.depth===0?(te||(te=[]),te.push(Se.ref.fileName)):h.push(Se.ref);return{referencedFiles:u.referencedFiles,typeReferenceDirectives:u.typeReferenceDirectives,libReferenceDirectives:u.libReferenceDirectives,importedFiles:h,isLibFile:!!u.hasNoDefaultLib,ambientExternalModules:te}}}var i3t=/^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+/=]+)$)?/;function LLe(t){const r=Zf(t.useCaseSensitiveFileNames()),a=t.getCurrentDirectory(),u=new Map,h=new Map;return{tryGetSourcePosition:C,tryGetGeneratedPosition:b,toLineColumnOffset:R,clearCache:F,documentPositionMappers:h};function p(j){return _c(j,a,r)}function m(j,U){const q=p(j),Q=h.get(q);if(Q)return Q;let re;if(t.getDocumentPositionMapper)re=t.getDocumentPositionMapper(j,U);else if(t.readFile){const Y=N(j);re=Y&&Gde({getSourceFileLike:N,getCanonicalFileName:r,log:ue=>t.log(ue)},j,ece(Y.text,Wy(Y)),ue=>!t.fileExists||t.fileExists(ue)?t.readFile(ue):void 0)}return h.set(q,re||ice),re||ice}function C(j){if(!xf(j.fileName)||!T(j.fileName))return;const q=m(j.fileName).getSourcePosition(j);return!q||q===j?void 0:C(q)||q}function b(j){if(xf(j.fileName))return;const U=T(j.fileName);if(!U)return;const q=t.getProgram();if(q.isSourceOfProjectReferenceRedirect(U.fileName))return;const re=q.getCompilerOptions().outFile,Y=re?h_(re)+".d.ts":AJ(j.fileName,q.getCompilerOptions(),q);if(Y===void 0)return;const ue=m(Y,j.fileName).getGeneratedPosition(j);return ue===j?void 0:ue}function T(j){const U=t.getProgram();if(!U)return;const q=p(j),Q=U.getSourceFileByPath(q);return Q&&Q.resolvedPath===q?Q:void 0}function E(j){const U=p(j),q=u.get(U);if(q!==void 0)return q||void 0;if(!t.readFile||t.fileExists&&!t.fileExists(j)){u.set(U,!1);return}const Q=t.readFile(j),re=Q?n3t(Q):!1;return u.set(U,re),re||void 0}function N(j){return t.getSourceFileLike?t.getSourceFileLike(j):T(j)||E(j)}function R(j,U){return N(j).getLineAndCharacterOfPosition(U)}function F(){u.clear(),h.clear()}}function Gde(t,r,a,u){let h=JDe(a);if(h){const C=i3t.exec(h);if(C){if(C[1]){const b=C[1];return vZe(t,tke(Wd,b),r)}h=void 0}}const p=[];h&&p.push(h),p.push(r+".map");const m=h&&bo(h,rs(r));for(const C of p){const b=bo(C,rs(r)),T=u(b,m);if(mo(T))return vZe(t,T,b);if(T!==void 0)return T||void 0}}function vZe(t,r,a){const u=KDe(r);if(!(!u||!u.sources||!u.file||!u.mappings)&&!(u.sourcesContent&&u.sourcesContent.some(mo)))return XDe(t,u,a)}function n3t(t,r){return{text:t,lineMap:r,getLineAndCharacterOfPosition(a){return g6(Wy(this),a)}}}var PLe=new Map;function Kde(t,r,a){var u;r.getSemanticDiagnostics(t,a);const h=[],p=r.getTypeChecker();!(t.impliedNodeFormat===1||rd(t.fileName,[".cts",".cjs"]))&&t.commonJsModuleIndicator&&(VNe(r)||sde(r.getCompilerOptions()))&&r3t(t)&&h.push(Kn(l3t(t.commonJsModuleIndicator),k.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module));const C=F_(t);if(PLe.clear(),b(t),cP(r.getCompilerOptions()))for(const T of t.imports){const E=k8(T),N=s3t(E);if(!N)continue;const R=(u=r.getResolvedModuleFromModuleSpecifier(T,t))==null?void 0:u.resolvedModule,F=R&&r.getSourceFile(R.resolvedFileName);F&&F.externalModuleIndicator&&F.externalModuleIndicator!==!0&&Ec(F.externalModuleIndicator)&&F.externalModuleIndicator.isExportEquals&&h.push(Kn(N,k.Import_may_be_converted_to_a_default_import))}return un(h,t.bindSuggestionDiagnostics),un(h,r.getSuggestionDiagnostics(t,a)),h.sort((T,E)=>T.start-E.start);function b(T){if(C)u3t(T,p)&&h.push(Kn(ds(T.parent)?T.parent.name:T,k.This_constructor_function_may_be_converted_to_a_class_declaration));else{if(Ou(T)&&T.parent===t&&T.declarationList.flags&2&&T.declarationList.declarations.length===1){const N=T.declarationList.declarations[0].initializer;N&&B_(N,!0)&&h.push(Kn(N,k.require_call_may_be_converted_to_an_import))}const E=Ch.getJSDocTypedefNodes(T);for(const N of E)h.push(Kn(N,k.JSDoc_typedef_may_be_converted_to_TypeScript_type));Ch.parameterShouldGetTypeFromJSDoc(T)&&h.push(Kn(T.name||T,k.JSDoc_types_may_be_moved_to_TypeScript_types))}Zde(T)&&o3t(T,p,h),T.forEachChild(b)}}function r3t(t){return t.statements.some(r=>{switch(r.kind){case 243:return r.declarationList.declarations.some(a=>!!a.initializer&&B_(yZe(a.initializer),!0));case 244:{const{expression:a}=r;if(!cr(a))return B_(a,!0);const u=Lu(a);return u===1||u===2}default:return!1}})}function yZe(t){return Ir(t)?yZe(t.expression):t}function s3t(t){switch(t.kind){case 272:const{importClause:r,moduleSpecifier:a}=t;return r&&!r.name&&r.namedBindings&&r.namedBindings.kind===274&&ja(a)?r.namedBindings.name:void 0;case 271:return t.name;default:return}}function o3t(t,r,a){a3t(t,r)&&!PLe.has(wZe(t))&&a.push(Kn(!t.name&&ds(t.parent)&<(t.parent.name)?t.parent.name:t,k.This_may_be_converted_to_an_async_function))}function a3t(t,r){return!N8(t)&&t.body&&Ho(t.body)&&c3t(t.body,r)&&Qde(t,r)}function Qde(t,r){const a=r.getSignatureFromDeclaration(t),u=a?r.getReturnTypeOfSignature(a):void 0;return!!u&&!!r.getPromisedTypeOfPromise(u)}function l3t(t){return cr(t)?t.left:t}function c3t(t,r){return!!sS(t,a=>CX(a,r))}function CX(t,r){return Om(t)&&!!t.expression&&Xde(t.expression,r)}function Xde(t,r){if(!bZe(t)||!CZe(t)||!t.arguments.every(u=>SZe(u,r)))return!1;let a=t.expression.expression;for(;bZe(a)||Ir(a);)if(sa(a)){if(!CZe(a)||!a.arguments.every(u=>SZe(u,r)))return!1;a=a.expression.expression}else a=a.expression;return!0}function bZe(t){return sa(t)&&(oH(t,"then")||oH(t,"catch")||oH(t,"finally"))}function CZe(t){const r=t.expression.name.text,a=r==="then"?2:r==="catch"||r==="finally"?1:0;return t.arguments.length>a?!1:t.arguments.lengthu.kind===106||lt(u)&&u.text==="undefined")}function SZe(t,r){switch(t.kind){case 262:case 218:if(ad(t)&1)return!1;case 219:PLe.set(wZe(t),!0);case 106:return!0;case 80:case 211:{const u=r.getSymbolAtLocation(t);return u?r.isUndefinedSymbol(u)||Rt(Of(u,r).declarations,h=>Bo(h)||iS(h)&&!!h.initializer&&Bo(h.initializer)):!1}default:return!1}}function wZe(t){return`${t.pos.toString()}:${t.end.toString()}`}function u3t(t,r){var a,u,h,p;if(gc(t)){if(ds(t.parent)&&((a=t.symbol.members)!=null&&a.size))return!0;const m=r.getSymbolOfExpando(t,!1);return!!(m&&((u=m.exports)!=null&&u.size||(h=m.members)!=null&&h.size))}return Uu(t)?!!((p=t.symbol.members)!=null&&p.size):!1}function Zde(t){switch(t.kind){case 262:case 174:case 218:case 219:return!0;default:return!1}}var d3t=new Set(["isolatedModules"]);function ALe(t,r){return kZe(t,r,!1)}function xZe(t,r){return kZe(t,r,!0)}var f3t=`/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number {} +interface Object {} +interface RegExp {} +interface String {} +interface Array { length: number; [n: number]: T; } +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +}`,SX="lib.d.ts",OLe;function kZe(t,r,a){OLe??(OLe=RP(SX,f3t,{languageVersion:99}));const u=[],h=r.compilerOptions?Yde(r.compilerOptions,u):{},p=MX();for(const U in p)Vl(p,U)&&h[U]===void 0&&(h[U]=p[U]);for(const U of UTe)h.verbatimModuleSyntax&&d3t.has(U.name)||(h[U.name]=U.transpileOptionValue);h.suppressOutputPathCheck=!0,h.allowNonTsExtensions=!0,a?(h.declaration=!0,h.emitDeclarationOnly=!0,h.isolatedDeclarations=!0):h.declaration=!1;const m=fS(h),C={getSourceFile:U=>U===ra(b)?T:U===ra(SX)?OLe:void 0,writeFile:(U,q)=>{tu(U,".map")?(z.assertEqual(N,void 0,"Unexpected multiple source map outputs, file:",U),N=q):(z.assertEqual(E,void 0,"Unexpected multiple outputs, file:",U),E=q)},getDefaultLibFileName:()=>SX,useCaseSensitiveFileNames:()=>!1,getCanonicalFileName:U=>U,getCurrentDirectory:()=>"",getNewLine:()=>m,fileExists:U=>U===b||!!a&&U===SX,readFile:()=>"",directoryExists:()=>!0,getDirectories:()=>[]},b=r.fileName||(r.compilerOptions&&r.compilerOptions.jsx?"module.tsx":"module.ts"),T=RP(b,t,{languageVersion:il(h),impliedNodeFormat:QV(_c(b,"",C.getCanonicalFileName),void 0,C,h),setExternalModuleIndicator:$W(h),jsDocParsingMode:r.jsDocParsingMode??0});r.moduleName&&(T.moduleName=r.moduleName),r.renamedDependencies&&(T.renamedDependencies=new Map(Object.entries(r.renamedDependencies)));let E,N;const F=XV(a?[b,SX]:[b],h,C);r.reportDiagnostics&&(un(u,F.getSyntacticDiagnostics(T)),un(u,F.getOptionsDiagnostics()));const j=F.emit(void 0,void 0,void 0,a,r.transformers,a);return un(u,j.diagnostics),E===void 0?z.fail("Output generation failed"):{outputText:E,diagnostics:u,sourceMapText:N}}function TZe(t,r,a,u,h){const p=ALe(t,{compilerOptions:r,fileName:a,reportDiagnostics:!!u,moduleName:h});return un(u,p.diagnostics),p.outputText}var MLe;function Yde(t,r){MLe=MLe||Ri(K0,a=>typeof a.type=="object"&&!hf(a.type,u=>typeof u!="number")),t=Zue(t);for(const a of MLe){if(!Vl(t,a.name))continue;const u=t[a.name];mo(u)?t[a.name]=fK(a,u,r):hf(a.type,h=>h===u)||r.push(GTe(a))}return t}var RLe={};l(RLe,{getNavigateToItems:()=>DZe});function DZe(t,r,a,u,h,p,m){const C=SLe(u);if(!C)return x;const b=[],T=t.length===1?t[0]:void 0;for(const E of t)a.throwIfCancellationRequested(),!(p&&E.isDeclarationFile)&&(EZe(E,!!m,T)||E.getNamedDeclarations().forEach((N,R)=>{h3t(C,R,N,r,E.fileName,!!m,T,b)}));return b.sort(m3t),(h===void 0?b:b.slice(0,h)).map(v3t)}function EZe(t,r,a){return t!==a&&r&&(kH(t.path)||t.hasNoDefaultLib)}function h3t(t,r,a,u,h,p,m,C){const b=t.getMatchForLastSegmentOfPattern(r);if(b){for(const T of a)if(_3t(T,u,p,m))if(t.patternContainsDots){const E=t.getFullMatch(g3t(T),r);E&&C.push({name:r,fileName:h,matchKind:E.kind,isCaseSensitive:E.isCaseSensitive,declaration:T})}else C.push({name:r,fileName:h,matchKind:b.kind,isCaseSensitive:b.isCaseSensitive,declaration:T})}}function _3t(t,r,a,u){var h;switch(t.kind){case 273:case 276:case 271:const p=r.getSymbolAtLocation(t.name),m=r.getAliasedSymbol(p);return p.escapedName!==m.escapedName&&!((h=m.declarations)!=null&&h.every(C=>EZe(C.getSourceFile(),a,u)));default:return!0}}function p3t(t,r){const a=ko(t);return!!a&&(IZe(a,r)||a.kind===167&&FLe(a.expression,r))}function FLe(t,r){return IZe(t,r)||Ir(t)&&(r.push(t.name.text),!0)&&FLe(t.expression,r)}function IZe(t,r){return Av(t)&&(r.push(Im(t)),!0)}function g3t(t){const r=[],a=ko(t);if(a&&a.kind===167&&!FLe(a.expression,r))return x;r.shift();let u=II(t);for(;u;){if(!p3t(u,r))return x;u=II(u)}return r.reverse()}function m3t(t,r){return hc(t.matchKind,r.matchKind)||gB(t.name,r.name)}function v3t(t){const r=t.declaration,a=II(r),u=a&&ko(a);return{name:t.name,kind:oD(r),kindModifiers:rF(r),matchKind:$de[t.matchKind],isCaseSensitive:t.isCaseSensitive,fileName:t.fileName,textSpan:b_(r),containerName:u?u.text:"",containerKind:u?oD(a):""}}var BLe={};l(BLe,{getNavigationBarItems:()=>LZe,getNavigationTree:()=>PZe});var y3t=/\s+/g,WLe=150,efe,NH,wX=[],wS,NZe=[],U3,VLe=[];function LZe(t,r){efe=r,NH=t;try{return Yt(x3t(MZe(t)),k3t)}finally{AZe()}}function PZe(t,r){efe=r,NH=t;try{return UZe(MZe(t))}finally{AZe()}}function AZe(){NH=void 0,efe=void 0,wX=[],wS=void 0,VLe=[]}function xX(t){return pF(t.getText(NH))}function tfe(t){return t.node.kind}function OZe(t,r){t.children?t.children.push(r):t.children=[r]}function MZe(t){z.assert(!wX.length);const r={node:t,name:void 0,additionalNodes:void 0,parent:void 0,children:void 0,indent:0};wS=r;for(const a of t.statements)XP(a);return n2(),z.assert(!wS&&!wX.length),r}function uD(t,r){OZe(wS,HLe(t,r))}function HLe(t,r){return{node:t,name:r||(Yf(t)||Ut(t)?ko(t):void 0),additionalNodes:void 0,parent:wS,children:void 0,indent:wS.indent+1}}function RZe(t){U3||(U3=new Map),U3.set(t,!0)}function FZe(t){for(let r=0;r0;u--){const h=a[u];dD(t,h)}return[a.length-1,a[0]]}function dD(t,r){const a=HLe(t,r);OZe(wS,a),wX.push(wS),NZe.push(U3),U3=void 0,wS=a}function n2(){wS.children&&(ife(wS.children,wS),ULe(wS.children)),wS=wX.pop(),U3=NZe.pop()}function r2(t,r,a){dD(t,a),XP(r),n2()}function WZe(t){t.initializer&&D3t(t.initializer)?(dD(t),jo(t.initializer,XP),n2()):r2(t,t.initializer)}function jLe(t){const r=ko(t);if(r===void 0)return!1;if(Ja(r)){const a=r.expression;return pc(a)||W_(a)||ug(a)}return!!r}function XP(t){if(efe.throwIfCancellationRequested(),!(!t||RL(t)))switch(t.kind){case 176:const r=t;r2(r,r.body);for(const m of r.parameters)xp(m,r)&&uD(m);break;case 174:case 177:case 178:case 173:jLe(t)&&r2(t,t.body);break;case 172:jLe(t)&&WZe(t);break;case 171:jLe(t)&&uD(t);break;case 273:const a=t;a.name&&uD(a.name);const{namedBindings:u}=a;if(u)if(u.kind===274)uD(u);else for(const m of u.elements)uD(m);break;case 304:r2(t,t.name);break;case 305:const{expression:h}=t;lt(h)?uD(t,h):uD(t);break;case 208:case 303:case 260:{const m=t;Qo(m.name)?XP(m.name):WZe(m);break}case 262:const p=t.name;p&<(p)&&RZe(p.text),r2(t,t.body);break;case 219:case 218:r2(t,t.body);break;case 266:dD(t);for(const m of t.members)T3t(m)||uD(m);n2();break;case 263:case 231:case 264:dD(t);for(const m of t.members)XP(m);n2();break;case 267:r2(t,$Ze(t).body);break;case 277:{const m=t.expression,C=Pa(m)||sa(m)?m:Dc(m)||gc(m)?m.body:void 0;C?(dD(t),XP(C),n2()):uD(t);break}case 281:case 271:case 181:case 179:case 180:case 265:uD(t);break;case 213:case 226:{const m=Lu(t);switch(m){case 1:case 2:r2(t,t.right);return;case 6:case 3:{const C=t,b=C.left,T=m===3?b.expression:b;let E=0,N;lt(T.expression)?(RZe(T.expression.text),N=T.expression):[E,N]=BZe(C,T.expression),m===6?Pa(C.right)&&C.right.properties.length>0&&(dD(C,N),jo(C.right,XP),n2()):gc(C.right)||Dc(C.right)?r2(t,C.right,N):(dD(C,N),r2(t,C.right,b.name),n2()),FZe(E);return}case 7:case 9:{const C=t,b=m===7?C.arguments[0]:C.arguments[0].expression,T=C.arguments[1],[E,N]=BZe(t,b);dD(t,N),dD(t,zt(G.createIdentifier(T.text),T)),XP(t.arguments[2]),n2(),n2(),FZe(E);return}case 5:{const C=t,b=C.left,T=b.expression;if(lt(T)&&Wb(b)!=="prototype"&&U3&&U3.has(T.text)){gc(C.right)||Dc(C.right)?r2(t,C.right,T):PT(b)&&(dD(C,T),r2(C.left,C.right,vW(b)),n2());return}break}case 4:case 0:case 8:break;default:z.assertNever(m)}}default:Jp(t)&&W(t.jsDoc,m=>{W(m.tags,C=>{Em(C)&&uD(C)})}),jo(t,XP)}}function ife(t,r){const a=new Map;ao(t,(u,h)=>{const p=u.name||ko(u.node),m=p&&xX(p);if(!m)return!0;const C=a.get(m);if(!C)return a.set(m,u),!0;if(C instanceof Array){for(const b of C)if(VZe(b,u,h,r))return!1;return C.push(u),!0}else{const b=C;return VZe(b,u,h,r)?!1:(a.set(m,[b,u]),!0)}})}var LH={5:!0,3:!0,7:!0,9:!0,0:!1,1:!1,2:!1,8:!1,6:!0,4:!1};function b3t(t,r,a,u){function h(C){return gc(C)||Uu(C)||ds(C)}const p=cr(r.node)||sa(r.node)?Lu(r.node):0,m=cr(t.node)||sa(t.node)?Lu(t.node):0;if(LH[p]&&LH[m]||h(t.node)&&LH[p]||h(r.node)&&LH[m]||xd(t.node)&&zLe(t.node)&&LH[p]||xd(r.node)&&LH[m]||xd(t.node)&&zLe(t.node)&&h(r.node)||xd(r.node)&&h(t.node)&&zLe(t.node)){let C=t.additionalNodes&&Ql(t.additionalNodes)||t.node;if(!xd(t.node)&&!xd(r.node)||h(t.node)||h(r.node)){const T=h(t.node)?t.node:h(r.node)?r.node:void 0;if(T!==void 0){const E=zt(G.createConstructorDeclaration(void 0,[],void 0),T),N=HLe(E);N.indent=t.indent+1,N.children=t.node===T?t.children:r.children,t.children=t.node===T?no([N],r.children||[r]):no(t.children||[{...t}],[N])}else(t.children||r.children)&&(t.children=no(t.children||[{...t}],r.children||[r]),t.children&&(ife(t.children,t),ULe(t.children)));C=t.node=zt(G.createClassDeclaration(void 0,t.name||G.createIdentifier("__class__"),void 0,void 0,[]),t.node)}else t.children=no(t.children,r.children),t.children&&ife(t.children,t);const b=r.node;return u.children[a-1].node.end===C.end?zt(C,{pos:C.pos,end:b.end}):(t.additionalNodes||(t.additionalNodes=[]),t.additionalNodes.push(zt(G.createClassDeclaration(void 0,t.name||G.createIdentifier("__class__"),void 0,void 0,[]),r.node))),!0}return p!==0}function VZe(t,r,a,u){return b3t(t,r,a,u)?!0:C3t(t.node,r.node,u)?(S3t(t,r),!0):!1}function C3t(t,r,a){if(t.kind!==r.kind||t.parent!==r.parent&&!(HZe(t,a)&&HZe(r,a)))return!1;switch(t.kind){case 172:case 174:case 177:case 178:return da(t)===da(r);case 267:return jZe(t,r)&&JLe(t)===JLe(r);default:return!0}}function zLe(t){return!!(t.flags&16)}function HZe(t,r){const a=jv(t.parent)?t.parent.parent:t.parent;return a===r.node||Mt(r.additionalNodes,a)}function jZe(t,r){return!t.body||!r.body?t.body===r.body:t.body.kind===r.body.kind&&(t.body.kind!==267||jZe(t.body,r.body))}function S3t(t,r){t.additionalNodes=t.additionalNodes||[],t.additionalNodes.push(r.node),r.additionalNodes&&t.additionalNodes.push(...r.additionalNodes),t.children=no(t.children,r.children),t.children&&(ife(t.children,t),ULe(t.children))}function ULe(t){t.sort(w3t)}function w3t(t,r){return gB(zZe(t.node),zZe(r.node))||hc(tfe(t),tfe(r))}function zZe(t){if(t.kind===267)return qZe(t);const r=ko(t);if(r&&od(r)){const a=lI(r);return a&&Ws(a)}switch(t.kind){case 218:case 219:case 231:return GZe(t);default:return}}function qLe(t,r){if(t.kind===267)return pF(qZe(t));if(r){const a=lt(r)?r.text:wc(r)?`[${xX(r.argumentExpression)}]`:xX(r);if(a.length>0)return pF(a)}switch(t.kind){case 307:const a=t;return Td(a)?`"${B1(fd(h_(ra(a.fileName))))}"`:"";case 277:return Ec(t)&&t.isExportEquals?"export=":"default";case 219:case 262:case 218:case 263:case 231:return uS(t)&2048?"default":GZe(t);case 176:return"constructor";case 180:return"new()";case 179:return"()";case 181:return"[]";default:return""}}function x3t(t){const r=[];function a(h){if(u(h)&&(r.push(h),h.children))for(const p of h.children)a(p)}return a(t),r;function u(h){if(h.children)return!0;switch(tfe(h)){case 263:case 231:case 266:case 264:case 267:case 307:case 265:case 346:case 338:return!0;case 219:case 262:case 218:return p(h);default:return!1}function p(m){if(!m.node.body)return!1;switch(tfe(m.parent)){case 268:case 307:case 174:case 176:return!0;default:return!1}}}}function UZe(t){return{text:qLe(t.node,t.name),kind:oD(t.node),kindModifiers:JZe(t.node),spans:$Le(t),nameSpan:t.name&&GLe(t.name),childItems:Yt(t.children,UZe)}}function k3t(t){return{text:qLe(t.node,t.name),kind:oD(t.node),kindModifiers:JZe(t.node),spans:$Le(t),childItems:Yt(t.children,r)||VLe,indent:t.indent,bolded:!1,grayed:!1};function r(a){return{text:qLe(a.node,a.name),kind:oD(a.node),kindModifiers:rF(a.node),spans:$Le(a),childItems:VLe,indent:0,bolded:!1,grayed:!1}}}function $Le(t){const r=[GLe(t.node)];if(t.additionalNodes)for(const a of t.additionalNodes)r.push(GLe(a));return r}function qZe(t){return Bh(t)?yu(t.name):JLe(t)}function JLe(t){const r=[Im(t.name)];for(;t.body&&t.body.kind===267;)t=t.body,r.push(Im(t.name));return r.join(".")}function $Ze(t){return t.body&&qu(t.body)?$Ze(t.body):t}function T3t(t){return!t.name||t.name.kind===167}function GLe(t){return t.kind===307?cx(t):b_(t,NH)}function JZe(t){return t.parent&&t.parent.kind===260&&(t=t.parent),rF(t)}function GZe(t){const{parent:r}=t;if(t.name&&GB(t.name)>0)return pF(sc(t.name));if(ds(r))return pF(sc(r.name));if(cr(r)&&r.operatorToken.kind===64)return xX(r.left).replace(y3t,"");if(pd(r))return xX(r.name);if(uS(t)&2048)return"default";if(ss(t))return"";if(sa(r)){let a=KZe(r.expression);if(a!==void 0){if(a=pF(a),a.length>WLe)return`${a} callback`;const u=pF(ns(r.arguments,h=>Ml(h)||VL(h)?h.getText(NH):void 0).join(", "));return`${a}(${u}) callback`}}return""}function KZe(t){if(lt(t))return t.text;if(Ir(t)){const r=KZe(t.expression),a=t.name.text;return r===void 0?a:`${r}.${a}`}else return}function D3t(t){switch(t.kind){case 219:case 218:case 231:return!0;default:return!1}}function pF(t){return t=t.length>WLe?t.substring(0,WLe)+"...":t,t.replace(/\\?(\r?\n|\r|\u2028|\u2029)/g,"")}var ZP={};l(ZP,{addExportToChanges:()=>vYe,addExportsInOldFile:()=>sPe,addImportsForMovedSymbols:()=>aPe,addNewFileToTsconfig:()=>rPe,addOrRemoveBracesToArrowFunction:()=>_Ot,addTargetFileImports:()=>gPe,containsJsx:()=>dPe,convertArrowFunctionOrFunctionExpression:()=>yOt,convertParamsToDestructuredObject:()=>NOt,convertStringOrTemplateLiteral:()=>GOt,convertToOptionalChainExpression:()=>rMt,createNewFileName:()=>uPe,deleteMovedStatements:()=>oYe,deleteUnusedImports:()=>hYe,deleteUnusedOldImports:()=>aYe,doChangeNamedToNamespaceOrDefault:()=>tYe,extractSymbol:()=>eet,filterImport:()=>gYe,forEachImportInStatement:()=>oPe,generateGetAccessorAndSetAccessor:()=>HMt,getApplicableRefactors:()=>E3t,getEditsForRefactor:()=>I3t,getExistingLocals:()=>_Pe,getIdentifierForNode:()=>pPe,getNewStatementsAndRemoveFromOldFile:()=>nPe,getStatementsToMove:()=>PH,getTopLevelDeclarationStatement:()=>cPe,getUsageInfo:()=>kX,inferFunctionReturnType:()=>jMt,isRefactorErrorInfo:()=>eC,isTopLevelDeclaration:()=>dfe,moduleSpecifierFromImport:()=>uYe,nameOfTopLevelDeclaration:()=>mYe,refactorKindBeginsWith:()=>s2,registerRefactor:()=>rb,updateImportsInOtherFiles:()=>lYe});var KLe=new Map;function rb(t,r){KLe.set(t,r)}function E3t(t,r){return Fn(zg(KLe.values(),a=>{var u;return t.cancellationToken&&t.cancellationToken.isCancellationRequested()||!((u=a.kinds)!=null&&u.some(h=>s2(h,t.kind)))?void 0:a.getAvailableActions(t,r)}))}function I3t(t,r,a,u){const h=KLe.get(r);return h&&h.getEditsForAction(t,a,u)}var QLe="Convert export",nfe={name:"Convert default export to named export",description:Po(k.Convert_default_export_to_named_export),kind:"refactor.rewrite.export.named"},rfe={name:"Convert named export to default export",description:Po(k.Convert_named_export_to_default_export),kind:"refactor.rewrite.export.default"};rb(QLe,{kinds:[nfe.kind,rfe.kind],getAvailableActions:function(r){const a=QZe(r,r.triggerReason==="invoked");if(!a)return x;if(!eC(a)){const u=a.wasDefault?nfe:rfe;return[{name:QLe,description:u.description,actions:[u]}]}return r.preferences.provideRefactorNotApplicableReason?[{name:QLe,description:Po(k.Convert_default_export_to_named_export),actions:[{...nfe,notApplicableReason:a.error},{...rfe,notApplicableReason:a.error}]}]:x},getEditsForAction:function(r,a){z.assert(a===nfe.name||a===rfe.name,"Unexpected action name");const u=QZe(r);return z.assert(u&&!eC(u),"Expected applicable refactor info"),{edits:er.ChangeTracker.with(r,p=>N3t(r.file,r.program,u,p,r.cancellationToken)),renameFilename:void 0,renameLocation:void 0}}});function QZe(t,r=!0){const{file:a,program:u}=t,h=QP(t),p=Rs(a,h.start),m=p.parent&&uS(p.parent)&32&&r?p.parent:vH(p,a,h);if(!m||!Ns(m.parent)&&!(jv(m.parent)&&Bh(m.parent.parent)))return{error:Po(k.Could_not_find_export_statement)};const C=u.getTypeChecker(),b=M3t(m.parent,C),T=uS(m)||(Ec(m)&&!m.isExportEquals?2080:0),E=!!(T&2048);if(!(T&32)||!E&&b.exports.has("default"))return{error:Po(k.This_file_already_has_a_default_export)};const N=R=>lt(R)&&C.getSymbolAtLocation(R)?void 0:{error:Po(k.Can_only_convert_named_export)};switch(m.kind){case 262:case 263:case 264:case 266:case 265:case 267:{const R=m;return R.name?N(R.name)||{exportNode:R,exportName:R.name,wasDefault:E,exportingModuleSymbol:b}:void 0}case 243:{const R=m;if(!(R.declarationList.flags&2)||R.declarationList.declarations.length!==1)return;const F=ma(R.declarationList.declarations);return F.initializer?(z.assert(!E,"Can't have a default flag here"),N(F.name)||{exportNode:R,exportName:F.name,wasDefault:E,exportingModuleSymbol:b}):void 0}case 277:{const R=m;return R.isExportEquals?void 0:N(R.expression)||{exportNode:R,exportName:R.expression,wasDefault:E,exportingModuleSymbol:b}}default:return}}function N3t(t,r,a,u,h){L3t(t,a,u,r.getTypeChecker()),P3t(r,a,u,h)}function L3t(t,{wasDefault:r,exportNode:a,exportName:u},h,p){if(r)if(Ec(a)&&!a.isExportEquals){const m=a.expression,C=XZe(m.text,m.text);h.replaceNode(t,a,G.createExportDeclaration(void 0,!1,G.createNamedExports([C])))}else h.delete(t,z.checkDefined(R3(a,90),"Should find a default keyword in modifier list"));else{const m=z.checkDefined(R3(a,95),"Should find an export keyword in modifier list");switch(a.kind){case 262:case 263:case 264:h.insertNodeAfter(t,m,G.createToken(90));break;case 243:const C=ma(a.declarationList.declarations);if(!xc.Core.isSymbolReferencedInFile(u,p,t)&&!C.type){h.replaceNode(t,a,G.createExportDefault(z.checkDefined(C.initializer,"Initializer was previously known to be present")));break}case 266:case 265:case 267:h.deleteModifier(t,m),h.insertNodeAfter(t,a,G.createExportDefault(G.createIdentifier(u.text)));break;default:z.fail(`Unexpected exportNode kind ${a.kind}`)}}}function P3t(t,{wasDefault:r,exportName:a,exportingModuleSymbol:u},h,p){const m=t.getTypeChecker(),C=z.checkDefined(m.getSymbolAtLocation(a),"Export name should resolve to a symbol");xc.Core.eachExportReference(t.getSourceFiles(),m,p,C,u,a.text,r,b=>{if(a===b)return;const T=b.getSourceFile();r?A3t(T,b,h,a.text):O3t(T,b,h)})}function A3t(t,r,a,u){const{parent:h}=r;switch(h.kind){case 211:a.replaceNode(t,r,G.createIdentifier(u));break;case 276:case 281:{const m=h;a.replaceNode(t,m,XLe(u,m.name.text));break}case 273:{const m=h;z.assert(m.name===r,"Import clause name should match provided ref");const C=XLe(u,r.text),{namedBindings:b}=m;if(!b)a.replaceNode(t,r,G.createNamedImports([C]));else if(b.kind===274){a.deleteRange(t,{pos:r.getStart(t),end:b.getStart(t)});const T=ja(m.parent.moduleSpecifier)?ade(m.parent.moduleSpecifier,t):1,E=ux(void 0,[XLe(u,r.text)],m.parent.moduleSpecifier,T);a.insertNodeAfter(t,m.parent,E)}else a.delete(t,r),a.insertNodeAtEndOfList(t,b.elements,C);break}case 205:const p=h;a.replaceNode(t,h,G.createImportTypeNode(p.argument,p.attributes,G.createIdentifier(u),p.typeArguments,p.isTypeOf));break;default:z.failBadSyntaxKind(h)}}function O3t(t,r,a){const u=r.parent;switch(u.kind){case 211:a.replaceNode(t,r,G.createIdentifier("default"));break;case 276:{const h=G.createIdentifier(u.name.text);u.parent.elements.length===1?a.replaceNode(t,u.parent,h):(a.delete(t,u),a.insertNodeBefore(t,u.parent,h));break}case 281:{a.replaceNode(t,u,XZe("default",u.name.text));break}default:z.assertNever(u,`Unexpected parent kind ${u.kind}`)}}function XLe(t,r){return G.createImportSpecifier(!1,t===r?void 0:G.createIdentifier(t),G.createIdentifier(r))}function XZe(t,r){return G.createExportSpecifier(!1,t===r?void 0:G.createIdentifier(t),G.createIdentifier(r))}function M3t(t,r){if(Ns(t))return t.symbol;const a=t.parent.symbol;return a.valueDeclaration&&DT(a.valueDeclaration)?r.getMergedSymbol(a):a}var ZLe="Convert import",sfe={0:{name:"Convert namespace import to named imports",description:Po(k.Convert_namespace_import_to_named_imports),kind:"refactor.rewrite.import.named"},2:{name:"Convert named imports to namespace import",description:Po(k.Convert_named_imports_to_namespace_import),kind:"refactor.rewrite.import.namespace"},1:{name:"Convert named imports to default import",description:Po(k.Convert_named_imports_to_default_import),kind:"refactor.rewrite.import.default"}};rb(ZLe,{kinds:Za(sfe).map(t=>t.kind),getAvailableActions:function(r){const a=ZZe(r,r.triggerReason==="invoked");if(!a)return x;if(!eC(a)){const u=sfe[a.convertTo];return[{name:ZLe,description:u.description,actions:[u]}]}return r.preferences.provideRefactorNotApplicableReason?Za(sfe).map(u=>({name:ZLe,description:u.description,actions:[{...u,notApplicableReason:a.error}]})):x},getEditsForAction:function(r,a){z.assert(Rt(Za(sfe),p=>p.name===a),"Unexpected action name");const u=ZZe(r);return z.assert(u&&!eC(u),"Expected applicable refactor info"),{edits:er.ChangeTracker.with(r,p=>R3t(r.file,r.program,p,u)),renameFilename:void 0,renameLocation:void 0}}});function ZZe(t,r=!0){const{file:a}=t,u=QP(t),h=Rs(a,u.start),p=r?Xi(h,lg(Cu,$v)):vH(h,a,u);if(p===void 0||!(Cu(p)||$v(p)))return{error:"Selection is not an import declaration."};const m=u.start+u.length,C=aD(p,p.parent,a);if(C&&m>C.getStart())return;const{importClause:b}=p;return b?b.namedBindings?b.namedBindings.kind===274?{convertTo:0,import:b.namedBindings}:YZe(t.program,b)?{convertTo:1,import:b.namedBindings}:{convertTo:2,import:b.namedBindings}:{error:Po(k.Could_not_find_namespace_import_or_named_imports)}:{error:Po(k.Could_not_find_import_clause)}}function YZe(t,r){return cP(t.getCompilerOptions())&&W3t(r.parent.moduleSpecifier,t.getTypeChecker())}function R3t(t,r,a,u){const h=r.getTypeChecker();u.convertTo===0?F3t(t,h,a,u.import,cP(r.getCompilerOptions())):tYe(t,r,a,u.import,u.convertTo===1)}function F3t(t,r,a,u,h){let p=!1;const m=[],C=new Map;xc.Core.eachSymbolReferenceInFile(u.name,r,t,N=>{if(!zB(N.parent))p=!0;else{const R=eYe(N.parent).text;r.resolveName(R,N,-1,!0)&&C.set(R,!0),z.assert(B3t(N.parent)===N,"Parent expression should match id"),m.push(N.parent)}});const b=new Map;for(const N of m){const R=eYe(N).text;let F=b.get(R);F===void 0&&b.set(R,F=C.has(R)?LI(R,t):R),a.replaceNode(t,N,G.createIdentifier(F))}const T=[];b.forEach((N,R)=>{T.push(G.createImportSpecifier(!1,N===R?void 0:G.createIdentifier(R),G.createIdentifier(N)))});const E=u.parent.parent;if(p&&!h&&Cu(E))a.insertNodeAfter(t,E,iYe(E,void 0,T));else{const N=p?G.createIdentifier(u.name.text):void 0;a.replaceNode(t,u.parent,nYe(N,T))}}function eYe(t){return Ir(t)?t.name:t.right}function B3t(t){return Ir(t)?t.expression:t.left}function tYe(t,r,a,u,h=YZe(r,u.parent)){const p=r.getTypeChecker(),m=u.parent.parent,{moduleSpecifier:C}=m,b=new Set;u.elements.forEach(j=>{const U=p.getSymbolAtLocation(j.name);U&&b.add(U)});const T=C&&ja(C)?TH(C.text,99):"module";function E(j){return!!xc.Core.eachSymbolReferenceInFile(j.name,p,t,U=>{const q=p.resolveName(T,U,-1,!0);return q?b.has(q)?gh(U.parent):!0:!1})}const R=u.elements.some(E)?LI(T,t):T,F=new Set;for(const j of u.elements){const U=(j.propertyName||j.name).text;xc.Core.eachSymbolReferenceInFile(j.name,p,t,q=>{const Q=G.createPropertyAccessExpression(G.createIdentifier(R),U);ih(q.parent)?a.replaceNode(t,q.parent,G.createPropertyAssignment(q.text,Q)):gh(q.parent)?F.add(j):a.replaceNode(t,q,Q)})}if(a.replaceNode(t,u,h?G.createIdentifier(R):G.createNamespaceImport(G.createIdentifier(R))),F.size&&Cu(m)){const j=Fn(F.values(),U=>G.createImportSpecifier(U.isTypeOnly,U.propertyName&&G.createIdentifier(U.propertyName.text),G.createIdentifier(U.name.text)));a.insertNodeAfter(t,u.parent.parent,iYe(m,void 0,j))}}function W3t(t,r){const a=r.resolveExternalModuleName(t);if(!a)return!1;const u=r.resolveExternalModuleSymbol(a);return a!==u}function iYe(t,r,a){return G.createImportDeclaration(void 0,nYe(r,a),t.moduleSpecifier,void 0)}function nYe(t,r){return G.createImportClause(!1,t,r&&r.length?G.createNamedImports(r):void 0)}var YLe="Extract type",ofe={name:"Extract to type alias",description:Po(k.Extract_to_type_alias),kind:"refactor.extract.type"},afe={name:"Extract to interface",description:Po(k.Extract_to_interface),kind:"refactor.extract.interface"},lfe={name:"Extract to typedef",description:Po(k.Extract_to_typedef),kind:"refactor.extract.typedef"};rb(YLe,{kinds:[ofe.kind,afe.kind,lfe.kind],getAvailableActions:function(r){const{info:a,affectedTextRange:u}=rYe(r,r.triggerReason==="invoked");return a?eC(a)?r.preferences.provideRefactorNotApplicableReason?[{name:YLe,description:Po(k.Extract_type),actions:[{...lfe,notApplicableReason:a.error},{...ofe,notApplicableReason:a.error},{...afe,notApplicableReason:a.error}]}]:x:[{name:YLe,description:Po(k.Extract_type),actions:a.isJS?[lfe]:xi([ofe],a.typeElements&&afe)}].map(p=>({...p,actions:p.actions.map(m=>({...m,range:u?{start:{line:Da(r.file,u.pos).line,offset:Da(r.file,u.pos).character},end:{line:Da(r.file,u.end).line,offset:Da(r.file,u.end).character}}:void 0}))})):x},getEditsForAction:function(r,a){const{file:u}=r,{info:h}=rYe(r);z.assert(h&&!eC(h),"Expected to find a range to extract");const p=LI("NewType",u),m=er.ChangeTracker.with(r,T=>{switch(a){case ofe.name:return z.assert(!h.isJS,"Invalid actionName/JS combo"),j3t(T,u,p,h);case lfe.name:return z.assert(h.isJS,"Invalid actionName/JS combo"),U3t(T,r,u,p,h);case afe.name:return z.assert(!h.isJS&&!!h.typeElements,"Invalid actionName/JS combo"),z3t(T,u,p,h);default:z.fail("Unexpected action name")}}),C=u.fileName,b=CH(m,C,p,!1);return{edits:m,renameFilename:C,renameLocation:b}}});function rYe(t,r=!0){const{file:a,startPosition:u}=t,h=F_(a),p=qQ(QP(t)),m=p.pos===p.end&&r,C=V3t(a,u,p,m);if(!C||!gs(C))return{info:{error:Po(k.Selection_is_not_a_valid_type_node)},affectedTextRange:void 0};const b=t.program.getTypeChecker(),T=q3t(C,h);if(T===void 0)return{info:{error:Po(k.No_type_could_be_extracted_from_this_type_node)},affectedTextRange:void 0};const E=$3t(C,T);if(!gs(E))return{info:{error:Po(k.Selection_is_not_a_valid_type_node)},affectedTextRange:void 0};const N=[];(Yw(E.parent)||DP(E.parent))&&p.end>C.end&&un(N,E.parent.types.filter(q=>MQ(q,a,p.pos,p.end)));const R=N.length>1?N:E,{typeParameters:F,affectedTextRange:j}=H3t(b,R,T,a);if(!F)return{info:{error:Po(k.No_type_could_be_extracted_from_this_type_node)},affectedTextRange:void 0};const U=cfe(b,R);return{info:{isJS:h,selection:R,enclosingNode:T,typeParameters:F,typeElements:U},affectedTextRange:j}}function V3t(t,r,a,u){const h=[()=>Rs(t,r),()=>O3(t,r,()=>!0)];for(const p of h){const m=p(),C=MQ(m,t,a.pos,a.end),b=Xi(m,T=>T.parent&&gs(T)&&!fD(a,T.parent,t)&&(u||C));if(b)return b}}function cfe(t,r){if(r){if(Lo(r)){const a=[];for(const u of r){const h=cfe(t,u);if(!h)return;un(a,h)}return a}if(DP(r)){const a=[],u=new Map;for(const h of r.types){const p=cfe(t,h);if(!p||!p.every(m=>m.name&&Lm(u,gH(m.name))))return;un(a,p)}return a}else{if(_I(r))return cfe(t,r.type);if(p_(r))return r.members}}}function fD(t,r,a){return uH(t,qa(a.text,r.pos),r.end)}function H3t(t,r,a,u){const h=[],p=NL(r),m={pos:p[0].getStart(u),end:p[p.length-1].end};for(const b of p)if(C(b))return{typeParameters:void 0,affectedTextRange:void 0};return{typeParameters:h,affectedTextRange:m};function C(b){if(_g(b)){if(lt(b.typeName)){const T=b.typeName,E=t.resolveName(T.text,T,262144,!0);for(const N of(E==null?void 0:E.declarations)||x)if(Uc(N)&&N.getSourceFile()===u){if(N.name.escapedText===T.escapedText&&fD(N,m,u))return!0;if(fD(a,N,u)&&!fD(m,N,u)){Cc(h,N);break}}}}else if(hI(b)){const T=Xi(b,E=>$T(E)&&fD(E.extendsType,b,u));if(!T||!fD(m,T,u))return!0}else if(kP(b)||s3(b)){const T=Xi(b.parent,Bo);if(T&&T.type&&fD(T.type,b,u)&&!fD(m,T,u))return!0}else if(qT(b)){if(lt(b.exprName)){const T=t.resolveName(b.exprName.text,b.exprName,111551,!1);if(T!=null&&T.valueDeclaration&&fD(a,T.valueDeclaration,u)&&!fD(m,T.valueDeclaration,u))return!0}else if(Uw(b.exprName.left)&&!fD(m,b.parent,u))return!0}return u&&TP(b)&&Da(u,b.pos).line===Da(u,b.end).line&&ir(b,1),jo(b,C)}}function j3t(t,r,a,u){const{enclosingNode:h,typeParameters:p}=u,{firstTypeNode:m,lastTypeNode:C,newTypeNode:b}=ePe(u),T=G.createTypeAliasDeclaration(void 0,a,p.map(E=>G.updateTypeParameterDeclaration(E,E.modifiers,E.name,E.constraint,void 0)),b);t.insertNodeBefore(r,h,Sae(T),!0),t.replaceNodeRange(r,m,C,G.createTypeReferenceNode(a,p.map(E=>G.createTypeReferenceNode(E.name,void 0))),{leadingTriviaOption:er.LeadingTriviaOption.Exclude,trailingTriviaOption:er.TrailingTriviaOption.ExcludeWhitespace})}function z3t(t,r,a,u){var h;const{enclosingNode:p,typeParameters:m,typeElements:C}=u,b=G.createInterfaceDeclaration(void 0,a,m,void 0,C);zt(b,(h=C[0])==null?void 0:h.parent),t.insertNodeBefore(r,p,Sae(b),!0);const{firstTypeNode:T,lastTypeNode:E}=ePe(u);t.replaceNodeRange(r,T,E,G.createTypeReferenceNode(a,m.map(N=>G.createTypeReferenceNode(N.name,void 0))),{leadingTriviaOption:er.LeadingTriviaOption.Exclude,trailingTriviaOption:er.TrailingTriviaOption.ExcludeWhitespace})}function U3t(t,r,a,u,h){var p;NL(h.selection).forEach(j=>{ir(j,7168)});const{enclosingNode:m,typeParameters:C}=h,{firstTypeNode:b,lastTypeNode:T,newTypeNode:E}=ePe(h),N=G.createJSDocTypedefTag(G.createIdentifier("typedef"),G.createJSDocTypeExpression(E),G.createIdentifier(u)),R=[];W(C,j=>{const U=C6(j),q=G.createTypeParameterDeclaration(void 0,j.name),Q=G.createJSDocTemplateTag(G.createIdentifier("template"),U&&ua(U,qk),[q]);R.push(Q)});const F=G.createJSDocComment(void 0,G.createNodeArray(no(R,[N])));if(G0(m)){const j=m.getStart(a),U=SS(r.host,(p=r.formatContext)==null?void 0:p.options);t.insertNodeAt(a,m.getStart(a),F,{suffix:U+U+a.text.slice(eX(a.text,j-1),j)})}else t.insertNodeBefore(a,m,F,!0);t.replaceNodeRange(a,b,T,G.createTypeReferenceNode(u,C.map(j=>G.createTypeReferenceNode(j.name,void 0))))}function ePe(t){return Lo(t.selection)?{firstTypeNode:t.selection[0],lastTypeNode:t.selection[t.selection.length-1],newTypeNode:Yw(t.selection[0].parent)?G.createUnionTypeNode(t.selection):G.createIntersectionTypeNode(t.selection)}:{firstTypeNode:t.selection,lastTypeNode:t.selection,newTypeNode:t.selection}}function q3t(t,r){return Xi(t,Es)||(r?Xi(t,G0):void 0)}function $3t(t,r){return Xi(t,a=>a===r?"quit":!!(Yw(a.parent)||DP(a.parent)))??t}var ufe="Move to file",tPe=Po(k.Move_to_file),iPe={name:"Move to file",description:tPe,kind:"refactor.move.file"};rb(ufe,{kinds:[iPe.kind],getAvailableActions:function(r,a){const u=r.file,h=PH(r);if(!a)return x;if(r.triggerReason==="implicit"&&r.endPosition!==void 0){const p=Xi(Rs(u,r.startPosition),j3),m=Xi(Rs(u,r.endPosition),j3);if(p&&!Ns(p)&&m&&!Ns(m))return x}if(r.preferences.allowTextChangesInNewFiles&&h){const p={start:{line:Da(u,h.all[0].getStart(u)).line,offset:Da(u,h.all[0].getStart(u)).character},end:{line:Da(u,La(h.all).end).line,offset:Da(u,La(h.all).end).character}};return[{name:ufe,description:tPe,actions:[{...iPe,range:p}]}]}return r.preferences.provideRefactorNotApplicableReason?[{name:ufe,description:tPe,actions:[{...iPe,notApplicableReason:Po(k.Selection_is_not_a_valid_statement_or_statements)}]}]:x},getEditsForAction:function(r,a,u){z.assert(a===ufe,"Wrong refactor invoked");const h=z.checkDefined(PH(r)),{host:p,program:m}=r;z.assert(u,"No interactive refactor arguments available");const C=u.targetFile;return Zy(C)||dP(C)?p.fileExists(C)&&m.getSourceFile(C)===void 0?sYe(Po(k.Cannot_move_statements_to_the_selected_file)):{edits:er.ChangeTracker.with(r,T=>J3t(r,r.file,u.targetFile,r.program,h,T,r.host,r.preferences)),renameFilename:void 0,renameLocation:void 0}:sYe(Po(k.Cannot_move_to_file_selected_file_is_invalid))}});function sYe(t){return{edits:[],renameFilename:void 0,renameLocation:void 0,notApplicableReason:t}}function J3t(t,r,a,u,h,p,m,C){const b=u.getTypeChecker(),T=!m.fileExists(a),E=T?vX(a,r.externalModuleIndicator?99:r.commonJsModuleIndicator?1:void 0,u,m):z.checkDefined(u.getSourceFile(a)),N=Ch.createImportAdder(r,t.program,t.preferences,t.host),R=Ch.createImportAdder(E,t.program,t.preferences,t.host);nPe(r,E,kX(r,h.all,b,T?void 0:_Pe(E,h.all,b)),p,h,u,m,C,R,N),T&&rPe(u,p,r.fileName,a,cS(m))}function nPe(t,r,a,u,h,p,m,C,b,T){const E=p.getTypeChecker(),N=yre(t.statements,Nv),R=!Rde(r.fileName,p,m,!!t.commonJsModuleIndicator),F=bg(t,C);aPe(a.oldFileImportsFromTargetFile,r.fileName,T,p),aYe(t,h.all,a.unusedImportsFromOldFile,T),T.writeFixes(u,F),oYe(t,h.ranges,u),lYe(u,p,m,t,a.movedSymbols,r.fileName,F),sPe(t,a.targetFileImportsFromOldFile,u,R),gPe(t,a.oldImportsNeededByTargetFile,a.targetFileImportsFromOldFile,E,p,b),!aS(r)&&N.length&&u.insertStatementsInNewFile(r.fileName,N,t),b.writeFixes(u,F);const j=Z3t(t,h.all,Fn(a.oldFileImportsFromTargetFile.keys()),R);aS(r)&&r.statements.length>0?dOt(u,p,j,r,h):aS(r)?u.insertNodesAtEndOfFile(r,j,!1):u.insertStatementsInNewFile(r.fileName,b.hasFixes()?[4,...j]:j,t)}function rPe(t,r,a,u,h){const p=t.getCompilerOptions().configFile;if(!p)return;const m=ra(Hr(a,"..",u)),C=KR(p.fileName,m,h),b=p.statements[0]&&$r(p.statements[0].expression,Pa),T=b&&Me(b.properties,E=>pd(E)&&ja(E.name)&&E.name.text==="files");T&&Rf(T.initializer)&&r.insertNodeInListAfter(p,La(T.initializer.elements),G.createStringLiteral(C),T.initializer.elements)}function oYe(t,r,a){for(const{first:u,afterLast:h}of r)a.deleteNodeRangeExcludingEnd(t,u,h)}function aYe(t,r,a,u){for(const h of t.statements)Mt(r,h)||oPe(h,p=>{dYe(p,m=>{a.has(m.symbol)&&u.removeExistingImport(m)})})}function sPe(t,r,a,u){const h=M3();r.forEach((p,m)=>{if(m.declarations)for(const C of m.declarations){if(!dfe(C))continue;const b=mYe(C);if(!b)continue;const T=cPe(C);h(T)&&vYe(t,T,b,a,u)}})}function lYe(t,r,a,u,h,p,m){const C=r.getTypeChecker();for(const b of r.getSourceFiles())if(b!==u)for(const T of b.statements)oPe(T,E=>{if(C.getSymbolAtLocation(uYe(E))!==u.symbol)return;const N=q=>{const Q=nl(q.parent)?XQ(C,q.parent):Of(C.getSymbolAtLocation(q),C);return!!Q&&h.has(Q)};hYe(b,E,t,N);const R=Ck(rs(bo(u.fileName,r.getCurrentDirectory())),p);if(f6(!r.useCaseSensitiveFileNames())(R,b.fileName)===0)return;const F=oKe(r.getCompilerOptions(),b,b.fileName,R,KP(r,a)),j=gYe(E,oF(F,m),N);j&&t.insertNodeAfter(b,T,j);const U=G3t(E);U&&K3t(t,b,C,h,F,U,E,m)})}function G3t(t){switch(t.kind){case 272:return t.importClause&&t.importClause.namedBindings&&t.importClause.namedBindings.kind===274?t.importClause.namedBindings.name:void 0;case 271:return t.name;case 260:return $r(t.name,lt);default:return z.assertNever(t,`Unexpected node kind ${t.kind}`)}}function K3t(t,r,a,u,h,p,m,C){const b=TH(h,99);let T=!1;const E=[];if(xc.Core.eachSymbolReferenceInFile(p,a,r,N=>{Ir(N.parent)&&(T=T||!!a.resolveName(b,N,-1,!0),u.has(a.getSymbolAtLocation(N.parent.name))&&E.push(N))}),E.length){const N=T?LI(b,r):b;for(const R of E)t.replaceNode(r,R,G.createIdentifier(N));t.insertNodeAfter(r,m,Q3t(m,b,h,C))}}function Q3t(t,r,a,u){const h=G.createIdentifier(r),p=oF(a,u);switch(t.kind){case 272:return G.createImportDeclaration(void 0,G.createImportClause(!1,void 0,G.createNamespaceImport(h)),p,void 0);case 271:return G.createImportEqualsDeclaration(void 0,!1,h,G.createExternalModuleReference(p));case 260:return G.createVariableDeclaration(h,void 0,void 0,cYe(p));default:return z.assertNever(t,`Unexpected node kind ${t.kind}`)}}function cYe(t){return G.createCallExpression(G.createIdentifier("require"),void 0,[t])}function uYe(t){return t.kind===272?t.moduleSpecifier:t.kind===271?t.moduleReference.expression:t.initializer.arguments[0]}function oPe(t,r){if(Cu(t))ja(t.moduleSpecifier)&&r(t);else if(kd(t))Kb(t.moduleReference)&&Ml(t.moduleReference.expression)&&r(t);else if(Ou(t))for(const a of t.declarationList.declarations)a.initializer&&B_(a.initializer,!0)&&r(a)}function dYe(t,r){var a,u,h,p,m;if(t.kind===272){if((a=t.importClause)!=null&&a.name&&r(t.importClause),((h=(u=t.importClause)==null?void 0:u.namedBindings)==null?void 0:h.kind)===274&&r(t.importClause.namedBindings),((m=(p=t.importClause)==null?void 0:p.namedBindings)==null?void 0:m.kind)===275)for(const C of t.importClause.namedBindings.elements)r(C)}else if(t.kind===271)r(t);else if(t.kind===260){if(t.name.kind===80)r(t);else if(t.name.kind===206)for(const C of t.name.elements)lt(C.name)&&r(C)}}function aPe(t,r,a,u){for(const[h,p]of t){const m=dX(h,il(u.getCompilerOptions())),C=h.name==="default"&&h.parent?1:0;a.addImportForNonExistentExport(m,r,C,h.flags,p)}}function X3t(t,r,a,u=2){return G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(t,void 0,r,a)],u))}function Z3t(t,r,a,u){return Ln(r,h=>{if(_Ye(h)&&!fYe(t,h,u)&&hPe(h,p=>{var m;return a.includes(z.checkDefined((m=$r(p,H0))==null?void 0:m.symbol))})){const p=Y3t(Pl(h),u);if(p)return p}return Pl(h)})}function fYe(t,r,a,u){var h;return a?!_f(r)&&Kr(r,32)||!!(u&&t.symbol&&((h=t.symbol.exports)!=null&&h.has(u.escapedText))):!!t.symbol&&!!t.symbol.exports&&lPe(r).some(p=>t.symbol.exports.has(du(p)))}function hYe(t,r,a,u){if(r.kind===272&&r.importClause){const{name:h,namedBindings:p}=r.importClause;if((!h||u(h))&&(!p||p.kind===275&&p.elements.length!==0&&p.elements.every(m=>u(m.name))))return a.delete(t,r)}dYe(r,h=>{h.name&<(h.name)&&u(h.name)&&a.delete(t,h)})}function _Ye(t){return z.assert(Ns(t.parent),"Node parent should be a SourceFile"),SYe(t)||Ou(t)}function Y3t(t,r){return r?[eOt(t)]:tOt(t)}function eOt(t){const r=_0(t)?no([G.createModifier(95)],CT(t)):void 0;switch(t.kind){case 262:return G.updateFunctionDeclaration(t,r,t.asteriskToken,t.name,t.typeParameters,t.parameters,t.type,t.body);case 263:const a=eD(t)?Fw(t):void 0;return G.updateClassDeclaration(t,no(a,r),t.name,t.typeParameters,t.heritageClauses,t.members);case 243:return G.updateVariableStatement(t,r,t.declarationList);case 267:return G.updateModuleDeclaration(t,r,t.name,t.body);case 266:return G.updateEnumDeclaration(t,r,t.name,t.members);case 265:return G.updateTypeAliasDeclaration(t,r,t.name,t.typeParameters,t.type);case 264:return G.updateInterfaceDeclaration(t,r,t.name,t.typeParameters,t.heritageClauses,t.members);case 271:return G.updateImportEqualsDeclaration(t,r,t.isTypeOnly,t.name,t.moduleReference);case 244:return z.fail();default:return z.assertNever(t,`Unexpected declaration kind ${t.kind}`)}}function tOt(t){return[t,...lPe(t).map(pYe)]}function pYe(t){return G.createExpressionStatement(G.createBinaryExpression(G.createPropertyAccessExpression(G.createIdentifier("exports"),G.createIdentifier(t)),64,G.createIdentifier(t)))}function lPe(t){switch(t.kind){case 262:case 263:return[t.name.text];case 243:return ns(t.declarationList.declarations,r=>lt(r.name)?r.name.text:void 0);case 267:case 266:case 265:case 264:case 271:return x;case 244:return z.fail("Can't export an ExpressionStatement");default:return z.assertNever(t,`Unexpected decl kind ${t.kind}`)}}function gYe(t,r,a){switch(t.kind){case 272:{const u=t.importClause;if(!u)return;const h=u.name&&a(u.name)?u.name:void 0,p=u.namedBindings&&iOt(u.namedBindings,a);return h||p?G.createImportDeclaration(void 0,G.createImportClause(u.isTypeOnly,h,p),Pl(r),void 0):void 0}case 271:return a(t.name)?t:void 0;case 260:{const u=nOt(t.name,a);return u?X3t(u,t.type,cYe(r),t.parent.flags):void 0}default:return z.assertNever(t,`Unexpected import kind ${t.kind}`)}}function iOt(t,r){if(t.kind===274)return r(t.name)?t:void 0;{const a=t.elements.filter(u=>r(u.name));return a.length?G.createNamedImports(a):void 0}}function nOt(t,r){switch(t.kind){case 80:return r(t)?t:void 0;case 207:return t;case 206:{const a=t.elements.filter(u=>u.propertyName||!lt(u.name)||r(u.name));return a.length?G.createObjectBindingPattern(a):void 0}}}function mYe(t){return _f(t)?$r(t.expression.left.name,lt):$r(t.name,lt)}function cPe(t){switch(t.kind){case 260:return t.parent.parent;case 208:return cPe(ua(t.parent.parent,r=>ds(r)||nl(r)));default:return t}}function vYe(t,r,a,u,h){if(!fYe(t,r,h,a))if(h)_f(r)||u.insertExportModifier(t,r);else{const p=lPe(r);p.length!==0&&u.insertNodesAfter(t,r,p.map(pYe))}}function uPe(t,r,a,u){const h=r.getTypeChecker();if(u){const p=kX(t,u.all,h),m=rs(t.fileName),C=X8(t.fileName);return Hr(m,lOt(cOt(p.oldFileImportsFromTargetFile,p.movedSymbols),C,m,a))+C}return""}function rOt(t){const{file:r}=t,a=qQ(QP(t)),{statements:u}=r;let h=Nt(u,T=>T.end>a.pos);if(h===-1)return;const p=u[h],m=wYe(r,p);m&&(h=m.start);let C=Nt(u,T=>T.end>=a.end,h);C!==-1&&a.end<=u[C].getStart()&&C--;const b=wYe(r,u[C]);return b&&(C=b.end),{toMove:u.slice(h,C===-1?u.length:C+1),afterLast:C===-1?void 0:u[C+1]}}function PH(t){const r=rOt(t);if(r===void 0)return;const a=[],u=[],{toMove:h,afterLast:p}=r;return Ry(h,sOt,(m,C)=>{for(let b=m;b!!(r.transformFlags&2))}function sOt(t){return!oOt(t)&&!Nv(t)}function oOt(t){switch(t.kind){case 272:return!0;case 271:return!Kr(t,32);case 243:return t.declarationList.declarations.every(r=>!!r.initializer&&B_(r.initializer,!0));default:return!1}}function kX(t,r,a,u=new Set){var h;const p=new Set,m=new Map,C=new Map,b=N(dPe(r));b&&m.set(b,[!1,$r((h=b.declarations)==null?void 0:h[0],R=>m_(R)||$0(R)||eb(R)||kd(R)||nl(R)||ds(R))]);for(const R of r)hPe(R,F=>{p.add(z.checkDefined(_f(F)?a.getSymbolAtLocation(F.expression.left):F.symbol,"Need a symbol here"))});const T=new Set;for(const R of r)fPe(R,a,(F,j)=>{if(!(!F.declarations||aOt(a,F))){if(u.has(Of(F,a))){T.add(F);return}for(const U of F.declarations)if(yYe(U)){const q=m.get(F);m.set(F,[(q===void 0||q)&&j,$r(U,Q=>m_(Q)||$0(Q)||eb(Q)||kd(Q)||nl(Q)||ds(Q))])}else dfe(U)&&uOt(U)===t&&!p.has(F)&&C.set(F,j)}});for(const R of m.keys())T.add(R);const E=new Map;for(const R of t.statements)Mt(r,R)||(b&&R.transformFlags&2&&T.delete(b),fPe(R,a,(F,j)=>{p.has(F)&&E.set(F,j),T.delete(F)}));return{movedSymbols:p,targetFileImportsFromOldFile:C,oldFileImportsFromTargetFile:E,oldImportsNeededByTargetFile:m,unusedImportsFromOldFile:T};function N(R){if(R===void 0)return;const F=a.getJsxNamespace(R),j=a.resolveName(F,R,1920,!0);return j&&Rt(j.declarations,yYe)?j:void 0}}function aOt(t,r){return!!t.resolveName(r.name,void 0,788968,!1)}function lOt(t,r,a,u){let h=t;for(let p=1;;p++){const m=Hr(a,h+r);if(!u.fileExists(m))return h;h=`${t}.${p}`}}function cOt(t,r){return Bb(t,cde)||Bb(r,cde)||"newFile"}function fPe(t,r,a){t.forEachChild(function u(h){if(lt(h)&&!F1(h)){const p=r.getSymbolAtLocation(h);p&&a(p,Wk(h))}else h.forEachChild(u)})}function hPe(t,r){switch(t.kind){case 262:case 263:case 267:case 266:case 265:case 264:case 271:return r(t);case 243:return Z(t.declarationList.declarations,a=>CYe(a.name,r));case 244:{const{expression:a}=t;return cr(a)&&Lu(a)===1?r(t):void 0}}}function yYe(t){switch(t.kind){case 271:case 276:case 273:case 274:return!0;case 260:return bYe(t);case 208:return ds(t.parent.parent)&&bYe(t.parent.parent);default:return!1}}function bYe(t){return Ns(t.parent.parent.parent)&&!!t.initializer&&B_(t.initializer,!0)}function dfe(t){return SYe(t)&&Ns(t.parent)||ds(t)&&Ns(t.parent.parent.parent)}function uOt(t){return ds(t)?t.parent.parent.parent:t.parent}function CYe(t,r){switch(t.kind){case 80:return r(ua(t.parent,a=>ds(a)||nl(a)));case 207:case 206:return Z(t.elements,a=>zd(a)?void 0:CYe(a.name,r));default:return z.assertNever(t,`Unexpected name kind ${t.kind}`)}}function SYe(t){switch(t.kind){case 262:case 263:case 267:case 266:case 265:case 264:case 271:return!0;default:return!1}}function dOt(t,r,a,u,h){var p;const m=new Set,C=(p=u.symbol)==null?void 0:p.exports;if(C){const T=r.getTypeChecker(),E=new Map;for(const N of h.all)_Ye(N)&&Kr(N,32)&&hPe(N,R=>{var F;const j=H0(R)?(F=C.get(R.symbol.escapedName))==null?void 0:F.declarations:void 0,U=Z(j,q=>$u(q)?q:gh(q)?$r(q.parent.parent,$u):void 0);U&&U.moduleSpecifier&&E.set(U,(E.get(U)||new Set).add(R))});for(const[N,R]of Fn(E))if(N.exportClause&&Yg(N.exportClause)&&O(N.exportClause.elements)){const F=N.exportClause.elements,j=Ri(F,U=>Me(Of(U.symbol,T).declarations,q=>dfe(q)&&R.has(q))===void 0);if(O(j)===0){t.deleteNode(u,N),m.add(N);continue}O(j)$u(T)&&!!T.moduleSpecifier&&!m.has(T));b?t.insertNodesBefore(u,b,a,!0):t.insertNodesAfter(u,u.statements[u.statements.length-1],a)}function wYe(t,r){if(rc(r)){const a=r.symbol.declarations;if(a===void 0||O(a)<=1||!Mt(a,r))return;const u=a[0],h=a[O(a)-1],p=ns(a,b=>_n(b)===t&&Es(b)?b:void 0),m=Nt(t.statements,b=>b.end>=h.end),C=Nt(t.statements,b=>b.end>=u.end);return{toMove:p,start:C,end:m}}}function _Pe(t,r,a){const u=new Set;for(const h of t.imports){const p=k8(h);if(Cu(p)&&p.importClause&&p.importClause.namedBindings&&zv(p.importClause.namedBindings))for(const m of p.importClause.namedBindings.elements){const C=a.getSymbolAtLocation(m.propertyName||m.name);C&&u.add(Of(C,a))}if(fW(p.parent)&&pg(p.parent.name))for(const m of p.parent.name.elements){const C=a.getSymbolAtLocation(m.propertyName||m.name);C&&u.add(Of(C,a))}}for(const h of r)fPe(h,a,p=>{const m=Of(p,a);m.valueDeclaration&&_n(m.valueDeclaration).path===t.path&&u.add(m)});return u}function eC(t){return t.error!==void 0}function s2(t,r){return r?t.substr(0,r.length)===r:!0}function pPe(t,r,a,u){return Ir(t)&&!ss(r)&&!a.resolveName(t.name.text,t,111551,!1)&&!Vs(t.name)&&!QE(t.name)?t.name.text:LI(ss(r)?"newProperty":"newLocal",u)}function gPe(t,r,a,u,h,p){r.forEach(([m,C],b)=>{var T;const E=Of(b,u);u.isUnknownSymbol(E)?p.addVerbatimImport(z.checkDefined(C??Xi((T=b.declarations)==null?void 0:T[0],Hwe))):p.addImportFromExportedSymbol(E,m,C)}),aPe(a,t.fileName,p,h)}var TX="Inline variable",mPe=Po(k.Inline_variable),vPe={name:TX,description:mPe,kind:"refactor.inline.variable"};rb(TX,{kinds:[vPe.kind],getAvailableActions(t){const{file:r,program:a,preferences:u,startPosition:h,triggerReason:p}=t,m=xYe(r,h,p==="invoked",a);return m?ZP.isRefactorErrorInfo(m)?u.provideRefactorNotApplicableReason?[{name:TX,description:mPe,actions:[{...vPe,notApplicableReason:m.error}]}]:x:[{name:TX,description:mPe,actions:[vPe]}]:x},getEditsForAction(t,r){z.assert(r===TX,"Unexpected refactor invoked");const{file:a,program:u,startPosition:h}=t,p=xYe(a,h,!0,u);if(!p||ZP.isRefactorErrorInfo(p))return;const{references:m,declaration:C,replacement:b}=p;return{edits:er.ChangeTracker.with(t,E=>{for(const N of m)E.replaceNode(a,N,fOt(N,b));E.delete(a,C)})}}});function xYe(t,r,a,u){var h,p;const m=u.getTypeChecker(),C=j_(t,r),b=C.parent;if(lt(C)){if(UW(b)&&v8(b)&<(b.name)){if(((h=m.getMergedSymbol(b.symbol).declarations)==null?void 0:h.length)!==1)return{error:Po(k.Variables_with_multiple_declarations_cannot_be_inlined)};if(kYe(b))return;const T=TYe(b,m,t);return T&&{references:T,declaration:b,replacement:b.initializer}}if(a){let T=m.resolveName(C.text,C,111551,!1);if(T=T&&m.getMergedSymbol(T),((p=T==null?void 0:T.declarations)==null?void 0:p.length)!==1)return{error:Po(k.Variables_with_multiple_declarations_cannot_be_inlined)};const E=T.declarations[0];if(!UW(E)||!v8(E)||!lt(E.name)||kYe(E))return;const N=TYe(E,m,t);return N&&{references:N,declaration:E,replacement:E.initializer}}return{error:Po(k.Could_not_find_variable_to_inline)}}}function kYe(t){const r=ua(t.parent.parent,Ou);return Rt(r.modifiers,SP)}function TYe(t,r,a){const u=[],h=xc.Core.eachSymbolReferenceInFile(t.name,r,a,p=>{if(xc.isWriteAccessForReference(p)&&!ih(p.parent)||gh(p.parent)||Ec(p.parent)||qT(p.parent)||IB(t,p.pos))return!0;u.push(p)});return u.length===0||h?void 0:u}function fOt(t,r){r=Pl(r);const{parent:a}=t;return Ut(a)&&(A8(r)hOt(r.file,r.program,u,p,r.host,r,r.preferences)),renameFilename:void 0,renameLocation:void 0}}});function hOt(t,r,a,u,h,p,m){const C=r.getTypeChecker(),b=kX(t,a.all,C),T=uPe(t,r,h,a),E=vX(T,t.externalModuleIndicator?99:t.commonJsModuleIndicator?1:void 0,r,h),N=Ch.createImportAdder(t,p.program,p.preferences,p.host),R=Ch.createImportAdder(E,p.program,p.preferences,p.host);nPe(t,E,b,u,a,r,h,m,R,N),rPe(r,u,t.fileName,T,cS(h))}var _Ot={},CPe="Convert overload list to single signature",DYe=Po(k.Convert_overload_list_to_single_signature),EYe={name:CPe,description:DYe,kind:"refactor.rewrite.function.overloadList"};rb(CPe,{kinds:[EYe.kind],getEditsForAction:gOt,getAvailableActions:pOt});function pOt(t){const{file:r,startPosition:a,program:u}=t;return NYe(r,a,u)?[{name:CPe,description:DYe,actions:[EYe]}]:x}function gOt(t){const{file:r,startPosition:a,program:u}=t,h=NYe(r,a,u);if(!h)return;const p=u.getTypeChecker(),m=h[h.length-1];let C=m;switch(m.kind){case 173:{C=G.updateMethodSignature(m,m.modifiers,m.name,m.questionToken,m.typeParameters,T(h),m.type);break}case 174:{C=G.updateMethodDeclaration(m,m.modifiers,m.asteriskToken,m.name,m.questionToken,m.typeParameters,T(h),m.type,m.body);break}case 179:{C=G.updateCallSignature(m,m.typeParameters,T(h),m.type);break}case 176:{C=G.updateConstructorDeclaration(m,m.modifiers,T(h),m.body);break}case 180:{C=G.updateConstructSignature(m,m.typeParameters,T(h),m.type);break}case 262:{C=G.updateFunctionDeclaration(m,m.modifiers,m.asteriskToken,m.name,m.typeParameters,T(h),m.type,m.body);break}default:return z.failBadSyntaxKind(m,"Unhandled signature kind in overload list conversion refactoring")}if(C===m)return;return{renameFilename:void 0,renameLocation:void 0,edits:er.ChangeTracker.with(t,R=>{R.replaceNodeRange(r,h[0],h[h.length-1],C)})};function T(R){const F=R[R.length-1];return rc(F)&&F.body&&(R=R.slice(0,R.length-1)),G.createNodeArray([G.createParameterDeclaration(void 0,G.createToken(26),"args",void 0,G.createUnionTypeNode(Yt(R,E)))])}function E(R){const F=Yt(R.parameters,N);return ir(G.createTupleTypeNode(F),Rt(F,j=>!!O(i3(j)))?0:1)}function N(R){z.assert(lt(R.name));const F=zt(G.createNamedTupleMember(R.dotDotDotToken,R.name,R.questionToken,R.type||G.createKeywordTypeNode(133)),R),j=R.symbol&&R.symbol.getDocumentationComment(p);if(j){const U=MH(j);U.length&&Vk(F,[{text:`* +${U.split(` +`).map(q=>` * ${q}`).join(` +`)} + `,kind:3,pos:-1,end:-1,hasTrailingNewLine:!0,hasLeadingNewline:!0}])}return F}}function IYe(t){switch(t.kind){case 173:case 174:case 179:case 176:case 180:case 262:return!0}return!1}function NYe(t,r,a){const u=Rs(t,r),h=Xi(u,IYe);if(!h||rc(h)&&h.body&&lH(h.body,r))return;const p=a.getTypeChecker(),m=h.symbol;if(!m)return;const C=m.declarations;if(O(C)<=1||!Be(C,R=>_n(R)===t)||!IYe(C[0]))return;const b=C[0].kind;if(!Be(C,R=>R.kind===b))return;const T=C;if(Rt(T,R=>!!R.typeParameters||Rt(R.parameters,F=>!!F.modifiers||!lt(F.name))))return;const E=ns(T,R=>p.getSignatureFromDeclaration(R));if(O(E)!==O(C))return;const N=p.getReturnTypeOfSignature(E[0]);if(Be(E,R=>p.getReturnTypeOfSignature(R)===N))return T}var SPe="Add or remove braces in an arrow function",LYe=Po(k.Add_or_remove_braces_in_an_arrow_function),ffe={name:"Add braces to arrow function",description:Po(k.Add_braces_to_arrow_function),kind:"refactor.rewrite.arrow.braces.add"},EX={name:"Remove braces from arrow function",description:Po(k.Remove_braces_from_arrow_function),kind:"refactor.rewrite.arrow.braces.remove"};rb(SPe,{kinds:[EX.kind],getEditsForAction:vOt,getAvailableActions:mOt});function mOt(t){const{file:r,startPosition:a,triggerReason:u}=t,h=PYe(r,a,u==="invoked");return h?eC(h)?t.preferences.provideRefactorNotApplicableReason?[{name:SPe,description:LYe,actions:[{...ffe,notApplicableReason:h.error},{...EX,notApplicableReason:h.error}]}]:x:[{name:SPe,description:LYe,actions:[h.addBraces?ffe:EX]}]:x}function vOt(t,r){const{file:a,startPosition:u}=t,h=PYe(a,u);z.assert(h&&!eC(h),"Expected applicable refactor info");const{expression:p,returnStatement:m,func:C}=h;let b;if(r===ffe.name){const E=G.createReturnStatement(p);b=G.createBlock([E],!0),W3(p,E,a,3,!0)}else if(r===EX.name&&m){const E=p||G.createVoidZero();b=tX(E)?G.createParenthesizedExpression(E):E,SH(m,b,a,3,!1),W3(m,b,a,3,!1),uF(m,b,a,3,!1)}else z.fail("invalid action");return{renameFilename:void 0,renameLocation:void 0,edits:er.ChangeTracker.with(t,E=>{E.replaceNode(a,C.body,b)})}}function PYe(t,r,a=!0,u){const h=Rs(t,r),p=Kp(h);if(!p)return{error:Po(k.Could_not_find_a_containing_arrow_function)};if(!Dc(p))return{error:Po(k.Containing_function_is_not_an_arrow_function)};if(!(!yg(p,h)||yg(p.body,h)&&!a)){if(s2(ffe.kind,u)&&Ut(p.body))return{func:p,addBraces:!0,expression:p.body};if(s2(EX.kind,u)&&Ho(p.body)&&p.body.statements.length===1){const m=ma(p.body.statements);if(Om(m)){const C=m.expression&&Pa(X6(m.expression,!1))?G.createParenthesizedExpression(m.expression):m.expression;return{func:p,addBraces:!1,expression:C,returnStatement:m}}}}}var yOt={},AYe="Convert arrow function or function expression",bOt=Po(k.Convert_arrow_function_or_function_expression),IX={name:"Convert to anonymous function",description:Po(k.Convert_to_anonymous_function),kind:"refactor.rewrite.function.anonymous"},NX={name:"Convert to named function",description:Po(k.Convert_to_named_function),kind:"refactor.rewrite.function.named"},LX={name:"Convert to arrow function",description:Po(k.Convert_to_arrow_function),kind:"refactor.rewrite.function.arrow"};rb(AYe,{kinds:[IX.kind,NX.kind,LX.kind],getEditsForAction:SOt,getAvailableActions:COt});function COt(t){const{file:r,startPosition:a,program:u,kind:h}=t,p=MYe(r,a,u);if(!p)return x;const{selectedVariableDeclaration:m,func:C}=p,b=[],T=[];if(s2(NX.kind,h)){const E=m||Dc(C)&&ds(C.parent)?void 0:Po(k.Could_not_convert_to_named_function);E?T.push({...NX,notApplicableReason:E}):b.push(NX)}if(s2(IX.kind,h)){const E=!m&&Dc(C)?void 0:Po(k.Could_not_convert_to_anonymous_function);E?T.push({...IX,notApplicableReason:E}):b.push(IX)}if(s2(LX.kind,h)){const E=gc(C)?void 0:Po(k.Could_not_convert_to_arrow_function);E?T.push({...LX,notApplicableReason:E}):b.push(LX)}return[{name:AYe,description:bOt,actions:b.length===0&&t.preferences.provideRefactorNotApplicableReason?T:b}]}function SOt(t,r){const{file:a,startPosition:u,program:h}=t,p=MYe(a,u,h);if(!p)return;const{func:m}=p,C=[];switch(r){case IX.name:C.push(...TOt(t,m));break;case NX.name:const b=kOt(m);if(!b)return;C.push(...DOt(t,m,b));break;case LX.name:if(!gc(m))return;C.push(...EOt(t,m));break;default:return z.fail("invalid action")}return{renameFilename:void 0,renameLocation:void 0,edits:C}}function OYe(t){let r=!1;return t.forEachChild(function a(u){if(A3(u)){r=!0;return}!ss(u)&&!Uu(u)&&!gc(u)&&jo(u,a)}),r}function MYe(t,r,a){const u=Rs(t,r),h=a.getTypeChecker(),p=xOt(t,h,u.parent);if(p&&!OYe(p.body)&&!h.containsArgumentsReference(p))return{selectedVariableDeclaration:!0,func:p};const m=Kp(u);if(m&&(gc(m)||Dc(m))&&!yg(m.body,u)&&!OYe(m.body)&&!h.containsArgumentsReference(m))return gc(m)&&FYe(t,h,m)?void 0:{selectedVariableDeclaration:!1,func:m}}function wOt(t){return ds(t)||wf(t)&&t.declarations.length===1}function xOt(t,r,a){if(!wOt(a))return;const h=(ds(a)?a:ma(a.declarations)).initializer;if(h&&(Dc(h)||gc(h)&&!FYe(t,r,h)))return h}function RYe(t){if(Ut(t)){const r=G.createReturnStatement(t),a=t.getSourceFile();return zt(r,t),Op(r),SH(t,r,a,void 0,!0),G.createBlock([r],!0)}else return t}function kOt(t){const r=t.parent;if(!ds(r)||!v8(r))return;const a=r.parent,u=a.parent;if(!(!wf(a)||!Ou(u)||!lt(r.name)))return{variableDeclaration:r,variableDeclarationList:a,statement:u,name:r.name}}function TOt(t,r){const{file:a}=t,u=RYe(r.body),h=G.createFunctionExpression(r.modifiers,r.asteriskToken,void 0,r.typeParameters,r.parameters,r.type,u);return er.ChangeTracker.with(t,p=>p.replaceNode(a,r,h))}function DOt(t,r,a){const{file:u}=t,h=RYe(r.body),{variableDeclaration:p,variableDeclarationList:m,statement:C,name:b}=a;wde(C);const T=wk(p)&32|Wh(r),E=G.createModifiersFromModifierFlags(T),N=G.createFunctionDeclaration(O(E)?E:void 0,r.asteriskToken,b,r.typeParameters,r.parameters,r.type,h);return m.declarations.length===1?er.ChangeTracker.with(t,R=>R.replaceNode(u,C,N)):er.ChangeTracker.with(t,R=>{R.delete(u,p),R.insertNodeAfter(u,C,N)})}function EOt(t,r){const{file:a}=t,h=r.body.statements[0];let p;IOt(r.body,h)?(p=h.expression,Op(p),NI(h,p)):p=r.body;const m=G.createArrowFunction(r.modifiers,r.typeParameters,r.parameters,r.type,G.createToken(39),p);return er.ChangeTracker.with(t,C=>C.replaceNode(a,r,m))}function IOt(t,r){return t.statements.length===1&&Om(r)&&!!r.expression}function FYe(t,r,a){return!!a.name&&xc.Core.isSymbolReferencedInFile(a.name,r,t)}var NOt={},hfe="Convert parameters to destructured object",LOt=1,BYe=Po(k.Convert_parameters_to_destructured_object),WYe={name:hfe,description:BYe,kind:"refactor.rewrite.parameters.toDestructured"};rb(hfe,{kinds:[WYe.kind],getEditsForAction:AOt,getAvailableActions:POt});function POt(t){const{file:r,startPosition:a}=t;return F_(r)||!jYe(r,a,t.program.getTypeChecker())?x:[{name:hfe,description:BYe,actions:[WYe]}]}function AOt(t,r){z.assert(r===hfe,"Unexpected action name");const{file:a,startPosition:u,program:h,cancellationToken:p,host:m}=t,C=jYe(a,u,h.getTypeChecker());if(!C||!p)return;const b=MOt(C,h,p);return b.valid?{renameFilename:void 0,renameLocation:void 0,edits:er.ChangeTracker.with(t,E=>OOt(a,h,m,E,C,b))}:{edits:[]}}function OOt(t,r,a,u,h,p){const m=p.signature,C=Yt($Ye(h,r,a),E=>Pl(E));if(m){const E=Yt($Ye(m,r,a),N=>Pl(N));T(m,E)}T(h,C);const b=fr(p.functionCalls,(E,N)=>hc(E.pos,N.pos));for(const E of b)if(E.arguments&&E.arguments.length){const N=Pl(qOt(h,E.arguments),!0);u.replaceNodeRange(_n(E),ma(E.arguments),La(E.arguments),N,{leadingTriviaOption:er.LeadingTriviaOption.IncludeAll,trailingTriviaOption:er.TrailingTriviaOption.Include})}function T(E,N){u.replaceNodeRangeWithNodes(t,ma(E.parameters),La(E.parameters),N,{joiner:", ",indentation:0,leadingTriviaOption:er.LeadingTriviaOption.IncludeAll,trailingTriviaOption:er.TrailingTriviaOption.Include})}}function MOt(t,r,a){const u=JOt(t),h=fu(t)?$Ot(t):[],p=jt([...u,...h],XC),m=r.getTypeChecker(),C=Ln(p,N=>xc.getReferenceEntriesForNode(-1,N,r,r.getSourceFiles(),a)),b=T(C);return Be(b.declarations,N=>Mt(p,N))||(b.valid=!1),b;function T(N){const R={accessExpressions:[],typeUsages:[]},F={functionCalls:[],declarations:[],classReferences:R,valid:!0},j=Yt(u,E),U=Yt(h,E),q=fu(t),Q=Yt(u,re=>wPe(re,m));for(const re of N){if(re.kind===xc.EntryKind.Span){F.valid=!1;continue}if(Mt(Q,E(re.node))){if(WOt(re.node.parent)){F.signature=re.node.parent;continue}const ue=HYe(re);if(ue){F.functionCalls.push(ue);continue}}const Y=wPe(re.node,m);if(Y&&Mt(Q,Y)){const ue=xPe(re);if(ue){F.declarations.push(ue);continue}}if(Mt(j,E(re.node))||iF(re.node)){if(VYe(re))continue;const te=xPe(re);if(te){F.declarations.push(te);continue}const Se=HYe(re);if(Se){F.functionCalls.push(Se);continue}}if(q&&Mt(U,E(re.node))){if(VYe(re))continue;const te=xPe(re);if(te){F.declarations.push(te);continue}const Se=ROt(re);if(Se){R.accessExpressions.push(Se);continue}if(xd(t.parent)){const oe=FOt(re);if(oe){R.typeUsages.push(oe);continue}}}F.valid=!1}return F}function E(N){const R=m.getSymbolAtLocation(N);return R&&Cde(R,m)}}function wPe(t,r){const a=RH(t);if(a){const u=r.getContextualTypeForObjectLiteralElement(a),h=u==null?void 0:u.getSymbol();if(h&&!(Pu(h)&6))return h}}function VYe(t){const r=t.node;if(m_(r.parent)||$0(r.parent)||kd(r.parent)||eb(r.parent)||gh(r.parent)||Ec(r.parent))return r}function xPe(t){if(Yf(t.node.parent))return t.node}function HYe(t){if(t.node.parent){const r=t.node,a=r.parent;switch(a.kind){case 213:case 214:const u=$r(a,Dv);if(u&&u.expression===r)return u;break;case 211:const h=$r(a,Ir);if(h&&h.parent&&h.name===r){const m=$r(h.parent,Dv);if(m&&m.expression===h)return m}break;case 212:const p=$r(a,wc);if(p&&p.parent&&p.argumentExpression===r){const m=$r(p.parent,Dv);if(m&&m.expression===p)return m}break}}}function ROt(t){if(t.node.parent){const r=t.node,a=r.parent;switch(a.kind){case 211:const u=$r(a,Ir);if(u&&u.expression===r)return u;break;case 212:const h=$r(a,wc);if(h&&h.expression===r)return h;break}}}function FOt(t){const r=t.node;if(EI(r)===2||HJ(r.parent))return r}function jYe(t,r,a){const u=O3(t,r),h=lxe(u);if(!BOt(u)&&h&&VOt(h,a)&&yg(h,u)&&!(h.body&&yg(h.body,u)))return h}function BOt(t){const r=Xi(t,x6);if(r){const a=Xi(r,u=>!x6(u));return!!a&&rc(a)}return!1}function WOt(t){return Hv(t)&&(Ff(t.parent)||p_(t.parent))}function VOt(t,r){var a;if(!HOt(t.parameters,r))return!1;switch(t.kind){case 262:return zYe(t)&&PX(t,r);case 174:if(Pa(t.parent)){const u=wPe(t.name,r);return((a=u==null?void 0:u.declarations)==null?void 0:a.length)===1&&PX(t,r)}return PX(t,r);case 176:return xd(t.parent)?zYe(t.parent)&&PX(t,r):UYe(t.parent.parent)&&PX(t,r);case 218:case 219:return UYe(t.parent)}return!1}function PX(t,r){return!!t.body&&!r.isImplementationOfOverload(t)}function zYe(t){return t.name?!0:!!R3(t,90)}function HOt(t,r){return zOt(t)>=LOt&&Be(t,a=>jOt(a,r))}function jOt(t,r){if(O1(t)){const a=r.getTypeAtLocation(t);if(!r.isArrayType(a)&&!r.isTupleType(a))return!1}return!t.modifiers&<(t.name)}function UYe(t){return ds(t)&&L6(t)&<(t.name)&&!t.type}function kPe(t){return t.length>0&&A3(t[0].name)}function zOt(t){return kPe(t)?t.length-1:t.length}function qYe(t){return kPe(t)&&(t=G.createNodeArray(t.slice(1),t.hasTrailingComma)),t}function UOt(t,r){return lt(r)&&Im(r)===t?G.createShorthandPropertyAssignment(t):G.createPropertyAssignment(t,r)}function qOt(t,r){const a=qYe(t.parameters),u=O1(La(a)),h=u?r.slice(0,a.length-1):r,p=Yt(h,(C,b)=>{const T=_fe(a[b]),E=UOt(T,C);return Op(E.name),pd(E)&&Op(E.initializer),NI(C,E),E});if(u&&r.length>=a.length){const C=r.slice(a.length-1),b=G.createPropertyAssignment(_fe(La(a)),G.createArrayLiteralExpression(C));p.push(b)}return G.createObjectLiteralExpression(p,!1)}function $Ye(t,r,a){const u=r.getTypeChecker(),h=qYe(t.parameters),p=Yt(h,E),m=G.createObjectBindingPattern(p),C=N(h);let b;Be(h,j)&&(b=G.createObjectLiteralExpression());const T=G.createParameterDeclaration(void 0,void 0,m,void 0,C,b);if(kPe(t.parameters)){const U=t.parameters[0],q=G.createParameterDeclaration(void 0,void 0,U.name,void 0,U.type);return Op(q.name),NI(U.name,q.name),U.type&&(Op(q.type),NI(U.type,q.type)),G.createNodeArray([q,T])}return G.createNodeArray([T]);function E(U){const q=G.createBindingElement(void 0,void 0,_fe(U),O1(U)&&j(U)?G.createArrayLiteralExpression():U.initializer);return Op(q),U.initializer&&q.initializer&&NI(U.initializer,q.initializer),q}function N(U){const q=Yt(U,R);return Wv(G.createTypeLiteralNode(q),1)}function R(U){let q=U.type;!q&&(U.initializer||O1(U))&&(q=F(U));const Q=G.createPropertySignature(void 0,_fe(U),j(U)?G.createToken(58):U.questionToken,q);return Op(Q),NI(U.name,Q.name),U.type&&Q.type&&NI(U.type,Q.type),Q}function F(U){const q=u.getTypeAtLocation(U);return fF(q,U,r,a)}function j(U){if(O1(U)){const q=u.getTypeAtLocation(U);return!u.isTupleType(q)}return u.isOptionalParameter(U)}}function _fe(t){return Im(t.name)}function $Ot(t){switch(t.parent.kind){case 263:const r=t.parent;return r.name?[r.name]:[z.checkDefined(R3(r,90),"Nameless class declaration should be a default export")];case 231:const u=t.parent,h=t.parent.parent,p=u.name;return p?[p,h.name]:[h.name]}}function JOt(t){switch(t.kind){case 262:return t.name?[t.name]:[z.checkDefined(R3(t,90),"Nameless function declaration should be a default export")];case 174:return[t.name];case 176:const a=z.checkDefined(Hl(t,137,t.getSourceFile()),"Constructor declaration should have constructor keyword");return t.parent.kind===231?[t.parent.parent.name,a]:[a];case 219:return[t.parent.name];case 218:return t.name?[t.name,t.parent.name]:[t.parent.name];default:return z.assertNever(t,`Unexpected function declaration kind ${t.kind}`)}}var GOt={},TPe="Convert to template string",DPe=Po(k.Convert_to_template_string),EPe={name:TPe,description:DPe,kind:"refactor.rewrite.string"};rb(TPe,{kinds:[EPe.kind],getEditsForAction:QOt,getAvailableActions:KOt});function KOt(t){const{file:r,startPosition:a}=t,u=JYe(r,a),h=IPe(u),p=ja(h),m={name:TPe,description:DPe,actions:[]};return p&&t.triggerReason!=="invoked"?x:z0(h)&&(p||cr(h)&&NPe(h).isValidConcatenation)?(m.actions.push(EPe),[m]):t.preferences.provideRefactorNotApplicableReason?(m.actions.push({...EPe,notApplicableReason:Po(k.Can_only_convert_string_concatenations_and_string_literals)}),[m]):x}function JYe(t,r){const a=Rs(t,r),u=IPe(a);return!NPe(u).isValidConcatenation&&g_(u.parent)&&cr(u.parent.parent)?u.parent.parent:a}function QOt(t,r){const{file:a,startPosition:u}=t,h=JYe(a,u);switch(r){case DPe:return{edits:XOt(t,h)};default:return z.fail("invalid action")}}function XOt(t,r){const a=IPe(r),u=t.file,h=iMt(NPe(a),u),p=Rw(u.text,a.end);if(p){const m=p[p.length-1],C={pos:p[0].pos,end:m.end};return er.ChangeTracker.with(t,b=>{b.deleteRange(u,C),b.replaceNode(u,a,h)})}else return er.ChangeTracker.with(t,m=>m.replaceNode(u,a,h))}function ZOt(t){return!(t.operatorToken.kind===64||t.operatorToken.kind===65)}function IPe(t){return Xi(t.parent,a=>{switch(a.kind){case 211:case 212:return!1;case 228:case 226:return!(cr(a.parent)&&ZOt(a.parent));default:return"quit"}})||t}function NPe(t){const r=m=>{if(!cr(m))return{nodes:[m],operators:[],validOperators:!0,hasString:ja(m)||bP(m)};const{nodes:C,operators:b,hasString:T,validOperators:E}=r(m.left);if(!(T||ja(m.right)||HG(m.right)))return{nodes:[m],operators:[],hasString:!1,validOperators:!0};const N=m.operatorToken.kind===40,R=E&&N;return C.push(m.right),b.push(m.operatorToken),{nodes:C,operators:b,hasString:!0,validOperators:R}},{nodes:a,operators:u,validOperators:h,hasString:p}=r(t);return{nodes:a,operators:u,isValidConcatenation:h&&p}}var YOt=(t,r)=>(a,u)=>{a(u,h)=>{for(;u.length>0;){const p=u.shift();uF(t[p],h,r,3,!1),a(p,h)}};function tMt(t){return t.replace(/\\.|[$`]/g,r=>r[0]==="\\"?r:"\\"+r)}function GYe(t){const r=CP(t)||Tae(t)?-2:-1;return yu(t).slice(1,r)}function KYe(t,r){const a=[];let u="",h="";for(;t{QYe(Y);const te=ue===R.templateSpans.length-1,Se=Y.literal.text+(te?j:""),oe=GYe(Y.literal)+(te?U:"");return G.createTemplateSpan(Y.expression,Q&&te?G.createTemplateTail(Se,oe):G.createTemplateMiddle(Se,oe))});T.push(...re)}else{const re=Q?G.createTemplateTail(j,U):G.createTemplateMiddle(j,U);h(q,re),T.push(G.createTemplateSpan(R,re))}}return G.createTemplateExpression(E,T)}function QYe(t){const r=t.getSourceFile();uF(t,t.expression,r,3,!1),SH(t.expression,t.expression,r,3,!1)}function nMt(t){return g_(t)&&(QYe(t),t=t.expression),t}var rMt={},pfe="Convert to optional chain expression",LPe=Po(k.Convert_to_optional_chain_expression),PPe={name:pfe,description:LPe,kind:"refactor.rewrite.expression.optionalChain"};rb(pfe,{kinds:[PPe.kind],getEditsForAction:oMt,getAvailableActions:sMt});function sMt(t){const r=XYe(t,t.triggerReason==="invoked");return r?eC(r)?t.preferences.provideRefactorNotApplicableReason?[{name:pfe,description:LPe,actions:[{...PPe,notApplicableReason:r.error}]}]:x:[{name:pfe,description:LPe,actions:[PPe]}]:x}function oMt(t,r){const a=XYe(t);return z.assert(a&&!eC(a),"Expected applicable refactor info"),{edits:er.ChangeTracker.with(t,h=>_Mt(t.file,t.program.getTypeChecker(),h,a)),renameFilename:void 0,renameLocation:void 0}}function gfe(t){return cr(t)||IP(t)}function aMt(t){return _f(t)||Om(t)||Ou(t)}function mfe(t){return gfe(t)||aMt(t)}function XYe(t,r=!0){const{file:a,program:u}=t,h=QP(t),p=h.length===0;if(p&&!r)return;const m=Rs(a,h.start),C=VQ(a,h.start+h.length),b=sd(m.pos,C&&C.end>=m.pos?C.getEnd():m.getEnd()),T=p?fMt(m):dMt(m,b),E=T&&mfe(T)?hMt(T):void 0;if(!E)return{error:Po(k.Could_not_find_convertible_access_expression)};const N=u.getTypeChecker();return IP(E)?lMt(E,N):cMt(E)}function lMt(t,r){const a=t.condition,u=OPe(t.whenTrue);if(!u||r.isNullableType(r.getTypeAtLocation(u)))return{error:Po(k.Could_not_find_convertible_access_expression)};if((Ir(a)||lt(a))&&APe(a,u.expression))return{finalExpression:u,occurrences:[a],expression:t};if(cr(a)){const h=ZYe(u.expression,a);return h?{finalExpression:u,occurrences:h,expression:t}:{error:Po(k.Could_not_find_matching_access_expressions)}}}function cMt(t){if(t.operatorToken.kind!==56)return{error:Po(k.Can_only_convert_logical_AND_access_chains)};const r=OPe(t.right);if(!r)return{error:Po(k.Could_not_find_convertible_access_expression)};const a=ZYe(r.expression,t.left);return a?{finalExpression:r,occurrences:a,expression:t}:{error:Po(k.Could_not_find_matching_access_expressions)}}function ZYe(t,r){const a=[];for(;cr(r)&&r.operatorToken.kind===56;){const h=APe(Il(t),Il(r.right));if(!h)break;a.push(h),t=h,r=r.left}const u=APe(t,r);return u&&a.push(u),a.length>0?a:void 0}function APe(t,r){if(!(!lt(r)&&!Ir(r)&&!wc(r)))return uMt(t,r)?r:void 0}function uMt(t,r){for(;(sa(t)||Ir(t)||wc(t))&&AH(t)!==AH(r);)t=t.expression;for(;Ir(t)&&Ir(r)||wc(t)&&wc(r);){if(AH(t)!==AH(r))return!1;t=t.expression,r=r.expression}return lt(t)&<(r)&&t.getText()===r.getText()}function AH(t){if(lt(t)||ug(t))return t.getText();if(Ir(t))return AH(t.name);if(wc(t))return AH(t.argumentExpression)}function dMt(t,r){for(;t.parent;){if(mfe(t)&&r.length!==0&&t.end>=r.start+r.length)return t;t=t.parent}}function fMt(t){for(;t.parent;){if(mfe(t)&&!mfe(t.parent))return t;t=t.parent}}function hMt(t){if(gfe(t))return t;if(Ou(t)){const r=XL(t),a=r==null?void 0:r.initializer;return a&&gfe(a)?a:void 0}return t.expression&&gfe(t.expression)?t.expression:void 0}function OPe(t){if(t=Il(t),cr(t))return OPe(t.left);if((Ir(t)||wc(t)||sa(t))&&!ph(t))return t}function YYe(t,r,a){if(Ir(r)||wc(r)||sa(r)){const u=YYe(t,r.expression,a),h=a.length>0?a[a.length-1]:void 0,p=(h==null?void 0:h.getText())===r.expression.getText();if(p&&a.pop(),sa(r))return p?G.createCallChain(u,G.createToken(29),r.typeArguments,r.arguments):G.createCallChain(u,r.questionDotToken,r.typeArguments,r.arguments);if(Ir(r))return p?G.createPropertyAccessChain(u,G.createToken(29),r.name):G.createPropertyAccessChain(u,r.questionDotToken,r.name);if(wc(r))return p?G.createElementAccessChain(u,G.createToken(29),r.argumentExpression):G.createElementAccessChain(u,r.questionDotToken,r.argumentExpression)}return r}function _Mt(t,r,a,u,h){const{finalExpression:p,occurrences:m,expression:C}=u,b=m[m.length-1],T=YYe(r,p,m);T&&(Ir(T)||wc(T)||sa(T))&&(cr(C)?a.replaceNodeRange(t,b,p,T):IP(C)&&a.replaceNode(t,C,G.createBinaryExpression(T,G.createToken(61),C.whenFalse)))}var eet={};l(eet,{Messages:()=>Bf,RangeFacts:()=>net,getRangeToExtract:()=>MPe,getRefactorActionsToExtractSymbol:()=>tet,getRefactorEditsToExtractSymbol:()=>iet});var gF="Extract Symbol",mF={name:"Extract Constant",description:Po(k.Extract_constant),kind:"refactor.extract.constant"},vF={name:"Extract Function",description:Po(k.Extract_function),kind:"refactor.extract.function"};rb(gF,{kinds:[mF.kind,vF.kind],getEditsForAction:iet,getAvailableActions:tet});function tet(t){const r=t.kind,a=MPe(t.file,QP(t),t.triggerReason==="invoked"),u=a.targetRange;if(u===void 0){if(!a.errors||a.errors.length===0||!t.preferences.provideRefactorNotApplicableReason)return x;const U=[];return s2(vF.kind,r)&&U.push({name:gF,description:vF.description,actions:[{...vF,notApplicableReason:j(a.errors)}]}),s2(mF.kind,r)&&U.push({name:gF,description:mF.description,actions:[{...mF,notApplicableReason:j(a.errors)}]}),U}const{affectedTextRange:h,extractions:p}=bMt(u,t);if(p===void 0)return x;const m=[],C=new Map;let b;const T=[],E=new Map;let N,R=0;for(const{functionExtraction:U,constantExtraction:q}of p){if(s2(vF.kind,r)){const Q=U.description;U.errors.length===0?C.has(Q)||(C.set(Q,!0),m.push({description:Q,name:`function_scope_${R}`,kind:vF.kind,range:{start:{line:Da(t.file,h.pos).line,offset:Da(t.file,h.pos).character},end:{line:Da(t.file,h.end).line,offset:Da(t.file,h.end).character}}})):b||(b={description:Q,name:`function_scope_${R}`,notApplicableReason:j(U.errors),kind:vF.kind})}if(s2(mF.kind,r)){const Q=q.description;q.errors.length===0?E.has(Q)||(E.set(Q,!0),T.push({description:Q,name:`constant_scope_${R}`,kind:mF.kind,range:{start:{line:Da(t.file,h.pos).line,offset:Da(t.file,h.pos).character},end:{line:Da(t.file,h.end).line,offset:Da(t.file,h.end).character}}})):N||(N={description:Q,name:`constant_scope_${R}`,notApplicableReason:j(q.errors),kind:mF.kind})}R++}const F=[];return m.length?F.push({name:gF,description:Po(k.Extract_function),actions:m}):t.preferences.provideRefactorNotApplicableReason&&b&&F.push({name:gF,description:Po(k.Extract_function),actions:[b]}),T.length?F.push({name:gF,description:Po(k.Extract_constant),actions:T}):t.preferences.provideRefactorNotApplicableReason&&N&&F.push({name:gF,description:Po(k.Extract_constant),actions:[N]}),F.length?F:x;function j(U){let q=U[0].messageText;return typeof q!="string"&&(q=q.messageText),q}}function iet(t,r){const u=MPe(t.file,QP(t)).targetRange,h=/^function_scope_(\d+)$/.exec(r);if(h){const m=+h[1];return z.assert(isFinite(m),"Expected to parse a finite number from the function scope index"),vMt(u,t,m)}const p=/^constant_scope_(\d+)$/.exec(r);if(p){const m=+p[1];return z.assert(isFinite(m),"Expected to parse a finite number from the constant scope index"),yMt(u,t,m)}z.fail("Unrecognized action name")}var Bf;(t=>{function r(a){return{message:a,code:0,category:3,key:a}}t.cannotExtractRange=r("Cannot extract range."),t.cannotExtractImport=r("Cannot extract import statement."),t.cannotExtractSuper=r("Cannot extract super call."),t.cannotExtractJSDoc=r("Cannot extract JSDoc."),t.cannotExtractEmpty=r("Cannot extract empty range."),t.expressionExpected=r("expression expected."),t.uselessConstantType=r("No reason to extract constant of type."),t.statementOrExpressionExpected=r("Statement or expression expected."),t.cannotExtractRangeContainingConditionalBreakOrContinueStatements=r("Cannot extract range containing conditional break or continue statements."),t.cannotExtractRangeContainingConditionalReturnStatement=r("Cannot extract range containing conditional return statement."),t.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange=r("Cannot extract range containing labeled break or continue with target outside of the range."),t.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators=r("Cannot extract range containing writes to references located outside of the target range in generators."),t.typeWillNotBeVisibleInTheNewScope=r("Type will not visible in the new scope."),t.functionWillNotBeVisibleInTheNewScope=r("Function will not visible in the new scope."),t.cannotExtractIdentifier=r("Select more than a single identifier."),t.cannotExtractExportedEntity=r("Cannot extract exported declaration"),t.cannotWriteInExpression=r("Cannot write back side-effects when extracting an expression"),t.cannotExtractReadonlyPropertyInitializerOutsideConstructor=r("Cannot move initialization of read-only class property outside of the constructor"),t.cannotExtractAmbientBlock=r("Cannot extract code from ambient contexts"),t.cannotAccessVariablesFromNestedScopes=r("Cannot access variables from nested scopes"),t.cannotExtractToJSClass=r("Cannot extract constant to a class scope in JS"),t.cannotExtractToExpressionArrowFunction=r("Cannot extract constant to an arrow function without a block"),t.cannotExtractFunctionsContainingThisToMethod=r("Cannot extract functions containing this to method")})(Bf||(Bf={}));var net=(t=>(t[t.None=0]="None",t[t.HasReturn=1]="HasReturn",t[t.IsGenerator=2]="IsGenerator",t[t.IsAsyncFunction=4]="IsAsyncFunction",t[t.UsesThis=8]="UsesThis",t[t.UsesThisInFunction=16]="UsesThisInFunction",t[t.InStaticRegion=32]="InStaticRegion",t))(net||{});function MPe(t,r,a=!0){const{length:u}=r;if(u===0&&!a)return{errors:[ef(t,r.start,u,Bf.cannotExtractEmpty)]};const h=u===0&&a,p=DNe(t,r.start),m=VQ(t,zu(r)),C=p&&m&&a?pMt(p,m,t):r,b=h?VMt(p):vH(p,t,C),T=h?b:vH(m,t,C);let E=0,N;if(!b||!T)return{errors:[ef(t,r.start,u,Bf.cannotExtractRange)]};if(b.flags&16777216)return{errors:[ef(t,r.start,u,Bf.cannotExtractJSDoc)]};if(b.parent!==T.parent)return{errors:[ef(t,r.start,u,Bf.cannotExtractRange)]};if(b!==T){if(!j3(b.parent))return{errors:[ef(t,r.start,u,Bf.cannotExtractRange)]};const re=[];for(const Y of b.parent.statements){if(Y===b||re.length){const ue=Q(Y);if(ue)return{errors:ue};re.push(Y)}if(Y===T)break}return re.length?{targetRange:{range:re,facts:E,thisNode:N}}:{errors:[ef(t,r.start,u,Bf.cannotExtractRange)]}}if(Om(b)&&!b.expression)return{errors:[ef(t,r.start,u,Bf.cannotExtractRange)]};const R=j(b),F=U(R)||Q(R);if(F)return{errors:F};return{targetRange:{range:gMt(R),facts:E,thisNode:N}};function j(re){if(Om(re)){if(re.expression)return re.expression}else if(Ou(re)||wf(re)){const Y=Ou(re)?re.declarationList.declarations:re.declarations;let ue=0,te;for(const Se of Y)Se.initializer&&(ue++,te=Se.initializer);if(ue===1)return te}else if(ds(re)&&re.initializer)return re.initializer;return re}function U(re){if(lt(_f(re)?re.expression:re))return[Kn(re,Bf.cannotExtractIdentifier)]}function q(re,Y){let ue=re;for(;ue!==Y;){if(ue.kind===172){da(ue)&&(E|=32);break}else if(ue.kind===169){Kp(ue).kind===176&&(E|=32);break}else ue.kind===174&&da(ue)&&(E|=32);ue=ue.parent}}function Q(re){let Y;if((ye=>{ye[ye.None=0]="None",ye[ye.Break=1]="Break",ye[ye.Continue=2]="Continue",ye[ye.Return=4]="Return"})(Y||(Y={})),z.assert(re.pos<=re.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (1)"),z.assert(!q0(re.pos),"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (2)"),!Es(re)&&!(z0(re)&&ret(re))&&!VPe(re))return[Kn(re,Bf.statementOrExpressionExpected)];if(re.flags&33554432)return[Kn(re,Bf.cannotExtractAmbientBlock)];const ue=Sf(re);ue&&q(re,ue);let te,Se=4,oe;if(pe(re),E&8){const ye=u_(re,!1,!1);(ye.kind===262||ye.kind===174&&ye.parent.kind===210||ye.kind===218)&&(E|=16)}return te;function pe(ye){if(te)return!0;if(Yf(ye)){const _e=ye.kind===260?ye.parent.parent:ye;if(Kr(_e,32))return(te||(te=[])).push(Kn(ye,Bf.cannotExtractExportedEntity)),!0}switch(ye.kind){case 272:return(te||(te=[])).push(Kn(ye,Bf.cannotExtractImport)),!0;case 277:return(te||(te=[])).push(Kn(ye,Bf.cannotExtractExportedEntity)),!0;case 108:if(ye.parent.kind===213){const _e=Sf(ye);if(_e===void 0||_e.pos=r.start+r.length)return(te||(te=[])).push(Kn(ye,Bf.cannotExtractSuper)),!0}else E|=8,N=ye;break;case 219:jo(ye,function _e(ve){if(A3(ve))E|=8,N=ye;else{if(ss(ve)||Bo(ve)&&!Dc(ve))return!1;jo(ve,_e)}});case 263:case 262:Ns(ye.parent)&&ye.parent.externalModuleIndicator===void 0&&(te||(te=[])).push(Kn(ye,Bf.functionWillNotBeVisibleInTheNewScope));case 231:case 218:case 174:case 176:case 177:case 178:return!1}const be=Se;switch(ye.kind){case 245:Se&=-5;break;case 258:Se=0;break;case 241:ye.parent&&ye.parent.kind===258&&ye.parent.finallyBlock===ye&&(Se=4);break;case 297:case 296:Se|=1;break;default:Hw(ye,!1)&&(Se|=3);break}switch(ye.kind){case 197:case 110:E|=8,N=ye;break;case 256:{const _e=ye.label;(oe||(oe=[])).push(_e.escapedText),jo(ye,pe),oe.pop();break}case 252:case 251:{const _e=ye.label;_e?Mt(oe,_e.escapedText)||(te||(te=[])).push(Kn(ye,Bf.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)):Se&(ye.kind===252?1:2)||(te||(te=[])).push(Kn(ye,Bf.cannotExtractRangeContainingConditionalBreakOrContinueStatements));break}case 223:E|=4;break;case 229:E|=2;break;case 253:Se&4?E|=1:(te||(te=[])).push(Kn(ye,Bf.cannotExtractRangeContainingConditionalReturnStatement));break;default:jo(ye,pe);break}Se=be}}}function pMt(t,r,a){const u=t.getStart(a);let h=r.getEnd();return a.text.charCodeAt(h)===59&&h++,{start:u,length:h-u}}function gMt(t){if(Es(t))return[t];if(z0(t))return _f(t.parent)?[t.parent]:t;if(VPe(t))return t}function RPe(t){return Dc(t)?wse(t.body):rc(t)||Ns(t)||jv(t)||ss(t)}function mMt(t){let r=xS(t.range)?ma(t.range):t.range;if(t.facts&8&&!(t.facts&16)){const u=Sf(r);if(u){const h=Xi(r,rc);return h?[h,u]:[u]}}const a=[];for(;;)if(r=r.parent,r.kind===169&&(r=Xi(r,u=>rc(u)).parent),RPe(r)&&(a.push(r),r.kind===307))return a}function vMt(t,r,a){const{scopes:u,readsAndWrites:{target:h,usagesPerScope:p,functionErrorsPerScope:m,exposedVariableDeclarations:C}}=FPe(t,r);return z.assert(!m[a].length,"The extraction went missing? How?"),r.cancellationToken.throwIfCancellationRequested(),TMt(h,u[a],p[a],C,t,r)}function yMt(t,r,a){const{scopes:u,readsAndWrites:{target:h,usagesPerScope:p,constantErrorsPerScope:m,exposedVariableDeclarations:C}}=FPe(t,r);z.assert(!m[a].length,"The extraction went missing? How?"),z.assert(C.length===0,"Extract constant accepted a range containing a variable declaration?"),r.cancellationToken.throwIfCancellationRequested();const b=Ut(h)?h:h.statements[0].expression;return DMt(b,u[a],p[a],t.facts,r)}function bMt(t,r){const{scopes:a,affectedTextRange:u,readsAndWrites:{functionErrorsPerScope:h,constantErrorsPerScope:p}}=FPe(t,r),m=a.map((C,b)=>{const T=CMt(C),E=SMt(C),N=rc(C)?wMt(C):ss(C)?xMt(C):kMt(C);let R,F;return N===1?(R=Qy(Po(k.Extract_to_0_in_1_scope),[T,"global"]),F=Qy(Po(k.Extract_to_0_in_1_scope),[E,"global"])):N===0?(R=Qy(Po(k.Extract_to_0_in_1_scope),[T,"module"]),F=Qy(Po(k.Extract_to_0_in_1_scope),[E,"module"])):(R=Qy(Po(k.Extract_to_0_in_1),[T,N]),F=Qy(Po(k.Extract_to_0_in_1),[E,N])),b===0&&!ss(C)&&(F=Qy(Po(k.Extract_to_0_in_enclosing_scope),[E])),{functionExtraction:{description:R,errors:h[b]},constantExtraction:{description:F,errors:p[b]}}});return{affectedTextRange:u,extractions:m}}function FPe(t,r){const{file:a}=r,u=mMt(t),h=BMt(t,a),p=WMt(t,u,h,a,r.program.getTypeChecker(),r.cancellationToken);return{scopes:u,affectedTextRange:h,readsAndWrites:p}}function CMt(t){return rc(t)?"inner function":ss(t)?"method":"function"}function SMt(t){return ss(t)?"readonly field":"constant"}function wMt(t){switch(t.kind){case 176:return"constructor";case 218:case 262:return t.name?`function '${t.name.text}'`:Tde;case 219:return"arrow function";case 174:return`method '${t.name.getText()}'`;case 177:return`'get ${t.name.getText()}'`;case 178:return`'set ${t.name.getText()}'`;default:z.assertNever(t,`Unexpected scope kind ${t.kind}`)}}function xMt(t){return t.kind===263?t.name?`class '${t.name.text}'`:"anonymous class declaration":t.name?`class expression '${t.name.text}'`:"anonymous class expression"}function kMt(t){return t.kind===268?`namespace '${t.parent.name.getText()}'`:t.externalModuleIndicator?0:1}function TMt(t,r,{usages:a,typeParameterUsages:u,substitutions:h},p,m,C){const b=C.program.getTypeChecker(),T=il(C.program.getCompilerOptions()),E=Ch.createImportAdder(C.file,C.program,C.preferences,C.host),N=r.getSourceFile(),R=LI(ss(r)?"newMethod":"newFunction",N),F=Xn(r),j=G.createIdentifier(R);let U;const q=[],Q=[];let re;a.forEach((We,Ue)=>{let Ye;if(!F){let nt=b.getTypeOfSymbolAtLocation(We.symbol,We.node);nt=b.getBaseTypeOfLiteralType(nt),Ye=Ch.typeToAutoImportableTypeNode(b,E,nt,r,T,1)}const wt=G.createParameterDeclaration(void 0,void 0,Ue,void 0,Ye);q.push(wt),We.usage===2&&(re||(re=[])).push(We),Q.push(G.createIdentifier(Ue))});const ue=Fn(u.values(),We=>({type:We,declaration:IMt(We,C.startPosition)})).sort(NMt),te=ue.length===0?void 0:ns(ue,({declaration:We})=>We),Se=te!==void 0?te.map(We=>G.createTypeReferenceNode(We.name,void 0)):void 0;if(Ut(t)&&!F){const We=b.getContextualType(t);U=b.typeToTypeNode(We,r,1)}const{body:oe,returnValueProperty:pe}=PMt(t,p,re,h,!!(m.facts&1));Op(oe);let ye;const be=!!(m.facts&16);if(ss(r)){const We=F?[]:[G.createModifier(123)];m.facts&32&&We.push(G.createModifier(126)),m.facts&4&&We.push(G.createModifier(134)),ye=G.createMethodDeclaration(We.length?We:void 0,m.facts&2?G.createToken(42):void 0,j,void 0,te,q,U,oe)}else be&&q.unshift(G.createParameterDeclaration(void 0,void 0,"this",void 0,b.typeToTypeNode(b.getTypeAtLocation(m.thisNode),r,1),void 0)),ye=G.createFunctionDeclaration(m.facts&4?[G.createToken(134)]:void 0,m.facts&2?G.createToken(42):void 0,j,te,q,U,oe);const _e=er.ChangeTracker.fromContext(C),ve=(xS(m.range)?La(m.range):m.range).end,Ee=MMt(ve,r);Ee?_e.insertNodeBefore(C.file,Ee,ye,!0):_e.insertNodeAtEndOfScope(C.file,r,ye),E.writeFixes(_e);const ke=[],Fe=LMt(r,m,R);be&&Q.unshift(G.createIdentifier("this"));let Oe=G.createCallExpression(be?G.createPropertyAccessExpression(Fe,"call"):Fe,Se,Q);if(m.facts&2&&(Oe=G.createYieldExpression(G.createToken(42),Oe)),m.facts&4&&(Oe=G.createAwaitExpression(Oe)),WPe(t)&&(Oe=G.createJsxExpression(void 0,Oe)),p.length&&!re)if(z.assert(!pe,"Expected no returnValueProperty"),z.assert(!(m.facts&1),"Expected RangeFacts.HasReturn flag to be unset"),p.length===1){const We=p[0];ke.push(G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(Pl(We.name),void 0,Pl(We.type),Oe)],We.parent.flags)))}else{const We=[],Ue=[];let Ye=p[0].parent.flags,wt=!1;for(const ze of p){We.push(G.createBindingElement(void 0,void 0,Pl(ze.name)));const st=b.typeToTypeNode(b.getBaseTypeOfLiteralType(b.getTypeAtLocation(ze)),r,1);Ue.push(G.createPropertySignature(void 0,ze.symbol.name,void 0,st)),wt=wt||ze.type!==void 0,Ye=Ye&ze.parent.flags}const nt=wt?G.createTypeLiteralNode(Ue):void 0;nt&&ir(nt,1),ke.push(G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(G.createObjectBindingPattern(We),void 0,nt,Oe)],Ye)))}else if(p.length||re){if(p.length)for(const Ue of p){let Ye=Ue.parent.flags;Ye&2&&(Ye=Ye&-3|1),ke.push(G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(Ue.symbol.name,void 0,He(Ue.type))],Ye)))}pe&&ke.push(G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(pe,void 0,He(U))],1)));const We=BPe(p,re);pe&&We.unshift(G.createShorthandPropertyAssignment(pe)),We.length===1?(z.assert(!pe,"Shouldn't have returnValueProperty here"),ke.push(G.createExpressionStatement(G.createAssignment(We[0].name,Oe))),m.facts&1&&ke.push(G.createReturnStatement())):(ke.push(G.createExpressionStatement(G.createAssignment(G.createObjectLiteralExpression(We),Oe))),pe&&ke.push(G.createReturnStatement(G.createIdentifier(pe))))}else m.facts&1?ke.push(G.createReturnStatement(Oe)):xS(m.range)?ke.push(G.createExpressionStatement(Oe)):ke.push(Oe);xS(m.range)?_e.replaceNodeRangeWithNodes(C.file,ma(m.range),La(m.range),ke):_e.replaceNodeWithNodes(C.file,m.range,ke);const fe=_e.getChanges(),Le=(xS(m.range)?ma(m.range):m.range).getSourceFile().fileName,et=CH(fe,Le,R,!1);return{renameFilename:Le,renameLocation:et,edits:fe};function He(We){if(We===void 0)return;const Ue=Pl(We);let Ye=Ue;for(;_I(Ye);)Ye=Ye.type;return Yw(Ye)&&Me(Ye.types,wt=>wt.kind===157)?Ue:G.createUnionTypeNode([Ue,G.createKeywordTypeNode(157)])}}function DMt(t,r,{substitutions:a},u,h){const p=h.program.getTypeChecker(),m=r.getSourceFile(),C=pPe(t,r,p,m),b=Xn(r);let T=b||!p.isContextSensitive(t)?void 0:p.typeToTypeNode(p.getContextualType(t),r,1),E=AMt(Il(t),a);({variableType:T,initializer:E}=U(T,E)),Op(E);const N=er.ChangeTracker.fromContext(h);if(ss(r)){z.assert(!b,"Cannot extract to a JS class");const q=[];q.push(G.createModifier(123)),u&32&&q.push(G.createModifier(126)),q.push(G.createModifier(148));const Q=G.createPropertyDeclaration(q,C,void 0,T,E);let re=G.createPropertyAccessExpression(u&32?G.createIdentifier(r.name.getText()):G.createThis(),G.createIdentifier(C));WPe(t)&&(re=G.createJsxExpression(void 0,re));const Y=t.pos,ue=RMt(Y,r);N.insertNodeBefore(h.file,ue,Q,!0),N.replaceNode(h.file,t,re)}else{const q=G.createVariableDeclaration(C,void 0,T,E),Q=EMt(t,r);if(Q){N.insertNodeBefore(h.file,Q,q);const re=G.createIdentifier(C);N.replaceNode(h.file,t,re)}else if(t.parent.kind===244&&r===Xi(t,RPe)){const re=G.createVariableStatement(void 0,G.createVariableDeclarationList([q],2));N.replaceNode(h.file,t.parent,re)}else{const re=G.createVariableStatement(void 0,G.createVariableDeclarationList([q],2)),Y=FMt(t,r);if(Y.pos===0?N.insertNodeAtTopOfFile(h.file,re,!1):N.insertNodeBefore(h.file,Y,re,!1),t.parent.kind===244)N.delete(h.file,t.parent);else{let ue=G.createIdentifier(C);WPe(t)&&(ue=G.createJsxExpression(void 0,ue)),N.replaceNode(h.file,t,ue)}}}const R=N.getChanges(),F=t.getSourceFile().fileName,j=CH(R,F,C,!0);return{renameFilename:F,renameLocation:j,edits:R};function U(q,Q){if(q===void 0)return{variableType:q,initializer:Q};if(!gc(Q)&&!Dc(Q)||Q.typeParameters)return{variableType:q,initializer:Q};const re=p.getTypeAtLocation(t),Y=a_(p.getSignaturesOfType(re,0));if(!Y)return{variableType:q,initializer:Q};if(Y.getTypeParameters())return{variableType:q,initializer:Q};const ue=[];let te=!1;for(const Se of Q.parameters)if(Se.type)ue.push(Se);else{const oe=p.getTypeAtLocation(Se);oe===p.getAnyType()&&(te=!0),ue.push(G.updateParameterDeclaration(Se,Se.modifiers,Se.dotDotDotToken,Se.name,Se.questionToken,Se.type||p.typeToTypeNode(oe,r,1),Se.initializer))}if(te)return{variableType:q,initializer:Q};if(q=void 0,Dc(Q))Q=G.updateArrowFunction(Q,_0(t)?CT(t):void 0,Q.typeParameters,ue,Q.type||p.typeToTypeNode(Y.getReturnType(),r,1),Q.equalsGreaterThanToken,Q.body);else{if(Y&&Y.thisParameter){const Se=lu(ue);if(!Se||lt(Se.name)&&Se.name.escapedText!=="this"){const oe=p.getTypeOfSymbolAtLocation(Y.thisParameter,t);ue.splice(0,0,G.createParameterDeclaration(void 0,void 0,"this",void 0,p.typeToTypeNode(oe,r,1)))}}Q=G.updateFunctionExpression(Q,_0(t)?CT(t):void 0,Q.asteriskToken,Q.name,Q.typeParameters,ue,Q.type||p.typeToTypeNode(Y.getReturnType(),r,1),Q.body)}return{variableType:q,initializer:Q}}}function EMt(t,r){let a;for(;t!==void 0&&t!==r;){if(ds(t)&&t.initializer===a&&wf(t.parent)&&t.parent.declarations.length>1)return t;a=t,t=t.parent}}function IMt(t,r){let a;const u=t.symbol;if(u&&u.declarations)for(const h of u.declarations)(a===void 0||h.pos0;if(Ho(t)&&!p&&u.size===0)return{body:G.createBlock(t.statements,!0),returnValueProperty:void 0};let m,C=!1;const b=G.createNodeArray(Ho(t)?t.statements.slice(0):[Es(t)?t:G.createReturnStatement(Il(t))]);if(p||u.size){const E=wn(b,T,Es).slice();if(p&&!h&&Es(t)){const N=BPe(r,a);N.length===1?E.push(G.createReturnStatement(N[0].name)):E.push(G.createReturnStatement(G.createObjectLiteralExpression(N)))}return{body:G.createBlock(E,!0),returnValueProperty:m}}else return{body:G.createBlock(b,!0),returnValueProperty:void 0};function T(E){if(!C&&Om(E)&&p){const N=BPe(r,a);return E.expression&&(m||(m="__return"),N.unshift(G.createPropertyAssignment(m,Ct(E.expression,T,Ut)))),N.length===1?G.createReturnStatement(N[0].name):G.createReturnStatement(G.createObjectLiteralExpression(N))}else{const N=C;C=C||rc(E)||ss(E);const R=u.get(Tl(E).toString()),F=R?Pl(R):cn(E,T,void 0);return C=N,F}}}function AMt(t,r){return r.size?a(t):t;function a(u){const h=r.get(Tl(u).toString());return h?Pl(h):cn(u,a,void 0)}}function OMt(t){if(rc(t)){const r=t.body;if(Ho(r))return r.statements}else{if(jv(t)||Ns(t))return t.statements;if(ss(t))return t.members}return x}function MMt(t,r){return Me(OMt(r),a=>a.pos>=t&&rc(a)&&!fu(a))}function RMt(t,r){const a=r.members;z.assert(a.length>0,"Found no members");let u,h=!0;for(const p of a){if(p.pos>t)return u||a[0];if(h&&!To(p)){if(u!==void 0)return p;h=!1}u=p}return u===void 0?z.fail():u}function FMt(t,r){z.assert(!ss(r));let a;for(let u=t;u!==r;u=u.parent)RPe(u)&&(a=u);for(let u=(a||t).parent;;u=u.parent){if(j3(u)){let h;for(const p of u.statements){if(p.pos>t.pos)break;h=p}return!h&&a3(u)?(z.assert(v7(u.parent.parent),"Grandparent isn't a switch statement"),u.parent.parent):z.checkDefined(h,"prevStatement failed to get set")}z.assert(u!==r,"Didn't encounter a block-like before encountering scope")}}function BPe(t,r){const a=Yt(t,h=>G.createShorthandPropertyAssignment(h.symbol.name)),u=Yt(r,h=>G.createShorthandPropertyAssignment(h.symbol.name));return a===void 0?u:u===void 0?a:a.concat(u)}function xS(t){return Lo(t)}function BMt(t,r){return xS(t.range)?{pos:ma(t.range).getStart(r),end:La(t.range).getEnd()}:t.range}function WMt(t,r,a,u,h,p){const m=new Map,C=[],b=[],T=[],E=[],N=[],R=new Map,F=[];let j;const U=xS(t.range)?t.range.length===1&&_f(t.range[0])?t.range[0].expression:void 0:t.range;let q;if(U===void 0){const Ee=t.range,ke=ma(Ee).getStart(),Fe=La(Ee).end;q=ef(u,ke,Fe-ke,Bf.expressionExpected)}else h.getTypeAtLocation(U).flags&147456&&(q=Kn(U,Bf.uselessConstantType));for(const Ee of r){C.push({usages:new Map,typeParameterUsages:new Map,substitutions:new Map}),b.push(new Map),T.push([]);const ke=[];q&&ke.push(q),ss(Ee)&&Xn(Ee)&&ke.push(Kn(Ee,Bf.cannotExtractToJSClass)),Dc(Ee)&&!Ho(Ee.body)&&ke.push(Kn(Ee,Bf.cannotExtractToExpressionArrowFunction)),E.push(ke)}const Q=new Map,re=xS(t.range)?G.createBlock(t.range):t.range,Y=xS(t.range)?ma(t.range):t.range,ue=te(Y);if(oe(re),ue&&!xS(t.range)&&!qv(t.range)){const Ee=h.getContextualType(t.range);Se(Ee)}if(m.size>0){const Ee=new Map;let ke=0;for(let Fe=Y;Fe!==void 0&&ke{C[ke].typeParameterUsages.set(fe,Oe)}),ke++),zse(Fe))for(const Oe of Bw(Fe)){const fe=h.getTypeAtLocation(Oe);m.has(fe.id.toString())&&Ee.set(fe.id.toString(),fe)}z.assert(ke===r.length,"Should have iterated all scopes")}if(N.length){const Ee=jse(r[0],r[0].parent)?r[0]:j0(r[0]);jo(Ee,be)}for(let Ee=0;Ee0&&(ke.usages.size>0||ke.typeParameterUsages.size>0)){const fe=xS(t.range)?t.range[0]:t.range;E[Ee].push(Kn(fe,Bf.cannotAccessVariablesFromNestedScopes))}t.facts&16&&ss(r[Ee])&&T[Ee].push(Kn(t.thisNode,Bf.cannotExtractFunctionsContainingThisToMethod));let Fe=!1,Oe;if(C[Ee].usages.forEach(fe=>{fe.usage===2&&(Fe=!0,fe.symbol.flags&106500&&fe.symbol.valueDeclaration&&Ep(fe.symbol.valueDeclaration,8)&&(Oe=fe.symbol.valueDeclaration))}),z.assert(xS(t.range)||F.length===0,"No variable declarations expected if something was extracted"),Fe&&!xS(t.range)){const fe=Kn(t.range,Bf.cannotWriteInExpression);T[Ee].push(fe),E[Ee].push(fe)}else if(Oe&&Ee>0){const fe=Kn(Oe,Bf.cannotExtractReadonlyPropertyInitializerOutsideConstructor);T[Ee].push(fe),E[Ee].push(fe)}else if(j){const fe=Kn(j,Bf.cannotExtractExportedEntity);T[Ee].push(fe),E[Ee].push(fe)}}return{target:re,usagesPerScope:C,functionErrorsPerScope:T,constantErrorsPerScope:E,exposedVariableDeclarations:F};function te(Ee){return!!Xi(Ee,ke=>zse(ke)&&Bw(ke).length!==0)}function Se(Ee){const ke=h.getSymbolWalker(()=>(p.throwIfCancellationRequested(),!0)),{visitedTypes:Fe}=ke.walkType(Ee);for(const Oe of Fe)Oe.isTypeParameter()&&m.set(Oe.id.toString(),Oe)}function oe(Ee,ke=1){if(ue){const Fe=h.getTypeAtLocation(Ee);Se(Fe)}if(Yf(Ee)&&Ee.symbol&&N.push(Ee),Yd(Ee))oe(Ee.left,2),oe(Ee.right);else if(fwe(Ee))oe(Ee.operand,2);else if(Ir(Ee)||wc(Ee))jo(Ee,oe);else if(lt(Ee)){if(!Ee.parent||__(Ee.parent)&&Ee!==Ee.parent.left||Ir(Ee.parent)&&Ee!==Ee.parent.expression)return;pe(Ee,ke,Lv(Ee))}else jo(Ee,oe)}function pe(Ee,ke,Fe){const Oe=ye(Ee,ke,Fe);if(Oe)for(let fe=0;fe=ke)return fe;if(Q.set(fe,ke),Ie){for(const He of C)He.usages.get(Ee.text)&&He.usages.set(Ee.text,{usage:ke,symbol:Oe,node:Ee});return fe}const Le=Oe.getDeclarations(),et=Le&&Me(Le,He=>He.getSourceFile()===u);if(et&&!uH(a,et.getStart(),et.end)){if(t.facts&2&&ke===2){const He=Kn(Ee,Bf.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators);for(const We of T)We.push(He);for(const We of E)We.push(He)}for(let He=0;HeOe.symbol===ke);if(Fe)if(ds(Fe)){const Oe=Fe.symbol.id.toString();R.has(Oe)||(F.push(Fe),R.set(Oe,!0))}else j=j||Fe}jo(Ee,be)}function _e(Ee){return Ee.parent&&ih(Ee.parent)&&Ee.parent.name===Ee?h.getShorthandAssignmentValueSymbol(Ee.parent):h.getSymbolAtLocation(Ee)}function ve(Ee,ke,Fe){if(!Ee)return;const Oe=Ee.getDeclarations();if(Oe&&Oe.some(Ie=>Ie.parent===ke))return G.createIdentifier(Ee.name);const fe=ve(Ee.parent,ke,Fe);if(fe!==void 0)return Fe?G.createQualifiedName(fe,G.createIdentifier(Ee.name)):G.createPropertyAccessExpression(fe,Ee.name)}}function VMt(t){return Xi(t,r=>r.parent&&ret(r)&&!cr(r.parent))}function ret(t){const{parent:r}=t;switch(r.kind){case 306:return!1}switch(t.kind){case 11:return r.kind!==272&&r.kind!==276;case 230:case 206:case 208:return!1;case 80:return r.kind!==208&&r.kind!==276&&r.kind!==281}return!0}function WPe(t){return VPe(t)||(tb(t)||vI(t)||XT(t))&&(tb(t.parent)||XT(t.parent))}function VPe(t){return ja(t)&&t.parent&&qv(t.parent)}var HMt={},vfe="Generate 'get' and 'set' accessors",HPe=Po(k.Generate_get_and_set_accessors),jPe={name:vfe,description:HPe,kind:"refactor.rewrite.property.generateAccessors"};rb(vfe,{kinds:[jPe.kind],getEditsForAction:function(r,a){if(!r.endPosition)return;const u=Ch.getAccessorConvertiblePropertyAtPosition(r.file,r.program,r.startPosition,r.endPosition);z.assert(u&&!eC(u),"Expected applicable refactor info");const h=Ch.generateAccessorFromProperty(r.file,r.program,r.startPosition,r.endPosition,r,a);if(!h)return;const p=r.file.fileName,m=u.renameAccessor?u.accessorName:u.fieldName,b=(lt(m)?0:-1)+CH(h,p,m.text,Gs(u.declaration));return{renameFilename:p,renameLocation:b,edits:h}},getAvailableActions(t){if(!t.endPosition)return x;const r=Ch.getAccessorConvertiblePropertyAtPosition(t.file,t.program,t.startPosition,t.endPosition,t.triggerReason==="invoked");return r?eC(r)?t.preferences.provideRefactorNotApplicableReason?[{name:vfe,description:HPe,actions:[{...jPe,notApplicableReason:r.error}]}]:x:[{name:vfe,description:HPe,actions:[jPe]}]:x}});var jMt={},yfe="Infer function return type",zPe=Po(k.Infer_function_return_type),bfe={name:yfe,description:zPe,kind:"refactor.rewrite.function.returnType"};rb(yfe,{kinds:[bfe.kind],getEditsForAction:zMt,getAvailableActions:UMt});function zMt(t){const r=set(t);if(r&&!eC(r))return{renameFilename:void 0,renameLocation:void 0,edits:er.ChangeTracker.with(t,u=>qMt(t.file,u,r.declaration,r.returnTypeNode))}}function UMt(t){const r=set(t);return r?eC(r)?t.preferences.provideRefactorNotApplicableReason?[{name:yfe,description:zPe,actions:[{...bfe,notApplicableReason:r.error}]}]:x:[{name:yfe,description:zPe,actions:[bfe]}]:x}function qMt(t,r,a,u){const h=Hl(a,22,t),p=Dc(a)&&h===void 0,m=p?ma(a.parameters):h;m&&(p&&(r.insertNodeBefore(t,m,G.createToken(21)),r.insertNodeAfter(t,m,G.createToken(22))),r.insertNodeAt(t,m.end,u,{prefix:": "}))}function set(t){if(Xn(t.file)||!s2(bfe.kind,t.kind))return;const r=j_(t.file,t.startPosition),a=Xi(r,m=>Ho(m)||m.parent&&Dc(m.parent)&&(m.kind===39||m.parent.body===m)?"quit":$Mt(m));if(!a||!a.body||a.type)return{error:Po(k.Return_type_must_be_inferred_from_a_function)};const u=t.program.getTypeChecker(),h=JMt(u,a);if(!h)return{error:Po(k.Could_not_determine_function_return_type)};const p=u.typeToTypeNode(h,a,1);if(p)return{declaration:a,returnTypeNode:p}}function $Mt(t){switch(t.kind){case 262:case 218:case 219:case 174:return!0;default:return!1}}function JMt(t,r){if(t.isImplementationOfOverload(r)){const u=t.getTypeAtLocation(r).getCallSignatures();if(u.length>1)return t.getUnionType(ns(u,h=>h.getReturnType()))}const a=t.getSignatureFromDeclaration(r);if(a)return t.getReturnTypeOfSignature(a)}var oet=(t=>(t[t.typeOffset=8]="typeOffset",t[t.modifierMask=255]="modifierMask",t))(oet||{}),aet=(t=>(t[t.class=0]="class",t[t.enum=1]="enum",t[t.interface=2]="interface",t[t.namespace=3]="namespace",t[t.typeParameter=4]="typeParameter",t[t.type=5]="type",t[t.parameter=6]="parameter",t[t.variable=7]="variable",t[t.enumMember=8]="enumMember",t[t.property=9]="property",t[t.function=10]="function",t[t.member=11]="member",t))(aet||{}),cet=(t=>(t[t.declaration=0]="declaration",t[t.static=1]="static",t[t.async=2]="async",t[t.readonly=3]="readonly",t[t.defaultLibrary=4]="defaultLibrary",t[t.local=5]="local",t))(cet||{});function uet(t,r,a,u){const h=UPe(t,r,a,u);z.assert(h.spans.length%3===0);const p=h.spans,m=[];for(let C=0;C{h.push(m.getStart(r),m.getWidth(r),(C+1<<8)+b)},u),h}function KMt(t,r,a,u,h){const p=t.getTypeChecker();let m=!1;function C(b){switch(b.kind){case 267:case 263:case 264:case 262:case 231:case 218:case 219:h.throwIfCancellationRequested()}if(!b||!E$(a,b.pos,b.getFullWidth())||b.getFullWidth()===0)return;const T=m;if((tb(b)||vI(b))&&(m=!0),b7(b)&&(m=!1),lt(b)&&!m&&!YMt(b)&&!n7(b.escapedText)){let E=p.getSymbolAtLocation(b);if(E){E.flags&2097152&&(E=p.getAliasedSymbol(E));let N=QMt(E,EI(b));if(N!==void 0){let R=0;b.parent&&(nl(b.parent)||het.get(b.parent.kind)===N)&&b.parent.name===b&&(R=1),N===6&&fet(b)&&(N=9),N=XMt(p,b,N);const F=E.valueDeclaration;if(F){const j=wk(F),U=Rb(F);j&256&&(R|=2),j&1024&&(R|=4),N!==0&&N!==2&&(j&8||U&2||E.getFlags()&8)&&(R|=8),(N===7||N===10)&&ZMt(F,r)&&(R|=32),t.isSourceFileDefaultLibrary(F.getSourceFile())&&(R|=16)}else E.declarations&&E.declarations.some(j=>t.isSourceFileDefaultLibrary(j.getSourceFile()))&&(R|=16);u(b,N,R)}}}jo(b,C),m=T}C(r)}function QMt(t,r){const a=t.getFlags();if(a&32)return 0;if(a&384)return 1;if(a&524288)return 5;if(a&64){if(r&2)return 2}else if(a&262144)return 4;let u=t.valueDeclaration||t.declarations&&t.declarations[0];return u&&nl(u)&&(u=det(u)),u&&het.get(u.kind)}function XMt(t,r,a){if(a===7||a===9||a===6){const u=t.getTypeAtLocation(r);if(u){const h=p=>p(u)||u.isUnion()&&u.types.some(p);if(a!==6&&h(p=>p.getConstructSignatures().length>0))return 0;if(h(p=>p.getCallSignatures().length>0)&&!h(p=>p.getProperties().length>0)||eRt(r))return a===9?11:10}}return a}function ZMt(t,r){return nl(t)&&(t=det(t)),ds(t)?(!Ns(t.parent.parent.parent)||YT(t.parent))&&t.getSourceFile()===r:Uu(t)?!Ns(t.parent)&&t.getSourceFile()===r:!1}function det(t){for(;;)if(nl(t.parent.parent))t=t.parent.parent;else return t.parent.parent}function YMt(t){const r=t.parent;return r&&($0(r)||m_(r)||eb(r))}function eRt(t){for(;fet(t);)t=t.parent;return sa(t.parent)&&t.parent.expression===t}function fet(t){return __(t.parent)&&t.parent.right===t||Ir(t.parent)&&t.parent.name===t}var het=new Map([[260,7],[169,6],[172,9],[267,3],[266,1],[306,8],[263,0],[174,11],[262,10],[218,10],[173,11],[177,9],[178,9],[171,9],[264,2],[265,5],[168,4],[303,9],[304,9]]),_et="0.8";function pet(t,r,a,u){const h=FB(t)?new qPe(t,r,a):t===80?new met(80,r,a):t===81?new vet(81,r,a):new get(t,r,a);return h.parent=u,h.flags=u.flags&101441536,h}var qPe=class{constructor(t,r,a){this.pos=r,this.end=a,this.kind=t,this.id=0,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}assertHasRealPosition(t){z.assert(!q0(this.pos)&&!q0(this.end),t||"Node must have a real position for this operation")}getSourceFile(){return _n(this)}getStart(t,r){return this.assertHasRealPosition(),Nk(this,t,r)}getFullStart(){return this.assertHasRealPosition(),this.pos}getEnd(){return this.assertHasRealPosition(),this.end}getWidth(t){return this.assertHasRealPosition(),this.getEnd()-this.getStart(t)}getFullWidth(){return this.assertHasRealPosition(),this.end-this.pos}getLeadingTriviaWidth(t){return this.assertHasRealPosition(),this.getStart(t)-this.pos}getFullText(t){return this.assertHasRealPosition(),(t||this.getSourceFile()).text.substring(this.pos,this.end)}getText(t){return this.assertHasRealPosition(),t||(t=this.getSourceFile()),t.text.substring(this.getStart(t),this.getEnd())}getChildCount(t){return this.getChildren(t).length}getChildAt(t,r){return this.getChildren(r)[t]}getChildren(t=_n(this)){return this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine"),qae(this,t)??uTe(this,t,tRt(this,t))}getFirstToken(t){this.assertHasRealPosition();const r=this.getChildren(t);if(!r.length)return;const a=Me(r,u=>u.kind<309||u.kind>351);return a.kind<166?a:a.getFirstToken(t)}getLastToken(t){this.assertHasRealPosition();const r=this.getChildren(t),a=Ql(r);if(a)return a.kind<166?a:a.getLastToken(t)}forEachChild(t,r){return jo(this,t,r)}};function tRt(t,r){const a=[];if(U$(t))return t.forEachChild(m=>{a.push(m)}),a;jh.setText((r||t.getSourceFile()).text);let u=t.pos;const h=m=>{AX(a,u,m.pos,t),a.push(m),u=m.end},p=m=>{AX(a,u,m.pos,t),a.push(iRt(m,t)),u=m.end};return W(t.jsDoc,h),u=t.pos,t.forEachChild(h,p),AX(a,u,t.end,t),jh.setText(void 0),a}function AX(t,r,a,u){for(jh.resetTokenState(r);rr.tagName.text==="inheritDoc"||r.tagName.text==="inheritdoc")}function Cfe(t,r){if(!t)return x;let a=l2.getJsDocTagsFromDeclarations(t,r);if(r&&(a.length===0||t.some(yet))){const u=new Set;for(const h of t){const p=bet(r,h,m=>{var C;if(!u.has(m))return u.add(m),h.kind===177||h.kind===178?m.getContextualJsDocTags(h,r):((C=m.declarations)==null?void 0:C.length)===1?m.getJsDocTags(r):void 0});p&&(a=[...p,...a])}}return a}function OX(t,r){if(!t)return x;let a=l2.getJsDocCommentsFromDeclarations(t,r);if(r&&(a.length===0||t.some(yet))){const u=new Set;for(const h of t){const p=bet(r,h,m=>{if(!u.has(m))return u.add(m),h.kind===177||h.kind===178?m.getContextualDocumentationComment(h,r):m.getDocumentationComment(r)});p&&(a=a.length===0?p.slice():p.concat(B3(),a))}}return a}function bet(t,r,a){var u;const h=((u=r.parent)==null?void 0:u.kind)===176?r.parent.parent:r.parent;if(!h)return;const p=_d(r);return Z(E8(h),m=>{const C=t.getTypeAtLocation(m),b=p&&C.symbol?t.getTypeOfSymbol(C.symbol):C,T=t.getPropertyOfType(b,r.symbol.name);return T?a(T):void 0})}var oRt=class extends qPe{constructor(t,r,a){super(t,r,a)}update(t,r){return ole(this,t,r)}getLineAndCharacterOfPosition(t){return Da(this,t)}getLineStarts(){return Wy(this)}getPositionOfLineAndCharacter(t,r,a){return k$(Wy(this),t,r,this.text,a)}getLineEndOfPosition(t){const{line:r}=this.getLineAndCharacterOfPosition(t),a=this.getLineStarts();let u;r+1>=a.length&&(u=this.getEnd()),u||(u=a[r+1]-1);const h=this.getFullText();return h[u]===` +`&&h[u-1]==="\r"?u-1:u}getNamedDeclarations(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations}computeNamedDeclarations(){const t=Ug();return this.forEachChild(h),t;function r(p){const m=u(p);m&&t.add(m,p)}function a(p){let m=t.get(p);return m||t.set(p,m=[]),m}function u(p){const m=N$(p);return m&&(Ja(m)&&Ir(m.expression)?m.expression.name.text:od(m)?gH(m):void 0)}function h(p){switch(p.kind){case 262:case 218:case 174:case 173:const m=p,C=u(m);if(C){const E=a(C),N=Ql(E);N&&m.parent===N.parent&&m.symbol===N.symbol?m.body&&!N.body&&(E[E.length-1]=m):E.push(m)}jo(p,h);break;case 263:case 231:case 264:case 265:case 266:case 267:case 271:case 281:case 276:case 273:case 274:case 177:case 178:case 187:r(p),jo(p,h);break;case 169:if(!Kr(p,31))break;case 260:case 208:{const E=p;if(Qo(E.name)){jo(E.name,h);break}E.initializer&&h(E.initializer)}case 306:case 172:case 171:r(p);break;case 278:const b=p;b.exportClause&&(Yg(b.exportClause)?W(b.exportClause.elements,h):h(b.exportClause.name));break;case 272:const T=p.importClause;T&&(T.name&&r(T.name),T.namedBindings&&(T.namedBindings.kind===274?r(T.namedBindings):W(T.namedBindings.elements,h)));break;case 226:Lu(p)!==0&&r(p);default:jo(p,h)}}}},aRt=class{constructor(t,r,a){this.fileName=t,this.text=r,this.skipTrivia=a||(u=>u)}getLineAndCharacterOfPosition(t){return Da(this,t)}};function lRt(){return{getNodeConstructor:()=>qPe,getTokenConstructor:()=>get,getIdentifierConstructor:()=>met,getPrivateIdentifierConstructor:()=>vet,getSourceFileConstructor:()=>oRt,getSymbolConstructor:()=>nRt,getTypeConstructor:()=>rRt,getSignatureConstructor:()=>sRt,getSourceMapSourceConstructor:()=>aRt}}function OH(t){let r=!0;for(const u in t)if(Vl(t,u)&&!Cet(u)){r=!1;break}if(r)return t;const a={};for(const u in t)if(Vl(t,u)){const h=Cet(u)?u:u.charAt(0).toLowerCase()+u.substr(1);a[h]=t[u]}return a}function Cet(t){return!t.length||t.charAt(0)===t.charAt(0).toLowerCase()}function MH(t){return t?Yt(t,r=>r.text).join(""):""}function MX(){return{target:1,jsx:1}}function Sfe(){return Ch.getSupportedErrorCodes()}var cRt=class{constructor(t){this.host=t}getCurrentSourceFile(t){var r,a,u,h,p,m,C,b;const T=this.host.getScriptSnapshot(t);if(!T)throw new Error("Could not find file: '"+t+"'.");const E=bde(t,this.host),N=this.host.getScriptVersion(t);let R;if(this.currentFileName!==t){const F={languageVersion:99,impliedNodeFormat:QV(_c(t,this.host.getCurrentDirectory(),((u=(a=(r=this.host).getCompilerHost)==null?void 0:a.call(r))==null?void 0:u.getCanonicalFileName)||cS(this.host)),(b=(C=(m=(p=(h=this.host).getCompilerHost)==null?void 0:p.call(h))==null?void 0:m.getModuleResolutionCache)==null?void 0:C.call(m))==null?void 0:b.getPackageJsonInfoCache(),this.host,this.host.getCompilationSettings()),setExternalModuleIndicator:$W(this.host.getCompilationSettings()),jsDocParsingMode:0};R=RX(t,T,F,N,!0,E)}else if(this.currentFileVersion!==N){const F=T.getChangeRange(this.currentFileScriptSnapshot);R=wfe(this.currentSourceFile,T,N,F)}return R&&(this.currentFileVersion=N,this.currentFileName=t,this.currentFileScriptSnapshot=T,this.currentSourceFile=R),this.currentSourceFile}};function wet(t,r,a){t.version=a,t.scriptSnapshot=r}function RX(t,r,a,u,h,p){const m=RP(t,GP(r),a,h,p);return wet(m,r,u),m}function wfe(t,r,a,u,h){if(u&&a!==t.version){let m;const C=u.span.start!==0?t.text.substr(0,u.span.start):"",b=zu(u.span)!==t.text.length?t.text.substr(zu(u.span)):"";if(u.newLength===0)m=C&&b?C+b:C||b;else{const E=r.getText(u.span.start,u.span.start+u.newLength);m=C&&b?C+E+b:C?C+E:E+b}const T=ole(t,m,u,h);return wet(T,r,a),T.nameTable=void 0,t!==T&&t.scriptSnapshot&&(t.scriptSnapshot.dispose&&t.scriptSnapshot.dispose(),t.scriptSnapshot=void 0),T}const p={languageVersion:t.languageVersion,impliedNodeFormat:t.impliedNodeFormat,setExternalModuleIndicator:t.setExternalModuleIndicator,jsDocParsingMode:t.jsDocParsingMode};return RX(t.fileName,r,p,a,!0,t.scriptKind)}var uRt={isCancellationRequested:kv,throwIfCancellationRequested:dl},dRt=class{constructor(t){this.cancellationToken=t}isCancellationRequested(){return this.cancellationToken.isCancellationRequested()}throwIfCancellationRequested(){var t;if(this.isCancellationRequested())throw(t=sr)==null||t.instant(sr.Phase.Session,"cancellationThrown",{kind:"CancellationTokenObject"}),new UR}},JPe=class{constructor(t,r=20){this.hostCancellationToken=t,this.throttleWaitMilliseconds=r,this.lastCancellationCheckTime=0}isCancellationRequested(){const t=Vc();return Math.abs(t-this.lastCancellationCheckTime)>=this.throttleWaitMilliseconds?(this.lastCancellationCheckTime=t,this.hostCancellationToken.isCancellationRequested()):!1}throwIfCancellationRequested(){var t;if(this.isCancellationRequested())throw(t=sr)==null||t.instant(sr.Phase.Session,"cancellationThrown",{kind:"ThrottledCancellationToken"}),new UR}},xet=["getSemanticDiagnostics","getSuggestionDiagnostics","getCompilerOptionsDiagnostics","getSemanticClassifications","getEncodedSemanticClassifications","getCodeFixesAtPosition","getCombinedCodeFix","applyCodeActionCommand","organizeImports","getEditsForFileRename","getEmitOutput","getApplicableRefactors","getEditsForRefactor","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","provideInlayHints","getSupportedCodeFixes","getPasteEdits"],fRt=[...xet,"getCompletionsAtPosition","getCompletionEntryDetails","getCompletionEntrySymbol","getSignatureHelpItems","getQuickInfoAtPosition","getDefinitionAtPosition","getDefinitionAndBoundSpan","getImplementationAtPosition","getTypeDefinitionAtPosition","getReferencesAtPosition","findReferences","getDocumentHighlights","getNavigateToItems","getRenameInfo","findRenameLocations","getApplicableRefactors"];function GPe(t,r=mLe(t.useCaseSensitiveFileNames&&t.useCaseSensitiveFileNames(),t.getCurrentDirectory(),t.jsDocParsingMode),a){var u;let h;a===void 0?h=0:typeof a=="boolean"?h=a?2:0:h=a;const p=new cRt(t);let m,C,b=0;const T=t.getCancellationToken?new dRt(t.getCancellationToken()):uRt,E=t.getCurrentDirectory();hke((u=t.getLocalizedDiagnosticMessages)==null?void 0:u.bind(t));function N(de){t.log&&t.log(de)}const R=$6(t),F=Zf(R),j=LLe({useCaseSensitiveFileNames:()=>R,getCurrentDirectory:()=>E,getProgram:re,fileExists:la(t,t.fileExists),readFile:la(t,t.readFile),getDocumentPositionMapper:la(t,t.getDocumentPositionMapper),getSourceFileLike:la(t,t.getSourceFileLike),log:N});function U(de){const tt=m.getSourceFile(de);if(!tt){const Ae=new Error(`Could not find source file: '${de}'.`);throw Ae.ProgramFiles=m.getSourceFiles().map(Ke=>Ke.fileName),Ae}return tt}function q(){t.updateFromProject&&!t.updateFromProjectInProgress?t.updateFromProject():Q()}function Q(){var de,tt,Ae;if(z.assert(h!==2),t.getProjectVersion){const co=t.getProjectVersion();if(co){if(C===co&&!((de=t.hasChangedAutomaticTypeDirectiveNames)!=null&&de.call(t)))return;C=co}}const Ke=t.getTypeRootsVersion?t.getTypeRootsVersion():0;b!==Ke&&(N("TypeRoots version has changed; provide new program"),m=void 0,b=Ke);const Qt=t.getScriptFileNames().slice(),ni=t.getCompilationSettings()||MX(),fi=t.hasInvalidatedResolutions||kv,Gi=la(t,t.hasInvalidatedLibResolutions)||kv,fn=la(t,t.hasChangedAutomaticTypeDirectiveNames),kn=(tt=t.getProjectReferences)==null?void 0:tt.call(t);let or,rn={getSourceFile:Rl,getSourceFileByPath:zl,getCancellationToken:()=>T,getCanonicalFileName:F,useCaseSensitiveFileNames:()=>R,getNewLine:()=>fS(ni),getDefaultLibFileName:co=>t.getDefaultLibFileName(co),writeFile:dl,getCurrentDirectory:()=>E,fileExists:co=>t.fileExists(co),readFile:co=>t.readFile&&t.readFile(co),getSymlinkCache:la(t,t.getSymlinkCache),realpath:la(t,t.realpath),directoryExists:co=>U0(co,t),getDirectories:co=>t.getDirectories?t.getDirectories(co):[],readDirectory:(co,ca,Ic,$s,Ps)=>(z.checkDefined(t.readDirectory,"'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"),t.readDirectory(co,ca,Ic,$s,Ps)),onReleaseOldSourceFile:Sl,onReleaseParsedCommandLine:zo,hasInvalidatedResolutions:fi,hasInvalidatedLibResolutions:Gi,hasChangedAutomaticTypeDirectiveNames:fn,trace:la(t,t.trace),resolveModuleNames:la(t,t.resolveModuleNames),getModuleResolutionCache:la(t,t.getModuleResolutionCache),createHash:la(t,t.createHash),resolveTypeReferenceDirectives:la(t,t.resolveTypeReferenceDirectives),resolveModuleNameLiterals:la(t,t.resolveModuleNameLiterals),resolveTypeReferenceDirectiveReferences:la(t,t.resolveTypeReferenceDirectiveReferences),resolveLibrary:la(t,t.resolveLibrary),useSourceOfProjectReferenceRedirect:la(t,t.useSourceOfProjectReferenceRedirect),getParsedCommandLine:Tn,jsDocParsingMode:t.jsDocParsingMode};const _r=rn.getSourceFile,{getSourceFileWithCache:Fs}=K7(rn,co=>_c(co,E,F),(...co)=>_r.call(rn,...co));rn.getSourceFile=Fs,(Ae=t.setCompilerHost)==null||Ae.call(t,rn);const to={useCaseSensitiveFileNames:R,fileExists:co=>rn.fileExists(co),readFile:co=>rn.readFile(co),directoryExists:co=>rn.directoryExists(co),getDirectories:co=>rn.getDirectories(co),realpath:rn.realpath,readDirectory:(...co)=>rn.readDirectory(...co),trace:rn.trace,getCurrentDirectory:rn.getCurrentDirectory,onUnRecoverableConfigFileDiagnostic:dl},Ar=r.getKeyForCompilationSettings(ni);let is=new Set;if(Wce(m,Qt,ni,(co,ca)=>t.getScriptVersion(ca),co=>rn.fileExists(co),fi,Gi,fn,Tn,kn)){rn=void 0,or=void 0,is=void 0;return}m=XV({rootNames:Qt,options:ni,host:rn,oldProgram:m,projectReferences:kn}),rn=void 0,or=void 0,is=void 0,j.clearCache(),m.getTypeChecker();return;function Tn(co){const ca=_c(co,E,F),Ic=or==null?void 0:or.get(ca);if(Ic!==void 0)return Ic||void 0;const $s=t.getParsedCommandLine?t.getParsedCommandLine(co):ki(co);return(or||(or=new Map)).set(ca,$s||!1),$s}function ki(co){const ca=Rl(co,100);if(ca)return ca.path=_c(co,E,F),ca.resolvedPath=ca.path,ca.originalFileName=ca.fileName,LV(ca,to,bo(rs(co),E),void 0,bo(co,E))}function zo(co,ca,Ic){var $s;t.getParsedCommandLine?($s=t.onReleaseParsedCommandLine)==null||$s.call(t,co,ca,Ic):ca&&Sl(ca.sourceFile,Ic)}function Sl(co,ca){const Ic=r.getKeyForCompilationSettings(ca);r.releaseDocumentWithKey(co.resolvedPath,Ic,co.scriptKind,co.impliedNodeFormat)}function Rl(co,ca,Ic,$s){return zl(co,_c(co,E,F),ca,Ic,$s)}function zl(co,ca,Ic,$s,Ps){z.assert(rn,"getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");const pf=t.getScriptSnapshot(co);if(!pf)return;const qc=bde(co,t),wh=t.getScriptVersion(co);if(!Ps){const Tu=m&&m.getSourceFileByPath(ca);if(Tu){if(qc===Tu.scriptKind||is.has(Tu.resolvedPath))return r.updateDocumentWithKey(co,ca,t,Ar,pf,wh,qc,Ic);r.releaseDocumentWithKey(Tu.resolvedPath,r.getKeyForCompilationSettings(m.getCompilerOptions()),Tu.scriptKind,Tu.impliedNodeFormat),is.add(Tu.resolvedPath)}}return r.acquireDocumentWithKey(co,ca,t,Ar,pf,wh,qc,Ic)}}function re(){if(h===2){z.assert(m===void 0);return}return q(),m}function Y(){var de;return(de=t.getPackageJsonAutoImportProvider)==null?void 0:de.call(t)}function ue(de,tt){const Ae=m.getTypeChecker(),Ke=Qt();if(!Ke)return!1;for(const fi of de)for(const Gi of fi.references){const fn=ni(Gi);if(z.assertIsDefined(fn),tt.has(Gi)||xc.isDeclarationOfSymbol(fn,Ke)){tt.add(Gi),Gi.isDefinition=!0;const kn=ZQ(Gi,j,la(t,t.fileExists));kn&&tt.add(kn)}else Gi.isDefinition=!1}return!0;function Qt(){for(const fi of de)for(const Gi of fi.references){if(tt.has(Gi)){const kn=ni(Gi);return z.assertIsDefined(kn),Ae.getSymbolAtLocation(kn)}const fn=ZQ(Gi,j,la(t,t.fileExists));if(fn&&tt.has(fn)){const kn=ni(fn);if(kn)return Ae.getSymbolAtLocation(kn)}}}function ni(fi){const Gi=m.getSourceFile(fi.fileName);if(!Gi)return;const fn=j_(Gi,fi.textSpan.start);return xc.Core.getAdjustedNode(fn,{use:xc.FindReferencesUse.References})}}function te(){if(m){const de=r.getKeyForCompilationSettings(m.getCompilerOptions());W(m.getSourceFiles(),tt=>r.releaseDocumentWithKey(tt.resolvedPath,de,tt.scriptKind,tt.impliedNodeFormat)),m=void 0}}function Se(){te(),t=void 0}function oe(de){return q(),m.getSyntacticDiagnostics(U(de),T).slice()}function pe(de){q();const tt=U(de),Ae=m.getSemanticDiagnostics(tt,T);if(!fg(m.getCompilerOptions()))return Ae.slice();const Ke=m.getDeclarationDiagnostics(tt,T);return[...Ae,...Ke]}function ye(de){return q(),Kde(U(de),m,T)}function be(){return q(),[...m.getOptionsDiagnostics(T),...m.getGlobalDiagnostics(T)]}function _e(de,tt,Ae=Fm,Ke){const Qt={...Ae,includeCompletionsForModuleExports:Ae.includeCompletionsForModuleExports||Ae.includeExternalModuleExports,includeCompletionsWithInsertText:Ae.includeCompletionsWithInsertText||Ae.includeInsertTextCompletions};return q(),sA.getCompletionsAtPosition(t,m,N,U(de),tt,Qt,Ae.triggerCharacter,Ae.triggerKind,T,Ke&&gd.getFormatContext(Ke,t),Ae.includeSymbol)}function ve(de,tt,Ae,Ke,Qt,ni=Fm,fi){return q(),sA.getCompletionEntryDetails(m,N,U(de),tt,{name:Ae,source:Qt,data:fi},t,Ke&&gd.getFormatContext(Ke,t),ni,T)}function Ee(de,tt,Ae,Ke,Qt=Fm){return q(),sA.getCompletionEntrySymbol(m,N,U(de),tt,{name:Ae,source:Ke},t,Qt)}function ke(de,tt){q();const Ae=U(de),Ke=j_(Ae,tt);if(Ke===Ae)return;const Qt=m.getTypeChecker(),ni=Oe(Ke),fi=gRt(ni,Qt);if(!fi||Qt.isUnknownSymbol(fi)){const rn=fe(Ae,ni,tt)?Qt.getTypeAtLocation(ni):void 0;return rn&&{kind:"",kindModifiers:"",textSpan:b_(ni,Ae),displayParts:Qt.runWithCancellationToken(T,_r=>yH(_r,rn,II(ni))),documentation:rn.symbol?rn.symbol.getDocumentationComment(Qt):void 0,tags:rn.symbol?rn.symbol.getJsDocTags(Qt):void 0}}const{symbolKind:Gi,displayParts:fn,documentation:kn,tags:or}=Qt.runWithCancellationToken(T,rn=>kS.getSymbolDisplayPartsDocumentationAndSymbolKind(rn,fi,Ae,II(ni),ni));return{kind:Gi,kindModifiers:kS.getSymbolModifiers(Qt,fi),textSpan:b_(ni,Ae),displayParts:fn,documentation:kn,tags:or}}function Fe(de,tt){return q(),Mhe.pasteEditsProvider(U(de.targetFile),de.pastedText,de.pasteLocations,de.copiedFrom?{file:U(de.copiedFrom.file),range:de.copiedFrom.range}:void 0,t,de.preferences,gd.getFormatContext(tt,t),T)}function Oe(de){return GT(de.parent)&&de.pos===de.parent.pos?de.parent.expression:r3(de.parent)&&de.pos===de.parent.pos||P6(de.parent)&&de.parent.name===de||J0(de.parent)?de.parent:de}function fe(de,tt,Ae){switch(tt.kind){case 80:return tt.flags&16777216&&!Xn(tt)&&(tt.parent.kind===171&&tt.parent.name===tt||Xi(tt,Ke=>Ke.kind===169))?!1:!Bue(tt)&&!Wue(tt)&&!V0(tt.parent);case 211:case 166:return!bS(de,Ae);case 110:case 197:case 108:case 202:return!0;case 236:return P6(tt);default:return!1}}function Ie(de,tt,Ae,Ke){return q(),G3.getDefinitionAtPosition(m,U(de),tt,Ae,Ke)}function Le(de,tt){return q(),G3.getDefinitionAndBoundSpan(m,U(de),tt)}function et(de,tt){return q(),G3.getTypeDefinitionAtPosition(m.getTypeChecker(),U(de),tt)}function He(de,tt){return q(),xc.getImplementationsAtPosition(m,T,m.getSourceFiles(),U(de),tt)}function We(de,tt,Ae){const Ke=ra(de);z.assert(Ae.some(fi=>ra(fi)===Ke)),q();const Qt=ns(Ae,fi=>m.getSourceFile(fi)),ni=U(de);return bX.getDocumentHighlights(m,T,ni,tt,Qt)}function Ue(de,tt,Ae,Ke,Qt){q();const ni=U(de),fi=WQ(j_(ni,tt));if(sZ.nodeIsEligibleForRename(fi))if(lt(fi)&&(Uv(fi.parent)||QT(fi.parent))&&U6(fi.escapedText)){const{openingElement:Gi,closingElement:fn}=fi.parent.parent;return[Gi,fn].map(kn=>{const or=b_(kn.tagName,ni);return{fileName:ni.fileName,textSpan:or,...xc.toContextSpan(or,ni,kn.parent)}})}else{const Gi=bg(ni,Qt??Fm),fn=typeof Qt=="boolean"?Qt:Qt==null?void 0:Qt.providePrefixAndSuffixTextForRename;return wt(fi,tt,{findInStrings:Ae,findInComments:Ke,providePrefixAndSuffixTextForRename:fn,use:xc.FindReferencesUse.Rename},(kn,or,rn)=>xc.toRenameLocation(kn,or,rn,fn||!1,Gi))}}function Ye(de,tt){return q(),wt(j_(U(de),tt),tt,{use:xc.FindReferencesUse.References},xc.toReferenceEntry)}function wt(de,tt,Ae,Ke){q();const Qt=Ae&&Ae.use===xc.FindReferencesUse.Rename?m.getSourceFiles().filter(ni=>!m.isSourceFileDefaultLibrary(ni)):m.getSourceFiles();return xc.findReferenceOrRenameEntries(m,T,Qt,de,tt,Ae,Ke)}function nt(de,tt){return q(),xc.findReferencedSymbols(m,T,m.getSourceFiles(),U(de),tt)}function ze(de){return q(),xc.Core.getReferencesForFileName(de,m,m.getSourceFiles()).map(xc.toReferenceEntry)}function st(de,tt,Ae,Ke=!1,Qt=!1){q();const ni=Ae?[U(Ae)]:m.getSourceFiles();return DZe(ni,m.getTypeChecker(),T,de,tt,Ke,Qt)}function xt(de,tt,Ae){q();const Ke=U(de),Qt=t.getCustomTransformers&&t.getCustomTransformers();return iIe(m,Ke,!!tt,T,Qt,Ae)}function Et(de,tt,{triggerReason:Ae}=Fm){q();const Ke=U(de);return KH.getSignatureHelpItems(m,Ke,tt,Ae,T)}function ft(de){return p.getCurrentSourceFile(de)}function Ht(de,tt,Ae){const Ke=p.getCurrentSourceFile(de),Qt=j_(Ke,tt);if(Qt===Ke)return;switch(Qt.kind){case 211:case 166:case 11:case 97:case 112:case 106:case 108:case 110:case 197:case 80:break;default:return}let ni=Qt;for(;;)if(P3(ni)||wNe(ni))ni=ni.parent;else if(Hue(ni))if(ni.parent.parent.kind===267&&ni.parent.parent.body===ni.parent)ni=ni.parent.parent.name;else break;else break;return sd(ni.getStart(),Qt.getEnd())}function Oi(de,tt){const Ae=p.getCurrentSourceFile(de);return kfe.spanInSourceFileAtLocation(Ae,tt)}function Ji(de){return LZe(p.getCurrentSourceFile(de),T)}function Ui(de){return PZe(p.getCurrentSourceFile(de),T)}function bn(de,tt,Ae){return q(),(Ae||"original")==="2020"?uet(m,T,U(de),tt):pLe(m.getTypeChecker(),T,U(de),m.getClassifiableNames(),tt)}function Mi(de,tt,Ae){return q(),(Ae||"original")==="original"?Hde(m.getTypeChecker(),T,U(de),m.getClassifiableNames(),tt):UPe(m,T,U(de),tt)}function Ai(de,tt){return gLe(T,p.getCurrentSourceFile(de),tt)}function Rn(de,tt){return jde(T,p.getCurrentSourceFile(de),tt)}function bs(de){const tt=p.getCurrentSourceFile(de);return bhe.collectElements(tt,T)}const Hi=new Map(Object.entries({19:20,21:22,23:24,32:30}));Hi.forEach((de,tt)=>Hi.set(de.toString(),Number(tt)));function Hs(de,tt){const Ae=p.getCurrentSourceFile(de),Ke=O3(Ae,tt),Qt=Ke.getStart(Ae)===tt?Hi.get(Ke.kind.toString()):void 0,ni=Qt&&Hl(Ke.parent,Qt,Ae);return ni?[b_(Ke,Ae),b_(ni,Ae)].sort((fi,Gi)=>fi.start-Gi.start):x}function Wo(de,tt,Ae){let Ke=Vc();const Qt=OH(Ae),ni=p.getCurrentSourceFile(de);N("getIndentationAtPosition: getCurrentSourceFile: "+(Vc()-Ke)),Ke=Vc();const fi=gd.SmartIndenter.getIndentation(tt,ni,Qt);return N("getIndentationAtPosition: computeIndentation : "+(Vc()-Ke)),fi}function ts(de,tt,Ae,Ke){const Qt=p.getCurrentSourceFile(de);return gd.formatSelection(tt,Ae,Qt,gd.getFormatContext(OH(Ke),t))}function Fo(de,tt){return gd.formatDocument(p.getCurrentSourceFile(de),gd.getFormatContext(OH(tt),t))}function Cn(de,tt,Ae,Ke){const Qt=p.getCurrentSourceFile(de),ni=gd.getFormatContext(OH(Ke),t);if(!bS(Qt,tt))switch(Ae){case"{":return gd.formatOnOpeningCurly(tt,Qt,ni);case"}":return gd.formatOnClosingCurly(tt,Qt,ni);case";":return gd.formatOnSemicolon(tt,Qt,ni);case` +`:return gd.formatOnEnter(tt,Qt,ni)}return[]}function Ko(de,tt,Ae,Ke,Qt,ni=Fm){q();const fi=U(de),Gi=sd(tt,Ae),fn=gd.getFormatContext(Qt,t);return Ln(jt(Ke,XC,hc),kn=>(T.throwIfCancellationRequested(),Ch.getFixes({errorCode:kn,sourceFile:fi,span:Gi,program:m,host:t,cancellationToken:T,formatContext:fn,preferences:ni})))}function ot(de,tt,Ae,Ke=Fm){q(),z.assert(de.type==="file");const Qt=U(de.fileName),ni=gd.getFormatContext(Ae,t);return Ch.getAllFixes({fixId:tt,sourceFile:Qt,program:m,host:t,cancellationToken:T,formatContext:ni,preferences:Ke})}function hi(de,tt,Ae=Fm){q(),z.assert(de.type==="file");const Ke=U(de.fileName),Qt=gd.getFormatContext(tt,t),ni=de.mode??(de.skipDestructiveCodeActions?"SortAndCombine":"All");return c2.organizeImports(Ke,Qt,t,m,Ae,ni)}function hn(de,tt,Ae,Ke=Fm){return yLe(re(),de,tt,t,gd.getFormatContext(Ae,t),Ke,j)}function lr(de,tt){const Ae=typeof de=="string"?tt:de;return Lo(Ae)?Promise.all(Ae.map(Ke=>as(Ke))):as(Ae)}function as(de){const tt=Ae=>_c(Ae,E,F);return z.assertEqual(de.type,"install package"),t.installPackage?t.installPackage({fileName:tt(de.file),packageName:de.packageName}):Promise.reject("Host does not implement `installPackage`")}function fs(de,tt,Ae,Ke){const Qt=Ke?gd.getFormatContext(Ke,t).options:void 0;return l2.getDocCommentTemplateAtPosition(SS(t,Qt),p.getCurrentSourceFile(de),tt,Ae)}function Ds(de,tt,Ae){if(Ae===60)return!1;const Ke=p.getCurrentSourceFile(de);if(JP(Ke,tt))return!1;if(NNe(Ke,tt))return Ae===123;if(Jue(Ke,tt))return!1;switch(Ae){case 39:case 34:case 96:return!bS(Ke,tt)}return!0}function ha(de,tt){const Ae=p.getCurrentSourceFile(de),Ke=Dd(tt,Ae);if(!Ke)return;const Qt=Ke.kind===32&&Uv(Ke.parent)?Ke.parent.parent:yP(Ke)&&tb(Ke.parent)?Ke.parent:void 0;if(Qt&&Pt(Qt))return{newText:``};const ni=Ke.kind===32&&yI(Ke.parent)?Ke.parent.parent:yP(Ke)&&XT(Ke.parent)?Ke.parent:void 0;if(ni&&Re(ni))return{newText:""}}function Yo(de,tt){const Ae=p.getCurrentSourceFile(de),Ke=Dd(tt,Ae);if(!Ke||Ke.parent.kind===307)return;const Qt="[a-zA-Z0-9:\\-\\._$]*";if(XT(Ke.parent.parent)){const ni=Ke.parent.parent.openingFragment,fi=Ke.parent.parent.closingFragment;if(E6(ni)||E6(fi))return;const Gi=ni.getStart(Ae)+1,fn=fi.getStart(Ae)+2;return tt!==Gi&&tt!==fn?void 0:{ranges:[{start:Gi,length:0},{start:fn,length:0}],wordPattern:Qt}}else{const ni=Xi(Ke.parent,Fs=>!!(Uv(Fs)||QT(Fs)));if(!ni)return;z.assert(Uv(ni)||QT(ni),"tag should be opening or closing element");const fi=ni.parent.openingElement,Gi=ni.parent.closingElement,fn=fi.tagName.getStart(Ae),kn=fi.tagName.end,or=Gi.tagName.getStart(Ae),rn=Gi.tagName.end;return fn===fi.getStart(Ae)||or===Gi.getStart(Ae)||kn===fi.getEnd()||rn===Gi.getEnd()||!(fn<=tt&&tt<=kn||or<=tt&&tt<=rn)||fi.tagName.getText(Ae)!==Gi.tagName.getText(Ae)?void 0:{ranges:[{start:fn,length:kn-fn},{start:or,length:rn-or}],wordPattern:Qt}}}function ji(de,tt){return{lineStarts:de.getLineStarts(),firstLine:de.getLineAndCharacterOfPosition(tt.pos).line,lastLine:de.getLineAndCharacterOfPosition(tt.end).line}}function fl(de,tt,Ae){const Ke=p.getCurrentSourceFile(de),Qt=[],{lineStarts:ni,firstLine:fi,lastLine:Gi}=ji(Ke,tt);let fn=Ae||!1,kn=Number.MAX_VALUE;const or=new Map,rn=new RegExp(/\S/),_r=jQ(Ke,ni[fi]),Fs=_r?"{/*":"//";for(let to=fi;to<=Gi;to++){const Ar=Ke.text.substring(ni[to],Ke.getLineEndOfPosition(ni[to])),is=rn.exec(Ar);is&&(kn=Math.min(kn,is.index),or.set(to.toString(),is.index),Ar.substr(is.index,Fs.length)!==Fs&&(fn=Ae===void 0||Ae))}for(let to=fi;to<=Gi;to++){if(fi!==Gi&&ni[to]===tt.end)continue;const Ar=or.get(to.toString());Ar!==void 0&&(_r?Qt.push(...St(de,{pos:ni[to]+kn,end:Ke.getLineEndOfPosition(ni[to])},fn,_r)):fn?Qt.push({newText:Fs,span:{length:0,start:ni[to]+kn}}):Ke.text.substr(ni[to]+Ar,Fs.length)===Fs&&Qt.push({newText:"",span:{length:Fs.length,start:ni[to]+Ar}}))}return Qt}function St(de,tt,Ae,Ke){var Qt;const ni=p.getCurrentSourceFile(de),fi=[],{text:Gi}=ni;let fn=!1,kn=Ae||!1;const or=[];let{pos:rn}=tt;const _r=Ke!==void 0?Ke:jQ(ni,rn),Fs=_r?"{/*":"/*",to=_r?"*/}":"*/",Ar=_r?"\\{\\/\\*":"\\/\\*",is=_r?"\\*\\/\\}":"\\*\\/";for(;rn<=tt.end;){const $i=Gi.substr(rn,Fs.length)===Fs?Fs.length:0,Tn=bS(ni,rn+$i);if(Tn)_r&&(Tn.pos--,Tn.end++),or.push(Tn.pos),Tn.kind===3&&or.push(Tn.end),fn=!0,rn=Tn.end+1;else{const ki=Gi.substring(rn,tt.end).search(`(${Ar})|(${is})`);kn=Ae!==void 0?Ae:kn||!jNe(Gi,rn,ki===-1?tt.end:rn+ki),rn=ki===-1?tt.end+1:rn+ki+to.length}}if(kn||!fn){((Qt=bS(ni,tt.pos))==null?void 0:Qt.kind)!==2&&Ei(or,tt.pos,hc),Ei(or,tt.end,hc);const $i=or[0];Gi.substr($i,Fs.length)!==Fs&&fi.push({newText:Fs,span:{length:0,start:$i}});for(let Tn=1;Tn0?$i-to.length:0,ki=Gi.substr(Tn,to.length)===to?to.length:0;fi.push({newText:"",span:{length:Fs.length,start:$i-ki}})}return fi}function Ot(de,tt){const Ae=p.getCurrentSourceFile(de),{firstLine:Ke,lastLine:Qt}=ji(Ae,tt);return Ke===Qt&&tt.pos!==tt.end?St(de,tt,!0):fl(de,tt,!0)}function xe(de,tt){const Ae=p.getCurrentSourceFile(de),Ke=[],{pos:Qt}=tt;let{end:ni}=tt;Qt===ni&&(ni+=jQ(Ae,Qt)?2:1);for(let fi=Qt;fi<=ni;fi++){const Gi=bS(Ae,fi);if(Gi){switch(Gi.kind){case 2:Ke.push(...fl(de,{end:Gi.end,pos:Gi.pos+1},!1));break;case 3:Ke.push(...St(de,{end:Gi.end,pos:Gi.pos+1},!1))}fi=Gi.end+1}}return Ke}function Pt({openingElement:de,closingElement:tt,parent:Ae}){return!Qk(de.tagName,tt.tagName)||tb(Ae)&&Qk(de.tagName,Ae.openingElement.tagName)&&Pt(Ae)}function Re({closingFragment:de,parent:tt}){return!!(de.flags&262144)||XT(tt)&&Re(tt)}function mt(de,tt,Ae){const Ke=p.getCurrentSourceFile(de),Qt=gd.getRangeOfEnclosingComment(Ke,tt);return Qt&&(!Ae||Qt.kind===3)?cx(Qt):void 0}function Je(de,tt){q();const Ae=U(de);T.throwIfCancellationRequested();const Ke=Ae.text,Qt=[];if(tt.length>0&&!fn(Ae.fileName)){const kn=fi();let or;for(;or=kn.exec(Ke);){T.throwIfCancellationRequested();const rn=3;z.assert(or.length===tt.length+rn);const _r=or[1],Fs=or.index+_r.length;if(!bS(Ae,Fs))continue;let to;for(let is=0;is"("+ni(Tn.text)+")").join("|")+")",to=/(?:$|\*\/)/.source,Ar=/(?:.*?)/.source,is="("+Fs+Ar+")",$i=_r+is+to;return new RegExp($i,"gim")}function Gi(kn){return kn>=97&&kn<=122||kn>=65&&kn<=90||kn>=48&&kn<=57}function fn(kn){return kn.includes("/node_modules/")}}function pt(de,tt,Ae){return q(),sZ.getRenameInfo(m,U(de),tt,Ae||{})}function kt(de,tt,Ae,Ke,Qt,ni){const[fi,Gi]=typeof tt=="number"?[tt,void 0]:[tt.pos,tt.end];return{file:de,startPosition:fi,endPosition:Gi,program:re(),host:t,formatContext:gd.getFormatContext(Ke,t),cancellationToken:T,preferences:Ae,triggerReason:Qt,kind:ni}}function Ci(de,tt,Ae){return{file:de,program:re(),host:t,span:tt,preferences:Ae,cancellationToken:T}}function $e(de,tt){return whe.getSmartSelectionRange(tt,p.getCurrentSourceFile(de))}function qt(de,tt,Ae=Fm,Ke,Qt,ni){q();const fi=U(de);return ZP.getApplicableRefactors(kt(fi,tt,Ae,Fm,Ke,Qt),ni)}function $t(de,tt,Ae=Fm){q();const Ke=U(de),Qt=z.checkDefined(m.getSourceFiles()),ni=X8(de),fi=PH(kt(Ke,tt,Ae,Fm)),Gi=dPe(fi==null?void 0:fi.all),fn=ns(Qt,kn=>{const or=X8(kn.fileName);return!(m!=null&&m.isSourceFileFromExternalLibrary(Ke))&&!(Ke===U(kn.fileName)||ni===".ts"&&or===".d.ts"||ni===".d.ts"&&ro(fd(kn.fileName),"lib.")&&or===".d.ts")&&(ni===or||(ni===".tsx"&&or===".ts"||ni===".jsx"&&or===".js")&&!Gi)?kn.fileName:void 0});return{newFileName:uPe(Ke,m,t,fi),files:fn}}function ii(de,tt,Ae,Ke,Qt,ni=Fm,fi){q();const Gi=U(de);return ZP.getEditsForRefactor(kt(Gi,Ae,ni,tt),Ke,Qt,fi)}function Gt(de,tt){return tt===0?{line:0,character:0}:j.toLineColumnOffset(de,tt)}function wi(de,tt){q();const Ae=YP.resolveCallHierarchyDeclaration(m,j_(U(de),tt));return Ae&&Pde(Ae,Ke=>YP.createCallHierarchyItem(m,Ke))}function ce(de,tt){q();const Ae=U(de),Ke=Ade(YP.resolveCallHierarchyDeclaration(m,tt===0?Ae:j_(Ae,tt)));return Ke?YP.getIncomingCalls(m,Ke,T):[]}function ut(de,tt){q();const Ae=U(de),Ke=Ade(YP.resolveCallHierarchyDeclaration(m,tt===0?Ae:j_(Ae,tt)));return Ke?YP.getOutgoingCalls(m,Ke):[]}function Bt(de,tt,Ae=Fm){q();const Ke=U(de);return ghe.provideInlayHints(Ci(Ke,tt,Ae))}function le(de,tt,Ae,Ke,Qt){return mhe.mapCode(p.getCurrentSourceFile(de),tt,Ae,t,gd.getFormatContext(Ke,t),Qt)}const je={dispose:Se,cleanupSemanticCache:te,getSyntacticDiagnostics:oe,getSemanticDiagnostics:pe,getSuggestionDiagnostics:ye,getCompilerOptionsDiagnostics:be,getSyntacticClassifications:Ai,getSemanticClassifications:bn,getEncodedSyntacticClassifications:Rn,getEncodedSemanticClassifications:Mi,getCompletionsAtPosition:_e,getCompletionEntryDetails:ve,getCompletionEntrySymbol:Ee,getSignatureHelpItems:Et,getQuickInfoAtPosition:ke,getDefinitionAtPosition:Ie,getDefinitionAndBoundSpan:Le,getImplementationAtPosition:He,getTypeDefinitionAtPosition:et,getReferencesAtPosition:Ye,findReferences:nt,getFileReferences:ze,getDocumentHighlights:We,getNameOrDottedNameSpan:Ht,getBreakpointStatementAtPosition:Oi,getNavigateToItems:st,getRenameInfo:pt,getSmartSelectionRange:$e,findRenameLocations:Ue,getNavigationBarItems:Ji,getNavigationTree:Ui,getOutliningSpans:bs,getTodoComments:Je,getBraceMatchingAtPosition:Hs,getIndentationAtPosition:Wo,getFormattingEditsForRange:ts,getFormattingEditsForDocument:Fo,getFormattingEditsAfterKeystroke:Cn,getDocCommentTemplateAtPosition:fs,isValidBraceCompletionAtPosition:Ds,getJsxClosingTagAtPosition:ha,getLinkedEditingRangeAtPosition:Yo,getSpanOfEnclosingComment:mt,getCodeFixesAtPosition:Ko,getCombinedCodeFix:ot,applyCodeActionCommand:lr,organizeImports:hi,getEditsForFileRename:hn,getEmitOutput:xt,getNonBoundSourceFile:ft,getProgram:re,getCurrentProgram:()=>m,getAutoImportProvider:Y,updateIsDefinitionOfReferencedSymbols:ue,getApplicableRefactors:qt,getEditsForRefactor:ii,getMoveToRefactoringFileSuggestions:$t,toLineColumnOffset:Gt,getSourceMapper:()=>j,clearSourceMapperCache:()=>j.clearCache(),prepareCallHierarchy:wi,provideCallHierarchyIncomingCalls:ce,provideCallHierarchyOutgoingCalls:ut,toggleLineComment:fl,toggleMultilineComment:St,commentSelection:Ot,uncommentSelection:xe,provideInlayHints:Bt,getSupportedCodeFixes:Sfe,getPasteEdits:Fe,mapCode:le};switch(h){case 0:break;case 1:xet.forEach(de=>je[de]=()=>{throw new Error(`LanguageService Operation: ${de} not allowed in LanguageServiceMode.PartialSemantic`)});break;case 2:fRt.forEach(de=>je[de]=()=>{throw new Error(`LanguageService Operation: ${de} not allowed in LanguageServiceMode.Syntactic`)});break;default:z.assertNever(h)}return je}function xfe(t){return t.nameTable||hRt(t),t.nameTable}function hRt(t){const r=t.nameTable=new Map;t.forEachChild(function a(u){if(lt(u)&&!Wue(u)&&u.escapedText||ug(u)&&_Rt(u)){const h=L8(u);r.set(h,r.get(h)===void 0?u.pos:-1)}else if(Vs(u)){const h=u.escapedText;r.set(h,r.get(h)===void 0?u.pos:-1)}if(jo(u,a),Jp(u))for(const h of u.jsDoc)jo(h,a)})}function _Rt(t){return F1(t)||t.parent.kind===283||mRt(t)||EW(t)}function RH(t){const r=pRt(t);return r&&(Pa(r.parent)||ZT(r.parent))?r:void 0}function pRt(t){switch(t.kind){case 11:case 15:case 9:if(t.parent.kind===167)return kse(t.parent.parent)?t.parent.parent:void 0;case 80:return kse(t.parent)&&(t.parent.parent.kind===210||t.parent.parent.kind===292)&&t.parent.name===t?t.parent:void 0}}function gRt(t,r){const a=RH(t);if(a){const u=r.getContextualType(a.parent),h=u&&FX(a,r,u,!1);if(h&&h.length===1)return ma(h)}return r.getSymbolAtLocation(t)}function FX(t,r,a,u){const h=gH(t.name);if(!h)return x;if(!a.isUnion()){const C=a.getProperty(h);return C?[C]:x}const p=Pa(t.parent)||ZT(t.parent)?Ri(a.types,C=>!r.isTypeInvalidDueToUnionDiscriminant(C,t.parent)):a.types,m=ns(p,C=>C.getProperty(h));if(u&&(m.length===0||m.length===a.types.length)){const C=a.getProperty(h);if(C)return[C]}return!p.length&&!m.length?ns(a.types,C=>C.getProperty(h)):jt(m,XC)}function mRt(t){return t&&t.parent&&t.parent.kind===212&&t.parent.argumentExpression===t}function KPe(t){if(Wd)return Hr(rs(ra(Wd.getExecutingFilePath())),EB(t));throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ")}dke(lRt());function ket(t,r,a){const u=[];a=Yde(a,u);const h=Lo(t)?t:[t],p=zV(void 0,void 0,G,a,h,r,!0);return p.diagnostics=no(p.diagnostics,u),p}var kfe={};l(kfe,{spanInSourceFileAtLocation:()=>vRt});function vRt(t,r){if(t.isDeclarationFile)return;let a=Rs(t,r);const u=t.getLineAndCharacterOfPosition(r).line;if(t.getLineAndCharacterOfPosition(a.getStart(t)).line>u){const N=Dd(a.pos,t);if(!N||t.getLineAndCharacterOfPosition(N.getEnd()).line!==u)return;a=N}if(a.flags&33554432)return;return E(a);function h(N,R){const F=eD(N)?vt(N.modifiers,jd):void 0,j=F?qa(t.text,F.end):N.getStart(t);return sd(j,(R||N).getEnd())}function p(N,R){return h(N,aD(R,R.parent,t))}function m(N,R){return N&&u===t.getLineAndCharacterOfPosition(N.getStart(t)).line?E(N):E(R)}function C(N,R,F){if(N){const j=N.indexOf(R);if(j>=0){let U=j,q=j+1;for(;U>0&&F(N[U-1]);)U--;for(;q0)return E(Ie.declarations[0])}else return E(fe.initializer)}function te(fe){if(fe.initializer)return ue(fe);if(fe.condition)return h(fe.condition);if(fe.incrementor)return h(fe.incrementor)}function Se(fe){const Ie=W(fe.elements,Le=>Le.kind!==232?Le:void 0);return Ie?E(Ie):fe.parent.kind===208?h(fe.parent):R(fe.parent)}function oe(fe){z.assert(fe.kind!==207&&fe.kind!==206);const Ie=fe.kind===209?fe.elements:fe.properties,Le=W(Ie,et=>et.kind!==232?et:void 0);return Le?E(Le):h(fe.parent.kind===226?fe.parent:fe)}function pe(fe){switch(fe.parent.kind){case 266:const Ie=fe.parent;return m(Dd(fe.pos,t,fe.parent),Ie.members.length?Ie.members[0]:Ie.getLastToken(t));case 263:const Le=fe.parent;return m(Dd(fe.pos,t,fe.parent),Le.members.length?Le.members[0]:Le.getLastToken(t));case 269:return m(fe.parent.parent,fe.parent.clauses[0])}return E(fe.parent)}function ye(fe){switch(fe.parent.kind){case 268:if(Yb(fe.parent.parent)!==1)return;case 266:case 263:return h(fe);case 241:if(IT(fe.parent))return h(fe);case 299:return E(Ql(fe.parent.statements));case 269:const Ie=fe.parent,Le=Ql(Ie.clauses);return Le?E(Ql(Le.statements)):void 0;case 206:const et=fe.parent;return E(Ql(et.elements)||et);default:if(CS(fe.parent)){const He=fe.parent;return h(Ql(He.properties)||He)}return E(fe.parent)}}function be(fe){switch(fe.parent.kind){case 207:const Ie=fe.parent;return h(Ql(Ie.elements)||Ie);default:if(CS(fe.parent)){const Le=fe.parent;return h(Ql(Le.elements)||Le)}return E(fe.parent)}}function _e(fe){return fe.parent.kind===246||fe.parent.kind===213||fe.parent.kind===214?b(fe):fe.parent.kind===217?T(fe):E(fe.parent)}function ve(fe){switch(fe.parent.kind){case 218:case 262:case 219:case 174:case 173:case 177:case 178:case 176:case 247:case 246:case 248:case 250:case 213:case 214:case 217:return b(fe);default:return E(fe.parent)}}function Ee(fe){return Bo(fe.parent)||fe.parent.kind===303||fe.parent.kind===169?b(fe):E(fe.parent)}function ke(fe){return fe.parent.kind===216?T(fe):E(fe.parent)}function Fe(fe){return fe.parent.kind===246?p(fe,fe.parent.expression):E(fe.parent)}function Oe(fe){return fe.parent.kind===250?T(fe):E(fe.parent)}}}var YP={};l(YP,{createCallHierarchyItem:()=>QPe,getIncomingCalls:()=>TRt,getOutgoingCalls:()=>RRt,resolveCallHierarchyDeclaration:()=>Aet});function yRt(t){return(gc(t)||wd(t))&&Af(t)}function Tet(t){return To(t)||ds(t)}function FH(t){return(gc(t)||Dc(t)||wd(t))&&Tet(t.parent)&&t===t.parent.initializer&<(t.parent.name)&&(!!(Rb(t.parent)&2)||To(t.parent))}function Det(t){return Ns(t)||qu(t)||Uu(t)||gc(t)||xd(t)||wd(t)||bu(t)||Au(t)||Hv(t)||hg(t)||Np(t)}function q3(t){return Ns(t)||qu(t)&<(t.name)||Uu(t)||xd(t)||bu(t)||Au(t)||Hv(t)||hg(t)||Np(t)||yRt(t)||FH(t)}function Eet(t){return Ns(t)?t:Af(t)?t.name:FH(t)?t.parent.name:z.checkDefined(t.modifiers&&Me(t.modifiers,Iet))}function Iet(t){return t.kind===90}function Net(t,r){const a=Eet(r);return a&&t.getSymbolAtLocation(a)}function bRt(t,r){if(Ns(r))return{text:r.fileName,pos:0,end:0};if((Uu(r)||xd(r))&&!Af(r)){const h=r.modifiers&&Me(r.modifiers,Iet);if(h)return{text:"default",pos:h.getStart(),end:h.getEnd()}}if(bu(r)){const h=r.getSourceFile(),p=qa(h.text,Fv(r).pos),m=p+6,C=t.getTypeChecker(),b=C.getSymbolAtLocation(r.parent);return{text:`${b?`${C.symbolToString(b,r.parent)} `:""}static {}`,pos:p,end:m}}const a=FH(r)?r.parent.name:z.checkDefined(ko(r),"Expected call hierarchy item to have a name");let u=lt(a)?dr(a):ug(a)?a.text:Ja(a)&&ug(a.expression)?a.expression.text:void 0;if(u===void 0){const h=t.getTypeChecker(),p=h.getSymbolAtLocation(a);p&&(u=h.symbolToString(p,r))}if(u===void 0){const h=QK();u=_8(p=>h.writeNode(4,r,r.getSourceFile(),p))}return{text:u,pos:a.getStart(),end:a.getEnd()}}function CRt(t){var r,a,u,h;if(FH(t))return To(t.parent)&&ss(t.parent.parent)?wd(t.parent.parent)?(r=L$(t.parent.parent))==null?void 0:r.getText():(a=t.parent.parent.name)==null?void 0:a.getText():jv(t.parent.parent.parent.parent)&<(t.parent.parent.parent.parent.parent.name)?t.parent.parent.parent.parent.parent.name.getText():void 0;switch(t.kind){case 177:case 178:case 174:return t.parent.kind===210?(u=L$(t.parent))==null?void 0:u.getText():(h=ko(t.parent))==null?void 0:h.getText();case 262:case 263:case 267:if(jv(t.parent)&<(t.parent.parent.name))return t.parent.parent.name.getText()}}function Let(t,r){if(r.body)return r;if(fu(r))return Gy(r.parent);if(Uu(r)||Au(r)){const a=Net(t,r);return a&&a.valueDeclaration&&rc(a.valueDeclaration)&&a.valueDeclaration.body?a.valueDeclaration:void 0}return r}function Pet(t,r){const a=Net(t,r);let u;if(a&&a.declarations){const h=mr(a.declarations),p=Yt(a.declarations,b=>({file:b.getSourceFile().fileName,pos:b.pos}));h.sort((b,T)=>Xf(p[b].file,p[T].file)||p[b].pos-p[T].pos);const m=Yt(h,b=>a.declarations[b]);let C;for(const b of m)q3(b)&&((!C||C.parent!==b.parent||C.end!==b.pos)&&(u=xi(u,b)),C=b)}return u}function Tfe(t,r){return bu(r)?r:rc(r)?Let(t,r)??Pet(t,r)??r:Pet(t,r)??r}function Aet(t,r){const a=t.getTypeChecker();let u=!1;for(;;){if(q3(r))return Tfe(a,r);if(Det(r)){const h=Xi(r,q3);return h&&Tfe(a,h)}if(F1(r)){if(q3(r.parent))return Tfe(a,r.parent);if(Det(r.parent)){const h=Xi(r.parent,q3);return h&&Tfe(a,h)}return Tet(r.parent)&&r.parent.initializer&&FH(r.parent.initializer)?r.parent.initializer:void 0}if(fu(r))return q3(r.parent)?r.parent:void 0;if(r.kind===126&&bu(r.parent)){r=r.parent;continue}if(ds(r)&&r.initializer&&FH(r.initializer))return r.initializer;if(!u){let h=a.getSymbolAtLocation(r);if(h&&(h.flags&2097152&&(h=a.getAliasedSymbol(h)),h.valueDeclaration)){u=!0,r=h.valueDeclaration;continue}}return}}function QPe(t,r){const a=r.getSourceFile(),u=bRt(t,r),h=CRt(r),p=oD(r),m=rF(r),C=sd(qa(a.text,r.getFullStart(),!1,!0),r.getEnd()),b=sd(u.pos,u.end);return{file:a.fileName,kind:p,kindModifiers:m,name:u.text,containerName:h,span:C,selectionSpan:b}}function SRt(t){return t!==void 0}function wRt(t){if(t.kind===xc.EntryKind.Node){const{node:r}=t;if(Mue(r,!0,!0)||yNe(r,!0,!0)||bNe(r,!0,!0)||CNe(r,!0,!0)||P3(r)||Vue(r)){const a=r.getSourceFile();return{declaration:Xi(r,q3)||a,range:tde(r,a)}}}}function Oet(t){return Tl(t.declaration)}function xRt(t,r){return{from:t,fromSpans:r}}function kRt(t,r){return xRt(QPe(t,r[0].declaration),Yt(r,a=>cx(a.range)))}function TRt(t,r,a){if(Ns(r)||qu(r)||bu(r))return[];const u=Eet(r),h=Ri(xc.findReferenceOrRenameEntries(t,a,t.getSourceFiles(),u,0,{use:xc.FindReferencesUse.References},wRt),SRt);return h?xv(h,Oet,p=>kRt(t,p)):[]}function DRt(t,r){function a(h){const p=KT(h)?h.tag:eh(h)?h.tagName:Sc(h)||bu(h)?h:h.expression,m=Aet(t,p);if(m){const C=tde(p,h.getSourceFile());if(Lo(m))for(const b of m)r.push({declaration:b,range:C});else r.push({declaration:m,range:C})}}function u(h){if(h&&!(h.flags&33554432)){if(q3(h)){if(ss(h))for(const p of h.members)p.name&&Ja(p.name)&&u(p.name.expression);return}switch(h.kind){case 80:case 271:case 272:case 278:case 264:case 265:return;case 175:a(h);return;case 216:case 234:u(h.expression);return;case 260:case 169:u(h.name),u(h.initializer);return;case 213:a(h),u(h.expression),W(h.arguments,u);return;case 214:a(h),u(h.expression),W(h.arguments,u);return;case 215:a(h),u(h.tag),u(h.template);return;case 286:case 285:a(h),u(h.tagName),u(h.attributes);return;case 170:a(h),u(h.expression);return;case 211:case 212:a(h),jo(h,u);break;case 238:u(h.expression);return}Lv(h)||jo(h,u)}}return u}function ERt(t,r){W(t.statements,r)}function IRt(t,r){!Kr(t,128)&&t.body&&jv(t.body)&&W(t.body.statements,r)}function NRt(t,r,a){const u=Let(t,r);u&&(W(u.parameters,a),a(u.body))}function LRt(t,r){r(t.body)}function PRt(t,r){W(t.modifiers,r);const a=MT(t);a&&r(a.expression);for(const u of t.members)_0(u)&&W(u.modifiers,r),To(u)?r(u.initializer):fu(u)&&u.body?(W(u.parameters,r),r(u.body)):bu(u)&&r(u)}function ARt(t,r){const a=[],u=DRt(t,a);switch(r.kind){case 307:ERt(r,u);break;case 267:IRt(r,u);break;case 262:case 218:case 219:case 174:case 177:case 178:NRt(t.getTypeChecker(),r,u);break;case 263:case 231:PRt(r,u);break;case 175:LRt(r,u);break;default:z.assertNever(r)}return a}function ORt(t,r){return{to:t,fromSpans:r}}function MRt(t,r){return ORt(QPe(t,r[0].declaration),Yt(r,a=>cx(a.range)))}function RRt(t,r){return r.flags&33554432||Hv(r)?[]:xv(ARt(t,r),Oet,a=>MRt(t,a))}var XPe={};l(XPe,{v2020:()=>Met});var Met={};l(Met,{TokenEncodingConsts:()=>oet,TokenModifier:()=>cet,TokenType:()=>aet,getEncodedSemanticClassifications:()=>UPe,getSemanticClassifications:()=>uet});var Ch={};l(Ch,{PreserveOptionalFlags:()=>Urt,addNewNodeForMemberSymbol:()=>qrt,codeFixAll:()=>jl,createCodeFixAction:()=>oa,createCodeFixActionMaybeFixAll:()=>eAe,createCodeFixActionWithoutFixAll:()=>Y0,createCombinedCodeActions:()=>eA,createFileTextChanges:()=>Ret,createImportAdder:()=>_D,createImportSpecifierResolver:()=>q8t,createJsonPropertyAssignment:()=>ehe,createMissingMemberNodes:()=>v4e,createSignatureDeclarationFromCallExpression:()=>y4e,createSignatureDeclarationFromSignature:()=>Yfe,createStubbedBody:()=>qX,eachDiagnostic:()=>tA,findAncestorMatchingSpan:()=>k4e,findJsonProperty:()=>x4e,generateAccessorFromProperty:()=>Xrt,getAccessorConvertiblePropertyAtPosition:()=>est,getAllFixes:()=>VRt,getAllSupers:()=>T4e,getArgumentTypesAndTypeParameters:()=>Grt,getFixes:()=>WRt,getImportCompletionAction:()=>$8t,getImportKind:()=>Bfe,getJSDocTypedefNodes:()=>z8t,getNoopSymbolTrackerWithResolver:()=>J3,getPromoteTypeOnlyCompletionAction:()=>J8t,getSupportedErrorCodes:()=>FRt,importFixName:()=>iit,importSymbols:()=>rA,parameterShouldGetTypeFromJSDoc:()=>dtt,registerCodeFix:()=>Ea,setJsonCompilerOptionValue:()=>w4e,setJsonCompilerOptionValues:()=>S4e,tryGetAutoImportableReferenceFromTypeNode:()=>PI,typeToAutoImportableTypeNode:()=>UX});var ZPe=Ug(),YPe=new Map;function Y0(t,r,a){return tAe(t,cD(a),r,void 0,void 0)}function oa(t,r,a,u,h,p){return tAe(t,cD(a),r,u,cD(h),p)}function eAe(t,r,a,u,h,p){return tAe(t,cD(a),r,u,h&&cD(h),p)}function tAe(t,r,a,u,h,p){return{fixName:t,description:r,changes:a,fixId:u,fixAllDescription:h,commands:p?[p]:void 0}}function Ea(t){for(const r of t.errorCodes)iAe=void 0,ZPe.add(String(r),t);if(t.fixIds)for(const r of t.fixIds)z.assert(!YPe.has(r)),YPe.set(r,t)}var iAe;function FRt(){return iAe??(iAe=Fn(ZPe.keys()))}function BRt(t,r){const{errorCodes:a}=t;let u=0;for(const p of r)if(Mt(a,p.code)&&u++,u>1)break;const h=u<2;return({fixId:p,fixAllDescription:m,...C})=>h?C:{...C,fixId:p,fixAllDescription:m}}function WRt(t){const r=Fet(t),a=ZPe.get(String(t.errorCode));return Ln(a,u=>Yt(u.getCodeActions(t),BRt(u,r)))}function VRt(t){return YPe.get(ua(t.fixId,mo)).getAllCodeActions(t)}function eA(t,r){return{changes:t,commands:r}}function Ret(t,r){return{fileName:t,textChanges:r}}function jl(t,r,a){const u=[],h=er.ChangeTracker.with(t,p=>tA(t,r,m=>a(p,m,u)));return eA(h,u.length===0?void 0:u)}function tA(t,r,a){for(const u of Fet(t))Mt(r,u.code)&&a(u)}function Fet({program:t,sourceFile:r,cancellationToken:a}){const u=[...t.getSemanticDiagnostics(r,a),...t.getSyntacticDiagnostics(r,a),...Kde(r,t,a)];return fg(t.getCompilerOptions())&&u.push(...t.getDeclarationDiagnostics(r,a)),u}var nAe="addConvertToUnknownForNonOverlappingTypes",Bet=[k.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first.code];Ea({errorCodes:Bet,getCodeActions:function(r){const a=Vet(r.sourceFile,r.span.start);if(a===void 0)return;const u=er.ChangeTracker.with(r,h=>Wet(h,r.sourceFile,a));return[oa(nAe,u,k.Add_unknown_conversion_for_non_overlapping_types,nAe,k.Add_unknown_to_all_conversions_of_non_overlapping_types)]},fixIds:[nAe],getAllCodeActions:t=>jl(t,Bet,(r,a)=>{const u=Vet(a.file,a.start);u&&Wet(r,a.file,u)})});function Wet(t,r,a){const u=_7(a)?G.createAsExpression(a.expression,G.createKeywordTypeNode(159)):G.createTypeAssertion(G.createKeywordTypeNode(159),a.expression);t.replaceNode(r,a.expression,u)}function Vet(t,r){if(!Xn(t))return Xi(Rs(t,r),a=>_7(a)||Lae(a))}Ea({errorCodes:[k.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code,k.await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code,k.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code],getCodeActions:function(r){const{sourceFile:a}=r,u=er.ChangeTracker.with(r,h=>{const p=G.createExportDeclaration(void 0,!1,G.createNamedExports([]),void 0);h.insertNodeAtEndOfScope(a,a,p)});return[Y0("addEmptyExportDeclaration",u,k.Add_export_to_make_this_file_into_a_module)]}});var rAe="addMissingAsync",Het=[k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,k.Type_0_is_not_assignable_to_type_1.code,k.Type_0_is_not_comparable_to_type_1.code];Ea({fixIds:[rAe],errorCodes:Het,getCodeActions:function(r){const{sourceFile:a,errorCode:u,cancellationToken:h,program:p,span:m}=r,C=Me(p.getTypeChecker().getDiagnostics(a,h),jRt(m,u)),b=C&&C.relatedInformation&&Me(C.relatedInformation,N=>N.code===k.Did_you_mean_to_mark_this_function_as_async.code),T=zet(a,b);return T?[jet(r,T,N=>er.ChangeTracker.with(r,N))]:void 0},getAllCodeActions:t=>{const{sourceFile:r}=t,a=new Set;return jl(t,Het,(u,h)=>{const p=h.relatedInformation&&Me(h.relatedInformation,b=>b.code===k.Did_you_mean_to_mark_this_function_as_async.code),m=zet(r,p);return m?jet(t,m,b=>(b(u),[]),a):void 0})}});function jet(t,r,a,u){const h=a(p=>HRt(p,t.sourceFile,r,u));return oa(rAe,h,k.Add_async_modifier_to_containing_function,rAe,k.Add_all_missing_async_modifiers)}function HRt(t,r,a,u){if(u&&u.has(Tl(a)))return;u==null||u.add(Tl(a));const h=G.replaceModifiers(Pl(a,!0),G.createNodeArray(G.createModifiersFromModifierFlags(uS(a)|1024)));t.replaceNode(r,a,h)}function zet(t,r){if(!r)return;const a=Rs(t,r.start);return Xi(a,h=>h.getStart(t)zu(r)?"quit":(Dc(h)||Au(h)||gc(h)||Uu(h))&&F3(r,b_(h,t)))}function jRt(t,r){return({start:a,length:u,relatedInformation:h,code:p})=>Aw(a)&&Aw(u)&&F3({start:a,length:u},t)&&p===r&&!!h&&Rt(h,m=>m.code===k.Did_you_mean_to_mark_this_function_as_async.code)}var sAe="addMissingAwait",Uet=k.Property_0_does_not_exist_on_type_1.code,qet=[k.This_expression_is_not_callable.code,k.This_expression_is_not_constructable.code],oAe=[k.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type.code,k.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code,k.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code,k.Operator_0_cannot_be_applied_to_type_1.code,k.Operator_0_cannot_be_applied_to_types_1_and_2.code,k.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap.code,k.This_condition_will_always_return_true_since_this_0_is_always_defined.code,k.Type_0_is_not_an_array_type.code,k.Type_0_is_not_an_array_type_or_a_string_type.code,k.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher.code,k.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code,k.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code,k.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator.code,k.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator.code,k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,Uet,...qet];Ea({fixIds:[sAe],errorCodes:oAe,getCodeActions:function(r){const{sourceFile:a,errorCode:u,span:h,cancellationToken:p,program:m}=r,C=$et(a,u,h,p,m);if(!C)return;const b=r.program.getTypeChecker(),T=E=>er.ChangeTracker.with(r,E);return Mo([Jet(r,C,u,b,T),Get(r,C,u,b,T)])},getAllCodeActions:t=>{const{sourceFile:r,program:a,cancellationToken:u}=t,h=t.program.getTypeChecker(),p=new Set;return jl(t,oAe,(m,C)=>{const b=$et(r,C.code,C,u,a);if(!b)return;const T=E=>(E(m),[]);return Jet(t,b,C.code,h,T,p)||Get(t,b,C.code,h,T,p)})}});function $et(t,r,a,u,h){const p=Lde(t,a);return p&&zRt(t,r,a,u,h)&&Ket(p)?p:void 0}function Jet(t,r,a,u,h,p){const{sourceFile:m,program:C,cancellationToken:b}=t,T=URt(r,m,b,C,u);if(T){const E=h(N=>{W(T.initializers,({expression:R})=>aAe(N,a,m,u,R,p)),p&&T.needsSecondPassForFixAll&&aAe(N,a,m,u,r,p)});return Y0("addMissingAwaitToInitializer",E,T.initializers.length===1?[k.Add_await_to_initializer_for_0,T.initializers[0].declarationSymbol.name]:k.Add_await_to_initializers)}}function Get(t,r,a,u,h,p){const m=h(C=>aAe(C,a,t.sourceFile,u,r,p));return oa(sAe,m,k.Add_await,sAe,k.Fix_all_expressions_possibly_missing_await)}function zRt(t,r,a,u,h){const m=h.getTypeChecker().getDiagnostics(t,u);return Rt(m,({start:C,length:b,relatedInformation:T,code:E})=>Aw(C)&&Aw(b)&&F3({start:C,length:b},a)&&E===r&&!!T&&Rt(T,N=>N.code===k.Did_you_forget_to_use_await.code))}function URt(t,r,a,u,h){const p=qRt(t,h);if(!p)return;let m=p.isCompleteFix,C;for(const b of p.identifiers){const T=h.getSymbolAtLocation(b);if(!T)continue;const E=$r(T.valueDeclaration,ds),N=E&&$r(E.name,lt),R=Rk(E,243);if(!E||!R||E.type||!E.initializer||R.getSourceFile()!==r||Kr(R,32)||!N||!Ket(E.initializer)){m=!1;continue}const F=u.getSemanticDiagnostics(r,a);if(xc.Core.eachSymbolReferenceInFile(N,h,r,U=>b!==U&&!$Rt(U,F,r,h))){m=!1;continue}(C||(C=[])).push({expression:E.initializer,declarationSymbol:T})}return C&&{initializers:C,needsSecondPassForFixAll:!m}}function qRt(t,r){if(Ir(t.parent)&<(t.parent.expression))return{identifiers:[t.parent.expression],isCompleteFix:!0};if(lt(t))return{identifiers:[t],isCompleteFix:!0};if(cr(t)){let a,u=!0;for(const h of[t.left,t.right]){const p=r.getTypeAtLocation(h);if(r.getPromisedTypeOfPromise(p)){if(!lt(h)){u=!1;continue}(a||(a=[])).push(h)}}return a&&{identifiers:a,isCompleteFix:u}}}function $Rt(t,r,a,u){const h=Ir(t.parent)?t.parent.name:cr(t.parent)?t.parent:t,p=Me(r,m=>m.start===h.getStart(a)&&m.start+m.length===h.getEnd());return p&&Mt(oAe,p.code)||u.getTypeAtLocation(h).flags&1}function Ket(t){return t.flags&65536||!!Xi(t,r=>r.parent&&Dc(r.parent)&&r.parent.body===r||Ho(r)&&(r.parent.kind===262||r.parent.kind===218||r.parent.kind===219||r.parent.kind===174))}function aAe(t,r,a,u,h,p){if(hV(h.parent)&&!h.parent.awaitModifier){const m=u.getTypeAtLocation(h),C=u.getAsyncIterableType();if(C&&u.isTypeAssignableTo(m,C)){const b=h.parent;t.replaceNode(a,b,G.updateForOfStatement(b,G.createToken(135),b.initializer,b.expression,b.statement));return}}if(cr(h))for(const m of[h.left,h.right]){if(p&<(m)){const T=u.getSymbolAtLocation(m);if(T&&p.has(Aa(T)))continue}const C=u.getTypeAtLocation(m),b=u.getPromisedTypeOfPromise(C)?G.createAwaitExpression(m):m;t.replaceNode(a,m,b)}else if(r===Uet&&Ir(h.parent)){if(p&<(h.parent.expression)){const m=u.getSymbolAtLocation(h.parent.expression);if(m&&p.has(Aa(m)))return}t.replaceNode(a,h.parent.expression,G.createParenthesizedExpression(G.createAwaitExpression(h.parent.expression))),Qet(t,h.parent.expression,a)}else if(Mt(qet,r)&&Dv(h.parent)){if(p&<(h)){const m=u.getSymbolAtLocation(h);if(m&&p.has(Aa(m)))return}t.replaceNode(a,h,G.createParenthesizedExpression(G.createAwaitExpression(h))),Qet(t,h,a)}else{if(p&&ds(h.parent)&<(h.parent.name)){const m=u.getSymbolAtLocation(h.parent.name);if(m&&!o_(p,Aa(m)))return}t.replaceNode(a,h,G.createAwaitExpression(h))}}function Qet(t,r,a){const u=Dd(r.pos,a);u&&sX(u.end,u.parent,a)&&t.insertText(a,r.getStart(a),";")}var lAe="addMissingConst",Xet=[k.Cannot_find_name_0.code,k.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code];Ea({errorCodes:Xet,getCodeActions:function(r){const a=er.ChangeTracker.with(r,u=>Zet(u,r.sourceFile,r.span.start,r.program));if(a.length>0)return[oa(lAe,a,k.Add_const_to_unresolved_variable,lAe,k.Add_const_to_all_unresolved_variables)]},fixIds:[lAe],getAllCodeActions:t=>{const r=new Set;return jl(t,Xet,(a,u)=>Zet(a,u.file,u.start,t.program,r))}});function Zet(t,r,a,u,h){const p=Rs(r,a),m=Xi(p,T=>eI(T.parent)?T.parent.initializer===T:JRt(T)?!1:"quit");if(m)return Dfe(t,m,r,h);const C=p.parent;if(cr(C)&&C.operatorToken.kind===64&&_f(C.parent))return Dfe(t,p,r,h);if(Rf(C)){const T=u.getTypeChecker();return Be(C.elements,E=>GRt(E,T))?Dfe(t,C,r,h):void 0}const b=Xi(p,T=>_f(T.parent)?!0:KRt(T)?!1:"quit");if(b){const T=u.getTypeChecker();return Yet(b,T)?Dfe(t,b,r,h):void 0}}function Dfe(t,r,a,u){(!u||o_(u,r))&&t.insertModifierBefore(a,87,r)}function JRt(t){switch(t.kind){case 80:case 209:case 210:case 303:case 304:return!0;default:return!1}}function GRt(t,r){const a=lt(t)?t:Yd(t,!0)&<(t.left)?t.left:void 0;return!!a&&!r.getSymbolAtLocation(a)}function KRt(t){switch(t.kind){case 80:case 226:case 28:return!0;default:return!1}}function Yet(t,r){return cr(t)?t.operatorToken.kind===28?Be([t.left,t.right],a=>Yet(a,r)):t.operatorToken.kind===64&<(t.left)&&!r.getSymbolAtLocation(t.left):!1}var cAe="addMissingDeclareProperty",ett=[k.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration.code];Ea({errorCodes:ett,getCodeActions:function(r){const a=er.ChangeTracker.with(r,u=>ttt(u,r.sourceFile,r.span.start));if(a.length>0)return[oa(cAe,a,k.Prefix_with_declare,cAe,k.Prefix_all_incorrect_property_declarations_with_declare)]},fixIds:[cAe],getAllCodeActions:t=>{const r=new Set;return jl(t,ett,(a,u)=>ttt(a,u.file,u.start,r))}});function ttt(t,r,a,u){const h=Rs(r,a);if(!lt(h))return;const p=h.parent;p.kind===172&&(!u||o_(u,p))&&t.insertModifierBefore(r,138,p)}var uAe="addMissingInvocationForDecorator",itt=[k._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0.code];Ea({errorCodes:itt,getCodeActions:function(r){const a=er.ChangeTracker.with(r,u=>ntt(u,r.sourceFile,r.span.start));return[oa(uAe,a,k.Call_decorator_expression,uAe,k.Add_to_all_uncalled_decorators)]},fixIds:[uAe],getAllCodeActions:t=>jl(t,itt,(r,a)=>ntt(r,a.file,a.start))});function ntt(t,r,a){const u=Rs(r,a),h=Xi(u,jd);z.assert(!!h,"Expected position to be owned by a decorator.");const p=G.createCallExpression(h.expression,void 0,void 0);t.replaceNode(r,h.expression,p)}var dAe="addNameToNamelessParameter",rtt=[k.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code];Ea({errorCodes:rtt,getCodeActions:function(r){const a=er.ChangeTracker.with(r,u=>stt(u,r.sourceFile,r.span.start));return[oa(dAe,a,k.Add_parameter_name,dAe,k.Add_names_to_all_parameters_without_names)]},fixIds:[dAe],getAllCodeActions:t=>jl(t,rtt,(r,a)=>stt(r,a.file,a.start))});function stt(t,r,a){const u=Rs(r,a),h=u.parent;if(!Gs(h))return z.fail("Tried to add a parameter name to a non-parameter: "+z.formatSyntaxKind(u.kind));const p=h.parent.parameters.indexOf(h);z.assert(!h.type,"Tried to add a parameter name to a parameter that already had one."),z.assert(p>-1,"Parameter not found in parent parameter list.");let m=h.name.getEnd(),C=G.createTypeReferenceNode(h.name,void 0),b=ott(r,h);for(;b;)C=G.createArrayTypeNode(C),m=b.getEnd(),b=ott(r,b);const T=G.createParameterDeclaration(h.modifiers,h.dotDotDotToken,"arg"+p,h.questionToken,h.dotDotDotToken&&!fV(C)?G.createArrayTypeNode(C):C,h.initializer);t.replaceRange(r,Gg(h.getStart(r),m),T)}function ott(t,r){const a=aD(r.name,r.parent,t);if(a&&a.kind===23&&mS(a.parent)&&Gs(a.parent.parent))return a.parent.parent}var att="addOptionalPropertyUndefined",QRt=[k.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target.code,k.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code];Ea({errorCodes:QRt,getCodeActions(t){const r=t.program.getTypeChecker(),a=XRt(t.sourceFile,t.span,r);if(!a.length)return;const u=er.ChangeTracker.with(t,h=>YRt(h,a));return[Y0(att,u,k.Add_undefined_to_optional_property_type)]},fixIds:[att]});function XRt(t,r,a){var u,h;const p=ltt(Lde(t,r),a);if(!p)return x;const{source:m,target:C}=p,b=ZRt(m,C,a)?a.getTypeAtLocation(C.expression):a.getTypeAtLocation(C);return(h=(u=b.symbol)==null?void 0:u.declarations)!=null&&h.some(T=>_n(T).fileName.match(/\.d\.ts$/))?x:a.getExactOptionalProperties(b)}function ZRt(t,r,a){return Ir(r)&&!!a.getExactOptionalProperties(a.getTypeAtLocation(r.expression)).length&&a.getTypeAtLocation(t)===a.getUndefinedType()}function ltt(t,r){var a;if(t){if(cr(t.parent)&&t.parent.operatorToken.kind===64)return{source:t.parent.right,target:t.parent.left};if(ds(t.parent)&&t.parent.initializer)return{source:t.parent.initializer,target:t.parent.name};if(sa(t.parent)){const u=r.getSymbolAtLocation(t.parent.expression);if(!(u!=null&&u.valueDeclaration)||!BL(u.valueDeclaration.kind)||!Ut(t))return;const h=t.parent.arguments.indexOf(t);if(h===-1)return;const p=u.valueDeclaration.parameters[h].name;if(lt(p))return{source:t,target:p}}else if(pd(t.parent)&<(t.parent.name)||ih(t.parent)){const u=ltt(t.parent.parent,r);if(!u)return;const h=r.getPropertyOfType(r.getTypeAtLocation(u.target),t.parent.name.text),p=(a=h==null?void 0:h.declarations)==null?void 0:a[0];return p?{source:pd(t.parent)?t.parent.initializer:t.parent.name,target:p}:void 0}}else return}function YRt(t,r){for(const a of r){const u=a.valueDeclaration;if(u&&(V_(u)||To(u))&&u.type){const h=G.createUnionTypeNode([...u.type.kind===192?u.type.types:[u.type],G.createTypeReferenceNode("undefined")]);t.replaceNode(u.getSourceFile(),u.type,h)}}}var fAe="annotateWithTypeFromJSDoc",ctt=[k.JSDoc_types_may_be_moved_to_TypeScript_types.code];Ea({errorCodes:ctt,getCodeActions(t){const r=utt(t.sourceFile,t.span.start);if(!r)return;const a=er.ChangeTracker.with(t,u=>htt(u,t.sourceFile,r));return[oa(fAe,a,k.Annotate_with_type_from_JSDoc,fAe,k.Annotate_everything_with_types_from_JSDoc)]},fixIds:[fAe],getAllCodeActions:t=>jl(t,ctt,(r,a)=>{const u=utt(a.file,a.start);u&&htt(r,a.file,u)})});function utt(t,r){const a=Rs(t,r);return $r(Gs(a.parent)?a.parent.parent:a.parent,dtt)}function dtt(t){return e8t(t)&&ftt(t)}function ftt(t){return rc(t)?t.parameters.some(ftt)||!t.type&&!!AB(t):!t.type&&!!kk(t)}function htt(t,r,a){if(rc(a)&&(AB(a)||a.parameters.some(u=>!!kk(u)))){if(!a.typeParameters){const h=WJ(a);h.length&&t.insertTypeParameters(r,a,h)}const u=Dc(a)&&!Hl(a,21,r);u&&t.insertNodeBefore(r,ma(a.parameters),G.createToken(21));for(const h of a.parameters)if(!h.type){const p=kk(h);p&&t.tryInsertTypeAnnotation(r,h,Ct(p,hD,gs))}if(u&&t.insertNodeAfter(r,La(a.parameters),G.createToken(22)),!a.type){const h=AB(a);h&&t.tryInsertTypeAnnotation(r,a,Ct(h,hD,gs))}}else{const u=z.checkDefined(kk(a),"A JSDocType for this declaration should exist");z.assert(!a.type,"The JSDocType decl should have a type"),t.tryInsertTypeAnnotation(r,a,Ct(u,hD,gs))}}function e8t(t){return rc(t)||t.kind===260||t.kind===171||t.kind===172}function hD(t){switch(t.kind){case 312:case 313:return G.createTypeReferenceNode("any",x);case 316:return i8t(t);case 315:return hD(t.type);case 314:return n8t(t);case 318:return r8t(t);case 317:return s8t(t);case 183:return a8t(t);case 322:return t8t(t);default:const r=cn(t,hD,void 0);return ir(r,1),r}}function t8t(t){const r=G.createTypeLiteralNode(Yt(t.jsDocPropertyTags,a=>G.createPropertySignature(void 0,lt(a.name)?a.name:a.name.right,YW(a)?G.createToken(58):void 0,a.typeExpression&&Ct(a.typeExpression.type,hD,gs)||G.createKeywordTypeNode(133))));return ir(r,1),r}function i8t(t){return G.createUnionTypeNode([Ct(t.type,hD,gs),G.createTypeReferenceNode("undefined",x)])}function n8t(t){return G.createUnionTypeNode([Ct(t.type,hD,gs),G.createTypeReferenceNode("null",x)])}function r8t(t){return G.createArrayTypeNode(Ct(t.type,hD,gs))}function s8t(t){return G.createFunctionTypeNode(x,t.parameters.map(o8t),t.type??G.createKeywordTypeNode(133))}function o8t(t){const r=t.parent.parameters.indexOf(t),a=t.type.kind===318&&r===t.parent.parameters.length-1,u=t.name||(a?"rest":"arg"+r),h=a?G.createToken(26):t.dotDotDotToken;return G.createParameterDeclaration(t.modifiers,h,u,t.questionToken,Ct(t.type,hD,gs),t.initializer)}function a8t(t){let r=t.typeName,a=t.typeArguments;if(lt(t.typeName)){if(CJ(t))return l8t(t);let u=t.typeName.text;switch(t.typeName.text){case"String":case"Boolean":case"Object":case"Number":u=u.toLowerCase();break;case"array":case"date":case"promise":u=u[0].toUpperCase()+u.slice(1);break}r=G.createIdentifier(u),(u==="Array"||u==="Promise")&&!t.typeArguments?a=G.createNodeArray([G.createTypeReferenceNode("any",x)]):a=wn(t.typeArguments,hD,gs)}return G.createTypeReferenceNode(r,a)}function l8t(t){const r=G.createParameterDeclaration(void 0,void 0,t.typeArguments[0].kind===150?"n":"s",void 0,G.createTypeReferenceNode(t.typeArguments[0].kind===150?"number":"string",[]),void 0),a=G.createTypeLiteralNode([G.createIndexSignature(void 0,[r],t.typeArguments[1])]);return ir(a,1),a}var hAe="convertFunctionToEs6Class",_tt=[k.This_constructor_function_may_be_converted_to_a_class_declaration.code];Ea({errorCodes:_tt,getCodeActions(t){const r=er.ChangeTracker.with(t,a=>ptt(a,t.sourceFile,t.span.start,t.program.getTypeChecker(),t.preferences,t.program.getCompilerOptions()));return[oa(hAe,r,k.Convert_function_to_an_ES2015_class,hAe,k.Convert_all_constructor_functions_to_classes)]},fixIds:[hAe],getAllCodeActions:t=>jl(t,_tt,(r,a)=>ptt(r,a.file,a.start,t.program.getTypeChecker(),t.preferences,t.program.getCompilerOptions()))});function ptt(t,r,a,u,h,p){const m=u.getSymbolAtLocation(Rs(r,a));if(!m||!m.valueDeclaration||!(m.flags&19))return;const C=m.valueDeclaration;if(Uu(C)||gc(C))t.replaceNode(r,C,E(C));else if(ds(C)){const N=T(C);if(!N)return;const R=C.parent.parent;wf(C.parent)&&C.parent.declarations.length>1?(t.delete(r,C),t.insertNodeAfter(r,R,N)):t.replaceNode(r,R,N)}function b(N){const R=[];return N.exports&&N.exports.forEach(U=>{if(U.name==="prototype"&&U.declarations){const q=U.declarations[0];if(U.declarations.length===1&&Ir(q)&&cr(q.parent)&&q.parent.operatorToken.kind===64&&Pa(q.parent.right)){const Q=q.parent.right;j(Q.symbol,void 0,R)}}else j(U,[G.createToken(126)],R)}),N.members&&N.members.forEach((U,q)=>{var Q,re,Y,ue;if(q==="constructor"&&U.valueDeclaration){const te=(ue=(Y=(re=(Q=N.exports)==null?void 0:Q.get("prototype"))==null?void 0:re.declarations)==null?void 0:Y[0])==null?void 0:ue.parent;te&&cr(te)&&Pa(te.right)&&Rt(te.right.properties,Ife)||t.delete(r,U.valueDeclaration.parent);return}j(U,void 0,R)}),R;function F(U,q){return Sc(U)?Ir(U)&&Ife(U)?!0:Bo(q):Be(U.properties,Q=>!!(Au(Q)||RB(Q)||pd(Q)&&gc(Q.initializer)&&Q.name||Ife(Q)))}function j(U,q,Q){if(!(U.flags&8192)&&!(U.flags&4096))return;const re=U.valueDeclaration,Y=re.parent,ue=Y.right;if(!F(re,ue)||Rt(Q,ye=>{const be=ko(ye);return!!(be&<(be)&&dr(be)===xu(U))}))return;const te=Y.parent&&Y.parent.kind===244?Y.parent:Y;if(t.delete(r,te),!ue){Q.push(G.createPropertyDeclaration(q,U.name,void 0,void 0,void 0));return}if(Sc(re)&&(gc(ue)||Dc(ue))){const ye=bg(r,h),be=c8t(re,p,ye);be&&Se(Q,ue,be);return}else if(Pa(ue)){W(ue.properties,ye=>{(Au(ye)||RB(ye))&&Q.push(ye),pd(ye)&&gc(ye.initializer)&&Se(Q,ye.initializer,ye.name),Ife(ye)});return}else{if(F_(r)||!Ir(re))return;const ye=G.createPropertyDeclaration(q,re.name,void 0,void 0,ue);W3(Y.parent,ye,r),Q.push(ye);return}function Se(ye,be,_e){return gc(be)?oe(ye,be,_e):pe(ye,be,_e)}function oe(ye,be,_e){const ve=no(q,Efe(be,134)),Ee=G.createMethodDeclaration(ve,void 0,_e,void 0,void 0,be.parameters,void 0,be.body);W3(Y,Ee,r),ye.push(Ee)}function pe(ye,be,_e){const ve=be.body;let Ee;ve.kind===241?Ee=ve:Ee=G.createBlock([G.createReturnStatement(ve)]);const ke=no(q,Efe(be,134)),Fe=G.createMethodDeclaration(ke,void 0,_e,void 0,void 0,be.parameters,void 0,Ee);W3(Y,Fe,r),ye.push(Fe)}}}function T(N){const R=N.initializer;if(!R||!gc(R)||!lt(N.name))return;const F=b(N.symbol);R.body&&F.unshift(G.createConstructorDeclaration(void 0,R.parameters,R.body));const j=Efe(N.parent.parent,95);return G.createClassDeclaration(j,N.name,void 0,void 0,F)}function E(N){const R=b(m);N.body&&R.unshift(G.createConstructorDeclaration(void 0,N.parameters,N.body));const F=Efe(N,95);return G.createClassDeclaration(F,N.name,void 0,void 0,R)}}function Efe(t,r){return _0(t)?Ri(t.modifiers,a=>a.kind===r):void 0}function Ife(t){return t.name?!!(lt(t.name)&&t.name.text==="constructor"):!1}function c8t(t,r,a){if(Ir(t))return t.name;const u=t.argumentExpression;if(W_(u))return u;if(Ml(u))return wp(u.text,il(r))?G.createIdentifier(u.text):bP(u)?G.createStringLiteral(u.text,a===0):u}var _Ae="convertToAsyncFunction",gtt=[k.This_may_be_converted_to_an_async_function.code],Nfe=!0;Ea({errorCodes:gtt,getCodeActions(t){Nfe=!0;const r=er.ChangeTracker.with(t,a=>mtt(a,t.sourceFile,t.span.start,t.program.getTypeChecker()));return Nfe?[oa(_Ae,r,k.Convert_to_async_function,_Ae,k.Convert_all_to_async_functions)]:[]},fixIds:[_Ae],getAllCodeActions:t=>jl(t,gtt,(r,a)=>mtt(r,a.file,a.start,t.program.getTypeChecker()))});function mtt(t,r,a,u){const h=Rs(r,a);let p;if(lt(h)&&ds(h.parent)&&h.parent.initializer&&rc(h.parent.initializer)?p=h.parent.initializer:p=$r(Kp(Rs(r,a)),Zde),!p)return;const m=new Map,C=Xn(p),b=d8t(p,u),T=f8t(p,u,m);if(!Qde(T,u))return;const E=T.body&&Ho(T.body)?u8t(T.body,u):x,N={checker:u,synthNamesMap:m,setOfExpressionsToReturn:b,isInJSFile:C};if(!E.length)return;const R=qa(r.text,Fv(p).pos);t.insertModifierAt(r,R,134,{suffix:" "});for(const F of E)if(jo(F,function j(U){if(sa(U)){const q=$3(U,U,N,!1);if(iA())return!0;t.replaceNodeWithNodes(r,F,q)}else if(!Bo(U)&&(jo(U,j),iA()))return!0}),iA())return}function u8t(t,r){const a=[];return sS(t,u=>{CX(u,r)&&a.push(u)}),a}function d8t(t,r){if(!t.body)return new Set;const a=new Set;return jo(t.body,function u(h){BH(h,r,"then")?(a.add(Tl(h)),W(h.arguments,u)):BH(h,r,"catch")||BH(h,r,"finally")?(a.add(Tl(h)),jo(h,u)):ytt(h,r)?a.add(Tl(h)):jo(h,u)}),a}function BH(t,r,a){if(!sa(t))return!1;const h=oH(t,a)&&r.getTypeAtLocation(t);return!!(h&&r.getPromisedTypeOfPromise(h))}function vtt(t,r){return(Rr(t)&4)!==0&&t.target===r}function Lfe(t,r,a){if(t.expression.name.escapedText==="finally")return;const u=a.getTypeAtLocation(t.expression.expression);if(vtt(u,a.getPromiseType())||vtt(u,a.getPromiseLikeType()))if(t.expression.name.escapedText==="then"){if(r===bp(t.arguments,0))return bp(t.typeArguments,0);if(r===bp(t.arguments,1))return bp(t.typeArguments,1)}else return bp(t.typeArguments,0)}function ytt(t,r){return Ut(t)?!!r.getPromisedTypeOfPromise(r.getTypeAtLocation(t)):!1}function f8t(t,r,a){const u=new Map,h=Ug();return jo(t,function p(m){if(!lt(m)){jo(m,p);return}const C=r.getSymbolAtLocation(m);if(C){const b=r.getTypeAtLocation(m),T=ktt(b,r),E=Aa(C).toString();if(T&&!Gs(m.parent)&&!rc(m.parent)&&!a.has(E)){const N=lu(T.parameters),R=(N==null?void 0:N.valueDeclaration)&&Gs(N.valueDeclaration)&&$r(N.valueDeclaration.name,lt)||G.createUniqueName("result",16),F=btt(R,h);a.set(E,F),h.add(R.text,C)}else if(m.parent&&(Gs(m.parent)||ds(m.parent)||nl(m.parent))){const N=m.text,R=h.get(N);if(R&&R.some(F=>F!==C)){const F=btt(m,h);u.set(E,F.identifier),a.set(E,F),h.add(N,C)}else{const F=Pl(m);a.set(E,yF(F)),h.add(N,C)}}}}),bH(t,!0,p=>{if(nl(p)&<(p.name)&&pg(p.parent)){const m=r.getSymbolAtLocation(p.name),C=m&&u.get(String(Aa(m)));if(C&&C.text!==(p.name||p.propertyName).getText())return G.createBindingElement(p.dotDotDotToken,p.propertyName||p.name,C,p.initializer)}else if(lt(p)){const m=r.getSymbolAtLocation(p),C=m&&u.get(String(Aa(m)));if(C)return G.createIdentifier(C.text)}})}function btt(t,r){const a=(r.get(t.text)||x).length,u=a===0?t:G.createIdentifier(t.text+"_"+a);return yF(u)}function iA(){return!Nfe}function o2(){return Nfe=!1,x}function $3(t,r,a,u,h){if(BH(r,a.checker,"then"))return p8t(r,bp(r.arguments,0),bp(r.arguments,1),a,u,h);if(BH(r,a.checker,"catch"))return wtt(r,bp(r.arguments,0),a,u,h);if(BH(r,a.checker,"finally"))return _8t(r,bp(r.arguments,0),a,u,h);if(Ir(r))return $3(t,r.expression,a,u,h);const p=a.checker.getTypeAtLocation(r);return p&&a.checker.getPromisedTypeOfPromise(p)?(z.assertNode(uu(r).parent,Ir),g8t(t,r,a,u,h)):o2()}function Pfe({checker:t},r){if(r.kind===106)return!0;if(lt(r)&&!jc(r)&&dr(r)==="undefined"){const a=t.getSymbolAtLocation(r);return!a||t.isUndefinedSymbol(a)}return!1}function h8t(t){const r=G.createUniqueName(t.identifier.text,16);return yF(r)}function Ctt(t,r,a){let u;return a&&!VH(t,r)&&(WH(a)?(u=a,r.synthNamesMap.forEach((h,p)=>{if(h.identifier.text===a.identifier.text){const m=h8t(a);r.synthNamesMap.set(p,m)}})):u=yF(G.createUniqueName("result",16),a.types),vAe(u)),u}function Stt(t,r,a,u,h){const p=[];let m;if(u&&!VH(t,r)){m=Pl(vAe(u));const C=u.types,b=r.checker.getUnionType(C,2),T=r.isInJSFile?void 0:r.checker.typeToTypeNode(b,void 0,void 0),E=[G.createVariableDeclaration(m,void 0,T)],N=G.createVariableStatement(void 0,G.createVariableDeclarationList(E,1));p.push(N)}return p.push(a),h&&m&&y8t(h)&&p.push(G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(Pl(Itt(h)),void 0,void 0,m)],2))),p}function _8t(t,r,a,u,h){if(!r||Pfe(a,r))return $3(t,t.expression.expression,a,u,h);const p=Ctt(t,a,h),m=$3(t,t.expression.expression,a,!0,p);if(iA())return o2();const C=gAe(r,u,void 0,void 0,t,a);if(iA())return o2();const b=G.createBlock(m),T=G.createBlock(C),E=G.createTryStatement(b,void 0,T);return Stt(t,a,E,p,h)}function wtt(t,r,a,u,h){if(!r||Pfe(a,r))return $3(t,t.expression.expression,a,u,h);const p=Dtt(r,a),m=Ctt(t,a,h),C=$3(t,t.expression.expression,a,!0,m);if(iA())return o2();const b=gAe(r,u,m,p,t,a);if(iA())return o2();const T=G.createBlock(C),E=G.createCatchClause(p&&Pl(BX(p)),G.createBlock(b)),N=G.createTryStatement(T,E,void 0);return Stt(t,a,N,m,h)}function p8t(t,r,a,u,h,p){if(!r||Pfe(u,r))return wtt(t,a,u,h,p);if(a&&!Pfe(u,a))return o2();const m=Dtt(r,u),C=$3(t.expression.expression,t.expression.expression,u,!0,m);if(iA())return o2();const b=gAe(r,h,p,m,t,u);return iA()?o2():no(C,b)}function g8t(t,r,a,u,h){if(VH(t,a)){let p=Pl(r);return u&&(p=G.createAwaitExpression(p)),[G.createReturnStatement(p)]}return Afe(h,G.createAwaitExpression(r),void 0)}function Afe(t,r,a){return!t||Ett(t)?[G.createExpressionStatement(r)]:WH(t)&&t.hasBeenDeclared?[G.createExpressionStatement(G.createAssignment(Pl(mAe(t)),r))]:[G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(Pl(BX(t)),void 0,a,r)],2))]}function pAe(t,r){if(r&&t){const a=G.createUniqueName("result",16);return[...Afe(yF(a),t,r),G.createReturnStatement(a)]}return[G.createReturnStatement(t)]}function gAe(t,r,a,u,h,p){var m;switch(t.kind){case 106:break;case 211:case 80:if(!u)break;const C=G.createCallExpression(Pl(t),void 0,WH(u)?[mAe(u)]:[]);if(VH(h,p))return pAe(C,Lfe(h,t,p.checker));const b=p.checker.getTypeAtLocation(t),T=p.checker.getSignaturesOfType(b,0);if(!T.length)return o2();const E=T[0].getReturnType(),N=Afe(a,G.createAwaitExpression(C),Lfe(h,t,p.checker));return a&&a.types.push(p.checker.getAwaitedType(E)||E),N;case 218:case 219:{const R=t.body,F=(m=ktt(p.checker.getTypeAtLocation(t),p.checker))==null?void 0:m.getReturnType();if(Ho(R)){let j=[],U=!1;for(const q of R.statements)if(Om(q))if(U=!0,CX(q,p.checker))j=j.concat(Ttt(p,q,r,a));else{const Q=F&&q.expression?xtt(p.checker,F,q.expression):q.expression;j.push(...pAe(Q,Lfe(h,t,p.checker)))}else{if(r&&sS(q,vk))return o2();j.push(q)}return VH(h,p)?j.map(q=>Pl(q)):m8t(j,a,p,U)}else{const j=Xde(R,p.checker)?Ttt(p,G.createReturnStatement(R),r,a):x;if(j.length>0)return j;if(F){const U=xtt(p.checker,F,R);if(VH(h,p))return pAe(U,Lfe(h,t,p.checker));{const q=Afe(a,U,void 0);return a&&a.types.push(p.checker.getAwaitedType(F)||F),q}}else return o2()}}default:return o2()}return x}function xtt(t,r,a){const u=Pl(a);return t.getPromisedTypeOfPromise(r)?G.createAwaitExpression(u):u}function ktt(t,r){const a=r.getSignaturesOfType(t,0);return Ql(a)}function m8t(t,r,a,u){const h=[];for(const p of t)if(Om(p)){if(p.expression){const m=ytt(p.expression,a.checker)?G.createAwaitExpression(p.expression):p.expression;r===void 0?h.push(G.createExpressionStatement(m)):WH(r)&&r.hasBeenDeclared?h.push(G.createExpressionStatement(G.createAssignment(mAe(r),m))):h.push(G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(BX(r),void 0,void 0,m)],2)))}}else h.push(Pl(p));return!u&&r!==void 0&&h.push(G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(BX(r),void 0,void 0,G.createIdentifier("undefined"))],2))),h}function Ttt(t,r,a,u){let h=[];return jo(r,function p(m){if(sa(m)){const C=$3(m,m,t,a,u);if(h=h.concat(C),h.length>0)return}else Bo(m)||jo(m,p)}),h}function Dtt(t,r){const a=[];let u;if(rc(t)){if(t.parameters.length>0){const b=t.parameters[0].name;u=h(b)}}else lt(t)?u=p(t):Ir(t)&<(t.name)&&(u=p(t.name));if(!u||"identifier"in u&&u.identifier.text==="undefined")return;return u;function h(b){if(lt(b))return p(b);const T=Ln(b.elements,E=>zd(E)?[]:[h(E.name)]);return v8t(b,T)}function p(b){const T=C(b),E=m(T);return E&&r.synthNamesMap.get(Aa(E).toString())||yF(b,a)}function m(b){var T;return((T=$r(b,H0))==null?void 0:T.symbol)??r.checker.getSymbolAtLocation(b)}function C(b){return b.original?b.original:b}}function Ett(t){return t?WH(t)?!t.identifier.text:Be(t.elements,Ett):!0}function yF(t,r=[]){return{kind:0,identifier:t,types:r,hasBeenDeclared:!1,hasBeenReferenced:!1}}function v8t(t,r=x,a=[]){return{kind:1,bindingPattern:t,elements:r,types:a}}function mAe(t){return t.hasBeenReferenced=!0,t.identifier}function BX(t){return WH(t)?vAe(t):Itt(t)}function Itt(t){for(const r of t.elements)BX(r);return t.bindingPattern}function vAe(t){return t.hasBeenDeclared=!0,t.identifier}function WH(t){return t.kind===0}function y8t(t){return t.kind===1}function VH(t,r){return!!t.original&&r.setOfExpressionsToReturn.has(Tl(t.original))}Ea({errorCodes:[k.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module.code],getCodeActions(t){const{sourceFile:r,program:a,preferences:u}=t,h=er.ChangeTracker.with(t,p=>{if(C8t(r,a.getTypeChecker(),p,il(a.getCompilerOptions()),bg(r,u)))for(const C of a.getSourceFiles())b8t(C,r,a,p,bg(C,u))});return[Y0("convertToEsModule",h,k.Convert_to_ES_module)]}});function b8t(t,r,a,u,h){var p;for(const m of t.imports){const C=(p=a.getResolvedModuleFromModuleSpecifier(m,t))==null?void 0:p.resolvedModule;if(!C||C.resolvedFileName!==r.fileName)continue;const b=k8(m);switch(b.kind){case 271:u.replaceNode(t,b,ux(b.name,void 0,m,h));break;case 213:B_(b,!1)&&u.replaceNode(t,b,G.createPropertyAccessExpression(Pl(b),"default"));break}}}function C8t(t,r,a,u,h){const p={original:O8t(t),additional:new Set},m=S8t(t,r,p);w8t(t,m,a);let C=!1,b;for(const T of Ri(t.statements,Ou)){const E=Ltt(t,T,a,r,p,u,h);E&&K$(E,b??(b=new Map))}for(const T of Ri(t.statements,E=>!Ou(E))){const E=x8t(t,T,r,a,p,u,m,b,h);C=C||E}return b==null||b.forEach((T,E)=>{a.replaceNode(t,E,T)}),C}function S8t(t,r,a){const u=new Map;return Ntt(t,h=>{const{text:p}=h.name;!u.has(p)&&(foe(h.name)||r.resolveName(p,h,111551,!0))&&u.set(p,Ofe(`_${p}`,a))}),u}function w8t(t,r,a){Ntt(t,(u,h)=>{if(h)return;const{text:p}=u.name;a.replaceNode(t,u,G.createIdentifier(r.get(p)||p))})}function Ntt(t,r){t.forEachChild(function a(u){if(Ir(u)&&tD(t,u.expression)&<(u.name)){const{parent:h}=u;r(u,cr(h)&&h.left===u&&h.operatorToken.kind===64)}u.forEachChild(a)})}function x8t(t,r,a,u,h,p,m,C,b){switch(r.kind){case 243:return Ltt(t,r,u,a,h,p,b),!1;case 244:{const{expression:T}=r;switch(T.kind){case 213:return B_(T,!0)&&u.replaceNode(t,r,ux(void 0,void 0,T.arguments[0],b)),!1;case 226:{const{operatorToken:E}=T;return E.kind===64&&T8t(t,a,T,u,m,C)}}}default:return!1}}function Ltt(t,r,a,u,h,p,m){const{declarationList:C}=r;let b=!1;const T=Yt(C.declarations,E=>{const{name:N,initializer:R}=E;if(R){if(tD(t,R))return b=!0,bF([]);if(B_(R,!0))return b=!0,P8t(N,R.arguments[0],u,h,p,m);if(Ir(R)&&B_(R.expression,!0))return b=!0,k8t(N,R.name.text,R.expression.arguments[0],h,m)}return bF([G.createVariableStatement(void 0,G.createVariableDeclarationList([E],C.flags))])});if(b){a.replaceNodeWithNodes(t,r,Ln(T,N=>N.newImports));let E;return W(T,N=>{N.useSitesToUnqualify&&K$(N.useSitesToUnqualify,E??(E=new Map))}),E}}function k8t(t,r,a,u,h){switch(t.kind){case 206:case 207:{const p=Ofe(r,u);return bF([Mtt(p,r,a,h),Mfe(void 0,t,G.createIdentifier(p))])}case 80:return bF([Mtt(t.text,r,a,h)]);default:return z.assertNever(t,`Convert to ES module got invalid syntax form ${t.kind}`)}}function T8t(t,r,a,u,h,p){const{left:m,right:C}=a;if(!Ir(m))return!1;if(tD(t,m))if(tD(t,C))u.delete(t,a.parent);else{const b=Pa(C)?D8t(C,p):B_(C,!0)?I8t(C.arguments[0],r):void 0;return b?(u.replaceNodeWithNodes(t,a.parent,b[0]),b[1]):(u.replaceRangeWithText(t,Gg(m.getStart(t),C.pos),"export default"),!0)}else tD(t,m.expression)&&E8t(t,a,u,h);return!1}function D8t(t,r){const a=Wc(t.properties,u=>{switch(u.kind){case 177:case 178:case 304:case 305:return;case 303:return lt(u.name)?L8t(u.name.text,u.initializer,r):void 0;case 174:return lt(u.name)?Ott(u.name.text,[G.createToken(95)],u,r):void 0;default:z.assertNever(u,`Convert to ES6 got invalid prop kind ${u.kind}`)}});return a&&[a,!1]}function E8t(t,r,a,u){const{text:h}=r.left.name,p=u.get(h);if(p!==void 0){const m=[Mfe(void 0,p,r.right),CAe([G.createExportSpecifier(!1,p,h)])];a.replaceNodeWithNodes(t,r.parent,m)}else N8t(r,t,a)}function I8t(t,r){const a=t.text,u=r.getSymbolAtLocation(t),h=u?u.exports:I;return h.has("export=")?[[yAe(a)],!0]:h.has("default")?h.size>1?[[Ptt(a),yAe(a)],!0]:[[yAe(a)],!0]:[[Ptt(a)],!1]}function Ptt(t){return CAe(void 0,t)}function yAe(t){return CAe([G.createExportSpecifier(!1,void 0,"default")],t)}function N8t({left:t,right:r,parent:a},u,h){const p=t.name.text;if((gc(r)||Dc(r)||wd(r))&&(!r.name||r.name.text===p)){h.replaceRange(u,{pos:t.getStart(u),end:r.getStart(u)},G.createToken(95),{suffix:" "}),r.name||h.insertName(u,r,p);const m=Hl(a,27,u);m&&h.delete(u,m)}else h.replaceNodeRangeWithNodes(u,t.expression,Hl(t,25,u),[G.createToken(95),G.createToken(87)],{joiner:" ",suffix:" "})}function L8t(t,r,a){const u=[G.createToken(95)];switch(r.kind){case 218:{const{name:p}=r;if(p&&p.text!==t)return h()}case 219:return Ott(t,u,r,a);case 231:return R8t(t,u,r,a);default:return h()}function h(){return Mfe(u,G.createIdentifier(t),bAe(r,a))}}function bAe(t,r){if(!r||!Rt(Fn(r.keys()),u=>yg(t,u)))return t;return Lo(t)?Sde(t,!0,a):bH(t,!0,a);function a(u){if(u.kind===211){const h=r.get(u);return r.delete(u),h}}}function P8t(t,r,a,u,h,p){switch(t.kind){case 206:{const m=Wc(t.elements,C=>C.dotDotDotToken||C.initializer||C.propertyName&&!lt(C.propertyName)||!lt(C.name)?void 0:Rtt(C.propertyName&&C.propertyName.text,C.name.text));if(m)return bF([ux(void 0,m,r,p)])}case 207:{const m=Ofe(TH(r.text,h),u);return bF([ux(G.createIdentifier(m),void 0,r,p),Mfe(void 0,Pl(t),G.createIdentifier(m))])}case 80:return A8t(t,r,a,u,p);default:return z.assertNever(t,`Convert to ES module got invalid name kind ${t.kind}`)}}function A8t(t,r,a,u,h){const p=a.getSymbolAtLocation(t),m=new Map;let C=!1,b;for(const E of u.original.get(t.text)){if(a.getSymbolAtLocation(E)!==p||E===t)continue;const{parent:N}=E;if(Ir(N)){const{name:{text:R}}=N;if(R==="default"){C=!0;const F=E.getText();(b??(b=new Map)).set(N,G.createIdentifier(F))}else{z.assert(N.expression===E,"Didn't expect expression === use");let F=m.get(R);F===void 0&&(F=Ofe(R,u),m.set(R,F)),(b??(b=new Map)).set(N,G.createIdentifier(F))}}else C=!0}const T=m.size===0?void 0:Fn(na(m.entries(),([E,N])=>G.createImportSpecifier(!1,E===N?void 0:G.createIdentifier(E),G.createIdentifier(N))));return T||(C=!0),bF([ux(C?Pl(t):void 0,T,r,h)],b)}function Ofe(t,r){for(;r.original.has(t)||r.additional.has(t);)t=`_${t}`;return r.additional.add(t),t}function O8t(t){const r=Ug();return Att(t,a=>r.add(a.text,a)),r}function Att(t,r){lt(t)&&M8t(t)&&r(t),t.forEachChild(a=>Att(a,r))}function M8t(t){const{parent:r}=t;switch(r.kind){case 211:return r.name!==t;case 208:return r.propertyName!==t;case 276:return r.propertyName!==t;default:return!0}}function Ott(t,r,a,u){return G.createFunctionDeclaration(no(r,lD(a.modifiers)),Pl(a.asteriskToken),t,lD(a.typeParameters),lD(a.parameters),Pl(a.type),G.converters.convertToFunctionBlock(bAe(a.body,u)))}function R8t(t,r,a,u){return G.createClassDeclaration(no(r,lD(a.modifiers)),t,lD(a.typeParameters),lD(a.heritageClauses),bAe(a.members,u))}function Mtt(t,r,a,u){return r==="default"?ux(G.createIdentifier(t),void 0,a,u):ux(void 0,[Rtt(r,t)],a,u)}function Rtt(t,r){return G.createImportSpecifier(!1,t!==void 0&&t!==r?G.createIdentifier(t):void 0,G.createIdentifier(r))}function Mfe(t,r,a){return G.createVariableStatement(t,G.createVariableDeclarationList([G.createVariableDeclaration(r,void 0,void 0,a)],2))}function CAe(t,r){return G.createExportDeclaration(void 0,!1,t&&G.createNamedExports(t),r===void 0?void 0:G.createStringLiteral(r))}function bF(t,r){return{newImports:t,useSitesToUnqualify:r}}var SAe="correctQualifiedNameToIndexedAccessType",Ftt=[k.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1.code];Ea({errorCodes:Ftt,getCodeActions(t){const r=Btt(t.sourceFile,t.span.start);if(!r)return;const a=er.ChangeTracker.with(t,h=>Wtt(h,t.sourceFile,r)),u=`${r.left.text}["${r.right.text}"]`;return[oa(SAe,a,[k.Rewrite_as_the_indexed_access_type_0,u],SAe,k.Rewrite_all_as_indexed_access_types)]},fixIds:[SAe],getAllCodeActions:t=>jl(t,Ftt,(r,a)=>{const u=Btt(a.file,a.start);u&&Wtt(r,a.file,u)})});function Btt(t,r){const a=Xi(Rs(t,r),__);return z.assert(!!a,"Expected position to be owned by a qualified name."),lt(a.left)?a:void 0}function Wtt(t,r,a){const u=a.right.text,h=G.createIndexedAccessTypeNode(G.createTypeReferenceNode(a.left,void 0),G.createLiteralTypeNode(G.createStringLiteral(u)));t.replaceNode(r,a,h)}var wAe=[k.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type.code],xAe="convertToTypeOnlyExport";Ea({errorCodes:wAe,getCodeActions:function(r){const a=er.ChangeTracker.with(r,u=>Htt(u,Vtt(r.span,r.sourceFile),r));if(a.length)return[oa(xAe,a,k.Convert_to_type_only_export,xAe,k.Convert_all_re_exported_types_to_type_only_exports)]},fixIds:[xAe],getAllCodeActions:function(r){const a=new Map;return jl(r,wAe,(u,h)=>{const p=Vtt(h,r.sourceFile);p&&Lm(a,Tl(p.parent.parent))&&Htt(u,p,r)})}});function Vtt(t,r){return $r(Rs(r,t.start).parent,gh)}function Htt(t,r,a){if(!r)return;const u=r.parent,h=u.parent,p=F8t(r,a);if(p.length===u.elements.length)t.insertModifierBefore(a.sourceFile,156,u);else{const m=G.updateExportDeclaration(h,h.modifiers,!1,G.updateNamedExports(u,Ri(u.elements,b=>!Mt(p,b))),h.moduleSpecifier,void 0),C=G.createExportDeclaration(void 0,!0,G.createNamedExports(p),h.moduleSpecifier,void 0);t.replaceNode(a.sourceFile,h,m,{leadingTriviaOption:er.LeadingTriviaOption.IncludeAll,trailingTriviaOption:er.TrailingTriviaOption.Exclude}),t.insertNodeAfter(a.sourceFile,h,C)}}function F8t(t,r){const a=t.parent;if(a.elements.length===1)return a.elements;const u=cLe(b_(a),r.program.getSemanticDiagnostics(r.sourceFile,r.cancellationToken));return Ri(a.elements,h=>{var p;return h===t||((p=lLe(h,u))==null?void 0:p.code)===wAe[0]})}var jtt=[k._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code,k._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code],Rfe="convertToTypeOnlyImport";Ea({errorCodes:jtt,getCodeActions:function(r){var a;const u=ztt(r.sourceFile,r.span.start);if(u){const h=er.ChangeTracker.with(r,C=>WX(C,r.sourceFile,u)),p=u.kind===276&&Cu(u.parent.parent.parent)&&Utt(u,r.sourceFile,r.program)?er.ChangeTracker.with(r,C=>WX(C,r.sourceFile,u.parent.parent.parent)):void 0,m=oa(Rfe,h,u.kind===276?[k.Use_type_0,((a=u.propertyName)==null?void 0:a.text)??u.name.text]:k.Use_import_type,Rfe,k.Fix_all_with_type_only_imports);return Rt(p)?[Y0(Rfe,p,k.Use_import_type),m]:[m]}},fixIds:[Rfe],getAllCodeActions:function(r){const a=new Set;return jl(r,jtt,(u,h)=>{const p=ztt(h.file,h.start);(p==null?void 0:p.kind)===272&&!a.has(p)?(WX(u,h.file,p),a.add(p)):(p==null?void 0:p.kind)===276&&Cu(p.parent.parent.parent)&&!a.has(p.parent.parent.parent)&&Utt(p,h.file,r.program)?(WX(u,h.file,p.parent.parent.parent),a.add(p.parent.parent.parent)):(p==null?void 0:p.kind)===276&&WX(u,h.file,p)})}});function ztt(t,r){const{parent:a}=Rs(t,r);return m_(a)||Cu(a)&&a.importClause?a:void 0}function Utt(t,r,a){if(t.parent.parent.name)return!1;const u=t.parent.elements.filter(p=>!p.isTypeOnly);if(u.length===1)return!0;const h=a.getTypeChecker();for(const p of u)if(xc.Core.eachSymbolReferenceInFile(p.name,h,r,C=>{const b=h.getSymbolAtLocation(C);return!!b&&h.symbolIsValue(b)||!Wk(C)}))return!1;return!0}function WX(t,r,a){var u;if(m_(a))t.replaceNode(r,a,G.updateImportSpecifier(a,!0,a.propertyName,a.name));else{const h=a.importClause;if(h.name&&h.namedBindings)t.replaceNodeWithNodes(r,a,[G.createImportDeclaration(lD(a.modifiers,!0),G.createImportClause(!0,Pl(h.name,!0),void 0),Pl(a.moduleSpecifier,!0),Pl(a.attributes,!0)),G.createImportDeclaration(lD(a.modifiers,!0),G.createImportClause(!0,void 0,Pl(h.namedBindings,!0)),Pl(a.moduleSpecifier,!0),Pl(a.attributes,!0))]);else{const p=((u=h.namedBindings)==null?void 0:u.kind)===275?G.updateNamedImports(h.namedBindings,Is(h.namedBindings.elements,C=>G.updateImportSpecifier(C,!1,C.propertyName,C.name))):h.namedBindings,m=G.updateImportDeclaration(a,a.modifiers,G.updateImportClause(h,!0,h.name,p),a.moduleSpecifier,a.attributes);t.replaceNode(r,a,m)}}}var kAe="convertTypedefToType",qtt=[k.JSDoc_typedef_may_be_converted_to_TypeScript_type.code];Ea({fixIds:[kAe],errorCodes:qtt,getCodeActions(t){const r=SS(t.host,t.formatContext.options),a=Rs(t.sourceFile,t.span.start);if(!a)return;const u=er.ChangeTracker.with(t,h=>$tt(h,a,t.sourceFile,r));if(u.length>0)return[oa(kAe,u,k.Convert_typedef_to_TypeScript_type,kAe,k.Convert_all_typedef_to_TypeScript_types)]},getAllCodeActions:t=>jl(t,qtt,(r,a)=>{const u=SS(t.host,t.formatContext.options),h=Rs(a.file,a.start);h&&$tt(r,h,a.file,u,!0)})});function $tt(t,r,a,u,h=!1){if(!CI(r))return;const p=W8t(r);if(!p)return;const m=r.parent,{leftSibling:C,rightSibling:b}=B8t(r);let T=m.getStart(),E="";!C&&m.comment&&(T=Jtt(m,m.getStart(),r.getStart()),E=`${u} */${u}`),C&&(h&&CI(C)?(T=r.getStart(),E=""):(T=Jtt(m,C.getStart(),r.getStart()),E=`${u} */${u}`));let N=m.getEnd(),R="";b&&(h&&CI(b)?(N=b.getStart(),R=`${u}${u}`):(N=b.getStart(),R=`${u}/**${u} * `)),t.replaceRange(a,{pos:T,end:N},p,{prefix:E,suffix:R})}function B8t(t){const r=t.parent,a=r.getChildCount()-1,u=r.getChildren().findIndex(m=>m.getStart()===t.getStart()&&m.getEnd()===t.getEnd()),h=u>0?r.getChildAt(u-1):void 0,p=u0;h--)if(!/[*/\s]/g.test(u.substring(h-1,h)))return r+h;return a}function W8t(t){var r;const{typeExpression:a}=t;if(!a)return;const u=(r=t.name)==null?void 0:r.getText();if(u){if(a.kind===322)return V8t(u,a);if(a.kind===309)return H8t(u,a)}}function V8t(t,r){const a=Gtt(r);if(Rt(a))return G.createInterfaceDeclaration(void 0,t,void 0,void 0,a)}function H8t(t,r){const a=Pl(r.type);if(a)return G.createTypeAliasDeclaration(void 0,G.createIdentifier(t),void 0,a)}function Gtt(t){const r=t.jsDocPropertyTags;return Rt(r)?ns(r,u=>{var h;const p=j8t(u),m=(h=u.typeExpression)==null?void 0:h.type,C=u.isBracketed;let b;if(m&&bI(m)){const T=Gtt(m);b=G.createTypeLiteralNode(T)}else m&&(b=Pl(m));if(b&&p){const T=C?G.createToken(58):void 0;return G.createPropertySignature(void 0,p,T,b)}}):void 0}function j8t(t){return t.name.kind===80?t.name.text:t.name.right.text}function z8t(t){return Jp(t)?Ln(t.jsDoc,r=>{var a;return(a=r.tags)==null?void 0:a.filter(u=>CI(u))}):[]}var TAe="convertLiteralTypeToMappedType",Ktt=[k._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0.code];Ea({errorCodes:Ktt,getCodeActions:function(r){const{sourceFile:a,span:u}=r,h=Qtt(a,u.start);if(!h)return;const{name:p,constraint:m}=h,C=er.ChangeTracker.with(r,b=>Xtt(b,a,h));return[oa(TAe,C,[k.Convert_0_to_1_in_0,m,p],TAe,k.Convert_all_type_literals_to_mapped_type)]},fixIds:[TAe],getAllCodeActions:t=>jl(t,Ktt,(r,a)=>{const u=Qtt(a.file,a.start);u&&Xtt(r,a.file,u)})});function Qtt(t,r){const a=Rs(t,r);if(lt(a)){const u=ua(a.parent.parent,V_),h=a.getText(t);return{container:ua(u.parent,p_),typeNode:u.type,constraint:h,name:h==="K"?"P":"K"}}}function Xtt(t,r,{container:a,typeNode:u,constraint:h,name:p}){t.replaceNode(r,a,G.createMappedTypeNode(void 0,G.createTypeParameterDeclaration(void 0,p,G.createTypeReferenceNode(h)),void 0,void 0,u,void 0))}var Ztt=[k.Class_0_incorrectly_implements_interface_1.code,k.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code],DAe="fixClassIncorrectlyImplementsInterface";Ea({errorCodes:Ztt,getCodeActions(t){const{sourceFile:r,span:a}=t,u=Ytt(r,a.start);return ns(H6(u),h=>{const p=er.ChangeTracker.with(t,m=>tit(t,h,r,u,m,t.preferences));return p.length===0?void 0:oa(DAe,p,[k.Implement_interface_0,h.getText(r)],DAe,k.Implement_all_unimplemented_interfaces)})},fixIds:[DAe],getAllCodeActions(t){const r=new Map;return jl(t,Ztt,(a,u)=>{const h=Ytt(u.file,u.start);if(Lm(r,Tl(h)))for(const p of H6(h))tit(t,p,u.file,h,a,t.preferences)})}});function Ytt(t,r){return z.checkDefined(Sf(Rs(t,r)),"There should be a containing class")}function eit(t){return!t.valueDeclaration||!(Wh(t.valueDeclaration)&2)}function tit(t,r,a,u,h,p){const m=t.program.getTypeChecker(),C=U8t(u,m),b=m.getTypeAtLocation(r),E=m.getPropertiesOfType(b).filter(u$(eit,q=>!C.has(q.escapedName))),N=m.getTypeAtLocation(u),R=Me(u.members,q=>fu(q));N.getNumberIndexType()||j(b,1),N.getStringIndexType()||j(b,0);const F=_D(a,t.program,p,t.host);v4e(u,E,a,t,p,F,q=>U(a,u,q)),F.writeFixes(h);function j(q,Q){const re=m.getIndexInfoOfType(q,Q);re&&U(a,u,m.indexInfoToIndexSignatureDeclaration(re,u,void 0,J3(t)))}function U(q,Q,re){R?h.insertNodeAfter(q,R,re):h.insertMemberAtStart(q,Q,re)}}function U8t(t,r){const a=Pv(t);if(!a)return ga();const u=r.getTypeAtLocation(a),h=r.getPropertiesOfType(u);return ga(h.filter(eit))}var iit="import",nit="fixMissingImport",rit=[k.Cannot_find_name_0.code,k.Cannot_find_name_0_Did_you_mean_1.code,k.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,k.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,k.Cannot_find_namespace_0.code,k._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code,k._0_only_refers_to_a_type_but_is_being_used_as_a_value_here.code,k.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code,k._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code,k.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery.code,k.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later.code,k.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom.code,k.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig.code,k.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code,k.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig.code,k.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha.code,k.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode.code,k.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig.code,k.Cannot_find_namespace_0_Did_you_mean_1.code];Ea({errorCodes:rit,getCodeActions(t){const{errorCode:r,preferences:a,sourceFile:u,span:h,program:p}=t,m=dit(t,r,h.start,!0);if(m)return m.map(({fix:C,symbolName:b,errorIdentifierText:T})=>IAe(t,u,b,C,b!==T,p,a))},fixIds:[nit],getAllCodeActions:t=>{const{sourceFile:r,program:a,preferences:u,host:h,cancellationToken:p}=t,m=sit(r,a,!0,u,h,p);return tA(t,rit,C=>m.addImportFromDiagnostic(C,t)),eA(er.ChangeTracker.with(t,m.writeFixes))}});function _D(t,r,a,u,h){return sit(t,r,!1,a,u,h)}function sit(t,r,a,u,h,p){const m=r.getCompilerOptions(),C=[],b=[],T=new Map,E=new Set,N=new Set,R=new Map;return{addImportFromDiagnostic:U,addImportFromExportedSymbol:q,writeFixes:ue,hasFixes:Se,addImportForUnresolvedIdentifier:j,addImportForNonExistentExport:Q,removeExistingImport:re,addVerbatimImport:F};function F(oe){N.add(oe)}function j(oe,pe,ye){const be=t7t(oe,pe,ye);!be||!be.length||Y(ma(be))}function U(oe,pe){const ye=dit(pe,oe.code,oe.start,a);!ye||!ye.length||Y(ma(ye))}function q(oe,pe,ye){var be;const _e=z.checkDefined(oe.parent),ve=dX(oe,il(m)),Ee=r.getTypeChecker(),ke=Ee.getMergedSymbol(Of(oe,Ee)),Fe=lit(t,ke,ve,_e,!1,r,h,u,p),Oe=HX(t,r);let fe=oit(t,z.checkDefined(Fe),r,void 0,!!pe,Oe,h,u);if(fe){const Ie=((be=$r(ye==null?void 0:ye.name,lt))==null?void 0:be.text)??ve;ye&&l8(ye)&&(fe.kind===3||fe.kind===2)&&fe.addAsTypeOnly===1&&(fe={...fe,addAsTypeOnly:2}),Y({fix:fe,symbolName:Ie??ve,errorIdentifierText:void 0})}}function Q(oe,pe,ye,be,_e){const ve=r.getSourceFile(pe),Ee=HX(t,r);if(ve&&ve.symbol){const{fixes:ke}=VX([{exportKind:ye,isFromPackageJson:!1,moduleFileName:pe,moduleSymbol:ve.symbol,targetFlags:be}],void 0,_e,Ee,r,t,h,u);ke.length&&Y({fix:ke[0],symbolName:oe,errorIdentifierText:oe})}else{const ke=vX(pe,99,r,h),Fe=e2.getLocalModuleSpecifierBetweenFileNames(t,pe,m,KP(r,h)),Oe=Bfe(ke,ye,m),fe=Ffe(_e,!0,void 0,be,r.getTypeChecker(),m);Y({fix:{kind:3,moduleSpecifierKind:"relative",moduleSpecifier:Fe,importKind:Oe,addAsTypeOnly:fe,useRequire:Ee},symbolName:oe,errorIdentifierText:oe})}}function re(oe){oe.kind===273&&z.assertIsDefined(oe.name,"ImportClause should have a name if it's being removed"),E.add(oe)}function Y(oe){var pe,ye;const{fix:be,symbolName:_e}=oe;switch(be.kind){case 0:C.push(be);break;case 1:b.push(be);break;case 2:{const{importClauseOrBindingPattern:Fe,importKind:Oe,addAsTypeOnly:fe}=be;let Ie=T.get(Fe);if(Ie||T.set(Fe,Ie={importClauseOrBindingPattern:Fe,defaultImport:void 0,namedImports:new Map}),Oe===0){const Le=Ie==null?void 0:Ie.namedImports.get(_e);Ie.namedImports.set(_e,ve(Le,fe))}else z.assert(Ie.defaultImport===void 0||Ie.defaultImport.name===_e,"(Add to Existing) Default import should be missing or match symbolName"),Ie.defaultImport={name:_e,addAsTypeOnly:ve((pe=Ie.defaultImport)==null?void 0:pe.addAsTypeOnly,fe)};break}case 3:{const{moduleSpecifier:Fe,importKind:Oe,useRequire:fe,addAsTypeOnly:Ie}=be,Le=Ee(Fe,Oe,fe,Ie);switch(z.assert(Le.useRequire===fe,"(Add new) Tried to add an `import` and a `require` for the same module"),Oe){case 1:z.assert(Le.defaultImport===void 0||Le.defaultImport.name===_e,"(Add new) Default import should be missing or match symbolName"),Le.defaultImport={name:_e,addAsTypeOnly:ve((ye=Le.defaultImport)==null?void 0:ye.addAsTypeOnly,Ie)};break;case 0:const et=(Le.namedImports||(Le.namedImports=new Map)).get(_e);Le.namedImports.set(_e,ve(et,Ie));break;case 3:if(m.verbatimModuleSyntax){const He=(Le.namedImports||(Le.namedImports=new Map)).get(_e);Le.namedImports.set(_e,ve(He,Ie))}else z.assert(Le.namespaceLikeImport===void 0||Le.namespaceLikeImport.name===_e,"Namespacelike import shoudl be missing or match symbolName"),Le.namespaceLikeImport={importKind:Oe,name:_e,addAsTypeOnly:Ie};break;case 2:z.assert(Le.namespaceLikeImport===void 0||Le.namespaceLikeImport.name===_e,"Namespacelike import shoudl be missing or match symbolName"),Le.namespaceLikeImport={importKind:Oe,name:_e,addAsTypeOnly:Ie};break}break}case 4:break;default:z.assertNever(be,`fix wasn't never - got kind ${be.kind}`)}function ve(Fe,Oe){return Math.max(Fe??0,Oe)}function Ee(Fe,Oe,fe,Ie){const Le=ke(Fe,!0),et=ke(Fe,!1),He=R.get(Le),We=R.get(et),Ue={defaultImport:void 0,namedImports:void 0,namespaceLikeImport:void 0,useRequire:fe};return Oe===1&&Ie===2?He||(R.set(Le,Ue),Ue):Ie===1&&(He||We)?He||We:We||(R.set(et,Ue),Ue)}function ke(Fe,Oe){return`${Oe?1:0}|${Fe}`}}function ue(oe,pe){var ye,be;let _e;aS(t)&&t.imports.length===0&&pe!==void 0?_e=pe:_e=bg(t,u);for(const ke of C)NAe(oe,t,ke);for(const ke of b)bit(oe,t,ke,_e);let ve;if(E.size){z.assert(aS(t),"Cannot remove imports from a future source file");const ke=new Set(ns([...E],Le=>Xi(Le,Cu))),Fe=new Set(ns([...E],Le=>Xi(Le,fW))),Oe=[...ke].filter(Le=>{var et,He,We;return!T.has(Le.importClause)&&(!((et=Le.importClause)!=null&&et.name)||E.has(Le.importClause))&&(!$r((He=Le.importClause)==null?void 0:He.namedBindings,eb)||E.has(Le.importClause.namedBindings))&&(!$r((We=Le.importClause)==null?void 0:We.namedBindings,zv)||Be(Le.importClause.namedBindings.elements,Ue=>E.has(Ue)))}),fe=[...Fe].filter(Le=>(Le.name.kind!==206||!T.has(Le.name))&&(Le.name.kind!==206||Be(Le.name.elements,et=>E.has(et)))),Ie=[...ke].filter(Le=>{var et,He;return((et=Le.importClause)==null?void 0:et.namedBindings)&&Oe.indexOf(Le)===-1&&!((He=T.get(Le.importClause))!=null&&He.namedImports)&&(Le.importClause.namedBindings.kind===274||Be(Le.importClause.namedBindings.elements,We=>E.has(We)))});for(const Le of[...Oe,...fe])oe.delete(t,Le);for(const Le of Ie)oe.replaceNode(t,Le.importClause,G.updateImportClause(Le.importClause,Le.importClause.isTypeOnly,Le.importClause.name,void 0));for(const Le of E){const et=Xi(Le,Cu);et&&Oe.indexOf(et)===-1&&Ie.indexOf(et)===-1?Le.kind===273?oe.delete(t,Le.name):(z.assert(Le.kind===276,"NamespaceImport should have been handled earlier"),(ye=T.get(et.importClause))!=null&&ye.namedImports?(ve??(ve=new Set)).add(Le):oe.delete(t,Le)):Le.kind===208?(be=T.get(Le.parent))!=null&&be.namedImports?(ve??(ve=new Set)).add(Le):oe.delete(t,Le):Le.kind===271&&oe.delete(t,Le)}}T.forEach(({importClauseOrBindingPattern:ke,defaultImport:Fe,namedImports:Oe})=>{yit(oe,t,ke,Fe,Fn(Oe.entries(),([fe,Ie])=>({addAsTypeOnly:Ie,name:fe})),ve,u)});let Ee;R.forEach(({useRequire:ke,defaultImport:Fe,namedImports:Oe,namespaceLikeImport:fe},Ie)=>{const Le=Ie.slice(2),He=(ke?wit:Sit)(Le,_e,Fe,Oe&&Fn(Oe.entries(),([We,Ue])=>({addAsTypeOnly:Ue,name:We})),fe,m,u);Ee=au(Ee,He)}),Ee=au(Ee,te()),Ee&&ude(oe,t,Ee,!0,u)}function te(){if(!N.size)return;const oe=new Set(ns([...N],ye=>Xi(ye,Cu))),pe=new Set(ns([...N],ye=>Xi(ye,hW)));return[...ns([...N],ye=>ye.kind===271?Pl(ye,!0):void 0),...[...oe].map(ye=>{var be;return N.has(ye)?Pl(ye,!0):Pl(G.updateImportDeclaration(ye,ye.modifiers,ye.importClause&&G.updateImportClause(ye.importClause,ye.importClause.isTypeOnly,N.has(ye.importClause)?ye.importClause.name:void 0,N.has(ye.importClause.namedBindings)?ye.importClause.namedBindings:(be=$r(ye.importClause.namedBindings,zv))!=null&&be.elements.some(_e=>N.has(_e))?G.updateNamedImports(ye.importClause.namedBindings,ye.importClause.namedBindings.elements.filter(_e=>N.has(_e))):void 0),ye.moduleSpecifier,ye.attributes),!0)}),...[...pe].map(ye=>N.has(ye)?Pl(ye,!0):Pl(G.updateVariableStatement(ye,ye.modifiers,G.updateVariableDeclarationList(ye.declarationList,ns(ye.declarationList.declarations,be=>N.has(be)?be:G.updateVariableDeclaration(be,be.name.kind===206?G.updateObjectBindingPattern(be.name,be.name.elements.filter(_e=>N.has(_e))):be.name,be.exclamationToken,be.type,be.initializer)))),!0))]}function Se(){return C.length>0||b.length>0||T.size>0||R.size>0||N.size>0||E.size>0}}function q8t(t,r,a,u){const h=V3(t,u,a),p=cit(r.getTypeChecker(),t,r.getCompilerOptions());return{getModuleSpecifierForBestExportInfo:m};function m(C,b,T,E){const{fixes:N,computedWithoutCacheCount:R}=VX(C,b,T,!1,r,t,a,u,p,E),F=hit(N,t,r,h,a,u);return F&&{...F,computedWithoutCacheCount:R}}}function $8t(t,r,a,u,h,p,m,C,b,T,E,N){let R;a?(R=EH(u,m,C,E,N).get(u.path,a),z.assertIsDefined(R,"Some exportInfo should match the specified exportMapKey")):(R=$re(Nm(r.name))?[G8t(t,h,r,C,m)]:lit(u,t,h,r,p,C,m,E,N),z.assertIsDefined(R,"Some exportInfo should match the specified symbol / moduleSymbol"));const F=HX(u,C),j=Wk(Rs(u,T)),U=z.checkDefined(oit(u,R,C,T,j,F,m,E));return{moduleSpecifier:U.moduleSpecifier,codeAction:ait(IAe({host:m,formatContext:b,preferences:E},u,h,U,!1,C,E))}}function J8t(t,r,a,u,h,p){const m=a.getCompilerOptions(),C=zE(EAe(t,a.getTypeChecker(),r,m)),b=mit(t,r,C,a),T=C!==r.text;return b&&ait(IAe({host:u,formatContext:h,preferences:p},t,C,b,T,a,p))}function oit(t,r,a,u,h,p,m,C){const b=V3(t,C,m);return hit(VX(r,u,h,p,a,t,m,C).fixes,t,a,b,m,C)}function ait({description:t,changes:r,commands:a}){return{description:t,changes:r,commands:a}}function lit(t,r,a,u,h,p,m,C,b){const T=uit(p,m);return EH(t,m,p,C,b).search(t.path,h,E=>E===a,E=>{if(Of(E[0].symbol,T(E[0].isFromPackageJson))===r&&E.some(N=>N.moduleSymbol===u||N.symbol.parent===u))return E})}function G8t(t,r,a,u,h){var p,m;const C=T(u.getTypeChecker(),!1);if(C)return C;const b=(m=(p=h.getPackageJsonAutoImportProvider)==null?void 0:p.call(h))==null?void 0:m.getTypeChecker();return z.checkDefined(b&&T(b,!0),"Could not find symbol in specified module for code actions");function T(E,N){const R=yX(a,E);if(R&&Of(R.symbol,E)===t)return{symbol:R.symbol,moduleSymbol:a,moduleFileName:void 0,exportKind:R.exportKind,targetFlags:Of(t,E).flags,isFromPackageJson:N};const F=E.tryGetMemberInModuleExportsAndProperties(r,a);if(F&&Of(F,E)===t)return{symbol:F,moduleSymbol:a,moduleFileName:void 0,exportKind:0,targetFlags:Of(t,E).flags,isFromPackageJson:N}}}function VX(t,r,a,u,h,p,m,C,b=aS(p)?cit(h.getTypeChecker(),p,h.getCompilerOptions()):void 0,T){const E=h.getTypeChecker(),N=b?Ln(t,b.getImportsForExportInfo):x,R=r!==void 0&&K8t(N,r),F=X8t(N,a,E,h.getCompilerOptions());if(F)return{computedWithoutCacheCount:0,fixes:[...R?[R]:x,F]};const{fixes:j,computedWithoutCacheCount:U=0}=Y8t(t,N,h,p,r,a,u,m,C,T);return{computedWithoutCacheCount:U,fixes:[...R?[R]:x,...j]}}function K8t(t,r){return Z(t,({declaration:a,importKind:u})=>{var h;if(u!==0)return;const p=Q8t(a),m=p&&((h=x8(a))==null?void 0:h.text);if(m)return{kind:0,namespacePrefix:p,usagePosition:r,moduleSpecifierKind:void 0,moduleSpecifier:m}})}function Q8t(t){var r,a,u;switch(t.kind){case 260:return(r=$r(t.name,lt))==null?void 0:r.text;case 271:return t.name.text;case 351:case 272:return(u=$r((a=t.importClause)==null?void 0:a.namedBindings,eb))==null?void 0:u.name.text;default:return z.assertNever(t)}}function Ffe(t,r,a,u,h,p){return t?a&&p.verbatimModuleSyntax&&(!(u&111551)||h.getTypeOnlyAliasDeclaration(a))?2:1:4}function X8t(t,r,a,u){let h;for(const m of t){const C=p(m);if(!C)continue;const b=l8(C.importClauseOrBindingPattern);if(C.addAsTypeOnly!==4&&b||C.addAsTypeOnly===4&&!b)return C;h??(h=C)}return h;function p({declaration:m,importKind:C,symbol:b,targetFlags:T}){if(C===3||C===2||m.kind===271)return;if(m.kind===260)return(C===0||C===1)&&m.name.kind===206?{kind:2,importClauseOrBindingPattern:m.name,importKind:C,moduleSpecifierKind:void 0,moduleSpecifier:m.initializer.arguments[0].text,addAsTypeOnly:4}:void 0;const{importClause:E}=m;if(!E||!Ml(m.moduleSpecifier))return;const{name:N,namedBindings:R}=E;if(E.isTypeOnly&&!(C===0&&R))return;const F=Ffe(r,!1,b,T,a,u);if(!(C===1&&(N||F===2&&R))&&!(C===0&&(R==null?void 0:R.kind)===274))return{kind:2,importClauseOrBindingPattern:E,importKind:C,moduleSpecifierKind:void 0,moduleSpecifier:m.moduleSpecifier.text,addAsTypeOnly:F}}}function cit(t,r,a){let u;for(const h of r.imports){const p=k8(h);if(fW(p.parent)){const m=t.resolveExternalModuleName(h);m&&(u||(u=Ug())).add(Aa(m),p.parent)}else if(p.kind===272||p.kind===271||p.kind===351){const m=t.getSymbolAtLocation(h);m&&(u||(u=Ug())).add(Aa(m),p)}}return{getImportsForExportInfo:({moduleSymbol:h,exportKind:p,targetFlags:m,symbol:C})=>{const b=u==null?void 0:u.get(Aa(h));if(!b||F_(r)&&!(m&111551)&&!Be(b,$v))return x;const T=Bfe(r,p,a);return b.map(E=>({declaration:E,importKind:T,symbol:C,targetFlags:m}))}}}function HX(t,r){if(!Zy(t.fileName))return!1;if(t.commonJsModuleIndicator&&!t.externalModuleIndicator)return!0;if(t.externalModuleIndicator&&!t.commonJsModuleIndicator)return!1;const a=r.getCompilerOptions();if(a.configFile)return Vh(a)<5;if(t.impliedNodeFormat===1)return!0;if(t.impliedNodeFormat===99)return!1;for(const u of r.getSourceFiles())if(!(u===t||!F_(u)||r.isSourceFileFromExternalLibrary(u))){if(u.commonJsModuleIndicator&&!u.externalModuleIndicator)return!0;if(u.externalModuleIndicator&&!u.commonJsModuleIndicator)return!1}return!0}function uit(t,r){return I1(a=>a?r.getPackageJsonAutoImportProvider().getTypeChecker():t.getTypeChecker())}function Z8t(t,r,a,u,h,p,m,C,b){const T=Zy(r.fileName),E=t.getCompilerOptions(),N=KP(t,m),R=uit(t,m),F=f_(E),j=GQ(F),U=b?re=>e2.tryGetModuleSpecifiersFromCache(re.moduleSymbol,r,N,C):(re,Y)=>e2.getModuleSpecifiersWithCacheInfo(re.moduleSymbol,Y,E,r,N,C,void 0,!0);let q=0;const Q=Ln(p,(re,Y)=>{const ue=R(re.isFromPackageJson),{computedWithoutCache:te,moduleSpecifiers:Se,kind:oe}=U(re,ue)??{},pe=!!(re.targetFlags&111551),ye=Ffe(u,!0,re.symbol,re.targetFlags,ue,E);return q+=te?1:0,ns(Se,be=>{if(j&&Zk(be))return;if(!pe&&T&&a!==void 0)return{kind:1,moduleSpecifierKind:oe,moduleSpecifier:be,usagePosition:a,exportInfo:re,isReExport:Y>0};const _e=Bfe(r,re.exportKind,E);let ve;if(a!==void 0&&_e===3&&re.exportKind===0){const Ee=ue.resolveExternalModuleSymbol(re.moduleSymbol);let ke;Ee!==re.moduleSymbol&&(ke=Vde(Ee,ue,E,!1,fc)),ke||(ke=hF(re.moduleSymbol,il(E),!1)),ve={namespacePrefix:ke,usagePosition:a}}return{kind:3,moduleSpecifierKind:oe,moduleSpecifier:be,importKind:_e,useRequire:h,addAsTypeOnly:ye,exportInfo:re,isReExport:Y>0,qualification:ve}})});return{computedWithoutCacheCount:q,fixes:Q}}function Y8t(t,r,a,u,h,p,m,C,b,T){const E=Z(r,N=>e7t(N,p,m,a.getTypeChecker(),a.getCompilerOptions()));return E?{fixes:[E]}:Z8t(a,u,h,p,m,t,C,b,T)}function e7t({declaration:t,importKind:r,symbol:a,targetFlags:u},h,p,m,C){var b;const T=(b=x8(t))==null?void 0:b.text;if(T){const E=p?4:Ffe(h,!0,a,u,m,C);return{kind:3,moduleSpecifierKind:void 0,moduleSpecifier:T,importKind:r,addAsTypeOnly:E,useRequire:p}}}function dit(t,r,a,u){const h=Rs(t.sourceFile,a);let p;if(r===k._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code)p=s7t(t,h);else if(lt(h))if(r===k._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code){const C=zE(EAe(t.sourceFile,t.program.getTypeChecker(),h,t.program.getCompilerOptions())),b=mit(t.sourceFile,h,C,t.program);return b&&[{fix:b,symbolName:C,errorIdentifierText:h.text}]}else p=git(t,h,u);else return;const m=V3(t.sourceFile,t.preferences,t.host);return p&&fit(p,t.sourceFile,t.program,m,t.host,t.preferences)}function fit(t,r,a,u,h,p){const m=C=>_c(C,h.getCurrentDirectory(),cS(h));return tc(t,(C,b)=>bk(!!C.isJsxNamespaceFix,!!b.isJsxNamespaceFix)||hc(C.fix.kind,b.fix.kind)||_it(C.fix,b.fix,r,a,p,u.allowsImportingSpecifier,m))}function t7t(t,r,a){const u=git(t,r,a),h=V3(t.sourceFile,t.preferences,t.host);return u&&fit(u,t.sourceFile,t.program,h,t.host,t.preferences)}function hit(t,r,a,u,h,p){if(Rt(t))return t[0].kind===0||t[0].kind===2?t[0]:t.reduce((m,C)=>_it(C,m,r,a,p,u.allowsImportingSpecifier,b=>_c(b,h.getCurrentDirectory(),cS(h)))===-1?C:m)}function _it(t,r,a,u,h,p,m){return t.kind!==0&&r.kind!==0?bk(r.moduleSpecifierKind!=="node_modules"||p(r.moduleSpecifier),t.moduleSpecifierKind!=="node_modules"||p(t.moduleSpecifier))||i7t(t,r,h)||r7t(t.moduleSpecifier,r.moduleSpecifier,a,u)||bk(pit(t,a.path,m),pit(r,a.path,m))||KW(t.moduleSpecifier,r.moduleSpecifier):0}function i7t(t,r,a){return a.importModuleSpecifierPreference==="non-relative"||a.importModuleSpecifierPreference==="project-relative"?bk(t.moduleSpecifierKind==="relative",r.moduleSpecifierKind==="relative"):0}function pit(t,r,a){var u;if(t.isReExport&&((u=t.exportInfo)!=null&&u.moduleFileName)&&n7t(t.exportInfo.moduleFileName)){const h=a(rs(t.exportInfo.moduleFileName));return ro(r,h)}return!1}function n7t(t){return fd(t,[".js",".jsx",".d.ts",".ts",".tsx"],!0)==="index"}function r7t(t,r,a,u){return ro(t,"node:")&&!ro(r,"node:")?pX(a,u)?-1:1:ro(r,"node:")&&!ro(t,"node:")?pX(a,u)?1:-1:0}function s7t({sourceFile:t,program:r,host:a,preferences:u},h){const p=r.getTypeChecker(),m=o7t(h,p);if(!m)return;const C=p.getAliasedSymbol(m),b=m.name,T=[{symbol:m,moduleSymbol:C,moduleFileName:void 0,exportKind:3,targetFlags:C.flags,isFromPackageJson:!1}],E=HX(t,r);return VX(T,void 0,!1,E,r,t,a,u).fixes.map(R=>{var F;return{fix:R,symbolName:b,errorIdentifierText:(F=$r(h,lt))==null?void 0:F.text}})}function o7t(t,r){const a=lt(t)?r.getSymbolAtLocation(t):void 0;if(GJ(a))return a;const{parent:u}=t;if(eh(u)&&u.tagName===t||yI(u)){const h=r.resolveName(r.getJsxNamespace(u),eh(u)?t:u,111551,!1);if(GJ(h))return h}}function Bfe(t,r,a,u){if(a.verbatimModuleSyntax&&(Vh(a)===1||t.impliedNodeFormat===1))return 3;switch(r){case 0:return 0;case 1:return 1;case 2:return u7t(t,a,!!u);case 3:return a7t(t,a,!!u);default:return z.assertNever(r)}}function a7t(t,r,a){if(cP(r))return 1;const u=Vh(r);switch(u){case 2:case 1:case 3:return Zy(t.fileName)&&(t.externalModuleIndicator||a)?2:3;case 4:case 5:case 6:case 7:case 99:case 0:case 200:return 2;case 100:case 199:return t.impliedNodeFormat===99?2:3;default:return z.assertNever(u,`Unexpected moduleKind ${u}`)}}function git({sourceFile:t,program:r,cancellationToken:a,host:u,preferences:h},p,m){const C=r.getTypeChecker(),b=r.getCompilerOptions();return Ln(EAe(t,C,p,b),T=>{if(T==="default")return;const E=Wk(p),N=HX(t,r),R=c7t(T,M6(p),EI(p),a,t,r,m,u,h);return Fn(zg(R.values(),F=>VX(F,p.getStart(t),E,N,r,t,u,h).fixes),F=>({fix:F,symbolName:T,errorIdentifierText:p.text,isJsxNamespaceFix:T!==p.text}))})}function mit(t,r,a,u){const h=u.getTypeChecker(),p=h.resolveName(a,r,111551,!0);if(!p)return;const m=h.getTypeOnlyAliasDeclaration(p);if(!(!m||_n(m)!==t))return{kind:4,typeOnlyAliasDeclaration:m}}function EAe(t,r,a,u){const h=a.parent;if((eh(h)||QT(h))&&h.tagName===a&&Mde(u.jsx)){const p=r.getJsxNamespace(t);if(l7t(p,a,r))return!U6(a.text)&&!r.resolveName(a.text,a,111551,!1)?[a.text,p]:[p]}return[a.text]}function l7t(t,r,a){if(U6(r.text))return!0;const u=a.resolveName(t,r,111551,!0);return!u||Rt(u.declarations,Dk)&&!(u.flags&111551)}function c7t(t,r,a,u,h,p,m,C,b){var T;const E=Ug(),N=V3(h,b,C),R=(T=C.getModuleSpecifierCache)==null?void 0:T.call(C),F=I1(U=>KP(U?C.getPackageJsonAutoImportProvider():p,C));function j(U,q,Q,re,Y,ue){const te=F(ue);if(q&&Bde(Y,h,q,b,N,te,R)||!q&&N.allowsImportingAmbientModule(U,te)){const Se=Y.getTypeChecker();E.add(ZNe(Q,Se).toString(),{symbol:Q,moduleSymbol:U,moduleFileName:q==null?void 0:q.fileName,exportKind:re,targetFlags:Of(Q,Se).flags,isFromPackageJson:ue})}}return Wde(p,C,b,m,(U,q,Q,re)=>{const Y=Q.getTypeChecker();u.throwIfCancellationRequested();const ue=Q.getCompilerOptions(),te=yX(U,Y);te&&kit(Y.getSymbolFlags(te.symbol),a)&&Vde(te.symbol,Y,ue,r,oe=>oe===t)&&j(U,q,te.symbol,te.exportKind,Q,re);const Se=Y.tryGetMemberInModuleExportsAndProperties(t,U);Se&&kit(Y.getSymbolFlags(Se),a)&&j(U,q,Se,0,Q,re)}),E}function u7t(t,r,a){const u=cP(r),h=Zy(t.fileName);if(!h&&Vh(r)>=5)return u?1:2;if(h)return t.externalModuleIndicator||a?u?1:2:3;for(const p of t.statements??x)if(kd(p)&&!vu(p.moduleReference))return 3;return u?1:3}function IAe(t,r,a,u,h,p,m){let C;const b=er.ChangeTracker.with(t,T=>{C=d7t(T,r,a,u,h,p,m)});return oa(iit,b,C,nit,k.Add_all_missing_imports)}function d7t(t,r,a,u,h,p,m){const C=bg(r,m);switch(u.kind){case 0:return NAe(t,r,u),[k.Change_0_to_1,a,`${u.namespacePrefix}.${a}`];case 1:return bit(t,r,u,C),[k.Change_0_to_1,a,Cit(u.moduleSpecifier,C)+a];case 2:{const{importClauseOrBindingPattern:b,importKind:T,addAsTypeOnly:E,moduleSpecifier:N}=u;yit(t,r,b,T===1?{name:a,addAsTypeOnly:E}:void 0,T===0?[{name:a,addAsTypeOnly:E}]:x,void 0,m);const R=Nm(N);return h?[k.Import_0_from_1,a,R]:[k.Update_import_from_0,R]}case 3:{const{importKind:b,moduleSpecifier:T,addAsTypeOnly:E,useRequire:N,qualification:R}=u,F=N?wit:Sit,j=b===1?{name:a,addAsTypeOnly:E}:void 0,U=b===0?[{name:a,addAsTypeOnly:E}]:void 0,q=b===2||b===3?{importKind:b,name:(R==null?void 0:R.namespacePrefix)||a,addAsTypeOnly:E}:void 0;return ude(t,r,F(T,C,j,U,q,p.getCompilerOptions(),m),!0,m),R&&NAe(t,r,R),h?[k.Import_0_from_1,a,T]:[k.Add_import_from_0,T]}case 4:{const{typeOnlyAliasDeclaration:b}=u,T=f7t(t,b,p,r,m);return T.kind===276?[k.Remove_type_from_import_of_0_from_1,a,vit(T.parent.parent)]:[k.Remove_type_from_import_declaration_from_0,vit(T)]}default:return z.assertNever(u,`Unexpected fix kind ${u.kind}`)}}function vit(t){var r,a;return t.kind===271?((a=$r((r=$r(t.moduleReference,Kb))==null?void 0:r.expression,Ml))==null?void 0:a.text)||t.moduleReference.getText():ua(t.parent.moduleSpecifier,ja).text}function f7t(t,r,a,u,h){const p=a.getCompilerOptions(),m=p.verbatimModuleSyntax;switch(r.kind){case 276:if(r.isTypeOnly){if(r.parent.elements.length>1){const b=G.updateImportSpecifier(r,!1,r.propertyName,r.name),{specifierComparer:T}=c2.getNamedImportSpecifierComparerWithDetection(r.parent.parent.parent,h,u),E=c2.getImportSpecifierInsertionIndex(r.parent.elements,b,T);if(E!==r.parent.elements.indexOf(r))return t.delete(u,r),t.insertImportSpecifierAtIndex(u,b,r.parent,E),r}return t.deleteRange(u,{pos:Nk(r.getFirstToken()),end:Nk(r.propertyName??r.name)}),r}else return z.assert(r.parent.parent.isTypeOnly),C(r.parent.parent),r.parent.parent;case 273:return C(r),r;case 274:return C(r.parent),r.parent;case 271:return t.deleteRange(u,r.getChildAt(1)),r;default:z.failBadSyntaxKind(r)}function C(b){var T;if(t.delete(u,dde(b,u)),!p.allowImportingTsExtensions){const E=x8(b.parent),N=E&&((T=a.getResolvedModuleFromModuleSpecifier(E,u))==null?void 0:T.resolvedModule);if(N!=null&&N.resolvedUsingTsExtension){const R=SB(E.text,JK(E.text,p));t.replaceNode(u,E,G.createStringLiteral(R))}}if(m){const E=$r(b.namedBindings,zv);if(E&&E.elements.length>1){c2.getNamedImportSpecifierComparerWithDetection(b.parent,h,u).isSorted!==!1&&r.kind===276&&E.elements.indexOf(r)!==0&&(t.delete(u,r),t.insertImportSpecifierAtIndex(u,r,E,0));for(const R of E.elements)R!==r&&!R.isTypeOnly&&t.insertModifierBefore(u,156,R)}}}}function yit(t,r,a,u,h,p,m){var C;if(a.kind===206){if(p&&a.elements.some(N=>p.has(N))){t.replaceNode(r,a,G.createObjectBindingPattern([...a.elements.filter(N=>!p.has(N)),...u?[G.createBindingElement(void 0,"default",u.name)]:x,...h.map(N=>G.createBindingElement(void 0,void 0,N.name))]));return}u&&E(a,u.name,"default");for(const N of h)E(a,N.name,void 0);return}const b=a.isTypeOnly&&Rt([u,...h],N=>(N==null?void 0:N.addAsTypeOnly)===4),T=a.namedBindings&&((C=$r(a.namedBindings,zv))==null?void 0:C.elements);if(u&&(z.assert(!a.name,"Cannot add a default import to an import clause that already has one"),t.insertNodeAt(r,a.getStart(r),G.createIdentifier(u.name),{suffix:", "})),h.length){const{specifierComparer:N,isSorted:R}=c2.getNamedImportSpecifierComparerWithDetection(a.parent,m,r),F=$p(h.map(j=>G.createImportSpecifier((!a.isTypeOnly||b)&&Wfe(j,m),void 0,G.createIdentifier(j.name))),N);if(p)t.replaceNode(r,a.namedBindings,G.updateNamedImports(a.namedBindings,$p([...T.filter(j=>!p.has(j)),...F],N)));else if(T!=null&&T.length&&R!==!1){const j=b&&T?G.updateNamedImports(a.namedBindings,Is(T,U=>G.updateImportSpecifier(U,!0,U.propertyName,U.name))).elements:T;for(const U of F){const q=c2.getImportSpecifierInsertionIndex(j,U,N);t.insertImportSpecifierAtIndex(r,U,a.namedBindings,q)}}else if(T!=null&&T.length)for(const j of F)t.insertNodeInListAfter(r,La(T),j,T);else if(F.length){const j=G.createNamedImports(F);a.namedBindings?t.replaceNode(r,a.namedBindings,j):t.insertNodeAfter(r,z.checkDefined(a.name,"Import clause must have either named imports or a default import"),j)}}if(b&&(t.delete(r,dde(a,r)),T))for(const N of T)t.insertModifierBefore(r,156,N);function E(N,R,F){const j=G.createBindingElement(void 0,F,R);N.elements.length?t.insertNodeInListAfter(r,La(N.elements),j):t.replaceNode(r,N,G.createObjectBindingPattern([j]))}}function NAe(t,r,{namespacePrefix:a,usagePosition:u}){t.insertText(r,u,a+".")}function bit(t,r,{moduleSpecifier:a,usagePosition:u},h){t.insertText(r,u,Cit(a,h))}function Cit(t,r){const a=lde(r);return`import(${a}${t}${a}).`}function LAe({addAsTypeOnly:t}){return t===2}function Wfe(t,r){return LAe(t)||!!r.preferTypeOnlyAutoImports&&t.addAsTypeOnly!==4}function Sit(t,r,a,u,h,p,m){const C=oF(t,r);let b;if(a!==void 0||u!=null&&u.length){const T=(!a||LAe(a))&&Be(u,LAe)||(p.verbatimModuleSyntax||m.preferTypeOnlyAutoImports)&&(a==null?void 0:a.addAsTypeOnly)!==4&&!Rt(u,E=>E.addAsTypeOnly===4);b=au(b,ux(a&&G.createIdentifier(a.name),u==null?void 0:u.map(E=>G.createImportSpecifier(!T&&Wfe(E,m),void 0,G.createIdentifier(E.name))),t,r,T))}if(h){const T=h.importKind===3?G.createImportEqualsDeclaration(void 0,Wfe(h,m),G.createIdentifier(h.name),G.createExternalModuleReference(C)):G.createImportDeclaration(void 0,G.createImportClause(Wfe(h,m),void 0,G.createNamespaceImport(G.createIdentifier(h.name))),C,void 0);b=au(b,T)}return z.checkDefined(b)}function wit(t,r,a,u,h){const p=oF(t,r);let m;if(a||u!=null&&u.length){const C=(u==null?void 0:u.map(({name:T})=>G.createBindingElement(void 0,void 0,T)))||[];a&&C.unshift(G.createBindingElement(void 0,"default",a.name));const b=xit(G.createObjectBindingPattern(C),p);m=au(m,b)}if(h){const C=xit(h.name,p);m=au(m,C)}return z.checkDefined(m)}function xit(t,r){return G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(typeof t=="string"?G.createIdentifier(t):t,void 0,void 0,G.createCallExpression(G.createIdentifier("require"),void 0,[r]))],2))}function kit(t,r){return r===7?!0:r&1?!!(t&111551):r&2?!!(t&788968):r&4?!!(t&1920):!1}var PAe="addMissingConstraint",Tit=[k.Type_0_is_not_comparable_to_type_1.code,k.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code,k.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,k.Type_0_is_not_assignable_to_type_1.code,k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,k.Property_0_is_incompatible_with_index_signature.code,k.Property_0_in_type_1_is_not_assignable_to_type_2.code,k.Type_0_does_not_satisfy_the_constraint_1.code];Ea({errorCodes:Tit,getCodeActions(t){const{sourceFile:r,span:a,program:u,preferences:h,host:p}=t,m=Dit(u,r,a);if(m===void 0)return;const C=er.ChangeTracker.with(t,b=>Eit(b,u,h,p,r,m));return[oa(PAe,C,k.Add_extends_constraint,PAe,k.Add_extends_constraint_to_all_type_parameters)]},fixIds:[PAe],getAllCodeActions:t=>{const{program:r,preferences:a,host:u}=t,h=new Map;return eA(er.ChangeTracker.with(t,p=>{tA(t,Tit,m=>{const C=Dit(r,m.file,Pf(m.start,m.length));if(C&&Lm(h,Tl(C.declaration)))return Eit(p,r,a,u,m.file,C)})}))}});function Dit(t,r,a){const u=Me(t.getSemanticDiagnostics(r),m=>m.start===a.start&&m.length===a.length);if(u===void 0||u.relatedInformation===void 0)return;const h=Me(u.relatedInformation,m=>m.code===k.This_type_parameter_might_need_an_extends_0_constraint.code);if(h===void 0||h.file===void 0||h.start===void 0||h.length===void 0)return;let p=k4e(h.file,Pf(h.start,h.length));if(p!==void 0&&(lt(p)&&Uc(p.parent)&&(p=p.parent),Uc(p))){if(pI(p.parent))return;const m=Rs(r,a.start),C=t.getTypeChecker();return{constraint:_7t(C,m)||h7t(h.messageText),declaration:p,token:m}}}function Eit(t,r,a,u,h,p){const{declaration:m,constraint:C}=p,b=r.getTypeChecker();if(mo(C))t.insertText(h,m.name.end,` extends ${C}`);else{const T=il(r.getCompilerOptions()),E=J3({program:r,host:u}),N=_D(h,r,a,u),R=UX(b,N,C,void 0,T,void 0,E);R&&(t.replaceNode(h,m,G.updateTypeParameterDeclaration(m,void 0,m.name,R,m.default)),N.writeFixes(t))}}function h7t(t){const[,r]=Jv(t,` +`,0).match(/`extends (.*)`/)||[];return r}function _7t(t,r){return gs(r.parent)?t.getTypeArgumentConstraint(r.parent):(Ut(r)?t.getContextualType(r):void 0)||t.getTypeAtLocation(r)}var Iit="fixOverrideModifier",HH="fixAddOverrideModifier",jX="fixRemoveOverrideModifier",Nit=[k.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code,k.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code,k.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code,k.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code,k.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code,k.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code,k.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code,k.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code,k.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code],Lit={[k.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code]:{descriptions:k.Add_override_modifier,fixId:HH,fixAllDescriptions:k.Add_all_missing_override_modifiers},[k.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code]:{descriptions:k.Add_override_modifier,fixId:HH,fixAllDescriptions:k.Add_all_missing_override_modifiers},[k.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code]:{descriptions:k.Remove_override_modifier,fixId:jX,fixAllDescriptions:k.Remove_all_unnecessary_override_modifiers},[k.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code]:{descriptions:k.Remove_override_modifier,fixId:jX,fixAllDescriptions:k.Remove_override_modifier},[k.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code]:{descriptions:k.Add_override_modifier,fixId:HH,fixAllDescriptions:k.Add_all_missing_override_modifiers},[k.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code]:{descriptions:k.Add_override_modifier,fixId:HH,fixAllDescriptions:k.Add_all_missing_override_modifiers},[k.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code]:{descriptions:k.Add_override_modifier,fixId:HH,fixAllDescriptions:k.Remove_all_unnecessary_override_modifiers},[k.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code]:{descriptions:k.Remove_override_modifier,fixId:jX,fixAllDescriptions:k.Remove_all_unnecessary_override_modifiers},[k.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code]:{descriptions:k.Remove_override_modifier,fixId:jX,fixAllDescriptions:k.Remove_all_unnecessary_override_modifiers}};Ea({errorCodes:Nit,getCodeActions:function(r){const{errorCode:a,span:u}=r,h=Lit[a];if(!h)return x;const{descriptions:p,fixId:m,fixAllDescriptions:C}=h,b=er.ChangeTracker.with(r,T=>Pit(T,r,a,u.start));return[eAe(Iit,b,p,m,C)]},fixIds:[Iit,HH,jX],getAllCodeActions:t=>jl(t,Nit,(r,a)=>{const{code:u,start:h}=a,p=Lit[u];!p||p.fixId!==t.fixId||Pit(r,t,u,h)})});function Pit(t,r,a,u){switch(a){case k.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code:case k.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code:case k.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code:case k.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code:case k.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code:return p7t(t,r.sourceFile,u);case k.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code:case k.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code:case k.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code:case k.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code:return g7t(t,r.sourceFile,u);default:z.fail("Unexpected error code: "+a)}}function p7t(t,r,a){const u=Oit(r,a);if(F_(r)){t.addJSDocTags(r,u,[G.createJSDocOverrideTag(G.createIdentifier("override"))]);return}const h=u.modifiers||x,p=Me(h,wP),m=Me(h,$2e),C=Me(h,N=>Xue(N.kind)),b=vt(h,jd),T=m?m.end:p?p.end:C?C.end:b?qa(r.text,b.end):u.getStart(r),E=C||p||m?{prefix:" "}:{suffix:" "};t.insertModifierAt(r,T,164,E)}function g7t(t,r,a){const u=Oit(r,a);if(F_(r)){t.filterJSDocTags(r,u,d$(GG));return}const h=Me(u.modifiers,J2e);z.assertIsDefined(h),t.deleteModifier(r,h)}function Ait(t){switch(t.kind){case 176:case 172:case 174:case 177:case 178:return!0;case 169:return xp(t,t.parent);default:return!1}}function Oit(t,r){const a=Rs(t,r),u=Xi(a,h=>ss(h)?"quit":Ait(h));return z.assert(u&&Ait(u)),u}var AAe="fixNoPropertyAccessFromIndexSignature",Mit=[k.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0.code];Ea({errorCodes:Mit,fixIds:[AAe],getCodeActions(t){const{sourceFile:r,span:a,preferences:u}=t,h=Fit(r,a.start),p=er.ChangeTracker.with(t,m=>Rit(m,t.sourceFile,h,u));return[oa(AAe,p,[k.Use_element_access_for_0,h.name.text],AAe,k.Use_element_access_for_all_undeclared_properties)]},getAllCodeActions:t=>jl(t,Mit,(r,a)=>Rit(r,a.file,Fit(a.file,a.start),t.preferences))});function Rit(t,r,a,u){const h=bg(r,u),p=G.createStringLiteral(a.name.text,h===0);t.replaceNode(r,a,O$(a)?G.createElementAccessChain(a.expression,a.questionDotToken,p):G.createElementAccessExpression(a.expression,p))}function Fit(t,r){return ua(Rs(t,r).parent,Ir)}var OAe="fixImplicitThis",Bit=[k.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code];Ea({errorCodes:Bit,getCodeActions:function(r){const{sourceFile:a,program:u,span:h}=r;let p;const m=er.ChangeTracker.with(r,C=>{p=Wit(C,a,h.start,u.getTypeChecker())});return p?[oa(OAe,m,p,OAe,k.Fix_all_implicit_this_errors)]:x},fixIds:[OAe],getAllCodeActions:t=>jl(t,Bit,(r,a)=>{Wit(r,a.file,a.start,t.program.getTypeChecker())})});function Wit(t,r,a,u){const h=Rs(r,a);if(!A3(h))return;const p=u_(h,!1,!1);if(!(!Uu(p)&&!gc(p))&&!Ns(u_(p,!1,!1))){const m=z.checkDefined(Hl(p,100,r)),{name:C}=p,b=z.checkDefined(p.body);return gc(p)?C&&xc.Core.isSymbolReferencedInFile(C,u,r,b)?void 0:(t.delete(r,m),C&&t.delete(r,C),t.insertText(r,b.pos," =>"),[k.Convert_function_expression_0_to_arrow_function,C?C.text:Tde]):(t.replaceNode(r,m,G.createToken(87)),t.insertText(r,C.end," = "),t.insertText(r,b.pos," =>"),[k.Convert_function_declaration_0_to_arrow_function,C.text])}}var MAe="fixImportNonExportedMember",Vit=[k.Module_0_declares_1_locally_but_it_is_not_exported.code];Ea({errorCodes:Vit,fixIds:[MAe],getCodeActions(t){const{sourceFile:r,span:a,program:u}=t,h=Hit(r,a.start,u);if(h===void 0)return;const p=er.ChangeTracker.with(t,m=>m7t(m,u,h));return[oa(MAe,p,[k.Export_0_from_module_1,h.exportName.node.text,h.moduleSpecifier],MAe,k.Export_all_referenced_locals)]},getAllCodeActions(t){const{program:r}=t;return eA(er.ChangeTracker.with(t,a=>{const u=new Map;tA(t,Vit,h=>{const p=Hit(h.file,h.start,r);if(p===void 0)return;const{exportName:m,node:C,moduleSourceFile:b}=p;if(Vfe(b,m.isTypeOnly)===void 0&&ZW(C))a.insertExportModifier(b,C);else{const T=u.get(b)||{typeOnlyExports:[],exports:[]};m.isTypeOnly?T.typeOnlyExports.push(m):T.exports.push(m),u.set(b,T)}}),u.forEach((h,p)=>{const m=Vfe(p,!0);m&&m.isTypeOnly?(RAe(a,r,p,h.typeOnlyExports,m),RAe(a,r,p,h.exports,Vfe(p,!1))):RAe(a,r,p,[...h.exports,...h.typeOnlyExports],m)})}))}});function Hit(t,r,a){var u,h;const p=Rs(t,r);if(lt(p)){const m=Xi(p,Cu);if(m===void 0)return;const C=ja(m.moduleSpecifier)?m.moduleSpecifier:void 0;if(C===void 0)return;const b=(u=a.getResolvedModuleFromModuleSpecifier(C,t))==null?void 0:u.resolvedModule;if(b===void 0)return;const T=a.getSourceFile(b.resolvedFileName);if(T===void 0||H3(a,T))return;const E=T.symbol,N=(h=$r(E.valueDeclaration,A1))==null?void 0:h.locals;if(N===void 0)return;const R=N.get(p.escapedText);if(R===void 0)return;const F=v7t(R);return F===void 0?void 0:{exportName:{node:p,isTypeOnly:fP(F)},node:F,moduleSourceFile:T,moduleSpecifier:C.text}}}function m7t(t,r,{exportName:a,node:u,moduleSourceFile:h}){const p=Vfe(h,a.isTypeOnly);p?jit(t,r,h,p,[a]):ZW(u)?t.insertExportModifier(h,u):zit(t,r,h,[a])}function RAe(t,r,a,u,h){O(u)&&(h?jit(t,r,a,h,u):zit(t,r,a,u))}function Vfe(t,r){const a=u=>$u(u)&&(r&&u.isTypeOnly||!u.isTypeOnly);return vt(t.statements,a)}function jit(t,r,a,u,h){const p=u.exportClause&&Yg(u.exportClause)?u.exportClause.elements:G.createNodeArray([]),m=!u.isTypeOnly&&!!(Xg(r.getCompilerOptions())||Me(p,C=>C.isTypeOnly));t.replaceNode(a,u,G.updateExportDeclaration(u,u.modifiers,u.isTypeOnly,G.createNamedExports(G.createNodeArray([...p,...Uit(h,m)],p.hasTrailingComma)),u.moduleSpecifier,u.attributes))}function zit(t,r,a,u){t.insertNodeAtEndOfScope(a,a,G.createExportDeclaration(void 0,!1,G.createNamedExports(Uit(u,Xg(r.getCompilerOptions()))),void 0,void 0))}function Uit(t,r){return G.createNodeArray(Yt(t,a=>G.createExportSpecifier(r&&a.isTypeOnly,void 0,a.node)))}function v7t(t){if(t.valueDeclaration===void 0)return lu(t.declarations);const r=t.valueDeclaration,a=ds(r)?$r(r.parent.parent,Ou):void 0;return a&&O(a.declarationList.declarations)===1?a:r}var FAe="fixIncorrectNamedTupleSyntax",y7t=[k.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type.code,k.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type.code];Ea({errorCodes:y7t,getCodeActions:function(r){const{sourceFile:a,span:u}=r,h=b7t(a,u.start),p=er.ChangeTracker.with(r,m=>C7t(m,a,h));return[oa(FAe,p,k.Move_labeled_tuple_element_modifiers_to_labels,FAe,k.Move_labeled_tuple_element_modifiers_to_labels)]},fixIds:[FAe]});function b7t(t,r){const a=Rs(t,r);return Xi(a,u=>u.kind===202)}function C7t(t,r,a){if(!a)return;let u=a.type,h=!1,p=!1;for(;u.kind===190||u.kind===191||u.kind===196;)u.kind===190?h=!0:u.kind===191&&(p=!0),u=u.type;const m=G.updateNamedTupleMember(a,a.dotDotDotToken||(p?G.createToken(26):void 0),a.name,a.questionToken||(h?G.createToken(58):void 0),u);m!==a&&t.replaceNode(r,a,m)}var qit="fixSpelling",$it=[k.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,k.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code,k.Cannot_find_name_0_Did_you_mean_1.code,k.Could_not_find_name_0_Did_you_mean_1.code,k.Cannot_find_namespace_0_Did_you_mean_1.code,k.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,k.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,k._0_has_no_exported_member_named_1_Did_you_mean_2.code,k.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1.code,k.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1.code,k.No_overload_matches_this_call.code,k.Type_0_is_not_assignable_to_type_1.code];Ea({errorCodes:$it,getCodeActions(t){const{sourceFile:r,errorCode:a}=t,u=Jit(r,t.span.start,t,a);if(!u)return;const{node:h,suggestedSymbol:p}=u,m=il(t.host.getCompilationSettings()),C=er.ChangeTracker.with(t,b=>Git(b,r,h,p,m));return[oa("spelling",C,[k.Change_spelling_to_0,xu(p)],qit,k.Fix_all_detected_spelling_errors)]},fixIds:[qit],getAllCodeActions:t=>jl(t,$it,(r,a)=>{const u=Jit(a.file,a.start,t,a.code),h=il(t.host.getCompilationSettings());u&&Git(r,t.sourceFile,u.node,u.suggestedSymbol,h)})});function Jit(t,r,a,u){const h=Rs(t,r),p=h.parent;if((u===k.No_overload_matches_this_call.code||u===k.Type_0_is_not_assignable_to_type_1.code)&&!qv(p))return;const m=a.program.getTypeChecker();let C;if(Ir(p)&&p.name===h){z.assert(Uy(h),"Expected an identifier for spelling (property access)");let b=m.getTypeAtLocation(p.expression);p.flags&64&&(b=m.getNonNullableType(b)),C=m.getSuggestedSymbolForNonexistentProperty(h,b)}else if(cr(p)&&p.operatorToken.kind===103&&p.left===h&&Vs(h)){const b=m.getTypeAtLocation(p.right);C=m.getSuggestedSymbolForNonexistentProperty(h,b)}else if(__(p)&&p.right===h){const b=m.getSymbolAtLocation(p.left);b&&b.flags&1536&&(C=m.getSuggestedSymbolForNonexistentModule(p.right,b))}else if(m_(p)&&p.name===h){z.assertNode(h,lt,"Expected an identifier for spelling (import)");const b=Xi(h,Cu),T=w7t(a,b,t);T&&T.symbol&&(C=m.getSuggestedSymbolForNonexistentModule(h,T.symbol))}else if(qv(p)&&p.name===h){z.assertNode(h,lt,"Expected an identifier for JSX attribute");const b=Xi(h,eh),T=m.getContextualTypeForArgumentAtIndex(b,0);C=m.getSuggestedSymbolForNonexistentJSXAttribute(h,T)}else if(VJ(p)&&Vd(p)&&p.name===h){const b=Xi(h,ss),T=b?Pv(b):void 0,E=T?m.getTypeAtLocation(T):void 0;E&&(C=m.getSuggestedSymbolForNonexistentClassMember(yu(h),E))}else{const b=EI(h),T=yu(h);z.assert(T!==void 0,"name should be defined"),C=m.getSuggestedSymbolForNonexistentSymbol(h,T,S7t(b))}return C===void 0?void 0:{node:h,suggestedSymbol:C}}function Git(t,r,a,u,h){const p=xu(u);if(!wp(p,h)&&Ir(a.parent)){const m=u.valueDeclaration;m&&Af(m)&&Vs(m.name)?t.replaceNode(r,a,G.createIdentifier(p)):t.replaceNode(r,a.parent,G.createElementAccessExpression(a.parent.expression,G.createStringLiteral(p)))}else t.replaceNode(r,a,G.createIdentifier(p))}function S7t(t){let r=0;return t&4&&(r|=1920),t&2&&(r|=788968),t&1&&(r|=111551),r}function w7t(t,r,a){var u;if(!r||!Ml(r.moduleSpecifier))return;const h=(u=t.program.getResolvedModuleFromModuleSpecifier(r.moduleSpecifier,a))==null?void 0:u.resolvedModule;if(h)return t.program.getSourceFile(h.resolvedFileName)}var BAe="returnValueCorrect",WAe="fixAddReturnStatement",VAe="fixRemoveBracesFromArrowFunctionBody",HAe="fixWrapTheBlockWithParen",Kit=[k.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code,k.Type_0_is_not_assignable_to_type_1.code,k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code];Ea({errorCodes:Kit,fixIds:[WAe,VAe,HAe],getCodeActions:function(r){const{program:a,sourceFile:u,span:{start:h},errorCode:p}=r,m=Xit(a.getTypeChecker(),u,h,p);if(m)return m.kind===0?xi([k7t(r,m.expression,m.statement)],Dc(m.declaration)?T7t(r,m.declaration,m.expression,m.commentSource):void 0):[D7t(r,m.declaration,m.expression)]},getAllCodeActions:t=>jl(t,Kit,(r,a)=>{const u=Xit(t.program.getTypeChecker(),a.file,a.start,a.code);if(u)switch(t.fixId){case WAe:Zit(r,a.file,u.expression,u.statement);break;case VAe:if(!Dc(u.declaration))return;Yit(r,a.file,u.declaration,u.expression,u.commentSource);break;case HAe:if(!Dc(u.declaration))return;ent(r,a.file,u.declaration,u.expression);break;default:z.fail(JSON.stringify(t.fixId))}})});function Qit(t,r,a){const u=t.createSymbol(4,r.escapedText);u.links.type=t.getTypeAtLocation(a);const h=ga([u]);return t.createAnonymousType(void 0,h,[],[],[])}function jAe(t,r,a,u){if(!r.body||!Ho(r.body)||O(r.body.statements)!==1)return;const h=ma(r.body.statements);if(_f(h)&&zAe(t,r,t.getTypeAtLocation(h.expression),a,u))return{declaration:r,kind:0,expression:h.expression,statement:h,commentSource:h.expression};if(ix(h)&&_f(h.statement)){const p=G.createObjectLiteralExpression([G.createPropertyAssignment(h.label,h.statement.expression)]),m=Qit(t,h.label,h.statement.expression);if(zAe(t,r,m,a,u))return Dc(r)?{declaration:r,kind:1,expression:p,statement:h,commentSource:h.statement.expression}:{declaration:r,kind:0,expression:p,statement:h,commentSource:h.statement.expression}}else if(Ho(h)&&O(h.statements)===1){const p=ma(h.statements);if(ix(p)&&_f(p.statement)){const m=G.createObjectLiteralExpression([G.createPropertyAssignment(p.label,p.statement.expression)]),C=Qit(t,p.label,p.statement.expression);if(zAe(t,r,C,a,u))return{declaration:r,kind:0,expression:m,statement:h,commentSource:p}}}}function zAe(t,r,a,u,h){if(h){const p=t.getSignatureFromDeclaration(r);if(p){Kr(r,1024)&&(a=t.createPromiseType(a));const m=t.createSignature(r,p.typeParameters,p.thisParameter,p.parameters,a,void 0,p.minArgumentCount,p.flags);a=t.createAnonymousType(void 0,ga(),[m],[],[])}else a=t.getAnyType()}return t.isTypeAssignableTo(a,u)}function Xit(t,r,a,u){const h=Rs(r,a);if(!h.parent)return;const p=Xi(h.parent,rc);switch(u){case k.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code:return!p||!p.body||!p.type||!yg(p.type,h)?void 0:jAe(t,p,t.getTypeFromTypeNode(p.type),!1);case k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code:if(!p||!sa(p.parent)||!p.body)return;const m=p.parent.arguments.indexOf(p);if(m===-1)return;const C=t.getContextualTypeForArgumentAtIndex(p.parent,m);return C?jAe(t,p,C,!0):void 0;case k.Type_0_is_not_assignable_to_type_1.code:if(!F1(h)||!qL(h.parent)&&!qv(h.parent))return;const b=x7t(h.parent);return!b||!rc(b)||!b.body?void 0:jAe(t,b,t.getTypeAtLocation(h.parent),!0)}}function x7t(t){switch(t.kind){case 260:case 169:case 208:case 172:case 303:return t.initializer;case 291:return t.initializer&&(b7(t.initializer)?t.initializer.expression:void 0);case 304:case 171:case 306:case 348:case 341:return}}function Zit(t,r,a,u){Op(a);const h=wH(r);t.replaceNode(r,u,G.createReturnStatement(a),{leadingTriviaOption:er.LeadingTriviaOption.Exclude,trailingTriviaOption:er.TrailingTriviaOption.Exclude,suffix:h?";":void 0})}function Yit(t,r,a,u,h,p){const m=tX(u)?G.createParenthesizedExpression(u):u;Op(h),NI(h,m),t.replaceNode(r,a.body,m)}function ent(t,r,a,u){t.replaceNode(r,a.body,G.createParenthesizedExpression(u))}function k7t(t,r,a){const u=er.ChangeTracker.with(t,h=>Zit(h,t.sourceFile,r,a));return oa(BAe,u,k.Add_a_return_statement,WAe,k.Add_all_missing_return_statement)}function T7t(t,r,a,u){const h=er.ChangeTracker.with(t,p=>Yit(p,t.sourceFile,r,a,u));return oa(BAe,h,k.Remove_braces_from_arrow_function_body,VAe,k.Remove_braces_from_all_arrow_function_bodies_with_relevant_issues)}function D7t(t,r,a){const u=er.ChangeTracker.with(t,h=>ent(h,t.sourceFile,r,a));return oa(BAe,u,k.Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal,HAe,k.Wrap_all_object_literal_with_parentheses)}var a2="fixMissingMember",Hfe="fixMissingProperties",jfe="fixMissingAttributes",zfe="fixMissingFunctionDeclaration",tnt=[k.Property_0_does_not_exist_on_type_1.code,k.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,k.Property_0_is_missing_in_type_1_but_required_in_type_2.code,k.Type_0_is_missing_the_following_properties_from_type_1_Colon_2.code,k.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more.code,k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,k.Cannot_find_name_0.code];Ea({errorCodes:tnt,getCodeActions(t){const r=t.program.getTypeChecker(),a=int(t.sourceFile,t.span.start,t.errorCode,r,t.program);if(a){if(a.kind===3){const u=er.ChangeTracker.with(t,h=>fnt(h,t,a));return[oa(Hfe,u,k.Add_missing_properties,Hfe,k.Add_all_missing_properties)]}if(a.kind===4){const u=er.ChangeTracker.with(t,h=>dnt(h,t,a));return[oa(jfe,u,k.Add_missing_attributes,jfe,k.Add_all_missing_attributes)]}if(a.kind===2||a.kind===5){const u=er.ChangeTracker.with(t,h=>unt(h,t,a));return[oa(zfe,u,[k.Add_missing_function_declaration_0,a.token.text],zfe,k.Add_all_missing_function_declarations)]}if(a.kind===1){const u=er.ChangeTracker.with(t,h=>cnt(h,t.program.getTypeChecker(),a));return[oa(a2,u,[k.Add_missing_enum_member_0,a.token.text],a2,k.Add_all_missing_members)]}return no(P7t(t,a),E7t(t,a))}},fixIds:[a2,zfe,Hfe,jfe],getAllCodeActions:t=>{const{program:r,fixId:a}=t,u=r.getTypeChecker(),h=new Map,p=new Map;return eA(er.ChangeTracker.with(t,m=>{tA(t,tnt,C=>{const b=int(C.file,C.start,C.code,u,t.program);if(!(!b||!Lm(h,Tl(b.parentDeclaration)+"#"+(b.kind===3?b.identifier:b.token.text)))){if(a===zfe&&(b.kind===2||b.kind===5))unt(m,t,b);else if(a===Hfe&&b.kind===3)fnt(m,t,b);else if(a===jfe&&b.kind===4)dnt(m,t,b);else if(b.kind===1&&cnt(m,u,b),b.kind===0){const{parentDeclaration:T,token:E}=b,N=ka(p,T,()=>[]);N.some(R=>R.token.text===E.text)||N.push(b)}}}),p.forEach((C,b)=>{const T=p_(b)?void 0:T4e(b,u);for(const E of C){if(T!=null&&T.some(Q=>{const re=p.get(Q);return!!re&&re.some(({token:Y})=>Y.text===E.token.text)}))continue;const{parentDeclaration:N,declSourceFile:R,modifierFlags:F,token:j,call:U,isJSFile:q}=E;if(U&&!Vs(j))lnt(t,m,U,j,F&256,N,R);else if(q&&!Ff(N)&&!p_(N))nnt(m,R,N,j,!!(F&256));else{const Q=snt(u,N,j);ont(m,R,N,j.text,Q,F&256)}}})}))}});function int(t,r,a,u,h){var p;const m=Rs(t,r),C=m.parent;if(a===k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code){if(!(m.kind===19&&Pa(C)&&sa(C.parent)))return;const F=Nt(C.parent.arguments,Q=>Q===C);if(F<0)return;const j=u.getResolvedSignature(C.parent);if(!(j&&j.declaration&&j.parameters[F]))return;const U=j.parameters[F].valueDeclaration;if(!(U&&Gs(U)&<(U.name)))return;const q=Fn(u.getUnmatchedProperties(u.getTypeAtLocation(C),u.getParameterType(j,F),!1,!1));return O(q)?{kind:3,token:U.name,identifier:U.name.text,properties:q,parentDeclaration:C}:void 0}if(m.kind===19&&Pa(C)){const F=u.getContextualType(C)||u.getTypeAtLocation(C),j=Fn(u.getUnmatchedProperties(u.getTypeAtLocation(C),F,!1,!1));return O(j)?{kind:3,token:C,identifier:"",properties:j,parentDeclaration:C}:void 0}if(!Uy(m))return;if(lt(m)&&iS(C)&&C.initializer&&Pa(C.initializer)){const F=u.getContextualType(m)||u.getTypeAtLocation(m),j=Fn(u.getUnmatchedProperties(u.getTypeAtLocation(C.initializer),F,!1,!1));return O(j)?{kind:3,token:m,identifier:m.text,properties:j,parentDeclaration:C.initializer}:void 0}if(lt(m)&&eh(m.parent)){const F=il(h.getCompilerOptions()),j=O7t(u,F,m.parent);return O(j)?{kind:4,token:m,attributes:j,parentDeclaration:m.parent}:void 0}if(lt(m)){const F=(p=u.getContextualType(m))==null?void 0:p.getNonNullableType();if(F&&Rr(F)&16){const j=lu(u.getSignaturesOfType(F,0));return j===void 0?void 0:{kind:5,token:m,signature:j,sourceFile:t,parentDeclaration:hnt(m)}}if(sa(C)&&C.expression===m)return{kind:2,token:m,call:C,sourceFile:t,modifierFlags:0,parentDeclaration:hnt(m)}}if(!Ir(C))return;const b=rde(u.getTypeAtLocation(C.expression)),T=b.symbol;if(!T||!T.declarations)return;if(lt(m)&&sa(C.parent)){const F=Me(T.declarations,qu),j=F==null?void 0:F.getSourceFile();if(F&&j&&!H3(h,j))return{kind:2,token:m,call:C.parent,sourceFile:t,modifierFlags:32,parentDeclaration:F};const U=Me(T.declarations,Ns);if(t.commonJsModuleIndicator)return;if(U&&!H3(h,U))return{kind:2,token:m,call:C.parent,sourceFile:U,modifierFlags:32,parentDeclaration:U}}const E=Me(T.declarations,ss);if(!E&&Vs(m))return;const N=E||Me(T.declarations,F=>Ff(F)||p_(F));if(N&&!H3(h,N.getSourceFile())){const F=!p_(N)&&(b.target||b)!==u.getDeclaredTypeOfSymbol(T);if(F&&(Vs(m)||Ff(N)))return;const j=N.getSourceFile(),U=p_(N)?0:(F?256:0)|(Ode(m.text)?2:0),q=F_(j),Q=$r(C.parent,sa);return{kind:0,token:m,call:Q,modifierFlags:U,parentDeclaration:N,declSourceFile:j,isJSFile:q}}const R=Me(T.declarations,Uk);if(R&&!(b.flags&1056)&&!Vs(m)&&!H3(h,R.getSourceFile()))return{kind:1,token:m,parentDeclaration:R}}function E7t(t,r){return r.isJSFile?PL(I7t(t,r)):N7t(t,r)}function I7t(t,{parentDeclaration:r,declSourceFile:a,modifierFlags:u,token:h}){if(Ff(r)||p_(r))return;const p=er.ChangeTracker.with(t,C=>nnt(C,a,r,h,!!(u&256)));if(p.length===0)return;const m=u&256?k.Initialize_static_property_0:Vs(h)?k.Declare_a_private_field_named_0:k.Initialize_property_0_in_the_constructor;return oa(a2,p,[m,h.text],a2,k.Add_all_missing_members)}function nnt(t,r,a,u,h){const p=u.text;if(h){if(a.kind===231)return;const m=a.name.getText(),C=rnt(G.createIdentifier(m),p);t.insertNodeAfter(r,a,C)}else if(Vs(u)){const m=G.createPropertyDeclaration(void 0,p,void 0,void 0,void 0),C=ant(a);C?t.insertNodeAfter(r,C,m):t.insertMemberAtStart(r,a,m)}else{const m=Gy(a);if(!m)return;const C=rnt(G.createThis(),p);t.insertNodeAtConstructorEnd(r,m,C)}}function rnt(t,r){return G.createExpressionStatement(G.createAssignment(G.createPropertyAccessExpression(t,r),nA()))}function N7t(t,{parentDeclaration:r,declSourceFile:a,modifierFlags:u,token:h}){const p=h.text,m=u&256,C=snt(t.program.getTypeChecker(),r,h),b=E=>er.ChangeTracker.with(t,N=>ont(N,a,r,p,C,E)),T=[oa(a2,b(u&256),[m?k.Declare_static_property_0:k.Declare_property_0,p],a2,k.Add_all_missing_members)];return m||Vs(h)||(u&2&&T.unshift(Y0(a2,b(2),[k.Declare_private_property_0,p])),T.push(L7t(t,a,r,h.text,C))),T}function snt(t,r,a){let u;if(a.parent.parent.kind===226){const h=a.parent.parent,p=a.parent===h.left?h.right:h.left,m=t.getWidenedType(t.getBaseTypeOfLiteralType(t.getTypeAtLocation(p)));u=t.typeToTypeNode(m,r,1)}else{const h=t.getContextualType(a.parent);u=h?t.typeToTypeNode(h,void 0,1):void 0}return u||G.createKeywordTypeNode(133)}function ont(t,r,a,u,h,p){const m=p?G.createNodeArray(G.createModifiersFromModifierFlags(p)):void 0,C=ss(a)?G.createPropertyDeclaration(m,u,void 0,h,void 0):G.createPropertySignature(void 0,u,void 0,h),b=ant(a);b?t.insertNodeAfter(r,b,C):t.insertMemberAtStart(r,a,C)}function ant(t){let r;for(const a of t.members){if(!To(a))break;r=a}return r}function L7t(t,r,a,u,h){const p=G.createKeywordTypeNode(154),m=G.createParameterDeclaration(void 0,void 0,"x",void 0,p,void 0),C=G.createIndexSignature(void 0,[m],h),b=er.ChangeTracker.with(t,T=>T.insertMemberAtStart(r,a,C));return Y0(a2,b,[k.Add_index_signature_for_property_0,u])}function P7t(t,r){const{parentDeclaration:a,declSourceFile:u,modifierFlags:h,token:p,call:m}=r;if(m===void 0)return;const C=p.text,b=E=>er.ChangeTracker.with(t,N=>lnt(t,N,m,p,E,a,u)),T=[oa(a2,b(h&256),[h&256?k.Declare_static_method_0:k.Declare_method_0,C],a2,k.Add_all_missing_members)];return h&2&&T.unshift(Y0(a2,b(2),[k.Declare_private_method_0,C])),T}function lnt(t,r,a,u,h,p,m){const C=_D(m,t.program,t.preferences,t.host),b=ss(p)?174:173,T=y4e(b,t,C,a,u,h,p),E=M7t(p,a);E?r.insertNodeAfter(m,E,T):r.insertMemberAtStart(m,p,T),C.writeFixes(r)}function cnt(t,r,{token:a,parentDeclaration:u}){const h=Rt(u.members,b=>{const T=r.getTypeAtLocation(b);return!!(T&&T.flags&402653316)}),p=u.getSourceFile(),m=G.createEnumMember(a,h?G.createStringLiteral(a.text):void 0),C=Ql(u.members);C?t.insertNodeInListAfter(p,C,m,u.members):t.insertMemberAtStart(p,u,m)}function unt(t,r,a){const u=bg(r.sourceFile,r.preferences),h=_D(r.sourceFile,r.program,r.preferences,r.host),p=a.kind===2?y4e(262,r,h,a.call,dr(a.token),a.modifierFlags,a.parentDeclaration):Yfe(262,r,u,a.signature,qX(k.Function_not_implemented.message,u),a.token,void 0,void 0,void 0,h);p===void 0&&z.fail("fixMissingFunctionDeclaration codefix got unexpected error."),Om(a.parentDeclaration)?t.insertNodeBefore(a.sourceFile,a.parentDeclaration,p,!0):t.insertNodeAtEndOfScope(a.sourceFile,a.parentDeclaration,p),h.writeFixes(t)}function dnt(t,r,a){const u=_D(r.sourceFile,r.program,r.preferences,r.host),h=bg(r.sourceFile,r.preferences),p=r.program.getTypeChecker(),m=a.parentDeclaration.attributes,C=Rt(m.properties,PP),b=Yt(a.attributes,N=>{const R=Ufe(r,p,u,h,p.getTypeOfSymbol(N),a.parentDeclaration),F=G.createIdentifier(N.name),j=G.createJsxAttribute(F,G.createJsxExpression(void 0,R));return ml(F,j),j}),T=G.createJsxAttributes(C?[...b,...m.properties]:[...m.properties,...b]),E={prefix:m.pos===m.end?" ":void 0};t.replaceNode(r.sourceFile,m,T,E),u.writeFixes(t)}function fnt(t,r,a){const u=_D(r.sourceFile,r.program,r.preferences,r.host),h=bg(r.sourceFile,r.preferences),p=il(r.program.getCompilerOptions()),m=r.program.getTypeChecker(),C=Yt(a.properties,T=>{const E=Ufe(r,m,u,h,m.getTypeOfSymbol(T),a.parentDeclaration);return G.createPropertyAssignment(R7t(T,p,h,m),E)}),b={leadingTriviaOption:er.LeadingTriviaOption.Exclude,trailingTriviaOption:er.TrailingTriviaOption.Exclude,indentation:a.indentation};t.replaceNode(r.sourceFile,a.parentDeclaration,G.createObjectLiteralExpression([...a.parentDeclaration.properties,...C],!0),b),u.writeFixes(t)}function Ufe(t,r,a,u,h,p){if(h.flags&3)return nA();if(h.flags&134217732)return G.createStringLiteral("",u===0);if(h.flags&8)return G.createNumericLiteral(0);if(h.flags&64)return G.createBigIntLiteral("0n");if(h.flags&16)return G.createFalse();if(h.flags&1056){const m=h.symbol.exports?Pw(h.symbol.exports.values()):h.symbol,C=r.symbolToExpression(h.symbol.parent?h.symbol.parent:h.symbol,111551,void 0,64);return m===void 0||C===void 0?G.createNumericLiteral(0):G.createPropertyAccessExpression(C,r.symbolToString(m))}if(h.flags&256)return G.createNumericLiteral(h.value);if(h.flags&2048)return G.createBigIntLiteral(h.value);if(h.flags&128)return G.createStringLiteral(h.value,u===0);if(h.flags&512)return h===r.getFalseType()||h===r.getFalseType(!0)?G.createFalse():G.createTrue();if(h.flags&65536)return G.createNull();if(h.flags&1048576)return Z(h.types,C=>Ufe(t,r,a,u,C,p))??nA();if(r.isArrayLikeType(h))return G.createArrayLiteralExpression();if(A7t(h)){const m=Yt(r.getPropertiesOfType(h),C=>{const b=Ufe(t,r,a,u,r.getTypeOfSymbol(C),p);return G.createPropertyAssignment(C.name,b)});return G.createObjectLiteralExpression(m,!0)}if(Rr(h)&16){if(Me(h.symbol.declarations||x,lg(W1,Hv,Au))===void 0)return nA();const C=r.getSignaturesOfType(h,0);return C===void 0?nA():Yfe(218,t,u,C[0],qX(k.Function_not_implemented.message,u),void 0,void 0,void 0,p,a)??nA()}if(Rr(h)&1){const m=Ub(h.symbol);if(m===void 0||WT(m))return nA();const C=Gy(m);return C&&O(C.parameters)?nA():G.createNewExpression(G.createIdentifier(h.symbol.name),void 0,void 0)}return nA()}function nA(){return G.createIdentifier("undefined")}function A7t(t){return t.flags&524288&&(Rr(t)&128||t.symbol&&$r(a_(t.symbol.declarations),p_))}function O7t(t,r,a){const u=t.getContextualType(a.attributes);if(u===void 0)return x;const h=u.getProperties();if(!O(h))return x;const p=new Set;for(const m of a.attributes.properties)if(qv(m)&&p.add(s7(m.name)),PP(m)){const C=t.getTypeAtLocation(m.expression);for(const b of C.getProperties())p.add(b.escapedName)}return Ri(h,m=>wp(m.name,r,1)&&!(m.flags&16777216||Pu(m)&48||p.has(m.escapedName)))}function M7t(t,r){if(p_(t))return;const a=Xi(r,u=>Au(u)||fu(u));return a&&a.parent===t?a:void 0}function R7t(t,r,a,u){if(M1(t)){const h=u.symbolToNode(t,111551,void 0,1073741824);if(h&&Ja(h))return h}return CG(t.name,r,a===0,!1,!1)}function hnt(t){if(Xi(t,b7)){const r=Xi(t.parent,Om);if(r)return r}return _n(t)}var UAe="addMissingNewOperator",_nt=[k.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code];Ea({errorCodes:_nt,getCodeActions(t){const{sourceFile:r,span:a}=t,u=er.ChangeTracker.with(t,h=>pnt(h,r,a));return[oa(UAe,u,k.Add_missing_new_operator_to_call,UAe,k.Add_missing_new_operator_to_all_calls)]},fixIds:[UAe],getAllCodeActions:t=>jl(t,_nt,(r,a)=>pnt(r,t.sourceFile,a))});function pnt(t,r,a){const u=ua(F7t(r,a),sa),h=G.createNewExpression(u.expression,u.typeArguments,u.arguments);t.replaceNode(r,u,h)}function F7t(t,r){let a=Rs(t,r.start);const u=zu(r);for(;a.endJfe(C,t.program,t.preferences,t.host,u,h)),[O(h)>1?k.Add_missing_parameters_to_0:k.Add_missing_parameter_to_0,a],qfe,k.Add_all_missing_parameters)),O(p)&&xi(m,oa($fe,er.ChangeTracker.with(t,C=>Jfe(C,t.program,t.preferences,t.host,u,p)),[O(p)>1?k.Add_optional_parameters_to_0:k.Add_optional_parameter_to_0,a],$fe,k.Add_all_optional_parameters)),m},getAllCodeActions:t=>jl(t,gnt,(r,a)=>{const u=mnt(t.sourceFile,t.program,a.start);if(u){const{declarations:h,newParameters:p,newOptionalParameters:m}=u;t.fixId===qfe&&Jfe(r,t.program,t.preferences,t.host,h,p),t.fixId===$fe&&Jfe(r,t.program,t.preferences,t.host,h,m)}})});function mnt(t,r,a){const u=Rs(t,a),h=Xi(u,sa);if(h===void 0||O(h.arguments)===0)return;const p=r.getTypeChecker(),m=p.getTypeAtLocation(h.expression),C=Ri(m.symbol.declarations,vnt);if(C===void 0)return;const b=Ql(C);if(b===void 0||b.body===void 0||H3(r,b.getSourceFile()))return;const T=B7t(b);if(T===void 0)return;const E=[],N=[],R=O(b.parameters),F=O(h.arguments);if(R>F)return;const j=[b,...V7t(b,C)];for(let U=0,q=0,Q=0;U{const b=_n(C),T=_D(b,r,a,u);O(C.parameters)?t.replaceNodeRangeWithNodes(b,ma(C.parameters),La(C.parameters),ynt(T,m,C,p),{joiner:", ",indentation:0,leadingTriviaOption:er.LeadingTriviaOption.IncludeAll,trailingTriviaOption:er.TrailingTriviaOption.Include}):W(ynt(T,m,C,p),(E,N)=>{O(C.parameters)===0&&N===0?t.insertNodeAt(b,C.parameters.end,E):t.insertNodeAtEndOfList(b,C.parameters,E)}),T.writeFixes(t)})}function vnt(t){switch(t.kind){case 262:case 218:case 174:case 219:return!0;default:return!1}}function ynt(t,r,a,u){const h=Yt(a.parameters,p=>G.createParameterDeclaration(p.modifiers,p.dotDotDotToken,p.name,p.questionToken,p.type,p.initializer));for(const{pos:p,declaration:m}of u){const C=p>0?h[p-1]:void 0;h.splice(p,0,G.updateParameterDeclaration(m,m.modifiers,m.dotDotDotToken,m.name,C&&C.questionToken?G.createToken(58):m.questionToken,z7t(t,m.type,r),m.initializer))}return h}function V7t(t,r){const a=[];for(const u of r)if(H7t(u)){if(O(u.parameters)===O(t.parameters)){a.push(u);continue}if(O(u.parameters)>O(t.parameters))return[]}return a}function H7t(t){return vnt(t)&&t.body===void 0}function bnt(t,r,a){return G.createParameterDeclaration(void 0,void 0,t,a,r,void 0)}function j7t(t,r){return O(t)&&Rt(t,a=>rjl(t,Snt,(r,a,u)=>{const h=xnt(a.file,a.start);if(h!==void 0)switch(t.fixId){case qAe:{const p=knt(h,t.host,a.code);p&&u.push(wnt(a.file.fileName,p));break}default:z.fail(`Bad fixId: ${t.fixId}`)}})});function wnt(t,r){return{type:"install package",file:t,packageName:r}}function xnt(t,r){const a=$r(Rs(t,r),ja);if(!a)return;const u=a.text,{packageName:h}=IK(u);return Zd(h)?void 0:h}function knt(t,r,a){var u;return a===Cnt?Gv.nodeCoreModules.has(t)?"@types/node":void 0:(u=r.isKnownTypesPackageName)!=null&&u.call(r,t)?LK(t):void 0}var Tnt=[k.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code,k.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2.code,k.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more.code,k.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1.code,k.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1.code,k.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more.code],$Ae="fixClassDoesntImplementInheritedAbstractMember";Ea({errorCodes:Tnt,getCodeActions:function(r){const{sourceFile:a,span:u}=r,h=er.ChangeTracker.with(r,p=>Ent(Dnt(a,u.start),a,r,p,r.preferences));return h.length===0?void 0:[oa($Ae,h,k.Implement_inherited_abstract_class,$Ae,k.Implement_all_inherited_abstract_classes)]},fixIds:[$Ae],getAllCodeActions:function(r){const a=new Map;return jl(r,Tnt,(u,h)=>{const p=Dnt(h.file,h.start);Lm(a,Tl(p))&&Ent(p,r.sourceFile,r,u,r.preferences)})}});function Dnt(t,r){const a=Rs(t,r);return ua(a.parent,ss)}function Ent(t,r,a,u,h){const p=Pv(t),m=a.program.getTypeChecker(),C=m.getTypeAtLocation(p),b=m.getPropertiesOfType(C).filter(q7t),T=_D(r,a.program,h,a.host);v4e(t,b,r,a,h,T,E=>u.insertMemberAtStart(r,t,E)),T.writeFixes(u)}function q7t(t){const r=uS(ma(t.getDeclarations()));return!(r&2)&&!!(r&64)}var JAe="classSuperMustPrecedeThisAccess",Int=[k.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code];Ea({errorCodes:Int,getCodeActions(t){const{sourceFile:r,span:a}=t,u=Lnt(r,a.start);if(!u)return;const{constructor:h,superCall:p}=u,m=er.ChangeTracker.with(t,C=>Nnt(C,r,h,p));return[oa(JAe,m,k.Make_super_call_the_first_statement_in_the_constructor,JAe,k.Make_all_super_calls_the_first_statement_in_their_constructor)]},fixIds:[JAe],getAllCodeActions(t){const{sourceFile:r}=t,a=new Map;return jl(t,Int,(u,h)=>{const p=Lnt(h.file,h.start);if(!p)return;const{constructor:m,superCall:C}=p;Lm(a,Tl(m.parent))&&Nnt(u,r,m,C)})}});function Nnt(t,r,a,u){t.insertNodeAtConstructorStart(r,a,u),t.delete(r,u)}function Lnt(t,r){const a=Rs(t,r);if(a.kind!==110)return;const u=Kp(a),h=Pnt(u.body);return h&&!h.expression.arguments.some(p=>Ir(p)&&p.expression===a)?{constructor:u,superCall:h}:void 0}function Pnt(t){return _f(t)&&rI(t.expression)?t:Bo(t)?void 0:jo(t,Pnt)}var GAe="constructorForDerivedNeedSuperCall",Ant=[k.Constructors_for_derived_classes_must_contain_a_super_call.code];Ea({errorCodes:Ant,getCodeActions(t){const{sourceFile:r,span:a}=t,u=Ont(r,a.start),h=er.ChangeTracker.with(t,p=>Mnt(p,r,u));return[oa(GAe,h,k.Add_missing_super_call,GAe,k.Add_all_missing_super_calls)]},fixIds:[GAe],getAllCodeActions:t=>jl(t,Ant,(r,a)=>Mnt(r,t.sourceFile,Ont(a.file,a.start)))});function Ont(t,r){const a=Rs(t,r);return z.assert(fu(a.parent),"token should be at the constructor declaration"),a.parent}function Mnt(t,r,a){const u=G.createExpressionStatement(G.createCallExpression(G.createSuper(),void 0,x));t.insertNodeAtConstructorStart(r,a,u)}var Rnt="fixEnableJsxFlag",Fnt=[k.Cannot_use_JSX_unless_the_jsx_flag_is_provided.code];Ea({errorCodes:Fnt,getCodeActions:function(r){const{configFile:a}=r.program.getCompilerOptions();if(a===void 0)return;const u=er.ChangeTracker.with(r,h=>Bnt(h,a));return[Y0(Rnt,u,k.Enable_the_jsx_flag_in_your_configuration_file)]},fixIds:[Rnt],getAllCodeActions:t=>jl(t,Fnt,r=>{const{configFile:a}=t.program.getCompilerOptions();a!==void 0&&Bnt(r,a)})});function Bnt(t,r){w4e(t,r,"jsx",G.createStringLiteral("react"))}var KAe="fixNaNEquality",Wnt=[k.This_condition_will_always_return_0.code];Ea({errorCodes:Wnt,getCodeActions(t){const{sourceFile:r,span:a,program:u}=t,h=Vnt(u,r,a);if(h===void 0)return;const{suggestion:p,expression:m,arg:C}=h,b=er.ChangeTracker.with(t,T=>Hnt(T,r,C,m));return[oa(KAe,b,[k.Use_0,p],KAe,k.Use_Number_isNaN_in_all_conditions)]},fixIds:[KAe],getAllCodeActions:t=>jl(t,Wnt,(r,a)=>{const u=Vnt(t.program,a.file,Pf(a.start,a.length));u&&Hnt(r,a.file,u.arg,u.expression)})});function Vnt(t,r,a){const u=Me(t.getSemanticDiagnostics(r),m=>m.start===a.start&&m.length===a.length);if(u===void 0||u.relatedInformation===void 0)return;const h=Me(u.relatedInformation,m=>m.code===k.Did_you_mean_0.code);if(h===void 0||h.file===void 0||h.start===void 0||h.length===void 0)return;const p=k4e(h.file,Pf(h.start,h.length));if(p!==void 0&&Ut(p)&&cr(p.parent))return{suggestion:$7t(h.messageText),expression:p.parent,arg:p}}function Hnt(t,r,a,u){const h=G.createCallExpression(G.createPropertyAccessExpression(G.createIdentifier("Number"),G.createIdentifier("isNaN")),void 0,[a]),p=u.operatorToken.kind;t.replaceNode(r,u,p===38||p===36?G.createPrefixUnaryExpression(54,h):h)}function $7t(t){const[,r]=Jv(t,` +`,0).match(/'(.*)'/)||[];return r}Ea({errorCodes:[k.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,k.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,k.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code],getCodeActions:function(r){const a=r.program.getCompilerOptions(),{configFile:u}=a;if(u===void 0)return;const h=[],p=Vh(a);if(p>=5&&p<99){const T=er.ChangeTracker.with(r,E=>{w4e(E,u,"module",G.createStringLiteral("esnext"))});h.push(Y0("fixModuleOption",T,[k.Set_the_module_option_in_your_configuration_file_to_0,"esnext"]))}const C=il(a);if(C<4||C>99){const T=er.ChangeTracker.with(r,E=>{if(!y8(u))return;const R=[["target",G.createStringLiteral("es2017")]];p===1&&R.push(["module",G.createStringLiteral("commonjs")]),S4e(E,u,R)});h.push(Y0("fixTargetOption",T,[k.Set_the_target_option_in_your_configuration_file_to_0,"es2017"]))}return h.length?h:void 0}});var QAe="fixPropertyAssignment",jnt=[k.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code];Ea({errorCodes:jnt,fixIds:[QAe],getCodeActions(t){const{sourceFile:r,span:a}=t,u=Unt(r,a.start),h=er.ChangeTracker.with(t,p=>znt(p,t.sourceFile,u));return[oa(QAe,h,[k.Change_0_to_1,"=",":"],QAe,[k.Switch_each_misused_0_to_1,"=",":"])]},getAllCodeActions:t=>jl(t,jnt,(r,a)=>znt(r,a.file,Unt(a.file,a.start)))});function znt(t,r,a){t.replaceNode(r,a,G.createPropertyAssignment(a.name,a.objectAssignmentInitializer))}function Unt(t,r){return ua(Rs(t,r).parent,ih)}var XAe="extendsInterfaceBecomesImplements",qnt=[k.Cannot_extend_an_interface_0_Did_you_mean_implements.code];Ea({errorCodes:qnt,getCodeActions(t){const{sourceFile:r}=t,a=$nt(r,t.span.start);if(!a)return;const{extendsToken:u,heritageClauses:h}=a,p=er.ChangeTracker.with(t,m=>Jnt(m,r,u,h));return[oa(XAe,p,k.Change_extends_to_implements,XAe,k.Change_all_extended_interfaces_to_implements)]},fixIds:[XAe],getAllCodeActions:t=>jl(t,qnt,(r,a)=>{const u=$nt(a.file,a.start);u&&Jnt(r,a.file,u.extendsToken,u.heritageClauses)})});function $nt(t,r){const a=Rs(t,r),u=Sf(a).heritageClauses,h=u[0].getFirstToken();return h.kind===96?{extendsToken:h,heritageClauses:u}:void 0}function Jnt(t,r,a,u){if(t.replaceNode(r,a,G.createToken(119)),u.length===2&&u[0].token===96&&u[1].token===119){const h=u[1].getFirstToken(),p=h.getFullStart();t.replaceRange(r,{pos:p,end:p},G.createToken(28));const m=r.text;let C=h.end;for(;CXnt(h,r,a));return[oa(ZAe,u,[k.Add_0_to_unresolved_variable,a.className||"this"],ZAe,k.Add_qualifier_to_all_unresolved_variables_matching_a_member_name)]},fixIds:[ZAe],getAllCodeActions:t=>jl(t,Knt,(r,a)=>{const u=Qnt(a.file,a.start,a.code);u&&Xnt(r,t.sourceFile,u)})});function Qnt(t,r,a){const u=Rs(t,r);if(lt(u)||Vs(u))return{node:u,className:a===Gnt?Sf(u).name.text:void 0}}function Xnt(t,r,{node:a,className:u}){Op(a),t.replaceNode(r,a,G.createPropertyAccessExpression(u?G.createIdentifier(u):G.createThis(),a))}var YAe="fixInvalidJsxCharacters_expression",Gfe="fixInvalidJsxCharacters_htmlEntity",Znt=[k.Unexpected_token_Did_you_mean_or_gt.code,k.Unexpected_token_Did_you_mean_or_rbrace.code];Ea({errorCodes:Znt,fixIds:[YAe,Gfe],getCodeActions(t){const{sourceFile:r,preferences:a,span:u}=t,h=er.ChangeTracker.with(t,m=>e4e(m,a,r,u.start,!1)),p=er.ChangeTracker.with(t,m=>e4e(m,a,r,u.start,!0));return[oa(YAe,h,k.Wrap_invalid_character_in_an_expression_container,YAe,k.Wrap_all_invalid_characters_in_an_expression_container),oa(Gfe,p,k.Convert_invalid_character_to_its_html_entity_code,Gfe,k.Convert_all_invalid_characters_to_HTML_entity_code)]},getAllCodeActions(t){return jl(t,Znt,(r,a)=>e4e(r,t.preferences,a.file,a.start,t.fixId===Gfe))}});var Ynt={">":">","}":"}"};function J7t(t){return Vl(Ynt,t)}function e4e(t,r,a,u,h){const p=a.getText()[u];if(!J7t(p))return;const m=h?Ynt[p]:`{${dF(a,r,p)}}`;t.replaceRangeWithText(a,{pos:u,end:u+1},m)}var Kfe="deleteUnmatchedParameter",ert="renameUnmatchedParameter",trt=[k.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name.code];Ea({fixIds:[Kfe,ert],errorCodes:trt,getCodeActions:function(r){const{sourceFile:a,span:u}=r,h=[],p=irt(a,u.start);if(p)return xi(h,G7t(r,p)),xi(h,K7t(r,p)),h},getAllCodeActions:function(r){const a=new Map;return eA(er.ChangeTracker.with(r,u=>{tA(r,trt,({file:h,start:p})=>{const m=irt(h,p);m&&a.set(m.signature,xi(a.get(m.signature),m.jsDocParameterTag))}),a.forEach((h,p)=>{if(r.fixId===Kfe){const m=new Set(h);u.filterJSDocTags(p.getSourceFile(),p,C=>!m.has(C))}})}))}});function G7t(t,{name:r,jsDocHost:a,jsDocParameterTag:u}){const h=er.ChangeTracker.with(t,p=>p.filterJSDocTags(t.sourceFile,a,m=>m!==u));return oa(Kfe,h,[k.Delete_unused_param_tag_0,r.getText(t.sourceFile)],Kfe,k.Delete_all_unused_param_tags)}function K7t(t,{name:r,jsDocHost:a,signature:u,jsDocParameterTag:h}){if(!O(u.parameters))return;const p=t.sourceFile,m=Tk(u),C=new Set;for(const N of m)em(N)&<(N.name)&&C.add(N.name.escapedText);const b=Z(u.parameters,N=>lt(N.name)&&!C.has(N.name.escapedText)?N.name.getText(p):void 0);if(b===void 0)return;const T=G.updateJSDocParameterTag(h,h.tagName,G.createIdentifier(b),h.isBracketed,h.typeExpression,h.isNameFirst,h.comment),E=er.ChangeTracker.with(t,N=>N.replaceJSDocComment(p,a,Yt(m,R=>R===h?T:R)));return Y0(ert,E,[k.Rename_param_tag_name_0_to_1,r.getText(p),b])}function irt(t,r){const a=Rs(t,r);if(a.parent&&em(a.parent)&<(a.parent.name)){const u=a.parent,h=AT(u),p=Ak(u);if(h&&p)return{jsDocHost:h,signature:p,name:a.parent.name,jsDocParameterTag:u}}}var t4e="fixUnreferenceableDecoratorMetadata",Q7t=[k.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled.code];Ea({errorCodes:Q7t,getCodeActions:t=>{const r=X7t(t.sourceFile,t.program,t.span.start);if(!r)return;const a=er.ChangeTracker.with(t,p=>r.kind===276&&Y7t(p,t.sourceFile,r,t.program)),u=er.ChangeTracker.with(t,p=>Z7t(p,t.sourceFile,r,t.program));let h;return a.length&&(h=xi(h,Y0(t4e,a,k.Convert_named_imports_to_namespace_import))),u.length&&(h=xi(h,Y0(t4e,u,k.Use_import_type))),h},fixIds:[t4e]});function X7t(t,r,a){const u=$r(Rs(t,a),lt);if(!u||u.parent.kind!==183)return;const p=r.getTypeChecker().getSymbolAtLocation(u);return Me((p==null?void 0:p.declarations)||x,lg($0,m_,kd))}function Z7t(t,r,a,u){if(a.kind===271){t.insertModifierBefore(r,156,a.name);return}const h=a.kind===273?a:a.parent.parent;if(h.name&&h.namedBindings)return;const p=u.getTypeChecker();vxe(h,C=>{if(Of(C.symbol,p).flags&111551)return!0})||t.insertModifierBefore(r,156,h)}function Y7t(t,r,a,u){ZP.doChangeNamedToNamespaceOrDefault(r,u,t,a.parent)}var zX="unusedIdentifier",i4e="unusedIdentifier_prefix",n4e="unusedIdentifier_delete",Qfe="unusedIdentifier_deleteImports",r4e="unusedIdentifier_infer",nrt=[k._0_is_declared_but_its_value_is_never_read.code,k._0_is_declared_but_never_used.code,k.Property_0_is_declared_but_its_value_is_never_read.code,k.All_imports_in_import_declaration_are_unused.code,k.All_destructured_elements_are_unused.code,k.All_variables_are_unused.code,k.All_type_parameters_are_unused.code];Ea({errorCodes:nrt,getCodeActions(t){const{errorCode:r,sourceFile:a,program:u,cancellationToken:h}=t,p=u.getTypeChecker(),m=u.getSourceFiles(),C=Rs(a,t.span.start);if(Rm(C))return[CF(er.ChangeTracker.with(t,N=>N.delete(a,C)),k.Remove_template_tag)];if(C.kind===30){const N=er.ChangeTracker.with(t,R=>srt(R,a,C));return[CF(N,k.Remove_type_parameters)]}const b=ort(C);if(b){const N=er.ChangeTracker.with(t,R=>R.delete(a,b));return[oa(zX,N,[k.Remove_import_from_0,lke(b)],Qfe,k.Delete_all_unused_imports)]}else if(s4e(C)){const N=er.ChangeTracker.with(t,R=>Xfe(a,C,R,p,m,u,h,!1));if(N.length)return[oa(zX,N,[k.Remove_unused_declaration_for_Colon_0,C.getText(a)],Qfe,k.Delete_all_unused_imports)]}if(pg(C.parent)||mS(C.parent)){if(Gs(C.parent.parent)){const N=C.parent.elements,R=[N.length>1?k.Remove_unused_declarations_for_Colon_0:k.Remove_unused_declaration_for_Colon_0,Yt(N,F=>F.getText(a)).join(", ")];return[CF(er.ChangeTracker.with(t,F=>eFt(F,a,C.parent)),R)]}return[CF(er.ChangeTracker.with(t,N=>tFt(t,N,a,C.parent)),k.Remove_unused_destructuring_declaration)]}if(art(a,C))return[CF(er.ChangeTracker.with(t,N=>lrt(N,a,C.parent)),k.Remove_variable_statement)];if(lt(C)&&Uu(C.parent))return[CF(er.ChangeTracker.with(t,N=>lFt(N,a,C.parent)),[k.Remove_unused_declaration_for_Colon_0,C.getText(a)])];const T=[];if(C.kind===140){const N=er.ChangeTracker.with(t,F=>rrt(F,a,C)),R=ua(C.parent,hI).typeParameter.name.text;T.push(oa(zX,N,[k.Replace_infer_0_with_unknown,R],r4e,k.Replace_all_unused_infer_with_unknown))}else{const N=er.ChangeTracker.with(t,R=>Xfe(a,C,R,p,m,u,h,!1));if(N.length){const R=Ja(C.parent)?C.parent:C;T.push(CF(N,[k.Remove_unused_declaration_for_Colon_0,R.getText(a)]))}}const E=er.ChangeTracker.with(t,N=>crt(N,r,a,C));return E.length&&T.push(oa(zX,E,[k.Prefix_0_with_an_underscore,C.getText(a)],i4e,k.Prefix_all_unused_declarations_with_where_possible)),T},fixIds:[i4e,n4e,Qfe,r4e],getAllCodeActions:t=>{const{sourceFile:r,program:a,cancellationToken:u}=t,h=a.getTypeChecker(),p=a.getSourceFiles();return jl(t,nrt,(m,C)=>{const b=Rs(r,C.start);switch(t.fixId){case i4e:crt(m,C.code,r,b);break;case Qfe:{const T=ort(b);T?m.delete(r,T):s4e(b)&&Xfe(r,b,m,h,p,a,u,!0);break}case n4e:{if(b.kind===140||s4e(b))break;if(Rm(b))m.delete(r,b);else if(b.kind===30)srt(m,r,b);else if(pg(b.parent)){if(b.parent.parent.initializer)break;(!Gs(b.parent.parent)||urt(b.parent.parent,h,p))&&m.delete(r,b.parent.parent)}else{if(mS(b.parent.parent)&&b.parent.parent.parent.initializer)break;art(r,b)?lrt(m,r,b.parent):Xfe(r,b,m,h,p,a,u,!0)}break}case r4e:b.kind===140&&rrt(m,r,b);break;default:z.fail(JSON.stringify(t.fixId))}})}});function rrt(t,r,a){t.replaceNode(r,a.parent,G.createKeywordTypeNode(159))}function CF(t,r){return oa(zX,t,r,n4e,k.Delete_all_unused_declarations)}function srt(t,r,a){t.delete(r,z.checkDefined(ua(a.parent,Use).typeParameters,"The type parameter to delete should exist"))}function s4e(t){return t.kind===102||t.kind===80&&(t.parent.kind===276||t.parent.kind===273)}function ort(t){return t.kind===102?$r(t.parent,Cu):void 0}function art(t,r){return wf(r.parent)&&ma(r.parent.getChildren(t))===r}function lrt(t,r,a){t.delete(r,a.parent.kind===243?a.parent:a)}function eFt(t,r,a){W(a.elements,u=>t.delete(r,u))}function tFt(t,r,a,{parent:u}){if(ds(u)&&u.initializer&&kT(u.initializer))if(wf(u.parent)&&O(u.parent.declarations)>1){const h=u.parent.parent,p=h.getStart(a),m=h.end;r.delete(a,u),r.insertNodeAt(a,m,u.initializer,{prefix:SS(t.host,t.formatContext.options)+a.text.slice(eX(a.text,p-1),p),suffix:wH(a)?";":""})}else r.replaceNode(a,u.parent,u.initializer);else r.delete(a,u)}function crt(t,r,a,u){r!==k.Property_0_is_declared_but_its_value_is_never_read.code&&(u.kind===140&&(u=ua(u.parent,hI).typeParameter.name),lt(u)&&iFt(u)&&(t.replaceNode(a,u,G.createIdentifier(`_${u.text}`)),Gs(u.parent)&&b6(u.parent).forEach(h=>{lt(h.name)&&t.replaceNode(a,h.name,G.createIdentifier(`_${h.name.text}`))})))}function iFt(t){switch(t.parent.kind){case 169:case 168:return!0;case 260:switch(t.parent.parent.parent.kind){case 250:case 249:return!0}}return!1}function Xfe(t,r,a,u,h,p,m,C){nFt(r,a,t,u,h,p,m,C),lt(r)&&xc.Core.eachSymbolReferenceInFile(r,u,t,b=>{Ir(b.parent)&&b.parent.name===b&&(b=b.parent),!C&&aFt(b)&&a.delete(t,b.parent.parent)})}function nFt(t,r,a,u,h,p,m,C){const{parent:b}=t;if(Gs(b))rFt(r,a,b,u,h,p,m,C);else if(!(C&<(t)&&xc.Core.isSymbolReferencedInFile(t,u,a))){const T=$0(b)?t:Ja(b)?b.parent:b;z.assert(T!==a,"should not delete whole source file"),r.delete(a,T)}}function rFt(t,r,a,u,h,p,m,C=!1){if(sFt(u,r,a,h,p,m,C))if(a.modifiers&&a.modifiers.length>0&&(!lt(a.name)||xc.Core.isSymbolReferencedInFile(a.name,u,r)))for(const b of a.modifiers)Ra(b)&&t.deleteModifier(r,b);else!a.initializer&&urt(a,u,h)&&t.delete(r,a)}function urt(t,r,a){const u=t.parent.parameters.indexOf(t);return!xc.Core.someSignatureUsage(t.parent,a,r,(h,p)=>!p||p.arguments.length>u)}function sFt(t,r,a,u,h,p,m){const{parent:C}=a;switch(C.kind){case 174:case 176:const b=C.parameters.indexOf(a),T=Au(C)?C.name:C,E=xc.Core.getReferencedSymbolsForNode(C.pos,T,h,u,p);if(E){for(const N of E)for(const R of N.references)if(R.kind===xc.EntryKind.Node){const F=f7(R.node)&&sa(R.node.parent)&&R.node.parent.arguments.length>b,j=Ir(R.node.parent)&&f7(R.node.parent.expression)&&sa(R.node.parent.parent)&&R.node.parent.parent.arguments.length>b,U=(Au(R.node.parent)||Hv(R.node.parent))&&R.node.parent!==a.parent&&R.node.parent.parameters.length>b;if(F||j||U)return!1}}return!0;case 262:return C.name&&oFt(t,r,C.name)?drt(C,a,m):!0;case 218:case 219:return drt(C,a,m);case 178:return!1;case 177:return!0;default:return z.failBadSyntaxKind(C)}}function oFt(t,r,a){return!!xc.Core.eachSymbolReferenceInFile(a,t,r,u=>lt(u)&&sa(u.parent)&&u.parent.arguments.includes(u))}function drt(t,r,a){const u=t.parameters,h=u.indexOf(r);return z.assert(h!==-1,"The parameter should already be in the list"),a?u.slice(h+1).every(p=>lt(p.name)&&!p.symbol.isReferenced):h===u.length-1}function aFt(t){return(cr(t.parent)&&t.parent.left===t||(Pae(t.parent)||tx(t.parent))&&t.parent.operand===t)&&_f(t.parent.parent)}function lFt(t,r,a){const u=a.symbol.declarations;if(u)for(const h of u)t.delete(r,h)}var o4e="fixUnreachableCode",frt=[k.Unreachable_code_detected.code];Ea({errorCodes:frt,getCodeActions(t){if(t.program.getSyntacticDiagnostics(t.sourceFile,t.cancellationToken).length)return;const a=er.ChangeTracker.with(t,u=>hrt(u,t.sourceFile,t.span.start,t.span.length,t.errorCode));return[oa(o4e,a,k.Remove_unreachable_code,o4e,k.Remove_all_unreachable_code)]},fixIds:[o4e],getAllCodeActions:t=>jl(t,frt,(r,a)=>hrt(r,a.file,a.start,a.length,a.code))});function hrt(t,r,a,u,h){const p=Rs(r,a),m=Xi(p,Es);if(m.getStart(r)!==p.getStart(r)){const b=JSON.stringify({statementKind:z.formatSyntaxKind(m.kind),tokenKind:z.formatSyntaxKind(p.kind),errorCode:h,start:a,length:u});z.fail("Token and statement should start at the same point. "+b)}const C=(Ho(m.parent)?m.parent:m).parent;if(!Ho(m.parent)||m===ma(m.parent.statements))switch(C.kind){case 245:if(C.elseStatement){if(Ho(m.parent))break;t.replaceNode(r,m,G.createBlock(x));return}case 247:case 248:t.delete(r,C);return}if(Ho(m.parent)){const b=a+u,T=z.checkDefined(cFt(sae(m.parent.statements,m),E=>E.posprt(a,t.sourceFile,t.span.start));return[oa(a4e,r,k.Remove_unused_label,a4e,k.Remove_all_unused_labels)]},fixIds:[a4e],getAllCodeActions:t=>jl(t,_rt,(r,a)=>prt(r,a.file,a.start))});function prt(t,r,a){const u=Rs(r,a),h=ua(u.parent,ix),p=u.getStart(r),m=h.statement.getStart(r),C=Kg(p,m,r)?m:qa(r.text,Hl(h,59,r).end,!0);t.deleteRange(r,{pos:p,end:C})}var grt="fixJSDocTypes_plain",l4e="fixJSDocTypes_nullable",mrt=[k.JSDoc_types_can_only_be_used_inside_documentation_comments.code,k._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code,k._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code];Ea({errorCodes:mrt,getCodeActions(t){const{sourceFile:r}=t,a=t.program.getTypeChecker(),u=yrt(r,t.span.start,a);if(!u)return;const{typeNode:h,type:p}=u,m=h.getText(r),C=[b(p,grt,k.Change_all_jsdoc_style_types_to_TypeScript)];return h.kind===314&&C.push(b(p,l4e,k.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)),C;function b(T,E,N){const R=er.ChangeTracker.with(t,F=>vrt(F,r,h,T,a));return oa("jdocTypes",R,[k.Change_0_to_1,m,a.typeToString(T)],E,N)}},fixIds:[grt,l4e],getAllCodeActions(t){const{fixId:r,program:a,sourceFile:u}=t,h=a.getTypeChecker();return jl(t,mrt,(p,m)=>{const C=yrt(m.file,m.start,h);if(!C)return;const{typeNode:b,type:T}=C,E=b.kind===314&&r===l4e?h.getNullableType(T,32768):T;vrt(p,u,b,E,h)})}});function vrt(t,r,a,u,h){t.replaceNode(r,a,h.typeToTypeNode(u,a,void 0))}function yrt(t,r,a){const u=Xi(Rs(t,r),uFt),h=u&&u.type;return h&&{typeNode:h,type:dFt(a,h)}}function uFt(t){switch(t.kind){case 234:case 179:case 180:case 262:case 177:case 181:case 200:case 174:case 173:case 169:case 172:case 171:case 178:case 265:case 216:case 260:return!0;default:return!1}}function dFt(t,r){if(l3(r)){const a=t.getTypeFromTypeNode(r.type);return a===t.getNeverType()||a===t.getVoidType()?a:t.getUnionType(xi([a,t.getUndefinedType()],r.postfix?void 0:t.getNullType()))}return t.getTypeFromTypeNode(r)}var c4e="fixMissingCallParentheses",brt=[k.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead.code];Ea({errorCodes:brt,fixIds:[c4e],getCodeActions(t){const{sourceFile:r,span:a}=t,u=Srt(r,a.start);if(!u)return;const h=er.ChangeTracker.with(t,p=>Crt(p,t.sourceFile,u));return[oa(c4e,h,k.Add_missing_call_parentheses,c4e,k.Add_all_missing_call_parentheses)]},getAllCodeActions:t=>jl(t,brt,(r,a)=>{const u=Srt(a.file,a.start);u&&Crt(r,a.file,u)})});function Crt(t,r,a){t.replaceNodeWithText(r,a,`${a.text}()`)}function Srt(t,r){const a=Rs(t,r);if(Ir(a.parent)){let u=a.parent;for(;Ir(u.parent);)u=u.parent;return u.name}if(lt(a))return a}var wrt="fixMissingTypeAnnotationOnExports",u4e="add-annotation",d4e="add-type-assertion",fFt="extract-expression",xrt=[k.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code,k.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code,k.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code,k.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,k.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,k.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,k.Expression_type_can_t_be_inferred_with_isolatedDeclarations.code,k.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations.code,k.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations.code,k.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations.code,k.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations.code,k.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations.code,k.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations.code,k.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations.code,k.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations.code,k.Default_exports_can_t_be_inferred_with_isolatedDeclarations.code,k.Only_const_arrays_can_be_inferred_with_isolatedDeclarations.code,k.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function.code,k.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations.code,k.Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations.code,k.Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit.code],hFt=new Set([177,174,172,262,218,219,260,169,277,263,206,207]),_Ft=1074273293;Ea({errorCodes:xrt,fixIds:[wrt],getCodeActions(t){const r=[];return SF(u4e,r,t,0,a=>a.addTypeAnnotation(t.span)),SF(u4e,r,t,1,a=>a.addTypeAnnotation(t.span)),SF(u4e,r,t,2,a=>a.addTypeAnnotation(t.span)),SF(d4e,r,t,0,a=>a.addInlineAssertion(t.span)),SF(d4e,r,t,1,a=>a.addInlineAssertion(t.span)),SF(d4e,r,t,2,a=>a.addInlineAssertion(t.span)),SF(fFt,r,t,0,a=>a.extractAsVariable(t.span)),r},getAllCodeActions:t=>{const r=krt(t,0,a=>{tA(t,xrt,u=>{a.addTypeAnnotation(u)})});return eA(r.textChanges)}});function SF(t,r,a,u,h){const p=krt(a,u,h);p.result&&p.textChanges.length&&r.push(oa(t,p.textChanges,p.result,wrt,k.Add_all_missing_type_annotations))}function krt(t,r,a){const u={typeNode:void 0,mutatedTarget:!1},h=er.ChangeTracker.fromContext(t),p=t.sourceFile,m=t.program,C=m.getTypeChecker(),b=il(m.getCompilerOptions()),T=_D(t.sourceFile,t.program,t.preferences,t.host),E=new Set,N=new Set,R=ax({preserveSourceNewlines:!1}),F=a({addTypeAnnotation:j,addInlineAssertion:Y,extractAsVariable:ue});return T.writeFixes(h),{result:F,textChanges:h.getChanges()};function j(ze){t.cancellationToken.throwIfCancellationRequested();const st=Rs(p,ze.start),xt=te(st);if(xt)return Uu(xt)?U(xt):Se(xt);const Et=wt(st);if(Et)return Se(Et)}function U(ze){var st;if(N!=null&&N.has(ze))return;N==null||N.add(ze);const xt=C.getTypeAtLocation(ze),Et=C.getPropertiesOfType(xt);if(!ze.name||Et.length===0)return;const ft=[];for(const Ji of Et)wp(Ji.name,il(m.getCompilerOptions()))&&(Ji.valueDeclaration&&ds(Ji.valueDeclaration)||ft.push(G.createVariableStatement([G.createModifier(95)],G.createVariableDeclarationList([G.createVariableDeclaration(Ji.name,void 0,He(C.getTypeOfSymbol(Ji),ze),void 0)]))));if(ft.length===0)return;const Ht=[];(st=ze.modifiers)!=null&&st.some(Ji=>Ji.kind===95)&&Ht.push(G.createModifier(95)),Ht.push(G.createModifier(138));const Oi=G.createModuleDeclaration(Ht,ze.name,G.createModuleBlock(ft),101441696);return h.insertNodeAfter(p,ze,Oi),[k.Annotate_types_of_properties_expando_function_in_a_namespace]}function q(ze){return!pc(ze)&&!sa(ze)&&!Pa(ze)&&!Rf(ze)}function Q(ze,st){return q(ze)&&(ze=G.createParenthesizedExpression(ze)),G.createAsExpression(ze,st)}function re(ze,st){return q(ze)&&(ze=G.createParenthesizedExpression(ze)),G.createAsExpression(G.createSatisfiesExpression(ze,Pl(st)),st)}function Y(ze){t.cancellationToken.throwIfCancellationRequested();const st=Rs(p,ze.start);if(te(st))return;const Et=nt(st,ze);if(!Et||ZL(Et)||ZL(Et.parent))return;const ft=Ut(Et),Ht=ih(Et);if(!Ht&&Yf(Et)||Xi(Et,Qo)||Xi(Et,nx)||ft&&(Xi(Et,Lp)||Xi(Et,gs))||Zg(Et))return;const Oi=Xi(Et,ds),Ji=Oi&&C.getTypeAtLocation(Oi);if(Ji&&Ji.flags&8192||!(ft||Ht))return;const{typeNode:Ui,mutatedTarget:bn}=ke(Et,Ji);if(!(!Ui||bn))return Ht?h.insertNodeAt(p,Et.end,Q(Pl(Et.name),Ui),{prefix:": "}):ft?h.replaceNode(p,Et,re(Pl(Et),Ui)):z.assertNever(Et),[k.Add_satisfies_and_an_inline_type_assertion_with_0,Ye(Ui)]}function ue(ze){t.cancellationToken.throwIfCancellationRequested();const st=Rs(p,ze.start),xt=nt(st,ze);if(!xt||ZL(xt)||ZL(xt.parent)||!Ut(xt))return;if(Rf(xt))return h.replaceNode(p,xt,Q(xt,G.createTypeReferenceNode("const"))),[k.Mark_array_literal_as_const];const ft=Xi(xt,pd);if(ft){if(ft===xt.parent&&pc(xt))return;const Ht=G.createUniqueName(pPe(xt,p,C,p),16);let Oi=xt,Ji=xt;if(Zg(Oi)&&(Oi=Vb(Oi.parent),Le(Oi.parent)?Ji=Oi=Oi.parent:Ji=Q(Oi,G.createTypeReferenceNode("const"))),pc(Oi))return;const Ui=G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(Ht,void 0,void 0,Ji)],2)),bn=Xi(xt,Es);return h.insertNodeBefore(p,bn,Ui),h.replaceNode(p,Oi,G.createAsExpression(G.cloneNode(Ht),G.createTypeQueryNode(G.cloneNode(Ht)))),[k.Extract_to_variable_and_replace_with_0_as_typeof_0,Ye(Ht)]}}function te(ze){const st=Xi(ze,xt=>Es(xt)?"quit":_P(xt));if(st&&_P(st)){let xt=st;if(cr(xt)&&(xt=xt.left,!_P(xt)))return;const Et=C.getTypeAtLocation(xt.expression);if(!Et)return;const ft=C.getPropertiesOfType(Et);if(Rt(ft,Ht=>Ht.valueDeclaration===st||Ht.valueDeclaration===st.parent)){const Ht=Et.symbol.valueDeclaration;if(Ht){if(Qw(Ht)&&ds(Ht.parent))return Ht.parent;if(Uu(Ht))return Ht}}}}function Se(ze){if(!(E!=null&&E.has(ze)))switch(E==null||E.add(ze),ze.kind){case 169:case 172:case 260:return Ue(ze);case 219:case 218:case 262:case 174:case 177:return oe(ze,p);case 277:return pe(ze);case 263:return ye(ze);case 206:case 207:return be(ze);default:throw new Error(`Cannot find a fix for the given node ${ze.kind}`)}}function oe(ze,st){if(ze.type)return;const{typeNode:xt}=ke(ze);if(xt)return h.tryInsertTypeAnnotation(st,ze,xt),[k.Add_return_type_0,Ye(xt)]}function pe(ze){if(ze.isExportEquals)return;const{typeNode:st}=ke(ze.expression);if(!st)return;const xt=G.createUniqueName("_default");return h.replaceNodeWithNodes(p,ze,[G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(xt,void 0,st,ze.expression)],2)),G.updateExportAssignment(ze,ze==null?void 0:ze.modifiers,xt)]),[k.Extract_default_export_to_variable]}function ye(ze){var st,xt;const Et=(st=ze.heritageClauses)==null?void 0:st.find(Mi=>Mi.token===96),ft=Et==null?void 0:Et.types[0];if(!ft)return;const{typeNode:Ht}=ke(ft.expression);if(!Ht)return;const Oi=G.createUniqueName(ze.name?ze.name.text+"Base":"Anonymous",16),Ji=G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(Oi,void 0,Ht,ft.expression)],2));h.insertNodeBefore(p,ze,Ji);const Ui=Rw(p.text,ft.end),bn=((xt=Ui==null?void 0:Ui[Ui.length-1])==null?void 0:xt.end)??ft.end;return h.replaceRange(p,{pos:ft.getFullStart(),end:bn},Oi,{prefix:" "}),[k.Extract_base_class_to_variable]}function be(ze){var st;const xt=ze.parent,Et=ze.parent.parent.parent;if(!xt.initializer)return;let ft;const Ht=[];if(lt(xt.initializer))ft={expression:{kind:3,identifier:xt.initializer}};else{const Ui=G.createUniqueName("dest",16);ft={expression:{kind:3,identifier:Ui}},Ht.push(G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(Ui,void 0,void 0,xt.initializer)],2)))}const Oi=[];mS(ze)?_e(ze,Oi,ft):ve(ze,Oi,ft);const Ji=new Map;for(const Ui of Oi){if(Ui.element.propertyName&&Ja(Ui.element.propertyName)){const Mi=Ui.element.propertyName.expression,Ai=G.getGeneratedNameForNode(Mi),Rn=G.createVariableDeclaration(Ai,void 0,void 0,Mi),bs=G.createVariableDeclarationList([Rn],2),Hi=G.createVariableStatement(void 0,bs);Ht.push(Hi),Ji.set(Mi,Ai)}const bn=Ui.element.name;if(mS(bn))_e(bn,Oi,Ui);else if(pg(bn))ve(bn,Oi,Ui);else{const{typeNode:Mi}=ke(bn);let Ai=Ee(Ui,Ji);if(Ui.element.initializer){const bs=(st=Ui.element)==null?void 0:st.propertyName,Hi=G.createUniqueName(bs&<(bs)?bs.text:"temp",16);Ht.push(G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(Hi,void 0,void 0,Ai)],2))),Ai=G.createConditionalExpression(G.createBinaryExpression(Hi,G.createToken(37),G.createIdentifier("undefined")),G.createToken(58),Ui.element.initializer,G.createToken(59),Ai)}const Rn=Kr(Et,32)?[G.createToken(95)]:void 0;Ht.push(G.createVariableStatement(Rn,G.createVariableDeclarationList([G.createVariableDeclaration(bn,void 0,Mi,Ai)],2)))}}return Et.declarationList.declarations.length>1&&Ht.push(G.updateVariableStatement(Et,Et.modifiers,G.updateVariableDeclarationList(Et.declarationList,Et.declarationList.declarations.filter(Ui=>Ui!==ze.parent)))),h.replaceNodeWithNodes(p,Et,Ht),[k.Extract_binding_expressions_to_variable]}function _e(ze,st,xt){for(let Et=0;Et=0;--ft){const Ht=xt[ft].expression;Ht.kind===0?Et=G.createPropertyAccessChain(Et,void 0,G.createIdentifier(Ht.text)):Ht.kind===1?Et=G.createElementAccessExpression(Et,st.get(Ht.computed)):Ht.kind===2&&(Et=G.createElementAccessExpression(Et,Ht.arrayIndex))}return Et}function ke(ze,st){if(r===1)return et(ze);let xt=ZL(ze)?We(ze):C.getTypeAtLocation(ze);if(!xt)return u;if(r===2){st&&(xt=st);const ft=C.getWidenedLiteralType(xt);if(C.isTypeAssignableTo(ft,xt))return u;xt=ft}Gs(ze)&&C.requiresAddingImplicitUndefined(ze)&&(xt=C.getUnionType([C.getUndefinedType(),xt],0));const Et=(ds(ze)||To(ze)&&Kr(ze,264))&&xt.flags&8192?1048576:0;return{typeNode:He(xt,Xi(ze,Yf)??p,Et),mutatedTarget:!1}}function Fe(ze){return G.createTypeQueryNode(Pl(ze))}function Oe(ze,st="temp"){const xt=!!Xi(ze,Le);return xt?Ie(ze,st,xt,Et=>Et.elements,Zg,G.createSpreadElement,Et=>G.createArrayLiteralExpression(Et,!0),Et=>G.createTupleTypeNode(Et.map(G.createRestTypeNode))):u}function fe(ze,st="temp"){const xt=!!Xi(ze,Le);return Ie(ze,st,xt,Et=>Et.properties,ib,G.createSpreadAssignment,Et=>G.createObjectLiteralExpression(Et,!0),G.createIntersectionTypeNode)}function Ie(ze,st,xt,Et,ft,Ht,Oi,Ji){const Ui=[],bn=[];let Mi;const Ai=Xi(ze,Es);for(const Hi of Et(ze))ft(Hi)?(bs(),pc(Hi.expression)?(Ui.push(Fe(Hi.expression)),bn.push(Hi)):Rn(Hi.expression)):(Mi??(Mi=[])).push(Hi);if(bn.length===0)return u;return bs(),h.replaceNode(p,ze,Oi(bn)),{typeNode:Ji(Ui),mutatedTarget:!0};function Rn(Hi){const Hs=G.createUniqueName(st+"_Part"+(bn.length+1),16),Wo=xt?G.createAsExpression(Hi,G.createTypeReferenceNode("const")):Hi,ts=G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(Hs,void 0,void 0,Wo)],2));h.insertNodeBefore(p,Ai,ts),Ui.push(Fe(Hs)),bn.push(Ht(Hs))}function bs(){Mi&&(Rn(Oi(Mi)),Mi=void 0)}}function Le(ze){return Ek(ze)&&V0(ze.type)}function et(ze){if(Gs(ze))return u;if(ih(ze))return{typeNode:Fe(ze.name),mutatedTarget:!1};if(pc(ze))return{typeNode:Fe(ze),mutatedTarget:!1};if(Le(ze))return et(ze.expression);if(Rf(ze)){const st=Xi(ze,ds),xt=st&<(st.name)?st.name.text:void 0;return Oe(ze,xt)}if(Pa(ze)){const st=Xi(ze,ds),xt=st&<(st.name)?st.name.text:void 0;return fe(ze,xt)}if(ds(ze)&&ze.initializer)return et(ze.initializer);if(IP(ze)){const{typeNode:st,mutatedTarget:xt}=et(ze.whenTrue);if(!st)return u;const{typeNode:Et,mutatedTarget:ft}=et(ze.whenFalse);return Et?{typeNode:G.createUnionTypeNode([st,Et]),mutatedTarget:xt||ft}:u}return u}function He(ze,st,xt=0){let Et=!1;const ft=UX(C,T,ze,st,b,_Ft|xt,{moduleResolverHost:m,trackSymbol(){return!0},reportTruncationError(){Et=!0}});return Et?G.createKeywordTypeNode(133):ft}function We(ze){const st=C.getSignatureFromDeclaration(ze);if(st)return C.getReturnTypeOfSignature(st)}function Ue(ze){const{typeNode:st}=ke(ze);if(st)return ze.type?h.replaceNode(_n(ze),ze.type,st):h.tryInsertTypeAnnotation(_n(ze),ze,st),[k.Add_annotation_of_type_0,Ye(st)]}function Ye(ze){ir(ze,1);const st=R.printNode(4,ze,p);return st.length>h8?st.substring(0,h8-3)+"...":(ir(ze,0),st)}function wt(ze){return Xi(ze,st=>hFt.has(st.kind)&&(!pg(st)&&!mS(st)||ds(st.parent)))}function nt(ze,st){for(;ze&&ze.endErt(p,r,u));return[oa(f4e,h,k.Add_async_modifier_to_containing_function,f4e,k.Add_all_missing_async_modifiers)]},fixIds:[f4e],getAllCodeActions:function(r){const a=new Map;return jl(r,Trt,(u,h)=>{const p=Drt(h.file,h.start);!p||!Lm(a,Tl(p.insertBefore))||Ert(u,r.sourceFile,p)})}});function pFt(t){if(t.type)return t.type;if(ds(t.parent)&&t.parent.type&&W1(t.parent.type))return t.parent.type.type}function Drt(t,r){const a=Rs(t,r),u=Kp(a);if(!u)return;let h;switch(u.kind){case 174:h=u.name;break;case 262:case 218:h=Hl(u,100,t);break;case 219:const p=u.typeParameters?30:21;h=Hl(u,p,t)||ma(u.parameters);break;default:return}return h&&{insertBefore:h,returnType:pFt(u)}}function Ert(t,r,{insertBefore:a,returnType:u}){if(u){const h=lW(u);(!h||h.kind!==80||h.text!=="Promise")&&t.replaceNode(r,u,G.createTypeReferenceNode("Promise",G.createNodeArray([u])))}t.insertModifierBefore(r,134,a)}var Irt=[k._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code,k._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code],h4e="fixPropertyOverrideAccessor";Ea({errorCodes:Irt,getCodeActions(t){const r=Nrt(t.sourceFile,t.span.start,t.span.length,t.errorCode,t);if(r)return[oa(h4e,r,k.Generate_get_and_set_accessors,h4e,k.Generate_get_and_set_accessors_for_all_overriding_properties)]},fixIds:[h4e],getAllCodeActions:t=>jl(t,Irt,(r,a)=>{const u=Nrt(a.file,a.start,a.length,a.code,t);if(u)for(const h of u)r.pushRaw(t.sourceFile,h)})});function Nrt(t,r,a,u,h){let p,m;if(u===k._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code)p=r,m=r+a;else if(u===k._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code){const C=h.program.getTypeChecker(),b=Rs(t,r).parent;z.assert(Vw(b),"error span of fixPropertyOverrideAccessor should only be on an accessor");const T=b.parent;z.assert(ss(T),"erroneous accessors should only be inside classes");const E=a_(T4e(T,C));if(!E)return[];const N=Ws(UL(b.name)),R=C.getPropertyOfType(C.getTypeAtLocation(E),N);if(!R||!R.valueDeclaration)return[];p=R.valueDeclaration.pos,m=R.valueDeclaration.end,t=_n(R.valueDeclaration)}else z.fail("fixPropertyOverrideAccessor codefix got unexpected error code "+u);return Xrt(t,h.program,p,m,h,k.Generate_get_and_set_accessors.message)}var _4e="inferFromUsage",Lrt=[k.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code,k.Variable_0_implicitly_has_an_1_type.code,k.Parameter_0_implicitly_has_an_1_type.code,k.Rest_parameter_0_implicitly_has_an_any_type.code,k.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code,k._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code,k.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code,k.Member_0_implicitly_has_an_1_type.code,k.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code,k.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,k.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,k.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code,k.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code,k._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code,k.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code,k.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,k.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code];Ea({errorCodes:Lrt,getCodeActions(t){const{sourceFile:r,program:a,span:{start:u},errorCode:h,cancellationToken:p,host:m,preferences:C}=t,b=Rs(r,u);let T;const E=er.ChangeTracker.with(t,R=>{T=Prt(R,r,b,h,a,p,vk,m,C)}),N=T&&ko(T);return!N||E.length===0?void 0:[oa(_4e,E,[gFt(h,b),yu(N)],_4e,k.Infer_all_types_from_usage)]},fixIds:[_4e],getAllCodeActions(t){const{sourceFile:r,program:a,cancellationToken:u,host:h,preferences:p}=t,m=M3();return jl(t,Lrt,(C,b)=>{Prt(C,r,Rs(b.file,b.start),b.code,a,u,m,h,p)})}});function gFt(t,r){switch(t){case k.Parameter_0_implicitly_has_an_1_type.code:case k.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return Np(Kp(r))?k.Infer_type_of_0_from_usage:k.Infer_parameter_types_from_usage;case k.Rest_parameter_0_implicitly_has_an_any_type.code:case k.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code:return k.Infer_parameter_types_from_usage;case k.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code:return k.Infer_this_type_of_0_from_usage;default:return k.Infer_type_of_0_from_usage}}function mFt(t){switch(t){case k.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code:return k.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code;case k.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return k.Variable_0_implicitly_has_an_1_type.code;case k.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return k.Parameter_0_implicitly_has_an_1_type.code;case k.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code:return k.Rest_parameter_0_implicitly_has_an_any_type.code;case k.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code:return k.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code;case k._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code:return k._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code;case k.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code:return k.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code;case k.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return k.Member_0_implicitly_has_an_1_type.code}return t}function Prt(t,r,a,u,h,p,m,C,b){if(!c8(a.kind)&&a.kind!==80&&a.kind!==26&&a.kind!==110)return;const{parent:T}=a,E=_D(r,h,b,C);switch(u=mFt(u),u){case k.Member_0_implicitly_has_an_1_type.code:case k.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code:if(ds(T)&&m(T)||To(T)||V_(T))return Art(t,E,r,T,h,C,p),E.writeFixes(t),T;if(Ir(T)){const F=jH(T.name,h,p),j=fF(F,T,h,C);if(j){const U=G.createJSDocTypeTag(void 0,G.createJSDocTypeExpression(j),void 0);t.addJSDocTags(r,ua(T.parent.parent,_f),[U])}return E.writeFixes(t),T}return;case k.Variable_0_implicitly_has_an_1_type.code:{const F=h.getTypeChecker().getSymbolAtLocation(a);return F&&F.valueDeclaration&&ds(F.valueDeclaration)&&m(F.valueDeclaration)?(Art(t,E,_n(F.valueDeclaration),F.valueDeclaration,h,C,p),E.writeFixes(t),F.valueDeclaration):void 0}}const N=Kp(a);if(N===void 0)return;let R;switch(u){case k.Parameter_0_implicitly_has_an_1_type.code:if(Np(N)){Ort(t,E,r,N,h,C,p),R=N;break}case k.Rest_parameter_0_implicitly_has_an_any_type.code:if(m(N)){const F=ua(T,Gs);vFt(t,E,r,F,N,h,C,p),R=F}break;case k.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code:case k._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code:hg(N)&<(N.name)&&(Zfe(t,E,r,N,jH(N.name,h,p),h,C),R=N);break;case k.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code:Np(N)&&(Ort(t,E,r,N,h,C,p),R=N);break;case k.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code:er.isThisTypeAnnotatable(N)&&m(N)&&(yFt(t,r,N,h,C,p),R=N);break;default:return z.fail(String(u))}return E.writeFixes(t),R}function Art(t,r,a,u,h,p,m){lt(u.name)&&Zfe(t,r,a,u,jH(u.name,h,m),h,p)}function vFt(t,r,a,u,h,p,m,C){if(!lt(u.name))return;const b=SFt(h,a,p,C);if(z.assert(h.parameters.length===b.length,"Parameter count and inference count should match"),Xn(h))Mrt(t,a,b,p,m);else{const T=Dc(h)&&!Hl(h,21,a);T&&t.insertNodeBefore(a,ma(h.parameters),G.createToken(21));for(const{declaration:E,type:N}of b)E&&!E.type&&!E.initializer&&Zfe(t,r,a,E,N,p,m);T&&t.insertNodeAfter(a,La(h.parameters),G.createToken(22))}}function yFt(t,r,a,u,h,p){const m=Rrt(a,r,u,p);if(!m||!m.length)return;const C=g4e(u,m,p).thisParameter(),b=fF(C,a,u,h);b&&(Xn(a)?bFt(t,r,a,b):t.tryInsertThisTypeAnnotation(r,a,b))}function bFt(t,r,a,u){t.addJSDocTags(r,a,[G.createJSDocThisTag(void 0,G.createJSDocTypeExpression(u))])}function Ort(t,r,a,u,h,p,m){const C=lu(u.parameters);if(C&<(u.name)&<(C.name)){let b=jH(u.name,h,m);b===h.getTypeChecker().getAnyType()&&(b=jH(C.name,h,m)),Xn(u)?Mrt(t,a,[{declaration:C,type:b}],h,p):Zfe(t,r,a,C,b,h,p)}}function Zfe(t,r,a,u,h,p,m){const C=fF(h,u,p,m);if(C)if(Xn(a)&&u.kind!==171){const b=ds(u)?$r(u.parent.parent,Ou):u;if(!b)return;const T=G.createJSDocTypeExpression(C),E=hg(u)?G.createJSDocReturnTag(void 0,T,void 0):G.createJSDocTypeTag(void 0,T,void 0);t.addJSDocTags(a,b,[E])}else CFt(C,u,a,t,r,il(p.getCompilerOptions()))||t.tryInsertTypeAnnotation(a,u,C)}function CFt(t,r,a,u,h,p){const m=PI(t,p);return m&&u.tryInsertTypeAnnotation(a,r,m.typeNode)?(W(m.symbols,C=>h.addImportFromExportedSymbol(C,!0)),!0):!1}function Mrt(t,r,a,u,h){const p=a.length&&a[0].declaration.parent;if(!p)return;const m=ns(a,C=>{const b=C.declaration;if(b.initializer||kk(b)||!lt(b.name))return;const T=C.type&&fF(C.type,b,u,h);if(T){const E=G.cloneNode(b.name);return ir(E,7168),{name:G.cloneNode(b.name),param:b,isOptional:!!C.isOptional,typeNode:T}}});if(m.length)if(Dc(p)||gc(p)){const C=Dc(p)&&!Hl(p,21,r);C&&t.insertNodeBefore(r,ma(p.parameters),G.createToken(21)),W(m,({typeNode:b,param:T})=>{const E=G.createJSDocTypeTag(void 0,G.createJSDocTypeExpression(b)),N=G.createJSDocComment(void 0,[E]);t.insertNodeAt(r,T.getStart(r),N,{suffix:" "})}),C&&t.insertNodeAfter(r,La(p.parameters),G.createToken(22))}else{const C=Yt(m,({name:b,typeNode:T,isOptional:E})=>G.createJSDocParameterTag(void 0,b,!!E,G.createJSDocTypeExpression(T),!1,void 0));t.addJSDocTags(r,p,C)}}function p4e(t,r,a){return ns(xc.getReferenceEntriesForNode(-1,t,r,r.getSourceFiles(),a),u=>u.kind!==xc.EntryKind.Span?$r(u.node,lt):void 0)}function jH(t,r,a){const u=p4e(t,r,a);return g4e(r,u,a).single()}function SFt(t,r,a,u){const h=Rrt(t,r,a,u);return h&&g4e(a,h,u).parameters(t)||t.parameters.map(p=>({declaration:p,type:lt(p.name)?jH(p.name,a,u):a.getTypeChecker().getAnyType()}))}function Rrt(t,r,a,u){let h;switch(t.kind){case 176:h=Hl(t,137,r);break;case 219:case 218:const p=t.parent;h=(ds(p)||To(p))&<(p.name)?p.name:t.name;break;case 262:case 174:case 173:h=t.name;break}if(h)return p4e(h,a,u)}function g4e(t,r,a){const u=t.getTypeChecker(),h={string:()=>u.getStringType(),number:()=>u.getNumberType(),Array:We=>u.createArrayType(We),Promise:We=>u.createPromiseType(We)},p=[u.getStringType(),u.getNumberType(),u.createArrayType(u.getAnyType()),u.createPromiseType(u.getAnyType())];return{single:b,parameters:T,thisParameter:E};function m(){return{isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0}}function C(We){const Ue=new Map;for(const wt of We)wt.properties&&wt.properties.forEach((nt,ze)=>{Ue.has(ze)||Ue.set(ze,[]),Ue.get(ze).push(nt)});const Ye=new Map;return Ue.forEach((wt,nt)=>{Ye.set(nt,C(wt))}),{isNumber:We.some(wt=>wt.isNumber),isString:We.some(wt=>wt.isString),isNumberOrString:We.some(wt=>wt.isNumberOrString),candidateTypes:Ln(We,wt=>wt.candidateTypes),properties:Ye,calls:Ln(We,wt=>wt.calls),constructs:Ln(We,wt=>wt.constructs),numberIndex:W(We,wt=>wt.numberIndex),stringIndex:W(We,wt=>wt.stringIndex),candidateThisTypes:Ln(We,wt=>wt.candidateThisTypes),inferredTypes:void 0}}function b(){return ye(N(r))}function T(We){if(r.length===0||!We.parameters)return;const Ue=m();for(const wt of r)a.throwIfCancellationRequested(),R(wt,Ue);const Ye=[...Ue.constructs||[],...Ue.calls||[]];return We.parameters.map((wt,nt)=>{const ze=[],st=O1(wt);let xt=!1;for(const ft of Ye)if(ft.argumentTypes.length<=nt)xt=Xn(We),ze.push(u.getUndefinedType());else if(st)for(let Ht=nt;HtYe.every(nt=>!nt(wt)))}function pe(We){return ye(_e(We))}function ye(We){if(!We.length)return u.getAnyType();const Ue=u.getUnionType([u.getStringType(),u.getNumberType()]);let wt=oe(We,[{high:ze=>ze===u.getStringType()||ze===u.getNumberType(),low:ze=>ze===Ue},{high:ze=>!(ze.flags&16385),low:ze=>!!(ze.flags&16385)},{high:ze=>!(ze.flags&114689)&&!(Rr(ze)&16),low:ze=>!!(Rr(ze)&16)}]);const nt=wt.filter(ze=>Rr(ze)&16);return nt.length&&(wt=wt.filter(ze=>!(Rr(ze)&16)),wt.push(be(nt))),u.getWidenedType(u.getUnionType(wt.map(u.getBaseTypeOfLiteralType),2))}function be(We){if(We.length===1)return We[0];const Ue=[],Ye=[],wt=[],nt=[];let ze=!1,st=!1;const xt=Ug();for(const Ht of We){for(const Ui of u.getPropertiesOfType(Ht))xt.add(Ui.escapedName,Ui.valueDeclaration?u.getTypeOfSymbolAtLocation(Ui,Ui.valueDeclaration):u.getAnyType());Ue.push(...u.getSignaturesOfType(Ht,0)),Ye.push(...u.getSignaturesOfType(Ht,1));const Oi=u.getIndexInfoOfType(Ht,0);Oi&&(wt.push(Oi.type),ze=ze||Oi.isReadonly);const Ji=u.getIndexInfoOfType(Ht,1);Ji&&(nt.push(Ji.type),st=st||Ji.isReadonly)}const Et=Lw(xt,(Ht,Oi)=>{const Ji=Oi.lengthu.getBaseTypeOfLiteralType(xt)),st=(wt=We.calls)!=null&&wt.length?ve(We):void 0;return st&&ze?nt.push(u.getUnionType([st,...ze],2)):(st&&nt.push(st),O(ze)&&nt.push(...ze)),nt.push(...Ee(We)),nt}function ve(We){const Ue=new Map;We.properties&&We.properties.forEach((ze,st)=>{const xt=u.createSymbol(4,st);xt.links.type=pe(ze),Ue.set(st,xt)});const Ye=We.calls?[Le(We.calls)]:[],wt=We.constructs?[Le(We.constructs)]:[],nt=We.stringIndex?[u.createIndexInfo(u.getStringType(),pe(We.stringIndex),!1)]:[];return u.createAnonymousType(void 0,Ue,Ye,wt,nt)}function Ee(We){if(!We.properties||!We.properties.size)return[];const Ue=p.filter(Ye=>ke(Ye,We));return 0Fe(Ye,We)):[]}function ke(We,Ue){return Ue.properties?!hf(Ue.properties,(Ye,wt)=>{const nt=u.getTypeOfPropertyOfType(We,wt);return nt?Ye.calls?!u.getSignaturesOfType(nt,0).length||!u.isTypeAssignableTo(nt,Ie(Ye.calls)):!u.isTypeAssignableTo(nt,pe(Ye)):!0}):!1}function Fe(We,Ue){if(!(Rr(We)&4)||!Ue.properties)return We;const Ye=We.target,wt=a_(Ye.typeParameters);if(!wt)return We;const nt=[];return Ue.properties.forEach((ze,st)=>{const xt=u.getTypeOfPropertyOfType(Ye,st);z.assert(!!xt,"generic should have all the properties of its reference."),nt.push(...Oe(xt,pe(ze),wt))}),h[We.symbol.escapedName](ye(nt))}function Oe(We,Ue,Ye){if(We===Ye)return[Ue];if(We.flags&3145728)return Ln(We.types,ze=>Oe(ze,Ue,Ye));if(Rr(We)&4&&Rr(Ue)&4){const ze=u.getTypeArguments(We),st=u.getTypeArguments(Ue),xt=[];if(ze&&st)for(let Et=0;Etnt.argumentTypes.length));for(let nt=0;ntst.argumentTypes[nt]||u.getUndefinedType())),We.some(st=>st.argumentTypes[nt]===void 0)&&(ze.flags|=16777216),Ue.push(ze)}const wt=pe(C(We.map(nt=>nt.return_)));return u.createSignature(void 0,void 0,void 0,Ue,wt,void 0,Ye,0)}function et(We,Ue){Ue&&!(Ue.flags&1)&&!(Ue.flags&131072)&&(We.candidateTypes||(We.candidateTypes=[])).push(Ue)}function He(We,Ue){Ue&&!(Ue.flags&1)&&!(Ue.flags&131072)&&(We.candidateThisTypes||(We.candidateThisTypes=[])).push(Ue)}}var m4e="fixReturnTypeInAsyncFunction",Frt=[k.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0.code];Ea({errorCodes:Frt,fixIds:[m4e],getCodeActions:function(r){const{sourceFile:a,program:u,span:h}=r,p=u.getTypeChecker(),m=Brt(a,u.getTypeChecker(),h.start);if(!m)return;const{returnTypeNode:C,returnType:b,promisedTypeNode:T,promisedType:E}=m,N=er.ChangeTracker.with(r,R=>Wrt(R,a,C,T));return[oa(m4e,N,[k.Replace_0_with_Promise_1,p.typeToString(b),p.typeToString(E)],m4e,k.Fix_all_incorrect_return_type_of_an_async_functions)]},getAllCodeActions:t=>jl(t,Frt,(r,a)=>{const u=Brt(a.file,t.program.getTypeChecker(),a.start);u&&Wrt(r,a.file,u.returnTypeNode,u.promisedTypeNode)})});function Brt(t,r,a){if(Xn(t))return;const u=Rs(t,a),h=Xi(u,rc),p=h==null?void 0:h.type;if(!p)return;const m=r.getTypeFromTypeNode(p),C=r.getAwaitedType(m)||r.getVoidType(),b=r.typeToTypeNode(C,p,void 0);if(b)return{returnTypeNode:p,returnType:m,promisedTypeNode:b,promisedType:C}}function Wrt(t,r,a,u){t.replaceNode(r,a,G.createTypeReferenceNode("Promise",[u]))}var Vrt="disableJsDiagnostics",Hrt="disableJsDiagnostics",jrt=ns(Object.keys(k),t=>{const r=k[t];return r.category===1?r.code:void 0});Ea({errorCodes:jrt,getCodeActions:function(r){const{sourceFile:a,program:u,span:h,host:p,formatContext:m}=r;if(!Xn(a)||!Z8(a,u.getCompilerOptions()))return;const C=a.checkJsDirective?"":SS(p,m.options),b=[Y0(Vrt,[Ret(a.fileName,[_H(a.checkJsDirective?sd(a.checkJsDirective.pos,a.checkJsDirective.end):Pf(0,0),`// @ts-nocheck${C}`)])],k.Disable_checking_for_this_file)];return er.isValidLocationToAddComment(a,h.start)&&b.unshift(oa(Vrt,er.ChangeTracker.with(r,T=>zrt(T,a,h.start)),k.Ignore_this_error_message,Hrt,k.Add_ts_ignore_to_all_error_messages)),b},fixIds:[Hrt],getAllCodeActions:t=>{const r=new Set;return jl(t,jrt,(a,u)=>{er.isValidLocationToAddComment(u.file,u.start)&&zrt(a,u.file,u.start,r)})}});function zrt(t,r,a,u){const{line:h}=Da(r,a);(!u||o_(u,h))&&t.insertCommentBeforeLine(r,h,a," @ts-ignore")}function v4e(t,r,a,u,h,p,m){const C=t.symbol.members;for(const b of r)C.has(b.escapedName)||qrt(b,t,a,u,h,p,m,void 0)}function J3(t){return{trackSymbol:()=>!1,moduleResolverHost:ode(t.program,t.host)}}var Urt=(t=>(t[t.Method=1]="Method",t[t.Property=2]="Property",t[t.All=3]="All",t))(Urt||{});function qrt(t,r,a,u,h,p,m,C,b=3,T=!1){const E=t.getDeclarations(),N=lu(E),R=u.program.getTypeChecker(),F=il(u.program.getCompilerOptions()),j=(N==null?void 0:N.kind)??171,U=Ee(t,N),q=N?Wh(N):0;let Q=q&256;Q|=q&1?1:q&4?4:0,N&&O_(N)&&(Q|=512);const re=pe(),Y=R.getWidenedType(R.getTypeOfSymbolAtLocation(t,r)),ue=!!(t.flags&16777216),te=!!(r.flags&33554432)||T,Se=bg(a,h);switch(j){case 171:case 172:let ke=1;ke|=Se===0?268435456:0;let Fe=R.typeToTypeNode(Y,r,ke,J3(u));if(p){const fe=PI(Fe,F);fe&&(Fe=fe.typeNode,rA(p,fe.symbols))}m(G.createPropertyDeclaration(re,N?be(U):t.getName(),ue&&b&2?G.createToken(58):void 0,Fe,void 0));break;case 177:case 178:{z.assertIsDefined(E);let fe=R.typeToTypeNode(Y,r,void 0,J3(u));const Ie=qw(E,N),Le=Ie.secondAccessor?[Ie.firstAccessor,Ie.secondAccessor]:[Ie.firstAccessor];if(p){const et=PI(fe,F);et&&(fe=et.typeNode,rA(p,et.symbols))}for(const et of Le)if(hg(et))m(G.createGetAccessorDeclaration(re,be(U),x,ve(fe),_e(C,Se,te)));else{z.assertNode(et,Np,"The counterpart to a getter should be a setter");const He=J6(et),We=He&<(He.name)?dr(He.name):void 0;m(G.createSetAccessorDeclaration(re,be(U),b4e(1,[We],[ve(fe)],1,!1),_e(C,Se,te)))}break}case 173:case 174:z.assertIsDefined(E);const Oe=Y.isUnion()?Ln(Y.types,fe=>fe.getCallSignatures()):Y.getCallSignatures();if(!Rt(Oe))break;if(E.length===1){z.assert(Oe.length===1,"One declaration implies one signature");const fe=Oe[0];oe(Se,fe,re,be(U),_e(C,Se,te));break}for(const fe of Oe)oe(Se,fe,re,be(U));if(!te)if(E.length>Oe.length){const fe=R.getSignatureFromDeclaration(E[E.length-1]);oe(Se,fe,re,be(U),_e(C,Se))}else z.assert(E.length===Oe.length,"Declarations and signatures should match count"),m(kFt(R,u,r,Oe,be(U),ue&&!!(b&1),re,Se,C));break}function oe(ke,Fe,Oe,fe,Ie){const Le=Yfe(174,u,ke,Fe,Ie,fe,Oe,ue&&!!(b&1),r,p);Le&&m(Le)}function pe(){let ke;return Q&&(ke=au(ke,G.createModifiersFromModifierFlags(Q))),ye()&&(ke=xi(ke,G.createToken(164))),ke&&G.createNodeArray(ke)}function ye(){return!!(u.program.getCompilerOptions().noImplicitOverride&&N&&WT(N))}function be(ke){return lt(ke)&&ke.escapedText==="constructor"?G.createComputedPropertyName(G.createStringLiteral(dr(ke),Se===0)):Pl(ke,!1)}function _e(ke,Fe,Oe){return Oe?void 0:Pl(ke,!1)||C4e(Fe)}function ve(ke){return Pl(ke,!1)}function Ee(ke,Fe){if(Pu(ke)&262144){const Oe=ke.links.nameType;if(Oe&&Pm(Oe))return G.createIdentifier(Ws(Am(Oe)))}return Pl(ko(Fe),!1)}}function Yfe(t,r,a,u,h,p,m,C,b,T){const E=r.program,N=E.getTypeChecker(),R=il(E.getCompilerOptions()),F=Xn(b),j=524545|(a===0?268435456:0),U=N.signatureToSignatureDeclaration(u,t,b,j,J3(r));if(!U)return;let q=F?void 0:U.typeParameters,Q=U.parameters,re=F?void 0:Pl(U.type);if(T){if(q){const Se=Is(q,oe=>{let pe=oe.constraint,ye=oe.default;if(pe){const be=PI(pe,R);be&&(pe=be.typeNode,rA(T,be.symbols))}if(ye){const be=PI(ye,R);be&&(ye=be.typeNode,rA(T,be.symbols))}return G.updateTypeParameterDeclaration(oe,oe.modifiers,oe.name,pe,ye)});q!==Se&&(q=zt(G.createNodeArray(Se,q.hasTrailingComma),q))}const te=Is(Q,Se=>{let oe=F?void 0:Se.type;if(oe){const pe=PI(oe,R);pe&&(oe=pe.typeNode,rA(T,pe.symbols))}return G.updateParameterDeclaration(Se,Se.modifiers,Se.dotDotDotToken,Se.name,F?void 0:Se.questionToken,oe,Se.initializer)});if(Q!==te&&(Q=zt(G.createNodeArray(te,Q.hasTrailingComma),Q)),re){const Se=PI(re,R);Se&&(re=Se.typeNode,rA(T,Se.symbols))}}const Y=C?G.createToken(58):void 0,ue=U.asteriskToken;if(gc(U))return G.updateFunctionExpression(U,m,U.asteriskToken,$r(p,lt),q,Q,re,h??U.body);if(Dc(U))return G.updateArrowFunction(U,m,q,Q,re,U.equalsGreaterThanToken,h??U.body);if(Au(U))return G.updateMethodDeclaration(U,m,ue,p??G.createIdentifier(""),Y,q,Q,re,h);if(Uu(U))return G.updateFunctionDeclaration(U,m,U.asteriskToken,$r(p,lt),q,Q,re,h??U.body)}function y4e(t,r,a,u,h,p,m){const C=bg(r.sourceFile,r.preferences),b=il(r.program.getCompilerOptions()),T=J3(r),E=r.program.getTypeChecker(),N=Xn(m),{typeArguments:R,arguments:F,parent:j}=u,U=N?void 0:E.getContextualType(u),q=Yt(F,ye=>lt(ye)?ye.text:Ir(ye)&<(ye.name)?ye.name.text:void 0),Q=N?[]:Yt(F,ye=>E.getTypeAtLocation(ye)),{argumentTypeNodes:re,argumentTypeParameters:Y}=Grt(E,a,Q,m,b,1,T),ue=p?G.createNodeArray(G.createModifiersFromModifierFlags(p)):void 0,te=jG(j)?G.createToken(42):void 0,Se=N?void 0:wFt(E,Y,R),oe=b4e(F.length,q,re,void 0,N),pe=N||U===void 0?void 0:E.typeToTypeNode(U,m,void 0,T);switch(t){case 174:return G.createMethodDeclaration(ue,te,h,void 0,Se,oe,pe,C4e(C));case 173:return G.createMethodSignature(ue,h,void 0,Se,oe,pe===void 0?G.createKeywordTypeNode(159):pe);case 262:return z.assert(typeof h=="string"||lt(h),"Unexpected name"),G.createFunctionDeclaration(ue,te,h,Se,oe,pe,qX(k.Function_not_implemented.message,C));default:z.fail("Unexpected kind")}}function wFt(t,r,a){const u=new Set(r.map(p=>p[0])),h=new Map(r);if(a){const p=a.filter(C=>!r.some(b=>{var T;return t.getTypeAtLocation(C)===((T=b[1])==null?void 0:T.argumentType)})),m=u.size+p.length;for(let C=0;u.size{var m;return G.createTypeParameterDeclaration(void 0,p,(m=h.get(p))==null?void 0:m.constraint)})}function $rt(t){return 84+t<=90?String.fromCharCode(84+t):`T${t}`}function UX(t,r,a,u,h,p,m){let C=t.typeToTypeNode(a,u,p,m);if(C&&V1(C)){const b=PI(C,h);b&&(rA(r,b.symbols),C=b.typeNode)}return Pl(C)}function Jrt(t){return t.isUnionOrIntersection()?t.types.some(Jrt):t.flags&262144}function Grt(t,r,a,u,h,p,m){const C=[],b=new Map;for(let T=0;T=u?G.createToken(58):void 0,h?void 0:(a==null?void 0:a[C])||G.createKeywordTypeNode(159),void 0);p.push(E)}return p}function kFt(t,r,a,u,h,p,m,C,b){let T=u[0],E=u[0].minArgumentCount,N=!1;for(const U of u)E=Math.min(U.minArgumentCount,E),vh(U)&&(N=!0),U.parameters.length>=T.parameters.length&&(!vh(U)||vh(T))&&(T=U);const R=T.parameters.length-(vh(T)?1:0),F=T.parameters.map(U=>U.name),j=b4e(R,F,void 0,E,!1);if(N){const U=G.createParameterDeclaration(void 0,G.createToken(26),F[R]||"rest",R>=E?G.createToken(58):void 0,G.createArrayTypeNode(G.createKeywordTypeNode(159)),void 0);j.push(U)}return DFt(m,h,p,void 0,j,TFt(u,t,r,a),C,b)}function TFt(t,r,a,u){if(O(t)){const h=r.getUnionType(Yt(t,r.getReturnTypeOfSignature));return r.typeToTypeNode(h,u,1,J3(a))}}function DFt(t,r,a,u,h,p,m,C){return G.createMethodDeclaration(t,void 0,r,a?G.createToken(58):void 0,u,h,p,C||C4e(m))}function C4e(t){return qX(k.Method_not_implemented.message,t)}function qX(t,r){return G.createBlock([G.createThrowStatement(G.createNewExpression(G.createIdentifier("Error"),void 0,[G.createStringLiteral(t,r===0)]))],!0)}function S4e(t,r,a){const u=y8(r);if(!u)return;const h=x4e(u,"compilerOptions");if(h===void 0){t.insertNodeAtObjectStart(r,u,ehe("compilerOptions",G.createObjectLiteralExpression(a.map(([m,C])=>ehe(m,C)),!0)));return}const p=h.initializer;if(Pa(p))for(const[m,C]of a){const b=x4e(p,m);b===void 0?t.insertNodeAtObjectStart(r,p,ehe(m,C)):t.replaceNode(r,b.initializer,C)}}function w4e(t,r,a,u){S4e(t,r,[[a,u]])}function ehe(t,r){return G.createPropertyAssignment(G.createStringLiteral(t),r)}function x4e(t,r){return Me(t.properties,a=>pd(a)&&!!a.name&&ja(a.name)&&a.name.text===r)}function PI(t,r){let a;const u=Ct(t,h,gs);if(a&&u)return{typeNode:u,symbols:a};function h(p){if(rS(p)&&p.qualifier){const m=Ip(p.qualifier);if(!m.symbol)return cn(p,h,void 0);const C=dX(m.symbol,r),b=C!==m.text?Qrt(p.qualifier,G.createIdentifier(C)):p.qualifier;a=xi(a,m.symbol);const T=wn(p.typeArguments,h,gs);return G.createTypeReferenceNode(b,T)}return cn(p,h,void 0)}}function Qrt(t,r){return t.kind===80?r:G.createQualifiedName(Qrt(t.left,r),t.right)}function rA(t,r){r.forEach(a=>t.addImportFromExportedSymbol(a,!0))}function k4e(t,r){const a=zu(r);let u=Rs(t,r.start);for(;u.endp.replaceNode(r,a,u));return Y0(ist,h,[k.Replace_import_with_0,h[0].textChanges[0].newText])}Ea({errorCodes:[k.This_expression_is_not_callable.code,k.This_expression_is_not_constructable.code],getCodeActions:VFt});function VFt(t){const r=t.sourceFile,a=k.This_expression_is_not_callable.code===t.errorCode?213:214,u=Xi(Rs(r,t.span.start),p=>p.kind===a);if(!u)return[];const h=u.expression;return rst(t,h)}Ea({errorCodes:[k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,k.Type_0_does_not_satisfy_the_constraint_1.code,k.Type_0_is_not_assignable_to_type_1.code,k.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code,k.Type_predicate_0_is_not_assignable_to_1.code,k.Property_0_of_type_1_is_not_assignable_to_2_index_type_3.code,k._0_index_type_1_is_not_assignable_to_2_index_type_3.code,k.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2.code,k.Property_0_in_type_1_is_not_assignable_to_type_2.code,k.Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property.code,k.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1.code],getCodeActions:HFt});function HFt(t){const r=t.sourceFile,a=Xi(Rs(r,t.span.start),u=>u.getStart()===t.span.start&&u.getEnd()===t.span.start+t.span.length);return a?rst(t,a):[]}function rst(t,r){const a=t.program.getTypeChecker().getTypeAtLocation(r);if(!(a.symbol&&M1(a.symbol)&&a.symbol.links.originatingImport))return[];const u=[],h=a.symbol.links.originatingImport;if(Gp(h)||un(u,WFt(t,h)),Ut(r)&&!(Af(r.parent)&&r.parent.name===r)){const p=t.sourceFile,m=er.ChangeTracker.with(t,C=>C.replaceNode(p,r,G.createPropertyAccessExpression(r,"default"),{}));u.push(Y0(ist,m,k.Use_synthetic_default_member))}return u}var D4e="strictClassInitialization",E4e="addMissingPropertyDefiniteAssignmentAssertions",I4e="addMissingPropertyUndefinedType",N4e="addMissingPropertyInitializer",sst=[k.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor.code];Ea({errorCodes:sst,getCodeActions:function(r){const a=ost(r.sourceFile,r.span.start);if(!a)return;const u=[];return xi(u,zFt(r,a)),xi(u,jFt(r,a)),xi(u,UFt(r,a)),u},fixIds:[E4e,I4e,N4e],getAllCodeActions:t=>jl(t,sst,(r,a)=>{const u=ost(a.file,a.start);if(u)switch(t.fixId){case E4e:ast(r,a.file,u.prop);break;case I4e:lst(r,a.file,u);break;case N4e:const h=t.program.getTypeChecker(),p=ust(h,u.prop);if(!p)return;cst(r,a.file,u.prop,p);break;default:z.fail(JSON.stringify(t.fixId))}})});function ost(t,r){const a=Rs(t,r);if(lt(a)&&To(a.parent)){const u=hd(a.parent);if(u)return{type:u,prop:a.parent,isJs:Xn(a.parent)}}}function jFt(t,r){if(r.isJs)return;const a=er.ChangeTracker.with(t,u=>ast(u,t.sourceFile,r.prop));return oa(D4e,a,[k.Add_definite_assignment_assertion_to_property_0,r.prop.getText()],E4e,k.Add_definite_assignment_assertions_to_all_uninitialized_properties)}function ast(t,r,a){Op(a);const u=G.updatePropertyDeclaration(a,a.modifiers,a.name,G.createToken(54),a.type,a.initializer);t.replaceNode(r,a,u)}function zFt(t,r){const a=er.ChangeTracker.with(t,u=>lst(u,t.sourceFile,r));return oa(D4e,a,[k.Add_undefined_type_to_property_0,r.prop.name.getText()],I4e,k.Add_undefined_type_to_all_uninitialized_properties)}function lst(t,r,a){const u=G.createKeywordTypeNode(157),h=Yw(a.type)?a.type.types.concat(u):[a.type,u],p=G.createUnionTypeNode(h);a.isJs?t.addJSDocTags(r,a.prop,[G.createJSDocTypeTag(void 0,G.createJSDocTypeExpression(p))]):t.replaceNode(r,a.type,p)}function UFt(t,r){if(r.isJs)return;const a=t.program.getTypeChecker(),u=ust(a,r.prop);if(!u)return;const h=er.ChangeTracker.with(t,p=>cst(p,t.sourceFile,r.prop,u));return oa(D4e,h,[k.Add_initializer_to_property_0,r.prop.name.getText()],N4e,k.Add_initializers_to_all_uninitialized_properties)}function cst(t,r,a,u){Op(a);const h=G.updatePropertyDeclaration(a,a.modifiers,a.name,a.questionToken,a.type,u);t.replaceNode(r,a,h)}function ust(t,r){return dst(t,t.getTypeFromTypeNode(r.type))}function dst(t,r){if(r.flags&512)return r===t.getFalseType()||r===t.getFalseType(!0)?G.createFalse():G.createTrue();if(r.isStringLiteral())return G.createStringLiteral(r.value);if(r.isNumberLiteral())return G.createNumericLiteral(r.value);if(r.flags&2048)return G.createBigIntLiteral(r.value);if(r.isUnion())return Z(r.types,a=>dst(t,a));if(r.isClass()){const a=Ub(r.symbol);if(!a||Kr(a,64))return;const u=Gy(a);return u&&u.parameters.length?void 0:G.createNewExpression(G.createIdentifier(r.symbol.name),void 0,void 0)}else if(t.isArrayLikeType(r))return G.createArrayLiteralExpression()}var L4e="requireInTs",fst=[k.require_call_may_be_converted_to_an_import.code];Ea({errorCodes:fst,getCodeActions(t){const r=_st(t.sourceFile,t.program,t.span.start);if(!r)return;const a=er.ChangeTracker.with(t,u=>hst(u,t.sourceFile,r));return[oa(L4e,a,k.Convert_require_to_import,L4e,k.Convert_all_require_to_import)]},fixIds:[L4e],getAllCodeActions:t=>jl(t,fst,(r,a)=>{const u=_st(a.file,t.program,a.start);u&&hst(r,t.sourceFile,u)})});function hst(t,r,a){const{allowSyntheticDefaults:u,defaultImportName:h,namedImports:p,statement:m,required:C}=a;t.replaceNode(r,m,h&&!u?G.createImportEqualsDeclaration(void 0,!1,h,G.createExternalModuleReference(C)):G.createImportDeclaration(void 0,G.createImportClause(!1,h,p),C,void 0))}function _st(t,r,a){const{parent:u}=Rs(t,a);B_(u,!0)||z.failBadSyntaxKind(u);const h=ua(u.parent,ds),p=$r(h.name,lt),m=pg(h.name)?qFt(h.name):void 0;if(p||m)return{allowSyntheticDefaults:cP(r.getCompilerOptions()),defaultImportName:p,namedImports:m,statement:ua(h.parent.parent,Ou),required:ma(u.arguments)}}function qFt(t){const r=[];for(const a of t.elements){if(!lt(a.name)||a.initializer)return;r.push(G.createImportSpecifier(!1,$r(a.propertyName,lt),a.name))}if(r.length)return G.createNamedImports(r)}var P4e="useDefaultImport",pst=[k.Import_may_be_converted_to_a_default_import.code];Ea({errorCodes:pst,getCodeActions(t){const{sourceFile:r,span:{start:a}}=t,u=gst(r,a);if(!u)return;const h=er.ChangeTracker.with(t,p=>mst(p,r,u,t.preferences));return[oa(P4e,h,k.Convert_to_default_import,P4e,k.Convert_all_to_default_imports)]},fixIds:[P4e],getAllCodeActions:t=>jl(t,pst,(r,a)=>{const u=gst(a.file,a.start);u&&mst(r,a.file,u,t.preferences)})});function gst(t,r){const a=Rs(t,r);if(!lt(a))return;const{parent:u}=a;if(kd(u)&&Kb(u.moduleReference))return{importNode:u,name:a,moduleSpecifier:u.moduleReference.expression};if(eb(u)&&Cu(u.parent.parent)){const h=u.parent.parent;return{importNode:h,name:a,moduleSpecifier:h.moduleSpecifier}}}function mst(t,r,a,u){t.replaceNode(r,a.importNode,ux(a.name,void 0,a.moduleSpecifier,bg(r,u)))}var A4e="useBigintLiteral",vst=[k.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers.code];Ea({errorCodes:vst,getCodeActions:function(r){const a=er.ChangeTracker.with(r,u=>yst(u,r.sourceFile,r.span));if(a.length>0)return[oa(A4e,a,k.Convert_to_a_bigint_numeric_literal,A4e,k.Convert_all_to_bigint_numeric_literals)]},fixIds:[A4e],getAllCodeActions:t=>jl(t,vst,(r,a)=>yst(r,a.file,a))});function yst(t,r,a){const u=$r(Rs(r,a.start),W_);if(!u)return;const h=u.getText(r)+"n";t.replaceNode(r,u,G.createBigIntLiteral(h))}var $Ft="fixAddModuleReferTypeMissingTypeof",O4e=$Ft,bst=[k.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0.code];Ea({errorCodes:bst,getCodeActions:function(r){const{sourceFile:a,span:u}=r,h=Cst(a,u.start),p=er.ChangeTracker.with(r,m=>Sst(m,a,h));return[oa(O4e,p,k.Add_missing_typeof,O4e,k.Add_missing_typeof)]},fixIds:[O4e],getAllCodeActions:t=>jl(t,bst,(r,a)=>Sst(r,t.sourceFile,Cst(a.file,a.start)))});function Cst(t,r){const a=Rs(t,r);return z.assert(a.kind===102,"This token should be an ImportKeyword"),z.assert(a.parent.kind===205,"Token parent should be an ImportType"),a.parent}function Sst(t,r,a){const u=G.updateImportTypeNode(a,a.argument,a.attributes,a.qualifier,a.typeArguments,!0);t.replaceNode(r,a,u)}var M4e="wrapJsxInFragment",wst=[k.JSX_expressions_must_have_one_parent_element.code];Ea({errorCodes:wst,getCodeActions:function(r){const{sourceFile:a,span:u}=r,h=xst(a,u.start);if(!h)return;const p=er.ChangeTracker.with(r,m=>kst(m,a,h));return[oa(M4e,p,k.Wrap_in_JSX_fragment,M4e,k.Wrap_all_unparented_JSX_in_JSX_fragment)]},fixIds:[M4e],getAllCodeActions:t=>jl(t,wst,(r,a)=>{const u=xst(t.sourceFile,a.start);u&&kst(r,t.sourceFile,u)})});function xst(t,r){let h=Rs(t,r).parent.parent;if(!(!cr(h)&&(h=h.parent,!cr(h)))&&vu(h.operatorToken))return h}function kst(t,r,a){const u=JFt(a);u&&t.replaceNode(r,a,G.createJsxFragment(G.createJsxOpeningFragment(),u,G.createJsxJsxClosingFragment()))}function JFt(t){const r=[];let a=t;for(;;)if(cr(a)&&vu(a.operatorToken)&&a.operatorToken.kind===28){if(r.push(a.left),JB(a.right))return r.push(a.right),r;if(cr(a.right)){a=a.right;continue}else return}else return}var R4e="wrapDecoratorInParentheses",Tst=[k.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator.code];Ea({errorCodes:Tst,getCodeActions:function(r){const a=er.ChangeTracker.with(r,u=>Dst(u,r.sourceFile,r.span.start));return[oa(R4e,a,k.Wrap_in_parentheses,R4e,k.Wrap_all_invalid_decorator_expressions_in_parentheses)]},fixIds:[R4e],getAllCodeActions:t=>jl(t,Tst,(r,a)=>Dst(r,a.file,a.start))});function Dst(t,r,a){const u=Rs(r,a),h=Xi(u,jd);z.assert(!!h,"Expected position to be owned by a decorator.");const p=G.createParenthesizedExpression(h.expression);t.replaceNode(r,h.expression,p)}var F4e="fixConvertToMappedObjectType",Est=[k.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead.code];Ea({errorCodes:Est,getCodeActions:function(r){const{sourceFile:a,span:u}=r,h=Ist(a,u.start);if(!h)return;const p=er.ChangeTracker.with(r,C=>Nst(C,a,h)),m=dr(h.container.name);return[oa(F4e,p,[k.Convert_0_to_mapped_object_type,m],F4e,[k.Convert_0_to_mapped_object_type,m])]},fixIds:[F4e],getAllCodeActions:t=>jl(t,Est,(r,a)=>{const u=Ist(a.file,a.start);u&&Nst(r,a.file,u)})});function Ist(t,r){const a=Rs(t,r),u=$r(a.parent.parent,UT);if(!u)return;const h=Ff(u.parent)?u.parent:$r(u.parent.parent,Mm);if(h)return{indexSignature:u,container:h}}function GFt(t,r){return G.createTypeAliasDeclaration(t.modifiers,t.name,t.typeParameters,r)}function Nst(t,r,{indexSignature:a,container:u}){const p=(Ff(u)?u.members:u.type.members).filter(E=>!UT(E)),m=ma(a.parameters),C=G.createTypeParameterDeclaration(void 0,ua(m.name,lt),m.type),b=G.createMappedTypeNode(R8(a)?G.createModifier(148):void 0,C,void 0,a.questionToken,a.type,void 0),T=G.createIntersectionTypeNode([...E8(u),b,...p.length?[G.createTypeLiteralNode(p)]:x]);t.replaceNode(r,u,GFt(u,T))}var Lst="removeAccidentalCallParentheses",KFt=[k.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without.code];Ea({errorCodes:KFt,getCodeActions(t){const r=Xi(Rs(t.sourceFile,t.span.start),sa);if(!r)return;const a=er.ChangeTracker.with(t,u=>{u.deleteRange(t.sourceFile,{pos:r.expression.end,end:r.end})});return[Y0(Lst,a,k.Remove_parentheses)]},fixIds:[Lst]});var B4e="removeUnnecessaryAwait",Pst=[k.await_has_no_effect_on_the_type_of_this_expression.code];Ea({errorCodes:Pst,getCodeActions:function(r){const a=er.ChangeTracker.with(r,u=>Ast(u,r.sourceFile,r.span));if(a.length>0)return[oa(B4e,a,k.Remove_unnecessary_await,B4e,k.Remove_all_unnecessary_uses_of_await)]},fixIds:[B4e],getAllCodeActions:t=>jl(t,Pst,(r,a)=>Ast(r,a.file,a))});function Ast(t,r,a){const u=$r(Rs(r,a.start),C=>C.kind===135),h=u&&$r(u.parent,ex);if(!h)return;let p=h;if(g_(h.parent)){const C=X6(h.expression,!1);if(lt(C)){const b=Dd(h.parent.pos,r);b&&b.kind!==105&&(p=h.parent)}}t.replaceNode(r,p,h.expression)}var Ost=[k.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both.code],W4e="splitTypeOnlyImport";Ea({errorCodes:Ost,fixIds:[W4e],getCodeActions:function(r){const a=er.ChangeTracker.with(r,u=>Rst(u,Mst(r.sourceFile,r.span),r));if(a.length)return[oa(W4e,a,k.Split_into_two_separate_import_declarations,W4e,k.Split_all_invalid_type_only_imports)]},getAllCodeActions:t=>jl(t,Ost,(r,a)=>{Rst(r,Mst(t.sourceFile,a),t)})});function Mst(t,r){return Xi(Rs(t,r.start),Cu)}function Rst(t,r,a){if(!r)return;const u=z.checkDefined(r.importClause);t.replaceNode(a.sourceFile,r,G.updateImportDeclaration(r,r.modifiers,G.updateImportClause(u,u.isTypeOnly,u.name,void 0),r.moduleSpecifier,r.attributes)),t.insertNodeAfter(a.sourceFile,r,G.createImportDeclaration(void 0,G.updateImportClause(u,u.isTypeOnly,void 0,u.namedBindings),r.moduleSpecifier,r.attributes))}var V4e="fixConvertConstToLet",Fst=[k.Cannot_assign_to_0_because_it_is_a_constant.code];Ea({errorCodes:Fst,getCodeActions:function(r){const{sourceFile:a,span:u,program:h}=r,p=Bst(a,u.start,h);if(p===void 0)return;const m=er.ChangeTracker.with(r,C=>Wst(C,a,p.token));return[eAe(V4e,m,k.Convert_const_to_let,V4e,k.Convert_all_const_to_let)]},getAllCodeActions:t=>{const{program:r}=t,a=new Map;return eA(er.ChangeTracker.with(t,u=>{tA(t,Fst,h=>{const p=Bst(h.file,h.start,r);if(p&&Lm(a,Aa(p.symbol)))return Wst(u,h.file,p.token)})}))},fixIds:[V4e]});function Bst(t,r,a){var u;const p=a.getTypeChecker().getSymbolAtLocation(Rs(t,r));if(p===void 0)return;const m=$r((u=p==null?void 0:p.valueDeclaration)==null?void 0:u.parent,wf);if(m===void 0)return;const C=Hl(m,87,t);if(C!==void 0)return{symbol:p,token:C}}function Wst(t,r,a){t.replaceNode(r,a,G.createToken(121))}var H4e="fixExpectedComma",QFt=k._0_expected.code,Vst=[QFt];Ea({errorCodes:Vst,getCodeActions(t){const{sourceFile:r}=t,a=Hst(r,t.span.start,t.errorCode);if(!a)return;const u=er.ChangeTracker.with(t,h=>jst(h,r,a));return[oa(H4e,u,[k.Change_0_to_1,";",","],H4e,[k.Change_0_to_1,";",","])]},fixIds:[H4e],getAllCodeActions:t=>jl(t,Vst,(r,a)=>{const u=Hst(a.file,a.start,a.code);u&&jst(r,t.sourceFile,u)})});function Hst(t,r,a){const u=Rs(t,r);return u.kind===27&&u.parent&&(Pa(u.parent)||Rf(u.parent))?{node:u}:void 0}function jst(t,r,{node:a}){const u=G.createToken(28);t.replaceNode(r,a,u)}var XFt="addVoidToPromise",zst="addVoidToPromise",Ust=[k.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments.code,k.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code];Ea({errorCodes:Ust,fixIds:[zst],getCodeActions(t){const r=er.ChangeTracker.with(t,a=>qst(a,t.sourceFile,t.span,t.program));if(r.length>0)return[oa(XFt,r,k.Add_void_to_Promise_resolved_without_a_value,zst,k.Add_void_to_all_Promises_resolved_without_a_value)]},getAllCodeActions(t){return jl(t,Ust,(r,a)=>qst(r,a.file,a,t.program,new Set))}});function qst(t,r,a,u,h){const p=Rs(r,a.start);if(!lt(p)||!sa(p.parent)||p.parent.expression!==p||p.parent.arguments.length!==0)return;const m=u.getTypeChecker(),C=m.getSymbolAtLocation(p),b=C==null?void 0:C.valueDeclaration;if(!b||!Gs(b)||!GT(b.parent.parent)||h!=null&&h.has(b))return;h==null||h.add(b);const T=ZFt(b.parent.parent);if(Rt(T)){const E=T[0],N=!Yw(E)&&!_I(E)&&_I(G.createUnionTypeNode([E,G.createKeywordTypeNode(116)]).types[0]);N&&t.insertText(r,E.pos,"("),t.insertText(r,E.end,N?") | void":" | void")}else{const E=m.getResolvedSignature(p.parent),N=E==null?void 0:E.parameters[0],R=N&&m.getTypeOfSymbolAtLocation(N,b.parent.parent);Xn(b)?(!R||R.flags&3)&&(t.insertText(r,b.parent.parent.end,")"),t.insertText(r,qa(r.text,b.parent.parent.pos),"/** @type {Promise} */(")):(!R||R.flags&2)&&t.insertText(r,b.parent.parent.expression.end,"")}}function ZFt(t){var r;if(Xn(t)){if(g_(t.parent)){const a=(r=xk(t.parent))==null?void 0:r.typeExpression.type;if(a&&_g(a)&<(a.typeName)&&dr(a.typeName)==="Promise")return a.typeArguments}}else return t.typeArguments}var sA={};l(sA,{CompletionKind:()=>cot,CompletionSource:()=>Jst,SortText:()=>Sh,StringCompletions:()=>dhe,SymbolOriginInfoKind:()=>Gst,createCompletionDetails:()=>GX,createCompletionDetailsForSymbol:()=>K4e,getCompletionEntriesFromSymbols:()=>J4e,getCompletionEntryDetails:()=>E5t,getCompletionEntrySymbol:()=>N5t,getCompletionsAtPosition:()=>o5t,getPropertiesForObjectExpression:()=>lhe,moduleSpecifierResolutionCacheAttemptLimit:()=>$st,moduleSpecifierResolutionLimit:()=>j4e});var j4e=100,$st=1e3,Sh={LocalDeclarationPriority:"10",LocationPriority:"11",OptionalMember:"12",MemberDeclaredBySpreadAssignment:"13",SuggestedClassMembers:"14",GlobalsOrKeywords:"15",AutoImportSuggestions:"16",ClassMemberSnippets:"17",JavascriptIdentifiers:"18",Deprecated(t){return"z"+t},ObjectLiteralProperty(t,r){return`${t}\0${r}\0`},SortBelow(t){return t+"1"}},Jst=(t=>(t.ThisProperty="ThisProperty/",t.ClassMemberSnippet="ClassMemberSnippet/",t.TypeOnlyAlias="TypeOnlyAlias/",t.ObjectLiteralMethodSnippet="ObjectLiteralMethodSnippet/",t.SwitchCases="SwitchCases/",t.ObjectLiteralMemberWithComma="ObjectLiteralMemberWithComma/",t))(Jst||{}),Gst=(t=>(t[t.ThisType=1]="ThisType",t[t.SymbolMember=2]="SymbolMember",t[t.Export=4]="Export",t[t.Promise=8]="Promise",t[t.Nullable=16]="Nullable",t[t.ResolvedExport=32]="ResolvedExport",t[t.TypeOnlyAlias=64]="TypeOnlyAlias",t[t.ObjectLiteralMethod=128]="ObjectLiteralMethod",t[t.Ignore=256]="Ignore",t[t.ComputedPropertyName=512]="ComputedPropertyName",t[t.SymbolMemberNoExport=2]="SymbolMemberNoExport",t[t.SymbolMemberExport=6]="SymbolMemberExport",t))(Gst||{});function YFt(t){return!!(t.kind&1)}function e5t(t){return!!(t.kind&2)}function $X(t){return!!(t&&t.kind&4)}function wF(t){return!!(t&&t.kind===32)}function t5t(t){return $X(t)||wF(t)||z4e(t)}function i5t(t){return($X(t)||wF(t))&&!!t.isFromPackageJson}function n5t(t){return!!(t.kind&8)}function r5t(t){return!!(t.kind&16)}function Kst(t){return!!(t&&t.kind&64)}function Qst(t){return!!(t&&t.kind&128)}function s5t(t){return!!(t&&t.kind&256)}function z4e(t){return!!(t&&t.kind&512)}function Xst(t,r,a,u,h,p,m,C,b){var T,E,N;const R=Vc(),F=m||uP(f_(u.getCompilerOptions()));let j=!1,U=0,q=0,Q=0,re=0;const Y=b({tryResolve:te,skippedAny:()=>j,resolvedAny:()=>q>0,resolvedBeyondLimit:()=>q>j4e}),ue=re?` (${(Q/re*100).toFixed(1)}% hit rate)`:"";return(T=r.log)==null||T.call(r,`${t}: resolved ${q} module specifiers, plus ${U} ambient and ${Q} from cache${ue}`),(E=r.log)==null||E.call(r,`${t}: response is ${j?"incomplete":"complete"}`),(N=r.log)==null||N.call(r,`${t}: ${Vc()-R}`),Y;function te(Se,oe){if(oe){const _e=a.getModuleSpecifierForBestExportInfo(Se,h,C);return _e&&U++,_e||"failed"}const pe=F||p.allowIncompleteCompletions&&q{const j=ns(b.entries,U=>{var q;if(!U.hasAction||!U.source||!U.data||Zst(U.data))return U;if(!kot(U.name,E))return;const{origin:Q}=z.checkDefined(dot(U.name,U.data,u,h)),re=N.get(r.path,U.data.exportMapKey),Y=re&&F.tryResolve(re,!Zd(Nm(Q.moduleSymbol.name)));if(Y==="skipped")return U;if(!Y||Y==="failed"){(q=h.log)==null||q.call(h,`Unexpected failure resolving auto import for '${U.name}' from '${U.source}'`);return}const ue={...Q,kind:32,moduleSpecifier:Y.moduleSpecifier};return U.data=oot(ue),U.source=$4e(ue),U.sourceDisplay=[Cg(ue.moduleSpecifier)],U});return F.skippedAny()||(b.isIncomplete=void 0),j});return b.entries=R,b.flags=(b.flags||0)|4,b.optionalReplacementSpan=iot(T),b}function U4e(t){return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:t}}function Yst(t,r,a,u,h,p){const m=Rs(t,r);if(!k6(m)&&!G0(m))return[];const C=G0(m)?m:m.parent;if(!G0(C))return[];const b=C.parent;if(!Bo(b))return[];const T=F_(t),E=h.includeCompletionsWithSnippetText||void 0,N=$n(C.tags,R=>em(R)&&R.getEnd()<=r);return ns(b.parameters,R=>{if(!b6(R).length){if(lt(R.name)){const F={tabstop:1},j=R.name.text;let U=zH(j,R.initializer,R.dotDotDotToken,T,!1,!1,a,u,h),q=E?zH(j,R.initializer,R.dotDotDotToken,T,!1,!0,a,u,h,F):void 0;return p&&(U=U.slice(1),q&&(q=q.slice(1))),{name:U,kind:"parameter",sortText:Sh.LocationPriority,insertText:E?q:void 0,isSnippet:E}}else if(R.parent.parameters.indexOf(R)===N){const F=`param${N}`,j=eot(F,R.name,R.initializer,R.dotDotDotToken,T,!1,a,u,h),U=E?eot(F,R.name,R.initializer,R.dotDotDotToken,T,!0,a,u,h):void 0;let q=j.join(fS(u)+"* "),Q=U==null?void 0:U.join(fS(u)+"* ");return p&&(q=q.slice(1),Q&&(Q=Q.slice(1))),{name:q,kind:"parameter",sortText:Sh.LocationPriority,insertText:E?Q:void 0,isSnippet:E}}}})}function eot(t,r,a,u,h,p,m,C,b){if(!h)return[zH(t,a,u,h,!1,p,m,C,b,{tabstop:1})];return T(t,r,a,u,{tabstop:1});function T(N,R,F,j,U){if(pg(R)&&!j){const Q={tabstop:U.tabstop},re=zH(N,F,j,h,!0,p,m,C,b,Q);let Y=[];for(const ue of R.elements){const te=E(N,ue,Q);if(te)Y.push(...te);else{Y=void 0;break}}if(Y)return U.tabstop=Q.tabstop,[re,...Y]}return[zH(N,F,j,h,!1,p,m,C,b,U)]}function E(N,R,F){if(!R.propertyName&<(R.name)||lt(R.name)){const j=R.propertyName?m8(R.propertyName):R.name.text;if(!j)return;const U=`${N}.${j}`;return[zH(U,R.initializer,R.dotDotDotToken,h,!1,p,m,C,b,F)]}else if(R.propertyName){const j=m8(R.propertyName);return j&&T(`${N}.${j}`,R.name,R.initializer,R.dotDotDotToken,F)}}}function zH(t,r,a,u,h,p,m,C,b,T){if(p&&z.assertIsDefined(T),r&&(t=l5t(t,r)),p&&(t=zT(t)),u){let E="*";if(h)z.assert(!a,"Cannot annotate a rest parameter with type 'Object'."),E="Object";else{if(r){const F=m.getTypeAtLocation(r.parent);if(!(F.flags&16385)){const j=r.getSourceFile(),q=bg(j,b)===0?268435456:0,Q=m.typeToTypeNode(F,Xi(r,Bo),q);if(Q){const re=p?nhe({removeComments:!0,module:C.module,target:C.target}):ax({removeComments:!0,module:C.module,target:C.target});ir(Q,1),E=re.printNode(4,Q,j)}}}p&&E==="*"&&(E=`\${${T.tabstop++}:${E}}`)}const N=!h&&a?"...":"",R=p?`\${${T.tabstop++}}`:"";return`@param {${N}${E}} ${t} ${R}`}else{const E=p?`\${${T.tabstop++}}`:"";return`@param ${t} ${E}`}}function l5t(t,r){const a=r.getText().trim();return a.includes(` +`)||a.length>80?`[${t}]`:`[${t}=${a}]`}function c5t(t){return{name:Ta(t),kind:"keyword",kindModifiers:"",sortText:Sh.GlobalsOrKeywords}}function u5t(t,r){return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:r,entries:t.slice()}}function tot(t,r,a){return{kind:4,keywordCompletions:hot(t,r),isNewIdentifierLocation:a}}function d5t(t){switch(t){case 156:return 8;default:z.fail("Unknown mapping from SyntaxKind to KeywordCompletionFilters")}}function iot(t){return(t==null?void 0:t.kind)===80?b_(t):void 0}function f5t(t,r,a,u,h,p,m,C,b,T){const{symbols:E,contextToken:N,completionKind:R,isInSnippetScope:F,isNewIdentifierLocation:j,location:U,propertyAccessToConvert:q,keywordFilters:Q,symbolToOriginInfoMap:re,recommendedCompletion:Y,isJsxInitializer:ue,isTypeOnlyLocation:te,isJsxIdentifierExpected:Se,isRightOfOpenTag:oe,isRightOfDotOrQuestionDot:pe,importStatementCompletion:ye,insideJsDocTagTypeExpression:be,symbolToSortTextMap:_e,hasUnresolvedAutoImports:ve}=p;let Ee=p.literals;const ke=a.getTypeChecker();if(qW(t.scriptKind)===1){const et=_5t(U,t);if(et)return et}const Fe=Xi(N,a3);if(Fe&&(K2e(N)||OT(N,Fe.expression))){const et=mX(ke,Fe.parent.clauses);Ee=Ee.filter(He=>!et.hasValue(He)),E.forEach((He,We)=>{if(He.valueDeclaration&&nx(He.valueDeclaration)){const Ue=ke.getConstantValue(He.valueDeclaration);Ue!==void 0&&et.hasValue(Ue)&&(re[We]={kind:256})}})}const Oe=Yi(),fe=not(t,u);if(fe&&!j&&(!E||E.length===0)&&Q===0)return;const Ie=J4e(E,Oe,void 0,N,U,b,t,r,a,il(u),h,R,m,u,C,te,q,Se,ue,ye,Y,re,_e,Se,oe,T);if(Q!==0)for(const et of hot(Q,!be&&F_(t)))(te&&sF(bT(et.name))||!te&&K5t(et.name)||!Ie.has(et.name))&&(Ie.add(et.name),Ei(Oe,et,JX,void 0,!0));for(const et of R5t(N,b))Ie.has(et.name)||(Ie.add(et.name),Ei(Oe,et,JX,void 0,!0));for(const et of Ee){const He=g5t(t,m,et);Ie.add(He.name),Ei(Oe,He,JX,void 0,!0)}fe||p5t(t,U.pos,Ie,il(u),Oe);let Le;if(m.includeCompletionsWithInsertText&&N&&!oe&&!pe&&(Le=Xi(N,y7))){const et=rot(Le,t,m,u,r,a,C);et&&Oe.push(et.entry)}return{flags:p.flags,isGlobalCompletion:F,isIncomplete:m.allowIncompleteCompletions&&ve?!0:void 0,isMemberCompletion:h5t(R),isNewIdentifierLocation:j,optionalReplacementSpan:iot(U),entries:Oe}}function not(t,r){return!F_(t)||!!Z8(t,r)}function rot(t,r,a,u,h,p,m){const C=t.clauses,b=p.getTypeChecker(),T=b.getTypeAtLocation(t.parent.expression);if(T&&T.isUnion()&&Be(T.types,E=>E.isLiteral())){const E=mX(b,C),N=il(u),R=bg(r,a),F=Ch.createImportAdder(r,p,a,h),j=[];for(const te of T.types)if(te.flags&1024){z.assert(te.symbol,"An enum member type should have a symbol"),z.assert(te.symbol.parent,"An enum member type should have a parent symbol (the enum symbol)");const Se=te.symbol.valueDeclaration&&b.getConstantValue(te.symbol.valueDeclaration);if(Se!==void 0){if(E.hasValue(Se))continue;E.addValue(Se)}const oe=Ch.typeToAutoImportableTypeNode(b,F,te,t,N);if(!oe)return;const pe=the(oe,N,R);if(!pe)return;j.push(pe)}else if(!E.hasValue(te.value))switch(typeof te.value){case"object":j.push(te.value.negative?G.createPrefixUnaryExpression(41,G.createBigIntLiteral({negative:!1,base10Value:te.value.base10Value})):G.createBigIntLiteral(te.value));break;case"number":j.push(te.value<0?G.createPrefixUnaryExpression(41,G.createNumericLiteral(-te.value)):G.createNumericLiteral(te.value));break;case"string":j.push(G.createStringLiteral(te.value,R===0));break}if(j.length===0)return;const U=Yt(j,te=>G.createCaseClause(te,[])),q=SS(h,m==null?void 0:m.options),Q=nhe({removeComments:!0,module:u.module,target:u.target,newLine:DH(q)}),re=m?te=>Q.printAndFormatNode(4,te,r,m):te=>Q.printNode(4,te,r),Y=Yt(U,(te,Se)=>a.includeCompletionsWithSnippetText?`${re(te)}$${Se+1}`:`${re(te)}`).join(q);return{entry:{name:`${Q.printNode(4,U[0],r)} ...`,kind:"",sortText:Sh.GlobalsOrKeywords,insertText:Y,hasAction:F.hasFixes()||void 0,source:"SwitchCases/",isSnippet:a.includeCompletionsWithSnippetText?!0:void 0},importAdder:F}}}function the(t,r,a){switch(t.kind){case 183:const u=t.typeName;return ihe(u,r,a);case 199:const h=the(t.objectType,r,a),p=the(t.indexType,r,a);return h&&p&&G.createElementAccessExpression(h,p);case 201:const m=t.literal;switch(m.kind){case 11:return G.createStringLiteral(m.text,a===0);case 9:return G.createNumericLiteral(m.text,m.numericLiteralFlags)}return;case 196:const C=the(t.type,r,a);return C&&(lt(C)?C:G.createParenthesizedExpression(C));case 186:return ihe(t.exprName,r,a);case 205:z.fail("We should not get an import type after calling 'codefix.typeToAutoImportableTypeNode'.")}}function ihe(t,r,a){if(lt(t))return t;const u=Ws(t.right.escapedText);return dae(u,r)?G.createPropertyAccessExpression(ihe(t.left,r,a),u):G.createElementAccessExpression(ihe(t.left,r,a),G.createStringLiteral(u,a===0))}function h5t(t){switch(t){case 0:case 3:case 2:return!0;default:return!1}}function _5t(t,r){const a=Xi(t,u=>{switch(u.kind){case 287:return!0;case 44:case 32:case 80:case 211:return!1;default:return"quit"}});if(a){const u=!!Hl(a,32,r),m=a.parent.openingElement.tagName.getText(r)+(u?"":">"),C=b_(a.tagName),b={name:m,kind:"class",kindModifiers:void 0,sortText:Sh.LocationPriority};return{isGlobalCompletion:!1,isMemberCompletion:!0,isNewIdentifierLocation:!1,optionalReplacementSpan:C,entries:[b]}}}function p5t(t,r,a,u,h){xfe(t).forEach((p,m)=>{if(p===r)return;const C=Ws(m);!a.has(C)&&wp(C,u)&&(a.add(C),Ei(h,{name:C,kind:"warning",kindModifiers:"",sortText:Sh.JavascriptIdentifiers,isFromUncheckedFile:!0},JX))})}function q4e(t,r,a){return typeof a=="object"?jT(a)+"n":mo(a)?dF(t,r,a):JSON.stringify(a)}function g5t(t,r,a){return{name:q4e(t,r,a),kind:"string",kindModifiers:"",sortText:Sh.LocationPriority}}function m5t(t,r,a,u,h,p,m,C,b,T,E,N,R,F,j,U,q,Q,re,Y,ue,te,Se,oe){var pe,ye;let be,_e,ve=Yue(a,p),Ee,ke,Fe=$4e(N),Oe,fe,Ie;const Le=b.getTypeChecker(),et=N&&r5t(N),He=N&&e5t(N)||E;if(N&&YFt(N))be=E?`this${et?"?.":""}[${aot(m,re,T)}]`:`this${et?"?.":"."}${T}`;else if((He||et)&&F){be=He?E?`[${aot(m,re,T)}]`:`[${T}]`:T,(et||F.questionDotToken)&&(be=`?.${be}`);const Ue=Hl(F,25,m)||Hl(F,29,m);if(!Ue)return;const Ye=ro(T,F.name.text)?F.name.end:Ue.end;ve=sd(Ue.getStart(m),Ye)}if(j&&(be===void 0&&(be=T),be=`{${be}}`,typeof j!="boolean"&&(ve=b_(j,m))),N&&n5t(N)&&F){be===void 0&&(be=T);const Ue=Dd(F.pos,m);let Ye="";Ue&&sX(Ue.end,Ue.parent,m)&&(Ye=";"),Ye+=`(await ${F.expression.getText()})`,be=E?`${Ye}${be}`:`${Ye}${et?"?.":"."}${be}`;const nt=$r(F.parent,ex)?F.parent:F.expression;ve=sd(nt.getStart(m),F.end)}if(wF(N)&&(Oe=[Cg(N.moduleSpecifier)],U&&({insertText:be,replacementSpan:ve}=x5t(T,U,N,q,m,Q,re),ke=re.includeCompletionsWithSnippetText?!0:void 0)),(N==null?void 0:N.kind)===64&&(fe=!0),Y===0&&u&&((pe=Dd(u.pos,m,u))==null?void 0:pe.kind)!==28&&(Au(u.parent.parent)||hg(u.parent.parent)||Np(u.parent.parent)||ib(u.parent)||((ye=Xi(u.parent,pd))==null?void 0:ye.getLastToken(m))===u||ih(u.parent)&&Da(m,u.getEnd()).line!==Da(m,p).line)&&(Fe="ObjectLiteralMemberWithComma/",fe=!0),re.includeCompletionsWithClassMemberSnippets&&re.includeCompletionsWithInsertText&&Y===3&&v5t(t,h,m)){let Ue;const Ye=sot(C,b,Q,re,T,t,h,p,u,ue);if(Ye)({insertText:be,filterText:_e,isSnippet:ke,importAdder:Ue}=Ye),(Ue!=null&&Ue.hasFixes()||Ye.eraseRange)&&(fe=!0,Fe="ClassMemberSnippet/");else return}if(N&&Qst(N)&&({insertText:be,isSnippet:ke,labelDetails:Ie}=N,re.useLabelDetailsInCompletionEntries||(T=T+Ie.detail,Ie=void 0),Fe="ObjectLiteralMethodSnippet/",r=Sh.SortBelow(r)),te&&!Se&&re.includeCompletionsWithSnippetText&&re.jsxAttributeCompletionStyle&&re.jsxAttributeCompletionStyle!=="none"&&!(qv(h.parent)&&h.parent.initializer)){let Ue=re.jsxAttributeCompletionStyle==="braces";const Ye=Le.getTypeOfSymbolAtLocation(t,h);re.jsxAttributeCompletionStyle==="auto"&&!(Ye.flags&528)&&!(Ye.flags&1048576&&Me(Ye.types,wt=>!!(wt.flags&528)))&&(Ye.flags&402653316||Ye.flags&1048576&&Be(Ye.types,wt=>!!(wt.flags&402686084||RNe(wt)))?(be=`${zT(T)}=${dF(m,re,"$1")}`,ke=!0):Ue=!0),Ue&&(be=`${zT(T)}={$1}`,ke=!0)}if(be!==void 0&&!re.includeCompletionsWithInsertText)return;($X(N)||wF(N))&&(Ee=oot(N),fe=!U);const We=Xi(h,KJ);if((We==null?void 0:We.kind)===275){const Ue=bT(T);We&&Ue&&(Ue===135||doe(Ue))&&(be=`${T} as ${T}_`)}return{name:T,kind:kS.getSymbolKind(Le,t,h),kindModifiers:kS.getSymbolModifiers(Le,t),sortText:r,source:Fe,hasAction:fe?!0:void 0,isRecommended:k5t(t,R,Le)||void 0,insertText:be,filterText:_e,replacementSpan:ve,sourceDisplay:Oe,labelDetails:Ie,isSnippet:ke,isPackageJsonImport:i5t(N)||void 0,isImportStatementCompletion:!!U||void 0,data:Ee,...oe?{symbol:t}:void 0}}function v5t(t,r,a){return Xn(r)?!1:!!(t.flags&106500)&&(ss(r)||r.parent&&r.parent.parent&&Vd(r.parent)&&r===r.parent.name&&r.parent.getLastToken(a)===r.parent.name&&ss(r.parent.parent)||r.parent&&d3(r)&&ss(r.parent))}function sot(t,r,a,u,h,p,m,C,b,T){const E=Xi(m,ss);if(!E)return;let N,R=h;const F=h,j=r.getTypeChecker(),U=m.getSourceFile(),q=nhe({removeComments:!0,module:a.module,target:a.target,omitTrailingSemicolon:!1,newLine:DH(SS(t,T==null?void 0:T.options))}),Q=Ch.createImportAdder(U,r,u,t);let re;if(u.includeCompletionsWithSnippetText){N=!0;const ye=G.createEmptyStatement();re=G.createBlock([ye],!0),Cae(ye,{kind:0,order:0})}else re=G.createBlock([],!0);let Y=0;const{modifiers:ue,range:te,decorators:Se}=y5t(b,U,C),oe=ue&64&&E.modifierFlagsCache&64;let pe=[];if(Ch.addNewNodeForMemberSymbol(p,E,U,{program:r,host:t},u,Q,ye=>{let be=0;oe&&(be|=64),Vd(ye)&&j.getMemberOverrideModifierStatus(E,ye,p)===1&&(be|=16),pe.length||(Y=ye.modifierFlagsCache|be),ye=G.replaceModifiers(ye,Y),pe.push(ye)},re,Ch.PreserveOptionalFlags.Property,!!oe),pe.length){const ye=p.flags&8192;let be=Y|16|1;ye?be|=1024:be|=136;const _e=ue&be;if(ue&~be)return;if(Y&4&&_e&1&&(Y&=-5),_e!==0&&!(_e&1)&&(Y&=-2),Y|=_e,pe=pe.map(Ee=>G.replaceModifiers(Ee,Y)),Se!=null&&Se.length){const Ee=pe[pe.length-1];eD(Ee)&&(pe[pe.length-1]=G.replaceDecoratorsAndModifiers(Ee,Se.concat(CT(Ee)||[])))}const ve=131073;T?R=q.printAndFormatSnippetList(ve,G.createNodeArray(pe),U,T):R=q.printSnippetList(ve,G.createNodeArray(pe),U)}return{insertText:R,filterText:F,isSnippet:N,importAdder:Q,eraseRange:te}}function y5t(t,r,a){if(!t||Da(r,a).line>Da(r,t.getEnd()).line)return{modifiers:0};let u=0,h,p;const m={pos:a,end:a};if(To(t.parent)&&(p=b5t(t))){t.parent.modifiers&&(u|=Rv(t.parent.modifiers)&98303,h=t.parent.modifiers.filter(jd)||[],m.pos=Math.min(...t.parent.modifiers.map(b=>b.getStart(r))));const C=iP(p);u&C||(u|=C,m.pos=Math.min(m.pos,t.getStart(r))),t.parent.name!==t&&(m.end=t.parent.name.getStart(r))}return{modifiers:u,decorators:h,range:m.posC.getSignaturesOfType(Y,0).length>0);if(re.length===1)F=re[0];else return}if(C.getSignaturesOfType(F,0).length!==1)return;const U=C.typeToTypeNode(F,r,R,Ch.getNoopSymbolTrackerWithResolver({program:u,host:h}));if(!U||!W1(U))return;let q;if(p.includeCompletionsWithSnippetText){const re=G.createEmptyStatement();q=G.createBlock([re],!0),Cae(re,{kind:0,order:0})}else q=G.createBlock([],!0);const Q=U.parameters.map(re=>G.createParameterDeclaration(void 0,re.dotDotDotToken,re.name,void 0,void 0,re.initializer));return G.createMethodDeclaration(void 0,void 0,T,void 0,void 0,Q,void 0,q)}default:return}}function nhe(t){let r;const a=er.createWriter(fS(t)),u=ax(t,a),h={...a,write:R=>p(R,()=>a.write(R)),nonEscapingWrite:a.write,writeLiteral:R=>p(R,()=>a.writeLiteral(R)),writeStringLiteral:R=>p(R,()=>a.writeStringLiteral(R)),writeSymbol:(R,F)=>p(R,()=>a.writeSymbol(R,F)),writeParameter:R=>p(R,()=>a.writeParameter(R)),writeComment:R=>p(R,()=>a.writeComment(R)),writeProperty:R=>p(R,()=>a.writeProperty(R))};return{printSnippetList:m,printAndFormatSnippetList:b,printNode:T,printAndFormatNode:N};function p(R,F){const j=zT(R);if(j!==R){const U=a.getTextPos();F();const q=a.getTextPos();r=xi(r||(r=[]),{newText:j,span:{start:U,length:q-U}})}else F()}function m(R,F,j){const U=C(R,F,j);return r?er.applyChanges(U,r):U}function C(R,F,j){return r=void 0,h.clear(),u.writeList(R,F,j,h),h.getText()}function b(R,F,j,U){const q={text:C(R,F,j),getLineAndCharacterOfPosition(ue){return Da(this,ue)}},Q=gX(U,j),re=Ln(F,ue=>{const te=er.assignPositionsToNode(ue);return gd.formatNodeGivenIndentation(te,q,j.languageVariant,0,0,{...U,options:Q})}),Y=r?$p(no(re,r),(ue,te)=>l$(ue.span,te.span)):re;return er.applyChanges(q.text,Y)}function T(R,F,j){const U=E(R,F,j);return r?er.applyChanges(U,r):U}function E(R,F,j){return r=void 0,h.clear(),u.writeNode(R,F,j,h),h.getText()}function N(R,F,j,U){const q={text:E(R,F,j),getLineAndCharacterOfPosition(te){return Da(this,te)}},Q=gX(U,j),re=er.assignPositionsToNode(F),Y=gd.formatNodeGivenIndentation(re,q,j.languageVariant,0,0,{...U,options:Q}),ue=r?$p(no(Y,r),(te,Se)=>l$(te.span,Se.span)):Y;return er.applyChanges(q.text,ue)}}function oot(t){const r=t.fileName?void 0:Nm(t.moduleSymbol.name),a=t.isFromPackageJson?!0:void 0;return wF(t)?{exportName:t.exportName,exportMapKey:t.exportMapKey,moduleSpecifier:t.moduleSpecifier,ambientModuleName:r,fileName:t.fileName,isPackageJsonImport:a}:{exportName:t.exportName,exportMapKey:t.exportMapKey,fileName:t.fileName,ambientModuleName:t.fileName?void 0:Nm(t.moduleSymbol.name),isPackageJsonImport:t.isFromPackageJson?!0:void 0}}function w5t(t,r,a){const u=t.exportName==="default",h=!!t.isPackageJsonImport;return Zst(t)?{kind:32,exportName:t.exportName,exportMapKey:t.exportMapKey,moduleSpecifier:t.moduleSpecifier,symbolName:r,fileName:t.fileName,moduleSymbol:a,isDefaultExport:u,isFromPackageJson:h}:{kind:4,exportName:t.exportName,exportMapKey:t.exportMapKey,symbolName:r,fileName:t.fileName,moduleSymbol:a,isDefaultExport:u,isFromPackageJson:h}}function x5t(t,r,a,u,h,p,m){const C=r.replacementSpan,b=zT(dF(h,m,a.moduleSpecifier)),T=a.isDefaultExport?1:a.exportName==="export="?2:0,E=m.includeCompletionsWithSnippetText?"$1":"",N=Ch.getImportKind(h,T,p,!0),R=r.couldBeTypeOnlyImportSpecifier,F=r.isTopLevelTypeOnly?` ${Ta(156)} `:" ",j=R?`${Ta(156)} `:"",U=u?";":"";switch(N){case 3:return{replacementSpan:C,insertText:`import${F}${zT(t)}${E} = require(${b})${U}`};case 1:return{replacementSpan:C,insertText:`import${F}${zT(t)}${E} from ${b}${U}`};case 2:return{replacementSpan:C,insertText:`import${F}* as ${zT(t)} from ${b}${U}`};case 0:return{replacementSpan:C,insertText:`import${F}{ ${j}${zT(t)}${E} } from ${b}${U}`}}}function aot(t,r,a){return/^\d+$/.test(a)?a:dF(t,r,a)}function k5t(t,r,a){return t===r||!!(t.flags&1048576)&&a.getExportSymbolOfSymbol(t)===r}function $4e(t){if($X(t))return Nm(t.moduleSymbol.name);if(wF(t))return t.moduleSpecifier;if((t==null?void 0:t.kind)===1)return"ThisProperty/";if((t==null?void 0:t.kind)===64)return"TypeOnlyAlias/"}function J4e(t,r,a,u,h,p,m,C,b,T,E,N,R,F,j,U,q,Q,re,Y,ue,te,Se,oe,pe,ye=!1){const be=Vc(),_e=$5t(u,h),ve=wH(m),Ee=b.getTypeChecker(),ke=new Map;for(let fe=0;feze.getSourceFile()===h.getSourceFile()));ke.set(He,nt),Ei(r,wt,JX,void 0,!0)}return E("getCompletionsAtPosition: getCompletionEntriesFromSymbols: "+(Vc()-be)),{has:fe=>ke.has(fe),add:fe=>ke.set(fe,!0)};function Fe(fe,Ie){var Le;let et=fe.flags;if(!Ns(h)){if(Ec(h.parent))return!0;if($r(_e,ds)&&fe.valueDeclaration===_e)return!1;const He=fe.valueDeclaration??((Le=fe.declarations)==null?void 0:Le[0]);if(_e&&He&&(Uc(_e)&&Uc(He)||Gs(_e)&&Gs(He))){const Ue=He.pos,Ye=Gs(_e)?_e.parent.parameters:hI(_e.parent)?void 0:_e.parent.typeParameters;if(Ue>=_e.pos&&Ye&&Ueq4e(a,m,Y)===h.name);return re!==void 0?{type:"literal",literal:re}:Z(T,(Y,ue)=>{const te=F[ue],Se=she(Y,il(C),te,R,b.isJsxIdentifierExpected);return Se&&Se.name===h.name&&(h.source==="ClassMemberSnippet/"&&Y.flags&106500||h.source==="ObjectLiteralMethodSnippet/"&&Y.flags&8196||$4e(te)===h.source||h.source==="ObjectLiteralMemberWithComma/")?{type:"symbol",symbol:Y,location:N,origin:te,contextToken:j,previousToken:U,isJsxInitializer:q,isTypeOnlyLocation:Q}:void 0})||{type:"none"}}function E5t(t,r,a,u,h,p,m,C,b){const T=t.getTypeChecker(),E=t.getCompilerOptions(),{name:N,source:R,data:F}=h,{previousToken:j,contextToken:U}=rhe(u,a);if(JP(a,u,j))return dhe.getStringLiteralCompletionDetails(N,a,u,j,t,p,b,C);const q=lot(t,r,a,u,h,p,C);switch(q.type){case"request":{const{request:Q}=q;switch(Q.kind){case 1:return l2.getJSDocTagNameCompletionDetails(N);case 2:return l2.getJSDocTagCompletionDetails(N);case 3:return l2.getJSDocParameterNameCompletionDetails(N);case 4:return Rt(Q.keywordCompletions,re=>re.name===N)?G4e(N,"keyword",5):void 0;default:return z.assertNever(Q)}}case"symbol":{const{symbol:Q,location:re,contextToken:Y,origin:ue,previousToken:te}=q,{codeActions:Se,sourceDisplay:oe}=I5t(N,re,Y,ue,Q,t,p,E,a,u,te,m,C,F,R,b),pe=z4e(ue)?ue.symbolName:Q.name;return K4e(Q,pe,T,a,re,b,Se,oe)}case"literal":{const{literal:Q}=q;return G4e(q4e(a,C,Q),"string",typeof Q=="string"?8:7)}case"cases":{const Q=rot(U.parent,a,C,t.getCompilerOptions(),p,t,void 0);if(Q!=null&&Q.importAdder.hasFixes()){const{entry:re,importAdder:Y}=Q,ue=er.ChangeTracker.with({host:p,formatContext:m,preferences:C},Y.writeFixes);return{name:re.name,kind:"",kindModifiers:"",displayParts:[],sourceDisplay:void 0,codeActions:[{changes:ue,description:cD([k.Includes_imports_of_types_referenced_by_0,N])}]}}return{name:N,kind:"",kindModifiers:"",displayParts:[],sourceDisplay:void 0}}case"none":return fot().some(Q=>Q.name===N)?G4e(N,"keyword",5):void 0;default:z.assertNever(q)}}function G4e(t,r,a){return GX(t,"",r,[ip(t,a)])}function K4e(t,r,a,u,h,p,m,C){const{displayParts:b,documentation:T,symbolKind:E,tags:N}=a.runWithCancellationToken(p,R=>kS.getSymbolDisplayPartsDocumentationAndSymbolKind(R,t,u,h,h,7));return GX(r,kS.getSymbolModifiers(a,t),E,b,T,N,m,C)}function GX(t,r,a,u,h,p,m,C){return{name:t,kindModifiers:r,kind:a,displayParts:u,documentation:h,tags:p,codeActions:m,source:C,sourceDisplay:C}}function I5t(t,r,a,u,h,p,m,C,b,T,E,N,R,F,j,U){if(F!=null&&F.moduleSpecifier&&E&&bot(a||E,b).replacementSpan)return{codeActions:void 0,sourceDisplay:[Cg(F.moduleSpecifier)]};if(j==="ClassMemberSnippet/"){const{importAdder:Se,eraseRange:oe}=sot(m,p,C,R,t,h,r,T,a,N);if(Se!=null&&Se.hasFixes()||oe)return{sourceDisplay:void 0,codeActions:[{changes:er.ChangeTracker.with({host:m,formatContext:N,preferences:R},ye=>{Se&&Se.writeFixes(ye),oe&&ye.deleteRange(b,oe)}),description:Se!=null&&Se.hasFixes()?cD([k.Includes_imports_of_types_referenced_by_0,t]):cD([k.Update_modifiers_of_0,t])}]}}if(Kst(u)){const Se=Ch.getPromoteTypeOnlyCompletionAction(b,u.declaration.name,p,m,N,R);return z.assertIsDefined(Se,"Expected to have a code action for promoting type-only alias"),{codeActions:[Se],sourceDisplay:void 0}}if(j==="ObjectLiteralMemberWithComma/"&&a){const Se=er.ChangeTracker.with({host:m,formatContext:N,preferences:R},oe=>oe.insertText(b,a.end,","));if(Se)return{sourceDisplay:void 0,codeActions:[{changes:Se,description:cD([k.Add_missing_comma_for_object_member_completion_0,t])}]}}if(!u||!($X(u)||wF(u)))return{codeActions:void 0,sourceDisplay:void 0};const q=u.isFromPackageJson?m.getPackageJsonAutoImportProvider().getTypeChecker():p.getTypeChecker(),{moduleSymbol:Q}=u,re=q.getMergedSymbol(Of(h.exportSymbol||h,q)),Y=(a==null?void 0:a.kind)===30&&eh(a.parent),{moduleSpecifier:ue,codeAction:te}=Ch.getImportCompletionAction(re,Q,F==null?void 0:F.exportMapKey,b,t,Y,m,p,N,E&<(E)?E.getStart(b):T,R,U);return z.assert(!(F!=null&&F.moduleSpecifier)||ue===F.moduleSpecifier),{sourceDisplay:[Cg(ue)],codeActions:[te]}}function N5t(t,r,a,u,h,p,m){const C=lot(t,r,a,u,h,p,m);return C.type==="symbol"?C.symbol:void 0}var cot=(t=>(t[t.ObjectPropertyDeclaration=0]="ObjectPropertyDeclaration",t[t.Global=1]="Global",t[t.PropertyAccess=2]="PropertyAccess",t[t.MemberLike=3]="MemberLike",t[t.String=4]="String",t[t.None=5]="None",t))(cot||{});function L5t(t,r,a){return Z(r&&(r.isUnion()?r.types:[r]),u=>{const h=u&&u.symbol;return h&&h.flags&424&&!ake(h)?Q4e(h,t,a):void 0})}function P5t(t,r,a,u){const{parent:h}=t;switch(t.kind){case 80:return iX(t,u);case 64:switch(h.kind){case 260:return u.getContextualType(h.initializer);case 226:return u.getTypeAtLocation(h.left);case 291:return u.getContextualTypeForJsxAttribute(h);default:return}case 105:return u.getContextualType(h);case 84:const p=$r(h,a3);return p?kde(p,u):void 0;case 19:return b7(h)&&!tb(h.parent)&&!XT(h.parent)?u.getContextualTypeForJsxAttribute(h.parent):void 0;default:const m=KH.getArgumentInfoForCompletions(t,r,a,u);return m?u.getContextualTypeForArgumentAtIndex(m.invocation,m.argumentIndex):nX(t.kind)&&cr(h)&&nX(h.operatorToken.kind)?u.getTypeAtLocation(h.left):u.getContextualType(t,4)||u.getContextualType(t)}}function Q4e(t,r,a){const u=a.getAccessibleSymbolChain(t,r,-1,!1);return u?ma(u):t.parent&&(A5t(t.parent)?t:Q4e(t.parent,r,a))}function A5t(t){var r;return!!((r=t.declarations)!=null&&r.some(a=>a.kind===307))}function uot(t,r,a,u,h,p,m,C,b,T){const E=t.getTypeChecker(),N=not(a,u);let R=Vc(),F=Rs(a,h);r("getCompletionData: Get current token: "+(Vc()-R)),R=Vc();const j=bS(a,h,F);r("getCompletionData: Is inside comment: "+(Vc()-R));let U=!1,q=!1,Q=!1;if(j){if(ANe(a,h)){if(a.text.charCodeAt(h-1)===64)return{kind:1};{const Ke=Bm(h,a);if(!/[^*|\s(/)]/.test(a.text.substring(Ke,h)))return{kind:2}}}const Ae=F5t(F,h);if(Ae){if(Ae.tagName.pos<=h&&h<=Ae.tagName.end)return{kind:1};if($v(Ae))q=!0;else{const Ke=Ji(Ae);if(Ke&&(F=Rs(a,h),(!F||!F1(F)&&(F.parent.kind!==348||F.parent.name!==F))&&(U=tt(Ke))),!U&&em(Ae)&&(vu(Ae.name)||Ae.name.pos<=h&&h<=Ae.name.end))return{kind:3,tag:Ae}}}if(!U&&!q){r("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment.");return}}R=Vc();const re=!U&&!q&&F_(a),Y=rhe(h,a),ue=Y.previousToken;let te=Y.contextToken;r("getCompletionData: Get previous token: "+(Vc()-R));let Se=F,oe,pe=!1,ye=!1,be=!1,_e=!1,ve=!1,Ee=!1,ke,Fe=j_(a,h),Oe=0,fe=!1,Ie=0;if(te){const Ae=bot(te,a);if(Ae.keywordCompletion){if(Ae.isKeywordOnlyCompletion)return{kind:4,keywordCompletions:[c5t(Ae.keywordCompletion)],isNewIdentifierLocation:Ae.isNewIdentifierLocation};Oe=d5t(Ae.keywordCompletion)}if(Ae.replacementSpan&&p.includeCompletionsForImportStatements&&p.includeCompletionsWithInsertText&&(Ie|=2,ke=Ae,fe=Ae.isNewIdentifierLocation),!Ae.replacementSpan&&Ds(te))return r("Returning an empty list because completion was requested in an invalid position."),Oe?tot(Oe,re,Yo()):void 0;let Ke=te.parent;if(te.kind===25||te.kind===29)switch(pe=te.kind===25,ye=te.kind===29,Ke.kind){case 211:oe=Ke,Se=oe.expression;const Qt=Q6(oe);if(vu(Qt)||(sa(Se)||Bo(Se))&&Se.end===te.pos&&Se.getChildCount(a)&&La(Se.getChildren(a)).kind!==22)return;break;case 166:Se=Ke.left;break;case 267:Se=Ke.name;break;case 205:Se=Ke;break;case 236:Se=Ke.getFirstToken(a),z.assert(Se.kind===102||Se.kind===105);break;default:return}else if(!ke){if(Ke&&Ke.kind===211&&(te=Ke,Ke=Ke.parent),F.parent===Fe)switch(F.kind){case 32:(F.parent.kind===284||F.parent.kind===286)&&(Fe=F);break;case 44:F.parent.kind===285&&(Fe=F);break}switch(Ke.kind){case 287:te.kind===44&&(_e=!0,Fe=te);break;case 226:if(!yot(Ke))break;case 285:case 284:case 286:Ee=!0,te.kind===30&&(be=!0,Fe=te);break;case 294:case 293:(ue.kind===20||ue.kind===80&&ue.parent.kind===291)&&(Ee=!0);break;case 291:if(Ke.initializer===ue&&ue.endKP(Ae?C.getPackageJsonAutoImportProvider():t,C));if(pe||ye)Ui();else if(be)We=E.getJsxIntrinsicTagNamesAt(Fe),z.assertEachIsDefined(We,"getJsxIntrinsicTagNames() should all be defined"),Rn(),et=1,Oe=0;else if(_e){const Ae=te.parent.parent.openingElement.tagName,Ke=E.getSymbolAtLocation(Ae);Ke&&(We=[Ke]),et=1,Oe=0}else if(!Rn())return Oe?tot(Oe,re,fe):void 0;r("getCompletionData: Semantic work: "+(Vc()-Le));const xt=ue&&P5t(ue,h,a,E),ft=!$r(ue,Ml)&&!Ee?ns(xt&&(xt.isUnion()?xt.types:[xt]),Ae=>Ae.isLiteral()&&!(Ae.flags&1024)?Ae.value:void 0):[],Ht=ue&&xt&&L5t(ue,xt,E);return{kind:0,symbols:We,completionKind:et,isInSnippetScope:Q,propertyAccessToConvert:oe,isNewIdentifierLocation:fe,location:Fe,keywordFilters:Oe,literals:ft,symbolToOriginInfoMap:Ye,recommendedCompletion:Ht,previousToken:ue,contextToken:te,isJsxInitializer:ve,insideJsDocTagTypeExpression:U,symbolToSortTextMap:wt,isTypeOnlyLocation:ze,isJsxIdentifierExpected:Ee,isRightOfOpenTag:be,isRightOfDotOrQuestionDot:pe||ye,importStatementCompletion:ke,hasUnresolvedAutoImports:He,flags:Ie};function Oi(Ae){switch(Ae.kind){case 341:case 348:case 342:case 344:case 346:case 349:case 350:return!0;case 345:return!!Ae.constraint;default:return!1}}function Ji(Ae){if(Oi(Ae)){const Ke=Rm(Ae)?Ae.constraint:Ae.typeExpression;return Ke&&Ke.kind===309?Ke:void 0}if(AP(Ae)||QG(Ae))return Ae.class}function Ui(){et=2;const Ae=rS(Se),Ke=Ae&&!Se.isTypeOf||Lv(Se.parent)||fH(te,a,E),Qt=LQ(Se);if(A_(Se)||Ae||Ir(Se)){const ni=qu(Se.parent);ni&&(fe=!0);let fi=E.getSymbolAtLocation(Se);if(fi&&(fi=Of(fi,E),fi.flags&1920)){const Gi=E.getExportsOfModule(fi);z.assertEachIsDefined(Gi,"getExportsOfModule() should all be defined");const fn=rn=>E.isValidPropertyAccess(Ae?Se:Se.parent,rn.name),kn=rn=>Z4e(rn,E),or=ni?rn=>{var _r;return!!(rn.flags&1920)&&!((_r=rn.declarations)!=null&&_r.every(Fs=>Fs.parent===Se.parent))}:Qt?rn=>kn(rn)||fn(rn):Ke||U?kn:fn;for(const rn of Gi)or(rn)&&We.push(rn);if(!Ke&&!U&&fi.declarations&&fi.declarations.some(rn=>rn.kind!==307&&rn.kind!==267&&rn.kind!==266)){let rn=E.getTypeOfSymbolAtLocation(fi,Se).getNonOptionalType(),_r=!1;if(rn.isNullableType()){const Fs=pe&&!ye&&p.includeAutomaticOptionalChainCompletions!==!1;(Fs||ye)&&(rn=rn.getNonNullableType(),Fs&&(_r=!0))}bn(rn,!!(Se.flags&65536),_r)}return}}if(!Ke||eP(Se)){E.tryGetThisTypeAt(Se,!1);let ni=E.getTypeAtLocation(Se).getNonOptionalType();if(Ke)bn(ni.getNonNullableType(),!1,!1);else{let fi=!1;if(ni.isNullableType()){const Gi=pe&&!ye&&p.includeAutomaticOptionalChainCompletions!==!1;(Gi||ye)&&(ni=ni.getNonNullableType(),Gi&&(fi=!0))}bn(ni,!!(Se.flags&65536),fi)}}}function bn(Ae,Ke,Qt){fe=!!Ae.getStringIndexType(),ye&&Rt(Ae.getCallSignatures())&&(fe=!0);const ni=Se.kind===205?Se:Se.parent;if(N)for(const fi of Ae.getApparentProperties())E.isValidPropertyAccessForCompletions(ni,Ae,fi)&&Mi(fi,!1,Qt);else We.push(...Ri(che(Ae,E),fi=>E.isValidPropertyAccessForCompletions(ni,Ae,fi)));if(Ke&&p.includeCompletionsWithInsertText){const fi=E.getPromisedTypeOfPromise(Ae);if(fi)for(const Gi of fi.getApparentProperties())E.isValidPropertyAccessForCompletions(ni,fi,Gi)&&Mi(Gi,!0,Qt)}}function Mi(Ae,Ke,Qt){var ni;const fi=Z(Ae.declarations,or=>$r(ko(or),Ja));if(fi){const or=Ai(fi.expression),rn=or&&E.getSymbolAtLocation(or),_r=rn&&Q4e(rn,te,E),Fs=_r&&Aa(_r);if(Fs&&Lm(nt,Fs)){const to=We.length;We.push(_r);const Ar=_r.parent;if(!Ar||!T6(Ar)||E.tryGetMemberInModuleExportsAndProperties(_r.name,Ar)!==_r)Ye[to]={kind:kn(2)};else{const is=Zd(Nm(Ar.name))?(ni=Z$(Ar))==null?void 0:ni.fileName:void 0,{moduleSpecifier:$i}=(Ue||(Ue=Ch.createImportSpecifierResolver(a,t,C,p))).getModuleSpecifierForBestExportInfo([{exportKind:0,moduleFileName:is,isFromPackageJson:!1,moduleSymbol:Ar,symbol:_r,targetFlags:Of(_r,E).flags}],h,Wk(Fe))||{};if($i){const Tn={kind:kn(6),moduleSymbol:Ar,isDefaultExport:!1,symbolName:_r.name,exportName:_r.name,fileName:is,moduleSpecifier:$i};Ye[to]=Tn}}}else if(p.includeCompletionsWithInsertText){if(Fs&&nt.has(Fs))return;fn(Ae),Gi(Ae),We.push(Ae)}}else fn(Ae),Gi(Ae),We.push(Ae);function Gi(or){z5t(or)&&(wt[Aa(or)]=Sh.LocalDeclarationPriority)}function fn(or){p.includeCompletionsWithInsertText&&(Ke&&Lm(nt,Aa(or))?Ye[We.length]={kind:kn(8)}:Qt&&(Ye[We.length]={kind:16}))}function kn(or){return Qt?or|16:or}}function Ai(Ae){return lt(Ae)?Ae:Ir(Ae)?Ai(Ae.expression):void 0}function Rn(){return(fl()||St()||Hs()||Ot()||xe()||Pt()||bs()||Re()||Hi()||(Wo(),1))===1}function bs(){return Je(te)?(et=5,fe=!0,Oe=4,1):0}function Hi(){const Ae=kt(te),Ke=Ae&&E.getContextualType(Ae.attributes);if(!Ke)return 0;const Qt=Ae&&E.getContextualType(Ae.attributes,4);return We=no(We,de(lhe(Ke,Qt,Ae.attributes,E),Ae.attributes.properties)),ut(),et=3,fe=!1,1}function Hs(){return ke?(fe=!0,hi(),1):0}function Wo(){Oe=pt(te)?5:1,et=1,fe=Yo(),ue!==te&&z.assert(!!ue,"Expected 'contextToken' to be defined when different from 'previousToken'.");const Ae=ue!==te?ue.getStart():h,Ke=fs(te,Ae,a)||a;Q=Fo(Ke);const Qt=(ze?0:111551)|788968|1920|2097152,ni=ue&&!Wk(ue);We=no(We,E.getSymbolsInScope(Ke,Qt)),z.assertEachIsDefined(We,"getSymbolsInScope() should all be defined");for(let fi=0;fifn.getSourceFile()===a)&&(wt[Aa(Gi)]=Sh.GlobalsOrKeywords),ni&&!(Gi.flags&111551)){const fn=Gi.declarations&&Me(Gi.declarations,l8);if(fn){const kn={kind:64,declaration:fn};Ye[fi]=kn}}}if(p.includeCompletionsWithInsertText&&Ke.kind!==307){const fi=E.tryGetThisTypeAt(Ke,!1,ss(Ke.parent)?Ke:void 0);if(fi&&!j5t(fi,a,E))for(const Gi of che(fi,E))Ye[We.length]={kind:1},We.push(Gi),wt[Aa(Gi)]=Sh.SuggestedClassMembers}hi(),ze&&(Oe=te&&Ek(te.parent)?6:7)}function ts(){var Ae;return ke?!0:p.includeCompletionsForModuleExports?a.externalModuleIndicator||a.commonJsModuleIndicator||sde(t.getCompilerOptions())?!0:((Ae=t.getSymlinkCache)==null?void 0:Ae.call(t).hasAnySymlinks())||!!t.getCompilerOptions().paths||WNe(t):!1}function Fo(Ae){switch(Ae.kind){case 307:case 228:case 294:case 241:return!0;default:return Es(Ae)}}function Cn(){return U||q||!!ke&&Dk(Fe.parent)||!Ko(te)&&(fH(te,a,E)||Lv(Fe)||ot(te))}function Ko(Ae){return Ae&&(Ae.kind===114&&(Ae.parent.kind===186||o3(Ae.parent))||Ae.kind===131&&Ae.parent.kind===182)}function ot(Ae){if(Ae){const Ke=Ae.parent.kind;switch(Ae.kind){case 59:return Ke===172||Ke===171||Ke===169||Ke===260||BL(Ke);case 64:return Ke===265||Ke===168;case 130:return Ke===234;case 30:return Ke===183||Ke===216;case 96:return Ke===168;case 152:return Ke===238}}return!1}function hi(){var Ae,Ke;if(!ts()||(z.assert(!(m!=null&&m.data),"Should not run 'collectAutoImports' when faster path is available via `data`"),m&&!m.source))return;Ie|=1;const ni=ue===te&&ke?"":ue&<(ue)?ue.text.toLowerCase():"",fi=(Ae=C.getModuleSpecifierCache)==null?void 0:Ae.call(C),Gi=EH(a,C,t,p,T),fn=(Ke=C.getPackageJsonAutoImportProvider)==null?void 0:Ke.call(C),kn=m?void 0:V3(a,p,C);Xst("collectAutoImports",C,Ue||(Ue=Ch.createImportSpecifierResolver(a,t,C,p)),t,h,p,!!ke,Wk(Fe),rn=>{Gi.search(a.path,be,(_r,Fs)=>{if(!wp(_r,il(C.getCompilationSettings()))||!m&&YL(_r)||!ze&&!ke&&!(Fs&111551)||ze&&!(Fs&790504))return!1;const to=_r.charCodeAt(0);return be&&(to<65||to>90)?!1:m?!0:kot(_r,ni)},(_r,Fs,to,Ar)=>{if(m&&!Rt(_r,Sl=>m.source===Nm(Sl.moduleSymbol.name))||(_r=Ri(_r,or),!_r.length))return;const is=rn.tryResolve(_r,to)||{};if(is==="failed")return;let $i=_r[0],Tn;is!=="skipped"&&({exportInfo:$i=_r[0],moduleSpecifier:Tn}=is);const ki=$i.exportKind===1,zo=ki&&W8(z.checkDefined($i.symbol))||z.checkDefined($i.symbol);hn(zo,{kind:Tn?32:4,moduleSpecifier:Tn,symbolName:Fs,exportMapKey:Ar,exportName:$i.exportKind===2?"export=":z.checkDefined($i.symbol).name,fileName:$i.moduleFileName,isDefaultExport:ki,moduleSymbol:$i.moduleSymbol,isFromPackageJson:$i.isFromPackageJson})}),He=rn.skippedAny(),Ie|=rn.resolvedAny()?8:0,Ie|=rn.resolvedBeyondLimit()?16:0});function or(rn){const _r=$r(rn.moduleSymbol.valueDeclaration,Ns);if(!_r){const Fs=Nm(rn.moduleSymbol.name);return Gv.nodeCoreModules.has(Fs)&&ro(Fs,"node:")!==pX(a,t)?!1:kn?kn.allowsImportingAmbientModule(rn.moduleSymbol,st(rn.isFromPackageJson)):!0}return Bde(rn.isFromPackageJson?fn:t,a,_r,p,kn,st(rn.isFromPackageJson),fi)}}function hn(Ae,Ke){const Qt=Aa(Ae);wt[Qt]!==Sh.GlobalsOrKeywords&&(Ye[We.length]=Ke,wt[Qt]=ke?Sh.LocationPriority:Sh.AutoImportSuggestions,We.push(Ae))}function lr(Ae,Ke){Xn(Fe)||Ae.forEach(Qt=>{if(!as(Qt))return;const ni=she(Qt,il(u),void 0,0,!1);if(!ni)return;const{name:fi}=ni,Gi=C5t(Qt,fi,Ke,t,C,u,p,b);if(!Gi)return;const fn={kind:128,...Gi};Ie|=32,Ye[We.length]=fn,We.push(Qt)})}function as(Ae){return!!(Ae.flags&8196)}function fs(Ae,Ke,Qt){let ni=Ae;for(;ni&&!Uue(ni,Ke,Qt);)ni=ni.parent;return ni}function Ds(Ae){const Ke=Vc(),Qt=ji(Ae)||$e(Ae)||ii(Ae)||ha(Ae)||lV(Ae);return r("getCompletionsAtPosition: isCompletionListBlocker: "+(Vc()-Ke)),Qt}function ha(Ae){if(Ae.kind===12)return!0;if(Ae.kind===32&&Ae.parent){if(Fe===Ae.parent&&(Fe.kind===286||Fe.kind===285))return!1;if(Ae.parent.kind===286)return Fe.parent.kind!==286;if(Ae.parent.kind===287||Ae.parent.kind===285)return!!Ae.parent.parent&&Ae.parent.parent.kind===284}return!1}function Yo(){if(te){const Ae=te.parent.kind,Ke=ahe(te);switch(Ke){case 28:return Ae===213||Ae===176||Ae===214||Ae===209||Ae===226||Ae===184||Ae===210;case 21:return Ae===213||Ae===176||Ae===214||Ae===217||Ae===196;case 23:return Ae===209||Ae===181||Ae===167;case 144:case 145:case 102:return!0;case 25:return Ae===267;case 19:return Ae===263||Ae===210;case 64:return Ae===260||Ae===226;case 16:return Ae===228;case 17:return Ae===239;case 134:return Ae===174||Ae===304;case 42:return Ae===174}if(KX(Ke))return!0}return!1}function ji(Ae){return(kae(Ae)||gse(Ae))&&(cH(Ae,h)||h===Ae.end&&(!!Ae.isUnterminated||kae(Ae)))}function fl(){const Ae=V5t(te);if(!Ae)return 0;const Qt=(DP(Ae.parent)?Ae.parent:void 0)||Ae,ni=vot(Qt,E);if(!ni)return 0;const fi=E.getTypeFromTypeNode(Qt),Gi=che(ni,E),fn=che(fi,E),kn=new Set;return fn.forEach(or=>kn.add(or.escapedName)),We=no(We,Ri(Gi,or=>!kn.has(or.escapedName))),et=0,fe=!0,1}function St(){if((te==null?void 0:te.kind)===26)return 0;const Ae=We.length,Ke=O5t(te,h,a);if(!Ke)return 0;et=0;let Qt,ni;if(Ke.kind===210){const fi=U5t(Ke,E);if(fi===void 0)return Ke.flags&67108864?2:0;const Gi=E.getContextualType(Ke,4),fn=(Gi||fi).getStringIndexType(),kn=(Gi||fi).getNumberIndexType();if(fe=!!fn||!!kn,Qt=lhe(fi,Gi,Ke,E),ni=Ke.properties,Qt.length===0&&!kn)return 0}else{z.assert(Ke.kind===206),fe=!1;const fi=Ov(Ke.parent);if(!qL(fi))return z.fail("Root declaration is not variable-like.");let Gi=iS(fi)||!!hd(fi)||fi.parent.parent.kind===250;if(!Gi&&fi.kind===169&&(Ut(fi.parent)?Gi=!!E.getContextualType(fi.parent):(fi.parent.kind===174||fi.parent.kind===178)&&(Gi=Ut(fi.parent.parent)&&!!E.getContextualType(fi.parent.parent))),Gi){const fn=E.getTypeAtLocation(Ke);if(!fn)return 2;Qt=E.getPropertiesOfType(fn).filter(kn=>E.isPropertyAccessible(Ke,!1,!1,fn,kn)),ni=Ke.elements}}if(Qt&&Qt.length>0){const fi=wi(Qt,z.checkDefined(ni));We=no(We,fi),ut(),Ke.kind===210&&p.includeCompletionsWithObjectLiteralMethodSnippets&&p.includeCompletionsWithInsertText&&(le(Ae),lr(fi,Ke))}return 1}function Ot(){if(!te)return 0;const Ae=te.kind===19||te.kind===28?$r(te.parent,KJ):JQ(te)?$r(te.parent.parent,KJ):void 0;if(!Ae)return 0;JQ(te)||(Oe=8);const{moduleSpecifier:Ke}=Ae.kind===275?Ae.parent.parent:Ae.parent;if(!Ke)return fe=!0,Ae.kind===275?2:0;const Qt=E.getSymbolAtLocation(Ke);if(!Qt)return fe=!0,2;et=3,fe=!1;const ni=E.getExportsAndPropertiesOfModule(Qt),fi=new Set(Ae.elements.filter(fn=>!tt(fn)).map(fn=>(fn.propertyName||fn.name).escapedText)),Gi=ni.filter(fn=>fn.escapedName!=="default"&&!fi.has(fn.escapedName));return We=no(We,Gi),Gi.length||(Oe=0),1}function xe(){if(te===void 0)return 0;const Ae=te.kind===19||te.kind===28?$r(te.parent,mI):te.kind===59?$r(te.parent.parent,mI):void 0;if(Ae===void 0)return 0;const Ke=new Set(Ae.elements.map(kG));return We=Ri(E.getTypeAtLocation(Ae).getApparentProperties(),Qt=>!Ke.has(Qt.escapedName)),1}function Pt(){var Ae;const Ke=te&&(te.kind===19||te.kind===28)?$r(te.parent,Yg):void 0;if(!Ke)return 0;const Qt=Xi(Ke,lg(Ns,qu));return et=5,fe=!1,(Ae=Qt.locals)==null||Ae.forEach((ni,fi)=>{var Gi,fn;We.push(ni),(fn=(Gi=Qt.symbol)==null?void 0:Gi.exports)!=null&&fn.has(fi)&&(wt[Aa(ni)]=Sh.OptionalMember)}),1}function Re(){const Ae=W5t(a,te,Fe,h);if(!Ae)return 0;if(et=3,fe=!0,Oe=te.kind===42?0:ss(Ae)?2:3,!ss(Ae))return 1;const Ke=te.kind===27?te.parent.parent:te.parent;let Qt=Vd(Ke)?Wh(Ke):0;if(te.kind===80&&!tt(te))switch(te.getText()){case"private":Qt=Qt|2;break;case"static":Qt=Qt|256;break;case"override":Qt=Qt|16;break}if(bu(Ke)&&(Qt|=256),!(Qt&2)){const ni=ss(Ae)&&Qt&16?PL(Pv(Ae)):E8(Ae),fi=Ln(ni,Gi=>{const fn=E.getTypeAtLocation(Gi);return Qt&256?(fn==null?void 0:fn.symbol)&&E.getPropertiesOfType(E.getTypeOfSymbolAtLocation(fn.symbol,Ae)):fn&&E.getPropertiesOfType(fn)});We=no(We,je(fi,Ae.members,Qt)),W(We,(Gi,fn)=>{const kn=Gi==null?void 0:Gi.valueDeclaration;if(kn&&Vd(kn)&&kn.name&&Ja(kn.name)){const or={kind:512,symbolName:E.symbolToString(Gi)};Ye[fn]=or}})}return 1}function mt(Ae){return!!Ae.parent&&Gs(Ae.parent)&&fu(Ae.parent.parent)&&(c8(Ae.kind)||F1(Ae))}function Je(Ae){if(Ae){const Ke=Ae.parent;switch(Ae.kind){case 21:case 28:return fu(Ae.parent)?Ae.parent:void 0;default:if(mt(Ae))return Ke.parent}}}function pt(Ae){if(Ae){let Ke;const Qt=Xi(Ae.parent,ni=>ss(ni)?"quit":rc(ni)&&Ke===ni.body?!0:(Ke=ni,!1));return Qt&&Qt}}function kt(Ae){if(Ae){const Ke=Ae.parent;switch(Ae.kind){case 32:case 31:case 44:case 80:case 211:case 292:case 291:case 293:if(Ke&&(Ke.kind===285||Ke.kind===286)){if(Ae.kind===32){const Qt=Dd(Ae.pos,a,void 0);if(!Ke.typeArguments||Qt&&Qt.kind===44)break}return Ke}else if(Ke.kind===291)return Ke.parent.parent;break;case 11:if(Ke&&(Ke.kind===291||Ke.kind===293))return Ke.parent.parent;break;case 20:if(Ke&&Ke.kind===294&&Ke.parent&&Ke.parent.kind===291)return Ke.parent.parent.parent;if(Ke&&Ke.kind===293)return Ke.parent.parent;break}}}function Ci(Ae,Ke){return a.getLineEndOfPosition(Ae.getEnd())=Ae.pos;case 25:return Qt===207;case 59:return Qt===208;case 23:return Qt===207;case 21:return Qt===299||$t(Qt);case 19:return Qt===266;case 30:return Qt===263||Qt===231||Qt===264||Qt===265||BL(Qt);case 126:return Qt===172&&!ss(Ke.parent);case 26:return Qt===169||!!Ke.parent&&Ke.parent.kind===207;case 125:case 123:case 124:return Qt===169&&!fu(Ke.parent);case 130:return Qt===276||Qt===281||Qt===274;case 139:case 153:return!uhe(Ae);case 80:{if(Qt===276&&Ae===Ke.name&&Ae.text==="type"||Xi(Ae.parent,ds)&&Ci(Ae,h))return!1;break}case 86:case 94:case 120:case 100:case 115:case 102:case 121:case 87:case 140:return!0;case 156:return Qt!==276;case 42:return Bo(Ae.parent)&&!Au(Ae.parent)}if(KX(ahe(Ae))&&uhe(Ae)||mt(Ae)&&(!lt(Ae)||c8(ahe(Ae))||tt(Ae)))return!1;switch(ahe(Ae)){case 128:case 86:case 87:case 138:case 94:case 100:case 120:case 121:case 123:case 124:case 125:case 126:case 115:return!0;case 134:return To(Ae.parent)}if(Xi(Ae.parent,ss)&&Ae===ue&&qt(Ae,h))return!1;const fi=Rk(Ae.parent,172);if(fi&&Ae!==ue&&ss(ue.parent.parent)&&h<=ue.end){if(qt(Ae,ue.end))return!1;if(Ae.kind!==64&&(WV(fi)||q$(fi)))return!0}return F1(Ae)&&!ih(Ae.parent)&&!qv(Ae.parent)&&!((ss(Ae.parent)||Ff(Ae.parent)||Uc(Ae.parent))&&(Ae!==ue||h>ue.end))}function qt(Ae,Ke){return Ae.kind!==64&&(Ae.kind===27||!Kg(Ae.end,Ke,a))}function $t(Ae){return BL(Ae)&&Ae!==176}function ii(Ae){if(Ae.kind===9){const Ke=Ae.getFullText();return Ke.charAt(Ke.length-1)==="."}return!1}function Gt(Ae){return Ae.parent.kind===261&&!fH(Ae,a,E)}function wi(Ae,Ke){if(Ke.length===0)return Ae;const Qt=new Set,ni=new Set;for(const Gi of Ke){if(Gi.kind!==303&&Gi.kind!==304&&Gi.kind!==208&&Gi.kind!==174&&Gi.kind!==177&&Gi.kind!==178&&Gi.kind!==305||tt(Gi))continue;let fn;if(ib(Gi))ce(Gi,Qt);else if(nl(Gi)&&Gi.propertyName)Gi.propertyName.kind===80&&(fn=Gi.propertyName.escapedText);else{const kn=ko(Gi);fn=kn&&Av(kn)?L8(kn):void 0}fn!==void 0&&ni.add(fn)}const fi=Ae.filter(Gi=>!ni.has(Gi.escapedName));return Bt(Qt,fi),fi}function ce(Ae,Ke){const Qt=Ae.expression,ni=E.getSymbolAtLocation(Qt),fi=ni&&E.getTypeOfSymbolAtLocation(ni,Qt),Gi=fi&&fi.properties;Gi&&Gi.forEach(fn=>{Ke.add(fn.name)})}function ut(){We.forEach(Ae=>{if(Ae.flags&16777216){const Ke=Aa(Ae);wt[Ke]=wt[Ke]??Sh.OptionalMember}})}function Bt(Ae,Ke){if(Ae.size!==0)for(const Qt of Ke)Ae.has(Qt.name)&&(wt[Aa(Qt)]=Sh.MemberDeclaredBySpreadAssignment)}function le(Ae){for(let Ke=Ae;Ke!ni.has(fi.escapedName)&&!!fi.declarations&&!(Qg(fi)&2)&&!(fi.valueDeclaration&&Fh(fi.valueDeclaration)))}function de(Ae,Ke){const Qt=new Set,ni=new Set;for(const Gi of Ke)tt(Gi)||(Gi.kind===291?Qt.add(s7(Gi.name)):PP(Gi)&&ce(Gi,ni));const fi=Ae.filter(Gi=>!Qt.has(Gi.escapedName));return Bt(ni,fi),fi}function tt(Ae){return Ae.getStart(a)<=h&&h<=Ae.getEnd()}}function O5t(t,r,a){var u;if(t){const{parent:h}=t;switch(t.kind){case 19:case 28:if(Pa(h)||pg(h))return h;break;case 42:return Au(h)?$r(h.parent,Pa):void 0;case 134:return $r(h.parent,Pa);case 80:if(t.text==="async"&&ih(t.parent))return t.parent.parent;{if(Pa(t.parent.parent)&&(ib(t.parent)||ih(t.parent)&&Da(a,t.getEnd()).line!==Da(a,r).line))return t.parent.parent;const m=Xi(h,pd);if((m==null?void 0:m.getLastToken(a))===t&&Pa(m.parent))return m.parent}break;default:if((u=h.parent)!=null&&u.parent&&(Au(h.parent)||hg(h.parent)||Np(h.parent))&&Pa(h.parent.parent))return h.parent.parent;if(ib(h)&&Pa(h.parent))return h.parent;const p=Xi(h,pd);if(t.kind!==59&&(p==null?void 0:p.getLastToken(a))===t&&Pa(p.parent))return p.parent}}}function rhe(t,r){const a=Dd(t,r);return a&&t<=a.end&&(Uy(a)||d_(a.kind))?{contextToken:Dd(a.getFullStart(),r,void 0),previousToken:a}:{contextToken:a,previousToken:a}}function dot(t,r,a,u){const h=r.isPackageJsonImport?u.getPackageJsonAutoImportProvider():a,p=h.getTypeChecker(),m=r.ambientModuleName?p.tryFindAmbientModule(r.ambientModuleName):r.fileName?p.getMergedSymbol(z.checkDefined(h.getSourceFile(r.fileName)).symbol):void 0;if(!m)return;let C=r.exportName==="export="?p.resolveExternalModuleSymbol(m):p.tryGetMemberInModuleExportsAndProperties(r.exportName,m);return C?(C=r.exportName==="default"&&W8(C)||C,{symbol:C,origin:w5t(r,t,m)}):void 0}function she(t,r,a,u,h){if(s5t(a))return;const p=t5t(a)?a.symbolName:t.name;if(p===void 0||t.flags&1536&&_W(p.charCodeAt(0))||PW(t))return;const m={name:p,needsConvertPropertyAccess:!1};if(wp(p,r,h?1:0)||t.valueDeclaration&&Fh(t.valueDeclaration))return m;switch(u){case 3:return z4e(a)?{name:a.symbolName,needsConvertPropertyAccess:!1}:void 0;case 0:return{name:JSON.stringify(p),needsConvertPropertyAccess:!1};case 2:case 1:return p.charCodeAt(0)===32?void 0:{name:p,needsConvertPropertyAccess:!0};case 5:case 4:return m;default:z.assertNever(u)}}var ohe=[],fot=l_(()=>{const t=[];for(let r=83;r<=165;r++)t.push({name:Ta(r),kind:"keyword",kindModifiers:"",sortText:Sh.GlobalsOrKeywords});return t});function hot(t,r){if(!r)return _ot(t);const a=t+8+1;return ohe[a]||(ohe[a]=_ot(t).filter(u=>!M5t(bT(u.name))))}function _ot(t){return ohe[t]||(ohe[t]=fot().filter(r=>{const a=bT(r.name);switch(t){case 0:return!1;case 1:return got(a)||a===138||a===144||a===156||a===145||a===128||sF(a)&&a!==157;case 5:return got(a);case 2:return KX(a);case 3:return pot(a);case 4:return c8(a);case 6:return sF(a)||a===87;case 7:return sF(a);case 8:return a===156;default:return z.assertNever(t)}}))}function M5t(t){switch(t){case 128:case 133:case 163:case 136:case 138:case 94:case 162:case 119:case 140:case 120:case 142:case 143:case 144:case 145:case 146:case 150:case 151:case 164:case 123:case 124:case 125:case 148:case 154:case 155:case 156:case 158:case 159:return!0;default:return!1}}function pot(t){return t===148}function KX(t){switch(t){case 128:case 129:case 137:case 139:case 153:case 134:case 138:case 164:return!0;default:return mse(t)}}function got(t){return t===134||t===135||t===160||t===130||t===152||t===156||!EJ(t)&&!KX(t)}function ahe(t){return lt(t)?QE(t)??0:t.kind}function R5t(t,r){const a=[];if(t){const u=t.getSourceFile(),h=t.parent,p=u.getLineAndCharacterOfPosition(t.end).line,m=u.getLineAndCharacterOfPosition(r).line;(Cu(h)||$u(h)&&h.moduleSpecifier)&&t===h.moduleSpecifier&&p===m&&a.push({name:Ta(132),kind:"keyword",kindModifiers:"",sortText:Sh.GlobalsOrKeywords})}return a}function F5t(t,r){return Xi(t,a=>k6(a)&&lH(a,r)?!0:G0(a)?"quit":!1)}function lhe(t,r,a,u){const h=r&&r!==t,p=h&&!(r.flags&3)?u.getUnionType([t,r]):t,m=B5t(p,a,u);return p.isClass()&&mot(m)?[]:h?Ri(m,C):m;function C(b){return O(b.declarations)?Rt(b.declarations,T=>T.parent!==a):!0}}function B5t(t,r,a){return t.isUnion()?a.getAllPossiblePropertiesOfTypes(Ri(t.types,u=>!(u.flags&402784252||a.isArrayLikeType(u)||a.isTypeInvalidDueToUnionDiscriminant(u,r)||a.typeHasCallOrConstructSignatures(u)||u.isClass()&&mot(u.getApparentProperties())))):t.getApparentProperties()}function mot(t){return Rt(t,r=>!!(Qg(r)&6))}function che(t,r){return t.isUnion()?z.checkEachDefined(r.getAllPossiblePropertiesOfTypes(t.types),"getAllPossiblePropertiesOfTypes() should all be defined"):z.checkEachDefined(t.getApparentProperties(),"getApparentProperties() should all be defined")}function W5t(t,r,a,u){switch(a.kind){case 352:return $r(a.parent,sP);case 1:const h=$r(Ql(ua(a.parent,Ns).statements),sP);if(h&&!Hl(h,20,t))return h;break;case 81:if($r(a.parent,To))return Xi(a,ss);break;case 80:{if(QE(a)||To(a.parent)&&a.parent.initializer===a)return;if(uhe(a))return Xi(a,sP)}}if(r){if(a.kind===137||lt(r)&&To(r.parent)&&ss(a))return Xi(r,ss);switch(r.kind){case 64:return;case 27:case 20:return uhe(a)&&a.parent.name===a?a.parent.parent:$r(a,sP);case 19:case 28:return $r(r.parent,sP);default:if(sP(a)){if(Da(t,r.getEnd()).line!==Da(t,u).line)return a;const h=ss(r.parent.parent)?KX:pot;return h(r.kind)||r.kind===42||lt(r)&&h(QE(r)??0)?r.parent.parent:void 0}return}}}function V5t(t){if(!t)return;const r=t.parent;switch(t.kind){case 19:if(p_(r))return r;break;case 27:case 28:case 80:if(r.kind===171&&p_(r.parent))return r.parent;break}}function vot(t,r){if(!t)return;if(gs(t)&&$$(t.parent))return r.getTypeArgumentConstraint(t);const a=vot(t.parent,r);if(a)switch(t.kind){case 171:return r.getTypeOfPropertyOfContextualType(a,t.symbol.escapedName);case 193:case 187:case 192:return a}}function uhe(t){return t.parent&&B$(t.parent)&&sP(t.parent.parent)}function H5t(t,r,a,u){switch(r){case".":case"@":return!0;case'"':case"'":case"`":return!!a&&nLe(a)&&u===a.getStart(t)+1;case"#":return!!a&&Vs(a)&&!!Sf(a);case"<":return!!a&&a.kind===30&&(!cr(a.parent)||yot(a.parent));case"/":return!!a&&(Ml(a)?!!SW(a):a.kind===44&&QT(a.parent));case" ":return!!a&&h7(a)&&a.parent.kind===307;default:return z.assertNever(r)}}function yot({left:t}){return vu(t)}function j5t(t,r,a){const u=a.resolveName("self",void 0,111551,!1);if(u&&a.getTypeOfSymbolAtLocation(u,r)===t)return!0;const h=a.resolveName("global",void 0,111551,!1);if(h&&a.getTypeOfSymbolAtLocation(h,r)===t)return!0;const p=a.resolveName("globalThis",void 0,111551,!1);return!!(p&&a.getTypeOfSymbolAtLocation(p,r)===t)}function z5t(t){return!!(t.valueDeclaration&&Wh(t.valueDeclaration)&256&&ss(t.valueDeclaration.parent))}function U5t(t,r){const a=r.getContextualType(t);if(a)return a;const u=Vb(t.parent);if(cr(u)&&u.operatorToken.kind===64&&t===u.left)return r.getTypeAtLocation(u);if(Ut(u))return r.getContextualType(u)}function bot(t,r){var a,u,h;let p,m=!1;const C=b();return{isKeywordOnlyCompletion:m,keywordCompletion:p,isNewIdentifierLocation:!!(C||p===156),isTopLevelTypeOnly:!!((u=(a=$r(C,Cu))==null?void 0:a.importClause)!=null&&u.isTypeOnly)||!!((h=$r(C,kd))!=null&&h.isTypeOnly),couldBeTypeOnlyImportSpecifier:!!C&&Sot(C,t),replacementSpan:q5t(C)};function b(){const T=t.parent;if(kd(T)){const E=T.getLastToken(r);if(lt(t)&&E!==t){p=161,m=!0;return}return p=t.kind===156?void 0:156,X4e(T.moduleReference)?T:void 0}if(Sot(T,t)&&wot(T.parent))return T;if(zv(T)||eb(T)){if(!T.parent.isTypeOnly&&(t.kind===19||t.kind===102||t.kind===28)&&(p=156),wot(T))if(t.kind===20||t.kind===80)m=!0,p=161;else return T.parent.parent;return}if($u(T)&&t.kind===42||Yg(T)&&t.kind===20){m=!0,p=161;return}if(h7(t)&&Ns(T))return p=156,t;if(h7(t)&&Cu(T))return p=156,X4e(T.moduleSpecifier)?T:void 0}}function q5t(t){var r;if(!t)return;const a=Xi(t,lg(Cu,kd,$v))??t,u=a.getSourceFile();if(dI(a,u))return b_(a,u);z.assert(a.kind!==102&&a.kind!==276);const h=a.kind===272||a.kind===351?Cot((r=a.importClause)==null?void 0:r.namedBindings)??a.moduleSpecifier:a.moduleReference,p={pos:a.getFirstToken().getStart(),end:h.pos};if(dI(p,u))return cx(p)}function Cot(t){var r;return Me((r=$r(t,zv))==null?void 0:r.elements,a=>{var u;return!a.propertyName&&YL(a.name.text)&&((u=Dd(a.name.pos,t.getSourceFile(),t))==null?void 0:u.kind)!==28})}function Sot(t,r){return m_(t)&&(t.isTypeOnly||r===t.name&&JQ(r))}function wot(t){if(!X4e(t.parent.parent.moduleSpecifier)||t.parent.name)return!1;if(zv(t)){const r=Cot(t);return(r?t.elements.indexOf(r):t.elements.length)<2}return!0}function X4e(t){var r;return vu(t)?!0:!((r=$r(Kb(t)?t.expression:t,Ml))!=null&&r.text)}function $5t(t,r){if(!t)return;const a=Xi(t,h=>IT(h)||xot(h)||Qo(h)?"quit":(Gs(h)||Uc(h))&&!UT(h.parent)),u=Xi(r,h=>IT(h)||xot(h)||Qo(h)?"quit":ds(h));return a||u}function xot(t){return t.parent&&Dc(t.parent)&&(t.parent.body===t||t.kind===39)}function Z4e(t,r,a=new Map){return u(t)||u(Of(t.exportSymbol||t,r));function u(h){return!!(h.flags&788968)||r.isUnknownSymbol(h)||!!(h.flags&1536)&&Lm(a,Aa(h))&&r.getExportsOfModule(h).some(p=>Z4e(p,r,a))}}function J5t(t,r){const a=Of(t,r).declarations;return!!O(a)&&Be(a,_X)}function kot(t,r){if(r.length===0)return!0;let a=!1,u,h=0;const p=t.length;for(let m=0;mZ5t,getStringLiteralCompletions:()=>Q5t});var Tot={directory:0,script:1,"external module name":2};function Y4e(){const t=new Map;function r(a){const u=t.get(a.name);(!u||Tot[u.kind]({name:B1(F.value,N),kindModifiers:"",kind:"string",sortText:Sh.LocationPriority,replacementSpan:Yue(r,b)}));return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:t.isNewIdentifier,optionalReplacementSpan:E,entries:R}}default:return z.assertNever(t)}}function Z5t(t,r,a,u,h,p,m,C){if(!u||!Ml(u))return;const b=Iot(r,u,a,h,p,C);return b&&Y5t(t,u,b,r,h.getTypeChecker(),m)}function Y5t(t,r,a,u,h,p){switch(a.kind){case 0:{const m=Me(a.paths,C=>C.name===t);return m&&GX(t,Eot(m.extension),m.kind,[Cg(t)])}case 1:{const m=Me(a.symbols,C=>C.name===t);return m&&K4e(m,m.name,h,u,r,p)}case 2:return Me(a.types,m=>m.value===t)?GX(t,"","string",[Cg(t)]):void 0;default:return z.assertNever(a)}}function Dot(t){return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!0,entries:t.map(({name:h,kind:p,span:m,extension:C})=>({name:h,kind:p,kindModifiers:Eot(C),sortText:Sh.LocationPriority,replacementSpan:m}))}}function Eot(t){switch(t){case".d.ts":return".d.ts";case".js":return".js";case".json":return".json";case".jsx":return".jsx";case".ts":return".ts";case".tsx":return".tsx";case".d.mts":return".d.mts";case".mjs":return".mjs";case".mts":return".mts";case".d.cts":return".d.cts";case".cjs":return".cjs";case".cts":return".cts";case".tsbuildinfo":return z.fail("Extension .tsbuildinfo is unsupported.");case void 0:return"";default:return z.assertNever(t)}}function Iot(t,r,a,u,h,p){const m=u.getTypeChecker(),C=e6e(r.parent);switch(C.kind){case 201:{const F=e6e(C.parent);return F.kind===205?{kind:0,paths:Pot(t,r,u,h,p)}:b(F)}case 303:return Pa(C.parent)&&C.name===r?i9t(m,C.parent):T()||T(0);case 212:{const{expression:F,argumentExpression:j}=C;return r===Il(j)?Not(m.getTypeAtLocation(F)):void 0}case 213:case 214:case 291:if(!v9t(r)&&!Gp(C)){const F=KH.getArgumentInfoForCompletions(C.kind===291?C.parent:r,a,t,m);return F&&t9t(F.invocation,r,F,m)||T(0)}case 272:case 278:case 283:case 351:return{kind:0,paths:Pot(t,r,u,h,p)};case 296:const E=mX(m,C.parent.clauses),N=T();return N?{kind:2,types:N.types.filter(F=>!E.hasValue(F.value)),isNewIdentifier:!1}:void 0;default:return T()||T(0)}function b(E){switch(E.kind){case 233:case 183:{const F=Xi(C,j=>j.parent===E);return F?{kind:2,types:fhe(m.getTypeArgumentConstraint(F)),isNewIdentifier:!1}:void 0}case 199:const{indexType:N,objectType:R}=E;return lH(N,a)?Not(m.getTypeFromTypeNode(R)):void 0;case 192:{const F=b(e6e(E.parent));if(!F)return;const j=e9t(E,C);return F.kind===1?{kind:1,symbols:F.symbols.filter(U=>!Mt(j,U.name)),hasIndexSignature:F.hasIndexSignature}:{kind:2,types:F.types.filter(U=>!Mt(j,U.value)),isNewIdentifier:!1}}default:return}}function T(E=4){const N=fhe(iX(r,m,E));if(N.length)return{kind:2,types:N,isNewIdentifier:!1}}}function e6e(t){switch(t.kind){case 196:return DW(t);case 217:return Vb(t);default:return t}}function e9t(t,r){return ns(t.types,a=>a!==r&&gS(a)&&ja(a.literal)?a.literal.text:void 0)}function t9t(t,r,a,u){let h=!1;const p=new Map,m=eh(t)?z.checkDefined(Xi(r.parent,qv)):r,C=u.getCandidateSignaturesForStringLiteralCompletions(t,m),b=Ln(C,T=>{if(!vh(T)&&a.argumentCount>T.parameters.length)return;let E=T.getTypeParameterAtPosition(a.argumentIndex);if(eh(t)){const N=u.getTypeOfPropertyOfType(E,eV(m.name));N&&(E=N)}return h=h||!!(E.flags&4),fhe(E,p)});return O(b)?{kind:2,types:b,isNewIdentifier:h}:void 0}function Not(t){return t&&{kind:1,symbols:Ri(t.getApparentProperties(),r=>!(r.valueDeclaration&&Fh(r.valueDeclaration))),hasIndexSignature:xde(t)}}function i9t(t,r){const a=t.getContextualType(r);if(!a)return;const u=t.getContextualType(r,4);return{kind:1,symbols:lhe(a,u,r,t),hasIndexSignature:xde(a)}}function fhe(t,r=new Map){return t?(t=rde(t),t.isUnion()?Ln(t.types,a=>fhe(a,r)):t.isStringLiteral()&&!(t.flags&1024)&&Lm(r,t.value)?[t]:x):x}function xF(t,r,a){return{name:t,kind:r,extension:a}}function t6e(t){return xF(t,"directory",void 0)}function Lot(t,r,a){const u=_9t(t,r),h=t.length===0?void 0:Pf(r,t.length);return a.map(({name:p,kind:m,extension:C})=>p.includes(Hc)||p.includes(b$)?{name:p,kind:m,extension:C,span:h}:{name:p,kind:m,extension:C,span:u})}function Pot(t,r,a,u,h){return Lot(r.text,r.getStart(t)+1,n9t(t,r,a,u,h))}function n9t(t,r,a,u,h){const p=Lf(r.text),m=Ml(r)?a.getModeForUsageLocation(t,r):void 0,C=t.path,b=rs(C),T=a.getCompilerOptions(),E=a.getTypeChecker(),N=i6e(T,1,t,E,h,m);return p9t(p)||!T.baseUrl&&!T.paths&&(Sp(p)||xSe(p))?r9t(p,b,T,u,C,N):l9t(p,b,m,T,u,N,E)}function i6e(t,r,a,u,h,p){return{extensionsToSearch:zs(s9t(t,u)),referenceKind:r,importingSourceFile:a,endingPreference:h==null?void 0:h.importModuleSpecifierEnding,resolutionMode:p}}function r9t(t,r,a,u,h,p){return a.rootDirs?a9t(a.rootDirs,t,r,p,a,u,h):Fn(UH(t,r,p,u,!0,h).values())}function s9t(t,r){const a=r?ns(r.getAmbientModules(),p=>{const m=p.name.slice(1,-1);if(!(!m.startsWith("*.")||m.includes("/")))return m.slice(1)}):[],u=[...K8(t),a],h=f_(t);return GQ(h)?GW(t,u):u}function o9t(t,r,a,u){t=t.map(p=>Xd(ra(Sp(p)?p:Hr(r,p))));const h=Z(t,p=>l0(p,a,r,u)?a.substr(p.length):void 0);return jt([...t.map(p=>Hr(p,h)),a].map(p=>Sk(p)),UE,Xf)}function a9t(t,r,a,u,h,p,m){const C=h.project||p.getCurrentDirectory(),b=!(p.useCaseSensitiveFileNames&&p.useCaseSensitiveFileNames()),T=o9t(t,C,a,b);return jt(Ln(T,E=>Fn(UH(r,E,u,p,!0,m).values())),(E,N)=>E.name===N.name&&E.kind===N.kind&&E.extension===N.extension)}function UH(t,r,a,u,h,p,m=Y4e()){var C;t===void 0&&(t=""),t=Lf(t),ZC(t)||(t=rs(t)),t===""&&(t="."+Hc),t=Xd(t);const b=Ck(r,t),T=ZC(b)?b:rs(b);if(!h){const F=oLe(T,u);if(F){const U=V8(F,u).typesVersions;if(typeof U=="object"){const q=(C=wK(U))==null?void 0:C.paths;if(q){const Q=rs(F),re=b.slice(Xd(Q).length);if(Oot(m,re,Q,a,u,q))return m}}}}const E=!(u.useCaseSensitiveFileNames&&u.useCaseSensitiveFileNames());if(!aX(u,T))return m;const N=Dde(u,T,a.extensionsToSearch,void 0,["./*"]);if(N)for(let F of N){if(F=ra(F),p&&Mb(F,p,r,E)===0)continue;const{name:j,extension:U}=Aot(fd(F),u.getCompilationSettings(),a,!1);m.add(xF(j,"script",U))}const R=oX(u,T);if(R)for(const F of R){const j=fd(ra(F));j!=="@types"&&m.add(t6e(j))}return m}function Aot(t,r,a,u){const h=e2.tryGetRealFileNameForNonJsDeclarationFileName(t);if(h)return{name:h,extension:qb(h)};if(a.referenceKind===0)return{name:t,extension:qb(t)};let p=B7({importModuleSpecifierEnding:a.endingPreference},r,a.importingSourceFile).getAllowedEndingsInPreferredOrder(a.resolutionMode);if(u&&(p=p.filter(C=>C!==0&&C!==1)),p[0]===3){if(rd(t,_G))return{name:t,extension:qb(t)};const C=e2.tryGetJSExtensionForFile(t,r);return C?{name:Kw(t,C),extension:C}:{name:t,extension:qb(t)}}if(!u&&(p[0]===0||p[0]===1)&&rd(t,[".js",".jsx",".ts",".tsx",".d.ts"]))return{name:h_(t),extension:qb(t)};const m=e2.tryGetJSExtensionForFile(t,r);return m?{name:Kw(t,m),extension:m}:{name:t,extension:qb(t)}}function Oot(t,r,a,u,h,p){const m=b=>p[b],C=(b,T)=>{const E=Y6(b),N=Y6(T),R=typeof E=="object"?E.prefix.length:b.length,F=typeof N=="object"?N.prefix.length:T.length;return hc(F,R)};return Mot(t,!1,r,a,u,h,wm(p),m,C)}function Mot(t,r,a,u,h,p,m,C,b){let T=[],E;for(const N of m){if(N===".")continue;const R=N.replace(/^\.\//,""),F=C(N);if(F){const j=Y6(R);if(!j)continue;const U=typeof j=="object"&&c$(j,a);U&&(E===void 0||b(N,E)===-1)&&(E=N,T=T.filter(Q=>!Q.matchedPattern)),(typeof j=="string"||E===void 0||b(N,E)!==1)&&T.push({matchedPattern:U,results:c9t(R,F,a,u,h,r&&U,p).map(({name:Q,kind:re,extension:Y})=>xF(Q,re,Y))})}}return T.forEach(N=>N.results.forEach(R=>t.add(R))),E!==void 0}function l9t(t,r,a,u,h,p,m){const{baseUrl:C,paths:b}=u,T=Y4e(),E=f_(u);if(C){const R=ra(Hr(h.getCurrentDirectory(),C));UH(t,R,p,h,!1,void 0,T)}if(b){const R=MJ(u,h);Oot(T,t,R,p,h,b)}const N=Fot(t);for(const R of d9t(t,N,m))T.add(xF(R,"external module name",void 0));if(Vot(h,u,r,N,p,T),GQ(E)){let R=!1;if(N===void 0)for(const F of h9t(h,r)){const j=xF(F,"external module name",void 0);T.has(j.name)||(R=!0,T.add(j))}if(!R){let F=j=>{const U=Hr(j,"node_modules");aX(h,U)&&UH(t,U,p,h,!1,void 0,T)};if(N&&Joe(u)){const j=F;F=U=>{const q=Qd(t);q.shift();let Q=q.shift();if(!Q)return j(U);if(ro(Q,"@")){const ue=q.shift();if(!ue)return j(U);Q=Hr(Q,ue)}const re=Hr(U,"node_modules",Q),Y=Hr(re,"package.json");if(xH(h,Y)){const te=V8(Y,h).exports;if(te){if(typeof te!="object"||te===null)return;const Se=wm(te),oe=q.join("/")+(q.length&&ZC(t)?"/":""),pe=sx(u,a);Mot(T,!0,oe,re,p,h,Se,ye=>PL(Rot(te[ye],pe)),Hle);return}}return j(U)}}c0(r,F)}}return Fn(T.values())}function Rot(t,r){if(typeof t=="string")return t;if(t&&typeof t=="object"&&!Lo(t)){for(const a in t)if(a==="default"||r.includes(a)||MV(r,a)){const u=t[a];return Rot(u,r)}}}function Fot(t){return n6e(t)?ZC(t)?t:rs(t):void 0}function c9t(t,r,a,u,h,p,m){if(!mu(t,"*"))return t.includes("*")?x:T(t,"script");const C=t.slice(0,t.length-1),b=vre(a,C);if(b===void 0)return t[t.length-2]==="/"?T(C,"directory"):Ln(r,N=>{var R;return(R=Bot("",u,N,h,p,m))==null?void 0:R.map(({name:F,...j})=>({name:C+F,...j}))});return Ln(r,E=>Bot(b,u,E,h,p,m));function T(E,N){return ro(E,a)?[{name:Sk(E),kind:N,extension:void 0}]:x}}function Bot(t,r,a,u,h,p){if(!p.readDirectory)return;const m=Y6(a);if(m===void 0||mo(m))return;const C=Ck(m.prefix),b=ZC(m.prefix)?C:rs(C),T=ZC(m.prefix)?"":fd(C),E=n6e(t),N=E?ZC(t)?t:rs(t):void 0,R=E?Hr(b,T+N):b,F=ra(m.suffix),j=F&&OJ("_"+F),U=j?[Kw(F,j),F]:[F],q=ra(Hr(r,R)),Q=E?q:Xd(q)+T,re=F?U.map(Se=>"**/*"+Se):["./*"],Y=ns(Dde(p,q,u.extensionsToSearch,void 0,re),Se=>{const oe=te(Se);if(oe){if(n6e(oe))return t6e(Qd(Wot(oe))[1]);const{name:pe,extension:ye}=Aot(oe,p.getCompilationSettings(),u,h);return xF(pe,"script",ye)}}),ue=F?x:ns(oX(p,q),Se=>Se==="node_modules"?void 0:t6e(Se));return[...Y,...ue];function te(Se){return Z(U,oe=>{const pe=u9t(ra(Se),Q,oe);return pe===void 0?void 0:Wot(pe)})}}function u9t(t,r,a){return ro(t,r)&&mu(t,a)?t.slice(r.length,t.length-a.length):void 0}function Wot(t){return t[0]===Hc?t.slice(1):t}function d9t(t,r,a){const h=a.getAmbientModules().map(p=>Nm(p.name)).filter(p=>ro(p,t)&&!p.includes("*"));if(r!==void 0){const p=Xd(r);return h.map(m=>BR(m,p))}return h}function f9t(t,r,a,u){const h=Rs(t,r),p=Hy(t.text,h.pos),m=p&&Me(p,j=>r>=j.pos&&r<=j.end);if(!m)return;const C=t.text.slice(m.pos,r),b=g9t.exec(C);if(!b)return;const[,T,E,N]=b,R=rs(t.path),F=E==="path"?UH(N,R,i6e(a,0,t),u,!0,t.path):E==="types"?Vot(u,a,R,Fot(N),i6e(a,1,t)):z.fail();return Lot(N,m.pos+T.length,Fn(F.values()))}function Vot(t,r,a,u,h,p=Y4e()){const m=new Map,C=lX(()=>A7(r,t))||x;for(const T of C)b(T);for(const T of Ede(a,t)){const E=Hr(rs(T),"node_modules/@types");b(E)}return p;function b(T){if(aX(t,T))for(const E of oX(t,T)){const N=RV(E);if(!(r.types&&!Mt(r.types,N)))if(u===void 0)m.has(N)||(p.add(xF(N,"external module name",void 0)),m.set(N,!0));else{const R=Hr(T,E),F=Zoe(u,N,cS(t));F!==void 0&&UH(F,R,h,t,!1,void 0,p)}}}}function h9t(t,r){if(!t.readFile||!t.fileExists)return x;const a=[];for(const u of Ede(r,t)){const h=V8(u,t);for(const p of m9t){const m=h[p];if(m)for(const C in m)Vl(m,C)&&!ro(C,"@types/")&&a.push(C)}}return a}function _9t(t,r){const a=Math.max(t.lastIndexOf(Hc),t.lastIndexOf(b$)),u=a!==-1?a+1:0,h=t.length-u;return h===0||wp(t.substr(u,h),99)?void 0:Pf(r+u,h)}function p9t(t){if(t&&t.length>=2&&t.charCodeAt(0)===46){const r=t.length>=3&&t.charCodeAt(1)===46?2:1,a=t.charCodeAt(r);return a===47||a===92}return!1}var g9t=/^(\/\/\/\s*oA,DefinitionKind:()=>Jot,EntryKind:()=>Got,ExportKind:()=>Hot,FindReferencesUse:()=>Kot,ImportExport:()=>jot,createImportTracker:()=>r6e,findModuleReferences:()=>zot,findReferenceOrRenameEntries:()=>P9t,findReferencedSymbols:()=>I9t,getContextNode:()=>AI,getExportInfo:()=>s6e,getImplementationsAtPosition:()=>L9t,getImportOrExportSymbol:()=>$ot,getReferenceEntriesForNode:()=>Xot,getTextSpanOfEntry:()=>c6e,isContextWithStartAndEndNode:()=>a6e,isDeclarationOfSymbol:()=>tat,isWriteAccessForReference:()=>u6e,nodeEntry:()=>sb,toContextSpan:()=>l6e,toHighlightSpan:()=>W9t,toReferenceEntry:()=>eat,toRenameLocation:()=>O9t});function r6e(t,r,a,u){const h=S9t(t,a,u);return(p,m,C)=>{const{directImports:b,indirectUsers:T}=y9t(t,r,h,m,a,u);return{indirectUsers:T,...b9t(b,p,m.exportKind,a,C)}}}var Hot=(t=>(t[t.Named=0]="Named",t[t.Default=1]="Default",t[t.ExportEquals=2]="ExportEquals",t))(Hot||{}),jot=(t=>(t[t.Import=0]="Import",t[t.Export=1]="Export",t))(jot||{});function y9t(t,r,a,{exportingModuleSymbol:u,exportKind:h},p,m){const C=M3(),b=M3(),T=[],E=!!u.globalExports,N=E?void 0:[];return F(u),{directImports:T,indirectUsers:R()};function R(){if(E)return t;if(u.declarations)for(const Y of u.declarations)DT(Y)&&r.has(Y.getSourceFile().fileName)&&Q(Y);return N.map(_n)}function F(Y){const ue=re(Y);if(ue){for(const te of ue)if(C(te))switch(m&&m.throwIfCancellationRequested(),te.kind){case 213:if(Gp(te)){j(te);break}if(!E){const oe=te.parent;if(h===2&&oe.kind===260){const{name:pe}=oe;if(pe.kind===80){T.push(pe);break}}}break;case 80:break;case 271:q(te,te.name,Kr(te,32),!1);break;case 272:case 351:T.push(te);const Se=te.importClause&&te.importClause.namedBindings;Se&&Se.kind===274?q(te,Se.name,!1,!0):!E&&KL(te)&&Q(QX(te));break;case 278:te.exportClause?te.exportClause.kind===280?Q(QX(te),!0):T.push(te):F(D9t(te,p));break;case 205:!E&&te.isTypeOf&&!te.qualifier&&U(te)&&Q(te.getSourceFile(),!0),T.push(te);break;default:z.failBadSyntaxKind(te,"Unexpected import kind.")}}}function j(Y){const ue=Xi(Y,hhe)||Y.getSourceFile();Q(ue,!!U(Y,!0))}function U(Y,ue=!1){return Xi(Y,te=>ue&&hhe(te)?"quit":_0(te)&&Rt(te.modifiers,SP))}function q(Y,ue,te,Se){if(h===2)Se||T.push(Y);else if(!E){const oe=QX(Y);z.assert(oe.kind===307||oe.kind===267),te||C9t(oe,ue,p)?Q(oe,!0):Q(oe)}}function Q(Y,ue=!1){if(z.assert(!E),!b(Y)||(N.push(Y),!ue))return;const Se=p.getMergedSymbol(Y.symbol);if(!Se)return;z.assert(!!(Se.flags&1536));const oe=re(Se);if(oe)for(const pe of oe)V1(pe)||Q(QX(pe),!0)}function re(Y){return a.get(Aa(Y).toString())}}function b9t(t,r,a,u,h){const p=[],m=[];function C(R,F){p.push([R,F])}if(t)for(const R of t)b(R);return{importSearches:p,singleReferences:m};function b(R){if(R.kind===271){o6e(R)&&T(R.name);return}if(R.kind===80){T(R);return}if(R.kind===205){if(R.qualifier){const U=Ip(R.qualifier);U.escapedText===xu(r)&&m.push(U)}else a===2&&m.push(R.argument.literal);return}if(R.moduleSpecifier.kind!==11)return;if(R.kind===278){R.exportClause&&Yg(R.exportClause)&&E(R.exportClause);return}const{name:F,namedBindings:j}=R.importClause||{name:void 0,namedBindings:void 0};if(j)switch(j.kind){case 274:T(j.name);break;case 275:(a===0||a===1)&&E(j);break;default:z.assertNever(j)}if(F&&(a===1||a===2)&&(!h||F.escapedText===KQ(r))){const U=u.getSymbolAtLocation(F);C(F,U)}}function T(R){a===2&&(!h||N(R.escapedText))&&C(R,u.getSymbolAtLocation(R))}function E(R){if(R)for(const F of R.elements){const{name:j,propertyName:U}=F;if(N((U||j).escapedText))if(U)m.push(U),(!h||j.escapedText===r.escapedName)&&C(j,u.getSymbolAtLocation(j));else{const q=F.kind===281&&F.propertyName?u.getExportSpecifierLocalTargetSymbol(F):u.getSymbolAtLocation(j);C(j,q)}}}function N(R){return R===r.escapedName||a!==0&&R==="default"}}function C9t(t,r,a){const u=a.getSymbolAtLocation(r);return!!Uot(t,h=>{if(!$u(h))return;const{exportClause:p,moduleSpecifier:m}=h;return!m&&p&&Yg(p)&&p.elements.some(C=>a.getExportSpecifierLocalTargetSymbol(C)===u)})}function zot(t,r,a){var u;const h=[],p=t.getTypeChecker();for(const m of r){const C=a.valueDeclaration;if((C==null?void 0:C.kind)===307){for(const b of m.referencedFiles)t.getSourceFileFromReference(m,b)===C&&h.push({kind:"reference",referencingFile:m,ref:b});for(const b of m.typeReferenceDirectives){const T=(u=t.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(b,m))==null?void 0:u.resolvedTypeReferenceDirective;T!==void 0&&T.resolvedFileName===C.fileName&&h.push({kind:"reference",referencingFile:m,ref:b})}}qot(m,(b,T)=>{p.getSymbolAtLocation(T)===a&&h.push(oc(b)?{kind:"implicit",literal:T,referencingFile:m}:{kind:"import",literal:T})})}return h}function S9t(t,r,a){const u=new Map;for(const h of t)a&&a.throwIfCancellationRequested(),qot(h,(p,m)=>{const C=r.getSymbolAtLocation(m);if(C){const b=Aa(C).toString();let T=u.get(b);T||u.set(b,T=[]),T.push(p)}});return u}function Uot(t,r){return W(t.kind===307?t.statements:t.body.statements,a=>r(a)||hhe(a)&&W(a.body&&a.body.statements,r))}function qot(t,r){if(t.externalModuleIndicator||t.imports!==void 0)for(const a of t.imports)r(k8(a),a);else Uot(t,a=>{switch(a.kind){case 278:case 272:{const u=a;u.moduleSpecifier&&ja(u.moduleSpecifier)&&r(u,u.moduleSpecifier);break}case 271:{const u=a;o6e(u)&&r(u,u.moduleReference.expression);break}}})}function $ot(t,r,a,u){return u?h():h()||p();function h(){var b;const{parent:T}=t,E=T.parent;if(r.exportSymbol)return T.kind===211?(b=r.declarations)!=null&&b.some(F=>F===T)&&cr(E)?R(E,!1):void 0:m(r.exportSymbol,C(T));{const F=x9t(T,t);if(F&&Kr(F,32))return kd(F)&&F.moduleReference===t?u?void 0:{kind:0,symbol:a.getSymbolAtLocation(F.name)}:m(r,C(F));if(H1(T))return m(r,0);if(Ec(T))return N(T);if(Ec(E))return N(E);if(cr(T))return R(T,!0);if(cr(E))return R(E,!0);if(CI(T)||Bae(T))return m(r,0)}function N(F){if(!F.symbol.parent)return;const j=F.isExportEquals?2:1;return{kind:1,symbol:r,exportInfo:{exportingModuleSymbol:F.symbol.parent,exportKind:j}}}function R(F,j){let U;switch(Lu(F)){case 1:U=0;break;case 2:U=2;break;default:return}const q=j?a.getSymbolAtLocation(zoe(ua(F.left,Sc))):r;return q&&m(q,U)}}function p(){if(!k9t(t))return;let T=a.getImmediateAliasedSymbol(r);if(!T||(T=T9t(T,a),T.escapedName==="export="&&(T=w9t(T,a),T===void 0)))return;const E=KQ(T);if(E===void 0||E==="default"||E===r.escapedName)return{kind:0,symbol:T}}function m(b,T){const E=s6e(b,T,a);return E&&{kind:1,symbol:b,exportInfo:E}}function C(b){return Kr(b,2048)?1:0}}function w9t(t,r){var a,u;if(t.flags&2097152)return r.getImmediateAliasedSymbol(t);const h=z.checkDefined(t.valueDeclaration);if(Ec(h))return(a=$r(h.expression,H0))==null?void 0:a.symbol;if(cr(h))return(u=$r(h.right,H0))==null?void 0:u.symbol;if(Ns(h))return h.symbol}function x9t(t,r){const a=ds(t)?t:nl(t)?y6(t):void 0;return a?t.name!==r||YT(a.parent)?void 0:Ou(a.parent.parent)?a.parent.parent:void 0:t}function k9t(t){const{parent:r}=t;switch(r.kind){case 271:return r.name===t&&o6e(r);case 276:return!r.propertyName;case 273:case 274:return z.assert(r.name===t),!0;case 208:return Xn(t)&<(r.parent.parent);default:return!1}}function s6e(t,r,a){const u=t.parent;if(!u)return;const h=a.getMergedSymbol(u);return T6(h)?{exportingModuleSymbol:h,exportKind:r}:void 0}function T9t(t,r){if(t.declarations)for(const a of t.declarations){if(gh(a)&&!a.propertyName&&!a.parent.parent.moduleSpecifier)return r.getExportSpecifierLocalTargetSymbol(a)||t;if(Ir(a)&&Jy(a.expression)&&!Vs(a.name))return r.getSymbolAtLocation(a);if(ih(a)&&cr(a.parent.parent)&&Lu(a.parent.parent)===2)return r.getExportSpecifierLocalTargetSymbol(a.name)}return t}function D9t(t,r){return r.getMergedSymbol(QX(t).symbol)}function QX(t){if(t.kind===213||t.kind===351)return t.getSourceFile();const{parent:r}=t;return r.kind===307?r:(z.assert(r.kind===268),ua(r.parent,hhe))}function hhe(t){return t.kind===267&&t.name.kind===11}function o6e(t){return t.moduleReference.kind===283&&t.moduleReference.expression.kind===11}var Jot=(t=>(t[t.Symbol=0]="Symbol",t[t.Label=1]="Label",t[t.Keyword=2]="Keyword",t[t.This=3]="This",t[t.String=4]="String",t[t.TripleSlashReference=5]="TripleSlashReference",t))(Jot||{}),Got=(t=>(t[t.Span=0]="Span",t[t.Node=1]="Node",t[t.StringLiteral=2]="StringLiteral",t[t.SearchedLocalFoundProperty=3]="SearchedLocalFoundProperty",t[t.SearchedPropertyFoundLocal=4]="SearchedPropertyFoundLocal",t))(Got||{});function sb(t,r=1){return{kind:r,node:t.name||t,context:E9t(t)}}function a6e(t){return t&&t.kind===void 0}function E9t(t){if(Yf(t))return AI(t);if(t.parent){if(!Yf(t.parent)&&!Ec(t.parent)){if(Xn(t)){const a=cr(t.parent)?t.parent:Sc(t.parent)&&cr(t.parent.parent)&&t.parent.parent.left===t.parent?t.parent.parent:void 0;if(a&&Lu(a)!==0)return AI(a)}if(Uv(t.parent)||QT(t.parent))return t.parent.parent;if(vI(t.parent)||ix(t.parent)||s8(t.parent))return t.parent;if(Ml(t)){const a=SW(t);if(a){const u=Xi(a,h=>Yf(h)||Es(h)||k6(h));return Yf(u)?AI(u):u}}const r=Xi(t,Ja);return r?AI(r.parent):void 0}if(t.parent.name===t||fu(t.parent)||Ec(t.parent)||(FL(t.parent)||nl(t.parent))&&t.parent.propertyName===t||t.kind===90&&Kr(t.parent,2080))return AI(t.parent)}}function AI(t){if(t)switch(t.kind){case 260:return!wf(t.parent)||t.parent.declarations.length!==1?t:Ou(t.parent.parent)?t.parent.parent:eI(t.parent.parent)?AI(t.parent.parent):t.parent;case 208:return AI(t.parent.parent);case 276:return t.parent.parent.parent;case 281:case 274:return t.parent.parent;case 273:case 280:return t.parent;case 226:return _f(t.parent)?t.parent:t;case 250:case 249:return{start:t.initializer,end:t.expression};case 303:case 304:return CS(t.parent)?AI(Xi(t.parent,r=>cr(r)||eI(r))):t;case 255:return{start:Me(t.getChildren(t.getSourceFile()),r=>r.kind===109),end:t.caseBlock};default:return t}}function l6e(t,r,a){if(!a)return;const u=a6e(a)?ZX(a.start,r,a.end):ZX(a,r);return u.start!==t.start||u.length!==t.length?{contextSpan:u}:void 0}var Kot=(t=>(t[t.Other=0]="Other",t[t.References=1]="References",t[t.Rename=2]="Rename",t))(Kot||{});function I9t(t,r,a,u,h){const p=j_(u,h),m={use:1},C=oA.getReferencedSymbolsForNode(h,p,t,a,r,m),b=t.getTypeChecker(),T=oA.getAdjustedNode(p,m),E=N9t(T)?b.getSymbolAtLocation(T):void 0;return!C||!C.length?void 0:ns(C,({definition:N,references:R})=>N&&{definition:b.runWithCancellationToken(r,F=>A9t(N,F,p)),references:R.map(F=>M9t(F,E))})}function N9t(t){return t.kind===90||!!D8(t)||EW(t)||t.kind===137&&fu(t.parent)}function L9t(t,r,a,u,h){const p=j_(u,h);let m;const C=Qot(t,r,a,p,h);if(p.parent.kind===211||p.parent.kind===208||p.parent.kind===212||p.kind===108)m=C&&[...C];else if(C){const T=_B(C),E=new Map;for(;!T.isEmpty();){const N=T.dequeue();if(!Lm(E,Tl(N.node)))continue;m=xi(m,N);const R=Qot(t,r,a,N.node,N.node.pos);R&&T.enqueue(...R)}}const b=t.getTypeChecker();return Yt(m,T=>F9t(T,b))}function Qot(t,r,a,u,h){if(u.kind===307)return;const p=t.getTypeChecker();if(u.parent.kind===304){const m=[];return oA.getReferenceEntriesForShorthandPropertyAssignment(u,p,C=>m.push(sb(C))),m}else if(u.kind===108||R_(u.parent)){const m=p.getSymbolAtLocation(u);return m.valueDeclaration&&[sb(m.valueDeclaration)]}else return Xot(h,u,t,a,r,{implementations:!0,use:1})}function P9t(t,r,a,u,h,p,m){return Yt(Zot(oA.getReferencedSymbolsForNode(h,u,t,a,r,p)),C=>m(C,u,t.getTypeChecker()))}function Xot(t,r,a,u,h,p={},m=new Set(u.map(C=>C.fileName))){return Zot(oA.getReferencedSymbolsForNode(t,r,a,u,h,p,m))}function Zot(t){return t&&Ln(t,r=>r.references)}function A9t(t,r,a){const u=(()=>{switch(t.type){case 0:{const{symbol:E}=t,{displayParts:N,kind:R}=Yot(E,r,a),F=N.map(q=>q.text).join(""),j=E.declarations&&lu(E.declarations),U=j?ko(j)||j:a;return{...XX(U),name:F,kind:R,displayParts:N,context:AI(j)}}case 1:{const{node:E}=t;return{...XX(E),name:E.text,kind:"label",displayParts:[ip(E.text,17)]}}case 2:{const{node:E}=t,N=Ta(E.kind);return{...XX(E),name:N,kind:"keyword",displayParts:[{text:N,kind:"keyword"}]}}case 3:{const{node:E}=t,N=r.getSymbolAtLocation(E),R=N&&kS.getSymbolDisplayPartsDocumentationAndSymbolKind(r,N,E.getSourceFile(),II(E),E).displayParts||[Cg("this")];return{...XX(E),name:"this",kind:"var",displayParts:R}}case 4:{const{node:E}=t;return{...XX(E),name:E.text,kind:"var",displayParts:[ip(yu(E),8)]}}case 5:return{textSpan:cx(t.reference),sourceFile:t.file,name:t.reference.fileName,kind:"string",displayParts:[ip(`"${t.reference.fileName}"`,8)]};default:return z.assertNever(t)}})(),{sourceFile:h,textSpan:p,name:m,kind:C,displayParts:b,context:T}=u;return{containerKind:"",containerName:"",fileName:h.fileName,kind:C,name:m,textSpan:p,displayParts:b,...l6e(p,h,T)}}function XX(t){const r=t.getSourceFile();return{sourceFile:r,textSpan:ZX(Ja(t)?t.expression:t,r)}}function Yot(t,r,a){const u=oA.getIntersectingMeaningFromDeclarations(a,t),h=t.declarations&&lu(t.declarations)||a,{displayParts:p,symbolKind:m}=kS.getSymbolDisplayPartsDocumentationAndSymbolKind(r,t,h.getSourceFile(),h,h,u);return{displayParts:p,kind:m}}function O9t(t,r,a,u,h){return{..._he(t),...u&&R9t(t,r,a,h)}}function M9t(t,r){const a=eat(t);return r?{...a,isDefinition:t.kind!==0&&tat(t.node,r)}:a}function eat(t){const r=_he(t);if(t.kind===0)return{...r,isWriteAccess:!1};const{kind:a,node:u}=t;return{...r,isWriteAccess:u6e(u),isInString:a===2?!0:void 0}}function _he(t){if(t.kind===0)return{textSpan:t.textSpan,fileName:t.fileName};{const r=t.node.getSourceFile(),a=ZX(t.node,r);return{textSpan:a,fileName:r.fileName,...l6e(a,r,t.context)}}}function R9t(t,r,a,u){if(t.kind!==0&&(lt(r)||Ml(r))){const{node:h,kind:p}=t,m=h.parent,C=r.text,b=ih(m);if(b||mH(m)&&m.name===h&&m.dotDotDotToken===void 0){const T={prefixText:C+": "},E={suffixText:": "+C};if(p===3)return T;if(p===4)return E;if(b){const N=m.parent;return Pa(N)&&cr(N.parent)&&Jy(N.parent.left)?T:E}else return T}else if(m_(m)&&!m.propertyName){const T=gh(r.parent)?a.getExportSpecifierLocalTargetSymbol(r.parent):a.getSymbolAtLocation(r);return Mt(T.declarations,m)?{prefixText:C+" as "}:Fm}else if(gh(m)&&!m.propertyName)return r===t.node||a.getSymbolAtLocation(r)===a.getSymbolAtLocation(t.node)?{prefixText:C+" as "}:{suffixText:" as "+C}}if(t.kind!==0&&W_(t.node)&&Sc(t.node.parent)){const h=lde(u);return{prefixText:h,suffixText:h}}return Fm}function F9t(t,r){const a=_he(t);if(t.kind!==0){const{node:u}=t;return{...a,...B9t(u,r)}}else return{...a,kind:"",displayParts:[]}}function B9t(t,r){const a=r.getSymbolAtLocation(Yf(t)&&t.name?t.name:t);return a?Yot(a,r,t):t.kind===210?{kind:"interface",displayParts:[bh(21),Cg("object literal"),bh(22)]}:t.kind===231?{kind:"local class",displayParts:[bh(21),Cg("anonymous local class"),bh(22)]}:{kind:oD(t),displayParts:[]}}function W9t(t){const r=_he(t);if(t.kind===0)return{fileName:r.fileName,span:{textSpan:r.textSpan,kind:"reference"}};const a=u6e(t.node),u={textSpan:r.textSpan,kind:a?"writtenReference":"reference",isInString:t.kind===2?!0:void 0,...r.contextSpan&&{contextSpan:r.contextSpan}};return{fileName:r.fileName,span:u}}function ZX(t,r,a){let u=t.getStart(r),h=(a||t).getEnd();return Ml(t)&&h-u>2&&(z.assert(a===void 0),u+=1,h-=1),(a==null?void 0:a.kind)===269&&(h=a.getFullStart()),sd(u,h)}function c6e(t){return t.kind===0?t.textSpan:ZX(t.node,t.node.getSourceFile())}function u6e(t){const r=D8(t);return!!r&&V9t(r)||t.kind===90||rP(t)}function tat(t,r){var a;if(!r)return!1;const u=D8(t)||(t.kind===90?t.parent:EW(t)||t.kind===137&&fu(t.parent)?t.parent.parent:void 0),h=u&&cr(u)?u.left:void 0;return!!(u&&((a=r.declarations)!=null&&a.some(p=>p===u||p===h)))}function V9t(t){if(t.flags&33554432)return!0;switch(t.kind){case 226:case 208:case 263:case 231:case 90:case 266:case 306:case 281:case 273:case 271:case 276:case 264:case 338:case 346:case 291:case 267:case 270:case 274:case 280:case 169:case 304:case 265:case 168:return!0;case 303:return!CS(t.parent);case 262:case 218:case 176:case 174:case 177:case 178:return!!t.body;case 260:case 172:return!!t.initializer||YT(t.parent);case 173:case 171:case 348:case 341:return!1;default:return z.failBadSyntaxKind(t)}}var oA;(t=>{function r(St,Ot,xe,Pt,Re,mt={},Je=new Set(Pt.map(pt=>pt.fileName))){var pt,kt;if(Ot=a(Ot,mt),Ns(Ot)){const wi=G3.getReferenceAtPosition(Ot,St,xe);if(!(wi!=null&&wi.file))return;const ce=xe.getTypeChecker().getMergedSymbol(wi.file.symbol);if(ce)return T(xe,ce,!1,Pt,Je);const ut=xe.getFileIncludeReasons();return ut?[{definition:{type:5,reference:wi.reference,file:Ot},references:h(wi.file,ut,xe)||x}]:void 0}if(!mt.implementations){const wi=N(Ot,Pt,Re);if(wi)return wi}const Ci=xe.getTypeChecker(),$e=Ci.getSymbolAtLocation(fu(Ot)&&Ot.parent.name||Ot);if(!$e){if(!mt.implementations&&Ml(Ot)){if(QQ(Ot)){const wi=xe.getFileIncludeReasons(),ce=(kt=(pt=xe.getResolvedModuleFromModuleSpecifier(Ot))==null?void 0:pt.resolvedModule)==null?void 0:kt.resolvedFileName,ut=ce?xe.getSourceFile(ce):void 0;if(ut)return[{definition:{type:4,node:Ot},references:h(ut,wi,xe)||x}]}return Fo(Ot,Pt,Ci,Re)}return}if($e.escapedName==="export=")return T(xe,$e.parent,!1,Pt,Je);const qt=m($e,xe,Pt,Re,mt,Je);if(qt&&!($e.flags&33554432))return qt;const $t=p(Ot,$e,Ci),ii=$t&&m($t,xe,Pt,Re,mt,Je),Gt=R($e,Ot,Pt,Je,Ci,Re,mt);return C(xe,qt,Gt,ii)}t.getReferencedSymbolsForNode=r;function a(St,Ot){return Ot.use===1?St=$ue(St):Ot.use===2&&(St=WQ(St)),St}t.getAdjustedNode=a;function u(St,Ot,xe,Pt=new Set(xe.map(Re=>Re.fileName))){var Re,mt;const Je=(Re=Ot.getSourceFile(St))==null?void 0:Re.symbol;if(Je)return((mt=T(Ot,Je,!1,xe,Pt)[0])==null?void 0:mt.references)||x;const pt=Ot.getFileIncludeReasons(),kt=Ot.getSourceFile(St);return kt&&pt&&h(kt,pt,Ot)||x}t.getReferencesForFileName=u;function h(St,Ot,xe){let Pt;const Re=Ot.get(St.path)||x;for(const mt of Re)if(t2(mt)){const Je=xe.getSourceFileByPath(mt.file),pt=X7(xe,mt);D3(pt)&&(Pt=xi(Pt,{kind:0,fileName:Je.fileName,textSpan:cx(pt)}))}return Pt}function p(St,Ot,xe){if(St.parent&&_V(St.parent)){const Pt=xe.getAliasedSymbol(Ot),Re=xe.getMergedSymbol(Pt);if(Pt!==Re)return Re}}function m(St,Ot,xe,Pt,Re,mt){const Je=St.flags&1536&&St.declarations&&Me(St.declarations,Ns);if(!Je)return;const pt=St.exports.get("export="),kt=T(Ot,St,!!pt,xe,mt);if(!pt||!mt.has(Je.fileName))return kt;const Ci=Ot.getTypeChecker();return St=Of(pt,Ci),C(Ot,kt,R(St,void 0,xe,mt,Ci,Pt,Re))}function C(St,...Ot){let xe;for(const Pt of Ot)if(!(!Pt||!Pt.length)){if(!xe){xe=Pt;continue}for(const Re of Pt){if(!Re.definition||Re.definition.type!==0){xe.push(Re);continue}const mt=Re.definition.symbol,Je=Nt(xe,kt=>!!kt.definition&&kt.definition.type===0&&kt.definition.symbol===mt);if(Je===-1){xe.push(Re);continue}const pt=xe[Je];xe[Je]={definition:pt.definition,references:pt.references.concat(Re.references).sort((kt,Ci)=>{const $e=b(St,kt),qt=b(St,Ci);if($e!==qt)return hc($e,qt);const $t=c6e(kt),ii=c6e(Ci);return $t.start!==ii.start?hc($t.start,ii.start):hc($t.length,ii.length)})}}}return xe}function b(St,Ot){const xe=Ot.kind===0?St.getSourceFile(Ot.fileName):Ot.node.getSourceFile();return St.getSourceFiles().indexOf(xe)}function T(St,Ot,xe,Pt,Re){z.assert(!!Ot.valueDeclaration);const mt=ns(zot(St,Pt,Ot),pt=>{if(pt.kind==="import"){const kt=pt.literal.parent;if(gS(kt)){const Ci=ua(kt.parent,V1);if(xe&&!Ci.qualifier)return}return sb(pt.literal)}else if(pt.kind==="implicit"){const kt=pt.literal.text!==Ik&&MP(pt.referencingFile,Ci=>Ci.transformFlags&2?tb(Ci)||vI(Ci)||XT(Ci)?Ci:void 0:"skip")||pt.referencingFile.statements[0]||pt.referencingFile;return sb(kt)}else return{kind:0,fileName:pt.referencingFile.fileName,textSpan:cx(pt.ref)}});if(Ot.declarations)for(const pt of Ot.declarations)switch(pt.kind){case 307:break;case 267:Re.has(pt.getSourceFile().fileName)&&mt.push(sb(pt.name));break;default:z.assert(!!(Ot.flags&33554432),"Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.")}const Je=Ot.exports.get("export=");if(Je!=null&&Je.declarations)for(const pt of Je.declarations){const kt=pt.getSourceFile();if(Re.has(kt.fileName)){const Ci=cr(pt)&&Ir(pt.left)?pt.left.expression:Ec(pt)?z.checkDefined(Hl(pt,95,kt)):ko(pt)||pt;mt.push(sb(Ci))}}return mt.length?[{definition:{type:0,symbol:Ot},references:mt}]:x}function E(St){return St.kind===148&&Hk(St.parent)&&St.parent.operator===148}function N(St,Ot,xe){if(sF(St.kind))return St.kind===116&&EP(St.parent)||St.kind===148&&!E(St)?void 0:Le(Ot,St.kind,xe,St.kind===148?E:void 0);if(P6(St.parent)&&St.parent.name===St)return Ie(Ot,xe);if(wP(St)&&bu(St.parent))return[{definition:{type:2,node:St},references:[sb(St)]}];if(aH(St)){const Pt=AQ(St.parent,St.text);return Pt&&Oe(Pt.parent,Pt)}else if(Fue(St))return Oe(St.parent,St);if(A3(St))return ts(St,Ot,xe);if(St.kind===108)return Hs(St)}function R(St,Ot,xe,Pt,Re,mt,Je){const pt=Ot&&U(St,Ot,Re,!fl(Je))||St,kt=Ot?as(Ot,pt):7,Ci=[],$e=new re(xe,Pt,Ot?j(Ot):0,Re,mt,kt,Je,Ci),qt=!fl(Je)||!pt.declarations?void 0:Me(pt.declarations,gh);if(qt)wt(qt.name,pt,qt,$e.createSearch(Ot,St,void 0),$e,!0,!0);else if(Ot&&Ot.kind===90&&pt.escapedName==="default"&&pt.parent)Et(Ot,pt,$e),Y(Ot,pt,{exportingModuleSymbol:pt.parent,exportKind:1},$e);else{const $t=$e.createSearch(Ot,pt,void 0,{allSearchSymbols:Ot?Ko(pt,Ot,Re,Je.use===2,!!Je.providePrefixAndSuffixTextForRename,!!Je.implementations):[pt]});F(pt,$e,$t)}return Ci}function F(St,Ot,xe){const Pt=ye(St);if(Pt)He(Pt,Pt.getSourceFile(),xe,Ot,!(Ns(Pt)&&!Mt(Ot.sourceFiles,Pt)));else for(const Re of Ot.sourceFiles)Ot.cancellationToken.throwIfCancellationRequested(),oe(Re,xe,Ot)}function j(St){switch(St.kind){case 176:case 137:return 1;case 80:if(ss(St.parent))return z.assert(St.parent.name===St),2;default:return 0}}function U(St,Ot,xe,Pt){const{parent:Re}=Ot;return gh(Re)&&Pt?nt(Ot,St,Re,xe):Z(St.declarations,mt=>{if(!mt.parent){if(St.flags&33554432)return;z.fail(`Unexpected symbol at ${z.formatSyntaxKind(Ot.kind)}: ${z.formatSymbol(St)}`)}return p_(mt.parent)&&Yw(mt.parent.parent)?xe.getPropertyOfType(xe.getTypeFromTypeNode(mt.parent.parent),St.name):void 0})}let q;(St=>{St[St.None=0]="None",St[St.Constructor=1]="Constructor",St[St.Class=2]="Class"})(q||(q={}));function Q(St){if(!(St.flags&33555968))return;const Ot=St.declarations&&Me(St.declarations,xe=>!Ns(xe)&&!qu(xe));return Ot&&Ot.symbol}class re{constructor(Ot,xe,Pt,Re,mt,Je,pt,kt){this.sourceFiles=Ot,this.sourceFilesSet=xe,this.specialSearchKind=Pt,this.checker=Re,this.cancellationToken=mt,this.searchMeaning=Je,this.options=pt,this.result=kt,this.inheritsFromCache=new Map,this.markSeenContainingTypeReference=M3(),this.markSeenReExportRHS=M3(),this.symbolIdToReferences=[],this.sourceFileToSeenSymbols=[]}includesSourceFile(Ot){return this.sourceFilesSet.has(Ot.fileName)}getImportSearches(Ot,xe){return this.importTracker||(this.importTracker=r6e(this.sourceFiles,this.sourceFilesSet,this.checker,this.cancellationToken)),this.importTracker(Ot,xe,this.options.use===2)}createSearch(Ot,xe,Pt,Re={}){const{text:mt=Nm(xu(W8(xe)||Q(xe)||xe)),allSearchSymbols:Je=[xe]}=Re,pt=du(mt),kt=this.options.implementations&&Ot?ji(Ot,xe,this.checker):void 0;return{symbol:xe,comingFrom:Pt,text:mt,escapedText:pt,parents:kt,allSearchSymbols:Je,includes:Ci=>Mt(Je,Ci)}}referenceAdder(Ot){const xe=Aa(Ot);let Pt=this.symbolIdToReferences[xe];return Pt||(Pt=this.symbolIdToReferences[xe]=[],this.result.push({definition:{type:0,symbol:Ot},references:Pt})),(Re,mt)=>Pt.push(sb(Re,mt))}addStringOrCommentReference(Ot,xe){this.result.push({definition:void 0,references:[{kind:0,fileName:Ot,textSpan:xe}]})}markSearchedSymbols(Ot,xe){const Pt=Tl(Ot),Re=this.sourceFileToSeenSymbols[Pt]||(this.sourceFileToSeenSymbols[Pt]=new Set);let mt=!1;for(const Je of xe)mt=o_(Re,Aa(Je))||mt;return mt}}function Y(St,Ot,xe,Pt){const{importSearches:Re,singleReferences:mt,indirectUsers:Je}=Pt.getImportSearches(Ot,xe);if(mt.length){const pt=Pt.referenceAdder(Ot);for(const kt of mt)te(kt,Pt)&&pt(kt)}for(const[pt,kt]of Re)et(pt.getSourceFile(),Pt.createSearch(pt,kt,1),Pt);if(Je.length){let pt;switch(xe.exportKind){case 0:pt=Pt.createSearch(St,Ot,1);break;case 1:pt=Pt.options.use===2?void 0:Pt.createSearch(St,Ot,1,{text:"default"});break}if(pt)for(const kt of Je)oe(kt,pt,Pt)}}function ue(St,Ot,xe,Pt,Re,mt,Je,pt){const kt=r6e(St,new Set(St.map($t=>$t.fileName)),Ot,xe),{importSearches:Ci,indirectUsers:$e,singleReferences:qt}=kt(Pt,{exportKind:Je?1:0,exportingModuleSymbol:Re},!1);for(const[$t]of Ci)pt($t);for(const $t of qt)lt($t)&&V1($t.parent)&&pt($t);for(const $t of $e)for(const ii of ke($t,Je?"default":mt)){const Gt=Ot.getSymbolAtLocation(ii),wi=Rt(Gt==null?void 0:Gt.declarations,ce=>!!$r(ce,Ec));lt(ii)&&!FL(ii.parent)&&(Gt===Pt||wi)&&pt(ii)}}t.eachExportReference=ue;function te(St,Ot){return We(St,Ot)?Ot.options.use!==2?!0:lt(St)?!(FL(St.parent)&&St.escapedText==="default"):!1:!1}function Se(St,Ot){if(St.declarations)for(const xe of St.declarations){const Pt=xe.getSourceFile();et(Pt,Ot.createSearch(xe,St,0),Ot,Ot.includesSourceFile(Pt))}}function oe(St,Ot,xe){xfe(St).get(Ot.escapedText)!==void 0&&et(St,Ot,xe)}function pe(St,Ot){return CS(St.parent.parent)?Ot.getPropertySymbolOfDestructuringAssignment(St):void 0}function ye(St){const{declarations:Ot,flags:xe,parent:Pt,valueDeclaration:Re}=St;if(Re&&(Re.kind===218||Re.kind===231))return Re;if(!Ot)return;if(xe&8196){const pt=Me(Ot,kt=>Ep(kt,2)||Fh(kt));return pt?Rk(pt,263):void 0}if(Ot.some(mH))return;const mt=Pt&&!(St.flags&262144);if(mt&&!(T6(Pt)&&!Pt.globalExports))return;let Je;for(const pt of Ot){const kt=II(pt);if(Je&&Je!==kt||!kt||kt.kind===307&&!ep(kt))return;if(Je=kt,gc(Je)){let Ci;for(;Ci=roe(Je);)Je=Ci}}return mt?Je.getSourceFile():Je}function be(St,Ot,xe,Pt=xe){return _e(St,Ot,xe,()=>!0,Pt)||!1}t.isSymbolReferencedInFile=be;function _e(St,Ot,xe,Pt,Re=xe){const mt=xp(St.parent,St.parent.parent)?ma(Ot.getSymbolsOfParameterPropertyDeclaration(St.parent,St.text)):Ot.getSymbolAtLocation(St);if(mt)for(const Je of ke(xe,mt.name,Re)){if(!lt(Je)||Je===St||Je.escapedText!==St.escapedText)continue;const pt=Ot.getSymbolAtLocation(Je);if(pt===mt||Ot.getShorthandAssignmentValueSymbol(Je.parent)===mt||gh(Je.parent)&&nt(Je,pt,Je.parent,Ot)===mt){const kt=Pt(Je);if(kt)return kt}}}t.eachSymbolReferenceInFile=_e;function ve(St,Ot){return Ri(ke(Ot,St),Re=>!!D8(Re)).reduce((Re,mt)=>{const Je=Pt(mt);return!Rt(Re.declarationNames)||Je===Re.depth?(Re.declarationNames.push(mt),Re.depth=Je):Je$e===Re)&&Pt(Je,kt))return!0}return!1}t.someSignatureUsage=Ee;function ke(St,Ot,xe=St){return ns(Fe(St,Ot,xe),Pt=>{const Re=j_(St,Pt);return Re===St?void 0:Re})}function Fe(St,Ot,xe=St){const Pt=[];if(!Ot||!Ot.length)return Pt;const Re=St.text,mt=Re.length,Je=Ot.length;let pt=Re.indexOf(Ot,xe.pos);for(;pt>=0&&!(pt>xe.end);){const kt=pt+Je;(pt===0||!YC(Re.charCodeAt(pt-1),99))&&(kt===mt||!YC(Re.charCodeAt(kt),99))&&Pt.push(pt),pt=Re.indexOf(Ot,pt+Je+1)}return Pt}function Oe(St,Ot){const xe=St.getSourceFile(),Pt=Ot.text,Re=ns(ke(xe,Pt,St),mt=>mt===Ot||aH(mt)&&AQ(mt,Pt)===Ot?sb(mt):void 0);return[{definition:{type:1,node:Ot},references:Re}]}function fe(St,Ot){switch(St.kind){case 81:if($k(St.parent))return!0;case 80:return St.text.length===Ot.length;case 15:case 11:{const xe=St;return(OQ(xe)||Hue(St)||xNe(St)||sa(St.parent)&&oI(St.parent)&&St.parent.arguments[1]===St)&&xe.text.length===Ot.length}case 9:return OQ(St)&&St.text.length===Ot.length;case 90:return Ot.length===7;default:return!1}}function Ie(St,Ot){const xe=Ln(St,Pt=>(Ot.throwIfCancellationRequested(),ns(ke(Pt,"meta",Pt),Re=>{const mt=Re.parent;if(P6(mt))return sb(mt)})));return xe.length?[{definition:{type:2,node:xe[0].node},references:xe}]:void 0}function Le(St,Ot,xe,Pt){const Re=Ln(St,mt=>(xe.throwIfCancellationRequested(),ns(ke(mt,Ta(Ot),mt),Je=>{if(Je.kind===Ot&&(!Pt||Pt(Je)))return sb(Je)})));return Re.length?[{definition:{type:2,node:Re[0].node},references:Re}]:void 0}function et(St,Ot,xe,Pt=!0){return xe.cancellationToken.throwIfCancellationRequested(),He(St,St,Ot,xe,Pt)}function He(St,Ot,xe,Pt,Re){if(Pt.markSearchedSymbols(Ot,xe.allSearchSymbols))for(const mt of Fe(Ot,xe.text,St))Ue(Ot,mt,xe,Pt,Re)}function We(St,Ot){return!!(EI(St)&Ot.searchMeaning)}function Ue(St,Ot,xe,Pt,Re){const mt=j_(St,Ot);if(!fe(mt,xe.text)){!Pt.options.implementations&&(Pt.options.findInStrings&&JP(St,Ot)||Pt.options.findInComments&&BNe(St,Ot))&&Pt.addStringOrCommentReference(St.fileName,Pf(Ot,xe.text.length));return}if(!We(mt,Pt))return;let Je=Pt.checker.getSymbolAtLocation(mt);if(!Je)return;const pt=mt.parent;if(m_(pt)&&pt.propertyName===mt)return;if(gh(pt)){z.assert(mt.kind===80),wt(mt,Je,pt,xe,Pt,Re);return}if(o8(pt)&&pt.isNameFirst&&pt.typeExpression&&bI(pt.typeExpression.type)&&pt.typeExpression.type.jsDocPropertyTags&&O(pt.typeExpression.type.jsDocPropertyTags)){Ye(pt.typeExpression.type.jsDocPropertyTags,mt,xe,Pt);return}const kt=lr(xe,Je,mt,Pt);if(!kt){xt(Je,xe,Pt);return}switch(Pt.specialSearchKind){case 0:Re&&Et(mt,kt,Pt);break;case 1:ft(mt,St,xe,Pt);break;case 2:Ht(mt,xe,Pt);break;default:z.assertNever(Pt.specialSearchKind)}Xn(mt)&&nl(mt.parent)&<(mt.parent.parent.parent)&&(Je=mt.parent.symbol,!Je)||st(mt,Je,xe,Pt)}function Ye(St,Ot,xe,Pt){const Re=Pt.referenceAdder(xe.symbol);Et(Ot,xe.symbol,Pt),W(St,mt=>{__(mt.name)&&Re(mt.name.left)})}function wt(St,Ot,xe,Pt,Re,mt,Je){z.assert(!Je||!!Re.options.providePrefixAndSuffixTextForRename,"If alwaysGetReferences is true, then prefix/suffix text must be enabled");const{parent:pt,propertyName:kt,name:Ci}=xe,$e=pt.parent,qt=nt(St,Ot,xe,Re.checker);if(!Je&&!Pt.includes(qt))return;if(kt?St===kt?($e.moduleSpecifier||$t(),mt&&Re.options.use!==2&&Re.markSeenReExportRHS(Ci)&&Et(Ci,z.checkDefined(xe.symbol),Re)):Re.markSeenReExportRHS(St)&&$t():Re.options.use===2&&Ci.escapedText==="default"||$t(),!fl(Re.options)||Je){const Gt=St.escapedText==="default"||xe.name.escapedText==="default"?1:0,wi=z.checkDefined(xe.symbol),ce=s6e(wi,Gt,Re.checker);ce&&Y(St,wi,ce,Re)}if(Pt.comingFrom!==1&&$e.moduleSpecifier&&!kt&&!fl(Re.options)){const ii=Re.checker.getExportSpecifierLocalTargetSymbol(xe);ii&&Se(ii,Re)}function $t(){mt&&Et(St,qt,Re)}}function nt(St,Ot,xe,Pt){return ze(St,xe)&&Pt.getExportSpecifierLocalTargetSymbol(xe)||Ot}function ze(St,Ot){const{parent:xe,propertyName:Pt,name:Re}=Ot;return z.assert(Pt===St||Re===St),Pt?Pt===St:!xe.parent.moduleSpecifier}function st(St,Ot,xe,Pt){const Re=$ot(St,Ot,Pt.checker,xe.comingFrom===1);if(!Re)return;const{symbol:mt}=Re;Re.kind===0?fl(Pt.options)||Se(mt,Pt):Y(St,mt,Re.exportInfo,Pt)}function xt({flags:St,valueDeclaration:Ot},xe,Pt){const Re=Pt.checker.getShorthandAssignmentValueSymbol(Ot),mt=Ot&&ko(Ot);!(St&33554432)&&mt&&xe.includes(Re)&&Et(mt,Re,Pt)}function Et(St,Ot,xe){const{kind:Pt,symbol:Re}="kind"in Ot?Ot:{kind:void 0,symbol:Ot};if(xe.options.use===2&&St.kind===90)return;const mt=xe.referenceAdder(Re);xe.options.implementations?Ai(St,mt,xe):mt(St,Pt)}function ft(St,Ot,xe,Pt){iF(St)&&Et(St,xe.symbol,Pt);const Re=()=>Pt.referenceAdder(xe.symbol);if(ss(St.parent))z.assert(St.kind===90||St.parent.name===St),Oi(xe.symbol,Ot,Re());else{const mt=Yo(St);mt&&(Ui(mt,Re()),Mi(mt,Pt))}}function Ht(St,Ot,xe){Et(St,Ot.symbol,xe);const Pt=St.parent;if(xe.options.use===2||!ss(Pt))return;z.assert(Pt.name===St);const Re=xe.referenceAdder(Ot.symbol);for(const mt of Pt.members)WL(mt)&&da(mt)&&mt.body&&mt.body.forEachChild(function Je(pt){pt.kind===110?Re(pt):!Bo(pt)&&!ss(pt)&&pt.forEachChild(Je)})}function Oi(St,Ot,xe){const Pt=Ji(St);if(Pt&&Pt.declarations)for(const Re of Pt.declarations){const mt=Hl(Re,137,Ot);z.assert(Re.kind===176&&!!mt),xe(mt)}St.exports&&St.exports.forEach(Re=>{const mt=Re.valueDeclaration;if(mt&&mt.kind===174){const Je=mt.body;Je&&ha(Je,110,pt=>{iF(pt)&&xe(pt)})}})}function Ji(St){return St.members&&St.members.get("__constructor")}function Ui(St,Ot){const xe=Ji(St.symbol);if(xe&&xe.declarations)for(const Pt of xe.declarations){z.assert(Pt.kind===176);const Re=Pt.body;Re&&ha(Re,108,mt=>{Oue(mt)&&Ot(mt)})}}function bn(St){return!!Ji(St.symbol)}function Mi(St,Ot){if(bn(St))return;const xe=St.symbol,Pt=Ot.createSearch(void 0,xe,void 0);F(xe,Ot,Pt)}function Ai(St,Ot,xe){if(F1(St)&&fs(St.parent)){Ot(St);return}if(St.kind!==80)return;St.parent.kind===304&&Ds(St,xe.checker,Ot);const Pt=Rn(St);if(Pt){Ot(Pt);return}const Re=Xi(St,pt=>!__(pt.parent)&&!gs(pt.parent)&&!xT(pt.parent)),mt=Re.parent;if(q$(mt)&&mt.type===Re&&xe.markSeenContainingTypeReference(mt))if(iS(mt))Je(mt.initializer);else if(Bo(mt)&&mt.body){const pt=mt.body;pt.kind===241?sS(pt,kt=>{kt.expression&&Je(kt.expression)}):Je(pt)}else Ek(mt)&&Je(mt.expression);function Je(pt){bs(pt)&&Ot(pt)}}function Rn(St){return lt(St)||Ir(St)?Rn(St.parent):Gb(St)?$r(St.parent.parent,lg(ss,Ff)):void 0}function bs(St){switch(St.kind){case 217:return bs(St.expression);case 219:case 218:case 210:case 231:case 209:return!0;default:return!1}}function Hi(St,Ot,xe,Pt){if(St===Ot)return!0;const Re=Aa(St)+","+Aa(Ot),mt=xe.get(Re);if(mt!==void 0)return mt;xe.set(Re,!1);const Je=!!St.declarations&&St.declarations.some(pt=>E8(pt).some(kt=>{const Ci=Pt.getTypeAtLocation(kt);return!!Ci&&!!Ci.symbol&&Hi(Ci.symbol,Ot,xe,Pt)}));return xe.set(Re,Je),Je}function Hs(St){let Ot=oW(St,!1);if(!Ot)return;let xe=256;switch(Ot.kind){case 172:case 171:case 174:case 173:case 176:case 177:case 178:xe&=uS(Ot),Ot=Ot.parent;break;default:return}const Pt=Ot.getSourceFile(),Re=ns(ke(Pt,"super",Ot),mt=>{if(mt.kind!==108)return;const Je=oW(mt,!1);return Je&&da(Je)===!!xe&&Je.parent.symbol===Ot.symbol?sb(mt):void 0});return[{definition:{type:0,symbol:Ot.symbol},references:Re}]}function Wo(St){return St.kind===80&&St.parent.kind===169&&St.parent.name===St}function ts(St,Ot,xe){let Pt=u_(St,!1,!1),Re=256;switch(Pt.kind){case 174:case 173:if(f0(Pt)){Re&=uS(Pt),Pt=Pt.parent;break}case 172:case 171:case 176:case 177:case 178:Re&=uS(Pt),Pt=Pt.parent;break;case 307:if(Td(Pt)||Wo(St))return;case 262:case 218:break;default:return}const mt=Ln(Pt.kind===307?Ot:[Pt.getSourceFile()],pt=>(xe.throwIfCancellationRequested(),ke(pt,"this",Ns(Pt)?pt:Pt).filter(kt=>{if(!A3(kt))return!1;const Ci=u_(kt,!1,!1);if(!H0(Ci))return!1;switch(Pt.kind){case 218:case 262:return Pt.symbol===Ci.symbol;case 174:case 173:return f0(Pt)&&Pt.symbol===Ci.symbol;case 231:case 263:case 210:return Ci.parent&&H0(Ci.parent)&&Pt.symbol===Ci.parent.symbol&&da(Ci)===!!Re;case 307:return Ci.kind===307&&!Td(Ci)&&!Wo(kt)}}))).map(pt=>sb(pt));return[{definition:{type:3,node:Z(mt,pt=>Gs(pt.node.parent)?pt.node:void 0)||St},references:mt}]}function Fo(St,Ot,xe,Pt){const Re=BQ(St,xe),mt=Ln(Ot,Je=>(Pt.throwIfCancellationRequested(),ns(ke(Je,St.text),pt=>{if(Ml(pt)&&pt.text===St.text)if(Re){const kt=BQ(pt,xe);if(Re!==xe.getStringType()&&(Re===kt||Cn(pt,xe)))return sb(pt,2)}else return bP(pt)&&!dI(pt,Je)?void 0:sb(pt,2)})));return[{definition:{type:4,node:St},references:mt}]}function Cn(St,Ot){if(V_(St.parent))return Ot.getPropertyOfType(Ot.getTypeAtLocation(St.parent.parent),St.text)}function Ko(St,Ot,xe,Pt,Re,mt){const Je=[];return ot(St,Ot,xe,Pt,!(Pt&&Re),(pt,kt,Ci)=>{Ci&&hn(St)!==hn(Ci)&&(Ci=void 0),Je.push(Ci||kt||pt)},()=>!mt),Je}function ot(St,Ot,xe,Pt,Re,mt,Je){const pt=RH(Ot);if(pt){const Gt=xe.getShorthandAssignmentValueSymbol(Ot.parent);if(Gt&&Pt)return mt(Gt,void 0,void 0,3);const wi=xe.getContextualType(pt.parent),ce=wi&&Z(FX(pt,xe,wi,!0),je=>$t(je,4));if(ce)return ce;const ut=pe(Ot,xe),Bt=ut&&mt(ut,void 0,void 0,4);if(Bt)return Bt;const le=Gt&&mt(Gt,void 0,void 0,3);if(le)return le}const kt=p(Ot,St,xe);if(kt){const Gt=mt(kt,void 0,void 0,1);if(Gt)return Gt}const Ci=$t(St);if(Ci)return Ci;if(St.valueDeclaration&&xp(St.valueDeclaration,St.valueDeclaration.parent)){const Gt=xe.getSymbolsOfParameterPropertyDeclaration(ua(St.valueDeclaration,Gs),St.name);return z.assert(Gt.length===2&&!!(Gt[0].flags&1)&&!!(Gt[1].flags&4)),$t(St.flags&1?Gt[1]:Gt[0])}const $e=Jc(St,281);if(!Pt||$e&&!$e.propertyName){const Gt=$e&&xe.getExportSpecifierLocalTargetSymbol($e);if(Gt){const wi=mt(Gt,void 0,void 0,1);if(wi)return wi}}if(!Pt){let Gt;return Re?Gt=mH(Ot.parent)?XQ(xe,Ot.parent):void 0:Gt=ii(St,xe),Gt&&$t(Gt,4)}if(z.assert(Pt),Re){const Gt=ii(St,xe);return Gt&&$t(Gt,4)}function $t(Gt,wi){return Z(xe.getRootSymbols(Gt),ce=>mt(Gt,ce,void 0,wi)||(ce.parent&&ce.parent.flags&96&&Je(ce)?hi(ce.parent,ce.name,xe,ut=>mt(Gt,ce,ut,wi)):void 0))}function ii(Gt,wi){const ce=Jc(Gt,208);if(ce&&mH(ce))return XQ(wi,ce)}}function hi(St,Ot,xe,Pt){const Re=new Map;return mt(St);function mt(Je){if(!(!(Je.flags&96)||!Lm(Re,Aa(Je))))return Z(Je.declarations,pt=>Z(E8(pt),kt=>{const Ci=xe.getTypeAtLocation(kt),$e=Ci&&Ci.symbol&&xe.getPropertyOfType(Ci,Ot);return Ci&&$e&&(Z(xe.getRootSymbols($e),Pt)||mt(Ci.symbol))}))}}function hn(St){return St.valueDeclaration?!!(Wh(St.valueDeclaration)&256):!1}function lr(St,Ot,xe,Pt){const{checker:Re}=Pt;return ot(Ot,xe,Re,!1,Pt.options.use!==2||!!Pt.options.providePrefixAndSuffixTextForRename,(mt,Je,pt,kt)=>(pt&&hn(Ot)!==hn(pt)&&(pt=void 0),St.includes(pt||Je||mt)?{symbol:Je&&!(Pu(mt)&6)?Je:mt,kind:kt}:void 0),mt=>!(St.parents&&!St.parents.some(Je=>Hi(mt.parent,Je,Pt.inheritsFromCache,Re))))}function as(St,Ot){let xe=EI(St);const{declarations:Pt}=Ot;if(Pt){let Re;do{Re=xe;for(const mt of Pt){const Je=NQ(mt);Je&xe&&(xe|=Je)}}while(xe!==Re)}return xe}t.getIntersectingMeaningFromDeclarations=as;function fs(St){return St.flags&33554432?!(Ff(St)||Mm(St)):qL(St)?iS(St):rc(St)?!!St.body:ss(St)||qB(St)}function Ds(St,Ot,xe){const Pt=Ot.getSymbolAtLocation(St),Re=Ot.getShorthandAssignmentValueSymbol(Pt.valueDeclaration);if(Re)for(const mt of Re.getDeclarations())NQ(mt)&1&&xe(mt)}t.getReferenceEntriesForShorthandPropertyAssignment=Ds;function ha(St,Ot,xe){jo(St,Pt=>{Pt.kind===Ot&&xe(Pt),ha(Pt,Ot,xe)})}function Yo(St){return Loe(PQ(St).parent)}function ji(St,Ot,xe){const Pt=P3(St)?St.parent:void 0,Re=Pt&&xe.getTypeAtLocation(Pt.expression),mt=ns(Re&&(Re.isUnionOrIntersection()?Re.types:Re.symbol===Ot.parent?void 0:[Re]),Je=>Je.symbol&&Je.symbol.flags&96?Je.symbol:void 0);return mt.length===0?void 0:mt}function fl(St){return St.use===2&&St.providePrefixAndSuffixTextForRename}})(oA||(oA={}));var G3={};l(G3,{createDefinitionInfo:()=>$H,findReferenceInPosition:()=>TF,getDefinitionAndBoundSpan:()=>J9t,getDefinitionAtPosition:()=>iat,getReferenceAtPosition:()=>rat,getTypeDefinitionAtPosition:()=>q9t});function iat(t,r,a,u,h){var p;const m=rat(r,a,t),C=m&&[Z9t(m.reference.fileName,m.fileName,m.unverified)]||x;if(m!=null&&m.file)return C;const b=j_(r,a);if(b===r)return;const{parent:T}=b,E=t.getTypeChecker();if(b.kind===164||lt(b)&&GG(T)&&T.tagName===b)return j9t(E,b)||x;if(aH(b)){const q=AQ(b.parent,b.text);return q?[d6e(E,q,"label",b.text,void 0)]:void 0}switch(b.kind){case 107:const q=Xi(b.parent,re=>bu(re)?"quit":rc(re));return q?[YX(E,q)]:void 0;case 90:if(!C7(b.parent))break;case 84:const Q=Xi(b.parent,v7);if(Q)return[X9t(Q,r)];break}if(b.kind===135){const q=Xi(b,re=>rc(re));return q&&Rt(q.modifiers,re=>re.kind===134)?[YX(E,q)]:void 0}if(b.kind===127){const q=Xi(b,re=>rc(re));return q&&q.asteriskToken?[YX(E,q)]:void 0}if(wP(b)&&bu(b.parent)){const q=b.parent.parent,{symbol:Q,failedAliasResolution:re}=phe(q,E,h),Y=Ri(q.members,bu),ue=Q?E.symbolToString(Q,q):"",te=b.getSourceFile();return Yt(Y,Se=>{let{pos:oe}=Fv(Se);return oe=qa(te.text,oe),d6e(E,Se,"constructor","static {}",ue,!1,re,{start:oe,length:6})})}let{symbol:N,failedAliasResolution:R}=phe(b,E,h),F=b;if(u&&R){const q=W([b,...(N==null?void 0:N.declarations)||x],re=>Xi(re,Vwe)),Q=q&&x8(q);Q&&({symbol:N,failedAliasResolution:R}=phe(Q,E,h),F=Q)}if(!N&&QQ(F)){const q=(p=t.getResolvedModuleFromModuleSpecifier(F,r))==null?void 0:p.resolvedModule;if(q)return[{name:F.text,fileName:q.resolvedFileName,containerName:void 0,containerKind:void 0,kind:"script",textSpan:Pf(0,0),failedAliasResolution:R,isAmbient:xf(q.resolvedFileName),unverified:F!==b}]}if(!N)return no(C,G9t(b,E));if(u&&Be(N.declarations,q=>q.getSourceFile().fileName===r.fileName))return;const j=eBt(E,b);if(j&&!(eh(b.parent)&&tBt(j))){const q=YX(E,j,R);if(E.getRootSymbols(N).some(Q=>H9t(Q,j)))return[q];{const Q=kF(E,N,b,R,j)||x;return b.kind===108?[q,...Q]:[...Q,q]}}if(b.parent.kind===304){const q=E.getShorthandAssignmentValueSymbol(N.valueDeclaration),Q=q!=null&&q.declarations?q.declarations.map(re=>$H(re,E,q,b,!1,R)):x;return no(Q,nat(E,b))}if(od(b)&&nl(T)&&pg(T.parent)&&b===(T.propertyName||T.name)){const q=gH(b),Q=E.getTypeAtLocation(T.parent);return q===void 0?x:Ln(Q.isUnion()?Q.types:[Q],re=>{const Y=re.getProperty(q);return Y&&kF(E,Y,b)})}const U=nat(E,b);return no(C,U.length?U:kF(E,N,b,R))}function H9t(t,r){var a;return t===r.symbol||t===r.symbol.parent||Yd(r.parent)||!kT(r.parent)&&t===((a=$r(r.parent,H0))==null?void 0:a.symbol)}function nat(t,r){const a=RH(r);if(a){const u=a&&t.getContextualType(a.parent);if(u)return Ln(FX(a,t,u,!1),h=>kF(t,h,r))}return x}function j9t(t,r){const a=Xi(r,Vd);if(!(a&&a.name))return;const u=Xi(a,ss);if(!u)return;const h=Pv(u);if(!h)return;const p=Il(h.expression),m=wd(p)?p.symbol:t.getSymbolAtLocation(p);if(!m)return;const C=Ws(UL(a.name)),b=_d(a)?t.getPropertyOfType(t.getTypeOfSymbol(m),C):t.getPropertyOfType(t.getDeclaredTypeOfSymbol(m),C);if(b)return kF(t,b,r)}function rat(t,r,a){var u,h;const p=TF(t.referencedFiles,r);if(p){const b=a.getSourceFileFromReference(t,p);return b&&{reference:p,fileName:b.fileName,file:b,unverified:!1}}const m=TF(t.typeReferenceDirectives,r);if(m){const b=(u=a.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(m,t))==null?void 0:u.resolvedTypeReferenceDirective,T=b&&a.getSourceFile(b.resolvedFileName);return T&&{reference:m,fileName:T.fileName,file:T,unverified:!1}}const C=TF(t.libReferenceDirectives,r);if(C){const b=a.getLibFileFromReference(C);return b&&{reference:C,fileName:b.fileName,file:b,unverified:!1}}if(t.imports.length||t.moduleAugmentations.length){const b=O3(t,r);let T;if(QQ(b)&&Zd(b.text)&&(T=a.getResolvedModuleFromModuleSpecifier(b,t))){const E=(h=T.resolvedModule)==null?void 0:h.resolvedFileName,N=E||Ck(rs(t.fileName),b.text);return{file:a.getSourceFile(N),fileName:N,reference:{pos:b.getStart(),end:b.getEnd(),fileName:b.text},unverified:!E}}}}var sat=new Set(["Array","ArrayLike","ReadonlyArray","Promise","PromiseLike","Iterable","IterableIterator","AsyncIterable","Set","WeakSet","ReadonlySet","Map","WeakMap","ReadonlyMap","Partial","Required","Readonly","Pick","Omit"]);function z9t(t,r){const a=r.symbol.name;if(!sat.has(a))return!1;const u=t.resolveName(a,void 0,788968,!1);return!!u&&u===r.target.symbol}function oat(t,r){if(!r.aliasSymbol)return!1;const a=r.aliasSymbol.name;if(!sat.has(a))return!1;const u=t.resolveName(a,void 0,788968,!1);return!!u&&u===r.aliasSymbol}function U9t(t,r,a,u){var h,p;if(Rr(r)&4&&z9t(t,r))return qH(t.getTypeArguments(r)[0],t,a,u);if(oat(t,r)&&r.aliasTypeArguments)return qH(r.aliasTypeArguments[0],t,a,u);if(Rr(r)&32&&r.target&&oat(t,r.target)){const m=(p=(h=r.aliasSymbol)==null?void 0:h.declarations)==null?void 0:p[0];if(m&&Mm(m)&&_g(m.type)&&m.type.typeArguments)return qH(t.getTypeAtLocation(m.type.typeArguments[0]),t,a,u)}return[]}function q9t(t,r,a){const u=j_(r,a);if(u===r)return;if(P6(u.parent)&&u.parent.name===u)return qH(t.getTypeAtLocation(u.parent),t,u.parent,!1);const{symbol:h,failedAliasResolution:p}=phe(u,t,!1);if(!h)return;const m=t.getTypeOfSymbolAtLocation(h,u),C=$9t(h,m,t),b=C&&qH(C,t,u,p),[T,E]=b&&b.length!==0?[C,b]:[m,qH(m,t,u,p)];return E.length?[...U9t(t,T,u,p),...E]:!(h.flags&111551)&&h.flags&788968?kF(t,Of(h,t),u,p):void 0}function qH(t,r,a,u){return Ln(t.isUnion()&&!(t.flags&32)?t.types:[t],h=>h.symbol&&kF(r,h.symbol,a,u))}function $9t(t,r,a){if(r.symbol===t||t.valueDeclaration&&r.symbol&&ds(t.valueDeclaration)&&t.valueDeclaration.initializer===r.symbol.valueDeclaration){const u=r.getCallSignatures();if(u.length===1)return a.getReturnTypeOfSignature(ma(u))}}function J9t(t,r,a){const u=iat(t,r,a);if(!u||u.length===0)return;const h=TF(r.referencedFiles,a)||TF(r.typeReferenceDirectives,a)||TF(r.libReferenceDirectives,a);if(h)return{definitions:u,textSpan:cx(h)};const p=j_(r,a),m=Pf(p.getStart(),p.getWidth());return{definitions:u,textSpan:m}}function G9t(t,r){return ns(r.getIndexInfosAtLocation(t),a=>a.declaration&&YX(r,a.declaration))}function phe(t,r,a){const u=r.getSymbolAtLocation(t);let h=!1;if(u!=null&&u.declarations&&u.flags&2097152&&!a&&K9t(t,u.declarations[0])){const p=r.getAliasedSymbol(u);if(p.declarations)return{symbol:p};h=!0}return{symbol:u,failedAliasResolution:h}}function K9t(t,r){return t.kind!==80?!1:t.parent===r?!0:r.kind!==274}function Q9t(t){if(!S8(t))return!1;const r=Xi(t,a=>Yd(a)?!0:S8(a)?!1:"quit");return!!r&&Lu(r)===5}function kF(t,r,a,u,h){const p=Ri(r.declarations,R=>R!==h),m=T()||E();if(m)return m;const C=Ri(p,R=>!Q9t(R)),b=Rt(C)?C:p;return Yt(b,R=>$H(R,t,r,a,!1,u));function T(){if(r.flags&32&&!(r.flags&19)&&(iF(a)||a.kind===137)){const R=Me(p,ss);return R&&N(R.members,!0)}}function E(){return Mue(a)||jue(a)?N(p,!1):void 0}function N(R,F){if(!R)return;const j=R.filter(F?fu:Bo),U=j.filter(q=>!!q.body);return j.length?U.length!==0?U.map(q=>$H(q,t,r,a)):[$H(La(j),t,r,a,!1,u)]:void 0}}function $H(t,r,a,u,h,p){const m=r.symbolToString(a),C=kS.getSymbolKind(r,a,u),b=a.parent?r.symbolToString(a.parent,u):"";return d6e(r,t,C,m,b,h,p)}function d6e(t,r,a,u,h,p,m,C){const b=r.getSourceFile();if(!C){const T=ko(r)||r;C=b_(T,b)}return{fileName:b.fileName,textSpan:C,kind:a,name:u,containerKind:void 0,containerName:h,...xc.toContextSpan(C,b,xc.getContextNode(r)),isLocal:!f6e(t,r),isAmbient:!!(r.flags&33554432),unverified:p,failedAliasResolution:m}}function X9t(t,r){const a=xc.getContextNode(t),u=b_(a6e(a)?a.start:a,r);return{fileName:r.fileName,textSpan:u,kind:"keyword",name:"switch",containerKind:void 0,containerName:"",...xc.toContextSpan(u,r,a),isLocal:!0,isAmbient:!1,unverified:!1,failedAliasResolution:void 0}}function f6e(t,r){if(t.isDeclarationVisible(r))return!0;if(!r.parent)return!1;if(iS(r.parent)&&r.parent.initializer===r)return f6e(t,r.parent);switch(r.kind){case 172:case 177:case 178:case 174:if(Ep(r,2))return!1;case 176:case 303:case 304:case 210:case 231:case 219:case 218:return f6e(t,r.parent);default:return!1}}function YX(t,r,a){return $H(r,t,r.symbol,r,!1,a)}function TF(t,r){return Me(t,a=>IB(a,r))}function Z9t(t,r,a){return{fileName:r,textSpan:sd(0,0),kind:"script",name:t,containerName:void 0,containerKind:void 0,unverified:a}}function Y9t(t){const r=Xi(t,u=>!P3(u)),a=r==null?void 0:r.parent;return a&&kT(a)&&gJ(a)===r?a:void 0}function eBt(t,r){const a=Y9t(r),u=a&&t.getResolvedSignature(a);return $r(u&&u.declaration,h=>Bo(h)&&!W1(h))}function tBt(t){switch(t.kind){case 176:case 185:case 179:case 180:return!0;default:return!1}}var ghe={};l(ghe,{provideInlayHints:()=>sBt});var iBt=t=>new RegExp(`^\\s?/\\*\\*?\\s?${t}\\s?\\*\\/\\s?$`);function nBt(t){return t.includeInlayParameterNameHints==="literals"||t.includeInlayParameterNameHints==="all"}function rBt(t){return t.includeInlayParameterNameHints==="literals"}function aat(t){return t.interactiveInlayHints===!0}function sBt(t){const{file:r,program:a,span:u,cancellationToken:h,preferences:p}=t,m=r.text,C=a.getCompilerOptions(),b=bg(r,p),T=a.getTypeChecker(),E=[];return N(r),E;function N(Oe){if(!(!Oe||Oe.getFullWidth()===0)){switch(Oe.kind){case 267:case 263:case 264:case 262:case 231:case 218:case 174:case 219:h.throwIfCancellationRequested()}if(E$(u,Oe.pos,Oe.getFullWidth())&&!(gs(Oe)&&!Gb(Oe)))return p.includeInlayVariableTypeHints&&ds(Oe)||p.includeInlayPropertyDeclarationTypeHints&&To(Oe)?re(Oe):p.includeInlayEnumMemberValueHints&&nx(Oe)?q(Oe):nBt(p)&&(sa(Oe)||GT(Oe))?Y(Oe):(p.includeInlayFunctionParameterTypeHints&&rc(Oe)&&bG(Oe)&&ye(Oe),p.includeInlayFunctionLikeReturnTypeHints&&R(Oe)&&oe(Oe)),jo(Oe,N)}}function R(Oe){return Dc(Oe)||gc(Oe)||Uu(Oe)||Au(Oe)||hg(Oe)}function F(Oe,fe,Ie,Le){let et=`${Le?"...":""}${Oe}`,He;aat(p)?(He=[Fe(et,fe),{text:":"}],et=""):et+=":",E.push({text:et,position:Ie,kind:"Parameter",whitespaceAfter:!0,displayParts:He})}function j(Oe,fe){E.push({text:typeof Oe=="string"?`: ${Oe}`:"",displayParts:typeof Oe=="string"?void 0:[{text:": "},...Oe],position:fe,kind:"Type",whitespaceBefore:!0})}function U(Oe,fe){E.push({text:`= ${Oe}`,position:fe,kind:"Enum",whitespaceBefore:!0})}function q(Oe){if(Oe.initializer)return;const fe=T.getConstantValue(Oe);fe!==void 0&&U(fe.toString(),Oe.end)}function Q(Oe){return Oe.symbol&&Oe.symbol.flags&1536}function re(Oe){if(Oe.initializer===void 0&&!(To(Oe)&&!(T.getTypeAtLocation(Oe).flags&1))||Qo(Oe.name)||ds(Oe)&&!ke(Oe)||hd(Oe))return;const Ie=T.getTypeAtLocation(Oe);if(Q(Ie))return;const Le=ve(Ie);if(Le){const et=typeof Le=="string"?Le:Le.map(We=>We.text).join("");if(p.includeInlayVariableTypeHintsWhenTypeMatchesName===!1&&yk(Oe.name.getText(),et))return;j(Le,Oe.name.end)}}function Y(Oe){const fe=Oe.arguments;if(!fe||!fe.length)return;const Ie=[],Le=T.getResolvedSignatureForSignatureHelp(Oe,Ie);if(!Le||!Ie.length)return;let et=0;for(const He of fe){const We=Il(He);if(rBt(p)&&!Se(We)){et++;continue}let Ue=0;if(Zg(We)){const wt=T.getTypeAtLocation(We.expression);if(T.isTupleType(wt)){const{elementFlags:nt,fixedLength:ze}=wt.target;if(ze===0)continue;const st=Nt(nt,Et=>!(Et&1));(st<0?ze:st)>0&&(Ue=st<0?ze:st)}}const Ye=T.getParameterIdentifierInfoAtPosition(Le,et);if(et=et+(Ue||1),Ye){const{parameter:wt,parameterName:nt,isRestParameter:ze}=Ye;if(!(p.includeInlayParameterNameHintsWhenArgumentMatchesName||!ue(We,nt))&&!ze)continue;const xt=Ws(nt);if(te(We,xt))continue;F(xt,wt,He.getStart(),ze)}}}function ue(Oe,fe){return lt(Oe)?Oe.text===fe:Ir(Oe)?Oe.name.text===fe:!1}function te(Oe,fe){if(!wp(fe,il(C),qW(r.scriptKind)))return!1;const Ie=Hy(m,Oe.pos);if(!(Ie!=null&&Ie.length))return!1;const Le=iBt(fe);return Rt(Ie,et=>Le.test(m.substring(et.pos,et.end)))}function Se(Oe){switch(Oe.kind){case 224:{const fe=Oe.operand;return wT(fe)||lt(fe)&&n7(fe.escapedText)}case 112:case 97:case 106:case 15:case 228:return!0;case 80:{const fe=Oe.escapedText;return Ee(fe)||n7(fe)}}return wT(Oe)}function oe(Oe){if(Dc(Oe)&&!Hl(Oe,21,r)||Dp(Oe)||!Oe.body)return;const Ie=T.getSignatureFromDeclaration(Oe);if(!Ie)return;const Le=T.getReturnTypeOfSignature(Ie);if(Q(Le))return;const et=ve(Le);et&&j(et,pe(Oe))}function pe(Oe){const fe=Hl(Oe,22,r);return fe?fe.end:Oe.parameters.end}function ye(Oe){const fe=T.getSignatureFromDeclaration(Oe);if(fe)for(let Ie=0;Ie{const et=T.typeToTypeNode(Oe,void 0,71286784);z.assertIsDefined(et,"should always get typenode"),Ie.writeNode(4,et,r,Le)})}function ve(Oe){if(!aat(p))return _e(Oe);const Ie=T.typeToTypeNode(Oe,void 0,71286784);z.assertIsDefined(Ie,"should always get typenode");const Le=[];return et(Ie),Le;function et(Ye){var wt,nt;if(!Ye)return;const ze=Ta(Ye.kind);if(ze){Le.push({text:ze});return}if(wT(Ye)){Le.push({text:Ue(Ye)});return}switch(Ye.kind){case 80:z.assertNode(Ye,lt);const st=dr(Ye),xt=Ye.symbol&&Ye.symbol.declarations&&Ye.symbol.declarations.length&&ko(Ye.symbol.declarations[0]);xt?Le.push(Fe(st,xt)):Le.push({text:st});break;case 166:z.assertNode(Ye,__),et(Ye.left),Le.push({text:"."}),et(Ye.right);break;case 182:z.assertNode(Ye,kP),Ye.assertsModifier&&Le.push({text:"asserts "}),et(Ye.parameterName),Ye.type&&(Le.push({text:" is "}),et(Ye.type));break;case 183:z.assertNode(Ye,_g),et(Ye.typeName),Ye.typeArguments&&(Le.push({text:"<"}),We(Ye.typeArguments,", "),Le.push({text:">"}));break;case 168:z.assertNode(Ye,Uc),Ye.modifiers&&We(Ye.modifiers," "),et(Ye.name),Ye.constraint&&(Le.push({text:" extends "}),et(Ye.constraint)),Ye.default&&(Le.push({text:" = "}),et(Ye.default));break;case 169:z.assertNode(Ye,Gs),Ye.modifiers&&We(Ye.modifiers," "),Ye.dotDotDotToken&&Le.push({text:"..."}),et(Ye.name),Ye.questionToken&&Le.push({text:"?"}),Ye.type&&(Le.push({text:": "}),et(Ye.type));break;case 185:z.assertNode(Ye,n3),Le.push({text:"new "}),He(Ye),Le.push({text:" => "}),et(Ye.type);break;case 186:z.assertNode(Ye,qT),Le.push({text:"typeof "}),et(Ye.exprName),Ye.typeArguments&&(Le.push({text:"<"}),We(Ye.typeArguments,", "),Le.push({text:">"}));break;case 187:z.assertNode(Ye,p_),Le.push({text:"{"}),Ye.members.length&&(Le.push({text:" "}),We(Ye.members,"; "),Le.push({text:" "})),Le.push({text:"}"});break;case 188:z.assertNode(Ye,fV),et(Ye.elementType),Le.push({text:"[]"});break;case 189:z.assertNode(Ye,TP),Le.push({text:"["}),We(Ye.elements,", "),Le.push({text:"]"});break;case 202:z.assertNode(Ye,r3),Ye.dotDotDotToken&&Le.push({text:"..."}),et(Ye.name),Ye.questionToken&&Le.push({text:"?"}),Le.push({text:": "}),et(Ye.type);break;case 190:z.assertNode(Ye,WG),et(Ye.type),Le.push({text:"?"});break;case 191:z.assertNode(Ye,VG),Le.push({text:"..."}),et(Ye.type);break;case 192:z.assertNode(Ye,Yw),We(Ye.types," | ");break;case 193:z.assertNode(Ye,DP),We(Ye.types," & ");break;case 194:z.assertNode(Ye,$T),et(Ye.checkType),Le.push({text:" extends "}),et(Ye.extendsType),Le.push({text:" ? "}),et(Ye.trueType),Le.push({text:" : "}),et(Ye.falseType);break;case 195:z.assertNode(Ye,hI),Le.push({text:"infer "}),et(Ye.typeParameter);break;case 196:z.assertNode(Ye,_I),Le.push({text:"("}),et(Ye.type),Le.push({text:")"});break;case 198:z.assertNode(Ye,Hk),Le.push({text:`${Ta(Ye.operator)} `}),et(Ye.type);break;case 199:z.assertNode(Ye,JT),et(Ye.objectType),Le.push({text:"["}),et(Ye.indexType),Le.push({text:"]"});break;case 200:z.assertNode(Ye,pI),Le.push({text:"{ "}),Ye.readonlyToken&&(Ye.readonlyToken.kind===40?Le.push({text:"+"}):Ye.readonlyToken.kind===41&&Le.push({text:"-"}),Le.push({text:"readonly "})),Le.push({text:"["}),et(Ye.typeParameter),Ye.nameType&&(Le.push({text:" as "}),et(Ye.nameType)),Le.push({text:"]"}),Ye.questionToken&&(Ye.questionToken.kind===40?Le.push({text:"+"}):Ye.questionToken.kind===41&&Le.push({text:"-"}),Le.push({text:"?"})),Le.push({text:": "}),Ye.type&&et(Ye.type),Le.push({text:"; }"});break;case 201:z.assertNode(Ye,gS),et(Ye.literal);break;case 184:z.assertNode(Ye,W1),He(Ye),Le.push({text:" => "}),et(Ye.type);break;case 205:z.assertNode(Ye,V1),Ye.isTypeOf&&Le.push({text:"typeof "}),Le.push({text:"import("}),et(Ye.argument),Ye.assertions&&(Le.push({text:", { assert: "}),We(Ye.assertions.assertClause.elements,", "),Le.push({text:" }"})),Le.push({text:")"}),Ye.qualifier&&(Le.push({text:"."}),et(Ye.qualifier)),Ye.typeArguments&&(Le.push({text:"<"}),We(Ye.typeArguments,", "),Le.push({text:">"}));break;case 171:z.assertNode(Ye,V_),(wt=Ye.modifiers)!=null&&wt.length&&(We(Ye.modifiers," "),Le.push({text:" "})),et(Ye.name),Ye.questionToken&&Le.push({text:"?"}),Ye.type&&(Le.push({text:": "}),et(Ye.type));break;case 181:z.assertNode(Ye,UT),Le.push({text:"["}),We(Ye.parameters,", "),Le.push({text:"]"}),Ye.type&&(Le.push({text:": "}),et(Ye.type));break;case 173:z.assertNode(Ye,Hv),(nt=Ye.modifiers)!=null&&nt.length&&(We(Ye.modifiers," "),Le.push({text:" "})),et(Ye.name),Ye.questionToken&&Le.push({text:"?"}),He(Ye),Ye.type&&(Le.push({text:": "}),et(Ye.type));break;case 179:z.assertNode(Ye,xP),He(Ye),Ye.type&&(Le.push({text:": "}),et(Ye.type));break;case 207:z.assertNode(Ye,mS),Le.push({text:"["}),We(Ye.elements,", "),Le.push({text:"]"});break;case 206:z.assertNode(Ye,pg),Le.push({text:"{"}),Ye.elements.length&&(Le.push({text:" "}),We(Ye.elements,", "),Le.push({text:" "})),Le.push({text:"}"});break;case 208:z.assertNode(Ye,nl),et(Ye.name);break;case 224:z.assertNode(Ye,tx),Le.push({text:Ta(Ye.operator)}),et(Ye.operand);break;case 203:z.assertNode(Ye,Q2e),et(Ye.head),Ye.templateSpans.forEach(et);break;case 16:z.assertNode(Ye,CP),Le.push({text:Ue(Ye)});break;case 204:z.assertNode(Ye,Nae),et(Ye.type),et(Ye.literal);break;case 17:z.assertNode(Ye,Tae),Le.push({text:Ue(Ye)});break;case 18:z.assertNode(Ye,MG),Le.push({text:Ue(Ye)});break;case 197:z.assertNode(Ye,s3),Le.push({text:"this"});break;default:z.failBadSyntaxKind(Ye)}}function He(Ye){Ye.typeParameters&&(Le.push({text:"<"}),We(Ye.typeParameters,", "),Le.push({text:">"})),Le.push({text:"("}),We(Ye.parameters,", "),Le.push({text:")"})}function We(Ye,wt){Ye.forEach((nt,ze)=>{ze>0&&Le.push({text:wt}),et(nt)})}function Ue(Ye){switch(Ye.kind){case 11:return b===0?`'${B1(Ye.text,39)}'`:`"${B1(Ye.text,34)}"`;case 16:case 17:case 18:{const wt=Ye.rawText??yoe(B1(Ye.text,96));switch(Ye.kind){case 16:return"`"+wt+"${";case 17:return"}"+wt+"${";case 18:return"}"+wt+"`"}}}return Ye.text}}function Ee(Oe){return Oe==="undefined"}function ke(Oe){if((Fk(Oe)||ds(Oe)&&L6(Oe))&&Oe.initializer){const fe=Il(Oe.initializer);return!(Se(fe)||GT(fe)||Pa(fe)||Ek(fe))}return!0}function Fe(Oe,fe){const Ie=fe.getSourceFile();return{text:Oe,span:b_(fe,Ie),file:Ie.fileName}}}var l2={};l(l2,{getDocCommentTemplateAtPosition:()=>gBt,getJSDocParameterNameCompletionDetails:()=>pBt,getJSDocParameterNameCompletions:()=>_Bt,getJSDocTagCompletionDetails:()=>_at,getJSDocTagCompletions:()=>hBt,getJSDocTagNameCompletionDetails:()=>fBt,getJSDocTagNameCompletions:()=>dBt,getJsDocCommentsFromDeclarations:()=>oBt,getJsDocTagsFromDeclarations:()=>cBt});var lat=["abstract","access","alias","argument","async","augments","author","borrows","callback","class","classdesc","constant","constructor","constructs","copyright","default","deprecated","description","emits","enum","event","example","exports","extends","external","field","file","fileoverview","fires","function","generator","global","hideconstructor","host","ignore","implements","import","inheritdoc","inner","instance","interface","kind","lends","license","link","linkcode","linkplain","listens","member","memberof","method","mixes","module","name","namespace","overload","override","package","param","private","prop","property","protected","public","readonly","requires","returns","satisfies","see","since","static","summary","template","this","throws","todo","tutorial","type","typedef","var","variation","version","virtual","yields"],cat,uat;function oBt(t,r){const a=[];return _de(t,u=>{for(const h of lBt(u)){const p=G0(h)&&h.tags&&Me(h.tags,C=>C.kind===327&&(C.tagName.escapedText==="inheritDoc"||C.tagName.escapedText==="inheritdoc"));if(h.comment===void 0&&!p||G0(h)&&u.kind!==346&&u.kind!==338&&h.tags&&h.tags.some(C=>C.kind===346||C.kind===338)&&!h.tags.some(C=>C.kind===341||C.kind===342))continue;let m=h.comment?K3(h.comment,r):[];p&&p.comment&&(m=m.concat(K3(p.comment,r))),Mt(a,m,aBt)||a.push(m)}}),zs(Te(a,[B3()]))}function aBt(t,r){return pi(t,r,(a,u)=>a.kind===u.kind&&a.text===u.text)}function lBt(t){switch(t.kind){case 341:case 348:return[t];case 338:case 346:return[t,t.parent];case 323:if(u3(t.parent))return[t.parent.parent];default:return noe(t)}}function cBt(t,r){const a=[];return _de(t,u=>{const h=Tk(u);if(!(h.some(p=>p.kind===346||p.kind===338)&&!h.some(p=>p.kind===341||p.kind===342)))for(const p of h)a.push({name:p.tagName.text,text:hat(p,r)}),a.push(...dat(fat(p),r))}),a}function dat(t,r){return Ln(t,a=>no([{name:a.tagName.text,text:hat(a,r)}],dat(fat(a),r)))}function fat(t){return o8(t)&&t.isNameFirst&&t.typeExpression&&bI(t.typeExpression.type)?t.typeExpression.type.jsDocPropertyTags:void 0}function K3(t,r){return typeof t=="string"?[Cg(t)]:Ln(t,a=>a.kind===321?[Cg(a.text)]:QNe(a,r))}function hat(t,r){const{comment:a,kind:u}=t,h=uBt(u);switch(u){case 349:const C=t.typeExpression;return C?p(C):a===void 0?void 0:K3(a,r);case 329:return p(t.class);case 328:return p(t.class);case 345:const b=t,T=[];if(b.constraint&&T.push(Cg(b.constraint.getText())),O(b.typeParameters)){O(T)&&T.push(ku());const N=b.typeParameters[b.typeParameters.length-1];W(b.typeParameters,R=>{T.push(h(R.getText())),N!==R&&T.push(bh(28),ku())})}return a&&T.push(ku(),...K3(a,r)),T;case 344:case 350:return p(t.typeExpression);case 346:case 338:case 348:case 341:case 347:const{name:E}=t;return E?p(E):a===void 0?void 0:K3(a,r);default:return a===void 0?void 0:K3(a,r)}function p(C){return m(C.getText())}function m(C){return a?C.match(/^https?$/)?[Cg(C),...K3(a,r)]:[h(C),ku(),...K3(a,r)]:[Cg(C)]}}function uBt(t){switch(t){case 341:return qNe;case 348:return $Ne;case 345:return GNe;case 346:case 338:return JNe;default:return Cg}}function dBt(){return cat||(cat=Yt(lat,t=>({name:t,kind:"keyword",kindModifiers:"",sortText:sA.SortText.LocationPriority})))}var fBt=_at;function hBt(){return uat||(uat=Yt(lat,t=>({name:`@${t}`,kind:"keyword",kindModifiers:"",sortText:sA.SortText.LocationPriority})))}function _at(t){return{name:t,kind:"",kindModifiers:"",displayParts:[Cg(t)],documentation:x,tags:void 0,codeActions:void 0}}function _Bt(t){if(!lt(t.name))return x;const r=t.name.text,a=t.parent,u=a.parent;return Bo(u)?ns(u.parameters,h=>{if(!lt(h.name))return;const p=h.name.text;if(!(a.tags.some(m=>m!==t&&em(m)&<(m.name)&&m.name.escapedText===p)||r!==void 0&&!ro(p,r)))return{name:p,kind:"parameter",kindModifiers:"",sortText:sA.SortText.LocationPriority}}):[]}function pBt(t){return{name:t,kind:"parameter",kindModifiers:"",displayParts:[Cg(t)],documentation:x,tags:void 0,codeActions:void 0}}function gBt(t,r,a,u){const h=Rs(r,a),p=Xi(h,G0);if(p&&(p.comment!==void 0||O(p.tags)))return;const m=h.getStart(r);if(!p&&m0;if(U&&!re){const Y=q+t+F+" * ",ue=m===a?t+F:"";return{newText:Y+t+U+F+Q+ue,caretOffset:Y.length}}return{newText:q+Q,caretOffset:3}}function mBt(t,r){const{text:a}=t,u=Bm(r,t);let h=u;for(;h<=r&&Tv(a.charCodeAt(h));h++);return a.slice(u,h)}function vBt(t,r,a,u){return t.map(({name:h,dotDotDotToken:p},m)=>{const C=h.kind===80?h.text:"param"+m;return`${a} * @param ${r?p?"{...any} ":"{any} ":""}${C}${u}`}).join("")}function yBt(t,r){return`${t} * @returns${r}`}function bBt(t,r){return Ewe(t,a=>h6e(a,r))}function h6e(t,r){switch(t.kind){case 262:case 218:case 174:case 176:case 173:case 219:const a=t;return{commentOwner:t,parameters:a.parameters,hasReturn:eZ(a,r)};case 303:return h6e(t.initializer,r);case 263:case 264:case 266:case 306:case 265:return{commentOwner:t};case 171:{const h=t;return h.type&&W1(h.type)?{commentOwner:t,parameters:h.type.parameters,hasReturn:eZ(h.type,r)}:{commentOwner:t}}case 243:{const p=t.declarationList.declarations,m=p.length===1&&p[0].initializer?CBt(p[0].initializer):void 0;return m?{commentOwner:t,parameters:m.parameters,hasReturn:eZ(m,r)}:{commentOwner:t}}case 307:return"quit";case 267:return t.parent.kind===267?void 0:{commentOwner:t};case 244:return h6e(t.expression,r);case 226:{const h=t;return Lu(h)===0?"quit":Bo(h.right)?{commentOwner:t,parameters:h.right.parameters,hasReturn:eZ(h.right,r)}:{commentOwner:t}}case 172:const u=t.initializer;if(u&&(gc(u)||Dc(u)))return{commentOwner:t,parameters:u.parameters,hasReturn:eZ(u,r)}}}function eZ(t,r){return!!(r!=null&&r.generateReturnInDocTemplate)&&(W1(t)||Dc(t)&&Ut(t.body)||rc(t)&&t.body&&Ho(t.body)&&!!sS(t.body,a=>a))}function CBt(t){for(;t.kind===217;)t=t.expression;switch(t.kind){case 218:case 219:return t;case 231:return Me(t.members,fu)}}var mhe={};l(mhe,{mapCode:()=>SBt});function SBt(t,r,a,u,h,p){return er.ChangeTracker.with({host:u,formatContext:h,preferences:p},m=>{const C=r.map(T=>wBt(t,T)),b=a&&zs(a);for(const T of C)xBt(t,m,T,b)})}function wBt(t,r){const a=[{parse:()=>RP("__mapcode_content_nodes.ts",r,t.languageVersion,!0,t.scriptKind),body:p=>p.statements},{parse:()=>RP("__mapcode_class_content_nodes.ts",`class __class { +${r} +}`,t.languageVersion,!0,t.scriptKind),body:p=>p.statements[0].members}],u=[];for(const{parse:p,body:m}of a){const C=p(),b=m(C);if(b.length&&C.parseDiagnostics.length===0)return b;b.length&&u.push({sourceFile:C,body:b})}const{body:h}=u.sort((p,m)=>p.sourceFile.parseDiagnostics.length-m.sourceFile.parseDiagnostics.length)[0];return h}function xBt(t,r,a,u){Vd(a[0])||xT(a[0])?kBt(t,r,a,u):TBt(t,r,a,u)}function kBt(t,r,a,u){let h;if(!u||!u.length?h=Me(t.statements,lg(ss,Ff)):h=W(u,m=>Xi(Rs(t,m.start),lg(ss,Ff))),!h)return;const p=h.members.find(m=>a.some(C=>tZ(C,m)));if(p){const m=vt(h.members,C=>a.some(b=>tZ(b,C)));W(a,vhe),r.replaceNodeRangeWithNodes(t,p,m,a);return}W(a,vhe),r.insertNodesAfter(t,h.members[h.members.length-1],a)}function TBt(t,r,a,u){if(!(u!=null&&u.length)){r.insertNodesAtEndOfFile(t,a,!1);return}for(const p of u){const m=Xi(Rs(t,p.start),C=>lg(Ho,Ns)(C)&&Rt(C.statements,b=>a.some(T=>tZ(T,b))));if(m){const C=m.statements.find(b=>a.some(T=>tZ(T,b)));if(C){const b=vt(m.statements,T=>a.some(E=>tZ(E,T)));W(a,vhe),r.replaceNodeRangeWithNodes(t,C,b,a);return}}}let h=t.statements;for(const p of u){const m=Xi(Rs(t,p.start),Ho);if(m){h=m.statements;break}}W(a,vhe),r.insertNodesAfter(t,h[h.length-1],a)}function tZ(t,r){var a,u,h,p,m,C;return t.kind!==r.kind?!1:t.kind===176?t.kind===r.kind:Af(t)&&Af(r)?t.name.getText()===r.name.getText():jk(t)&&jk(r)||Oae(t)&&Oae(r)?t.expression.getText()===r.expression.getText():zk(t)&&zk(r)?((a=t.initializer)==null?void 0:a.getText())===((u=r.initializer)==null?void 0:u.getText())&&((h=t.incrementor)==null?void 0:h.getText())===((p=r.incrementor)==null?void 0:p.getText())&&((m=t.condition)==null?void 0:m.getText())===((C=r.condition)==null?void 0:C.getText()):eI(t)&&eI(r)?t.expression.getText()===r.expression.getText()&&t.initializer.getText()===r.initializer.getText():ix(t)&&ix(r)?t.label.getText()===r.label.getText():t.getText()===r.getText()}function vhe(t){pat(t),t.parent=void 0}function pat(t){t.pos=-1,t.end=-1,t.forEachChild(pat)}var c2={};l(c2,{compareImportsOrRequireStatements:()=>b6e,compareModuleSpecifiers:()=>qBt,getDetectionLists:()=>yhe,getImportDeclarationInsertionIndex:()=>HBt,getImportSpecifierInsertionIndex:()=>jBt,getNamedImportSpecifierComparerWithDetection:()=>VBt,getOrganizeImportsStringComparerWithDetection:()=>WBt,organizeImports:()=>DBt,testCoalesceExports:()=>UBt,testCoalesceImports:()=>zBt});function DBt(t,r,a,u,h,p){const m=er.ChangeTracker.fromContext({host:a,formatContext:r,preferences:h}),C=p==="SortAndCombine"||p==="All",b=C,T=p==="RemoveUnused"||p==="All",E=t.statements.filter(Cu),N=_6e(t,E),{comparersToTest:R,typeOrdersToTest:F}=yhe(h),j=R[0],U={moduleSpecifierComparer:typeof h.organizeImportsIgnoreCase=="boolean"?j:void 0,namedImportComparer:typeof h.organizeImportsIgnoreCase=="boolean"?j:void 0,typeOrder:h.organizeImportsTypeOrder};if(typeof h.organizeImportsIgnoreCase!="boolean"&&({comparer:U.moduleSpecifierComparer}=vat(N,R)),!U.typeOrder||typeof h.organizeImportsIgnoreCase!="boolean"){const Y=v6e(E,R,F);if(Y){const{namedImportComparer:ue,typeOrder:te}=Y;U.namedImportComparer=U.namedImportComparer??ue,U.typeOrder=U.typeOrder??te}}N.forEach(Y=>Q(Y,U)),p!=="RemoveUnused"&&IBt(t).forEach(Y=>re(Y,U.namedImportComparer));for(const Y of t.statements.filter(Bh)){if(!Y.body)continue;if(_6e(t,Y.body.statements.filter(Cu)).forEach(te=>Q(te,U)),p!=="RemoveUnused"){const te=Y.body.statements.filter($u);re(te,U.namedImportComparer)}}return m.getChanges();function q(Y,ue){if(O(Y)===0)return;ir(Y[0],1024);const te=b?xv(Y,pe=>iZ(pe.moduleSpecifier)):[Y],Se=C?$p(te,(pe,ye)=>g6e(pe[0].moduleSpecifier,ye[0].moduleSpecifier,U.moduleSpecifierComparer??j)):te,oe=Ln(Se,pe=>iZ(pe[0].moduleSpecifier)||pe[0].moduleSpecifier===void 0?ue(pe):pe);if(oe.length===0)m.deleteNodes(t,Y,{leadingTriviaOption:er.LeadingTriviaOption.Exclude,trailingTriviaOption:er.TrailingTriviaOption.Include},!0);else{const pe={leadingTriviaOption:er.LeadingTriviaOption.Exclude,trailingTriviaOption:er.TrailingTriviaOption.Include,suffix:SS(a,r.options)};m.replaceNodeWithNodes(t,Y[0],oe,pe);const ye=m.nodeHasTrailingComment(t,Y[0],pe);m.deleteNodes(t,Y.slice(1),{trailingTriviaOption:er.TrailingTriviaOption.Include},ye)}}function Q(Y,ue){const te=ue.moduleSpecifierComparer??j,Se=ue.namedImportComparer??j,oe=ue.typeOrder??"last",pe=GH({organizeImportsTypeOrder:oe},Se);q(Y,be=>(T&&(be=NBt(be,t,u)),b&&(be=gat(be,te,pe,t)),C&&(be=$p(be,(_e,ve)=>b6e(_e,ve,te))),be))}function re(Y,ue){const te=GH(h,ue);q(Y,Se=>mat(Se,te))}}function yhe(t){return{comparersToTest:typeof t.organizeImportsIgnoreCase=="boolean"?[y6e(t,t.organizeImportsIgnoreCase)]:[y6e(t,!0),y6e(t,!1)],typeOrdersToTest:t.organizeImportsTypeOrder?[t.organizeImportsTypeOrder]:["last","inline","first"]}}function _6e(t,r){const a=zy(t.languageVersion,!1,t.languageVariant),u=[];let h=0;for(const p of r)u[h]&&EBt(t,p,a)&&h++,u[h]||(u[h]=[]),u[h].push(p);return u}function EBt(t,r,a){const u=r.getFullStart(),h=r.getStart();a.setText(t.text,u,h-u);let p=0;for(;a.getTokenStart()=2))return!0;return!1}function IBt(t){const r=[],a=t.statements,u=O(a);let h=0,p=0;for(;h_6e(t,m))}function NBt(t,r,a){const u=a.getTypeChecker(),h=a.getCompilerOptions(),p=u.getJsxNamespace(r),m=u.getJsxFragmentFactory(r),C=!!(r.transformFlags&2),b=[];for(const E of t){const{importClause:N,moduleSpecifier:R}=E;if(!N){b.push(E);continue}let{name:F,namedBindings:j}=N;if(F&&!T(F)&&(F=void 0),j)if(eb(j))T(j.name)||(j=void 0);else{const U=j.elements.filter(q=>T(q.name));U.length{if(m.attributes){let C=m.attributes.token+" ";for(const b of tc(m.attributes.elements,(T,E)=>Xf(T.name.text,E.name.text)))C+=b.name.text+":",C+=Ml(b.value)?`"${b.value.text}"`:b.value.getText()+" ";return C}return""}),p=[];for(const m in h){const C=h[m],{importWithoutClause:b,typeOnlyImports:T,regularImports:E}=LBt(C);b&&p.push(b);for(const N of[E,T]){const R=N===T,{defaultImports:F,namespaceImports:j,namedImports:U}=N;if(!R&&F.length===1&&j.length===1&&U.length===0){const pe=F[0];p.push(JH(pe,pe.importClause.name,j[0].importClause.namedBindings));continue}const q=$p(j,(pe,ye)=>r(pe.importClause.namedBindings.name.text,ye.importClause.namedBindings.name.text));for(const pe of q)p.push(JH(pe,void 0,pe.importClause.namedBindings));const Q=lu(F),re=lu(U),Y=Q??re;if(!Y)continue;let ue;const te=[];if(F.length===1)ue=F[0].importClause.name;else for(const pe of F)te.push(G.createImportSpecifier(!1,G.createIdentifier("default"),pe.importClause.name));te.push(...OBt(U));const Se=G.createNodeArray($p(te,a),re==null?void 0:re.importClause.namedBindings.elements.hasTrailingComma),oe=Se.length===0?ue?void 0:G.createNamedImports(x):re?G.updateNamedImports(re.importClause.namedBindings,Se):G.createNamedImports(Se);u&&oe&&(re!=null&&re.importClause.namedBindings)&&!dI(re.importClause.namedBindings,u)&&ir(oe,2),R&&ue&&oe?(p.push(JH(Y,ue,void 0)),p.push(JH(re??Y,void 0,oe))):p.push(JH(Y,ue,oe))}}return p}function mat(t,r){if(t.length===0)return t;const{exportWithoutClause:a,namedExports:u,typeOnlyExports:h}=m(t),p=[];a&&p.push(a);for(const C of[u,h]){if(C.length===0)continue;const b=[];b.push(...Ln(C,N=>N.exportClause&&Yg(N.exportClause)?N.exportClause.elements:x));const T=$p(b,r),E=C[0];p.push(G.updateExportDeclaration(E,E.modifiers,E.isTypeOnly,E.exportClause&&(Yg(E.exportClause)?G.updateNamedExports(E.exportClause,T):G.updateNamespaceExport(E.exportClause,E.exportClause.name)),E.moduleSpecifier,E.attributes))}return p;function m(C){let b;const T=[],E=[];for(const N of C)N.exportClause===void 0?b=b||N:N.isTypeOnly?E.push(N):T.push(N);return{exportWithoutClause:b,namedExports:T,typeOnlyExports:E}}}function JH(t,r,a){return G.updateImportDeclaration(t,t.modifiers,G.updateImportClause(t.importClause,t.importClause.isTypeOnly,r,a),t.moduleSpecifier,t.attributes)}function p6e(t,r,a,u){switch(u==null?void 0:u.organizeImportsTypeOrder){case"first":return bk(r.isTypeOnly,t.isTypeOnly)||a(t.name.text,r.name.text);case"inline":return a(t.name.text,r.name.text);default:return bk(t.isTypeOnly,r.isTypeOnly)||a(t.name.text,r.name.text)}}function g6e(t,r,a){const u=t===void 0?void 0:iZ(t),h=r===void 0?void 0:iZ(r);return bk(u===void 0,h===void 0)||bk(Zd(u),Zd(h))||a(u,h)}function PBt(t){return t.map(r=>iZ(m6e(r))||"")}function m6e(t){var r;switch(t.kind){case 271:return(r=$r(t.moduleReference,Kb))==null?void 0:r.expression;case 272:return t.moduleSpecifier;case 243:return t.declarationList.declarations[0].initializer.arguments[0]}}function ABt(t,r){const a=ja(r)&&r.text;return mo(a)&&Rt(t.moduleAugmentations,u=>ja(u)&&u.text===a)}function OBt(t){return Ln(t,r=>Yt(MBt(r),a=>a.name&&a.propertyName&&a.name.escapedText===a.propertyName.escapedText?G.updateImportSpecifier(a,a.isTypeOnly,void 0,a.name):a))}function MBt(t){var r;return(r=t.importClause)!=null&&r.namedBindings&&zv(t.importClause.namedBindings)?t.importClause.namedBindings.elements:void 0}function vat(t,r){const a=[];return t.forEach(u=>{a.push(PBt(u))}),bat(a,r)}function v6e(t,r,a){let u=!1;const h=t.filter(b=>{var T,E;const N=(E=$r((T=b.importClause)==null?void 0:T.namedBindings,zv))==null?void 0:E.elements;return N!=null&&N.length?(!u&&N.some(R=>R.isTypeOnly)&&N.some(R=>!R.isTypeOnly)&&(u=!0),!0):!1});if(h.length===0)return;const p=h.map(b=>{var T,E;return(E=$r((T=b.importClause)==null?void 0:T.namedBindings,zv))==null?void 0:E.elements}).filter(b=>b!==void 0);if(!u||a.length===0){const b=bat(p.map(T=>T.map(E=>E.name.text)),r);return{namedImportComparer:b.comparer,typeOrder:a.length===1?a[0]:void 0,isSorted:b.isSorted}}const m={first:1/0,last:1/0,inline:1/0},C={first:r[0],last:r[0],inline:r[0]};for(const b of r){const T={first:0,last:0,inline:0};for(const E of p)for(const N of a)T[N]=(T[N]??0)+yat(E,(R,F)=>p6e(R,F,b,{organizeImportsTypeOrder:N}));for(const E of a){const N=E;T[N]0&&a++;return a}function bat(t,r){let a,u=1/0;for(const h of r){let p=0;for(const m of t){if(m.length<=1)continue;const C=yat(m,h);p+=C}pp6e(u,h,a,t)}function VBt(t,r,a){const{comparersToTest:u,typeOrdersToTest:h}=yhe(r),p=v6e([t],u,h);let m=GH(r,u[0]),C;if(typeof r.organizeImportsIgnoreCase!="boolean"||!r.organizeImportsTypeOrder){if(p){const{namedImportComparer:b,typeOrder:T,isSorted:E}=p;C=E,m=GH({organizeImportsTypeOrder:T},b)}else if(a){const b=v6e(a.statements.filter(Cu),u,h);if(b){const{namedImportComparer:T,typeOrder:E,isSorted:N}=b;C=N,m=GH({organizeImportsTypeOrder:E},T)}}}return{specifierComparer:m,isSorted:C}}function HBt(t,r,a){const u=Fy(t,r,fc,(h,p)=>b6e(h,p,a));return u<0?~u:u}function jBt(t,r,a){const u=Fy(t,r,fc,a);return u<0?~u:u}function b6e(t,r,a){return g6e(m6e(t),m6e(r),a)||RBt(t,r)}function zBt(t,r,a,u){const h=nZ(r),p=GH({organizeImportsTypeOrder:u==null?void 0:u.organizeImportsTypeOrder},h);return gat(t,h,p,a)}function UBt(t,r,a){return mat(t,(h,p)=>p6e(h,p,nZ(r),{organizeImportsTypeOrder:(a==null?void 0:a.organizeImportsTypeOrder)??"last"}))}function qBt(t,r,a){const u=nZ(!!a);return g6e(t,r,u)}var bhe={};l(bhe,{collectElements:()=>$Bt});function $Bt(t,r){const a=[];return JBt(t,r,a),GBt(t,a),a.sort((u,h)=>u.textSpan.start-h.textSpan.start)}function JBt(t,r,a){let u=40,h=0;const p=[...t.statements,t.endOfFileToken],m=p.length;for(;h1&&u.push(rZ(p,m,"comment"))}}function wat(t,r,a,u){yP(t)||C6e(t.pos,r,a,u)}function rZ(t,r,a){return aA(sd(t,r),a)}function QBt(t,r){switch(t.kind){case 241:if(Bo(t.parent))return XBt(t.parent,t,r);switch(t.parent.kind){case 246:case 249:case 250:case 248:case 245:case 247:case 254:case 299:return E(t.parent);case 258:const F=t.parent;if(F.tryBlock===t)return E(t.parent);if(F.finallyBlock===t){const j=Hl(F,98,r);if(j)return E(j)}default:return aA(b_(t,r),"code")}case 268:return E(t.parent);case 263:case 231:case 264:case 266:case 269:case 187:case 206:return E(t);case 189:return E(t,!1,!TP(t.parent),23);case 296:case 297:return N(t.statements);case 210:return T(t);case 209:return T(t,23);case 284:return p(t);case 288:return m(t);case 285:case 286:return C(t.attributes);case 228:case 15:return b(t);case 207:return E(t,!1,!nl(t.parent),23);case 219:return h(t);case 213:return u(t);case 217:return R(t);case 275:case 279:case 300:return a(t)}function a(F){if(!F.elements.length)return;const j=Hl(F,19,r),U=Hl(F,20,r);if(!(!j||!U||Kg(j.pos,U.pos,r)))return Che(j,U,F,r,!1,!1)}function u(F){if(!F.arguments.length)return;const j=Hl(F,21,r),U=Hl(F,22,r);if(!(!j||!U||Kg(j.pos,U.pos,r)))return Che(j,U,F,r,!1,!0)}function h(F){if(Ho(F.body)||g_(F.body)||Kg(F.body.getFullStart(),F.body.getEnd(),r))return;const j=sd(F.body.getFullStart(),F.body.getEnd());return aA(j,"code",b_(F))}function p(F){const j=sd(F.openingElement.getStart(r),F.closingElement.getEnd()),U=F.openingElement.tagName.getText(r),q="<"+U+">...";return aA(j,"code",j,!1,q)}function m(F){const j=sd(F.openingFragment.getStart(r),F.closingFragment.getEnd());return aA(j,"code",j,!1,"<>...")}function C(F){if(F.properties.length!==0)return rZ(F.getStart(r),F.getEnd(),"code")}function b(F){if(!(F.kind===15&&F.text.length===0))return rZ(F.getStart(r),F.getEnd(),"code")}function T(F,j=19){return E(F,!1,!Rf(F.parent)&&!sa(F.parent),j)}function E(F,j=!1,U=!0,q=19,Q=q===19?20:24){const re=Hl(t,q,r),Y=Hl(t,Q,r);return re&&Y&&Che(re,Y,F,r,j,U)}function N(F){return F.length?aA(cx(F),"code"):void 0}function R(F){if(Kg(F.getStart(),F.getEnd(),r))return;const j=sd(F.getStart(),F.getEnd());return aA(j,"code",b_(F))}}function XBt(t,r,a){const u=ZBt(t,r,a),h=Hl(r,20,a);return u&&h&&Che(u,h,t,a,t.kind!==219)}function Che(t,r,a,u,h=!1,p=!0){const m=sd(p?t.getFullStart():t.getStart(u),r.getEnd());return aA(m,"code",b_(a,u),h)}function aA(t,r,a=t,u=!1,h="..."){return{textSpan:t,kind:r,hintSpan:a,bannerText:h,autoCollapse:u}}function ZBt(t,r,a){if(rke(t.parameters,a)){const u=Hl(t,21,a);if(u)return u}return Hl(r,19,a)}var sZ={};l(sZ,{getRenameInfo:()=>YBt,nodeIsEligibleForRename:()=>kat});function YBt(t,r,a,u){const h=WQ(j_(r,a));if(kat(h)){const p=eWt(h,t.getTypeChecker(),r,t,u);if(p)return p}return She(k.You_cannot_rename_this_element)}function eWt(t,r,a,u,h){const p=r.getSymbolAtLocation(t);if(!p){if(Ml(t)){const R=BQ(t,r);if(R&&(R.flags&128||R.flags&1048576&&Be(R.types,F=>!!(F.flags&128))))return S6e(t.text,t.text,"string","",t,a)}else if(Bue(t)){const R=yu(t);return S6e(R,R,"label","",t,a)}return}const{declarations:m}=p;if(!m||m.length===0)return;if(m.some(R=>tWt(u,R)))return She(k.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);if(lt(t)&&t.escapedText==="default"&&p.parent&&p.parent.flags&1536)return;if(Ml(t)&&SW(t))return h.allowRenameOfImportPath?nWt(t,a,p):void 0;const C=iWt(a,p,r,h);if(C)return She(C);const b=kS.getSymbolKind(r,p,t),T=XNe(t)||ug(t)&&t.parent.kind===167?Nm(Im(t)):void 0,E=T||r.symbolToString(p),N=T||r.getFullyQualifiedName(p);return S6e(E,N,b,kS.getSymbolModifiers(r,p),t,a)}function tWt(t,r){const a=r.getSourceFile();return t.isSourceFileDefaultLibrary(a)&&tu(a.fileName,".d.ts")}function iWt(t,r,a,u){if(!u.providePrefixAndSuffixTextForRename&&r.flags&2097152){const m=r.declarations&&Me(r.declarations,C=>m_(C));m&&!m.propertyName&&(r=a.getAliasedSymbol(r))}const{declarations:h}=r;if(!h)return;const p=xat(t.path);if(p===void 0)return Rt(h,m=>kH(m.getSourceFile().path))?k.You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder:void 0;for(const m of h){const C=xat(m.getSourceFile().path);if(C){const b=Math.min(p.length,C.length);for(let T=0;T<=b;T++)if(Xf(p[T],C[T])!==0)return k.You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder}}}function xat(t){const r=Qd(t),a=r.lastIndexOf("node_modules");if(a!==-1)return r.slice(0,a+2)}function nWt(t,r,a){if(!Zd(t.text))return She(k.You_cannot_rename_a_module_via_a_global_import);const u=a.declarations&&Me(a.declarations,Ns);if(!u)return;const h=mu(t.text,"/index")||mu(t.text,"/index.js")?void 0:nCe(h_(u.fileName),"/index"),p=h===void 0?u.fileName:h,m=h===void 0?"module":"directory",C=t.text.lastIndexOf("/")+1,b=Pf(t.getStart(r)+1+C,t.text.length-C);return{canRename:!0,fileToRename:p,kind:m,displayName:p,fullDisplayName:t.text,kindModifiers:"",triggerSpan:b}}function S6e(t,r,a,u,h,p){return{canRename:!0,fileToRename:void 0,kind:a,displayName:t,fullDisplayName:r,kindModifiers:u,triggerSpan:rWt(h,p)}}function She(t){return{canRename:!1,localizedErrorMessage:Po(t)}}function rWt(t,r){let a=t.getStart(r),u=t.getWidth(r);return Ml(t)&&(a+=1,u-=2),Pf(a,u)}function kat(t){switch(t.kind){case 80:case 81:case 11:case 15:case 110:return!0;case 9:return OQ(t);default:return!1}}var KH={};l(KH,{getArgumentInfoForCompletions:()=>cWt,getSignatureHelpItems:()=>sWt});function sWt(t,r,a,u,h){const p=t.getTypeChecker(),m=VQ(r,a);if(!m)return;const C=!!u&&u.kind==="characterTyped";if(C&&(JP(r,a,m)||bS(r,a)))return;const b=!!u&&u.kind==="invoked",T=SWt(m,a,r,p,b);if(!T)return;h.throwIfCancellationRequested();const E=oWt(T,p,r,m,C);return h.throwIfCancellationRequested(),E?p.runWithCancellationToken(h,N=>E.kind===0?Aat(E.candidates,E.resolvedSignature,T,r,N):xWt(E.symbol,T,r,N)):F_(r)?lWt(T,t,h):void 0}function oWt({invocation:t,argumentCount:r},a,u,h,p){switch(t.kind){case 0:{if(p&&!aWt(h,t.node,u))return;const m=[],C=a.getResolvedSignatureForSignatureHelp(t.node,m,r);return m.length===0?void 0:{kind:0,candidates:m,resolvedSignature:C}}case 1:{const{called:m}=t;if(p&&!Tat(h,u,lt(m)?m.parent:m))return;const C=Gue(m,r,a);if(C.length!==0)return{kind:0,candidates:C,resolvedSignature:ma(C)};const b=a.getSymbolAtLocation(m);return b&&{kind:1,symbol:b}}case 2:return{kind:0,candidates:[t.signature],resolvedSignature:t.signature};default:return z.assertNever(t)}}function aWt(t,r,a){if(!Dv(r))return!1;const u=r.getChildren(a);switch(t.kind){case 21:return Mt(u,t);case 28:{const h=FQ(t);return!!h&&Mt(u,h)}case 30:return Tat(t,a,r.expression);default:return!1}}function lWt(t,r,a){if(t.invocation.kind===2)return;const u=Lat(t.invocation),h=Ir(u)?u.name.text:void 0,p=r.getTypeChecker();return h===void 0?void 0:Z(r.getSourceFiles(),m=>Z(m.getNamedDeclarations().get(h),C=>{const b=C.symbol&&p.getTypeOfSymbolAtLocation(C.symbol,C),T=b&&b.getCallSignatures();if(T&&T.length)return p.runWithCancellationToken(a,E=>Aat(T,T[0],t,m,E,!0))}))}function Tat(t,r,a){const u=t.getFullStart();let h=t.parent;for(;h;){const p=Dd(u,r,h,!0);if(p)return yg(a,p);h=h.parent}return z.fail("Could not find preceding token")}function cWt(t,r,a,u){const h=Eat(t,r,a,u);return!h||h.isTypeParameterList||h.invocation.kind!==0?void 0:{invocation:h.invocation.node,argumentCount:h.argumentCount,argumentIndex:h.argumentIndex}}function Dat(t,r,a,u){const h=uWt(t,a,u);if(!h)return;const{list:p,argumentIndex:m}=h,C=vWt(u,p);m!==0&&z.assertLessThan(m,C);const b=bWt(p,a);return{list:p,argumentIndex:m,argumentCount:C,argumentsSpan:b}}function uWt(t,r,a){if(t.kind===30||t.kind===21)return{list:wWt(t.parent,t,r),argumentIndex:0};{const u=FQ(t);return u&&{list:u,argumentIndex:mWt(a,u,t)}}}function Eat(t,r,a,u){const{parent:h}=t;if(Dv(h)){const p=h,m=Dat(t,r,a,u);if(!m)return;const{list:C,argumentIndex:b,argumentCount:T,argumentsSpan:E}=m;return{isTypeParameterList:!!h.typeArguments&&h.typeArguments.pos===C.pos,invocation:{kind:0,node:p},argumentsSpan:E,argumentIndex:b,argumentCount:T}}else{if(bP(t)&&KT(h))return hH(t,r,a)?x6e(h,0,a):void 0;if(CP(t)&&h.parent.kind===215){const p=h,m=p.parent;z.assert(p.kind===228);const C=hH(t,r,a)?0:1;return x6e(m,C,a)}else if(m7(h)&&KT(h.parent.parent)){const p=h,m=h.parent.parent;if(MG(t)&&!hH(t,r,a))return;const C=p.parent.templateSpans.indexOf(p),b=yWt(C,t,r,a);return x6e(m,b,a)}else if(eh(h)){const p=h.attributes.pos,m=qa(a.text,h.attributes.end,!1);return{isTypeParameterList:!1,invocation:{kind:0,node:h},argumentsSpan:Pf(p,m-p),argumentIndex:0,argumentCount:1}}else{const p=Kue(t,a);if(p){const{called:m,nTypeArguments:C}=p,b={kind:1,called:m},T=sd(m.getStart(a),t.end);return{isTypeParameterList:!0,invocation:b,argumentsSpan:T,argumentIndex:C,argumentCount:C+1}}return}}}function dWt(t,r,a,u){return fWt(t,r,a,u)||Eat(t,r,a,u)}function Iat(t){return cr(t.parent)?Iat(t.parent):t}function w6e(t){return cr(t.left)?w6e(t.left)+1:2}function fWt(t,r,a,u){const h=hWt(t);if(h===void 0)return;const p=_Wt(h,a,r,u);if(p===void 0)return;const{contextualType:m,argumentIndex:C,argumentCount:b,argumentsSpan:T}=p,E=m.getNonNullableType(),N=E.symbol;if(N===void 0)return;const R=Ql(E.getCallSignatures());return R===void 0?void 0:{isTypeParameterList:!1,invocation:{kind:2,signature:R,node:t,symbol:pWt(N)},argumentsSpan:T,argumentIndex:C,argumentCount:b}}function hWt(t){switch(t.kind){case 21:case 28:return t;default:return Xi(t.parent,r=>Gs(r)?!0:nl(r)||pg(r)||mS(r)?!1:"quit")}}function _Wt(t,r,a,u){const{parent:h}=t;switch(h.kind){case 217:case 174:case 218:case 219:const p=Dat(t,a,r,u);if(!p)return;const{argumentIndex:m,argumentCount:C,argumentsSpan:b}=p,T=Au(h)?u.getContextualTypeForObjectLiteralElement(h):u.getContextualType(h);return T&&{contextualType:T,argumentIndex:m,argumentCount:C,argumentsSpan:b};case 226:{const E=Iat(h),N=u.getContextualType(E),R=t.kind===21?0:w6e(h)-1,F=w6e(E);return N&&{contextualType:N,argumentIndex:R,argumentCount:F,argumentsSpan:b_(h)}}default:return}}function pWt(t){return t.name==="__type"&&Z(t.declarations,r=>{var a;return W1(r)?(a=$r(r.parent,H0))==null?void 0:a.symbol:void 0})||t}function gWt(t,r){const a=r.getTypeAtLocation(t.expression);if(r.isTupleType(a)){const{elementFlags:u,fixedLength:h}=a.target;if(h===0)return 0;const p=Nt(u,m=>!(m&1));return p<0?h:p}return 0}function mWt(t,r,a){return Nat(t,r,a)}function vWt(t,r){return Nat(t,r,void 0)}function Nat(t,r,a){const u=r.getChildren();let h=0,p=!1;for(const m of u){if(a&&m===a)return!p&&m.kind===28&&h++,h;if(Zg(m)){h+=gWt(m,t),p=!0;continue}if(m.kind!==28){h++,p=!0;continue}if(p){p=!1;continue}h++}return a?h:u.length&&La(u).kind===28?h+1:h}function yWt(t,r,a,u){return z.assert(a>=r.getStart(),"Assumed 'position' could not occur before node."),swe(r)?hH(r,a,u)?0:t+2:t+1}function x6e(t,r,a){const u=bP(t.template)?1:t.template.templateSpans.length+1;return r!==0&&z.assertLessThan(r,u),{isTypeParameterList:!1,invocation:{kind:0,node:t},argumentsSpan:CWt(t,a),argumentIndex:r,argumentCount:u}}function bWt(t,r){const a=t.getFullStart(),u=qa(r.text,t.getEnd(),!1);return Pf(a,u-a)}function CWt(t,r){const a=t.template,u=a.getStart();let h=a.getEnd();return a.kind===228&&La(a.templateSpans).literal.getFullWidth()===0&&(h=qa(r.text,h,!1)),Pf(u,h-u)}function SWt(t,r,a,u,h){for(let p=t;!Ns(p)&&(h||!Ho(p));p=p.parent){z.assert(yg(p.parent,p),"Not a subspan",()=>`Child: ${z.formatSyntaxKind(p.kind)}, parent: ${z.formatSyntaxKind(p.parent.kind)}`);const m=dWt(p,r,a,u);if(m)return m}}function wWt(t,r,a){const u=t.getChildren(a),h=u.indexOf(r);return z.assert(h>=0&&u.length>h+1),u[h+1]}function Lat(t){return t.kind===0?gJ(t.node):t.called}function Pat(t){return t.kind===0?t.node:t.kind===1?t.called:t.node}var oZ=70246400;function Aat(t,r,{isTypeParameterList:a,argumentCount:u,argumentsSpan:h,invocation:p,argumentIndex:m},C,b,T){var E;const N=Pat(p),R=p.kind===2?p.symbol:b.getSymbolAtLocation(Lat(p))||T&&((E=r.declaration)==null?void 0:E.symbol),F=R?cF(b,R,T?C:void 0,void 0):x,j=Yt(t,Y=>TWt(Y,F,a,b,N,C));m!==0&&z.assertLessThan(m,u);let U=0,q=0;for(let Y=0;Y1)){let te=0;for(const Se of ue){if(Se.isVariadic||Se.parameters.length>=u){U=q+te;break}te++}}q+=ue.length}z.assert(U!==-1);const Q={items:bd(j,fc),applicableSpan:h,selectedItemIndex:U,argumentIndex:m,argumentCount:u},re=Q.items[U];if(re.isVariadic){const Y=Nt(re.parameters,ue=>!!ue.isRest);-1Mat(N,a,u,h,m)),b=t.getDocumentationComment(a),T=t.getJsDocTags(a);return{isVariadic:!1,prefixDisplayParts:[...p,bh(30)],suffixDisplayParts:[bh(32)],separatorDisplayParts:Oat,parameters:C,documentation:b,tags:T}}var Oat=[bh(28),ku()];function TWt(t,r,a,u,h,p){const m=(a?EWt:IWt)(t,u,h,p);return Yt(m,({isVariadic:C,parameters:b,prefix:T,suffix:E})=>{const N=[...r,...T],R=[...E,...DWt(t,h,u)],F=t.getDocumentationComment(u),j=t.getJsDocTags();return{isVariadic:C,prefixDisplayParts:N,suffixDisplayParts:R,separatorDisplayParts:Oat,parameters:b,documentation:F,tags:j}})}function DWt(t,r,a){return dx(u=>{u.writePunctuation(":"),u.writeSpace(" ");const h=a.getTypePredicateOfSignature(t);h?a.writeTypePredicate(h,r,void 0,u):a.writeType(a.getReturnTypeOfSignature(t),r,void 0,u)})}function EWt(t,r,a,u){const h=(t.target||t).typeParameters,p=DI(),m=(h||x).map(b=>Mat(b,r,a,u,p)),C=t.thisParameter?[r.symbolToParameterDeclaration(t.thisParameter,a,oZ)]:[];return r.getExpandedParameters(t).map(b=>{const T=G.createNodeArray([...C,...Yt(b,N=>r.symbolToParameterDeclaration(N,a,oZ))]),E=dx(N=>{p.writeList(2576,T,u,N)});return{isVariadic:!1,parameters:m,prefix:[bh(30)],suffix:[bh(32),...E]}})}function IWt(t,r,a,u){const h=DI(),p=dx(b=>{if(t.typeParameters&&t.typeParameters.length){const T=G.createNodeArray(t.typeParameters.map(E=>r.typeParameterToDeclaration(E,a,oZ)));h.writeList(53776,T,u,b)}}),m=r.getExpandedParameters(t),C=r.hasEffectiveRestParameter(t)?m.length===1?b=>!0:b=>{var T;return!!(b.length&&((T=$r(b[b.length-1],M1))==null?void 0:T.links.checkFlags)&32768)}:b=>!1;return m.map(b=>({isVariadic:C(b),parameters:b.map(T=>NWt(T,r,a,u,h)),prefix:[...p,bh(21)],suffix:[bh(22)]}))}function NWt(t,r,a,u,h){const p=dx(b=>{const T=r.symbolToParameterDeclaration(t,a,oZ);h.writeNode(4,T,u,b)}),m=r.isOptionalParameter(t.valueDeclaration),C=M1(t)&&!!(t.links.checkFlags&32768);return{name:t.name,documentation:t.getDocumentationComment(r),displayParts:p,isOptional:m,isRest:C}}function Mat(t,r,a,u,h){const p=dx(m=>{const C=r.typeParameterToDeclaration(t,a,oZ);h.writeNode(4,C,u,m)});return{name:t.symbol.name,documentation:t.symbol.getDocumentationComment(r),displayParts:p,isOptional:!1,isRest:!1}}var whe={};l(whe,{getSmartSelectionRange:()=>LWt});function LWt(t,r){var a,u;let h={textSpan:sd(r.getFullStart(),r.getEnd())},p=r;e:for(;;){const b=OWt(p);if(!b.length)break;for(let T=0;Tt)break e;const F=a_(Rw(r.text,N.end));if(F&&F.kind===2&&C(F.pos,F.end),PWt(r,t,N)){if(wse(N)&&rc(p)&&!Kg(N.getStart(r),N.getEnd(),r)&&m(N.getStart(r),N.getEnd()),Ho(N)||m7(N)||CP(N)||MG(N)||E&&CP(E)||wf(N)&&Ou(p)||d3(N)&&wf(p)||ds(N)&&d3(p)&&b.length===1||qk(N)||Qb(N)||bI(N)){p=N;break}if(m7(p)&&R&&F$(R)){const Q=N.getFullStart()-2,re=R.getStart()+1;m(Q,re)}const j=d3(N)&&MWt(E)&&RWt(R)&&!Kg(E.getStart(),R.getStart(),r);let U=j?E.getEnd():N.getStart();const q=j?R.getStart():FWt(r,N);if(Jp(N)&&((a=N.jsDoc)!=null&&a.length)&&m(ma(N.jsDoc).getStart(),q),d3(N)){const Q=N.getChildren()[0];Q&&Jp(Q)&&((u=Q.jsDoc)!=null&&u.length)&&Q.getStart()!==N.pos&&(U=Math.min(U,ma(Q.jsDoc).getStart()))}m(U,q),(ja(N)||VL(N))&&m(U+1,q-1),p=N;break}if(T===b.length-1)break e}}return h;function m(b,T){if(b!==T){const E=sd(b,T);(!h||!F3(E,h.textSpan)&&FSe(E,t))&&(h={textSpan:E,...h&&{parent:h}})}}function C(b,T){m(b,T);let E=b;for(;r.text.charCodeAt(E)===47;)E++;m(E,T)}}function PWt(t,r,a){return z.assert(a.pos<=r),rC===t.readonlyToken||C.kind===148||C===t.questionToken||C.kind===58),m=QH(p,({kind:C})=>C===23||C===168||C===24);return[a,XH(xhe(m,({kind:C})=>C===59)),h]}if(V_(t)){const a=QH(t.getChildren(),m=>m===t.name||Mt(t.modifiers,m)),u=((r=a[0])==null?void 0:r.kind)===320?a[0]:void 0,h=u?a.slice(1):a,p=xhe(h,({kind:m})=>m===59);return u?[u,XH(p)]:p}if(Gs(t)){const a=QH(t.getChildren(),h=>h===t.dotDotDotToken||h===t.name),u=QH(a,h=>h===a[0]||h===t.questionToken);return xhe(u,({kind:h})=>h===64)}return nl(t)?xhe(t.getChildren(),({kind:a})=>a===64):t.getChildren()}function QH(t,r){const a=[];let u;for(const h of t)r(h)?(u=u||[],u.push(h)):(u&&(a.push(XH(u)),u=void 0),a.push(h));return u&&a.push(XH(u)),a}function xhe(t,r,a=!0){if(t.length<2)return t;const u=Nt(t,r);if(u===-1)return t;const h=t.slice(0,u),p=t[u],m=La(t),C=a&&m.kind===27,b=t.slice(u+1,C?t.length-1:void 0),T=Mo([h.length?XH(h):void 0,p,b.length?XH(b):void 0]);return C?T.concat(m):T}function XH(t){return z.assertGreaterThanOrEqual(t.length,1),Bv(Gk.createSyntaxList(t),t[0].pos,La(t).end)}function MWt(t){const r=t&&t.kind;return r===19||r===23||r===21||r===286}function RWt(t){const r=t&&t.kind;return r===20||r===24||r===22||r===287}function FWt(t,r){switch(r.kind){case 341:case 338:case 348:case 346:case 343:return t.getLineEndOfPosition(r.getStart());default:return r.getEnd()}}var kS={};l(kS,{getSymbolDisplayPartsDocumentationAndSymbolKind:()=>WWt,getSymbolKind:()=>Fat,getSymbolModifiers:()=>BWt});var Rat=70246400;function Fat(t,r,a){const u=Bat(t,r,a);if(u!=="")return u;const h=K6(r);return h&32?Jc(r,231)?"local class":"class":h&384?"enum":h&524288?"type":h&64?"interface":h&262144?"type parameter":h&8?"enum member":h&2097152?"alias":h&1536?"module":u}function Bat(t,r,a){const u=t.getRootSymbols(r);if(u.length===1&&ma(u).flags&8192&&t.getTypeOfSymbolAtLocation(r,a).getNonNullableType().getCallSignatures().length!==0)return"method";if(t.isUndefinedSymbol(r))return"var";if(t.isArgumentsSymbol(r))return"local var";if(a.kind===110&&Ut(a)||BT(a))return"parameter";const h=K6(r);if(h&3)return gde(r)?"parameter":r.valueDeclaration&&L6(r.valueDeclaration)?"const":r.valueDeclaration&&nW(r.valueDeclaration)?"using":r.valueDeclaration&&iW(r.valueDeclaration)?"await using":W(r.declarations,oJ)?"let":Hat(r)?"local var":"var";if(h&16)return Hat(r)?"local function":"function";if(h&32768)return"getter";if(h&65536)return"setter";if(h&8192)return"method";if(h&16384)return"constructor";if(h&131072)return"index";if(h&4){if(h&33554432&&r.links.checkFlags&6){const p=W(t.getRootSymbols(r),m=>{if(m.getFlags()&98311)return"property"});return p||(t.getTypeOfSymbolAtLocation(r,a).getCallSignatures().length?"method":"property")}return"property"}return""}function Wat(t){if(t.declarations&&t.declarations.length){const[r,...a]=t.declarations,u=O(a)&&_X(r)&&Rt(a,p=>!_X(p))?65536:0,h=rF(r,u);if(h)return h.split(",")}return[]}function BWt(t,r){if(!r)return"";const a=new Set(Wat(r));if(r.flags&2097152){const u=t.getAliasedSymbol(r);u!==r&&W(Wat(u),h=>{a.add(h)})}return r.flags&16777216&&a.add("optional"),a.size>0?Fn(a.values()).join(","):""}function Vat(t,r,a,u,h,p,m,C){var b;const T=[];let E=[],N=[];const R=K6(r);let F=m&1?Bat(t,r,h):"",j=!1;const U=h.kind===110&&mJ(h)||BT(h);let q,Q,re=!1;if(h.kind===110&&!U)return{displayParts:[Ap(110)],documentation:[],symbolKind:"primitive type",tags:void 0};if(F!==""||R&32||R&2097152){if(F==="getter"||F==="setter"){const ke=Me(r.declarations,Fe=>Fe.name===h);if(ke)switch(ke.kind){case 177:F="getter";break;case 178:F="setter";break;case 172:F="accessor";break;default:z.assertNever(ke)}else F="property"}let ve;if(p??(p=U?t.getTypeAtLocation(h):t.getTypeOfSymbolAtLocation(r,h)),h.parent&&h.parent.kind===211){const ke=h.parent.name;(ke===h||ke&&ke.getFullWidth()===0)&&(h=h.parent)}let Ee;if(Dv(h)?Ee=h:(Oue(h)||iF(h)||h.parent&&(eh(h.parent)||KT(h.parent))&&Bo(r.valueDeclaration))&&(Ee=h.parent),Ee){ve=t.getResolvedSignature(Ee);const ke=Ee.kind===214||sa(Ee)&&Ee.expression.kind===108,Fe=ke?p.getConstructSignatures():p.getCallSignatures();if(ve&&!Mt(Fe,ve.target)&&!Mt(Fe,ve)&&(ve=Fe.length?Fe[0]:void 0),ve){switch(ke&&R&32?(F="constructor",pe(p.symbol,F)):R&2097152?(F="alias",ye(F),T.push(ku()),ke&&(ve.flags&4&&(T.push(Ap(128)),T.push(ku())),T.push(Ap(105)),T.push(ku())),oe(r)):pe(r,F),F){case"JSX attribute":case"property":case"var":case"const":case"let":case"parameter":case"local var":T.push(bh(59)),T.push(ku()),!(Rr(p)&16)&&p.symbol&&(un(T,cF(t,p.symbol,u,void 0,5)),T.push(B3())),ke&&(ve.flags&4&&(T.push(Ap(128)),T.push(ku())),T.push(Ap(105)),T.push(ku())),be(ve,Fe,262144);break;default:be(ve,Fe)}j=!0,re=Fe.length>1}}else if(jue(h)&&!(R&98304)||h.kind===137&&h.parent.kind===176){const ke=h.parent;if(r.declarations&&Me(r.declarations,Oe=>Oe===(h.kind===137?ke.parent:ke))){const Oe=ke.kind===176?p.getNonNullableType().getConstructSignatures():p.getNonNullableType().getCallSignatures();t.isImplementationOfOverload(ke)?ve=Oe[0]:ve=t.getSignatureFromDeclaration(ke),ke.kind===176?(F="constructor",pe(p.symbol,F)):pe(ke.kind===179&&!(p.symbol.flags&2048||p.symbol.flags&4096)?p.symbol:r,F),ve&&be(ve,Oe),j=!0,re=Oe.length>1}}}if(R&32&&!j&&!U&&(te(),Jc(r,231)?ye("local class"):T.push(Ap(86)),T.push(ku()),oe(r),_e(r,a)),R&64&&m&2&&(ue(),T.push(Ap(120)),T.push(ku()),oe(r),_e(r,a)),R&524288&&m&2&&(ue(),T.push(Ap(156)),T.push(ku()),oe(r),_e(r,a),T.push(ku()),T.push(lF(64)),T.push(ku()),un(T,yH(t,h.parent&&V0(h.parent)?t.getTypeAtLocation(h.parent):t.getDeclaredTypeOfSymbol(r),u,8388608))),R&384&&(ue(),Rt(r.declarations,ve=>Uk(ve)&&ET(ve))&&(T.push(Ap(87)),T.push(ku())),T.push(Ap(94)),T.push(ku()),oe(r)),R&1536&&!U){ue();const ve=Jc(r,267),Ee=ve&&ve.name&&ve.name.kind===80;T.push(Ap(Ee?145:144)),T.push(ku()),oe(r)}if(R&262144&&m&2)if(ue(),T.push(bh(21)),T.push(Cg("type parameter")),T.push(bh(22)),T.push(ku()),oe(r),r.parent)Se(),oe(r.parent,u),_e(r.parent,u);else{const ve=Jc(r,168);if(ve===void 0)return z.fail();const Ee=ve.parent;if(Ee)if(Bo(Ee)){Se();const ke=t.getSignatureFromDeclaration(Ee);Ee.kind===180?(T.push(Ap(105)),T.push(ku())):Ee.kind!==179&&Ee.name&&oe(Ee.symbol),un(T,yde(t,ke,a,32))}else Mm(Ee)&&(Se(),T.push(Ap(156)),T.push(ku()),oe(Ee.symbol),_e(Ee.symbol,a))}if(R&8){F="enum member",pe(r,"enum member");const ve=(b=r.declarations)==null?void 0:b[0];if((ve==null?void 0:ve.kind)===306){const Ee=t.getConstantValue(ve);Ee!==void 0&&(T.push(ku()),T.push(lF(64)),T.push(ku()),T.push(ip(Rwe(Ee),typeof Ee=="number"?7:8)))}}if(r.flags&2097152){if(ue(),!j||E.length===0&&N.length===0){const ve=t.getAliasedSymbol(r);if(ve!==r&&ve.declarations&&ve.declarations.length>0){const Ee=ve.declarations[0],ke=ko(Ee);if(ke&&!j){const Fe=iJ(Ee)&&Kr(Ee,128),Oe=r.name!=="default"&&!Fe,fe=Vat(t,ve,_n(Ee),u,ke,p,m,Oe?r:ve);T.push(...fe.displayParts),T.push(B3()),q=fe.documentation,Q=fe.tags}else q=ve.getContextualDocumentationComment(Ee,t),Q=ve.getJsDocTags(t)}}if(r.declarations)switch(r.declarations[0].kind){case 270:T.push(Ap(95)),T.push(ku()),T.push(Ap(145));break;case 277:T.push(Ap(95)),T.push(ku()),T.push(Ap(r.declarations[0].isExportEquals?64:90));break;case 281:T.push(Ap(95));break;default:T.push(Ap(102))}T.push(ku()),oe(r),W(r.declarations,ve=>{if(ve.kind===271){const Ee=ve;if(Lk(Ee))T.push(ku()),T.push(lF(64)),T.push(ku()),T.push(Ap(149)),T.push(bh(21)),T.push(ip(yu(C8(Ee)),8)),T.push(bh(22));else{const ke=t.getSymbolAtLocation(Ee.moduleReference);ke&&(T.push(ku()),T.push(lF(64)),T.push(ku()),oe(ke,u))}return!0}})}if(!j)if(F!==""){if(p){if(U?(ue(),T.push(Ap(110))):pe(r,F),F==="property"||F==="accessor"||F==="getter"||F==="setter"||F==="JSX attribute"||R&3||F==="local var"||F==="index"||F==="using"||F==="await using"||U){if(T.push(bh(59)),T.push(ku()),p.symbol&&p.symbol.flags&262144&&F!=="index"){const ve=dx(Ee=>{const ke=t.typeParameterToDeclaration(p,u,Rat);Y().writeNode(4,ke,_n(xo(u)),Ee)});un(T,ve)}else un(T,yH(t,p,u));if(M1(r)&&r.links.target&&M1(r.links.target)&&r.links.target.links.tupleLabelDeclaration){const ve=r.links.target.links.tupleLabelDeclaration;z.assertNode(ve.name,lt),T.push(ku()),T.push(bh(21)),T.push(Cg(dr(ve.name))),T.push(bh(22))}}else if(R&16||R&8192||R&16384||R&131072||R&98304||F==="method"){const ve=p.getNonNullableType().getCallSignatures();ve.length&&(be(ve[0],ve),re=ve.length>1)}}}else F=Fat(t,r,h);if(E.length===0&&!re&&(E=r.getContextualDocumentationComment(u,t)),E.length===0&&R&4&&r.parent&&r.declarations&&W(r.parent.declarations,ve=>ve.kind===307))for(const ve of r.declarations){if(!ve.parent||ve.parent.kind!==226)continue;const Ee=t.getSymbolAtLocation(ve.parent.right);if(Ee&&(E=Ee.getDocumentationComment(t),N=Ee.getJsDocTags(t),E.length>0))break}if(E.length===0&<(h)&&r.valueDeclaration&&nl(r.valueDeclaration)){const ve=r.valueDeclaration,Ee=ve.parent,ke=ve.propertyName||ve.name;if(lt(ke)&&pg(Ee)){const Fe=Im(ke),Oe=t.getTypeAtLocation(Ee);E=Z(Oe.isUnion()?Oe.types:[Oe],fe=>{const Ie=fe.getProperty(Fe);return Ie?Ie.getDocumentationComment(t):void 0})||x}}return N.length===0&&!re&&(N=r.getContextualJsDocTags(u,t)),E.length===0&&q&&(E=q),N.length===0&&Q&&(N=Q),{displayParts:T,documentation:E,symbolKind:F,tags:N.length===0?void 0:N};function Y(){return DI()}function ue(){T.length&&T.push(B3()),te()}function te(){C&&(ye("alias"),T.push(ku()))}function Se(){T.push(ku()),T.push(Ap(103)),T.push(ku())}function oe(ve,Ee){let ke;C&&ve===r&&(ve=C),F==="index"&&(ke=t.getIndexInfosOfIndexSymbol(ve));let Fe=[];ve.flags&131072&&ke?(ve.parent&&(Fe=cF(t,ve.parent)),Fe.push(bh(23)),ke.forEach((Oe,fe)=>{Fe.push(...yH(t,Oe.keyType)),fe!==ke.length-1&&(Fe.push(ku()),Fe.push(bh(52)),Fe.push(ku()))}),Fe.push(bh(24))):Fe=cF(t,ve,Ee||a,void 0,7),un(T,Fe),r.flags&16777216&&T.push(bh(58))}function pe(ve,Ee){ue(),Ee&&(ye(Ee),ve&&!Rt(ve.declarations,ke=>Dc(ke)||(gc(ke)||wd(ke))&&!ke.name)&&(T.push(ku()),oe(ve)))}function ye(ve){switch(ve){case"var":case"function":case"let":case"const":case"constructor":case"using":case"await using":T.push(mde(ve));return;default:T.push(bh(21)),T.push(mde(ve)),T.push(bh(22));return}}function be(ve,Ee,ke=0){un(T,yde(t,ve,u,ke|32)),Ee.length>1&&(T.push(ku()),T.push(bh(21)),T.push(lF(40)),T.push(ip((Ee.length-1).toString(),7)),T.push(ku()),T.push(Cg(Ee.length===2?"overload":"overloads")),T.push(bh(22))),E=ve.getDocumentationComment(t),N=ve.getJsDocTags(),Ee.length>1&&E.length===0&&N.length===0&&(E=Ee[0].getDocumentationComment(t),N=Ee[0].getJsDocTags().filter(Fe=>Fe.name!=="deprecated"))}function _e(ve,Ee){const ke=dx(Fe=>{const Oe=t.symbolToTypeParameterDeclarations(ve,Ee,Rat);Y().writeList(53776,Oe,_n(xo(Ee)),Fe)});un(T,ke)}}function WWt(t,r,a,u,h,p=EI(h),m){return Vat(t,r,a,u,h,void 0,p,m)}function Hat(t){return t.parent?!1:W(t.declarations,r=>{if(r.kind===218)return!0;if(r.kind!==260&&r.kind!==262)return!1;for(let a=r.parent;!IT(a);a=a.parent)if(a.kind===307||a.kind===268)return!1;return!0})}var er={};l(er,{ChangeTracker:()=>jWt,LeadingTriviaOption:()=>Uat,TrailingTriviaOption:()=>qat,applyChanges:()=>I6e,assignPositionsToNode:()=>Ehe,createWriter:()=>Jat,deleteNode:()=>tC,isThisTypeAnnotatable:()=>HWt,isValidLocationToAddComment:()=>Gat});function jat(t){const r=t.__pos;return z.assert(typeof r=="number"),r}function k6e(t,r){z.assert(typeof r=="number"),t.__pos=r}function zat(t){const r=t.__end;return z.assert(typeof r=="number"),r}function T6e(t,r){z.assert(typeof r=="number"),t.__end=r}var Uat=(t=>(t[t.Exclude=0]="Exclude",t[t.IncludeAll=1]="IncludeAll",t[t.JSDoc=2]="JSDoc",t[t.StartLine=3]="StartLine",t))(Uat||{}),qat=(t=>(t[t.Exclude=0]="Exclude",t[t.ExcludeWhitespace=1]="ExcludeWhitespace",t[t.Include=2]="Include",t))(qat||{});function $at(t,r){return qa(t,r,!1,!0)}function VWt(t,r){let a=r;for(;a0?1:0;let R=zw(M8(t,T)+N,t);return R=$at(t.text,R),zw(M8(t,R),t)}function D6e(t,r,a){const{end:u}=r,{trailingTriviaOption:h}=a;if(h===2){const p=Rw(t.text,u);if(p){const m=M8(t,r.end);for(const C of p){if(C.kind===2||M8(t,C.pos)>m)break;if(M8(t,C.end)>m)return qa(t.text,C.end,!0,!0)}}}}function Q3(t,r,a){var u;const{end:h}=r,{trailingTriviaOption:p}=a;if(p===0)return h;if(p===1){const b=no(Rw(t.text,h),Hy(t.text,h)),T=(u=b==null?void 0:b[b.length-1])==null?void 0:u.end;return T||h}const m=D6e(t,r,a);if(m)return m;const C=qa(t.text,h,!0);return C!==h&&(p===2||_h(t.text.charCodeAt(C-1)))?C:h}function khe(t,r){return!!r&&!!t.parent&&(r.kind===28||r.kind===27&&t.parent.kind===210)}function HWt(t){return gc(t)||Uu(t)}var jWt=class sHe{constructor(r,a){this.newLineCharacter=r,this.formatContext=a,this.changes=[],this.classesWithNodesInsertedAtStart=new Map,this.deletedNodes=[]}static fromContext(r){return new sHe(SS(r.host,r.formatContext.options),r.formatContext)}static with(r,a){const u=sHe.fromContext(r);return a(u),u.getChanges()}pushRaw(r,a){z.assertEqual(r.fileName,a.fileName);for(const u of a.textChanges)this.changes.push({kind:3,sourceFile:r,text:u.newText,range:qQ(u.span)})}deleteRange(r,a){this.changes.push({kind:0,sourceFile:r,range:a})}delete(r,a){this.deletedNodes.push({sourceFile:r,node:a})}deleteNode(r,a,u={leadingTriviaOption:1}){this.deleteRange(r,YH(r,a,a,u))}deleteNodes(r,a,u={leadingTriviaOption:1},h){for(const p of a){const m=OI(r,p,u,h),C=Q3(r,p,u);this.deleteRange(r,{pos:m,end:C}),h=!!D6e(r,p,u)}}deleteModifier(r,a){this.deleteRange(r,{pos:a.getStart(r),end:qa(r.text,a.end,!0)})}deleteNodeRange(r,a,u,h={leadingTriviaOption:1}){const p=OI(r,a,h),m=Q3(r,u,h);this.deleteRange(r,{pos:p,end:m})}deleteNodeRangeExcludingEnd(r,a,u,h={leadingTriviaOption:1}){const p=OI(r,a,h),m=u===void 0?r.text.length:OI(r,u,h);this.deleteRange(r,{pos:p,end:m})}replaceRange(r,a,u,h={}){this.changes.push({kind:1,sourceFile:r,range:a,options:h,node:u})}replaceNode(r,a,u,h=ZH){this.replaceRange(r,YH(r,a,a,h),u,h)}replaceNodeRange(r,a,u,h,p=ZH){this.replaceRange(r,YH(r,a,u,p),h,p)}replaceRangeWithNodes(r,a,u,h={}){this.changes.push({kind:2,sourceFile:r,range:a,options:h,nodes:u})}replaceNodeWithNodes(r,a,u,h=ZH){this.replaceRangeWithNodes(r,YH(r,a,a,h),u,h)}replaceNodeWithText(r,a,u){this.replaceRangeWithText(r,YH(r,a,a,ZH),u)}replaceNodeRangeWithNodes(r,a,u,h,p=ZH){this.replaceRangeWithNodes(r,YH(r,a,u,p),h,p)}nodeHasTrailingComment(r,a,u=ZH){return!!D6e(r,a,u)}nextCommaToken(r,a){const u=aD(a,a.parent,r);return u&&u.kind===28?u:void 0}replacePropertyAssignment(r,a,u){const h=this.nextCommaToken(r,a)?"":","+this.newLineCharacter;this.replaceNode(r,a,u,{suffix:h})}insertNodeAt(r,a,u,h={}){this.replaceRange(r,Gg(a),u,h)}insertNodesAt(r,a,u,h={}){this.replaceRangeWithNodes(r,Gg(a),u,h)}insertNodeAtTopOfFile(r,a,u){this.insertAtTopOfFile(r,a,u)}insertNodesAtTopOfFile(r,a,u){this.insertAtTopOfFile(r,a,u)}insertAtTopOfFile(r,a,u){const h=QWt(r),p={prefix:h===0?void 0:this.newLineCharacter,suffix:(_h(r.text.charCodeAt(h))?"":this.newLineCharacter)+(u?this.newLineCharacter:"")};Lo(a)?this.insertNodesAt(r,h,a,p):this.insertNodeAt(r,h,a,p)}insertNodesAtEndOfFile(r,a,u){this.insertAtEndOfFile(r,a,u)}insertAtEndOfFile(r,a,u){const h=r.end+1,p={prefix:this.newLineCharacter,suffix:this.newLineCharacter+(u?this.newLineCharacter:"")};this.insertNodesAt(r,h,a,p)}insertStatementsInNewFile(r,a,u){this.newFileChanges||(this.newFileChanges=Ug()),this.newFileChanges.add(r,{oldFile:u,statements:a})}insertFirstParameter(r,a,u){const h=lu(a);h?this.insertNodeBefore(r,h,u):this.insertNodeAt(r,a.pos,u)}insertNodeBefore(r,a,u,h=!1,p={}){this.insertNodeAt(r,OI(r,a,p),u,this.getOptionsForInsertNodeBefore(a,u,h))}insertNodesBefore(r,a,u,h=!1,p={}){this.insertNodesAt(r,OI(r,a,p),u,this.getOptionsForInsertNodeBefore(a,ma(u),h))}insertModifierAt(r,a,u,h={}){this.insertNodeAt(r,a,G.createToken(u),h)}insertModifierBefore(r,a,u){return this.insertModifierAt(r,u.getStart(r),a,{suffix:" "})}insertCommentBeforeLine(r,a,u,h){const p=zw(a,r),m=YNe(r.text,p),C=Gat(r,m),b=O3(r,C?m:u),T=r.text.slice(p,m),E=`${C?"":this.newLineCharacter}//${h}${this.newLineCharacter}${T}`;this.insertText(r,b.getStart(r),E)}insertJsdocCommentBefore(r,a,u){const h=a.getStart(r);if(a.jsDoc)for(const C of a.jsDoc)this.deleteRange(r,{pos:Bm(C.getStart(r),r),end:Q3(r,C,{})});const p=eX(r.text,h-1),m=r.text.slice(p,h);this.insertNodeAt(r,h,u,{suffix:this.newLineCharacter+m})}createJSDocText(r,a){const u=Ln(a.jsDoc,p=>mo(p.comment)?G.createJSDocText(p.comment):p.comment),h=a_(a.jsDoc);return h&&Kg(h.pos,h.end,r)&&O(u)===0?void 0:G.createNodeArray(Te(u,G.createJSDocText(` +`)))}replaceJSDocComment(r,a,u){this.insertJsdocCommentBefore(r,zWt(a),G.createJSDocComment(this.createJSDocText(r,a),G.createNodeArray(u)))}addJSDocTags(r,a,u){const h=bd(a.jsDoc,m=>m.tags),p=u.filter(m=>!h.some((C,b)=>{const T=UWt(C,m);return T&&(h[b]=T),!!T}));this.replaceJSDocComment(r,a,[...h,...p])}filterJSDocTags(r,a,u){this.replaceJSDocComment(r,a,Ri(bd(a.jsDoc,h=>h.tags),u))}replaceRangeWithText(r,a,u){this.changes.push({kind:3,sourceFile:r,range:a,text:u})}insertText(r,a,u){this.replaceRangeWithText(r,Gg(a),u)}tryInsertTypeAnnotation(r,a,u){let h;if(Bo(a)){if(h=Hl(a,22,r),!h){if(!Dc(a))return!1;h=ma(a.parameters)}}else h=(a.kind===260?a.exclamationToken:a.questionToken)??a.name;return this.insertNodeAt(r,h.end,u,{prefix:": "}),!0}tryInsertThisTypeAnnotation(r,a,u){const h=Hl(a,21,r).getStart(r)+1,p=a.parameters.length?", ":"";this.insertNodeAt(r,h,u,{prefix:"this: ",suffix:p})}insertTypeParameters(r,a,u){const h=(Hl(a,21,r)||ma(a.parameters)).getStart(r);this.insertNodesAt(r,h,u,{prefix:"<",suffix:">",joiner:", "})}getOptionsForInsertNodeBefore(r,a,u){return Es(r)||Vd(r)?{suffix:u?this.newLineCharacter+this.newLineCharacter:this.newLineCharacter}:ds(r)?{suffix:", "}:Gs(r)?Gs(a)?{suffix:", "}:{}:ja(r)&&Cu(r.parent)||zv(r)?{suffix:", "}:m_(r)?{suffix:","+(u?this.newLineCharacter:" ")}:z.failBadSyntaxKind(r)}insertNodeAtConstructorStart(r,a,u){const h=lu(a.body.statements);!h||!a.body.multiLine?this.replaceConstructorBody(r,a,[u,...a.body.statements]):this.insertNodeBefore(r,h,u)}insertNodeAtConstructorStartAfterSuperCall(r,a,u){const h=Me(a.body.statements,p=>_f(p)&&rI(p.expression));!h||!a.body.multiLine?this.replaceConstructorBody(r,a,[...a.body.statements,u]):this.insertNodeAfter(r,h,u)}insertNodeAtConstructorEnd(r,a,u){const h=Ql(a.body.statements);!h||!a.body.multiLine?this.replaceConstructorBody(r,a,[...a.body.statements,u]):this.insertNodeAfter(r,h,u)}replaceConstructorBody(r,a,u){this.replaceNode(r,a.body,G.createBlock(u,!0))}insertNodeAtEndOfScope(r,a,u){const h=OI(r,a.getLastToken(),{});this.insertNodeAt(r,h,u,{prefix:_h(r.text.charCodeAt(a.getLastToken().pos))?this.newLineCharacter:this.newLineCharacter+this.newLineCharacter,suffix:this.newLineCharacter})}insertMemberAtStart(r,a,u){this.insertNodeAtStartWorker(r,a,u)}insertNodeAtObjectStart(r,a,u){this.insertNodeAtStartWorker(r,a,u)}insertNodeAtStartWorker(r,a,u){const h=this.guessIndentationFromExistingMembers(r,a)??this.computeIndentationForNewMember(r,a);this.insertNodeAt(r,The(a).pos,u,this.getInsertNodeAtStartInsertOptions(r,a,h))}guessIndentationFromExistingMembers(r,a){let u,h=a;for(const p of The(a)){if($J(h,p,r))return;const m=p.getStart(r),C=gd.SmartIndenter.findFirstNonWhitespaceColumn(Bm(m,r),m,r,this.formatContext.options);if(u===void 0)u=C;else if(C!==u)return;h=p}return u}computeIndentationForNewMember(r,a){const u=a.getStart(r);return gd.SmartIndenter.findFirstNonWhitespaceColumn(Bm(u,r),u,r,this.formatContext.options)+(this.formatContext.options.indentSize??4)}getInsertNodeAtStartInsertOptions(r,a,u){const p=The(a).length===0,m=Lm(this.classesWithNodesInsertedAtStart,Tl(a),{node:a,sourceFile:r}),C=Pa(a)&&(!Dm(r)||!p),b=Pa(a)&&Dm(r)&&p&&!m;return{indentation:u,prefix:(b?",":"")+this.newLineCharacter,suffix:C?",":Ff(a)&&p?";":""}}insertNodeAfterComma(r,a,u){const h=this.insertNodeAfterWorker(r,this.nextCommaToken(r,a)||a,u);this.insertNodeAt(r,h,u,this.getInsertNodeAfterOptions(r,a))}insertNodeAfter(r,a,u){const h=this.insertNodeAfterWorker(r,a,u);this.insertNodeAt(r,h,u,this.getInsertNodeAfterOptions(r,a))}insertNodeAtEndOfList(r,a,u){this.insertNodeAt(r,a.end,u,{prefix:", "})}insertNodesAfter(r,a,u){const h=this.insertNodeAfterWorker(r,a,ma(u));this.insertNodesAt(r,h,u,this.getInsertNodeAfterOptions(r,a))}insertNodeAfterWorker(r,a,u){return XWt(a,u)&&r.text.charCodeAt(a.end-1)!==59&&this.replaceRange(r,Gg(a.end),G.createToken(27)),Q3(r,a,{})}getInsertNodeAfterOptions(r,a){const u=this.getInsertNodeAfterOptionsWorker(a);return{...u,prefix:a.end===r.end&&Es(a)?u.prefix?` +${u.prefix}`:` +`:u.prefix}}getInsertNodeAfterOptionsWorker(r){switch(r.kind){case 263:case 267:return{prefix:this.newLineCharacter,suffix:this.newLineCharacter};case 260:case 11:case 80:return{prefix:", "};case 303:return{suffix:","+this.newLineCharacter};case 95:return{prefix:" "};case 169:return{};default:return z.assert(Es(r)||B$(r)),{suffix:this.newLineCharacter}}}insertName(r,a,u){if(z.assert(!a.name),a.kind===219){const h=Hl(a,39,r),p=Hl(a,21,r);p?(this.insertNodesAt(r,p.getStart(r),[G.createToken(100),G.createIdentifier(u)],{joiner:" "}),tC(this,r,h)):(this.insertText(r,ma(a.parameters).getStart(r),`function ${u}(`),this.replaceRange(r,h,G.createToken(22))),a.body.kind!==241&&(this.insertNodesAt(r,a.body.getStart(r),[G.createToken(19),G.createToken(107)],{joiner:" ",suffix:" "}),this.insertNodesAt(r,a.body.end,[G.createToken(27),G.createToken(20)],{joiner:" "}))}else{const h=Hl(a,a.kind===218?100:86,r).end;this.insertNodeAt(r,h,G.createIdentifier(u),{prefix:" "})}}insertExportModifier(r,a){this.insertText(r,a.getStart(r),"export ")}insertImportSpecifierAtIndex(r,a,u,h){const p=u.elements[h-1];p?this.insertNodeInListAfter(r,p,a):this.insertNodeBefore(r,u.elements[0],a,!Kg(u.elements[0].getStart(),u.parent.parent.getStart(),r))}insertNodeInListAfter(r,a,u,h=gd.SmartIndenter.getContainingList(a,r)){if(!h){z.fail("node is not a list element");return}const p=I6(h,a);if(p<0)return;const m=a.getEnd();if(p!==h.length-1){const C=Rs(r,a.end);if(C&&khe(a,C)){const b=h[p+1],T=$at(r.text,b.getFullStart()),E=`${Ta(C.kind)}${r.text.substring(C.end,T)}`;this.insertNodesAt(r,T,[u],{suffix:E})}}else{const C=a.getStart(r),b=Bm(C,r);let T,E=!1;if(h.length===1)T=28;else{const N=Dd(a.pos,r);T=khe(a,N)?N.kind:28,E=Bm(h[p-1].getStart(r),r)!==b}if((VWt(r.text,a.end)||!Kg(h.pos,h.end,r))&&(E=!0),E){this.replaceRange(r,Gg(m),G.createToken(T));const N=gd.SmartIndenter.findFirstNonWhitespaceColumn(b,C,r,this.formatContext.options);let R=qa(r.text,m,!0,!1);for(;R!==m&&_h(r.text.charCodeAt(R-1));)R--;this.replaceRange(r,Gg(R),u,{indentation:N,prefix:this.newLineCharacter})}else this.replaceRange(r,Gg(m),u,{prefix:`${Ta(T)} `})}}parenthesizeExpression(r,a){this.replaceRange(r,oae(a),G.createParenthesizedExpression(a))}finishClassesWithNodesInsertedAtStart(){this.classesWithNodesInsertedAtStart.forEach(({node:r,sourceFile:a})=>{const[u,h]=$Wt(r,a);if(u!==void 0&&h!==void 0){const p=The(r).length===0,m=Kg(u,h,a);p&&m&&u!==h-1&&this.deleteRange(a,Gg(u,h-1)),m&&this.insertText(a,h-1,this.newLineCharacter)}})}finishDeleteDeclarations(){const r=new Set;for(const{sourceFile:a,node:u}of this.deletedNodes)this.deletedNodes.some(h=>h.sourceFile===a&&kNe(h.node,u))||(Lo(u)?this.deleteRange(a,aae(a,u)):N6e.deleteDeclaration(this,r,a,u));r.forEach(a=>{const u=a.getSourceFile(),h=gd.SmartIndenter.getContainingList(a,u);if(a!==La(h))return;const p=Ni(h,m=>!r.has(m),h.length-2);p!==-1&&this.deleteRange(u,{pos:h[p].end,end:E6e(u,h[p+1])})})}getChanges(r){this.finishDeleteDeclarations(),this.finishClassesWithNodesInsertedAtStart();const a=Dhe.getTextChangesFromChanges(this.changes,this.newLineCharacter,this.formatContext,r);return this.newFileChanges&&this.newFileChanges.forEach((u,h)=>{a.push(Dhe.newFileChanges(h,u,this.newLineCharacter,this.formatContext))}),a}createNewFile(r,a,u){this.insertStatementsInNewFile(a,u,r)}};function zWt(t){if(t.kind!==219)return t;const r=t.parent.kind===172?t.parent:t.parent.parent;return r.jsDoc=t.jsDoc,r}function UWt(t,r){if(t.kind===r.kind)switch(t.kind){case 341:{const a=t,u=r;return lt(a.name)&<(u.name)&&a.name.escapedText===u.name.escapedText?G.createJSDocParameterTag(void 0,u.name,!1,u.typeExpression,u.isNameFirst,a.comment):void 0}case 342:return G.createJSDocReturnTag(void 0,r.typeExpression,t.comment);case 344:return G.createJSDocTypeTag(void 0,r.typeExpression,t.comment)}}function E6e(t,r){return qa(t.text,OI(t,r,{leadingTriviaOption:1}),!1,!0)}function qWt(t,r,a,u){const h=E6e(t,u);if(a===void 0||Kg(Q3(t,r,{}),h,t))return h;const p=Dd(u.getStart(t),t);if(khe(r,p)){const m=Dd(r.getStart(t),t);if(khe(a,m)){const C=qa(t.text,p.getEnd(),!0,!0);if(Kg(m.getStart(t),p.getStart(t),t))return _h(t.text.charCodeAt(C-1))?C-1:C;if(_h(t.text.charCodeAt(C)))return C}}return h}function $Wt(t,r){const a=Hl(t,19,r),u=Hl(t,20,r);return[a==null?void 0:a.end,u==null?void 0:u.end]}function The(t){return Pa(t)?t.properties:t.members}var Dhe;(t=>{function r(C,b,T,E){return ns(xv(C,N=>N.sourceFile.path),N=>{const R=N[0].sourceFile,F=$p(N,(U,q)=>U.range.pos-q.range.pos||U.range.end-q.range.end);for(let U=0;U`${JSON.stringify(F[U].range)} and ${JSON.stringify(F[U+1].range)}`);const j=ns(F,U=>{const q=cx(U.range),Q=U.kind===1?_n(uu(U.node))??U.sourceFile:U.kind===2?_n(uu(U.nodes[0]))??U.sourceFile:U.sourceFile,re=h(U,Q,R,b,T,E);if(!(q.length===re.length&&dLe(Q.text,re,q.start)))return _H(q,re)});return j.length>0?{fileName:R.fileName,textChanges:j}:void 0})}t.getTextChangesFromChanges=r;function a(C,b,T,E){const N=u(fG(C),b,T,E);return{fileName:C,textChanges:[_H(Pf(0,0),N)],isNewFile:!0}}t.newFileChanges=a;function u(C,b,T,E){const N=Ln(b,j=>j.statements.map(U=>U===4?"":m(U,j.oldFile,T).text)).join(T),R=RP("any file name",N,{languageVersion:99,jsDocParsingMode:1},!0,C),F=gd.formatDocument(R,E);return I6e(N,F)+T}t.newFileChangesWorker=u;function h(C,b,T,E,N,R){var F;if(C.kind===0)return"";if(C.kind===3)return C.text;const{options:j={},range:{pos:U}}=C,q=Y=>p(Y,b,T,U,j,E,N,R),Q=C.kind===2?C.nodes.map(Y=>h6(q(Y),E)).join(((F=C.options)==null?void 0:F.joiner)||E):q(C.node),re=j.indentation!==void 0||Bm(U,b)===U?Q:Q.replace(/^\s+/,"");return(j.prefix||"")+re+(!j.suffix||mu(re,j.suffix)?"":j.suffix)}function p(C,b,T,E,{indentation:N,prefix:R,delta:F},j,U,q){const{node:Q,text:re}=m(C,b,j);q&&q(Q,re);const Y=gX(U,b),ue=N!==void 0?N:gd.SmartIndenter.getIndentation(E,T,Y,R===j||Bm(E,b)===E);F===void 0&&(F=gd.SmartIndenter.shouldIndentChildNode(Y,C)&&Y.indentSize||0);const te={text:re,getLineAndCharacterOfPosition(oe){return Da(this,oe)}},Se=gd.formatNodeGivenIndentation(Q,te,b.languageVariant,ue,F,{...U,options:Y});return I6e(re,Se)}function m(C,b,T){const E=Jat(T),N=DH(T);return ax({newLine:N,neverAsciiEscape:!0,preserveSourceNewlines:!0,terminateUnterminatedLiterals:!0},E).writeNode(4,C,b,E),{text:E.getText(),node:Ehe(C)}}t.getNonformattedText=m})(Dhe||(Dhe={}));function I6e(t,r){for(let a=r.length-1;a>=0;a--){const{span:u,newText:h}=r[a];t=`${t.substring(0,u.start)}${h}${t.substring(zu(u))}`}return t}function JWt(t){return qa(t,0)===t.length}var GWt={...UV,factory:iV(UV.factory.flags|1,UV.factory.baseFactory)};function Ehe(t){const r=cn(t,Ehe,GWt,KWt,Ehe),a=oc(r)?r:Object.create(r);return Bv(a,jat(t),zat(t)),a}function KWt(t,r,a,u,h){const p=wn(t,r,a,u,h);if(!p)return p;z.assert(t);const m=p===t?G.createNodeArray(p.slice(0)):p;return Bv(m,jat(t),zat(t)),m}function Jat(t){let r=0;const a=RW(t),u=fe=>{fe&&k6e(fe,r)},h=fe=>{fe&&T6e(fe,r)},p=fe=>{fe&&k6e(fe,r)},m=fe=>{fe&&T6e(fe,r)},C=fe=>{fe&&k6e(fe,r)},b=fe=>{fe&&T6e(fe,r)};function T(fe,Ie){if(Ie||!JWt(fe)){r=a.getTextPos();let Le=0;for(;Vy(fe.charCodeAt(fe.length-Le-1));)Le++;r-=Le}}function E(fe){a.write(fe),T(fe,!1)}function N(fe){a.writeComment(fe)}function R(fe){a.writeKeyword(fe),T(fe,!1)}function F(fe){a.writeOperator(fe),T(fe,!1)}function j(fe){a.writePunctuation(fe),T(fe,!1)}function U(fe){a.writeTrailingSemicolon(fe),T(fe,!1)}function q(fe){a.writeParameter(fe),T(fe,!1)}function Q(fe){a.writeProperty(fe),T(fe,!1)}function re(fe){a.writeSpace(fe),T(fe,!1)}function Y(fe){a.writeStringLiteral(fe),T(fe,!1)}function ue(fe,Ie){a.writeSymbol(fe,Ie),T(fe,!1)}function te(fe){a.writeLine(fe)}function Se(){a.increaseIndent()}function oe(){a.decreaseIndent()}function pe(){return a.getText()}function ye(fe){a.rawWrite(fe),T(fe,!1)}function be(fe){a.writeLiteral(fe),T(fe,!0)}function _e(){return a.getTextPos()}function ve(){return a.getLine()}function Ee(){return a.getColumn()}function ke(){return a.getIndent()}function Fe(){return a.isAtStartOfLine()}function Oe(){a.clear(),r=0}return{onBeforeEmitNode:u,onAfterEmitNode:h,onBeforeEmitNodeArray:p,onAfterEmitNodeArray:m,onBeforeEmitToken:C,onAfterEmitToken:b,write:E,writeComment:N,writeKeyword:R,writeOperator:F,writePunctuation:j,writeTrailingSemicolon:U,writeParameter:q,writeProperty:Q,writeSpace:re,writeStringLiteral:Y,writeSymbol:ue,writeLine:te,increaseIndent:Se,decreaseIndent:oe,getText:pe,rawWrite:ye,writeLiteral:be,getTextPos:_e,getLine:ve,getColumn:Ee,getIndent:ke,isAtStartOfLine:Fe,hasTrailingComment:()=>a.hasTrailingComment(),hasTrailingWhitespace:()=>a.hasTrailingWhitespace(),clear:Oe}}function QWt(t){let r;for(const T of t.statements)if(Nv(T))r=T;else break;let a=0;const u=t.text;if(r)return a=r.end,b(),a;const h=D$(u);h!==void 0&&(a=h.length,b());const p=Hy(u,a);if(!p)return a;let m,C;for(const T of p){if(T.kind===3){if(eJ(u,T.pos)){m={range:T,pinnedOrTripleSlash:!0};continue}}else if(Pse(u,T.pos,T.end)){m={range:T,pinnedOrTripleSlash:!0};continue}if(m){if(m.pinnedOrTripleSlash)break;const E=t.getLineAndCharacterOfPosition(T.pos).line,N=t.getLineAndCharacterOfPosition(m.range.end).line;if(E>=N+2)break}if(t.statements.length){C===void 0&&(C=t.getLineAndCharacterOfPosition(t.statements[0].getStart()).line);const E=t.getLineAndCharacterOfPosition(T.end).line;if(C{function r(p,m,C,b){switch(b.kind){case 169:{const F=b.parent;Dc(F)&&F.parameters.length===1&&!Hl(F,21,C)?p.replaceNodeWithText(C,b,"()"):ej(p,m,C,b);break}case 272:case 271:const T=C.imports.length&&b===ma(C.imports).parent||b===Me(C.statements,zL);tC(p,C,b,{leadingTriviaOption:T?0:Jp(b)?2:3});break;case 208:const E=b.parent;E.kind===207&&b!==La(E.elements)?tC(p,C,b):ej(p,m,C,b);break;case 260:h(p,m,C,b);break;case 168:ej(p,m,C,b);break;case 276:const R=b.parent;R.elements.length===1?u(p,C,R):ej(p,m,C,b);break;case 274:u(p,C,b);break;case 27:tC(p,C,b,{trailingTriviaOption:0});break;case 100:tC(p,C,b,{leadingTriviaOption:0});break;case 263:case 262:tC(p,C,b,{leadingTriviaOption:Jp(b)?2:3});break;default:b.parent?$0(b.parent)&&b.parent.name===b?a(p,C,b.parent):sa(b.parent)&&Mt(b.parent.arguments,b)?ej(p,m,C,b):tC(p,C,b):tC(p,C,b)}}t.deleteDeclaration=r;function a(p,m,C){if(!C.namedBindings)tC(p,m,C.parent);else{const b=C.name.getStart(m),T=Rs(m,C.name.end);if(T&&T.kind===28){const E=qa(m.text,T.end,!1,!0);p.deleteRange(m,{pos:b,end:E})}else tC(p,m,C.name)}}function u(p,m,C){if(C.parent.name){const b=z.checkDefined(Rs(m,C.pos-1));p.deleteRange(m,{pos:b.getStart(m),end:C.end})}else{const b=Rk(C,272);tC(p,m,b)}}function h(p,m,C,b){const{parent:T}=b;if(T.kind===299){p.deleteNodeRange(C,Hl(T,21,C),Hl(T,22,C));return}if(T.declarations.length!==1){ej(p,m,C,b);return}const E=T.parent;switch(E.kind){case 250:case 249:p.replaceNode(C,b,G.createObjectLiteralExpression());break;case 248:tC(p,C,T);break;case 243:tC(p,C,E,{leadingTriviaOption:Jp(E)?2:3});break;default:z.assertNever(E)}}})(N6e||(N6e={}));function tC(t,r,a,u={leadingTriviaOption:1}){const h=OI(r,a,u),p=Q3(r,a,u);t.deleteRange(r,{pos:h,end:p})}function ej(t,r,a,u){const h=z.checkDefined(gd.SmartIndenter.getContainingList(u,a)),p=I6(h,u);if(z.assert(p!==-1),h.length===1){tC(t,a,u);return}z.assert(!r.has(u),"Deleting a node twice"),r.add(u),t.deleteRange(a,{pos:E6e(a,u),end:p===h.length-1?Q3(a,u,{}):qWt(a,u,h[p-1],h[p+1])})}var gd={};l(gd,{FormattingContext:()=>Qat,FormattingRequestKind:()=>Kat,RuleAction:()=>Xat,RuleFlags:()=>Zat,SmartIndenter:()=>Qv,anyContext:()=>Ihe,createTextRangeWithKind:()=>Ahe,formatDocument:()=>jVt,formatNodeGivenIndentation:()=>KVt,formatOnClosingCurly:()=>HVt,formatOnEnter:()=>BVt,formatOnOpeningCurly:()=>VVt,formatOnSemicolon:()=>WVt,formatSelection:()=>zVt,getAllRules:()=>Yat,getFormatContext:()=>NVt,getFormattingScanner:()=>L6e,getIndentationString:()=>q6e,getRangeOfEnclosingComment:()=>xlt});var Kat=(t=>(t[t.FormatDocument=0]="FormatDocument",t[t.FormatSelection=1]="FormatSelection",t[t.FormatOnEnter=2]="FormatOnEnter",t[t.FormatOnSemicolon=3]="FormatOnSemicolon",t[t.FormatOnOpeningCurlyBrace=4]="FormatOnOpeningCurlyBrace",t[t.FormatOnClosingCurlyBrace=5]="FormatOnClosingCurlyBrace",t))(Kat||{}),Qat=class{constructor(t,r,a){this.sourceFile=t,this.formattingRequestKind=r,this.options=a}updateContext(t,r,a,u,h){this.currentTokenSpan=z.checkDefined(t),this.currentTokenParent=z.checkDefined(r),this.nextTokenSpan=z.checkDefined(a),this.nextTokenParent=z.checkDefined(u),this.contextNode=z.checkDefined(h),this.contextNodeAllOnSameLine=void 0,this.nextNodeAllOnSameLine=void 0,this.tokensAreOnSameLine=void 0,this.contextNodeBlockIsOnOneLine=void 0,this.nextNodeBlockIsOnOneLine=void 0}ContextNodeAllOnSameLine(){return this.contextNodeAllOnSameLine===void 0&&(this.contextNodeAllOnSameLine=this.NodeIsOnOneLine(this.contextNode)),this.contextNodeAllOnSameLine}NextNodeAllOnSameLine(){return this.nextNodeAllOnSameLine===void 0&&(this.nextNodeAllOnSameLine=this.NodeIsOnOneLine(this.nextTokenParent)),this.nextNodeAllOnSameLine}TokensAreOnSameLine(){if(this.tokensAreOnSameLine===void 0){const t=this.sourceFile.getLineAndCharacterOfPosition(this.currentTokenSpan.pos).line,r=this.sourceFile.getLineAndCharacterOfPosition(this.nextTokenSpan.pos).line;this.tokensAreOnSameLine=t===r}return this.tokensAreOnSameLine}ContextNodeBlockIsOnOneLine(){return this.contextNodeBlockIsOnOneLine===void 0&&(this.contextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.contextNode)),this.contextNodeBlockIsOnOneLine}NextNodeBlockIsOnOneLine(){return this.nextNodeBlockIsOnOneLine===void 0&&(this.nextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.nextTokenParent)),this.nextNodeBlockIsOnOneLine}NodeIsOnOneLine(t){const r=this.sourceFile.getLineAndCharacterOfPosition(t.getStart(this.sourceFile)).line,a=this.sourceFile.getLineAndCharacterOfPosition(t.getEnd()).line;return r===a}BlockIsOnOneLine(t){const r=Hl(t,19,this.sourceFile),a=Hl(t,20,this.sourceFile);if(r&&a){const u=this.sourceFile.getLineAndCharacterOfPosition(r.getEnd()).line,h=this.sourceFile.getLineAndCharacterOfPosition(a.getStart(this.sourceFile)).line;return u===h}return!1}},ZWt=zy(99,!1,0),YWt=zy(99,!1,1);function L6e(t,r,a,u,h){const p=r===1?YWt:ZWt;p.setText(t),p.resetTokenState(a);let m=!0,C,b,T,E,N;const R=h({advance:F,readTokenInfo:te,readEOFTokenRange:oe,isOnToken:pe,isOnEOF:ye,getCurrentLeadingTrivia:()=>C,lastTrailingTriviaWasNewLine:()=>m,skipToEndOf:_e,skipToStartOf:ve,getTokenFullStart:()=>(N==null?void 0:N.token.pos)??p.getTokenStart(),getStartPos:()=>(N==null?void 0:N.token.pos)??p.getTokenStart()});return N=void 0,p.setText(void 0),R;function F(){N=void 0,p.getTokenFullStart()!==a?m=!!b&&La(b).kind===4:p.scan(),C=void 0,b=void 0;let ke=p.getTokenFullStart();for(;ke(t[t.None=0]="None",t[t.StopProcessingSpaceActions=1]="StopProcessingSpaceActions",t[t.StopProcessingTokenActions=2]="StopProcessingTokenActions",t[t.InsertSpace=4]="InsertSpace",t[t.InsertNewLine=8]="InsertNewLine",t[t.DeleteSpace=16]="DeleteSpace",t[t.DeleteToken=32]="DeleteToken",t[t.InsertTrailingSemicolon=64]="InsertTrailingSemicolon",t[t.StopAction=3]="StopAction",t[t.ModifySpaceAction=28]="ModifySpaceAction",t[t.ModifyTokenAction=96]="ModifyTokenAction",t))(Xat||{}),Zat=(t=>(t[t.None=0]="None",t[t.CanDeleteNewLines=1]="CanDeleteNewLines",t))(Zat||{});function Yat(){const t=[];for(let Se=0;Se<=165;Se++)Se!==1&&t.push(Se);function r(...Se){return{tokens:t.filter(oe=>!Se.some(pe=>pe===oe)),isSpecific:!1}}const a={tokens:t,isSpecific:!1},u=DF([...t,3]),h=DF([...t,1]),p=tlt(83,165),m=tlt(30,79),C=[103,104,165,130,142,152],b=[46,47,55,54],T=[9,10,80,21,23,19,110,105],E=[80,21,110,105],N=[80,22,24,105],R=[80,21,110,105],F=[80,22,24,105],j=[2,3],U=[80,...ide],q=u,Q=DF([80,32,3,86,95,102]),re=DF([22,3,92,113,98,93,85]),Y=[Jr("IgnoreBeforeComment",a,j,Ihe,1),Jr("IgnoreAfterLineComment",2,a,Ihe,1),Jr("NotSpaceBeforeColon",a,59,[Us,aZ,rlt],16),Jr("SpaceAfterColon",59,a,[Us,aZ,gVt],4),Jr("NoSpaceBeforeQuestionMark",a,58,[Us,aZ,rlt],16),Jr("SpaceAfterQuestionMarkInConditionalOperator",58,a,[Us,nVt],4),Jr("NoSpaceAfterQuestionMark",58,a,[Us,iVt],16),Jr("NoSpaceBeforeDot",a,[25,29],[Us,IVt],16),Jr("NoSpaceAfterDot",[25,29],a,[Us],16),Jr("NoSpaceBetweenImportParenInImportType",102,21,[Us,_Vt],16),Jr("NoSpaceAfterUnaryPrefixOperator",b,T,[Us,aZ],16),Jr("NoSpaceAfterUnaryPreincrementOperator",46,E,[Us],16),Jr("NoSpaceAfterUnaryPredecrementOperator",47,R,[Us],16),Jr("NoSpaceBeforeUnaryPostincrementOperator",N,46,[Us,blt],16),Jr("NoSpaceBeforeUnaryPostdecrementOperator",F,47,[Us,blt],16),Jr("SpaceAfterPostincrementWhenFollowedByAdd",46,40,[Us,fx],4),Jr("SpaceAfterAddWhenFollowedByUnaryPlus",40,40,[Us,fx],4),Jr("SpaceAfterAddWhenFollowedByPreincrement",40,46,[Us,fx],4),Jr("SpaceAfterPostdecrementWhenFollowedBySubtract",47,41,[Us,fx],4),Jr("SpaceAfterSubtractWhenFollowedByUnaryMinus",41,41,[Us,fx],4),Jr("SpaceAfterSubtractWhenFollowedByPredecrement",41,47,[Us,fx],4),Jr("NoSpaceAfterCloseBrace",20,[28,27],[Us],16),Jr("NewLineBeforeCloseBraceInBlockContext",u,20,[olt],8),Jr("SpaceAfterCloseBrace",20,r(22),[Us,oVt],4),Jr("SpaceBetweenCloseBraceAndElse",20,93,[Us],4),Jr("SpaceBetweenCloseBraceAndWhile",20,117,[Us],4),Jr("NoSpaceBetweenEmptyBraceBrackets",19,20,[Us,flt],16),Jr("SpaceAfterConditionalClosingParen",22,23,[lZ],4),Jr("NoSpaceBetweenFunctionKeywordAndStar",100,42,[clt],16),Jr("SpaceAfterStarInGeneratorDeclaration",42,80,[clt],4),Jr("SpaceAfterFunctionInFuncDecl",100,a,[MI],4),Jr("NewLineAfterOpenBraceInBlockContext",19,a,[olt],8),Jr("SpaceAfterGetSetInMember",[139,153],80,[MI],4),Jr("NoSpaceBetweenYieldKeywordAndStar",127,42,[Us,ylt],16),Jr("SpaceBetweenYieldOrYieldStarAndOperand",[127,42],a,[Us,ylt],4),Jr("NoSpaceBetweenReturnAndSemicolon",107,27,[Us],16),Jr("SpaceAfterCertainKeywords",[115,111,105,91,107,114,135],a,[Us],4),Jr("SpaceAfterLetConstInVariableDeclaration",[121,87],a,[Us,yVt],4),Jr("NoSpaceBeforeOpenParenInFuncCall",a,21,[Us,cVt,uVt],16),Jr("SpaceBeforeBinaryKeywordOperator",a,C,[Us,fx],4),Jr("SpaceAfterBinaryKeywordOperator",C,a,[Us,fx],4),Jr("SpaceAfterVoidOperator",116,a,[Us,xVt],4),Jr("SpaceBetweenAsyncAndOpenParen",134,21,[hVt,Us],4),Jr("SpaceBetweenAsyncAndFunctionKeyword",134,[100,80],[Us],4),Jr("NoSpaceBetweenTagAndTemplateString",[80,22],[15,16],[Us],16),Jr("SpaceBeforeJsxAttribute",a,80,[pVt,Us],4),Jr("SpaceBeforeSlashInJsxOpeningElement",a,44,[glt,Us],4),Jr("NoSpaceBeforeGreaterThanTokenInJsxOpeningElement",44,32,[glt,Us],16),Jr("NoSpaceBeforeEqualInJsxAttribute",a,64,[_lt,Us],16),Jr("NoSpaceAfterEqualInJsxAttribute",64,a,[_lt,Us],16),Jr("NoSpaceBeforeJsxNamespaceColon",80,59,[plt],16),Jr("NoSpaceAfterJsxNamespaceColon",59,80,[plt],16),Jr("NoSpaceAfterModuleImport",[144,149],21,[Us],16),Jr("SpaceAfterCertainTypeScriptKeywords",[128,129,86,138,90,94,95,96,139,119,102,120,144,145,123,125,124,148,153,126,156,161,143,140],a,[Us],4),Jr("SpaceBeforeCertainTypeScriptKeywords",a,[96,119,161],[Us],4),Jr("SpaceAfterModuleName",11,19,[bVt],4),Jr("SpaceBeforeArrow",a,39,[Us],4),Jr("SpaceAfterArrow",39,a,[Us],4),Jr("NoSpaceAfterEllipsis",26,80,[Us],16),Jr("NoSpaceAfterOptionalParameters",58,[22,28],[Us,aZ],16),Jr("NoSpaceBetweenEmptyInterfaceBraceBrackets",19,20,[Us,CVt],16),Jr("NoSpaceBeforeOpenAngularBracket",U,30,[Us,cZ],16),Jr("NoSpaceBetweenCloseParenAndAngularBracket",22,30,[Us,cZ],16),Jr("NoSpaceAfterOpenAngularBracket",30,a,[Us,cZ],16),Jr("NoSpaceBeforeCloseAngularBracket",a,32,[Us,cZ],16),Jr("NoSpaceAfterCloseAngularBracket",32,[21,23,32,28],[Us,cZ,sVt,wVt],16),Jr("SpaceBeforeAt",[22,80],60,[Us],4),Jr("NoSpaceAfterAt",60,a,[Us],16),Jr("SpaceAfterDecorator",a,[128,80,95,90,86,126,125,123,124,139,153,23,42],[vVt],4),Jr("NoSpaceBeforeNonNullAssertionOperator",a,54,[Us,kVt],16),Jr("NoSpaceAfterNewKeywordOnConstructorSignature",105,21,[Us,SVt],16),Jr("SpaceLessThanAndNonJSXTypeAnnotation",30,30,[Us],4)],ue=[Jr("SpaceAfterConstructor",137,21,[Sg("insertSpaceAfterConstructor"),Us],4),Jr("NoSpaceAfterConstructor",137,21,[Kv("insertSpaceAfterConstructor"),Us],16),Jr("SpaceAfterComma",28,a,[Sg("insertSpaceAfterCommaDelimiter"),Us,B6e,dVt,fVt],4),Jr("NoSpaceAfterComma",28,a,[Kv("insertSpaceAfterCommaDelimiter"),Us,B6e],16),Jr("SpaceAfterAnonymousFunctionKeyword",[100,42],21,[Sg("insertSpaceAfterFunctionKeywordForAnonymousFunctions"),MI],4),Jr("NoSpaceAfterAnonymousFunctionKeyword",[100,42],21,[Kv("insertSpaceAfterFunctionKeywordForAnonymousFunctions"),MI],16),Jr("SpaceAfterKeywordInControl",p,21,[Sg("insertSpaceAfterKeywordsInControlFlowStatements"),lZ],4),Jr("NoSpaceAfterKeywordInControl",p,21,[Kv("insertSpaceAfterKeywordsInControlFlowStatements"),lZ],16),Jr("SpaceAfterOpenParen",21,a,[Sg("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),Us],4),Jr("SpaceBeforeCloseParen",a,22,[Sg("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),Us],4),Jr("SpaceBetweenOpenParens",21,21,[Sg("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),Us],4),Jr("NoSpaceBetweenParens",21,22,[Us],16),Jr("NoSpaceAfterOpenParen",21,a,[Kv("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),Us],16),Jr("NoSpaceBeforeCloseParen",a,22,[Kv("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),Us],16),Jr("SpaceAfterOpenBracket",23,a,[Sg("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),Us],4),Jr("SpaceBeforeCloseBracket",a,24,[Sg("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),Us],4),Jr("NoSpaceBetweenBrackets",23,24,[Us],16),Jr("NoSpaceAfterOpenBracket",23,a,[Kv("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),Us],16),Jr("NoSpaceBeforeCloseBracket",a,24,[Kv("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),Us],16),Jr("SpaceAfterOpenBrace",19,a,[nlt("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),slt],4),Jr("SpaceBeforeCloseBrace",a,20,[nlt("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),slt],4),Jr("NoSpaceBetweenEmptyBraceBrackets",19,20,[Us,flt],16),Jr("NoSpaceAfterOpenBrace",19,a,[P6e("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),Us],16),Jr("NoSpaceBeforeCloseBrace",a,20,[P6e("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),Us],16),Jr("SpaceBetweenEmptyBraceBrackets",19,20,[Sg("insertSpaceAfterOpeningAndBeforeClosingEmptyBraces")],4),Jr("NoSpaceBetweenEmptyBraceBrackets",19,20,[P6e("insertSpaceAfterOpeningAndBeforeClosingEmptyBraces"),Us],16),Jr("SpaceAfterTemplateHeadAndMiddle",[16,17],a,[Sg("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),hlt],4,1),Jr("SpaceBeforeTemplateMiddleAndTail",a,[17,18],[Sg("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),Us],4),Jr("NoSpaceAfterTemplateHeadAndMiddle",[16,17],a,[Kv("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),hlt],16,1),Jr("NoSpaceBeforeTemplateMiddleAndTail",a,[17,18],[Kv("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),Us],16),Jr("SpaceAfterOpenBraceInJsxExpression",19,a,[Sg("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),Us,Lhe],4),Jr("SpaceBeforeCloseBraceInJsxExpression",a,20,[Sg("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),Us,Lhe],4),Jr("NoSpaceAfterOpenBraceInJsxExpression",19,a,[Kv("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),Us,Lhe],16),Jr("NoSpaceBeforeCloseBraceInJsxExpression",a,20,[Kv("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),Us,Lhe],16),Jr("SpaceAfterSemicolonInFor",27,a,[Sg("insertSpaceAfterSemicolonInForStatements"),Us,O6e],4),Jr("NoSpaceAfterSemicolonInFor",27,a,[Kv("insertSpaceAfterSemicolonInForStatements"),Us,O6e],16),Jr("SpaceBeforeBinaryOperator",a,m,[Sg("insertSpaceBeforeAndAfterBinaryOperators"),Us,fx],4),Jr("SpaceAfterBinaryOperator",m,a,[Sg("insertSpaceBeforeAndAfterBinaryOperators"),Us,fx],4),Jr("NoSpaceBeforeBinaryOperator",a,m,[Kv("insertSpaceBeforeAndAfterBinaryOperators"),Us,fx],16),Jr("NoSpaceAfterBinaryOperator",m,a,[Kv("insertSpaceBeforeAndAfterBinaryOperators"),Us,fx],16),Jr("SpaceBeforeOpenParenInFuncDecl",a,21,[Sg("insertSpaceBeforeFunctionParenthesis"),Us,MI],4),Jr("NoSpaceBeforeOpenParenInFuncDecl",a,21,[Kv("insertSpaceBeforeFunctionParenthesis"),Us,MI],16),Jr("NewLineBeforeOpenBraceInControl",re,19,[Sg("placeOpenBraceOnNewLineForControlBlocks"),lZ,F6e],8,1),Jr("NewLineBeforeOpenBraceInFunction",q,19,[Sg("placeOpenBraceOnNewLineForFunctions"),MI,F6e],8,1),Jr("NewLineBeforeOpenBraceInTypeScriptDeclWithBlock",Q,19,[Sg("placeOpenBraceOnNewLineForFunctions"),ult,F6e],8,1),Jr("SpaceAfterTypeAssertion",32,a,[Sg("insertSpaceAfterTypeAssertion"),Us,V6e],4),Jr("NoSpaceAfterTypeAssertion",32,a,[Kv("insertSpaceAfterTypeAssertion"),Us,V6e],16),Jr("SpaceBeforeTypeAnnotation",a,[58,59],[Sg("insertSpaceBeforeTypeAnnotation"),Us,M6e],4),Jr("NoSpaceBeforeTypeAnnotation",a,[58,59],[Kv("insertSpaceBeforeTypeAnnotation"),Us,M6e],16),Jr("NoOptionalSemicolon",27,h,[ilt("semicolons","remove"),DVt],32),Jr("OptionalSemicolon",a,h,[ilt("semicolons","insert"),EVt],64)],te=[Jr("NoSpaceBeforeSemicolon",a,27,[Us],16),Jr("SpaceBeforeOpenBraceInControl",re,19,[A6e("placeOpenBraceOnNewLineForControlBlocks"),lZ,W6e,R6e],4,1),Jr("SpaceBeforeOpenBraceInFunction",q,19,[A6e("placeOpenBraceOnNewLineForFunctions"),MI,Nhe,W6e,R6e],4,1),Jr("SpaceBeforeOpenBraceInTypeScriptDeclWithBlock",Q,19,[A6e("placeOpenBraceOnNewLineForFunctions"),ult,W6e,R6e],4,1),Jr("NoSpaceBeforeComma",a,28,[Us],16),Jr("NoSpaceBeforeOpenBracket",r(134,84),23,[Us],16),Jr("NoSpaceAfterCloseBracket",24,a,[Us,mVt],16),Jr("SpaceAfterSemicolon",27,a,[Us],4),Jr("SpaceBetweenForAndAwaitKeyword",99,135,[Us],4),Jr("SpaceBetweenDotDotDotAndTypeName",26,U,[Us],16),Jr("SpaceBetweenStatements",[22,92,93,84],a,[Us,B6e,eVt],4),Jr("SpaceAfterTryCatchFinally",[113,85,98],19,[Us],4)];return[...Y,...ue,...te]}function Jr(t,r,a,u,h,p=0){return{leftTokenRange:elt(r),rightTokenRange:elt(a),rule:{debugName:t,context:u,action:h,flags:p}}}function DF(t){return{tokens:t,isSpecific:!0}}function elt(t){return typeof t=="number"?DF([t]):Lo(t)?DF(t):t}function tlt(t,r,a=[]){const u=[];for(let h=t;h<=r;h++)Mt(a,h)||u.push(h);return DF(u)}function ilt(t,r){return a=>a.options&&a.options[t]===r}function Sg(t){return r=>r.options&&Vl(r.options,t)&&!!r.options[t]}function P6e(t){return r=>r.options&&Vl(r.options,t)&&!r.options[t]}function Kv(t){return r=>!r.options||!Vl(r.options,t)||!r.options[t]}function A6e(t){return r=>!r.options||!Vl(r.options,t)||!r.options[t]||r.TokensAreOnSameLine()}function nlt(t){return r=>!r.options||!Vl(r.options,t)||!!r.options[t]}function O6e(t){return t.contextNode.kind===248}function eVt(t){return!O6e(t)}function fx(t){switch(t.contextNode.kind){case 226:return t.contextNode.operatorToken.kind!==28;case 227:case 194:case 234:case 281:case 276:case 182:case 192:case 193:case 238:return!0;case 208:case 265:case 271:case 277:case 260:case 169:case 306:case 172:case 171:return t.currentTokenSpan.kind===64||t.nextTokenSpan.kind===64;case 249:case 168:return t.currentTokenSpan.kind===103||t.nextTokenSpan.kind===103||t.currentTokenSpan.kind===64||t.nextTokenSpan.kind===64;case 250:return t.currentTokenSpan.kind===165||t.nextTokenSpan.kind===165}return!1}function aZ(t){return!fx(t)}function rlt(t){return!M6e(t)}function M6e(t){const r=t.contextNode.kind;return r===172||r===171||r===169||r===260||BL(r)}function tVt(t){return To(t.contextNode)&&t.contextNode.questionToken}function iVt(t){return!tVt(t)}function nVt(t){return t.contextNode.kind===227||t.contextNode.kind===194}function R6e(t){return t.TokensAreOnSameLine()||Nhe(t)}function slt(t){return t.contextNode.kind===206||t.contextNode.kind===200||rVt(t)}function F6e(t){return Nhe(t)&&!(t.NextNodeAllOnSameLine()||t.NextNodeBlockIsOnOneLine())}function olt(t){return alt(t)&&!(t.ContextNodeAllOnSameLine()||t.ContextNodeBlockIsOnOneLine())}function rVt(t){return alt(t)&&(t.ContextNodeAllOnSameLine()||t.ContextNodeBlockIsOnOneLine())}function alt(t){return llt(t.contextNode)}function Nhe(t){return llt(t.nextTokenParent)}function llt(t){if(dlt(t))return!0;switch(t.kind){case 241:case 269:case 210:case 268:return!0}return!1}function MI(t){switch(t.contextNode.kind){case 262:case 174:case 173:case 177:case 178:case 179:case 218:case 176:case 219:case 264:return!0}return!1}function sVt(t){return!MI(t)}function clt(t){return t.contextNode.kind===262||t.contextNode.kind===218}function ult(t){return dlt(t.contextNode)}function dlt(t){switch(t.kind){case 263:case 231:case 264:case 266:case 187:case 267:case 278:case 279:case 272:case 275:return!0}return!1}function oVt(t){switch(t.currentTokenParent.kind){case 263:case 267:case 266:case 299:case 268:case 255:return!0;case 241:{const r=t.currentTokenParent.parent;if(!r||r.kind!==219&&r.kind!==218)return!0}}return!1}function lZ(t){switch(t.contextNode.kind){case 245:case 255:case 248:case 249:case 250:case 247:case 258:case 246:case 254:case 299:return!0;default:return!1}}function flt(t){return t.contextNode.kind===210}function aVt(t){return t.contextNode.kind===213}function lVt(t){return t.contextNode.kind===214}function cVt(t){return aVt(t)||lVt(t)}function uVt(t){return t.currentTokenSpan.kind!==28}function dVt(t){return t.nextTokenSpan.kind!==24}function fVt(t){return t.nextTokenSpan.kind!==22}function hVt(t){return t.contextNode.kind===219}function _Vt(t){return t.contextNode.kind===205}function Us(t){return t.TokensAreOnSameLine()&&t.contextNode.kind!==12}function hlt(t){return t.contextNode.kind!==12}function B6e(t){return t.contextNode.kind!==284&&t.contextNode.kind!==288}function Lhe(t){return t.contextNode.kind===294||t.contextNode.kind===293}function pVt(t){return t.nextTokenParent.kind===291||t.nextTokenParent.kind===295&&t.nextTokenParent.parent.kind===291}function _lt(t){return t.contextNode.kind===291}function gVt(t){return t.nextTokenParent.kind!==295}function plt(t){return t.nextTokenParent.kind===295}function glt(t){return t.contextNode.kind===285}function mVt(t){return!MI(t)&&!Nhe(t)}function vVt(t){return t.TokensAreOnSameLine()&&dg(t.contextNode)&&mlt(t.currentTokenParent)&&!mlt(t.nextTokenParent)}function mlt(t){for(;t&&Ut(t);)t=t.parent;return t&&t.kind===170}function yVt(t){return t.currentTokenParent.kind===261&&t.currentTokenParent.getStart(t.sourceFile)===t.currentTokenSpan.pos}function W6e(t){return t.formattingRequestKind!==2}function bVt(t){return t.contextNode.kind===267}function CVt(t){return t.contextNode.kind===187}function SVt(t){return t.contextNode.kind===180}function vlt(t,r){if(t.kind!==30&&t.kind!==32)return!1;switch(r.kind){case 183:case 216:case 265:case 263:case 231:case 264:case 262:case 218:case 219:case 174:case 173:case 179:case 180:case 213:case 214:case 233:return!0;default:return!1}}function cZ(t){return vlt(t.currentTokenSpan,t.currentTokenParent)||vlt(t.nextTokenSpan,t.nextTokenParent)}function V6e(t){return t.contextNode.kind===216}function wVt(t){return!V6e(t)}function xVt(t){return t.currentTokenSpan.kind===116&&t.currentTokenParent.kind===222}function ylt(t){return t.contextNode.kind===229&&t.contextNode.expression!==void 0}function kVt(t){return t.contextNode.kind===235}function blt(t){return!TVt(t)}function TVt(t){switch(t.contextNode.kind){case 245:case 248:case 249:case 250:case 246:case 247:return!0;default:return!1}}function DVt(t){let r=t.nextTokenSpan.kind,a=t.nextTokenSpan.pos;if(j6(r)){const p=t.nextTokenParent===t.currentTokenParent?aD(t.currentTokenParent,Xi(t.currentTokenParent,m=>!m.parent),t.sourceFile):t.nextTokenParent.getFirstToken(t.sourceFile);if(!p)return!0;r=p.kind,a=p.getStart(t.sourceFile)}const u=t.sourceFile.getLineAndCharacterOfPosition(t.currentTokenSpan.pos).line,h=t.sourceFile.getLineAndCharacterOfPosition(a).line;return u===h?r===20||r===1:r===240||r===27?!1:t.contextNode.kind===264||t.contextNode.kind===265?!V_(t.currentTokenParent)||!!t.currentTokenParent.type||r!==21:To(t.currentTokenParent)?!t.currentTokenParent.initializer:t.currentTokenParent.kind!==248&&t.currentTokenParent.kind!==242&&t.currentTokenParent.kind!==240&&r!==23&&r!==21&&r!==40&&r!==41&&r!==44&&r!==14&&r!==28&&r!==228&&r!==16&&r!==15&&r!==25}function EVt(t){return sX(t.currentTokenSpan.end,t.currentTokenParent,t.sourceFile)}function IVt(t){return!Ir(t.contextNode)||!W_(t.contextNode.expression)||t.contextNode.expression.getText().includes(".")}function NVt(t,r){return{options:t,getRules:LVt(),host:r}}var H6e;function LVt(){return H6e===void 0&&(H6e=AVt(Yat())),H6e}function PVt(t){let r=0;return t&1&&(r|=28),t&2&&(r|=96),t&28&&(r|=28),t&96&&(r|=96),r}function AVt(t){const r=OVt(t);return a=>{const u=r[Clt(a.currentTokenSpan.kind,a.nextTokenSpan.kind)];if(u){const h=[];let p=0;for(const m of u){const C=~PVt(p);m.action&C&&Be(m.context,b=>b(a))&&(h.push(m),p|=m.action)}if(h.length)return h}}}function OVt(t){const r=new Array(j6e*j6e),a=new Array(r.length);for(const u of t){const h=u.leftTokenRange.isSpecific&&u.rightTokenRange.isSpecific;for(const p of u.leftTokenRange.tokens)for(const m of u.rightTokenRange.tokens){const C=Clt(p,m);let b=r[C];b===void 0&&(b=r[C]=[]),MVt(b,u.rule,h,a,C)}}return r}function Clt(t,r){return z.assert(t<=165&&r<=165,"Must compute formatting context from tokens"),t*j6e+r}var EF=5,Phe=31,j6e=166,tj=(t=>(t[t.StopRulesSpecific=0]="StopRulesSpecific",t[t.StopRulesAny=EF*1]="StopRulesAny",t[t.ContextRulesSpecific=EF*2]="ContextRulesSpecific",t[t.ContextRulesAny=EF*3]="ContextRulesAny",t[t.NoContextRulesSpecific=EF*4]="NoContextRulesSpecific",t[t.NoContextRulesAny=EF*5]="NoContextRulesAny",t))(tj||{});function MVt(t,r,a,u,h){const p=r.action&3?a?0:tj.StopRulesAny:r.context!==Ihe?a?tj.ContextRulesSpecific:tj.ContextRulesAny:a?tj.NoContextRulesSpecific:tj.NoContextRulesAny,m=u[h]||0;t.splice(RVt(m,p),0,r),u[h]=FVt(m,p)}function RVt(t,r){let a=0;for(let u=0;u<=r;u+=EF)a+=t&Phe,t>>=EF;return a}function FVt(t,r){const a=(t>>r&Phe)+1;return z.assert((a&Phe)===a,"Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."),t&~(Phe<z.formatSyntaxKind(a)}),u}function BVt(t,r,a){const u=r.getLineAndCharacterOfPosition(t).line;if(u===0)return[];let h=KB(u,r);for(;Tv(r.text.charCodeAt(h));)h--;_h(r.text.charCodeAt(h))&&h--;const p={pos:zw(u-1,r),end:h+1};return uZ(p,r,a,2)}function WVt(t,r,a){const u=z6e(t,27,r);return Slt(U6e(u),r,a,3)}function VVt(t,r,a){const u=z6e(t,19,r);if(!u)return[];const h=u.parent,p=U6e(h),m={pos:Bm(p.getStart(r),r),end:t};return uZ(m,r,a,4)}function HVt(t,r,a){const u=z6e(t,20,r);return Slt(U6e(u),r,a,5)}function jVt(t,r){const a={pos:0,end:t.text.length};return uZ(a,t,r,0)}function zVt(t,r,a,u){const h={pos:Bm(t,a),end:r};return uZ(h,a,u,1)}function z6e(t,r,a){const u=Dd(t,a);return u&&u.kind===r&&t===u.getEnd()?u:void 0}function U6e(t){let r=t;for(;r&&r.parent&&r.parent.end===t.end&&!UVt(r.parent,r);)r=r.parent;return r}function UVt(t,r){switch(t.kind){case 263:case 264:return yg(t.members,r);case 267:const a=t.body;return!!a&&a.kind===268&&yg(a.statements,r);case 307:case 241:case 268:return yg(t.statements,r);case 299:return yg(t.block.statements,r)}return!1}function qVt(t,r){return a(r);function a(u){const h=jo(u,p=>zue(p.getStart(r),p.end,t)&&p);if(h){const p=a(h);if(p)return p}return u}}function $Vt(t,r){if(!t.length)return h;const a=t.filter(p=>nF(r,p.start,p.start+p.length)).sort((p,m)=>p.start-m.start);if(!a.length)return h;let u=0;return p=>{for(;;){if(u>=a.length)return!1;const m=a[u];if(p.end<=m.start)return!1;if(RQ(p.pos,p.end,m.start,m.start+m.length))return!0;u++}};function h(){return!1}}function JVt(t,r,a){const u=t.getStart(a);if(u===r.pos&&t.end===r.end)return u;const h=Dd(r.pos,a);return!h||h.end>=r.pos?t.pos:h.end}function GVt(t,r,a){let u=-1,h;for(;t;){const p=a.getLineAndCharacterOfPosition(t.getStart(a)).line;if(u!==-1&&p!==u)break;if(Qv.shouldIndentChildNode(r,t,h,a))return r.indentSize;u=p,h=t,t=t.parent}return 0}function KVt(t,r,a,u,h,p){const m={pos:t.pos,end:t.end};return L6e(r.text,a,m.pos,m.end,C=>wlt(m,t,u,h,C,p,1,b=>!1,r))}function Slt(t,r,a,u){if(!t)return[];const h={pos:Bm(t.getStart(r),r),end:t.end};return uZ(h,r,a,u)}function uZ(t,r,a,u){const h=qVt(t,r);return L6e(r.text,r.languageVariant,JVt(h,t,r),t.end,p=>wlt(t,h,Qv.getIndentationForNode(h,t,r,a.options),GVt(h,a.options,r),p,a,u,$Vt(r.parseDiagnostics,t),r))}function wlt(t,r,a,u,h,{options:p,getRules:m,host:C},b,T,E){var N;const R=new Qat(E,b,p);let F,j,U,q,Q,re=-1;const Y=[];if(h.advance(),h.isOnToken()){const nt=E.getLineAndCharacterOfPosition(r.getStart(E)).line;let ze=nt;dg(r)&&(ze=E.getLineAndCharacterOfPosition(Ase(r,E)).line),ye(r,r,nt,ze,a,u)}const ue=h.getCurrentLeadingTrivia();if(ue){const nt=Qv.nodeWillIndentChild(p,r,void 0,E,!1)?a+p.indentSize:a;be(ue,nt,!0,ze=>{ve(ze,E.getLineAndCharacterOfPosition(ze.pos),r,r,void 0),ke(ze.pos,nt,!1)}),p.trimTrailingWhitespace!==!1&&et(ue)}if(j&&h.getTokenFullStart()>=t.end){const nt=h.isOnEOF()?h.readEOFTokenRange():h.isOnToken()?h.readTokenInfo(r).token:void 0;if(nt&&nt.pos===F){const ze=((N=Dd(nt.end,E,r))==null?void 0:N.parent)||U;Ee(nt,E.getLineAndCharacterOfPosition(nt.pos).line,ze,j,q,U,ze,void 0)}}return Y;function te(nt,ze,st,xt,Et){if(nF(xt,nt,ze)||uH(xt,nt,ze)){if(Et!==-1)return Et}else{const ft=E.getLineAndCharacterOfPosition(nt).line,Ht=Bm(nt,E),Oi=Qv.findFirstNonWhitespaceColumn(Ht,nt,E,p);if(ft!==st||nt===Oi){const Ji=Qv.getBaseIndentation(p);return Ji>Oi?Ji:Oi}}return-1}function Se(nt,ze,st,xt,Et,ft){const Ht=Qv.shouldIndentChildNode(p,nt)?p.indentSize:0;return ft===ze?{indentation:ze===Q?re:Et.getIndentation(),delta:Math.min(p.indentSize,Et.getDelta(nt)+Ht)}:st===-1?nt.kind===21&&ze===Q?{indentation:re,delta:Et.getDelta(nt)}:Qv.childStartsOnTheSameLineWithElseInIfStatement(xt,nt,ze,E)||Qv.childIsUnindentedBranchOfConditionalExpression(xt,nt,ze,E)||Qv.argumentStartsOnSameLineAsPreviousArgument(xt,nt,ze,E)?{indentation:Et.getIndentation(),delta:Ht}:{indentation:Et.getIndentation()+Et.getDelta(nt),delta:Ht}:{indentation:st,delta:Ht}}function oe(nt){if(_0(nt)){const ze=Me(nt.modifiers,Ra,Nt(nt.modifiers,jd));if(ze)return ze.kind}switch(nt.kind){case 263:return 86;case 264:return 120;case 262:return 100;case 266:return 266;case 177:return 139;case 178:return 153;case 174:if(nt.asteriskToken)return 42;case 172:case 169:const ze=ko(nt);if(ze)return ze.kind}}function pe(nt,ze,st,xt){return{getIndentationForComment:(Ht,Oi,Ji)=>{switch(Ht){case 20:case 24:case 22:return st+ft(Ji)}return Oi!==-1?Oi:st},getIndentationForToken:(Ht,Oi,Ji,Ui)=>!Ui&&Et(Ht,Oi,Ji)?st+ft(Ji):st,getIndentation:()=>st,getDelta:ft,recomputeIndentation:(Ht,Oi)=>{Qv.shouldIndentChildNode(p,Oi,nt,E)&&(st+=Ht?p.indentSize:-p.indentSize,xt=Qv.shouldIndentChildNode(p,nt)?p.indentSize:0)}};function Et(Ht,Oi,Ji){switch(Oi){case 19:case 20:case 22:case 93:case 117:case 60:return!1;case 44:case 32:switch(Ji.kind){case 286:case 287:case 285:return!1}break;case 23:case 24:if(Ji.kind!==200)return!1;break}return ze!==Ht&&!(dg(nt)&&Oi===oe(nt))}function ft(Ht){return Qv.nodeWillIndentChild(p,nt,Ht,E,!0)?xt:0}}function ye(nt,ze,st,xt,Et,ft){if(!nF(t,nt.getStart(E),nt.getEnd()))return;const Ht=pe(nt,st,Et,ft);let Oi=ze;for(jo(nt,Mi=>{Ji(Mi,-1,nt,Ht,st,xt,!1)},Mi=>{Ui(Mi,nt,st,Ht)});h.isOnToken()&&h.getTokenFullStart()Math.min(nt.end,t.end))break;bn(Mi,nt,Ht,nt)}function Ji(Mi,Ai,Rn,bs,Hi,Hs,Wo,ts){if(z.assert(!oc(Mi)),vu(Mi)||Pwe(Rn,Mi))return Ai;const Fo=Mi.getStart(E),Cn=E.getLineAndCharacterOfPosition(Fo).line;let Ko=Cn;dg(Mi)&&(Ko=E.getLineAndCharacterOfPosition(Ase(Mi,E)).line);let ot=-1;if(Wo&&yg(t,Rn)&&(ot=te(Fo,Mi.end,Hi,t,Ai),ot!==-1&&(Ai=ot)),!nF(t,Mi.pos,Mi.end))return Mi.endt.end)return Ai;if(lr.token.end>Fo){lr.token.pos>Fo&&h.skipToStartOf(Mi);break}bn(lr,nt,bs,nt)}if(!h.isOnToken()||h.getTokenFullStart()>=t.end)return Ai;if(RL(Mi)){const lr=h.readTokenInfo(Mi);if(Mi.kind!==12)return z.assert(lr.token.end===Mi.end,"Token end is child end"),bn(lr,nt,bs,Mi),Ai}const hi=Mi.kind===170?Cn:Hs,hn=Se(Mi,Cn,ot,nt,bs,hi);return ye(Mi,Oi,Cn,Ko,hn.indentation,hn.delta),Oi=nt,ts&&Rn.kind===209&&Ai===-1&&(Ai=hn.indentation),Ai}function Ui(Mi,Ai,Rn,bs){z.assert(ST(Mi)),z.assert(!oc(Mi));const Hi=QVt(Ai,Mi);let Hs=bs,Wo=Rn;if(!nF(t,Mi.pos,Mi.end)){Mi.endMi.pos)break;if(Cn.token.kind===Hi){Wo=E.getLineAndCharacterOfPosition(Cn.token.pos).line,bn(Cn,Ai,bs,Ai);let Ko;if(re!==-1)Ko=re;else{const ot=Bm(Cn.token.pos,E);Ko=Qv.findFirstNonWhitespaceColumn(ot,Cn.token.pos,E,p)}Hs=pe(Ai,Rn,Ko,p.indentSize)}else bn(Cn,Ai,bs,Ai)}let ts=-1;for(let Cn=0;Cnke(hn.pos,hi,!1))}Ko!==-1&&ot&&(ke(Mi.token.pos,Ko,ts===1),Q=Cn.line,re=Ko)}h.advance(),Oi=Ai}}function be(nt,ze,st,xt){for(const Et of nt){const ft=yg(t,Et);switch(Et.kind){case 3:ft&&fe(Et,ze,!st),st=!1;break;case 2:st&&ft&&xt(Et),st=!1;break;case 4:st=!0;break}}return st}function _e(nt,ze,st,xt){for(const Et of nt)if(UQ(Et.kind)&&yg(t,Et)){const ft=E.getLineAndCharacterOfPosition(Et.pos);ve(Et,ft,ze,st,xt)}}function ve(nt,ze,st,xt,Et){const ft=T(nt);let Ht=0;if(!ft)if(j)Ht=Ee(nt,ze.line,st,j,q,U,xt,Et);else{const Oi=E.getLineAndCharacterOfPosition(t.pos);Ie(Oi.line,ze.line)}return j=nt,F=nt.end,U=st,q=ze.line,Ht}function Ee(nt,ze,st,xt,Et,ft,Ht,Oi){R.updateContext(xt,ft,nt,st,Ht);const Ji=m(R);let Ui=R.options.trimTrailingWhitespace!==!1,bn=0;return Ji?X(Ji,Mi=>{if(bn=wt(Mi,xt,Et,nt,ze),Oi)switch(bn){case 2:st.getStart(E)===nt.pos&&Oi.recomputeIndentation(!1,Ht);break;case 1:st.getStart(E)===nt.pos&&Oi.recomputeIndentation(!0,Ht);break;default:z.assert(bn===0)}Ui=Ui&&!(Mi.action&16)&&Mi.flags!==1}):Ui=Ui&&nt.kind!==1,ze!==Et&&Ui&&Ie(Et,ze,xt),bn}function ke(nt,ze,st){const xt=q6e(ze,p);if(st)Ue(nt,0,xt);else{const Et=E.getLineAndCharacterOfPosition(nt),ft=zw(Et.line,E);(ze!==Fe(ft,Et.character)||Oe(xt,ft))&&Ue(ft,Et.character,xt)}}function Fe(nt,ze){let st=0;for(let xt=0;xt0){const Hs=q6e(Hi,p);Ue(Rn,bs.character,Hs)}else We(Rn,bs.character)}}function Ie(nt,ze,st){for(let xt=nt;xtft)continue;const Ht=Le(Et,ft);Ht!==-1&&(z.assert(Ht===Et||!Tv(E.text.charCodeAt(Ht-1))),We(Ht,ft+1-Ht))}}function Le(nt,ze){let st=ze;for(;st>=nt&&Tv(E.text.charCodeAt(st));)st--;return st!==ze?st+1:-1}function et(nt){let ze=j?j.end:t.pos;for(const st of nt)UQ(st.kind)&&(zecH(T,r)||r===T.end&&(T.kind===2||r===t.getFullWidth()))}function QVt(t,r){switch(t.kind){case 176:case 262:case 218:case 174:case 173:case 219:case 179:case 180:case 184:case 185:case 177:case 178:if(t.typeParameters===r)return 30;if(t.parameters===r)return 21;break;case 213:case 214:if(t.typeArguments===r)return 30;if(t.arguments===r)return 21;break;case 263:case 231:case 264:case 265:if(t.typeParameters===r)return 30;break;case 183:case 215:case 186:case 233:case 205:if(t.typeArguments===r)return 30;break;case 187:return 19}return 0}function XVt(t){switch(t){case 21:return 22;case 30:return 32;case 19:return 20}return 0}var Ohe,ij,nj;function q6e(t,r){if((!Ohe||Ohe.tabSize!==r.tabSize||Ohe.indentSize!==r.indentSize)&&(Ohe={tabSize:r.tabSize,indentSize:r.indentSize},ij=nj=void 0),r.convertTabsToSpaces){let u;const h=Math.floor(t/r.indentSize),p=t%r.indentSize;return nj||(nj=[]),nj[h]===void 0?(u=pH(" ",r.indentSize*h),nj[h]=u):u=nj[h],p?u+pH(" ",p):u}else{const u=Math.floor(t/r.tabSize),h=t-u*r.tabSize;let p;return ij||(ij=[]),ij[u]===void 0?ij[u]=p=pH(" ",u):p=ij[u],h?p+pH(" ",h):p}}var Qv;(t=>{let r;(fe=>{fe[fe.Unknown=-1]="Unknown"})(r||(r={}));function a(fe,Ie,Le,et=!1){if(fe>Ie.text.length)return C(Le);if(Le.indentStyle===0)return 0;const He=Dd(fe,Ie,void 0,!0),We=xlt(Ie,fe,He||null);if(We&&We.kind===3)return u(Ie,fe,Le,We);if(!He)return C(Le);if(Que(He.kind)&&He.getStart(Ie)<=fe&&fe=0),He<=We)return ve(zw(We,fe),Ie,fe,Le);const Ue=zw(He,fe),{column:Ye,character:wt}=_e(Ue,Ie,fe,Le);return Ye===0?Ye:fe.text.charCodeAt(Ue+wt)===42?Ye-1:Ye}function h(fe,Ie,Le){let et=Ie;for(;et>0;){const We=fe.text.charCodeAt(et);if(!Vy(We))break;et--}const He=Bm(et,fe);return ve(He,et,fe,Le)}function p(fe,Ie,Le,et,He,We){let Ue,Ye=Le;for(;Ye;){if(Uue(Ye,Ie,fe)&&Fe(We,Ye,Ue,fe,!0)){const nt=j(Ye,fe),ze=F(Le,Ye,et,fe),st=ze!==0?He&&ze===2?We.indentSize:0:et!==nt.line?We.indentSize:0;return b(Ye,nt,void 0,st,fe,!0,We)}const wt=pe(Ye,fe,We,!0);if(wt!==-1)return wt;Ue=Ye,Ye=Ye.parent}return C(We)}function m(fe,Ie,Le,et){const He=Le.getLineAndCharacterOfPosition(fe.getStart(Le));return b(fe,He,Ie,0,Le,!1,et)}t.getIndentationForNode=m;function C(fe){return fe.baseIndentSize||0}t.getBaseIndentation=C;function b(fe,Ie,Le,et,He,We,Ue){var Ye;let wt=fe.parent;for(;wt;){let nt=!0;if(Le){const Et=fe.getStart(He);nt=EtLe.end}const ze=T(wt,fe,He),st=ze.line===Ie.line||q(wt,fe,Ie.line,He);if(nt){const Et=(Ye=Y(fe,He))==null?void 0:Ye[0],ft=!!Et&&j(Et,He).line>ze.line;let Ht=pe(fe,He,Ue,ft);if(Ht!==-1||(Ht=N(fe,wt,Ie,st,He,Ue),Ht!==-1))return Ht+et}Fe(Ue,wt,fe,He,We)&&!st&&(et+=Ue.indentSize);const xt=U(wt,fe,Ie.line,He);fe=wt,wt=fe.parent,Ie=xt?He.getLineAndCharacterOfPosition(fe.getStart(He)):ze}return et+C(Ue)}function T(fe,Ie,Le){const et=Y(Ie,Le),He=et?et.pos:fe.getStart(Le);return Le.getLineAndCharacterOfPosition(He)}function E(fe,Ie,Le){const et=TNe(fe);return et&&et.listItemIndex>0?ye(et.list.getChildren(),et.listItemIndex-1,Ie,Le):-1}function N(fe,Ie,Le,et,He,We){return(Yf(fe)||$B(fe))&&(Ie.kind===307||!et)?be(Le,He,We):-1}let R;(fe=>{fe[fe.Unknown=0]="Unknown",fe[fe.OpenBrace=1]="OpenBrace",fe[fe.CloseBrace=2]="CloseBrace"})(R||(R={}));function F(fe,Ie,Le,et){const He=aD(fe,Ie,et);if(!He)return 0;if(He.kind===19)return 1;if(He.kind===20){const We=j(He,et).line;return Le===We?2:0}return 0}function j(fe,Ie){return Ie.getLineAndCharacterOfPosition(fe.getStart(Ie))}function U(fe,Ie,Le,et){if(!(sa(fe)&&Mt(fe.arguments,Ie)))return!1;const He=fe.expression.getEnd();return Da(et,He).line===Le}t.isArgumentAndStartLineOverlapsExpressionBeingCalled=U;function q(fe,Ie,Le,et){if(fe.kind===245&&fe.elseStatement===Ie){const He=Hl(fe,93,et);return z.assert(He!==void 0),j(He,et).line===Le}return!1}t.childStartsOnTheSameLineWithElseInIfStatement=q;function Q(fe,Ie,Le,et){if(IP(fe)&&(Ie===fe.whenTrue||Ie===fe.whenFalse)){const He=Da(et,fe.condition.end).line;if(Ie===fe.whenTrue)return Le===He;{const We=j(fe.whenTrue,et).line,Ue=Da(et,fe.whenTrue.end).line;return He===We&&Ue===Le}}return!1}t.childIsUnindentedBranchOfConditionalExpression=Q;function re(fe,Ie,Le,et){if(Dv(fe)){if(!fe.arguments)return!1;const He=Me(fe.arguments,wt=>wt.pos===Ie.pos);if(!He)return!1;const We=fe.arguments.indexOf(He);if(We===0)return!1;const Ue=fe.arguments[We-1],Ye=Da(et,Ue.getEnd()).line;if(Le===Ye)return!0}return!1}t.argumentStartsOnSameLineAsPreviousArgument=re;function Y(fe,Ie){return fe.parent&&te(fe.getStart(Ie),fe.getEnd(),fe.parent,Ie)}t.getContainingList=Y;function ue(fe,Ie,Le){return Ie&&te(fe,fe,Ie,Le)}function te(fe,Ie,Le,et){switch(Le.kind){case 183:return He(Le.typeArguments);case 210:return He(Le.properties);case 209:return He(Le.elements);case 187:return He(Le.members);case 262:case 218:case 219:case 174:case 173:case 179:case 176:case 185:case 180:return He(Le.typeParameters)||He(Le.parameters);case 177:return He(Le.parameters);case 263:case 231:case 264:case 265:case 345:return He(Le.typeParameters);case 214:case 213:return He(Le.typeArguments)||He(Le.arguments);case 261:return He(Le.declarations);case 275:case 279:return He(Le.elements);case 206:case 207:return He(Le.elements)}function He(We){return We&&uH(Se(Le,We,et),fe,Ie)?We:void 0}}function Se(fe,Ie,Le){const et=fe.getChildren(Le);for(let He=1;He=0&&Ie=0;Ue--){if(fe[Ue].kind===28)continue;if(Le.getLineAndCharacterOfPosition(fe[Ue].end).line!==We.line)return be(We,Le,et);We=j(fe[Ue],Le)}return-1}function be(fe,Ie,Le){const et=Ie.getPositionOfLineAndCharacter(fe.line,0);return ve(et,et+fe.character,Ie,Le)}function _e(fe,Ie,Le,et){let He=0,We=0;for(let Ue=fe;UeYVt});var ZVt="providePostPasteEdits";function YVt(t,r,a,u,h,p,m,C){return{edits:er.ChangeTracker.with({host:h,formatContext:m,preferences:p},T=>eHt(t,r,a,u,h,p,m,C,T)),fixId:ZVt}}function eHt(t,r,a,u,h,p,m,C,b){let T;r.length!==a.length&&(T=r.length===1?r:[r.join(` +`)]);const E=[];let N=t.text;for(let R=a.length-1;R>=0;R--){const{pos:F,end:j}=a[R];N=T?N.slice(0,F)+T[0]+N.slice(j):N.slice(0,F)+r[R]+N.slice(j)}z.checkDefined(h.runWithTemporaryFileUpdate).call(h,t.fileName,N,(R,F,j)=>{const U=Ch.createImportAdder(j,R,p,h);if(u!=null&&u.range){z.assert(u.range.length===r.length),u.range.forEach(re=>{const Y=u.file.statements,ue=Nt(Y,Se=>Se.end>re.pos);if(ue===-1)return;let te=Nt(Y,Se=>Se.end>=re.end,ue);te!==-1&&re.end<=Y[te].getStart()&&te--,E.push(...Y.slice(ue,te===-1?Y.length:te+1))});const q=kX(u.file,E,F.getTypeChecker(),_Pe(j,E,F.getTypeChecker()));z.assertIsDefined(F);const Q=!Rde(t.fileName,F,h,!!u.file.commonJsModuleIndicator);sPe(u.file,q.targetFileImportsFromOldFile,b,Q),gPe(u.file,q.oldImportsNeededByTargetFile,q.targetFileImportsFromOldFile,F.getTypeChecker(),R,U)}else{const q={sourceFile:j,program:F,cancellationToken:C,host:h,preferences:p,formatContext:m};jo(j,function Q(re){lt(re)&&!(F!=null&&F.getTypeChecker().resolveName(re.text,re,-1,!1))&&U.addImportForUnresolvedIdentifier(q,re,!0),re.forEachChild(Q)})}U.writeFixes(b,bg(u?u.file:t,p))}),a.forEach((R,F)=>{b.replaceRangeWithText(t,{pos:R.pos,end:R.end},T?T[0]:r[F])})}var klt={};l(klt,{ANONYMOUS:()=>Tde,AccessFlags:()=>HCe,AssertionLevel:()=>Xbe,AssignmentDeclarationKind:()=>QCe,AssignmentKind:()=>bxe,Associativity:()=>Ixe,BreakpointResolver:()=>kfe,BuilderFileEmit:()=>rIe,BuilderProgramKind:()=>dIe,BuilderState:()=>X0,CallHierarchy:()=>YP,CharacterCodes:()=>aSe,CheckFlags:()=>FCe,CheckMode:()=>$le,ClassificationType:()=>Aue,ClassificationTypeNames:()=>mNe,CommentDirectiveType:()=>SCe,Comparison:()=>w,CompletionInfoFlags:()=>uNe,CompletionTriggerKind:()=>Lue,Completions:()=>sA,ContainerFlags:()=>ADe,ContextFlags:()=>ICe,Debug:()=>z,DiagnosticCategory:()=>g$,Diagnostics:()=>k,DocumentHighlights:()=>bX,ElementFlags:()=>VCe,EmitFlags:()=>Wre,EmitHint:()=>fSe,EmitOnly:()=>xCe,EndOfLineState:()=>hNe,ExitStatus:()=>kCe,ExportKind:()=>_Le,Extension:()=>lSe,ExternalEmitHelpers:()=>dSe,FileIncludeKind:()=>Ire,FilePreprocessingDiagnosticsKind:()=>wCe,FileSystemEntryKind:()=>CSe,FileWatcherEventKind:()=>vSe,FindAllReferences:()=>xc,FlattenLevel:()=>oEe,FlowFlags:()=>p$,ForegroundColorEscapeSequences:()=>QEe,FunctionFlags:()=>Txe,GeneratedIdentifierFlags:()=>Ere,GetLiteralTextFlags:()=>Owe,GoToDefinition:()=>G3,HighlightSpanKind:()=>lNe,IdentifierNameMap:()=>w3,IdentifierNameMultiMap:()=>YDe,ImportKind:()=>hLe,ImportsNotUsedAsValues:()=>iSe,IndentStyle:()=>cNe,IndexFlags:()=>jCe,IndexKind:()=>qCe,InferenceFlags:()=>GCe,InferencePriority:()=>JCe,InlayHintKind:()=>aNe,InlayHints:()=>ghe,InternalEmitFlags:()=>cSe,InternalSymbolName:()=>BCe,IntersectionFlags:()=>ECe,InvalidatedProjectKind:()=>MIe,JSDocParsingMode:()=>mSe,JsDoc:()=>l2,JsTyping:()=>Gv,JsxEmit:()=>tSe,JsxFlags:()=>yCe,JsxReferenceKind:()=>zCe,LanguageFeatureMinimumTarget:()=>uSe,LanguageServiceMode:()=>sNe,LanguageVariant:()=>sSe,LexicalEnvironmentFlags:()=>_Se,ListFormat:()=>pSe,LogLevel:()=>lCe,MapCode:()=>mhe,MemberOverrideStatus:()=>TCe,ModifierFlags:()=>Tre,ModuleDetectionKind:()=>XCe,ModuleInstanceState:()=>LDe,ModuleKind:()=>yB,ModuleResolutionKind:()=>qR,ModuleSpecifierEnding:()=>Eke,NavigateTo:()=>RLe,NavigationBar:()=>BLe,NewLineKind:()=>nSe,NodeBuilderFlags:()=>NCe,NodeCheckFlags:()=>Pre,NodeFactoryFlags:()=>e2e,NodeFlags:()=>kre,NodeResolutionFeatures:()=>CDe,ObjectFlags:()=>Ore,OperationCanceledException:()=>UR,OperatorPrecedence:()=>Nxe,OrganizeImports:()=>c2,OrganizeImportsMode:()=>Nue,OuterExpressionKinds:()=>hSe,OutliningElementsCollector:()=>bhe,OutliningSpanKind:()=>dNe,OutputFileType:()=>fNe,PackageJsonAutoImportPreference:()=>rNe,PackageJsonDependencyGroup:()=>nNe,PatternMatchKind:()=>$de,PollingInterval:()=>Vre,PollingWatchKind:()=>eSe,PragmaKindFlags:()=>gSe,PrivateIdentifierKind:()=>d2e,ProcessLevel:()=>fEe,ProgramUpdateLevel:()=>qEe,QuotePreference:()=>HNe,RegularExpressionFlags:()=>bCe,RelationComparisonResult:()=>Dre,Rename:()=>sZ,ScriptElementKind:()=>pNe,ScriptElementKindModifier:()=>gNe,ScriptKind:()=>Rre,ScriptSnapshot:()=>DQ,ScriptTarget:()=>rSe,SemanticClassificationFormat:()=>oNe,SemanticMeaning:()=>vNe,SemicolonPreference:()=>Pue,SignatureCheckMode:()=>Jle,SignatureFlags:()=>Mre,SignatureHelp:()=>KH,SignatureInfo:()=>nIe,SignatureKind:()=>UCe,SmartSelectionRange:()=>whe,SnippetKind:()=>Bre,StatisticType:()=>JIe,StructureIsReused:()=>Nre,SymbolAccessibility:()=>ACe,SymbolDisplay:()=>kS,SymbolDisplayPartKind:()=>IQ,SymbolFlags:()=>Lre,SymbolFormatFlags:()=>PCe,SyntaxKind:()=>xre,SyntheticSymbolKind:()=>OCe,Ternary:()=>KCe,ThrottledCancellationToken:()=>JPe,TokenClass:()=>_Ne,TokenFlags:()=>CCe,TransformFlags:()=>Fre,TypeFacts:()=>qle,TypeFlags:()=>Are,TypeFormatFlags:()=>LCe,TypeMapKind:()=>$Ce,TypePredicateKind:()=>MCe,TypeReferenceSerializationKind:()=>RCe,UnionReduction:()=>DCe,UpToDateStatusType:()=>EIe,VarianceFlags:()=>WCe,Version:()=>B0,VersionRange:()=>h$,WatchDirectoryFlags:()=>oSe,WatchDirectoryKind:()=>YCe,WatchFileKind:()=>ZCe,WatchLogLevel:()=>JEe,WatchType:()=>tf,accessPrivateIdentifier:()=>rEe,addDisposableResourceHelper:()=>W2e,addEmitFlags:()=>Wv,addEmitHelper:()=>vP,addEmitHelpers:()=>Jb,addInternalEmitFlags:()=>gP,addNodeFactoryPatcher:()=>V$e,addObjectAllocatorPatcher:()=>k$e,addRange:()=>un,addRelatedInfo:()=>fa,addSyntheticLeadingComment:()=>l7,addSyntheticTrailingComment:()=>NG,addToSeen:()=>Lm,advancedAsyncSuperHelper:()=>OG,affectsDeclarationPathOptionDeclarations:()=>jTe,affectsEmitOptionDeclarations:()=>HTe,allKeysStartWithDot:()=>NK,altDirectorySeparator:()=>b$,and:()=>u$,append:()=>xi,appendIfUnique:()=>gu,arrayFrom:()=>Fn,arrayIsEqualTo:()=>qs,arrayIsHomogeneous:()=>Fke,arrayIsSorted:()=>ys,arrayOf:()=>Pn,arrayReverseIterator:()=>Mh,arrayToMap:()=>P_,arrayToMultiMap:()=>hh,arrayToNumericMap:()=>By,arraysEqual:()=>pi,assertType:()=>zUe,assign:()=>qo,assignHelper:()=>y2e,asyncDelegator:()=>C2e,asyncGeneratorHelper:()=>b2e,asyncSuperHelper:()=>AG,asyncValues:()=>S2e,attachFileToDiagnostics:()=>aP,awaitHelper:()=>c7,awaiterHelper:()=>x2e,base64decode:()=>tke,base64encode:()=>eke,binarySearch:()=>Fy,binarySearchKey:()=>QC,bindSourceFile:()=>ODe,breakIntoCharacterSpans:()=>ELe,breakIntoWordSpans:()=>ILe,buildLinkParts:()=>QNe,buildOpts:()=>DV,buildOverload:()=>Elt,bundlerModuleNameResolver:()=>SDe,canBeConvertedToAsync:()=>Zde,canHaveDecorators:()=>eD,canHaveExportModifier:()=>ZW,canHaveFlowNode:()=>xW,canHaveIllegalDecorators:()=>tle,canHaveIllegalModifiers:()=>STe,canHaveIllegalType:()=>fJe,canHaveIllegalTypeParameters:()=>CTe,canHaveJSDoc:()=>kW,canHaveLocals:()=>A1,canHaveModifiers:()=>_0,canHaveSymbol:()=>H0,canIncludeBindAndCheckDiagnsotics:()=>XW,canJsonReportNoInputFiles:()=>N7,canProduceDiagnostics:()=>qK,canUsePropertyAccess:()=>dae,canWatchAffectingLocation:()=>yIe,canWatchAtTypes:()=>vIe,canWatchDirectoryOrFile:()=>cQ,cartesianProduct:()=>oCe,cast:()=>ua,chainBundle:()=>Q0,chainDiagnosticMessages:()=>Ro,changeAnyExtension:()=>SB,changeCompilerHostLikeToUseCache:()=>K7,changeExtension:()=>Kw,changeFullExtension:()=>kSe,changesAffectModuleResolution:()=>G$,changesAffectingProgramStructure:()=>Dwe,characterToRegularExpressionFlag:()=>Zre,childIsDecorated:()=>b8,classElementOrClassElementParameterIsDecorated:()=>Qse,classHasClassThisAssignment:()=>lce,classHasDeclaredOrExplicitlyAssignedName:()=>cce,classHasExplicitlyAssignedName:()=>jK,classOrConstructorParameterIsDecorated:()=>oS,classPrivateFieldGetHelper:()=>R2e,classPrivateFieldInHelper:()=>B2e,classPrivateFieldSetHelper:()=>F2e,classicNameResolver:()=>IDe,classifier:()=>XPe,cleanExtendedConfigCache:()=>YK,clear:()=>Xs,clearMap:()=>tp,clearSharedExtendedConfigFileWatcher:()=>Sce,climbPastPropertyAccess:()=>PQ,climbPastPropertyOrElementAccess:()=>SNe,clone:()=>fB,cloneCompilerOptions:()=>Zue,closeFileWatcher:()=>h0,closeFileWatcherOf:()=>tm,codefix:()=>Ch,collapseTextChangeRangesAcrossMultipleVersions:()=>VSe,collectExternalModuleInfo:()=>rce,combine:()=>au,combinePaths:()=>Hr,commandLineOptionOfCustomType:()=>JTe,commentPragmas:()=>m$,commonOptionsWithBuild:()=>cK,commonPackageFolders:()=>Ske,compact:()=>Mo,compareBooleans:()=>bk,compareDataObjects:()=>Voe,compareDiagnostics:()=>q8,compareDiagnosticsSkipRelatedInformation:()=>ZJ,compareEmitHelpers:()=>h2e,compareNumberOfDirectorySeparators:()=>KW,comparePaths:()=>Mb,comparePathsCaseInsensitive:()=>fqe,comparePathsCaseSensitive:()=>dqe,comparePatternKeys:()=>Hle,compareProperties:()=>iCe,compareStringsCaseInsensitive:()=>pB,compareStringsCaseInsensitiveEslintCompatible:()=>Zbe,compareStringsCaseSensitive:()=>Xf,compareStringsCaseSensitiveUI:()=>gB,compareTextSpans:()=>l$,compareValues:()=>hc,compileOnSaveCommandLineOption:()=>aK,compilerOptionsAffectDeclarationPath:()=>bke,compilerOptionsAffectEmit:()=>yke,compilerOptionsAffectSemanticDiagnostics:()=>vke,compilerOptionsDidYouMeanDiagnostics:()=>hK,compilerOptionsIndicateEsModules:()=>sde,compose:()=>HUe,computeCommonSourceDirectoryOfFilenames:()=>GEe,computeLineAndCharacterOfPosition:()=>g6,computeLineOfPosition:()=>QR,computeLineStarts:()=>ML,computePositionOfLineAndCharacter:()=>k$,computeSignature:()=>fIe,computeSignatureWithDiagnostics:()=>Uce,computeSuggestionDiagnostics:()=>Kde,computedOptions:()=>Cd,concatenate:()=>no,concatenateDiagnosticMessageChains:()=>_ke,configDirTemplateSubstitutionOptions:()=>qTe,configDirTemplateSubstitutionWatchOptions:()=>$Te,consumesNodeCoreModules:()=>uX,contains:()=>Mt,containsIgnoredPath:()=>i7,containsObjectRestOrSpread:()=>wV,containsParseError:()=>E6,containsPath:()=>l0,convertCompilerOptionsForTelemetry:()=>cDe,convertCompilerOptionsFromJson:()=>SGe,convertJsonOption:()=>xI,convertToBase64:()=>Yxe,convertToJson:()=>NV,convertToObject:()=>iDe,convertToOptionsWithAbsolutePaths:()=>mK,convertToRelativePath:()=>GR,convertToTSConfig:()=>wle,convertTypeAcquisitionFromJson:()=>wGe,copyComments:()=>NI,copyEntries:()=>K$,copyLeadingComments:()=>W3,copyProperties:()=>dre,copyTrailingAsLeadingComments:()=>SH,copyTrailingComments:()=>uF,couldStartTrivia:()=>NSe,countWhere:()=>$n,createAbstractBuilder:()=>xQe,createAccessorPropertyBackingField:()=>rle,createAccessorPropertyGetRedirector:()=>NTe,createAccessorPropertySetRedirector:()=>LTe,createBaseNodeFactory:()=>Kke,createBinaryExpressionTrampoline:()=>rK,createBindingHelper:()=>PG,createBuildInfo:()=>KK,createBuilderProgram:()=>qce,createBuilderProgramUsingProgramBuildInfo:()=>gIe,createBuilderStatusReporter:()=>vQ,createCacheWithRedirects:()=>Ale,createCacheableExportInfoMap:()=>Fde,createCachedDirectoryStructureHost:()=>XK,createClassNamedEvaluationHelperBlock:()=>dEe,createClassThisAssignmentBlock:()=>cEe,createClassifier:()=>nZe,createCommentDirectivesMap:()=>Awe,createCompilerDiagnostic:()=>Gc,createCompilerDiagnosticForInvalidCustomType:()=>GTe,createCompilerDiagnosticFromMessageChain:()=>XJ,createCompilerHost:()=>KEe,createCompilerHostFromProgramHost:()=>due,createCompilerHostWorker:()=>eQ,createDetachedDiagnostic:()=>oP,createDiagnosticCollection:()=>O8,createDiagnosticForFileFromMessageChain:()=>qse,createDiagnosticForNode:()=>Kn,createDiagnosticForNodeArray:()=>N6,createDiagnosticForNodeArrayFromMessageChain:()=>eW,createDiagnosticForNodeFromMessageChain:()=>$y,createDiagnosticForNodeInSourceFile:()=>Jg,createDiagnosticForRange:()=>Jwe,createDiagnosticMessageChainFromDiagnostic:()=>$we,createDiagnosticReporter:()=>qP,createDocumentPositionMapper:()=>XDe,createDocumentRegistry:()=>mLe,createDocumentRegistryInternal:()=>zde,createEmitAndSemanticDiagnosticsBuilderProgram:()=>Kce,createEmitHelperFactory:()=>f2e,createEmptyExports:()=>gV,createEvaluator:()=>$ke,createExpressionForJsxElement:()=>_Te,createExpressionForJsxFragment:()=>pTe,createExpressionForObjectLiteralElementLike:()=>gTe,createExpressionForPropertyName:()=>Kae,createExpressionFromEntityName:()=>mV,createExternalHelpersImportDeclarationIfNeeded:()=>Zae,createFileDiagnostic:()=>ef,createFileDiagnosticFromMessageChain:()=>sJ,createFlowNode:()=>j1,createForOfBindingStatement:()=>Gae,createFutureSourceFile:()=>vX,createGetCanonicalFileName:()=>Zf,createGetIsolatedDeclarationErrors:()=>MEe,createGetSourceFile:()=>Dce,createGetSymbolAccessibilityDiagnosticForNode:()=>vS,createGetSymbolAccessibilityDiagnosticForNodeName:()=>OEe,createGetSymbolWalker:()=>MDe,createIncrementalCompilerHost:()=>mQ,createIncrementalProgram:()=>DIe,createJsxFactoryExpression:()=>Jae,createLanguageService:()=>GPe,createLanguageServiceSourceFile:()=>RX,createMemberAccessForPropertyName:()=>SI,createModeAwareCache:()=>v3,createModeAwareCacheKey:()=>O7,createModuleNotFoundChain:()=>Q$,createModuleResolutionCache:()=>y3,createModuleResolutionLoader:()=>Mce,createModuleResolutionLoaderUsingGlobalCache:()=>wIe,createModuleSpecifierResolutionHost:()=>KP,createMultiMap:()=>Ug,createNameResolver:()=>gae,createNodeConverters:()=>Zke,createNodeFactory:()=>iV,createOptionNameMap:()=>dK,createOverload:()=>Rhe,createPackageJsonImportFilter:()=>V3,createPackageJsonInfo:()=>Ide,createParenthesizerRules:()=>Qke,createPatternMatcher:()=>SLe,createPrinter:()=>ax,createPrinterWithDefaults:()=>zEe,createPrinterWithRemoveComments:()=>DI,createPrinterWithRemoveCommentsNeverAsciiEscape:()=>UEe,createPrinterWithRemoveCommentsOmitTrailingSemicolon:()=>QK,createProgram:()=>XV,createProgramHost:()=>fue,createPropertyNameNodeForIdentifierOrLiteral:()=>CG,createQueue:()=>_B,createRange:()=>Gg,createRedirectedBuilderProgram:()=>Gce,createResolutionCache:()=>Xce,createRuntimeTypeSerializer:()=>mEe,createScanner:()=>zy,createSemanticDiagnosticsBuilderProgram:()=>wQe,createSet:()=>fre,createSolutionBuilder:()=>PIe,createSolutionBuilderHost:()=>NIe,createSolutionBuilderWithWatch:()=>AIe,createSolutionBuilderWithWatchHost:()=>LIe,createSortedArray:()=>Yi,createSourceFile:()=>RP,createSourceMapGenerator:()=>qDe,createSourceMapSource:()=>U$e,createSuperAccessVariableStatement:()=>UK,createSymbolTable:()=>ga,createSymlinkCache:()=>Xoe,createSyntacticTypeNodeBuilder:()=>eNe,createSystemWatchFunctions:()=>SSe,createTextChange:()=>_H,createTextChangeFromStartLength:()=>$Q,createTextChangeRange:()=>LB,createTextRangeFromNode:()=>tde,createTextRangeFromSpan:()=>qQ,createTextSpan:()=>Pf,createTextSpanFromBounds:()=>sd,createTextSpanFromNode:()=>b_,createTextSpanFromRange:()=>cx,createTextSpanFromStringLiteralLikeContent:()=>ede,createTextWriter:()=>RW,createTokenRange:()=>Roe,createTypeChecker:()=>zDe,createTypeReferenceDirectiveResolutionCache:()=>TK,createTypeReferenceResolutionLoader:()=>tQ,createWatchCompilerHost:()=>OQe,createWatchCompilerHostOfConfigFile:()=>hue,createWatchCompilerHostOfFilesAndCompilerOptions:()=>_ue,createWatchFactory:()=>uue,createWatchHost:()=>cue,createWatchProgram:()=>pue,createWatchStatusReporter:()=>Yce,createWriteFileMeasuringIO:()=>Ece,declarationNameToString:()=>sc,decodeMappings:()=>tce,decodedTextSpanIntersectsWith:()=>NB,decorateHelper:()=>_2e,deduplicate:()=>jt,defaultIncludeSpec:()=>Tle,defaultInitCompilerOptions:()=>gle,defaultMaximumTruncationLength:()=>h8,diagnosticCategoryName:()=>JE,diagnosticToString:()=>cD,diagnosticsEqualityComparer:()=>YJ,directoryProbablyExists:()=>U0,directorySeparator:()=>Hc,displayPart:()=>ip,displayPartsToString:()=>MH,disposeEmitNodes:()=>yae,disposeResourcesHelper:()=>V2e,documentSpansEqual:()=>fde,dumpTracingLegend:()=>vCe,elementAt:()=>bp,elideNodes:()=>ITe,emitComments:()=>jxe,emitDetachedComments:()=>zxe,emitFiles:()=>bce,emitFilesAndReportErrors:()=>hQ,emitFilesAndReportErrorsAndGetExitStatus:()=>lue,emitModuleKindIsNonNodeESM:()=>tG,emitNewLineBeforeLeadingCommentOfPosition:()=>Hxe,emitNewLineBeforeLeadingComments:()=>Wxe,emitNewLineBeforeLeadingCommentsOfPosition:()=>Vxe,emitResolverSkipsTypeChecking:()=>yce,emitSkippedWithNoDiagnostics:()=>Hce,emptyArray:()=>x,emptyFileSystemEntries:()=>nae,emptyMap:()=>I,emptyOptions:()=>Fm,emptySet:()=>P,endsWith:()=>mu,ensurePathIsNonModuleName:()=>KE,ensureScriptKind:()=>dG,ensureTrailingDirectorySeparator:()=>Xd,entityNameToString:()=>kp,enumerateInsertsAndDeletes:()=>f$,equalOwnProperties:()=>Nf,equateStringsCaseInsensitive:()=>yk,equateStringsCaseSensitive:()=>UE,equateValues:()=>XC,esDecorateHelper:()=>m2e,escapeJsxAttributeString:()=>Coe,escapeLeadingUnderscores:()=>du,escapeNonAsciiString:()=>LJ,escapeSnippetText:()=>zT,escapeString:()=>B1,escapeTemplateSubstitution:()=>yoe,evaluatorResult:()=>Hd,every:()=>Be,executeCommandLine:()=>pXe,expandPreOrPostfixIncrementOrDecrementExpression:()=>ZG,explainFiles:()=>nue,explainIfFileIsRedirectAndImpliedFormat:()=>rue,exportAssignmentIsAlias:()=>V6,exportStarHelper:()=>M2e,expressionResultIsUnused:()=>Wke,extend:()=>hB,extendsHelper:()=>k2e,extensionFromPath:()=>X8,extensionIsTS:()=>mG,extensionsNotSupportingExtensionlessResolution:()=>pG,externalHelpersModuleNameText:()=>Ik,factory:()=>G,fileExtensionIs:()=>tu,fileExtensionIsOneOf:()=>rd,fileIncludeReasonToDiagnostics:()=>aue,fileShouldUseJavaScriptRequire:()=>Rde,filter:()=>Ri,filterMutate:()=>ao,filterSemanticDiagnostics:()=>sQ,find:()=>Me,findAncestor:()=>Xi,findBestPatternMatch:()=>mre,findChildOfKind:()=>Hl,findComputedPropertyNameCacheAssignment:()=>sK,findConfigFile:()=>kce,findConstructorDeclaration:()=>tV,findContainingList:()=>FQ,findDiagnosticForNode:()=>lLe,findFirstNonJsxWhitespaceToken:()=>DNe,findIndex:()=>Nt,findLast:()=>vt,findLastIndex:()=>Ni,findListItemInfo:()=>TNe,findMap:()=>ci,findModifier:()=>R3,findNextToken:()=>aD,findPackageJson:()=>oLe,findPackageJsons:()=>Ede,findPrecedingMatchingToken:()=>zQ,findPrecedingToken:()=>Dd,findSuperStatementIndexPath:()=>WK,findTokenOnLeftOfPosition:()=>VQ,findUseStrictPrologue:()=>Xae,first:()=>ma,firstDefined:()=>Z,firstDefinedIterator:()=>ee,firstIterator:()=>vT,firstOrOnly:()=>Ade,firstOrUndefined:()=>lu,firstOrUndefinedIterator:()=>Pw,fixupCompilerOptions:()=>Yde,flatMap:()=>Ln,flatMapIterator:()=>zg,flatMapToMutable:()=>bd,flatten:()=>zs,flattenCommaList:()=>PTe,flattenDestructuringAssignment:()=>TI,flattenDestructuringBinding:()=>nD,flattenDiagnosticMessageText:()=>Jv,forEach:()=>W,forEachAncestor:()=>Ewe,forEachAncestorDirectory:()=>c0,forEachChild:()=>jo,forEachChildRecursively:()=>MP,forEachEmittedFile:()=>pce,forEachEnclosingBlockScopeContainer:()=>zwe,forEachEntry:()=>hf,forEachExternalModuleToImportFrom:()=>Wde,forEachImportClauseDeclaration:()=>vxe,forEachKey:()=>Bb,forEachLeadingCommentRange:()=>kB,forEachNameInAccessChainWalkingLeft:()=>cke,forEachNameOfDefaultExport:()=>Vde,forEachPropertyAssignment:()=>A6,forEachResolvedProjectReference:()=>Fce,forEachReturnStatement:()=>sS,forEachRight:()=>X,forEachTrailingCommentRange:()=>TB,forEachTsConfigPropArray:()=>sW,forEachUnique:()=>_de,forEachYieldExpression:()=>Ywe,forSomeAncestorDirectory:()=>w$e,formatColorAndReset:()=>rD,formatDiagnostic:()=>Ice,formatDiagnostics:()=>tQe,formatDiagnosticsWithColorAndContext:()=>YEe,formatGeneratedName:()=>Jk,formatGeneratedNamePart:()=>_3,formatLocation:()=>Nce,formatMessage:()=>lP,formatStringFromArgs:()=>Qy,formatting:()=>gd,fullTripleSlashAMDReferencePathRegEx:()=>Zwe,fullTripleSlashReferencePathRegEx:()=>Xwe,generateDjb2Hash:()=>$R,generateTSConfig:()=>rDe,generatorHelper:()=>P2e,getAdjustedReferenceLocation:()=>$ue,getAdjustedRenameLocation:()=>WQ,getAliasDeclarationFromName:()=>loe,getAllAccessorDeclarations:()=>qw,getAllDecoratorsOfClass:()=>oce,getAllDecoratorsOfClassElement:()=>HK,getAllJSDocTags:()=>A$,getAllJSDocTagsOfKind:()=>Oqe,getAllKeys:()=>ure,getAllProjectOutputs:()=>GK,getAllSuperTypeNodes:()=>E8,getAllowJSCompilerOption:()=>Jw,getAllowSyntheticDefaultImports:()=>cP,getAncestor:()=>Rk,getAnyExtensionFromPath:()=>p6,getAreDeclarationMapsEnabled:()=>eG,getAssignedExpandoInitializer:()=>JL,getAssignedName:()=>L$,getAssignedNameOfIdentifier:()=>U7,getAssignmentDeclarationKind:()=>Lu,getAssignmentDeclarationPropertyAccessKind:()=>yW,getAssignmentTargetKind:()=>Mk,getAutomaticTypeDirectiveNames:()=>xK,getBaseFileName:()=>fd,getBinaryOperatorPrecedence:()=>OW,getBuildInfo:()=>Cce,getBuildInfoFileVersionMap:()=>Jce,getBuildInfoText:()=>HEe,getBuildOrderFromAnyBuildOrder:()=>tH,getBuilderCreationParameters:()=>aQ,getBuilderFileEmit:()=>lx,getCanonicalDiagnostic:()=>Gwe,getCheckFlags:()=>Pu,getClassExtendsHeritageElement:()=>MT,getClassLikeDeclarationOfSymbol:()=>Ub,getCombinedLocalAndExportSymbolFlags:()=>K6,getCombinedModifierFlags:()=>wk,getCombinedNodeFlags:()=>Rb,getCombinedNodeFlagsAlwaysIncludeJSDoc:()=>rse,getCommentRange:()=>Vv,getCommonSourceDirectory:()=>G7,getCommonSourceDirectoryOfConfig:()=>UP,getCompilerOptionValue:()=>rG,getCompilerOptionsDiffValue:()=>nDe,getConditions:()=>sx,getConfigFileParsingDiagnostics:()=>sD,getConstantValue:()=>r2e,getContainerFlags:()=>zle,getContainerNode:()=>II,getContainingClass:()=>Sf,getContainingClassExcludingClassDecorators:()=>hJ,getContainingClassStaticBlock:()=>cxe,getContainingFunction:()=>Kp,getContainingFunctionDeclaration:()=>lxe,getContainingFunctionOrClassStaticBlock:()=>fJ,getContainingNodeArray:()=>Vke,getContainingObjectLiteralElement:()=>RH,getContextualTypeFromParent:()=>iX,getContextualTypeFromParentOrAncestorTypeNode:()=>BQ,getCurrentTime:()=>eH,getDeclarationDiagnostics:()=>REe,getDeclarationEmitExtensionForPath:()=>OJ,getDeclarationEmitOutputFilePath:()=>Oxe,getDeclarationEmitOutputFilePathWorker:()=>AJ,getDeclarationFileExtension:()=>lle,getDeclarationFromName:()=>D8,getDeclarationModifierFlagsFromSymbol:()=>Qg,getDeclarationOfKind:()=>Jc,getDeclarationsOfKind:()=>kwe,getDeclaredExpandoInitializer:()=>w8,getDecorators:()=>Fw,getDefaultCompilerOptions:()=>MX,getDefaultFormatCodeSettings:()=>EQ,getDefaultLibFileName:()=>EB,getDefaultLibFilePath:()=>KPe,getDefaultLikeExportInfo:()=>yX,getDefaultLikeExportNameFromDeclaration:()=>fX,getDiagnosticText:()=>H_,getDiagnosticsWithinSpan:()=>cLe,getDirectoryPath:()=>rs,getDirectoryToWatchFailedLookupLocation:()=>Qce,getDirectoryToWatchFailedLookupLocationFromTypeRoot:()=>CIe,getDocumentPositionMapper:()=>Gde,getDocumentSpansEqualityComparer:()=>hde,getESModuleInterop:()=>Xy,getEditsForFileRename:()=>yLe,getEffectiveBaseTypeNode:()=>Pv,getEffectiveConstraintOfTypeParameter:()=>C6,getEffectiveContainerForJSDocTemplateTag:()=>TJ,getEffectiveImplementsTypeNodes:()=>H6,getEffectiveInitializer:()=>pW,getEffectiveJSDocHost:()=>Ok,getEffectiveModifierFlags:()=>Wh,getEffectiveModifierFlagsAlwaysIncludeJSDoc:()=>Jxe,getEffectiveModifierFlagsNoCache:()=>Gxe,getEffectiveReturnTypeNode:()=>Dp,getEffectiveSetAccessorTypeAnnotationNode:()=>Bxe,getEffectiveTypeAnnotationNode:()=>hd,getEffectiveTypeParameterDeclarations:()=>Bw,getEffectiveTypeRoots:()=>A7,getElementOrPropertyAccessArgumentExpressionOrName:()=>kJ,getElementOrPropertyAccessName:()=>Wb,getElementsOfBindingOrAssignmentPattern:()=>h3,getEmitDeclarations:()=>fg,getEmitFlags:()=>Ya,getEmitHelpers:()=>LG,getEmitModuleDetectionKind:()=>pke,getEmitModuleKind:()=>Vh,getEmitModuleResolutionKind:()=>f_,getEmitScriptTarget:()=>il,getEmitStandardClassFields:()=>Koe,getEnclosingBlockScopeContainer:()=>j0,getEnclosingContainer:()=>rJ,getEncodedSemanticClassifications:()=>Hde,getEncodedSyntacticClassifications:()=>jde,getEndLinePosition:()=>KB,getEntityNameFromTypeNode:()=>lW,getEntrypointsFromPackageJsonInfo:()=>Ble,getErrorCountForSummary:()=>dQ,getErrorSpanForNode:()=>nI,getErrorSummaryText:()=>tue,getEscapedTextOfIdentifierOrLiteral:()=>L8,getEscapedTextOfJsxAttributeName:()=>s7,getEscapedTextOfJsxNamespacedName:()=>hP,getExpandoInitializer:()=>Pk,getExportAssignmentExpression:()=>coe,getExportInfoMap:()=>EH,getExportNeedsImportStarHelper:()=>ZDe,getExpressionAssociativity:()=>goe,getExpressionPrecedence:()=>A8,getExternalHelpersModuleName:()=>tK,getExternalModuleImportEqualsDeclarationExpression:()=>C8,getExternalModuleName:()=>GL,getExternalModuleNameFromDeclaration:()=>Pxe,getExternalModuleNameFromPath:()=>xoe,getExternalModuleNameLiteral:()=>OP,getExternalModuleRequireArgument:()=>Zse,getFallbackOptions:()=>JV,getFileEmitOutput:()=>iIe,getFileMatcherPatterns:()=>uG,getFileNamesFromConfigSpecs:()=>L7,getFileWatcherEventKind:()=>zre,getFilesInErrorForSummary:()=>fQ,getFirstConstructorWithBody:()=>Gy,getFirstIdentifier:()=>Ip,getFirstNonSpaceCharacterPosition:()=>YNe,getFirstProjectOutput:()=>vce,getFixableErrorSpanExpression:()=>Lde,getFormatCodeSettingsForWriting:()=>gX,getFullWidth:()=>GB,getFunctionFlags:()=>ad,getHeritageClause:()=>NW,getHostSignatureFromJSDoc:()=>Ak,getIdentifierAutoGenerate:()=>J$e,getIdentifierGeneratedImportReference:()=>u2e,getIdentifierTypeArguments:()=>fI,getImmediatelyInvokedFunctionExpression:()=>NT,getImpliedNodeFormatForFile:()=>QV,getImpliedNodeFormatForFileWorker:()=>rQ,getImportNeedsImportDefaultHelper:()=>nce,getImportNeedsImportStarHelper:()=>FK,getIndentSize:()=>q6,getIndentString:()=>PJ,getInferredLibraryNameResolveFrom:()=>nQ,getInitializedVariables:()=>j8,getInitializerOfBinaryExpression:()=>toe,getInitializerOfBindingOrAssignmentElement:()=>bV,getInterfaceBaseTypeNodes:()=>I8,getInternalEmitFlags:()=>d0,getInvokedExpression:()=>gJ,getIsolatedModules:()=>Xg,getJSDocAugmentsTag:()=>QSe,getJSDocClassTag:()=>ase,getJSDocCommentRanges:()=>Jse,getJSDocCommentsAndTags:()=>noe,getJSDocDeprecatedTag:()=>lse,getJSDocDeprecatedTagNoCache:()=>nwe,getJSDocEnumTag:()=>cse,getJSDocHost:()=>AT,getJSDocImplementsTags:()=>XSe,getJSDocOverloadTags:()=>soe,getJSDocOverrideTagNoCache:()=>iwe,getJSDocParameterTags:()=>b6,getJSDocParameterTagsNoCache:()=>$Se,getJSDocPrivateTag:()=>Iqe,getJSDocPrivateTagNoCache:()=>YSe,getJSDocProtectedTag:()=>Nqe,getJSDocProtectedTagNoCache:()=>ewe,getJSDocPublicTag:()=>Eqe,getJSDocPublicTagNoCache:()=>ZSe,getJSDocReadonlyTag:()=>Lqe,getJSDocReadonlyTagNoCache:()=>twe,getJSDocReturnTag:()=>rwe,getJSDocReturnType:()=>AB,getJSDocRoot:()=>W6,getJSDocSatisfiesExpressionType:()=>hae,getJSDocSatisfiesTag:()=>use,getJSDocTags:()=>Tk,getJSDocTagsNoCache:()=>Aqe,getJSDocTemplateTag:()=>Pqe,getJSDocThisTag:()=>P$,getJSDocType:()=>kk,getJSDocTypeAliasName:()=>ele,getJSDocTypeAssertionType:()=>T7,getJSDocTypeParameterDeclarations:()=>WJ,getJSDocTypeParameterTags:()=>JSe,getJSDocTypeParameterTagsNoCache:()=>GSe,getJSDocTypeTag:()=>xk,getJSXImplicitImportBase:()=>oG,getJSXRuntimeImport:()=>aG,getJSXTransformEnabled:()=>sG,getKeyForCompilerOptions:()=>Ple,getLanguageVariant:()=>qW,getLastChild:()=>Hoe,getLeadingCommentRanges:()=>Hy,getLeadingCommentRangesOfNode:()=>$se,getLeftmostAccessExpression:()=>Q6,getLeftmostExpression:()=>X6,getLibraryNameFromLibFileName:()=>Bce,getLineAndCharacterOfPosition:()=>Da,getLineInfo:()=>ece,getLineOfLocalPosition:()=>M8,getLineOfLocalPositionFromLineMap:()=>uI,getLineStartPositionForPosition:()=>Bm,getLineStarts:()=>Wy,getLinesBetweenPositionAndNextNonWhitespaceCharacter:()=>oke,getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter:()=>ske,getLinesBetweenPositions:()=>XR,getLinesBetweenRangeEndAndRangeStart:()=>Foe,getLinesBetweenRangeEndPositions:()=>S$e,getLiteralText:()=>Mwe,getLocalNameForExternalImport:()=>f3,getLocalSymbolForExportDefault:()=>W8,getLocaleSpecificMessage:()=>Po,getLocaleTimeString:()=>YV,getMappedContextSpan:()=>pde,getMappedDocumentSpan:()=>ZQ,getMappedLocation:()=>aF,getMatchedFileSpec:()=>sue,getMatchedIncludeSpec:()=>oue,getMeaningFromDeclaration:()=>NQ,getMeaningFromLocation:()=>EI,getMembersOfDeclaration:()=>exe,getModeForFileReference:()=>GV,getModeForResolutionAtIndex:()=>eIe,getModeForUsageLocation:()=>Pce,getModifiedTime:()=>AL,getModifiers:()=>CT,getModuleInstanceState:()=>Yb,getModuleNameStringLiteralAt:()=>ZV,getModuleSpecifierEndingPreference:()=>Nke,getModuleSpecifierResolverHost:()=>ode,getNameForExportedSymbol:()=>dX,getNameFromImportAttribute:()=>kG,getNameFromIndexInfo:()=>Uwe,getNameFromPropertyName:()=>gH,getNameOfAccessExpression:()=>zoe,getNameOfCompilerOptionValue:()=>xle,getNameOfDeclaration:()=>ko,getNameOfExpando:()=>Yse,getNameOfJSDocTypedef:()=>qSe,getNameOfScriptTarget:()=>nG,getNameOrArgument:()=>vW,getNameTable:()=>xfe,getNamesForExportedSymbol:()=>uLe,getNamespaceDeclarationNode:()=>F6,getNewLineCharacter:()=>fS,getNewLineKind:()=>DH,getNewLineOrDefaultFromHost:()=>SS,getNewTargetContainer:()=>dxe,getNextJSDocCommentLocation:()=>roe,getNodeChildren:()=>qae,getNodeForGeneratedName:()=>SV,getNodeId:()=>Tl,getNodeKind:()=>oD,getNodeModifiers:()=>rF,getNodeModulePathParts:()=>SG,getNonAssignedNameOfDeclaration:()=>N$,getNonAssignmentOperatorForCompoundAssignment:()=>H7,getNonAugmentationDeclaration:()=>Wse,getNonDecoratorTokenPosOfNode:()=>Ase,getNormalizedAbsolutePath:()=>bo,getNormalizedAbsolutePathWithoutRoot:()=>Jre,getNormalizedPathComponents:()=>CB,getObjectFlags:()=>Rr,getOperator:()=>voe,getOperatorAssociativity:()=>moe,getOperatorPrecedence:()=>AW,getOptionFromName:()=>vle,getOptionsForLibraryResolution:()=>Ole,getOptionsNameMap:()=>g3,getOrCreateEmitNode:()=>th,getOrCreateExternalHelpersModuleNameIfNeeded:()=>bTe,getOrUpdate:()=>ka,getOriginalNode:()=>uu,getOriginalNodeId:()=>y_,getOriginalSourceFile:()=>d$e,getOutputDeclarationFileName:()=>k3,getOutputDeclarationFileNameWorker:()=>gce,getOutputExtension:()=>JK,getOutputFileNames:()=>YKe,getOutputJSFileNameWorker:()=>mce,getOutputPathsFor:()=>J7,getOutputPathsForBundle:()=>$K,getOwnEmitOutputFilePath:()=>Axe,getOwnKeys:()=>wm,getOwnValues:()=>Za,getPackageJsonInfo:()=>Yk,getPackageJsonTypesVersionsPaths:()=>wK,getPackageJsonsVisibleToFile:()=>aLe,getPackageNameFromTypesPackageName:()=>F7,getPackageScopeForPath:()=>R7,getParameterSymbolFromJSDoc:()=>TW,getParameterTypeNode:()=>B$e,getParentNodeInSpan:()=>vH,getParseTreeNode:()=>xo,getParsedCommandLineOfConfigFile:()=>EV,getPathComponents:()=>Qd,getPathComponentsRelativeTo:()=>Qre,getPathFromPathComponents:()=>Ob,getPathUpdater:()=>qde,getPathsBasePath:()=>MJ,getPatternFromSpec:()=>kke,getPendingEmitKind:()=>I3,getPositionOfLineAndCharacter:()=>wB,getPossibleGenericSignatures:()=>Gue,getPossibleOriginalInputExtensionForExtension:()=>Mxe,getPossibleTypeArgumentsInfo:()=>Kue,getPreEmitDiagnostics:()=>eQe,getPrecedingNonSpaceCharacterPosition:()=>eX,getPrivateIdentifier:()=>ace,getProperties:()=>sce,getProperty:()=>u6,getPropertyArrayElementValue:()=>axe,getPropertyAssignmentAliasLikeExpression:()=>kxe,getPropertyNameForPropertyNameNode:()=>lI,getPropertyNameForUniqueESSymbol:()=>c$e,getPropertyNameFromType:()=>Am,getPropertyNameOfBindingOrAssignmentElement:()=>Yae,getPropertySymbolFromBindingElement:()=>XQ,getPropertySymbolsFromContextualType:()=>FX,getQuoteFromPreference:()=>lde,getQuotePreference:()=>bg,getRangesWhere:()=>Ry,getRefactorContextSpan:()=>QP,getReferencedFileLocation:()=>X7,getRegexFromPattern:()=>Gw,getRegularExpressionForWildcard:()=>J8,getRegularExpressionsForWildcards:()=>lG,getRelativePathFromDirectory:()=>W0,getRelativePathFromFile:()=>KR,getRelativePathToDirectoryOrUrl:()=>OL,getRenameLocation:()=>CH,getReplacementSpanForContextToken:()=>Yue,getResolutionDiagnostic:()=>zce,getResolutionModeOverride:()=>T3,getResolveJsonModule:()=>VT,getResolvePackageJsonExports:()=>Joe,getResolvePackageJsonImports:()=>Goe,getResolvedExternalModuleName:()=>woe,getRestIndicatorOfBindingOrAssignmentElement:()=>iK,getRestParameterElementType:()=>Gse,getRightMostAssignedExpression:()=>gW,getRootDeclaration:()=>Ov,getRootDirectoryOfResolutionCache:()=>SIe,getRootLength:()=>L1,getRootPathSplitLength:()=>EQe,getScriptKind:()=>bde,getScriptKindFromFileName:()=>fG,getScriptTargetFeatures:()=>Ose,getSelectedEffectiveModifierFlags:()=>tP,getSelectedSyntacticModifierFlags:()=>qxe,getSemanticClassifications:()=>pLe,getSemanticJsxChildren:()=>z6,getSetAccessorTypeAnnotationNode:()=>Rxe,getSetAccessorValueParameter:()=>J6,getSetExternalModuleIndicator:()=>$W,getShebang:()=>D$,getSingleInitializerOfVariableStatementOrPropertyDeclaration:()=>ioe,getSingleVariableOfVariableStatement:()=>XL,getSnapshotText:()=>GP,getSnippetElement:()=>bae,getSourceFileOfModule:()=>Z$,getSourceFileOfNode:()=>_n,getSourceFilePathInNewDir:()=>FJ,getSourceFilePathInNewDirWorker:()=>BJ,getSourceFileVersionAsHashFromText:()=>_Q,getSourceFilesToEmit:()=>RJ,getSourceMapRange:()=>_S,getSourceMapper:()=>LLe,getSourceTextOfNodeFromSourceFile:()=>TT,getSpanOfTokenAtPosition:()=>R1,getSpellingSuggestion:()=>qE,getStartPositionOfLine:()=>zw,getStartPositionOfRange:()=>H8,getStartsOnNewLine:()=>a7,getStaticPropertiesAndClassStaticBlock:()=>VK,getStrictOptionValue:()=>Hh,getStringComparer:()=>f6,getSubPatternFromSpec:()=>cG,getSuperCallFromStatement:()=>BK,getSuperContainer:()=>oW,getSupportedCodeFixes:()=>Sfe,getSupportedExtensions:()=>K8,getSupportedExtensionsWithJsonIfResolveJsonModule:()=>GW,getSwitchedType:()=>kde,getSymbolId:()=>Aa,getSymbolNameForPrivateIdentifier:()=>LW,getSymbolParentOrFail:()=>hX,getSymbolTarget:()=>Cde,getSyntacticClassifications:()=>gLe,getSyntacticModifierFlags:()=>uS,getSyntacticModifierFlagsNoCache:()=>Ioe,getSynthesizedDeepClone:()=>Pl,getSynthesizedDeepCloneWithReplacements:()=>bH,getSynthesizedDeepClones:()=>lD,getSynthesizedDeepClonesWithReplacements:()=>Sde,getSyntheticLeadingComments:()=>i3,getSyntheticTrailingComments:()=>oV,getTargetLabel:()=>AQ,getTargetOfBindingOrAssignmentElement:()=>rx,getTemporaryModuleResolutionState:()=>M7,getTextOfConstantValue:()=>Rwe,getTextOfIdentifierOrLiteral:()=>Im,getTextOfJSDocComment:()=>MB,getTextOfJsxAttributeName:()=>eV,getTextOfJsxNamespacedName:()=>o7,getTextOfNode:()=>yu,getTextOfNodeFromSourceText:()=>g8,getTextOfPropertyName:()=>UL,getThisContainer:()=>u_,getThisParameter:()=>RT,getTokenAtPosition:()=>Rs,getTokenPosOfNode:()=>Nk,getTokenSourceMapRange:()=>q$e,getTouchingPropertyName:()=>j_,getTouchingToken:()=>O3,getTrailingCommentRanges:()=>Rw,getTrailingSemicolonDeferringWriter:()=>Soe,getTransformFlagsSubtreeExclusions:()=>t2e,getTransformers:()=>WEe,getTsBuildInfoEmitOutputFilePath:()=>yS,getTsConfigObjectLiteralExpression:()=>y8,getTsConfigPropArrayElementValue:()=>dJ,getTypeAnnotationNode:()=>Fxe,getTypeArgumentOrTypeParameterList:()=>MNe,getTypeKeywordOfTypeOnlyImport:()=>dde,getTypeNode:()=>l2e,getTypeNodeIfAccessible:()=>fF,getTypeParameterFromJsDoc:()=>yxe,getTypeParameterOwner:()=>xqe,getTypesPackageName:()=>LK,getUILocale:()=>eCe,getUniqueName:()=>LI,getUniqueSymbolId:()=>ZNe,getUseDefineForClassFields:()=>JW,getWatchErrorSummaryDiagnosticMessage:()=>eue,getWatchFactory:()=>xce,group:()=>xv,groupBy:()=>d6,guessIndentation:()=>wwe,handleNoEmitOptions:()=>jce,handleWatchOptionsConfigDirTemplateSubstitution:()=>vK,hasAbstractModifier:()=>WT,hasAccessorModifier:()=>Mv,hasAmbientModifier:()=>Eoe,hasChangesInResolutions:()=>Nse,hasChildOfKind:()=>dH,hasContextSensitiveParameters:()=>bG,hasDecorators:()=>dg,hasDocComment:()=>ANe,hasDynamicName:()=>Hb,hasEffectiveModifier:()=>Ep,hasEffectiveModifiers:()=>Doe,hasEffectiveReadonlyModifier:()=>R8,hasExtension:()=>_6,hasIndexSignature:()=>xde,hasInferredType:()=>Gke,hasInitializer:()=>iS,hasInvalidEscape:()=>boe,hasJSDocNodes:()=>Jp,hasJSDocParameterTags:()=>KSe,hasJSFileExtension:()=>Zy,hasJsonModuleEmitEnabled:()=>iG,hasOnlyExpressionInitializer:()=>tI,hasOverrideModifier:()=>VJ,hasPossibleExternalModuleReference:()=>jwe,hasProperty:()=>Vl,hasPropertyAccessExpressionWithName:()=>oH,hasQuestionToken:()=>QL,hasRecordedExternalHelpers:()=>yTe,hasResolutionModeOverride:()=>qke,hasRestParameter:()=>Tse,hasScopeMarker:()=>pwe,hasStaticModifier:()=>_d,hasSyntacticModifier:()=>Kr,hasSyntacticModifiers:()=>Uxe,hasTSFileExtension:()=>dP,hasTabstop:()=>jke,hasTrailingDirectorySeparator:()=>ZC,hasType:()=>q$,hasTypeArguments:()=>r$e,hasZeroOrOneAsteriskCharacter:()=>Qoe,helperString:()=>wae,hostGetCanonicalFileName:()=>cS,hostUsesCaseSensitiveFileNames:()=>$6,idText:()=>dr,identifierIsThisKeyword:()=>Toe,identifierToKeywordKind:()=>QE,identity:()=>fc,identitySourceMapConsumer:()=>ice,ignoreSourceNewlines:()=>Sae,ignoredPaths:()=>y$,importDefaultHelper:()=>O2e,importFromModuleSpecifier:()=>k8,importStarHelper:()=>xae,indexOfAnyCharCode:()=>gn,indexOfNode:()=>I6,indicesOf:()=>mr,inferredTypesContainingFile:()=>Q7,injectClassNamedEvaluationHelperBlockIfMissing:()=>zK,injectClassThisAssignmentIfMissing:()=>uEe,insertImports:()=>ude,insertLeadingStatement:()=>lJe,insertSorted:()=>Ei,insertStatementAfterCustomPrologue:()=>iI,insertStatementAfterStandardPrologue:()=>Kqe,insertStatementsAfterCustomPrologue:()=>Lse,insertStatementsAfterStandardPrologue:()=>qy,intersperse:()=>Te,intrinsicTagNameToString:()=>_ae,introducesArgumentsExoticObject:()=>rxe,inverseJsxOptionMap:()=>TV,isAbstractConstructorSymbol:()=>ake,isAbstractModifier:()=>$2e,isAccessExpression:()=>Sc,isAccessibilityModifier:()=>Xue,isAccessor:()=>Vw,isAccessorModifier:()=>G2e,isAliasSymbolDeclaration:()=>o$e,isAliasableExpression:()=>IW,isAmbientModule:()=>Bh,isAmbientPropertyDeclaration:()=>Hse,isAnonymousFunctionDefinition:()=>P8,isAnyDirectorySeparator:()=>Ure,isAnyImportOrBareOrAccessedRequire:()=>Vwe,isAnyImportOrReExport:()=>ZB,isAnyImportOrRequireStatement:()=>Hwe,isAnyImportSyntax:()=>zL,isAnySupportedFileExtension:()=>R$e,isApplicableVersionedTypesKey:()=>MV,isArgumentExpressionOfElementAccess:()=>Vue,isArray:()=>Lo,isArrayBindingElement:()=>W$,isArrayBindingOrAssignmentElement:()=>jB,isArrayBindingOrAssignmentPattern:()=>bse,isArrayBindingPattern:()=>mS,isArrayLiteralExpression:()=>Rf,isArrayLiteralOrObjectLiteralDestructuringPattern:()=>CS,isArrayTypeNode:()=>fV,isArrowFunction:()=>Dc,isAsExpression:()=>_7,isAssertClause:()=>eTe,isAssertEntry:()=>eJe,isAssertionExpression:()=>Ek,isAssertsKeyword:()=>U2e,isAssignmentDeclaration:()=>S8,isAssignmentExpression:()=>Yd,isAssignmentOperator:()=>jb,isAssignmentPattern:()=>d8,isAssignmentTarget:()=>lS,isAsteriskToken:()=>cV,isAsyncFunction:()=>N8,isAsyncModifier:()=>d7,isAutoAccessorPropertyDeclaration:()=>O_,isAwaitExpression:()=>ex,isAwaitKeyword:()=>Iae,isBigIntLiteral:()=>lV,isBinaryExpression:()=>cr,isBinaryOperatorToken:()=>ETe,isBindableObjectDefinePropertyCall:()=>oI,isBindableStaticAccessExpression:()=>PT,isBindableStaticElementAccessExpression:()=>xJ,isBindableStaticNameExpression:()=>aI,isBindingElement:()=>nl,isBindingElementOfBareOrAccessedRequire:()=>_xe,isBindingName:()=>YE,isBindingOrAssignmentElement:()=>uwe,isBindingOrAssignmentPattern:()=>VB,isBindingPattern:()=>Qo,isBlock:()=>Ho,isBlockLike:()=>j3,isBlockOrCatchScoped:()=>Mse,isBlockScope:()=>jse,isBlockScopedContainerTopLevel:()=>Wwe,isBooleanLiteral:()=>u8,isBreakOrContinueStatement:()=>s8,isBreakStatement:()=>X$e,isBuild:()=>GIe,isBuildInfoFile:()=>VEe,isBuilderProgram:()=>kIe,isBundle:()=>nTe,isCallChain:()=>XE,isCallExpression:()=>sa,isCallExpressionTarget:()=>Oue,isCallLikeExpression:()=>kT,isCallLikeOrFunctionLikeExpression:()=>Cse,isCallOrNewExpression:()=>Dv,isCallOrNewExpressionTarget:()=>Mue,isCallSignatureDeclaration:()=>xP,isCallToHelper:()=>u7,isCaseBlock:()=>y7,isCaseClause:()=>a3,isCaseKeyword:()=>K2e,isCaseOrDefaultClause:()=>z$,isCatchClause:()=>YT,isCatchClauseVariableDeclaration:()=>Hke,isCatchClauseVariableDeclarationOrBindingElement:()=>Rse,isCheckJsEnabledForFile:()=>Z8,isChildOfNodeWithKind:()=>Xqe,isCircularBuildOrder:()=>$P,isClassDeclaration:()=>xd,isClassElement:()=>Vd,isClassExpression:()=>wd,isClassInstanceProperty:()=>lwe,isClassLike:()=>ss,isClassMemberModifier:()=>mse,isClassNamedEvaluationHelperBlock:()=>zP,isClassOrTypeElement:()=>B$,isClassStaticBlockDeclaration:()=>bu,isClassThisAssignmentBlock:()=>z7,isCollapsedRange:()=>C$e,isColonToken:()=>j2e,isCommaExpression:()=>vV,isCommaListExpression:()=>g7,isCommaSequence:()=>k7,isCommaToken:()=>H2e,isComment:()=>UQ,isCommonJsExportPropertyAssignment:()=>cJ,isCommonJsExportedExpression:()=>ixe,isCompoundAssignment:()=>V7,isComputedNonLiteralName:()=>YB,isComputedPropertyName:()=>Ja,isConciseBody:()=>H$,isConditionalExpression:()=>IP,isConditionalTypeNode:()=>$T,isConstAssertion:()=>pae,isConstTypeReference:()=>V0,isConstructSignatureDeclaration:()=>dV,isConstructorDeclaration:()=>fu,isConstructorTypeNode:()=>n3,isContextualKeyword:()=>EJ,isContinueStatement:()=>Q$e,isCustomPrologue:()=>rW,isDebuggerStatement:()=>Z$e,isDeclaration:()=>Yf,isDeclarationBindingElement:()=>WB,isDeclarationFileName:()=>xf,isDeclarationName:()=>F1,isDeclarationNameOfEnumOrNamespace:()=>Boe,isDeclarationReadonly:()=>tW,isDeclarationStatement:()=>ywe,isDeclarationWithTypeParameterChildren:()=>Use,isDeclarationWithTypeParameters:()=>zse,isDecorator:()=>jd,isDecoratorTarget:()=>bNe,isDefaultClause:()=>C7,isDefaultImport:()=>KL,isDefaultModifier:()=>BG,isDefaultedExpandoInitializer:()=>pxe,isDeleteExpression:()=>X2e,isDeleteTarget:()=>aoe,isDeprecatedDeclaration:()=>_X,isDestructuringAssignment:()=>dS,isDiagnosticWithLocation:()=>Nde,isDiskPathRoot:()=>qre,isDoStatement:()=>K$e,isDocumentRegistryEntry:()=>IH,isDotDotDotToken:()=>RG,isDottedName:()=>VW,isDynamicName:()=>NJ,isESSymbolIdentifier:()=>u$e,isEffectiveExternalModule:()=>jL,isEffectiveModuleDeclaration:()=>Bwe,isEffectiveStrictModeSourceFile:()=>Vse,isElementAccessChain:()=>dse,isElementAccessExpression:()=>wc,isEmittedFileOfProgram:()=>$Ee,isEmptyArrayLiteral:()=>Zxe,isEmptyBindingElement:()=>jSe,isEmptyBindingPattern:()=>HSe,isEmptyObjectLiteral:()=>Ooe,isEmptyStatement:()=>Aae,isEmptyStringLiteral:()=>Xse,isEntityName:()=>A_,isEntityNameExpression:()=>pc,isEnumConst:()=>ET,isEnumDeclaration:()=>Uk,isEnumMember:()=>nx,isEqualityOperatorKind:()=>nX,isEqualsGreaterThanToken:()=>z2e,isExclamationToken:()=>uV,isExcludedFile:()=>oDe,isExclusivelyTypeOnlyImportOrExport:()=>Lce,isExpandoPropertyDeclaration:()=>_P,isExportAssignment:()=>Ec,isExportDeclaration:()=>$u,isExportModifier:()=>SP,isExportName:()=>YG,isExportNamespaceAsDefaultDeclaration:()=>tJ,isExportOrDefaultModifier:()=>CV,isExportSpecifier:()=>gh,isExportsIdentifier:()=>sI,isExportsOrModuleExportsOrAlias:()=>tD,isExpression:()=>Ut,isExpressionNode:()=>z0,isExpressionOfExternalModuleImportEqualsDeclaration:()=>xNe,isExpressionOfOptionalChainRoot:()=>M$,isExpressionStatement:()=>_f,isExpressionWithTypeArguments:()=>Gb,isExpressionWithTypeArgumentsInClassExtendsClause:()=>HJ,isExternalModule:()=>Td,isExternalModuleAugmentation:()=>DT,isExternalModuleImportEqualsDeclaration:()=>Lk,isExternalModuleIndicator:()=>UB,isExternalModuleNameRelative:()=>Zd,isExternalModuleReference:()=>Kb,isExternalModuleSymbol:()=>T6,isExternalOrCommonJsModule:()=>ep,isFileLevelReservedGeneratedIdentifier:()=>BB,isFileLevelUniqueName:()=>Y$,isFileProbablyExternalModule:()=>xV,isFirstDeclarationOfSymbolParameter:()=>gde,isFixablePromiseHandler:()=>Xde,isForInOrOfStatement:()=>eI,isForInStatement:()=>qG,isForInitializer:()=>$g,isForOfStatement:()=>hV,isForStatement:()=>zk,isFullSourceFile:()=>aS,isFunctionBlock:()=>IT,isFunctionBody:()=>wse,isFunctionDeclaration:()=>Uu,isFunctionExpression:()=>gc,isFunctionExpressionOrArrowFunction:()=>Qw,isFunctionLike:()=>Bo,isFunctionLikeDeclaration:()=>rc,isFunctionLikeKind:()=>BL,isFunctionLikeOrClassStaticBlockDeclaration:()=>w6,isFunctionOrConstructorTypeNode:()=>cwe,isFunctionOrModuleBlock:()=>vse,isFunctionSymbol:()=>mxe,isFunctionTypeNode:()=>W1,isFutureReservedKeyword:()=>a$e,isGeneratedIdentifier:()=>jc,isGeneratedPrivateIdentifier:()=>ZE,isGetAccessor:()=>tS,isGetAccessorDeclaration:()=>hg,isGetOrSetAccessorDeclaration:()=>RB,isGlobalDeclaration:()=>eZe,isGlobalScopeAugmentation:()=>Iv,isGlobalSourceFile:()=>nS,isGrammarError:()=>Pwe,isHeritageClause:()=>Lp,isHoistedFunction:()=>aJ,isHoistedVariableStatement:()=>lJ,isIdentifier:()=>lt,isIdentifierANonContextualKeyword:()=>foe,isIdentifierName:()=>xxe,isIdentifierOrThisTypeNode:()=>xTe,isIdentifierPart:()=>YC,isIdentifierStart:()=>jy,isIdentifierText:()=>wp,isIdentifierTypePredicate:()=>sxe,isIdentifierTypeReference:()=>Rke,isIfStatement:()=>jk,isIgnoredFileFromWildCardWatching:()=>$V,isImplicitGlob:()=>Yoe,isImportAttribute:()=>tTe,isImportAttributeName:()=>awe,isImportAttributes:()=>mI,isImportCall:()=>Gp,isImportClause:()=>$0,isImportDeclaration:()=>Cu,isImportEqualsDeclaration:()=>kd,isImportKeyword:()=>h7,isImportMeta:()=>P6,isImportOrExportSpecifier:()=>FL,isImportOrExportSpecifierName:()=>XNe,isImportSpecifier:()=>m_,isImportTypeAssertionContainer:()=>Y$e,isImportTypeNode:()=>V1,isImportableFile:()=>Bde,isInComment:()=>bS,isInCompoundLikeAssignment:()=>ooe,isInExpressionContext:()=>mJ,isInJSDoc:()=>dW,isInJSFile:()=>Xn,isInJSXText:()=>LNe,isInJsonFile:()=>yJ,isInNonReferenceComment:()=>BNe,isInReferenceComment:()=>FNe,isInRightSideOfInternalImportEqualsDeclaration:()=>LQ,isInString:()=>JP,isInTemplateString:()=>Jue,isInTopLevelContext:()=>_J,isInTypeQuery:()=>eP,isIncrementalCompilation:()=>$8,isIndexSignatureDeclaration:()=>UT,isIndexedAccessTypeNode:()=>JT,isInferTypeNode:()=>hI,isInfinityOrNaNString:()=>n7,isInitializedProperty:()=>WV,isInitializedVariable:()=>UW,isInsideJsxElement:()=>jQ,isInsideJsxElementOrAttribute:()=>NNe,isInsideNodeModules:()=>kH,isInsideTemplateLiteral:()=>hH,isInstanceOfExpression:()=>jJ,isInstantiatedModule:()=>Kle,isInterfaceDeclaration:()=>Ff,isInternalDeclaration:()=>xwe,isInternalModuleImportEqualsDeclaration:()=>$L,isInternalName:()=>Qae,isIntersectionTypeNode:()=>DP,isIntrinsicJsxName:()=>U6,isIterationStatement:()=>Hw,isJSDoc:()=>G0,isJSDocAllType:()=>oTe,isJSDocAugmentsTag:()=>AP,isJSDocAuthorTag:()=>rJe,isJSDocCallbackTag:()=>Bae,isJSDocClassTag:()=>lTe,isJSDocCommentContainingNode:()=>U$,isJSDocConstructSignature:()=>B6,isJSDocDeprecatedTag:()=>zae,isJSDocEnumTag:()=>pV,isJSDocFunctionType:()=>c3,isJSDocImplementsTag:()=>QG,isJSDocImportTag:()=>$v,isJSDocIndexSignature:()=>CJ,isJSDocLikeText:()=>sle,isJSDocLink:()=>rTe,isJSDocLinkCode:()=>sTe,isJSDocLinkLike:()=>HL,isJSDocLinkPlain:()=>iJe,isJSDocMemberName:()=>$k,isJSDocNameReference:()=>S7,isJSDocNamepathType:()=>nJe,isJSDocNamespaceBody:()=>jqe,isJSDocNode:()=>x6,isJSDocNonNullableType:()=>$G,isJSDocNullableType:()=>l3,isJSDocOptionalParameter:()=>wG,isJSDocOptionalType:()=>Fae,isJSDocOverloadTag:()=>u3,isJSDocOverrideTag:()=>GG,isJSDocParameterTag:()=>em,isJSDocPrivateTag:()=>Vae,isJSDocPropertyLikeTag:()=>o8,isJSDocPropertyTag:()=>cTe,isJSDocProtectedTag:()=>Hae,isJSDocPublicTag:()=>Wae,isJSDocReadonlyTag:()=>jae,isJSDocReturnTag:()=>KG,isJSDocSatisfiesExpression:()=>fae,isJSDocSatisfiesTag:()=>XG,isJSDocSeeTag:()=>sJe,isJSDocSignature:()=>Qb,isJSDocTag:()=>k6,isJSDocTemplateTag:()=>Rm,isJSDocThisTag:()=>Uae,isJSDocThrowsTag:()=>aJe,isJSDocTypeAlias:()=>Em,isJSDocTypeAssertion:()=>wI,isJSDocTypeExpression:()=>qk,isJSDocTypeLiteral:()=>bI,isJSDocTypeTag:()=>w7,isJSDocTypedefTag:()=>CI,isJSDocUnknownTag:()=>oJe,isJSDocUnknownType:()=>aTe,isJSDocVariadicType:()=>JG,isJSXTagName:()=>M6,isJsonEqual:()=>vG,isJsonSourceFile:()=>Dm,isJsxAttribute:()=>qv,isJsxAttributeLike:()=>j$,isJsxAttributeName:()=>Uke,isJsxAttributes:()=>ZT,isJsxChild:()=>JB,isJsxClosingElement:()=>QT,isJsxClosingFragment:()=>iTe,isJsxElement:()=>tb,isJsxExpression:()=>b7,isJsxFragment:()=>XT,isJsxNamespacedName:()=>J0,isJsxOpeningElement:()=>Uv,isJsxOpeningFragment:()=>yI,isJsxOpeningLikeElement:()=>eh,isJsxOpeningLikeElementTagName:()=>CNe,isJsxSelfClosingElement:()=>vI,isJsxSpreadAttribute:()=>PP,isJsxTagNameExpression:()=>f8,isJsxText:()=>yP,isJumpStatementTarget:()=>aH,isKeyword:()=>d_,isKeywordOrPunctuation:()=>DJ,isKnownSymbol:()=>PW,isLabelName:()=>Bue,isLabelOfLabeledStatement:()=>Fue,isLabeledStatement:()=>ix,isLateVisibilityPaintedStatement:()=>nJ,isLeftHandSideExpression:()=>M_,isLeftHandSideOfAssignment:()=>b$e,isLet:()=>oJ,isLineBreak:()=>_h,isLiteralComputedPropertyDeclarationName:()=>EW,isLiteralExpression:()=>wT,isLiteralExpressionOfObject:()=>pse,isLiteralImportTypeNode:()=>rS,isLiteralKind:()=>a8,isLiteralLikeAccess:()=>wJ,isLiteralLikeElementAccess:()=>mW,isLiteralNameOfPropertyDeclarationOrIndexAccess:()=>OQ,isLiteralTypeLikeExpression:()=>hJe,isLiteralTypeLiteral:()=>hwe,isLiteralTypeNode:()=>gS,isLocalName:()=>Xb,isLogicalOperator:()=>Kxe,isLogicalOrCoalescingAssignmentExpression:()=>Noe,isLogicalOrCoalescingAssignmentOperator:()=>F8,isLogicalOrCoalescingBinaryExpression:()=>WW,isLogicalOrCoalescingBinaryOperator:()=>BW,isMappedTypeNode:()=>pI,isMemberName:()=>Uy,isMetaProperty:()=>p7,isMethodDeclaration:()=>Au,isMethodOrAccessor:()=>WL,isMethodSignature:()=>Hv,isMinusToken:()=>Eae,isMissingDeclaration:()=>tJe,isMissingPackageJsonInfo:()=>vDe,isModifier:()=>Ra,isModifierKind:()=>eS,isModifierLike:()=>zc,isModuleAugmentationExternal:()=>Bse,isModuleBlock:()=>jv,isModuleBody:()=>gwe,isModuleDeclaration:()=>qu,isModuleExportsAccessExpression:()=>Jy,isModuleIdentifier:()=>eoe,isModuleName:()=>DTe,isModuleOrEnumDeclaration:()=>qB,isModuleReference:()=>Cwe,isModuleSpecifierLike:()=>QQ,isModuleWithStringLiteralName:()=>iJ,isNameOfFunctionDeclaration:()=>jue,isNameOfModuleDeclaration:()=>Hue,isNamedClassElement:()=>Fqe,isNamedDeclaration:()=>Af,isNamedEvaluation:()=>Tp,isNamedEvaluationSource:()=>hoe,isNamedExportBindings:()=>hse,isNamedExports:()=>Yg,isNamedImportBindings:()=>xse,isNamedImports:()=>zv,isNamedImportsOrExports:()=>KJ,isNamedTupleMember:()=>r3,isNamespaceBody:()=>Hqe,isNamespaceExport:()=>H1,isNamespaceExportDeclaration:()=>_V,isNamespaceImport:()=>eb,isNamespaceReexportDeclaration:()=>hxe,isNewExpression:()=>GT,isNewExpressionTarget:()=>iF,isNoSubstitutionTemplateLiteral:()=>bP,isNode:()=>Mqe,isNodeArray:()=>ST,isNodeArrayMultiLine:()=>rke,isNodeDescendantOf:()=>OT,isNodeKind:()=>FB,isNodeLikeSystem:()=>bre,isNodeModulesDirectory:()=>S$,isNodeWithPossibleHoistedDeclaration:()=>Sxe,isNonContextualKeyword:()=>doe,isNonExportDefaultModifier:()=>pJe,isNonGlobalAmbientModule:()=>Fse,isNonGlobalDeclaration:()=>fLe,isNonNullAccess:()=>zke,isNonNullChain:()=>R$,isNonNullExpression:()=>NP,isNonStaticMethodOrAccessorWithPrivateName:()=>eEe,isNotEmittedOrPartiallyEmittedNode:()=>Vqe,isNotEmittedStatement:()=>Rae,isNullishCoalesce:()=>fse,isNumber:()=>Aw,isNumericLiteral:()=>W_,isNumericLiteralName:()=>Yy,isObjectBindingElementWithoutPropertyName:()=>mH,isObjectBindingOrAssignmentElement:()=>HB,isObjectBindingOrAssignmentPattern:()=>yse,isObjectBindingPattern:()=>pg,isObjectLiteralElement:()=>kse,isObjectLiteralElementLike:()=>Fb,isObjectLiteralExpression:()=>Pa,isObjectLiteralMethod:()=>f0,isObjectLiteralOrClassExpressionMethodOrAccessor:()=>uJ,isObjectTypeDeclaration:()=>sP,isOctalDigit:()=>T$,isOmittedExpression:()=>zd,isOptionalChain:()=>ph,isOptionalChainRoot:()=>n8,isOptionalDeclaration:()=>t3,isOptionalJSDocPropertyLikeTag:()=>YW,isOptionalTypeNode:()=>WG,isOuterExpression:()=>eK,isOutermostOptionalChain:()=>r8,isOverrideModifier:()=>J2e,isPackageJsonInfo:()=>kK,isPackedArrayLiteral:()=>uae,isParameter:()=>Gs,isParameterPropertyDeclaration:()=>xp,isParameterPropertyModifier:()=>c8,isParenthesizedExpression:()=>g_,isParenthesizedTypeNode:()=>_I,isParseTreeNode:()=>i8,isPartOfParameterDeclaration:()=>Fk,isPartOfTypeNode:()=>Lv,isPartOfTypeQuery:()=>vJ,isPartiallyEmittedExpression:()=>UG,isPatternMatch:()=>c$,isPinnedComment:()=>eJ,isPlainJsFile:()=>p8,isPlusToken:()=>Dae,isPossiblyTypeArgumentPosition:()=>fH,isPostfixUnaryExpression:()=>Pae,isPrefixUnaryExpression:()=>tx,isPrimitiveLiteralValue:()=>TG,isPrivateIdentifier:()=>Vs,isPrivateIdentifierClassElementDeclaration:()=>Fh,isPrivateIdentifierPropertyAccessExpression:()=>S6,isPrivateIdentifierSymbol:()=>Dxe,isProgramBundleEmitBuildInfo:()=>uIe,isProgramUptoDate:()=>Wce,isPrologueDirective:()=>Nv,isPropertyAccessChain:()=>O$,isPropertyAccessEntityNameExpression:()=>HW,isPropertyAccessExpression:()=>Ir,isPropertyAccessOrQualifiedName:()=>zB,isPropertyAccessOrQualifiedNameOrImportTypeNode:()=>dwe,isPropertyAssignment:()=>pd,isPropertyDeclaration:()=>To,isPropertyName:()=>od,isPropertyNameLiteral:()=>Av,isPropertySignature:()=>V_,isProtoSetter:()=>Exe,isPrototypeAccess:()=>$w,isPrototypePropertyAssignment:()=>bW,isPunctuation:()=>uoe,isPushOrUnshiftIdentifier:()=>_oe,isQualifiedName:()=>__,isQuestionDotToken:()=>FG,isQuestionOrExclamationToken:()=>wTe,isQuestionOrPlusOrMinusToken:()=>TTe,isQuestionToken:()=>Zw,isRawSourceMap:()=>GDe,isReadonlyKeyword:()=>q2e,isReadonlyKeywordOrPlusOrMinusToken:()=>kTe,isRecognizedTripleSlashComment:()=>Pse,isReferenceFileLocation:()=>D3,isReferencedFile:()=>t2,isRegularExpressionLiteral:()=>kae,isRequireCall:()=>B_,isRequireVariableStatement:()=>hW,isRestParameter:()=>O1,isRestTypeNode:()=>VG,isReturnStatement:()=>Om,isReturnStatementWithFixablePromiseHandler:()=>CX,isRightSideOfAccessExpression:()=>Aoe,isRightSideOfInstanceofExpression:()=>Xxe,isRightSideOfPropertyAccess:()=>P3,isRightSideOfQualifiedName:()=>wNe,isRightSideOfQualifiedNameOrPropertyAccess:()=>B8,isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName:()=>Qxe,isRootedDiskPath:()=>Sp,isSameEntityName:()=>R6,isSatisfiesExpression:()=>zG,isScopeMarker:()=>_we,isSemicolonClassElement:()=>Z2e,isSetAccessor:()=>Ev,isSetAccessorDeclaration:()=>Np,isShebangTrivia:()=>ese,isShiftOperatorOrHigher:()=>ile,isShorthandAmbientModuleSymbol:()=>XB,isShorthandPropertyAssignment:()=>ih,isSignedNumericLiteral:()=>IJ,isSimpleCopiableExpression:()=>iD,isSimpleInlineableExpression:()=>z1,isSimpleParameter:()=>sEe,isSimpleParameterList:()=>VV,isSingleOrDoubleQuote:()=>_W,isSourceFile:()=>Ns,isSourceFileFromLibrary:()=>H3,isSourceFileJS:()=>F_,isSourceFileNotJS:()=>Yqe,isSourceFileNotJson:()=>bJ,isSourceMapping:()=>QDe,isSpecialPropertyDeclaration:()=>gxe,isSpreadAssignment:()=>ib,isSpreadElement:()=>Zg,isStatement:()=>Es,isStatementButNotDeclaration:()=>$B,isStatementOrBlock:()=>bwe,isStatementWithLocals:()=>Lwe,isStatic:()=>da,isStaticModifier:()=>wP,isString:()=>mo,isStringAKeyword:()=>l$e,isStringANonContextualKeyword:()=>YL,isStringAndEmptyAnonymousObjectIntersection:()=>RNe,isStringDoubleQuoted:()=>SJ,isStringLiteral:()=>ja,isStringLiteralLike:()=>Ml,isStringLiteralOrJsxExpression:()=>Swe,isStringLiteralOrTemplate:()=>nLe,isStringOrNumericLiteralLike:()=>ug,isStringOrRegularExpressionOrTemplateLiteral:()=>Que,isStringTextContainingNode:()=>gse,isSuperCall:()=>rI,isSuperKeyword:()=>f7,isSuperOrSuperProperty:()=>Zqe,isSuperProperty:()=>R_,isSupportedSourceFileName:()=>Lke,isSwitchStatement:()=>v7,isSyntaxList:()=>d3,isSyntheticExpression:()=>G$e,isSyntheticReference:()=>LP,isTagName:()=>Wue,isTaggedTemplateExpression:()=>KT,isTaggedTemplateTag:()=>yNe,isTemplateExpression:()=>HG,isTemplateHead:()=>CP,isTemplateLiteral:()=>VL,isTemplateLiteralKind:()=>Ww,isTemplateLiteralToken:()=>swe,isTemplateLiteralTypeNode:()=>Q2e,isTemplateLiteralTypeSpan:()=>Nae,isTemplateMiddle:()=>Tae,isTemplateMiddleOrTemplateTail:()=>F$,isTemplateSpan:()=>m7,isTemplateTail:()=>MG,isTextWhiteSpaceLike:()=>jNe,isThis:()=>A3,isThisContainerOrFunctionBlock:()=>uxe,isThisIdentifier:()=>Uw,isThisInTypeQuery:()=>BT,isThisInitializedDeclaration:()=>pJ,isThisInitializedObjectBindingExpression:()=>fxe,isThisProperty:()=>aW,isThisTypeNode:()=>s3,isThisTypeParameter:()=>r7,isThisTypePredicate:()=>oxe,isThrowStatement:()=>Mae,isToken:()=>RL,isTokenKind:()=>_se,isTraceEnabled:()=>Zb,isTransientSymbol:()=>M1,isTrivia:()=>j6,isTryStatement:()=>gI,isTupleTypeNode:()=>TP,isTypeAlias:()=>wW,isTypeAliasDeclaration:()=>Mm,isTypeAssertionExpression:()=>Lae,isTypeDeclaration:()=>fP,isTypeElement:()=>xT,isTypeKeyword:()=>sF,isTypeKeywordToken:()=>nde,isTypeKeywordTokenOrIdentifier:()=>JQ,isTypeLiteralNode:()=>p_,isTypeNode:()=>gs,isTypeNodeKind:()=>joe,isTypeOfExpression:()=>o3,isTypeOnlyExportDeclaration:()=>owe,isTypeOnlyImportDeclaration:()=>l8,isTypeOnlyImportOrExportDeclaration:()=>Dk,isTypeOperatorNode:()=>Hk,isTypeParameterDeclaration:()=>Uc,isTypePredicateNode:()=>kP,isTypeQueryNode:()=>qT,isTypeReferenceNode:()=>_g,isTypeReferenceType:()=>$$,isTypeUsableAsPropertyName:()=>Pm,isUMDExportSymbol:()=>GJ,isUnaryExpression:()=>Sse,isUnaryExpressionWithWrite:()=>fwe,isUnicodeIdentifierStart:()=>x$,isUnionTypeNode:()=>Yw,isUrl:()=>xSe,isValidBigIntString:()=>yG,isValidESSymbolDeclaration:()=>nxe,isValidTypeOnlyAliasUseSite:()=>Wk,isValueSignatureDeclaration:()=>ZL,isVarAwaitUsing:()=>iW,isVarConst:()=>L6,isVarConstLike:()=>Qwe,isVarUsing:()=>nW,isVariableDeclaration:()=>ds,isVariableDeclarationInVariableStatement:()=>v8,isVariableDeclarationInitializedToBareOrAccessedRequire:()=>LT,isVariableDeclarationInitializedToRequire:()=>fW,isVariableDeclarationList:()=>wf,isVariableLike:()=>qL,isVariableLikeOrAccessor:()=>txe,isVariableStatement:()=>Ou,isVoidExpression:()=>EP,isWatchSet:()=>Woe,isWhileStatement:()=>Oae,isWhiteSpaceLike:()=>Vy,isWhiteSpaceSingleLine:()=>Tv,isWithStatement:()=>Y2e,isWriteAccess:()=>rP,isWriteOnlyAccess:()=>JJ,isYieldExpression:()=>jG,jsxModeNeedsExplicitImport:()=>Mde,keywordPart:()=>Ap,last:()=>La,lastOrUndefined:()=>Ql,length:()=>O,libMap:()=>dle,libs:()=>lK,lineBreakPart:()=>B3,linkNamePart:()=>KNe,linkPart:()=>vde,linkTextPart:()=>YQ,listFiles:()=>iue,loadModuleFromGlobalCache:()=>NDe,loadWithModeAwareCache:()=>KV,makeIdentifierFromModuleName:()=>Fwe,makeImport:()=>ux,makeStringLiteral:()=>oF,mangleScopedPackageName:()=>C3,map:()=>Yt,mapAllOrFail:()=>Wc,mapDefined:()=>ns,mapDefinedEntries:()=>yp,mapDefinedIterator:()=>fh,mapEntries:()=>Lw,mapIterator:()=>na,mapOneOrMany:()=>Pde,mapToDisplayParts:()=>dx,matchFiles:()=>eae,matchPatternOrExact:()=>rae,matchedText:()=>sCe,matchesExclude:()=>CK,maybeBind:()=>la,maybeSetLocalizedDiagnosticMessages:()=>hke,memoize:()=>l_,memoizeCached:()=>VUe,memoizeOne:()=>I1,memoizeWeak:()=>WUe,metadataHelper:()=>p2e,min:()=>hre,minAndMax:()=>Oke,missingFileModifiedTime:()=>Cp,modifierToFlag:()=>iP,modifiersToFlags:()=>Rv,moduleOptionDeclaration:()=>BTe,moduleResolutionIsEqualTo:()=>Iwe,moduleResolutionNameAndModeGetter:()=>Oce,moduleResolutionOptionDeclarations:()=>hle,moduleResolutionSupportsPackageJsonExportsAndImports:()=>uP,moduleResolutionUsesNodeModules:()=>GQ,moduleSpecifierToValidIdentifier:()=>TH,moduleSpecifiers:()=>e2,moduleSymbolToValidIdentifier:()=>hF,moveEmitHelpers:()=>o2e,moveRangeEnd:()=>qJ,moveRangePastDecorators:()=>zb,moveRangePastModifiers:()=>Fv,moveRangePos:()=>Bk,moveSyntheticComments:()=>n2e,mutateMap:()=>U8,mutateMapSkippingNewValues:()=>Ky,needsParentheses:()=>tX,needsScopeMarker:()=>V$,newCaseClauseTracker:()=>mX,newPrivateEnvironment:()=>nEe,noEmitNotification:()=>jV,noEmitSubstitution:()=>$7,noTransformers:()=>BEe,noTruncationMaximumTruncationLength:()=>Ese,nodeCanBeDecorated:()=>cW,nodeHasName:()=>PB,nodeIsDecorated:()=>O6,nodeIsMissing:()=>vu,nodeIsPresent:()=>Tm,nodeIsSynthesized:()=>oc,nodeModuleNameResolver:()=>wDe,nodeModulesPathPart:()=>nb,nodeNextJsonConfigResolver:()=>xDe,nodeOrChildIsDecorated:()=>uW,nodeOverlapsWithStartEnd:()=>MQ,nodePosToString:()=>qqe,nodeSeenTracker:()=>M3,nodeStartsNewLexicalEnvironment:()=>poe,nodeToDisplayParts:()=>KXe,noop:()=>dl,noopFileWatcher:()=>Z7,normalizePath:()=>ra,normalizeSlashes:()=>Lf,not:()=>d$,notImplemented:()=>pa,notImplementedResolver:()=>jEe,nullNodeConverters:()=>Yke,nullParenthesizerRules:()=>Xke,nullTransformationContext:()=>UV,objectAllocator:()=>Mf,operatorPart:()=>lF,optionDeclarations:()=>K0,optionMapToObject:()=>pK,optionsAffectingProgramStructure:()=>zTe,optionsForBuild:()=>ple,optionsForWatch:()=>BP,optionsHaveChanges:()=>D6,optionsHaveModuleResolutionChanges:()=>Twe,or:()=>lg,orderedRemoveItem:()=>FR,orderedRemoveItemAt:()=>Mw,packageIdToPackageName:()=>X$,packageIdToString:()=>jw,paramHelper:()=>g2e,parameterIsThisKeyword:()=>FT,parameterNamePart:()=>qNe,parseBaseNodeFactory:()=>ATe,parseBigInt:()=>Mke,parseBuildCommand:()=>YTe,parseCommandLine:()=>XTe,parseCommandLineWorker:()=>mle,parseConfigFileTextToJson:()=>yle,parseConfigFileWithSystem:()=>xIe,parseConfigHostFromCompilerHostLike:()=>oQ,parseCustomTypeOption:()=>fK,parseIsolatedEntityName:()=>FP,parseIsolatedJSDocComment:()=>MTe,parseJSDocTypeExpressionForTests:()=>RJe,parseJsonConfigFileContent:()=>dGe,parseJsonSourceFileConfigFileContent:()=>LV,parseJsonText:()=>kV,parseListTypeOption:()=>KTe,parseNodeFactory:()=>Gk,parseNodeModuleFromPath:()=>OV,parsePackageName:()=>IK,parsePseudoBigInt:()=>e7,parseValidBigInt:()=>lae,pasteEdits:()=>Mhe,patchWriteFileEnsuringDirectory:()=>wSe,pathContainsNodeModules:()=>Zk,pathIsAbsolute:()=>JR,pathIsBareSpecifier:()=>$re,pathIsRelative:()=>cg,patternText:()=>rCe,perfLogger:()=>c_,performIncrementalCompilation:()=>TIe,performance:()=>hCe,plainJSErrors:()=>Vce,positionBelongsToNode:()=>Uue,positionIsASICandidate:()=>sX,positionIsSynthesized:()=>q0,positionsAreOnSameLine:()=>Kg,preProcessFile:()=>mZe,probablyUsesSemicolons:()=>wH,processCommentPragmas:()=>cle,processPragmasIntoFields:()=>ule,processTaggedTemplateExpression:()=>uce,programContainsEsModules:()=>VNe,programContainsModules:()=>WNe,projectReferenceIsEqualTo:()=>Ise,propKeyHelper:()=>I2e,propertyNamePart:()=>$Ne,pseudoBigIntToString:()=>jT,punctuationPart:()=>bh,pushIfUnique:()=>Cc,quote:()=>dF,quotePreferenceFromString:()=>ade,rangeContainsPosition:()=>lH,rangeContainsPositionExclusive:()=>cH,rangeContainsRange:()=>yg,rangeContainsRangeExclusive:()=>kNe,rangeContainsStartEnd:()=>uH,rangeEndIsOnSameLineAsRangeStart:()=>zW,rangeEndPositionsAreOnSameLine:()=>ike,rangeEquals:()=>mk,rangeIsOnSingleLine:()=>dI,rangeOfNode:()=>oae,rangeOfTypeParameters:()=>aae,rangeOverlapsWithStartEnd:()=>nF,rangeStartIsOnSameLineAsRangeEnd:()=>nke,rangeStartPositionsAreOnSameLine:()=>$J,readBuilderProgram:()=>gQ,readConfigFile:()=>IV,readHelper:()=>D2e,readJson:()=>V8,readJsonConfigFile:()=>eDe,readJsonOrUndefined:()=>Moe,reduceEachLeadingCommentRange:()=>PSe,reduceEachTrailingCommentRange:()=>ASe,reduceLeft:()=>nd,reduceLeftIterator:()=>he,reducePathComponents:()=>GE,refactor:()=>ZP,regExpEscape:()=>L$e,regularExpressionFlagToCharacter:()=>gqe,relativeComplement:()=>ul,removeAllComments:()=>rV,removeEmitHelper:()=>$$e,removeExtension:()=>QW,removeFileExtension:()=>h_,removeIgnoredPath:()=>lQ,removeMinAndVersionNumbers:()=>pre,removeOptionality:()=>PNe,removePrefix:()=>BR,removeSuffix:()=>h6,removeTrailingDirectorySeparator:()=>Sk,repeatString:()=>pH,replaceElement:()=>IL,replaceFirstStar:()=>pP,resolutionExtensionIsTSOrJson:()=>Q8,resolveConfigFileProjectName:()=>gue,resolveJSModule:()=>bDe,resolveLibrary:()=>DK,resolveModuleName:()=>HP,resolveModuleNameFromCache:()=>WGe,resolvePackageNameToPackageJson:()=>Lle,resolvePath:()=>Ck,resolveProjectReferencePath:()=>E3,resolveTripleslashReference:()=>Tce,resolveTypeReferenceDirective:()=>gDe,resolvingEmptyArray:()=>Dse,restHelper:()=>w2e,returnFalse:()=>kv,returnNoopFileWatcher:()=>Y7,returnTrue:()=>vk,returnUndefined:()=>yT,returnsPromise:()=>Qde,runInitializersHelper:()=>v2e,sameFlatMap:()=>s_,sameMap:()=>Is,sameMapping:()=>IKe,scanShebangTrivia:()=>tse,scanTokenAtPosition:()=>Kwe,scanner:()=>jh,screenStartingMessageCodes:()=>Zce,semanticDiagnosticsOptionDeclarations:()=>VTe,serializeCompilerOptions:()=>gK,server:()=>Ilt,servicesVersion:()=>_et,setCommentRange:()=>Sd,setConfigFileInOptions:()=>kle,setConstantValue:()=>s2e,setEachParent:()=>F$e,setEmitFlags:()=>ir,setFunctionNameHelper:()=>N2e,setGetSourceFileAsHashVersioned:()=>pQ,setIdentifierAutoGenerate:()=>aV,setIdentifierGeneratedImportReference:()=>c2e,setIdentifierTypeArguments:()=>pS,setInternalEmitFlags:()=>sV,setLocalizedDiagnosticMessages:()=>fke,setModuleDefaultHelper:()=>A2e,setNodeChildren:()=>uTe,setNodeFlags:()=>Bke,setObjectAllocator:()=>dke,setOriginalNode:()=>Er,setParent:()=>ml,setParentRecursive:()=>$b,setPrivateIdentifier:()=>kI,setSnippetElement:()=>Cae,setSourceMapRange:()=>$a,setStackTraceLimit:()=>tqe,setStartsOnNewLine:()=>IG,setSyntheticLeadingComments:()=>Vk,setSyntheticTrailingComments:()=>mP,setSys:()=>aqe,setSysLog:()=>bSe,setTextRange:()=>zt,setTextRangeEnd:()=>e3,setTextRangePos:()=>t7,setTextRangePosEnd:()=>Bv,setTextRangePosWidth:()=>cae,setTokenSourceMapRange:()=>i2e,setTypeNode:()=>a2e,setUILocale:()=>tCe,setValueDeclaration:()=>CW,shouldAllowImportingTsExtension:()=>S3,shouldPreserveConstEnums:()=>HT,shouldUseUriStyleNodeCoreModules:()=>pX,showModuleSpecifier:()=>lke,signatureHasLiteralTypes:()=>Qle,signatureHasRestParameter:()=>vh,signatureToDisplayParts:()=>yde,single:()=>zE,singleElementArray:()=>PL,singleIterator:()=>My,singleOrMany:()=>ag,singleOrUndefined:()=>a_,skipAlias:()=>Of,skipAssertions:()=>uJe,skipConstraint:()=>rde,skipOuterExpressions:()=>ld,skipParentheses:()=>Il,skipPartiallyEmittedExpressions:()=>u0,skipTrivia:()=>qa,skipTypeChecking:()=>Y8,skipTypeParentheses:()=>T8,skipWhile:()=>aCe,sliceAfter:()=>sae,some:()=>Rt,sort:()=>tc,sortAndDeduplicate:()=>fr,sortAndDeduplicateDiagnostics:()=>v6,sourceFileAffectingCompilerOptions:()=>_le,sourceFileMayBeEmitted:()=>cI,sourceMapCommentRegExp:()=>Zle,sourceMapCommentRegExpDontCareLineStart:()=>$De,spacePart:()=>ku,spanMap:()=>F0,spreadArrayHelper:()=>E2e,stableSort:()=>$p,startEndContainsRange:()=>zue,startEndOverlapsWithStartEnd:()=>RQ,startOnNewLine:()=>mh,startTracing:()=>mCe,startsWith:()=>ro,startsWithDirectory:()=>Kre,startsWithUnderscore:()=>Ode,startsWithUseStrict:()=>mTe,stringContainsAt:()=>dLe,stringToToken:()=>bT,stripQuotes:()=>Nm,supportedDeclarationExtensions:()=>hG,supportedJSExtensions:()=>Dke,supportedJSExtensionsFlat:()=>Z6,supportedLocaleDirectories:()=>USe,supportedTSExtensions:()=>G8,supportedTSExtensionsFlat:()=>tae,supportedTSImplementationExtensions:()=>_G,suppressLeadingAndTrailingTrivia:()=>Op,suppressLeadingTrivia:()=>wde,suppressTrailingTrivia:()=>eLe,symbolEscapedNameNoDefault:()=>KQ,symbolName:()=>xu,symbolNameNoDefault:()=>cde,symbolPart:()=>UNe,symbolToDisplayParts:()=>cF,syntaxMayBeASICandidate:()=>sLe,syntaxRequiresTrailingSemicolonOrASI:()=>rX,sys:()=>Wd,sysLog:()=>bB,tagNamesAreEquivalent:()=>Qk,takeWhile:()=>yre,targetOptionDeclaration:()=>fle,templateObjectHelper:()=>T2e,testFormatSettings:()=>VXe,textChangeRangeIsUnchanged:()=>WSe,textChangeRangeNewSpan:()=>t8,textChanges:()=>er,textOrKeywordPart:()=>mde,textPart:()=>Cg,textRangeContainsPositionInclusive:()=>IB,textSpanContainsPosition:()=>nse,textSpanContainsTextSpan:()=>MSe,textSpanEnd:()=>zu,textSpanIntersection:()=>BSe,textSpanIntersectsWith:()=>E$,textSpanIntersectsWithPosition:()=>FSe,textSpanIntersectsWithTextSpan:()=>wqe,textSpanIsEmpty:()=>OSe,textSpanOverlap:()=>RSe,textSpanOverlapsWith:()=>Sqe,textSpansEqual:()=>F3,textToKeywordObj:()=>w$,timestamp:()=>Vc,toArray:()=>NL,toBuilderFileEmit:()=>_Ie,toBuilderStateFileInfoForMultiEmit:()=>hIe,toEditorSettings:()=>OH,toFileNameLowerCase:()=>Ow,toLowerCase:()=>Qbe,toPath:()=>_c,toProgramEmitPending:()=>pIe,tokenIsIdentifierOrKeyword:()=>Rh,tokenIsIdentifierOrKeywordOrGreaterThan:()=>DSe,tokenToString:()=>Ta,trace:()=>lo,tracing:()=>sr,tracingEnabled:()=>vB,transferSourceFileChildren:()=>dTe,transform:()=>ket,transformClassFields:()=>gEe,transformDeclarations:()=>_ce,transformECMAScriptModule:()=>hce,transformES2015:()=>NEe,transformES2016:()=>IEe,transformES2017:()=>bEe,transformES2018:()=>CEe,transformES2019:()=>SEe,transformES2020:()=>wEe,transformES2021:()=>xEe,transformESDecorators:()=>yEe,transformESNext:()=>kEe,transformGenerators:()=>LEe,transformJsx:()=>EEe,transformLegacyDecorators:()=>vEe,transformModule:()=>fce,transformNamedEvaluation:()=>Pp,transformNodeModule:()=>AEe,transformNodes:()=>zV,transformSystemModule:()=>PEe,transformTypeScript:()=>pEe,transpile:()=>TZe,transpileDeclaration:()=>xZe,transpileModule:()=>ALe,transpileOptionValueCompilerOptions:()=>UTe,tryAddToSet:()=>o_,tryAndIgnoreErrors:()=>lX,tryCast:()=>$r,tryDirectoryExists:()=>aX,tryExtractTSExtension:()=>zJ,tryFileExists:()=>xH,tryGetClassExtendingExpressionWithTypeArguments:()=>Loe,tryGetClassImplementingOrExtendingExpressionWithTypeArguments:()=>Poe,tryGetDirectories:()=>oX,tryGetExtensionFromPath:()=>qb,tryGetImportFromModuleSpecifier:()=>SW,tryGetJSDocSatisfiesTypeNode:()=>xG,tryGetModuleNameFromFile:()=>yV,tryGetModuleSpecifierFromDeclaration:()=>x8,tryGetNativePerformanceHooks:()=>fCe,tryGetPropertyAccessOrIdentifierToString:()=>jW,tryGetPropertyNameOfBindingOrAssignmentElement:()=>nK,tryGetSourceMappingURL:()=>JDe,tryGetTextOfPropertyName:()=>m8,tryIOAndConsumeErrors:()=>cX,tryParseJson:()=>UJ,tryParsePattern:()=>Y6,tryParsePatterns:()=>gG,tryParseRawSourceMap:()=>KDe,tryReadDirectory:()=>Dde,tryReadFile:()=>I7,tryRemoveDirectoryPrefix:()=>Zoe,tryRemoveExtension:()=>Ake,tryRemovePrefix:()=>vre,tryRemoveSuffix:()=>nCe,typeAcquisitionDeclarations:()=>uK,typeAliasNamePart:()=>JNe,typeDirectiveIsEqualTo:()=>Nwe,typeKeywords:()=>ide,typeParameterNamePart:()=>GNe,typeToDisplayParts:()=>yH,unchangedPollThresholds:()=>v$,unchangedTextChangeRange:()=>I$,unescapeLeadingUnderscores:()=>Ws,unmangleScopedPackageName:()=>RV,unorderedRemoveItem:()=>LL,unorderedRemoveItemAt:()=>gre,unreachableCodeIsError:()=>gke,unsetNodeChildren:()=>$ae,unusedLabelIsError:()=>mke,unwrapInnermostStatementOfLabel:()=>Kse,unwrapParenthesizedExpression:()=>Jke,updateErrorForNoInputFiles:()=>bK,updateLanguageServiceSourceFile:()=>wfe,updateMissingFilePathsWatch:()=>wce,updateResolutionField:()=>m3,updateSharedExtendedConfigFileWatcher:()=>ZK,updateSourceFile:()=>ole,updateWatchingWildcardDirectories:()=>qV,usesExtensionsOnImports:()=>Ike,usingSingleLineStringWriter:()=>_8,utf16EncodeAsString:()=>e8,validateLocaleAndSetLanguage:()=>sse,valuesHelper:()=>L2e,version:()=>y,versionMajorMinor:()=>g,visitArray:()=>BV,visitCommaListElements:()=>RK,visitEachChild:()=>cn,visitFunctionBody:()=>vg,visitIterationBody:()=>v_,visitLexicalEnvironment:()=>Xle,visitNode:()=>Ct,visitNodes:()=>wn,visitParameterList:()=>Su,walkUpBindingElementsAndPatterns:()=>y6,walkUpLexicalEnvironments:()=>iEe,walkUpOuterExpressions:()=>vTe,walkUpParenthesizedExpressions:()=>Vb,walkUpParenthesizedTypes:()=>DW,walkUpParenthesizedTypesAndGetParentAndChild:()=>wxe,whitespaceOrMapCommentRegExp:()=>Yle,writeCommentRange:()=>G6,writeFile:()=>FW,writeFileEnsuringDirectories:()=>koe,zipWith:()=>we});var Tlt;function tHt(){return Tlt??(Tlt=new B0(y))}function Dlt(t,r,a,u,h){let p=r?"DeprecationError: ":"DeprecationWarning: ";return p+=`'${t}' `,p+=u?`has been deprecated since v${u}`:"is deprecated",p+=r?" and can no longer be used.":a?` and will no longer be usable after v${a}.`:".",p+=h?` ${Qy(h,[t])}`:"",p}function iHt(t,r,a,u){const h=Dlt(t,!0,r,a,u);return()=>{throw new TypeError(h)}}function nHt(t,r,a,u){let h=!1;return()=>{h||(z.log.warn(Dlt(t,!1,r,a,u)),h=!0)}}function rHt(t,r={}){const a=typeof r.typeScriptVersion=="string"?new B0(r.typeScriptVersion):r.typeScriptVersion??tHt(),u=typeof r.errorAfter=="string"?new B0(r.errorAfter):r.errorAfter,h=typeof r.warnAfter=="string"?new B0(r.warnAfter):r.warnAfter,p=typeof r.since=="string"?new B0(r.since):r.since??h,m=r.error||u&&a.compareTo(u)>=0,C=!h||a.compareTo(h)>=0;return m?iHt(t,u,p,r.message):C?nHt(t,u,p,r.message):dl}function sHt(t,r){return function(){return t(),r.apply(this,arguments)}}function oHt(t,r){const a=rHt((r==null?void 0:r.name)??z.getFunctionName(t),r);return sHt(a,t)}function Rhe(t,r,a,u){if(Object.defineProperty(p,"name",{...Object.getOwnPropertyDescriptor(p,"name"),value:t}),u)for(const m of Object.keys(u)){const C=+m;!isNaN(C)&&Vl(r,`${C}`)&&(r[C]=oHt(r[C],{...u[C],name:t}))}const h=aHt(r,a);return p;function p(...m){const C=h(m),b=C!==void 0?r[C]:void 0;if(typeof b=="function")return b(...m);throw new TypeError("Invalid arguments")}}function aHt(t,r){return a=>{for(let u=0;Vl(t,`${u}`)&&Vl(r,`${u}`);u++){const h=r[u];if(h(a))return u}}}function Elt(t){return{overload:r=>({bind:a=>({finish:()=>Rhe(t,r,a),deprecate:u=>({finish:()=>Rhe(t,r,a,u)})})})}}var Ilt={};l(Ilt,{ActionInvalidate:()=>kQ,ActionPackageInstalled:()=>TQ,ActionSet:()=>xQ,ActionWatchTypingLocations:()=>rH,Arguments:()=>Iue,AutoImportProviderProject:()=>p3e,AuxiliaryProject:()=>h3e,CharRangeSection:()=>B3e,CloseFileWatcherEvent:()=>Qhe,CommandNames:()=>oct,ConfigFileDiagEvent:()=>qhe,ConfiguredProject:()=>g3e,ConfiguredProjectLoadKind:()=>S3e,CreateDirectoryWatcherEvent:()=>Khe,CreateFileWatcherEvent:()=>Ghe,Errors:()=>iC,EventBeginInstallTypes:()=>Due,EventEndInstallTypes:()=>Eue,EventInitializationFailed:()=>tNe,EventTypesRegistry:()=>Tue,ExternalProject:()=>Whe,GcTimer:()=>i3e,InferredProject:()=>f3e,LargeFileReferencedEvent:()=>Uhe,LineIndex:()=>fj,LineLeaf:()=>_Z,LineNode:()=>tO,LogLevel:()=>J6e,Msg:()=>G6e,OpenFileInfoTelemetryEvent:()=>m3e,Project:()=>lA,ProjectInfoTelemetryEvent:()=>Jhe,ProjectKind:()=>oj,ProjectLanguageServiceStateEvent:()=>$he,ProjectLoadingFinishEvent:()=>zhe,ProjectLoadingStartEvent:()=>jhe,ProjectService:()=>E3e,ProjectsUpdatedInBackgroundEvent:()=>fZ,ScriptInfo:()=>o3e,ScriptVersionCache:()=>l_e,Session:()=>dct,TextStorage:()=>s3e,ThrottledOperations:()=>t3e,TypingsCache:()=>a3e,TypingsInstallerAdapter:()=>gct,allFilesAreJsOrDts:()=>c3e,allRootFilesAreJsOrDts:()=>l3e,asNormalizedPath:()=>Alt,convertCompilerOptions:()=>hZ,convertFormatOptions:()=>Z3,convertScriptKindName:()=>Zhe,convertTypeAcquisition:()=>y3e,convertUserPreferences:()=>b3e,convertWatchOptions:()=>uj,countEachFileTypes:()=>aj,createInstallTypingsRequest:()=>K6e,createModuleSpecifierCache:()=>L3e,createNormalizedPathMap:()=>Olt,createPackageJsonCache:()=>P3e,createSortedArray:()=>e3e,emptyArray:()=>Ed,findArgument:()=>EXe,forEachResolvedProjectReferenceProject:()=>i_e,formatDiagnosticToProtocol:()=>dj,formatMessage:()=>A3e,getBaseConfigFileName:()=>Fhe,getLocationInNewDocument:()=>F3e,hasArgument:()=>DXe,hasNoTypeScriptSource:()=>u3e,indent:()=>tF,isBackgroundProject:()=>cj,isConfigFile:()=>I3e,isConfiguredProject:()=>TS,isDynamicFileName:()=>sj,isExternalProject:()=>lj,isInferredProject:()=>X3,isInferredProjectName:()=>Q6e,isProjectDeferredClose:()=>dZ,makeAutoImportProviderProjectName:()=>Z6e,makeAuxiliaryProjectName:()=>Y6e,makeInferredProjectName:()=>X6e,maxFileSize:()=>Hhe,maxProgramSizeForNonTsFiles:()=>Vhe,normalizedPathToPath:()=>rj,nowString:()=>IXe,nullCancellationToken:()=>nct,nullTypingsInstaller:()=>Bhe,protocol:()=>n3e,removeSorted:()=>Mlt,stringifyIndented:()=>i2,toEvent:()=>O3e,toNormalizedPath:()=>Kc,tryConvertScriptKindName:()=>Xhe,typingsInstaller:()=>$6e,updateProjectIfDirty:()=>im});var $6e={};l($6e,{TypingsInstaller:()=>uHt,getNpmCommandForInstallation:()=>Llt,installNpmPackages:()=>cHt,typingsName:()=>Plt});var lHt={isEnabled:()=>!1,writeLine:dl};function Nlt(t,r,a,u){try{const h=HP(r,Hr(t,"index.d.ts"),{moduleResolution:2},a);return h.resolvedModule&&h.resolvedModule.resolvedFileName}catch(h){u.isEnabled()&&u.writeLine(`Failed to resolve ${r} in folder '${t}': ${h.message}`);return}}function cHt(t,r,a,u){let h=!1;for(let p=a.length;p>0;){const m=Llt(t,r,a,p);p=m.remaining,h=u(m.command)||h}return h}function Llt(t,r,a,u){const h=a.length-u;let p,m=u;for(;p=`${t} install --ignore-scripts ${(m===a.length?a:a.slice(h,h+m)).join(" ")} --save-dev --user-agent="typesInstaller/${r}"`,!(p.length<8e3);)m=m-Math.floor(m/2);return{command:p,remaining:u-m}}var uHt=class{constructor(t,r,a,u,h,p=lHt){this.installTypingHost=t,this.globalCachePath=r,this.safeListPath=a,this.typesMapLocation=u,this.throttleLimit=h,this.log=p,this.packageNameToTypingLocation=new Map,this.missingTypingsSet=new Set,this.knownCachesSet=new Set,this.projectWatchers=new Map,this.pendingRunRequests=[],this.installRunCount=1,this.inFlightRequestCount=0,this.latestDistTag="latest",this.log.isEnabled()&&this.log.writeLine(`Global cache location '${r}', safe file path '${a}', types map path ${u}`),this.processCacheLocation(this.globalCachePath)}handleRequest(t){switch(t.kind){case"discover":this.install(t);break;case"closeProject":this.closeProject(t);break;case"typesRegistry":{const r={};this.typesRegistry.forEach((u,h)=>{r[h]=u});const a={kind:Tue,typesRegistry:r};this.sendResponse(a);break}case"installPackage":{this.installPackage(t);break}default:z.assertNever(t)}}closeProject(t){this.closeWatchers(t.projectName)}closeWatchers(t){if(this.log.isEnabled()&&this.log.writeLine(`Closing file watchers for project '${t}'`),!this.projectWatchers.get(t)){this.log.isEnabled()&&this.log.writeLine(`No watchers are registered for project '${t}'`);return}this.projectWatchers.delete(t),this.sendResponse({kind:rH,projectName:t,files:[]}),this.log.isEnabled()&&this.log.writeLine(`Closing file watchers for project '${t}' - done.`)}install(t){this.log.isEnabled()&&this.log.writeLine(`Got install request${i2(t)}`),t.cachePath&&(this.log.isEnabled()&&this.log.writeLine(`Request specifies cache path '${t.cachePath}', loading cached information...`),this.processCacheLocation(t.cachePath)),this.safeList===void 0&&this.initializeSafeList();const r=Gv.discoverTypings(this.installTypingHost,this.log.isEnabled()?a=>this.log.writeLine(a):void 0,t.fileNames,t.projectRootPath,this.safeList,this.packageNameToTypingLocation,t.typeAcquisition,t.unresolvedImports,this.typesRegistry,t.compilerOptions);this.watchFiles(t.projectName,r.filesToWatch),r.newTypingNames.length?this.installTypings(t,t.cachePath||this.globalCachePath,r.cachedTypingPaths,r.newTypingNames):(this.sendResponse(this.createSetTypings(t,r.cachedTypingPaths)),this.log.isEnabled()&&this.log.writeLine("No new typings were requested as a result of typings discovery"))}installPackage(t){const{fileName:r,packageName:a,projectName:u,projectRootPath:h,id:p}=t,m=c0(rs(r),C=>{if(this.installTypingHost.fileExists(Hr(C,"package.json")))return C})||h;if(m)this.installWorker(-1,[a],m,C=>{const b=C?`Package ${a} installed.`:`There was an error installing ${a}.`,T={kind:TQ,projectName:u,id:p,success:C,message:b};this.sendResponse(T)});else{const C={kind:TQ,projectName:u,id:p,success:!1,message:"Could not determine a project root path."};this.sendResponse(C)}}initializeSafeList(){if(this.typesMapLocation){const t=Gv.loadTypesMap(this.installTypingHost,this.typesMapLocation);if(t){this.log.writeLine(`Loaded safelist from types map file '${this.typesMapLocation}'`),this.safeList=t;return}this.log.writeLine(`Failed to load safelist from types map file '${this.typesMapLocation}'`)}this.safeList=Gv.loadSafeList(this.installTypingHost,this.safeListPath)}processCacheLocation(t){if(this.log.isEnabled()&&this.log.writeLine(`Processing cache location '${t}'`),this.knownCachesSet.has(t)){this.log.isEnabled()&&this.log.writeLine("Cache location was already processed...");return}const r=Hr(t,"package.json"),a=Hr(t,"package-lock.json");if(this.log.isEnabled()&&this.log.writeLine(`Trying to find '${r}'...`),this.installTypingHost.fileExists(r)&&this.installTypingHost.fileExists(a)){const u=JSON.parse(this.installTypingHost.readFile(r)),h=JSON.parse(this.installTypingHost.readFile(a));if(this.log.isEnabled()&&(this.log.writeLine(`Loaded content of '${r}':${i2(u)}`),this.log.writeLine(`Loaded content of '${a}':${i2(h)}`)),u.devDependencies&&h.dependencies)for(const p in u.devDependencies){if(!Vl(h.dependencies,p))continue;const m=fd(p);if(!m)continue;const C=Nlt(t,m,this.installTypingHost,this.log);if(!C){this.missingTypingsSet.add(m);continue}const b=this.packageNameToTypingLocation.get(m);if(b){if(b.typingLocation===C)continue;this.log.isEnabled()&&this.log.writeLine(`New typing for package ${m} from '${C}' conflicts with existing typing file '${b}'`)}this.log.isEnabled()&&this.log.writeLine(`Adding entry into typings cache: '${m}' => '${C}'`);const T=u6(h.dependencies,p),E=T&&T.version;if(!E)continue;const N={typingLocation:C,version:new B0(E)};this.packageNameToTypingLocation.set(m,N)}}this.log.isEnabled()&&this.log.writeLine(`Finished processing cache location '${t}'`),this.knownCachesSet.add(t)}filterTypings(t){return ns(t,r=>{const a=C3(r);if(this.missingTypingsSet.has(a)){this.log.isEnabled()&&this.log.writeLine(`'${r}':: '${a}' is in missingTypingsSet - skipping...`);return}const u=Gv.validatePackageName(r);if(u!==Gv.NameValidationResult.Ok){this.missingTypingsSet.add(a),this.log.isEnabled()&&this.log.writeLine(Gv.renderPackageNameValidationFailure(u,r));return}if(!this.typesRegistry.has(a)){this.log.isEnabled()&&this.log.writeLine(`'${r}':: Entry for package '${a}' does not exist in local types registry - skipping...`);return}if(this.packageNameToTypingLocation.get(a)&&Gv.isTypingUpToDate(this.packageNameToTypingLocation.get(a),this.typesRegistry.get(a))){this.log.isEnabled()&&this.log.writeLine(`'${r}':: '${a}' already has an up-to-date typing - skipping...`);return}return a})}ensurePackageDirectoryExists(t){const r=Hr(t,"package.json");this.log.isEnabled()&&this.log.writeLine(`Npm config file: ${r}`),this.installTypingHost.fileExists(r)||(this.log.isEnabled()&&this.log.writeLine(`Npm config file: '${r}' is missing, creating new one...`),this.ensureDirectoryExists(t,this.installTypingHost),this.installTypingHost.writeFile(r,'{ "private": true }'))}installTypings(t,r,a,u){this.log.isEnabled()&&this.log.writeLine(`Installing typings ${JSON.stringify(u)}`);const h=this.filterTypings(u);if(h.length===0){this.log.isEnabled()&&this.log.writeLine("All typings are known to be missing or invalid - no need to install more typings"),this.sendResponse(this.createSetTypings(t,a));return}this.ensurePackageDirectoryExists(r);const p=this.installRunCount;this.installRunCount++,this.sendResponse({kind:Due,eventId:p,typingsInstallerVersion:y,projectName:t.projectName});const m=h.map(Plt);this.installTypingsAsync(p,m,r,C=>{try{if(!C){this.log.isEnabled()&&this.log.writeLine(`install request failed, marking packages as missing to prevent repeated requests: ${JSON.stringify(h)}`);for(const T of h)this.missingTypingsSet.add(T);return}this.log.isEnabled()&&this.log.writeLine(`Installed typings ${JSON.stringify(m)}`);const b=[];for(const T of h){const E=Nlt(r,T,this.installTypingHost,this.log);if(!E){this.missingTypingsSet.add(T);continue}const N=this.typesRegistry.get(T),R=new B0(N[`ts${g}`]||N[this.latestDistTag]),F={typingLocation:E,version:R};this.packageNameToTypingLocation.set(T,F),b.push(E)}this.log.isEnabled()&&this.log.writeLine(`Installed typing files ${JSON.stringify(b)}`),this.sendResponse(this.createSetTypings(t,a.concat(b)))}finally{const b={kind:Eue,eventId:p,projectName:t.projectName,packagesToInstall:m,installSuccess:C,typingsInstallerVersion:y};this.sendResponse(b)}})}ensureDirectoryExists(t,r){const a=rs(t);r.directoryExists(a)||this.ensureDirectoryExists(a,r),r.directoryExists(t)||r.createDirectory(t)}watchFiles(t,r){if(!r.length){this.closeWatchers(t);return}const a=this.projectWatchers.get(t),u=new Set(r);!a||Bb(u,h=>!a.has(h))||Bb(a,h=>!u.has(h))?(this.projectWatchers.set(t,u),this.sendResponse({kind:rH,projectName:t,files:r})):this.sendResponse({kind:rH,projectName:t,files:void 0})}createSetTypings(t,r){return{projectName:t.projectName,typeAcquisition:t.typeAcquisition,compilerOptions:t.compilerOptions,typings:r,unresolvedImports:t.unresolvedImports,kind:xQ}}installTypingsAsync(t,r,a,u){this.pendingRunRequests.unshift({requestId:t,packageNames:r,cwd:a,onRequestCompleted:u}),this.executeWithThrottling()}executeWithThrottling(){for(;this.inFlightRequestCount{this.inFlightRequestCount--,t.onRequestCompleted(r),this.executeWithThrottling()})}}};function Plt(t){return`@types/${t}@ts${g}`}var J6e=(t=>(t[t.terse=0]="terse",t[t.normal=1]="normal",t[t.requestTime=2]="requestTime",t[t.verbose=3]="verbose",t))(J6e||{}),Ed=e3e(),G6e=(t=>(t.Err="Err",t.Info="Info",t.Perf="Perf",t))(G6e||{});function K6e(t,r,a,u){return{projectName:t.getProjectName(),fileNames:t.getFileNames(!0,!0).concat(t.getExcludedFiles()),compilerOptions:t.getCompilationSettings(),typeAcquisition:r,unresolvedImports:a,projectRootPath:t.getCurrentDirectory(),cachePath:u,kind:"discover"}}var iC;(t=>{function r(){throw new Error("No Project.")}t.ThrowNoProject=r;function a(){throw new Error("The project's language service is disabled.")}t.ThrowProjectLanguageServiceDisabled=a;function u(h,p){throw new Error(`Project '${p.getProjectName()}' does not contain document '${h}'`)}t.ThrowProjectDoesNotContainDocument=u})(iC||(iC={}));function Kc(t){return ra(t)}function rj(t,r,a){const u=Sp(t)?t:bo(t,r);return a(u)}function Alt(t){return t}function Olt(){const t=new Map;return{get(r){return t.get(r)},set(r,a){t.set(r,a)},contains(r){return t.has(r)},remove(r){t.delete(r)}}}function Q6e(t){return/dev\/null\/inferredProject\d+\*/.test(t)}function X6e(t){return`/dev/null/inferredProject${t}*`}function Z6e(t){return`/dev/null/autoImportProviderProject${t}*`}function Y6e(t){return`/dev/null/auxiliaryProject${t}*`}function e3e(){return[]}var t3e=class ZDt{constructor(r,a){this.host=r,this.pendingTimeouts=new Map,this.logger=a.hasLevel(3)?a:void 0}schedule(r,a,u){const h=this.pendingTimeouts.get(r);h&&this.host.clearTimeout(h),this.pendingTimeouts.set(r,this.host.setTimeout(ZDt.run,a,r,this,u)),this.logger&&this.logger.info(`Scheduled: ${r}${h?", Cancelled earlier one":""}`)}cancel(r){const a=this.pendingTimeouts.get(r);return a?(this.host.clearTimeout(a),this.pendingTimeouts.delete(r)):!1}static run(r,a,u){var h,p;(h=c_)==null||h.logStartScheduledOperation(r),a.pendingTimeouts.delete(r),a.logger&&a.logger.info(`Running: ${r}`),u(),(p=c_)==null||p.logStopScheduledOperation()}},i3e=class YDt{constructor(r,a,u){this.host=r,this.delay=a,this.logger=u}scheduleCollect(){!this.host.gc||this.timerId!==void 0||(this.timerId=this.host.setTimeout(YDt.run,this.delay,this))}static run(r){var a,u;r.timerId=void 0,(a=c_)==null||a.logStartScheduledOperation("GC collect");const h=r.logger.hasLevel(2),p=h&&r.host.getMemoryUsage();if(r.host.gc(),h){const m=r.host.getMemoryUsage();r.logger.perftrc(`GC::before ${p}, after ${m}`)}(u=c_)==null||u.logStopScheduledOperation()}};function Fhe(t){const r=fd(t);return r==="tsconfig.json"||r==="jsconfig.json"?r:void 0}function Mlt(t,r,a){if(!t||t.length===0)return;if(t[0]===r){t.splice(0,1);return}const u=Fy(t,r,fc,a);u>=0&&t.splice(u,1)}var n3e={};l(n3e,{ClassificationType:()=>Aue,CommandTypes:()=>r3e,CompletionTriggerKind:()=>Lue,IndentStyle:()=>Wlt,JsxEmit:()=>Vlt,ModuleKind:()=>Hlt,ModuleResolutionKind:()=>jlt,NewLineKind:()=>zlt,OrganizeImportsMode:()=>Nue,PollingWatchKind:()=>Blt,ScriptTarget:()=>Ult,SemicolonPreference:()=>Pue,WatchDirectoryKind:()=>Flt,WatchFileKind:()=>Rlt});var r3e=(t=>(t.JsxClosingTag="jsxClosingTag",t.LinkedEditingRange="linkedEditingRange",t.Brace="brace",t.BraceFull="brace-full",t.BraceCompletion="braceCompletion",t.GetSpanOfEnclosingComment="getSpanOfEnclosingComment",t.Change="change",t.Close="close",t.Completions="completions",t.CompletionInfo="completionInfo",t.CompletionsFull="completions-full",t.CompletionDetails="completionEntryDetails",t.CompletionDetailsFull="completionEntryDetails-full",t.CompileOnSaveAffectedFileList="compileOnSaveAffectedFileList",t.CompileOnSaveEmitFile="compileOnSaveEmitFile",t.Configure="configure",t.Definition="definition",t.DefinitionFull="definition-full",t.DefinitionAndBoundSpan="definitionAndBoundSpan",t.DefinitionAndBoundSpanFull="definitionAndBoundSpan-full",t.Implementation="implementation",t.ImplementationFull="implementation-full",t.EmitOutput="emit-output",t.Exit="exit",t.FileReferences="fileReferences",t.FileReferencesFull="fileReferences-full",t.Format="format",t.Formatonkey="formatonkey",t.FormatFull="format-full",t.FormatonkeyFull="formatonkey-full",t.FormatRangeFull="formatRange-full",t.Geterr="geterr",t.GeterrForProject="geterrForProject",t.SemanticDiagnosticsSync="semanticDiagnosticsSync",t.SyntacticDiagnosticsSync="syntacticDiagnosticsSync",t.SuggestionDiagnosticsSync="suggestionDiagnosticsSync",t.NavBar="navbar",t.NavBarFull="navbar-full",t.Navto="navto",t.NavtoFull="navto-full",t.NavTree="navtree",t.NavTreeFull="navtree-full",t.DocumentHighlights="documentHighlights",t.DocumentHighlightsFull="documentHighlights-full",t.Open="open",t.Quickinfo="quickinfo",t.QuickinfoFull="quickinfo-full",t.References="references",t.ReferencesFull="references-full",t.Reload="reload",t.Rename="rename",t.RenameInfoFull="rename-full",t.RenameLocationsFull="renameLocations-full",t.Saveto="saveto",t.SignatureHelp="signatureHelp",t.SignatureHelpFull="signatureHelp-full",t.FindSourceDefinition="findSourceDefinition",t.Status="status",t.TypeDefinition="typeDefinition",t.ProjectInfo="projectInfo",t.ReloadProjects="reloadProjects",t.Unknown="unknown",t.OpenExternalProject="openExternalProject",t.OpenExternalProjects="openExternalProjects",t.CloseExternalProject="closeExternalProject",t.SynchronizeProjectList="synchronizeProjectList",t.ApplyChangedToOpenFiles="applyChangedToOpenFiles",t.UpdateOpen="updateOpen",t.EncodedSyntacticClassificationsFull="encodedSyntacticClassifications-full",t.EncodedSemanticClassificationsFull="encodedSemanticClassifications-full",t.Cleanup="cleanup",t.GetOutliningSpans="getOutliningSpans",t.GetOutliningSpansFull="outliningSpans",t.TodoComments="todoComments",t.Indentation="indentation",t.DocCommentTemplate="docCommentTemplate",t.CompilerOptionsDiagnosticsFull="compilerOptionsDiagnostics-full",t.NameOrDottedNameSpan="nameOrDottedNameSpan",t.BreakpointStatement="breakpointStatement",t.CompilerOptionsForInferredProjects="compilerOptionsForInferredProjects",t.GetCodeFixes="getCodeFixes",t.GetCodeFixesFull="getCodeFixes-full",t.GetCombinedCodeFix="getCombinedCodeFix",t.GetCombinedCodeFixFull="getCombinedCodeFix-full",t.ApplyCodeActionCommand="applyCodeActionCommand",t.GetSupportedCodeFixes="getSupportedCodeFixes",t.GetApplicableRefactors="getApplicableRefactors",t.GetEditsForRefactor="getEditsForRefactor",t.GetMoveToRefactoringFileSuggestions="getMoveToRefactoringFileSuggestions",t.GetPasteEdits="getPasteEdits",t.GetEditsForRefactorFull="getEditsForRefactor-full",t.OrganizeImports="organizeImports",t.OrganizeImportsFull="organizeImports-full",t.GetEditsForFileRename="getEditsForFileRename",t.GetEditsForFileRenameFull="getEditsForFileRename-full",t.ConfigurePlugin="configurePlugin",t.SelectionRange="selectionRange",t.SelectionRangeFull="selectionRange-full",t.ToggleLineComment="toggleLineComment",t.ToggleLineCommentFull="toggleLineComment-full",t.ToggleMultilineComment="toggleMultilineComment",t.ToggleMultilineCommentFull="toggleMultilineComment-full",t.CommentSelection="commentSelection",t.CommentSelectionFull="commentSelection-full",t.UncommentSelection="uncommentSelection",t.UncommentSelectionFull="uncommentSelection-full",t.PrepareCallHierarchy="prepareCallHierarchy",t.ProvideCallHierarchyIncomingCalls="provideCallHierarchyIncomingCalls",t.ProvideCallHierarchyOutgoingCalls="provideCallHierarchyOutgoingCalls",t.ProvideInlayHints="provideInlayHints",t.WatchChange="watchChange",t.MapCode="mapCode",t))(r3e||{}),Rlt=(t=>(t.FixedPollingInterval="FixedPollingInterval",t.PriorityPollingInterval="PriorityPollingInterval",t.DynamicPriorityPolling="DynamicPriorityPolling",t.FixedChunkSizePolling="FixedChunkSizePolling",t.UseFsEvents="UseFsEvents",t.UseFsEventsOnParentDirectory="UseFsEventsOnParentDirectory",t))(Rlt||{}),Flt=(t=>(t.UseFsEvents="UseFsEvents",t.FixedPollingInterval="FixedPollingInterval",t.DynamicPriorityPolling="DynamicPriorityPolling",t.FixedChunkSizePolling="FixedChunkSizePolling",t))(Flt||{}),Blt=(t=>(t.FixedInterval="FixedInterval",t.PriorityInterval="PriorityInterval",t.DynamicPriority="DynamicPriority",t.FixedChunkSize="FixedChunkSize",t))(Blt||{}),Wlt=(t=>(t.None="None",t.Block="Block",t.Smart="Smart",t))(Wlt||{}),Vlt=(t=>(t.None="none",t.Preserve="preserve",t.ReactNative="react-native",t.React="react",t.ReactJSX="react-jsx",t.ReactJSXDev="react-jsxdev",t))(Vlt||{}),Hlt=(t=>(t.None="none",t.CommonJS="commonjs",t.AMD="amd",t.UMD="umd",t.System="system",t.ES6="es6",t.ES2015="es2015",t.ES2020="es2020",t.ES2022="es2022",t.ESNext="esnext",t.Node16="node16",t.NodeNext="nodenext",t.Preserve="preserve",t))(Hlt||{}),jlt=(t=>(t.Classic="classic",t.Node="node",t.NodeJs="node",t.Node10="node10",t.Node16="node16",t.NodeNext="nodenext",t.Bundler="bundler",t))(jlt||{}),zlt=(t=>(t.Crlf="Crlf",t.Lf="Lf",t))(zlt||{}),Ult=(t=>(t.ES3="es3",t.ES5="es5",t.ES6="es6",t.ES2015="es2015",t.ES2016="es2016",t.ES2017="es2017",t.ES2018="es2018",t.ES2019="es2019",t.ES2020="es2020",t.ES2021="es2021",t.ES2022="es2022",t.ES2023="es2023",t.ESNext="esnext",t.JSON="json",t.Latest="esnext",t))(Ult||{}),s3e=class{constructor(t,r,a){this.host=t,this.info=r,this.isOpen=!1,this.ownFileText=!1,this.pendingReloadFromDisk=!1,this.version=a||0}getVersion(){return this.svc?`SVC-${this.version}-${this.svc.getSnapshotVersion()}`:`Text-${this.version}`}hasScriptVersionCache_TestOnly(){return this.svc!==void 0}resetSourceMapInfo(){this.info.sourceFileLike=void 0,this.info.closeSourceMapFileWatcher(),this.info.sourceMapFilePath=void 0,this.info.declarationInfoPath=void 0,this.info.sourceInfos=void 0,this.info.documentPositionMapper=void 0}useText(t){this.svc=void 0,this.text=t,this.textSnapshot=void 0,this.lineMap=void 0,this.fileSize=void 0,this.resetSourceMapInfo(),this.version++}edit(t,r,a){this.switchToScriptVersionCache().edit(t,r-t,a),this.ownFileText=!1,this.text=void 0,this.textSnapshot=void 0,this.lineMap=void 0,this.fileSize=void 0,this.resetSourceMapInfo()}reload(t){return z.assert(t!==void 0),this.pendingReloadFromDisk=!1,!this.text&&this.svc&&(this.text=GP(this.svc.getSnapshot())),this.text!==t?(this.useText(t),this.ownFileText=!1,!0):!1}reloadWithFileText(t){const{text:r,fileSize:a}=t||!this.info.isDynamicOrHasMixedContent()?this.getFileTextAndSize(t):{text:"",fileSize:void 0},u=this.reload(r);return this.fileSize=a,this.ownFileText=!t||t===this.info.fileName,this.ownFileText&&this.info.mTime===Cp.getTime()&&(this.info.mTime=(this.host.getModifiedTime(this.info.fileName)||Cp).getTime()),u}scheduleReloadIfNeeded(){return!this.pendingReloadFromDisk&&!this.ownFileText?this.pendingReloadFromDisk=!0:!1}delayReloadFromFileIntoText(){this.pendingReloadFromDisk=!0}getTelemetryFileSize(){return this.fileSize?this.fileSize:this.text?this.text.length:this.svc?this.svc.getSnapshot().getLength():this.getSnapshot().getLength()}getSnapshot(){var t;return((t=this.tryUseScriptVersionCache())==null?void 0:t.getSnapshot())||(this.textSnapshot??(this.textSnapshot=DQ.fromString(z.checkDefined(this.text))))}getAbsolutePositionAndLineText(t){const r=this.tryUseScriptVersionCache();if(r)return r.getAbsolutePositionAndLineText(t);const a=this.getLineMap();return t<=a.length?{absolutePosition:a[t-1],lineText:this.text.substring(a[t-1],a[t])}:{absolutePosition:this.text.length,lineText:void 0}}lineToTextSpan(t){const r=this.tryUseScriptVersionCache();if(r)return r.lineToTextSpan(t);const a=this.getLineMap(),u=a[t],h=t+1r===void 0?r=this.host.readFile(a)||"":r;if(!dP(this.info.fileName)){const h=this.host.getFileSize?this.host.getFileSize(a):u().length;if(h>Hhe)return z.assert(!!this.info.containingProjects.length),this.info.containingProjects[0].projectService.logger.info(`Skipped loading contents of large file ${a} for info ${this.info.fileName}: fileSize: ${h}`),this.info.containingProjects[0].projectService.sendLargeFileReferencedEvent(a,h),{text:"",fileSize:h}}return{text:u()}}switchToScriptVersionCache(){return(!this.svc||this.pendingReloadFromDisk)&&(this.svc=l_e.fromString(this.getOrLoadText()),this.textSnapshot=void 0,this.version++),this.svc}tryUseScriptVersionCache(){return(!this.svc||this.pendingReloadFromDisk)&&this.getOrLoadText(),this.isOpen?(!this.svc&&!this.textSnapshot&&(this.svc=l_e.fromString(z.checkDefined(this.text)),this.textSnapshot=void 0),this.svc):this.svc}getOrLoadText(){return(this.text===void 0||this.pendingReloadFromDisk)&&(z.assert(!this.svc||this.pendingReloadFromDisk,"ScriptVersionCache should not be set when reloading from disk"),this.reloadWithFileText()),this.text}getLineMap(){return z.assert(!this.svc,"ScriptVersionCache should not be set"),this.lineMap||(this.lineMap=ML(z.checkDefined(this.text)))}getLineInfo(){const t=this.tryUseScriptVersionCache();if(t)return{getLineCount:()=>t.getLineCount(),getLineText:a=>t.getAbsolutePositionAndLineText(a+1).lineText};const r=this.getLineMap();return ece(this.text,r)}};function sj(t){return t[0]==="^"||(t.includes("walkThroughSnippet:/")||t.includes("untitled:/"))&&fd(t)[0]==="^"||t.includes(":^")&&!t.includes(Hc)}var o3e=class{constructor(t,r,a,u,h,p){this.host=t,this.fileName=r,this.scriptKind=a,this.hasMixedContent=u,this.path=h,this.containingProjects=[],this.isDynamic=sj(r),this.textStorage=new s3e(t,this,p),(u||this.isDynamic)&&(this.realpath=this.path),this.scriptKind=a||fG(r)}isDynamicOrHasMixedContent(){return this.hasMixedContent||this.isDynamic}isScriptOpen(){return this.textStorage.isOpen}open(t){this.textStorage.isOpen=!0,t!==void 0&&this.textStorage.reload(t)&&this.markContainingProjectsAsDirty()}close(t=!0){this.textStorage.isOpen=!1,t&&this.textStorage.scheduleReloadIfNeeded()&&this.markContainingProjectsAsDirty()}getSnapshot(){return this.textStorage.getSnapshot()}ensureRealPath(){if(this.realpath===void 0&&(this.realpath=this.path,this.host.realpath)){z.assert(!!this.containingProjects.length);const t=this.containingProjects[0],r=this.host.realpath(this.path);r&&(this.realpath=t.toPath(r),this.realpath!==this.path&&t.projectService.realpathToScriptInfos.add(this.realpath,this))}}getRealpathIfDifferent(){return this.realpath&&this.realpath!==this.path?this.realpath:void 0}isSymlink(){return this.realpath&&this.realpath!==this.path}getFormatCodeSettings(){return this.formatSettings}getPreferences(){return this.preferences}attachToProject(t){const r=!this.isAttached(t);return r&&(this.containingProjects.push(t),t.getCompilerOptions().preserveSymlinks||this.ensureRealPath(),t.onFileAddedOrRemoved(this.isSymlink())),r}isAttached(t){switch(this.containingProjects.length){case 0:return!1;case 1:return this.containingProjects[0]===t;case 2:return this.containingProjects[0]===t||this.containingProjects[1]===t;default:return Mt(this.containingProjects,t)}}detachFromProject(t){switch(this.containingProjects.length){case 0:return;case 1:this.containingProjects[0]===t&&(t.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects.pop());break;case 2:this.containingProjects[0]===t?(t.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects[0]=this.containingProjects.pop()):this.containingProjects[1]===t&&(t.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects.pop());break;default:FR(this.containingProjects,t)&&t.onFileAddedOrRemoved(this.isSymlink());break}}detachAllProjects(){for(const t of this.containingProjects){TS(t)&&t.getCachedDirectoryStructureHost().addOrDeleteFile(this.fileName,this.path,2);const r=t.getRootFilesMap().get(this.path);t.removeFile(this,!1,!1),t.onFileAddedOrRemoved(this.isSymlink()),r&&!X3(t)&&t.addMissingFileRoot(r.fileName)}Xs(this.containingProjects)}getDefaultProject(){switch(this.containingProjects.length){case 0:return iC.ThrowNoProject();case 1:return dZ(this.containingProjects[0])||cj(this.containingProjects[0])?iC.ThrowNoProject():this.containingProjects[0];default:let t,r,a,u;for(let h=0;h!t.isOrphan())}isContainedByBackgroundProject(){return Rt(this.containingProjects,cj)}lineToTextSpan(t){return this.textStorage.lineToTextSpan(t)}lineOffsetToPosition(t,r,a){return this.textStorage.lineOffsetToPosition(t,r,a)}positionToLineOffset(t){dHt(t);const r=this.textStorage.positionToLineOffset(t);return fHt(r),r}isJavaScript(){return this.scriptKind===1||this.scriptKind===2}closeSourceMapFileWatcher(){this.sourceMapFilePath&&!mo(this.sourceMapFilePath)&&(tm(this.sourceMapFilePath),this.sourceMapFilePath=void 0)}};function dHt(t){z.assert(typeof t=="number",`Expected position ${t} to be a number.`),z.assert(t>=0,"Expected position to be non-negative.")}function fHt(t){z.assert(typeof t.line=="number",`Expected line ${t.line} to be a number.`),z.assert(typeof t.offset=="number",`Expected offset ${t.offset} to be a number.`),z.assert(t.line>0,`Expected line to be non-${t.line===0?"zero":"negative"}`),z.assert(t.offset>0,`Expected offset to be non-${t.offset===0?"zero":"negative"}`)}var Bhe={isKnownTypesPackageName:kv,installPackage:pa,enqueueInstallTypingsRequest:dl,attach:dl,onProjectClosed:dl,globalTypingsCacheLocation:void 0};function qlt(t,r){if(t===r||(t||Ed).length===0&&(r||Ed).length===0)return!0;const a=new Map;let u=0;for(const h of t)a.get(h)!==!0&&(a.set(h,!0),u++);for(const h of r){const p=a.get(h);if(p===void 0)return!1;p===!0&&(a.set(h,!1),u--)}return u===0}function hHt(t,r){return t.enable!==r.enable||!qlt(t.include,r.include)||!qlt(t.exclude,r.exclude)}function _Ht(t,r){return Jw(t)!==Jw(r)}function pHt(t,r){return t===r?!1:!qs(t,r)}var a3e=class{constructor(t){this.installer=t,this.perProjectCache=new Map}isKnownTypesPackageName(t){return this.installer.isKnownTypesPackageName(t)}installPackage(t){return this.installer.installPackage(t)}enqueueInstallTypingsForProject(t,r,a){const u=t.getTypeAcquisition();if(!u||!u.enable)return;const h=this.perProjectCache.get(t.getProjectName());(a||!h||hHt(u,h.typeAcquisition)||_Ht(t.getCompilationSettings(),h.compilerOptions)||pHt(r,h.unresolvedImports))&&(this.perProjectCache.set(t.getProjectName(),{compilerOptions:t.getCompilationSettings(),typeAcquisition:u,typings:h?h.typings:Ed,unresolvedImports:r,poisoned:!0}),this.installer.enqueueInstallTypingsRequest(t,u,r))}updateTypingsForProject(t,r,a,u,h){const p=tc(h);return this.perProjectCache.set(t,{compilerOptions:r,typeAcquisition:a,typings:p,unresolvedImports:u,poisoned:!1}),!a||!a.enable?Ed:p}onProjectClosed(t){this.perProjectCache.delete(t.getProjectName())&&this.installer.onProjectClosed(t)}},oj=(t=>(t[t.Inferred=0]="Inferred",t[t.Configured=1]="Configured",t[t.External=2]="External",t[t.AutoImportProvider=3]="AutoImportProvider",t[t.Auxiliary=4]="Auxiliary",t))(oj||{});function aj(t,r=!1){const a={js:0,jsSize:0,jsx:0,jsxSize:0,ts:0,tsSize:0,tsx:0,tsxSize:0,dts:0,dtsSize:0,deferred:0,deferredSize:0};for(const u of t){const h=r?u.textStorage.getTelemetryFileSize():0;switch(u.scriptKind){case 1:a.js+=1,a.jsSize+=h;break;case 2:a.jsx+=1,a.jsxSize+=h;break;case 3:xf(u.fileName)?(a.dts+=1,a.dtsSize+=h):(a.ts+=1,a.tsSize+=h);break;case 4:a.tsx+=1,a.tsxSize+=h;break;case 7:a.deferred+=1,a.deferredSize+=h;break}}return a}function gHt(t){const r=aj(t.getScriptInfos());return r.js>0&&r.ts===0&&r.tsx===0}function l3e(t){const r=aj(t.getRootScriptInfos());return r.ts===0&&r.tsx===0}function c3e(t){const r=aj(t.getScriptInfos());return r.ts===0&&r.tsx===0}function u3e(t){return!t.some(r=>tu(r,".ts")&&!xf(r)||tu(r,".tsx"))}function d3e(t){return t.generatedFilePath!==void 0}var lA=class eEt{constructor(r,a,u,h,p,m,C,b,T,E,N){switch(this.projectKind=a,this.projectService=u,this.documentRegistry=h,this.compilerOptions=C,this.compileOnSaveEnabled=b,this.watchOptions=T,this.rootFilesMap=new Map,this.plugins=[],this.cachedUnresolvedImportsPerFile=new Map,this.hasAddedorRemovedFiles=!1,this.hasAddedOrRemovedSymlinks=!1,this.lastReportedVersion=0,this.projectProgramVersion=0,this.projectStateVersion=0,this.isInitialLoadPending=kv,this.dirty=!1,this.typingFiles=Ed,this.moduleSpecifierCache=L3e(this),this.createHash=la(this.projectService.host,this.projectService.host.createHash),this.globalCacheResolutionModuleName=Gv.nonRelativeModuleNameForTypingCache,this.updateFromProjectInProgress=!1,this.projectName=r,this.directoryStructureHost=E,this.currentDirectory=this.projectService.getNormalizedAbsolutePath(N),this.getCanonicalFileName=this.projectService.toCanonicalFileName,this.jsDocParsingMode=this.projectService.jsDocParsingMode,this.cancellationToken=new JPe(this.projectService.cancellationToken,this.projectService.throttleWaitMilliseconds),this.compilerOptions?(p||Jw(this.compilerOptions)||this.projectService.hasDeferredExtension())&&(this.compilerOptions.allowNonTsExtensions=!0):(this.compilerOptions=MX(),this.compilerOptions.allowNonTsExtensions=!0,this.compilerOptions.allowJs=!0),u.serverMode){case 0:this.languageServiceEnabled=!0;break;case 1:this.languageServiceEnabled=!0,this.compilerOptions.noResolve=!0,this.compilerOptions.types=[];break;case 2:this.languageServiceEnabled=!1,this.compilerOptions.noResolve=!0,this.compilerOptions.types=[];break;default:z.assertNever(u.serverMode)}this.setInternalCompilerOptionsForEmittingJsFiles();const R=this.projectService.host;this.projectService.logger.loggingEnabled()?this.trace=F=>this.writeLog(F):R.trace&&(this.trace=F=>R.trace(F)),this.realpath=la(R,R.realpath),this.resolutionCache=Xce(this,this.currentDirectory,!0),this.languageService=GPe(this,this.documentRegistry,this.projectService.serverMode),m&&this.disableLanguageService(m),this.markAsDirty(),cj(this)||(this.projectService.pendingEnsureProjectForOpenFiles=!0),this.projectService.onProjectCreation(this)}getResolvedProjectReferenceToRedirect(r){}isNonTsProject(){return im(this),c3e(this)}isJsOnlyProject(){return im(this),gHt(this)}static resolveModule(r,a,u,h){return eEt.importServicePluginSync({name:r},[a],u,h).resolvedModule}static importServicePluginSync(r,a,u,h){z.assertIsDefined(u.require);let p,m;for(const C of a){const b=Lf(u.resolvePath(Hr(C,"node_modules")));h(`Loading ${r.name} from ${C} (resolved to ${b})`);const T=u.require(b,r.name);if(!T.error){m=T.module;break}const E=T.error.stack||T.error.message||JSON.stringify(T.error);(p??(p=[])).push(`Failed to load module '${r.name}' from ${b}: ${E}`)}return{pluginConfigEntry:r,resolvedModule:m,errorLogs:p}}static async importServicePluginAsync(r,a,u,h){z.assertIsDefined(u.importPlugin);let p,m;for(const C of a){const b=Hr(C,"node_modules");h(`Dynamically importing ${r.name} from ${C} (resolved to ${b})`);let T;try{T=await u.importPlugin(b,r.name)}catch(N){T={module:void 0,error:N}}if(!T.error){m=T.module;break}const E=T.error.stack||T.error.message||JSON.stringify(T.error);(p??(p=[])).push(`Failed to dynamically import module '${r.name}' from ${b}: ${E}`)}return{pluginConfigEntry:r,resolvedModule:m,errorLogs:p}}isKnownTypesPackageName(r){return this.typingsCache.isKnownTypesPackageName(r)}installPackage(r){return this.typingsCache.installPackage({...r,projectName:this.projectName,projectRootPath:this.toPath(this.currentDirectory)})}getGlobalTypingsCacheLocation(){return this.getGlobalCache()}get typingsCache(){return this.projectService.typingsCache}getSymlinkCache(){return this.symlinks||(this.symlinks=Xoe(this.getCurrentDirectory(),this.getCanonicalFileName)),this.program&&!this.symlinks.hasProcessedResolutions()&&this.symlinks.setSymlinksFromResolutions(this.program.forEachResolvedModule,this.program.forEachResolvedTypeReferenceDirective,this.program.getAutomaticTypeDirectiveResolutions()),this.symlinks}getCompilationSettings(){return this.compilerOptions}getCompilerOptions(){return this.getCompilationSettings()}getNewLine(){return this.projectService.host.newLine}getProjectVersion(){return this.projectStateVersion.toString()}getProjectReferences(){}getScriptFileNames(){if(!this.rootFilesMap.size)return x;let r;return this.rootFilesMap.forEach(a=>{(this.languageServiceEnabled||a.info&&a.info.isScriptOpen())&&(r||(r=[])).push(a.fileName)}),un(r,this.typingFiles)||x}getOrCreateScriptInfoAndAttachToProject(r){const a=this.projectService.getOrCreateScriptInfoNotOpenedByClient(r,this.currentDirectory,this.directoryStructureHost,!1);if(a){const u=this.rootFilesMap.get(a.path);u&&u.info!==a&&(u.info=a),a.attachToProject(this)}return a}getScriptKind(r){const a=this.projectService.getScriptInfoForPath(this.toPath(r));return a&&a.scriptKind}getScriptVersion(r){const a=this.projectService.getOrCreateScriptInfoNotOpenedByClient(r,this.currentDirectory,this.directoryStructureHost,!1);return a&&a.getLatestVersion()}getScriptSnapshot(r){const a=this.getOrCreateScriptInfoAndAttachToProject(r);if(a)return a.getSnapshot()}getCancellationToken(){return this.cancellationToken}getCurrentDirectory(){return this.currentDirectory}getDefaultLibFileName(){const r=rs(ra(this.projectService.getExecutingFilePath()));return Hr(r,EB(this.compilerOptions))}useCaseSensitiveFileNames(){return this.projectService.host.useCaseSensitiveFileNames}readDirectory(r,a,u,h,p){return this.directoryStructureHost.readDirectory(r,a,u,h,p)}readFile(r){return this.projectService.host.readFile(r)}writeFile(r,a){return this.projectService.host.writeFile(r,a)}fileExists(r){const a=this.toPath(r);return!this.isWatchedMissingFile(a)&&this.directoryStructureHost.fileExists(r)}resolveModuleNameLiterals(r,a,u,h,p,m){return this.resolutionCache.resolveModuleNameLiterals(r,a,u,h,p,m)}getModuleResolutionCache(){return this.resolutionCache.getModuleResolutionCache()}resolveTypeReferenceDirectiveReferences(r,a,u,h,p,m){return this.resolutionCache.resolveTypeReferenceDirectiveReferences(r,a,u,h,p,m)}resolveLibrary(r,a,u,h){return this.resolutionCache.resolveLibrary(r,a,u,h)}directoryExists(r){return this.directoryStructureHost.directoryExists(r)}getDirectories(r){return this.directoryStructureHost.getDirectories(r)}getCachedDirectoryStructureHost(){}toPath(r){return _c(r,this.currentDirectory,this.projectService.toCanonicalFileName)}watchDirectoryOfFailedLookupLocation(r,a,u){return this.projectService.watchFactory.watchDirectory(r,a,u,this.projectService.getWatchOptions(this),tf.FailedLookupLocations,this)}watchAffectingFileLocation(r,a){return this.projectService.watchFactory.watchFile(r,a,2e3,this.projectService.getWatchOptions(this),tf.AffectingFileLocation,this)}clearInvalidateResolutionOfFailedLookupTimer(){return this.projectService.throttledOperations.cancel(`${this.getProjectName()}FailedLookupInvalidation`)}scheduleInvalidateResolutionsOfFailedLookupLocations(){this.projectService.throttledOperations.schedule(`${this.getProjectName()}FailedLookupInvalidation`,1e3,()=>{this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()&&this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)})}invalidateResolutionsOfFailedLookupLocations(){this.clearInvalidateResolutionOfFailedLookupTimer()&&this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()&&(this.markAsDirty(),this.projectService.delayEnsureProjectForOpenFiles())}onInvalidatedResolution(){this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)}watchTypeRootsDirectory(r,a,u){return this.projectService.watchFactory.watchDirectory(r,a,u,this.projectService.getWatchOptions(this),tf.TypeRoots,this)}hasChangedAutomaticTypeDirectiveNames(){return this.resolutionCache.hasChangedAutomaticTypeDirectiveNames()}onChangedAutomaticTypeDirectiveNames(){this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)}getGlobalCache(){return this.getTypeAcquisition().enable?this.projectService.typingsInstaller.globalTypingsCacheLocation:void 0}fileIsOpen(r){return this.projectService.openFiles.has(r)}writeLog(r){this.projectService.logger.info(r)}log(r){this.writeLog(r)}error(r){this.projectService.logger.msg(r,"Err")}setInternalCompilerOptionsForEmittingJsFiles(){(this.projectKind===0||this.projectKind===2)&&(this.compilerOptions.noEmitForJsFiles=!0)}getGlobalProjectErrors(){return Ri(this.projectErrors,r=>!r.file)||Ed}getAllProjectErrors(){return this.projectErrors||Ed}setProjectErrors(r){this.projectErrors=r}getLanguageService(r=!0){return r&&im(this),this.languageService}getSourceMapper(){return this.getLanguageService().getSourceMapper()}clearSourceMapperCache(){this.languageService.clearSourceMapperCache()}getDocumentPositionMapper(r,a){return this.projectService.getDocumentPositionMapper(this,r,a)}getSourceFileLike(r){return this.projectService.getSourceFileLike(r,this)}shouldEmitFile(r){return r&&!r.isDynamicOrHasMixedContent()&&!this.program.isSourceOfProjectReferenceRedirect(r.path)}getCompileOnSaveAffectedFileList(r){return this.languageServiceEnabled?(im(this),this.builderState=X0.create(this.program,this.builderState,!0),ns(X0.getFilesAffectedBy(this.builderState,this.program,r.path,this.cancellationToken,this.projectService.host),a=>this.shouldEmitFile(this.projectService.getScriptInfoForPath(a.path))?a.fileName:void 0)):[]}emitFile(r,a){if(!this.languageServiceEnabled||!this.shouldEmitFile(r))return{emitSkipped:!0,diagnostics:Ed};const{emitSkipped:u,diagnostics:h,outputFiles:p}=this.getLanguageService().getEmitOutput(r.fileName);if(!u){for(const m of p){const C=bo(m.name,this.currentDirectory);a(C,m.text,m.writeByteOrderMark)}if(this.builderState&&fg(this.compilerOptions)){const m=p.filter(C=>xf(C.name));if(m.length===1){const C=this.program.getSourceFile(r.fileName),b=this.projectService.host.createHash?this.projectService.host.createHash(m[0].text):$R(m[0].text);X0.updateSignatureOfFile(this.builderState,b,C.resolvedPath)}}}return{emitSkipped:u,diagnostics:h}}enableLanguageService(){this.languageServiceEnabled||this.projectService.serverMode===2||(this.languageServiceEnabled=!0,this.lastFileExceededProgramSize=void 0,this.projectService.onUpdateLanguageServiceStateForProject(this,!0))}cleanupProgram(){if(this.program){for(const r of this.program.getSourceFiles())this.detachScriptInfoIfNotRoot(r.fileName);this.program.forEachResolvedProjectReference(r=>this.detachScriptInfoFromProject(r.sourceFile.fileName)),this.program=void 0}}disableLanguageService(r){this.languageServiceEnabled&&(z.assert(this.projectService.serverMode!==2),this.languageService.cleanupSemanticCache(),this.languageServiceEnabled=!1,this.cleanupProgram(),this.lastFileExceededProgramSize=r,this.builderState=void 0,this.autoImportProviderHost&&this.autoImportProviderHost.close(),this.autoImportProviderHost=void 0,this.resolutionCache.closeTypeRootsWatch(),this.clearGeneratedFileWatch(),this.projectService.verifyDocumentRegistry(),this.projectService.onUpdateLanguageServiceStateForProject(this,!1))}getProjectName(){return this.projectName}removeLocalTypingsFromTypeAcquisition(r){return!r||!r.include?r:{...r,include:this.removeExistingTypings(r.include)}}getExternalFiles(r){return tc(Ln(this.plugins,a=>{if(typeof a.module.getExternalFiles=="function")try{return a.module.getExternalFiles(this,r||0)}catch(u){this.projectService.logger.info(`A plugin threw an exception in getExternalFiles: ${u}`),u.stack&&this.projectService.logger.info(u.stack)}}))}getSourceFile(r){if(this.program)return this.program.getSourceFileByPath(r)}getSourceFileOrConfigFile(r){const a=this.program.getCompilerOptions();return r===a.configFilePath?a.configFile:this.getSourceFile(r)}close(){var r;this.projectService.typingsCache.onProjectClosed(this),this.closeWatchingTypingLocations(),this.cleanupProgram(),W(this.externalFiles,a=>this.detachScriptInfoIfNotRoot(a)),this.rootFilesMap.forEach(a=>{var u;return(u=a.info)==null?void 0:u.detachFromProject(this)}),this.projectService.pendingEnsureProjectForOpenFiles=!0,this.rootFilesMap=void 0,this.externalFiles=void 0,this.program=void 0,this.builderState=void 0,this.resolutionCache.clear(),this.resolutionCache=void 0,this.cachedUnresolvedImportsPerFile=void 0,(r=this.packageJsonWatches)==null||r.forEach(a=>{a.projects.delete(this),a.close()}),this.packageJsonWatches=void 0,this.moduleSpecifierCache.clear(),this.moduleSpecifierCache=void 0,this.directoryStructureHost=void 0,this.exportMapCache=void 0,this.projectErrors=void 0,this.plugins.length=0,this.missingFilesMap&&(tp(this.missingFilesMap,h0),this.missingFilesMap=void 0),this.clearGeneratedFileWatch(),this.clearInvalidateResolutionOfFailedLookupTimer(),this.autoImportProviderHost&&this.autoImportProviderHost.close(),this.autoImportProviderHost=void 0,this.noDtsResolutionProject&&this.noDtsResolutionProject.close(),this.noDtsResolutionProject=void 0,this.languageService.dispose(),this.languageService=void 0}detachScriptInfoIfNotRoot(r){const a=this.projectService.getScriptInfo(r);a&&!this.isRoot(a)&&a.detachFromProject(this)}isClosed(){return this.rootFilesMap===void 0}hasRoots(){var r;return!!((r=this.rootFilesMap)!=null&&r.size)}isOrphan(){return!1}getRootFiles(){return this.rootFilesMap&&Fn(fh(this.rootFilesMap.values(),r=>{var a;return(a=r.info)==null?void 0:a.fileName}))}getRootFilesMap(){return this.rootFilesMap}getRootScriptInfos(){return Fn(fh(this.rootFilesMap.values(),r=>r.info))}getScriptInfos(){return this.languageServiceEnabled?Yt(this.program.getSourceFiles(),r=>{const a=this.projectService.getScriptInfoForPath(r.resolvedPath);return z.assert(!!a,"getScriptInfo",()=>`scriptInfo for a file '${r.fileName}' Path: '${r.path}' / '${r.resolvedPath}' is missing.`),a}):this.getRootScriptInfos()}getExcludedFiles(){return Ed}getFileNames(r,a){if(!this.program)return[];if(!this.languageServiceEnabled){let h=this.getRootFiles();if(this.compilerOptions){const p=KPe(this.compilerOptions);p&&(h||(h=[])).push(p)}return h}const u=[];for(const h of this.program.getSourceFiles())r&&this.program.isSourceFileFromExternalLibrary(h)||u.push(h.fileName);if(!a){const h=this.program.getCompilerOptions().configFile;if(h&&(u.push(h.fileName),h.extendedSourceFiles))for(const p of h.extendedSourceFiles)u.push(p)}return u}getFileNamesWithRedirectInfo(r){return this.getFileNames().map(a=>({fileName:a,isSourceOfProjectReferenceRedirect:r&&this.isSourceOfProjectReferenceRedirect(a)}))}hasConfigFile(r){if(this.program&&this.languageServiceEnabled){const a=this.program.getCompilerOptions().configFile;if(a){if(r===a.fileName)return!0;if(a.extendedSourceFiles){for(const u of a.extendedSourceFiles)if(r===u)return!0}}}return!1}containsScriptInfo(r){if(this.isRoot(r))return!0;if(!this.program)return!1;const a=this.program.getSourceFileByPath(r.path);return!!a&&a.resolvedPath===r.path}containsFile(r,a){const u=this.projectService.getScriptInfoForNormalizedPath(r);return u&&(u.isScriptOpen()||!a)?this.containsScriptInfo(u):!1}isRoot(r){var a,u;return((u=(a=this.rootFilesMap)==null?void 0:a.get(r.path))==null?void 0:u.info)===r}addRoot(r,a){z.assert(!this.isRoot(r)),this.rootFilesMap.set(r.path,{fileName:a||r.fileName,info:r}),r.attachToProject(this),this.markAsDirty()}addMissingFileRoot(r){const a=this.projectService.toPath(r);this.rootFilesMap.set(a,{fileName:r}),this.markAsDirty()}removeFile(r,a,u){this.isRoot(r)&&this.removeRoot(r),a?this.resolutionCache.removeResolutionsOfFile(r.path):this.resolutionCache.invalidateResolutionOfFile(r.path),this.cachedUnresolvedImportsPerFile.delete(r.path),u&&r.detachFromProject(this),this.markAsDirty()}registerFileUpdate(r){(this.updatedFileNames||(this.updatedFileNames=new Set)).add(r)}markFileAsDirty(r){this.markAsDirty(),this.exportMapCache&&!this.exportMapCache.isEmpty()&&(this.changedFilesForExportMapCache||(this.changedFilesForExportMapCache=new Set)).add(r)}markAsDirty(){this.dirty||(this.projectStateVersion++,this.dirty=!0)}markAutoImportProviderAsDirty(){var r;this.autoImportProviderHost||(this.autoImportProviderHost=void 0),(r=this.autoImportProviderHost)==null||r.markAsDirty()}onAutoImportProviderSettingsChanged(){var r;this.autoImportProviderHost===!1?this.autoImportProviderHost=void 0:(r=this.autoImportProviderHost)==null||r.markAsDirty()}onPackageJsonChange(){this.moduleSpecifierCache.clear(),this.autoImportProviderHost&&this.autoImportProviderHost.markAsDirty()}onFileAddedOrRemoved(r){this.hasAddedorRemovedFiles=!0,r&&(this.hasAddedOrRemovedSymlinks=!0)}onDiscoveredSymlink(){this.hasAddedOrRemovedSymlinks=!0}updateFromProject(){im(this)}updateGraph(){var r,a,u,h;(r=sr)==null||r.push(sr.Phase.Session,"updateGraph",{name:this.projectName,kind:oj[this.projectKind]}),(a=c_)==null||a.logStartUpdateGraph(),this.resolutionCache.startRecordingFilesWithChangedResolutions();const p=this.updateGraphWorker(),m=this.hasAddedorRemovedFiles;this.hasAddedorRemovedFiles=!1,this.hasAddedOrRemovedSymlinks=!1;const C=this.resolutionCache.finishRecordingFilesWithChangedResolutions()||Ed;for(const T of C)this.cachedUnresolvedImportsPerFile.delete(T);this.languageServiceEnabled&&this.projectService.serverMode===0&&!this.isOrphan()?((p||C.length)&&(this.lastCachedUnresolvedImportsList=mHt(this.program,this.cachedUnresolvedImportsPerFile)),this.projectService.typingsCache.enqueueInstallTypingsForProject(this,this.lastCachedUnresolvedImportsList,m)):this.lastCachedUnresolvedImportsList=void 0;const b=this.projectProgramVersion===0&&p;return p&&this.projectProgramVersion++,m&&this.markAutoImportProviderAsDirty(),b&&this.getPackageJsonAutoImportProvider(),(u=c_)==null||u.logStopUpdateGraph(),(h=sr)==null||h.pop(),!p}updateTypingFiles(r){f$(r,this.typingFiles,f6(!this.useCaseSensitiveFileNames()),dl,a=>this.detachScriptInfoFromProject(a))&&(this.typingFiles=r,this.resolutionCache.setFilesWithInvalidatedNonRelativeUnresolvedImports(this.cachedUnresolvedImportsPerFile),this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this))}closeWatchingTypingLocations(){this.typingWatchers&&tp(this.typingWatchers,h0),this.typingWatchers=void 0}onTypingInstallerWatchInvoke(){this.typingWatchers.isInvoked=!0,this.projectService.updateTypingsForProject({projectName:this.getProjectName(),kind:kQ})}watchTypingLocations(r){if(!r){this.typingWatchers.isInvoked=!1;return}if(!r.length){this.closeWatchingTypingLocations();return}const a=new Map(this.typingWatchers);this.typingWatchers||(this.typingWatchers=new Map),this.typingWatchers.isInvoked=!1;const u=(h,p)=>{const m=this.toPath(h);a.delete(m),this.typingWatchers.has(m)||this.typingWatchers.set(m,p==="FileWatcher"?this.projectService.watchFactory.watchFile(h,()=>this.typingWatchers.isInvoked?this.writeLog("TypingWatchers already invoked"):this.onTypingInstallerWatchInvoke(),2e3,this.projectService.getWatchOptions(this),tf.TypingInstallerLocationFile,this):this.projectService.watchFactory.watchDirectory(h,C=>{if(this.typingWatchers.isInvoked)return this.writeLog("TypingWatchers already invoked");if(!tu(C,".json"))return this.writeLog("Ignoring files that are not *.json");if(Mb(C,Hr(this.projectService.typingsInstaller.globalTypingsCacheLocation,"package.json"),!this.useCaseSensitiveFileNames()))return this.writeLog("Ignoring package.json change at global typings location");this.onTypingInstallerWatchInvoke()},1,this.projectService.getWatchOptions(this),tf.TypingInstallerLocationDirectory,this))};for(const h of r){const p=fd(h);if(p==="package.json"||p==="bower.json"){u(h,"FileWatcher");continue}if(l0(this.currentDirectory,h,this.currentDirectory,!this.useCaseSensitiveFileNames())){const m=h.indexOf(Hc,this.currentDirectory.length+1);u(m!==-1?h.substr(0,m):h,"DirectoryWatcher");continue}if(l0(this.projectService.typingsInstaller.globalTypingsCacheLocation,h,this.currentDirectory,!this.useCaseSensitiveFileNames())){u(this.projectService.typingsInstaller.globalTypingsCacheLocation,"DirectoryWatcher");continue}u(h,"DirectoryWatcher")}a.forEach((h,p)=>{h.close(),this.typingWatchers.delete(p)})}getCurrentProgram(){return this.program}removeExistingTypings(r){const a=xK(this.getCompilerOptions(),this.directoryStructureHost);return r.filter(u=>!a.includes(u))}updateGraphWorker(){var r,a;const u=this.languageService.getCurrentProgram();z.assert(u===this.program),z.assert(!this.isClosed(),"Called update graph worker of closed project"),this.writeLog(`Starting updateGraphWorker: Project: ${this.getProjectName()}`);const h=Vc(),{hasInvalidatedResolutions:p,hasInvalidatedLibResolutions:m}=this.resolutionCache.createHasInvalidatedResolutions(kv,kv);this.hasInvalidatedResolutions=p,this.hasInvalidatedLibResolutions=m,this.resolutionCache.startCachingPerDirectoryResolution(),this.dirty=!1,this.updateFromProjectInProgress=!0,this.program=this.languageService.getProgram(),this.updateFromProjectInProgress=!1,(r=sr)==null||r.push(sr.Phase.Session,"finishCachingPerDirectoryResolution"),this.resolutionCache.finishCachingPerDirectoryResolution(this.program,u),(a=sr)==null||a.pop(),z.assert(u===void 0||this.program!==void 0);let C=!1;if(this.program&&(!u||this.program!==u&&this.program.structureIsReused!==2)){if(C=!0,u){for(const E of u.getSourceFiles()){const N=this.program.getSourceFileByPath(E.resolvedPath);(!N||E.resolvedPath===E.path&&N.resolvedPath!==E.path)&&this.detachScriptInfoFromProject(E.fileName,!!this.program.getSourceFileByPath(E.path),!0)}u.forEachResolvedProjectReference(E=>{this.program.getResolvedProjectReferenceByPath(E.sourceFile.path)||this.detachScriptInfoFromProject(E.sourceFile.fileName,void 0,!0)})}if(this.rootFilesMap.forEach((E,N)=>{var R;const F=this.program.getSourceFileByPath(N),j=E.info;!F||((R=E.info)==null?void 0:R.path)===F.resolvedPath||(E.info=this.projectService.getScriptInfo(F.fileName),z.assert(E.info.isAttached(this)),j==null||j.detachFromProject(this))}),wce(this.program,this.missingFilesMap||(this.missingFilesMap=new Map),(E,N)=>this.addMissingFileWatcher(E,N)),this.generatedFilesMap){const E=this.compilerOptions.outFile;d3e(this.generatedFilesMap)?(!E||!this.isValidGeneratedFileWatcher(h_(E)+".d.ts",this.generatedFilesMap))&&this.clearGeneratedFileWatch():E?this.clearGeneratedFileWatch():this.generatedFilesMap.forEach((N,R)=>{const F=this.program.getSourceFileByPath(R);(!F||F.resolvedPath!==R||!this.isValidGeneratedFileWatcher(AJ(F.fileName,this.compilerOptions,this.program),N))&&(tm(N),this.generatedFilesMap.delete(R))})}this.languageServiceEnabled&&this.projectService.serverMode===0&&this.resolutionCache.updateTypeRootsWatch()}this.projectService.verifyProgram(this),this.exportMapCache&&!this.exportMapCache.isEmpty()&&(this.exportMapCache.releaseSymbols(),this.hasAddedorRemovedFiles||u&&!this.program.structureIsReused?this.exportMapCache.clear():this.changedFilesForExportMapCache&&u&&this.program&&Bb(this.changedFilesForExportMapCache,E=>{const N=u.getSourceFileByPath(E),R=this.program.getSourceFileByPath(E);return!N||!R?(this.exportMapCache.clear(),!0):this.exportMapCache.onFileChanged(N,R,!!this.getTypeAcquisition().enable)})),this.changedFilesForExportMapCache&&this.changedFilesForExportMapCache.clear(),(this.hasAddedOrRemovedSymlinks||this.program&&!this.program.structureIsReused&&this.getCompilerOptions().preserveSymlinks)&&(this.symlinks=void 0,this.moduleSpecifierCache.clear());const b=this.externalFiles||Ed;this.externalFiles=this.getExternalFiles(),f$(this.externalFiles,b,f6(!this.useCaseSensitiveFileNames()),E=>{const N=this.projectService.getOrCreateScriptInfoNotOpenedByClient(E,this.currentDirectory,this.directoryStructureHost,!1);N==null||N.attachToProject(this)},E=>this.detachScriptInfoFromProject(E));const T=Vc()-h;return this.sendPerformanceEvent("UpdateGraph",T),this.writeLog(`Finishing updateGraphWorker: Project: ${this.getProjectName()} projectStateVersion: ${this.projectStateVersion} projectProgramVersion: ${this.projectProgramVersion} structureChanged: ${C}${this.program?` structureIsReused:: ${Nre[this.program.structureIsReused]}`:""} Elapsed: ${T}ms`),this.projectService.logger.isTestLogger?this.program!==u?this.print(!0,this.hasAddedorRemovedFiles,!0):this.writeLog("Same program as before"):this.hasAddedorRemovedFiles?this.print(!0,!0,!1):this.program!==u&&this.writeLog("Different program with same set of files"),this.projectService.verifyDocumentRegistry(),C}sendPerformanceEvent(r,a){this.projectService.sendPerformanceEvent(r,a)}detachScriptInfoFromProject(r,a,u){const h=this.projectService.getScriptInfo(r);h&&(h.detachFromProject(this),a||this.resolutionCache.removeResolutionsOfFile(h.path,u))}addMissingFileWatcher(r,a){var u;if(TS(this)){const p=this.projectService.configFileExistenceInfoCache.get(r);if((u=p==null?void 0:p.config)!=null&&u.projects.has(this.canonicalConfigFilePath))return Z7}const h=this.projectService.watchFactory.watchFile(bo(a,this.currentDirectory),(p,m)=>{TS(this)&&this.getCachedDirectoryStructureHost().addOrDeleteFile(p,r,m),m===0&&this.missingFilesMap.has(r)&&(this.missingFilesMap.delete(r),h.close(),this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this))},500,this.projectService.getWatchOptions(this),tf.MissingFile,this);return h}isWatchedMissingFile(r){return!!this.missingFilesMap&&this.missingFilesMap.has(r)}addGeneratedFileWatch(r,a){if(this.compilerOptions.outFile)this.generatedFilesMap||(this.generatedFilesMap=this.createGeneratedFileWatcher(r));else{const u=this.toPath(a);if(this.generatedFilesMap){if(d3e(this.generatedFilesMap)){z.fail(`${this.projectName} Expected to not have --out watcher for generated file with options: ${JSON.stringify(this.compilerOptions)}`);return}if(this.generatedFilesMap.has(u))return}else this.generatedFilesMap=new Map;this.generatedFilesMap.set(u,this.createGeneratedFileWatcher(r))}}createGeneratedFileWatcher(r){return{generatedFilePath:this.toPath(r),watcher:this.projectService.watchFactory.watchFile(r,()=>{this.clearSourceMapperCache(),this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)},2e3,this.projectService.getWatchOptions(this),tf.MissingGeneratedFile,this)}}isValidGeneratedFileWatcher(r,a){return this.toPath(r)===a.generatedFilePath}clearGeneratedFileWatch(){this.generatedFilesMap&&(d3e(this.generatedFilesMap)?tm(this.generatedFilesMap):tp(this.generatedFilesMap,tm),this.generatedFilesMap=void 0)}getScriptInfoForNormalizedPath(r){const a=this.projectService.getScriptInfoForPath(this.toPath(r));return a&&!a.isAttached(this)?iC.ThrowProjectDoesNotContainDocument(r,this):a}getScriptInfo(r){return this.projectService.getScriptInfo(r)}filesToString(r){return this.filesToStringWorker(r,!0,!1)}filesToStringWorker(r,a,u){if(this.isInitialLoadPending())return` Files (0) InitialLoadPending +`;if(!this.program)return` Files (0) NoProgram +`;const h=this.program.getSourceFiles();let p=` Files (${h.length}) +`;if(r){for(const m of h)p+=` ${m.fileName}${u?` ${m.version} ${JSON.stringify(m.text)}`:""} +`;a&&(p+=` + +`,nue(this.program,m=>p+=` ${m} +`))}return p}print(r,a,u){var h;this.writeLog(`Project '${this.projectName}' (${oj[this.projectKind]})`),this.writeLog(this.filesToStringWorker(r&&this.projectService.logger.hasLevel(3),a&&this.projectService.logger.hasLevel(3),u&&this.projectService.logger.hasLevel(3))),this.writeLog("-----------------------------------------------"),this.autoImportProviderHost&&this.autoImportProviderHost.print(!1,!1,!1),(h=this.noDtsResolutionProject)==null||h.print(!1,!1,!1)}setCompilerOptions(r){var a;if(r){r.allowNonTsExtensions=!0;const u=this.compilerOptions;this.compilerOptions=r,this.setInternalCompilerOptionsForEmittingJsFiles(),(a=this.noDtsResolutionProject)==null||a.setCompilerOptions(this.getCompilerOptionsForNoDtsResolutionProject()),G$(u,r)&&(this.cachedUnresolvedImportsPerFile.clear(),this.lastCachedUnresolvedImportsList=void 0,this.resolutionCache.onChangesAffectModuleResolution(),this.moduleSpecifierCache.clear()),this.markAsDirty()}}setWatchOptions(r){this.watchOptions=r}getWatchOptions(){return this.watchOptions}setTypeAcquisition(r){r&&(this.typeAcquisition=this.removeLocalTypingsFromTypeAcquisition(r))}getTypeAcquisition(){return this.typeAcquisition||{}}getChangesSinceVersion(r,a){var u,h;const p=a?b=>Fn(b.entries(),([T,E])=>({fileName:T,isSourceOfProjectReferenceRedirect:E})):b=>Fn(b.keys());this.isInitialLoadPending()||im(this);const m={projectName:this.getProjectName(),version:this.projectProgramVersion,isInferred:X3(this),options:this.getCompilationSettings(),languageServiceDisabled:!this.languageServiceEnabled,lastFileExceededProgramSize:this.lastFileExceededProgramSize},C=this.updatedFileNames;if(this.updatedFileNames=void 0,this.lastReportedFileNames&&r===this.lastReportedVersion){if(this.projectProgramVersion===this.lastReportedVersion&&!C)return{info:m,projectErrors:this.getGlobalProjectErrors()};const b=this.lastReportedFileNames,T=((u=this.externalFiles)==null?void 0:u.map(U=>({fileName:Kc(U),isSourceOfProjectReferenceRedirect:!1})))||Ed,E=P_(this.getFileNamesWithRedirectInfo(!!a).concat(T),U=>U.fileName,U=>U.isSourceOfProjectReferenceRedirect),N=new Map,R=new Map,F=C?Fn(C.keys()):[],j=[];return hf(E,(U,q)=>{b.has(q)?a&&U!==b.get(q)&&j.push({fileName:q,isSourceOfProjectReferenceRedirect:U}):N.set(q,U)}),hf(b,(U,q)=>{E.has(q)||R.set(q,U)}),this.lastReportedFileNames=E,this.lastReportedVersion=this.projectProgramVersion,{info:m,changes:{added:p(N),removed:p(R),updated:a?F.map(U=>({fileName:U,isSourceOfProjectReferenceRedirect:this.isSourceOfProjectReferenceRedirect(U)})):F,updatedRedirects:a?j:void 0},projectErrors:this.getGlobalProjectErrors()}}else{const b=this.getFileNamesWithRedirectInfo(!!a),T=((h=this.externalFiles)==null?void 0:h.map(N=>({fileName:Kc(N),isSourceOfProjectReferenceRedirect:!1})))||Ed,E=b.concat(T);return this.lastReportedFileNames=P_(E,N=>N.fileName,N=>N.isSourceOfProjectReferenceRedirect),this.lastReportedVersion=this.projectProgramVersion,{info:m,files:a?E:E.map(N=>N.fileName),projectErrors:this.getGlobalProjectErrors()}}}removeRoot(r){this.rootFilesMap.delete(r.path)}isSourceOfProjectReferenceRedirect(r){return!!this.program&&this.program.isSourceOfProjectReferenceRedirect(r)}getGlobalPluginSearchPaths(){return[...this.projectService.pluginProbeLocations,Hr(this.projectService.getExecutingFilePath(),"../../..")]}enableGlobalPlugins(r){if(!this.projectService.globalPlugins.length)return;const a=this.projectService.host;if(!a.require&&!a.importPlugin){this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded");return}const u=this.getGlobalPluginSearchPaths();for(const h of this.projectService.globalPlugins)h&&(r.plugins&&r.plugins.some(p=>p.name===h)||(this.projectService.logger.info(`Loading global plugin ${h}`),this.enablePlugin({name:h,global:!0},u)))}enablePlugin(r,a){this.projectService.requestEnablePlugin(this,r,a)}enableProxy(r,a){try{if(typeof r!="function"){this.projectService.logger.info(`Skipped loading plugin ${a.name} because it did not expose a proper factory function`);return}const u={config:a,project:this,languageService:this.languageService,languageServiceHost:this,serverHost:this.projectService.host,session:this.projectService.session},h=r({typescript:klt}),p=h.create(u);for(const m of Object.keys(this.languageService))m in p||(this.projectService.logger.info(`Plugin activation warning: Missing proxied method ${m} in created LS. Patching.`),p[m]=this.languageService[m]);this.projectService.logger.info("Plugin validation succeeded"),this.languageService=p,this.plugins.push({name:a.name,module:h})}catch(u){this.projectService.logger.info(`Plugin activation failed: ${u}`)}}onPluginConfigurationChanged(r,a){this.plugins.filter(u=>u.name===r).forEach(u=>{u.module.onConfigurationChanged&&u.module.onConfigurationChanged(a)})}refreshDiagnostics(){this.projectService.sendProjectsUpdatedInBackgroundEvent()}getPackageJsonsVisibleToFile(r,a){return this.projectService.serverMode!==0?Ed:this.projectService.getPackageJsonsVisibleToFile(r,this,a)}getNearestAncestorDirectoryWithPackageJson(r){return this.projectService.getNearestAncestorDirectoryWithPackageJson(r)}getPackageJsonsForAutoImport(r){return this.getPackageJsonsVisibleToFile(Hr(this.currentDirectory,Q7),r)}getPackageJsonCache(){return this.projectService.packageJsonCache}getCachedExportInfoMap(){return this.exportMapCache||(this.exportMapCache=Fde(this))}clearCachedExportInfoMap(){var r;(r=this.exportMapCache)==null||r.clear()}getModuleSpecifierCache(){return this.moduleSpecifierCache}includePackageJsonAutoImports(){return this.projectService.includePackageJsonAutoImports()===0||!this.languageServiceEnabled||kH(this.currentDirectory)||!this.isDefaultProjectForOpenFiles()?0:this.projectService.includePackageJsonAutoImports()}getHostForAutoImportProvider(){var r,a;return this.program?{fileExists:this.program.fileExists,directoryExists:this.program.directoryExists,realpath:this.program.realpath||((r=this.projectService.host.realpath)==null?void 0:r.bind(this.projectService.host)),getCurrentDirectory:this.getCurrentDirectory.bind(this),readFile:this.projectService.host.readFile.bind(this.projectService.host),getDirectories:this.projectService.host.getDirectories.bind(this.projectService.host),trace:(a=this.projectService.host.trace)==null?void 0:a.bind(this.projectService.host),useCaseSensitiveFileNames:this.program.useCaseSensitiveFileNames(),readDirectory:this.projectService.host.readDirectory.bind(this.projectService.host)}:this.projectService.host}getPackageJsonAutoImportProvider(){var r,a,u;if(this.autoImportProviderHost===!1)return;if(this.projectService.serverMode!==0){this.autoImportProviderHost=!1;return}if(this.autoImportProviderHost){if(im(this.autoImportProviderHost),this.autoImportProviderHost.isEmpty()){this.autoImportProviderHost.close(),this.autoImportProviderHost=void 0;return}return this.autoImportProviderHost.getCurrentProgram()}const h=this.includePackageJsonAutoImports();if(h){(r=sr)==null||r.push(sr.Phase.Session,"getPackageJsonAutoImportProvider");const p=Vc();if(this.autoImportProviderHost=p3e.create(h,this,this.getHostForAutoImportProvider(),this.documentRegistry),this.autoImportProviderHost)return im(this.autoImportProviderHost),this.sendPerformanceEvent("CreatePackageJsonAutoImportProvider",Vc()-p),(a=sr)==null||a.pop(),this.autoImportProviderHost.getCurrentProgram();(u=sr)==null||u.pop()}}isDefaultProjectForOpenFiles(){return!!hf(this.projectService.openFiles,(r,a)=>this.projectService.tryGetDefaultProjectForFile(this.projectService.getScriptInfoForPath(a))===this)}watchNodeModulesForPackageJsonChanges(r){return this.projectService.watchPackageJsonsInNodeModules(r,this)}getIncompleteCompletionsCache(){return this.projectService.getIncompleteCompletionsCache()}getNoDtsResolutionProject(r){return z.assert(this.projectService.serverMode===0),this.noDtsResolutionProject||(this.noDtsResolutionProject=new h3e(this.projectService,this.documentRegistry,this.getCompilerOptionsForNoDtsResolutionProject(),this.currentDirectory)),this.noDtsResolutionProject.rootFile!==r&&(this.projectService.setFileNamesOfAutpImportProviderOrAuxillaryProject(this.noDtsResolutionProject,[r]),this.noDtsResolutionProject.rootFile=r),this.noDtsResolutionProject}runWithTemporaryFileUpdate(r,a,u){var h,p,m,C;const b=this.program,T=z.checkDefined((h=this.program)==null?void 0:h.getSourceFile(r),"Expected file to be part of program"),E=z.checkDefined(T.getText());(p=this.getScriptInfo(r))==null||p.editContent(0,E.length,a),this.updateGraph();try{u(this.program,b,(m=this.program)==null?void 0:m.getSourceFile(r))}finally{(C=this.getScriptInfo(r))==null||C.editContent(0,this.program.getSourceFile(r).getText().length,E)}}getCompilerOptionsForNoDtsResolutionProject(){return{...this.getCompilerOptions(),noDtsResolution:!0,allowJs:!0,maxNodeModuleJsDepth:3,diagnostics:!1,skipLibCheck:!0,sourceMap:!1,types:x,lib:x,noLib:!0}}};function mHt(t,r){var a,u;const h=t.getSourceFiles();(a=sr)==null||a.push(sr.Phase.Session,"getUnresolvedImports",{count:h.length});const p=t.getTypeChecker().getAmbientModules().map(C=>Nm(C.getName())),m=fr(Ln(h,C=>vHt(t,C,p,r)));return(u=sr)==null||u.pop(),m}function vHt(t,r,a,u){return ka(u,r.path,()=>{let h;return t.forEachResolvedModule(({resolvedModule:p},m)=>{(!p||!Q8(p.extension))&&!Zd(m)&&!a.some(C=>C===m)&&(h=xi(h,IK(m).packageName))},r),h||Ed})}var f3e=class extends lA{constructor(t,r,a,u,h,p,m){super(t.newInferredProjectName(),0,t,r,void 0,void 0,a,!1,u,t.host,p),this._isJsInferredProject=!1,this.typeAcquisition=m,this.projectRootPath=h&&t.toCanonicalFileName(h),!h&&!t.useSingleInferredProject&&(this.canonicalCurrentDirectory=t.toCanonicalFileName(this.currentDirectory)),this.enableGlobalPlugins(this.getCompilerOptions())}toggleJsInferredProject(t){t!==this._isJsInferredProject&&(this._isJsInferredProject=t,this.setCompilerOptions())}setCompilerOptions(t){if(!t&&!this.getCompilationSettings())return;const r=Zue(t||this.getCompilationSettings());this._isJsInferredProject&&typeof r.maxNodeModuleJsDepth!="number"?r.maxNodeModuleJsDepth=2:this._isJsInferredProject||(r.maxNodeModuleJsDepth=void 0),r.allowJs=!0,super.setCompilerOptions(r)}addRoot(t){z.assert(t.isScriptOpen()),this.projectService.startWatchingConfigFilesForInferredProjectRoot(t),!this._isJsInferredProject&&t.isJavaScript()?this.toggleJsInferredProject(!0):this.isOrphan()&&this._isJsInferredProject&&!t.isJavaScript()&&this.toggleJsInferredProject(!1),super.addRoot(t)}removeRoot(t){this.projectService.stopWatchingConfigFilesForScriptInfo(t),super.removeRoot(t),!this.isOrphan()&&this._isJsInferredProject&&t.isJavaScript()&&Be(this.getRootScriptInfos(),r=>!r.isJavaScript())&&this.toggleJsInferredProject(!1)}isOrphan(){return!this.hasRoots()}isProjectWithSingleRoot(){return!this.projectRootPath&&!this.projectService.useSingleInferredProject||this.getRootScriptInfos().length===1}close(){W(this.getRootScriptInfos(),t=>this.projectService.stopWatchingConfigFilesForScriptInfo(t)),super.close()}getTypeAcquisition(){return this.typeAcquisition||{enable:l3e(this),include:x,exclude:x}}},h3e=class extends lA{constructor(t,r,a,u){super(t.newAuxiliaryProjectName(),4,t,r,!1,void 0,a,!1,void 0,t.host,u)}isOrphan(){return!0}scheduleInvalidateResolutionsOfFailedLookupLocations(){}},_3e=class oHe extends lA{constructor(r,a,u,h){super(r.projectService.newAutoImportProviderProjectName(),3,r.projectService,u,!1,void 0,h,!1,r.getWatchOptions(),r.projectService.host,r.currentDirectory),this.hostProject=r,this.rootFileNames=a,this.useSourceOfProjectReferenceRedirect=la(this.hostProject,this.hostProject.useSourceOfProjectReferenceRedirect),this.getParsedCommandLine=la(this.hostProject,this.hostProject.getParsedCommandLine)}static getRootFileNames(r,a,u,h){var p,m;if(!r)return x;const C=a.getCurrentProgram();if(!C)return x;const b=Vc();let T,E;const N=Hr(a.currentDirectory,Q7),R=a.getPackageJsonsForAutoImport(Hr(a.currentDirectory,N));for(const ue of R)(p=ue.dependencies)==null||p.forEach((te,Se)=>Q(Se)),(m=ue.peerDependencies)==null||m.forEach((te,Se)=>Q(Se));let F=0;if(T){const ue=a.getSymlinkCache();for(const te of Fn(T.keys())){if(r===2&&F>this.maxDependencies)return a.log(`AutoImportProviderProject: attempted to add more than ${this.maxDependencies} dependencies. Aborting.`),x;const Se=Lle(te,a.currentDirectory,h,u,C.getModuleResolutionCache());if(Se){const pe=re(Se,C,ue);if(pe){F+=q(pe);continue}}if(!W([a.currentDirectory,a.getGlobalTypingsCacheLocation()],pe=>{if(pe){const ye=Lle(`@types/${te}`,pe,h,u,C.getModuleResolutionCache());if(ye){const be=re(ye,C,ue);return F+=q(be),!0}}})&&Se&&h.allowJs&&h.maxNodeModuleJsDepth){const pe=re(Se,C,ue,!0);F+=q(pe)}}}const j=C.getResolvedProjectReferences();let U=0;return j!=null&&j.length&&a.projectService.getHostPreferences().includeCompletionsForModuleExports&&j.forEach(ue=>{if(ue!=null&&ue.commandLine.options.outFile)U+=q(Y([Kw(ue.commandLine.options.outFile,".d.ts")]));else if(ue){const te=l_(()=>UP(ue.commandLine,!a.useCaseSensitiveFileNames()));U+=q(Y(ns(ue.commandLine.fileNames,Se=>!xf(Se)&&!tu(Se,".json")&&!C.getSourceFile(Se)?k3(Se,ue.commandLine,!a.useCaseSensitiveFileNames(),te):void 0)))}}),E!=null&&E.size&&a.log(`AutoImportProviderProject: found ${E.size} root files in ${F} dependencies ${U} referenced projects in ${Vc()-b} ms`),E?Fn(E.values()):x;function q(ue){return ue!=null&&ue.length?(E??(E=new Set),ue.forEach(te=>E.add(te)),1):0}function Q(ue){ro(ue,"@types/")||(T||(T=new Set)).add(ue)}function re(ue,te,Se,oe){var pe;const ye=Ble(ue,h,u,te.getModuleResolutionCache(),oe);if(ye){const be=(pe=u.realpath)==null?void 0:pe.call(u,ue.packageDirectory),_e=be?a.toPath(be):void 0,ve=_e&&_e!==a.toPath(ue.packageDirectory);return ve&&Se.setSymlinkedDirectory(ue.packageDirectory,{real:Xd(be),realPath:Xd(_e)}),Y(ye,ve?Ee=>Ee.replace(ue.packageDirectory,be):void 0)}}function Y(ue,te){return ns(ue,Se=>{const oe=te?te(Se):Se;if(!C.getSourceFile(oe)&&!(te&&C.getSourceFile(Se)))return oe})}}static create(r,a,u,h){if(r===0)return;const p={...a.getCompilerOptions(),...this.compilerOptionsOverrides},m=this.getRootFileNames(r,a,u,p);if(m.length)return new oHe(a,m,h,p)}isEmpty(){return!Rt(this.rootFileNames)}isOrphan(){return!0}updateGraph(){let r=this.rootFileNames;r||(r=oHe.getRootFileNames(this.hostProject.includePackageJsonAutoImports(),this.hostProject,this.hostProject.getHostForAutoImportProvider(),this.getCompilationSettings())),this.projectService.setFileNamesOfAutpImportProviderOrAuxillaryProject(this,r),this.rootFileNames=r;const a=this.getCurrentProgram(),u=super.updateGraph();return a&&a!==this.getCurrentProgram()&&this.hostProject.clearCachedExportInfoMap(),u}scheduleInvalidateResolutionsOfFailedLookupLocations(){}hasRoots(){var r;return!!((r=this.rootFileNames)!=null&&r.length)}markAsDirty(){this.rootFileNames=void 0,super.markAsDirty()}getScriptFileNames(){return this.rootFileNames||x}getLanguageService(){throw new Error("AutoImportProviderProject language service should never be used. To get the program, use `project.getCurrentProgram()`.")}onAutoImportProviderSettingsChanged(){throw new Error("AutoImportProviderProject is an auto import provider; use `markAsDirty()` instead.")}onPackageJsonChange(){throw new Error("package.json changes should be notified on an AutoImportProvider's host project")}getHostForAutoImportProvider(){throw new Error("AutoImportProviderProject cannot provide its own host; use `hostProject.getModuleResolutionHostForAutomImportProvider()` instead.")}getProjectReferences(){return this.hostProject.getProjectReferences()}includePackageJsonAutoImports(){return 0}getSymlinkCache(){return this.hostProject.getSymlinkCache()}getModuleResolutionCache(){var r;return(r=this.hostProject.getCurrentProgram())==null?void 0:r.getModuleResolutionCache()}};_3e.maxDependencies=10,_3e.compilerOptionsOverrides={diagnostics:!1,skipLibCheck:!0,sourceMap:!1,types:x,lib:x,noLib:!0};var p3e=_3e,g3e=class extends lA{constructor(t,r,a,u,h,p){super(t,1,a,u,!1,void 0,{},!1,void 0,h,rs(t)),this.canonicalConfigFilePath=r,this.openFileWatchTriggered=new Map,this.canConfigFileJsonReportNoInputFiles=!1,this.isInitialLoadPending=vk,this.sendLoadingProjectFinish=!1,this.pendingUpdateLevel=2,this.pendingUpdateReason=p}setCompilerHost(t){this.compilerHost=t}getCompilerHost(){return this.compilerHost}useSourceOfProjectReferenceRedirect(){return this.languageServiceEnabled}getParsedCommandLine(t){const r=ra(t),a=this.projectService.toCanonicalFileName(r);let u=this.projectService.configFileExistenceInfoCache.get(a);return u||this.projectService.configFileExistenceInfoCache.set(a,u={exists:this.projectService.host.fileExists(r)}),this.projectService.ensureParsedConfigUptoDate(r,a,u,this),this.languageServiceEnabled&&this.projectService.serverMode===0&&this.projectService.watchWildcards(r,u,this),u.exists?u.config.parsedCommandLine:void 0}onReleaseParsedCommandLine(t){this.releaseParsedConfig(this.projectService.toCanonicalFileName(ra(t)))}releaseParsedConfig(t){this.projectService.stopWatchingWildCards(t,this),this.projectService.releaseParsedConfig(t,this)}updateGraph(){if(this.deferredClose)return!1;const t=this.dirty;this.isInitialLoadPending=kv;const r=this.pendingUpdateLevel;this.pendingUpdateLevel=0;let a;switch(r){case 1:this.openFileWatchTriggered.clear(),a=this.projectService.reloadFileNamesOfConfiguredProject(this);break;case 2:this.openFileWatchTriggered.clear();const u=z.checkDefined(this.pendingUpdateReason);this.projectService.reloadConfiguredProject(this,u),a=!0;break;default:a=super.updateGraph()}return this.compilerHost=void 0,this.projectService.sendProjectLoadingFinishEvent(this),this.projectService.sendProjectTelemetry(this),r===2||a&&(!t||!this.triggerFileForConfigFileDiag||this.getCurrentProgram().structureIsReused===2)?this.triggerFileForConfigFileDiag=void 0:this.triggerFileForConfigFileDiag||this.projectService.sendConfigFileDiagEvent(this,void 0,!1),a}getCachedDirectoryStructureHost(){return this.directoryStructureHost}getConfigFilePath(){return this.getProjectName()}getProjectReferences(){return this.projectReferences}updateReferences(t){this.projectReferences=t,this.potentialProjectReferences=void 0}setPotentialProjectReference(t){z.assert(this.isInitialLoadPending()),(this.potentialProjectReferences||(this.potentialProjectReferences=new Set)).add(t)}getResolvedProjectReferenceToRedirect(t){const r=this.getCurrentProgram();return r&&r.getResolvedProjectReferenceToRedirect(t)}forEachResolvedProjectReference(t){var r;return(r=this.getCurrentProgram())==null?void 0:r.forEachResolvedProjectReference(t)}enablePluginsWithOptions(t){var r;if(this.plugins.length=0,!((r=t.plugins)!=null&&r.length)&&!this.projectService.globalPlugins.length)return;const a=this.projectService.host;if(!a.require&&!a.importPlugin){this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded");return}const u=this.getGlobalPluginSearchPaths();if(this.projectService.allowLocalPluginLoads){const h=rs(this.canonicalConfigFilePath);this.projectService.logger.info(`Local plugin loading enabled; adding ${h} to search paths`),u.unshift(h)}if(t.plugins)for(const h of t.plugins)this.enablePlugin(h,u);return this.enableGlobalPlugins(t)}getGlobalProjectErrors(){return Ri(this.projectErrors,t=>!t.file)||Ed}getAllProjectErrors(){return this.projectErrors||Ed}setProjectErrors(t){this.projectErrors=t}close(){this.projectService.configFileExistenceInfoCache.forEach((t,r)=>this.releaseParsedConfig(r)),this.projectErrors=void 0,this.openFileWatchTriggered.clear(),this.compilerHost=void 0,super.close()}markAsDirty(){this.deferredClose||super.markAsDirty()}isSolution(){return this.getRootFilesMap().size===0&&!this.canConfigFileJsonReportNoInputFiles}isOrphan(){return!!this.deferredClose}getEffectiveTypeRoots(){return A7(this.getCompilationSettings(),this)||[]}updateErrorOnNoInputFiles(t){bK(t,this.getConfigFilePath(),this.getCompilerOptions().configFile.configFileSpecs,this.projectErrors,this.canConfigFileJsonReportNoInputFiles)}},Whe=class extends lA{constructor(t,r,a,u,h,p,m,C){super(t,2,r,a,!0,h,u,p,C,r.host,rs(m||Lf(t))),this.externalProjectName=t,this.compileOnSaveEnabled=p,this.excludedFiles=[],this.enableGlobalPlugins(this.getCompilerOptions())}updateGraph(){const t=super.updateGraph();return this.projectService.sendProjectTelemetry(this),t}getExcludedFiles(){return this.excludedFiles}};function X3(t){return t.projectKind===0}function TS(t){return t.projectKind===1}function lj(t){return t.projectKind===2}function cj(t){return t.projectKind===3||t.projectKind===4}function dZ(t){return TS(t)&&!!t.deferredClose}var Vhe=20*1024*1024,Hhe=4*1024*1024,fZ="projectsUpdatedInBackground",jhe="projectLoadingStart",zhe="projectLoadingFinish",Uhe="largeFileReferenced",qhe="configFileDiag",$he="projectLanguageServiceState",Jhe="projectInfo",m3e="openFileInfo",Ghe="createFileWatcher",Khe="createDirectoryWatcher",Qhe="closeFileWatcher",$lt="*ensureProjectForOpenFiles*";function Jlt(t){const r=new Map;for(const a of t)if(typeof a.type=="object"){const u=a.type;u.forEach(h=>{z.assert(typeof h=="number")}),r.set(a.name,u)}return r}var yHt=Jlt(K0),bHt=Jlt(BP),CHt=new Map(Object.entries({none:0,block:1,smart:2})),v3e={jquery:{match:/jquery(-[\d.]+)?(\.intellisense)?(\.min)?\.js$/i,types:["jquery"]},WinJS:{match:/^(.*\/winjs-[.\d]+)\/js\/base\.js$/i,exclude:[["^",1,"/.*"]],types:["winjs"]},Kendo:{match:/^(.*\/kendo(-ui)?)\/kendo\.all(\.min)?\.js$/i,exclude:[["^",1,"/.*"]],types:["kendo-ui"]},"Office Nuget":{match:/^(.*\/office\/1)\/excel-\d+\.debug\.js$/i,exclude:[["^",1,"/.*"]],types:["office"]},References:{match:/^(.*\/_references\.js)$/i,exclude:[["^",1,"$"]]}};function Z3(t){return mo(t.indentStyle)&&(t.indentStyle=CHt.get(t.indentStyle.toLowerCase()),z.assert(t.indentStyle!==void 0)),t}function hZ(t){return yHt.forEach((r,a)=>{const u=t[a];mo(u)&&(t[a]=r.get(u.toLowerCase()))}),t}function uj(t,r){let a,u;return BP.forEach(h=>{const p=t[h.name];if(p===void 0)return;const m=bHt.get(h.name);(a||(a={}))[h.name]=m?mo(p)?m.get(p.toLowerCase()):p:xI(h,p,r||"",u||(u=[]))}),a&&{watchOptions:a,errors:u}}function y3e(t){let r;return uK.forEach(a=>{const u=t[a.name];u!==void 0&&((r||(r={}))[a.name]=u)}),r}function Xhe(t){return mo(t)?Zhe(t):t}function Zhe(t){switch(t){case"JS":return 1;case"JSX":return 2;case"TS":return 3;case"TSX":return 4;default:return 0}}function b3e(t){const{lazyConfiguredProjectsFromExternalProject:r,...a}=t;return a}var Yhe={getFileName:t=>t,getScriptKind:(t,r)=>{let a;if(r){const u=p6(t);u&&Rt(r,h=>h.extension===u?(a=h.scriptKind,!0):!1)}return a},hasMixedContent:(t,r)=>Rt(r,a=>a.isMixedContent&&tu(t,a.extension))},e_e={getFileName:t=>t.fileName,getScriptKind:t=>Xhe(t.scriptKind),hasMixedContent:t=>!!t.hasMixedContent};function Glt(t,r){for(const a of r)if(a.getProjectName()===t)return a}var C3e={close:dl};function Klt(t,r){if(!(!r||t_e(t)))return r.get(t.path)}function SHt(t){return!!t.containingProjects}function t_e(t){return!!t.configFileInfo}var S3e=(t=>(t[t.Find=0]="Find",t[t.Create=1]="Create",t[t.Reload=2]="Reload",t))(S3e||{});function wHt(t,r,a,u,h,p,m,C){for(;;){if(!r.isInitialLoadPending()&&(!r.getCompilerOptions().composite||r.getCompilerOptions().disableSolutionSearching))return;const b=r.projectService.getConfigFileNameForFile({fileName:r.getConfigFilePath(),path:t.path,configFileInfo:!0},u===0);if(!b)return;const T=r.projectService.findCreateOrReloadConfiguredProject(b,u,h,p,void 0,m,!0,C);if(!T)return;T.project.isInitialLoadPending()&&r.getCompilerOptions().composite&&T.project.setPotentialProjectReference(r.canonicalConfigFilePath);const E=a(T.project);if(E)return E;r=T.project}}function i_e(t,r,a,u,h,p,m,C){var b;const T=(b=t.getCurrentProgram())==null?void 0:b.getResolvedProjectReferences();if(!T)return;const E=r?t.getResolvedProjectReferenceToRedirect(r):void 0;if(E){const F=Kc(E.sourceFile.fileName),j=t.projectService.findConfiguredProjectByProjectName(F,p);if(j){const U=R(j);if(U)return U}else if(u!==0){const U=w3e(T,t.getCompilerOptions(),(q,Q)=>E===q?N(q,Q):void 0,u,t.projectService);if(U)return U}}return w3e(T,t.getCompilerOptions(),(F,j)=>E!==F?N(F,j):void 0,u,t.projectService);function N(F,j){const U=t.projectService.findCreateOrReloadConfiguredProject(Kc(F.sourceFile.fileName),j,h,p,m,C);return U&&(j===u?a(U.project,U.sentConfigFileDiag):R(U.project))}function R(F){let j=!1;switch(u){case 1:j=ect(F,m);break;case 2:j=F.projectService.reloadConfiguredProjectClearingSemanticCache(F,h,C);break;case 0:break;default:z.assertNever(u)}const U=a(F,j);if(U)return U}}function w3e(t,r,a,u,h,p){const m=r.disableReferencedProjectLoad?0:u;return W(t,C=>{if(!C)return;const b=Kc(C.sourceFile.fileName),T=h.toCanonicalFileName(b),E=p==null?void 0:p.get(T);if(E!==void 0&&E>=m)return;const N=a(C,m);return N||((p||(p=new Map)).set(T,m),C.references&&w3e(C.references,C.commandLine.options,a,m,h,p))})}function Qlt(t,r){return t.potentialProjectReferences&&Bb(t.potentialProjectReferences,r)}function xHt(t,r,a,u){return t.getCurrentProgram()?t.forEachResolvedProjectReference(r):t.isInitialLoadPending()?Qlt(t,u):W(t.getProjectReferences(),a)}function x3e(t,r,a){const u=a&&t.projectService.configuredProjects.get(a);return u&&r(u)}function Xlt(t,r){return xHt(t,a=>x3e(t,r,a.sourceFile.path),a=>x3e(t,r,t.toPath(E3(a))),a=>x3e(t,r,a))}function kHt(t,r){return`${mo(r)?`Config: ${r} `:r?`Project: ${r.getProjectName()} `:""}WatchType: ${t}`}function Zlt(t){return!t.isScriptOpen()&&t.mTime!==void 0}function im(t){return t.invalidateResolutionsOfFailedLookupLocations(),t.dirty&&!t.updateGraph()}function Ylt(t,r,a){if(!a&&(t.invalidateResolutionsOfFailedLookupLocations(),!t.dirty))return!1;t.triggerFileForConfigFileDiag=r;const u=t.pendingUpdateLevel;if(t.updateGraph(),!t.triggerFileForConfigFileDiag&&!a)return u===2;const h=t.projectService.sendConfigFileDiagEvent(t,r,a);return t.triggerFileForConfigFileDiag=void 0,h}function ect(t,r){if(r){if(Ylt(t,r,!1))return!0}else im(t);return!1}function tct(t){return`Creating possible configured project for ${t.fileName} to open`}function n_e(t){return`User requested reload projects: ${t}`}function k3e(t){TS(t)&&(t.projectOptions=!0)}function T3e(t){let r=1;return()=>t(r++)}function D3e(){return{idToCallbacks:new Map,pathToId:new Map}}function THt(t,r){if(!r||!t.eventHandler||!t.session)return;const a=D3e(),u=D3e(),h=D3e();let p=1;return t.session.addProtocolHandler("watchChange",F=>(T(F.arguments),{responseRequired:!1})),{watchFile:m,watchDirectory:C,getCurrentDirectory:()=>t.host.getCurrentDirectory(),useCaseSensitiveFileNames:t.host.useCaseSensitiveFileNames};function m(F,j){return b(a,F,j,U=>({eventName:Ghe,data:{id:U,path:F}}))}function C(F,j,U){return b(U?h:u,F,j,q=>({eventName:Khe,data:{id:q,path:F,recursive:!!U,ignoreUpdate:F.endsWith("/node_modules")?void 0:!0}}))}function b({pathToId:F,idToCallbacks:j},U,q,Q){const re=t.toPath(U);let Y=F.get(re);Y||F.set(re,Y=p++);let ue=j.get(Y);return ue||(j.set(Y,ue=new Set),t.eventHandler(Q(Y))),ue.add(q),{close(){const te=j.get(Y);te!=null&&te.delete(q)&&(te.size||(j.delete(Y),F.delete(re),t.eventHandler({eventName:Qhe,data:{id:Y}})))}}}function T(F){Lo(F)?F.forEach(E):E(F)}function E({id:F,created:j,deleted:U,updated:q}){N(F,j,0),N(F,U,2),N(F,q,1)}function N(F,j,U){j!=null&&j.length&&(R(a,F,j,(q,Q)=>q(Q,U)),R(u,F,j,(q,Q)=>q(Q)),R(h,F,j,(q,Q)=>q(Q)))}function R(F,j,U,q){var Q;(Q=F.idToCallbacks.get(j))==null||Q.forEach(re=>{U.forEach(Y=>q(re,Lf(Y)))})}}var ict=class aHe{constructor(r){this.filenameToScriptInfo=new Map,this.nodeModulesWatchers=new Map,this.filenameToScriptInfoVersion=new Map,this.allJsFilesForOpenFileTelemetry=new Map,this.externalProjectToConfiguredProjectMap=new Map,this.externalProjects=[],this.inferredProjects=[],this.configuredProjects=new Map,this.newInferredProjectName=T3e(X6e),this.newAutoImportProviderProjectName=T3e(Z6e),this.newAuxiliaryProjectName=T3e(Y6e),this.openFiles=new Map,this.configFileForOpenFiles=new Map,this.rootOfInferredProjects=new Set,this.openFilesWithNonRootedDiskPath=new Map,this.compilerOptionsForInferredProjectsPerProjectRoot=new Map,this.watchOptionsForInferredProjectsPerProjectRoot=new Map,this.typeAcquisitionForInferredProjectsPerProjectRoot=new Map,this.projectToSizeMap=new Map,this.configFileExistenceInfoCache=new Map,this.safelist=v3e,this.legacySafelist=new Map,this.pendingProjectUpdates=new Map,this.pendingEnsureProjectForOpenFiles=!1,this.seenProjects=new Map,this.sharedExtendedConfigFileWatchers=new Map,this.extendedConfigCache=new Map,this.baseline=dl,this.verifyDocumentRegistry=dl,this.verifyProgram=dl,this.onProjectCreation=dl;var a;this.host=r.host,this.logger=r.logger,this.cancellationToken=r.cancellationToken,this.useSingleInferredProject=r.useSingleInferredProject,this.useInferredProjectPerProjectRoot=r.useInferredProjectPerProjectRoot,this.typingsInstaller=r.typingsInstaller||Bhe,this.throttleWaitMilliseconds=r.throttleWaitMilliseconds,this.eventHandler=r.eventHandler,this.suppressDiagnosticEvents=r.suppressDiagnosticEvents,this.globalPlugins=r.globalPlugins||Ed,this.pluginProbeLocations=r.pluginProbeLocations||Ed,this.allowLocalPluginLoads=!!r.allowLocalPluginLoads,this.typesMapLocation=r.typesMapLocation===void 0?Hr(rs(this.getExecutingFilePath()),"typesMap.json"):r.typesMapLocation,this.session=r.session,this.jsDocParsingMode=r.jsDocParsingMode,r.serverMode!==void 0?this.serverMode=r.serverMode:this.serverMode=0,this.host.realpath&&(this.realpathToScriptInfos=Ug()),this.currentDirectory=Kc(this.host.getCurrentDirectory()),this.toCanonicalFileName=Zf(this.host.useCaseSensitiveFileNames),this.globalCacheLocationDirectoryPath=this.typingsInstaller.globalTypingsCacheLocation?Xd(this.toPath(this.typingsInstaller.globalTypingsCacheLocation)):void 0,this.throttledOperations=new t3e(this.host,this.logger),this.typesMapLocation?this.loadTypesMap():this.logger.info("No types map provided; using the default"),this.typingsInstaller.attach(this),this.typingsCache=new a3e(this.typingsInstaller),this.hostConfiguration={formatCodeOptions:EQ(this.host.newLine),preferences:Fm,hostInfo:"Unknown host",extraFileExtensions:[]},this.documentRegistry=zde(this.host.useCaseSensitiveFileNames,this.currentDirectory,this.jsDocParsingMode,this);const u=this.logger.hasLevel(3)?2:this.logger.loggingEnabled()?1:0,h=u!==0?p=>this.logger.info(p):dl;this.packageJsonCache=P3e(this),this.watchFactory=this.serverMode!==0?{watchFile:Y7,watchDirectory:Y7}:xce(THt(this,r.canUseWatchEvents)||this.host,u,h,kHt),(a=r.incrementalVerifier)==null||a.call(r,this)}toPath(r){return _c(r,this.currentDirectory,this.toCanonicalFileName)}getExecutingFilePath(){return this.getNormalizedAbsolutePath(this.host.getExecutingFilePath())}getNormalizedAbsolutePath(r){return bo(r,this.host.getCurrentDirectory())}setDocument(r,a,u){const h=z.checkDefined(this.getScriptInfoForPath(a));h.cacheSourceFile={key:r,sourceFile:u}}getDocument(r,a){const u=this.getScriptInfoForPath(a);return u&&u.cacheSourceFile&&u.cacheSourceFile.key===r?u.cacheSourceFile.sourceFile:void 0}ensureInferredProjectsUpToDate_TestOnly(){this.ensureProjectStructuresUptoDate()}getCompilerOptionsForInferredProjects(){return this.compilerOptionsForInferredProjects}onUpdateLanguageServiceStateForProject(r,a){if(!this.eventHandler)return;const u={eventName:$he,data:{project:r,languageServiceEnabled:a}};this.eventHandler(u)}loadTypesMap(){try{const r=this.host.readFile(this.typesMapLocation);if(r===void 0){this.logger.info(`Provided types map file "${this.typesMapLocation}" doesn't exist`);return}const a=JSON.parse(r);for(const u of Object.keys(a.typesMap))a.typesMap[u].match=new RegExp(a.typesMap[u].match,"i");this.safelist=a.typesMap;for(const u in a.simpleMap)Vl(a.simpleMap,u)&&this.legacySafelist.set(u,a.simpleMap[u].toLowerCase())}catch(r){this.logger.info(`Error loading types map: ${r}`),this.safelist=v3e,this.legacySafelist.clear()}}updateTypingsForProject(r){const a=this.findProject(r.projectName);if(a)switch(r.kind){case xQ:a.updateTypingFiles(this.typingsCache.updateTypingsForProject(r.projectName,r.compilerOptions,r.typeAcquisition,r.unresolvedImports,r.typings));return;case kQ:this.typingsCache.enqueueInstallTypingsForProject(a,a.lastCachedUnresolvedImportsList,!0);return}}watchTypingLocations(r){var a;(a=this.findProject(r.projectName))==null||a.watchTypingLocations(r.files)}delayEnsureProjectForOpenFiles(){this.openFiles.size&&(this.pendingEnsureProjectForOpenFiles=!0,this.throttledOperations.schedule($lt,2500,()=>{this.pendingProjectUpdates.size!==0?this.delayEnsureProjectForOpenFiles():this.pendingEnsureProjectForOpenFiles&&(this.ensureProjectForOpenFiles(),this.sendProjectsUpdatedInBackgroundEvent())}))}delayUpdateProjectGraph(r){if(dZ(r)||(r.markAsDirty(),cj(r)))return;const a=r.getProjectName();this.pendingProjectUpdates.set(a,r),this.throttledOperations.schedule(a,250,()=>{this.pendingProjectUpdates.delete(a)&&im(r)})}hasPendingProjectUpdate(r){return this.pendingProjectUpdates.has(r.getProjectName())}sendProjectsUpdatedInBackgroundEvent(){if(!this.eventHandler)return;const r={eventName:fZ,data:{openFiles:Fn(this.openFiles.keys(),a=>this.getScriptInfoForPath(a).fileName)}};this.eventHandler(r)}sendLargeFileReferencedEvent(r,a){if(!this.eventHandler)return;const u={eventName:Uhe,data:{file:r,fileSize:a,maxFileSize:Hhe}};this.eventHandler(u)}sendProjectLoadingStartEvent(r,a){if(!this.eventHandler)return;r.sendLoadingProjectFinish=!0;const u={eventName:jhe,data:{project:r,reason:a}};this.eventHandler(u)}sendProjectLoadingFinishEvent(r){if(!this.eventHandler||!r.sendLoadingProjectFinish)return;r.sendLoadingProjectFinish=!1;const a={eventName:zhe,data:{project:r}};this.eventHandler(a)}sendPerformanceEvent(r,a){this.performanceEventHandler&&this.performanceEventHandler({kind:r,durationMs:a})}delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(r){this.delayUpdateProjectGraph(r),this.delayEnsureProjectForOpenFiles()}delayUpdateProjectGraphs(r,a){if(r.length){for(const u of r)a&&u.clearSourceMapperCache(),this.delayUpdateProjectGraph(u);this.delayEnsureProjectForOpenFiles()}}setCompilerOptionsForInferredProjects(r,a){z.assert(a===void 0||this.useInferredProjectPerProjectRoot,"Setting compiler options per project root path is only supported when useInferredProjectPerProjectRoot is enabled");const u=hZ(r),h=uj(r,a),p=y3e(r);u.allowNonTsExtensions=!0;const m=a&&this.toCanonicalFileName(a);m?(this.compilerOptionsForInferredProjectsPerProjectRoot.set(m,u),this.watchOptionsForInferredProjectsPerProjectRoot.set(m,h||!1),this.typeAcquisitionForInferredProjectsPerProjectRoot.set(m,p)):(this.compilerOptionsForInferredProjects=u,this.watchOptionsForInferredProjects=h,this.typeAcquisitionForInferredProjects=p);for(const C of this.inferredProjects)(m?C.projectRootPath===m:!C.projectRootPath||!this.compilerOptionsForInferredProjectsPerProjectRoot.has(C.projectRootPath))&&(C.setCompilerOptions(u),C.setTypeAcquisition(p),C.setWatchOptions(h==null?void 0:h.watchOptions),C.setProjectErrors(h==null?void 0:h.errors),C.compileOnSaveEnabled=u.compileOnSave,C.markAsDirty(),this.delayUpdateProjectGraph(C));this.delayEnsureProjectForOpenFiles()}findProject(r){if(r!==void 0)return Q6e(r)?Glt(r,this.inferredProjects):this.findExternalProjectByProjectName(r)||this.findConfiguredProjectByProjectName(Kc(r))}forEachProject(r){this.externalProjects.forEach(r),this.configuredProjects.forEach(r),this.inferredProjects.forEach(r)}forEachEnabledProject(r){this.forEachProject(a=>{!a.isOrphan()&&a.languageServiceEnabled&&r(a)})}getDefaultProjectForFile(r,a){return a?this.ensureDefaultProjectForFile(r):this.tryGetDefaultProjectForFile(r)}tryGetDefaultProjectForFile(r){const a=mo(r)?this.getScriptInfoForNormalizedPath(r):r;return a&&!a.isOrphan()?a.getDefaultProject():void 0}tryGetDefaultProjectForEnsuringConfiguredProjectForFile(r){var a;const u=mo(r)?this.getScriptInfoForNormalizedPath(r):r;if(u)return(a=this.pendingOpenFileProjectUpdates)!=null&&a.delete(u.path)&&(this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(u,1),u.isOrphan()&&this.assignOrphanScriptInfoToInferredProject(u,this.openFiles.get(u.path))),this.tryGetDefaultProjectForFile(u)}ensureDefaultProjectForFile(r){return this.tryGetDefaultProjectForEnsuringConfiguredProjectForFile(r)||this.doEnsureDefaultProjectForFile(r)}doEnsureDefaultProjectForFile(r){this.ensureProjectStructuresUptoDate();const a=mo(r)?this.getScriptInfoForNormalizedPath(r):r;return a?a.getDefaultProject():(this.logErrorForScriptInfoNotFound(mo(r)?r:r.fileName),iC.ThrowNoProject())}getScriptInfoEnsuringProjectsUptoDate(r){return this.ensureProjectStructuresUptoDate(),this.getScriptInfo(r)}ensureProjectStructuresUptoDate(){let r=this.pendingEnsureProjectForOpenFiles;this.pendingProjectUpdates.clear();const a=u=>{r=im(u)||r};this.externalProjects.forEach(a),this.configuredProjects.forEach(a),this.inferredProjects.forEach(a),r&&this.ensureProjectForOpenFiles()}getFormatCodeOptions(r){const a=this.getScriptInfoForNormalizedPath(r);return a&&a.getFormatCodeSettings()||this.hostConfiguration.formatCodeOptions}getPreferences(r){const a=this.getScriptInfoForNormalizedPath(r);return{...this.hostConfiguration.preferences,...a&&a.getPreferences()}}getHostFormatCodeOptions(){return this.hostConfiguration.formatCodeOptions}getHostPreferences(){return this.hostConfiguration.preferences}onSourceFileChanged(r,a){z.assert(!r.isScriptOpen()),a===2?this.handleDeletedFile(r,!0):(r.deferredDelete&&(r.deferredDelete=void 0),r.delayReloadNonMixedContentFile(),this.delayUpdateProjectGraphs(r.containingProjects,!1),this.handleSourceMapProjects(r))}handleSourceMapProjects(r){if(r.sourceMapFilePath)if(mo(r.sourceMapFilePath)){const a=this.getScriptInfoForPath(r.sourceMapFilePath);this.delayUpdateSourceInfoProjects(a==null?void 0:a.sourceInfos)}else this.delayUpdateSourceInfoProjects(r.sourceMapFilePath.sourceInfos);this.delayUpdateSourceInfoProjects(r.sourceInfos),r.declarationInfoPath&&this.delayUpdateProjectsOfScriptInfoPath(r.declarationInfoPath)}delayUpdateSourceInfoProjects(r){r&&r.forEach((a,u)=>this.delayUpdateProjectsOfScriptInfoPath(u))}delayUpdateProjectsOfScriptInfoPath(r){const a=this.getScriptInfoForPath(r);a&&this.delayUpdateProjectGraphs(a.containingProjects,!0)}handleDeletedFile(r,a){z.assert(!r.isScriptOpen()),this.delayUpdateProjectGraphs(r.containingProjects,!1),this.handleSourceMapProjects(r),r.detachAllProjects(),a?(r.delayReloadNonMixedContentFile(),r.deferredDelete=!0):this.deleteScriptInfo(r)}watchWildcardDirectory(r,a,u,h){let p=this.watchFactory.watchDirectory(r,C=>{const b=this.toPath(C),T=h.cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(C,b);if(fd(b)==="package.json"&&!kH(b)&&(T&&T.fileExists||!T&&this.host.fileExists(C))){const N=this.getNormalizedAbsolutePath(C);this.logger.info(`Config: ${u} Detected new package.json: ${N}`),this.packageJsonCache.addOrUpdate(N,b),this.watchPackageJsonFile(N,b,m)}const E=this.findConfiguredProjectByProjectName(u);$V({watchedDirPath:this.toPath(r),fileOrDirectory:C,fileOrDirectoryPath:b,configFileName:u,extraFileExtensions:this.hostConfiguration.extraFileExtensions,currentDirectory:this.currentDirectory,options:h.parsedCommandLine.options,program:(E==null?void 0:E.getCurrentProgram())||h.parsedCommandLine.fileNames,useCaseSensitiveFileNames:this.host.useCaseSensitiveFileNames,writeLog:N=>this.logger.info(N),toPath:N=>this.toPath(N),getScriptKind:E?N=>E.getScriptKind(N):void 0})||(h.updateLevel!==2&&(h.updateLevel=1),h.projects.forEach((N,R)=>{var F;if(!N)return;const j=this.getConfiguredProjectByCanonicalConfigFilePath(R);if(!j)return;if(E!==j&&this.getHostPreferences().includeCompletionsForModuleExports){const q=this.toPath(u);Me((F=j.getCurrentProgram())==null?void 0:F.getResolvedProjectReferences(),Q=>(Q==null?void 0:Q.sourceFile.path)===q)&&j.markAutoImportProviderAsDirty()}const U=E===j?1:0;if(!(j.pendingUpdateLevel>U))if(this.openFiles.has(b))if(z.checkDefined(this.getScriptInfoForPath(b)).isAttached(j)){const Q=Math.max(U,j.openFileWatchTriggered.get(b)||0);j.openFileWatchTriggered.set(b,Q)}else j.pendingUpdateLevel=U,this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(j);else j.pendingUpdateLevel=U,this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(j)}))},a,this.getWatchOptionsFromProjectWatchOptions(h.parsedCommandLine.watchOptions,rs(u)),tf.WildcardDirectory,u);const m={packageJsonWatches:void 0,close(){var C;p&&(p.close(),p=void 0,(C=m.packageJsonWatches)==null||C.forEach(b=>{b.projects.delete(m),b.close()}),m.packageJsonWatches=void 0)}};return m}delayUpdateProjectsFromParsedConfigOnConfigFileChange(r,a){const u=this.configFileExistenceInfoCache.get(r);if(!(u!=null&&u.config))return!1;let h=!1;return u.config.updateLevel=2,u.config.projects.forEach((p,m)=>{var C;const b=this.getConfiguredProjectByCanonicalConfigFilePath(m);if(b)if(h=!0,m===r){if(b.isInitialLoadPending())return;b.pendingUpdateLevel=2,b.pendingUpdateReason=a,this.delayUpdateProjectGraph(b),b.markAutoImportProviderAsDirty()}else{const T=this.toPath(r);b.resolutionCache.removeResolutionsFromProjectReferenceRedirects(T),this.delayUpdateProjectGraph(b),this.getHostPreferences().includeCompletionsForModuleExports&&Me((C=b.getCurrentProgram())==null?void 0:C.getResolvedProjectReferences(),E=>(E==null?void 0:E.sourceFile.path)===T)&&b.markAutoImportProviderAsDirty()}}),h}onConfigFileChanged(r,a,u){const h=this.configFileExistenceInfoCache.get(a),p=this.getConfiguredProjectByCanonicalConfigFilePath(a),m=p==null?void 0:p.deferredClose;u===2?(h.exists=!1,p&&(p.deferredClose=!0)):(h.exists=!0,m&&(p.deferredClose=void 0,p.markAsDirty())),this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(a,"Change in config file detected");const C=new Set(p?[p]:void 0);this.openFiles.forEach((b,T)=>{var E,N;const R=this.configFileForOpenFiles.get(T);if(!((E=h.openFilesImpactedByConfigFile)!=null&&E.has(T)))return;this.configFileForOpenFiles.delete(T);const F=this.getScriptInfoForPath(T),j=this.getConfigFileNameForFile(F,!1);if(!j)return;const U=this.findConfiguredProjectByProjectName(j)??this.createConfiguredProject(j,`Change in config file ${r} detected, ${tct(F)}`);(N=this.pendingOpenFileProjectUpdates)!=null&&N.has(T)||(this.pendingOpenFileProjectUpdates??(this.pendingOpenFileProjectUpdates=new Map)).set(T,R),o_(C,U)&&U.isInitialLoadPending()&&this.delayUpdateProjectGraph(U)}),this.delayEnsureProjectForOpenFiles()}removeProject(r){switch(this.logger.info("`remove Project::"),r.print(!0,!0,!1),r.close(),z.shouldAssert(1)&&this.filenameToScriptInfo.forEach(a=>z.assert(!a.isAttached(r),"Found script Info still attached to project",()=>`${r.projectName}: ScriptInfos still attached: ${JSON.stringify(Fn(fh(this.filenameToScriptInfo.values(),u=>u.isAttached(r)?{fileName:u.fileName,projects:u.containingProjects.map(h=>h.projectName),hasMixedContent:u.hasMixedContent}:void 0)),void 0," ")}`)),this.pendingProjectUpdates.delete(r.getProjectName()),r.projectKind){case 2:LL(this.externalProjects,r),this.projectToSizeMap.delete(r.getProjectName());break;case 1:this.configuredProjects.delete(r.canonicalConfigFilePath),this.projectToSizeMap.delete(r.canonicalConfigFilePath);break;case 0:LL(this.inferredProjects,r);break}}assignOrphanScriptInfoToInferredProject(r,a){z.assert(r.isOrphan());const u=this.getOrCreateInferredProjectForProjectRootPathIfEnabled(r,a)||this.getOrCreateSingleInferredProjectIfEnabled()||this.getOrCreateSingleInferredWithoutProjectRoot(r.isDynamic?a||this.currentDirectory:rs(Sp(r.fileName)?r.fileName:bo(r.fileName,a?this.getNormalizedAbsolutePath(a):this.currentDirectory)));if(u.addRoot(r),r.containingProjects[0]!==u&&(FR(r.containingProjects,u),r.containingProjects.unshift(u)),u.updateGraph(),!this.useSingleInferredProject&&!u.projectRootPath)for(const h of this.inferredProjects){if(h===u||h.isOrphan())continue;const p=h.getRootScriptInfos();z.assert(p.length===1||!!h.projectRootPath),p.length===1&&W(p[0].containingProjects,m=>m!==p[0].containingProjects[0]&&!m.isOrphan())&&h.removeFile(p[0],!0,!0)}return u}assignOrphanScriptInfosToInferredProject(){this.openFiles.forEach((r,a)=>{const u=this.getScriptInfoForPath(a);u.isOrphan()&&this.assignOrphanScriptInfoToInferredProject(u,r)})}closeOpenFile(r,a){var u;const h=r.isDynamic?!1:this.host.fileExists(r.fileName);r.close(h),this.stopWatchingConfigFilesForScriptInfo(r);const p=this.toCanonicalFileName(r.fileName);this.openFilesWithNonRootedDiskPath.get(p)===r&&this.openFilesWithNonRootedDiskPath.delete(p);let m=!1;for(const C of r.containingProjects){if(TS(C)){r.hasMixedContent&&r.registerFileUpdate();const b=C.openFileWatchTriggered.get(r.path);b!==void 0&&(C.openFileWatchTriggered.delete(r.path),C.pendingUpdateLevelthis.onConfigFileChanged(r,a,T),2e3,this.getWatchOptionsFromProjectWatchOptions((p=(h=m==null?void 0:m.config)==null?void 0:h.parsedCommandLine)==null?void 0:p.watchOptions,rs(r)),tf.ConfigFile,u));const C=m.config.projects;C.set(u.canonicalConfigFilePath,C.get(u.canonicalConfigFilePath)||!1)}releaseParsedConfig(r,a){var u,h,p;const m=this.configFileExistenceInfoCache.get(r);(u=m.config)!=null&&u.projects.delete(a.canonicalConfigFilePath)&&((h=m.config)!=null&&h.projects.size||(m.config=void 0,Sce(r,this.sharedExtendedConfigFileWatchers),z.checkDefined(m.watcher),(p=m.openFilesImpactedByConfigFile)!=null&&p.size?m.inferredProjectRoots?cQ(Qd(rs(r)))||(m.watcher.close(),m.watcher=C3e):(m.watcher.close(),m.watcher=void 0):(m.watcher.close(),this.configFileExistenceInfoCache.delete(r))))}stopWatchingConfigFilesForScriptInfo(r){if(this.serverMode!==0)return;const a=this.rootOfInferredProjects.delete(r),u=r.isScriptOpen();u&&!a||this.forEachConfigFileLocation(r,h=>{var p,m,C;const b=this.configFileExistenceInfoCache.get(h);if(b){if(u){if(!((p=b==null?void 0:b.openFilesImpactedByConfigFile)!=null&&p.has(r.path)))return}else if(!((m=b.openFilesImpactedByConfigFile)!=null&&m.delete(r.path)))return;a&&(b.inferredProjectRoots--,b.watcher&&!b.config&&!b.inferredProjectRoots&&(b.watcher.close(),b.watcher=void 0)),!((C=b.openFilesImpactedByConfigFile)!=null&&C.size)&&!b.config&&(z.assert(!b.watcher),this.configFileExistenceInfoCache.delete(h))}})}startWatchingConfigFilesForInferredProjectRoot(r){this.serverMode===0&&(z.assert(r.isScriptOpen()),this.rootOfInferredProjects.add(r),this.forEachConfigFileLocation(r,(a,u)=>{let h=this.configFileExistenceInfoCache.get(a);h?h.inferredProjectRoots=(h.inferredProjectRoots??0)+1:(h={exists:this.host.fileExists(u),inferredProjectRoots:1},this.configFileExistenceInfoCache.set(a,h)),(h.openFilesImpactedByConfigFile??(h.openFilesImpactedByConfigFile=new Set)).add(r.path),h.watcher||(h.watcher=cQ(Qd(rs(a)))?this.watchFactory.watchFile(u,(p,m)=>this.onConfigFileChanged(u,a,m),2e3,this.hostConfiguration.watchOptions,tf.ConfigFileForInferredRoot):C3e)}))}forEachConfigFileLocation(r,a){if(this.serverMode!==0)return;z.assert(!SHt(r)||this.openFiles.has(r.path));const u=this.openFiles.get(r.path);if(z.checkDefined(this.getScriptInfo(r.path)).isDynamic)return;let p=rs(r.fileName);const m=()=>l0(u,p,this.currentDirectory,!this.host.useCaseSensitiveFileNames),C=!u||!m();let b=!t_e(r);do{if(b){const E=rj(p,this.currentDirectory,this.toCanonicalFileName),N=Hr(p,"tsconfig.json");let R=a(Hr(E,"tsconfig.json"),N);if(R)return N;const F=Hr(p,"jsconfig.json");if(R=a(Hr(E,"jsconfig.json"),F),R)return F;if(S$(E))break}const T=rs(p);if(T===p)break;p=T,b=!0}while(C||m())}findDefaultConfiguredProject(r){var a;return r.isScriptOpen()?(a=this.tryFindDefaultConfiguredProjectForOpenScriptInfo(r,0))==null?void 0:a.defaultProject:void 0}getConfigFileNameForFileFromCache(r,a){if(a){const u=Klt(r,this.pendingOpenFileProjectUpdates);if(u!==void 0)return u}return Klt(r,this.configFileForOpenFiles)}setConfigFileNameForFileInCache(r,a){this.openFiles.has(r.path)&&(t_e(r)||this.configFileForOpenFiles.set(r.path,a||!1))}getConfigFileNameForFile(r,a){const u=this.getConfigFileNameForFileFromCache(r,a);if(u!==void 0)return u||void 0;if(a)return;const h=this.forEachConfigFileLocation(r,(p,m)=>this.configFileExists(m,p,r));return this.logger.info(`getConfigFileNameForFile:: File: ${r.fileName} ProjectRootPath: ${this.openFiles.get(r.path)}:: Result: ${h}`),this.setConfigFileNameForFileInCache(r,h),h}printProjects(){this.logger.hasLevel(1)&&(this.logger.startGroup(),this.externalProjects.forEach(N3e),this.configuredProjects.forEach(N3e),this.inferredProjects.forEach(N3e),this.logger.info("Open files: "),this.openFiles.forEach((r,a)=>{const u=this.getScriptInfoForPath(a);this.logger.info(` FileName: ${u.fileName} ProjectRootPath: ${r}`),this.logger.info(` Projects: ${u.containingProjects.map(h=>h.getProjectName())}`)}),this.logger.endGroup())}findConfiguredProjectByProjectName(r,a){const u=this.toCanonicalFileName(r),h=this.getConfiguredProjectByCanonicalConfigFilePath(u);return a?h:h!=null&&h.deferredClose?void 0:h}getConfiguredProjectByCanonicalConfigFilePath(r){return this.configuredProjects.get(r)}findExternalProjectByProjectName(r){return Glt(r,this.externalProjects)}getFilenameForExceededTotalSizeLimitForNonTsFiles(r,a,u,h){if(a&&a.disableSizeLimit||!this.host.getFileSize)return;let p=Vhe;this.projectToSizeMap.set(r,0),this.projectToSizeMap.forEach(C=>p-=C||0);let m=0;for(const C of u){const b=h.getFileName(C);if(!dP(b)&&(m+=this.host.getFileSize(b),m>Vhe||m>p)){const T=u.map(E=>h.getFileName(E)).filter(E=>!dP(E)).map(E=>({name:E,size:this.host.getFileSize(E)})).sort((E,N)=>N.size-E.size).slice(0,5);return this.logger.info(`Non TS file size exceeded limit (${m}). Largest files: ${T.map(E=>`${E.name}:${E.size}`).join(", ")}`),b}}this.projectToSizeMap.set(r,m)}createExternalProject(r,a,u,h,p){const m=hZ(u),C=uj(u,rs(Lf(r))),b=new Whe(r,this,this.documentRegistry,m,this.getFilenameForExceededTotalSizeLimitForNonTsFiles(r,m,a,e_e),u.compileOnSave===void 0?!0:u.compileOnSave,void 0,C==null?void 0:C.watchOptions);return b.setProjectErrors(C==null?void 0:C.errors),b.excludedFiles=p,this.addFilesToNonInferredProject(b,a,e_e,h),this.externalProjects.push(b),b}sendProjectTelemetry(r){if(this.seenProjects.has(r.projectName)){k3e(r);return}if(this.seenProjects.set(r.projectName,!0),!this.eventHandler||!this.host.createSHA256Hash){k3e(r);return}const a=TS(r)?r.projectOptions:void 0;k3e(r);const u={projectId:this.host.createSHA256Hash(r.projectName),fileStats:aj(r.getScriptInfos(),!0),compilerOptions:cDe(r.getCompilationSettings()),typeAcquisition:p(r.getTypeAcquisition()),extends:a&&a.configHasExtendsProperty,files:a&&a.configHasFilesProperty,include:a&&a.configHasIncludeProperty,exclude:a&&a.configHasExcludeProperty,compileOnSave:r.compileOnSaveEnabled,configFileName:h(),projectType:r instanceof Whe?"external":"configured",languageServiceEnabled:r.languageServiceEnabled,version:y};this.eventHandler({eventName:Jhe,data:u});function h(){return TS(r)&&Fhe(r.getConfigFilePath())||"other"}function p({enable:m,include:C,exclude:b}){return{enable:m,include:C!==void 0&&C.length!==0,exclude:b!==void 0&&b.length!==0}}}addFilesToNonInferredProject(r,a,u,h){this.updateNonInferredProjectFiles(r,a,u),r.setTypeAcquisition(h),r.markAsDirty()}createConfiguredProject(r,a){var u;(u=sr)==null||u.instant(sr.Phase.Session,"createConfiguredProject",{configFilePath:r}),this.logger.info(`Creating configuration project ${r}`);const h=this.toCanonicalFileName(r);let p=this.configFileExistenceInfoCache.get(h);p?p.exists=!0:this.configFileExistenceInfoCache.set(h,p={exists:!0}),p.config||(p.config={cachedDirectoryStructureHost:XK(this.host,this.host.getCurrentDirectory(),this.host.useCaseSensitiveFileNames),projects:new Map,updateLevel:2});const m=new g3e(r,h,this,this.documentRegistry,p.config.cachedDirectoryStructureHost,a);return z.assert(!this.configuredProjects.has(h)),this.configuredProjects.set(h,m),this.createConfigFileWatcherForParsedConfig(r,h,m),m}loadConfiguredProject(r,a){var u,h;(u=sr)==null||u.push(sr.Phase.Session,"loadConfiguredProject",{configFilePath:r.canonicalConfigFilePath}),this.sendProjectLoadingStartEvent(r,a);const p=ra(r.getConfigFilePath()),m=this.ensureParsedConfigUptoDate(p,r.canonicalConfigFilePath,this.configFileExistenceInfoCache.get(r.canonicalConfigFilePath),r),C=m.config.parsedCommandLine;z.assert(!!C.fileNames);const b=C.options;r.projectOptions||(r.projectOptions={configHasExtendsProperty:C.raw.extends!==void 0,configHasFilesProperty:C.raw.files!==void 0,configHasIncludeProperty:C.raw.include!==void 0,configHasExcludeProperty:C.raw.exclude!==void 0}),r.canConfigFileJsonReportNoInputFiles=N7(C.raw),r.setProjectErrors(C.options.configFile.parseDiagnostics),r.updateReferences(C.projectReferences);const T=this.getFilenameForExceededTotalSizeLimitForNonTsFiles(r.canonicalConfigFilePath,b,C.fileNames,Yhe);T?(r.disableLanguageService(T),this.configFileExistenceInfoCache.forEach((N,R)=>this.stopWatchingWildCards(R,r))):(r.setCompilerOptions(b),r.setWatchOptions(C.watchOptions),r.enableLanguageService(),this.watchWildcards(p,m,r)),r.enablePluginsWithOptions(b);const E=C.fileNames.concat(r.getExternalFiles(2));this.updateRootAndOptionsOfNonInferredProject(r,E,Yhe,b,C.typeAcquisition,C.compileOnSave,C.watchOptions),(h=sr)==null||h.pop()}ensureParsedConfigUptoDate(r,a,u,h){var p,m,C;if(u.config){if(!u.config.updateLevel)return u;if(u.config.updateLevel===1)return this.reloadFileNamesOfParsedConfig(r,u.config),u}const b=((p=u.config)==null?void 0:p.cachedDirectoryStructureHost)||XK(this.host,this.host.getCurrentDirectory(),this.host.useCaseSensitiveFileNames),T=I7(r,U=>this.host.readFile(U)),E=kV(r,mo(T)?T:""),N=E.parseDiagnostics;mo(T)||N.push(T);const R=rs(r),F=LV(E,b,R,void 0,r,void 0,this.hostConfiguration.extraFileExtensions,this.extendedConfigCache);F.errors.length&&N.push(...F.errors),this.logger.info(`Config: ${r} : ${JSON.stringify({rootNames:F.fileNames,options:F.options,watchOptions:F.watchOptions,projectReferences:F.projectReferences},void 0," ")}`);const j=(m=u.config)==null?void 0:m.parsedCommandLine;return u.config?(u.config.parsedCommandLine=F,u.config.watchedDirectoriesStale=!0,u.config.updateLevel=void 0):u.config={parsedCommandLine:F,cachedDirectoryStructureHost:b,projects:new Map},!j&&!vG(this.getWatchOptionsFromProjectWatchOptions(void 0,R),this.getWatchOptionsFromProjectWatchOptions(F.watchOptions,R))&&((C=u.watcher)==null||C.close(),u.watcher=void 0),this.createConfigFileWatcherForParsedConfig(r,a,h),ZK(a,F.options,this.sharedExtendedConfigFileWatchers,(U,q)=>this.watchFactory.watchFile(U,()=>{var Q;YK(this.extendedConfigCache,q,Y=>this.toPath(Y));let re=!1;(Q=this.sharedExtendedConfigFileWatchers.get(q))==null||Q.projects.forEach(Y=>{re=this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(Y,`Change in extended config file ${U} detected`)||re}),re&&this.delayEnsureProjectForOpenFiles()},2e3,this.hostConfiguration.watchOptions,tf.ExtendedConfigFile,r),U=>this.toPath(U)),u}watchWildcards(r,{exists:a,config:u},h){if(u.projects.set(h.canonicalConfigFilePath,!0),a){if(u.watchedDirectories&&!u.watchedDirectoriesStale)return;u.watchedDirectoriesStale=!1,qV(u.watchedDirectories||(u.watchedDirectories=new Map),u.parsedCommandLine.wildcardDirectories,(p,m)=>this.watchWildcardDirectory(p,m,r,u))}else{if(u.watchedDirectoriesStale=!1,!u.watchedDirectories)return;tp(u.watchedDirectories,tm),u.watchedDirectories=void 0}}stopWatchingWildCards(r,a){const u=this.configFileExistenceInfoCache.get(r);!u.config||!u.config.projects.get(a.canonicalConfigFilePath)||(u.config.projects.set(a.canonicalConfigFilePath,!1),!hf(u.config.projects,fc)&&(u.config.watchedDirectories&&(tp(u.config.watchedDirectories,tm),u.config.watchedDirectories=void 0),u.config.watchedDirectoriesStale=void 0))}updateNonInferredProjectFiles(r,a,u){var h;const p=r.getRootFilesMap(),m=new Map;for(const C of a){const b=u.getFileName(C),T=Kc(b),E=sj(T);let N;if(!E&&!r.fileExists(b)){N=rj(T,this.currentDirectory,this.toCanonicalFileName);const R=p.get(N);R?(((h=R.info)==null?void 0:h.path)===N&&(r.removeFile(R.info,!1,!0),R.info=void 0),R.fileName=T):p.set(N,{fileName:T})}else{const R=u.getScriptKind(C,this.hostConfiguration.extraFileExtensions),F=u.hasMixedContent(C,this.hostConfiguration.extraFileExtensions),j=z.checkDefined(this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(T,r.currentDirectory,R,F,r.directoryStructureHost,!1));N=j.path;const U=p.get(N);!U||U.info!==j?(r.addRoot(j,T),j.isScriptOpen()&&this.removeRootOfInferredProjectIfNowPartOfOtherProject(j)):U.fileName=T}m.set(N,!0)}p.size>m.size&&p.forEach((C,b)=>{m.has(b)||(C.info?r.removeFile(C.info,r.fileExists(C.info.fileName),!0):p.delete(b))})}updateRootAndOptionsOfNonInferredProject(r,a,u,h,p,m,C){r.setCompilerOptions(h),r.setWatchOptions(C),m!==void 0&&(r.compileOnSaveEnabled=m),this.addFilesToNonInferredProject(r,a,u,p)}reloadFileNamesOfConfiguredProject(r){const a=this.reloadFileNamesOfParsedConfig(r.getConfigFilePath(),this.configFileExistenceInfoCache.get(r.canonicalConfigFilePath).config);return r.updateErrorOnNoInputFiles(a),this.updateNonInferredProjectFiles(r,a.concat(r.getExternalFiles(1)),Yhe),r.markAsDirty(),r.updateGraph()}reloadFileNamesOfParsedConfig(r,a){if(a.updateLevel===void 0)return a.parsedCommandLine.fileNames;z.assert(a.updateLevel===1);const u=a.parsedCommandLine.options.configFile.configFileSpecs,h=L7(u,rs(r),a.parsedCommandLine.options,a.cachedDirectoryStructureHost,this.hostConfiguration.extraFileExtensions);return a.parsedCommandLine={...a.parsedCommandLine,fileNames:h},h}setFileNamesOfAutpImportProviderOrAuxillaryProject(r,a){this.updateNonInferredProjectFiles(r,a,Yhe)}reloadConfiguredProjectClearingSemanticCache(r,a,u){return o_(u,r)?(this.clearSemanticCache(r),this.reloadConfiguredProject(r,n_e(a)),!0):!1}reloadConfiguredProject(r,a){r.isInitialLoadPending=kv,r.pendingUpdateReason=void 0,r.pendingUpdateLevel=0,r.getCachedDirectoryStructureHost().clearCache(),this.loadConfiguredProject(r,a),Ylt(r,r.triggerFileForConfigFileDiag??r.getConfigFilePath(),!0)}clearSemanticCache(r){r.originalConfiguredProjects=void 0,r.resolutionCache.clear(),r.getLanguageService(!1).cleanupSemanticCache(),r.cleanupProgram(),r.markAsDirty()}sendConfigFileDiagEvent(r,a,u){if(!this.eventHandler||this.suppressDiagnosticEvents)return!1;const h=r.getLanguageService().getCompilerOptionsDiagnostics();return h.push(...r.getAllProjectErrors()),!u&&h.length===(r.configDiagDiagnosticsReported??0)?!1:(r.configDiagDiagnosticsReported=h.length,this.eventHandler({eventName:qhe,data:{configFileName:r.getConfigFilePath(),diagnostics:h,triggerFile:a??r.getConfigFilePath()}}),!0)}getOrCreateInferredProjectForProjectRootPathIfEnabled(r,a){if(!this.useInferredProjectPerProjectRoot||r.isDynamic&&a===void 0)return;if(a){const h=this.toCanonicalFileName(a);for(const p of this.inferredProjects)if(p.projectRootPath===h)return p;return this.createInferredProject(a,!1,a)}let u;for(const h of this.inferredProjects)h.projectRootPath&&l0(h.projectRootPath,r.path,this.host.getCurrentDirectory(),!this.host.useCaseSensitiveFileNames)&&(u&&u.projectRootPath.length>h.projectRootPath.length||(u=h));return u}getOrCreateSingleInferredProjectIfEnabled(){if(this.useSingleInferredProject)return this.inferredProjects.length>0&&this.inferredProjects[0].projectRootPath===void 0?this.inferredProjects[0]:this.createInferredProject("",!0)}getOrCreateSingleInferredWithoutProjectRoot(r){z.assert(!this.useSingleInferredProject);const a=this.toCanonicalFileName(this.getNormalizedAbsolutePath(r));for(const u of this.inferredProjects)if(!u.projectRootPath&&u.isOrphan()&&u.canonicalCurrentDirectory===a)return u;return this.createInferredProject(r)}createInferredProject(r,a,u){const h=u&&this.compilerOptionsForInferredProjectsPerProjectRoot.get(u)||this.compilerOptionsForInferredProjects;let p,m;u&&(p=this.watchOptionsForInferredProjectsPerProjectRoot.get(u),m=this.typeAcquisitionForInferredProjectsPerProjectRoot.get(u)),p===void 0&&(p=this.watchOptionsForInferredProjects),m===void 0&&(m=this.typeAcquisitionForInferredProjects),p=p||void 0;const C=new f3e(this,this.documentRegistry,h,p==null?void 0:p.watchOptions,u,r,m);return C.setProjectErrors(p==null?void 0:p.errors),a?this.inferredProjects.unshift(C):this.inferredProjects.push(C),C}getOrCreateScriptInfoNotOpenedByClient(r,a,u,h){return this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(Kc(r),a,void 0,void 0,u,h)}getScriptInfo(r){return this.getScriptInfoForNormalizedPath(Kc(r))}getScriptInfoOrConfig(r){const a=Kc(r),u=this.getScriptInfoForNormalizedPath(a);if(u)return u;const h=this.configuredProjects.get(this.toPath(r));return h&&h.getCompilerOptions().configFile}logErrorForScriptInfoNotFound(r){const a=Fn(fh(this.filenameToScriptInfo.entries(),u=>u[1].deferredDelete?void 0:u),([u,h])=>({path:u,fileName:h.fileName}));this.logger.msg(`Could not find file ${JSON.stringify(r)}. +All files are: ${JSON.stringify(a)}`,"Err")}getSymlinkedProjects(r){let a;if(this.realpathToScriptInfos){const h=r.getRealpathIfDifferent();h&&W(this.realpathToScriptInfos.get(h),u),W(this.realpathToScriptInfos.get(r.path),u)}return a;function u(h){if(h!==r)for(const p of h.containingProjects)p.languageServiceEnabled&&!p.isOrphan()&&!p.getCompilerOptions().preserveSymlinks&&!r.isAttached(p)&&(a?hf(a,(m,C)=>C===h.path?!1:Mt(m,p))||a.add(h.path,p):(a=Ug(),a.add(h.path,p)))}}watchClosedScriptInfo(r){if(z.assert(!r.fileWatcher),!r.isDynamicOrHasMixedContent()&&(!this.globalCacheLocationDirectoryPath||!ro(r.path,this.globalCacheLocationDirectoryPath))){const a=r.fileName.indexOf("/node_modules/");!this.host.getModifiedTime||a===-1?r.fileWatcher=this.watchFactory.watchFile(r.fileName,(u,h)=>this.onSourceFileChanged(r,h),500,this.hostConfiguration.watchOptions,tf.ClosedScriptInfo):(r.mTime=this.getModifiedTime(r),r.fileWatcher=this.watchClosedScriptInfoInNodeModules(r.fileName.substring(0,a)))}}createNodeModulesWatcher(r,a){let u=this.watchFactory.watchDirectory(r,p=>{var m;const C=lQ(this.toPath(p));if(!C)return;const b=fd(C);if((m=h.affectedModuleSpecifierCacheProjects)!=null&&m.size&&(b==="package.json"||b==="node_modules")&&h.affectedModuleSpecifierCacheProjects.forEach(T=>{var E;(E=T.getModuleSpecifierCache())==null||E.clear()}),h.refreshScriptInfoRefCount)if(a===C)this.refreshScriptInfosInDirectory(a);else{const T=this.filenameToScriptInfo.get(C);T?Zlt(T)&&this.refreshScriptInfo(T):_6(C)||this.refreshScriptInfosInDirectory(C)}},1,this.hostConfiguration.watchOptions,tf.NodeModules);const h={refreshScriptInfoRefCount:0,affectedModuleSpecifierCacheProjects:void 0,close:()=>{var p;u&&!h.refreshScriptInfoRefCount&&!((p=h.affectedModuleSpecifierCacheProjects)!=null&&p.size)&&(u.close(),u=void 0,this.nodeModulesWatchers.delete(a))}};return this.nodeModulesWatchers.set(a,h),h}watchPackageJsonsInNodeModules(r,a){var u;const h=this.toPath(r),p=this.nodeModulesWatchers.get(h)||this.createNodeModulesWatcher(r,h);return z.assert(!((u=p.affectedModuleSpecifierCacheProjects)!=null&&u.has(a))),(p.affectedModuleSpecifierCacheProjects||(p.affectedModuleSpecifierCacheProjects=new Set)).add(a),{close:()=>{var m;(m=p.affectedModuleSpecifierCacheProjects)==null||m.delete(a),p.close()}}}watchClosedScriptInfoInNodeModules(r){const a=r+"/node_modules",u=this.toPath(a),h=this.nodeModulesWatchers.get(u)||this.createNodeModulesWatcher(a,u);return h.refreshScriptInfoRefCount++,{close:()=>{h.refreshScriptInfoRefCount--,h.close()}}}getModifiedTime(r){return(this.host.getModifiedTime(r.fileName)||Cp).getTime()}refreshScriptInfo(r){const a=this.getModifiedTime(r);if(a!==r.mTime){const u=zre(r.mTime,a);r.mTime=a,this.onSourceFileChanged(r,u)}}refreshScriptInfosInDirectory(r){r=r+Hc,this.filenameToScriptInfo.forEach(a=>{Zlt(a)&&ro(a.path,r)&&this.refreshScriptInfo(a)})}stopWatchingScriptInfo(r){r.fileWatcher&&(r.fileWatcher.close(),r.fileWatcher=void 0)}getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(r,a,u,h,p,m){if(Sp(r)||sj(r))return this.getOrCreateScriptInfoWorker(r,a,!1,void 0,u,!!h,p,m);const C=this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(r));if(C)return C}getOrCreateScriptInfoForNormalizedPath(r,a,u,h,p,m){return this.getOrCreateScriptInfoWorker(r,this.currentDirectory,a,u,h,!!p,m,!1)}getOrCreateScriptInfoWorker(r,a,u,h,p,m,C,b){z.assert(h===void 0||u,"ScriptInfo needs to be opened by client to be able to set its user defined content");const T=rj(r,a,this.toCanonicalFileName);let E=this.filenameToScriptInfo.get(T);if(E){if(E.deferredDelete){if(z.assert(!E.isDynamic),!u&&!(C||this.host).fileExists(r))return b?E:void 0;E.deferredDelete=void 0}}else{const N=sj(r);if(z.assert(Sp(r)||N||u,"",()=>`${JSON.stringify({fileName:r,currentDirectory:a,hostCurrentDirectory:this.currentDirectory,openKeys:Fn(this.openFilesWithNonRootedDiskPath.keys())})} +Script info with non-dynamic relative file name can only be open script info or in context of host currentDirectory`),z.assert(!Sp(r)||this.currentDirectory===a||!this.openFilesWithNonRootedDiskPath.has(this.toCanonicalFileName(r)),"",()=>`${JSON.stringify({fileName:r,currentDirectory:a,hostCurrentDirectory:this.currentDirectory,openKeys:Fn(this.openFilesWithNonRootedDiskPath.keys())})} +Open script files with non rooted disk path opened with current directory context cannot have same canonical names`),z.assert(!N||this.currentDirectory===a||this.useInferredProjectPerProjectRoot,"",()=>`${JSON.stringify({fileName:r,currentDirectory:a,hostCurrentDirectory:this.currentDirectory,openKeys:Fn(this.openFilesWithNonRootedDiskPath.keys())})} +Dynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath.`),!u&&!N&&!(C||this.host).fileExists(r))return;E=new o3e(this.host,r,p,m,T,this.filenameToScriptInfoVersion.get(T)),this.filenameToScriptInfo.set(E.path,E),this.filenameToScriptInfoVersion.delete(E.path),u?!Sp(r)&&(!N||this.currentDirectory!==a)&&this.openFilesWithNonRootedDiskPath.set(this.toCanonicalFileName(r),E):this.watchClosedScriptInfo(E)}return u&&(this.stopWatchingScriptInfo(E),E.open(h),m&&E.registerFileUpdate()),E}getScriptInfoForNormalizedPath(r){return!Sp(r)&&this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(r))||this.getScriptInfoForPath(rj(r,this.currentDirectory,this.toCanonicalFileName))}getScriptInfoForPath(r){const a=this.filenameToScriptInfo.get(r);return!a||!a.deferredDelete?a:void 0}getDocumentPositionMapper(r,a,u){const h=this.getOrCreateScriptInfoNotOpenedByClient(a,r.currentDirectory,this.host,!1);if(!h){u&&r.addGeneratedFileWatch(a,u);return}if(h.getSnapshot(),mo(h.sourceMapFilePath)){const T=this.getScriptInfoForPath(h.sourceMapFilePath);if(T&&(T.getSnapshot(),T.documentPositionMapper!==void 0))return T.sourceInfos=this.addSourceInfoToSourceMap(u,r,T.sourceInfos),T.documentPositionMapper?T.documentPositionMapper:void 0;h.sourceMapFilePath=void 0}else if(h.sourceMapFilePath){h.sourceMapFilePath.sourceInfos=this.addSourceInfoToSourceMap(u,r,h.sourceMapFilePath.sourceInfos);return}else if(h.sourceMapFilePath!==void 0)return;let p,m=(T,E)=>{const N=this.getOrCreateScriptInfoNotOpenedByClient(T,r.currentDirectory,this.host,!0);if(p=N||E,!N||N.deferredDelete)return;const R=N.getSnapshot();return N.documentPositionMapper!==void 0?N.documentPositionMapper:GP(R)};const C=r.projectName,b=Gde({getCanonicalFileName:this.toCanonicalFileName,log:T=>this.logger.info(T),getSourceFileLike:T=>this.getSourceFileLike(T,C,h)},h.fileName,h.textStorage.getLineInfo(),m);return m=void 0,p?mo(p)?h.sourceMapFilePath={watcher:this.addMissingSourceMapFile(r.currentDirectory===this.currentDirectory?p:bo(p,r.currentDirectory),h.path),sourceInfos:this.addSourceInfoToSourceMap(u,r)}:(h.sourceMapFilePath=p.path,p.declarationInfoPath=h.path,p.deferredDelete||(p.documentPositionMapper=b||!1),p.sourceInfos=this.addSourceInfoToSourceMap(u,r,p.sourceInfos)):h.sourceMapFilePath=!1,b}addSourceInfoToSourceMap(r,a,u){if(r){const h=this.getOrCreateScriptInfoNotOpenedByClient(r,a.currentDirectory,a.directoryStructureHost,!1);(u||(u=new Set)).add(h.path)}return u}addMissingSourceMapFile(r,a){return this.watchFactory.watchFile(r,()=>{const h=this.getScriptInfoForPath(a);h&&h.sourceMapFilePath&&!mo(h.sourceMapFilePath)&&(this.delayUpdateProjectGraphs(h.containingProjects,!0),this.delayUpdateSourceInfoProjects(h.sourceMapFilePath.sourceInfos),h.closeSourceMapFileWatcher())},2e3,this.hostConfiguration.watchOptions,tf.MissingSourceMapFile)}getSourceFileLike(r,a,u){const h=a.projectName?a:this.findProject(a);if(h){const m=h.toPath(r),C=h.getSourceFile(m);if(C&&C.resolvedPath===m)return C}const p=this.getOrCreateScriptInfoNotOpenedByClient(r,(h||this).currentDirectory,h?h.directoryStructureHost:this.host,!1);if(p){if(u&&mo(u.sourceMapFilePath)&&p!==u){const m=this.getScriptInfoForPath(u.sourceMapFilePath);m&&(m.sourceInfos??(m.sourceInfos=new Set)).add(p.path)}return p.cacheSourceFile?p.cacheSourceFile.sourceFile:(p.sourceFileLike||(p.sourceFileLike={get text(){return z.fail("shouldnt need text"),""},getLineAndCharacterOfPosition:m=>{const C=p.positionToLineOffset(m);return{line:C.line-1,character:C.offset-1}},getPositionOfLineAndCharacter:(m,C,b)=>p.lineOffsetToPosition(m+1,C+1,b)}),p.sourceFileLike)}}setPerformanceEventHandler(r){this.performanceEventHandler=r}setHostConfiguration(r){var a;if(r.file){const u=this.getScriptInfoForNormalizedPath(Kc(r.file));u&&(u.setOptions(Z3(r.formatOptions),r.preferences),this.logger.info(`Host configuration update for file ${r.file}`))}else{if(r.hostInfo!==void 0&&(this.hostConfiguration.hostInfo=r.hostInfo,this.logger.info(`Host information ${r.hostInfo}`)),r.formatOptions&&(this.hostConfiguration.formatCodeOptions={...this.hostConfiguration.formatCodeOptions,...Z3(r.formatOptions)},this.logger.info("Format host information updated")),r.preferences){const{lazyConfiguredProjectsFromExternalProject:u,includePackageJsonAutoImports:h,includeCompletionsForModuleExports:p}=this.hostConfiguration.preferences;this.hostConfiguration.preferences={...this.hostConfiguration.preferences,...r.preferences},u&&!this.hostConfiguration.preferences.lazyConfiguredProjectsFromExternalProject&&this.externalProjectToConfiguredProjectMap.forEach(m=>m.forEach(C=>{!C.deferredClose&&!C.isClosed()&&C.pendingUpdateLevel===2&&!this.hasPendingProjectUpdate(C)&&C.updateGraph()})),(h!==r.preferences.includePackageJsonAutoImports||!!p!=!!r.preferences.includeCompletionsForModuleExports)&&this.forEachProject(m=>{m.onAutoImportProviderSettingsChanged()})}if(r.extraFileExtensions&&(this.hostConfiguration.extraFileExtensions=r.extraFileExtensions,this.reloadProjects(),this.logger.info("Host file extension mappings updated")),r.watchOptions){const u=(a=uj(r.watchOptions))==null?void 0:a.watchOptions,h=vK(u,this.currentDirectory);this.hostConfiguration.watchOptions=h,this.hostConfiguration.beforeSubstitution=h===u?void 0:u,this.logger.info(`Host watch options changed to ${JSON.stringify(this.hostConfiguration.watchOptions)}, it will be take effect for next watches.`)}}}getWatchOptions(r){return this.getWatchOptionsFromProjectWatchOptions(r.getWatchOptions(),r.getCurrentDirectory())}getWatchOptionsFromProjectWatchOptions(r,a){const u=this.hostConfiguration.beforeSubstitution?vK(this.hostConfiguration.beforeSubstitution,a):this.hostConfiguration.watchOptions;return r&&u?{...u,...r}:r||u}closeLog(){this.logger.close()}reloadProjects(){this.logger.info("reload projects."),this.filenameToScriptInfo.forEach(u=>{this.openFiles.has(u.path)||u.fileWatcher&&this.onSourceFileChanged(u,this.host.fileExists(u.fileName)?u.deferredDelete?0:1:2)}),this.pendingProjectUpdates.forEach((u,h)=>{this.throttledOperations.cancel(h),this.pendingProjectUpdates.delete(h)}),this.throttledOperations.cancel($lt),this.pendingOpenFileProjectUpdates=void 0,this.pendingEnsureProjectForOpenFiles=!1,this.configFileExistenceInfoCache.forEach(u=>{u.config&&(u.config.updateLevel=2)}),this.configFileForOpenFiles.clear(),this.externalProjects.forEach(u=>{this.clearSemanticCache(u),u.updateGraph()});const r=new Set,a=new Set;this.externalProjectToConfiguredProjectMap.forEach((u,h)=>{const p=`Reloading configured project in external project: ${h}`;u.forEach(m=>{this.getHostPreferences().lazyConfiguredProjectsFromExternalProject?(m.isInitialLoadPending()||(this.clearSemanticCache(m),m.pendingUpdateLevel=2,m.pendingUpdateReason=n_e(p)),a.add(m)):this.reloadConfiguredProjectClearingSemanticCache(m,p,r)})}),this.openFiles.forEach((u,h)=>{const p=this.getScriptInfoForPath(h);Me(p.containingProjects,lj)||this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(p,2,r,a)}),a.forEach(u=>r.add(u)),this.inferredProjects.forEach(u=>this.clearSemanticCache(u)),this.ensureProjectForOpenFiles(),this.cleanupProjectsAndScriptInfos(r,new Set(this.openFiles.keys()),new Set(this.externalProjectToConfiguredProjectMap.keys())),this.logger.info("After reloading projects.."),this.printProjects()}removeRootOfInferredProjectIfNowPartOfOtherProject(r){z.assert(r.containingProjects.length>0);const a=r.containingProjects[0];!a.isOrphan()&&X3(a)&&a.isRoot(r)&&W(r.containingProjects,u=>u!==a&&!u.isOrphan())&&a.removeFile(r,!0,!0)}ensureProjectForOpenFiles(){this.logger.info("Before ensureProjectForOpenFiles:"),this.printProjects();const r=this.pendingOpenFileProjectUpdates;this.pendingOpenFileProjectUpdates=void 0,r==null||r.forEach((a,u)=>this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(this.getScriptInfoForPath(u),1)),this.openFiles.forEach((a,u)=>{const h=this.getScriptInfoForPath(u);h.isOrphan()?this.assignOrphanScriptInfoToInferredProject(h,a):this.removeRootOfInferredProjectIfNowPartOfOtherProject(h)}),this.pendingEnsureProjectForOpenFiles=!1,this.inferredProjects.forEach(im),this.logger.info("After ensureProjectForOpenFiles:"),this.printProjects()}openClientFile(r,a,u,h){return this.openClientFileWithNormalizedPath(Kc(r),a,u,!1,h?Kc(h):void 0)}getOriginalLocationEnsuringConfiguredProject(r,a){const u=r.isSourceOfProjectReferenceRedirect(a.fileName),h=u?a:r.getSourceMapper().tryGetSourcePosition(a);if(!h)return;const{fileName:p}=h,m=this.getScriptInfo(p);if(!m&&!this.host.fileExists(p))return;const C={fileName:Kc(p),path:this.toPath(p)},b=this.getConfigFileNameForFile(C,!1);if(!b)return;let T=this.findConfiguredProjectByProjectName(b);if(!T){if(r.getCompilerOptions().disableReferencedProjectLoad)return u?a:m!=null&&m.containingProjects.length?h:a;T=this.createConfiguredProject(b,`Creating project for original file: ${C.fileName}${a!==h?" for location: "+a.fileName:""}`)}im(T);const E=F=>{const j=this.getScriptInfo(p);return j&&F.containsScriptInfo(j)&&!F.isSourceOfProjectReferenceRedirect(j.path)};if(T.isSolution()||!E(T)){if(T=i_e(T,p,F=>E(F)?F:void 0,1,`Creating project referenced in solution ${T.projectName} to find possible configured project for original file: ${C.fileName}${a!==h?" for location: "+a.fileName:""}`),!T)return;if(T===r)return h}R(T);const N=this.getScriptInfo(p);if(!N||!N.containingProjects.length)return;return N.containingProjects.forEach(F=>{TS(F)&&R(F)}),h;function R(F){(r.originalConfiguredProjects??(r.originalConfiguredProjects=new Set)).add(F.canonicalConfigFilePath)}}fileExists(r){return!!this.getScriptInfoForNormalizedPath(r)||this.host.fileExists(r)}findExternalProjectContainingOpenScriptInfo(r){return Me(this.externalProjects,a=>(im(a),a.containsScriptInfo(r)))}getOrCreateOpenScriptInfo(r,a,u,h,p){const m=this.getOrCreateScriptInfoWorker(r,p?this.getNormalizedAbsolutePath(p):this.currentDirectory,!0,a,u,!!h,void 0,!0);return this.openFiles.set(m.path,p),m}assignProjectToOpenedScriptInfo(r){let a,u;const h=this.findExternalProjectContainingOpenScriptInfo(r);let p,m;if(!h&&this.serverMode===0){const C=this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(r,1);C&&(p=C.seenProjects,m=C.sentConfigDiag,C.defaultProject&&(a=C.defaultProject.getConfigFilePath(),u=C.defaultProject.getAllProjectErrors()))}return r.containingProjects.forEach(im),r.isOrphan()&&(p==null||p.forEach(C=>{m.has(C)||this.sendConfigFileDiagEvent(C,r.fileName,!0)}),z.assert(this.openFiles.has(r.path)),this.assignOrphanScriptInfoToInferredProject(r,this.openFiles.get(r.path))),z.assert(!r.isOrphan()),{configFileName:a,configFileErrors:u,retainProjects:p}}findCreateOrReloadConfiguredProject(r,a,u,h,p,m,C,b){let T=this.findConfiguredProjectByProjectName(r,h),E=!1;switch(a){case 0:if(!T)return;break;case 1:T??(T=this.createConfiguredProject(r,u)),E=!C&&ect(T,p);break;case 2:T??(T=this.createConfiguredProject(r,n_e(u))),E=!b&&this.reloadConfiguredProjectClearingSemanticCache(T,u,m),b&&!b.has(T)&&!m.has(T)&&(T.pendingUpdateLevel=2,T.pendingUpdateReason=n_e(u),b.add(T));break;default:z.assertNever(a)}return{project:T,sentConfigFileDiag:E}}tryFindDefaultConfiguredProjectForOpenScriptInfo(r,a,u,h){const p=this.getConfigFileNameForFile(r,a===0);if(!p)return;const m=this.findCreateOrReloadConfiguredProject(p,a,tct(r),u,r.fileName,h);if(!m)return;const C=new Set,b=new Set(m.sentConfigFileDiag?[m.project]:void 0);let T,E;return N(m.project),{defaultProject:T??E,sentConfigDiag:b,seenProjects:C};function N(j){return R(j)?T:F(j)}function R(j){if(!o_(C,j))return;const U=j.containsScriptInfo(r);if(U&&!j.isSourceOfProjectReferenceRedirect(r.path))return T=j;E??(E=U?j:void 0)}function F(j){return i_e(j,r.path,(U,q)=>(q&&b.add(U),R(U)),a,`Creating project referenced in solution ${j.projectName} to find possible configured project for ${r.fileName} to open`,u,r.fileName,h)}}tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(r,a,u,h){const p=a===0,m=this.tryFindDefaultConfiguredProjectForOpenScriptInfo(r,a,p,u);if(!m)return;const{defaultProject:C,seenProjects:b}=m;return C&&wHt(r,C,T=>{b.add(T)},a,`Creating project possibly referencing default composite project ${C.getProjectName()} of open file ${r.fileName}`,p,u,h),m}loadAncestorProjectTree(r){r=r||yp(this.configuredProjects,(u,h)=>h.isInitialLoadPending()?void 0:[u,!0]);const a=new Set;for(const u of Fn(this.configuredProjects.values()))Qlt(u,h=>r.has(h))&&im(u),this.ensureProjectChildren(u,r,a)}ensureProjectChildren(r,a,u){var h;if(!o_(u,r.canonicalConfigFilePath)||r.getCompilerOptions().disableReferencedProjectLoad)return;const p=(h=r.getCurrentProgram())==null?void 0:h.getResolvedProjectReferences();if(p)for(const m of p){if(!m)continue;const C=Fce(m.references,E=>a.has(E.sourceFile.path)?E:void 0);if(!C)continue;const b=Kc(m.sourceFile.fileName),T=this.findConfiguredProjectByProjectName(b)??this.createConfiguredProject(b,`Creating project referenced by : ${r.projectName} as it references project ${C.sourceFile.fileName}`);im(T),this.ensureProjectChildren(T,a,u)}}cleanupConfiguredProjects(r,a,u){this.getOrphanConfiguredProjects(r,u,a).forEach(h=>this.removeProject(h))}cleanupProjectsAndScriptInfos(r,a,u){this.cleanupConfiguredProjects(r,u,a);for(const h of this.inferredProjects.slice())h.isOrphan()&&this.removeProject(h);this.removeOrphanScriptInfos()}openClientFileWithNormalizedPath(r,a,u,h,p){const m=this.getOrCreateOpenScriptInfo(r,a,u,h,p),{retainProjects:C,...b}=this.assignProjectToOpenedScriptInfo(m);return this.cleanupProjectsAndScriptInfos(C,new Set([m.path]),void 0),this.telemetryOnOpenFile(m),this.printProjects(),b}getOrphanConfiguredProjects(r,a,u){const h=new Set(this.configuredProjects.values()),p=T=>{T.originalConfiguredProjects&&(TS(T)||!T.isOrphan())&&T.originalConfiguredProjects.forEach((E,N)=>{const R=this.getConfiguredProjectByCanonicalConfigFilePath(N);return R&&b(R)})};return r==null||r.forEach(b),this.inferredProjects.forEach(p),this.externalProjects.forEach(p),this.externalProjectToConfiguredProjectMap.forEach((T,E)=>{u!=null&&u.has(E)||T.forEach(b)}),this.openFiles.forEach((T,E)=>{if(a!=null&&a.has(E))return;const N=this.getScriptInfoForPath(E);if(Me(N.containingProjects,lj))return;const R=this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(N,0);R!=null&&R.defaultProject&&(R==null||R.seenProjects.forEach(b))}),this.configuredProjects.forEach(T=>{h.has(T)&&(C(T)||Xlt(T,m))&&b(T)}),h;function m(T){return!h.has(T)||C(T)}function C(T){var E,N;return(T.deferredClose||T.projectService.hasPendingProjectUpdate(T))&&!!((N=(E=T.projectService.configFileExistenceInfoCache.get(T.canonicalConfigFilePath))==null?void 0:E.openFilesImpactedByConfigFile)!=null&&N.size)}function b(T){h.delete(T)&&(p(T),Xlt(T,b))}}removeOrphanScriptInfos(){const r=new Map(this.filenameToScriptInfo);this.filenameToScriptInfo.forEach(a=>{if(!a.deferredDelete){if(!a.isScriptOpen()&&a.isOrphan()&&!a.isContainedByBackgroundProject()){if(!a.sourceMapFilePath)return;let u;if(mo(a.sourceMapFilePath)){const h=this.filenameToScriptInfo.get(a.sourceMapFilePath);u=h==null?void 0:h.sourceInfos}else u=a.sourceMapFilePath.sourceInfos;if(!u||!Bb(u,h=>{const p=this.getScriptInfoForPath(h);return!!p&&(p.isScriptOpen()||!p.isOrphan())}))return}if(r.delete(a.path),a.sourceMapFilePath){let u;if(mo(a.sourceMapFilePath)){const h=this.filenameToScriptInfo.get(a.sourceMapFilePath);h!=null&&h.deferredDelete?a.sourceMapFilePath={watcher:this.addMissingSourceMapFile(h.fileName,a.path),sourceInfos:h.sourceInfos}:r.delete(a.sourceMapFilePath),u=h==null?void 0:h.sourceInfos}else u=a.sourceMapFilePath.sourceInfos;u&&u.forEach((h,p)=>r.delete(p))}}}),r.forEach(a=>this.deleteScriptInfo(a))}telemetryOnOpenFile(r){if(this.serverMode!==0||!this.eventHandler||!r.isJavaScript()||!Lm(this.allJsFilesForOpenFileTelemetry,r.path))return;const a=this.ensureDefaultProjectForFile(r);if(!a.languageServiceEnabled)return;const u=a.getSourceFile(r.path),h=!!u&&!!u.checkJsDirective;this.eventHandler({eventName:m3e,data:{info:{checkJs:h}}})}closeClientFile(r,a){const u=this.getScriptInfoForNormalizedPath(Kc(r)),h=u?this.closeOpenFile(u,a):!1;return a||this.printProjects(),h}collectChanges(r,a,u,h){for(const p of a){const m=Me(r,C=>C.projectName===p.getProjectName());h.push(p.getChangesSinceVersion(m&&m.version,u))}}synchronizeProjectList(r,a){const u=[];return this.collectChanges(r,this.externalProjects,a,u),this.collectChanges(r,fh(this.configuredProjects.values(),h=>h.deferredClose?void 0:h),a,u),this.collectChanges(r,this.inferredProjects,a,u),u}applyChangesInOpenFiles(r,a,u){let h,p=!1;if(r)for(const C of r){const b=this.getOrCreateOpenScriptInfo(Kc(C.fileName),C.content,Xhe(C.scriptKind),C.hasMixedContent,C.projectRootPath?Kc(C.projectRootPath):void 0);(h||(h=[])).push(b)}if(a)for(const C of a){const b=this.getScriptInfo(C.fileName);z.assert(!!b),this.applyChangesToFile(b,C.changes)}if(u)for(const C of u)p=this.closeClientFile(C,!0)||p;let m;h==null||h.forEach(C=>{var b;return(b=this.assignProjectToOpenedScriptInfo(C).retainProjects)==null?void 0:b.forEach(T=>(m??(m=new Set)).add(T))}),p&&this.assignOrphanScriptInfosToInferredProject(),h?(this.cleanupProjectsAndScriptInfos(m,new Set(h.map(C=>C.path)),void 0),h.forEach(C=>this.telemetryOnOpenFile(C)),this.printProjects()):O(u)&&this.printProjects()}applyChangesToFile(r,a){for(const u of a)r.editContent(u.span.start,u.span.start+u.span.length,u.newText)}closeExternalProject(r,a){const u=Kc(r);if(this.externalProjectToConfiguredProjectMap.get(u))this.externalProjectToConfiguredProjectMap.delete(u);else{const p=this.findExternalProjectByProjectName(r);p&&this.removeProject(p)}a&&(this.cleanupConfiguredProjects(),this.printProjects())}openExternalProjects(r){const a=new Set(this.externalProjects.map(u=>u.getProjectName()));this.externalProjectToConfiguredProjectMap.forEach((u,h)=>a.add(h));for(const u of r)this.openExternalProject(u,!1),a.delete(u.projectFileName);a.forEach(u=>this.closeExternalProject(u,!1)),this.cleanupConfiguredProjects(),this.printProjects()}static escapeFilenameForRegex(r){return r.replace(this.filenameEscapeRegexp,"\\$&")}resetSafeList(){this.safelist=v3e}applySafeList(r){const a=r.typeAcquisition;z.assert(!!a,"proj.typeAcquisition should be set by now");const u=this.applySafeListWorker(r,r.rootFiles,a);return(u==null?void 0:u.excludedFiles)??[]}applySafeListWorker(r,a,u){if(u.enable===!1||u.disableFilenameBasedTypeAcquisition)return;const h=u.include||(u.include=[]),p=[],m=a.map(N=>Lf(N.fileName));for(const N of Object.keys(this.safelist)){const R=this.safelist[N];for(const F of m)if(R.match.test(F)){if(this.logger.info(`Excluding files based on rule ${N} matching file '${F}'`),R.types)for(const j of R.types)h.includes(j)||h.push(j);if(R.exclude)for(const j of R.exclude){const U=F.replace(R.match,(...q)=>j.map(Q=>typeof Q=="number"?mo(q[Q])?aHe.escapeFilenameForRegex(q[Q]):(this.logger.info(`Incorrect RegExp specification in safelist rule ${N} - not enough groups`),"\\*"):Q).join(""));p.includes(U)||p.push(U)}else{const j=aHe.escapeFilenameForRegex(F);p.includes(j)||p.push(j)}}}const C=p.map(N=>new RegExp(N,"i"));let b,T;for(let N=0;NR.test(m[N])))E(N);else{if(u.enable){const R=fd(Ow(m[N]));if(tu(R,"js")){const F=h_(R),j=pre(F),U=this.legacySafelist.get(j);if(U!==void 0){this.logger.info(`Excluded '${m[N]}' because it matched ${j} from the legacy safelist`),E(N),h.includes(U)||h.push(U);continue}}}/^.+[.-]min\.js$/.test(m[N])?E(N):b==null||b.push(a[N])}return T?{rootFiles:b,excludedFiles:T}:void 0;function E(N){T||(z.assert(!b),b=a.slice(0,N),T=[]),T.push(m[N])}}openExternalProject(r,a){const u=this.findExternalProjectByProjectName(r.projectFileName);let h,p=[];for(const m of r.rootFiles){const C=Kc(m.fileName);if(Fhe(C)){if(this.serverMode===0&&this.host.fileExists(C)){let b=this.findConfiguredProjectByProjectName(C);b||(b=this.createConfiguredProject(C,`Creating configured project in external project: ${r.projectFileName}`),this.getHostPreferences().lazyConfiguredProjectsFromExternalProject||b.updateGraph()),(h??(h=new Set)).add(b),z.assert(!b.isClosed())}}else p.push(m)}if(h)this.externalProjectToConfiguredProjectMap.set(r.projectFileName,h),u&&this.removeProject(u);else{this.externalProjectToConfiguredProjectMap.delete(r.projectFileName);const m=r.typeAcquisition||{};m.include=m.include||[],m.exclude=m.exclude||[],m.enable===void 0&&(m.enable=u3e(p.map(T=>T.fileName)));const C=this.applySafeListWorker(r,p,m),b=(C==null?void 0:C.excludedFiles)??[];if(p=(C==null?void 0:C.rootFiles)??p,u){u.excludedFiles=b;const T=hZ(r.options),E=uj(r.options,u.getCurrentDirectory()),N=this.getFilenameForExceededTotalSizeLimitForNonTsFiles(r.projectFileName,T,p,e_e);N?u.disableLanguageService(N):u.enableLanguageService(),u.setProjectErrors(E==null?void 0:E.errors),this.updateRootAndOptionsOfNonInferredProject(u,p,e_e,T,m,r.options.compileOnSave,E==null?void 0:E.watchOptions),u.updateGraph()}else this.createExternalProject(r.projectFileName,p,r.options,m,b).updateGraph()}a&&(this.cleanupConfiguredProjects(h,new Set(r.projectFileName)),this.printProjects())}hasDeferredExtension(){for(const r of this.hostConfiguration.extraFileExtensions)if(r.scriptKind===7)return!0;return!1}requestEnablePlugin(r,a,u){if(!this.host.importPlugin&&!this.host.require){this.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded");return}if(this.logger.info(`Enabling plugin ${a.name} from candidate paths: ${u.join(",")}`),!a.name||Zd(a.name)||/[\\/]\.\.?($|[\\/])/.test(a.name)){this.logger.info(`Skipped loading plugin ${a.name||JSON.stringify(a)} because only package name is allowed plugin name`);return}if(this.host.importPlugin){const h=lA.importServicePluginAsync(a,u,this.host,m=>this.logger.info(m));this.pendingPluginEnablements??(this.pendingPluginEnablements=new Map);let p=this.pendingPluginEnablements.get(r);p||this.pendingPluginEnablements.set(r,p=[]),p.push(h);return}this.endEnablePlugin(r,lA.importServicePluginSync(a,u,this.host,h=>this.logger.info(h)))}endEnablePlugin(r,{pluginConfigEntry:a,resolvedModule:u,errorLogs:h}){var p;if(u){const m=(p=this.currentPluginConfigOverrides)==null?void 0:p.get(a.name);if(m){const C=a.name;a=m,a.name=C}r.enableProxy(u,a)}else W(h,m=>this.logger.info(m)),this.logger.info(`Couldn't find ${a.name}`)}hasNewPluginEnablementRequests(){return!!this.pendingPluginEnablements}hasPendingPluginEnablements(){return!!this.currentPluginEnablementPromise}async waitForPendingPlugins(){for(;this.currentPluginEnablementPromise;)await this.currentPluginEnablementPromise}enableRequestedPlugins(){this.pendingPluginEnablements&&this.enableRequestedPluginsAsync()}async enableRequestedPluginsAsync(){if(this.currentPluginEnablementPromise&&await this.waitForPendingPlugins(),!this.pendingPluginEnablements)return;const r=Fn(this.pendingPluginEnablements.entries());this.pendingPluginEnablements=void 0,this.currentPluginEnablementPromise=this.enableRequestedPluginsWorker(r),await this.currentPluginEnablementPromise}async enableRequestedPluginsWorker(r){z.assert(this.currentPluginEnablementPromise===void 0);let a=!1;await Promise.all(Yt(r,async([u,h])=>{const p=await Promise.all(h);if(u.isClosed()||dZ(u)){this.logger.info(`Cancelling plugin enabling for ${u.getProjectName()} as it is ${u.isClosed()?"closed":"deferred close"}`);return}a=!0;for(const m of p)this.endEnablePlugin(u,m);this.delayUpdateProjectGraph(u)})),this.currentPluginEnablementPromise=void 0,a&&this.sendProjectsUpdatedInBackgroundEvent()}configurePlugin(r){this.forEachEnabledProject(a=>a.onPluginConfigurationChanged(r.pluginName,r.configuration)),this.currentPluginConfigOverrides=this.currentPluginConfigOverrides||new Map,this.currentPluginConfigOverrides.set(r.pluginName,r.configuration)}getPackageJsonsVisibleToFile(r,a,u){const h=this.packageJsonCache,p=u&&this.toPath(u),m=[],C=b=>{switch(h.directoryHasPackageJson(b)){case 3:return h.searchDirectoryAndAncestors(b),C(b);case-1:const T=Hr(b,"package.json");this.watchPackageJsonFile(T,this.toPath(T),a);const E=h.getInDirectory(b);E&&m.push(E)}if(p&&p===b)return!0};return c0(rs(r),C),m}getNearestAncestorDirectoryWithPackageJson(r){return c0(r,a=>{switch(this.packageJsonCache.directoryHasPackageJson(a)){case-1:return a;case 0:return;case 3:return this.host.fileExists(Hr(a,"package.json"))?a:void 0}})}watchPackageJsonFile(r,a,u){z.assert(u!==void 0);let h=(this.packageJsonFilesMap??(this.packageJsonFilesMap=new Map)).get(a);if(!h){let p=this.watchFactory.watchFile(r,(m,C)=>{switch(C){case 0:case 1:this.packageJsonCache.addOrUpdate(m,a),this.onPackageJsonChange(h);break;case 2:this.packageJsonCache.delete(a),this.onPackageJsonChange(h),h.projects.clear(),h.close()}},250,this.hostConfiguration.watchOptions,tf.PackageJson);h={projects:new Set,close:()=>{var m;h.projects.size||!p||(p.close(),p=void 0,(m=this.packageJsonFilesMap)==null||m.delete(a),this.packageJsonCache.invalidate(a))}},this.packageJsonFilesMap.set(a,h)}h.projects.add(u),(u.packageJsonWatches??(u.packageJsonWatches=new Set)).add(h)}onPackageJsonChange(r){r.projects.forEach(a=>{var u;return(u=a.onPackageJsonChange)==null?void 0:u.call(a)})}includePackageJsonAutoImports(){switch(this.hostConfiguration.preferences.includePackageJsonAutoImports){case"on":return 1;case"off":return 0;default:return 2}}getIncompleteCompletionsCache(){return this.incompleteCompletionsCache||(this.incompleteCompletionsCache=DHt())}};ict.filenameEscapeRegexp=/[-/\\^$*+?.()|[\]{}]/g;var E3e=ict;function DHt(){let t;return{get(){return t},set(r){t=r},clear(){t=void 0}}}function I3e(t){return t.kind!==void 0}function N3e(t){t.print(!1,!1,!1)}function L3e(t){let r,a,u;const h={get(b,T,E,N){if(!(!a||u!==m(b,E,N)))return a.get(T)},set(b,T,E,N,R,F,j){if(p(b,E,N).set(T,C(R,F,j,!1)),j){for(const U of F)if(U.isInNodeModules){const q=U.path.substring(0,U.path.indexOf(nb)+nb.length-1),Q=t.toPath(q);r!=null&&r.has(Q)||(r||(r=new Map)).set(Q,t.watchNodeModulesForPackageJsonChanges(q))}}},setModulePaths(b,T,E,N,R){const F=p(b,E,N),j=F.get(T);j?j.modulePaths=R:F.set(T,C(void 0,R,void 0,void 0))},setBlockedByPackageJsonDependencies(b,T,E,N,R){const F=p(b,E,N),j=F.get(T);j?j.isBlockedByPackageJsonDependencies=R:F.set(T,C(void 0,void 0,void 0,R))},clear(){r==null||r.forEach(h0),a==null||a.clear(),r==null||r.clear(),u=void 0},count(){return a?a.size:0}};return z.isDebugging&&Object.defineProperty(h,"__cache",{get:()=>a}),h;function p(b,T,E){const N=m(b,T,E);return a&&u!==N&&h.clear(),u=N,a||(a=new Map)}function m(b,T,E){return`${b},${T.importModuleSpecifierEnding},${T.importModuleSpecifierPreference},${E.overrideImportMode}`}function C(b,T,E,N){return{kind:b,modulePaths:T,moduleSpecifiers:E,isBlockedByPackageJsonDependencies:N}}}function P3e(t){const r=new Map,a=new Map;return{addOrUpdate:u,invalidate:h,delete:m=>{r.delete(m),a.set(rs(m),!0)},getInDirectory:m=>r.get(t.toPath(Hr(m,"package.json")))||void 0,directoryHasPackageJson:m=>p(t.toPath(m)),searchDirectoryAndAncestors:m=>{c0(m,C=>{const b=t.toPath(C);if(p(b)!==3)return!0;const T=Hr(C,"package.json");xH(t,T)?u(T,Hr(b,"package.json")):a.set(b,!0)})}};function u(m,C){const b=z.checkDefined(Ide(m,t.host));r.set(C,b),a.delete(rs(C))}function h(m){r.delete(m),a.delete(rs(m))}function p(m){return r.has(Hr(m,"package.json"))?-1:a.has(m)?0:3}}var nct={isCancellationRequested:()=>!1,setRequest:()=>{},resetRequest:()=>{}};function EHt(t){const r=t[0],a=t[1];return(1e9*r+a)/1e6}function rct(t,r){if((X3(t)||lj(t))&&t.isJsOnlyProject()){const a=t.getScriptInfoForNormalizedPath(r);return a&&!a.isJavaScript()}return!1}function IHt(t){return fg(t)||!!t.emitDecoratorMetadata}function sct(t,r,a){const u=r.getScriptInfoForNormalizedPath(t);return{start:u.positionToLineOffset(a.start),end:u.positionToLineOffset(a.start+a.length),text:Jv(a.messageText,` +`),code:a.code,category:JE(a),reportsUnnecessary:a.reportsUnnecessary,reportsDeprecated:a.reportsDeprecated,source:a.source,relatedInformation:Yt(a.relatedInformation,r_e)}}function r_e(t){return t.file?{span:{start:Y3(Da(t.file,t.start)),end:Y3(Da(t.file,t.start+t.length)),file:t.file.fileName},message:Jv(t.messageText,` +`),category:JE(t),code:t.code}:{message:Jv(t.messageText,` +`),category:JE(t),code:t.code}}function Y3(t){return{line:t.line+1,offset:t.character+1}}function dj(t,r){const a=t.file&&Y3(Da(t.file,t.start)),u=t.file&&Y3(Da(t.file,t.start+t.length)),h=Jv(t.messageText,` +`),{code:p,source:m}=t,C=JE(t),b={start:a,end:u,text:h,code:p,category:C,reportsUnnecessary:t.reportsUnnecessary,reportsDeprecated:t.reportsDeprecated,source:m,relatedInformation:Yt(t.relatedInformation,r_e)};return r?{...b,fileName:t.file&&t.file.fileName}:b}function NHt(t,r){return t.every(a=>zu(a.span){this.immediateId=void 0,this.operationHost.executeWithRequestId(a,()=>this.executeAction(r))},t))}delay(t,r,a){const u=this.requestId;z.assert(u===this.operationHost.getCurrentRequestId(),"delay: incorrect request id"),this.setTimerHandle(this.operationHost.getServerHost().setTimeout(()=>{this.timerHandle=void 0,this.operationHost.executeWithRequestId(u,()=>this.executeAction(a))},r,t))}executeAction(t){var r,a,u,h,p,m;let C=!1;try{this.operationHost.isCancellationRequested()?(C=!0,(r=sr)==null||r.instant(sr.Phase.Session,"stepCanceled",{seq:this.requestId,early:!0})):((a=sr)==null||a.push(sr.Phase.Session,"stepAction",{seq:this.requestId}),t(this),(u=sr)==null||u.pop())}catch(b){(h=sr)==null||h.popAll(),C=!0,b instanceof UR?(p=sr)==null||p.instant(sr.Phase.Session,"stepCanceled",{seq:this.requestId}):((m=sr)==null||m.instant(sr.Phase.Session,"stepError",{seq:this.requestId,message:b.message}),this.operationHost.logError(b,`delayed processing of request ${this.requestId}`))}(C||!this.hasPendingWork())&&this.complete()}setTimerHandle(t){this.timerHandle!==void 0&&this.operationHost.getServerHost().clearTimeout(this.timerHandle),this.timerHandle=t}setImmediateId(t){this.immediateId!==void 0&&this.operationHost.getServerHost().clearImmediate(this.immediateId),this.immediateId=t}hasPendingWork(){return!!this.timerHandle||!!this.immediateId}};function O3e(t,r){return{seq:0,type:"event",event:t,body:r}}function PHt(t,r,a,u){const h=bd(Lo(a)?a:a.projects,p=>u(p,t));return!Lo(a)&&a.symLinkedProjects&&a.symLinkedProjects.forEach((p,m)=>{const C=r(m);h.push(...Ln(p,b=>u(b,C)))}),jt(h,XC)}function s_e(t){return fre(({textSpan:r})=>r.start+100003*r.length,hde(t))}function AHt(t,r,a,u,h,p,m){const C=act(t,r,a,!0,(E,N)=>E.getLanguageService().findRenameLocations(N.fileName,N.pos,u,h,p),(E,N)=>N(IF(E)));if(Lo(C))return C;const b=[],T=s_e(m);return C.forEach((E,N)=>{for(const R of E)!T.has(R)&&!o_e(IF(R),N)&&(b.push(R),T.add(R))}),b}function OHt(t,r,a){const u=t.getLanguageService().getDefinitionAtPosition(r.fileName,r.pos,!1,a),h=u&&lu(u);return h&&!h.isLocal?{fileName:h.fileName,pos:h.textSpan.start}:void 0}function MHt(t,r,a,u,h){var p,m;const C=act(t,r,a,!1,(N,R)=>(h.info(`Finding references to ${R.fileName} position ${R.pos} in project ${N.getProjectName()}`),N.getLanguageService().findReferences(R.fileName,R.pos)),(N,R)=>{R(IF(N.definition));for(const F of N.references)R(IF(F))});if(Lo(C))return C;const b=C.get(r);if(((m=(p=b==null?void 0:b[0])==null?void 0:p.references[0])==null?void 0:m.isDefinition)===void 0)C.forEach(N=>{for(const R of N)for(const F of R.references)delete F.isDefinition});else{const N=s_e(u);for(const F of b)for(const j of F.references)if(j.isDefinition){N.add(j);break}const R=new Set;for(;;){let F=!1;if(C.forEach((j,U)=>{if(R.has(U))return;U.getLanguageService().updateIsDefinitionOfReferencedSymbols(j,N)&&(R.add(U),F=!0)}),!F)break}C.forEach((F,j)=>{if(!R.has(j))for(const U of F)for(const q of U.references)q.isDefinition=!1})}const T=[],E=s_e(u);return C.forEach((N,R)=>{for(const F of N){const j=o_e(IF(F.definition),R),U=j===void 0?F.definition:{...F.definition,textSpan:Pf(j.pos,F.definition.textSpan.length),fileName:j.fileName,contextSpan:BHt(F.definition,R)};let q=Me(T,Q=>fde(Q.definition,U,u));q||(q={definition:U,references:[]},T.push(q));for(const Q of F.references)!E.has(Q)&&!o_e(IF(Q),R)&&(E.add(Q),q.references.push(Q))}}),T.filter(N=>N.references.length!==0)}function M3e(t,r,a){for(const u of Lo(t)?t:t.projects)a(u,r);!Lo(t)&&t.symLinkedProjects&&t.symLinkedProjects.forEach((u,h)=>{for(const p of u)a(p,h)})}function act(t,r,a,u,h,p){const m=new Map,C=_B();C.enqueue({project:r,location:a}),M3e(t,a.fileName,(U,q)=>{const Q={fileName:q,pos:a.pos};C.enqueue({project:U,location:Q})});const b=r.projectService,T=r.getCancellationToken(),E=OHt(r,a,u),N=l_(()=>r.isSourceOfProjectReferenceRedirect(E.fileName)?E:r.getLanguageService().getSourceMapper().tryGetGeneratedPosition(E)),R=l_(()=>r.isSourceOfProjectReferenceRedirect(E.fileName)?E:r.getLanguageService().getSourceMapper().tryGetSourcePosition(E)),F=new Set;e:for(;!C.isEmpty();){for(;!C.isEmpty();){if(T.isCancellationRequested())break e;const{project:U,location:q}=C.dequeue();if(m.has(U)||lct(U,q)||(im(U),!U.containsFile(Kc(q.fileName))))continue;const Q=j(U,q);m.set(U,Q??Ed),F.add(FHt(U))}E&&(b.loadAncestorProjectTree(F),b.forEachEnabledProject(U=>{if(T.isCancellationRequested()||m.has(U))return;const q=RHt(E,U,N,R);q&&C.enqueue({project:U,location:q})}))}if(m.size===1)return vT(m.values());return m;function j(U,q){const Q=h(U,q);if(Q){for(const re of Q)p(re,Y=>{const ue=b.getOriginalLocationEnsuringConfiguredProject(U,Y);if(!ue)return;const te=b.getScriptInfo(ue.fileName);for(const oe of te.containingProjects)!oe.isOrphan()&&!m.has(oe)&&C.enqueue({project:oe,location:ue});const Se=b.getSymlinkedProjects(te);Se&&Se.forEach((oe,pe)=>{for(const ye of oe)!ye.isOrphan()&&!m.has(ye)&&C.enqueue({project:ye,location:{fileName:pe,pos:ue.pos}})})});return Q}}}function RHt(t,r,a,u){if(r.containsFile(Kc(t.fileName))&&!lct(r,t))return t;const h=a();if(h&&r.containsFile(Kc(h.fileName)))return h;const p=u();return p&&r.containsFile(Kc(p.fileName))?p:void 0}function lct(t,r){if(!r)return!1;const a=t.getLanguageService().getProgram();if(!a)return!1;const u=a.getSourceFile(r.fileName);return!!u&&u.resolvedPath!==u.path&&u.resolvedPath!==t.toPath(r.fileName)}function FHt(t){return TS(t)?t.canonicalConfigFilePath:t.getProjectName()}function IF({fileName:t,textSpan:r}){return{fileName:t,pos:r.start}}function o_e(t,r){return aF(t,r.getSourceMapper(),a=>r.projectService.fileExists(a))}function cct(t,r){return ZQ(t,r.getSourceMapper(),a=>r.projectService.fileExists(a))}function BHt(t,r){return pde(t,r.getSourceMapper(),a=>r.projectService.fileExists(a))}var uct=["openExternalProject","openExternalProjects","closeExternalProject","synchronizeProjectList","emit-output","compileOnSaveAffectedFileList","compileOnSaveEmitFile","compilerOptionsDiagnostics-full","encodedSemanticClassifications-full","semanticDiagnosticsSync","suggestionDiagnosticsSync","geterrForProject","reload","reloadProjects","getCodeFixes","getCodeFixes-full","getCombinedCodeFix","getCombinedCodeFix-full","applyCodeActionCommand","getSupportedCodeFixes","getApplicableRefactors","getMoveToRefactoringFileSuggestions","getEditsForRefactor","getEditsForRefactor-full","organizeImports","organizeImports-full","getEditsForFileRename","getEditsForFileRename-full","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","getPasteEdits"],WHt=[...uct,"definition","definition-full","definitionAndBoundSpan","definitionAndBoundSpan-full","typeDefinition","implementation","implementation-full","references","references-full","rename","renameLocations-full","rename-full","quickinfo","quickinfo-full","completionInfo","completions","completions-full","completionEntryDetails","completionEntryDetails-full","signatureHelp","signatureHelp-full","navto","navto-full","documentHighlights","documentHighlights-full"],dct=class w0e{constructor(r){this.changeSeq=0,this.handlers=new Map(Object.entries({status:()=>{const p={version:y};return this.requiredResponse(p)},openExternalProject:p=>(this.projectService.openExternalProject(p.arguments,!0),this.requiredResponse(!0)),openExternalProjects:p=>(this.projectService.openExternalProjects(p.arguments.projects),this.requiredResponse(!0)),closeExternalProject:p=>(this.projectService.closeExternalProject(p.arguments.projectFileName,!0),this.requiredResponse(!0)),synchronizeProjectList:p=>{const m=this.projectService.synchronizeProjectList(p.arguments.knownProjects,p.arguments.includeProjectReferenceRedirectInfo);if(!m.some(b=>b.projectErrors&&b.projectErrors.length!==0))return this.requiredResponse(m);const C=Yt(m,b=>!b.projectErrors||b.projectErrors.length===0?b:{info:b.info,changes:b.changes,files:b.files,projectErrors:this.convertToDiagnosticsWithLinePosition(b.projectErrors,void 0)});return this.requiredResponse(C)},updateOpen:p=>(this.changeSeq++,this.projectService.applyChangesInOpenFiles(p.arguments.openFiles&&na(p.arguments.openFiles,m=>({fileName:m.file,content:m.fileContent,scriptKind:m.scriptKindName,projectRootPath:m.projectRootPath})),p.arguments.changedFiles&&na(p.arguments.changedFiles,m=>({fileName:m.fileName,changes:fh(Mh(m.textChanges),C=>{const b=z.checkDefined(this.projectService.getScriptInfo(m.fileName)),T=b.lineOffsetToPosition(C.start.line,C.start.offset),E=b.lineOffsetToPosition(C.end.line,C.end.offset);return T>=0?{span:{start:T,length:E-T},newText:C.newText}:void 0})})),p.arguments.closedFiles),this.requiredResponse(!0)),applyChangedToOpenFiles:p=>(this.changeSeq++,this.projectService.applyChangesInOpenFiles(p.arguments.openFiles,p.arguments.changedFiles&&na(p.arguments.changedFiles,m=>({fileName:m.fileName,changes:Mh(m.changes)})),p.arguments.closedFiles),this.requiredResponse(!0)),exit:()=>(this.exit(),this.notRequired()),definition:p=>this.requiredResponse(this.getDefinition(p.arguments,!0)),"definition-full":p=>this.requiredResponse(this.getDefinition(p.arguments,!1)),definitionAndBoundSpan:p=>this.requiredResponse(this.getDefinitionAndBoundSpan(p.arguments,!0)),"definitionAndBoundSpan-full":p=>this.requiredResponse(this.getDefinitionAndBoundSpan(p.arguments,!1)),findSourceDefinition:p=>this.requiredResponse(this.findSourceDefinition(p.arguments)),"emit-output":p=>this.requiredResponse(this.getEmitOutput(p.arguments)),typeDefinition:p=>this.requiredResponse(this.getTypeDefinition(p.arguments)),implementation:p=>this.requiredResponse(this.getImplementation(p.arguments,!0)),"implementation-full":p=>this.requiredResponse(this.getImplementation(p.arguments,!1)),references:p=>this.requiredResponse(this.getReferences(p.arguments,!0)),"references-full":p=>this.requiredResponse(this.getReferences(p.arguments,!1)),rename:p=>this.requiredResponse(this.getRenameLocations(p.arguments,!0)),"renameLocations-full":p=>this.requiredResponse(this.getRenameLocations(p.arguments,!1)),"rename-full":p=>this.requiredResponse(this.getRenameInfo(p.arguments)),open:p=>(this.openClientFile(Kc(p.arguments.file),p.arguments.fileContent,Zhe(p.arguments.scriptKindName),p.arguments.projectRootPath?Kc(p.arguments.projectRootPath):void 0),this.notRequired()),quickinfo:p=>this.requiredResponse(this.getQuickInfoWorker(p.arguments,!0)),"quickinfo-full":p=>this.requiredResponse(this.getQuickInfoWorker(p.arguments,!1)),getOutliningSpans:p=>this.requiredResponse(this.getOutliningSpans(p.arguments,!0)),outliningSpans:p=>this.requiredResponse(this.getOutliningSpans(p.arguments,!1)),todoComments:p=>this.requiredResponse(this.getTodoComments(p.arguments)),indentation:p=>this.requiredResponse(this.getIndentation(p.arguments)),nameOrDottedNameSpan:p=>this.requiredResponse(this.getNameOrDottedNameSpan(p.arguments)),breakpointStatement:p=>this.requiredResponse(this.getBreakpointStatement(p.arguments)),braceCompletion:p=>this.requiredResponse(this.isValidBraceCompletion(p.arguments)),docCommentTemplate:p=>this.requiredResponse(this.getDocCommentTemplate(p.arguments)),getSpanOfEnclosingComment:p=>this.requiredResponse(this.getSpanOfEnclosingComment(p.arguments)),fileReferences:p=>this.requiredResponse(this.getFileReferences(p.arguments,!0)),"fileReferences-full":p=>this.requiredResponse(this.getFileReferences(p.arguments,!1)),format:p=>this.requiredResponse(this.getFormattingEditsForRange(p.arguments)),formatonkey:p=>this.requiredResponse(this.getFormattingEditsAfterKeystroke(p.arguments)),"format-full":p=>this.requiredResponse(this.getFormattingEditsForDocumentFull(p.arguments)),"formatonkey-full":p=>this.requiredResponse(this.getFormattingEditsAfterKeystrokeFull(p.arguments)),"formatRange-full":p=>this.requiredResponse(this.getFormattingEditsForRangeFull(p.arguments)),completionInfo:p=>this.requiredResponse(this.getCompletions(p.arguments,"completionInfo")),completions:p=>this.requiredResponse(this.getCompletions(p.arguments,"completions")),"completions-full":p=>this.requiredResponse(this.getCompletions(p.arguments,"completions-full")),completionEntryDetails:p=>this.requiredResponse(this.getCompletionEntryDetails(p.arguments,!1)),"completionEntryDetails-full":p=>this.requiredResponse(this.getCompletionEntryDetails(p.arguments,!0)),compileOnSaveAffectedFileList:p=>this.requiredResponse(this.getCompileOnSaveAffectedFileList(p.arguments)),compileOnSaveEmitFile:p=>this.requiredResponse(this.emitFile(p.arguments)),signatureHelp:p=>this.requiredResponse(this.getSignatureHelpItems(p.arguments,!0)),"signatureHelp-full":p=>this.requiredResponse(this.getSignatureHelpItems(p.arguments,!1)),"compilerOptionsDiagnostics-full":p=>this.requiredResponse(this.getCompilerOptionsDiagnostics(p.arguments)),"encodedSyntacticClassifications-full":p=>this.requiredResponse(this.getEncodedSyntacticClassifications(p.arguments)),"encodedSemanticClassifications-full":p=>this.requiredResponse(this.getEncodedSemanticClassifications(p.arguments)),cleanup:()=>(this.cleanup(),this.requiredResponse(!0)),semanticDiagnosticsSync:p=>this.requiredResponse(this.getSemanticDiagnosticsSync(p.arguments)),syntacticDiagnosticsSync:p=>this.requiredResponse(this.getSyntacticDiagnosticsSync(p.arguments)),suggestionDiagnosticsSync:p=>this.requiredResponse(this.getSuggestionDiagnosticsSync(p.arguments)),geterr:p=>(this.errorCheck.startNew(m=>this.getDiagnostics(m,p.arguments.delay,p.arguments.files)),this.notRequired()),geterrForProject:p=>(this.errorCheck.startNew(m=>this.getDiagnosticsForProject(m,p.arguments.delay,p.arguments.file)),this.notRequired()),change:p=>(this.change(p.arguments),this.notRequired()),configure:p=>(this.projectService.setHostConfiguration(p.arguments),this.doOutput(void 0,"configure",p.seq,!0),this.notRequired()),reload:p=>(this.reload(p.arguments,p.seq),this.requiredResponse({reloadFinished:!0})),saveto:p=>{const m=p.arguments;return this.saveToTmp(m.file,m.tmpfile),this.notRequired()},close:p=>{const m=p.arguments;return this.closeClientFile(m.file),this.notRequired()},navto:p=>this.requiredResponse(this.getNavigateToItems(p.arguments,!0)),"navto-full":p=>this.requiredResponse(this.getNavigateToItems(p.arguments,!1)),brace:p=>this.requiredResponse(this.getBraceMatching(p.arguments,!0)),"brace-full":p=>this.requiredResponse(this.getBraceMatching(p.arguments,!1)),navbar:p=>this.requiredResponse(this.getNavigationBarItems(p.arguments,!0)),"navbar-full":p=>this.requiredResponse(this.getNavigationBarItems(p.arguments,!1)),navtree:p=>this.requiredResponse(this.getNavigationTree(p.arguments,!0)),"navtree-full":p=>this.requiredResponse(this.getNavigationTree(p.arguments,!1)),documentHighlights:p=>this.requiredResponse(this.getDocumentHighlights(p.arguments,!0)),"documentHighlights-full":p=>this.requiredResponse(this.getDocumentHighlights(p.arguments,!1)),compilerOptionsForInferredProjects:p=>(this.setCompilerOptionsForInferredProjects(p.arguments),this.requiredResponse(!0)),projectInfo:p=>this.requiredResponse(this.getProjectInfo(p.arguments)),reloadProjects:()=>(this.projectService.reloadProjects(),this.notRequired()),jsxClosingTag:p=>this.requiredResponse(this.getJsxClosingTag(p.arguments)),linkedEditingRange:p=>this.requiredResponse(this.getLinkedEditingRange(p.arguments)),getCodeFixes:p=>this.requiredResponse(this.getCodeFixes(p.arguments,!0)),"getCodeFixes-full":p=>this.requiredResponse(this.getCodeFixes(p.arguments,!1)),getCombinedCodeFix:p=>this.requiredResponse(this.getCombinedCodeFix(p.arguments,!0)),"getCombinedCodeFix-full":p=>this.requiredResponse(this.getCombinedCodeFix(p.arguments,!1)),applyCodeActionCommand:p=>this.requiredResponse(this.applyCodeActionCommand(p.arguments)),getSupportedCodeFixes:p=>this.requiredResponse(this.getSupportedCodeFixes(p.arguments)),getApplicableRefactors:p=>this.requiredResponse(this.getApplicableRefactors(p.arguments)),getEditsForRefactor:p=>this.requiredResponse(this.getEditsForRefactor(p.arguments,!0)),getMoveToRefactoringFileSuggestions:p=>this.requiredResponse(this.getMoveToRefactoringFileSuggestions(p.arguments)),getPasteEdits:p=>this.requiredResponse(this.getPasteEdits(p.arguments)),"getEditsForRefactor-full":p=>this.requiredResponse(this.getEditsForRefactor(p.arguments,!1)),organizeImports:p=>this.requiredResponse(this.organizeImports(p.arguments,!0)),"organizeImports-full":p=>this.requiredResponse(this.organizeImports(p.arguments,!1)),getEditsForFileRename:p=>this.requiredResponse(this.getEditsForFileRename(p.arguments,!0)),"getEditsForFileRename-full":p=>this.requiredResponse(this.getEditsForFileRename(p.arguments,!1)),configurePlugin:p=>(this.configurePlugin(p.arguments),this.doOutput(void 0,"configurePlugin",p.seq,!0),this.notRequired()),selectionRange:p=>this.requiredResponse(this.getSmartSelectionRange(p.arguments,!0)),"selectionRange-full":p=>this.requiredResponse(this.getSmartSelectionRange(p.arguments,!1)),prepareCallHierarchy:p=>this.requiredResponse(this.prepareCallHierarchy(p.arguments)),provideCallHierarchyIncomingCalls:p=>this.requiredResponse(this.provideCallHierarchyIncomingCalls(p.arguments)),provideCallHierarchyOutgoingCalls:p=>this.requiredResponse(this.provideCallHierarchyOutgoingCalls(p.arguments)),toggleLineComment:p=>this.requiredResponse(this.toggleLineComment(p.arguments,!0)),"toggleLineComment-full":p=>this.requiredResponse(this.toggleLineComment(p.arguments,!1)),toggleMultilineComment:p=>this.requiredResponse(this.toggleMultilineComment(p.arguments,!0)),"toggleMultilineComment-full":p=>this.requiredResponse(this.toggleMultilineComment(p.arguments,!1)),commentSelection:p=>this.requiredResponse(this.commentSelection(p.arguments,!0)),"commentSelection-full":p=>this.requiredResponse(this.commentSelection(p.arguments,!1)),uncommentSelection:p=>this.requiredResponse(this.uncommentSelection(p.arguments,!0)),"uncommentSelection-full":p=>this.requiredResponse(this.uncommentSelection(p.arguments,!1)),provideInlayHints:p=>this.requiredResponse(this.provideInlayHints(p.arguments)),mapCode:p=>this.requiredResponse(this.mapCode(p.arguments))})),this.host=r.host,this.cancellationToken=r.cancellationToken,this.typingsInstaller=r.typingsInstaller||Bhe,this.byteLength=r.byteLength,this.hrtime=r.hrtime,this.logger=r.logger,this.canUseEvents=r.canUseEvents,this.suppressDiagnosticEvents=r.suppressDiagnosticEvents,this.noGetErrOnBackgroundUpdate=r.noGetErrOnBackgroundUpdate;const{throttleWaitMilliseconds:a}=r;this.eventHandler=this.canUseEvents?r.eventHandler||(p=>this.defaultEventHandler(p)):void 0;const u={executeWithRequestId:(p,m)=>this.executeWithRequestId(p,m),getCurrentRequestId:()=>this.currentRequestId,getServerHost:()=>this.host,logError:(p,m)=>this.logError(p,m),sendRequestCompletedEvent:p=>this.sendRequestCompletedEvent(p),isCancellationRequested:()=>this.cancellationToken.isCancellationRequested()};this.errorCheck=new LHt(u);const h={host:this.host,logger:this.logger,cancellationToken:this.cancellationToken,useSingleInferredProject:r.useSingleInferredProject,useInferredProjectPerProjectRoot:r.useInferredProjectPerProjectRoot,typingsInstaller:this.typingsInstaller,throttleWaitMilliseconds:a,eventHandler:this.eventHandler,suppressDiagnosticEvents:this.suppressDiagnosticEvents,globalPlugins:r.globalPlugins,pluginProbeLocations:r.pluginProbeLocations,allowLocalPluginLoads:r.allowLocalPluginLoads,typesMapLocation:r.typesMapLocation,serverMode:r.serverMode,session:this,canUseWatchEvents:r.canUseWatchEvents,incrementalVerifier:r.incrementalVerifier};switch(this.projectService=new E3e(h),this.projectService.setPerformanceEventHandler(this.performanceEventHandler.bind(this)),this.gcTimer=new i3e(this.host,7e3,this.logger),this.projectService.serverMode){case 0:break;case 1:uct.forEach(p=>this.handlers.set(p,m=>{throw new Error(`Request: ${m.command} not allowed in LanguageServiceMode.PartialSemantic`)}));break;case 2:WHt.forEach(p=>this.handlers.set(p,m=>{throw new Error(`Request: ${m.command} not allowed in LanguageServiceMode.Syntactic`)}));break;default:z.assertNever(this.projectService.serverMode)}}sendRequestCompletedEvent(r){this.event({request_seq:r},"requestCompleted")}addPerformanceData(r,a){this.performanceData||(this.performanceData={}),this.performanceData[r]=(this.performanceData[r]??0)+a}performanceEventHandler(r){switch(r.kind){case"UpdateGraph":this.addPerformanceData("updateGraphDurationMs",r.durationMs);break;case"CreatePackageJsonAutoImportProvider":this.addPerformanceData("createAutoImportProviderProgramDurationMs",r.durationMs);break}}defaultEventHandler(r){switch(r.eventName){case fZ:this.projectsUpdatedInBackgroundEvent(r.data.openFiles);break;case jhe:this.event({projectName:r.data.project.getProjectName(),reason:r.data.reason},r.eventName);break;case zhe:this.event({projectName:r.data.project.getProjectName()},r.eventName);break;case Uhe:case Ghe:case Khe:case Qhe:this.event(r.data,r.eventName);break;case qhe:this.event({triggerFile:r.data.triggerFile,configFile:r.data.configFileName,diagnostics:Yt(r.data.diagnostics,a=>dj(a,!0))},r.eventName);break;case $he:{this.event({projectName:r.data.project.getProjectName(),languageServiceEnabled:r.data.languageServiceEnabled},r.eventName);break}case Jhe:{this.event({telemetryEventName:r.eventName,payload:r.data},"telemetry");break}}}projectsUpdatedInBackgroundEvent(r){this.projectService.logger.info(`got projects updated in background ${r}`),r.length&&(!this.suppressDiagnosticEvents&&!this.noGetErrOnBackgroundUpdate&&(this.projectService.logger.info(`Queueing diagnostics update for ${r}`),this.errorCheck.startNew(a=>this.updateErrorCheck(a,r,100,!0))),this.event({openFiles:r},fZ))}logError(r,a){this.logErrorWorker(r,a)}logErrorWorker(r,a,u){let h="Exception on executing command "+a;if(r.message&&(h+=`: +`+tF(r.message),r.stack&&(h+=` +`+tF(r.stack))),this.logger.hasLevel(3)){if(u)try{const{file:p,project:m}=this.getFileAndProject(u),C=m.getScriptInfoForNormalizedPath(p);if(C){const b=GP(C.getSnapshot());h+=` + +File text of ${u.file}:${tF(b)} +`}}catch{}if(r.ProgramFiles){h+=` + +Program files: ${JSON.stringify(r.ProgramFiles)} +`,h+=` + +Projects:: +`;let p=0;const m=C=>{h+=` +Project '${C.projectName}' (${oj[C.projectKind]}) ${p} +`,h+=C.filesToString(!0),h+=` +----------------------------------------------- +`,p++};this.projectService.externalProjects.forEach(m),this.projectService.configuredProjects.forEach(m),this.projectService.inferredProjects.forEach(m)}}this.logger.msg(h,"Err")}send(r){if(r.type==="event"&&!this.canUseEvents){this.logger.hasLevel(3)&&this.logger.info(`Session does not support events: ignored event: ${i2(r)}`);return}this.writeMessage(r)}writeMessage(r){var a;const u=A3e(r,this.logger,this.byteLength,this.host.newLine);(a=c_)==null||a.logEvent(`Response message size: ${u.length}`),this.host.write(u)}event(r,a){this.send(O3e(a,r))}doOutput(r,a,u,h,p){const m={seq:0,type:"response",command:a,request_seq:u,success:h,performanceData:this.performanceData};if(h){let C;if(Lo(r))m.body=r,C=r.metadata,delete r.metadata;else if(typeof r=="object")if(r.metadata){const{metadata:b,...T}=r;m.body=T,C=b}else m.body=r;else m.body=r;C&&(m.metadata=C)}else z.assert(r===void 0);p&&(m.message=p),this.send(m)}semanticCheck(r,a){var u,h;(u=sr)==null||u.push(sr.Phase.Session,"semanticCheck",{file:r,configFilePath:a.canonicalConfigFilePath});const p=rct(a,r)?Ed:a.getLanguageService().getSemanticDiagnostics(r).filter(m=>!!m.file);this.sendDiagnosticsEvent(r,a,p,"semanticDiag"),(h=sr)==null||h.pop()}syntacticCheck(r,a){var u,h;(u=sr)==null||u.push(sr.Phase.Session,"syntacticCheck",{file:r,configFilePath:a.canonicalConfigFilePath}),this.sendDiagnosticsEvent(r,a,a.getLanguageService().getSyntacticDiagnostics(r),"syntaxDiag"),(h=sr)==null||h.pop()}suggestionCheck(r,a){var u,h;(u=sr)==null||u.push(sr.Phase.Session,"suggestionCheck",{file:r,configFilePath:a.canonicalConfigFilePath}),this.sendDiagnosticsEvent(r,a,a.getLanguageService().getSuggestionDiagnostics(r),"suggestionDiag"),(h=sr)==null||h.pop()}sendDiagnosticsEvent(r,a,u,h){try{this.event({file:r,diagnostics:u.map(p=>sct(r,a,p))},h)}catch(p){this.logError(p,h)}}updateErrorCheck(r,a,u,h=!0){z.assert(!this.suppressDiagnosticEvents);const p=this.changeSeq,m=Math.min(u,200);let C=0;const b=()=>{C++,a.length>C&&r.delay("checkOne",m,T)},T=()=>{if(this.changeSeq!==p)return;let E=a[C];if(mo(E)&&(E=this.toPendingErrorCheck(E),!E)){b();return}const{fileName:N,project:R}=E;if(im(R),!!R.containsFile(N,h)&&(this.syntacticCheck(N,R),this.changeSeq===p)){if(R.projectService.serverMode!==0){b();return}r.immediate("semanticCheck",()=>{if(this.semanticCheck(N,R),this.changeSeq===p){if(this.getPreferences(N).disableSuggestions){b();return}r.immediate("suggestionCheck",()=>{this.suggestionCheck(N,R),b()})}})}};a.length>C&&this.changeSeq===p&&r.delay("checkOne",u,T)}cleanProjects(r,a){if(a){this.logger.info(`cleaning ${r}`);for(const u of a)u.getLanguageService(!1).cleanupSemanticCache(),u.cleanupProgram()}}cleanup(){this.cleanProjects("inferred projects",this.projectService.inferredProjects),this.cleanProjects("configured projects",Fn(this.projectService.configuredProjects.values())),this.cleanProjects("external projects",this.projectService.externalProjects),this.host.gc&&(this.logger.info("host.gc()"),this.host.gc())}getEncodedSyntacticClassifications(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r);return u.getEncodedSyntacticClassifications(a,r)}getEncodedSemanticClassifications(r){const{file:a,project:u}=this.getFileAndProject(r),h=r.format==="2020"?"2020":"original";return u.getLanguageService().getEncodedSemanticClassifications(a,r,h)}getProject(r){return r===void 0?void 0:this.projectService.findProject(r)}getConfigFileAndProject(r){const a=this.getProject(r.projectFileName),u=Kc(r.file);return{configFile:a&&a.hasConfigFile(u)?u:void 0,project:a}}getConfigFileDiagnostics(r,a,u){const h=a.getAllProjectErrors(),p=a.getLanguageService().getCompilerOptionsDiagnostics(),m=Ri(no(h,p),C=>!!C.file&&C.file.fileName===r);return u?this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(m):Yt(m,C=>dj(C,!1))}convertToDiagnosticsWithLinePositionFromDiagnosticFile(r){return r.map(a=>({message:Jv(a.messageText,this.host.newLine),start:a.start,length:a.length,category:JE(a),code:a.code,source:a.source,startLocation:a.file&&Y3(Da(a.file,a.start)),endLocation:a.file&&Y3(Da(a.file,a.start+a.length)),reportsUnnecessary:a.reportsUnnecessary,reportsDeprecated:a.reportsDeprecated,relatedInformation:Yt(a.relatedInformation,r_e)}))}getCompilerOptionsDiagnostics(r){const a=this.getProject(r.projectFileName);return this.convertToDiagnosticsWithLinePosition(Ri(a.getLanguageService().getCompilerOptionsDiagnostics(),u=>!u.file),void 0)}convertToDiagnosticsWithLinePosition(r,a){return r.map(u=>({message:Jv(u.messageText,this.host.newLine),start:u.start,length:u.length,category:JE(u),code:u.code,source:u.source,startLocation:a&&a.positionToLineOffset(u.start),endLocation:a&&a.positionToLineOffset(u.start+u.length),reportsUnnecessary:u.reportsUnnecessary,reportsDeprecated:u.reportsDeprecated,relatedInformation:Yt(u.relatedInformation,r_e)}))}getDiagnosticsWorker(r,a,u,h){const{project:p,file:m}=this.getFileAndProject(r);if(a&&rct(p,m))return Ed;const C=p.getScriptInfoForNormalizedPath(m),b=u(p,m);return h?this.convertToDiagnosticsWithLinePosition(b,C):b.map(T=>sct(m,p,T))}getDefinition(r,a){const{file:u,project:h}=this.getFileAndProject(r),p=this.getPositionInFile(r,u),m=this.mapDefinitionInfoLocations(h.getLanguageService().getDefinitionAtPosition(u,p)||Ed,h);return a?this.mapDefinitionInfo(m,h):m.map(w0e.mapToOriginalLocation)}mapDefinitionInfoLocations(r,a){return r.map(u=>{const h=cct(u,a);return h?{...h,containerKind:u.containerKind,containerName:u.containerName,kind:u.kind,name:u.name,failedAliasResolution:u.failedAliasResolution,...u.unverified&&{unverified:u.unverified}}:u})}getDefinitionAndBoundSpan(r,a){const{file:u,project:h}=this.getFileAndProject(r),p=this.getPositionInFile(r,u),m=z.checkDefined(h.getScriptInfo(u)),C=h.getLanguageService().getDefinitionAndBoundSpan(u,p);if(!C||!C.definitions)return{definitions:Ed,textSpan:void 0};const b=this.mapDefinitionInfoLocations(C.definitions,h),{textSpan:T}=C;return a?{definitions:this.mapDefinitionInfo(b,h),textSpan:q1(T,m)}:{definitions:b.map(w0e.mapToOriginalLocation),textSpan:T}}findSourceDefinition(r){var a;const{file:u,project:h}=this.getFileAndProject(r),p=this.getPositionInFile(r,u),m=h.getLanguageService().getDefinitionAtPosition(u,p);let C=this.mapDefinitionInfoLocations(m||Ed,h).slice();if(this.projectService.serverMode===0&&(!Rt(C,F=>Kc(F.fileName)!==u&&!F.isAmbient)||Rt(C,F=>!!F.failedAliasResolution))){const F=fre(Q=>Q.textSpan.start,hde(this.host.useCaseSensitiveFileNames));C==null||C.forEach(Q=>F.add(Q));const j=h.getNoDtsResolutionProject(u),U=j.getLanguageService(),q=(a=U.getDefinitionAtPosition(u,p,!0,!1))==null?void 0:a.filter(Q=>Kc(Q.fileName)!==u);if(Rt(q))for(const Q of q){if(Q.unverified){const re=N(Q,h.getLanguageService().getProgram(),U.getProgram());if(Rt(re)){for(const Y of re)F.add(Y);continue}}F.add(Q)}else{const Q=C.filter(re=>Kc(re.fileName)!==u&&re.isAmbient);for(const re of Rt(Q)?Q:E()){const Y=T(re.fileName,u,j);if(!Y)continue;const ue=this.projectService.getOrCreateScriptInfoNotOpenedByClient(Y,j.currentDirectory,j.directoryStructureHost,!1);if(!ue)continue;j.containsScriptInfo(ue)||(j.addRoot(ue),j.updateGraph());const te=U.getProgram(),Se=z.checkDefined(te.getSourceFile(Y));for(const oe of R(re.name,Se,te))F.add(oe)}}C=Fn(F.values())}return C=C.filter(F=>!F.isAmbient&&!F.failedAliasResolution),this.mapDefinitionInfo(C,h);function T(F,j,U){var q,Q,re;const Y=SG(F);if(Y&&F.lastIndexOf(nb)===Y.topLevelNodeModulesIndex){const ue=F.substring(0,Y.packageRootIndex),te=(q=h.getModuleResolutionCache())==null?void 0:q.getPackageJsonInfoCache(),Se=h.getCompilationSettings(),oe=R7(bo(ue+"/package.json",h.getCurrentDirectory()),M7(te,h,Se));if(!oe)return;const pe=Ble(oe,{moduleResolution:2},h,h.getModuleResolutionCache()),ye=F.substring(Y.topLevelPackageNameIndex+1,Y.packageRootIndex),be=F7(RV(ye)),_e=h.toPath(F);if(pe&&Rt(pe,ve=>h.toPath(ve)===_e))return(Q=U.resolutionCache.resolveSingleModuleNameWithoutWatching(be,j).resolvedModule)==null?void 0:Q.resolvedFileName;{const ve=F.substring(Y.packageRootIndex+1),Ee=`${be}/${h_(ve)}`;return(re=U.resolutionCache.resolveSingleModuleNameWithoutWatching(Ee,j).resolvedModule)==null?void 0:re.resolvedFileName}}}function E(){const F=h.getLanguageService(),j=F.getProgram(),U=j_(j.getSourceFile(u),p);return(Ml(U)||lt(U))&&Sc(U.parent)&&cke(U,q=>{var Q;if(q===U)return;const re=(Q=F.getDefinitionAtPosition(u,q.getStart(),!0,!1))==null?void 0:Q.filter(Y=>Kc(Y.fileName)!==u&&Y.isAmbient).map(Y=>({fileName:Y.fileName,name:Im(U)}));if(Rt(re))return re})||Ed}function N(F,j,U){var q;const Q=U.getSourceFile(F.fileName);if(!Q)return;const re=j_(j.getSourceFile(u),p),Y=j.getTypeChecker().getSymbolAtLocation(re),ue=Y&&Jc(Y,276);if(!ue)return;const te=((q=ue.propertyName)==null?void 0:q.text)||ue.name.text;return R(te,Q,U)}function R(F,j,U){const q=xc.Core.getTopMostDeclarationNamesInFile(F,j);return ns(q,Q=>{const re=U.getTypeChecker().getSymbolAtLocation(Q),Y=D8(Q);if(re&&Y)return G3.createDefinitionInfo(Y,U.getTypeChecker(),re,Y,!0)})}}getEmitOutput(r){const{file:a,project:u}=this.getFileAndProject(r);if(!u.shouldEmitFile(u.getScriptInfo(a)))return{emitSkipped:!0,outputFiles:[],diagnostics:[]};const h=u.getLanguageService().getEmitOutput(a);return r.richResponse?{...h,diagnostics:r.includeLinePosition?this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(h.diagnostics):h.diagnostics.map(p=>dj(p,!0))}:h}mapJSDocTagInfo(r,a,u){return r?r.map(h=>{var p;return{...h,text:u?this.mapDisplayParts(h.text,a):(p=h.text)==null?void 0:p.map(m=>m.text).join("")}}):[]}mapDisplayParts(r,a){return r?r.map(u=>u.kind!=="linkName"?u:{...u,target:this.toFileSpan(u.target.fileName,u.target.textSpan,a)}):[]}mapSignatureHelpItems(r,a,u){return r.map(h=>({...h,documentation:this.mapDisplayParts(h.documentation,a),parameters:h.parameters.map(p=>({...p,documentation:this.mapDisplayParts(p.documentation,a)})),tags:this.mapJSDocTagInfo(h.tags,a,u)}))}mapDefinitionInfo(r,a){return r.map(u=>({...this.toFileSpanWithContext(u.fileName,u.textSpan,u.contextSpan,a),...u.unverified&&{unverified:u.unverified}}))}static mapToOriginalLocation(r){return r.originalFileName?(z.assert(r.originalTextSpan!==void 0,"originalTextSpan should be present if originalFileName is"),{...r,fileName:r.originalFileName,textSpan:r.originalTextSpan,targetFileName:r.fileName,targetTextSpan:r.textSpan,contextSpan:r.originalContextSpan,targetContextSpan:r.contextSpan}):r}toFileSpan(r,a,u){const h=u.getLanguageService(),p=h.toLineColumnOffset(r,a.start),m=h.toLineColumnOffset(r,zu(a));return{file:r,start:{line:p.line+1,offset:p.character+1},end:{line:m.line+1,offset:m.character+1}}}toFileSpanWithContext(r,a,u,h){const p=this.toFileSpan(r,a,h),m=u&&this.toFileSpan(r,u,h);return m?{...p,contextStart:m.start,contextEnd:m.end}:p}getTypeDefinition(r){const{file:a,project:u}=this.getFileAndProject(r),h=this.getPositionInFile(r,a),p=this.mapDefinitionInfoLocations(u.getLanguageService().getTypeDefinitionAtPosition(a,h)||Ed,u);return this.mapDefinitionInfo(p,u)}mapImplementationLocations(r,a){return r.map(u=>{const h=cct(u,a);return h?{...h,kind:u.kind,displayParts:u.displayParts}:u})}getImplementation(r,a){const{file:u,project:h}=this.getFileAndProject(r),p=this.getPositionInFile(r,u),m=this.mapImplementationLocations(h.getLanguageService().getImplementationAtPosition(u,p)||Ed,h);return a?m.map(({fileName:C,textSpan:b,contextSpan:T})=>this.toFileSpanWithContext(C,b,T,h)):m.map(w0e.mapToOriginalLocation)}getSyntacticDiagnosticsSync(r){const{configFile:a}=this.getConfigFileAndProject(r);return a?Ed:this.getDiagnosticsWorker(r,!1,(u,h)=>u.getLanguageService().getSyntacticDiagnostics(h),!!r.includeLinePosition)}getSemanticDiagnosticsSync(r){const{configFile:a,project:u}=this.getConfigFileAndProject(r);return a?this.getConfigFileDiagnostics(a,u,!!r.includeLinePosition):this.getDiagnosticsWorker(r,!0,(h,p)=>h.getLanguageService().getSemanticDiagnostics(p).filter(m=>!!m.file),!!r.includeLinePosition)}getSuggestionDiagnosticsSync(r){const{configFile:a}=this.getConfigFileAndProject(r);return a?Ed:this.getDiagnosticsWorker(r,!0,(u,h)=>u.getLanguageService().getSuggestionDiagnostics(h),!!r.includeLinePosition)}getJsxClosingTag(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=this.getPositionInFile(r,a),p=u.getJsxClosingTagAtPosition(a,h);return p===void 0?void 0:{newText:p.newText,caretOffset:0}}getLinkedEditingRange(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=this.getPositionInFile(r,a),p=u.getLinkedEditingRangeAtPosition(a,h),m=this.projectService.getScriptInfoForNormalizedPath(a);if(!(m===void 0||p===void 0))return HHt(p,m)}getDocumentHighlights(r,a){const{file:u,project:h}=this.getFileAndProject(r),p=this.getPositionInFile(r,u),m=h.getLanguageService().getDocumentHighlights(u,p,r.filesToSearch);return m?a?m.map(({fileName:C,highlightSpans:b})=>{const T=h.getScriptInfo(C);return{file:C,highlightSpans:b.map(({textSpan:E,kind:N,contextSpan:R})=>({...R3e(E,R,T),kind:N}))}}):m:Ed}provideInlayHints(r){const{file:a,project:u}=this.getFileAndProject(r),h=this.projectService.getScriptInfoForNormalizedPath(a);return u.getLanguageService().provideInlayHints(a,r,this.getPreferences(a)).map(m=>{const{position:C,displayParts:b}=m;return{...m,position:h.positionToLineOffset(C),displayParts:b==null?void 0:b.map(({text:T,span:E,file:N})=>{if(E){z.assertIsDefined(N,"Target file should be defined together with its span.");const R=this.projectService.getScriptInfo(N);return{text:T,span:{start:R.positionToLineOffset(E.start),end:R.positionToLineOffset(E.start+E.length),file:N}}}else return{text:T}})}})}mapCode(r){var a;const u=this.getHostFormatOptions(),h=this.getHostPreferences(),{file:p,languageService:m}=this.getFileAndLanguageServiceForSyntacticOperation(r),C=this.projectService.getScriptInfoForNormalizedPath(p),b=(a=r.mapping.focusLocations)==null?void 0:a.map(E=>E.map(N=>{const R=C.lineOffsetToPosition(N.start.line,N.start.offset),F=C.lineOffsetToPosition(N.end.line,N.end.offset);return{start:R,length:F-R}})),T=m.mapCode(p,r.mapping.contents,b,u,h);return this.mapTextChangesToCodeEdits(T)}setCompilerOptionsForInferredProjects(r){this.projectService.setCompilerOptionsForInferredProjects(r.options,r.projectRootPath)}getProjectInfo(r){return this.getProjectInfoWorker(r.file,r.projectFileName,r.needFileNameList,!1)}getProjectInfoWorker(r,a,u,h){const{project:p}=this.getFileAndProjectWorker(r,a);return im(p),{configFileName:p.getProjectName(),languageServiceDisabled:!p.languageServiceEnabled,fileNames:u?p.getFileNames(!1,h):void 0}}getRenameInfo(r){const{file:a,project:u}=this.getFileAndProject(r),h=this.getPositionInFile(r,a),p=this.getPreferences(a);return u.getLanguageService().getRenameInfo(a,h,p)}getProjects(r,a,u){let h,p;if(r.projectFileName){const m=this.getProject(r.projectFileName);m&&(h=[m])}else{const m=a?this.projectService.getScriptInfoEnsuringProjectsUptoDate(r.file):this.projectService.getScriptInfo(r.file);if(m)a||this.projectService.ensureDefaultProjectForFile(m);else return u?Ed:(this.projectService.logErrorForScriptInfoNotFound(r.file),iC.ThrowNoProject());h=m.containingProjects,p=this.projectService.getSymlinkedProjects(m)}return h=Ri(h,m=>m.languageServiceEnabled&&!m.isOrphan()),!u&&(!h||!h.length)&&!p?(this.projectService.logErrorForScriptInfoNotFound(r.file??r.projectFileName),iC.ThrowNoProject()):p?{projects:h,symLinkedProjects:p}:h}getDefaultProject(r){if(r.projectFileName){const u=this.getProject(r.projectFileName);if(u)return u;if(!r.file)return iC.ThrowNoProject()}return this.projectService.getScriptInfo(r.file).getDefaultProject()}getRenameLocations(r,a){const u=Kc(r.file),h=this.getPositionInFile(r,u),p=this.getProjects(r),m=this.getDefaultProject(r),C=this.getPreferences(u),b=this.mapRenameInfo(m.getLanguageService().getRenameInfo(u,h,C),z.checkDefined(this.projectService.getScriptInfo(u)));if(!b.canRename)return a?{info:b,locs:[]}:[];const T=AHt(p,m,{fileName:r.file,pos:h},!!r.findInStrings,!!r.findInComments,C,this.host.useCaseSensitiveFileNames);return a?{info:b,locs:this.toSpanGroups(T)}:T}mapRenameInfo(r,a){if(r.canRename){const{canRename:u,fileToRename:h,displayName:p,fullDisplayName:m,kind:C,kindModifiers:b,triggerSpan:T}=r;return{canRename:u,fileToRename:h,displayName:p,fullDisplayName:m,kind:C,kindModifiers:b,triggerSpan:q1(T,a)}}else return r}toSpanGroups(r){const a=new Map;for(const{fileName:u,textSpan:h,contextSpan:p,originalContextSpan:m,originalTextSpan:C,originalFileName:b,...T}of r){let E=a.get(u);E||a.set(u,E={file:u,locs:[]});const N=z.checkDefined(this.projectService.getScriptInfo(u));E.locs.push({...R3e(h,p,N),...T})}return Fn(a.values())}getReferences(r,a){const u=Kc(r.file),h=this.getProjects(r),p=this.getPositionInFile(r,u),m=MHt(h,this.getDefaultProject(r),{fileName:r.file,pos:p},this.host.useCaseSensitiveFileNames,this.logger);if(!a)return m;const C=this.getPreferences(u),b=this.getDefaultProject(r),T=b.getScriptInfoForNormalizedPath(u),E=b.getLanguageService().getQuickInfoAtPosition(u,p),N=E?MH(E.displayParts):"",R=E&&E.textSpan,F=R?T.positionToLineOffset(R.start).offset:0,j=R?T.getSnapshot().getText(R.start,zu(R)):"";return{refs:Ln(m,q=>q.references.map(Q=>hct(this.projectService,Q,C))),symbolName:j,symbolStartOffset:F,symbolDisplayString:N}}getFileReferences(r,a){const u=this.getProjects(r),h=r.file,p=this.getPreferences(Kc(h)),m=[],C=s_e(this.host.useCaseSensitiveFileNames);return M3e(u,void 0,T=>{if(T.getCancellationToken().isCancellationRequested())return;const E=T.getLanguageService().getFileReferences(h);if(E)for(const N of E)C.has(N)||(m.push(N),C.add(N))}),a?{refs:m.map(T=>hct(this.projectService,T,p)),symbolName:`"${r.file}"`}:m}openClientFile(r,a,u,h){this.projectService.openClientFileWithNormalizedPath(r,a,u,!1,h)}getPosition(r,a){return r.position!==void 0?r.position:a.lineOffsetToPosition(r.line,r.offset)}getPositionInFile(r,a){const u=this.projectService.getScriptInfoForNormalizedPath(a);return this.getPosition(r,u)}getFileAndProject(r){return this.getFileAndProjectWorker(r.file,r.projectFileName)}getFileAndLanguageServiceForSyntacticOperation(r){const{file:a,project:u}=this.getFileAndProject(r);return{file:a,languageService:u.getLanguageService(!1)}}getFileAndProjectWorker(r,a){const u=Kc(r),h=this.getProject(a)||this.projectService.ensureDefaultProjectForFile(u);return{file:u,project:h}}getOutliningSpans(r,a){const{file:u,languageService:h}=this.getFileAndLanguageServiceForSyntacticOperation(r),p=h.getOutliningSpans(u);if(a){const m=this.projectService.getScriptInfoForNormalizedPath(u);return p.map(C=>({textSpan:q1(C.textSpan,m),hintSpan:q1(C.hintSpan,m),bannerText:C.bannerText,autoCollapse:C.autoCollapse,kind:C.kind}))}else return p}getTodoComments(r){const{file:a,project:u}=this.getFileAndProject(r);return u.getLanguageService().getTodoComments(a,r.descriptors)}getDocCommentTemplate(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=this.getPositionInFile(r,a);return u.getDocCommentTemplateAtPosition(a,h,this.getPreferences(a),this.getFormatOptions(a))}getSpanOfEnclosingComment(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=r.onlyMultiLine,p=this.getPositionInFile(r,a);return u.getSpanOfEnclosingComment(a,p,h)}getIndentation(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=this.getPositionInFile(r,a),p=r.options?Z3(r.options):this.getFormatOptions(a),m=u.getIndentationAtPosition(a,h,p);return{position:h,indentation:m}}getBreakpointStatement(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=this.getPositionInFile(r,a);return u.getBreakpointStatementAtPosition(a,h)}getNameOrDottedNameSpan(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=this.getPositionInFile(r,a);return u.getNameOrDottedNameSpan(a,h,h)}isValidBraceCompletion(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=this.getPositionInFile(r,a);return u.isValidBraceCompletionAtPosition(a,h,r.openingBrace.charCodeAt(0))}getQuickInfoWorker(r,a){const{file:u,project:h}=this.getFileAndProject(r),p=this.projectService.getScriptInfoForNormalizedPath(u),m=h.getLanguageService().getQuickInfoAtPosition(u,this.getPosition(r,p));if(!m)return;const C=!!this.getPreferences(u).displayPartsForJSDoc;if(a){const b=MH(m.displayParts);return{kind:m.kind,kindModifiers:m.kindModifiers,start:p.positionToLineOffset(m.textSpan.start),end:p.positionToLineOffset(zu(m.textSpan)),displayString:b,documentation:C?this.mapDisplayParts(m.documentation,h):MH(m.documentation),tags:this.mapJSDocTagInfo(m.tags,h,C)}}else return C?m:{...m,tags:this.mapJSDocTagInfo(m.tags,h,!1)}}getFormattingEditsForRange(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=this.projectService.getScriptInfoForNormalizedPath(a),p=h.lineOffsetToPosition(r.line,r.offset),m=h.lineOffsetToPosition(r.endLine,r.endOffset),C=u.getFormattingEditsForRange(a,p,m,this.getFormatOptions(a));if(C)return C.map(b=>this.convertTextChangeToCodeEdit(b,h))}getFormattingEditsForRangeFull(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=r.options?Z3(r.options):this.getFormatOptions(a);return u.getFormattingEditsForRange(a,r.position,r.endPosition,h)}getFormattingEditsForDocumentFull(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=r.options?Z3(r.options):this.getFormatOptions(a);return u.getFormattingEditsForDocument(a,h)}getFormattingEditsAfterKeystrokeFull(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=r.options?Z3(r.options):this.getFormatOptions(a);return u.getFormattingEditsAfterKeystroke(a,r.position,r.key,h)}getFormattingEditsAfterKeystroke(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=this.projectService.getScriptInfoForNormalizedPath(a),p=h.lineOffsetToPosition(r.line,r.offset),m=this.getFormatOptions(a),C=u.getFormattingEditsAfterKeystroke(a,p,r.key,m);if(r.key===` +`&&(!C||C.length===0||NHt(C,p))){const{lineText:b,absolutePosition:T}=h.textStorage.getAbsolutePositionAndLineText(r.line);if(b&&b.search("\\S")<0){const E=u.getIndentationAtPosition(a,p,m);let N=0,R,F;for(R=0,F=b.length;R({start:h.positionToLineOffset(b.span.start),end:h.positionToLineOffset(zu(b.span)),newText:b.newText?b.newText:""}))}getCompletions(r,a){const{file:u,project:h}=this.getFileAndProject(r),p=this.projectService.getScriptInfoForNormalizedPath(u),m=this.getPosition(r,p),C=h.getLanguageService().getCompletionsAtPosition(u,m,{...b3e(this.getPreferences(u)),triggerCharacter:r.triggerCharacter,triggerKind:r.triggerKind,includeExternalModuleExports:r.includeExternalModuleExports,includeInsertTextCompletions:r.includeInsertTextCompletions},h.projectService.getFormatCodeOptions(u));if(C===void 0)return;if(a==="completions-full")return C;const b=r.prefix||"",T=ns(C.entries,N=>{if(C.isMemberCompletion||ro(N.name.toLowerCase(),b.toLowerCase())){const{name:R,kind:F,kindModifiers:j,sortText:U,insertText:q,filterText:Q,replacementSpan:re,hasAction:Y,source:ue,sourceDisplay:te,labelDetails:Se,isSnippet:oe,isRecommended:pe,isPackageJsonImport:ye,isImportStatementCompletion:be,data:_e}=N,ve=re?q1(re,p):void 0;return{name:R,kind:F,kindModifiers:j,sortText:U,insertText:q,filterText:Q,replacementSpan:ve,isSnippet:oe,hasAction:Y||void 0,source:ue,sourceDisplay:te,labelDetails:Se,isRecommended:pe,isPackageJsonImport:ye,isImportStatementCompletion:be,data:_e}}});return a==="completions"?(C.metadata&&(T.metadata=C.metadata),T):{...C,optionalReplacementSpan:C.optionalReplacementSpan&&q1(C.optionalReplacementSpan,p),entries:T}}getCompletionEntryDetails(r,a){const{file:u,project:h}=this.getFileAndProject(r),p=this.projectService.getScriptInfoForNormalizedPath(u),m=this.getPosition(r,p),C=h.projectService.getFormatCodeOptions(u),b=!!this.getPreferences(u).displayPartsForJSDoc,T=ns(r.entryNames,E=>{const{name:N,source:R,data:F}=typeof E=="string"?{name:E,source:void 0,data:void 0}:E;return h.getLanguageService().getCompletionEntryDetails(u,m,N,C,R,this.getPreferences(u),F?ua(F,$Ht):void 0)});return a?b?T:T.map(E=>({...E,tags:this.mapJSDocTagInfo(E.tags,h,!1)})):T.map(E=>({...E,codeActions:Yt(E.codeActions,N=>this.mapCodeAction(N)),documentation:this.mapDisplayParts(E.documentation,h),tags:this.mapJSDocTagInfo(E.tags,h,b)}))}getCompileOnSaveAffectedFileList(r){const a=this.getProjects(r,!0,!0),u=this.projectService.getScriptInfo(r.file);return u?PHt(u,h=>this.projectService.getScriptInfoForPath(h),a,(h,p)=>{if(!h.compileOnSaveEnabled||!h.languageServiceEnabled||h.isOrphan())return;const m=h.getCompilationSettings();if(!(m.noEmit||xf(p.fileName)&&!IHt(m)))return{projectFileName:h.getProjectName(),fileNames:h.getCompileOnSaveAffectedFileList(p),projectUsesOutFile:!!m.outFile}}):Ed}emitFile(r){const{file:a,project:u}=this.getFileAndProject(r);if(u||iC.ThrowNoProject(),!u.languageServiceEnabled)return r.richResponse?{emitSkipped:!0,diagnostics:[]}:!1;const h=u.getScriptInfo(a),{emitSkipped:p,diagnostics:m}=u.emitFile(h,(C,b,T)=>this.host.writeFile(C,b,T));return r.richResponse?{emitSkipped:p,diagnostics:r.includeLinePosition?this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(m):m.map(C=>dj(C,!0))}:!p}getSignatureHelpItems(r,a){const{file:u,project:h}=this.getFileAndProject(r),p=this.projectService.getScriptInfoForNormalizedPath(u),m=this.getPosition(r,p),C=h.getLanguageService().getSignatureHelpItems(u,m,r),b=!!this.getPreferences(u).displayPartsForJSDoc;if(C&&a){const T=C.applicableSpan;return{...C,applicableSpan:{start:p.positionToLineOffset(T.start),end:p.positionToLineOffset(T.start+T.length)},items:this.mapSignatureHelpItems(C.items,h,b)}}else return b||!C?C:{...C,items:C.items.map(T=>({...T,tags:this.mapJSDocTagInfo(T.tags,h,!1)}))}}toPendingErrorCheck(r){const a=Kc(r),u=this.projectService.tryGetDefaultProjectForFile(a);return u&&{fileName:a,project:u}}getDiagnostics(r,a,u){this.suppressDiagnosticEvents||u.length>0&&this.updateErrorCheck(r,u,a)}change(r){const a=this.projectService.getScriptInfo(r.file);z.assert(!!a),a.textStorage.switchToScriptVersionCache();const u=a.lineOffsetToPosition(r.line,r.offset),h=a.lineOffsetToPosition(r.endLine,r.endOffset);u>=0&&(this.changeSeq++,this.projectService.applyChangesToFile(a,My({span:{start:u,length:h-u},newText:r.insertString})))}reload(r,a){const u=Kc(r.file),h=r.tmpfile===void 0?void 0:Kc(r.tmpfile),p=this.projectService.getScriptInfoForNormalizedPath(u);p&&(this.changeSeq++,p.reloadFromFile(h)&&this.doOutput(void 0,"reload",a,!0))}saveToTmp(r,a){const u=this.projectService.getScriptInfo(r);u&&u.saveTo(a)}closeClientFile(r){if(!r)return;const a=ra(r);this.projectService.closeClientFile(a)}mapLocationNavigationBarItems(r,a){return Yt(r,u=>({text:u.text,kind:u.kind,kindModifiers:u.kindModifiers,spans:u.spans.map(h=>q1(h,a)),childItems:this.mapLocationNavigationBarItems(u.childItems,a),indent:u.indent}))}getNavigationBarItems(r,a){const{file:u,languageService:h}=this.getFileAndLanguageServiceForSyntacticOperation(r),p=h.getNavigationBarItems(u);return p?a?this.mapLocationNavigationBarItems(p,this.projectService.getScriptInfoForNormalizedPath(u)):p:void 0}toLocationNavigationTree(r,a){return{text:r.text,kind:r.kind,kindModifiers:r.kindModifiers,spans:r.spans.map(u=>q1(u,a)),nameSpan:r.nameSpan&&q1(r.nameSpan,a),childItems:Yt(r.childItems,u=>this.toLocationNavigationTree(u,a))}}getNavigationTree(r,a){const{file:u,languageService:h}=this.getFileAndLanguageServiceForSyntacticOperation(r),p=h.getNavigationTree(u);return p?a?this.toLocationNavigationTree(p,this.projectService.getScriptInfoForNormalizedPath(u)):p:void 0}getNavigateToItems(r,a){const u=this.getFullNavigateToItems(r);return a?Ln(u,({project:h,navigateToItems:p})=>p.map(m=>{const C=h.getScriptInfo(m.fileName),b={name:m.name,kind:m.kind,kindModifiers:m.kindModifiers,isCaseSensitive:m.isCaseSensitive,matchKind:m.matchKind,file:m.fileName,start:C.positionToLineOffset(m.textSpan.start),end:C.positionToLineOffset(zu(m.textSpan))};return m.kindModifiers&&m.kindModifiers!==""&&(b.kindModifiers=m.kindModifiers),m.containerName&&m.containerName.length>0&&(b.containerName=m.containerName),m.containerKind&&m.containerKind.length>0&&(b.containerKind=m.containerKind),b})):Ln(u,({navigateToItems:h})=>h)}getFullNavigateToItems(r){const{currentFileOnly:a,searchValue:u,maxResultCount:h,projectFileName:p}=r;if(a){z.assertIsDefined(r.file);const{file:R,project:F}=this.getFileAndProject(r);return[{project:F,navigateToItems:F.getLanguageService().getNavigateToItems(u,h,R)}]}const m=this.getHostPreferences(),C=[],b=new Map;if(!r.file&&!p)this.projectService.loadAncestorProjectTree(),this.projectService.forEachEnabledProject(R=>T(R));else{const R=this.getProjects(r);M3e(R,void 0,F=>T(F))}return C;function T(R){const F=R.getLanguageService().getNavigateToItems(u,h,void 0,R.isNonTsProject(),m.excludeLibrarySymbolsInNavTo),j=Ri(F,U=>E(U)&&!o_e(IF(U),R));j.length&&C.push({project:R,navigateToItems:j})}function E(R){const F=R.name;if(!b.has(F))return b.set(F,[R]),!0;const j=b.get(F);for(const U of j)if(N(U,R))return!1;return j.push(R),!0}function N(R,F){return R===F?!0:!R||!F?!1:R.containerKind===F.containerKind&&R.containerName===F.containerName&&R.fileName===F.fileName&&R.isCaseSensitive===F.isCaseSensitive&&R.kind===F.kind&&R.kindModifiers===F.kindModifiers&&R.matchKind===F.matchKind&&R.name===F.name&&R.textSpan.start===F.textSpan.start&&R.textSpan.length===F.textSpan.length}}getSupportedCodeFixes(r){if(!r)return Sfe();if(r.file){const{file:u,project:h}=this.getFileAndProject(r);return h.getLanguageService().getSupportedCodeFixes(u)}const a=this.getProject(r.projectFileName);return a||iC.ThrowNoProject(),a.getLanguageService().getSupportedCodeFixes()}isLocation(r){return r.line!==void 0}extractPositionOrRange(r,a){let u,h;return this.isLocation(r)?u=p(r):h=this.getRange(r,a),z.checkDefined(u===void 0?h:u);function p(m){return m.position!==void 0?m.position:a.lineOffsetToPosition(m.line,m.offset)}}getRange(r,a){const{startPosition:u,endPosition:h}=this.getStartAndEndPosition(r,a);return{pos:u,end:h}}getApplicableRefactors(r){const{file:a,project:u}=this.getFileAndProject(r),h=u.getScriptInfoForNormalizedPath(a);return u.getLanguageService().getApplicableRefactors(a,this.extractPositionOrRange(r,h),this.getPreferences(a),r.triggerReason,r.kind,r.includeInteractiveActions).map(m=>({...m,actions:m.actions.map(C=>({...C,range:C.range?{start:Y3({line:C.range.start.line,character:C.range.start.offset}),end:Y3({line:C.range.end.line,character:C.range.end.offset})}:void 0}))}))}getEditsForRefactor(r,a){const{file:u,project:h}=this.getFileAndProject(r),p=h.getScriptInfoForNormalizedPath(u),m=h.getLanguageService().getEditsForRefactor(u,this.getFormatOptions(u),this.extractPositionOrRange(r,p),r.refactor,r.action,this.getPreferences(u),r.interactiveRefactorArguments);if(m===void 0)return{edits:[]};if(a){const{renameFilename:C,renameLocation:b,edits:T}=m;let E;if(C!==void 0&&b!==void 0){const N=h.getScriptInfoForNormalizedPath(Kc(C));E=F3e(GP(N.getSnapshot()),C,b,T)}return{renameLocation:E,renameFilename:C,edits:this.mapTextChangesToCodeEdits(T),notApplicableReason:m.notApplicableReason}}return m}getMoveToRefactoringFileSuggestions(r){const{file:a,project:u}=this.getFileAndProject(r),h=u.getScriptInfoForNormalizedPath(a);return u.getLanguageService().getMoveToRefactoringFileSuggestions(a,this.extractPositionOrRange(r,h),this.getPreferences(a))}getPasteEdits(r){const{file:a,project:u}=this.getFileAndProject(r),h=r.copiedFrom?{file:r.copiedFrom.file,range:r.copiedFrom.spans.map(m=>this.getRange({file:r.copiedFrom.file,startLine:m.start.line,startOffset:m.start.offset,endLine:m.end.line,endOffset:m.end.offset},u.getScriptInfoForNormalizedPath(Kc(r.copiedFrom.file))))}:void 0,p=u.getLanguageService().getPasteEdits({targetFile:a,pastedText:r.pastedText,pasteLocations:r.pasteLocations.map(m=>this.getRange({file:a,startLine:m.start.line,startOffset:m.start.offset,endLine:m.end.line,endOffset:m.end.offset},u.getScriptInfoForNormalizedPath(a))),copiedFrom:h,preferences:this.getPreferences(a)},this.getFormatOptions(a));return p&&this.mapPasteEditsAction(p)}organizeImports(r,a){z.assert(r.scope.type==="file");const{file:u,project:h}=this.getFileAndProject(r.scope.args),p=h.getLanguageService().organizeImports({fileName:u,mode:r.mode??(r.skipDestructiveCodeActions?"SortAndCombine":void 0),type:"file"},this.getFormatOptions(u),this.getPreferences(u));return a?this.mapTextChangesToCodeEdits(p):p}getEditsForFileRename(r,a){const u=Kc(r.oldFilePath),h=Kc(r.newFilePath),p=this.getHostFormatOptions(),m=this.getHostPreferences(),C=new Set,b=[];return this.projectService.loadAncestorProjectTree(),this.projectService.forEachEnabledProject(T=>{const E=T.getLanguageService().getEditsForFileRename(u,h,p,m),N=[];for(const R of E)C.has(R.fileName)||(b.push(R),N.push(R.fileName));for(const R of N)C.add(R)}),a?b.map(T=>this.mapTextChangeToCodeEdit(T)):b}getCodeFixes(r,a){const{file:u,project:h}=this.getFileAndProject(r),p=h.getScriptInfoForNormalizedPath(u),{startPosition:m,endPosition:C}=this.getStartAndEndPosition(r,p);let b;try{b=h.getLanguageService().getCodeFixesAtPosition(u,m,C,r.errorCodes,this.getFormatOptions(u),this.getPreferences(u))}catch(T){const E=h.getLanguageService(),N=[...E.getSyntacticDiagnostics(u),...E.getSemanticDiagnostics(u),...E.getSuggestionDiagnostics(u)].map(F=>NB(m,C-m,F.start,F.length)&&F.code),R=r.errorCodes.find(F=>!N.includes(F));throw R!==void 0&&(T.message=`BADCLIENT: Bad error code, ${R} not found in range ${m}..${C} (found: ${N.join(", ")}); could have caused this error: +${T.message}`),T}return a?b.map(T=>this.mapCodeFixAction(T)):b}getCombinedCodeFix({scope:r,fixId:a},u){z.assert(r.type==="file");const{file:h,project:p}=this.getFileAndProject(r.args),m=p.getLanguageService().getCombinedCodeFix({type:"file",fileName:h},a,this.getFormatOptions(h),this.getPreferences(h));return u?{changes:this.mapTextChangesToCodeEdits(m.changes),commands:m.commands}:m}applyCodeActionCommand(r){const a=r.command;for(const u of NL(a)){const{file:h,project:p}=this.getFileAndProject(u);p.getLanguageService().applyCodeActionCommand(u,this.getFormatOptions(h)).then(m=>{},m=>{})}return{}}getStartAndEndPosition(r,a){let u,h;return r.startPosition!==void 0?u=r.startPosition:(u=a.lineOffsetToPosition(r.startLine,r.startOffset),r.startPosition=u),r.endPosition!==void 0?h=r.endPosition:(h=a.lineOffsetToPosition(r.endLine,r.endOffset),r.endPosition=h),{startPosition:u,endPosition:h}}mapCodeAction({description:r,changes:a,commands:u}){return{description:r,changes:this.mapTextChangesToCodeEdits(a),commands:u}}mapCodeFixAction({fixName:r,description:a,changes:u,commands:h,fixId:p,fixAllDescription:m}){return{fixName:r,description:a,changes:this.mapTextChangesToCodeEdits(u),commands:h,fixId:p,fixAllDescription:m}}mapPasteEditsAction({edits:r,fixId:a}){return{edits:this.mapTextChangesToCodeEdits(r),fixId:a}}mapTextChangesToCodeEdits(r){return r.map(a=>this.mapTextChangeToCodeEdit(a))}mapTextChangeToCodeEdit(r){const a=this.projectService.getScriptInfoOrConfig(r.fileName);return!!r.isNewFile==!!a&&(a||this.projectService.logErrorForScriptInfoNotFound(r.fileName),z.fail("Expected isNewFile for (only) new files. "+JSON.stringify({isNewFile:!!r.isNewFile,hasScriptInfo:!!a}))),a?{fileName:r.fileName,textChanges:r.textChanges.map(u=>VHt(u,a))}:zHt(r)}convertTextChangeToCodeEdit(r,a){return{start:a.positionToLineOffset(r.span.start),end:a.positionToLineOffset(r.span.start+r.span.length),newText:r.newText?r.newText:""}}getBraceMatching(r,a){const{file:u,languageService:h}=this.getFileAndLanguageServiceForSyntacticOperation(r),p=this.projectService.getScriptInfoForNormalizedPath(u),m=this.getPosition(r,p),C=h.getBraceMatchingAtPosition(u,m);return C?a?C.map(b=>q1(b,p)):C:void 0}getDiagnosticsForProject(r,a,u){if(this.suppressDiagnosticEvents)return;const{fileNames:h,languageServiceDisabled:p}=this.getProjectInfoWorker(u,void 0,!0,!0);if(p)return;const m=h.filter(U=>!U.includes("lib.d.ts"));if(m.length===0)return;const C=[],b=[],T=[],E=[],N=Kc(u),R=this.projectService.ensureDefaultProjectForFile(N);for(const U of m)this.getCanonicalFileName(U)===this.getCanonicalFileName(u)?C.push(U):this.projectService.getScriptInfo(U).isScriptOpen()?b.push(U):xf(U)?E.push(U):T.push(U);const j=[...C,...b,...T,...E].map(U=>({fileName:U,project:R}));this.updateErrorCheck(r,j,a,!1)}configurePlugin(r){this.projectService.configurePlugin(r)}getSmartSelectionRange(r,a){const{locations:u}=r,{file:h,languageService:p}=this.getFileAndLanguageServiceForSyntacticOperation(r),m=z.checkDefined(this.projectService.getScriptInfo(h));return Yt(u,C=>{const b=this.getPosition(C,m),T=p.getSmartSelectionRange(h,b);return a?this.mapSelectionRange(T,m):T})}toggleLineComment(r,a){const{file:u,languageService:h}=this.getFileAndLanguageServiceForSyntacticOperation(r),p=this.projectService.getScriptInfo(u),m=this.getRange(r,p),C=h.toggleLineComment(u,m);if(a){const b=this.projectService.getScriptInfoForNormalizedPath(u);return C.map(T=>this.convertTextChangeToCodeEdit(T,b))}return C}toggleMultilineComment(r,a){const{file:u,languageService:h}=this.getFileAndLanguageServiceForSyntacticOperation(r),p=this.projectService.getScriptInfoForNormalizedPath(u),m=this.getRange(r,p),C=h.toggleMultilineComment(u,m);if(a){const b=this.projectService.getScriptInfoForNormalizedPath(u);return C.map(T=>this.convertTextChangeToCodeEdit(T,b))}return C}commentSelection(r,a){const{file:u,languageService:h}=this.getFileAndLanguageServiceForSyntacticOperation(r),p=this.projectService.getScriptInfoForNormalizedPath(u),m=this.getRange(r,p),C=h.commentSelection(u,m);if(a){const b=this.projectService.getScriptInfoForNormalizedPath(u);return C.map(T=>this.convertTextChangeToCodeEdit(T,b))}return C}uncommentSelection(r,a){const{file:u,languageService:h}=this.getFileAndLanguageServiceForSyntacticOperation(r),p=this.projectService.getScriptInfoForNormalizedPath(u),m=this.getRange(r,p),C=h.uncommentSelection(u,m);if(a){const b=this.projectService.getScriptInfoForNormalizedPath(u);return C.map(T=>this.convertTextChangeToCodeEdit(T,b))}return C}mapSelectionRange(r,a){const u={textSpan:q1(r.textSpan,a)};return r.parent&&(u.parent=this.mapSelectionRange(r.parent,a)),u}getScriptInfoFromProjectService(r){const a=Kc(r),u=this.projectService.getScriptInfoForNormalizedPath(a);return u||(this.projectService.logErrorForScriptInfoNotFound(a),iC.ThrowNoProject())}toProtocolCallHierarchyItem(r){const a=this.getScriptInfoFromProjectService(r.file);return{name:r.name,kind:r.kind,kindModifiers:r.kindModifiers,file:r.file,containerName:r.containerName,span:q1(r.span,a),selectionSpan:q1(r.selectionSpan,a)}}toProtocolCallHierarchyIncomingCall(r){const a=this.getScriptInfoFromProjectService(r.from.file);return{from:this.toProtocolCallHierarchyItem(r.from),fromSpans:r.fromSpans.map(u=>q1(u,a))}}toProtocolCallHierarchyOutgoingCall(r,a){return{to:this.toProtocolCallHierarchyItem(r.to),fromSpans:r.fromSpans.map(u=>q1(u,a))}}prepareCallHierarchy(r){const{file:a,project:u}=this.getFileAndProject(r),h=this.projectService.getScriptInfoForNormalizedPath(a);if(h){const p=this.getPosition(r,h),m=u.getLanguageService().prepareCallHierarchy(a,p);return m&&Pde(m,C=>this.toProtocolCallHierarchyItem(C))}}provideCallHierarchyIncomingCalls(r){const{file:a,project:u}=this.getFileAndProject(r),h=this.getScriptInfoFromProjectService(a);return u.getLanguageService().provideCallHierarchyIncomingCalls(a,this.getPosition(r,h)).map(m=>this.toProtocolCallHierarchyIncomingCall(m))}provideCallHierarchyOutgoingCalls(r){const{file:a,project:u}=this.getFileAndProject(r),h=this.getScriptInfoFromProjectService(a);return u.getLanguageService().provideCallHierarchyOutgoingCalls(a,this.getPosition(r,h)).map(m=>this.toProtocolCallHierarchyOutgoingCall(m,h))}getCanonicalFileName(r){const a=this.host.useCaseSensitiveFileNames?r:Ow(r);return ra(a)}exit(){}notRequired(){return{responseRequired:!1}}requiredResponse(r){return{response:r,responseRequired:!0}}addProtocolHandler(r,a){if(this.handlers.has(r))throw new Error(`Protocol handler already exists for command "${r}"`);this.handlers.set(r,a)}setCurrentRequest(r){z.assert(this.currentRequestId===void 0),this.currentRequestId=r,this.cancellationToken.setRequest(r)}resetCurrentRequest(r){z.assert(this.currentRequestId===r),this.currentRequestId=void 0,this.cancellationToken.resetRequest(r)}executeWithRequestId(r,a){try{return this.setCurrentRequest(r),a()}finally{this.resetCurrentRequest(r)}}executeCommand(r){const a=this.handlers.get(r.command);if(a){const u=this.executeWithRequestId(r.seq,()=>a(r));return this.projectService.enableRequestedPlugins(),u}else return this.logger.msg(`Unrecognized JSON command:${i2(r)}`,"Err"),this.doOutput(void 0,"unknown",r.seq,!1,`Unrecognized JSON command: ${r.command}`),{responseRequired:!1}}onMessage(r){var a,u,h,p,m,C,b,T,E,N,R;this.gcTimer.scheduleCollect(),this.performanceData=void 0;let F;this.logger.hasLevel(2)&&(F=this.hrtime(),this.logger.hasLevel(3)&&this.logger.info(`request:${tF(this.toStringMessage(r))}`));let j,U;try{j=this.parseMessage(r),U=j.arguments&&j.arguments.file?j.arguments:void 0,(a=sr)==null||a.instant(sr.Phase.Session,"request",{seq:j.seq,command:j.command}),(u=c_)==null||u.logStartCommand(""+j.command,this.toStringMessage(r).substring(0,100)),(h=sr)==null||h.push(sr.Phase.Session,"executeCommand",{seq:j.seq,command:j.command},!0);const{response:q,responseRequired:Q}=this.executeCommand(j);if((p=sr)==null||p.pop(),this.logger.hasLevel(2)){const re=EHt(this.hrtime(F)).toFixed(4);Q?this.logger.perftrc(`${j.seq}::${j.command}: elapsed time (in milliseconds) ${re}`):this.logger.perftrc(`${j.seq}::${j.command}: async elapsed time (in milliseconds) ${re}`)}(m=c_)==null||m.logStopCommand(""+j.command,"Success"),(C=sr)==null||C.instant(sr.Phase.Session,"response",{seq:j.seq,command:j.command,success:!!q}),q?this.doOutput(q,j.command,j.seq,!0):Q&&this.doOutput(void 0,j.command,j.seq,!1,"No content available.")}catch(q){if((b=sr)==null||b.popAll(),q instanceof UR){(T=c_)==null||T.logStopCommand(""+(j&&j.command),"Canceled: "+q),(E=sr)==null||E.instant(sr.Phase.Session,"commandCanceled",{seq:j==null?void 0:j.seq,command:j==null?void 0:j.command}),this.doOutput({canceled:!0},j.command,j.seq,!0);return}this.logErrorWorker(q,this.toStringMessage(r),U),(N=c_)==null||N.logStopCommand(""+(j&&j.command),"Error: "+q),(R=sr)==null||R.instant(sr.Phase.Session,"commandError",{seq:j==null?void 0:j.seq,command:j==null?void 0:j.command,message:q.message}),this.doOutput(void 0,j?j.command:"unknown",j?j.seq:0,!1,"Error processing request. "+q.message+` +`+q.stack)}}parseMessage(r){return JSON.parse(r)}toStringMessage(r){return r}getFormatOptions(r){return this.projectService.getFormatCodeOptions(r)}getPreferences(r){return this.projectService.getPreferences(r)}getHostFormatOptions(){return this.projectService.getHostFormatCodeOptions()}getHostPreferences(){return this.projectService.getHostPreferences()}};function q1(t,r){return{start:r.positionToLineOffset(t.start),end:r.positionToLineOffset(zu(t))}}function R3e(t,r,a){const u=q1(t,a),h=r&&q1(r,a);return h?{...u,contextStart:h.start,contextEnd:h.end}:u}function VHt(t,r){return{start:fct(r,t.span.start),end:fct(r,zu(t.span)),newText:t.newText}}function fct(t,r){return I3e(t)?jHt(t.getLineAndCharacterOfPosition(r)):t.positionToLineOffset(r)}function HHt(t,r){const a=t.ranges.map(u=>({start:r.positionToLineOffset(u.start),end:r.positionToLineOffset(u.start+u.length)}));return t.wordPattern?{ranges:a,wordPattern:t.wordPattern}:{ranges:a}}function jHt(t){return{line:t.line+1,offset:t.character+1}}function zHt(t){z.assert(t.textChanges.length===1);const r=ma(t.textChanges);return z.assert(r.span.start===0&&r.span.length===0),{fileName:t.fileName,textChanges:[{start:{line:0,offset:0},end:{line:0,offset:0},newText:r.newText}]}}function F3e(t,r,a,u){const h=UHt(t,r,u),{line:p,character:m}=g6(ML(h),a);return{line:p+1,offset:m+1}}function UHt(t,r,a){for(const{fileName:u,textChanges:h}of a)if(u===r)for(let p=h.length-1;p>=0;p--){const{newText:m,span:{start:C,length:b}}=h[p];t=t.slice(0,C)+m+t.slice(C+b)}return t}function hct(t,{fileName:r,textSpan:a,contextSpan:u,isWriteAccess:h,isDefinition:p},{disableLineTextInReferences:m}){const C=z.checkDefined(t.getScriptInfo(r)),b=R3e(a,u,C),T=m?void 0:qHt(C,b);return{file:r,...b,lineText:T,isWriteAccess:h,isDefinition:p}}function qHt(t,r){const a=t.lineToTextSpan(r.start.line-1);return t.getSnapshot().getText(a.start,zu(a)).replace(/\r|\n/g,"")}function $Ht(t){return t===void 0||t&&typeof t=="object"&&typeof t.exportName=="string"&&(t.fileName===void 0||typeof t.fileName=="string")&&(t.ambientModuleName===void 0||typeof t.ambientModuleName=="string"&&(t.isPackageJsonImport===void 0||typeof t.isPackageJsonImport=="boolean"))}var eO=4,B3e=(t=>(t[t.PreStart=0]="PreStart",t[t.Start=1]="Start",t[t.Entire=2]="Entire",t[t.Mid=3]="Mid",t[t.End=4]="End",t[t.PostEnd=5]="PostEnd",t))(B3e||{}),JHt=class{constructor(){this.goSubtree=!0,this.lineIndex=new fj,this.endBranch=[],this.state=2,this.initialText="",this.trailingText="",this.lineIndex.root=new tO,this.startPath=[this.lineIndex.root],this.stack=[this.lineIndex.root]}get done(){return!1}insertLines(t,r){r&&(this.trailingText=""),t?t=this.initialText+t+this.trailingText:t=this.initialText+this.trailingText;const u=fj.linesFromText(t).lines;u.length>1&&u[u.length-1]===""&&u.pop();let h,p;for(let C=this.endBranch.length-1;C>=0;C--)this.endBranch[C].updateCounts(),this.endBranch[C].charCount()===0&&(p=this.endBranch[C],C>0?h=this.endBranch[C-1]:h=this.branchNode);p&&h.remove(p);const m=this.startPath[this.startPath.length-1];if(u.length>0)if(m.text=u[0],u.length>1){let C=new Array(u.length-1),b=m;for(let N=1;N=0;){const N=this.startPath[T];C=N.insertAt(b,C),T--,b=N}let E=C.length;for(;E>0;){const N=new tO;N.add(this.lineIndex.root),C=N.insertAt(this.lineIndex.root,C),E=C.length,this.lineIndex.root=N}this.lineIndex.root.updateCounts()}else for(let C=this.startPath.length-2;C>=0;C--)this.startPath[C].updateCounts();else{this.startPath[this.startPath.length-2].remove(m);for(let b=this.startPath.length-2;b>=0;b--)this.startPath[b].updateCounts()}return this.lineIndex}post(t,r,a){a===this.lineCollectionAtBranch&&(this.state=4),this.stack.pop()}pre(t,r,a,u,h){const p=this.stack[this.stack.length-1];this.state===2&&h===1&&(this.state=1,this.branchNode=p,this.lineCollectionAtBranch=a);let m;function C(b){return b.isLeaf()?new _Z(""):new tO}switch(h){case 0:this.goSubtree=!1,this.state!==4&&p.add(a);break;case 1:this.state===4?this.goSubtree=!1:(m=C(a),p.add(m),this.startPath.push(m));break;case 2:this.state!==4?(m=C(a),p.add(m),this.startPath.push(m)):a.isLeaf()||(m=C(a),p.add(m),this.endBranch.push(m));break;case 3:this.goSubtree=!1;break;case 4:this.state!==4?this.goSubtree=!1:a.isLeaf()||(m=C(a),p.add(m),this.endBranch.push(m));break;case 5:this.goSubtree=!1,this.state!==1&&p.add(a);break}this.goSubtree&&this.stack.push(m)}leaf(t,r,a){this.state===1?this.initialText=a.text.substring(0,t):this.state===2?(this.initialText=a.text.substring(0,t),this.trailingText=a.text.substring(t+r)):this.trailingText=a.text.substring(t+r)}},GHt=class{constructor(t,r,a){this.pos=t,this.deleteLen=r,this.insertedText=a}getTextChangeRange(){return LB(Pf(this.pos,this.deleteLen),this.insertedText?this.insertedText.length:0)}},a_e=class AN{constructor(){this.changes=[],this.versions=new Array(AN.maxVersions),this.minVersion=0,this.currentVersion=0}versionToIndex(r){if(!(rthis.currentVersion))return r%AN.maxVersions}currentVersionToIndex(){return this.currentVersion%AN.maxVersions}edit(r,a,u){this.changes.push(new GHt(r,a,u)),(this.changes.length>AN.changeNumberThreshold||a>AN.changeLengthThreshold||u&&u.length>AN.changeLengthThreshold)&&this.getSnapshot()}getSnapshot(){return this._getSnapshot()}_getSnapshot(){let r=this.versions[this.currentVersionToIndex()];if(this.changes.length>0){let a=r.index;for(const u of this.changes)a=a.edit(u.pos,u.deleteLen,u.insertedText);r=new _ct(this.currentVersion+1,this,a,this.changes),this.currentVersion=r.version,this.versions[this.currentVersionToIndex()]=r,this.changes=[],this.currentVersion-this.minVersion>=AN.maxVersions&&(this.minVersion=this.currentVersion-AN.maxVersions+1)}return r}getSnapshotVersion(){return this._getSnapshot().version}getAbsolutePositionAndLineText(r){return this._getSnapshot().index.lineNumberToInfo(r)}lineOffsetToPosition(r,a){return this._getSnapshot().index.absolutePositionOfStartOfLine(r)+(a-1)}positionToLineOffset(r){return this._getSnapshot().index.positionToLineOffset(r)}lineToTextSpan(r){const a=this._getSnapshot().index,{lineText:u,absolutePosition:h}=a.lineNumberToInfo(r+1),p=u!==void 0?u.length:a.absolutePositionOfStartOfLine(r+2)-h;return Pf(h,p)}getTextChangesBetweenVersions(r,a){if(r=this.minVersion){const u=[];for(let h=r+1;h<=a;h++){const p=this.versions[this.versionToIndex(h)];for(const m of p.changesSincePreviousVersion)u.push(m.getTextChangeRange())}return VSe(u)}else return;else return I$}getLineCount(){return this._getSnapshot().index.getLineCount()}static fromString(r){const a=new AN,u=new _ct(0,a,new fj);a.versions[a.currentVersion]=u;const h=fj.linesFromText(r);return u.index.load(h.lines),a}};a_e.changeNumberThreshold=8,a_e.changeLengthThreshold=256,a_e.maxVersions=8;var l_e=a_e,_ct=class tEt{constructor(r,a,u,h=Ed){this.version=r,this.cache=a,this.index=u,this.changesSincePreviousVersion=h}getText(r,a){return this.index.getText(r,a-r)}getLength(){return this.index.getLength()}getChangeRange(r){if(r instanceof tEt&&this.cache===r.cache)return this.version<=r.version?I$:this.cache.getTextChangesBetweenVersions(r.version,this.version)}},fj=class lHe{constructor(){this.checkEdits=!1}absolutePositionOfStartOfLine(r){return this.lineNumberToInfo(r).absolutePosition}positionToLineOffset(r){const{oneBasedLine:a,zeroBasedColumn:u}=this.root.charOffsetToLineInfo(1,r);return{line:a,offset:u+1}}positionToColumnAndLineText(r){return this.root.charOffsetToLineInfo(1,r)}getLineCount(){return this.root.lineCount()}lineNumberToInfo(r){const a=this.getLineCount();if(r<=a){const{position:u,leaf:h}=this.root.lineNumberToInfo(r,0);return{absolutePosition:u,lineText:h&&h.text}}else return{absolutePosition:this.root.charCount(),lineText:void 0}}load(r){if(r.length>0){const a=[];for(let u=0;u0&&r{u=u.concat(m.text.substring(h,h+p))}}),u}getLength(){return this.root.charCount()}every(r,a,u){u||(u=this.root.charCount());const h={goSubtree:!0,done:!1,leaf(p,m,C){r(C,p,m)||(this.done=!0)}};return this.walk(a,u-a,h),!h.done}edit(r,a,u){if(this.root.charCount()===0)return z.assert(a===0),u!==void 0?(this.load(lHe.linesFromText(u).lines),this):void 0;{let h;if(this.checkEdits){const C=this.getText(0,this.root.charCount());h=C.slice(0,r)+u+C.slice(r+a)}const p=new JHt;let m=!1;if(r>=this.root.charCount()){r=this.root.charCount()-1;const C=this.getText(r,1);u?u=C+u:u=C,a=0,m=!0}else if(a>0){const C=r+a,{zeroBasedColumn:b,lineText:T}=this.positionToColumnAndLineText(C);b===0&&(a+=T.length,u=u?u+T:T)}if(this.root.walk(r,a,p),p.insertLines(u,m),this.checkEdits){const C=p.lineIndex.getText(0,p.lineIndex.getLength());z.assert(h===C,"buffer edit mismatch")}return p.lineIndex}}static buildTreeFromBottom(r){if(r.length0?u[h]=p:u.pop(),{lines:u,lineMap:a}}},tO=class cHe{constructor(r=[]){this.children=r,this.totalChars=0,this.totalLines=0,r.length&&this.updateCounts()}isLeaf(){return!1}updateCounts(){this.totalChars=0,this.totalLines=0;for(const r of this.children)this.totalChars+=r.charCount(),this.totalLines+=r.lineCount()}execWalk(r,a,u,h,p){return u.pre&&u.pre(r,a,this.children[h],this,p),u.goSubtree?(this.children[h].walk(r,a,u),u.post&&u.post(r,a,this.children[h],this,p)):u.goSubtree=!0,u.done}skipChild(r,a,u,h,p){h.pre&&!h.done&&(h.pre(r,a,this.children[u],this,p),h.goSubtree=!0)}walk(r,a,u){let h=0,p=this.children[h].charCount(),m=r;for(;m>=p;)this.skipChild(m,a,h,u,0),m-=p,h++,p=this.children[h].charCount();if(m+a<=p){if(this.execWalk(m,a,u,h,2))return}else{if(this.execWalk(m,p-m,u,h,1))return;let C=a-(p-m);for(h++,p=this.children[h].charCount();C>p;){if(this.execWalk(0,p,u,h,3))return;C-=p,h++,p=this.children[h].charCount()}if(C>0&&this.execWalk(0,C,u,h,4))return}if(u.pre){const C=this.children.length;if(ha)return p.isLeaf()?{oneBasedLine:r,zeroBasedColumn:a,lineText:p.text}:p.charOffsetToLineInfo(r,a);a-=p.charCount(),r+=p.lineCount()}const u=this.lineCount();if(u===0)return{oneBasedLine:1,zeroBasedColumn:0,lineText:void 0};const h=z.checkDefined(this.lineNumberToInfo(u,0).leaf);return{oneBasedLine:u,zeroBasedColumn:h.charCount(),lineText:void 0}}lineNumberToInfo(r,a){for(const u of this.children){const h=u.lineCount();if(h>=r)return u.isLeaf()?{position:a,leaf:u}:u.lineNumberToInfo(r,a);r-=h,a+=u.charCount()}return{position:a,leaf:void 0}}splitAfter(r){let a;const u=this.children.length;r++;const h=r;if(r=0;R--)b[R].children.length===0&&b.pop()}m&&b.push(m),this.updateCounts();for(let E=0;E{(this.packageInstalledPromise??(this.packageInstalledPromise=new Map)).set(this.packageInstallId,{resolve:h,reject:p})});return this.installer.send(a),u}attach(r){this.projectService=r,this.installer=this.createInstallerProcess()}onProjectClosed(r){this.installer.send({projectName:r.getProjectName(),kind:"closeProject"})}enqueueInstallTypingsRequest(r,a,u){const h=K6e(r,a,u);this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Scheduling throttled operation:${i2(h)}`),this.activeRequestCount0?this.activeRequestCount--:z.fail("TIAdapter:: Received too many responses");!this.requestQueue.isEmpty();){const h=this.requestQueue.dequeue();if(this.requestMap.get(h.projectName)===h){this.requestMap.delete(h.projectName),this.scheduleRequest(h);break}this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Skipping defunct request for: ${h.projectName}`)}this.projectService.updateTypingsForProject(r),this.event(r,"setTypings");break}case rH:this.projectService.watchTypingLocations(r);break}}scheduleRequest(r){this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Scheduling request for: ${r.projectName}`),this.activeRequestCount++,this.host.setTimeout(()=>{this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Sending request:${i2(r)}`),this.installer.send(r)},iEt.requestDelayMillis,`${r.projectName}::${r.kind}`)}};pct.requestDelayMillis=100;var gct=pct,mct={};l(mct,{ActionInvalidate:()=>kQ,ActionPackageInstalled:()=>TQ,ActionSet:()=>xQ,ActionWatchTypingLocations:()=>rH,Arguments:()=>Iue,AutoImportProviderProject:()=>p3e,AuxiliaryProject:()=>h3e,CharRangeSection:()=>B3e,CloseFileWatcherEvent:()=>Qhe,CommandNames:()=>oct,ConfigFileDiagEvent:()=>qhe,ConfiguredProject:()=>g3e,ConfiguredProjectLoadKind:()=>S3e,CreateDirectoryWatcherEvent:()=>Khe,CreateFileWatcherEvent:()=>Ghe,Errors:()=>iC,EventBeginInstallTypes:()=>Due,EventEndInstallTypes:()=>Eue,EventInitializationFailed:()=>tNe,EventTypesRegistry:()=>Tue,ExternalProject:()=>Whe,GcTimer:()=>i3e,InferredProject:()=>f3e,LargeFileReferencedEvent:()=>Uhe,LineIndex:()=>fj,LineLeaf:()=>_Z,LineNode:()=>tO,LogLevel:()=>J6e,Msg:()=>G6e,OpenFileInfoTelemetryEvent:()=>m3e,Project:()=>lA,ProjectInfoTelemetryEvent:()=>Jhe,ProjectKind:()=>oj,ProjectLanguageServiceStateEvent:()=>$he,ProjectLoadingFinishEvent:()=>zhe,ProjectLoadingStartEvent:()=>jhe,ProjectService:()=>E3e,ProjectsUpdatedInBackgroundEvent:()=>fZ,ScriptInfo:()=>o3e,ScriptVersionCache:()=>l_e,Session:()=>dct,TextStorage:()=>s3e,ThrottledOperations:()=>t3e,TypingsCache:()=>a3e,TypingsInstallerAdapter:()=>gct,allFilesAreJsOrDts:()=>c3e,allRootFilesAreJsOrDts:()=>l3e,asNormalizedPath:()=>Alt,convertCompilerOptions:()=>hZ,convertFormatOptions:()=>Z3,convertScriptKindName:()=>Zhe,convertTypeAcquisition:()=>y3e,convertUserPreferences:()=>b3e,convertWatchOptions:()=>uj,countEachFileTypes:()=>aj,createInstallTypingsRequest:()=>K6e,createModuleSpecifierCache:()=>L3e,createNormalizedPathMap:()=>Olt,createPackageJsonCache:()=>P3e,createSortedArray:()=>e3e,emptyArray:()=>Ed,findArgument:()=>EXe,forEachResolvedProjectReferenceProject:()=>i_e,formatDiagnosticToProtocol:()=>dj,formatMessage:()=>A3e,getBaseConfigFileName:()=>Fhe,getLocationInNewDocument:()=>F3e,hasArgument:()=>DXe,hasNoTypeScriptSource:()=>u3e,indent:()=>tF,isBackgroundProject:()=>cj,isConfigFile:()=>I3e,isConfiguredProject:()=>TS,isDynamicFileName:()=>sj,isExternalProject:()=>lj,isInferredProject:()=>X3,isInferredProjectName:()=>Q6e,isProjectDeferredClose:()=>dZ,makeAutoImportProviderProjectName:()=>Z6e,makeAuxiliaryProjectName:()=>Y6e,makeInferredProjectName:()=>X6e,maxFileSize:()=>Hhe,maxProgramSizeForNonTsFiles:()=>Vhe,normalizedPathToPath:()=>rj,nowString:()=>IXe,nullCancellationToken:()=>nct,nullTypingsInstaller:()=>Bhe,protocol:()=>n3e,removeSorted:()=>Mlt,stringifyIndented:()=>i2,toEvent:()=>O3e,toNormalizedPath:()=>Kc,tryConvertScriptKindName:()=>Xhe,typingsInstaller:()=>$6e,updateProjectIfDirty:()=>im}),typeof console<"u"&&(z.loggingHost={log(t,r){switch(t){case 1:return console.error(r);case 2:return console.warn(r);case 3:return console.log(r);case 4:return console.log(r)}}})})({get exports(){return i},set exports(n){i=n,c.exports&&(c.exports=n)}})})(KDt);var nEt=KDt.exports;const rEt=Iei(nEt),cMi=Nei({__proto__:null,default:rEt},[nEt]);function qPi(c){return new Worker("/lectures/week_01/test1/assets/editor.worker-mIhdKcuk.js",{name:c==null?void 0:c.name})}function $Pi(c){return new Worker("/lectures/week_01/test1/assets/css.worker-DjhtgXfi.js",{name:c==null?void 0:c.name})}function JPi(c){return new Worker("/lectures/week_01/test1/assets/html.worker-C6KqVEPO.js",{name:c==null?void 0:c.name})}function GPi(c){return new Worker("/lectures/week_01/test1/assets/json.worker-Drp3Kp8i.js",{name:c==null?void 0:c.name})}function KPi(c){return new Worker("/lectures/week_01/test1/assets/ts.worker-DzmOwlgm.js",{name:c==null?void 0:c.name})}const QPi=[];window.MonacoEnvironment={getWorker(c,e){return e==="json"?new GPi:e==="css"||e==="scss"||e==="less"?new $Pi:e==="html"||e==="handlebars"||e==="razor"?new JPi:e==="typescript"||e==="javascript"?new KPi:new qPi}};class XPi extends txt{showContextView(...e){super.showContextView(...e);const i=this.contextView.view;i.style.left=`calc(${i.style.left} / var(--slidev-slide-scale))`,i.style.top=`calc(${i.style.top} / var(--slidev-slide-scale))`,i.style.transform="scale(calc(1 / var(--slidev-slide-scale)))",i.style.transformOrigin="0 0"}}const ZPi=Mei(async()=>{Xo.initialize({contextViewService:new aE(XPi,[],!0)});const c=RN.typescript.typescriptDefaults;c.setCompilerOptions({...c.getCompilerOptions(),strict:!0,moduleResolution:RN.typescript.ModuleResolutionKind.NodeJs,module:RN.typescript.ModuleKind.ESNext});const e=G9.monacoTypesSource==="cdn"?VPi({projectName:"TypeScript Playground",typescript:rEt,logger:console,delegate:{receivedFile:(f,g)=>{c.addExtraLib(f,`file://${g}`);const y=Wze.file(g);fU.getModel(y)===null&&fU.createModel(f,"javascript",y)},progress:(f,g)=>{console.debug(`[Typescript ATA] ${f} / ${g}`)}}}):()=>{};RN.register({id:"vue"}),RN.register({id:"html"}),RN.register({id:"css"}),RN.register({id:"typescript"}),RN.register({id:"javascript"});const{shiki:i,themes:n,shikiToMonaco:s}=await _o(async()=>{const{shiki:f,themes:g,shikiToMonaco:y}=await import("../slidev/shiki-CPrRB9--.js");return{shiki:f,themes:g,shikiToMonaco:y}},__vite__mapDeps([17,18,1,19,2])),l=await i,d={};for(const f of QPi){const g=await f(EFe);Object.assign(d,g==null?void 0:g.editorOptions)}return s(l,EFe),typeof n=="string"?fU.setTheme(n):Dei(()=>{fU.setTheme(uHe.value?n.dark||"vitesse-dark":n.light||"vitesse-light")}),{monaco:EFe,ata:e,editorOptions:d}}),uMi=Object.freeze(Object.defineProperty({__proto__:null,default:ZPi},Symbol.toStringTag,{value:"Module"})),dMi=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{_o as _,iAi as a,cAi as b,G9 as c,lAi as d,Fei as e,uHe as f,dAi as g,Bei as h,qpt as i,aAi as j,sAi as k,Mei as l,oAi as m,Lei as n,Gne as o,uAi as p,f2t as q,rAi as r,nAi as s,cMi as t,uMi as u,dMi as v}; diff --git a/week_01/test1/assets/monaco/cssMode-C9lpIxAQ.js b/week_01/test1/assets/monaco/cssMode-C9lpIxAQ.js new file mode 100644 index 0000000..866d83d --- /dev/null +++ b/week_01/test1/assets/monaco/cssMode-C9lpIxAQ.js @@ -0,0 +1,9 @@ +import{o as et}from"./bundled-types-CutNYhe2.js";import"../modules/vue-Bx6xSt6e.js";import"../modules/file-saver-igGfcqei.js";/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var tt=Object.defineProperty,rt=Object.getOwnPropertyDescriptor,nt=Object.getOwnPropertyNames,it=Object.prototype.hasOwnProperty,ot=(e,n,i,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of nt(n))!it.call(e,t)&&t!==i&&tt(e,t,{get:()=>n[t],enumerable:!(r=rt(n,t))||r.enumerable});return e},at=(e,n,i)=>(ot(e,n,"default"),i),d={};at(d,et);var st=2*60*1e3,ut=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>st&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=d.editor.createWebWorker({moduleId:"vs/language/css/cssWorker",label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let n;return this._getClient().then(i=>{n=i}).then(i=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(i=>n)}},T;(function(e){function n(i){return typeof i=="string"}e.is=n})(T||(T={}));var O;(function(e){function n(i){return typeof i=="string"}e.is=n})(O||(O={}));var Y;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function n(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=n})(Y||(Y={}));var M;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function n(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=n})(M||(M={}));var w;(function(e){function n(r,t){return r===Number.MAX_VALUE&&(r=M.MAX_VALUE),t===Number.MAX_VALUE&&(t=M.MAX_VALUE),{line:r,character:t}}e.create=n;function i(r){let t=r;return a.objectLiteral(t)&&a.uinteger(t.line)&&a.uinteger(t.character)}e.is=i})(w||(w={}));var h;(function(e){function n(r,t,o,s){if(a.uinteger(r)&&a.uinteger(t)&&a.uinteger(o)&&a.uinteger(s))return{start:w.create(r,t),end:w.create(o,s)};if(w.is(r)&&w.is(t))return{start:r,end:t};throw new Error(`Range#create called with invalid arguments[${r}, ${t}, ${o}, ${s}]`)}e.create=n;function i(r){let t=r;return a.objectLiteral(t)&&w.is(t.start)&&w.is(t.end)}e.is=i})(h||(h={}));var C;(function(e){function n(r,t){return{uri:r,range:t}}e.create=n;function i(r){let t=r;return a.objectLiteral(t)&&h.is(t.range)&&(a.string(t.uri)||a.undefined(t.uri))}e.is=i})(C||(C={}));var Z;(function(e){function n(r,t,o,s){return{targetUri:r,targetRange:t,targetSelectionRange:o,originSelectionRange:s}}e.create=n;function i(r){let t=r;return a.objectLiteral(t)&&h.is(t.targetRange)&&a.string(t.targetUri)&&h.is(t.targetSelectionRange)&&(h.is(t.originSelectionRange)||a.undefined(t.originSelectionRange))}e.is=i})(Z||(Z={}));var S;(function(e){function n(r,t,o,s){return{red:r,green:t,blue:o,alpha:s}}e.create=n;function i(r){const t=r;return a.objectLiteral(t)&&a.numberRange(t.red,0,1)&&a.numberRange(t.green,0,1)&&a.numberRange(t.blue,0,1)&&a.numberRange(t.alpha,0,1)}e.is=i})(S||(S={}));var K;(function(e){function n(r,t){return{range:r,color:t}}e.create=n;function i(r){const t=r;return a.objectLiteral(t)&&h.is(t.range)&&S.is(t.color)}e.is=i})(K||(K={}));var ee;(function(e){function n(r,t,o){return{label:r,textEdit:t,additionalTextEdits:o}}e.create=n;function i(r){const t=r;return a.objectLiteral(t)&&a.string(t.label)&&(a.undefined(t.textEdit)||E.is(t))&&(a.undefined(t.additionalTextEdits)||a.typedArray(t.additionalTextEdits,E.is))}e.is=i})(ee||(ee={}));var A;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(A||(A={}));var te;(function(e){function n(r,t,o,s,u,f){const c={startLine:r,endLine:t};return a.defined(o)&&(c.startCharacter=o),a.defined(s)&&(c.endCharacter=s),a.defined(u)&&(c.kind=u),a.defined(f)&&(c.collapsedText=f),c}e.create=n;function i(r){const t=r;return a.objectLiteral(t)&&a.uinteger(t.startLine)&&a.uinteger(t.startLine)&&(a.undefined(t.startCharacter)||a.uinteger(t.startCharacter))&&(a.undefined(t.endCharacter)||a.uinteger(t.endCharacter))&&(a.undefined(t.kind)||a.string(t.kind))}e.is=i})(te||(te={}));var U;(function(e){function n(r,t){return{location:r,message:t}}e.create=n;function i(r){let t=r;return a.defined(t)&&C.is(t.location)&&a.string(t.message)}e.is=i})(U||(U={}));var x;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(x||(x={}));var re;(function(e){e.Unnecessary=1,e.Deprecated=2})(re||(re={}));var ne;(function(e){function n(i){const r=i;return a.objectLiteral(r)&&a.string(r.href)}e.is=n})(ne||(ne={}));var y;(function(e){function n(r,t,o,s,u,f){let c={range:r,message:t};return a.defined(o)&&(c.severity=o),a.defined(s)&&(c.code=s),a.defined(u)&&(c.source=u),a.defined(f)&&(c.relatedInformation=f),c}e.create=n;function i(r){var t;let o=r;return a.defined(o)&&h.is(o.range)&&a.string(o.message)&&(a.number(o.severity)||a.undefined(o.severity))&&(a.integer(o.code)||a.string(o.code)||a.undefined(o.code))&&(a.undefined(o.codeDescription)||a.string((t=o.codeDescription)===null||t===void 0?void 0:t.href))&&(a.string(o.source)||a.undefined(o.source))&&(a.undefined(o.relatedInformation)||a.typedArray(o.relatedInformation,U.is))}e.is=i})(y||(y={}));var I;(function(e){function n(r,t,...o){let s={title:r,command:t};return a.defined(o)&&o.length>0&&(s.arguments=o),s}e.create=n;function i(r){let t=r;return a.defined(t)&&a.string(t.title)&&a.string(t.command)}e.is=i})(I||(I={}));var E;(function(e){function n(o,s){return{range:o,newText:s}}e.replace=n;function i(o,s){return{range:{start:o,end:o},newText:s}}e.insert=i;function r(o){return{range:o,newText:""}}e.del=r;function t(o){const s=o;return a.objectLiteral(s)&&a.string(s.newText)&&h.is(s.range)}e.is=t})(E||(E={}));var V;(function(e){function n(r,t,o){const s={label:r};return t!==void 0&&(s.needsConfirmation=t),o!==void 0&&(s.description=o),s}e.create=n;function i(r){const t=r;return a.objectLiteral(t)&&a.string(t.label)&&(a.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(a.string(t.description)||t.description===void 0)}e.is=i})(V||(V={}));var L;(function(e){function n(i){const r=i;return a.string(r)}e.is=n})(L||(L={}));var ie;(function(e){function n(o,s,u){return{range:o,newText:s,annotationId:u}}e.replace=n;function i(o,s,u){return{range:{start:o,end:o},newText:s,annotationId:u}}e.insert=i;function r(o,s){return{range:o,newText:"",annotationId:s}}e.del=r;function t(o){const s=o;return E.is(s)&&(V.is(s.annotationId)||L.is(s.annotationId))}e.is=t})(ie||(ie={}));var W;(function(e){function n(r,t){return{textDocument:r,edits:t}}e.create=n;function i(r){let t=r;return a.defined(t)&&B.is(t.textDocument)&&Array.isArray(t.edits)}e.is=i})(W||(W={}));var H;(function(e){function n(r,t,o){let s={kind:"create",uri:r};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(s.options=t),o!==void 0&&(s.annotationId=o),s}e.create=n;function i(r){let t=r;return t&&t.kind==="create"&&a.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||a.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||a.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||L.is(t.annotationId))}e.is=i})(H||(H={}));var X;(function(e){function n(r,t,o,s){let u={kind:"rename",oldUri:r,newUri:t};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(u.options=o),s!==void 0&&(u.annotationId=s),u}e.create=n;function i(r){let t=r;return t&&t.kind==="rename"&&a.string(t.oldUri)&&a.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||a.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||a.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||L.is(t.annotationId))}e.is=i})(X||(X={}));var $;(function(e){function n(r,t,o){let s={kind:"delete",uri:r};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(s.options=t),o!==void 0&&(s.annotationId=o),s}e.create=n;function i(r){let t=r;return t&&t.kind==="delete"&&a.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||a.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||a.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||L.is(t.annotationId))}e.is=i})($||($={}));var z;(function(e){function n(i){let r=i;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(t=>a.string(t.kind)?H.is(t)||X.is(t)||$.is(t):W.is(t)))}e.is=n})(z||(z={}));var oe;(function(e){function n(r){return{uri:r}}e.create=n;function i(r){let t=r;return a.defined(t)&&a.string(t.uri)}e.is=i})(oe||(oe={}));var ae;(function(e){function n(r,t){return{uri:r,version:t}}e.create=n;function i(r){let t=r;return a.defined(t)&&a.string(t.uri)&&a.integer(t.version)}e.is=i})(ae||(ae={}));var B;(function(e){function n(r,t){return{uri:r,version:t}}e.create=n;function i(r){let t=r;return a.defined(t)&&a.string(t.uri)&&(t.version===null||a.integer(t.version))}e.is=i})(B||(B={}));var se;(function(e){function n(r,t,o,s){return{uri:r,languageId:t,version:o,text:s}}e.create=n;function i(r){let t=r;return a.defined(t)&&a.string(t.uri)&&a.string(t.languageId)&&a.integer(t.version)&&a.string(t.text)}e.is=i})(se||(se={}));var q;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function n(i){const r=i;return r===e.PlainText||r===e.Markdown}e.is=n})(q||(q={}));var P;(function(e){function n(i){const r=i;return a.objectLiteral(i)&&q.is(r.kind)&&a.string(r.value)}e.is=n})(P||(P={}));var v;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(v||(v={}));var Q;(function(e){e.PlainText=1,e.Snippet=2})(Q||(Q={}));var ue;(function(e){e.Deprecated=1})(ue||(ue={}));var ce;(function(e){function n(r,t,o){return{newText:r,insert:t,replace:o}}e.create=n;function i(r){const t=r;return t&&a.string(t.newText)&&h.is(t.insert)&&h.is(t.replace)}e.is=i})(ce||(ce={}));var de;(function(e){e.asIs=1,e.adjustIndentation=2})(de||(de={}));var le;(function(e){function n(i){const r=i;return r&&(a.string(r.detail)||r.detail===void 0)&&(a.string(r.description)||r.description===void 0)}e.is=n})(le||(le={}));var fe;(function(e){function n(i){return{label:i}}e.create=n})(fe||(fe={}));var ge;(function(e){function n(i,r){return{items:i||[],isIncomplete:!!r}}e.create=n})(ge||(ge={}));var F;(function(e){function n(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=n;function i(r){const t=r;return a.string(t)||a.objectLiteral(t)&&a.string(t.language)&&a.string(t.value)}e.is=i})(F||(F={}));var he;(function(e){function n(i){let r=i;return!!r&&a.objectLiteral(r)&&(P.is(r.contents)||F.is(r.contents)||a.typedArray(r.contents,F.is))&&(i.range===void 0||h.is(i.range))}e.is=n})(he||(he={}));var ve;(function(e){function n(i,r){return r?{label:i,documentation:r}:{label:i}}e.create=n})(ve||(ve={}));var pe;(function(e){function n(i,r,...t){let o={label:i};return a.defined(r)&&(o.documentation=r),a.defined(t)?o.parameters=t:o.parameters=[],o}e.create=n})(pe||(pe={}));var R;(function(e){e.Text=1,e.Read=2,e.Write=3})(R||(R={}));var me;(function(e){function n(i,r){let t={range:i};return a.number(r)&&(t.kind=r),t}e.create=n})(me||(me={}));var p;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(p||(p={}));var _e;(function(e){e.Deprecated=1})(_e||(_e={}));var be;(function(e){function n(i,r,t,o,s){let u={name:i,kind:r,location:{uri:o,range:t}};return s&&(u.containerName=s),u}e.create=n})(be||(be={}));var we;(function(e){function n(i,r,t,o){return o!==void 0?{name:i,kind:r,location:{uri:t,range:o}}:{name:i,kind:r,location:{uri:t}}}e.create=n})(we||(we={}));var ke;(function(e){function n(r,t,o,s,u,f){let c={name:r,detail:t,kind:o,range:s,selectionRange:u};return f!==void 0&&(c.children=f),c}e.create=n;function i(r){let t=r;return t&&a.string(t.name)&&a.number(t.kind)&&h.is(t.range)&&h.is(t.selectionRange)&&(t.detail===void 0||a.string(t.detail))&&(t.deprecated===void 0||a.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=i})(ke||(ke={}));var xe;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(xe||(xe={}));var j;(function(e){e.Invoked=1,e.Automatic=2})(j||(j={}));var Ie;(function(e){function n(r,t,o){let s={diagnostics:r};return t!=null&&(s.only=t),o!=null&&(s.triggerKind=o),s}e.create=n;function i(r){let t=r;return a.defined(t)&&a.typedArray(t.diagnostics,y.is)&&(t.only===void 0||a.typedArray(t.only,a.string))&&(t.triggerKind===void 0||t.triggerKind===j.Invoked||t.triggerKind===j.Automatic)}e.is=i})(Ie||(Ie={}));var Ee;(function(e){function n(r,t,o){let s={title:r},u=!0;return typeof t=="string"?(u=!1,s.kind=t):I.is(t)?s.command=t:s.edit=t,u&&o!==void 0&&(s.kind=o),s}e.create=n;function i(r){let t=r;return t&&a.string(t.title)&&(t.diagnostics===void 0||a.typedArray(t.diagnostics,y.is))&&(t.kind===void 0||a.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||I.is(t.command))&&(t.isPreferred===void 0||a.boolean(t.isPreferred))&&(t.edit===void 0||z.is(t.edit))}e.is=i})(Ee||(Ee={}));var Le;(function(e){function n(r,t){let o={range:r};return a.defined(t)&&(o.data=t),o}e.create=n;function i(r){let t=r;return a.defined(t)&&h.is(t.range)&&(a.undefined(t.command)||I.is(t.command))}e.is=i})(Le||(Le={}));var Ae;(function(e){function n(r,t){return{tabSize:r,insertSpaces:t}}e.create=n;function i(r){let t=r;return a.defined(t)&&a.uinteger(t.tabSize)&&a.boolean(t.insertSpaces)}e.is=i})(Ae||(Ae={}));var Re;(function(e){function n(r,t,o){return{range:r,target:t,data:o}}e.create=n;function i(r){let t=r;return a.defined(t)&&h.is(t.range)&&(a.undefined(t.target)||a.string(t.target))}e.is=i})(Re||(Re={}));var Pe;(function(e){function n(r,t){return{range:r,parent:t}}e.create=n;function i(r){let t=r;return a.objectLiteral(t)&&h.is(t.range)&&(t.parent===void 0||e.is(t.parent))}e.is=i})(Pe||(Pe={}));var De;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(De||(De={}));var Me;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Me||(Me={}));var Ce;(function(e){function n(i){const r=i;return a.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=n})(Ce||(Ce={}));var ye;(function(e){function n(r,t){return{range:r,text:t}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&a.string(t.text)}e.is=i})(ye||(ye={}));var Fe;(function(e){function n(r,t,o){return{range:r,variableName:t,caseSensitiveLookup:o}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&a.boolean(t.caseSensitiveLookup)&&(a.string(t.variableName)||t.variableName===void 0)}e.is=i})(Fe||(Fe={}));var je;(function(e){function n(r,t){return{range:r,expression:t}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&(a.string(t.expression)||t.expression===void 0)}e.is=i})(je||(je={}));var Ne;(function(e){function n(r,t){return{frameId:r,stoppedLocation:t}}e.create=n;function i(r){const t=r;return a.defined(t)&&h.is(r.stoppedLocation)}e.is=i})(Ne||(Ne={}));var G;(function(e){e.Type=1,e.Parameter=2;function n(i){return i===1||i===2}e.is=n})(G||(G={}));var J;(function(e){function n(r){return{value:r}}e.create=n;function i(r){const t=r;return a.objectLiteral(t)&&(t.tooltip===void 0||a.string(t.tooltip)||P.is(t.tooltip))&&(t.location===void 0||C.is(t.location))&&(t.command===void 0||I.is(t.command))}e.is=i})(J||(J={}));var Oe;(function(e){function n(r,t,o){const s={position:r,label:t};return o!==void 0&&(s.kind=o),s}e.create=n;function i(r){const t=r;return a.objectLiteral(t)&&w.is(t.position)&&(a.string(t.label)||a.typedArray(t.label,J.is))&&(t.kind===void 0||G.is(t.kind))&&t.textEdits===void 0||a.typedArray(t.textEdits,E.is)&&(t.tooltip===void 0||a.string(t.tooltip)||P.is(t.tooltip))&&(t.paddingLeft===void 0||a.boolean(t.paddingLeft))&&(t.paddingRight===void 0||a.boolean(t.paddingRight))}e.is=i})(Oe||(Oe={}));var Se;(function(e){function n(i){return{kind:"snippet",value:i}}e.createSnippet=n})(Se||(Se={}));var Ue;(function(e){function n(i,r,t,o){return{insertText:i,filterText:r,range:t,command:o}}e.create=n})(Ue||(Ue={}));var Ve;(function(e){function n(i){return{items:i}}e.create=n})(Ve||(Ve={}));var We;(function(e){e.Invoked=0,e.Automatic=1})(We||(We={}));var He;(function(e){function n(i,r){return{range:i,text:r}}e.create=n})(He||(He={}));var Xe;(function(e){function n(i,r){return{triggerKind:i,selectedCompletionInfo:r}}e.create=n})(Xe||(Xe={}));var $e;(function(e){function n(i){const r=i;return a.objectLiteral(r)&&O.is(r.uri)&&a.string(r.name)}e.is=n})($e||($e={}));var ze;(function(e){function n(o,s,u,f){return new ct(o,s,u,f)}e.create=n;function i(o){let s=o;return!!(a.defined(s)&&a.string(s.uri)&&(a.undefined(s.languageId)||a.string(s.languageId))&&a.uinteger(s.lineCount)&&a.func(s.getText)&&a.func(s.positionAt)&&a.func(s.offsetAt))}e.is=i;function r(o,s){let u=o.getText(),f=t(s,(g,_)=>{let b=g.range.start.line-_.range.start.line;return b===0?g.range.start.character-_.range.start.character:b}),c=u.length;for(let g=f.length-1;g>=0;g--){let _=f[g],b=o.offsetAt(_.range.start),l=o.offsetAt(_.range.end);if(l<=c)u=u.substring(0,b)+_.newText+u.substring(l,u.length);else throw new Error("Overlapping edit");c=b}return u}e.applyEdits=r;function t(o,s){if(o.length<=1)return o;const u=o.length/2|0,f=o.slice(0,u),c=o.slice(u);t(f,s),t(c,s);let g=0,_=0,b=0;for(;g0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),i=0,r=n.length;if(r===0)return w.create(0,e);for(;ie?r=o:i=o+1}let t=i-1;return w.create(t,e-n[t])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let i=n[e.line],r=e.line+1"u"}e.undefined=r;function t(l){return l===!0||l===!1}e.boolean=t;function o(l){return n.call(l)==="[object String]"}e.string=o;function s(l){return n.call(l)==="[object Number]"}e.number=s;function u(l,N,Ke){return n.call(l)==="[object Number]"&&N<=l&&l<=Ke}e.numberRange=u;function f(l){return n.call(l)==="[object Number]"&&-2147483648<=l&&l<=2147483647}e.integer=f;function c(l){return n.call(l)==="[object Number]"&&0<=l&&l<=2147483647}e.uinteger=c;function g(l){return n.call(l)==="[object Function]"}e.func=g;function _(l){return l!==null&&typeof l=="object"}e.objectLiteral=_;function b(l,N){return Array.isArray(l)&&l.every(N)}e.typedArray=b})(a||(a={}));var dt=class{constructor(e,n,i){this._languageId=e,this._worker=n,this._disposables=[],this._listener=Object.create(null);const r=o=>{let s=o.getLanguageId();if(s!==this._languageId)return;let u;this._listener[o.uri.toString()]=o.onDidChangeContent(()=>{window.clearTimeout(u),u=window.setTimeout(()=>this._doValidate(o.uri,s),500)}),this._doValidate(o.uri,s)},t=o=>{d.editor.setModelMarkers(o,this._languageId,[]);let s=o.uri.toString(),u=this._listener[s];u&&(u.dispose(),delete this._listener[s])};this._disposables.push(d.editor.onDidCreateModel(r)),this._disposables.push(d.editor.onWillDisposeModel(t)),this._disposables.push(d.editor.onDidChangeModelLanguage(o=>{t(o.model),r(o.model)})),this._disposables.push(i(o=>{d.editor.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&(t(s),r(s))})})),this._disposables.push({dispose:()=>{d.editor.getModels().forEach(t);for(let o in this._listener)this._listener[o].dispose()}}),d.editor.getModels().forEach(r)}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables.length=0}_doValidate(e,n){this._worker(e).then(i=>i.doValidation(e.toString())).then(i=>{const r=i.map(o=>ft(e,o));let t=d.editor.getModel(e);t&&t.getLanguageId()===n&&d.editor.setModelMarkers(t,n,r)}).then(void 0,i=>{console.error(i)})}};function lt(e){switch(e){case x.Error:return d.MarkerSeverity.Error;case x.Warning:return d.MarkerSeverity.Warning;case x.Information:return d.MarkerSeverity.Info;case x.Hint:return d.MarkerSeverity.Hint;default:return d.MarkerSeverity.Info}}function ft(e,n){let i=typeof n.code=="number"?String(n.code):n.code;return{severity:lt(n.severity),startLineNumber:n.range.start.line+1,startColumn:n.range.start.character+1,endLineNumber:n.range.end.line+1,endColumn:n.range.end.character+1,message:n.message,code:i,source:n.source}}var gt=class{constructor(e,n){this._worker=e,this._triggerCharacters=n}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(e,n,i,r){const t=e.uri;return this._worker(t).then(o=>o.doComplete(t.toString(),k(n))).then(o=>{if(!o)return;const s=e.getWordUntilPosition(n),u=new d.Range(n.lineNumber,s.startColumn,n.lineNumber,s.endColumn),f=o.items.map(c=>{const g={label:c.label,insertText:c.insertText||c.label,sortText:c.sortText,filterText:c.filterText,documentation:c.documentation,detail:c.detail,command:pt(c.command),range:u,kind:vt(c.kind)};return c.textEdit&&(ht(c.textEdit)?g.range={insert:m(c.textEdit.insert),replace:m(c.textEdit.replace)}:g.range=m(c.textEdit.range),g.insertText=c.textEdit.newText),c.additionalTextEdits&&(g.additionalTextEdits=c.additionalTextEdits.map(D)),c.insertTextFormat===Q.Snippet&&(g.insertTextRules=d.languages.CompletionItemInsertTextRule.InsertAsSnippet),g});return{isIncomplete:o.isIncomplete,suggestions:f}})}};function k(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function Qe(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function m(e){if(e)return new d.Range(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function ht(e){return typeof e.insert<"u"&&typeof e.replace<"u"}function vt(e){const n=d.languages.CompletionItemKind;switch(e){case v.Text:return n.Text;case v.Method:return n.Method;case v.Function:return n.Function;case v.Constructor:return n.Constructor;case v.Field:return n.Field;case v.Variable:return n.Variable;case v.Class:return n.Class;case v.Interface:return n.Interface;case v.Module:return n.Module;case v.Property:return n.Property;case v.Unit:return n.Unit;case v.Value:return n.Value;case v.Enum:return n.Enum;case v.Keyword:return n.Keyword;case v.Snippet:return n.Snippet;case v.Color:return n.Color;case v.File:return n.File;case v.Reference:return n.Reference}return n.Property}function D(e){if(e)return{range:m(e.range),text:e.newText}}function pt(e){return e&&e.command==="editor.action.triggerSuggest"?{id:e.command,title:e.title,arguments:e.arguments}:void 0}var mt=class{constructor(e){this._worker=e}provideHover(e,n,i){let r=e.uri;return this._worker(r).then(t=>t.doHover(r.toString(),k(n))).then(t=>{if(t)return{range:m(t.range),contents:bt(t.contents)}})}};function _t(e){return e&&typeof e=="object"&&typeof e.kind=="string"}function Be(e){return typeof e=="string"?{value:e}:_t(e)?e.kind==="plaintext"?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+` +`+e.value+"\n```\n"}}function bt(e){if(e)return Array.isArray(e)?e.map(Be):[Be(e)]}var wt=class{constructor(e){this._worker=e}provideDocumentHighlights(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.findDocumentHighlights(r.toString(),k(n))).then(t=>{if(t)return t.map(o=>({range:m(o.range),kind:kt(o.kind)}))})}};function kt(e){switch(e){case R.Read:return d.languages.DocumentHighlightKind.Read;case R.Write:return d.languages.DocumentHighlightKind.Write;case R.Text:return d.languages.DocumentHighlightKind.Text}return d.languages.DocumentHighlightKind.Text}var xt=class{constructor(e){this._worker=e}provideDefinition(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.findDefinition(r.toString(),k(n))).then(t=>{if(t)return[Ge(t)]})}};function Ge(e){return{uri:d.Uri.parse(e.uri),range:m(e.range)}}var It=class{constructor(e){this._worker=e}provideReferences(e,n,i,r){const t=e.uri;return this._worker(t).then(o=>o.findReferences(t.toString(),k(n))).then(o=>{if(o)return o.map(Ge)})}},Et=class{constructor(e){this._worker=e}provideRenameEdits(e,n,i,r){const t=e.uri;return this._worker(t).then(o=>o.doRename(t.toString(),k(n),i)).then(o=>Lt(o))}};function Lt(e){if(!e||!e.changes)return;let n=[];for(let i in e.changes){const r=d.Uri.parse(i);for(let t of e.changes[i])n.push({resource:r,versionId:void 0,textEdit:{range:m(t.range),text:t.newText}})}return{edits:n}}var At=class{constructor(e){this._worker=e}provideDocumentSymbols(e,n){const i=e.uri;return this._worker(i).then(r=>r.findDocumentSymbols(i.toString())).then(r=>{if(r)return r.map(t=>Rt(t)?Je(t):{name:t.name,detail:"",containerName:t.containerName,kind:Te(t.kind),range:m(t.location.range),selectionRange:m(t.location.range),tags:[]})})}};function Rt(e){return"children"in e}function Je(e){return{name:e.name,detail:e.detail??"",kind:Te(e.kind),range:m(e.range),selectionRange:m(e.selectionRange),tags:e.tags??[],children:(e.children??[]).map(n=>Je(n))}}function Te(e){let n=d.languages.SymbolKind;switch(e){case p.File:return n.File;case p.Module:return n.Module;case p.Namespace:return n.Namespace;case p.Package:return n.Package;case p.Class:return n.Class;case p.Method:return n.Method;case p.Property:return n.Property;case p.Field:return n.Field;case p.Constructor:return n.Constructor;case p.Enum:return n.Enum;case p.Interface:return n.Interface;case p.Function:return n.Function;case p.Variable:return n.Variable;case p.Constant:return n.Constant;case p.String:return n.String;case p.Number:return n.Number;case p.Boolean:return n.Boolean;case p.Array:return n.Array}return n.Function}var St=class{constructor(e){this._worker=e}provideLinks(e,n){const i=e.uri;return this._worker(i).then(r=>r.findDocumentLinks(i.toString())).then(r=>{if(r)return{links:r.map(t=>({range:m(t.range),url:t.target}))}})}},Pt=class{constructor(e){this._worker=e}provideDocumentFormattingEdits(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.format(r.toString(),null,Ye(n)).then(o=>{if(!(!o||o.length===0))return o.map(D)}))}},Dt=class{constructor(e){this._worker=e,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(e,n,i,r){const t=e.uri;return this._worker(t).then(o=>o.format(t.toString(),Qe(n),Ye(i)).then(s=>{if(!(!s||s.length===0))return s.map(D)}))}};function Ye(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var Mt=class{constructor(e){this._worker=e}provideDocumentColors(e,n){const i=e.uri;return this._worker(i).then(r=>r.findDocumentColors(i.toString())).then(r=>{if(r)return r.map(t=>({color:t.color,range:m(t.range)}))})}provideColorPresentations(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.getColorPresentations(r.toString(),n.color,Qe(n.range))).then(t=>{if(t)return t.map(o=>{let s={label:o.label};return o.textEdit&&(s.textEdit=D(o.textEdit)),o.additionalTextEdits&&(s.additionalTextEdits=o.additionalTextEdits.map(D)),s})})}},Ct=class{constructor(e){this._worker=e}provideFoldingRanges(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.getFoldingRanges(r.toString(),n)).then(t=>{if(t)return t.map(o=>{const s={start:o.startLine+1,end:o.endLine+1};return typeof o.kind<"u"&&(s.kind=yt(o.kind)),s})})}};function yt(e){switch(e){case A.Comment:return d.languages.FoldingRangeKind.Comment;case A.Imports:return d.languages.FoldingRangeKind.Imports;case A.Region:return d.languages.FoldingRangeKind.Region}}var Ft=class{constructor(e){this._worker=e}provideSelectionRanges(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.getSelectionRanges(r.toString(),n.map(k))).then(t=>{if(t)return t.map(o=>{const s=[];for(;o;)s.push({range:m(o.range)}),o=o.parent;return s})})}};function Ut(e){const n=[],i=[],r=new ut(e);n.push(r);const t=(...s)=>r.getLanguageServiceWorker(...s);function o(){const{languageId:s,modeConfiguration:u}=e;Ze(i),u.completionItems&&i.push(d.languages.registerCompletionItemProvider(s,new gt(t,["/","-",":"]))),u.hovers&&i.push(d.languages.registerHoverProvider(s,new mt(t))),u.documentHighlights&&i.push(d.languages.registerDocumentHighlightProvider(s,new wt(t))),u.definitions&&i.push(d.languages.registerDefinitionProvider(s,new xt(t))),u.references&&i.push(d.languages.registerReferenceProvider(s,new It(t))),u.documentSymbols&&i.push(d.languages.registerDocumentSymbolProvider(s,new At(t))),u.rename&&i.push(d.languages.registerRenameProvider(s,new Et(t))),u.colors&&i.push(d.languages.registerColorProvider(s,new Mt(t))),u.foldingRanges&&i.push(d.languages.registerFoldingRangeProvider(s,new Ct(t))),u.diagnostics&&i.push(new dt(s,t,e.onDidChange)),u.selectionRanges&&i.push(d.languages.registerSelectionRangeProvider(s,new Ft(t))),u.documentFormattingEdits&&i.push(d.languages.registerDocumentFormattingEditProvider(s,new Pt(t))),u.documentRangeFormattingEdits&&i.push(d.languages.registerDocumentRangeFormattingEditProvider(s,new Dt(t)))}return o(),n.push(qe(i)),qe(n)}function qe(e){return{dispose:()=>Ze(e)}}function Ze(e){for(;e.length;)e.pop().dispose()}export{gt as CompletionAdapter,xt as DefinitionAdapter,dt as DiagnosticsAdapter,Mt as DocumentColorAdapter,Pt as DocumentFormattingEditProvider,wt as DocumentHighlightAdapter,St as DocumentLinkAdapter,Dt as DocumentRangeFormattingEditProvider,At as DocumentSymbolAdapter,Ct as FoldingRangeAdapter,mt as HoverAdapter,It as ReferenceAdapter,Et as RenameAdapter,Ft as SelectionRangeAdapter,ut as WorkerManager,k as fromPosition,Qe as fromRange,Ut as setupMode,m as toRange,D as toTextEdit}; diff --git a/week_01/test1/assets/monaco/freemarker2-BNznXqn-.js b/week_01/test1/assets/monaco/freemarker2-BNznXqn-.js new file mode 100644 index 0000000..bfed70a --- /dev/null +++ b/week_01/test1/assets/monaco/freemarker2-BNznXqn-.js @@ -0,0 +1,8 @@ +import{o as f}from"./bundled-types-CutNYhe2.js";import"../modules/vue-Bx6xSt6e.js";import"../modules/file-saver-igGfcqei.js";/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var F=Object.defineProperty,b=Object.getOwnPropertyDescriptor,x=Object.getOwnPropertyNames,$=Object.prototype.hasOwnProperty,v=(t,n,_,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of x(n))!$.call(t,o)&&o!==_&&F(t,o,{get:()=>n[o],enumerable:!(e=b(n,o))||e.enumerable});return t},E=(t,n,_)=>(v(t,n,"default"),_),r={};E(r,f);var d=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],s=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],a={close:">",id:"angle",open:"<"},u={close:"\\]",id:"bracket",open:"\\["},D={close:"[>\\]]",id:"auto",open:"[<\\[]"},k={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},p={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function l(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:` +\r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`${t.open}#(?:${s.join("|")})([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),end:new RegExp(`${t.open}/#(?:${s.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`${t.open}#(?!(?:${d.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),afterText:new RegExp(`^${t.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${t.close}$`),action:{indentAction:r.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`${t.open}#(?!(?:${d.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),action:{indentAction:r.languages.IndentAction.Indent}}]}}function g(){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],autoCloseBefore:` +\r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`[<\\[]#(?:${s.join("|")})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:new RegExp(`[<\\[]/#(?:${s.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`[<\\[]#(?!(?:${d.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:new RegExp("^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$"),action:{indentAction:r.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`[<\\[]#(?!(?:${d.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:r.languages.IndentAction.Indent}}]}}function i(t,n){const _=`_${t.id}_${n.id}`,e=c=>c.replace(/__id__/g,_),o=c=>{const m=c.source.replace(/__id__/g,_);return new RegExp(m,c.flags)};return{unicode:!0,includeLF:!1,start:e("default__id__"),ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],[e("open__id__")]:new RegExp(t.open),[e("close__id__")]:new RegExp(t.close),[e("iOpen1__id__")]:new RegExp(n.open1),[e("iOpen2__id__")]:new RegExp(n.open2),[e("iClose__id__")]:new RegExp(n.close),[e("startTag__id__")]:o(/(@open__id__)(#)/),[e("endTag__id__")]:o(/(@open__id__)(\/#)/),[e("startOrEndTag__id__")]:o(/(@open__id__)(\/?#)/),[e("closeTag1__id__")]:o(/((?:@blank)*)(@close__id__)/),[e("closeTag2__id__")]:o(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:["false","true","in","as","using"],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:["->","->"],delimiters:[";",":",",","."],stringOperators:["lte","lt","gte","gt"],noParseTags:["noparse","noParse","comment"],tokenizer:{[e("default__id__")]:[{include:e("@directive_token__id__")},{include:e("@interpolation_and_text_token__id__")}],[e("fmExpression__id__.directive")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("fmExpression__id__.interpolation")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("inParen__id__.plain")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("inParen__id__.gt")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("noSpaceExpression__id__")]:[{include:e("@no_space_expression_end_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("unifiedCall__id__")]:[{include:e("@unified_call_token__id__")}],[e("singleString__id__")]:[{include:e("@string_single_token__id__")}],[e("doubleString__id__")]:[{include:e("@string_double_token__id__")}],[e("rawSingleString__id__")]:[{include:e("@string_single_raw_token__id__")}],[e("rawDoubleString__id__")]:[{include:e("@string_double_raw_token__id__")}],[e("expressionComment__id__")]:[{include:e("@expression_comment_token__id__")}],[e("noParse__id__")]:[{include:e("@no_parse_token__id__")}],[e("terseComment__id__")]:[{include:e("@terse_comment_token__id__")}],[e("directive_token__id__")]:[[o(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{cases:{"@noParseTags":{token:"tag",next:e("@noParse__id__.$3")},"@default":{token:"tag"}}},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)(@)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive",next:e("@unifiedCall__id__")}]],[o(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)#--/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:{token:"comment",next:e("@terseComment__id__")}],[o(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag.invalid",next:e("@fmExpression__id__.directive")}]]],[e("interpolation_and_text_token__id__")]:[[o(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:n.id==="bracket"?"@brackets.interpolation":"delimiter.interpolation"},{token:n.id==="bracket"?"delimiter.interpolation":"@brackets.interpolation",next:e("@fmExpression__id__.interpolation")}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:"source"}]],[e("string_single_token__id__")]:[[/[^'\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/'/,{token:"string",next:"@pop"}]],[e("string_double_token__id__")]:[[/[^"\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/"/,{token:"string",next:"@pop"}]],[e("string_single_raw_token__id__")]:[[/[^']+/,{token:"string.raw"}],[/'/,{token:"string.raw",next:"@pop"}]],[e("string_double_raw_token__id__")]:[[/[^"]+/,{token:"string.raw"}],[/"/,{token:"string.raw",next:"@pop"}]],[e("expression_token__id__")]:[[/(r?)(['"])/,{cases:{"r'":[{token:"keyword"},{token:"string.raw",next:e("@rawSingleString__id__")}],'r"':[{token:"keyword"},{token:"string.raw",next:e("@rawDoubleString__id__")}],"'":[{token:"source"},{token:"string",next:e("@singleString__id__")}],'"':[{token:"source"},{token:"string",next:e("@doubleString__id__")}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:"number"},"@default":{token:"number.float"}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:"delimiter"},{token:""},{token:"identifier"}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:"meta.arrow"},"@delimiters":{token:"delimiter"},"@default":{token:"operators"}}}],[/@id/,{cases:{"@keywords":{token:"keyword.$0"},"@stringOperators":{token:"operators"},"@default":{token:"identifier"}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\]":{cases:{...n.id==="bracket"?{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}}:{},...t.id==="bracket"?{"$S2==directive":{token:"@brackets.directive",next:"@popall"}}:{},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\(":{token:"@brackets",next:e("@inParen__id__.gt")},"\\)":{cases:{[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\{":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\}":{cases:{...n.id==="bracket"?{}:{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}}}}],[/\$\{/,{token:"delimiter.invalid"}]],[e("blank_and_expression_comment_token__id__")]:[[/(?:@blank)+/,{token:""}],[/[<\[][#!]--/,{token:"comment",next:e("@expressionComment__id__")}]],[e("directive_end_token__id__")]:[[/>/,t.id==="bracket"?{token:"operators"}:{token:"@brackets.directive",next:"@popall"}],[o(/(\/)(@close__id__)/),[{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]]],[e("greater_operators_token__id__")]:[[/>/,{token:"operators"}],[/>=/,{token:"operators"}]],[e("no_space_expression_end_token__id__")]:[[/(?:@blank)+/,{token:"",switchTo:e("@fmExpression__id__.directive")}]],[e("unified_call_token__id__")]:[[/(@id)((?:@blank)+)/,[{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(@id)(\/?)(@close__id__)/),[{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]],[/./,{token:"@rematch",next:e("@noSpaceExpression__id__")}]],[e("no_parse_token__id__")]:[[o(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:""},{token:"@brackets.directive",next:"@popall"}],"$S2==comment":[{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"}],"@default":[{token:"source"},{token:"source"},{token:"source"},{token:"source"},{token:"source"}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:"comment"},"@default":{token:"source"}}}]],[e("expression_comment_token__id__")]:[[/--[>\]]/,{token:"comment",next:"@pop"}],[/[^\->\]]+|[>\]\-]/,{token:"comment"}]],[e("terse_comment_token__id__")]:[[o(/--(?:@close__id__)/),{token:"comment",next:"@popall"}],[/[^<\[\-]+|[<\[\-]/,{token:"comment"}]]}}}function A(t){const n=i(a,t),_=i(u,t),e=i(D,t);return{...n,..._,...e,unicode:!0,includeLF:!1,start:`default_auto_${t.id}`,ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{...n.tokenizer,..._.tokenizer,...e.tokenizer}}}var T={conf:l(a),language:i(a,k)},h={conf:l(u),language:i(u,k)},S={conf:l(a),language:i(a,p)},P={conf:l(u),language:i(u,p)},y={conf:g(),language:A(k)},I={conf:g(),language:A(p)};export{S as TagAngleInterpolationBracket,T as TagAngleInterpolationDollar,I as TagAutoInterpolationBracket,y as TagAutoInterpolationDollar,P as TagBracketInterpolationBracket,h as TagBracketInterpolationDollar}; diff --git a/week_01/test1/assets/monaco/handlebars-BeFNmT0z.js b/week_01/test1/assets/monaco/handlebars-BeFNmT0z.js new file mode 100644 index 0000000..46b3965 --- /dev/null +++ b/week_01/test1/assets/monaco/handlebars-BeFNmT0z.js @@ -0,0 +1,6 @@ +import{o as i}from"./bundled-types-CutNYhe2.js";import"../modules/vue-Bx6xSt6e.js";import"../modules/file-saver-igGfcqei.js";/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var l=Object.defineProperty,s=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,c=Object.prototype.hasOwnProperty,p=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of d(e))!c.call(t,n)&&n!==r&&l(t,n,{get:()=>e[n],enumerable:!(o=s(e,n))||o.enumerable});return t},h=(t,e,r)=>(p(t,e,"default"),r),a={};h(a,i);var m=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],k={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[[""],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${m.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:a.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${m.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:a.languages.IndentAction.Indent}}]},x={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};export{k as conf,x as language}; diff --git a/week_01/test1/assets/monaco/html-DWqM5c3Y.js b/week_01/test1/assets/monaco/html-DWqM5c3Y.js new file mode 100644 index 0000000..19c439a --- /dev/null +++ b/week_01/test1/assets/monaco/html-DWqM5c3Y.js @@ -0,0 +1,6 @@ +import{o as s}from"./bundled-types-CutNYhe2.js";import"../modules/vue-Bx6xSt6e.js";import"../modules/file-saver-igGfcqei.js";/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var p=Object.defineProperty,d=Object.getOwnPropertyDescriptor,m=Object.getOwnPropertyNames,l=Object.prototype.hasOwnProperty,c=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of m(e))!l.call(t,r)&&r!==n&&p(t,r,{get:()=>e[r],enumerable:!(o=d(e,r))||o.enumerable});return t},u=(t,e,n)=>(c(t,e,"default"),n),i={};u(i,s);var a=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],k={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${a.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:i.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${a.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:i.languages.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},g={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{k as conf,g as language}; diff --git a/week_01/test1/assets/monaco/htmlMode-DWjPXI9q.js b/week_01/test1/assets/monaco/htmlMode-DWjPXI9q.js new file mode 100644 index 0000000..e46ff8e --- /dev/null +++ b/week_01/test1/assets/monaco/htmlMode-DWjPXI9q.js @@ -0,0 +1,9 @@ +import{o as lt}from"./bundled-types-CutNYhe2.js";import"../modules/vue-Bx6xSt6e.js";import"../modules/file-saver-igGfcqei.js";/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var ft=Object.defineProperty,gt=Object.getOwnPropertyDescriptor,ht=Object.getOwnPropertyNames,vt=Object.prototype.hasOwnProperty,pt=(e,n,i,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of ht(n))!vt.call(e,t)&&t!==i&&ft(e,t,{get:()=>n[t],enumerable:!(r=gt(n,t))||r.enumerable});return e},mt=(e,n,i)=>(pt(e,n,"default"),i),c={};mt(c,lt);var _t=2*60*1e3,Qe=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>_t&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=c.editor.createWebWorker({moduleId:"vs/language/html/htmlWorker",createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let n;return this._getClient().then(i=>{n=i}).then(i=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(i=>n)}},J;(function(e){function n(i){return typeof i=="string"}e.is=n})(J||(J={}));var S;(function(e){function n(i){return typeof i=="string"}e.is=n})(S||(S={}));var Y;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function n(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=n})(Y||(Y={}));var M;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function n(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=n})(M||(M={}));var b;(function(e){function n(r,t){return r===Number.MAX_VALUE&&(r=M.MAX_VALUE),t===Number.MAX_VALUE&&(t=M.MAX_VALUE),{line:r,character:t}}e.create=n;function i(r){let t=r;return a.objectLiteral(t)&&a.uinteger(t.line)&&a.uinteger(t.character)}e.is=i})(b||(b={}));var h;(function(e){function n(r,t,o,s){if(a.uinteger(r)&&a.uinteger(t)&&a.uinteger(o)&&a.uinteger(s))return{start:b.create(r,t),end:b.create(o,s)};if(b.is(r)&&b.is(t))return{start:r,end:t};throw new Error(`Range#create called with invalid arguments[${r}, ${t}, ${o}, ${s}]`)}e.create=n;function i(r){let t=r;return a.objectLiteral(t)&&b.is(t.start)&&b.is(t.end)}e.is=i})(h||(h={}));var C;(function(e){function n(r,t){return{uri:r,range:t}}e.create=n;function i(r){let t=r;return a.objectLiteral(t)&&h.is(t.range)&&(a.string(t.uri)||a.undefined(t.uri))}e.is=i})(C||(C={}));var Z;(function(e){function n(r,t,o,s){return{targetUri:r,targetRange:t,targetSelectionRange:o,originSelectionRange:s}}e.create=n;function i(r){let t=r;return a.objectLiteral(t)&&h.is(t.targetRange)&&a.string(t.targetUri)&&h.is(t.targetSelectionRange)&&(h.is(t.originSelectionRange)||a.undefined(t.originSelectionRange))}e.is=i})(Z||(Z={}));var O;(function(e){function n(r,t,o,s){return{red:r,green:t,blue:o,alpha:s}}e.create=n;function i(r){const t=r;return a.objectLiteral(t)&&a.numberRange(t.red,0,1)&&a.numberRange(t.green,0,1)&&a.numberRange(t.blue,0,1)&&a.numberRange(t.alpha,0,1)}e.is=i})(O||(O={}));var K;(function(e){function n(r,t){return{range:r,color:t}}e.create=n;function i(r){const t=r;return a.objectLiteral(t)&&h.is(t.range)&&O.is(t.color)}e.is=i})(K||(K={}));var ee;(function(e){function n(r,t,o){return{label:r,textEdit:t,additionalTextEdits:o}}e.create=n;function i(r){const t=r;return a.objectLiteral(t)&&a.string(t.label)&&(a.undefined(t.textEdit)||E.is(t))&&(a.undefined(t.additionalTextEdits)||a.typedArray(t.additionalTextEdits,E.is))}e.is=i})(ee||(ee={}));var A;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(A||(A={}));var te;(function(e){function n(r,t,o,s,u,f){const d={startLine:r,endLine:t};return a.defined(o)&&(d.startCharacter=o),a.defined(s)&&(d.endCharacter=s),a.defined(u)&&(d.kind=u),a.defined(f)&&(d.collapsedText=f),d}e.create=n;function i(r){const t=r;return a.objectLiteral(t)&&a.uinteger(t.startLine)&&a.uinteger(t.startLine)&&(a.undefined(t.startCharacter)||a.uinteger(t.startCharacter))&&(a.undefined(t.endCharacter)||a.uinteger(t.endCharacter))&&(a.undefined(t.kind)||a.string(t.kind))}e.is=i})(te||(te={}));var U;(function(e){function n(r,t){return{location:r,message:t}}e.create=n;function i(r){let t=r;return a.defined(t)&&C.is(t.location)&&a.string(t.message)}e.is=i})(U||(U={}));var x;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(x||(x={}));var re;(function(e){e.Unnecessary=1,e.Deprecated=2})(re||(re={}));var ne;(function(e){function n(i){const r=i;return a.objectLiteral(r)&&a.string(r.href)}e.is=n})(ne||(ne={}));var F;(function(e){function n(r,t,o,s,u,f){let d={range:r,message:t};return a.defined(o)&&(d.severity=o),a.defined(s)&&(d.code=s),a.defined(u)&&(d.source=u),a.defined(f)&&(d.relatedInformation=f),d}e.create=n;function i(r){var t;let o=r;return a.defined(o)&&h.is(o.range)&&a.string(o.message)&&(a.number(o.severity)||a.undefined(o.severity))&&(a.integer(o.code)||a.string(o.code)||a.undefined(o.code))&&(a.undefined(o.codeDescription)||a.string((t=o.codeDescription)===null||t===void 0?void 0:t.href))&&(a.string(o.source)||a.undefined(o.source))&&(a.undefined(o.relatedInformation)||a.typedArray(o.relatedInformation,U.is))}e.is=i})(F||(F={}));var I;(function(e){function n(r,t,...o){let s={title:r,command:t};return a.defined(o)&&o.length>0&&(s.arguments=o),s}e.create=n;function i(r){let t=r;return a.defined(t)&&a.string(t.title)&&a.string(t.command)}e.is=i})(I||(I={}));var E;(function(e){function n(o,s){return{range:o,newText:s}}e.replace=n;function i(o,s){return{range:{start:o,end:o},newText:s}}e.insert=i;function r(o){return{range:o,newText:""}}e.del=r;function t(o){const s=o;return a.objectLiteral(s)&&a.string(s.newText)&&h.is(s.range)}e.is=t})(E||(E={}));var V;(function(e){function n(r,t,o){const s={label:r};return t!==void 0&&(s.needsConfirmation=t),o!==void 0&&(s.description=o),s}e.create=n;function i(r){const t=r;return a.objectLiteral(t)&&a.string(t.label)&&(a.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(a.string(t.description)||t.description===void 0)}e.is=i})(V||(V={}));var L;(function(e){function n(i){const r=i;return a.string(r)}e.is=n})(L||(L={}));var ie;(function(e){function n(o,s,u){return{range:o,newText:s,annotationId:u}}e.replace=n;function i(o,s,u){return{range:{start:o,end:o},newText:s,annotationId:u}}e.insert=i;function r(o,s){return{range:o,newText:"",annotationId:s}}e.del=r;function t(o){const s=o;return E.is(s)&&(V.is(s.annotationId)||L.is(s.annotationId))}e.is=t})(ie||(ie={}));var W;(function(e){function n(r,t){return{textDocument:r,edits:t}}e.create=n;function i(r){let t=r;return a.defined(t)&&B.is(t.textDocument)&&Array.isArray(t.edits)}e.is=i})(W||(W={}));var H;(function(e){function n(r,t,o){let s={kind:"create",uri:r};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(s.options=t),o!==void 0&&(s.annotationId=o),s}e.create=n;function i(r){let t=r;return t&&t.kind==="create"&&a.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||a.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||a.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||L.is(t.annotationId))}e.is=i})(H||(H={}));var X;(function(e){function n(r,t,o,s){let u={kind:"rename",oldUri:r,newUri:t};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(u.options=o),s!==void 0&&(u.annotationId=s),u}e.create=n;function i(r){let t=r;return t&&t.kind==="rename"&&a.string(t.oldUri)&&a.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||a.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||a.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||L.is(t.annotationId))}e.is=i})(X||(X={}));var $;(function(e){function n(r,t,o){let s={kind:"delete",uri:r};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(s.options=t),o!==void 0&&(s.annotationId=o),s}e.create=n;function i(r){let t=r;return t&&t.kind==="delete"&&a.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||a.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||a.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||L.is(t.annotationId))}e.is=i})($||($={}));var z;(function(e){function n(i){let r=i;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(t=>a.string(t.kind)?H.is(t)||X.is(t)||$.is(t):W.is(t)))}e.is=n})(z||(z={}));var oe;(function(e){function n(r){return{uri:r}}e.create=n;function i(r){let t=r;return a.defined(t)&&a.string(t.uri)}e.is=i})(oe||(oe={}));var ae;(function(e){function n(r,t){return{uri:r,version:t}}e.create=n;function i(r){let t=r;return a.defined(t)&&a.string(t.uri)&&a.integer(t.version)}e.is=i})(ae||(ae={}));var B;(function(e){function n(r,t){return{uri:r,version:t}}e.create=n;function i(r){let t=r;return a.defined(t)&&a.string(t.uri)&&(t.version===null||a.integer(t.version))}e.is=i})(B||(B={}));var se;(function(e){function n(r,t,o,s){return{uri:r,languageId:t,version:o,text:s}}e.create=n;function i(r){let t=r;return a.defined(t)&&a.string(t.uri)&&a.string(t.languageId)&&a.integer(t.version)&&a.string(t.text)}e.is=i})(se||(se={}));var q;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function n(i){const r=i;return r===e.PlainText||r===e.Markdown}e.is=n})(q||(q={}));var P;(function(e){function n(i){const r=i;return a.objectLiteral(i)&&q.is(r.kind)&&a.string(r.value)}e.is=n})(P||(P={}));var v;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(v||(v={}));var Q;(function(e){e.PlainText=1,e.Snippet=2})(Q||(Q={}));var ue;(function(e){e.Deprecated=1})(ue||(ue={}));var ce;(function(e){function n(r,t,o){return{newText:r,insert:t,replace:o}}e.create=n;function i(r){const t=r;return t&&a.string(t.newText)&&h.is(t.insert)&&h.is(t.replace)}e.is=i})(ce||(ce={}));var de;(function(e){e.asIs=1,e.adjustIndentation=2})(de||(de={}));var le;(function(e){function n(i){const r=i;return r&&(a.string(r.detail)||r.detail===void 0)&&(a.string(r.description)||r.description===void 0)}e.is=n})(le||(le={}));var fe;(function(e){function n(i){return{label:i}}e.create=n})(fe||(fe={}));var ge;(function(e){function n(i,r){return{items:i||[],isIncomplete:!!r}}e.create=n})(ge||(ge={}));var y;(function(e){function n(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=n;function i(r){const t=r;return a.string(t)||a.objectLiteral(t)&&a.string(t.language)&&a.string(t.value)}e.is=i})(y||(y={}));var he;(function(e){function n(i){let r=i;return!!r&&a.objectLiteral(r)&&(P.is(r.contents)||y.is(r.contents)||a.typedArray(r.contents,y.is))&&(i.range===void 0||h.is(i.range))}e.is=n})(he||(he={}));var ve;(function(e){function n(i,r){return r?{label:i,documentation:r}:{label:i}}e.create=n})(ve||(ve={}));var pe;(function(e){function n(i,r,...t){let o={label:i};return a.defined(r)&&(o.documentation=r),a.defined(t)?o.parameters=t:o.parameters=[],o}e.create=n})(pe||(pe={}));var R;(function(e){e.Text=1,e.Read=2,e.Write=3})(R||(R={}));var me;(function(e){function n(i,r){let t={range:i};return a.number(r)&&(t.kind=r),t}e.create=n})(me||(me={}));var p;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(p||(p={}));var _e;(function(e){e.Deprecated=1})(_e||(_e={}));var we;(function(e){function n(i,r,t,o,s){let u={name:i,kind:r,location:{uri:o,range:t}};return s&&(u.containerName=s),u}e.create=n})(we||(we={}));var be;(function(e){function n(i,r,t,o){return o!==void 0?{name:i,kind:r,location:{uri:t,range:o}}:{name:i,kind:r,location:{uri:t}}}e.create=n})(be||(be={}));var ke;(function(e){function n(r,t,o,s,u,f){let d={name:r,detail:t,kind:o,range:s,selectionRange:u};return f!==void 0&&(d.children=f),d}e.create=n;function i(r){let t=r;return t&&a.string(t.name)&&a.number(t.kind)&&h.is(t.range)&&h.is(t.selectionRange)&&(t.detail===void 0||a.string(t.detail))&&(t.deprecated===void 0||a.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=i})(ke||(ke={}));var xe;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(xe||(xe={}));var j;(function(e){e.Invoked=1,e.Automatic=2})(j||(j={}));var Ie;(function(e){function n(r,t,o){let s={diagnostics:r};return t!=null&&(s.only=t),o!=null&&(s.triggerKind=o),s}e.create=n;function i(r){let t=r;return a.defined(t)&&a.typedArray(t.diagnostics,F.is)&&(t.only===void 0||a.typedArray(t.only,a.string))&&(t.triggerKind===void 0||t.triggerKind===j.Invoked||t.triggerKind===j.Automatic)}e.is=i})(Ie||(Ie={}));var Ee;(function(e){function n(r,t,o){let s={title:r},u=!0;return typeof t=="string"?(u=!1,s.kind=t):I.is(t)?s.command=t:s.edit=t,u&&o!==void 0&&(s.kind=o),s}e.create=n;function i(r){let t=r;return t&&a.string(t.title)&&(t.diagnostics===void 0||a.typedArray(t.diagnostics,F.is))&&(t.kind===void 0||a.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||I.is(t.command))&&(t.isPreferred===void 0||a.boolean(t.isPreferred))&&(t.edit===void 0||z.is(t.edit))}e.is=i})(Ee||(Ee={}));var Le;(function(e){function n(r,t){let o={range:r};return a.defined(t)&&(o.data=t),o}e.create=n;function i(r){let t=r;return a.defined(t)&&h.is(t.range)&&(a.undefined(t.command)||I.is(t.command))}e.is=i})(Le||(Le={}));var Ae;(function(e){function n(r,t){return{tabSize:r,insertSpaces:t}}e.create=n;function i(r){let t=r;return a.defined(t)&&a.uinteger(t.tabSize)&&a.boolean(t.insertSpaces)}e.is=i})(Ae||(Ae={}));var Re;(function(e){function n(r,t,o){return{range:r,target:t,data:o}}e.create=n;function i(r){let t=r;return a.defined(t)&&h.is(t.range)&&(a.undefined(t.target)||a.string(t.target))}e.is=i})(Re||(Re={}));var Pe;(function(e){function n(r,t){return{range:r,parent:t}}e.create=n;function i(r){let t=r;return a.objectLiteral(t)&&h.is(t.range)&&(t.parent===void 0||e.is(t.parent))}e.is=i})(Pe||(Pe={}));var De;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(De||(De={}));var Me;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Me||(Me={}));var Ce;(function(e){function n(i){const r=i;return a.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=n})(Ce||(Ce={}));var Fe;(function(e){function n(r,t){return{range:r,text:t}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&a.string(t.text)}e.is=i})(Fe||(Fe={}));var ye;(function(e){function n(r,t,o){return{range:r,variableName:t,caseSensitiveLookup:o}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&a.boolean(t.caseSensitiveLookup)&&(a.string(t.variableName)||t.variableName===void 0)}e.is=i})(ye||(ye={}));var je;(function(e){function n(r,t){return{range:r,expression:t}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&(a.string(t.expression)||t.expression===void 0)}e.is=i})(je||(je={}));var Ne;(function(e){function n(r,t){return{frameId:r,stoppedLocation:t}}e.create=n;function i(r){const t=r;return a.defined(t)&&h.is(r.stoppedLocation)}e.is=i})(Ne||(Ne={}));var T;(function(e){e.Type=1,e.Parameter=2;function n(i){return i===1||i===2}e.is=n})(T||(T={}));var G;(function(e){function n(r){return{value:r}}e.create=n;function i(r){const t=r;return a.objectLiteral(t)&&(t.tooltip===void 0||a.string(t.tooltip)||P.is(t.tooltip))&&(t.location===void 0||C.is(t.location))&&(t.command===void 0||I.is(t.command))}e.is=i})(G||(G={}));var Se;(function(e){function n(r,t,o){const s={position:r,label:t};return o!==void 0&&(s.kind=o),s}e.create=n;function i(r){const t=r;return a.objectLiteral(t)&&b.is(t.position)&&(a.string(t.label)||a.typedArray(t.label,G.is))&&(t.kind===void 0||T.is(t.kind))&&t.textEdits===void 0||a.typedArray(t.textEdits,E.is)&&(t.tooltip===void 0||a.string(t.tooltip)||P.is(t.tooltip))&&(t.paddingLeft===void 0||a.boolean(t.paddingLeft))&&(t.paddingRight===void 0||a.boolean(t.paddingRight))}e.is=i})(Se||(Se={}));var Oe;(function(e){function n(i){return{kind:"snippet",value:i}}e.createSnippet=n})(Oe||(Oe={}));var Ue;(function(e){function n(i,r,t,o){return{insertText:i,filterText:r,range:t,command:o}}e.create=n})(Ue||(Ue={}));var Ve;(function(e){function n(i){return{items:i}}e.create=n})(Ve||(Ve={}));var We;(function(e){e.Invoked=0,e.Automatic=1})(We||(We={}));var He;(function(e){function n(i,r){return{range:i,text:r}}e.create=n})(He||(He={}));var Xe;(function(e){function n(i,r){return{triggerKind:i,selectedCompletionInfo:r}}e.create=n})(Xe||(Xe={}));var $e;(function(e){function n(i){const r=i;return a.objectLiteral(r)&&S.is(r.uri)&&a.string(r.name)}e.is=n})($e||($e={}));var ze;(function(e){function n(o,s,u,f){return new wt(o,s,u,f)}e.create=n;function i(o){let s=o;return!!(a.defined(s)&&a.string(s.uri)&&(a.undefined(s.languageId)||a.string(s.languageId))&&a.uinteger(s.lineCount)&&a.func(s.getText)&&a.func(s.positionAt)&&a.func(s.offsetAt))}e.is=i;function r(o,s){let u=o.getText(),f=t(s,(g,_)=>{let w=g.range.start.line-_.range.start.line;return w===0?g.range.start.character-_.range.start.character:w}),d=u.length;for(let g=f.length-1;g>=0;g--){let _=f[g],w=o.offsetAt(_.range.start),l=o.offsetAt(_.range.end);if(l<=d)u=u.substring(0,w)+_.newText+u.substring(l,u.length);else throw new Error("Overlapping edit");d=w}return u}e.applyEdits=r;function t(o,s){if(o.length<=1)return o;const u=o.length/2|0,f=o.slice(0,u),d=o.slice(u);t(f,s),t(d,s);let g=0,_=0,w=0;for(;g0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),i=0,r=n.length;if(r===0)return b.create(0,e);for(;ie?r=o:i=o+1}let t=i-1;return b.create(t,e-n[t])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let i=n[e.line],r=e.line+1"u"}e.undefined=r;function t(l){return l===!0||l===!1}e.boolean=t;function o(l){return n.call(l)==="[object String]"}e.string=o;function s(l){return n.call(l)==="[object Number]"}e.number=s;function u(l,N,dt){return n.call(l)==="[object Number]"&&N<=l&&l<=dt}e.numberRange=u;function f(l){return n.call(l)==="[object Number]"&&-2147483648<=l&&l<=2147483647}e.integer=f;function d(l){return n.call(l)==="[object Number]"&&0<=l&&l<=2147483647}e.uinteger=d;function g(l){return n.call(l)==="[object Function]"}e.func=g;function _(l){return l!==null&&typeof l=="object"}e.objectLiteral=_;function w(l,N){return Array.isArray(l)&&l.every(N)}e.typedArray=w})(a||(a={}));var Nt=class{constructor(e,n,i){this._languageId=e,this._worker=n,this._disposables=[],this._listener=Object.create(null);const r=o=>{let s=o.getLanguageId();if(s!==this._languageId)return;let u;this._listener[o.uri.toString()]=o.onDidChangeContent(()=>{window.clearTimeout(u),u=window.setTimeout(()=>this._doValidate(o.uri,s),500)}),this._doValidate(o.uri,s)},t=o=>{c.editor.setModelMarkers(o,this._languageId,[]);let s=o.uri.toString(),u=this._listener[s];u&&(u.dispose(),delete this._listener[s])};this._disposables.push(c.editor.onDidCreateModel(r)),this._disposables.push(c.editor.onWillDisposeModel(t)),this._disposables.push(c.editor.onDidChangeModelLanguage(o=>{t(o.model),r(o.model)})),this._disposables.push(i(o=>{c.editor.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&(t(s),r(s))})})),this._disposables.push({dispose:()=>{c.editor.getModels().forEach(t);for(let o in this._listener)this._listener[o].dispose()}}),c.editor.getModels().forEach(r)}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables.length=0}_doValidate(e,n){this._worker(e).then(i=>i.doValidation(e.toString())).then(i=>{const r=i.map(o=>kt(e,o));let t=c.editor.getModel(e);t&&t.getLanguageId()===n&&c.editor.setModelMarkers(t,n,r)}).then(void 0,i=>{console.error(i)})}};function bt(e){switch(e){case x.Error:return c.MarkerSeverity.Error;case x.Warning:return c.MarkerSeverity.Warning;case x.Information:return c.MarkerSeverity.Info;case x.Hint:return c.MarkerSeverity.Hint;default:return c.MarkerSeverity.Info}}function kt(e,n){let i=typeof n.code=="number"?String(n.code):n.code;return{severity:bt(n.severity),startLineNumber:n.range.start.line+1,startColumn:n.range.start.character+1,endLineNumber:n.range.end.line+1,endColumn:n.range.end.character+1,message:n.message,code:i,source:n.source}}var xt=class{constructor(e,n){this._worker=e,this._triggerCharacters=n}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(e,n,i,r){const t=e.uri;return this._worker(t).then(o=>o.doComplete(t.toString(),k(n))).then(o=>{if(!o)return;const s=e.getWordUntilPosition(n),u=new c.Range(n.lineNumber,s.startColumn,n.lineNumber,s.endColumn),f=o.items.map(d=>{const g={label:d.label,insertText:d.insertText||d.label,sortText:d.sortText,filterText:d.filterText,documentation:d.documentation,detail:d.detail,command:Lt(d.command),range:u,kind:Et(d.kind)};return d.textEdit&&(It(d.textEdit)?g.range={insert:m(d.textEdit.insert),replace:m(d.textEdit.replace)}:g.range=m(d.textEdit.range),g.insertText=d.textEdit.newText),d.additionalTextEdits&&(g.additionalTextEdits=d.additionalTextEdits.map(D)),d.insertTextFormat===Q.Snippet&&(g.insertTextRules=c.languages.CompletionItemInsertTextRule.InsertAsSnippet),g});return{isIncomplete:o.isIncomplete,suggestions:f}})}};function k(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function Te(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function m(e){if(e)return new c.Range(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function It(e){return typeof e.insert<"u"&&typeof e.replace<"u"}function Et(e){const n=c.languages.CompletionItemKind;switch(e){case v.Text:return n.Text;case v.Method:return n.Method;case v.Function:return n.Function;case v.Constructor:return n.Constructor;case v.Field:return n.Field;case v.Variable:return n.Variable;case v.Class:return n.Class;case v.Interface:return n.Interface;case v.Module:return n.Module;case v.Property:return n.Property;case v.Unit:return n.Unit;case v.Value:return n.Value;case v.Enum:return n.Enum;case v.Keyword:return n.Keyword;case v.Snippet:return n.Snippet;case v.Color:return n.Color;case v.File:return n.File;case v.Reference:return n.Reference}return n.Property}function D(e){if(e)return{range:m(e.range),text:e.newText}}function Lt(e){return e&&e.command==="editor.action.triggerSuggest"?{id:e.command,title:e.title,arguments:e.arguments}:void 0}var Ge=class{constructor(e){this._worker=e}provideHover(e,n,i){let r=e.uri;return this._worker(r).then(t=>t.doHover(r.toString(),k(n))).then(t=>{if(t)return{range:m(t.range),contents:Rt(t.contents)}})}};function At(e){return e&&typeof e=="object"&&typeof e.kind=="string"}function Be(e){return typeof e=="string"?{value:e}:At(e)?e.kind==="plaintext"?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+` +`+e.value+"\n```\n"}}function Rt(e){if(e)return Array.isArray(e)?e.map(Be):[Be(e)]}var Je=class{constructor(e){this._worker=e}provideDocumentHighlights(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.findDocumentHighlights(r.toString(),k(n))).then(t=>{if(t)return t.map(o=>({range:m(o.range),kind:Pt(o.kind)}))})}};function Pt(e){switch(e){case R.Read:return c.languages.DocumentHighlightKind.Read;case R.Write:return c.languages.DocumentHighlightKind.Write;case R.Text:return c.languages.DocumentHighlightKind.Text}return c.languages.DocumentHighlightKind.Text}var St=class{constructor(e){this._worker=e}provideDefinition(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.findDefinition(r.toString(),k(n))).then(t=>{if(t)return[Ye(t)]})}};function Ye(e){return{uri:c.Uri.parse(e.uri),range:m(e.range)}}var Ot=class{constructor(e){this._worker=e}provideReferences(e,n,i,r){const t=e.uri;return this._worker(t).then(o=>o.findReferences(t.toString(),k(n))).then(o=>{if(o)return o.map(Ye)})}},Ze=class{constructor(e){this._worker=e}provideRenameEdits(e,n,i,r){const t=e.uri;return this._worker(t).then(o=>o.doRename(t.toString(),k(n),i)).then(o=>Dt(o))}};function Dt(e){if(!e||!e.changes)return;let n=[];for(let i in e.changes){const r=c.Uri.parse(i);for(let t of e.changes[i])n.push({resource:r,versionId:void 0,textEdit:{range:m(t.range),text:t.newText}})}return{edits:n}}var Ke=class{constructor(e){this._worker=e}provideDocumentSymbols(e,n){const i=e.uri;return this._worker(i).then(r=>r.findDocumentSymbols(i.toString())).then(r=>{if(r)return r.map(t=>Mt(t)?et(t):{name:t.name,detail:"",containerName:t.containerName,kind:tt(t.kind),range:m(t.location.range),selectionRange:m(t.location.range),tags:[]})})}};function Mt(e){return"children"in e}function et(e){return{name:e.name,detail:e.detail??"",kind:tt(e.kind),range:m(e.range),selectionRange:m(e.selectionRange),tags:e.tags??[],children:(e.children??[]).map(n=>et(n))}}function tt(e){let n=c.languages.SymbolKind;switch(e){case p.File:return n.File;case p.Module:return n.Module;case p.Namespace:return n.Namespace;case p.Package:return n.Package;case p.Class:return n.Class;case p.Method:return n.Method;case p.Property:return n.Property;case p.Field:return n.Field;case p.Constructor:return n.Constructor;case p.Enum:return n.Enum;case p.Interface:return n.Interface;case p.Function:return n.Function;case p.Variable:return n.Variable;case p.Constant:return n.Constant;case p.String:return n.String;case p.Number:return n.Number;case p.Boolean:return n.Boolean;case p.Array:return n.Array}return n.Function}var rt=class{constructor(e){this._worker=e}provideLinks(e,n){const i=e.uri;return this._worker(i).then(r=>r.findDocumentLinks(i.toString())).then(r=>{if(r)return{links:r.map(t=>({range:m(t.range),url:t.target}))}})}},nt=class{constructor(e){this._worker=e}provideDocumentFormattingEdits(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.format(r.toString(),null,ot(n)).then(o=>{if(!(!o||o.length===0))return o.map(D)}))}},it=class{constructor(e){this._worker=e,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(e,n,i,r){const t=e.uri;return this._worker(t).then(o=>o.format(t.toString(),Te(n),ot(i)).then(s=>{if(!(!s||s.length===0))return s.map(D)}))}};function ot(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var Ut=class{constructor(e){this._worker=e}provideDocumentColors(e,n){const i=e.uri;return this._worker(i).then(r=>r.findDocumentColors(i.toString())).then(r=>{if(r)return r.map(t=>({color:t.color,range:m(t.range)}))})}provideColorPresentations(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.getColorPresentations(r.toString(),n.color,Te(n.range))).then(t=>{if(t)return t.map(o=>{let s={label:o.label};return o.textEdit&&(s.textEdit=D(o.textEdit)),o.additionalTextEdits&&(s.additionalTextEdits=o.additionalTextEdits.map(D)),s})})}},at=class{constructor(e){this._worker=e}provideFoldingRanges(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.getFoldingRanges(r.toString(),n)).then(t=>{if(t)return t.map(o=>{const s={start:o.startLine+1,end:o.endLine+1};return typeof o.kind<"u"&&(s.kind=Ct(o.kind)),s})})}};function Ct(e){switch(e){case A.Comment:return c.languages.FoldingRangeKind.Comment;case A.Imports:return c.languages.FoldingRangeKind.Imports;case A.Region:return c.languages.FoldingRangeKind.Region}}var st=class{constructor(e){this._worker=e}provideSelectionRanges(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.getSelectionRanges(r.toString(),n.map(k))).then(t=>{if(t)return t.map(o=>{const s=[];for(;o;)s.push({range:m(o.range)}),o=o.parent;return s})})}},ut=class extends xt{constructor(e){super(e,[".",":","<",'"',"=","/"])}};function Vt(e){const n=new Qe(e),i=(...t)=>n.getLanguageServiceWorker(...t);let r=e.languageId;c.languages.registerCompletionItemProvider(r,new ut(i)),c.languages.registerHoverProvider(r,new Ge(i)),c.languages.registerDocumentHighlightProvider(r,new Je(i)),c.languages.registerLinkProvider(r,new rt(i)),c.languages.registerFoldingRangeProvider(r,new at(i)),c.languages.registerDocumentSymbolProvider(r,new Ke(i)),c.languages.registerSelectionRangeProvider(r,new st(i)),c.languages.registerRenameProvider(r,new Ze(i)),r==="html"&&(c.languages.registerDocumentFormattingEditProvider(r,new nt(i)),c.languages.registerDocumentRangeFormattingEditProvider(r,new it(i)))}function Wt(e){const n=[],i=[],r=new Qe(e);n.push(r);const t=(...s)=>r.getLanguageServiceWorker(...s);function o(){const{languageId:s,modeConfiguration:u}=e;ct(i),u.completionItems&&i.push(c.languages.registerCompletionItemProvider(s,new ut(t))),u.hovers&&i.push(c.languages.registerHoverProvider(s,new Ge(t))),u.documentHighlights&&i.push(c.languages.registerDocumentHighlightProvider(s,new Je(t))),u.links&&i.push(c.languages.registerLinkProvider(s,new rt(t))),u.documentSymbols&&i.push(c.languages.registerDocumentSymbolProvider(s,new Ke(t))),u.rename&&i.push(c.languages.registerRenameProvider(s,new Ze(t))),u.foldingRanges&&i.push(c.languages.registerFoldingRangeProvider(s,new at(t))),u.selectionRanges&&i.push(c.languages.registerSelectionRangeProvider(s,new st(t))),u.documentFormattingEdits&&i.push(c.languages.registerDocumentFormattingEditProvider(s,new nt(t))),u.documentRangeFormattingEdits&&i.push(c.languages.registerDocumentRangeFormattingEditProvider(s,new it(t)))}return o(),n.push(qe(i)),qe(n)}function qe(e){return{dispose:()=>ct(e)}}function ct(e){for(;e.length;)e.pop().dispose()}export{xt as CompletionAdapter,St as DefinitionAdapter,Nt as DiagnosticsAdapter,Ut as DocumentColorAdapter,nt as DocumentFormattingEditProvider,Je as DocumentHighlightAdapter,rt as DocumentLinkAdapter,it as DocumentRangeFormattingEditProvider,Ke as DocumentSymbolAdapter,at as FoldingRangeAdapter,Ge as HoverAdapter,Ot as ReferenceAdapter,Ze as RenameAdapter,st as SelectionRangeAdapter,Qe as WorkerManager,k as fromPosition,Te as fromRange,Wt as setupMode,Vt as setupMode1,m as toRange,D as toTextEdit}; diff --git a/week_01/test1/assets/monaco/javascript-zZ_6YuDS.js b/week_01/test1/assets/monaco/javascript-zZ_6YuDS.js new file mode 100644 index 0000000..de88748 --- /dev/null +++ b/week_01/test1/assets/monaco/javascript-zZ_6YuDS.js @@ -0,0 +1,6 @@ +import{conf as t,language as e}from"./typescript-B4jGL9um.js";import"./bundled-types-CutNYhe2.js";import"../modules/vue-Bx6xSt6e.js";import"../modules/file-saver-igGfcqei.js";/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var a=t,n={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:e.operators,symbols:e.symbols,escapes:e.escapes,digits:e.digits,octaldigits:e.octaldigits,binarydigits:e.binarydigits,hexdigits:e.hexdigits,regexpctl:e.regexpctl,regexpesc:e.regexpesc,tokenizer:e.tokenizer};export{a as conf,n as language}; diff --git a/week_01/test1/assets/monaco/jsonMode-ZHvbUFeD.js b/week_01/test1/assets/monaco/jsonMode-ZHvbUFeD.js new file mode 100644 index 0000000..9d766e4 --- /dev/null +++ b/week_01/test1/assets/monaco/jsonMode-ZHvbUFeD.js @@ -0,0 +1,15 @@ +import{o as Et}from"./bundled-types-CutNYhe2.js";import"../modules/vue-Bx6xSt6e.js";import"../modules/file-saver-igGfcqei.js";/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var Lt=Object.defineProperty,Ot=Object.getOwnPropertyDescriptor,Nt=Object.getOwnPropertyNames,Rt=Object.prototype.hasOwnProperty,Mt=(e,r,i,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of Nt(r))!Rt.call(e,t)&&t!==i&&Lt(e,t,{get:()=>r[t],enumerable:!(n=Ot(r,t))||n.enumerable});return e},Dt=(e,r,i)=>(Mt(e,r,"default"),i),f={};Dt(f,Et);var Ft=2*60*1e3,Ut=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>Ft&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=f.editor.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let r;return this._getClient().then(i=>{r=i}).then(i=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(i=>r)}},le;(function(e){function r(i){return typeof i=="string"}e.is=r})(le||(le={}));var Q;(function(e){function r(i){return typeof i=="string"}e.is=r})(Q||(Q={}));var fe;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(fe||(fe={}));var W;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(W||(W={}));var O;(function(e){function r(n,t){return n===Number.MAX_VALUE&&(n=W.MAX_VALUE),t===Number.MAX_VALUE&&(t=W.MAX_VALUE),{line:n,character:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.uinteger(t.line)&&a.uinteger(t.character)}e.is=i})(O||(O={}));var m;(function(e){function r(n,t,o,s){if(a.uinteger(n)&&a.uinteger(t)&&a.uinteger(o)&&a.uinteger(s))return{start:O.create(n,t),end:O.create(o,s)};if(O.is(n)&&O.is(t))return{start:n,end:t};throw new Error(`Range#create called with invalid arguments[${n}, ${t}, ${o}, ${s}]`)}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&O.is(t.start)&&O.is(t.end)}e.is=i})(m||(m={}));var H;(function(e){function r(n,t){return{uri:n,range:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.range)&&(a.string(t.uri)||a.undefined(t.uri))}e.is=i})(H||(H={}));var de;(function(e){function r(n,t,o,s){return{targetUri:n,targetRange:t,targetSelectionRange:o,originSelectionRange:s}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.targetRange)&&a.string(t.targetUri)&&m.is(t.targetSelectionRange)&&(m.is(t.originSelectionRange)||a.undefined(t.originSelectionRange))}e.is=i})(de||(de={}));var Y;(function(e){function r(n,t,o,s){return{red:n,green:t,blue:o,alpha:s}}e.create=r;function i(n){const t=n;return a.objectLiteral(t)&&a.numberRange(t.red,0,1)&&a.numberRange(t.green,0,1)&&a.numberRange(t.blue,0,1)&&a.numberRange(t.alpha,0,1)}e.is=i})(Y||(Y={}));var ge;(function(e){function r(n,t){return{range:n,color:t}}e.create=r;function i(n){const t=n;return a.objectLiteral(t)&&m.is(t.range)&&Y.is(t.color)}e.is=i})(ge||(ge={}));var pe;(function(e){function r(n,t,o){return{label:n,textEdit:t,additionalTextEdits:o}}e.create=r;function i(n){const t=n;return a.objectLiteral(t)&&a.string(t.label)&&(a.undefined(t.textEdit)||T.is(t))&&(a.undefined(t.additionalTextEdits)||a.typedArray(t.additionalTextEdits,T.is))}e.is=i})(pe||(pe={}));var P;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(P||(P={}));var ve;(function(e){function r(n,t,o,s,u,g){const c={startLine:n,endLine:t};return a.defined(o)&&(c.startCharacter=o),a.defined(s)&&(c.endCharacter=s),a.defined(u)&&(c.kind=u),a.defined(g)&&(c.collapsedText=g),c}e.create=r;function i(n){const t=n;return a.objectLiteral(t)&&a.uinteger(t.startLine)&&a.uinteger(t.startLine)&&(a.undefined(t.startCharacter)||a.uinteger(t.startCharacter))&&(a.undefined(t.endCharacter)||a.uinteger(t.endCharacter))&&(a.undefined(t.kind)||a.string(t.kind))}e.is=i})(ve||(ve={}));var G;(function(e){function r(n,t){return{location:n,message:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&H.is(t.location)&&a.string(t.message)}e.is=i})(G||(G={}));var F;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(F||(F={}));var me;(function(e){e.Unnecessary=1,e.Deprecated=2})(me||(me={}));var he;(function(e){function r(i){const n=i;return a.objectLiteral(n)&&a.string(n.href)}e.is=r})(he||(he={}));var z;(function(e){function r(n,t,o,s,u,g){let c={range:n,message:t};return a.defined(o)&&(c.severity=o),a.defined(s)&&(c.code=s),a.defined(u)&&(c.source=u),a.defined(g)&&(c.relatedInformation=g),c}e.create=r;function i(n){var t;let o=n;return a.defined(o)&&m.is(o.range)&&a.string(o.message)&&(a.number(o.severity)||a.undefined(o.severity))&&(a.integer(o.code)||a.string(o.code)||a.undefined(o.code))&&(a.undefined(o.codeDescription)||a.string((t=o.codeDescription)===null||t===void 0?void 0:t.href))&&(a.string(o.source)||a.undefined(o.source))&&(a.undefined(o.relatedInformation)||a.typedArray(o.relatedInformation,G.is))}e.is=i})(z||(z={}));var U;(function(e){function r(n,t,...o){let s={title:n,command:t};return a.defined(o)&&o.length>0&&(s.arguments=o),s}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.title)&&a.string(t.command)}e.is=i})(U||(U={}));var T;(function(e){function r(o,s){return{range:o,newText:s}}e.replace=r;function i(o,s){return{range:{start:o,end:o},newText:s}}e.insert=i;function n(o){return{range:o,newText:""}}e.del=n;function t(o){const s=o;return a.objectLiteral(s)&&a.string(s.newText)&&m.is(s.range)}e.is=t})(T||(T={}));var Z;(function(e){function r(n,t,o){const s={label:n};return t!==void 0&&(s.needsConfirmation=t),o!==void 0&&(s.description=o),s}e.create=r;function i(n){const t=n;return a.objectLiteral(t)&&a.string(t.label)&&(a.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(a.string(t.description)||t.description===void 0)}e.is=i})(Z||(Z={}));var j;(function(e){function r(i){const n=i;return a.string(n)}e.is=r})(j||(j={}));var _e;(function(e){function r(o,s,u){return{range:o,newText:s,annotationId:u}}e.replace=r;function i(o,s,u){return{range:{start:o,end:o},newText:s,annotationId:u}}e.insert=i;function n(o,s){return{range:o,newText:"",annotationId:s}}e.del=n;function t(o){const s=o;return T.is(s)&&(Z.is(s.annotationId)||j.is(s.annotationId))}e.is=t})(_e||(_e={}));var K;(function(e){function r(n,t){return{textDocument:n,edits:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&re.is(t.textDocument)&&Array.isArray(t.edits)}e.is=i})(K||(K={}));var C;(function(e){function r(n,t,o){let s={kind:"create",uri:n};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(s.options=t),o!==void 0&&(s.annotationId=o),s}e.create=r;function i(n){let t=n;return t&&t.kind==="create"&&a.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||a.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||a.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(C||(C={}));var ee;(function(e){function r(n,t,o,s){let u={kind:"rename",oldUri:n,newUri:t};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(u.options=o),s!==void 0&&(u.annotationId=s),u}e.create=r;function i(n){let t=n;return t&&t.kind==="rename"&&a.string(t.oldUri)&&a.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||a.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||a.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(ee||(ee={}));var te;(function(e){function r(n,t,o){let s={kind:"delete",uri:n};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(s.options=t),o!==void 0&&(s.annotationId=o),s}e.create=r;function i(n){let t=n;return t&&t.kind==="delete"&&a.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||a.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||a.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(te||(te={}));var ne;(function(e){function r(i){let n=i;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(t=>a.string(t.kind)?C.is(t)||ee.is(t)||te.is(t):K.is(t)))}e.is=r})(ne||(ne={}));var ke;(function(e){function r(n){return{uri:n}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)}e.is=i})(ke||(ke={}));var be;(function(e){function r(n,t){return{uri:n,version:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&a.integer(t.version)}e.is=i})(be||(be={}));var re;(function(e){function r(n,t){return{uri:n,version:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&(t.version===null||a.integer(t.version))}e.is=i})(re||(re={}));var we;(function(e){function r(n,t,o,s){return{uri:n,languageId:t,version:o,text:s}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&a.string(t.languageId)&&a.integer(t.version)&&a.string(t.text)}e.is=i})(we||(we={}));var ie;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function r(i){const n=i;return n===e.PlainText||n===e.Markdown}e.is=r})(ie||(ie={}));var S;(function(e){function r(i){const n=i;return a.objectLiteral(i)&&ie.is(n.kind)&&a.string(n.value)}e.is=r})(S||(S={}));var h;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(h||(h={}));var oe;(function(e){e.PlainText=1,e.Snippet=2})(oe||(oe={}));var Ae;(function(e){e.Deprecated=1})(Ae||(Ae={}));var Ie;(function(e){function r(n,t,o){return{newText:n,insert:t,replace:o}}e.create=r;function i(n){const t=n;return t&&a.string(t.newText)&&m.is(t.insert)&&m.is(t.replace)}e.is=i})(Ie||(Ie={}));var Ee;(function(e){e.asIs=1,e.adjustIndentation=2})(Ee||(Ee={}));var Le;(function(e){function r(i){const n=i;return n&&(a.string(n.detail)||n.detail===void 0)&&(a.string(n.description)||n.description===void 0)}e.is=r})(Le||(Le={}));var Oe;(function(e){function r(i){return{label:i}}e.create=r})(Oe||(Oe={}));var Ne;(function(e){function r(i,n){return{items:i||[],isIncomplete:!!n}}e.create=r})(Ne||(Ne={}));var X;(function(e){function r(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=r;function i(n){const t=n;return a.string(t)||a.objectLiteral(t)&&a.string(t.language)&&a.string(t.value)}e.is=i})(X||(X={}));var Re;(function(e){function r(i){let n=i;return!!n&&a.objectLiteral(n)&&(S.is(n.contents)||X.is(n.contents)||a.typedArray(n.contents,X.is))&&(i.range===void 0||m.is(i.range))}e.is=r})(Re||(Re={}));var Me;(function(e){function r(i,n){return n?{label:i,documentation:n}:{label:i}}e.create=r})(Me||(Me={}));var De;(function(e){function r(i,n,...t){let o={label:i};return a.defined(n)&&(o.documentation=n),a.defined(t)?o.parameters=t:o.parameters=[],o}e.create=r})(De||(De={}));var V;(function(e){e.Text=1,e.Read=2,e.Write=3})(V||(V={}));var Fe;(function(e){function r(i,n){let t={range:i};return a.number(n)&&(t.kind=n),t}e.create=r})(Fe||(Fe={}));var _;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(_||(_={}));var Ue;(function(e){e.Deprecated=1})(Ue||(Ue={}));var Te;(function(e){function r(i,n,t,o,s){let u={name:i,kind:n,location:{uri:o,range:t}};return s&&(u.containerName=s),u}e.create=r})(Te||(Te={}));var je;(function(e){function r(i,n,t,o){return o!==void 0?{name:i,kind:n,location:{uri:t,range:o}}:{name:i,kind:n,location:{uri:t}}}e.create=r})(je||(je={}));var xe;(function(e){function r(n,t,o,s,u,g){let c={name:n,detail:t,kind:o,range:s,selectionRange:u};return g!==void 0&&(c.children=g),c}e.create=r;function i(n){let t=n;return t&&a.string(t.name)&&a.number(t.kind)&&m.is(t.range)&&m.is(t.selectionRange)&&(t.detail===void 0||a.string(t.detail))&&(t.deprecated===void 0||a.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=i})(xe||(xe={}));var ye;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(ye||(ye={}));var q;(function(e){e.Invoked=1,e.Automatic=2})(q||(q={}));var Pe;(function(e){function r(n,t,o){let s={diagnostics:n};return t!=null&&(s.only=t),o!=null&&(s.triggerKind=o),s}e.create=r;function i(n){let t=n;return a.defined(t)&&a.typedArray(t.diagnostics,z.is)&&(t.only===void 0||a.typedArray(t.only,a.string))&&(t.triggerKind===void 0||t.triggerKind===q.Invoked||t.triggerKind===q.Automatic)}e.is=i})(Pe||(Pe={}));var Ve;(function(e){function r(n,t,o){let s={title:n},u=!0;return typeof t=="string"?(u=!1,s.kind=t):U.is(t)?s.command=t:s.edit=t,u&&o!==void 0&&(s.kind=o),s}e.create=r;function i(n){let t=n;return t&&a.string(t.title)&&(t.diagnostics===void 0||a.typedArray(t.diagnostics,z.is))&&(t.kind===void 0||a.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||U.is(t.command))&&(t.isPreferred===void 0||a.boolean(t.isPreferred))&&(t.edit===void 0||ne.is(t.edit))}e.is=i})(Ve||(Ve={}));var Se;(function(e){function r(n,t){let o={range:n};return a.defined(t)&&(o.data=t),o}e.create=r;function i(n){let t=n;return a.defined(t)&&m.is(t.range)&&(a.undefined(t.command)||U.is(t.command))}e.is=i})(Se||(Se={}));var Be;(function(e){function r(n,t){return{tabSize:n,insertSpaces:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.uinteger(t.tabSize)&&a.boolean(t.insertSpaces)}e.is=i})(Be||(Be={}));var We;(function(e){function r(n,t,o){return{range:n,target:t,data:o}}e.create=r;function i(n){let t=n;return a.defined(t)&&m.is(t.range)&&(a.undefined(t.target)||a.string(t.target))}e.is=i})(We||(We={}));var He;(function(e){function r(n,t){return{range:n,parent:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.range)&&(t.parent===void 0||e.is(t.parent))}e.is=i})(He||(He={}));var ze;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(ze||(ze={}));var Xe;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Xe||(Xe={}));var qe;(function(e){function r(i){const n=i;return a.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}e.is=r})(qe||(qe={}));var Je;(function(e){function r(n,t){return{range:n,text:t}}e.create=r;function i(n){const t=n;return t!=null&&m.is(t.range)&&a.string(t.text)}e.is=i})(Je||(Je={}));var $e;(function(e){function r(n,t,o){return{range:n,variableName:t,caseSensitiveLookup:o}}e.create=r;function i(n){const t=n;return t!=null&&m.is(t.range)&&a.boolean(t.caseSensitiveLookup)&&(a.string(t.variableName)||t.variableName===void 0)}e.is=i})($e||($e={}));var Qe;(function(e){function r(n,t){return{range:n,expression:t}}e.create=r;function i(n){const t=n;return t!=null&&m.is(t.range)&&(a.string(t.expression)||t.expression===void 0)}e.is=i})(Qe||(Qe={}));var Ye;(function(e){function r(n,t){return{frameId:n,stoppedLocation:t}}e.create=r;function i(n){const t=n;return a.defined(t)&&m.is(n.stoppedLocation)}e.is=i})(Ye||(Ye={}));var se;(function(e){e.Type=1,e.Parameter=2;function r(i){return i===1||i===2}e.is=r})(se||(se={}));var ae;(function(e){function r(n){return{value:n}}e.create=r;function i(n){const t=n;return a.objectLiteral(t)&&(t.tooltip===void 0||a.string(t.tooltip)||S.is(t.tooltip))&&(t.location===void 0||H.is(t.location))&&(t.command===void 0||U.is(t.command))}e.is=i})(ae||(ae={}));var Ge;(function(e){function r(n,t,o){const s={position:n,label:t};return o!==void 0&&(s.kind=o),s}e.create=r;function i(n){const t=n;return a.objectLiteral(t)&&O.is(t.position)&&(a.string(t.label)||a.typedArray(t.label,ae.is))&&(t.kind===void 0||se.is(t.kind))&&t.textEdits===void 0||a.typedArray(t.textEdits,T.is)&&(t.tooltip===void 0||a.string(t.tooltip)||S.is(t.tooltip))&&(t.paddingLeft===void 0||a.boolean(t.paddingLeft))&&(t.paddingRight===void 0||a.boolean(t.paddingRight))}e.is=i})(Ge||(Ge={}));var Ze;(function(e){function r(i){return{kind:"snippet",value:i}}e.createSnippet=r})(Ze||(Ze={}));var Ke;(function(e){function r(i,n,t,o){return{insertText:i,filterText:n,range:t,command:o}}e.create=r})(Ke||(Ke={}));var Ce;(function(e){function r(i){return{items:i}}e.create=r})(Ce||(Ce={}));var et;(function(e){e.Invoked=0,e.Automatic=1})(et||(et={}));var tt;(function(e){function r(i,n){return{range:i,text:n}}e.create=r})(tt||(tt={}));var nt;(function(e){function r(i,n){return{triggerKind:i,selectedCompletionInfo:n}}e.create=r})(nt||(nt={}));var rt;(function(e){function r(i){const n=i;return a.objectLiteral(n)&&Q.is(n.uri)&&a.string(n.name)}e.is=r})(rt||(rt={}));var it;(function(e){function r(o,s,u,g){return new Tt(o,s,u,g)}e.create=r;function i(o){let s=o;return!!(a.defined(s)&&a.string(s.uri)&&(a.undefined(s.languageId)||a.string(s.languageId))&&a.uinteger(s.lineCount)&&a.func(s.getText)&&a.func(s.positionAt)&&a.func(s.offsetAt))}e.is=i;function n(o,s){let u=o.getText(),g=t(s,(v,d)=>{let k=v.range.start.line-d.range.start.line;return k===0?v.range.start.character-d.range.start.character:k}),c=u.length;for(let v=g.length-1;v>=0;v--){let d=g[v],k=o.offsetAt(d.range.start),p=o.offsetAt(d.range.end);if(p<=c)u=u.substring(0,k)+d.newText+u.substring(p,u.length);else throw new Error("Overlapping edit");c=k}return u}e.applyEdits=n;function t(o,s){if(o.length<=1)return o;const u=o.length/2|0,g=o.slice(0,u),c=o.slice(u);t(g,s),t(c,s);let v=0,d=0,k=0;for(;v0&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),i=0,n=r.length;if(n===0)return O.create(0,e);for(;ie?n=o:i=o+1}let t=i-1;return O.create(t,e-r[t])}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let i=r[e.line],n=e.line+1"u"}e.undefined=n;function t(p){return p===!0||p===!1}e.boolean=t;function o(p){return r.call(p)==="[object String]"}e.string=o;function s(p){return r.call(p)==="[object Number]"}e.number=s;function u(p,N,J){return r.call(p)==="[object Number]"&&N<=p&&p<=J}e.numberRange=u;function g(p){return r.call(p)==="[object Number]"&&-2147483648<=p&&p<=2147483647}e.integer=g;function c(p){return r.call(p)==="[object Number]"&&0<=p&&p<=2147483647}e.uinteger=c;function v(p){return r.call(p)==="[object Function]"}e.func=v;function d(p){return p!==null&&typeof p=="object"}e.objectLiteral=d;function k(p,N){return Array.isArray(p)&&p.every(N)}e.typedArray=k})(a||(a={}));var jt=class{constructor(e,r,i){this._languageId=e,this._worker=r,this._disposables=[],this._listener=Object.create(null);const n=o=>{let s=o.getLanguageId();if(s!==this._languageId)return;let u;this._listener[o.uri.toString()]=o.onDidChangeContent(()=>{window.clearTimeout(u),u=window.setTimeout(()=>this._doValidate(o.uri,s),500)}),this._doValidate(o.uri,s)},t=o=>{f.editor.setModelMarkers(o,this._languageId,[]);let s=o.uri.toString(),u=this._listener[s];u&&(u.dispose(),delete this._listener[s])};this._disposables.push(f.editor.onDidCreateModel(n)),this._disposables.push(f.editor.onWillDisposeModel(t)),this._disposables.push(f.editor.onDidChangeModelLanguage(o=>{t(o.model),n(o.model)})),this._disposables.push(i(o=>{f.editor.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&(t(s),n(s))})})),this._disposables.push({dispose:()=>{f.editor.getModels().forEach(t);for(let o in this._listener)this._listener[o].dispose()}}),f.editor.getModels().forEach(n)}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables.length=0}_doValidate(e,r){this._worker(e).then(i=>i.doValidation(e.toString())).then(i=>{const n=i.map(o=>yt(e,o));let t=f.editor.getModel(e);t&&t.getLanguageId()===r&&f.editor.setModelMarkers(t,r,n)}).then(void 0,i=>{console.error(i)})}};function xt(e){switch(e){case F.Error:return f.MarkerSeverity.Error;case F.Warning:return f.MarkerSeverity.Warning;case F.Information:return f.MarkerSeverity.Info;case F.Hint:return f.MarkerSeverity.Hint;default:return f.MarkerSeverity.Info}}function yt(e,r){let i=typeof r.code=="number"?String(r.code):r.code;return{severity:xt(r.severity),startLineNumber:r.range.start.line+1,startColumn:r.range.start.character+1,endLineNumber:r.range.end.line+1,endColumn:r.range.end.character+1,message:r.message,code:i,source:r.source}}var Pt=class{constructor(e,r){this._worker=e,this._triggerCharacters=r}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(e,r,i,n){const t=e.uri;return this._worker(t).then(o=>o.doComplete(t.toString(),R(r))).then(o=>{if(!o)return;const s=e.getWordUntilPosition(r),u=new f.Range(r.lineNumber,s.startColumn,r.lineNumber,s.endColumn),g=o.items.map(c=>{const v={label:c.label,insertText:c.insertText||c.label,sortText:c.sortText,filterText:c.filterText,documentation:c.documentation,detail:c.detail,command:Bt(c.command),range:u,kind:St(c.kind)};return c.textEdit&&(Vt(c.textEdit)?v.range={insert:w(c.textEdit.insert),replace:w(c.textEdit.replace)}:v.range=w(c.textEdit.range),v.insertText=c.textEdit.newText),c.additionalTextEdits&&(v.additionalTextEdits=c.additionalTextEdits.map(B)),c.insertTextFormat===oe.Snippet&&(v.insertTextRules=f.languages.CompletionItemInsertTextRule.InsertAsSnippet),v});return{isIncomplete:o.isIncomplete,suggestions:g}})}};function R(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function pt(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function w(e){if(e)return new f.Range(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function Vt(e){return typeof e.insert<"u"&&typeof e.replace<"u"}function St(e){const r=f.languages.CompletionItemKind;switch(e){case h.Text:return r.Text;case h.Method:return r.Method;case h.Function:return r.Function;case h.Constructor:return r.Constructor;case h.Field:return r.Field;case h.Variable:return r.Variable;case h.Class:return r.Class;case h.Interface:return r.Interface;case h.Module:return r.Module;case h.Property:return r.Property;case h.Unit:return r.Unit;case h.Value:return r.Value;case h.Enum:return r.Enum;case h.Keyword:return r.Keyword;case h.Snippet:return r.Snippet;case h.Color:return r.Color;case h.File:return r.File;case h.Reference:return r.Reference}return r.Property}function B(e){if(e)return{range:w(e.range),text:e.newText}}function Bt(e){return e&&e.command==="editor.action.triggerSuggest"?{id:e.command,title:e.title,arguments:e.arguments}:void 0}var Wt=class{constructor(e){this._worker=e}provideHover(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.doHover(n.toString(),R(r))).then(t=>{if(t)return{range:w(t.range),contents:zt(t.contents)}})}};function Ht(e){return e&&typeof e=="object"&&typeof e.kind=="string"}function ot(e){return typeof e=="string"?{value:e}:Ht(e)?e.kind==="plaintext"?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+` +`+e.value+"\n```\n"}}function zt(e){if(e)return Array.isArray(e)?e.map(ot):[ot(e)]}var kn=class{constructor(e){this._worker=e}provideDocumentHighlights(e,r,i){const n=e.uri;return this._worker(n).then(t=>t.findDocumentHighlights(n.toString(),R(r))).then(t=>{if(t)return t.map(o=>({range:w(o.range),kind:Xt(o.kind)}))})}};function Xt(e){switch(e){case V.Read:return f.languages.DocumentHighlightKind.Read;case V.Write:return f.languages.DocumentHighlightKind.Write;case V.Text:return f.languages.DocumentHighlightKind.Text}return f.languages.DocumentHighlightKind.Text}var bn=class{constructor(e){this._worker=e}provideDefinition(e,r,i){const n=e.uri;return this._worker(n).then(t=>t.findDefinition(n.toString(),R(r))).then(t=>{if(t)return[vt(t)]})}};function vt(e){return{uri:f.Uri.parse(e.uri),range:w(e.range)}}var wn=class{constructor(e){this._worker=e}provideReferences(e,r,i,n){const t=e.uri;return this._worker(t).then(o=>o.findReferences(t.toString(),R(r))).then(o=>{if(o)return o.map(vt)})}},An=class{constructor(e){this._worker=e}provideRenameEdits(e,r,i,n){const t=e.uri;return this._worker(t).then(o=>o.doRename(t.toString(),R(r),i)).then(o=>qt(o))}};function qt(e){if(!e||!e.changes)return;let r=[];for(let i in e.changes){const n=f.Uri.parse(i);for(let t of e.changes[i])r.push({resource:n,versionId:void 0,textEdit:{range:w(t.range),text:t.newText}})}return{edits:r}}var Jt=class{constructor(e){this._worker=e}provideDocumentSymbols(e,r){const i=e.uri;return this._worker(i).then(n=>n.findDocumentSymbols(i.toString())).then(n=>{if(n)return n.map(t=>$t(t)?mt(t):{name:t.name,detail:"",containerName:t.containerName,kind:ht(t.kind),range:w(t.location.range),selectionRange:w(t.location.range),tags:[]})})}};function $t(e){return"children"in e}function mt(e){return{name:e.name,detail:e.detail??"",kind:ht(e.kind),range:w(e.range),selectionRange:w(e.selectionRange),tags:e.tags??[],children:(e.children??[]).map(r=>mt(r))}}function ht(e){let r=f.languages.SymbolKind;switch(e){case _.File:return r.File;case _.Module:return r.Module;case _.Namespace:return r.Namespace;case _.Package:return r.Package;case _.Class:return r.Class;case _.Method:return r.Method;case _.Property:return r.Property;case _.Field:return r.Field;case _.Constructor:return r.Constructor;case _.Enum:return r.Enum;case _.Interface:return r.Interface;case _.Function:return r.Function;case _.Variable:return r.Variable;case _.Constant:return r.Constant;case _.String:return r.String;case _.Number:return r.Number;case _.Boolean:return r.Boolean;case _.Array:return r.Array}return r.Function}var In=class{constructor(e){this._worker=e}provideLinks(e,r){const i=e.uri;return this._worker(i).then(n=>n.findDocumentLinks(i.toString())).then(n=>{if(n)return{links:n.map(t=>({range:w(t.range),url:t.target}))}})}},Qt=class{constructor(e){this._worker=e}provideDocumentFormattingEdits(e,r,i){const n=e.uri;return this._worker(n).then(t=>t.format(n.toString(),null,_t(r)).then(o=>{if(!(!o||o.length===0))return o.map(B)}))}},Yt=class{constructor(e){this._worker=e,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(e,r,i,n){const t=e.uri;return this._worker(t).then(o=>o.format(t.toString(),pt(r),_t(i)).then(s=>{if(!(!s||s.length===0))return s.map(B)}))}};function _t(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var Gt=class{constructor(e){this._worker=e}provideDocumentColors(e,r){const i=e.uri;return this._worker(i).then(n=>n.findDocumentColors(i.toString())).then(n=>{if(n)return n.map(t=>({color:t.color,range:w(t.range)}))})}provideColorPresentations(e,r,i){const n=e.uri;return this._worker(n).then(t=>t.getColorPresentations(n.toString(),r.color,pt(r.range))).then(t=>{if(t)return t.map(o=>{let s={label:o.label};return o.textEdit&&(s.textEdit=B(o.textEdit)),o.additionalTextEdits&&(s.additionalTextEdits=o.additionalTextEdits.map(B)),s})})}},Zt=class{constructor(e){this._worker=e}provideFoldingRanges(e,r,i){const n=e.uri;return this._worker(n).then(t=>t.getFoldingRanges(n.toString(),r)).then(t=>{if(t)return t.map(o=>{const s={start:o.startLine+1,end:o.endLine+1};return typeof o.kind<"u"&&(s.kind=Kt(o.kind)),s})})}};function Kt(e){switch(e){case P.Comment:return f.languages.FoldingRangeKind.Comment;case P.Imports:return f.languages.FoldingRangeKind.Imports;case P.Region:return f.languages.FoldingRangeKind.Region}}var Ct=class{constructor(e){this._worker=e}provideSelectionRanges(e,r,i){const n=e.uri;return this._worker(n).then(t=>t.getSelectionRanges(n.toString(),r.map(R))).then(t=>{if(t)return t.map(o=>{const s=[];for(;o;)s.push({range:w(o.range)}),o=o.parent;return s})})}};function en(e,r=!1){const i=e.length;let n=0,t="",o=0,s=16,u=0,g=0,c=0,v=0,d=0;function k(l,A){let L=0,I=0;for(;L=48&&b<=57)I=I*16+b-48;else if(b>=65&&b<=70)I=I*16+b-65+10;else if(b>=97&&b<=102)I=I*16+b-97+10;else break;n++,L++}return L=i){l+=e.substring(A,n),d=2;break}const L=e.charCodeAt(n);if(L===34){l+=e.substring(A,n),n++;break}if(L===92){if(l+=e.substring(A,n),n++,n>=i){d=2;break}switch(e.charCodeAt(n++)){case 34:l+='"';break;case 92:l+="\\";break;case 47:l+="/";break;case 98:l+="\b";break;case 102:l+="\f";break;case 110:l+=` +`;break;case 114:l+="\r";break;case 116:l+=" ";break;case 117:const b=k(4,!0);b>=0?l+=String.fromCharCode(b):d=4;break;default:d=5}A=n;continue}if(L>=0&&L<=31)if(x(L)){l+=e.substring(A,n),d=2;break}else d=6;n++}return l}function ce(){if(t="",d=0,o=n,g=u,v=c,n>=i)return o=i,s=17;let l=e.charCodeAt(n);if($(l)){do n++,t+=String.fromCharCode(l),l=e.charCodeAt(n);while($(l));return s=15}if(x(l))return n++,t+=String.fromCharCode(l),l===13&&e.charCodeAt(n)===10&&(n++,t+=` +`),u++,c=n,s=14;switch(l){case 123:return n++,s=1;case 125:return n++,s=2;case 91:return n++,s=3;case 93:return n++,s=4;case 58:return n++,s=6;case 44:return n++,s=5;case 34:return n++,t=J(),s=10;case 47:const A=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n=12&&l<=15);return l}return{setPosition:p,getPosition:()=>n,scan:r?It:ce,getToken:()=>s,getTokenValue:()=>t,getTokenOffset:()=>o,getTokenLength:()=>n-o,getTokenStartLine:()=>g,getTokenStartCharacter:()=>o-v,getTokenError:()=>d}}function $(e){return e===32||e===9}function x(e){return e===10||e===13}function M(e){return e>=48&&e<=57}var st;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(st||(st={}));new Array(20).fill(0).map((e,r)=>" ".repeat(r));var D=200;new Array(D).fill(0).map((e,r)=>` +`+" ".repeat(r)),new Array(D).fill(0).map((e,r)=>"\r"+" ".repeat(r)),new Array(D).fill(0).map((e,r)=>`\r +`+" ".repeat(r)),new Array(D).fill(0).map((e,r)=>` +`+" ".repeat(r)),new Array(D).fill(0).map((e,r)=>"\r"+" ".repeat(r)),new Array(D).fill(0).map((e,r)=>`\r +`+" ".repeat(r));var at;(function(e){e.DEFAULT={allowTrailingComma:!1}})(at||(at={}));var tn=en,ut;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(ut||(ut={}));var ct;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(ct||(ct={}));var lt;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(lt||(lt={}));function nn(e){return{getInitialState:()=>new bt(null,null,!1,null),tokenize:(r,i)=>gn(e,r,i)}}var ft="delimiter.bracket.json",dt="delimiter.array.json",rn="delimiter.colon.json",on="delimiter.comma.json",sn="keyword.json",an="keyword.json",un="string.value.json",cn="number.json",ln="string.key.json",fn="comment.block.json",dn="comment.line.json",y=class kt{constructor(r,i){this.parent=r,this.type=i}static pop(r){return r?r.parent:null}static push(r,i){return new kt(r,i)}static equals(r,i){if(!r&&!i)return!0;if(!r||!i)return!1;for(;r&&i;){if(r===i)return!0;if(r.type!==i.type)return!1;r=r.parent,i=i.parent}return!0}},bt=class ue{constructor(r,i,n,t){this._state=r,this.scanError=i,this.lastWasColon=n,this.parents=t}clone(){return new ue(this._state,this.scanError,this.lastWasColon,this.parents)}equals(r){return r===this?!0:!r||!(r instanceof ue)?!1:this.scanError===r.scanError&&this.lastWasColon===r.lastWasColon&&y.equals(this.parents,r.parents)}getStateData(){return this._state}setStateData(r){this._state=r}};function gn(e,r,i,n=0){let t=0,o=!1;switch(i.scanError){case 2:r='"'+r,t=1;break;case 1:r="/*"+r,t=2;break}const s=tn(r);let u=i.lastWasColon,g=i.parents;const c={tokens:[],endState:i.clone()};for(;;){let v=n+s.getPosition(),d="";const k=s.scan();if(k===17)break;if(v===n+s.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+r.substr(s.getPosition(),3));switch(o&&(v-=t),o=t>0,k){case 1:g=y.push(g,0),d=ft,u=!1;break;case 2:g=y.pop(g),d=ft,u=!1;break;case 3:g=y.push(g,1),d=dt,u=!1;break;case 4:g=y.pop(g),d=dt,u=!1;break;case 6:d=rn,u=!0;break;case 5:d=on,u=!1;break;case 8:case 9:d=sn,u=!1;break;case 7:d=an,u=!1;break;case 10:const N=(g?g.type:0)===1;d=u||N?un:ln,u=!1;break;case 11:d=cn,u=!1;break}switch(k){case 12:d=dn;break;case 13:d=fn;break}c.endState=new bt(i.getStateData(),s.getTokenError(),u,g),c.tokens.push({startIndex:v,scopes:d})}return c}var E;function En(){return new Promise((e,r)=>{if(!E)return r("JSON not registered!");e(E)})}var pn=class extends jt{constructor(e,r,i){super(e,r,i.onDidChange),this._disposables.push(f.editor.onWillDisposeModel(n=>{this._resetSchema(n.uri)})),this._disposables.push(f.editor.onDidChangeModelLanguage(n=>{this._resetSchema(n.model.uri)}))}_resetSchema(e){this._worker().then(r=>{r.resetSchema(e.toString())})}};function Ln(e){const r=[],i=[],n=new Ut(e);r.push(n),E=(...s)=>n.getLanguageServiceWorker(...s);function t(){const{languageId:s,modeConfiguration:u}=e;wt(i),u.documentFormattingEdits&&i.push(f.languages.registerDocumentFormattingEditProvider(s,new Qt(E))),u.documentRangeFormattingEdits&&i.push(f.languages.registerDocumentRangeFormattingEditProvider(s,new Yt(E))),u.completionItems&&i.push(f.languages.registerCompletionItemProvider(s,new Pt(E,[" ",":",'"']))),u.hovers&&i.push(f.languages.registerHoverProvider(s,new Wt(E))),u.documentSymbols&&i.push(f.languages.registerDocumentSymbolProvider(s,new Jt(E))),u.tokens&&i.push(f.languages.setTokensProvider(s,nn(!0))),u.colors&&i.push(f.languages.registerColorProvider(s,new Gt(E))),u.foldingRanges&&i.push(f.languages.registerFoldingRangeProvider(s,new Zt(E))),u.diagnostics&&i.push(new pn(s,E,e)),u.selectionRanges&&i.push(f.languages.registerSelectionRangeProvider(s,new Ct(E)))}t(),r.push(f.languages.setLanguageConfiguration(e.languageId,vn));let o=e.modeConfiguration;return e.onDidChange(s=>{s.modeConfiguration!==o&&(o=s.modeConfiguration,t())}),r.push(gt(i)),gt(r)}function gt(e){return{dispose:()=>wt(e)}}function wt(e){for(;e.length;)e.pop().dispose()}var vn={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}]};export{Pt as CompletionAdapter,bn as DefinitionAdapter,jt as DiagnosticsAdapter,Gt as DocumentColorAdapter,Qt as DocumentFormattingEditProvider,kn as DocumentHighlightAdapter,In as DocumentLinkAdapter,Yt as DocumentRangeFormattingEditProvider,Jt as DocumentSymbolAdapter,Zt as FoldingRangeAdapter,Wt as HoverAdapter,wn as ReferenceAdapter,An as RenameAdapter,Ct as SelectionRangeAdapter,Ut as WorkerManager,R as fromPosition,pt as fromRange,En as getWorker,Ln as setupMode,w as toRange,B as toTextEdit}; diff --git a/week_01/test1/assets/monaco/liquid-QuN8kA_y.js b/week_01/test1/assets/monaco/liquid-QuN8kA_y.js new file mode 100644 index 0000000..8924b83 --- /dev/null +++ b/week_01/test1/assets/monaco/liquid-QuN8kA_y.js @@ -0,0 +1,6 @@ +import{o as l}from"./bundled-types-CutNYhe2.js";import"../modules/vue-Bx6xSt6e.js";import"../modules/file-saver-igGfcqei.js";/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var d=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,m=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of c(e))!u.call(t,i)&&i!==r&&d(t,i,{get:()=>e[i],enumerable:!(n=s(e,i))||n.enumerable});return t},p=(t,e,r)=>(m(t,e,"default"),r),o={};p(o,l);var a=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],b={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,brackets:[[""],["<",">"],["{{","}}"],["{%","%}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"%",close:"%"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${a.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:o.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${a.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:o.languages.IndentAction.Indent}}]},f={defaultToken:"",tokenPostfix:"",builtinTags:["if","else","elseif","endif","render","assign","capture","endcapture","case","endcase","comment","endcomment","cycle","decrement","for","endfor","include","increment","layout","raw","endraw","render","tablerow","endtablerow","unless","endunless"],builtinFilters:["abs","append","at_least","at_most","capitalize","ceil","compact","date","default","divided_by","downcase","escape","escape_once","first","floor","join","json","last","lstrip","map","minus","modulo","newline_to_br","plus","prepend","remove","remove_first","replace","replace_first","reverse","round","rstrip","size","slice","sort","sort_natural","split","strip","strip_html","strip_newlines","times","truncate","truncatewords","uniq","upcase","url_decode","url_encode","where"],constants:["true","false"],operators:["==","!=",">","<",">=","<="],symbol:/[=>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[//,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],liquidState:[[/\{\{/,"delimiter.output.liquid"],[/\}\}/,{token:"delimiter.output.liquid",switchTo:"@$S2.$S3"}],[/\{\%/,"delimiter.tag.liquid"],[/raw\s*\%\}/,"delimiter.tag.liquid","@liquidRaw"],[/\%\}/,{token:"delimiter.tag.liquid",switchTo:"@$S2.$S3"}],{include:"liquidRoot"}],liquidRaw:[[/^(?!\{\%\s*endraw\s*\%\}).+/],[/\{\%/,"delimiter.tag.liquid"],[/@identifier/],[/\%\}/,{token:"delimiter.tag.liquid",next:"@root"}]],liquidRoot:[[/\d+(\.\d+)?/,"number.liquid"],[/"[^"]*"/,"string.liquid"],[/'[^']*'/,"string.liquid"],[/\s+/],[/@symbol/,{cases:{"@operators":"operator.liquid","@default":""}}],[/\./],[/@identifier/,{cases:{"@constants":"keyword.liquid","@builtinFilters":"predefined.liquid","@builtinTags":"predefined.liquid","@default":"variable.liquid"}}],[/[^}|%]/,"variable.liquid"]]}};export{b as conf,f as language}; diff --git a/week_01/test1/assets/monaco/mdx-DiM9yg6c.js b/week_01/test1/assets/monaco/mdx-DiM9yg6c.js new file mode 100644 index 0000000..82003f1 --- /dev/null +++ b/week_01/test1/assets/monaco/mdx-DiM9yg6c.js @@ -0,0 +1,6 @@ +import{o as s}from"./bundled-types-CutNYhe2.js";import"../modules/vue-Bx6xSt6e.js";import"../modules/file-saver-igGfcqei.js";/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var d=Object.defineProperty,p=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,k=(n,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of c(e))!a.call(n,o)&&o!==i&&d(n,o,{get:()=>e[o],enumerable:!(r=p(e,o))||r.enumerable});return n},l=(n,e,i)=>(k(n,e,"default"),i),t={};l(t,s);var g={comments:{blockComment:["{/*","*/}"]},brackets:[["{","}"]],autoClosingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"“",close:"”"},{open:"‘",close:"’"},{open:"`",close:"`"},{open:"{",close:"}"},{open:"(",close:")"},{open:"_",close:"_"},{open:"**",close:"**"},{open:"<",close:">"}],onEnterRules:[{beforeText:/^\s*- .+/,action:{indentAction:t.languages.IndentAction.None,appendText:"- "}},{beforeText:/^\s*\+ .+/,action:{indentAction:t.languages.IndentAction.None,appendText:"+ "}},{beforeText:/^\s*\* .+/,action:{indentAction:t.languages.IndentAction.None,appendText:"* "}},{beforeText:/^> /,action:{indentAction:t.languages.IndentAction.None,appendText:"> "}},{beforeText:/<\w+/,action:{indentAction:t.languages.IndentAction.Indent}},{beforeText:/\s+>\s*$/,action:{indentAction:t.languages.IndentAction.Indent}},{beforeText:/<\/\w+>/,action:{indentAction:t.languages.IndentAction.Outdent}},...Array.from({length:100},(n,e)=>({beforeText:new RegExp(`^${e}\\. .+`),action:{indentAction:t.languages.IndentAction.None,appendText:`${e+1}. `}}))]},_={defaultToken:"",tokenPostfix:".mdx",control:/[!#()*+.[\\\]_`{}\-]/,escapes:/\\@control/,tokenizer:{root:[[/^---$/,{token:"meta.content",next:"@frontmatter",nextEmbedded:"yaml"}],[/^\s*import/,{token:"keyword",next:"@import",nextEmbedded:"js"}],[/^\s*export/,{token:"keyword",next:"@export",nextEmbedded:"js"}],[/<\w+/,{token:"type.identifier",next:"@jsx"}],[/<\/?\w+>/,"type.identifier"],[/^(\s*)(>*\s*)(#{1,6}\s)/,[{token:"white"},{token:"comment"},{token:"keyword",next:"@header"}]],[/^(\s*)(>*\s*)([*+-])(\s+)/,["white","comment","keyword","white"]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,["white","comment","number","white"]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,["white","comment","number","white"]],[/^(\s*)(>*\s*)(-{3,}|\*{3,}|_{3,})$/,["white","comment","keyword"]],[/`{3,}(\s.*)?$/,{token:"string",next:"@codeblock_backtick"}],[/~{3,}(\s.*)?$/,{token:"string",next:"@codeblock_tilde"}],[/`{3,}(\S+).*$/,{token:"string",next:"@codeblock_highlight_backtick",nextEmbedded:"$1"}],[/~{3,}(\S+).*$/,{token:"string",next:"@codeblock_highlight_tilde",nextEmbedded:"$1"}],[/^(\s*)(-{4,})$/,["white","comment"]],[/^(\s*)(>+)/,["white","comment"]],{include:"content"}],content:[[/(\[)(.+)(]\()(.+)(\s+".*")(\))/,["","string.link","","type.identifier","string.link",""]],[/(\[)(.+)(]\()(.+)(\))/,["","type.identifier","","string.link",""]],[/(\[)(.+)(]\[)(.+)(])/,["","type.identifier","","type.identifier",""]],[/(\[)(.+)(]:\s+)(\S*)/,["","type.identifier","","string.link"]],[/(\[)(.+)(])/,["","type.identifier",""]],[/`.*`/,"variable.source"],[/_/,{token:"emphasis",next:"@emphasis_underscore"}],[/\*(?!\*)/,{token:"emphasis",next:"@emphasis_asterisk"}],[/\*\*/,{token:"strong",next:"@strong"}],[/{/,{token:"delimiter.bracket",next:"@expression",nextEmbedded:"js"}]],import:[[/'\s*(;|$)/,{token:"string",next:"@pop",nextEmbedded:"@pop"}]],expression:[[/{/,{token:"delimiter.bracket",next:"@expression"}],[/}/,{token:"delimiter.bracket",next:"@pop",nextEmbedded:"@pop"}]],export:[[/^\s*$/,{token:"delimiter.bracket",next:"@pop",nextEmbedded:"@pop"}]],jsx:[[/\s+/,""],[/(\w+)(=)("(?:[^"\\]|\\.)*")/,["attribute.name","operator","string"]],[/(\w+)(=)('(?:[^'\\]|\\.)*')/,["attribute.name","operator","string"]],[/(\w+(?=\s|>|={|$))/,["attribute.name"]],[/={/,{token:"delimiter.bracket",next:"@expression",nextEmbedded:"js"}],[/>/,{token:"type.identifier",next:"@pop"}]],header:[[/.$/,{token:"keyword",next:"@pop"}],{include:"content"},[/./,{token:"keyword"}]],strong:[[/\*\*/,{token:"strong",next:"@pop"}],{include:"content"},[/./,{token:"strong"}]],emphasis_underscore:[[/_/,{token:"emphasis",next:"@pop"}],{include:"content"},[/./,{token:"emphasis"}]],emphasis_asterisk:[[/\*(?!\*)/,{token:"emphasis",next:"@pop"}],{include:"content"},[/./,{token:"emphasis"}]],frontmatter:[[/^---$/,{token:"meta.content",nextEmbedded:"@pop",next:"@pop"}]],codeblock_highlight_backtick:[[/\s*`{3,}\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/.*$/,"variable.source"]],codeblock_highlight_tilde:[[/\s*~{3,}\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/.*$/,"variable.source"]],codeblock_backtick:[[/\s*`{3,}\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblock_tilde:[[/\s*~{3,}\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]]}};export{g as conf,_ as language}; diff --git a/week_01/test1/assets/monaco/python-XZUT-zMz.js b/week_01/test1/assets/monaco/python-XZUT-zMz.js new file mode 100644 index 0000000..b30712b --- /dev/null +++ b/week_01/test1/assets/monaco/python-XZUT-zMz.js @@ -0,0 +1,6 @@ +import{o}from"./bundled-types-CutNYhe2.js";import"../modules/vue-Bx6xSt6e.js";import"../modules/file-saver-igGfcqei.js";/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var a=Object.defineProperty,l=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,c=Object.prototype.hasOwnProperty,g=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of p(e))!c.call(t,r)&&r!==n&&a(t,r,{get:()=>e[r],enumerable:!(s=l(e,r))||s.enumerable});return t},d=(t,e,n)=>(g(t,e,"default"),n),i={};d(i,o);var b={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$"),action:{indentAction:i.languages.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},u={defaultToken:"",tokenPostfix:".python",keywords:["False","None","True","_","and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","match","nonlocal","not","or","pass","print","raise","return","try","type","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","self","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/[,:;]/,"delimiter"],[/[{}\[\]()]/,"@brackets"],[/@[a-zA-Z_]\w*/,"tag"],[/[a-zA-Z_]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/\s+/,"white"],[/(^#.*$)/,"comment"],[/'''/,"string","@endDocString"],[/"""/,"string","@endDblDocString"]],endDocString:[[/[^']+/,"string"],[/\\'/,"string"],[/'''/,"string","@popall"],[/'/,"string"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string","@popall"],[/"/,"string"]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,"number"]],strings:[[/'$/,"string.escape","@popall"],[/f'{1,3}/,"string.escape","@fStringBody"],[/'/,"string.escape","@stringBody"],[/"$/,"string.escape","@popall"],[/f"{1,3}/,"string.escape","@fDblStringBody"],[/"/,"string.escape","@dblStringBody"]],fStringBody:[[/[^\\'\{\}]+$/,"string","@popall"],[/[^\\'\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],stringBody:[[/[^\\']+$/,"string","@popall"],[/[^\\']+/,"string"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],fDblStringBody:[[/[^\\"\{\}]+$/,"string","@popall"],[/[^\\"\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],dblStringBody:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],fStringDetail:[[/[:][^}]+/,"string"],[/[!][ars]/,"string"],[/=/,"string"],[/\}/,"identifier","@pop"]]}};export{b as conf,u as language}; diff --git a/week_01/test1/assets/monaco/razor-B-LsaI92.js b/week_01/test1/assets/monaco/razor-B-LsaI92.js new file mode 100644 index 0000000..6c98187 --- /dev/null +++ b/week_01/test1/assets/monaco/razor-B-LsaI92.js @@ -0,0 +1,6 @@ +import{o as m}from"./bundled-types-CutNYhe2.js";import"../modules/vue-Bx6xSt6e.js";import"../modules/file-saver-igGfcqei.js";/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,d=Object.prototype.hasOwnProperty,p=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of l(e))!d.call(t,r)&&r!==o&&s(t,r,{get:()=>e[r],enumerable:!(n=c(e,r))||n.enumerable});return t},h=(t,e,o)=>(p(t,e,"default"),o),a={};h(a,m);var i=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],k={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${i.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:a.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${i.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:a.languages.IndentAction.Indent}}]},w={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/@@@@/],[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],razorInSimpleState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3"}]],razorInEmbeddedState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],razorBlockCommentTopLevel:[[/\*@/,"@rematch","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorBlockComment:[[/\*@/,"comment.cs","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorRootTopLevel:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/[})]/,"@rematch","@pop"],{include:"razorCommon"}],razorRoot:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/\}/,"delimiter.bracket.cs","@pop"],[/\)/,"delimiter.parenthesis.cs","@pop"],{include:"razorCommon"}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:"keyword.cs"},"@default":"identifier.cs"}}],[/[\[\]]/,"delimiter.array.cs"],[/[ \t\r\n]+/],[/\/\/.*$/,"comment.cs"],[/@\*/,"comment.cs","@razorBlockComment"],[/"([^"]*)"/,"string.cs"],[/'([^']*)'/,"string.cs"],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<\/)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,"delimiter.cs"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.cs"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.cs"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.cs"],[/0[0-7']*[0-7]/,"number.octal.cs"],[/0[bB][0-1']*[0-1]/,"number.binary.cs"],[/\d[\d']*/,"number.cs"],[/\d/,"number.cs"]]},razorKeywords:["abstract","as","async","await","base","bool","break","by","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","descending","explicit","event","extern","else","enum","false","finally","fixed","float","for","foreach","from","goto","group","if","implicit","in","int","interface","internal","into","is","lock","long","nameof","new","null","namespace","object","operator","out","override","orderby","params","private","protected","public","readonly","ref","return","switch","struct","sbyte","sealed","short","sizeof","stackalloc","static","string","select","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","volatile","void","when","while","where","yield","model","inject"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/};export{k as conf,w as language}; diff --git a/week_01/test1/assets/monaco/tsMode-CpBJDrta.js b/week_01/test1/assets/monaco/tsMode-CpBJDrta.js new file mode 100644 index 0000000..d96a998 --- /dev/null +++ b/week_01/test1/assets/monaco/tsMode-CpBJDrta.js @@ -0,0 +1,16 @@ +import{q as O,o as I}from"./bundled-types-CutNYhe2.js";import"../modules/vue-Bx6xSt6e.js";import"../modules/file-saver-igGfcqei.js";/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var N=Object.defineProperty,M=Object.getOwnPropertyDescriptor,R=Object.getOwnPropertyNames,K=Object.prototype.hasOwnProperty,E=(e,t,i,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of R(t))!K.call(e,n)&&n!==i&&N(e,n,{get:()=>t[n],enumerable:!(o=M(t,n))||o.enumerable});return e},H=(e,t,i)=>(E(e,t,"default"),i),a={};H(a,I);var V=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=a.editor.createWebWorker({moduleId:"vs/language/typescript/tsWorker",label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(a.editor.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},r={};r["lib.d.ts"]=!0;r["lib.decorators.d.ts"]=!0;r["lib.decorators.legacy.d.ts"]=!0;r["lib.dom.asynciterable.d.ts"]=!0;r["lib.dom.d.ts"]=!0;r["lib.dom.iterable.d.ts"]=!0;r["lib.es2015.collection.d.ts"]=!0;r["lib.es2015.core.d.ts"]=!0;r["lib.es2015.d.ts"]=!0;r["lib.es2015.generator.d.ts"]=!0;r["lib.es2015.iterable.d.ts"]=!0;r["lib.es2015.promise.d.ts"]=!0;r["lib.es2015.proxy.d.ts"]=!0;r["lib.es2015.reflect.d.ts"]=!0;r["lib.es2015.symbol.d.ts"]=!0;r["lib.es2015.symbol.wellknown.d.ts"]=!0;r["lib.es2016.array.include.d.ts"]=!0;r["lib.es2016.d.ts"]=!0;r["lib.es2016.full.d.ts"]=!0;r["lib.es2016.intl.d.ts"]=!0;r["lib.es2017.d.ts"]=!0;r["lib.es2017.date.d.ts"]=!0;r["lib.es2017.full.d.ts"]=!0;r["lib.es2017.intl.d.ts"]=!0;r["lib.es2017.object.d.ts"]=!0;r["lib.es2017.sharedmemory.d.ts"]=!0;r["lib.es2017.string.d.ts"]=!0;r["lib.es2017.typedarrays.d.ts"]=!0;r["lib.es2018.asyncgenerator.d.ts"]=!0;r["lib.es2018.asynciterable.d.ts"]=!0;r["lib.es2018.d.ts"]=!0;r["lib.es2018.full.d.ts"]=!0;r["lib.es2018.intl.d.ts"]=!0;r["lib.es2018.promise.d.ts"]=!0;r["lib.es2018.regexp.d.ts"]=!0;r["lib.es2019.array.d.ts"]=!0;r["lib.es2019.d.ts"]=!0;r["lib.es2019.full.d.ts"]=!0;r["lib.es2019.intl.d.ts"]=!0;r["lib.es2019.object.d.ts"]=!0;r["lib.es2019.string.d.ts"]=!0;r["lib.es2019.symbol.d.ts"]=!0;r["lib.es2020.bigint.d.ts"]=!0;r["lib.es2020.d.ts"]=!0;r["lib.es2020.date.d.ts"]=!0;r["lib.es2020.full.d.ts"]=!0;r["lib.es2020.intl.d.ts"]=!0;r["lib.es2020.number.d.ts"]=!0;r["lib.es2020.promise.d.ts"]=!0;r["lib.es2020.sharedmemory.d.ts"]=!0;r["lib.es2020.string.d.ts"]=!0;r["lib.es2020.symbol.wellknown.d.ts"]=!0;r["lib.es2021.d.ts"]=!0;r["lib.es2021.full.d.ts"]=!0;r["lib.es2021.intl.d.ts"]=!0;r["lib.es2021.promise.d.ts"]=!0;r["lib.es2021.string.d.ts"]=!0;r["lib.es2021.weakref.d.ts"]=!0;r["lib.es2022.array.d.ts"]=!0;r["lib.es2022.d.ts"]=!0;r["lib.es2022.error.d.ts"]=!0;r["lib.es2022.full.d.ts"]=!0;r["lib.es2022.intl.d.ts"]=!0;r["lib.es2022.object.d.ts"]=!0;r["lib.es2022.regexp.d.ts"]=!0;r["lib.es2022.sharedmemory.d.ts"]=!0;r["lib.es2022.string.d.ts"]=!0;r["lib.es2023.array.d.ts"]=!0;r["lib.es2023.collection.d.ts"]=!0;r["lib.es2023.d.ts"]=!0;r["lib.es2023.full.d.ts"]=!0;r["lib.es5.d.ts"]=!0;r["lib.es6.d.ts"]=!0;r["lib.esnext.collection.d.ts"]=!0;r["lib.esnext.d.ts"]=!0;r["lib.esnext.decorators.d.ts"]=!0;r["lib.esnext.disposable.d.ts"]=!0;r["lib.esnext.full.d.ts"]=!0;r["lib.esnext.intl.d.ts"]=!0;r["lib.esnext.object.d.ts"]=!0;r["lib.esnext.promise.d.ts"]=!0;r["lib.scripthost.d.ts"]=!0;r["lib.webworker.asynciterable.d.ts"]=!0;r["lib.webworker.d.ts"]=!0;r["lib.webworker.importscripts.d.ts"]=!0;r["lib.webworker.iterable.d.ts"]=!0;function D(e,t,i=0){if(typeof e=="string")return e;if(e===void 0)return"";let o="";if(i){o+=t;for(let n=0;nt.text).join(""):""}var _=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let i=e.getPositionAt(t.start),o=e.getPositionAt(t.start+t.length),{lineNumber:n,column:c}=i,{lineNumber:u,column:s}=o;return{startLineNumber:n,startColumn:c,endLineNumber:u,endColumn:s}}},W=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!r[e.path.slice(1)]:!1}getOrCreateModel(e){const t=a.Uri.parse(e),i=a.editor.getModel(t);if(i)return i;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return a.editor.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const o=O.getExtraLibs()[e];return o?a.editor.createModel(o.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}},j=class extends _{constructor(e,t,i,o){super(o),this._libFiles=e,this._defaults=t,this._selector=i,this._disposables=[],this._listener=Object.create(null);const n=s=>{if(s.getLanguageId()!==i)return;const l=()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h?s.isAttachedToEditor()&&this._doValidate(s):this._doValidate(s)};let g;const d=s.onDidChangeContent(()=>{clearTimeout(g),g=window.setTimeout(l,500)}),b=s.onDidChangeAttached(()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h&&(s.isAttachedToEditor()?l():a.editor.setModelMarkers(s,this._selector,[]))});this._listener[s.uri.toString()]={dispose(){d.dispose(),b.dispose(),clearTimeout(g)}},l()},c=s=>{a.editor.setModelMarkers(s,this._selector,[]);const l=s.uri.toString();this._listener[l]&&(this._listener[l].dispose(),delete this._listener[l])};this._disposables.push(a.editor.onDidCreateModel(s=>n(s))),this._disposables.push(a.editor.onWillDisposeModel(c)),this._disposables.push(a.editor.onDidChangeModelLanguage(s=>{c(s.model),n(s.model)})),this._disposables.push({dispose(){for(const s of a.editor.getModels())c(s)}});const u=()=>{for(const s of a.editor.getModels())c(s),n(s)};this._disposables.push(this._defaults.onDidChange(u)),this._disposables.push(this._defaults.onDidExtraLibsChange(u)),a.editor.getModels().forEach(s=>n(s))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const i=[],{noSyntaxValidation:o,noSemanticValidation:n,noSuggestionDiagnostics:c}=this._defaults.getDiagnosticsOptions();o||i.push(t.getSyntacticDiagnostics(e.uri.toString())),n||i.push(t.getSemanticDiagnostics(e.uri.toString())),c||i.push(t.getSuggestionDiagnostics(e.uri.toString()));const u=await Promise.all(i);if(!u||e.isDisposed())return;const s=u.reduce((g,d)=>d.concat(g),[]).filter(g=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(g.code)===-1),l=s.map(g=>g.relatedInformation||[]).reduce((g,d)=>d.concat(g),[]).map(g=>g.file?a.Uri.parse(g.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(l),!e.isDisposed()&&a.editor.setModelMarkers(e,this._selector,s.map(g=>this._convertDiagnostics(e,g)))}_convertDiagnostics(e,t){const i=t.start||0,o=t.length||1,{lineNumber:n,column:c}=e.getPositionAt(i),{lineNumber:u,column:s}=e.getPositionAt(i+o),l=[];return t.reportsUnnecessary&&l.push(a.MarkerTag.Unnecessary),t.reportsDeprecated&&l.push(a.MarkerTag.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:n,startColumn:c,endLineNumber:u,endColumn:s,message:D(t.messageText,` +`),code:t.code.toString(),tags:l,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];const i=[];return t.forEach(o=>{let n=e;if(o.file&&(n=this._libFiles.getOrCreateModel(o.file.fileName)),!n)return;const c=o.start||0,u=o.length||1,{lineNumber:s,column:l}=n.getPositionAt(c),{lineNumber:g,column:d}=n.getPositionAt(c+u);i.push({resource:n.uri,startLineNumber:s,startColumn:l,endLineNumber:g,endColumn:d,message:D(o.messageText,` +`)})}),i}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return a.MarkerSeverity.Error;case 3:return a.MarkerSeverity.Info;case 0:return a.MarkerSeverity.Warning;case 2:return a.MarkerSeverity.Hint}return a.MarkerSeverity.Info}},B=class C extends _{get triggerCharacters(){return["."]}async provideCompletionItems(t,i,o,n){const c=t.getWordUntilPosition(i),u=new a.Range(i.lineNumber,c.startColumn,i.lineNumber,c.endColumn),s=t.uri,l=t.getOffsetAt(i),g=await this._worker(s);if(t.isDisposed())return;const d=await g.getCompletionsAtPosition(s.toString(),l);return!d||t.isDisposed()?void 0:{suggestions:d.entries.map(h=>{let y=u;if(h.replacementSpan){const S=t.getPositionAt(h.replacementSpan.start),x=t.getPositionAt(h.replacementSpan.start+h.replacementSpan.length);y=new a.Range(S.lineNumber,S.column,x.lineNumber,x.column)}const v=[];return h.kindModifiers!==void 0&&h.kindModifiers.indexOf("deprecated")!==-1&&v.push(a.languages.CompletionItemTag.Deprecated),{uri:s,position:i,offset:l,range:y,label:h.name,insertText:h.name,sortText:h.sortText,kind:C.convertKind(h.kind),tags:v}})}}async resolveCompletionItem(t,i){const o=t,n=o.uri,c=o.position,u=o.offset,l=await(await this._worker(n)).getCompletionEntryDetails(n.toString(),u,o.label);return l?{uri:n,position:c,label:l.name,kind:C.convertKind(l.kind),detail:w(l.displayParts),documentation:{value:C.createDocumentationString(l)}}:o}static convertKind(t){switch(t){case f.primitiveType:case f.keyword:return a.languages.CompletionItemKind.Keyword;case f.variable:case f.localVariable:return a.languages.CompletionItemKind.Variable;case f.memberVariable:case f.memberGetAccessor:case f.memberSetAccessor:return a.languages.CompletionItemKind.Field;case f.function:case f.memberFunction:case f.constructSignature:case f.callSignature:case f.indexSignature:return a.languages.CompletionItemKind.Function;case f.enum:return a.languages.CompletionItemKind.Enum;case f.module:return a.languages.CompletionItemKind.Module;case f.class:return a.languages.CompletionItemKind.Class;case f.interface:return a.languages.CompletionItemKind.Interface;case f.warning:return a.languages.CompletionItemKind.File}return a.languages.CompletionItemKind.Property}static createDocumentationString(t){let i=w(t.documentation);if(t.tags)for(const o of t.tags)i+=` + +${T(o)}`;return i}};function T(e){let t=`*@${e.name}*`;if(e.name==="param"&&e.text){const[i,...o]=e.text;t+=`\`${i.text}\``,o.length>0&&(t+=` — ${o.map(n=>n.text).join(" ")}`)}else Array.isArray(e.text)?t+=` — ${e.text.map(i=>i.text).join(" ")}`:e.text&&(t+=` — ${e.text}`);return t}var U=class P extends _{constructor(){super(...arguments),this.signatureHelpTriggerCharacters=["(",","]}static _toSignatureHelpTriggerReason(t){switch(t.triggerKind){case a.languages.SignatureHelpTriggerKind.TriggerCharacter:return t.triggerCharacter?t.isRetrigger?{kind:"retrigger",triggerCharacter:t.triggerCharacter}:{kind:"characterTyped",triggerCharacter:t.triggerCharacter}:{kind:"invoked"};case a.languages.SignatureHelpTriggerKind.ContentChange:return t.isRetrigger?{kind:"retrigger"}:{kind:"invoked"};case a.languages.SignatureHelpTriggerKind.Invoke:default:return{kind:"invoked"}}}async provideSignatureHelp(t,i,o,n){const c=t.uri,u=t.getOffsetAt(i),s=await this._worker(c);if(t.isDisposed())return;const l=await s.getSignatureHelpItems(c.toString(),u,{triggerReason:P._toSignatureHelpTriggerReason(n)});if(!l||t.isDisposed())return;const g={activeSignature:l.selectedItemIndex,activeParameter:l.argumentIndex,signatures:[]};return l.items.forEach(d=>{const b={label:"",parameters:[]};b.documentation={value:w(d.documentation)},b.label+=w(d.prefixDisplayParts),d.parameters.forEach((h,y,v)=>{const S=w(h.displayParts),x={label:S,documentation:{value:w(h.documentation)}};b.label+=S,b.parameters.push(x),yT(d)).join(` + +`):"",g=w(u.displayParts);return{range:this._textSpanToRange(e,u.textSpan),contents:[{value:"```typescript\n"+g+"\n```\n"},{value:s+(l?` + +`+l:"")}]}}},z=class extends _{async provideDocumentHighlights(e,t,i){const o=e.uri,n=e.getOffsetAt(t),c=await this._worker(o);if(e.isDisposed())return;const u=await c.getDocumentHighlights(o.toString(),n,[o.toString()]);if(!(!u||e.isDisposed()))return u.flatMap(s=>s.highlightSpans.map(l=>({range:this._textSpanToRange(e,l.textSpan),kind:l.kind==="writtenReference"?a.languages.DocumentHighlightKind.Write:a.languages.DocumentHighlightKind.Text})))}},G=class extends _{constructor(e,t){super(t),this._libFiles=e}async provideDefinition(e,t,i){const o=e.uri,n=e.getOffsetAt(t),c=await this._worker(o);if(e.isDisposed())return;const u=await c.getDefinitionAtPosition(o.toString(),n);if(!u||e.isDisposed()||(await this._libFiles.fetchLibFilesIfNecessary(u.map(l=>a.Uri.parse(l.fileName))),e.isDisposed()))return;const s=[];for(let l of u){const g=this._libFiles.getOrCreateModel(l.fileName);g&&s.push({uri:g.uri,range:this._textSpanToRange(g,l.textSpan)})}return s}},J=class extends _{constructor(e,t){super(t),this._libFiles=e}async provideReferences(e,t,i,o){const n=e.uri,c=e.getOffsetAt(t),u=await this._worker(n);if(e.isDisposed())return;const s=await u.getReferencesAtPosition(n.toString(),c);if(!s||e.isDisposed()||(await this._libFiles.fetchLibFilesIfNecessary(s.map(g=>a.Uri.parse(g.fileName))),e.isDisposed()))return;const l=[];for(let g of s){const d=this._libFiles.getOrCreateModel(g.fileName);d&&l.push({uri:d.uri,range:this._textSpanToRange(d,g.textSpan)})}return l}},q=class extends _{async provideDocumentSymbols(e,t){const i=e.uri,o=await this._worker(i);if(e.isDisposed())return;const n=await o.getNavigationTree(i.toString());if(!n||e.isDisposed())return;const c=(s,l)=>{var d;return{name:s.text,detail:"",kind:m[s.kind]||a.languages.SymbolKind.Variable,range:this._textSpanToRange(e,s.spans[0]),selectionRange:this._textSpanToRange(e,s.spans[0]),tags:[],children:(d=s.childItems)==null?void 0:d.map(b=>c(b,s.text)),containerName:l}};return n.childItems?n.childItems.map(s=>c(s)):[]}},p,f=(p=class{},p.unknown="",p.keyword="keyword",p.script="script",p.module="module",p.class="class",p.interface="interface",p.type="type",p.enum="enum",p.variable="var",p.localVariable="local var",p.function="function",p.localFunction="local function",p.memberFunction="method",p.memberGetAccessor="getter",p.memberSetAccessor="setter",p.memberVariable="property",p.constructorImplementation="constructor",p.callSignature="call",p.indexSignature="index",p.constructSignature="construct",p.parameter="parameter",p.typeParameter="type parameter",p.primitiveType="primitive type",p.label="label",p.alias="alias",p.const="const",p.let="let",p.warning="warning",p),m=Object.create(null);m[f.module]=a.languages.SymbolKind.Module;m[f.class]=a.languages.SymbolKind.Class;m[f.enum]=a.languages.SymbolKind.Enum;m[f.interface]=a.languages.SymbolKind.Interface;m[f.memberFunction]=a.languages.SymbolKind.Method;m[f.memberVariable]=a.languages.SymbolKind.Property;m[f.memberGetAccessor]=a.languages.SymbolKind.Property;m[f.memberSetAccessor]=a.languages.SymbolKind.Property;m[f.variable]=a.languages.SymbolKind.Variable;m[f.const]=a.languages.SymbolKind.Variable;m[f.localVariable]=a.languages.SymbolKind.Variable;m[f.variable]=a.languages.SymbolKind.Variable;m[f.function]=a.languages.SymbolKind.Function;m[f.localFunction]=a.languages.SymbolKind.Function;var k=class extends _{static _convertOptions(e){return{ConvertTabsToSpaces:e.insertSpaces,TabSize:e.tabSize,IndentSize:e.tabSize,IndentStyle:2,NewLineCharacter:` +`,InsertSpaceAfterCommaDelimiter:!0,InsertSpaceAfterSemicolonInForStatements:!0,InsertSpaceBeforeAndAfterBinaryOperators:!0,InsertSpaceAfterKeywordsInControlFlowStatements:!0,InsertSpaceAfterFunctionKeywordForAnonymousFunctions:!0,InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,PlaceOpenBraceOnNewLineForControlBlocks:!1,PlaceOpenBraceOnNewLineForFunctions:!1}}_convertTextChanges(e,t){return{text:t.newText,range:this._textSpanToRange(e,t.span)}}},Q=class extends k{constructor(){super(...arguments),this.canFormatMultipleRanges=!1}async provideDocumentRangeFormattingEdits(e,t,i,o){const n=e.uri,c=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),u=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),s=await this._worker(n);if(e.isDisposed())return;const l=await s.getFormattingEditsForRange(n.toString(),c,u,k._convertOptions(i));if(!(!l||e.isDisposed()))return l.map(g=>this._convertTextChanges(e,g))}},X=class extends k{get autoFormatTriggerCharacters(){return[";","}",` +`]}async provideOnTypeFormattingEdits(e,t,i,o,n){const c=e.uri,u=e.getOffsetAt(t),s=await this._worker(c);if(e.isDisposed())return;const l=await s.getFormattingEditsAfterKeystroke(c.toString(),u,i,k._convertOptions(o));if(!(!l||e.isDisposed()))return l.map(g=>this._convertTextChanges(e,g))}},Y=class extends k{async provideCodeActions(e,t,i,o){const n=e.uri,c=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),u=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),s=k._convertOptions(e.getOptions()),l=i.markers.filter(h=>h.code).map(h=>h.code).map(Number),g=await this._worker(n);if(e.isDisposed())return;const d=await g.getCodeFixesAtPosition(n.toString(),c,u,l,s);return!d||e.isDisposed()?{actions:[],dispose:()=>{}}:{actions:d.filter(h=>h.changes.filter(y=>y.isNewFile).length===0).map(h=>this._tsCodeFixActionToMonacoCodeAction(e,i,h)),dispose:()=>{}}}_tsCodeFixActionToMonacoCodeAction(e,t,i){const o=[];for(const c of i.changes)for(const u of c.textChanges)o.push({resource:e.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(e,u.span),text:u.newText}});return{title:i.description,edit:{edits:o},diagnostics:t.markers,kind:"quickfix"}}},Z=class extends _{constructor(e,t){super(t),this._libFiles=e}async provideRenameEdits(e,t,i,o){const n=e.uri,c=n.toString(),u=e.getOffsetAt(t),s=await this._worker(n);if(e.isDisposed())return;const l=await s.getRenameInfo(c,u,{allowRenameOfImportPath:!1});if(l.canRename===!1)return{edits:[],rejectReason:l.localizedErrorMessage};if(l.fileToRename!==void 0)throw new Error("Renaming files is not supported.");const g=await s.findRenameLocations(c,u,!1,!1,!1);if(!g||e.isDisposed())return;const d=[];for(const b of g){const h=this._libFiles.getOrCreateModel(b.fileName);if(h)d.push({resource:h.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(h,b.textSpan),text:i}});else throw new Error(`Unknown file ${b.fileName}.`)}return{edits:d}}},ee=class extends _{async provideInlayHints(e,t,i){const o=e.uri,n=o.toString(),c=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),u=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),s=await this._worker(o);return e.isDisposed()?null:{hints:(await s.provideInlayHints(n,c,u)).map(d=>({...d,label:d.text,position:e.getPositionAt(d.position),kind:this._convertHintKind(d.kind)})),dispose:()=>{}}}_convertHintKind(e){switch(e){case"Parameter":return a.languages.InlayHintKind.Parameter;case"Type":return a.languages.InlayHintKind.Type;default:return a.languages.InlayHintKind.Type}}},A,F;function ne(e){F=L(e,"typescript")}function ae(e){A=L(e,"javascript")}function oe(){return new Promise((e,t)=>{if(!A)return t("JavaScript not registered!");e(A)})}function le(){return new Promise((e,t)=>{if(!F)return t("TypeScript not registered!");e(F)})}function L(e,t){const i=[],o=new V(t,e),n=(...s)=>o.getLanguageServiceWorker(...s),c=new W(n);function u(){const{modeConfiguration:s}=e;te(i),s.completionItems&&i.push(a.languages.registerCompletionItemProvider(t,new B(n))),s.signatureHelp&&i.push(a.languages.registerSignatureHelpProvider(t,new U(n))),s.hovers&&i.push(a.languages.registerHoverProvider(t,new $(n))),s.documentHighlights&&i.push(a.languages.registerDocumentHighlightProvider(t,new z(n))),s.definitions&&i.push(a.languages.registerDefinitionProvider(t,new G(c,n))),s.references&&i.push(a.languages.registerReferenceProvider(t,new J(c,n))),s.documentSymbols&&i.push(a.languages.registerDocumentSymbolProvider(t,new q(n))),s.rename&&i.push(a.languages.registerRenameProvider(t,new Z(c,n))),s.documentRangeFormattingEdits&&i.push(a.languages.registerDocumentRangeFormattingEditProvider(t,new Q(n))),s.onTypeFormattingEdits&&i.push(a.languages.registerOnTypeFormattingEditProvider(t,new X(n))),s.codeActions&&i.push(a.languages.registerCodeActionProvider(t,new Y(n))),s.inlayHints&&i.push(a.languages.registerInlayHintsProvider(t,new ee(n))),s.diagnostics&&i.push(new j(c,e,t,n))}return u(),n}function te(e){for(;e.length;)e.pop().dispose()}export{_ as Adapter,Y as CodeActionAdaptor,G as DefinitionAdapter,j as DiagnosticsAdapter,z as DocumentHighlightAdapter,Q as FormatAdapter,k as FormatHelper,X as FormatOnTypeAdapter,ee as InlayHintsAdapter,f as Kind,W as LibFiles,q as OutlineAdapter,$ as QuickInfoAdapter,J as ReferenceAdapter,Z as RenameAdapter,U as SignatureHelpAdapter,B as SuggestAdapter,V as WorkerManager,D as flattenDiagnosticMessageText,oe as getJavaScriptWorker,le as getTypeScriptWorker,ae as setupJavaScript,ne as setupTypeScript}; diff --git a/week_01/test1/assets/monaco/typescript-B4jGL9um.js b/week_01/test1/assets/monaco/typescript-B4jGL9um.js new file mode 100644 index 0000000..5eadf30 --- /dev/null +++ b/week_01/test1/assets/monaco/typescript-B4jGL9um.js @@ -0,0 +1,6 @@ +import{o as s}from"./bundled-types-CutNYhe2.js";import"../modules/vue-Bx6xSt6e.js";import"../modules/file-saver-igGfcqei.js";/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var c=Object.defineProperty,a=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,l=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of p(e))!g.call(t,n)&&n!==r&&c(t,n,{get:()=>e[n],enumerable:!(i=a(e,n))||i.enumerable});return t},d=(t,e,r)=>(l(t,e,"default"),r),o={};d(o,s);var u={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:o.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:o.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:o.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:o.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},f={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};export{u as conf,f as language}; diff --git a/week_01/test1/assets/monaco/xml-C1Slvu_M.js b/week_01/test1/assets/monaco/xml-C1Slvu_M.js new file mode 100644 index 0000000..f31331d --- /dev/null +++ b/week_01/test1/assets/monaco/xml-C1Slvu_M.js @@ -0,0 +1,6 @@ +import{o as r}from"./bundled-types-CutNYhe2.js";import"../modules/vue-Bx6xSt6e.js";import"../modules/file-saver-igGfcqei.js";/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var m=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,p=Object.prototype.hasOwnProperty,d=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of l(e))!p.call(t,n)&&n!==o&&m(t,n,{get:()=>e[n],enumerable:!(i=c(e,n))||i.enumerable});return t},s=(t,e,o)=>(d(t,e,"default"),o),a={};s(a,r);var _={comments:{blockComment:[""]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:a.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:a.languages.IndentAction.Indent}}]},f={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[/