From 5fbe636d0f52de24e1d4017baba5d64198c51c0a Mon Sep 17 00:00:00 2001 From: kunish Date: Fri, 20 Oct 2023 05:22:00 +0000 Subject: [PATCH] deploy: e465f474b9e91c73db3ca84f165d41940c0d11ed --- ...-a230cb05.js => SchemaReference.es-db37d28c.js} | 2 +- .../{cssMode-319ff2f1.js => cssMode-07ea33d4.js} | 2 +- ...marker2-cdbbf48f.js => freemarker2-a4c47829.js} | 2 +- ...ndlebars-135a913a.js => handlebars-d6e6d8dd.js} | 2 +- .../{hint.es-bb5e9099.js => hint.es-aabaaa11.js} | 2 +- .../{hint.es2-37ae5894.js => hint.es2-40045f85.js} | 2 +- assets/{html-36207922.js => html-8cf19389.js} | 2 +- .../{htmlMode-563dc6c0.js => htmlMode-b4d8fb22.js} | 2 +- assets/{index-7e44875f.js => index-9671150e.js} | 14 +++++++------- .../{info.es-e3c7d590.js => info.es-76dbdced.js} | 2 +- ...vascript-6a33dd26.js => javascript-2a7fa81e.js} | 2 +- .../{jsonMode-60663a8e.js => jsonMode-2a0c8d22.js} | 2 +- .../{jump.es-e2480f49.js => jump.es-c4a73c76.js} | 2 +- assets/lint.es2-285cd615.js | 6 ++++++ assets/lint.es2-963c31c2.js | 6 ------ .../{lint.es3-71cb7f77.js => lint.es3-eda84a87.js} | 2 +- assets/{liquid-7812bba1.js => liquid-ff24b95f.js} | 2 +- assets/{mdx-9c7605cd.js => mdx-5bad2419.js} | 2 +- .../{mode.es-da807399.js => mode.es-0a36625a.js} | 2 +- .../{mode.es2-d05684db.js => mode.es2-b413cff7.js} | 2 +- .../{mode.es3-0c1c2d6c.js => mode.es3-96157044.js} | 2 +- assets/{python-5ef08dec.js => python-a979b408.js} | 2 +- assets/{razor-9b697dd4.js => razor-7be18b7f.js} | 2 +- assets/{tsMode-138afb3a.js => tsMode-08480a58.js} | 2 +- ...pescript-69a62869.js => typescript-d2a7c870.js} | 2 +- assets/{xml-f214c576.js => xml-bb4e8a16.js} | 2 +- assets/{yaml-2fd0c875.js => yaml-0163eac1.js} | 2 +- index.html | 2 +- 28 files changed, 38 insertions(+), 38 deletions(-) rename assets/{SchemaReference.es-a230cb05.js => SchemaReference.es-db37d28c.js} (97%) rename assets/{cssMode-319ff2f1.js => cssMode-07ea33d4.js} (99%) rename assets/{freemarker2-cdbbf48f.js => freemarker2-a4c47829.js} (99%) rename assets/{handlebars-135a913a.js => handlebars-d6e6d8dd.js} (99%) rename assets/{hint.es-bb5e9099.js => hint.es-aabaaa11.js} (91%) rename assets/{hint.es2-37ae5894.js => hint.es2-40045f85.js} (97%) rename assets/{html-36207922.js => html-8cf19389.js} (98%) rename assets/{htmlMode-563dc6c0.js => htmlMode-b4d8fb22.js} (99%) rename assets/{index-7e44875f.js => index-9671150e.js} (99%) rename assets/{info.es-e3c7d590.js => info.es-76dbdced.js} (94%) rename assets/{javascript-6a33dd26.js => javascript-2a7fa81e.js} (89%) rename assets/{jsonMode-60663a8e.js => jsonMode-2a0c8d22.js} (99%) rename assets/{jump.es-e2480f49.js => jump.es-c4a73c76.js} (95%) create mode 100644 assets/lint.es2-285cd615.js delete mode 100644 assets/lint.es2-963c31c2.js rename assets/{lint.es3-71cb7f77.js => lint.es3-eda84a87.js} (98%) rename assets/{liquid-7812bba1.js => liquid-ff24b95f.js} (98%) rename assets/{mdx-9c7605cd.js => mdx-5bad2419.js} (98%) rename assets/{mode.es-da807399.js => mode.es-0a36625a.js} (89%) rename assets/{mode.es2-d05684db.js => mode.es2-b413cff7.js} (95%) rename assets/{mode.es3-0c1c2d6c.js => mode.es3-96157044.js} (95%) rename assets/{python-5ef08dec.js => python-a979b408.js} (98%) rename assets/{razor-9b697dd4.js => razor-7be18b7f.js} (99%) rename assets/{tsMode-138afb3a.js => tsMode-08480a58.js} (99%) rename assets/{typescript-69a62869.js => typescript-d2a7c870.js} (98%) rename assets/{xml-f214c576.js => xml-bb4e8a16.js} (97%) rename assets/{yaml-2fd0c875.js => yaml-0163eac1.js} (98%) diff --git a/assets/SchemaReference.es-a230cb05.js b/assets/SchemaReference.es-db37d28c.js similarity index 97% rename from assets/SchemaReference.es-a230cb05.js rename to assets/SchemaReference.es-db37d28c.js index 99e975d1..c856dfd9 100644 --- a/assets/SchemaReference.es-a230cb05.js +++ b/assets/SchemaReference.es-db37d28c.js @@ -1 +1 @@ -import{s as b}from"./forEachState.es-b2033c2b.js";import{o as l,Z as k,I as F,Y as h,_ as S,$ as g,a0 as D,a1 as T,e as Q}from"./index-7e44875f.js";var j=Object.defineProperty,r=(t,n)=>j(t,"name",{value:n,configurable:!0});function V(t,n){const e={schema:t,type:null,parentType:null,inputType:null,directiveDef:null,fieldDef:null,argDef:null,argDefs:null,objectFieldDefs:null};return b(n,a=>{var u,p;switch(a.kind){case"Query":case"ShortQuery":e.type=t.getQueryType();break;case"Mutation":e.type=t.getMutationType();break;case"Subscription":e.type=t.getSubscriptionType();break;case"InlineFragment":case"FragmentDefinition":a.type&&(e.type=t.getType(a.type));break;case"Field":case"AliasedField":e.fieldDef=e.type&&a.name?c(t,e.parentType,a.name):null,e.type=(u=e.fieldDef)===null||u===void 0?void 0:u.type;break;case"SelectionSet":e.parentType=e.type?l(e.type):null;break;case"Directive":e.directiveDef=a.name?t.getDirective(a.name):null;break;case"Arguments":const s=a.prevState?a.prevState.kind==="Field"?e.fieldDef:a.prevState.kind==="Directive"?e.directiveDef:a.prevState.kind==="AliasedField"?a.prevState.name&&c(t,e.parentType,a.prevState.name):null:null;e.argDefs=s?s.args:null;break;case"Argument":if(e.argDef=null,e.argDefs){for(let i=0;ii.value===a.name):null;break;case"ListValue":const d=e.inputType?F(e.inputType):null;e.inputType=d instanceof h?d.ofType:null;break;case"ObjectValue":const m=e.inputType?l(e.inputType):null;e.objectFieldDefs=m instanceof k?m.getFields():null;break;case"ObjectField":const o=a.name&&e.objectFieldDefs?e.objectFieldDefs[a.name]:null;e.inputType=o==null?void 0:o.type;break;case"NamedType":e.type=a.name?t.getType(a.name):null;break}}),e}r(V,"getTypeInfo");function c(t,n,e){if(e===g.name&&t.getQueryType()===n)return g;if(e===D.name&&t.getQueryType()===n)return D;if(e===T.name&&Q(n))return T;if(n&&n.getFields)return n.getFields()[e]}r(c,"getFieldDef");function v(t,n){for(let e=0;ej(t,"name",{value:n,configurable:!0});function V(t,n){const e={schema:t,type:null,parentType:null,inputType:null,directiveDef:null,fieldDef:null,argDef:null,argDefs:null,objectFieldDefs:null};return b(n,a=>{var u,p;switch(a.kind){case"Query":case"ShortQuery":e.type=t.getQueryType();break;case"Mutation":e.type=t.getMutationType();break;case"Subscription":e.type=t.getSubscriptionType();break;case"InlineFragment":case"FragmentDefinition":a.type&&(e.type=t.getType(a.type));break;case"Field":case"AliasedField":e.fieldDef=e.type&&a.name?c(t,e.parentType,a.name):null,e.type=(u=e.fieldDef)===null||u===void 0?void 0:u.type;break;case"SelectionSet":e.parentType=e.type?l(e.type):null;break;case"Directive":e.directiveDef=a.name?t.getDirective(a.name):null;break;case"Arguments":const s=a.prevState?a.prevState.kind==="Field"?e.fieldDef:a.prevState.kind==="Directive"?e.directiveDef:a.prevState.kind==="AliasedField"?a.prevState.name&&c(t,e.parentType,a.prevState.name):null:null;e.argDefs=s?s.args:null;break;case"Argument":if(e.argDef=null,e.argDefs){for(let i=0;ii.value===a.name):null;break;case"ListValue":const d=e.inputType?F(e.inputType):null;e.inputType=d instanceof h?d.ofType:null;break;case"ObjectValue":const m=e.inputType?l(e.inputType):null;e.objectFieldDefs=m instanceof k?m.getFields():null;break;case"ObjectField":const o=a.name&&e.objectFieldDefs?e.objectFieldDefs[a.name]:null;e.inputType=o==null?void 0:o.type;break;case"NamedType":e.type=a.name?t.getType(a.name):null;break}}),e}r(V,"getTypeInfo");function c(t,n,e){if(e===g.name&&t.getQueryType()===n)return g;if(e===D.name&&t.getQueryType()===n)return D;if(e===T.name&&Q(n))return T;if(n&&n.getFields)return n.getFields()[e]}r(c,"getFieldDef");function v(t,n){for(let e=0;en in e?Le(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var k=(e,n,i)=>(je(e,typeof n!="symbol"?n+"":n,i),i);import{m as Ne}from"./index-7e44875f.js";/*!----------------------------------------------------------------------------- +var Le=Object.defineProperty;var je=(e,n,i)=>n in e?Le(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var k=(e,n,i)=>(je(e,typeof n!="symbol"?n+"":n,i),i);import{m as Ne}from"./index-9671150e.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) * Released under the MIT license diff --git a/assets/freemarker2-cdbbf48f.js b/assets/freemarker2-a4c47829.js similarity index 99% rename from assets/freemarker2-cdbbf48f.js rename to assets/freemarker2-a4c47829.js index 64caf108..e84b92bf 100644 --- a/assets/freemarker2-cdbbf48f.js +++ b/assets/freemarker2-a4c47829.js @@ -1,4 +1,4 @@ -import{m as F}from"./index-7e44875f.js";/*!----------------------------------------------------------------------------- +import{m as F}from"./index-9671150e.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) * Released under the MIT license diff --git a/assets/handlebars-135a913a.js b/assets/handlebars-d6e6d8dd.js similarity index 99% rename from assets/handlebars-135a913a.js rename to assets/handlebars-d6e6d8dd.js index 19a51036..fcfef2a6 100644 --- a/assets/handlebars-135a913a.js +++ b/assets/handlebars-d6e6d8dd.js @@ -1,4 +1,4 @@ -import{m as i}from"./index-7e44875f.js";/*!----------------------------------------------------------------------------- +import{m as i}from"./index-9671150e.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) * Released under the MIT license diff --git a/assets/hint.es-bb5e9099.js b/assets/hint.es-aabaaa11.js similarity index 91% rename from assets/hint.es-bb5e9099.js rename to assets/hint.es-aabaaa11.js index c959ece7..8dd69a57 100644 --- a/assets/hint.es-bb5e9099.js +++ b/assets/hint.es-aabaaa11.js @@ -1 +1 @@ -import{C as n}from"./codemirror.es-52e8b92d.js";import"./show-hint.es-b981493e.js";import{g as c}from"./index-7e44875f.js";import{P as g}from"./Range-52ddcb6a.js";import"./codemirror.es2-5884f31a.js";n.registerHelper("hint","graphql",(i,a)=>{const{schema:s,externalFragments:p}=a;if(!s)return;const r=i.getCursor(),t=i.getTokenAt(r),l=t.type!==null&&/"|\w/.test(t.string[0])?t.start:t.end,m=new g(r.line,l),e={list:c(s,i.getValue(),m,t,p).map(o=>({text:o.label,type:o.type,description:o.documentation,isDeprecated:o.isDeprecated,deprecationReason:o.deprecationReason})),from:{line:r.line,ch:l},to:{line:r.line,ch:t.end}};return e!=null&&e.list&&e.list.length>0&&(e.from=n.Pos(e.from.line,e.from.ch),e.to=n.Pos(e.to.line,e.to.ch),n.signal(i,"hasCompletion",i,e,t)),e}); +import{C as n}from"./codemirror.es-52e8b92d.js";import"./show-hint.es-b981493e.js";import{g as c}from"./index-9671150e.js";import{P as g}from"./Range-52ddcb6a.js";import"./codemirror.es2-5884f31a.js";n.registerHelper("hint","graphql",(i,a)=>{const{schema:s,externalFragments:p}=a;if(!s)return;const r=i.getCursor(),t=i.getTokenAt(r),l=t.type!==null&&/"|\w/.test(t.string[0])?t.start:t.end,m=new g(r.line,l),e={list:c(s,i.getValue(),m,t,p).map(o=>({text:o.label,type:o.type,description:o.documentation,isDeprecated:o.isDeprecated,deprecationReason:o.deprecationReason})),from:{line:r.line,ch:l},to:{line:r.line,ch:t.end}};return e!=null&&e.list&&e.list.length>0&&(e.from=n.Pos(e.from.line,e.from.ch),e.to=n.Pos(e.to.line,e.to.ch),n.signal(i,"hasCompletion",i,e,t)),e}); diff --git a/assets/hint.es2-37ae5894.js b/assets/hint.es2-40045f85.js similarity index 97% rename from assets/hint.es2-37ae5894.js rename to assets/hint.es2-40045f85.js index 81ec19fd..2f959a78 100644 --- a/assets/hint.es2-37ae5894.js +++ b/assets/hint.es2-40045f85.js @@ -1 +1 @@ -import{C as f}from"./codemirror.es-52e8b92d.js";import{s as L}from"./forEachState.es-b2033c2b.js";import"./codemirror.es2-5884f31a.js";import{o as h,Z as b,_ as T,a5 as d,I as j,Y as D}from"./index-7e44875f.js";var N=Object.defineProperty,p=(i,n)=>N(i,"name",{value:n,configurable:!0});function u(i,n,t){const r=x(t,m(n.string));if(!r)return;const e=n.type!==null&&/"|\w/.test(n.string[0])?n.start:n.end;return{list:r,from:{line:i.line,ch:e},to:{line:i.line,ch:n.end}}}p(u,"hintList");function x(i,n){if(!n)return y(i,r=>!r.isDeprecated);const t=i.map(r=>({proximity:V(m(r.text),n),entry:r}));return y(y(t,r=>r.proximity<=2),r=>!r.entry.isDeprecated).sort((r,e)=>(r.entry.isDeprecated?1:0)-(e.entry.isDeprecated?1:0)||r.proximity-e.proximity||r.entry.text.length-e.entry.text.length).map(r=>r.entry)}p(x,"filterAndSortList");function y(i,n){const t=i.filter(n);return t.length===0?i:t}p(y,"filterNonEmpty");function m(i){return i.toLowerCase().replaceAll(/\W/g,"")}p(m,"normalizeText");function V(i,n){let t=v(n,i);return i.length>n.length&&(t-=i.length-n.length-1,t+=i.indexOf(n)===0?0:.5),t}p(V,"getProximity");function v(i,n){let t,r;const e=[],a=i.length,s=n.length;for(t=0;t<=a;t++)e[t]=[t];for(r=1;r<=s;r++)e[0][r]=r;for(t=1;t<=a;t++)for(r=1;r<=s;r++){const c=i[t-1]===n[r-1]?0:1;e[t][r]=Math.min(e[t-1][r]+1,e[t][r-1]+1,e[t-1][r-1]+c),t>1&&r>1&&i[t-1]===n[r-2]&&i[t-2]===n[r-1]&&(e[t][r]=Math.min(e[t][r],e[t-2][r-2]+c))}return e[a][s]}p(v,"lexicalDistance");f.registerHelper("hint","graphql-variables",(i,n)=>{const t=i.getCursor(),r=i.getTokenAt(t),e=O(t,r,n);return e!=null&&e.list&&e.list.length>0&&(e.from=f.Pos(e.from.line,e.from.ch),e.to=f.Pos(e.to.line,e.to.ch),f.signal(i,"hasCompletion",i,e,r)),e});function O(i,n,t){const r=n.state.kind==="Invalid"?n.state.prevState:n.state,{kind:e,step:a}=r;if(e==="Document"&&a===0)return u(i,n,[{text:"{"}]);const{variableToType:s}=t;if(!s)return;const c=k(s,n.state);if(e==="Document"||e==="Variable"&&a===0){const l=Object.keys(s);return u(i,n,l.map(o=>({text:`"${o}": `,type:s[o]})))}if((e==="ObjectValue"||e==="ObjectField"&&a===0)&&c.fields){const l=Object.keys(c.fields).map(o=>c.fields[o]);return u(i,n,l.map(o=>({text:`"${o.name}": `,type:o.type,description:o.description})))}if(e==="StringValue"||e==="NumberValue"||e==="BooleanValue"||e==="NullValue"||e==="ListValue"&&a===1||e==="ObjectField"&&a===2||e==="Variable"&&a===2){const l=c.type?h(c.type):void 0;if(l instanceof b)return u(i,n,[{text:"{"}]);if(l instanceof T){const o=l.getValues();return u(i,n,o.map(g=>({text:`"${g.name}"`,type:l,description:g.description})))}if(l===d)return u(i,n,[{text:"true",type:d,description:"Not false."},{text:"false",type:d,description:"Not true."}])}}p(O,"getVariablesHint");function k(i,n){const t={type:null,fields:null};return L(n,r=>{switch(r.kind){case"Variable":{t.type=i[r.name];break}case"ListValue":{const e=t.type?j(t.type):void 0;t.type=e instanceof D?e.ofType:null;break}case"ObjectValue":{const e=t.type?h(t.type):void 0;t.fields=e instanceof b?e.getFields():null;break}case"ObjectField":{const e=r.name&&t.fields?t.fields[r.name]:null;t.type=e==null?void 0:e.type;break}}}),t}p(k,"getTypeInfo"); +import{C as f}from"./codemirror.es-52e8b92d.js";import{s as L}from"./forEachState.es-b2033c2b.js";import"./codemirror.es2-5884f31a.js";import{o as h,Z as b,_ as T,a5 as d,I as j,Y as D}from"./index-9671150e.js";var N=Object.defineProperty,p=(i,n)=>N(i,"name",{value:n,configurable:!0});function u(i,n,t){const r=x(t,m(n.string));if(!r)return;const e=n.type!==null&&/"|\w/.test(n.string[0])?n.start:n.end;return{list:r,from:{line:i.line,ch:e},to:{line:i.line,ch:n.end}}}p(u,"hintList");function x(i,n){if(!n)return y(i,r=>!r.isDeprecated);const t=i.map(r=>({proximity:V(m(r.text),n),entry:r}));return y(y(t,r=>r.proximity<=2),r=>!r.entry.isDeprecated).sort((r,e)=>(r.entry.isDeprecated?1:0)-(e.entry.isDeprecated?1:0)||r.proximity-e.proximity||r.entry.text.length-e.entry.text.length).map(r=>r.entry)}p(x,"filterAndSortList");function y(i,n){const t=i.filter(n);return t.length===0?i:t}p(y,"filterNonEmpty");function m(i){return i.toLowerCase().replaceAll(/\W/g,"")}p(m,"normalizeText");function V(i,n){let t=v(n,i);return i.length>n.length&&(t-=i.length-n.length-1,t+=i.indexOf(n)===0?0:.5),t}p(V,"getProximity");function v(i,n){let t,r;const e=[],a=i.length,s=n.length;for(t=0;t<=a;t++)e[t]=[t];for(r=1;r<=s;r++)e[0][r]=r;for(t=1;t<=a;t++)for(r=1;r<=s;r++){const c=i[t-1]===n[r-1]?0:1;e[t][r]=Math.min(e[t-1][r]+1,e[t][r-1]+1,e[t-1][r-1]+c),t>1&&r>1&&i[t-1]===n[r-2]&&i[t-2]===n[r-1]&&(e[t][r]=Math.min(e[t][r],e[t-2][r-2]+c))}return e[a][s]}p(v,"lexicalDistance");f.registerHelper("hint","graphql-variables",(i,n)=>{const t=i.getCursor(),r=i.getTokenAt(t),e=O(t,r,n);return e!=null&&e.list&&e.list.length>0&&(e.from=f.Pos(e.from.line,e.from.ch),e.to=f.Pos(e.to.line,e.to.ch),f.signal(i,"hasCompletion",i,e,r)),e});function O(i,n,t){const r=n.state.kind==="Invalid"?n.state.prevState:n.state,{kind:e,step:a}=r;if(e==="Document"&&a===0)return u(i,n,[{text:"{"}]);const{variableToType:s}=t;if(!s)return;const c=k(s,n.state);if(e==="Document"||e==="Variable"&&a===0){const l=Object.keys(s);return u(i,n,l.map(o=>({text:`"${o}": `,type:s[o]})))}if((e==="ObjectValue"||e==="ObjectField"&&a===0)&&c.fields){const l=Object.keys(c.fields).map(o=>c.fields[o]);return u(i,n,l.map(o=>({text:`"${o.name}": `,type:o.type,description:o.description})))}if(e==="StringValue"||e==="NumberValue"||e==="BooleanValue"||e==="NullValue"||e==="ListValue"&&a===1||e==="ObjectField"&&a===2||e==="Variable"&&a===2){const l=c.type?h(c.type):void 0;if(l instanceof b)return u(i,n,[{text:"{"}]);if(l instanceof T){const o=l.getValues();return u(i,n,o.map(g=>({text:`"${g.name}"`,type:l,description:g.description})))}if(l===d)return u(i,n,[{text:"true",type:d,description:"Not false."},{text:"false",type:d,description:"Not true."}])}}p(O,"getVariablesHint");function k(i,n){const t={type:null,fields:null};return L(n,r=>{switch(r.kind){case"Variable":{t.type=i[r.name];break}case"ListValue":{const e=t.type?j(t.type):void 0;t.type=e instanceof D?e.ofType:null;break}case"ObjectValue":{const e=t.type?h(t.type):void 0;t.fields=e instanceof b?e.getFields():null;break}case"ObjectField":{const e=r.name&&t.fields?t.fields[r.name]:null;t.type=e==null?void 0:e.type;break}}}),t}p(k,"getTypeInfo"); diff --git a/assets/html-36207922.js b/assets/html-8cf19389.js similarity index 98% rename from assets/html-36207922.js rename to assets/html-8cf19389.js index 5d3263f2..2564bb89 100644 --- a/assets/html-36207922.js +++ b/assets/html-8cf19389.js @@ -1,4 +1,4 @@ -import{m as d}from"./index-7e44875f.js";/*!----------------------------------------------------------------------------- +import{m as d}from"./index-9671150e.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) * Released under the MIT license diff --git a/assets/htmlMode-563dc6c0.js b/assets/htmlMode-b4d8fb22.js similarity index 99% rename from assets/htmlMode-563dc6c0.js rename to assets/htmlMode-b4d8fb22.js index 78e09665..bdd9ba7a 100644 --- a/assets/htmlMode-563dc6c0.js +++ b/assets/htmlMode-b4d8fb22.js @@ -1,4 +1,4 @@ -var $e=Object.defineProperty;var qe=(e,n,i)=>n in e?$e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var k=(e,n,i)=>(qe(e,typeof n!="symbol"?n+"":n,i),i);import{m as Qe}from"./index-7e44875f.js";/*!----------------------------------------------------------------------------- +var $e=Object.defineProperty;var qe=(e,n,i)=>n in e?$e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var k=(e,n,i)=>(qe(e,typeof n!="symbol"?n+"":n,i),i);import{m as Qe}from"./index-9671150e.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) * Released under the MIT license diff --git a/assets/index-7e44875f.js b/assets/index-9671150e.js similarity index 99% rename from assets/index-7e44875f.js rename to assets/index-9671150e.js index acb1076d..550a645e 100644 --- a/assets/index-7e44875f.js +++ b/assets/index-9671150e.js @@ -675,27 +675,27 @@ ${e.toString()}`}}class YB{constructor(e=new UF,t=!1,n,i=Kct){var r;this._servic * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var Rht=Object.defineProperty,Iht=Object.getOwnPropertyDescriptor,Oht=Object.getOwnPropertyNames,jht=Object.prototype.hasOwnProperty,k0e=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oht(e))!jht.call(u,i)&&i!==t&&Rht(u,i,{get:()=>e[i],enumerable:!(n=Iht(e,i))||n.enumerable});return u},Vht=(u,e,t)=>(k0e(u,e,"default"),t&&k0e(t,e,"default")),hb={};Vht(hb,iA);var $ke={},jj={},Kke=class{constructor(u){Fn(this,"_languageId");Fn(this,"_loadingTriggered");Fn(this,"_lazyLoadPromise");Fn(this,"_lazyLoadPromiseResolve");Fn(this,"_lazyLoadPromiseReject");this._languageId=u,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(u){return jj[u]||(jj[u]=new Kke(u)),jj[u]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,$ke[this._languageId].loader().then(u=>this._lazyLoadPromiseResolve(u),u=>this._lazyLoadPromiseReject(u))),this._lazyLoadPromise}};function rt(u){const e=u.id;$ke[e]=u,hb.languages.register(u);const t=Kke.getOrCreate(e);hb.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),hb.languages.onLanguageEncountered(e,async()=>{const n=await t.load();hb.languages.setLanguageConfiguration(e,n.conf)})}rt({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>Le(()=>import("./abap-b029dff1.js"),[],import.meta.url)});rt({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>Le(()=>import("./apex-3c83662c.js"),[],import.meta.url)});rt({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>Le(()=>import("./azcli-f1f7c576.js"),[],import.meta.url)});rt({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>Le(()=>import("./bat-86aea46a.js"),[],import.meta.url)});rt({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>Le(()=>import("./bicep-75c0c4d5.js"),[],import.meta.url)});rt({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>Le(()=>import("./cameligo-8043f913.js"),[],import.meta.url)});rt({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>Le(()=>import("./clojure-73642b02.js"),[],import.meta.url)});rt({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>Le(()=>import("./coffee-a18badcf.js"),[],import.meta.url)});rt({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>Le(()=>import("./cpp-4034161e.js"),[],import.meta.url)});rt({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>Le(()=>import("./cpp-4034161e.js"),[],import.meta.url)});rt({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>Le(()=>import("./csharp-49cbf0d2.js"),[],import.meta.url)});rt({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>Le(()=>import("./csp-d207cac4.js"),[],import.meta.url)});rt({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>Le(()=>import("./css-74326df0.js"),[],import.meta.url)});rt({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>Le(()=>import("./cypher-49f5f839.js"),[],import.meta.url)});rt({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>Le(()=>import("./dart-84b7c6b4.js"),[],import.meta.url)});rt({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>Le(()=>import("./dockerfile-bbf114b2.js"),[],import.meta.url)});rt({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>Le(()=>import("./ecl-15840f49.js"),[],import.meta.url)});rt({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>Le(()=>import("./elixir-e479e18e.js"),[],import.meta.url)});rt({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>Le(()=>import("./flow9-42a61225.js"),[],import.meta.url)});rt({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>Le(()=>import("./fsharp-8abe6da0.js"),[],import.meta.url)});rt({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Le(()=>import("./freemarker2-cdbbf48f.js"),[],import.meta.url).then(u=>u.TagAutoInterpolationDollar)});rt({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>Le(()=>import("./freemarker2-cdbbf48f.js"),[],import.meta.url).then(u=>u.TagAngleInterpolationDollar)});rt({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>Le(()=>import("./freemarker2-cdbbf48f.js"),[],import.meta.url).then(u=>u.TagBracketInterpolationDollar)});rt({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>Le(()=>import("./freemarker2-cdbbf48f.js"),[],import.meta.url).then(u=>u.TagAngleInterpolationBracket)});rt({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>Le(()=>import("./freemarker2-cdbbf48f.js"),[],import.meta.url).then(u=>u.TagBracketInterpolationBracket)});rt({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>Le(()=>import("./freemarker2-cdbbf48f.js"),[],import.meta.url).then(u=>u.TagAutoInterpolationDollar)});rt({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>Le(()=>import("./freemarker2-cdbbf48f.js"),[],import.meta.url).then(u=>u.TagAutoInterpolationBracket)});rt({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>Le(()=>import("./go-8759e9f7.js"),[],import.meta.url)});rt({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Le(()=>import("./graphql-387d549c.js"),[],import.meta.url)});rt({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Le(()=>import("./handlebars-135a913a.js"),[],import.meta.url)});rt({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>Le(()=>import("./hcl-a88f331a.js"),[],import.meta.url)});rt({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:()=>Le(()=>import("./html-36207922.js"),[],import.meta.url)});rt({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>Le(()=>import("./ini-18bf1153.js"),[],import.meta.url)});rt({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>Le(()=>import("./java-000a6283.js"),[],import.meta.url)});rt({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Le(()=>import("./javascript-6a33dd26.js"),["./javascript-6a33dd26.js","./typescript-69a62869.js"],import.meta.url)});rt({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>Le(()=>import("./julia-0026391c.js"),[],import.meta.url)});rt({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>Le(()=>import("./kotlin-06ee8898.js"),[],import.meta.url)});rt({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>Le(()=>import("./less-dd86a68c.js"),[],import.meta.url)});rt({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>Le(()=>import("./lexon-8d4b0444.js"),[],import.meta.url)});rt({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Le(()=>import("./lua-9adddcd9.js"),[],import.meta.url)});rt({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Le(()=>import("./liquid-7812bba1.js"),[],import.meta.url)});rt({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>Le(()=>import("./m3-aa2dcf72.js"),[],import.meta.url)});rt({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>Le(()=>import("./markdown-0f073a3a.js"),[],import.meta.url)});rt({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>Le(()=>import("./mdx-9c7605cd.js"),[],import.meta.url)});rt({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>Le(()=>import("./mips-bdd96c5a.js"),[],import.meta.url)});rt({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>Le(()=>import("./msdax-1ac55115.js"),[],import.meta.url)});rt({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>Le(()=>import("./mysql-b530c105.js"),[],import.meta.url)});rt({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>Le(()=>import("./objective-c-951ded7b.js"),[],import.meta.url)});rt({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>Le(()=>import("./pascal-7442fd46.js"),[],import.meta.url)});rt({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>Le(()=>import("./pascaligo-385edc0e.js"),[],import.meta.url)});rt({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>Le(()=>import("./perl-d5fb326c.js"),[],import.meta.url)});rt({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>Le(()=>import("./pgsql-2d7db25a.js"),[],import.meta.url)});rt({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>Le(()=>import("./php-1daff147.js"),[],import.meta.url)});rt({id:"pla",extensions:[".pla"],loader:()=>Le(()=>import("./pla-1b3e1614.js"),[],import.meta.url)});rt({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>Le(()=>import("./postiats-9db13649.js"),[],import.meta.url)});rt({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>Le(()=>import("./powerquery-4c428232.js"),[],import.meta.url)});rt({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>Le(()=>import("./powershell-d3380668.js"),[],import.meta.url)});rt({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>Le(()=>import("./protobuf-941cf3e8.js"),[],import.meta.url)});rt({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>Le(()=>import("./pug-cfe384ef.js"),[],import.meta.url)});rt({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Le(()=>import("./python-5ef08dec.js"),[],import.meta.url)});rt({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>Le(()=>import("./qsharp-e125d03f.js"),[],import.meta.url)});rt({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>Le(()=>import("./r-e0a01d4f.js"),[],import.meta.url)});rt({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Le(()=>import("./razor-9b697dd4.js"),[],import.meta.url)});rt({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>Le(()=>import("./redis-d0a12fea.js"),[],import.meta.url)});rt({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>Le(()=>import("./redshift-a163b94a.js"),[],import.meta.url)});rt({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>Le(()=>import("./restructuredtext-5a906e1a.js"),[],import.meta.url)});rt({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>Le(()=>import("./ruby-05b021bf.js"),[],import.meta.url)});rt({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>Le(()=>import("./rust-3d80982c.js"),[],import.meta.url)});rt({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>Le(()=>import("./sb-2020a5af.js"),[],import.meta.url)});rt({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:()=>Le(()=>import("./scala-54469b4b.js"),[],import.meta.url)});rt({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>Le(()=>import("./scheme-ff6e5671.js"),[],import.meta.url)});rt({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>Le(()=>import("./scss-77902feb.js"),[],import.meta.url)});rt({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>Le(()=>import("./shell-3c06def6.js"),[],import.meta.url)});rt({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>Le(()=>import("./solidity-3d59d6a7.js"),[],import.meta.url)});rt({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>Le(()=>import("./sophia-12eb7ba8.js"),[],import.meta.url)});rt({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>Le(()=>import("./sparql-e42fb28a.js"),[],import.meta.url)});rt({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>Le(()=>import("./sql-d30fd9fd.js"),[],import.meta.url)});rt({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>Le(()=>import("./st-0857f583.js"),[],import.meta.url)});rt({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>Le(()=>import("./swift-f0a706dd.js"),[],import.meta.url)});rt({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>Le(()=>import("./systemverilog-0cfd4211.js"),[],import.meta.url)});rt({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>Le(()=>import("./systemverilog-0cfd4211.js"),[],import.meta.url)});rt({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>Le(()=>import("./tcl-7df3c0c5.js"),[],import.meta.url)});rt({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>Le(()=>import("./twig-f894aab2.js"),[],import.meta.url)});rt({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Le(()=>import("./typescript-69a62869.js"),[],import.meta.url)});rt({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>Le(()=>import("./vb-39a025f4.js"),[],import.meta.url)});rt({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>Le(()=>import("./wgsl-afa2396f.js"),[],import.meta.url)});rt({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\Le(()=>import("./xml-f214c576.js"),[],import.meta.url)});rt({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Le(()=>import("./yaml-2fd0c875.js"),[],import.meta.url)});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var Rht=Object.defineProperty,Iht=Object.getOwnPropertyDescriptor,Oht=Object.getOwnPropertyNames,jht=Object.prototype.hasOwnProperty,k0e=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oht(e))!jht.call(u,i)&&i!==t&&Rht(u,i,{get:()=>e[i],enumerable:!(n=Iht(e,i))||n.enumerable});return u},Vht=(u,e,t)=>(k0e(u,e,"default"),t&&k0e(t,e,"default")),hb={};Vht(hb,iA);var $ke={},jj={},Kke=class{constructor(u){Fn(this,"_languageId");Fn(this,"_loadingTriggered");Fn(this,"_lazyLoadPromise");Fn(this,"_lazyLoadPromiseResolve");Fn(this,"_lazyLoadPromiseReject");this._languageId=u,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(u){return jj[u]||(jj[u]=new Kke(u)),jj[u]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,$ke[this._languageId].loader().then(u=>this._lazyLoadPromiseResolve(u),u=>this._lazyLoadPromiseReject(u))),this._lazyLoadPromise}};function rt(u){const e=u.id;$ke[e]=u,hb.languages.register(u);const t=Kke.getOrCreate(e);hb.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),hb.languages.onLanguageEncountered(e,async()=>{const n=await t.load();hb.languages.setLanguageConfiguration(e,n.conf)})}rt({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>Le(()=>import("./abap-b029dff1.js"),[],import.meta.url)});rt({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>Le(()=>import("./apex-3c83662c.js"),[],import.meta.url)});rt({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>Le(()=>import("./azcli-f1f7c576.js"),[],import.meta.url)});rt({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>Le(()=>import("./bat-86aea46a.js"),[],import.meta.url)});rt({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>Le(()=>import("./bicep-75c0c4d5.js"),[],import.meta.url)});rt({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>Le(()=>import("./cameligo-8043f913.js"),[],import.meta.url)});rt({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>Le(()=>import("./clojure-73642b02.js"),[],import.meta.url)});rt({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>Le(()=>import("./coffee-a18badcf.js"),[],import.meta.url)});rt({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>Le(()=>import("./cpp-4034161e.js"),[],import.meta.url)});rt({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>Le(()=>import("./cpp-4034161e.js"),[],import.meta.url)});rt({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>Le(()=>import("./csharp-49cbf0d2.js"),[],import.meta.url)});rt({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>Le(()=>import("./csp-d207cac4.js"),[],import.meta.url)});rt({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>Le(()=>import("./css-74326df0.js"),[],import.meta.url)});rt({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>Le(()=>import("./cypher-49f5f839.js"),[],import.meta.url)});rt({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>Le(()=>import("./dart-84b7c6b4.js"),[],import.meta.url)});rt({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>Le(()=>import("./dockerfile-bbf114b2.js"),[],import.meta.url)});rt({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>Le(()=>import("./ecl-15840f49.js"),[],import.meta.url)});rt({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>Le(()=>import("./elixir-e479e18e.js"),[],import.meta.url)});rt({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>Le(()=>import("./flow9-42a61225.js"),[],import.meta.url)});rt({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>Le(()=>import("./fsharp-8abe6da0.js"),[],import.meta.url)});rt({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Le(()=>import("./freemarker2-a4c47829.js"),[],import.meta.url).then(u=>u.TagAutoInterpolationDollar)});rt({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>Le(()=>import("./freemarker2-a4c47829.js"),[],import.meta.url).then(u=>u.TagAngleInterpolationDollar)});rt({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>Le(()=>import("./freemarker2-a4c47829.js"),[],import.meta.url).then(u=>u.TagBracketInterpolationDollar)});rt({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>Le(()=>import("./freemarker2-a4c47829.js"),[],import.meta.url).then(u=>u.TagAngleInterpolationBracket)});rt({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>Le(()=>import("./freemarker2-a4c47829.js"),[],import.meta.url).then(u=>u.TagBracketInterpolationBracket)});rt({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>Le(()=>import("./freemarker2-a4c47829.js"),[],import.meta.url).then(u=>u.TagAutoInterpolationDollar)});rt({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>Le(()=>import("./freemarker2-a4c47829.js"),[],import.meta.url).then(u=>u.TagAutoInterpolationBracket)});rt({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>Le(()=>import("./go-8759e9f7.js"),[],import.meta.url)});rt({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Le(()=>import("./graphql-387d549c.js"),[],import.meta.url)});rt({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Le(()=>import("./handlebars-d6e6d8dd.js"),[],import.meta.url)});rt({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>Le(()=>import("./hcl-a88f331a.js"),[],import.meta.url)});rt({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:()=>Le(()=>import("./html-8cf19389.js"),[],import.meta.url)});rt({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>Le(()=>import("./ini-18bf1153.js"),[],import.meta.url)});rt({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>Le(()=>import("./java-000a6283.js"),[],import.meta.url)});rt({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Le(()=>import("./javascript-2a7fa81e.js"),["./javascript-2a7fa81e.js","./typescript-d2a7c870.js"],import.meta.url)});rt({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>Le(()=>import("./julia-0026391c.js"),[],import.meta.url)});rt({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>Le(()=>import("./kotlin-06ee8898.js"),[],import.meta.url)});rt({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>Le(()=>import("./less-dd86a68c.js"),[],import.meta.url)});rt({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>Le(()=>import("./lexon-8d4b0444.js"),[],import.meta.url)});rt({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Le(()=>import("./lua-9adddcd9.js"),[],import.meta.url)});rt({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Le(()=>import("./liquid-ff24b95f.js"),[],import.meta.url)});rt({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>Le(()=>import("./m3-aa2dcf72.js"),[],import.meta.url)});rt({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>Le(()=>import("./markdown-0f073a3a.js"),[],import.meta.url)});rt({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>Le(()=>import("./mdx-5bad2419.js"),[],import.meta.url)});rt({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>Le(()=>import("./mips-bdd96c5a.js"),[],import.meta.url)});rt({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>Le(()=>import("./msdax-1ac55115.js"),[],import.meta.url)});rt({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>Le(()=>import("./mysql-b530c105.js"),[],import.meta.url)});rt({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>Le(()=>import("./objective-c-951ded7b.js"),[],import.meta.url)});rt({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>Le(()=>import("./pascal-7442fd46.js"),[],import.meta.url)});rt({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>Le(()=>import("./pascaligo-385edc0e.js"),[],import.meta.url)});rt({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>Le(()=>import("./perl-d5fb326c.js"),[],import.meta.url)});rt({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>Le(()=>import("./pgsql-2d7db25a.js"),[],import.meta.url)});rt({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>Le(()=>import("./php-1daff147.js"),[],import.meta.url)});rt({id:"pla",extensions:[".pla"],loader:()=>Le(()=>import("./pla-1b3e1614.js"),[],import.meta.url)});rt({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>Le(()=>import("./postiats-9db13649.js"),[],import.meta.url)});rt({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>Le(()=>import("./powerquery-4c428232.js"),[],import.meta.url)});rt({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>Le(()=>import("./powershell-d3380668.js"),[],import.meta.url)});rt({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>Le(()=>import("./protobuf-941cf3e8.js"),[],import.meta.url)});rt({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>Le(()=>import("./pug-cfe384ef.js"),[],import.meta.url)});rt({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Le(()=>import("./python-a979b408.js"),[],import.meta.url)});rt({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>Le(()=>import("./qsharp-e125d03f.js"),[],import.meta.url)});rt({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>Le(()=>import("./r-e0a01d4f.js"),[],import.meta.url)});rt({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Le(()=>import("./razor-7be18b7f.js"),[],import.meta.url)});rt({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>Le(()=>import("./redis-d0a12fea.js"),[],import.meta.url)});rt({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>Le(()=>import("./redshift-a163b94a.js"),[],import.meta.url)});rt({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>Le(()=>import("./restructuredtext-5a906e1a.js"),[],import.meta.url)});rt({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>Le(()=>import("./ruby-05b021bf.js"),[],import.meta.url)});rt({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>Le(()=>import("./rust-3d80982c.js"),[],import.meta.url)});rt({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>Le(()=>import("./sb-2020a5af.js"),[],import.meta.url)});rt({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:()=>Le(()=>import("./scala-54469b4b.js"),[],import.meta.url)});rt({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>Le(()=>import("./scheme-ff6e5671.js"),[],import.meta.url)});rt({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>Le(()=>import("./scss-77902feb.js"),[],import.meta.url)});rt({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>Le(()=>import("./shell-3c06def6.js"),[],import.meta.url)});rt({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>Le(()=>import("./solidity-3d59d6a7.js"),[],import.meta.url)});rt({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>Le(()=>import("./sophia-12eb7ba8.js"),[],import.meta.url)});rt({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>Le(()=>import("./sparql-e42fb28a.js"),[],import.meta.url)});rt({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>Le(()=>import("./sql-d30fd9fd.js"),[],import.meta.url)});rt({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>Le(()=>import("./st-0857f583.js"),[],import.meta.url)});rt({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>Le(()=>import("./swift-f0a706dd.js"),[],import.meta.url)});rt({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>Le(()=>import("./systemverilog-0cfd4211.js"),[],import.meta.url)});rt({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>Le(()=>import("./systemverilog-0cfd4211.js"),[],import.meta.url)});rt({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>Le(()=>import("./tcl-7df3c0c5.js"),[],import.meta.url)});rt({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>Le(()=>import("./twig-f894aab2.js"),[],import.meta.url)});rt({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Le(()=>import("./typescript-d2a7c870.js"),[],import.meta.url)});rt({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>Le(()=>import("./vb-39a025f4.js"),[],import.meta.url)});rt({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>Le(()=>import("./wgsl-afa2396f.js"),[],import.meta.url)});rt({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\Le(()=>import("./xml-bb4e8a16.js"),[],import.meta.url)});rt({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Le(()=>import("./yaml-0163eac1.js"),[],import.meta.url)});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var Hht=Object.defineProperty,$ht=Object.getOwnPropertyDescriptor,Kht=Object.getOwnPropertyNames,Wht=Object.prototype.hasOwnProperty,y0e=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Kht(e))!Wht.call(u,i)&&i!==t&&Hht(u,i,{get:()=>e[i],enumerable:!(n=$ht(e,i))||n.enumerable});return u},Ght=(u,e,t)=>(y0e(u,e,"default"),t&&y0e(t,e,"default")),aC={};Ght(aC,iA);var YX=class{constructor(e,t,n){Fn(this,"_onDidChange",new aC.Emitter);Fn(this,"_options");Fn(this,"_modeConfiguration");Fn(this,"_languageId");this._languageId=e,this.setOptions(t),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)}},QX={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}},XX={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},Wke=new YX("css",QX,XX),Gke=new YX("scss",QX,XX),Uke=new YX("less",QX,XX);aC.languages.css={cssDefaults:Wke,lessDefaults:Uke,scssDefaults:Gke};function eee(){return Le(()=>import("./cssMode-319ff2f1.js"),[],import.meta.url)}aC.languages.onLanguage("less",()=>{eee().then(u=>u.setupMode(Uke))});aC.languages.onLanguage("scss",()=>{eee().then(u=>u.setupMode(Gke))});aC.languages.onLanguage("css",()=>{eee().then(u=>u.setupMode(Wke))});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var Hht=Object.defineProperty,$ht=Object.getOwnPropertyDescriptor,Kht=Object.getOwnPropertyNames,Wht=Object.prototype.hasOwnProperty,y0e=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Kht(e))!Wht.call(u,i)&&i!==t&&Hht(u,i,{get:()=>e[i],enumerable:!(n=$ht(e,i))||n.enumerable});return u},Ght=(u,e,t)=>(y0e(u,e,"default"),t&&y0e(t,e,"default")),aC={};Ght(aC,iA);var YX=class{constructor(e,t,n){Fn(this,"_onDidChange",new aC.Emitter);Fn(this,"_options");Fn(this,"_modeConfiguration");Fn(this,"_languageId");this._languageId=e,this.setOptions(t),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)}},QX={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}},XX={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},Wke=new YX("css",QX,XX),Gke=new YX("scss",QX,XX),Uke=new YX("less",QX,XX);aC.languages.css={cssDefaults:Wke,lessDefaults:Uke,scssDefaults:Gke};function eee(){return Le(()=>import("./cssMode-07ea33d4.js"),[],import.meta.url)}aC.languages.onLanguage("less",()=>{eee().then(u=>u.setupMode(Uke))});aC.languages.onLanguage("scss",()=>{eee().then(u=>u.setupMode(Gke))});aC.languages.onLanguage("css",()=>{eee().then(u=>u.setupMode(Wke))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var Uht=Object.defineProperty,qht=Object.getOwnPropertyDescriptor,Jht=Object.getOwnPropertyNames,Zht=Object.prototype.hasOwnProperty,F0e=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Jht(e))!Zht.call(u,i)&&i!==t&&Uht(u,i,{get:()=>e[i],enumerable:!(n=qht(e,i))||n.enumerable});return u},Yht=(u,e,t)=>(F0e(u,e,"default"),t&&F0e(t,e,"default")),mN={};Yht(mN,iA);var Qht=class{constructor(e,t,n){Fn(this,"_onDidChange",new mN.Emitter);Fn(this,"_options");Fn(this,"_modeConfiguration");Fn(this,"_languageId");this._languageId=e,this.setOptions(t),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)}},Xht={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"},fN={format:Xht,suggest:{},data:{useDefaultDataProvider:!0}};function pN(u){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:u===ek,documentFormattingEdits:u===ek,documentRangeFormattingEdits:u===ek}}var ek="html",A0e="handlebars",_0e="razor",qke=DN(ek,fN,pN(ek)),e4t=qke.defaults,Jke=DN(A0e,fN,pN(A0e)),t4t=Jke.defaults,Zke=DN(_0e,fN,pN(_0e)),u4t=Zke.defaults;mN.languages.html={htmlDefaults:e4t,razorDefaults:u4t,handlebarDefaults:t4t,htmlLanguageService:qke,handlebarLanguageService:Jke,razorLanguageService:Zke,registerHTMLLanguageService:DN};function n4t(){return Le(()=>import("./htmlMode-563dc6c0.js"),[],import.meta.url)}function DN(u,e=fN,t=pN(u)){const n=new Qht(u,e,t);let i;const r=mN.languages.onLanguage(u,async()=>{i=(await n4t()).setupMode(n)});return{defaults:n,dispose(){r.dispose(),i==null||i.dispose(),i=void 0}}}/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var Uht=Object.defineProperty,qht=Object.getOwnPropertyDescriptor,Jht=Object.getOwnPropertyNames,Zht=Object.prototype.hasOwnProperty,F0e=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Jht(e))!Zht.call(u,i)&&i!==t&&Uht(u,i,{get:()=>e[i],enumerable:!(n=qht(e,i))||n.enumerable});return u},Yht=(u,e,t)=>(F0e(u,e,"default"),t&&F0e(t,e,"default")),mN={};Yht(mN,iA);var Qht=class{constructor(e,t,n){Fn(this,"_onDidChange",new mN.Emitter);Fn(this,"_options");Fn(this,"_modeConfiguration");Fn(this,"_languageId");this._languageId=e,this.setOptions(t),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)}},Xht={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"},fN={format:Xht,suggest:{},data:{useDefaultDataProvider:!0}};function pN(u){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:u===ek,documentFormattingEdits:u===ek,documentRangeFormattingEdits:u===ek}}var ek="html",A0e="handlebars",_0e="razor",qke=DN(ek,fN,pN(ek)),e4t=qke.defaults,Jke=DN(A0e,fN,pN(A0e)),t4t=Jke.defaults,Zke=DN(_0e,fN,pN(_0e)),u4t=Zke.defaults;mN.languages.html={htmlDefaults:e4t,razorDefaults:u4t,handlebarDefaults:t4t,htmlLanguageService:qke,handlebarLanguageService:Jke,razorLanguageService:Zke,registerHTMLLanguageService:DN};function n4t(){return Le(()=>import("./htmlMode-b4d8fb22.js"),[],import.meta.url)}function DN(u,e=fN,t=pN(u)){const n=new Qht(u,e,t);let i;const r=mN.languages.onLanguage(u,async()=>{i=(await n4t()).setupMode(n)});return{defaults:n,dispose(){r.dispose(),i==null||i.dispose(),i=void 0}}}/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var i4t=Object.defineProperty,r4t=Object.getOwnPropertyDescriptor,a4t=Object.getOwnPropertyNames,o4t=Object.prototype.hasOwnProperty,S0e=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of a4t(e))!o4t.call(u,i)&&i!==t&&i4t(u,i,{get:()=>e[i],enumerable:!(n=r4t(e,i))||n.enumerable});return u},s4t=(u,e,t)=>(S0e(u,e,"default"),t&&S0e(t,e,"default")),rA={};s4t(rA,iA);var l4t=class{constructor(e,t,n){Fn(this,"_onDidChange",new rA.Emitter);Fn(this,"_diagnosticsOptions");Fn(this,"_modeConfiguration");Fn(this,"_languageId");this._languageId=e,this.setDiagnosticsOptions(t),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)}},c4t={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},d4t={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},Yke=new l4t("json",c4t,d4t);rA.languages.json={jsonDefaults:Yke};function h4t(){return Le(()=>import("./jsonMode-60663a8e.js"),[],import.meta.url)}rA.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});rA.languages.onLanguage("json",()=>{h4t().then(u=>u.setupMode(Yke))});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var i4t=Object.defineProperty,r4t=Object.getOwnPropertyDescriptor,a4t=Object.getOwnPropertyNames,o4t=Object.prototype.hasOwnProperty,S0e=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of a4t(e))!o4t.call(u,i)&&i!==t&&i4t(u,i,{get:()=>e[i],enumerable:!(n=r4t(e,i))||n.enumerable});return u},s4t=(u,e,t)=>(S0e(u,e,"default"),t&&S0e(t,e,"default")),rA={};s4t(rA,iA);var l4t=class{constructor(e,t,n){Fn(this,"_onDidChange",new rA.Emitter);Fn(this,"_diagnosticsOptions");Fn(this,"_modeConfiguration");Fn(this,"_languageId");this._languageId=e,this.setDiagnosticsOptions(t),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)}},c4t={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},d4t={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},Yke=new l4t("json",c4t,d4t);rA.languages.json={jsonDefaults:Yke};function h4t(){return Le(()=>import("./jsonMode-2a0c8d22.js"),[],import.meta.url)}rA.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});rA.languages.onLanguage("json",()=>{h4t().then(u=>u.setupMode(Yke))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var E4t=Object.defineProperty,g4t=Object.getOwnPropertyDescriptor,m4t=Object.getOwnPropertyNames,f4t=Object.prototype.hasOwnProperty,B0e=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of m4t(e))!f4t.call(u,i)&&i!==t&&E4t(u,i,{get:()=>e[i],enumerable:!(n=g4t(e,i))||n.enumerable});return u},p4t=(u,e,t)=>(B0e(u,e,"default"),t&&B0e(t,e,"default")),D4t="5.0.2",uv={};p4t(uv,iA);var Qke=(u=>(u[u.None=0]="None",u[u.CommonJS=1]="CommonJS",u[u.AMD=2]="AMD",u[u.UMD=3]="UMD",u[u.System=4]="System",u[u.ES2015=5]="ES2015",u[u.ESNext=99]="ESNext",u))(Qke||{}),Xke=(u=>(u[u.None=0]="None",u[u.Preserve=1]="Preserve",u[u.React=2]="React",u[u.ReactNative=3]="ReactNative",u[u.ReactJSX=4]="ReactJSX",u[u.ReactJSXDev=5]="ReactJSXDev",u))(Xke||{}),e2e=(u=>(u[u.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",u[u.LineFeed=1]="LineFeed",u))(e2e||{}),t2e=(u=>(u[u.ES3=0]="ES3",u[u.ES5=1]="ES5",u[u.ES2015=2]="ES2015",u[u.ES2016=3]="ES2016",u[u.ES2017=4]="ES2017",u[u.ES2018=5]="ES2018",u[u.ES2019=6]="ES2019",u[u.ES2020=7]="ES2020",u[u.ESNext=99]="ESNext",u[u.JSON=100]="JSON",u[u.Latest=99]="Latest",u))(t2e||{}),u2e=(u=>(u[u.Classic=1]="Classic",u[u.NodeJs=2]="NodeJs",u))(u2e||{}),n2e=class{constructor(u,e,t,n,i){Fn(this,"_onDidChange",new uv.Emitter);Fn(this,"_onDidExtraLibsChange",new uv.Emitter);Fn(this,"_extraLibs");Fn(this,"_removedExtraLibs");Fn(this,"_eagerModelSync");Fn(this,"_compilerOptions");Fn(this,"_diagnosticsOptions");Fn(this,"_workerOptions");Fn(this,"_onDidExtraLibsChangeTimeout");Fn(this,"_inlayHintsOptions");Fn(this,"_modeConfiguration");this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(u),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(n),this.setModeConfiguration(i),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(u,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===u)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(n=this._extraLibs[t].version+1),this._extraLibs[t]={content:u,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let i=this._extraLibs[t];i&&i.version===n&&(delete this._extraLibs[t],this._removedExtraLibs[t]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(u){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),u&&u.length>0)for(const e of u){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=e.content;let i=1;this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:n,version:i}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(u){this._compilerOptions=u||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(u){this._diagnosticsOptions=u||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(u){this._workerOptions=u||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(u){this._inlayHintsOptions=u||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(u){}setEagerModelSync(u){this._eagerModelSync=u}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(u){this._modeConfiguration=u||Object.create(null),this._onDidChange.fire(void 0)}},x4t=D4t,i2e={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},r2e=new n2e({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},i2e),a2e=new n2e({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},i2e),v4t=()=>xN().then(u=>u.getTypeScriptWorker()),C4t=()=>xN().then(u=>u.getJavaScriptWorker());uv.languages.typescript={ModuleKind:Qke,JsxEmit:Xke,NewLineKind:e2e,ScriptTarget:t2e,ModuleResolutionKind:u2e,typescriptVersion:x4t,typescriptDefaults:r2e,javascriptDefaults:a2e,getTypeScriptWorker:v4t,getJavaScriptWorker:C4t};function xN(){return Le(()=>import("./tsMode-138afb3a.js"),[],import.meta.url)}uv.languages.onLanguage("typescript",()=>xN().then(u=>u.setupTypeScript(r2e)));uv.languages.onLanguage("javascript",()=>xN().then(u=>u.setupJavaScript(a2e)));var b4t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},k4t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},vN=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const CN=new Ne("selectionAnchorSet",!1);let t4=class o2e{static get(e){return e.getContribution(o2e.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=CN.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(Ze.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new _r().appendText(v("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),Aa(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 t=this.editor.getPosition();this.editor.setSelection(Ze.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};t4.ID="editor.contrib.selectionAnchorController";t4=b4t([k4t(1,Et)],t4);class y4t extends je{constructor(){super({id:"editor.action.setSelectionAnchor",label:v("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:K.editorTextFocus,primary:Ri(2089,2080),weight:100}})}run(e,t){var n;return vN(this,void 0,void 0,function*(){(n=t4.get(t))===null||n===void 0||n.setSelectionAnchor()})}}class F4t extends je{constructor(){super({id:"editor.action.goToSelectionAnchor",label:v("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:CN})}run(e,t){var n;return vN(this,void 0,void 0,function*(){(n=t4.get(t))===null||n===void 0||n.goToSelectionAnchor()})}}class A4t extends je{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:v("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:CN,kbOpts:{kbExpr:K.editorTextFocus,primary:Ri(2089,2089),weight:100}})}run(e,t){var n;return vN(this,void 0,void 0,function*(){(n=t4.get(t))===null||n===void 0||n.selectFromAnchorToCursor()})}}class _4t extends je{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:v("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:CN,kbOpts:{kbExpr:K.editorTextFocus,primary:9,weight:100}})}run(e,t){var n;return vN(this,void 0,void 0,function*(){(n=t4.get(t))===null||n===void 0||n.cancelSelectionAnchor()})}}Eu(t4.ID,t4,4);be(y4t);be(F4t);be(A4t);be(_4t);const S4t=U("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},v("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class B4t extends je{constructor(){super({id:"editor.action.jumpToBracket",label:v("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:K.editorTextFocus,primary:3165,weight:100}})}run(e,t){var n;(n=xl.get(t))===null||n===void 0||n.jumpToBracket()}}class w4t extends je{constructor(){super({id:"editor.action.selectToBracket",label:v("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,n){var i;let r=!0;n&&n.selectBrackets===!1&&(r=!1),(i=xl.get(t))===null||i===void 0||i.selectToBracket(r)}}class z4t extends je{constructor(){super({id:"editor.action.removeBrackets",label:v("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:K.editorTextFocus,primary:2561,weight:100}})}run(e,t){var n;(n=xl.get(t))===null||n===void 0||n.removeBrackets(this.id)}}class L4t{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}}class xl extends ie{static get(e){return e.getContribution(xl.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Hu(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(70),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(70)&&(this._matchBrackets=this._editor.getOption(70),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(),t=this._editor.getSelections().map(n=>{const i=n.getStartPosition(),r=e.bracketPairs.matchBracket(i);let a=null;if(r)r[0].containsPosition(i)&&!r[1].containsPosition(i)?a=r[1].getStartPosition():r[1].containsPosition(i)&&(a=r[0].getStartPosition());else{const o=e.bracketPairs.findEnclosingBrackets(i);if(o)a=o[1].getStartPosition();else{const s=e.bracketPairs.findNextBracket(i);s&&s.range&&(a=s.range.getStartPosition())}}return a?new Ze(a.lineNumber,a.column,a.lineNumber,a.column):new Ze(i.lineNumber,i.column,i.lineNumber,i.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=[];this._editor.getSelections().forEach(i=>{const r=i.getStartPosition();let a=t.bracketPairs.matchBracket(r);if(!a&&(a=t.bracketPairs.findEnclosingBrackets(r),!a)){const l=t.bracketPairs.findNextBracket(r);l&&l.range&&(a=t.bracketPairs.matchBracket(l.range.getStartPosition()))}let o=null,s=null;if(a){a.sort(O.compareRangesUsingStarts);const[l,c]=a;if(o=e?l.getStartPosition():l.getEndPosition(),s=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(r)){const d=o;o=s,s=d}}o&&s&&n.push(new Ze(o.lineNumber,o.column,s.lineNumber,s.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(n=>{const i=n.getPosition();let r=t.bracketPairs.matchBracket(i);r||(r=t.bracketPairs.findEnclosingBrackets(i)),r&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:r[0],text:""},{range:r[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const n of this._lastBracketsData){const i=n.brackets;i&&(e[t++]={range:i[0],options:n.options},e[t++]={range:i[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 t=this._editor.getModel(),n=t.getVersionId();let i=[];this._lastVersionId===n&&(i=this._lastBracketsData);const r=[];let a=0;for(let d=0,h=e.length;d1&&r.sort(ue.compare);const o=[];let s=0,l=0;const c=i.length;for(let d=0,h=r.length;d0&&(t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop())}}be(N4t);var R4t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const B3="9_cutcopypaste",I4t=wc||document.queryCommandSupported("cut"),l2e=wc||document.queryCommandSupported("copy"),O4t=typeof navigator.clipboard>"u"||F0?document.queryCommandSupported("paste"):!0;function tee(u){return u.register(),u}const j4t=I4t?tee(new Yv({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:wc?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:G.MenubarEditMenu,group:"2_ccp",title:v({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:G.EditorContext,group:B3,title:v("actions.clipboard.cutLabel","Cut"),when:K.writable,order:1},{menuId:G.CommandPalette,group:"",title:v("actions.clipboard.cutLabel","Cut"),order:1},{menuId:G.SimpleEditorContext,group:B3,title:v("actions.clipboard.cutLabel","Cut"),when:K.writable,order:1}]})):void 0,V4t=l2e?tee(new Yv({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:wc?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:G.MenubarEditMenu,group:"2_ccp",title:v({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:G.EditorContext,group:B3,title:v("actions.clipboard.copyLabel","Copy"),order:2},{menuId:G.CommandPalette,group:"",title:v("actions.clipboard.copyLabel","Copy"),order:1},{menuId:G.SimpleEditorContext,group:B3,title:v("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;oa.appendMenuItem(G.MenubarEditMenu,{submenu:G.MenubarCopy,title:{value:v("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});oa.appendMenuItem(G.EditorContext,{submenu:G.EditorContextCopy,title:{value:v("copy as","Copy As"),original:"Copy As"},group:B3,order:3});oa.appendMenuItem(G.EditorContext,{submenu:G.EditorContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1,when:pe.and(pe.notEquals("resourceScheme","output"),K.editorTextFocus)});oa.appendMenuItem(G.EditorTitleContext,{submenu:G.EditorTitleContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1});oa.appendMenuItem(G.ExplorerContext,{submenu:G.ExplorerContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1});const Vj=O4t?tee(new Yv({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:wc?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:G.MenubarEditMenu,group:"2_ccp",title:v({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:G.EditorContext,group:B3,title:v("actions.clipboard.pasteLabel","Paste"),when:K.writable,order:4},{menuId:G.CommandPalette,group:"",title:v("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:G.SimpleEditorContext,group:B3,title:v("actions.clipboard.pasteLabel","Paste"),when:K.writable,order:4}]})):void 0;class H4t extends je{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:K.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(36)&&t.getSelection().isEmpty()||(oW.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),oW.forceCopyWithSyntaxHighlighting=!1)}}function c2e(u,e){u&&(u.addImplementation(1e4,"code-editor",(t,n)=>{const i=t.get(hu).getFocusedCodeEditor();if(i&&i.hasTextFocus()){const r=i.getOption(36),a=i.getSelection();return a&&a.isEmpty()&&!r||document.execCommand(e),!0}return!1}),u.addImplementation(0,"generic-dom",(t,n)=>(document.execCommand(e),!0)))}c2e(j4t,"cut");c2e(V4t,"copy");Vj&&(Vj.addImplementation(1e4,"code-editor",(u,e)=>{const t=u.get(hu),n=u.get(td),i=t.getFocusedCodeEditor();return i&&i.hasTextFocus()?!document.execCommand("paste")&&em?(()=>R4t(void 0,void 0,void 0,function*(){const a=yield n.readText();if(a!==""){const o=i2.INSTANCE.get(a);let s=!1,l=null,c=null;o&&(s=i.getOption(36)&&!!o.isFromEmptySelection,l=typeof o.multicursorText<"u"?o.multicursorText:null,c=o.mode),i.trigger("keyboard","paste",{text:a,pasteOnNewLine:s,multicursorText:l,mode:c})}}))():!0:!1}),Vj.addImplementation(0,"generic-dom",(u,e)=>(document.execCommand("paste"),!0)));l2e&&be(H4t);var $4t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let _t=class TS{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+TS.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new TS(this.value+TS.sep+e)}};_t.sep=".";_t.None=new _t("@@none@@");_t.Empty=new _t("");_t.QuickFix=new _t("quickfix");_t.Refactor=new _t("refactor");_t.RefactorExtract=_t.Refactor.append("extract");_t.RefactorInline=_t.Refactor.append("inline");_t.RefactorMove=_t.Refactor.append("move");_t.RefactorRewrite=_t.Refactor.append("rewrite");_t.Source=new _t("source");_t.SourceOrganizeImports=_t.Source.append("organizeImports");_t.SourceFixAll=_t.Source.append("fixAll");_t.SurroundWith=_t.Refactor.append("surround");var Ks;(function(u){u.Refactor="refactor",u.RefactorPreview="refactor preview",u.Lightbulb="lightbulb",u.Default="other (default)",u.SourceAction="source action",u.QuickFix="quick fix action",u.FixAll="fix all",u.OrganizeImports="organize imports",u.AutoFix="auto fix",u.QuickFixHover="quick fix hover window",u.OnSave="save participants",u.ProblemsView="problems view"})(Ks||(Ks={}));function K4t(u,e){return!(u.include&&!u.include.intersects(e)||u.excludes&&u.excludes.some(t=>d2e(e,t,u.include))||!u.includeSourceActions&&_t.Source.contains(e))}function W4t(u,e){const t=e.kind?new _t(e.kind):void 0;return!(u.include&&(!t||!u.include.contains(t))||u.excludes&&t&&u.excludes.some(n=>d2e(t,n,u.include))||!u.includeSourceActions&&t&&_t.Source.contains(t)||u.onlyIncludePreferredActions&&!e.isPreferred)}function d2e(u,e,t){return!(!e.contains(u)||t&&e.contains(t))}class Id{static fromUser(e,t){return!e||typeof e!="object"?new Id(t.kind,t.apply,!1):new Id(Id.getKindFromUser(e,t.kind),Id.getApplyFromUser(e,t.apply),Id.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new _t(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,n){this.kind=e,this.apply=t,this.preferred=n}}class G4t{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return $4t(this,void 0,void 0,function*(){if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let n;try{n=yield this.provider.resolveCodeAction(this.action,e)}catch(i){Ni(i)}n&&(this.action.edit=n.edit)}return this})}}var uw=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const h2e="editor.action.codeAction",uee="editor.action.quickFix",E2e="editor.action.autoFix",g2e="editor.action.refactor",m2e="editor.action.sourceAction",nee="editor.action.organizeImports",iee="editor.action.fixAll";class tk extends ie{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return ca(e.diagnostics)?ca(t.diagnostics)?tk.codeActionsPreferredComparator(e,t):-1:ca(t.diagnostics)?1:tk.codeActionsPreferredComparator(e,t)}constructor(e,t,n){super(),this.documentation=t,this._register(n),this.allActions=[...e].sort(tk.codeActionsComparator),this.validActions=this.allActions.filter(({action:i})=>!i.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&_t.QuickFix.contains(new _t(e.kind))&&!!e.isPreferred)}}const w0e={actions:[],documentation:void 0};function ree(u,e,t,n,i,r){var a;return uw(this,void 0,void 0,function*(){const o=n.filter||{},s={only:(a=o.include)===null||a===void 0?void 0:a.value,trigger:n.type},l=new JX(e,r),c=U4t(u,e,o),d=new fe,h=c.map(g=>uw(this,void 0,void 0,function*(){try{i.report(g);const m=yield g.provideCodeActions(e,t,s,l.token);if(m&&d.add(m),l.token.isCancellationRequested)return w0e;const f=((m==null?void 0:m.actions)||[]).filter(D=>D&&W4t(o,D)),p=J4t(g,f,o.include);return{actions:f.map(D=>new G4t(D,g)),documentation:p}}catch(m){if(Xc(m))throw m;return Ni(m),w0e}})),E=u.onDidChange(()=>{const g=u.all(e);Ur(g,c)||l.cancel()});try{const g=yield Promise.all(h),m=g.map(p=>p.actions).flat(),f=[...c1(g.map(p=>p.documentation)),...q4t(u,e,n,m)];return new tk(m,f,d)}finally{E.dispose(),l.dispose()}})}function U4t(u,e,t){return u.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(i=>K4t(t,new _t(i))):!0)}function*q4t(u,e,t,n){var i,r,a;if(e&&n.length)for(const o of u.all(e))o._getAdditionalMenuItems&&(yield*(i=o._getAdditionalMenuItems)===null||i===void 0?void 0:i.call(o,{trigger:t.type,only:(a=(r=t.filter)===null||r===void 0?void 0:r.include)===null||a===void 0?void 0:a.value},n.map(s=>s.action)))}function J4t(u,e,t){if(!u.documentation)return;const n=u.documentation.map(i=>({kind:new _t(i.kind),command:i.command}));if(t){let i;for(const r of n)r.kind.contains(t)&&(i?i.kind.contains(r.kind)&&(i=r):i=r);if(i)return i==null?void 0:i.command}for(const i of e)if(i.kind){for(const r of n)if(r.kind.contains(new _t(i.kind)))return r.command}}var nw;(function(u){u.OnSave="onSave",u.FromProblemsView="fromProblemsView",u.FromCodeActions="fromCodeActions"})(nw||(nw={}));function Z4t(u,e,t,n,i=Vt.None){var r;return uw(this,void 0,void 0,function*(){const a=u.get(YF),o=u.get(ei),s=u.get(Ys),l=u.get(ci);if(s.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(i),!i.isCancellationRequested&&!(!((r=e.action.edit)===null||r===void 0)&&r.edits.length&&!(yield a.apply(e.action.edit,{editor:n==null?void 0:n.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==nw.OnSave,showPreview:n==null?void 0:n.preview})).isApplied)&&e.action.command)try{yield o.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(c){const d=Y4t(c);l.error(typeof d=="string"?d:v("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function Y4t(u){return typeof u=="string"?u:u instanceof Error&&typeof u.message=="string"?u.message:void 0}Xt.registerCommand("_executeCodeActionProvider",function(u,e,t,n,i){return uw(this,void 0,void 0,function*(){if(!(e instanceof lt))throw p0();const{codeActionProvider:r}=u.get($e),a=u.get(Bn).getModel(e);if(!a)throw p0();const o=Ze.isISelection(t)?Ze.liftSelection(t):O.isIRange(t)?a.validateRange(t):void 0;if(!o)throw p0();const s=typeof n=="string"?new _t(n):void 0,l=yield ree(r,a,o,{type:1,triggerAction:Ks.Default,filter:{includeSourceActions:!0,include:s}},_p.None,Vt.None),c=[],d=Math.min(l.validActions.length,typeof i=="number"?i:0);for(let h=0;hh.action)}finally{setTimeout(()=>l.dispose(),100)}})});var Q4t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},X4t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let iw=class f2e{constructor(e){this.keybindingService=e}getResolver(){const e=new nm(()=>this.keybindingService.getKeybindings().filter(t=>f2e.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let n=t.commandArgs;return t.command===nee?n={kind:_t.SourceOrganizeImports.value}:t.command===iee&&(n={kind:_t.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},Id.fromUser(n,{kind:_t.None,apply:"never"}))}));return t=>{if(t.kind){const n=this.bestKeybindingForCodeAction(t,e.value);return n==null?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const n=new _t(e.kind);return t.filter(i=>i.kind.contains(n)).filter(i=>i.preferred?e.isPreferred:!0).reduceRight((i,r)=>i?i.kind.contains(r.kind)?r:i:r,void 0)}};iw.codeActionCommands=[g2e,h2e,m2e,nee,iee];iw=Q4t([X4t(0,on)],iw);U("symbolIcon.arrayForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.booleanForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("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."));U("symbolIcon.colorForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.constantForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("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."));U("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."));U("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."));U("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."));U("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."));U("symbolIcon.fileForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.folderForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("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."));U("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."));U("symbolIcon.keyForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.keywordForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("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."));U("symbolIcon.moduleForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.namespaceForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.nullForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.numberForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.objectForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.operatorForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.packageForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.propertyForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.referenceForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.snippetForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.stringForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.structForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.textForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.typeParameterForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.unitForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("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 p2e=Object.freeze({kind:_t.Empty,title:v("codeAction.widget.id.more","More Actions...")}),eEt=Object.freeze([{kind:_t.QuickFix,title:v("codeAction.widget.id.quickfix","Quick Fix...")},{kind:_t.RefactorExtract,title:v("codeAction.widget.id.extract","Extract..."),icon:Ae.wrench},{kind:_t.RefactorInline,title:v("codeAction.widget.id.inline","Inline..."),icon:Ae.wrench},{kind:_t.RefactorRewrite,title:v("codeAction.widget.id.convert","Rewrite..."),icon:Ae.wrench},{kind:_t.RefactorMove,title:v("codeAction.widget.id.move","Move..."),icon:Ae.wrench},{kind:_t.SurroundWith,title:v("codeAction.widget.id.surround","Surround With..."),icon:Ae.symbolSnippet},{kind:_t.Source,title:v("codeAction.widget.id.source","Source Action..."),icon:Ae.symbolFile},p2e]);function tEt(u,e,t){if(!e)return u.map(r=>({kind:"action",item:r,group:p2e,disabled:!!r.action.disabled,label:r.action.disabled||r.action.title}));const n=eEt.map(r=>({group:r,actions:[]}));for(const r of u){const a=r.action.kind?new _t(r.action.kind):_t.None;for(const o of n)if(o.group.kind.contains(a)){o.actions.push(r);break}}const i=[];for(const r of n)if(r.actions.length){i.push({kind:"header",group:r.group});for(const a of r.actions)i.push({kind:"action",item:a,group:r.group,label:a.action.title,disabled:!!a.action.disabled,keybinding:t(a.action)})}return i}var uEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},nEt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},gx;(function(u){u.Hidden={type:0};class e{constructor(n,i,r,a){this.actions=n,this.trigger=i,this.editorPosition=r,this.widgetPosition=a,this.type=1}}u.Showing=e})(gx||(gx={}));let w3=class D2e extends ie{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new ee),this.onClick=this._onClick.event,this._state=gx.Hidden,this._domNode=ve("div.lightBulbWidget"),this._register(Xu.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{const i=this._editor.getModel();(this.state.type!==1||!i||this.state.editorPosition.lineNumber>=i.getLineCount())&&this.hide()})),this._register(_Qe(this._domNode,n=>{if(this.state.type!==1)return;this._editor.focus(),n.preventDefault();const{top:i,height:r}=mi(this._domNode),a=this._editor.getOption(65);let o=Math.floor(a/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(n.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(63)&&!this._editor.getOption(63).enabled&&this.hide()})),this._register(Ke.runAndSubscribe(t.onDidUpdateKeybindings,()=>{var n,i;this._preferredKbLabel=Gr((n=t.lookupKeybinding(E2e))===null||n===void 0?void 0:n.getLabel()),this._quickFixKbLabel=Gr((i=t.lookupKeybinding(uee))===null||i===void 0?void 0:i.getLabel()),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,t,n){if(e.validActions.length<=0)return this.hide();const i=this._editor.getOptions();if(!i.get(63).enabled)return this.hide();const r=this._editor.getModel();if(!r)return this.hide();const{lineNumber:a,column:o}=r.validatePosition(n),s=r.getOptions().tabSize,l=i.get(49),c=r.getLineContent(a),d=RP(c,s),h=l.spaceWidth*d>22,E=m=>m>2&&this._editor.getTopForLineNumber(m)===this._editor.getTopForLineNumber(m-1);let g=a;if(!h){if(a>1&&!E(a-1))g-=1;else if(!E(a+1))g+=1;else if(o*l.spaceWidth<22)return this.hide()}this.state=new gx.Showing(e,t,n,{position:{lineNumber:g,column:1},preference:D2e._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==gx.Hidden&&(this.state=gx.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...et.asClassNameArray(Ae.lightBulb)),this._domNode.classList.add(...et.asClassNameArray(Ae.lightbulbAutofix)),this._preferredKbLabel)){this.title=v("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(...et.asClassNameArray(Ae.lightbulbAutofix)),this._domNode.classList.add(...et.asClassNameArray(Ae.lightBulb)),this._quickFixKbLabel?this.title=v("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=v("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};w3.ID="editor.contrib.lightbulbWidget";w3._posPref=[0];w3=uEt([nEt(1,on)],w3);var iEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},z0e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},x2e=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let u4=class v2e{constructor(e,t,n){this._options=e,this._languageService=t,this._openerService=n,this._onDidRenderAsync=new ee,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,n){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const i=new fe,r=i.add(UP(e,Object.assign(Object.assign({},this._getRenderOptions(e,i)),t),n));return r.element.classList.add("rendered-markdown"),{element:r.element,dispose:()=>i.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(n,i)=>x2e(this,void 0,void 0,function*(){var r,a,o;let s;n?s=this._languageService.getLanguageIdByLanguageName(n):this._options.editor&&(s=(r=this._options.editor.getModel())===null||r===void 0?void 0:r.getLanguageId()),s||(s=Ns);const l=yield brt(this._languageService,i,s),c=document.createElement("span");if(c.innerHTML=(o=(a=v2e._ttpTokenizer)===null||a===void 0?void 0:a.createHTML(l))!==null&&o!==void 0?o:l,this._options.editor){const d=this._options.editor.getOption(49);tr(c,d)}else this._options.codeBlockFontFamily&&(c.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(c.style.fontSize=this._options.codeBlockFontSize),c}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:n=>C2e(this._openerService,n,e.isTrusted),disposables:t}}}};u4._ttpTokenizer=g4("tokenizeToString",{createHTML(u){return u}});u4=iEt([z0e(1,Dn),z0e(2,gs)],u4);function C2e(u,e,t){return x2e(this,void 0,void 0,function*(){try{return yield u.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:rEt(t)})}catch(n){return wt(n),!1}})}function rEt(u){return u===!0?!0:u&&Array.isArray(u.enabledCommands)?u.enabledCommands:!1}var aEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},L0e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let is=class eU{static get(e){return e.getContribution(eU.ID)}constructor(e,t,n){this._openerService=n,this._messageWidget=new Qr,this._messageListeners=new fe,this._mouseOverMessage=!1,this._editor=e,this._visible=eU.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;(e=this._message)===null||e===void 0||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){Aa(qE(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=qE(e)?UP(e,{actionHandler:{callback:i=>C2e(this._openerService,i,qE(e)?e.isTrusted:void 0),disposables:this._messageListeners}}):void 0,this._messageWidget.value=new M0e(this._editor,t,typeof e=="string"?e:this._message.element),this._messageListeners.add(Ke.debounce(this._editor.onDidBlurEditorText,(i,r)=>r,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&zo(document.activeElement,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(ce(this._messageWidget.value.getDomNode(),Me.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(ce(this._messageWidget.value.getDomNode(),Me.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let n;this._messageListeners.add(this._editor.onMouseMove(i=>{i.target.position&&(n?n.containsPosition(i.target.position)||this.closeMessage():n=new O(t.lineNumber-3,1,i.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(M0e.fadeOut(this._messageWidget.value))}};is.ID="editor.contrib.messageController";is.MESSAGE_VISIBLE=new Ne("messageVisible",!1,v("messageVisible","Whether the editor is currently showing an inline message"));is=aEt([L0e(1,Et),L0e(2,gs)],is);const oEt=Dr.bindToContribution(is.get);Be(new oEt({id:"leaveEditorMessage",precondition:is.MESSAGE_VISIBLE,handler:u=>u.closeMessage(),kbOpts:{weight:100+30,primary:9}}));let M0e=class{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(n),e.getDomNode().removeEventListener("animationend",t)},n=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:n},i){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:n},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const r=document.createElement("div");r.classList.add("anchor","top"),this._domNode.appendChild(r);const a=document.createElement("div");typeof i=="string"?(a.classList.add("message"),a.textContent=i):(i.classList.add("message"),a.appendChild(i)),this._domNode.appendChild(a);const o=document.createElement("div");o.classList.add("anchor","below"),this._domNode.appendChild(o),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)}};Eu(is.ID,is,4);var b2e=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},tU=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const k2e="acceptSelectedCodeAction",y2e="previewSelectedCodeAction";class sEt{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,n){var i,r;n.text.textContent=(r=(i=e.group)===null||i===void 0?void 0:i.title)!==null&&r!==void 0?r:""}disposeTemplate(e){}}let uU=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const n=document.createElement("span");n.className="title",e.append(n);const i=new eA(e,Ss);return{container:e,icon:t,text:n,keybinding:i}}renderElement(e,t,n){var i,r,a;if(!((i=e.group)===null||i===void 0)&&i.icon?(n.icon.className=et.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=Te(e.group.icon.color.id))):(n.icon.className=et.asClassName(Ae.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;n.text.textContent=F2e(e.label),n.keybinding.set(e.keybinding),RQe(!!e.keybinding,n.keybinding.element);const o=(r=this._keybindingService.lookupKeybinding(k2e))===null||r===void 0?void 0:r.getLabel(),s=(a=this._keybindingService.lookupKeybinding(y2e))===null||a===void 0?void 0:a.getLabel();n.container.classList.toggle("option-disabled",e.disabled),e.disabled?n.container.title=e.label:o&&s?this._supportsPreview?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",o,s):n.container.title=v({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",o):n.container.title=""}disposeTemplate(e){}};uU=b2e([tU(1,on)],uU);class lEt extends UIEvent{constructor(){super("acceptSelectedAction")}}class T0e extends UIEvent{constructor(){super("previewSelectedAction")}}let nU=class extends ie{constructor(e,t,n,i,r,a){super(),this._delegate=i,this._contextViewService=r,this._keybindingService=a,this._actionLineHeight=24,this._headerLineHeight=26,this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const o={getHeight:s=>s.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:s=>s.kind};this._list=this._register(new Vl(e,this.domNode,o,[new uU(t,this._keybindingService),new sEt],{keyboardSupport:!1,accessibilityProvider:{getAriaLabel:s=>{if(s.kind==="action"){let l=s.label?F2e(s==null?void 0:s.label):"";return s.disabled&&(l=v({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",l,s.disabled)),l}return null},getWidgetAriaLabel:()=>v({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:s=>s.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(Sp),this._register(this._list.onMouseClick(s=>this.onListClick(s))),this._register(this._list.onMouseOver(s=>this.onListHover(s))),this._register(this._list.onDidChangeFocus(()=>this._list.domFocus())),this._register(this._list.onDidChangeSelection(s=>this.onListSelection(s))),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._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter(l=>l.kind==="header").length,i=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(i);const r=this._allMenuItems.map((l,c)=>{const d=document.getElementById(this._list.getElementID(c));if(d){d.style.width="auto";const h=d.getBoundingClientRect().width;return d.style.width="",h}return 0}),a=Math.max(...r,e),o=.7,s=Math.min(i,document.body.clientHeight*o);return this._list.layout(s,a),this.domNode.style.height=`${s}px`,this._list.domFocus(),a}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(t.length===0)return;const n=t[0],i=this._list.element(n);if(!this.focusCondition(i))return;const r=e?new T0e:new lEt;this._list.setSelection([n],r)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof T0e):this._list.setSelection([])}onListHover(e){this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};nU=b2e([tU(4,f4),tU(5,on)],nU);function F2e(u){return u.replace(/\r\n|\r|\n/g," ")}var cEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Hj=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const z3={Visible:new Ne("codeActionMenuVisible",!1,v("codeActionMenuVisible","Whether the action widget list is visible"))},zp=Gt("actionWidgetService");let L3=class extends ie{get isVisible(){return z3.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,n){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=n,this._list=this._register(new Qr)}show(e,t,n,i,r,a,o){const s=z3.Visible.bindTo(this._contextKeyService),l=this._instantiationService.createInstance(nU,e,t,n,i);this._contextViewService.showContextView({getAnchor:()=>r,render:c=>(s.set(!0),this._renderWidget(c,l,o??[])),onHide:c=>{s.reset(),this._onWidgetClosed(c)}},a,!1)}acceptSelected(e){var t;(t=this._list.value)===null||t===void 0||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||e.hide(),this._list.clear()}_renderWidget(e,t,n){var i;const r=document.createElement("div");if(r.classList.add("action-widget"),e.appendChild(r),this._list.value=t,this._list.value)r.appendChild(this._list.value.domNode);else throw new Error("List has no value");const a=new fe,o=document.createElement("div"),s=e.appendChild(o);s.classList.add("context-view-block"),a.add(ce(s,Me.MOUSE_DOWN,g=>g.stopPropagation()));const l=document.createElement("div"),c=e.appendChild(l);c.classList.add("context-view-pointerBlock"),a.add(ce(c,Me.POINTER_MOVE,()=>c.remove())),a.add(ce(c,Me.MOUSE_DOWN,()=>c.remove()));let d=0;if(n.length){const g=this._createActionBar(".action-widget-action-bar",n);g&&(r.appendChild(g.getContainer().parentElement),a.add(g),d=g.getContainer().offsetWidth)}const h=(i=this._list.value)===null||i===void 0?void 0:i.layout(d);r.style.width=`${h}px`;const E=a.add(g1(e));return a.add(E.onDidBlur(()=>this.hide())),a}_createActionBar(e,t){if(!t.length)return;const n=ve(e),i=new $s(n);return i.push(t,{icon:!1,label:!0}),i}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};L3=cEt([Hj(0,f4),Hj(1,Et),Hj(2,mt)],L3);iu(zp,L3,1);const aA=100+1e3;fi(class extends ed{constructor(){super({id:"hideCodeActionWidget",title:{value:v("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:z3.Visible,keybinding:{weight:aA,primary:9,secondary:[1033]}})}run(u){u.get(zp).hide()}});fi(class extends ed{constructor(){super({id:"selectPrevCodeAction",title:{value:v("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:z3.Visible,keybinding:{weight:aA,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(u){const e=u.get(zp);e instanceof L3&&e.focusPrevious()}});fi(class extends ed{constructor(){super({id:"selectNextCodeAction",title:{value:v("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:z3.Visible,keybinding:{weight:aA,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(u){const e=u.get(zp);e instanceof L3&&e.focusNext()}});fi(class extends ed{constructor(){super({id:k2e,title:{value:v("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:z3.Visible,keybinding:{weight:aA,primary:3,secondary:[2137]}})}run(u){const e=u.get(zp);e instanceof L3&&e.acceptSelected()}});fi(class extends ed{constructor(){super({id:y2e,title:{value:v("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:z3.Visible,keybinding:{weight:aA,primary:2051}})}run(u){const e=u.get(zp);e instanceof L3&&e.acceptSelected(!0)}});const A2e=new Ne("supportedCodeAction","");class dEt extends ie{constructor(e,t,n,i=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=i,this._autoTriggerTimer=this._register(new Il),this._register(this._markerService.onMarkerChanged(r=>this._onMarkerChanges(r))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some(n=>OP(n,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:Ks.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&e.type===2){const{lineNumber:i,column:r}=n.getPosition(),a=t.getLineContent(i);if(a.length===0)return;if(r===1){if(/\s/.test(a[0]))return}else if(r===t.getLineMaxColumn(i)){if(/\s/.test(a[a.length-1]))return}else if(/\s/.test(a[r-2])&&/\s/.test(a[r-1]))return}return n}}var mf;(function(u){u.Empty={type:0};class e{constructor(n,i,r){this.trigger=n,this.position=i,this._cancellablePromise=r,this.type=1,this.actions=r.catch(a=>{if(Xc(a))return hEt;throw a})}cancel(){this._cancellablePromise.cancel()}}u.Triggered=e})(mf||(mf={}));const hEt=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1});class EEt extends ie{constructor(e,t,n,i,r){super(),this._editor=e,this._registry=t,this._markerService=n,this._progressService=r,this._codeActionOracle=this._register(new Qr),this._state=mf.Empty,this._onDidChangeState=this._register(new ee),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=A2e.bindTo(i),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(mf.Empty,!0))}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(mf.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(89)){const t=this._registry.all(e).flatMap(n=>{var i;return(i=n.providedCodeActionKinds)!==null&&i!==void 0?i:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new dEt(this._editor,this._markerService,n=>{var i;if(!n){this.setState(mf.Empty);return}const r=$i(a=>ree(this._registry,e,n.selection,n.trigger,_p.None,a));n.trigger.type===1&&((i=this._progressService)===null||i===void 0||i.showWhile(r,250)),this.setState(new mf.Triggered(n.trigger,n.selection.getStartPosition(),r))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:Ks.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!this._disposed&&this._onDidChangeState.fire(e))}}var gEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},J1=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},l7=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let M3=class _2e extends ie{static get(e){return e.getContribution(_2e.ID)}constructor(e,t,n,i,r,a,o,s,l,c){super(),this._commandService=o,this._configurationService=s,this._actionWidgetService=l,this._instantiationService=c,this._activeCodeActions=this._register(new Qr),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new EEt(this._editor,r.codeActionProvider,t,n,a)),this._register(this._model.onDidChangeState(d=>this.update(d))),this._lightBulbWidget=new nm(()=>{const d=this._editor.getContribution(w3.ID);return d&&this._register(d.onClick(h=>this.showCodeActionList(h.actions,h,{includeDisabledActions:!1,fromLightbulb:!0}))),d}),this._resolver=i.createInstance(iw),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}showCodeActions(e,t,n){return this.showCodeActionList(t,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,n,i){var r;if(!this._editor.hasModel())return;(r=is.get(this._editor))===null||r===void 0||r.closeMessage();const a=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:n,autoApply:i,context:{notAvailableMessage:e,position:a}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,n){return l7(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction(Z4t,e,nw.FromCodeActions,{preview:n,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:Ks.QuickFix,filter:{}})}})}update(e){var t,n,i,r,a,o,s;return l7(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let l;try{l=yield e.actions}catch(c){wt(c);return}if(!this._disposed)if((n=this._lightBulbWidget.value)===null||n===void 0||n.update(l,e.trigger,e.position),e.trigger.type===1){if(!((i=e.trigger.filter)===null||i===void 0)&&i.include){const d=this.tryGetValidActionToApply(e.trigger,l);if(d){try{(r=this._lightBulbWidget.value)===null||r===void 0||r.hide(),yield this._applyCodeAction(d,!1,!1)}finally{l.dispose()}return}if(e.trigger.context){const h=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,l);if(h&&h.action.disabled){(a=is.get(this._editor))===null||a===void 0||a.showMessage(h.action.disabled,e.trigger.context.position),l.dispose();return}}}const c=!!(!((o=e.trigger.filter)===null||o===void 0)&&o.include);if(e.trigger.context&&(!l.allActions.length||!c&&!l.validActions.length)){(s=is.get(this._editor))===null||s===void 0||s.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=l,l.dispose();return}this._activeCodeActions.value=l,this.showCodeActionList(l,this.toCoords(e.position),{includeDisabledActions:c,fromLightbulb:!1})}else this._actionWidgetService.isVisible?l.dispose():this._activeCodeActions.value=l})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:n})=>n.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,n){return l7(this,void 0,void 0,function*(){const i=this._editor.getDomNode();if(!i)return;const r=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!r.length)return;const a=ue.isIPosition(t)?this.toCoords(t):t,o={onSelect:(s,l)=>l7(this,void 0,void 0,function*(){this._applyCodeAction(s,!0,!!l),this._actionWidgetService.hide()}),onHide:()=>{var s;(s=this._editor)===null||s===void 0||s.focus()}};this._actionWidgetService.show("codeActionWidget",!0,tEt(r,this._shouldShowHeaders(),this._resolver.getResolver()),o,a,i,this._getActionBarActions(e,t,n))})}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),n=mi(this._editor.getDomNode()),i=n.left+t.left,r=n.top+t.top+t.height;return{x:i,y:r}}_shouldShowHeaders(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:t==null?void 0:t.uri})}_getActionBarActions(e,t,n){if(n.fromLightbulb)return[];const i=e.documentation.map(r=>{var a;return{id:r.id,label:r.title,tooltip:(a=r.tooltip)!==null&&a!==void 0?a:"",class:void 0,enabled:!0,run:()=>{var o;return this._commandService.executeCommand(r.id,...(o=r.arguments)!==null&&o!==void 0?o:[])}}});return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&i.push(this._showDisabled?{id:"hideMoreActions",label:v("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,n))}:{id:"showMoreActions",label:v("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,n))}),i}};M3.ID="editor.contrib.codeActionController";M3=gEt([J1(1,T1),J1(2,Et),J1(3,mt),J1(4,$e),J1(5,p4),J1(6,ei),J1(7,nu),J1(8,zp),J1(9,mt)],M3);function oA(u){return pe.regex(A2e.keys()[0],new RegExp("(\\s|^)"+Vs(u.value)+"\\b"))}const aee={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 Lp(u,e,t,n,i=Ks.Default){if(u.hasModel()){const r=M3.get(u);r==null||r.manualTriggerAtCurrentPosition(e,i,t,n)}}class mEt extends je{constructor(){super({id:uee,label:v("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:pe.and(K.writable,K.hasCodeActionsProvider),kbOpts:{kbExpr:K.textInputFocus,primary:2137,weight:100}})}run(e,t){return Lp(t,v("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,Ks.QuickFix)}}class fEt extends Dr{constructor(){super({id:h2e,precondition:pe.and(K.writable,K.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:aee}]}})}runEditorCommand(e,t,n){const i=Id.fromUser(n,{kind:_t.Empty,apply:"ifSingle"});return Lp(t,typeof(n==null?void 0:n.kind)=="string"?i.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):i.preferred?v("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):v("editor.action.codeAction.noneMessage","No code actions available"),{include:i.kind,includeSourceActions:!0,onlyIncludePreferredActions:i.preferred},i.apply)}}class pEt extends je{constructor(){super({id:g2e,label:v("refactor.label","Refactor..."),alias:"Refactor...",precondition:pe.and(K.writable,K.hasCodeActionsProvider),kbOpts:{kbExpr:K.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:pe.and(K.writable,oA(_t.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:aee}]}})}run(e,t,n){const i=Id.fromUser(n,{kind:_t.Refactor,apply:"never"});return Lp(t,typeof(n==null?void 0:n.kind)=="string"?i.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):i.preferred?v("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):v("editor.action.refactor.noneMessage","No refactorings available"),{include:_t.Refactor.contains(i.kind)?i.kind:_t.None,onlyIncludePreferredActions:i.preferred},i.apply,Ks.Refactor)}}class DEt extends je{constructor(){super({id:m2e,label:v("source.label","Source Action..."),alias:"Source Action...",precondition:pe.and(K.writable,K.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:pe.and(K.writable,oA(_t.Source))},description:{description:"Source Action...",args:[{name:"args",schema:aee}]}})}run(e,t,n){const i=Id.fromUser(n,{kind:_t.Source,apply:"never"});return Lp(t,typeof(n==null?void 0:n.kind)=="string"?i.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):i.preferred?v("editor.action.source.noneMessage.preferred","No preferred source actions available"):v("editor.action.source.noneMessage","No source actions available"),{include:_t.Source.contains(i.kind)?i.kind:_t.None,includeSourceActions:!0,onlyIncludePreferredActions:i.preferred},i.apply,Ks.SourceAction)}}class xEt extends je{constructor(){super({id:nee,label:v("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:pe.and(K.writable,oA(_t.SourceOrganizeImports)),kbOpts:{kbExpr:K.textInputFocus,primary:1581,weight:100}})}run(e,t){return Lp(t,v("editor.action.organize.noneMessage","No organize imports action available"),{include:_t.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",Ks.OrganizeImports)}}class vEt extends je{constructor(){super({id:iee,label:v("fixAll.label","Fix All"),alias:"Fix All",precondition:pe.and(K.writable,oA(_t.SourceFixAll))})}run(e,t){return Lp(t,v("fixAll.noneMessage","No fix all action available"),{include:_t.SourceFixAll,includeSourceActions:!0},"ifSingle",Ks.FixAll)}}class CEt extends je{constructor(){super({id:E2e,label:v("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:pe.and(K.writable,oA(_t.QuickFix)),kbOpts:{kbExpr:K.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return Lp(t,v("editor.action.autoFix.noneMessage","No auto fixes available"),{include:_t.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",Ks.AutoFix)}}Eu(M3.ID,M3,3);Eu(w3.ID,w3,4);be(mEt);be(pEt);be(DEt);be(xEt);be(CEt);be(vEt);Be(new fEt);Xn.as(E4.Configuration).registerConfiguration(Object.assign(Object.assign({},pbe),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:v("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}));var P0e=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class iU{constructor(){this.lenses=[],this._disposables=new fe}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const n of e.lenses)this.lenses.push({symbol:n,provider:t})}}function S2e(u,e,t){return P0e(this,void 0,void 0,function*(){const n=u.ordered(e),i=new Map,r=new iU,a=n.map((o,s)=>P0e(this,void 0,void 0,function*(){i.set(o,s);try{const l=yield Promise.resolve(o.provideCodeLenses(e,t));l&&r.add(l,o)}catch(l){Ni(l)}}));return yield Promise.all(a),r.lenses=r.lenses.sort((o,s)=>o.symbol.range.startLineNumbers.symbol.range.startLineNumber?1:i.get(o.provider)i.get(s.provider)?1:o.symbol.range.startColumns.symbol.range.startColumn?1:0),r})}Xt.registerCommand("_executeCodeLensProvider",function(u,...e){let[t,n]=e;Iu(lt.isUri(t)),Iu(typeof n=="number"||!n);const{codeLensProvider:i}=u.get($e),r=u.get(Bn).getModel(t);if(!r)throw p0();const a=[],o=new fe;return S2e(i,r,Vt.None).then(s=>{o.add(s);const l=[];for(const c of s.lenses)n==null||c.symbol.command?a.push(c.symbol):n-- >0&&c.provider.resolveCodeLens&&l.push(Promise.resolve(c.provider.resolveCodeLens(r,c.symbol,Vt.None)).then(d=>a.push(d||c.symbol)));return Promise.all(l)}).then(()=>a).finally(()=>{setTimeout(()=>o.dispose(),100)})});var bEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},kEt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const B2e=Gt("ICodeLensCache");class N0e{constructor(e,t){this.lineCount=e,this.data=t}}let rU=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new rm(20,.75);const t="codelens/cache";Ah(()=>e.remove(t,1));const n="codelens/cache2",i=e.get(n,1,"{}");this._deserialize(i),h1(e.onWillSaveState)(r=>{r.reason===RB.SHUTDOWN&&e.store(n,this._serialize(),1,1)})}put(e,t){const n=t.lenses.map(a=>{var o;return{range:a.symbol.range,command:a.symbol.command&&{id:"",title:(o=a.symbol.command)===null||o===void 0?void 0:o.title}}}),i=new iU;i.add({lenses:n,dispose:()=>{}},this._fakeProvider);const r=new N0e(e.getLineCount(),i);this._cache.set(e.uri.toString(),r)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,n]of this._cache){const i=new Set;for(const r of n.data.lenses)i.add(r.symbol.range.startLineNumber);e[t]={lineCount:n.lineCount,lines:[...i.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const n in t){const i=t[n],r=[];for(const o of i.lines)r.push({range:new O(o,1,o,11)});const a=new iU;a.add({lenses:r,dispose(){}},this._fakeProvider),this._cache.set(n,new N0e(i.lineCount,a))}}catch{}}};rU=bEt([kEt(0,$l)],rU);iu(B2e,rU,1);class yEt{constructor(e,t,n){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,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 bN{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${bN._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const n=[];let i=!1;for(let r=0;r{l.symbol.command&&s.push(l.symbol),n.addDecoration({range:l.symbol.range,options:R0e},d=>this._decorationIds[c]=d),o?o=O.plusRange(o,l.symbol.range):o=O.lift(l.symbol.range)}),this._viewZone=new yEt(o.startLineNumber-1,r,a),this._viewZoneId=i.addZone(this._viewZone),s.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(s,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new bN(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t==null||t.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,t)=>{const n=this._editor.getModel().getDecorationRange(e),i=this._data[t].symbol;return!!(n&&O.isEmpty(i.range)===n.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((n,i)=>{t.addDecoration({range:n.symbol.range,options:R0e},r=>this._decorationIds[i]=r)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},r6=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},AEt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let nv=class{constructor(e,t,n,i,r,a){this._editor=e,this._languageFeaturesService=t,this._commandService=i,this._notificationService=r,this._codeLensCache=a,this._disposables=new fe,this._localToDispose=new fe,this._lenses=[],this._oldCodeLensModels=new fe,this._provideCodeLensDebounce=n.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=n.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new Hu(()=>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(o=>{(o.hasChanged(49)||o.hasChanged(18)||o.hasChanged(17))&&this._updateLensStyle(),o.hasChanged(16)&&this._onModelChange()})),this._disposables.add(t.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(65)/this._editor.getOption(51));let t=this._editor.getOption(18);return(!t||t<5)&&(t=this._editor.getOption(51)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),n=this._editor.getOption(17),i=this._editor.getOption(49),{style:r}=this._editor.getContainerDomNode();r.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),r.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),r.setProperty("--vscode-editorCodeLens-fontFeatureSettings",i.fontFeatureSettings),n&&(r.setProperty("--vscode-editorCodeLens-fontFamily",n),r.setProperty("--vscode-editorCodeLens-fontFamilyDefault",ns.fontFamily)),this._editor.changeViewZones(a=>{for(const o of this._lenses)o.updateHeight(e,a)})}_localDispose(){var e,t,n;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(n=this._currentCodeLensModel)===null||n===void 0||n.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(16))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add(_g(()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(const i of this._languageFeaturesService.codeLensProvider.all(e))if(typeof i.onDidChange=="function"){const r=i.onDidChange(()=>n.schedule());this._localToDispose.add(r)}const n=new Hu(()=>{var i;const r=Date.now();(i=this._getCodeLensModelPromise)===null||i===void 0||i.cancel(),this._getCodeLensModelPromise=$i(a=>S2e(this._languageFeaturesService.codeLensProvider,e,a)),this._getCodeLensModelPromise.then(a=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=a,this._codeLensCache.put(e,a);const o=this._provideCodeLensDebounce.update(e,Date.now()-r);n.delay=o,this._renderCodeLensSymbols(a),this._resolveCodeLensesInViewportSoon()},wt)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(n),this._localToDispose.add(bt(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var i;this._editor.changeDecorations(r=>{this._editor.changeViewZones(a=>{const o=[];let s=-1;this._lenses.forEach(c=>{!c.isValid()||s===c.getLineNumber()?o.push(c):(c.update(a),s=c.getLineNumber())});const l=new $j;o.forEach(c=>{c.dispose(l,a),this._lenses.splice(this._lenses.indexOf(c),1)}),l.commit(r)})}),n.schedule(),this._resolveCodeLensesScheduler.cancel(),(i=this._resolveCodeLensesPromise)===null||i===void 0||i.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(i=>{i.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(bt(()=>{if(this._editor.getModel()){const i=Bl.capture(this._editor);this._editor.changeDecorations(r=>{this._editor.changeViewZones(a=>{this._disposeAllLenses(r,a)})}),i.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(i=>{if(i.target.type!==9)return;let r=i.target.element;if((r==null?void 0:r.tagName)==="SPAN"&&(r=r.parentElement),(r==null?void 0:r.tagName)==="A")for(const a of this._lenses){const o=a.getCommand(r);if(o){this._commandService.executeCommand(o.id,...o.arguments||[]).catch(s=>this._notificationService.error(s));break}}})),n.schedule()}_disposeAllLenses(e,t){const n=new $j;for(const i of this._lenses)i.dispose(n,t);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),n=[];let i;for(const o of e.lenses){const s=o.symbol.range.startLineNumber;s<1||s>t||(i&&i[i.length-1].symbol.range.startLineNumber===s?i.push(o):(i=[o],n.push(i)))}if(!n.length&&!this._lenses.length)return;const r=Bl.capture(this._editor),a=this._getLayoutInfo();this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{const l=new $j;let c=0,d=0;for(;dthis._resolveCodeLensesInViewportSoon())),c++,d++)}for(;cthis._resolveCodeLensesInViewportSoon())),d++;l.commit(o)})}),r.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const n=[],i=[];if(this._lenses.forEach(o=>{const s=o.computeIfNecessary(t);s&&(n.push(s),i.push(o))}),n.length===0)return;const r=Date.now(),a=$i(o=>{const s=n.map((l,c)=>{const d=new Array(l.length),h=l.map((E,g)=>!E.symbol.command&&typeof E.provider.resolveCodeLens=="function"?Promise.resolve(E.provider.resolveCodeLens(t,E.symbol,o)).then(m=>{d[g]=m},Ni):(d[g]=E.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!o.isCancellationRequested&&!i[c].isDisposed()&&i[c].updateCommands(d)})});return Promise.all(s)});this._resolveCodeLensesPromise=a,this._resolveCodeLensesPromise.then(()=>{const o=this._resolveCodeLensesDebounce.update(t,Date.now()-r);this._resolveCodeLensesScheduler.delay=o,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},o=>{wt(o),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};nv.ID="css.editor.codeLens";nv=FEt([r6(1,$e),r6(2,I0),r6(3,ei),r6(4,ci),r6(5,B2e)],nv);Eu(nv.ID,nv,1);be(class extends je{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:K.hasCodeLensProvider,label:v("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return AEt(this,void 0,void 0,function*(){if(!t.hasModel())return;const n=e.get(ud),i=e.get(ei),r=e.get(ci),a=t.getSelection().positionLineNumber,o=t.getContribution(nv.ID);if(!o)return;const s=o.getModel();if(!s)return;const l=[];for(const d of s.lenses)d.symbol.command&&d.symbol.range.startLineNumber===a&&l.push({label:d.symbol.command.title,command:d.symbol.command});if(l.length===0)return;const c=yield n.pick(l,{canPickMany:!1});if(c){if(s.isDisposed)return yield i.executeCommand(this.id);try{yield i.executeCommand(c.command.id,...c.command.arguments||[])}catch(d){r.error(d)}}})}});var _Et=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Kj=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},SEt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class oee{constructor(e,t){this._editorWorkerClient=new cQ(e,!1,"editorWorkerService",t)}provideDocumentColors(e,t){return SEt(this,void 0,void 0,function*(){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)})}provideColorPresentations(e,t,n){const i=t.range,r=t.color,a=r.alpha,o=new ae(new Qt(Math.round(255*r.red),Math.round(255*r.green),Math.round(255*r.blue),a)),s=a?ae.Format.CSS.formatRGB(o):ae.Format.CSS.formatRGBA(o),l=a?ae.Format.CSS.formatHSL(o):ae.Format.CSS.formatHSLA(o),c=a?ae.Format.CSS.formatHex(o):ae.Format.CSS.formatHexA(o),d=[];return d.push({label:s,textEdit:{range:i,text:s}}),d.push({label:l,textEdit:{range:i,text:l}}),d.push({label:c,textEdit:{range:i,text:c}}),d}}let aU=class extends ie{constructor(e,t,n){super(),this._register(n.colorProvider.register("*",new oee(e,t)))}};aU=_Et([Kj(0,Bn),Kj(1,an),Kj(2,$e)],aU);cN(aU);var sA=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function w2e(u,e,t,n=!0){return sA(this,void 0,void 0,function*(){return see(new BEt,u,e,t,n)})}function z2e(u,e,t,n){return Promise.resolve(t.provideColorPresentations(u,e,n))}class BEt{constructor(){}compute(e,t,n,i){return sA(this,void 0,void 0,function*(){const r=yield e.provideDocumentColors(t,n);if(Array.isArray(r))for(const a of r)i.push({colorInfo:a,provider:e});return Array.isArray(r)})}}class wEt{constructor(){}compute(e,t,n,i){return sA(this,void 0,void 0,function*(){const r=yield e.provideDocumentColors(t,n);if(Array.isArray(r))for(const a of r)i.push({range:a.range,color:[a.color.red,a.color.green,a.color.blue,a.color.alpha]});return Array.isArray(r)})}}class zEt{constructor(e){this.colorInfo=e}compute(e,t,n,i){return sA(this,void 0,void 0,function*(){const r=yield e.provideColorPresentations(t,this.colorInfo,Vt.None);return Array.isArray(r)&&i.push(...r),Array.isArray(r)})}}function see(u,e,t,n,i){return sA(this,void 0,void 0,function*(){let r=!1,a;const o=[],s=e.ordered(t);for(let l=s.length-1;l>=0;l--){const c=s[l];if(c instanceof oee)a=c;else try{(yield u.compute(c,t,n,o))&&(r=!0)}catch(d){Ni(d)}}return r?o:a&&i?(yield u.compute(a,t,n,o),o):[]})}function L2e(u,e){const{colorProvider:t}=u.get($e),n=u.get(Bn).getModel(e);if(!n)throw p0();const i=u.get(nu).getValue("editor.defaultColorDecorators",{resource:e});return{model:n,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:i}}Xt.registerCommand("_executeDocumentColorProvider",function(u,...e){const[t]=e;if(!(t instanceof lt))throw p0();const{model:n,colorProviderRegistry:i,isDefaultColorDecoratorsEnabled:r}=L2e(u,t);return see(new wEt,i,n,Vt.None,r)});Xt.registerCommand("_executeColorPresentationProvider",function(u,...e){const[t,n]=e,{uri:i,range:r}=n;if(!(i instanceof lt)||!Array.isArray(t)||t.length!==4||!O.isIRange(r))throw p0();const{model:a,colorProviderRegistry:o,isDefaultColorDecoratorsEnabled:s}=L2e(u,i),[l,c,d,h]=t;return see(new zEt({range:r,color:{red:l,green:c,blue:d,alpha:h}}),o,a,Vt.None,s)});var LEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Wj=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},O0e=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const M2e=Object.create({});let Rg=class T2e extends ie{constructor(e,t,n,i){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=n,this._localToDispose=this._register(new fe),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new jF(this._editor),this._decoratorLimitReporter=new MEt,this._colorDecorationClassRefs=this._register(new fe),this._debounceInformation=i.for(n.colorProvider,"Document Colors",{min:T2e.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(r=>{const a=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(144);const o=a!==this._isColorDecoratorsEnabled||r.hasChanged(20),s=r.hasChanged(144);(o||s)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(144),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),n=this._configurationService.getValue(t);if(n&&typeof n=="object"){const i=n.colorDecorators;if(i&&i.enable!==void 0&&!i.enable)return i.enable}return this._editor.getOption(19)}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 Il,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){return O0e(this,void 0,void 0,function*(){this._computePromise=$i(e=>O0e(this,void 0,void 0,function*(){const t=this._editor.getModel();if(!t)return[];const n=new ha(!1),i=yield w2e(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,n.elapsed()),i}));try{const e=yield this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){wt(e)}})}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=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:gt.EMPTY}));this._editor.changeDecorations(n=>{this._decorationsIds=n.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((i,r)=>this._colorDatas.set(i,e[r]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],n=this._editor.getOption(20);for(let r=0;rthis._colorDatas.has(i.id));return n.length===0?null:this._colorDatas.get(n[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};Rg.ID="editor.contrib.colorDetector";Rg.RECOMPUTE_TIME=1e3;Rg=LEt([Wj(1,nu),Wj(2,$e),Wj(3,I0)],Rg);class MEt{constructor(){this._onDidChange=new ee,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}Eu(Rg.ID,Rg,1);class TEt{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,t,n){this.presentationIndex=n,this._onColorFlushed=new ee,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new ee,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new ee,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let n=-1;for(let i=0;i{this.backgroundColor=a.getColor(uB)||ae.white})),this._register(ce(this._pickedColorNode,Me.CLICK,()=>this.model.selectNextColorPresentation())),this._register(ce(this._originalColorNode,Me.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=ae.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new NEt(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=ae.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:""}}let NEt=class extends ie{constructor(e){super(),this._onClicked=this._register(new ee),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),de(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),de(this._button,t),de(t,As(".button"+et.asCSSSelector(Cn("color-picker-close",Ae.close,v("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}};class REt extends ie{constructor(e,t,n,i=!1){super(),this.model=t,this.pixelRatio=n,this._insertButton=null,this._domNode=As(".colorpicker-body"),de(e,this._domNode),this._saturationBox=new IEt(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 OEt(this._domNode,this.model,i),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new jEt(this._domNode,this.model,i),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),i&&(this._insertButton=this._register(new VEt(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const n=this.model.color.hsva;this.model.color=new ae(new Vd(n.h,e,t,n.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new ae(new Vd(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,n=(1-e)*360;this.model.color=new ae(new Vd(n===360?0:n,t.s,t.v,t.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 IEt extends ie{constructor(e,t,n){super(),this.model=t,this.pixelRatio=n,this._onDidChange=new ee,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new ee,this.onColorFlushed=this._onColorFlushed.event,this._domNode=As(".saturation-wrap"),de(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",de(this._domNode,this._canvas),this.selection=As(".saturation-selection"),de(this._domNode,this.selection),this.layout(),this._register(ce(this._domNode,Me.POINTER_DOWN,i=>this.onPointerDown(i))),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 Qv);const t=mi(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>this.onDidChangePosition(i.pageX-t.left,i.pageY-t.top),()=>null);const n=ce(document,Me.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){const n=Math.max(0,Math.min(1,e/this.width)),i=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(n,i),this._onDidChange.fire({s:n,v:i})}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,t=new ae(new Vd(e.h,1,1,1)),n=this._canvas.getContext("2d"),i=n.createLinearGradient(0,0,this._canvas.width,0);i.addColorStop(0,"rgba(255, 255, 255, 1)"),i.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),i.addColorStop(1,"rgba(255, 255, 255, 0)");const r=n.createLinearGradient(0,0,0,this._canvas.height);r.addColorStop(0,"rgba(0, 0, 0, 0)"),r.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this._canvas.width,this._canvas.height),n.fillStyle=ae.Format.CSS.format(t),n.fill(),n.fillStyle=i,n.fill(),n.fillStyle=r,n.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class P2e extends ie{constructor(e,t,n=!1){super(),this.model=t,this._onDidChange=new ee,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new ee,this.onColorFlushed=this._onColorFlushed.event,n?(this.domNode=de(e,As(".standalone-strip")),this.overlay=de(this.domNode,As(".standalone-overlay"))):(this.domNode=de(e,As(".strip")),this.overlay=de(this.domNode,As(".overlay"))),this.slider=de(this.domNode,As(".slider")),this.slider.style.top="0px",this._register(ce(this.domNode,Me.POINTER_DOWN,i=>this.onPointerDown(i))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._register(new Qv),n=mi(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,r=>this.onDidChangeTop(r.pageY-n.top),()=>null);const i=ce(document,Me.POINTER_UP,()=>{this._onColorFlushed.fire(),i.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class OEt extends P2e{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:t,g:n,b:i}=e.rgba,r=new ae(new Qt(t,n,i,1)),a=new ae(new Qt(t,n,i,0));this.overlay.style.background=`linear-gradient(to bottom, ${r} 0%, ${a} 100%)`}getValue(e){return e.hsva.a}}class jEt extends P2e{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class VEt extends ie{constructor(e){super(),this._onClicked=this._register(new ee),this.onClicked=this._onClicked.event,this._button=de(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=t=>{this._onClicked.fire()}}get button(){return this._button}}class HEt extends Ol{constructor(e,t,n,i,r=!1){super(),this.model=t,this.pixelRatio=n,this._register($k.onDidChange(()=>this.layout()));const a=As(".colorpicker-widget");e.appendChild(a),this.header=this._register(new PEt(a,this.model,i,r)),this.body=this._register(new REt(a,this.model,this.pixelRatio,r))}layout(){this.body.layout()}}var N2e=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},R2e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},iv=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class $Et{constructor(e,t,n,i){this.owner=e,this.range=t,this.model=n,this.provider=i,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let rw=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,n){return ki.fromPromise(this._computeAsync(e,t,n))}_computeAsync(e,t,n){return iv(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const i=Rg.get(this._editor);if(!i)return[];for(const r of t){if(!i.isColorDecoration(r))continue;const a=i.getColorData(r.range.getStartPosition());if(a)return[yield I2e(this,this._editor.getModel(),a.colorInfo,a.provider)]}return[]})}renderHoverParts(e,t){return O2e(this,this._editor,this._themeService,t,e)}};rw=N2e([R2e(1,Ui)],rw);class KEt{constructor(e,t,n,i){this.owner=e,this.range=t,this.model=n,this.provider=i}}let N2=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}createColorHover(e,t,n){return iv(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!Rg.get(this._editor))return null;const r=yield w2e(n,this._editor.getModel(),Vt.None);let a=null,o=null;for(const d of r){const h=d.colorInfo;O.containsRange(h.range,e.range)&&(a=h,o=d.provider)}const s=a??e,l=o??t,c=!!a;return{colorHover:yield I2e(this,this._editor.getModel(),s,l),foundInEditor:c}})}updateEditorModel(e){return iv(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const t=e.model;let n=new O(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(yield PS(this._editor.getModel(),t,this._color,n,e),n=j2e(this._editor,n,t))})}renderHoverParts(e,t){return O2e(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};N2=N2e([R2e(1,Ui)],N2);function I2e(u,e,t,n){return iv(this,void 0,void 0,function*(){const i=e.getValueInRange(t.range),{red:r,green:a,blue:o,alpha:s}=t.color,l=new Qt(Math.round(r*255),Math.round(a*255),Math.round(o*255),s),c=new ae(l),d=yield z2e(e,t,n,Vt.None),h=new TEt(c,[],0);return h.colorPresentations=d||[],h.guessColorPresentation(c,i),u instanceof rw?new $Et(u,O.lift(t.range),h,n):new KEt(u,O.lift(t.range),h,n)})}function O2e(u,e,t,n,i){if(n.length===0||!e.hasModel())return ie.None;if(i.setMinimumDimensions){const h=e.getOption(65)+8;i.setMinimumDimensions(new Du(302,h))}const r=new fe,a=n[0],o=e.getModel(),s=a.model,l=r.add(new HEt(i.fragment,s,e.getOption(140),t,u instanceof N2));i.setColorPicker(l);let c=!1,d=new O(a.range.startLineNumber,a.range.startColumn,a.range.endLineNumber,a.range.endColumn);if(u instanceof N2){const h=n[0].model.color;u.color=h,PS(o,s,h,d,a),r.add(s.onColorFlushed(E=>{u.color=E}))}else r.add(s.onColorFlushed(h=>iv(this,void 0,void 0,function*(){yield PS(o,s,h,d,a),c=!0,d=j2e(e,d,s,i)})));return r.add(s.onDidChangeColor(h=>{PS(o,s,h,d,a)})),r.add(e.onDidChangeModelContent(h=>{c?c=!1:(i.hide(),e.focus())})),r}function j2e(u,e,t,n){let i,r;if(t.presentation.textEdit){i=[t.presentation.textEdit],r=new O(t.presentation.textEdit.range.startLineNumber,t.presentation.textEdit.range.startColumn,t.presentation.textEdit.range.endLineNumber,t.presentation.textEdit.range.endColumn);const a=u.getModel()._setTrackedRange(null,r,3);u.pushUndoStop(),u.executeEdits("colorpicker",i),r=u.getModel()._getTrackedRange(a)||r}else i=[{range:e,text:t.presentation.label,forceMoveMarkers:!1}],r=e.setEndPosition(e.endLineNumber,e.startColumn+t.presentation.label.length),u.pushUndoStop(),u.executeEdits("colorpicker",i);return t.presentation.additionalTextEdits&&(i=[...t.presentation.additionalTextEdits],u.executeEdits("colorpicker",i),n&&n.hide()),u.pushUndoStop(),r}function PS(u,e,t,n,i){return iv(this,void 0,void 0,function*(){const r=yield z2e(u,{range:n,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},i.provider,Vt.None);e.colorPresentations=r||[]})}function oU(u,e){return!!u[e]}class Gj{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=oU(e.event,t.triggerModifier),this.hasSideBySideModifier=oU(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class j0e{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=oU(e,t.triggerModifier)}}class c7{constructor(e,t,n,i){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=i}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function V0e(u){return u==="altKey"?Yt?new c7(57,"metaKey",6,"altKey"):new c7(5,"ctrlKey",6,"altKey"):Yt?new c7(6,"altKey",57,"metaKey"):new c7(6,"altKey",5,"ctrlKey")}class kN extends ie{constructor(e,t){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new ee),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new ee),this.onExecute=this._onExecute.event,this._onCancel=this._register(new ee),this.onCancel=this._onCancel.event,this._editor=e,this._alwaysFireExecuteOnMouseUp=t,this._opts=V0e(this._editor.getOption(76)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(n=>{if(n.hasChanged(76)){const i=V0e(this._editor.getOption(76));if(this._opts.equals(i))return;this._opts=i,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(n=>this._onEditorMouseMove(new Gj(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new Gj(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new Gj(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new j0e(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new j0e(n,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(n=>this._onDidChangeCursorSelection(n))),this._register(this._editor.onDidChangeModel(n=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(n=>{(n.scrollTopChanged||n.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=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){const t=e.target.position?e.target.position.lineNumber:0;(this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t||this._alwaysFireExecuteOnMouseUp)&&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()}}var WEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Z1=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let Ig=class extends b3{constructor(e,t,n,i,r,a,o,s,l,c,d,h,E){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),n,r,a,o,s,l,c,d,h,E),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration(g=>this._onParentConfigurationChanged(g)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){BF(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Ig=WEt([Z1(4,mt),Z1(5,hu),Z1(6,ei),Z1(7,Et),Z1(8,Ui),Z1(9,ci),Z1(10,B1),Z1(11,an),Z1(12,$e)],Ig);const H0e=new ae(new Qt(0,122,204)),GEt={showArrow:!0,showFrame:!0,className:"",frameColor:H0e,arrowColor:H0e,keepEditorSelection:!1},UEt="vs.editor.contrib.zoneWidget";class qEt{constructor(e,t,n,i,r,a,o,s){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=i,this.showInHiddenAreas=o,this.ordinal=s,this._onDomNodeTop=r,this._onComputedHeight=a}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class JEt{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class yN{constructor(e){this._editor=e,this._ruleName=yN._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),fae(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(){fae(this._ruleName),QK(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:O.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}yN._IdGenerator=new lX(".arrow-decoration-");class ZEt{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new fe,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=lh(t),BF(this.options,GEt,!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 i=this._getWidth(n);this.domNode.style.width=i+"px",this.domNode.style.left=this._getLeft(n)+"px",this._onWidth(i)}))}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 yN(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 t;if(this.domNode.style.height=`${e}px`,this.container){const n=e-this._decoratingElementsHeight();this.container.style.height=`${n}px`;const i=this.editor.getLayoutInfo();this._doLayout(n,this._getWidth(i))}(t=this._resizeSash)===null||t===void 0||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const n=O.isIRange(e)?O.lift(e):O.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId.set([{range:n,options:gt.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(t=>{this._viewZone&&t.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(65);let t=0;if(this.options.showArrow){const n=Math.round(e/3);t+=2*n}if(this.options.showFrame){const n=Math.round(e/9);t+=2*n}return t}_showImpl(e,t){const n=e.getStartPosition(),i=this.editor.getLayoutInfo(),r=this._getWidth(i);this.domNode.style.width=`${r}px`,this.domNode.style.left=this._getLeft(i)+"px";const a=document.createElement("div");a.style.overflow="hidden";const o=this.editor.getOption(65);if(!this.options.allowUnlimitedHeight){const h=Math.max(12,this.editor.getLayoutInfo().height/o*.8);t=Math.min(t,h)}let s=0,l=0;if(this._arrow&&this.options.showArrow&&(s=Math.round(o/3),this._arrow.height=s,this._arrow.show(n)),this.options.showFrame&&(l=Math.round(o/9)),this.editor.changeViewZones(h=>{this._viewZone&&h.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new qEt(a,n.lineNumber,n.column,t,E=>this._onViewZoneTop(E),E=>this._onViewZoneHeight(E),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=h.addZone(this._viewZone),this._overlayWidget=new JEt(UEt+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const h=this.options.frameWidth?this.options.frameWidth:l;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}const c=t*o-this._decoratingElementsHeight();this.container&&(this.container.style.top=s+"px",this.container.style.height=c+"px",this.container.style.overflow="hidden"),this._doLayout(c,r),this.options.keepEditorSelection||this.editor.setSelection(e);const d=this.editor.getModel();if(d){const h=d.validateRange(new O(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(h,h.startLineNumber===d.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new Vr(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){const n=(t.currentY-e.startY)/this.editor.getOption(65),i=n<0?Math.ceil(n):Math.floor(n),r=e.heightInLines+i;r>5&&r<35&&this._relayout(r)}}))}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 V2e=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},H2e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const $2e=Gt("IPeekViewService");iu($2e,class{constructor(){this._widgets=new Map}addExclusiveWidget(u,e){const t=this._widgets.get(u);t&&(t.listener.dispose(),t.widget.dispose());const n=()=>{const i=this._widgets.get(u);i&&i.widget===e&&(i.listener.dispose(),this._widgets.delete(u))};this._widgets.set(u,{widget:e,listener:e.onDidClose(n)})}},1);var Po;(function(u){u.inPeekEditor=new Ne("inReferenceSearchEditor",!0,v("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),u.notInPeekEditor=u.inPeekEditor.toNegated()})(Po||(Po={}));let R2=class{constructor(e,t){e instanceof Ig&&Po.inPeekEditor.bindTo(t)}dispose(){}};R2.ID="editor.contrib.referenceController";R2=V2e([H2e(1,Et)],R2);Eu(R2.ID,R2,0);function YEt(u){const e=u.get(hu).getFocusedCodeEditor();return e instanceof Ig?e.getParentEditor():e}const QEt={headerBackgroundColor:ae.white,primaryHeadingColor:ae.fromHex("#333333"),secondaryHeadingColor:ae.fromHex("#6c6c6cb3")};let aw=class extends ZEt{constructor(e,t,n){super(e,t),this.instantiationService=n,this._onDidClose=new ee,this.onDidClose=this._onDidClose.event,BF(this.options,QEt,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.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=ve(".head"),this._bodyElement=ve(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=ve(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),li(this._titleElement,"click",r=>this._onTitleClick(r))),de(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=ve("span.filename"),this._secondaryHeading=ve("span.dirname"),this._metaHeading=ve("span.meta"),de(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const n=ve(".peekview-actions");de(this._headElement,n);const i=this._getActionBarOptions();this._actionbarWidget=new $s(n,i),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new da("peekview.close",v("label.close","Close"),et.asClassName(Ae.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:N0t.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:fr(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,Qo(this._metaHeading)):Ja(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const n=Math.ceil(this.editor.getOption(65)*1.2),i=Math.round(e-(n+2));this._doLayoutHead(n,t),this._doLayoutBody(i,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};aw=V2e([H2e(2,mt)],aw);const XEt=U("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:ae.black,hcLight:ae.white},v("peekViewTitleBackground","Background color of the peek view title area.")),K2e=U("peekViewTitleLabel.foreground",{dark:ae.white,light:ae.black,hcDark:ae.white,hcLight:ol},v("peekViewTitleForeground","Color of the peek view title.")),W2e=U("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},v("peekViewTitleInfoForeground","Color of the peek view title info.")),egt=U("peekView.border",{dark:Ls,light:Ls,hcDark:Zt,hcLight:Zt},v("peekViewBorder","Color of the peek view borders and arrow.")),tgt=U("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:ae.black,hcLight:ae.white},v("peekViewResultsBackground","Background color of the peek view result list."));U("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:ae.white,hcLight:ol},v("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));U("peekViewResult.fileForeground",{dark:ae.white,light:"#1E1E1E",hcDark:ae.white,hcLight:ol},v("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));U("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},v("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));U("peekViewResult.selectionForeground",{dark:ae.white,light:"#6C6C6C",hcDark:ae.white,hcLight:ol},v("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const _E=U("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:ae.black,hcLight:ae.white},v("peekViewEditorBackground","Background color of the peek view editor."));U("peekViewEditorGutter.background",{dark:_E,light:_E,hcDark:_E,hcLight:_E},v("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));U("peekViewEditorStickyScroll.background",{dark:_E,light:_E,hcDark:_E,hcLight:_E},v("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor."));U("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},v("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));U("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},v("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));U("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:fn,hcLight:fn},v("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));var ugt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Og{constructor(e,t,n,i){this.isProviderFirst=e,this.parent=t,this.link=n,this._rangeCallback=i,this.id=TW.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?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}",t.value,B0(this.uri),this.range.startLineNumber,this.range.startColumn):v("aria.oneReference","in {0} on line {1} at column {2}",B0(this.uri),this.range.startLineNumber,this.range.startColumn)}}class ngt{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const n=this._modelReference.object.textEditorModel;if(!n)return;const{startLineNumber:i,startColumn:r,endLineNumber:a,endColumn:o}=e,s=n.getWordUntilPosition({lineNumber:i,column:r-t}),l=new O(i,s.startColumn,i,r),c=new O(a,o,a,1073741824),d=n.getValueInRange(l).replace(/^\s+/,""),h=n.getValueInRange(e),E=n.getValueInRange(c).replace(/\s+$/,"");return{value:d+h+E,highlight:{start:d.length,end:d.length+h.length}}}}class I2{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new Fa}dispose(){Au(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}",B0(this.uri),this.uri.fsPath):v("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,B0(this.uri),this.uri.fsPath)}resolve(e){return ugt(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const n=yield e.createModelReference(t.uri);this._previews.set(t.uri,new ngt(n))}catch(n){wt(n)}return this})}}class rs{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new ee,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[n]=e;e.sort(rs._compareReferences);let i;for(const r of e)if((!i||!pn.isEqual(i.uri,r.uri,!0))&&(i=new I2(this,r.uri),this.groups.push(i)),i.children.length===0||rs._compareReferences(r,i.children[i.children.length-1])!==0){const a=new Og(n===r,i,r,o=>this._onDidChangeReferenceRange.fire(o));this.references.push(a),i.children.push(a)}}dispose(){Au(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new rs(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,t){const{parent:n}=e;let i=n.children.indexOf(e);const r=n.children.length,a=n.parent.groups.length;return a===1||t&&i+10?(t?i=(i+1)%r:i=(i+r-1)%r,n.children[i]):(i=n.parent.groups.indexOf(n),t?(i=(i+1)%a,n.parent.groups[i].children[0]):(i=(i+a-1)%a,n.parent.groups[i].children[n.parent.groups[i].children.length-1]))}nearestReference(e,t){const n=this.references.map((i,r)=>({idx:r,prefixLen:f3(i.uri.toString(),e.toString()),offsetDist:Math.abs(i.range.startLineNumber-t.lineNumber)*100+Math.abs(i.range.startColumn-t.column)})).sort((i,r)=>i.prefixLen>r.prefixLen?-1:i.prefixLenr.offsetDist?1:0)[0];if(n)return this.references[n.idx]}referenceAt(e,t){for(const n of this.references)if(n.uri.toString()===e.toString()&&O.containsPosition(n.range,t))return n}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return pn.compare(e.uri,t.uri)||O.compareRangesUsingStarts(e.range,t.range)}}var FN=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},AN=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let sU=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof rs||e instanceof I2}getChildren(e){if(e instanceof rs)return e.groups;if(e instanceof I2)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};sU=FN([AN(0,jo)],sU);class igt{getHeight(){return 23}getTemplateId(e){return e instanceof I2?O2.id:lA.id}}let lU=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof Og){const n=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(n)return n.value}return B0(e.uri)}};lU=FN([AN(0,on)],lU);class rgt{getId(e){return e instanceof Og?e.id:e.uri}}let cU=class extends ie{constructor(e,t){super(),this._labelService=t;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new JB(n,{supportHighlights:!0})),this.badge=new xG(de(n,ve(".count")),{},bbe),e.appendChild(n)}set(e,t){const n=jP(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(n,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const i=e.children.length;this.badge.setCount(i),i>1?this.badge.setTitleFormat(v("referencesCount","{0} references",i)):this.badge.setTitleFormat(v("referenceCount","{0} reference",i))}};cU=FN([AN(1,q5)],cU);let O2=class G2e{constructor(e){this._instantiationService=e,this.templateId=G2e.id}renderTemplate(e){return this._instantiationService.createInstance(cU,e)}renderElement(e,t,n){n.set(e.element,WP(e.filterData))}disposeTemplate(e){e.dispose()}};O2.id="FileReferencesRenderer";O2=FN([AN(0,mt)],O2);class agt{constructor(e){this.label=new YE(e)}set(e,t){var n;const i=(n=e.parent.getPreview(e))===null||n===void 0?void 0:n.preview(e.range);if(!i||!i.value)this.label.set(`${B0(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:r,highlight:a}=i;t&&!Tc.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(r,WP(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(r,[a]))}}}class lA{constructor(){this.templateId=lA.id}renderTemplate(e){return new agt(e)}renderElement(e,t,n){n.set(e.element,e.filterData)}disposeTemplate(){}}lA.id="OneReferenceRenderer";class ogt{getWidgetAriaLabel(){return v("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var sgt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Y1=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},$0e=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class _N{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new fe,this._callOnModelChange=new fe,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 t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],n=[];for(let i=0,r=e.children.length;i{const r=i.deltaDecorations([],t);for(let a=0;a{r.equals(9)&&(this._keybindingService.dispatchEvent(r,r.target),r.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(cgt,"ReferencesWidget",this._treeContainer,new igt,[this._instantiationService.createInstance(O2),this._instantiationService.createInstance(lA)],this._instantiationService.createInstance(sU),n),this._splitView.addView({onDidChange:Ke.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:r=>{this._preview.layout({height:this._dim.height,width:r})}},WB.Distribute),this._splitView.addView({onDidChange:Ke.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:r=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${r}px`,this._tree.layout(this._dim.height,r)}},WB.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const i=(r,a)=>{r instanceof Og&&(a==="show"&&this._revealReference(r,!1),this._onDidSelectReference.fire({element:r,kind:a,source:"tree"}))};this._tree.onDidOpen(r=>{r.sideBySide?i(r.element,"side"):r.editorOptions.pinned?i(r.element,"goto"):i(r.element,"show")}),Ja(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Du(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*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"),Qo(this._messageContainer),Promise.resolve(void 0)):(Ja(this._messageContainer),this._decorationsManager=new _N(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:t,target:n}=e;if(t.detail!==2)return;const i=this._getFocusedReference();i&&this._onDidSelectReference.fire({element:{uri:i.uri,range:n.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),Qo(this._treeContainer),Qo(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 Og)return e;if(e instanceof I2&&e.children.length>0)return e.children[0]}revealReference(e){return $0e(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return $0e(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==It.inMemory?this.setTitle(Jnt(e.uri),this._uriLabel.getUriLabel(jP(e.uri))):this.setTitle(v("peekView.alternateTitle","References"));const n=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));const i=yield n;if(!this._model){i.dispose();return}Au(this._previewModelReference);const r=i.object;if(r){const a=this._preview.getModel()===r.textEditorModel?0:1,o=O.lift(e.range).collapseToStart();this._previewModelReference=i,this._preview.setModel(r.textEditorModel),this._preview.setSelection(o),this._preview.revealRangeInCenter(o,a)}else this._preview.setModel(this._previewNotAvailableMessage),i.dispose()})}};dU=sgt([Y1(3,Ui),Y1(4,jo),Y1(5,mt),Y1(6,$2e),Y1(7,q5),Y1(8,VP),Y1(9,on),Y1(10,Dn),Y1(11,an)],dU);var dgt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},lD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},K0e=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const Mp=new Ne("referenceSearchVisible",!1,v("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let jg=class hU{static get(e){return e.getContribution(hU.ID)}constructor(e,t,n,i,r,a,o,s){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=i,this._notificationService=r,this._instantiationService=a,this._storageService=o,this._configurationService=s,this._disposables=new fe,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=Mp.bindTo(n)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,n){let i;if(this._widget&&(i=this._widget.position),this.closeWidget(),i&&e.containsPosition(i))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 r="peekViewLayout",a=lgt.fromJSON(this._storageService.get(r,0,"{}"));this._widget=this._instantiationService.createInstance(dU,this._editor,this._defaultTreeKeyboardSupport,a),this._widget.setTitle(v("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store(r,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(s=>{const{element:l,kind:c}=s;if(l)switch(c){case"open":(s.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(l,!1,!1);break;case"side":this.openReference(l,!0,!1);break;case"goto":n?this._gotoReference(l,!0):this.openReference(l,!1,!0);break}}));const o=++this._requestIdPool;t.then(s=>{var l;if(o!==this._requestIdPool||!this._widget){s.dispose();return}return(l=this._model)===null||l===void 0||l.dispose(),this._model=s,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 c=this._editor.getModel().uri,d=new ue(e.startLineNumber,e.startColumn),h=this._model.nearestReference(c,d);if(h)return this._widget.setSelection(h).then(()=>{this._widget&&this._editor.getOption(85)==="editor"&&this._widget.focusOnPreviewEditor()})}})},s=>{this._notificationService.error(s)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return K0e(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const n=this._model.nearestReference(this._editor.getModel().uri,t);if(!n)return;const i=this._model.nextOrPreviousReference(n,e),r=this._editor.hasTextFocus(),a=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(i),yield this._gotoReference(i,!1),r?this._editor.focus():this._widget&&a&&this._widget.focusOnPreviewEditor()})}revealReference(e){return K0e(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,n;(t=this._widget)===null||t===void 0||t.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,t){var n;(n=this._widget)===null||n===void 0||n.hide(),this._ignoreModelChangeEvent=!0;const i=O.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:i,selectionSource:"code.jump",pinned:t}},this._editor).then(r=>{var a;if(this._ignoreModelChangeEvent=!1,!r||!this._widget){this.closeWidget();return}if(this._editor===r)this._widget.show(i),this._widget.focusOnReferenceTree();else{const o=hU.get(r),s=this._model.clone();this.closeWidget(),r.focus(),o==null||o.toggleWidget(i,$i(l=>Promise.resolve(s)),(a=this._peekMode)!==null&&a!==void 0?a:!1)}},r=>{this._ignoreModelChangeEvent=!1,wt(r)})}openReference(e,t,n){t||this.closeWidget();const{uri:i,range:r}=e;this._editorService.openCodeEditor({resource:i,options:{selection:r,selectionSource:"code.jump",pinned:n}},this._editor,t)}};jg.ID="editor.contrib.referencesController";jg=dgt([lD(2,Et),lD(3,hu),lD(4,ci),lD(5,mt),lD(6,$l),lD(7,nu)],jg);function Tp(u,e){const t=YEt(u);if(!t)return;const n=jg.get(t);n&&e(n)}To.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Ri(2089,60),when:pe.or(Mp,Po.inPeekEditor),handler(u){Tp(u,e=>{e.changeFocusBetweenPreviewAndReferences()})}});To.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:pe.or(Mp,Po.inPeekEditor),handler(u){Tp(u,e=>{e.goToNextOrPreviousReference(!0)})}});To.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:pe.or(Mp,Po.inPeekEditor),handler(u){Tp(u,e=>{e.goToNextOrPreviousReference(!1)})}});Xt.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");Xt.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");Xt.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");Xt.registerCommand("closeReferenceSearch",u=>Tp(u,e=>e.closeWidget()));To.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:pe.and(Po.inPeekEditor,pe.not("config.editor.stablePeek"))});To.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:pe.and(Mp,pe.not("config.editor.stablePeek"))});To.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:pe.and(Mp,Wbe,BX.negate(),wX.negate()),handler(u){var e;const n=(e=u.get(O0).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Og&&Tp(u,i=>i.revealReference(n[0]))}});To.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:pe.and(Mp,Wbe,BX.negate(),wX.negate()),handler(u){var e;const n=(e=u.get(O0).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Og&&Tp(u,i=>i.openReference(n[0],!0,!0))}});Xt.registerCommand("openReference",u=>{var e;const n=(e=u.get(O0).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Og&&Tp(u,i=>i.openReference(n[0],!1,!0))});var U2e=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Eb=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const lee=new Ne("hasSymbols",!1,v("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),SN=Gt("ISymbolNavigationService");let EU=class{constructor(e,t,n,i){this._editorService=t,this._notificationService=n,this._keybindingService=i,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=lee.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const n=new gU(this._editorService),i=n.onDidChange(r=>{if(this._ignoreEditorChange)return;const a=this._editorService.getActiveCodeEditor();if(!a)return;const o=a.getModel(),s=a.getPosition();if(!o||!s)return;let l=!1,c=!1;for(const d of t.references)if(OP(d.uri,o.uri))l=!0,c=c||O.containsPosition(d.range,s);else if(l)break;(!l||!c)&&this.reset()});this._currentState=Dl(n,i)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:O.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),n=t?v("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):v("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(n)}};EU=U2e([Eb(0,Et),Eb(1,hu),Eb(2,ci),Eb(3,on)],EU);iu(SN,EU,1);Be(new class extends Dr{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:lee,kbOpts:{weight:100,primary:70}})}runEditorCommand(u,e){return u.get(SN).revealNext(e)}});To.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:lee,primary:9,handler(u){u.get(SN).reset()}});let gU=class{constructor(e){this._listener=new Map,this._disposables=new fe,this._onDidChange=new ee,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(),Au(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,Dl(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};gU=U2e([Eb(0,hu)],gU);var cee=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function cA(u,e,t,n){return cee(this,void 0,void 0,function*(){const r=t.ordered(u).map(o=>Promise.resolve(n(o,u,e)).then(void 0,s=>{Ni(s)})),a=yield Promise.all(r);return c1(a.flat())})}function BN(u,e,t,n){return cA(e,t,u,(i,r,a)=>i.provideDefinition(r,a,n))}function q2e(u,e,t,n){return cA(e,t,u,(i,r,a)=>i.provideDeclaration(r,a,n))}function J2e(u,e,t,n){return cA(e,t,u,(i,r,a)=>i.provideImplementation(r,a,n))}function Z2e(u,e,t,n){return cA(e,t,u,(i,r,a)=>i.provideTypeDefinition(r,a,n))}function wN(u,e,t,n,i){return cA(e,t,u,(r,a,o)=>cee(this,void 0,void 0,function*(){const s=yield r.provideReferences(a,o,{includeDeclaration:!0},i);if(!n||!s||s.length!==2)return s;const l=yield r.provideReferences(a,o,{includeDeclaration:!1},i);return l&&l.length===1?l:s}))}function dA(u){return cee(this,void 0,void 0,function*(){const e=yield u(),t=new rs(e,""),n=t.references.map(i=>i.link);return t.dispose(),n})}M1("_executeDefinitionProvider",(u,e,t)=>{const n=u.get($e),i=BN(n.definitionProvider,e,t,Vt.None);return dA(()=>i)});M1("_executeTypeDefinitionProvider",(u,e,t)=>{const n=u.get($e),i=Z2e(n.typeDefinitionProvider,e,t,Vt.None);return dA(()=>i)});M1("_executeDeclarationProvider",(u,e,t)=>{const n=u.get($e),i=q2e(n.declarationProvider,e,t,Vt.None);return dA(()=>i)});M1("_executeReferenceProvider",(u,e,t)=>{const n=u.get($e),i=wN(n.referenceProvider,e,t,!1,Vt.None);return dA(()=>i)});M1("_executeImplementationProvider",(u,e,t)=>{const n=u.get($e),i=J2e(n.implementationProvider,e,t,Vt.None);return dA(()=>i)});var vl=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},Uj,qj,Jj,Zj,Yj,Qj,Xj,eV;oa.appendMenuItem(G.EditorContext,{submenu:G.EditorContextPeek,title:v("peek.submenu","Peek"),group:"navigation",order:100});class rv{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof rv||ue.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}}class xa extends vp{static all(){return xa._allSymbolNavigationCommands.values()}static _patchConfig(e){const t=Object.assign(Object.assign({},e),{f1:!0});if(t.menu)for(const n of Jt.wrap(t.menu))(n.id===G.EditorContext||n.id===G.EditorContextPeek)&&(n.when=pe.and(e.precondition,n.when));return t}constructor(e,t){super(xa._patchConfig(t)),this.configuration=e,xa._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,n,i){if(!t.hasModel())return Promise.resolve(void 0);const r=e.get(ci),a=e.get(hu),o=e.get(p4),s=e.get(SN),l=e.get($e),c=e.get(mt),d=t.getModel(),h=t.getPosition(),E=rv.is(n)?n:new rv(d,h),g=new Ng(t,5),m=CP(this._getLocationModel(l,E.model,E.position,g.token),g.token).then(f=>vl(this,void 0,void 0,function*(){var p;if(!f||g.token.isCancellationRequested)return;Aa(f.ariaMessage);let D;if(f.referenceAt(d.uri,h)){const b=this._getAlternativeCommand(t);!xa._activeAlternativeCommands.has(b)&&xa._allSymbolNavigationCommands.has(b)&&(D=xa._allSymbolNavigationCommands.get(b))}const x=f.references.length;if(x===0){if(!this.configuration.muteMessage){const b=d.getWordAtPosition(h);(p=is.get(t))===null||p===void 0||p.showMessage(this._getNoResultFoundMessage(b),h)}}else if(x===1&&D)xa._activeAlternativeCommands.add(this.desc.id),c.invokeFunction(b=>D.runEditorCommand(b,t,n,i).finally(()=>{xa._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(a,s,t,f,i)}),f=>{r.error(f)}).finally(()=>{g.dispose()});return o.showWhile(m,250),m}_onResult(e,t,n,i,r){return vl(this,void 0,void 0,function*(){const a=this._getGoToPreference(n);if(!(n instanceof Ig)&&(this.configuration.openInPeek||a==="peek"&&i.references.length>1))this._openInPeek(n,i,r);else{const o=i.firstReference(),s=i.references.length>1&&a==="gotoAndPeek",l=yield this._openReference(n,e,o,this.configuration.openToSide,!s);s&&l?this._openInPeek(l,i,r):i.dispose(),a==="goto"&&t.put(o)}})}_openReference(e,t,n,i,r){return vl(this,void 0,void 0,function*(){let a;if(Aqe(n)&&(a=n.targetSelectionRange),a||(a=n.range),!a)return;const o=yield t.openCodeEditor({resource:n.uri,options:{selection:O.collapseToStart(a),selectionRevealType:3,selectionSource:"code.jump"}},e,i);if(o){if(r){const s=o.getModel(),l=o.createDecorationsCollection([{range:a,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{o.getModel()===s&&l.clear()},350)}return o}})}_openInPeek(e,t,n){const i=jg.get(e);i&&e.hasModel()?i.toggleWidget(n??e.getSelection(),$i(r=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}}xa._allSymbolNavigationCommands=new Map;xa._activeAlternativeCommands=new Set;class hA extends xa{_getLocationModel(e,t,n,i){return vl(this,void 0,void 0,function*(){return new rs(yield BN(e.definitionProvider,t,n,i),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(57).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(57).multipleDefinitions}}fi((Uj=class mU extends hA{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:mU.id,title:{value:v("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:v({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:pe.and(K.hasDefinitionProvider,K.isInWalkThroughSnippet.toNegated()),keybinding:[{when:K.editorTextFocus,primary:70,weight:100},{when:pe.and(K.editorTextFocus,Hbe),primary:2118,weight:100}],menu:[{id:G.EditorContext,group:"navigation",order:1.1},{id:G.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),Xt.registerCommandAlias("editor.action.goToDeclaration",mU.id)}},Uj.id="editor.action.revealDefinition",Uj));fi((qj=class fU extends hA{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:fU.id,title:{value:v("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:pe.and(K.hasDefinitionProvider,K.isInWalkThroughSnippet.toNegated()),keybinding:[{when:K.editorTextFocus,primary:Ri(2089,70),weight:100},{when:pe.and(K.editorTextFocus,Hbe),primary:Ri(2089,2118),weight:100}]}),Xt.registerCommandAlias("editor.action.openDeclarationToTheSide",fU.id)}},qj.id="editor.action.revealDefinitionAside",qj));fi((Jj=class pU extends hA{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:pU.id,title:{value:v("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:pe.and(K.hasDefinitionProvider,Po.notInPeekEditor,K.isInWalkThroughSnippet.toNegated()),keybinding:{when:K.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:G.EditorContextPeek,group:"peek",order:2}}),Xt.registerCommandAlias("editor.action.previewDeclaration",pU.id)}},Jj.id="editor.action.peekDefinition",Jj));class Y2e extends xa{_getLocationModel(e,t,n,i){return vl(this,void 0,void 0,function*(){return new rs(yield q2e(e.declarationProvider,t,n,i),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(57).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(57).multipleDeclarations}}fi((Zj=class Q2e extends Y2e{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Q2e.id,title:{value:v("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:v({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:pe.and(K.hasDeclarationProvider,K.isInWalkThroughSnippet.toNegated()),menu:[{id:G.EditorContext,group:"navigation",order:1.3},{id:G.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")}},Zj.id="editor.action.revealDeclaration",Zj));fi(class extends Y2e{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:v("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:pe.and(K.hasDeclarationProvider,Po.notInPeekEditor,K.isInWalkThroughSnippet.toNegated()),menu:{id:G.EditorContextPeek,group:"peek",order:3}})}});class X2e extends xa{_getLocationModel(e,t,n,i){return vl(this,void 0,void 0,function*(){return new rs(yield Z2e(e.typeDefinitionProvider,t,n,i),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(57).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(57).multipleTypeDefinitions}}fi((Yj=class eye extends X2e{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:eye.ID,title:{value:v("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:v({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:pe.and(K.hasTypeDefinitionProvider,K.isInWalkThroughSnippet.toNegated()),keybinding:{when:K.editorTextFocus,primary:0,weight:100},menu:[{id:G.EditorContext,group:"navigation",order:1.4},{id:G.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},Yj.ID="editor.action.goToTypeDefinition",Yj));fi((Qj=class tye extends X2e{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:tye.ID,title:{value:v("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:pe.and(K.hasTypeDefinitionProvider,Po.notInPeekEditor,K.isInWalkThroughSnippet.toNegated()),menu:{id:G.EditorContextPeek,group:"peek",order:4}})}},Qj.ID="editor.action.peekTypeDefinition",Qj));class uye extends xa{_getLocationModel(e,t,n,i){return vl(this,void 0,void 0,function*(){return new rs(yield J2e(e.implementationProvider,t,n,i),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(57).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(57).multipleImplementations}}fi((Xj=class nye extends uye{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:nye.ID,title:{value:v("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:v({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:pe.and(K.hasImplementationProvider,K.isInWalkThroughSnippet.toNegated()),keybinding:{when:K.editorTextFocus,primary:2118,weight:100},menu:[{id:G.EditorContext,group:"navigation",order:1.45},{id:G.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},Xj.ID="editor.action.goToImplementation",Xj));fi((eV=class iye extends uye{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:iye.ID,title:{value:v("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:pe.and(K.hasImplementationProvider,Po.notInPeekEditor,K.isInWalkThroughSnippet.toNegated()),keybinding:{when:K.editorTextFocus,primary:3142,weight:100},menu:{id:G.EditorContextPeek,group:"peek",order:5}})}},eV.ID="editor.action.peekImplementation",eV));class rye extends xa{_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(57).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(57).multipleReferences}}fi(class extends rye{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:v("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:v({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:pe.and(K.hasReferenceProvider,Po.notInPeekEditor,K.isInWalkThroughSnippet.toNegated()),keybinding:{when:K.editorTextFocus,primary:1094,weight:100},menu:[{id:G.EditorContext,group:"navigation",order:1.45},{id:G.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,n,i){return vl(this,void 0,void 0,function*(){return new rs(yield wN(e.referenceProvider,t,n,!0,i),v("ref.title","References"))})}});fi(class extends rye{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:v("references.action.label","Peek References"),original:"Peek References"},precondition:pe.and(K.hasReferenceProvider,Po.notInPeekEditor,K.isInWalkThroughSnippet.toNegated()),menu:{id:G.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,n,i){return vl(this,void 0,void 0,function*(){return new rs(yield wN(e.referenceProvider,t,n,!1,i),v("ref.title","References"))})}});class hgt extends xa{constructor(e,t,n){super(e,{id:"editor.action.goToLocation",title:{value:v("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:pe.and(Po.notInPeekEditor,K.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=n}_getLocationModel(e,t,n,i){return vl(this,void 0,void 0,function*(){return new rs(this._references,v("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&v("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(57).multipleReferences}_getAlternativeCommand(){return""}}Xt.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:lt},{name:"position",description:"The position at which to start",constraint:ue.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:(u,e,t,n,i,r,a)=>vl(void 0,void 0,void 0,function*(){Iu(lt.isUri(e)),Iu(ue.isIPosition(t)),Iu(Array.isArray(n)),Iu(typeof i>"u"||typeof i=="string"),Iu(typeof a>"u"||typeof a=="boolean");const o=u.get(hu),s=yield o.openCodeEditor({resource:e},o.getFocusedCodeEditor());if(v1(s))return s.setPosition(t),s.revealPositionInCenterIfOutsideViewport(t,0),s.invokeWithinContext(l=>{const c=new class extends hgt{_getNoResultFoundMessage(d){return r||super._getNoResultFoundMessage(d)}}({muteMessage:!r,openInPeek:!!a,openToSide:!1},n,i);l.get(mt).invokeFunction(c.run.bind(c),s)})})});Xt.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:lt},{name:"position",description:"The position at which to start",constraint:ue.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:(u,e,t,n,i)=>vl(void 0,void 0,void 0,function*(){u.get(ei).executeCommand("editor.action.goToLocations",e,t,n,i,void 0,!0)})});Xt.registerCommand({id:"editor.action.findReferences",handler:(u,e,t)=>{Iu(lt.isUri(e)),Iu(ue.isIPosition(t));const n=u.get($e),i=u.get(hu);return i.openCodeEditor({resource:e},i.getFocusedCodeEditor()).then(r=>{if(!v1(r)||!r.hasModel())return;const a=jg.get(r);if(!a)return;const o=$i(l=>wN(n.referenceProvider,r.getModel(),ue.lift(t),!1,l).then(c=>new rs(c,v("ref.title","References")))),s=new O(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(a.toggleWidget(s,o,!1))})}});Xt.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");var Egt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},tV=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},W0e=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let T3=class NS{constructor(e,t,n,i){this.textModelResolverService=t,this.languageService=n,this.languageFeaturesService=i,this.toUnhook=new fe,this.toUnhookForKeyboard=new fe,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const r=new kN(e);this.toUnhook.add(r),this.toUnhook.add(r.onMouseMoveOrRelevantKeyDown(([a,o])=>{this.startFindDefinitionFromMouse(a,Gr(o))})),this.toUnhook.add(r.onExecute(a=>{this.isEnabled(a)&&this.gotoDefinition(a.target.position,a.hasSideBySideModifier).catch(o=>{wt(o)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(r.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(NS.ID)}startFindDefinitionFromCursor(e){return W0e(this,void 0,void 0,function*(){yield this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const n=e.target.position;this.startFindDefinition(n)}startFindDefinition(e){var t;return W0e(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();const n=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.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 i=new kke(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=$i(o=>this.findDefinition(e,o));let r;try{r=yield this.previousPromise}catch(o){wt(o);return}if(!r||!r.length||!i.validate(this.editor)){this.removeLinkDecorations();return}const a=r[0].originSelectionRange?O.lift(r[0].originSelectionRange):new O(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn);if(r.length>1){let o=a;for(const{originSelectionRange:s}of r)s&&(o=O.plusRange(o,s));this.addDecoration(o,new _r().appendText(v("multipleResults","Click to show {0} definitions.",r.length)))}else{const o=r[0];if(!o.uri)return;this.textModelResolverService.createModelReference(o.uri).then(s=>{if(!s.object||!s.object.textEditorModel){s.dispose();return}const{object:{textEditorModel:l}}=s,{startLineNumber:c}=o.range;if(c<1||c>l.getLineCount()){s.dispose();return}const d=this.getPreviewValue(l,c,o),h=this.languageService.guessLanguageIdByFilepathOrFirstLine(l.uri);this.addDecoration(a,d?new _r().appendCodeblock(h||"",d):void 0),s.dispose()})}})}getPreviewValue(e,t,n){let i=n.range;return i.endLineNumber-i.startLineNumber>=NS.MAX_SOURCE_PREVIEW_LINES&&(i=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,i)}stripIndentationFromPreviewRange(e,t,n){let r=e.getLineFirstNonWhitespaceColumn(t);for(let o=t+1;o{const i=!t&&this.editor.getOption(86)&&!this.isInPeekEditor(n);return new hA({openToSide:t,openInPeek:i,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(n)})}isInPeekEditor(e){const t=e.get(Et);return Po.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};T3.ID="editor.contrib.gotodefinitionatposition";T3.MAX_SOURCE_PREVIEW_LINES=8;T3=Egt([tV(1,jo),tV(2,Dn),tV(3,$e)],T3);Eu(T3.ID,T3,2);const d7=ve;class aye extends ie{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new Xv(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class dee extends ie{static render(e,t,n){return new dee(e,t,n)}constructor(e,t,n){super(),this.actionContainer=de(e,d7("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=de(this.actionContainer,d7("a.action")),this.action.setAttribute("role","button"),t.iconClass&&de(this.action,d7(`span.icon.${t.iconClass}`));const i=de(this.action,d7("span"));i.textContent=n?`${t.label} (${n})`:t.label,this._register(ce(this.actionContainer,Me.CLICK,r=>{r.stopPropagation(),r.preventDefault(),t.run(this.actionContainer)})),this._register(ce(this.actionContainer,Me.KEY_DOWN,r=>{const a=new un(r);(a.equals(3)||a.equals(10))&&(r.stopPropagation(),r.preventDefault(),t.run(this.actionContainer))})),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}var ggt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},mgt=globalThis&&globalThis.__asyncValues||function(u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=u[Symbol.asyncIterator],t;return e?e.call(u):(u=typeof __values=="function"?__values(u):u[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=u[r]&&function(a){return new Promise(function(o,s){a=u[r](a),i(o,s,a.done,a.value)})}}function i(r,a,o,s){Promise.resolve(s).then(function(l){r({value:l,done:o})},a)}};let fgt=class{constructor(e,t,n){this.value=e,this.isComplete=t,this.hasLoadingMessage=n}};class oye extends ie{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new ee),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new Hu(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new Hu(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new Hu(()=>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(59).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=lZe(e=>this._computer.computeAsync(e)),ggt(this,void 0,void 0,function*(){var e,t,n,i;try{try{for(var r=!0,a=mgt(this._asyncIterable),o;o=yield a.next(),e=o.done,!e;r=!0){i=o.value,r=!1;const s=i;s&&(this._result.push(s),this._fireResult())}}catch(s){t={error:s}}finally{try{!r&&!e&&(n=a.return)&&(yield n.call(a))}finally{if(t)throw t.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(s){wt(s)}})):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,t=this._state===4;this._onResult.fire(new fgt(this._result.slice(0),e,t))}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 uV{constructor(e,t,n,i){this.priority=e,this.range=t,this.initialMousePosX=n,this.initialMousePosY=i,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class RS{constructor(e,t,n,i,r,a){this.priority=e,this.owner=t,this.range=n,this.initialMousePosX=i,this.initialMousePosY=r,this.supportsMarkerHover=a,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}const Pp=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class hee{constructor(){this._onDidWillResize=new ee,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new ee,this.onDidResize=this._onDidResize.event,this._sashListener=new fe,this._size=new Du(0,0),this._minSize=new Du(0,0),this._maxSize=new Du(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new Vr(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new Vr(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new Vr(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:CB.North}),this._southSash=new Vr(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:CB.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,n=0;this._sashListener.add(Ke.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,n=0)})),this._sashListener.add(Ke.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,n=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(i=>{e&&(n=i.currentX-i.startX,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(i=>{e&&(n=-(i.currentX-i.startX),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(i=>{e&&(t=-(i.currentY-i.startY),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(i=>{e&&(t=i.currentY-i.startY,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(Ke.any(this._eastSash.onDidReset,this._westSash.onDidReset)(i=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(Ke.any(this._northSash.onDidReset,this._southSash.onDidReset)(i=>{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,t,n,i){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=n?3:0,this._westSash.state=i?3:0}layout(e=this.size.height,t=this.size.width){const{height:n,width:i}=this._minSize,{height:r,width:a}=this._maxSize;e=Math.max(n,Math.min(r,e)),t=Math.max(i,Math.min(a,t));const o=new Du(t,e);Du.equals(o,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=o,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 pgt=30,Dgt=24;class xgt extends ie{constructor(e,t=new Du(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new hee),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=Du.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(n=>{this._resize(new Du(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?ue.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);return!t||!n?void 0:mi(t).top+n.top-pgt}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);if(!t||!n)return;const i=mi(t),r=Zv(document.body),a=i.top+n.top+n.height;return r.height-a-Dgt}_findPositionPreference(e,t){var n,i;const r=Math.min((n=this._availableVerticalSpaceBelow(t))!==null&&n!==void 0?n:1/0,e),a=Math.min((i=this._availableVerticalSpaceAbove(t))!==null&&i!==void 0?i:1/0,e),o=Math.min(Math.max(a,r),e),s=Math.min(e,o);let l;return this._editor.getOption(59).above?l=s<=a?1:2:l=s<=r?2:1,l===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),l}_resize(e){this._resizableNode.layout(e.height,e.width)}}var Eee=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},ow=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const G0e=ve;let sw=class DU extends ie{constructor(e,t,n){super(),this._editor=e,this._instantiationService=t,this._keybindingService=n,this._currentResult=null;const i=this._editor.getOption(65)+8,r=4/3*i,a=new Du(r,i);this._widget=this._register(this._instantiationService.createInstance(XE,this._editor,a)),this._participants=[];for(const o of Pp.getAll())this._participants.push(this._instantiationService.createInstance(o,this._editor));this._participants.sort((o,s)=>o.hoverOrdinal-s.hoverOrdinal),this._computer=new cw(this._editor,this._participants),this._hoverOperation=this._register(new oye(this._editor,this._computer)),this._register(this._hoverOperation.onResult(o=>{if(!this._computer.anchor)return;const s=o.hasLoadingMessage?this._addLoadingMessage(o.value):o.value;this._withResult(new sye(this._computer.anchor,s,o.isComplete))})),this._register(li(this._widget.getDomNode(),"keydown",o=>{o.equals(9)&&this.hide()})),this._register(Kn.onDidChange(()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}get widget(){return this._widget}maybeShowAt(e){if(this._widget.isResizing)return!0;const t=[];for(const i of this._participants)if(i.suggestHoverAnchor){const r=i.suggestHoverAnchor(e);r&&t.push(r)}const n=e.target;if(n.type===6&&t.push(new uV(0,n.range,e.event.posx,e.event.posy)),n.type===7){const i=this._editor.getOption(49).typicalHalfwidthCharacterWidth/2;!n.detail.isAfterLines&&typeof n.detail.horizontalDistanceToText=="number"&&n.detail.horizontalDistanceToTextr.priority-i.priority),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,n,i){this._startShowingOrUpdateHover(new uV(0,e,void 0,void 0),t,n,i,null)}_startShowingOrUpdateHover(e,t,n,i,r){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,t,n,i,!1),!0):!1:this._editor.getOption(59).sticky&&r&&this._widget.isMouseGettingCloser(r.event.posx,r.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,n,i,!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,t,n,i,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,n,i,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,n,i,r){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=i,this._computer.source=n,this._computer.insistOnKeepingHoverVisible=r,this._hoverOperation.start(t))}_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())}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}containsNode(e){return e?this._widget.getDomNode().contains(e):!1}_addLoadingMessage(e){if(this._computer.anchor){for(const t of this._participants)if(t.createLoadingMessage){const n=t.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,t){const{showAtPosition:n,showAtSecondaryPosition:i,highlightRange:r}=DU.computeHoverRanges(this._editor,e.range,t),a=new fe,o=a.add(new lw(this._keybindingService)),s=document.createDocumentFragment();let l=null;const c={fragment:s,statusBar:o,setColorPicker:h=>l=h,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:h=>this._widget.setMinimumDimensions(h),hide:()=>this.hide()};for(const h of this._participants){const E=t.filter(g=>g.owner===h);E.length>0&&a.add(h.renderHoverParts(c,E))}const d=t.some(h=>h.isBeforeContent);if(o.hasContent&&s.appendChild(o.hoverElement),s.hasChildNodes()){if(r){const h=this._editor.createDecorationsCollection();h.set([{range:r,options:DU._DECORATION_OPTIONS}]),a.add(bt(()=>{h.clear()}))}this._widget.showAt(s,new Cgt(l,n,i,this._editor.getOption(59).above,this._computer.shouldFocus,this._computer.source,d,e.initialMousePosX,e.initialMousePosY,a))}else a.dispose()}static computeHoverRanges(e,t,n){let i=1;if(e.hasModel()){const l=e._getViewModel(),c=l.coordinatesConverter,d=c.convertModelRangeToViewRange(t),h=new ue(d.startLineNumber,l.getLineMinColumn(d.startLineNumber));i=c.convertViewPositionToModelPosition(h).column}const r=t.startLineNumber;let a=t.startColumn,o=n[0].range,s=null;for(const l of n)o=O.plusRange(o,l.range),l.range.startLineNumber===r&&l.range.endLineNumber===r&&(a=Math.max(Math.min(a,l.range.startColumn),i)),l.forceShowAtRange&&(s=l.range);return{showAtPosition:s?s.getStartPosition():new ue(r,t.startColumn),showAtSecondaryPosition:s?s.getStartPosition():new ue(r,a),highlightRange:o}}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()}};sw._DECORATION_OPTIONS=gt.register({description:"content-hover-highlight",className:"hoverHighlight"});sw=Eee([ow(1,mt),ow(2,on)],sw);class sye{constructor(e,t,n){this.anchor=e,this.messages=t,this.isComplete=n}filter(e){const t=this.messages.filter(n=>n.isValidForHoverAnchor(e));return t.length===this.messages.length?this:new vgt(this,this.anchor,t,this.isComplete)}}class vgt extends sye{constructor(e,t,n,i){super(t,n,i),this.original=e}filter(e){return this.original.filter(e)}}class Cgt{constructor(e,t,n,i,r,a,o,s,l,c){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=n,this.preferAbove=i,this.stoleFocus=r,this.source=a,this.isBeforeContent=o,this.initialMousePosX=s,this.initialMousePosY=l,this.disposables=c,this.closestMouseDistance=void 0}}const U0e=30,nV=10,bgt=6;let XE=class nh extends xgt{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,t,n){super(e,t),this._hover=this._register(new aye),this._hoverVisibleKey=K.hoverVisible.bindTo(n),this._hoverFocusedKey=K.hoverFocused.bindTo(n),de(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(49)&&this._updateFont()}));const i=this._register(g1(this._resizableNode.domNode));this._register(i.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(i.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setHoverData(void 0),this._layout(),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 nh.ID}static _applyDimensions(e,t,n){const i=typeof t=="number"?`${t}px`:t,r=typeof n=="number"?`${n}px`:n;e.style.width=i,e.style.height=r}_setContentsDomNodeDimensions(e,t){const n=this._hover.contentsDomNode;return nh._applyDimensions(n,e,t)}_setContainerDomNodeDimensions(e,t){const n=this._hover.containerDomNode;return nh._applyDimensions(n,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,n){const i=typeof t=="number"?`${t}px`:t,r=typeof n=="number"?`${n}px`:n;e.style.maxWidth=i,e.style.maxHeight=r}_setHoverWidgetMaxDimensions(e,t){nh._applyMaxDimensions(this._hover.contentsDomNode,e,t),nh._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_hasHorizontalScrollbar(){const e=this._hover.scrollbar.getScrollDimensions();return e.scrollWidth>e.width}_adjustContentsBottomPadding(){const e=this._hover.contentsDomNode,t=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;e.style.paddingBottom!==t&&(e.style.paddingBottom=t)}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const t=e.width,n=e.height;this._setHoverWidgetDimensions(t,n),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(t,n-nV))}_setResizableNodeMaxDimensions(){var e,t;const n=(e=this._findMaximumRenderingWidth())!==null&&e!==void 0?e:1/0,i=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._resizableNode.maxSize=new Du(n,i),this._setHoverWidgetMaxDimensions(n,i)}_resize(e){var t,n;nh._lastDimensions=new Du(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._setResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),(n=(t=this._visibleData)===null||t===void 0?void 0:t.colorPicker)===null||n===void 0||n.layout()}_findAvailableSpaceVertically(){var e;const t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition;if(t)return this._positionPreference===1?this._availableVerticalSpaceAbove(t):this._availableVerticalSpaceBelow(t)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=bgt;return Array.from(this._hover.contentsDomNode.children).forEach(n=>{t+=n.clientHeight}),this._hasHorizontalScrollbar()&&(t+=nV),Math.min(e,t)}_findMaximumRenderingWidth(){return!this._editor||!this._editor.hasModel()?void 0:Zv(document.body).width-14}isMouseGettingCloser(e,t){if(!this._visibleData)return!1;if(typeof this._visibleData.initialMousePosX>"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=t,!1;const n=mi(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=q0e(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,n.left,n.top,n.width,n.height));const i=q0e(e,t,n.left,n.top,n.width,n.height);return i>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,i),!0)}_setHoverData(e){var t;(t=this._visibleData)===null||t===void 0||t.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_layout(){const{fontSize:e,lineHeight:t}=this._editor.getOption(49),n=this._hover.contentsDomNode;n.style.fontSize=`${e}px`,n.style.lineHeight=`${t/e}`,this._updateMaxDimensions()}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_updateContent(e){const t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,nh._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,500,nh._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e,t){this._setHoverData(t),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,t){var n,i;if(!this._editor||!this._editor.hasModel())return;this._render(e,t);const r=kf(this._hover.containerDomNode),a=t.showAtPosition;this._positionPreference=(n=this._findPositionPreference(r,a))!==null&&n!==void 0?n:1,this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),(i=t.colorPicker)===null||i===void 0||i.layout()}hide(){if(!this._visibleData)return;const e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new Du(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")}_adjustHoverHeightForScrollbar(e){var t;const n=this._hover.containerDomNode,i=this._hover.contentsDomNode,r=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._setContainerDomNodeDimensions(vo(n),Math.min(r,e)),this._setContentsDomNodeDimensions(vo(i),Math.min(r,e-nV))}setMinimumDimensions(e){this._resizableNode.minSize=e}onContentsChanged(){var e;this._removeConstraintsRenderNormally();const t=this._hover.containerDomNode;let n=kf(t),i=vo(t);if(this._resizableNode.layout(n,i),this._setHoverWidgetDimensions(i,n),n=kf(t),i=vo(t),this._resizableNode.layout(n,i),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(n)),!((e=this._visibleData)===null||e===void 0)&&e.showAtPosition){const r=kf(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(r,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(49);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(49);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-U0e})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+U0e})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};XE.ID="editor.contrib.resizableContentHoverWidget";XE._lastDimensions=new Du(0,0);XE=Eee([ow(2,Et)],XE);let lw=class extends ie{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=G0e("div.hover-row.status-bar"),this.actionsElement=de(this.hoverElement,G0e("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;return this._hasContent=!0,this._register(dee.render(this.actionsElement,e,n))}append(e){const t=de(this.actionsElement,e);return this._hasContent=!0,t}};lw=Eee([ow(0,on)],lw);class cw{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,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(t.type!==1&&!t.supportsMarkerHover)return[];const n=e.getModel(),i=t.range.startLineNumber;if(i>n.getLineCount())return[];const r=n.getLineMaxColumn(i);return e.getLineDecorations(i).filter(a=>{if(a.options.isWholeLine)return!0;const o=a.range.startLineNumber===i?a.range.startColumn:1,s=a.range.endLineNumber===i?a.range.endColumn:r;if(a.options.showIfCollapsed){if(o>t.range.startColumn+1||t.range.endColumn-1>s)return!1}else if(o>t.range.startColumn||t.range.endColumn>s)return!1;return!0})}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return ki.EMPTY;const n=cw._getLineDecorations(this._editor,t);return ki.merge(this._participants.map(i=>i.computeAsync?i.computeAsync(t,n,e):ki.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=cw._getLineDecorations(this._editor,this._anchor);let t=[];for(const n of this._participants)t=t.concat(n.computeSync(this._anchor,e));return c1(t)}}function q0e(u,e,t,n,i,r){const a=t+i/2,o=n+r/2,s=Math.max(Math.abs(u-a)-i/2,0),l=Math.max(Math.abs(e-o)-r/2,0);return Math.sqrt(s*s+l*l)}const J0e=ve;class a5 extends ie{constructor(e,t,n){super(),this._renderDisposeables=this._register(new fe),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new aye),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new u4({editor:this._editor},t,n)),this._computer=new kgt(this._editor),this._hoverOperation=this._register(new oye(this._editor,this._computer)),this._register(this._hoverOperation.onResult(i=>{this._withResult(i.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(49)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return a5.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,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,t){this._renderDisposeables.clear();const n=document.createDocumentFragment();for(const i of t){const r=J0e("div.hover-row.markdown-hover"),a=de(r,J0e("div.hover-contents")),o=this._renderDisposeables.add(this._markdownRenderer.render(i.value));a.appendChild(o.element),n.appendChild(r)}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 t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),i=this._editor.getScrollTop(),r=this._editor.getOption(65),a=this._hover.containerDomNode.clientHeight,o=n-i-(a-r)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(o),0)}px`}}a5.ID="editor.contrib.modesGlyphHoverWidget";class kgt{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){const e=i=>({value:i}),t=this._editor.getLineDecorations(this._lineNumber),n=[];if(!t)return n;for(const i of t){if(!i.options.glyphMarginClassName)continue;const r=i.options.glyphMarginHoverMessage;!r||U5(r)||n.push(...TY(r).map(e))}return n}}var ygt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Fgt{constructor(e,t,n){this.provider=e,this.hover=t,this.ordinal=n}}function Agt(u,e,t,n,i){return ygt(this,void 0,void 0,function*(){try{const r=yield Promise.resolve(u.provideHover(t,n,i));if(r&&Sgt(r))return new Fgt(u,r,e)}catch(r){Ni(r)}})}function gee(u,e,t,n){const r=u.ordered(e).map((a,o)=>Agt(a,o,e,t,n));return ki.fromPromises(r).coalesce()}function _gt(u,e,t,n){return gee(u,e,t,n).map(i=>i.hover).toPromise()}M1("_executeHoverProvider",(u,e,t)=>{const n=u.get($e);return _gt(n.hoverProvider,e,t,Vt.None)});function Sgt(u){const e=typeof u.range<"u",t=typeof u.contents<"u"&&u.contents&&u.contents.length>0;return e&&t}var Bgt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},h7=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const Z0e=ve;class xc{constructor(e,t,n,i,r){this.owner=e,this.range=t,this.contents=n,this.isBeforeContent=i,this.ordinal=r}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let dw=class{constructor(e,t,n,i,r){this._editor=e,this._languageService=t,this._openerService=n,this._configurationService=i,this._languageFeaturesService=r,this.hoverOrdinal=3}createLoadingMessage(e){return new xc(this,e.range,[new _r().appendText(v("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const n=this._editor.getModel(),i=e.range.startLineNumber,r=n.getLineMaxColumn(i),a=[];let o=1e3;const s=n.getLineLength(i),l=n.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),c=this._editor.getOption(115),d=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:l});let h=!1;c>=0&&s>c&&e.range.startColumn>=c&&(h=!0,a.push(new xc(this,e.range,[{value:v("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,o++))),!h&&typeof d=="number"&&s>=d&&a.push(new xc(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,o++));let E=!1;for(const g of t){const m=g.range.startLineNumber===i?g.range.startColumn:1,f=g.range.endLineNumber===i?g.range.endColumn:r,p=g.options.hoverMessage;if(!p||U5(p))continue;g.options.beforeContentClassName&&(E=!0);const D=new O(e.range.startLineNumber,m,e.range.startLineNumber,f);a.push(new xc(this,D,TY(p),E,o++))}return a}computeAsync(e,t,n){if(!this._editor.hasModel()||e.type!==1)return ki.EMPTY;const i=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(i))return ki.EMPTY;const r=new ue(e.range.startLineNumber,e.range.startColumn);return gee(this._languageFeaturesService.hoverProvider,i,r,n).filter(a=>!U5(a.hover.contents)).map(a=>{const o=a.hover.range?O.lift(a.hover.range):e.range;return new xc(this,o,a.hover.contents,!1,a.ordinal)})}renderHoverParts(e,t){return lye(e,t,this._editor,this._languageService,this._openerService)}};dw=Bgt([h7(1,Dn),h7(2,gs),h7(3,nu),h7(4,$e)],dw);function lye(u,e,t,n,i){e.sort((a,o)=>a.ordinal-o.ordinal);const r=new fe;for(const a of e)for(const o of a.contents){if(U5(o))continue;const s=Z0e("div.hover-row.markdown-hover"),l=de(s,Z0e("div.hover-contents")),c=r.add(new u4({editor:t},n,i));r.add(c.onDidRenderAsync(()=>{l.className="hover-contents code-hover-contents",u.onContentsChanged()}));const d=r.add(c.render(o));l.appendChild(d.element),u.fragment.appendChild(s)}return r}var cye=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},hw=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};class Y0e{constructor(e,t,n){this.marker=e,this.index=t,this.total=n}}let xU=class{constructor(e,t,n){this._markerService=t,this._configService=n,this._onDidChange=new ee,this.onDidChange=this._onDidChange.event,this._dispoables=new fe,this._markers=[],this._nextIdx=-1,lt.isUri(e)?this._resourceFilter=o=>o.toString()===e.toString():e&&(this._resourceFilter=e);const i=this._configService.getValue("problems.sortOrder"),r=(o,s)=>{let l=Hk(o.resource.toString(),s.resource.toString());return l===0&&(i==="position"?l=O.compareRangesUsingStarts(o,s)||Wn.compare(o.severity,s.severity):l=Wn.compare(o.severity,s.severity)||O.compareRangesUsingStarts(o,s)),l},a=()=>{this._markers=this._markerService.read({resource:lt.isUri(e)?e:void 0,severities:Wn.Error|Wn.Warning|Wn.Info}),typeof e=="function"&&(this._markers=this._markers.filter(o=>this._resourceFilter(o.resource))),this._markers.sort(r)};a(),this._dispoables.add(t.onMarkerChanged(o=>{(!this._resourceFilter||o.some(s=>this._resourceFilter(s)))&&(a(),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 Y0e(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,n){let i=!1,r=this._markers.findIndex(a=>a.resource.toString()===e.uri.toString());r<0&&(r=Pk(this._markers,{resource:e.uri},(a,o)=>Hk(a.resource.toString(),o.resource.toString())),r<0&&(r=~r));for(let a=r;ai.resource.toString()===e.toString());if(!(n<0)){for(;n=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},cD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};class zgt{constructor(e,t,n,i,r){this._openerService=i,this._labelService=r,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new fe,this._editor=t;const a=document.createElement("div");a.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),a.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),a.appendChild(this._relatedBlock),this._disposables.add(li(this._relatedBlock,"click",o=>{o.preventDefault();const s=this._relatedDiagnostics.get(o.target);s&&n(s)})),this._scrollable=new TCe(a,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(o=>{a.style.left=`-${o.scrollLeft}px`,a.style.top=`-${o.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){Au(this._disposables)}update(e){const{source:t,message:n,relatedInformation:i,code:r}=e;let a=((t==null?void 0:t.length)||0)+2;r&&(typeof r=="string"?a+=r.length:a+=r.value.length);const o=E1(n);this._lines=o.length,this._longestLineLength=0;for(const h of o)this._longestLineLength=Math.max(h.length+a,this._longestLineLength);fr(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let s=this._messageBlock;for(const h of o)s=document.createElement("div"),s.innerText=h,h===""&&(s.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(s);if(t||r){const h=document.createElement("span");if(h.classList.add("details"),s.appendChild(h),t){const E=document.createElement("span");E.innerText=t,E.classList.add("source"),h.appendChild(E)}if(r)if(typeof r=="string"){const E=document.createElement("span");E.innerText=`(${r})`,E.classList.add("code"),h.appendChild(E)}else{this._codeLink=ve("a.code-link"),this._codeLink.setAttribute("href",`${r.target.toString()}`),this._codeLink.onclick=g=>{this._openerService.open(r.target,{allowCommands:!0}),g.preventDefault(),g.stopPropagation()};const E=de(this._codeLink,ve("span"));E.innerText=r.value,h.appendChild(this._codeLink)}}if(fr(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),ca(i)){const h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(65)*.66)}px`,this._lines+=1;for(const E of i){const g=document.createElement("div"),m=document.createElement("a");m.classList.add("filename"),m.innerText=`${this._labelService.getUriBasenameLabel(E.resource)}(${E.startLineNumber}, ${E.startColumn}): `,m.title=this._labelService.getUriLabel(E.resource),this._relatedDiagnostics.set(m,E);const f=document.createElement("span");f.innerText=E.message,g.appendChild(m),g.appendChild(f),this._lines+=1,h.appendChild(g)}}const l=this._editor.getOption(49),c=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),d=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,scrollHeight:d})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case Wn.Error:t=v("Error","Error");break;case Wn.Warning:t=v("Warning","Warning");break;case Wn.Info:t=v("Info","Info");break;case Wn.Hint:t=v("Hint","Hint");break}let n=v("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const i=this._editor.getModel();return i&&e.startLineNumber<=i.getLineCount()&&e.startLineNumber>=1&&(n=`${i.getLineContent(e.startLineNumber)}, ${n}`),n}}let av=class hye extends aw{constructor(e,t,n,i,r,a,o){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},r),this._themeService=t,this._openerService=n,this._menuService=i,this._contextKeyService=a,this._labelService=o,this._callOnDispose=new fe,this._onDidSelectRelatedInformation=new ee,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Wn.Warning,this._backgroundColor=ae.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Pgt);let t=bU,n=Lgt;this._severity===Wn.Warning?(t=IS,n=Mgt):this._severity===Wn.Info&&(t=kU,n=Tgt);const i=e.getColor(t),r=e.getColor(n);this.style({arrowColor:i,frameColor:i,headerBackgroundColor:r,primaryHeadingColor:e.getColor(K2e),secondaryHeadingColor:e.getColor(W2e)})}_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(i=>this.editor.focus()));const t=[],n=this._menuService.createMenu(hye.TitleMenu,this._contextKeyService);ybe(n,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=de(e,ve(""))}_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 zgt(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,n){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const i=O.lift(e),r=this.editor.getPosition(),a=r&&i.containsPosition(r)?r:i.getStartPosition();super.show(a,this.computeRequiredHeight());const o=this.editor.getModel();if(o){const s=n>1?v("problems","{0} of {1} problems",t,n):v("change","{0} of {1} problem",t,n);this.setTitle(B0(o.uri),s)}this._icon.className=`codicon ${CU.className(Wn.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(a,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,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),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()}};av.TitleMenu=new G("gotoErrorTitleMenu");av=wgt([cD(1,Ui),cD(2,gs),cD(3,L1),cD(4,mt),cD(5,Et),cD(6,q5)],av);const Q0e=t2(Kd,zXe),X0e=t2(zs,e2),ele=t2(Ls,rW),bU=U("editorMarkerNavigationError.background",{dark:Q0e,light:Q0e,hcDark:Zt,hcLight:Zt},v("editorMarkerNavigationError","Editor marker navigation widget error color.")),Lgt=U("editorMarkerNavigationError.headerBackground",{dark:tt(bU,.1),light:tt(bU,.1),hcDark:null,hcLight:null},v("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),IS=U("editorMarkerNavigationWarning.background",{dark:X0e,light:X0e,hcDark:Zt,hcLight:Zt},v("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),Mgt=U("editorMarkerNavigationWarning.headerBackground",{dark:tt(IS,.1),light:tt(IS,.1),hcDark:"#0C141F",hcLight:tt(IS,.2)},v("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),kU=U("editorMarkerNavigationInfo.background",{dark:ele,light:ele,hcDark:Zt,hcLight:Zt},v("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),Tgt=U("editorMarkerNavigationInfo.headerBackground",{dark:tt(kU,.1),light:tt(kU,.1),hcDark:null,hcLight:null},v("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),Pgt=U("editorMarkerNavigation.background",{dark:er,light:er,hcDark:er,hcLight:er},v("editorMarkerNavigationBackground","Editor marker navigation widget background."));var Ngt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},E7=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Eye=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let Vg=class OS{static get(e){return e.getContribution(OS.ID)}constructor(e,t,n,i,r){this._markerNavigationService=t,this._contextKeyService=n,this._editorService=i,this._instantiationService=r,this._sessionDispoables=new fe,this._editor=e,this._widgetVisible=gye.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 t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(av,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 i,r,a;(!(!((i=this._model)===null||i===void 0)&&i.selected)||!O.containsPosition((r=this._model)===null||r===void 0?void 0:r.selected.marker,n.position))&&((a=this._model)===null||a===void 0||a.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:O.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 t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new ue(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){var n,i;return Eye(this,void 0,void 0,function*(){if(this._editor.hasModel()){const r=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(r.move(e,this._editor.getModel(),this._editor.getPosition()),!r.selected)return;if(r.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const a=yield this._editorService.openCodeEditor({resource:r.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:r.selected.marker}},this._editor);a&&((n=OS.get(a))===null||n===void 0||n.close(),(i=OS.get(a))===null||i===void 0||i.nagivate(e,t))}else this._widget.showAtMarker(r.selected.marker,r.selected.index,r.selected.total)}})}};Vg.ID="editor.contrib.markerController";Vg=Ngt([E7(1,dye),E7(2,Et),E7(3,hu),E7(4,mt)],Vg);class zN extends je{constructor(e,t,n){super(n),this._next=e,this._multiFile=t}run(e,t){var n;return Eye(this,void 0,void 0,function*(){t.hasModel()&&((n=Vg.get(t))===null||n===void 0||n.nagivate(this._next,this._multiFile))})}}class eg extends zN{constructor(){super(!0,!1,{id:eg.ID,label:eg.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:K.focus,primary:578,weight:100},menuOpts:{menuId:av.TitleMenu,title:eg.LABEL,icon:Cn("marker-navigation-next",Ae.arrowDown,v("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}eg.ID="editor.action.marker.next";eg.LABEL=v("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class e3 extends zN{constructor(){super(!1,!1,{id:e3.ID,label:e3.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:K.focus,primary:1602,weight:100},menuOpts:{menuId:av.TitleMenu,title:e3.LABEL,icon:Cn("marker-navigation-previous",Ae.arrowUp,v("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}e3.ID="editor.action.marker.prev";e3.LABEL=v("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class Rgt extends zN{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:K.focus,primary:66,weight:100},menuOpts:{menuId:G.MenubarGoMenu,title:v({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class Igt extends zN{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:K.focus,primary:1090,weight:100},menuOpts:{menuId:G.MenubarGoMenu,title:v({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}Eu(Vg.ID,Vg,4);be(eg);be(e3);be(Rgt);be(Igt);const gye=new Ne("markersNavigationVisible",!1),Ogt=Dr.bindToContribution(Vg.get);Be(new Ogt({id:"closeMarkersNavigation",precondition:gye,handler:u=>u.close(),kbOpts:{weight:100+50,kbExpr:K.focus,primary:9,secondary:[1033]}}));var jgt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},iV=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const W0=ve;class Vgt{constructor(e,t,n){this.owner=e,this.range=t,this.marker=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const tle={type:1,filter:{include:_t.QuickFix},triggerAction:Ks.QuickFixHover};let yU=class{constructor(e,t,n,i){this._editor=e,this._markerDecorationsService=t,this._openerService=n,this._languageFeaturesService=i,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];const n=this._editor.getModel(),i=e.range.startLineNumber,r=n.getLineMaxColumn(i),a=[];for(const o of t){const s=o.range.startLineNumber===i?o.range.startColumn:1,l=o.range.endLineNumber===i?o.range.endColumn:r,c=this._markerDecorationsService.getMarker(n.uri,o);if(!c)continue;const d=new O(e.range.startLineNumber,s,e.range.startLineNumber,l);a.push(new Vgt(this,d,c))}return a}renderHoverParts(e,t){if(!t.length)return ie.None;const n=new fe;t.forEach(r=>e.fragment.appendChild(this.renderMarkerHover(r,n)));const i=t.length===1?t[0]:t.sort((r,a)=>Wn.compare(r.marker.severity,a.marker.severity))[0];return this.renderMarkerStatusbar(e,i,n),n}renderMarkerHover(e,t){const n=W0("div.hover-row"),i=de(n,W0("div.marker.hover-contents")),{source:r,message:a,code:o,relatedInformation:s}=e.marker;this._editor.applyFontInfo(i);const l=de(i,W0("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=a,r||o)if(o&&typeof o!="string"){const c=W0("span");if(r){const g=de(c,W0("span"));g.innerText=r}const d=de(c,W0("a.code-link"));d.setAttribute("href",o.target.toString()),t.add(ce(d,"click",g=>{this._openerService.open(o.target,{allowCommands:!0}),g.preventDefault(),g.stopPropagation()}));const h=de(d,W0("span"));h.innerText=o.value;const E=de(i,c);E.style.opacity="0.6",E.style.paddingLeft="6px"}else{const c=de(i,W0("span"));c.style.opacity="0.6",c.style.paddingLeft="6px",c.innerText=r&&o?`${r}(${o})`:r||`(${o})`}if(ca(s))for(const{message:c,resource:d,startLineNumber:h,startColumn:E}of s){const g=de(i,W0("div"));g.style.marginTop="8px";const m=de(g,W0("a"));m.innerText=`${B0(d)}(${h}, ${E}): `,m.style.cursor="pointer",t.add(ce(m,"click",p=>{p.stopPropagation(),p.preventDefault(),this._openerService&&this._openerService.open(d,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:h,startColumn:E}}}).catch(wt)}));const f=de(g,W0("span"));f.innerText=c,this._editor.applyFontInfo(f)}return n}renderMarkerStatusbar(e,t,n){if((t.marker.severity===Wn.Error||t.marker.severity===Wn.Warning||t.marker.severity===Wn.Info)&&e.statusBar.addAction({label:v("view problem","View Problem"),commandId:eg.ID,run:()=>{var i;e.hide(),(i=Vg.get(this._editor))===null||i===void 0||i.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(89)){const i=e.statusBar.append(W0("div"));this.recentMarkerCodeActionsInfo&&($B.makeKey(this.recentMarkerCodeActionsInfo.marker)===$B.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(i.textContent=v("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const r=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?ie.None:n.add(_g(()=>i.textContent=v("checkingForQuickFixes","Checking for quick fixes..."),200));i.textContent||(i.textContent=String.fromCharCode(160));const a=this.getCodeActions(t.marker);n.add(bt(()=>a.cancel())),a.then(o=>{if(r.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:o.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){o.dispose(),i.textContent=v("noQuickFixes","No quick fixes available");return}i.style.display="none";let s=!1;n.add(bt(()=>{s||o.dispose()})),e.statusBar.addAction({label:v("quick fixes","Quick Fix..."),commandId:uee,run:l=>{s=!0;const c=M3.get(this._editor),d=mi(l);e.hide(),c==null||c.showCodeActions(tle,o,{x:d.left,y:d.top,width:d.width,height:d.height})}})},wt)}}getCodeActions(e){return $i(t=>ree(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new O(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),tle,_p.None,t))}};yU=jgt([iV(1,pQ),iV(2,gs),iV(3,$e)],yU);const mye="editor.action.inlineSuggest.commit",fye="editor.action.inlineSuggest.showPrevious",pye="editor.action.inlineSuggest.showNext";var Hgt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class $gt extends ie{constructor(e,t,n={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new tqe),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=new fe,this.options=n,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new j2(()=>{var i;return(i=this.toggleMenuActionViewItem)===null||i===void 0?void 0:i.show()},n.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new $s(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,actionViewItemProvider:(i,r)=>{var a;if(i.id===j2.ID)return this.toggleMenuActionViewItem=new NB(i,i.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:et.asClassNameArray((a=n.moreIcon)!==null&&a!==void 0?a:Ae.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(n.actionViewItemProvider){const o=n.actionViewItemProvider(i,r);if(o)return o}if(i instanceof N5){const o=new NB(i,i.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:i.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});return o.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(o),this.disposables.add(this._onDidChangeDropdownVisibility.add(o.onDidChangeVisibility)),o}}}))}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,t){this.clear();const n=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),n.push(this.toggleMenuAction)),n.forEach(i=>{this.actionBar.push(i,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(i)})})}getKeybindingLabel(e){var t,n;const i=this.lookupKeybindings?(n=(t=this.options).getKeyBinding)===null||n===void 0?void 0:n.call(t,e):void 0;return Gr(i==null?void 0:i.getLabel())}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}}class j2 extends da{constructor(e,t){t=t||v("moreActions","More Actions..."),super(j2.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return Hgt(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}j2.ID="toolbar.toggle.more";var Kgt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},a6=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let FU=class extends $gt{constructor(e,t,n,i,r,a,o){super(e,r,Object.assign(Object.assign({getKeyBinding:l=>{var c;return(c=a.lookupKeybinding(l.id))!==null&&c!==void 0?c:void 0}},t),{allowContextMenu:!0,skipTelemetry:typeof(t==null?void 0:t.telemetrySource)=="string"})),this._options=t,this._menuService=n,this._contextKeyService=i,this._contextMenuService=r,this._sessionDisposables=this._store.add(new fe);const s=t==null?void 0:t.telemetrySource;s&&this._store.add(this.actionBar.onDidRun(l=>o.publicLog2("workbenchActionExecuted",{id:l.action.id,from:s})))}setActions(e,t=[],n){var i,r,a;this._sessionDisposables.clear();const o=e.slice(),s=t.slice(),l=[];let c=0;const d=[];let h=!1;if(((i=this._options)===null||i===void 0?void 0:i.hiddenItemStrategy)!==-1)for(let E=0;E=this._options.maxNumberOfItems&&(o[g]=void 0,d[g]=m)}}Yie(o),Yie(d),super.setActions(o,pr.join(d,s)),l.length>0&&this._sessionDisposables.add(ce(this.getElement(),"contextmenu",E=>{var g,m,f,p,D;const x=new Bs(E),b=this.getItemAction(x.target);if(!b)return;x.preventDefault(),x.stopPropagation();let k=!1;if(c===1&&((g=this._options)===null||g===void 0?void 0:g.hiddenItemStrategy)===0){k=!0;for(let S=0;Sthis._menuService.resetHiddenStates(n)}))),this._contextMenuService.showContextMenu({getAnchor:()=>x,getActions:()=>y,menuId:(f=this._options)===null||f===void 0?void 0:f.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(p=this._options)===null||p===void 0?void 0:p.menuOptions),skipTelemetry:typeof((D=this._options)===null||D===void 0?void 0:D.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};FU=Kgt([a6(2,L1),a6(3,Et),a6(4,Qs),a6(5,on),a6(6,Ys)],FU);var mee=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},vc=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let AU=class extends ie{constructor(e,t,n){super(),this.editor=e,this.model=t,this.instantiationService=n,this.alwaysShowToolbar=to(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(61).showToolbar==="always"),this.sessionPosition=void 0,this.position=gu("position",i=>{var r,a,o;const s=(r=this.model.read(i))===null||r===void 0?void 0:r.ghostText.read(i);if(!this.alwaysShowToolbar.read(i)||!s||s.parts.length===0)return this.sessionPosition=void 0,null;const l=s.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==s.lineNumber&&(this.sessionPosition=void 0);const c=new ue(s.lineNumber,Math.min(l,(o=(a=this.sessionPosition)===null||a===void 0?void 0:a.column)!==null&&o!==void 0?o:Number.MAX_SAFE_INTEGER));return this.sessionPosition=c,c}),this._register(il("setup content widget",(i,r)=>{const a=this.model.read(i);if(!a||!this.alwaysShowToolbar.read(i))return;const o=r.add(this.instantiationService.createInstance(Hg,this.editor,!0,this.position,a.selectedInlineCompletionIndex,a.inlineCompletionsCount,a.selectedInlineCompletion.map(s=>{var l;return(l=s==null?void 0:s.inlineCompletion.source.inlineCompletions.commands)!==null&&l!==void 0?l:[]})));e.addContentWidget(o),r.add(bt(()=>e.removeContentWidget(o))),r.add(nn("request explicit",s=>{this.position.read(s)&&a.lastTriggerKind.read(s)!==Ih.Explicit&&a.triggerExplicitly()}))}))}};AU=mee([vc(2,mt)],AU);const Wgt=Cn("inline-suggestion-hints-next",Ae.chevronRight,v("parameterHintsNextIcon","Icon for show next parameter hint.")),Ggt=Cn("inline-suggestion-hints-previous",Ae.chevronLeft,v("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let Hg=class _U extends ie{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,n){const i=new da(e,t,n,!0,()=>this._commandService.executeCommand(e)),r=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let a=t;return r&&(a=v({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,r.getLabel())),i.tooltip=a,i}constructor(e,t,n,i,r,a,o,s,l,c,d){super(),this.editor=e,this.withBorder=t,this._position=n,this._currentSuggestionIdx=i,this._suggestionCount=r,this._extraCommands=a,this._commandService=o,this.keybindingService=l,this._contextKeyService=c,this._menuService=d,this.id=`InlineSuggestionHintsContentWidget${_U.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=ka("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[ka("div",{style:{display:"flex"}},[ka("div@actionBar",{className:"custom-actions"}),ka("div@toolBar")])]),this.previousAction=this.createCommandAction(fye,v("previous","Previous"),et.asClassName(Ggt)),this.availableSuggestionCountAction=new da("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(pye,v("next","Next"),et.asClassName(Wgt)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(G.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new Hu(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new Hu(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[];const h=this._register(new $s(this.nodes.actionBar));h.push(this.previousAction,{icon:!0,label:!1}),h.push(this.availableSuggestionCountAction),h.push(this.nextAction,{icon:!0,label:!1}),this.toolBar=this._register(s.createInstance(SU,this.nodes.toolBar,G.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:E=>E.startsWith("primary")},actionViewItemProvider:(E,g)=>E instanceof Sl?s.createInstance(Ugt,E,void 0):void 0,telemetrySource:"InlineSuggestionToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility(E=>{_U._dropDownVisible=E})),this._register(nn("update position",E=>{this._position.read(E),this.editor.layoutContentWidget(this)})),this._register(nn("counts",E=>{const g=this._suggestionCount.read(E),m=this._currentSuggestionIdx.read(E);g!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${m+1}/${g}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),g!==void 0&&g>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(nn("extra commands",E=>{const g=this._extraCommands.read(E);if(Ur(this.lastCommands,g))return;this.lastCommands=g;const m=g.map(f=>({class:void 0,id:f.id,enabled:!0,tooltip:f.tooltip||"",label:f.title,run:p=>this._commandService.executeCommand(f.id)}));for(const[f,p]of this.inlineCompletionsActionsMenus.getActions())for(const D of p)D instanceof Sl&&m.push(D);m.length>0&&m.unshift(new pr),this.toolBar.setAdditionalSecondaryActions(m)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};Hg._dropDownVisible=!1;Hg.id=0;Hg=mee([vc(6,ei),vc(7,mt),vc(8,on),vc(9,Et),vc(10,L1)],Hg);let Ugt=class extends y3{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=ka("div.keybinding").root;new eA(t,Ss,Object.assign({disableTitle:!0},Xlt)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}},SU=class extends FU{constructor(e,t,n,i,r,a,o,s){super(e,Object.assign({resetMenu:t},n),i,r,a,o,s),this.menuId=t,this.options2=n,this.menuService=i,this.contextKeyService=r,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,t,n,i,r,a,o;const s=[],l=[];ybe(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:s,secondary:l},(n=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||n===void 0?void 0:n.primaryGroup,(r=(i=this.options2)===null||i===void 0?void 0:i.toolbarOptions)===null||r===void 0?void 0:r.shouldInlineSubmenu,(o=(a=this.options2)===null||a===void 0?void 0:a.toolbarOptions)===null||o===void 0?void 0:o.useSeparatorsInPrimaryActions),l.push(...this.additionalActions),this.setActions(s,l)}setAdditionalSecondaryActions(e){Ur(this.additionalActions,e,(t,n)=>t===n)||(this.additionalActions=e,this.updateToolbar())}};SU=mee([vc(3,L1),vc(4,Et),vc(5,Qs),vc(6,on),vc(7,Ys)],SU);var qgt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},g7=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const Jgt=!1;let No=class Dye{static get(e){return e.getContribution(Dye.ID)}constructor(e,t,n,i,r){this._editor=e,this._instantiationService=t,this._openerService=n,this._languageService=i,this._keybindingService=r,this._toUnhook=new fe,this._hoverActivatedByColorDecoratorClick=!1,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(a=>{a.hasChanged(59)&&(this._unhookEvents(),this._hookEvents())})}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(59);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(n=>this._onEditorMouseDown(n))),this._toUnhook.add(this._editor.onMouseUp(n=>this._onEditorMouseUp(n))),this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))):(this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))),this._toUnhook.add(this._editor.onMouseLeave(n=>this._onEditorMouseLeave(n))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(n=>this._onEditorScrollChanged(n)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){var t;this._isMouseDown=!0;const n=e.target;if(n.type===9&&n.detail===XE.ID){this._hoverClicked=!0;return}n.type===12&&n.detail===a5.ID||(n.type!==12&&(this._hoverClicked=!1),!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t,n;const i=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||!((n=this._contentWidget)===null||n===void 0)&&n.containsNode(i)||this._hideWidgets()}_onEditorMouseMove(e){var t,n,i,r,a,o,s,l,c,d,h;const E=e.target;if(!((t=this._contentWidget)===null||t===void 0)&&t.isFocused||!((n=this._contentWidget)===null||n===void 0)&&n.isResizing||this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&E.type===9&&E.detail===XE.ID||this._isHoverSticky&&(!((i=this._contentWidget)===null||i===void 0)&&i.containsNode((r=e.event.browserEvent.view)===null||r===void 0?void 0:r.document.activeElement))&&!(!((o=(a=e.event.browserEvent.view)===null||a===void 0?void 0:a.getSelection())===null||o===void 0)&&o.isCollapsed)||!this._isHoverSticky&&E.type===9&&E.detail===XE.ID&&(!((s=this._contentWidget)===null||s===void 0)&&s.isColorPickerVisible)||this._isHoverSticky&&E.type===12&&E.detail===a5.ID||this._isHoverSticky&&(!((l=this._contentWidget)===null||l===void 0)&&l.isVisibleFromKeyboard))return;const g=(c=E.element)===null||c===void 0?void 0:c.classList.contains("colorpicker-color-decoration"),m=this._editor.getOption(145);if(g&&(m==="click"&&!this._hoverActivatedByColorDecoratorClick||m==="hover"&&!this._isHoverEnabled&&!Jgt||m==="clickAndHover"&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)||!g&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(d=this._glyphWidget)===null||d===void 0||d.hide();return}if(E.type===2&&E.position){(h=this._contentWidget)===null||h===void 0||h.hide(),this._glyphWidget||(this._glyphWidget=new a5(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(E.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;const n=this._keybindingService.softDispatch(e,this._editor.getDomNode()),i=n.kind===1||n.kind===2&&n.commandId==="editor.action.showHover"&&((t=this._contentWidget)===null||t===void 0?void 0:t.isVisible);e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&!i&&this._hideWidgets()}_hideWidgets(){var e,t,n;this._isMouseDown&&this._hoverClicked&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible)||Hg.dropDownVisible||(this._hoverActivatedByColorDecoratorClick=!1,this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(n=this._contentWidget)===null||n===void 0||n.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(sw,this._editor)),this._contentWidget}showContentHover(e,t,n,i,r=!1){this._hoverActivatedByColorDecoratorClick=r,this._getOrCreateContentWidget().startShowingAtRange(e,t,n,i)}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,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};No.ID="editor.contrib.hover";No=qgt([g7(1,mt),g7(2,gs),g7(3,Dn),g7(4,on)],No);class Zgt extends je{constructor(){super({id:"editor.action.showHover",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.","If the hover is already visible, it will take focus."]},"Show or Focus Hover"),description:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if when triggered with the keyboard, the hover should take focus immediately.",type:"boolean",default:!1}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:K.editorTextFocus,primary:Ri(2089,2087),weight:100}})}run(e,t,n){var i;const r=e.get(nu),a=e.get(B1),o=e.get(on);if(!t.hasModel())return;const s=No.get(t);if(!s)return;const l=t.getPosition(),c=new O(l.lineNumber,l.column,l.lineNumber,l.column),d=t.getOption(2)===2||!!(n!=null&&n.focus);if(s.isHoverVisible?s.focus():s.showContentHover(c,1,1,d),r.getValue("accessibility.verbosity.hover")&&a.isScreenReaderOptimized()){const h=(i=o.lookupKeybinding("editor.action.accessibleView"))===null||i===void 0?void 0:i.getAriaLabel(),E=h?v("chatAccessibleViewHint","Inspect this in the accessible view with {0}",h):v("chatAccessibleViewHintNoKb","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding");M5(E)}}}class Ygt extends je{constructor(){super({id:"editor.action.showDefinitionPreviewHover",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})}run(e,t){const n=No.get(t);if(!n)return;const i=t.getPosition();if(!i)return;const r=new O(i.lineNumber,i.column,i.lineNumber,i.column),a=T3.get(t);if(!a)return;a.startFindDefinitionFromCursor(i).then(()=>{n.showContentHover(r,1,1,!0)})}}class Qgt extends je{constructor(){super({id:"editor.action.scrollUpHover",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:K.hoverFocused,kbOpts:{kbExpr:K.hoverFocused,primary:16,weight:100}})}run(e,t){const n=No.get(t);n&&n.scrollUp()}}class Xgt extends je{constructor(){super({id:"editor.action.scrollDownHover",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:K.hoverFocused,kbOpts:{kbExpr:K.hoverFocused,primary:18,weight:100}})}run(e,t){const n=No.get(t);n&&n.scrollDown()}}class emt extends je{constructor(){super({id:"editor.action.scrollLeftHover",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:K.hoverFocused,kbOpts:{kbExpr:K.hoverFocused,primary:15,weight:100}})}run(e,t){const n=No.get(t);n&&n.scrollLeft()}}class tmt extends je{constructor(){super({id:"editor.action.scrollRightHover",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:K.hoverFocused,kbOpts:{kbExpr:K.hoverFocused,primary:17,weight:100}})}run(e,t){const n=No.get(t);n&&n.scrollRight()}}class umt extends je{constructor(){super({id:"editor.action.pageUpHover",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:K.hoverFocused,kbOpts:{kbExpr:K.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){const n=No.get(t);n&&n.pageUp()}}class nmt extends je{constructor(){super({id:"editor.action.pageDownHover",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:K.hoverFocused,kbOpts:{kbExpr:K.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){const n=No.get(t);n&&n.pageDown()}}class imt extends je{constructor(){super({id:"editor.action.goToTopHover",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:K.hoverFocused,kbOpts:{kbExpr:K.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){const n=No.get(t);n&&n.goToTop()}}class rmt extends je{constructor(){super({id:"editor.action.goToBottomHover",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:K.hoverFocused,kbOpts:{kbExpr:K.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){const n=No.get(t);n&&n.goToBottom()}}Eu(No.ID,No,2);be(Zgt);be(Ygt);be(Qgt);be(Xgt);be(emt);be(tmt);be(umt);be(nmt);be(imt);be(rmt);Pp.register(dw);Pp.register(yU);jl((u,e)=>{const t=u.getColor(GXe);t&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${t.transparent(.5)}; }`))});class BU extends ie{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(145);if(t!=="click"&&t!=="clickAndHover")return;const n=e.target;if(n.type!==6||!n.detail.injectedText||n.detail.injectedText.options.attachedData!==M2e||!n.range)return;const i=this._editor.getContribution(No.ID);if(i&&!i.isColorPickerVisible){const r=new O(n.range.startLineNumber,n.range.startColumn+1,n.range.endLineNumber,n.range.endColumn+1);i.showContentHover(r,1,0,!1,!0)}}}BU.ID="editor.contrib.colorContribution";Eu(BU.ID,BU,2);Pp.register(rw);var xye=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},hc=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},ule=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let $g=class vye extends ie{constructor(e,t,n,i,r,a,o){super(),this._editor=e,this._modelService=n,this._keybindingService=i,this._instantiationService=r,this._languageFeatureService=a,this._languageConfigurationService=o,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=K.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=K.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)===null||e===void 0||e.focus():this._standaloneColorPickerWidget=new Ew(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(vye.ID)}};$g.ID="editor.contrib.standaloneColorPickerController";$g=xye([hc(1,Et),hc(2,Bn),hc(3,on),hc(4,mt),hc(5,$e),hc(6,an)],$g);Eu($g.ID,$g,1);const nle=8,amt=22;let Ew=class Cye extends ie{constructor(e,t,n,i,r,a,o,s){var l;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=n,this._modelService=r,this._keybindingService=a,this._languageFeaturesService=o,this._languageConfigurationService=s,this.allowEditorOverflow=!0,this.body=document.createElement("div"),this._position=void 0,this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new ee),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=i.createInstance(N2,this._editor),this._position=(l=this._editor._getViewModel())===null||l===void 0?void 0:l.getPrimaryCursorState().modelState.position;const c=this._editor.getSelection(),d=c?{startLineNumber:c.startLineNumber,startColumn:c.startColumn,endLineNumber:c.endLineNumber,endColumn:c.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},h=this._register(g1(this.body));this._register(h.onDidBlur(E=>{this.hide()})),this._register(h.onDidFocus(E=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(E=>{var g;const m=(g=E.target.element)===null||g===void 0?void 0:g.classList;m&&m.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(E=>{this._render(E.value,E.foundInEditor)})),this._start(d),this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return Cye.ID}getDomNode(){return this.body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(59).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()}_start(e){return ule(this,void 0,void 0,function*(){const t=yield this._computeAsync(e);t&&this._onResult.fire(new omt(t.result,t.foundInEditor))})}_computeAsync(e){return ule(this,void 0,void 0,function*(){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},n=yield this._standaloneColorPickerParticipant.createColorHover(t,new oee(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return n?{result:n.colorHover,foundInEditor:n.foundInEditor}:null})}_render(e,t){const n=document.createDocumentFragment(),i=this._register(new lw(this._keybindingService));let r;const a={fragment:n,statusBar:i,setColorPicker:m=>r=m,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(a,[e])),r===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),r.layout();const o=r.body,s=o.saturationBox.domNode.clientWidth,l=o.domNode.clientWidth-s-amt-nle,c=r.body.enterButton;c==null||c.onClicked(()=>{this.updateEditor(),this.hide()});const d=r.header,h=d.pickedColorNode;h.style.width=s+nle+"px";const E=d.originalColorNode;E.style.width=l+"px";const g=r.header.closeButton;g==null||g.onClicked(()=>{this.hide()}),t&&(c&&(c.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};Ew.ID="editor.contrib.standaloneColorPickerWidget";Ew=xye([hc(3,mt),hc(4,Bn),hc(5,on),hc(6,$e),hc(7,an)],Ew);class omt{constructor(e,t){this.value=e,this.foundInEditor=t}}class smt extends vp{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:v("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:v({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:G.CommandPalette}]})}runEditorCommand(e,t){var n;(n=$g.get(t))===null||n===void 0||n.showOrFocus()}}class lmt extends je{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:K.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var n;(n=$g.get(t))===null||n===void 0||n.hide()}}class cmt extends je{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:K.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var n;(n=$g.get(t))===null||n===void 0||n.insertColor()}}be(lmt);be(cmt);fi(smt);class SE{constructor(e,t,n){this.languageConfigurationService=n,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,n){if(n<0)return!1;const i=t.length,r=e.length;if(n+i>r)return!1;for(let a=0;a=65&&o<=90&&o+32===s)&&!(s>=65&&s<=90&&s+32===o))return!1}return!0}_createOperationsForBlockComment(e,t,n,i,r,a){const o=e.startLineNumber,s=e.startColumn,l=e.endLineNumber,c=e.endColumn,d=r.getLineContent(o),h=r.getLineContent(l);let E=d.lastIndexOf(t,s-1+t.length),g=h.indexOf(n,c-1-n.length);if(E!==-1&&g!==-1)if(o===l)d.substring(E+t.length,g).indexOf(n)>=0&&(E=-1,g=-1);else{const f=d.substring(E+t.length),p=h.substring(0,g);(f.indexOf(n)>=0||p.indexOf(n)>=0)&&(E=-1,g=-1)}let m;E!==-1&&g!==-1?(i&&E+t.length0&&h.charCodeAt(g-1)===32&&(n=" "+n,g-=1),m=SE._createRemoveBlockCommentOperations(new O(o,E+t.length+1,l,g+1),t,n)):(m=SE._createAddBlockCommentOperations(e,t,n,this._insertSpace),this._usedEndToken=m.length===1?n:null);for(const f of m)a.addTrackedEditOperation(f.range,f.text)}static _createRemoveBlockCommentOperations(e,t,n){const i=[];return O.isEmpty(e)?i.push(An.delete(new O(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(i.push(An.delete(new O(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),i.push(An.delete(new O(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),i}static _createAddBlockCommentOperations(e,t,n,i){const r=[];return O.isEmpty(e)?r.push(An.replace(new O(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(r.push(An.insert(new ue(e.startLineNumber,e.startColumn),t+(i?" ":""))),r.push(An.insert(new ue(e.endLineNumber,e.endColumn),(i?" ":"")+n))),r}getEditOperations(e,t){const n=this._selection.startLineNumber,i=this._selection.startColumn;e.tokenization.tokenizeIfCheap(n);const r=e.getLanguageIdAtPosition(n,i),a=this.languageConfigurationService.getLanguageConfiguration(r).comments;!a||!a.blockCommentStartToken||!a.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,a.blockCommentStartToken,a.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const n=t.getInverseEditOperations();if(n.length===2){const i=n[0],r=n[1];return new Ze(i.range.endLineNumber,i.range.endColumn,r.range.startLineNumber,r.range.startColumn)}else{const i=n[0].range,r=this._usedEndToken?-this._usedEndToken.length-1:0;return new Ze(i.endLineNumber,i.endColumn+r,i.endLineNumber,i.endColumn+r)}}}class oh{constructor(e,t,n,i,r,a,o){this.languageConfigurationService=e,this._selection=t,this._tabSize=n,this._type=i,this._insertSpace=r,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=a,this._ignoreFirstLine=o||!1}static _gatherPreflightCommentStrings(e,t,n,i){e.tokenization.tokenizeIfCheap(t);const r=e.getLanguageIdAtPosition(t,1),a=i.getLanguageConfiguration(r).comments,o=a?a.lineCommentToken:null;if(!o)return null;const s=[];for(let l=0,c=n-t+1;l{if(e&&typeof e=="object"||typeof e=="function")for(let i of m4t(e))!f4t.call(u,i)&&i!==t&&E4t(u,i,{get:()=>e[i],enumerable:!(n=g4t(e,i))||n.enumerable});return u},p4t=(u,e,t)=>(B0e(u,e,"default"),t&&B0e(t,e,"default")),D4t="5.0.2",uv={};p4t(uv,iA);var Qke=(u=>(u[u.None=0]="None",u[u.CommonJS=1]="CommonJS",u[u.AMD=2]="AMD",u[u.UMD=3]="UMD",u[u.System=4]="System",u[u.ES2015=5]="ES2015",u[u.ESNext=99]="ESNext",u))(Qke||{}),Xke=(u=>(u[u.None=0]="None",u[u.Preserve=1]="Preserve",u[u.React=2]="React",u[u.ReactNative=3]="ReactNative",u[u.ReactJSX=4]="ReactJSX",u[u.ReactJSXDev=5]="ReactJSXDev",u))(Xke||{}),e2e=(u=>(u[u.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",u[u.LineFeed=1]="LineFeed",u))(e2e||{}),t2e=(u=>(u[u.ES3=0]="ES3",u[u.ES5=1]="ES5",u[u.ES2015=2]="ES2015",u[u.ES2016=3]="ES2016",u[u.ES2017=4]="ES2017",u[u.ES2018=5]="ES2018",u[u.ES2019=6]="ES2019",u[u.ES2020=7]="ES2020",u[u.ESNext=99]="ESNext",u[u.JSON=100]="JSON",u[u.Latest=99]="Latest",u))(t2e||{}),u2e=(u=>(u[u.Classic=1]="Classic",u[u.NodeJs=2]="NodeJs",u))(u2e||{}),n2e=class{constructor(u,e,t,n,i){Fn(this,"_onDidChange",new uv.Emitter);Fn(this,"_onDidExtraLibsChange",new uv.Emitter);Fn(this,"_extraLibs");Fn(this,"_removedExtraLibs");Fn(this,"_eagerModelSync");Fn(this,"_compilerOptions");Fn(this,"_diagnosticsOptions");Fn(this,"_workerOptions");Fn(this,"_onDidExtraLibsChangeTimeout");Fn(this,"_inlayHintsOptions");Fn(this,"_modeConfiguration");this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(u),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(n),this.setModeConfiguration(i),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(u,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===u)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(n=this._extraLibs[t].version+1),this._extraLibs[t]={content:u,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let i=this._extraLibs[t];i&&i.version===n&&(delete this._extraLibs[t],this._removedExtraLibs[t]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(u){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),u&&u.length>0)for(const e of u){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=e.content;let i=1;this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:n,version:i}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(u){this._compilerOptions=u||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(u){this._diagnosticsOptions=u||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(u){this._workerOptions=u||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(u){this._inlayHintsOptions=u||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(u){}setEagerModelSync(u){this._eagerModelSync=u}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(u){this._modeConfiguration=u||Object.create(null),this._onDidChange.fire(void 0)}},x4t=D4t,i2e={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},r2e=new n2e({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},i2e),a2e=new n2e({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},i2e),v4t=()=>xN().then(u=>u.getTypeScriptWorker()),C4t=()=>xN().then(u=>u.getJavaScriptWorker());uv.languages.typescript={ModuleKind:Qke,JsxEmit:Xke,NewLineKind:e2e,ScriptTarget:t2e,ModuleResolutionKind:u2e,typescriptVersion:x4t,typescriptDefaults:r2e,javascriptDefaults:a2e,getTypeScriptWorker:v4t,getJavaScriptWorker:C4t};function xN(){return Le(()=>import("./tsMode-08480a58.js"),[],import.meta.url)}uv.languages.onLanguage("typescript",()=>xN().then(u=>u.setupTypeScript(r2e)));uv.languages.onLanguage("javascript",()=>xN().then(u=>u.setupJavaScript(a2e)));var b4t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},k4t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},vN=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const CN=new Ne("selectionAnchorSet",!1);let t4=class o2e{static get(e){return e.getContribution(o2e.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=CN.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(Ze.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new _r().appendText(v("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),Aa(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 t=this.editor.getPosition();this.editor.setSelection(Ze.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};t4.ID="editor.contrib.selectionAnchorController";t4=b4t([k4t(1,Et)],t4);class y4t extends je{constructor(){super({id:"editor.action.setSelectionAnchor",label:v("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:K.editorTextFocus,primary:Ri(2089,2080),weight:100}})}run(e,t){var n;return vN(this,void 0,void 0,function*(){(n=t4.get(t))===null||n===void 0||n.setSelectionAnchor()})}}class F4t extends je{constructor(){super({id:"editor.action.goToSelectionAnchor",label:v("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:CN})}run(e,t){var n;return vN(this,void 0,void 0,function*(){(n=t4.get(t))===null||n===void 0||n.goToSelectionAnchor()})}}class A4t extends je{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:v("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:CN,kbOpts:{kbExpr:K.editorTextFocus,primary:Ri(2089,2089),weight:100}})}run(e,t){var n;return vN(this,void 0,void 0,function*(){(n=t4.get(t))===null||n===void 0||n.selectFromAnchorToCursor()})}}class _4t extends je{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:v("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:CN,kbOpts:{kbExpr:K.editorTextFocus,primary:9,weight:100}})}run(e,t){var n;return vN(this,void 0,void 0,function*(){(n=t4.get(t))===null||n===void 0||n.cancelSelectionAnchor()})}}Eu(t4.ID,t4,4);be(y4t);be(F4t);be(A4t);be(_4t);const S4t=U("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},v("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class B4t extends je{constructor(){super({id:"editor.action.jumpToBracket",label:v("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:K.editorTextFocus,primary:3165,weight:100}})}run(e,t){var n;(n=xl.get(t))===null||n===void 0||n.jumpToBracket()}}class w4t extends je{constructor(){super({id:"editor.action.selectToBracket",label:v("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,n){var i;let r=!0;n&&n.selectBrackets===!1&&(r=!1),(i=xl.get(t))===null||i===void 0||i.selectToBracket(r)}}class z4t extends je{constructor(){super({id:"editor.action.removeBrackets",label:v("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:K.editorTextFocus,primary:2561,weight:100}})}run(e,t){var n;(n=xl.get(t))===null||n===void 0||n.removeBrackets(this.id)}}class L4t{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}}class xl extends ie{static get(e){return e.getContribution(xl.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Hu(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(70),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(70)&&(this._matchBrackets=this._editor.getOption(70),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(),t=this._editor.getSelections().map(n=>{const i=n.getStartPosition(),r=e.bracketPairs.matchBracket(i);let a=null;if(r)r[0].containsPosition(i)&&!r[1].containsPosition(i)?a=r[1].getStartPosition():r[1].containsPosition(i)&&(a=r[0].getStartPosition());else{const o=e.bracketPairs.findEnclosingBrackets(i);if(o)a=o[1].getStartPosition();else{const s=e.bracketPairs.findNextBracket(i);s&&s.range&&(a=s.range.getStartPosition())}}return a?new Ze(a.lineNumber,a.column,a.lineNumber,a.column):new Ze(i.lineNumber,i.column,i.lineNumber,i.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=[];this._editor.getSelections().forEach(i=>{const r=i.getStartPosition();let a=t.bracketPairs.matchBracket(r);if(!a&&(a=t.bracketPairs.findEnclosingBrackets(r),!a)){const l=t.bracketPairs.findNextBracket(r);l&&l.range&&(a=t.bracketPairs.matchBracket(l.range.getStartPosition()))}let o=null,s=null;if(a){a.sort(O.compareRangesUsingStarts);const[l,c]=a;if(o=e?l.getStartPosition():l.getEndPosition(),s=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(r)){const d=o;o=s,s=d}}o&&s&&n.push(new Ze(o.lineNumber,o.column,s.lineNumber,s.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(n=>{const i=n.getPosition();let r=t.bracketPairs.matchBracket(i);r||(r=t.bracketPairs.findEnclosingBrackets(i)),r&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:r[0],text:""},{range:r[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const n of this._lastBracketsData){const i=n.brackets;i&&(e[t++]={range:i[0],options:n.options},e[t++]={range:i[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 t=this._editor.getModel(),n=t.getVersionId();let i=[];this._lastVersionId===n&&(i=this._lastBracketsData);const r=[];let a=0;for(let d=0,h=e.length;d1&&r.sort(ue.compare);const o=[];let s=0,l=0;const c=i.length;for(let d=0,h=r.length;d0&&(t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop())}}be(N4t);var R4t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const B3="9_cutcopypaste",I4t=wc||document.queryCommandSupported("cut"),l2e=wc||document.queryCommandSupported("copy"),O4t=typeof navigator.clipboard>"u"||F0?document.queryCommandSupported("paste"):!0;function tee(u){return u.register(),u}const j4t=I4t?tee(new Yv({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:wc?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:G.MenubarEditMenu,group:"2_ccp",title:v({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:G.EditorContext,group:B3,title:v("actions.clipboard.cutLabel","Cut"),when:K.writable,order:1},{menuId:G.CommandPalette,group:"",title:v("actions.clipboard.cutLabel","Cut"),order:1},{menuId:G.SimpleEditorContext,group:B3,title:v("actions.clipboard.cutLabel","Cut"),when:K.writable,order:1}]})):void 0,V4t=l2e?tee(new Yv({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:wc?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:G.MenubarEditMenu,group:"2_ccp",title:v({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:G.EditorContext,group:B3,title:v("actions.clipboard.copyLabel","Copy"),order:2},{menuId:G.CommandPalette,group:"",title:v("actions.clipboard.copyLabel","Copy"),order:1},{menuId:G.SimpleEditorContext,group:B3,title:v("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;oa.appendMenuItem(G.MenubarEditMenu,{submenu:G.MenubarCopy,title:{value:v("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});oa.appendMenuItem(G.EditorContext,{submenu:G.EditorContextCopy,title:{value:v("copy as","Copy As"),original:"Copy As"},group:B3,order:3});oa.appendMenuItem(G.EditorContext,{submenu:G.EditorContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1,when:pe.and(pe.notEquals("resourceScheme","output"),K.editorTextFocus)});oa.appendMenuItem(G.EditorTitleContext,{submenu:G.EditorTitleContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1});oa.appendMenuItem(G.ExplorerContext,{submenu:G.ExplorerContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1});const Vj=O4t?tee(new Yv({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:wc?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:G.MenubarEditMenu,group:"2_ccp",title:v({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:G.EditorContext,group:B3,title:v("actions.clipboard.pasteLabel","Paste"),when:K.writable,order:4},{menuId:G.CommandPalette,group:"",title:v("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:G.SimpleEditorContext,group:B3,title:v("actions.clipboard.pasteLabel","Paste"),when:K.writable,order:4}]})):void 0;class H4t extends je{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:K.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(36)&&t.getSelection().isEmpty()||(oW.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),oW.forceCopyWithSyntaxHighlighting=!1)}}function c2e(u,e){u&&(u.addImplementation(1e4,"code-editor",(t,n)=>{const i=t.get(hu).getFocusedCodeEditor();if(i&&i.hasTextFocus()){const r=i.getOption(36),a=i.getSelection();return a&&a.isEmpty()&&!r||document.execCommand(e),!0}return!1}),u.addImplementation(0,"generic-dom",(t,n)=>(document.execCommand(e),!0)))}c2e(j4t,"cut");c2e(V4t,"copy");Vj&&(Vj.addImplementation(1e4,"code-editor",(u,e)=>{const t=u.get(hu),n=u.get(td),i=t.getFocusedCodeEditor();return i&&i.hasTextFocus()?!document.execCommand("paste")&&em?(()=>R4t(void 0,void 0,void 0,function*(){const a=yield n.readText();if(a!==""){const o=i2.INSTANCE.get(a);let s=!1,l=null,c=null;o&&(s=i.getOption(36)&&!!o.isFromEmptySelection,l=typeof o.multicursorText<"u"?o.multicursorText:null,c=o.mode),i.trigger("keyboard","paste",{text:a,pasteOnNewLine:s,multicursorText:l,mode:c})}}))():!0:!1}),Vj.addImplementation(0,"generic-dom",(u,e)=>(document.execCommand("paste"),!0)));l2e&&be(H4t);var $4t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let _t=class TS{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+TS.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new TS(this.value+TS.sep+e)}};_t.sep=".";_t.None=new _t("@@none@@");_t.Empty=new _t("");_t.QuickFix=new _t("quickfix");_t.Refactor=new _t("refactor");_t.RefactorExtract=_t.Refactor.append("extract");_t.RefactorInline=_t.Refactor.append("inline");_t.RefactorMove=_t.Refactor.append("move");_t.RefactorRewrite=_t.Refactor.append("rewrite");_t.Source=new _t("source");_t.SourceOrganizeImports=_t.Source.append("organizeImports");_t.SourceFixAll=_t.Source.append("fixAll");_t.SurroundWith=_t.Refactor.append("surround");var Ks;(function(u){u.Refactor="refactor",u.RefactorPreview="refactor preview",u.Lightbulb="lightbulb",u.Default="other (default)",u.SourceAction="source action",u.QuickFix="quick fix action",u.FixAll="fix all",u.OrganizeImports="organize imports",u.AutoFix="auto fix",u.QuickFixHover="quick fix hover window",u.OnSave="save participants",u.ProblemsView="problems view"})(Ks||(Ks={}));function K4t(u,e){return!(u.include&&!u.include.intersects(e)||u.excludes&&u.excludes.some(t=>d2e(e,t,u.include))||!u.includeSourceActions&&_t.Source.contains(e))}function W4t(u,e){const t=e.kind?new _t(e.kind):void 0;return!(u.include&&(!t||!u.include.contains(t))||u.excludes&&t&&u.excludes.some(n=>d2e(t,n,u.include))||!u.includeSourceActions&&t&&_t.Source.contains(t)||u.onlyIncludePreferredActions&&!e.isPreferred)}function d2e(u,e,t){return!(!e.contains(u)||t&&e.contains(t))}class Id{static fromUser(e,t){return!e||typeof e!="object"?new Id(t.kind,t.apply,!1):new Id(Id.getKindFromUser(e,t.kind),Id.getApplyFromUser(e,t.apply),Id.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new _t(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,n){this.kind=e,this.apply=t,this.preferred=n}}class G4t{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return $4t(this,void 0,void 0,function*(){if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let n;try{n=yield this.provider.resolveCodeAction(this.action,e)}catch(i){Ni(i)}n&&(this.action.edit=n.edit)}return this})}}var uw=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const h2e="editor.action.codeAction",uee="editor.action.quickFix",E2e="editor.action.autoFix",g2e="editor.action.refactor",m2e="editor.action.sourceAction",nee="editor.action.organizeImports",iee="editor.action.fixAll";class tk extends ie{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return ca(e.diagnostics)?ca(t.diagnostics)?tk.codeActionsPreferredComparator(e,t):-1:ca(t.diagnostics)?1:tk.codeActionsPreferredComparator(e,t)}constructor(e,t,n){super(),this.documentation=t,this._register(n),this.allActions=[...e].sort(tk.codeActionsComparator),this.validActions=this.allActions.filter(({action:i})=>!i.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&_t.QuickFix.contains(new _t(e.kind))&&!!e.isPreferred)}}const w0e={actions:[],documentation:void 0};function ree(u,e,t,n,i,r){var a;return uw(this,void 0,void 0,function*(){const o=n.filter||{},s={only:(a=o.include)===null||a===void 0?void 0:a.value,trigger:n.type},l=new JX(e,r),c=U4t(u,e,o),d=new fe,h=c.map(g=>uw(this,void 0,void 0,function*(){try{i.report(g);const m=yield g.provideCodeActions(e,t,s,l.token);if(m&&d.add(m),l.token.isCancellationRequested)return w0e;const f=((m==null?void 0:m.actions)||[]).filter(D=>D&&W4t(o,D)),p=J4t(g,f,o.include);return{actions:f.map(D=>new G4t(D,g)),documentation:p}}catch(m){if(Xc(m))throw m;return Ni(m),w0e}})),E=u.onDidChange(()=>{const g=u.all(e);Ur(g,c)||l.cancel()});try{const g=yield Promise.all(h),m=g.map(p=>p.actions).flat(),f=[...c1(g.map(p=>p.documentation)),...q4t(u,e,n,m)];return new tk(m,f,d)}finally{E.dispose(),l.dispose()}})}function U4t(u,e,t){return u.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(i=>K4t(t,new _t(i))):!0)}function*q4t(u,e,t,n){var i,r,a;if(e&&n.length)for(const o of u.all(e))o._getAdditionalMenuItems&&(yield*(i=o._getAdditionalMenuItems)===null||i===void 0?void 0:i.call(o,{trigger:t.type,only:(a=(r=t.filter)===null||r===void 0?void 0:r.include)===null||a===void 0?void 0:a.value},n.map(s=>s.action)))}function J4t(u,e,t){if(!u.documentation)return;const n=u.documentation.map(i=>({kind:new _t(i.kind),command:i.command}));if(t){let i;for(const r of n)r.kind.contains(t)&&(i?i.kind.contains(r.kind)&&(i=r):i=r);if(i)return i==null?void 0:i.command}for(const i of e)if(i.kind){for(const r of n)if(r.kind.contains(new _t(i.kind)))return r.command}}var nw;(function(u){u.OnSave="onSave",u.FromProblemsView="fromProblemsView",u.FromCodeActions="fromCodeActions"})(nw||(nw={}));function Z4t(u,e,t,n,i=Vt.None){var r;return uw(this,void 0,void 0,function*(){const a=u.get(YF),o=u.get(ei),s=u.get(Ys),l=u.get(ci);if(s.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(i),!i.isCancellationRequested&&!(!((r=e.action.edit)===null||r===void 0)&&r.edits.length&&!(yield a.apply(e.action.edit,{editor:n==null?void 0:n.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==nw.OnSave,showPreview:n==null?void 0:n.preview})).isApplied)&&e.action.command)try{yield o.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(c){const d=Y4t(c);l.error(typeof d=="string"?d:v("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function Y4t(u){return typeof u=="string"?u:u instanceof Error&&typeof u.message=="string"?u.message:void 0}Xt.registerCommand("_executeCodeActionProvider",function(u,e,t,n,i){return uw(this,void 0,void 0,function*(){if(!(e instanceof lt))throw p0();const{codeActionProvider:r}=u.get($e),a=u.get(Bn).getModel(e);if(!a)throw p0();const o=Ze.isISelection(t)?Ze.liftSelection(t):O.isIRange(t)?a.validateRange(t):void 0;if(!o)throw p0();const s=typeof n=="string"?new _t(n):void 0,l=yield ree(r,a,o,{type:1,triggerAction:Ks.Default,filter:{includeSourceActions:!0,include:s}},_p.None,Vt.None),c=[],d=Math.min(l.validActions.length,typeof i=="number"?i:0);for(let h=0;hh.action)}finally{setTimeout(()=>l.dispose(),100)}})});var Q4t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},X4t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let iw=class f2e{constructor(e){this.keybindingService=e}getResolver(){const e=new nm(()=>this.keybindingService.getKeybindings().filter(t=>f2e.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let n=t.commandArgs;return t.command===nee?n={kind:_t.SourceOrganizeImports.value}:t.command===iee&&(n={kind:_t.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},Id.fromUser(n,{kind:_t.None,apply:"never"}))}));return t=>{if(t.kind){const n=this.bestKeybindingForCodeAction(t,e.value);return n==null?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const n=new _t(e.kind);return t.filter(i=>i.kind.contains(n)).filter(i=>i.preferred?e.isPreferred:!0).reduceRight((i,r)=>i?i.kind.contains(r.kind)?r:i:r,void 0)}};iw.codeActionCommands=[g2e,h2e,m2e,nee,iee];iw=Q4t([X4t(0,on)],iw);U("symbolIcon.arrayForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.booleanForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("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."));U("symbolIcon.colorForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.constantForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("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."));U("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."));U("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."));U("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."));U("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."));U("symbolIcon.fileForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.folderForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("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."));U("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."));U("symbolIcon.keyForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.keywordForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("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."));U("symbolIcon.moduleForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.namespaceForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.nullForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.numberForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.objectForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.operatorForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.packageForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.propertyForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.referenceForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.snippetForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.stringForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.structForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.textForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.typeParameterForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("symbolIcon.unitForeground",{dark:ye,light:ye,hcDark:ye,hcLight:ye},v("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));U("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 p2e=Object.freeze({kind:_t.Empty,title:v("codeAction.widget.id.more","More Actions...")}),eEt=Object.freeze([{kind:_t.QuickFix,title:v("codeAction.widget.id.quickfix","Quick Fix...")},{kind:_t.RefactorExtract,title:v("codeAction.widget.id.extract","Extract..."),icon:Ae.wrench},{kind:_t.RefactorInline,title:v("codeAction.widget.id.inline","Inline..."),icon:Ae.wrench},{kind:_t.RefactorRewrite,title:v("codeAction.widget.id.convert","Rewrite..."),icon:Ae.wrench},{kind:_t.RefactorMove,title:v("codeAction.widget.id.move","Move..."),icon:Ae.wrench},{kind:_t.SurroundWith,title:v("codeAction.widget.id.surround","Surround With..."),icon:Ae.symbolSnippet},{kind:_t.Source,title:v("codeAction.widget.id.source","Source Action..."),icon:Ae.symbolFile},p2e]);function tEt(u,e,t){if(!e)return u.map(r=>({kind:"action",item:r,group:p2e,disabled:!!r.action.disabled,label:r.action.disabled||r.action.title}));const n=eEt.map(r=>({group:r,actions:[]}));for(const r of u){const a=r.action.kind?new _t(r.action.kind):_t.None;for(const o of n)if(o.group.kind.contains(a)){o.actions.push(r);break}}const i=[];for(const r of n)if(r.actions.length){i.push({kind:"header",group:r.group});for(const a of r.actions)i.push({kind:"action",item:a,group:r.group,label:a.action.title,disabled:!!a.action.disabled,keybinding:t(a.action)})}return i}var uEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},nEt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},gx;(function(u){u.Hidden={type:0};class e{constructor(n,i,r,a){this.actions=n,this.trigger=i,this.editorPosition=r,this.widgetPosition=a,this.type=1}}u.Showing=e})(gx||(gx={}));let w3=class D2e extends ie{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new ee),this.onClick=this._onClick.event,this._state=gx.Hidden,this._domNode=ve("div.lightBulbWidget"),this._register(Xu.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{const i=this._editor.getModel();(this.state.type!==1||!i||this.state.editorPosition.lineNumber>=i.getLineCount())&&this.hide()})),this._register(_Qe(this._domNode,n=>{if(this.state.type!==1)return;this._editor.focus(),n.preventDefault();const{top:i,height:r}=mi(this._domNode),a=this._editor.getOption(65);let o=Math.floor(a/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(n.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(63)&&!this._editor.getOption(63).enabled&&this.hide()})),this._register(Ke.runAndSubscribe(t.onDidUpdateKeybindings,()=>{var n,i;this._preferredKbLabel=Gr((n=t.lookupKeybinding(E2e))===null||n===void 0?void 0:n.getLabel()),this._quickFixKbLabel=Gr((i=t.lookupKeybinding(uee))===null||i===void 0?void 0:i.getLabel()),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,t,n){if(e.validActions.length<=0)return this.hide();const i=this._editor.getOptions();if(!i.get(63).enabled)return this.hide();const r=this._editor.getModel();if(!r)return this.hide();const{lineNumber:a,column:o}=r.validatePosition(n),s=r.getOptions().tabSize,l=i.get(49),c=r.getLineContent(a),d=RP(c,s),h=l.spaceWidth*d>22,E=m=>m>2&&this._editor.getTopForLineNumber(m)===this._editor.getTopForLineNumber(m-1);let g=a;if(!h){if(a>1&&!E(a-1))g-=1;else if(!E(a+1))g+=1;else if(o*l.spaceWidth<22)return this.hide()}this.state=new gx.Showing(e,t,n,{position:{lineNumber:g,column:1},preference:D2e._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==gx.Hidden&&(this.state=gx.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...et.asClassNameArray(Ae.lightBulb)),this._domNode.classList.add(...et.asClassNameArray(Ae.lightbulbAutofix)),this._preferredKbLabel)){this.title=v("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(...et.asClassNameArray(Ae.lightbulbAutofix)),this._domNode.classList.add(...et.asClassNameArray(Ae.lightBulb)),this._quickFixKbLabel?this.title=v("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=v("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};w3.ID="editor.contrib.lightbulbWidget";w3._posPref=[0];w3=uEt([nEt(1,on)],w3);var iEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},z0e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},x2e=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let u4=class v2e{constructor(e,t,n){this._options=e,this._languageService=t,this._openerService=n,this._onDidRenderAsync=new ee,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,n){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const i=new fe,r=i.add(UP(e,Object.assign(Object.assign({},this._getRenderOptions(e,i)),t),n));return r.element.classList.add("rendered-markdown"),{element:r.element,dispose:()=>i.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(n,i)=>x2e(this,void 0,void 0,function*(){var r,a,o;let s;n?s=this._languageService.getLanguageIdByLanguageName(n):this._options.editor&&(s=(r=this._options.editor.getModel())===null||r===void 0?void 0:r.getLanguageId()),s||(s=Ns);const l=yield brt(this._languageService,i,s),c=document.createElement("span");if(c.innerHTML=(o=(a=v2e._ttpTokenizer)===null||a===void 0?void 0:a.createHTML(l))!==null&&o!==void 0?o:l,this._options.editor){const d=this._options.editor.getOption(49);tr(c,d)}else this._options.codeBlockFontFamily&&(c.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(c.style.fontSize=this._options.codeBlockFontSize),c}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:n=>C2e(this._openerService,n,e.isTrusted),disposables:t}}}};u4._ttpTokenizer=g4("tokenizeToString",{createHTML(u){return u}});u4=iEt([z0e(1,Dn),z0e(2,gs)],u4);function C2e(u,e,t){return x2e(this,void 0,void 0,function*(){try{return yield u.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:rEt(t)})}catch(n){return wt(n),!1}})}function rEt(u){return u===!0?!0:u&&Array.isArray(u.enabledCommands)?u.enabledCommands:!1}var aEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},L0e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let is=class eU{static get(e){return e.getContribution(eU.ID)}constructor(e,t,n){this._openerService=n,this._messageWidget=new Qr,this._messageListeners=new fe,this._mouseOverMessage=!1,this._editor=e,this._visible=eU.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;(e=this._message)===null||e===void 0||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){Aa(qE(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=qE(e)?UP(e,{actionHandler:{callback:i=>C2e(this._openerService,i,qE(e)?e.isTrusted:void 0),disposables:this._messageListeners}}):void 0,this._messageWidget.value=new M0e(this._editor,t,typeof e=="string"?e:this._message.element),this._messageListeners.add(Ke.debounce(this._editor.onDidBlurEditorText,(i,r)=>r,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&zo(document.activeElement,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(ce(this._messageWidget.value.getDomNode(),Me.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(ce(this._messageWidget.value.getDomNode(),Me.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let n;this._messageListeners.add(this._editor.onMouseMove(i=>{i.target.position&&(n?n.containsPosition(i.target.position)||this.closeMessage():n=new O(t.lineNumber-3,1,i.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(M0e.fadeOut(this._messageWidget.value))}};is.ID="editor.contrib.messageController";is.MESSAGE_VISIBLE=new Ne("messageVisible",!1,v("messageVisible","Whether the editor is currently showing an inline message"));is=aEt([L0e(1,Et),L0e(2,gs)],is);const oEt=Dr.bindToContribution(is.get);Be(new oEt({id:"leaveEditorMessage",precondition:is.MESSAGE_VISIBLE,handler:u=>u.closeMessage(),kbOpts:{weight:100+30,primary:9}}));let M0e=class{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(n),e.getDomNode().removeEventListener("animationend",t)},n=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:n},i){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:n},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const r=document.createElement("div");r.classList.add("anchor","top"),this._domNode.appendChild(r);const a=document.createElement("div");typeof i=="string"?(a.classList.add("message"),a.textContent=i):(i.classList.add("message"),a.appendChild(i)),this._domNode.appendChild(a);const o=document.createElement("div");o.classList.add("anchor","below"),this._domNode.appendChild(o),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)}};Eu(is.ID,is,4);var b2e=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},tU=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const k2e="acceptSelectedCodeAction",y2e="previewSelectedCodeAction";class sEt{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,n){var i,r;n.text.textContent=(r=(i=e.group)===null||i===void 0?void 0:i.title)!==null&&r!==void 0?r:""}disposeTemplate(e){}}let uU=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const n=document.createElement("span");n.className="title",e.append(n);const i=new eA(e,Ss);return{container:e,icon:t,text:n,keybinding:i}}renderElement(e,t,n){var i,r,a;if(!((i=e.group)===null||i===void 0)&&i.icon?(n.icon.className=et.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=Te(e.group.icon.color.id))):(n.icon.className=et.asClassName(Ae.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;n.text.textContent=F2e(e.label),n.keybinding.set(e.keybinding),RQe(!!e.keybinding,n.keybinding.element);const o=(r=this._keybindingService.lookupKeybinding(k2e))===null||r===void 0?void 0:r.getLabel(),s=(a=this._keybindingService.lookupKeybinding(y2e))===null||a===void 0?void 0:a.getLabel();n.container.classList.toggle("option-disabled",e.disabled),e.disabled?n.container.title=e.label:o&&s?this._supportsPreview?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",o,s):n.container.title=v({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",o):n.container.title=""}disposeTemplate(e){}};uU=b2e([tU(1,on)],uU);class lEt extends UIEvent{constructor(){super("acceptSelectedAction")}}class T0e extends UIEvent{constructor(){super("previewSelectedAction")}}let nU=class extends ie{constructor(e,t,n,i,r,a){super(),this._delegate=i,this._contextViewService=r,this._keybindingService=a,this._actionLineHeight=24,this._headerLineHeight=26,this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const o={getHeight:s=>s.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:s=>s.kind};this._list=this._register(new Vl(e,this.domNode,o,[new uU(t,this._keybindingService),new sEt],{keyboardSupport:!1,accessibilityProvider:{getAriaLabel:s=>{if(s.kind==="action"){let l=s.label?F2e(s==null?void 0:s.label):"";return s.disabled&&(l=v({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",l,s.disabled)),l}return null},getWidgetAriaLabel:()=>v({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:s=>s.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(Sp),this._register(this._list.onMouseClick(s=>this.onListClick(s))),this._register(this._list.onMouseOver(s=>this.onListHover(s))),this._register(this._list.onDidChangeFocus(()=>this._list.domFocus())),this._register(this._list.onDidChangeSelection(s=>this.onListSelection(s))),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._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter(l=>l.kind==="header").length,i=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(i);const r=this._allMenuItems.map((l,c)=>{const d=document.getElementById(this._list.getElementID(c));if(d){d.style.width="auto";const h=d.getBoundingClientRect().width;return d.style.width="",h}return 0}),a=Math.max(...r,e),o=.7,s=Math.min(i,document.body.clientHeight*o);return this._list.layout(s,a),this.domNode.style.height=`${s}px`,this._list.domFocus(),a}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(t.length===0)return;const n=t[0],i=this._list.element(n);if(!this.focusCondition(i))return;const r=e?new T0e:new lEt;this._list.setSelection([n],r)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof T0e):this._list.setSelection([])}onListHover(e){this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};nU=b2e([tU(4,f4),tU(5,on)],nU);function F2e(u){return u.replace(/\r\n|\r|\n/g," ")}var cEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Hj=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const z3={Visible:new Ne("codeActionMenuVisible",!1,v("codeActionMenuVisible","Whether the action widget list is visible"))},zp=Gt("actionWidgetService");let L3=class extends ie{get isVisible(){return z3.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,n){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=n,this._list=this._register(new Qr)}show(e,t,n,i,r,a,o){const s=z3.Visible.bindTo(this._contextKeyService),l=this._instantiationService.createInstance(nU,e,t,n,i);this._contextViewService.showContextView({getAnchor:()=>r,render:c=>(s.set(!0),this._renderWidget(c,l,o??[])),onHide:c=>{s.reset(),this._onWidgetClosed(c)}},a,!1)}acceptSelected(e){var t;(t=this._list.value)===null||t===void 0||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||e.hide(),this._list.clear()}_renderWidget(e,t,n){var i;const r=document.createElement("div");if(r.classList.add("action-widget"),e.appendChild(r),this._list.value=t,this._list.value)r.appendChild(this._list.value.domNode);else throw new Error("List has no value");const a=new fe,o=document.createElement("div"),s=e.appendChild(o);s.classList.add("context-view-block"),a.add(ce(s,Me.MOUSE_DOWN,g=>g.stopPropagation()));const l=document.createElement("div"),c=e.appendChild(l);c.classList.add("context-view-pointerBlock"),a.add(ce(c,Me.POINTER_MOVE,()=>c.remove())),a.add(ce(c,Me.MOUSE_DOWN,()=>c.remove()));let d=0;if(n.length){const g=this._createActionBar(".action-widget-action-bar",n);g&&(r.appendChild(g.getContainer().parentElement),a.add(g),d=g.getContainer().offsetWidth)}const h=(i=this._list.value)===null||i===void 0?void 0:i.layout(d);r.style.width=`${h}px`;const E=a.add(g1(e));return a.add(E.onDidBlur(()=>this.hide())),a}_createActionBar(e,t){if(!t.length)return;const n=ve(e),i=new $s(n);return i.push(t,{icon:!1,label:!0}),i}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};L3=cEt([Hj(0,f4),Hj(1,Et),Hj(2,mt)],L3);iu(zp,L3,1);const aA=100+1e3;fi(class extends ed{constructor(){super({id:"hideCodeActionWidget",title:{value:v("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:z3.Visible,keybinding:{weight:aA,primary:9,secondary:[1033]}})}run(u){u.get(zp).hide()}});fi(class extends ed{constructor(){super({id:"selectPrevCodeAction",title:{value:v("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:z3.Visible,keybinding:{weight:aA,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(u){const e=u.get(zp);e instanceof L3&&e.focusPrevious()}});fi(class extends ed{constructor(){super({id:"selectNextCodeAction",title:{value:v("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:z3.Visible,keybinding:{weight:aA,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(u){const e=u.get(zp);e instanceof L3&&e.focusNext()}});fi(class extends ed{constructor(){super({id:k2e,title:{value:v("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:z3.Visible,keybinding:{weight:aA,primary:3,secondary:[2137]}})}run(u){const e=u.get(zp);e instanceof L3&&e.acceptSelected()}});fi(class extends ed{constructor(){super({id:y2e,title:{value:v("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:z3.Visible,keybinding:{weight:aA,primary:2051}})}run(u){const e=u.get(zp);e instanceof L3&&e.acceptSelected(!0)}});const A2e=new Ne("supportedCodeAction","");class dEt extends ie{constructor(e,t,n,i=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=i,this._autoTriggerTimer=this._register(new Il),this._register(this._markerService.onMarkerChanged(r=>this._onMarkerChanges(r))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some(n=>OP(n,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:Ks.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&e.type===2){const{lineNumber:i,column:r}=n.getPosition(),a=t.getLineContent(i);if(a.length===0)return;if(r===1){if(/\s/.test(a[0]))return}else if(r===t.getLineMaxColumn(i)){if(/\s/.test(a[a.length-1]))return}else if(/\s/.test(a[r-2])&&/\s/.test(a[r-1]))return}return n}}var mf;(function(u){u.Empty={type:0};class e{constructor(n,i,r){this.trigger=n,this.position=i,this._cancellablePromise=r,this.type=1,this.actions=r.catch(a=>{if(Xc(a))return hEt;throw a})}cancel(){this._cancellablePromise.cancel()}}u.Triggered=e})(mf||(mf={}));const hEt=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1});class EEt extends ie{constructor(e,t,n,i,r){super(),this._editor=e,this._registry=t,this._markerService=n,this._progressService=r,this._codeActionOracle=this._register(new Qr),this._state=mf.Empty,this._onDidChangeState=this._register(new ee),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=A2e.bindTo(i),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(mf.Empty,!0))}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(mf.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(89)){const t=this._registry.all(e).flatMap(n=>{var i;return(i=n.providedCodeActionKinds)!==null&&i!==void 0?i:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new dEt(this._editor,this._markerService,n=>{var i;if(!n){this.setState(mf.Empty);return}const r=$i(a=>ree(this._registry,e,n.selection,n.trigger,_p.None,a));n.trigger.type===1&&((i=this._progressService)===null||i===void 0||i.showWhile(r,250)),this.setState(new mf.Triggered(n.trigger,n.selection.getStartPosition(),r))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:Ks.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!this._disposed&&this._onDidChangeState.fire(e))}}var gEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},J1=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},l7=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let M3=class _2e extends ie{static get(e){return e.getContribution(_2e.ID)}constructor(e,t,n,i,r,a,o,s,l,c){super(),this._commandService=o,this._configurationService=s,this._actionWidgetService=l,this._instantiationService=c,this._activeCodeActions=this._register(new Qr),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new EEt(this._editor,r.codeActionProvider,t,n,a)),this._register(this._model.onDidChangeState(d=>this.update(d))),this._lightBulbWidget=new nm(()=>{const d=this._editor.getContribution(w3.ID);return d&&this._register(d.onClick(h=>this.showCodeActionList(h.actions,h,{includeDisabledActions:!1,fromLightbulb:!0}))),d}),this._resolver=i.createInstance(iw),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}showCodeActions(e,t,n){return this.showCodeActionList(t,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,n,i){var r;if(!this._editor.hasModel())return;(r=is.get(this._editor))===null||r===void 0||r.closeMessage();const a=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:n,autoApply:i,context:{notAvailableMessage:e,position:a}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,n){return l7(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction(Z4t,e,nw.FromCodeActions,{preview:n,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:Ks.QuickFix,filter:{}})}})}update(e){var t,n,i,r,a,o,s;return l7(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let l;try{l=yield e.actions}catch(c){wt(c);return}if(!this._disposed)if((n=this._lightBulbWidget.value)===null||n===void 0||n.update(l,e.trigger,e.position),e.trigger.type===1){if(!((i=e.trigger.filter)===null||i===void 0)&&i.include){const d=this.tryGetValidActionToApply(e.trigger,l);if(d){try{(r=this._lightBulbWidget.value)===null||r===void 0||r.hide(),yield this._applyCodeAction(d,!1,!1)}finally{l.dispose()}return}if(e.trigger.context){const h=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,l);if(h&&h.action.disabled){(a=is.get(this._editor))===null||a===void 0||a.showMessage(h.action.disabled,e.trigger.context.position),l.dispose();return}}}const c=!!(!((o=e.trigger.filter)===null||o===void 0)&&o.include);if(e.trigger.context&&(!l.allActions.length||!c&&!l.validActions.length)){(s=is.get(this._editor))===null||s===void 0||s.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=l,l.dispose();return}this._activeCodeActions.value=l,this.showCodeActionList(l,this.toCoords(e.position),{includeDisabledActions:c,fromLightbulb:!1})}else this._actionWidgetService.isVisible?l.dispose():this._activeCodeActions.value=l})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:n})=>n.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,n){return l7(this,void 0,void 0,function*(){const i=this._editor.getDomNode();if(!i)return;const r=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!r.length)return;const a=ue.isIPosition(t)?this.toCoords(t):t,o={onSelect:(s,l)=>l7(this,void 0,void 0,function*(){this._applyCodeAction(s,!0,!!l),this._actionWidgetService.hide()}),onHide:()=>{var s;(s=this._editor)===null||s===void 0||s.focus()}};this._actionWidgetService.show("codeActionWidget",!0,tEt(r,this._shouldShowHeaders(),this._resolver.getResolver()),o,a,i,this._getActionBarActions(e,t,n))})}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),n=mi(this._editor.getDomNode()),i=n.left+t.left,r=n.top+t.top+t.height;return{x:i,y:r}}_shouldShowHeaders(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:t==null?void 0:t.uri})}_getActionBarActions(e,t,n){if(n.fromLightbulb)return[];const i=e.documentation.map(r=>{var a;return{id:r.id,label:r.title,tooltip:(a=r.tooltip)!==null&&a!==void 0?a:"",class:void 0,enabled:!0,run:()=>{var o;return this._commandService.executeCommand(r.id,...(o=r.arguments)!==null&&o!==void 0?o:[])}}});return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&i.push(this._showDisabled?{id:"hideMoreActions",label:v("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,n))}:{id:"showMoreActions",label:v("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,n))}),i}};M3.ID="editor.contrib.codeActionController";M3=gEt([J1(1,T1),J1(2,Et),J1(3,mt),J1(4,$e),J1(5,p4),J1(6,ei),J1(7,nu),J1(8,zp),J1(9,mt)],M3);function oA(u){return pe.regex(A2e.keys()[0],new RegExp("(\\s|^)"+Vs(u.value)+"\\b"))}const aee={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 Lp(u,e,t,n,i=Ks.Default){if(u.hasModel()){const r=M3.get(u);r==null||r.manualTriggerAtCurrentPosition(e,i,t,n)}}class mEt extends je{constructor(){super({id:uee,label:v("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:pe.and(K.writable,K.hasCodeActionsProvider),kbOpts:{kbExpr:K.textInputFocus,primary:2137,weight:100}})}run(e,t){return Lp(t,v("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,Ks.QuickFix)}}class fEt extends Dr{constructor(){super({id:h2e,precondition:pe.and(K.writable,K.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:aee}]}})}runEditorCommand(e,t,n){const i=Id.fromUser(n,{kind:_t.Empty,apply:"ifSingle"});return Lp(t,typeof(n==null?void 0:n.kind)=="string"?i.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):i.preferred?v("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):v("editor.action.codeAction.noneMessage","No code actions available"),{include:i.kind,includeSourceActions:!0,onlyIncludePreferredActions:i.preferred},i.apply)}}class pEt extends je{constructor(){super({id:g2e,label:v("refactor.label","Refactor..."),alias:"Refactor...",precondition:pe.and(K.writable,K.hasCodeActionsProvider),kbOpts:{kbExpr:K.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:pe.and(K.writable,oA(_t.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:aee}]}})}run(e,t,n){const i=Id.fromUser(n,{kind:_t.Refactor,apply:"never"});return Lp(t,typeof(n==null?void 0:n.kind)=="string"?i.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):i.preferred?v("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):v("editor.action.refactor.noneMessage","No refactorings available"),{include:_t.Refactor.contains(i.kind)?i.kind:_t.None,onlyIncludePreferredActions:i.preferred},i.apply,Ks.Refactor)}}class DEt extends je{constructor(){super({id:m2e,label:v("source.label","Source Action..."),alias:"Source Action...",precondition:pe.and(K.writable,K.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:pe.and(K.writable,oA(_t.Source))},description:{description:"Source Action...",args:[{name:"args",schema:aee}]}})}run(e,t,n){const i=Id.fromUser(n,{kind:_t.Source,apply:"never"});return Lp(t,typeof(n==null?void 0:n.kind)=="string"?i.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):i.preferred?v("editor.action.source.noneMessage.preferred","No preferred source actions available"):v("editor.action.source.noneMessage","No source actions available"),{include:_t.Source.contains(i.kind)?i.kind:_t.None,includeSourceActions:!0,onlyIncludePreferredActions:i.preferred},i.apply,Ks.SourceAction)}}class xEt extends je{constructor(){super({id:nee,label:v("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:pe.and(K.writable,oA(_t.SourceOrganizeImports)),kbOpts:{kbExpr:K.textInputFocus,primary:1581,weight:100}})}run(e,t){return Lp(t,v("editor.action.organize.noneMessage","No organize imports action available"),{include:_t.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",Ks.OrganizeImports)}}class vEt extends je{constructor(){super({id:iee,label:v("fixAll.label","Fix All"),alias:"Fix All",precondition:pe.and(K.writable,oA(_t.SourceFixAll))})}run(e,t){return Lp(t,v("fixAll.noneMessage","No fix all action available"),{include:_t.SourceFixAll,includeSourceActions:!0},"ifSingle",Ks.FixAll)}}class CEt extends je{constructor(){super({id:E2e,label:v("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:pe.and(K.writable,oA(_t.QuickFix)),kbOpts:{kbExpr:K.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return Lp(t,v("editor.action.autoFix.noneMessage","No auto fixes available"),{include:_t.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",Ks.AutoFix)}}Eu(M3.ID,M3,3);Eu(w3.ID,w3,4);be(mEt);be(pEt);be(DEt);be(xEt);be(CEt);be(vEt);Be(new fEt);Xn.as(E4.Configuration).registerConfiguration(Object.assign(Object.assign({},pbe),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:v("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}));var P0e=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class iU{constructor(){this.lenses=[],this._disposables=new fe}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const n of e.lenses)this.lenses.push({symbol:n,provider:t})}}function S2e(u,e,t){return P0e(this,void 0,void 0,function*(){const n=u.ordered(e),i=new Map,r=new iU,a=n.map((o,s)=>P0e(this,void 0,void 0,function*(){i.set(o,s);try{const l=yield Promise.resolve(o.provideCodeLenses(e,t));l&&r.add(l,o)}catch(l){Ni(l)}}));return yield Promise.all(a),r.lenses=r.lenses.sort((o,s)=>o.symbol.range.startLineNumbers.symbol.range.startLineNumber?1:i.get(o.provider)i.get(s.provider)?1:o.symbol.range.startColumns.symbol.range.startColumn?1:0),r})}Xt.registerCommand("_executeCodeLensProvider",function(u,...e){let[t,n]=e;Iu(lt.isUri(t)),Iu(typeof n=="number"||!n);const{codeLensProvider:i}=u.get($e),r=u.get(Bn).getModel(t);if(!r)throw p0();const a=[],o=new fe;return S2e(i,r,Vt.None).then(s=>{o.add(s);const l=[];for(const c of s.lenses)n==null||c.symbol.command?a.push(c.symbol):n-- >0&&c.provider.resolveCodeLens&&l.push(Promise.resolve(c.provider.resolveCodeLens(r,c.symbol,Vt.None)).then(d=>a.push(d||c.symbol)));return Promise.all(l)}).then(()=>a).finally(()=>{setTimeout(()=>o.dispose(),100)})});var bEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},kEt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const B2e=Gt("ICodeLensCache");class N0e{constructor(e,t){this.lineCount=e,this.data=t}}let rU=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new rm(20,.75);const t="codelens/cache";Ah(()=>e.remove(t,1));const n="codelens/cache2",i=e.get(n,1,"{}");this._deserialize(i),h1(e.onWillSaveState)(r=>{r.reason===RB.SHUTDOWN&&e.store(n,this._serialize(),1,1)})}put(e,t){const n=t.lenses.map(a=>{var o;return{range:a.symbol.range,command:a.symbol.command&&{id:"",title:(o=a.symbol.command)===null||o===void 0?void 0:o.title}}}),i=new iU;i.add({lenses:n,dispose:()=>{}},this._fakeProvider);const r=new N0e(e.getLineCount(),i);this._cache.set(e.uri.toString(),r)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,n]of this._cache){const i=new Set;for(const r of n.data.lenses)i.add(r.symbol.range.startLineNumber);e[t]={lineCount:n.lineCount,lines:[...i.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const n in t){const i=t[n],r=[];for(const o of i.lines)r.push({range:new O(o,1,o,11)});const a=new iU;a.add({lenses:r,dispose(){}},this._fakeProvider),this._cache.set(n,new N0e(i.lineCount,a))}}catch{}}};rU=bEt([kEt(0,$l)],rU);iu(B2e,rU,1);class yEt{constructor(e,t,n){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,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 bN{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${bN._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const n=[];let i=!1;for(let r=0;r{l.symbol.command&&s.push(l.symbol),n.addDecoration({range:l.symbol.range,options:R0e},d=>this._decorationIds[c]=d),o?o=O.plusRange(o,l.symbol.range):o=O.lift(l.symbol.range)}),this._viewZone=new yEt(o.startLineNumber-1,r,a),this._viewZoneId=i.addZone(this._viewZone),s.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(s,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new bN(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t==null||t.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,t)=>{const n=this._editor.getModel().getDecorationRange(e),i=this._data[t].symbol;return!!(n&&O.isEmpty(i.range)===n.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((n,i)=>{t.addDecoration({range:n.symbol.range,options:R0e},r=>this._decorationIds[i]=r)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},r6=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},AEt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let nv=class{constructor(e,t,n,i,r,a){this._editor=e,this._languageFeaturesService=t,this._commandService=i,this._notificationService=r,this._codeLensCache=a,this._disposables=new fe,this._localToDispose=new fe,this._lenses=[],this._oldCodeLensModels=new fe,this._provideCodeLensDebounce=n.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=n.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new Hu(()=>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(o=>{(o.hasChanged(49)||o.hasChanged(18)||o.hasChanged(17))&&this._updateLensStyle(),o.hasChanged(16)&&this._onModelChange()})),this._disposables.add(t.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(65)/this._editor.getOption(51));let t=this._editor.getOption(18);return(!t||t<5)&&(t=this._editor.getOption(51)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),n=this._editor.getOption(17),i=this._editor.getOption(49),{style:r}=this._editor.getContainerDomNode();r.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),r.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),r.setProperty("--vscode-editorCodeLens-fontFeatureSettings",i.fontFeatureSettings),n&&(r.setProperty("--vscode-editorCodeLens-fontFamily",n),r.setProperty("--vscode-editorCodeLens-fontFamilyDefault",ns.fontFamily)),this._editor.changeViewZones(a=>{for(const o of this._lenses)o.updateHeight(e,a)})}_localDispose(){var e,t,n;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(n=this._currentCodeLensModel)===null||n===void 0||n.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(16))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add(_g(()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(const i of this._languageFeaturesService.codeLensProvider.all(e))if(typeof i.onDidChange=="function"){const r=i.onDidChange(()=>n.schedule());this._localToDispose.add(r)}const n=new Hu(()=>{var i;const r=Date.now();(i=this._getCodeLensModelPromise)===null||i===void 0||i.cancel(),this._getCodeLensModelPromise=$i(a=>S2e(this._languageFeaturesService.codeLensProvider,e,a)),this._getCodeLensModelPromise.then(a=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=a,this._codeLensCache.put(e,a);const o=this._provideCodeLensDebounce.update(e,Date.now()-r);n.delay=o,this._renderCodeLensSymbols(a),this._resolveCodeLensesInViewportSoon()},wt)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(n),this._localToDispose.add(bt(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var i;this._editor.changeDecorations(r=>{this._editor.changeViewZones(a=>{const o=[];let s=-1;this._lenses.forEach(c=>{!c.isValid()||s===c.getLineNumber()?o.push(c):(c.update(a),s=c.getLineNumber())});const l=new $j;o.forEach(c=>{c.dispose(l,a),this._lenses.splice(this._lenses.indexOf(c),1)}),l.commit(r)})}),n.schedule(),this._resolveCodeLensesScheduler.cancel(),(i=this._resolveCodeLensesPromise)===null||i===void 0||i.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(i=>{i.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(bt(()=>{if(this._editor.getModel()){const i=Bl.capture(this._editor);this._editor.changeDecorations(r=>{this._editor.changeViewZones(a=>{this._disposeAllLenses(r,a)})}),i.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(i=>{if(i.target.type!==9)return;let r=i.target.element;if((r==null?void 0:r.tagName)==="SPAN"&&(r=r.parentElement),(r==null?void 0:r.tagName)==="A")for(const a of this._lenses){const o=a.getCommand(r);if(o){this._commandService.executeCommand(o.id,...o.arguments||[]).catch(s=>this._notificationService.error(s));break}}})),n.schedule()}_disposeAllLenses(e,t){const n=new $j;for(const i of this._lenses)i.dispose(n,t);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),n=[];let i;for(const o of e.lenses){const s=o.symbol.range.startLineNumber;s<1||s>t||(i&&i[i.length-1].symbol.range.startLineNumber===s?i.push(o):(i=[o],n.push(i)))}if(!n.length&&!this._lenses.length)return;const r=Bl.capture(this._editor),a=this._getLayoutInfo();this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{const l=new $j;let c=0,d=0;for(;dthis._resolveCodeLensesInViewportSoon())),c++,d++)}for(;cthis._resolveCodeLensesInViewportSoon())),d++;l.commit(o)})}),r.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const n=[],i=[];if(this._lenses.forEach(o=>{const s=o.computeIfNecessary(t);s&&(n.push(s),i.push(o))}),n.length===0)return;const r=Date.now(),a=$i(o=>{const s=n.map((l,c)=>{const d=new Array(l.length),h=l.map((E,g)=>!E.symbol.command&&typeof E.provider.resolveCodeLens=="function"?Promise.resolve(E.provider.resolveCodeLens(t,E.symbol,o)).then(m=>{d[g]=m},Ni):(d[g]=E.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!o.isCancellationRequested&&!i[c].isDisposed()&&i[c].updateCommands(d)})});return Promise.all(s)});this._resolveCodeLensesPromise=a,this._resolveCodeLensesPromise.then(()=>{const o=this._resolveCodeLensesDebounce.update(t,Date.now()-r);this._resolveCodeLensesScheduler.delay=o,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},o=>{wt(o),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};nv.ID="css.editor.codeLens";nv=FEt([r6(1,$e),r6(2,I0),r6(3,ei),r6(4,ci),r6(5,B2e)],nv);Eu(nv.ID,nv,1);be(class extends je{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:K.hasCodeLensProvider,label:v("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return AEt(this,void 0,void 0,function*(){if(!t.hasModel())return;const n=e.get(ud),i=e.get(ei),r=e.get(ci),a=t.getSelection().positionLineNumber,o=t.getContribution(nv.ID);if(!o)return;const s=o.getModel();if(!s)return;const l=[];for(const d of s.lenses)d.symbol.command&&d.symbol.range.startLineNumber===a&&l.push({label:d.symbol.command.title,command:d.symbol.command});if(l.length===0)return;const c=yield n.pick(l,{canPickMany:!1});if(c){if(s.isDisposed)return yield i.executeCommand(this.id);try{yield i.executeCommand(c.command.id,...c.command.arguments||[])}catch(d){r.error(d)}}})}});var _Et=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Kj=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},SEt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class oee{constructor(e,t){this._editorWorkerClient=new cQ(e,!1,"editorWorkerService",t)}provideDocumentColors(e,t){return SEt(this,void 0,void 0,function*(){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)})}provideColorPresentations(e,t,n){const i=t.range,r=t.color,a=r.alpha,o=new ae(new Qt(Math.round(255*r.red),Math.round(255*r.green),Math.round(255*r.blue),a)),s=a?ae.Format.CSS.formatRGB(o):ae.Format.CSS.formatRGBA(o),l=a?ae.Format.CSS.formatHSL(o):ae.Format.CSS.formatHSLA(o),c=a?ae.Format.CSS.formatHex(o):ae.Format.CSS.formatHexA(o),d=[];return d.push({label:s,textEdit:{range:i,text:s}}),d.push({label:l,textEdit:{range:i,text:l}}),d.push({label:c,textEdit:{range:i,text:c}}),d}}let aU=class extends ie{constructor(e,t,n){super(),this._register(n.colorProvider.register("*",new oee(e,t)))}};aU=_Et([Kj(0,Bn),Kj(1,an),Kj(2,$e)],aU);cN(aU);var sA=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function w2e(u,e,t,n=!0){return sA(this,void 0,void 0,function*(){return see(new BEt,u,e,t,n)})}function z2e(u,e,t,n){return Promise.resolve(t.provideColorPresentations(u,e,n))}class BEt{constructor(){}compute(e,t,n,i){return sA(this,void 0,void 0,function*(){const r=yield e.provideDocumentColors(t,n);if(Array.isArray(r))for(const a of r)i.push({colorInfo:a,provider:e});return Array.isArray(r)})}}class wEt{constructor(){}compute(e,t,n,i){return sA(this,void 0,void 0,function*(){const r=yield e.provideDocumentColors(t,n);if(Array.isArray(r))for(const a of r)i.push({range:a.range,color:[a.color.red,a.color.green,a.color.blue,a.color.alpha]});return Array.isArray(r)})}}class zEt{constructor(e){this.colorInfo=e}compute(e,t,n,i){return sA(this,void 0,void 0,function*(){const r=yield e.provideColorPresentations(t,this.colorInfo,Vt.None);return Array.isArray(r)&&i.push(...r),Array.isArray(r)})}}function see(u,e,t,n,i){return sA(this,void 0,void 0,function*(){let r=!1,a;const o=[],s=e.ordered(t);for(let l=s.length-1;l>=0;l--){const c=s[l];if(c instanceof oee)a=c;else try{(yield u.compute(c,t,n,o))&&(r=!0)}catch(d){Ni(d)}}return r?o:a&&i?(yield u.compute(a,t,n,o),o):[]})}function L2e(u,e){const{colorProvider:t}=u.get($e),n=u.get(Bn).getModel(e);if(!n)throw p0();const i=u.get(nu).getValue("editor.defaultColorDecorators",{resource:e});return{model:n,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:i}}Xt.registerCommand("_executeDocumentColorProvider",function(u,...e){const[t]=e;if(!(t instanceof lt))throw p0();const{model:n,colorProviderRegistry:i,isDefaultColorDecoratorsEnabled:r}=L2e(u,t);return see(new wEt,i,n,Vt.None,r)});Xt.registerCommand("_executeColorPresentationProvider",function(u,...e){const[t,n]=e,{uri:i,range:r}=n;if(!(i instanceof lt)||!Array.isArray(t)||t.length!==4||!O.isIRange(r))throw p0();const{model:a,colorProviderRegistry:o,isDefaultColorDecoratorsEnabled:s}=L2e(u,i),[l,c,d,h]=t;return see(new zEt({range:r,color:{red:l,green:c,blue:d,alpha:h}}),o,a,Vt.None,s)});var LEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Wj=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},O0e=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const M2e=Object.create({});let Rg=class T2e extends ie{constructor(e,t,n,i){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=n,this._localToDispose=this._register(new fe),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new jF(this._editor),this._decoratorLimitReporter=new MEt,this._colorDecorationClassRefs=this._register(new fe),this._debounceInformation=i.for(n.colorProvider,"Document Colors",{min:T2e.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(r=>{const a=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(144);const o=a!==this._isColorDecoratorsEnabled||r.hasChanged(20),s=r.hasChanged(144);(o||s)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(144),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),n=this._configurationService.getValue(t);if(n&&typeof n=="object"){const i=n.colorDecorators;if(i&&i.enable!==void 0&&!i.enable)return i.enable}return this._editor.getOption(19)}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 Il,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){return O0e(this,void 0,void 0,function*(){this._computePromise=$i(e=>O0e(this,void 0,void 0,function*(){const t=this._editor.getModel();if(!t)return[];const n=new ha(!1),i=yield w2e(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,n.elapsed()),i}));try{const e=yield this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){wt(e)}})}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=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:gt.EMPTY}));this._editor.changeDecorations(n=>{this._decorationsIds=n.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((i,r)=>this._colorDatas.set(i,e[r]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],n=this._editor.getOption(20);for(let r=0;rthis._colorDatas.has(i.id));return n.length===0?null:this._colorDatas.get(n[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};Rg.ID="editor.contrib.colorDetector";Rg.RECOMPUTE_TIME=1e3;Rg=LEt([Wj(1,nu),Wj(2,$e),Wj(3,I0)],Rg);class MEt{constructor(){this._onDidChange=new ee,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}Eu(Rg.ID,Rg,1);class TEt{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,t,n){this.presentationIndex=n,this._onColorFlushed=new ee,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new ee,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new ee,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let n=-1;for(let i=0;i{this.backgroundColor=a.getColor(uB)||ae.white})),this._register(ce(this._pickedColorNode,Me.CLICK,()=>this.model.selectNextColorPresentation())),this._register(ce(this._originalColorNode,Me.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=ae.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new NEt(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=ae.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:""}}let NEt=class extends ie{constructor(e){super(),this._onClicked=this._register(new ee),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),de(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),de(this._button,t),de(t,As(".button"+et.asCSSSelector(Cn("color-picker-close",Ae.close,v("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}};class REt extends ie{constructor(e,t,n,i=!1){super(),this.model=t,this.pixelRatio=n,this._insertButton=null,this._domNode=As(".colorpicker-body"),de(e,this._domNode),this._saturationBox=new IEt(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 OEt(this._domNode,this.model,i),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new jEt(this._domNode,this.model,i),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),i&&(this._insertButton=this._register(new VEt(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const n=this.model.color.hsva;this.model.color=new ae(new Vd(n.h,e,t,n.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new ae(new Vd(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,n=(1-e)*360;this.model.color=new ae(new Vd(n===360?0:n,t.s,t.v,t.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 IEt extends ie{constructor(e,t,n){super(),this.model=t,this.pixelRatio=n,this._onDidChange=new ee,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new ee,this.onColorFlushed=this._onColorFlushed.event,this._domNode=As(".saturation-wrap"),de(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",de(this._domNode,this._canvas),this.selection=As(".saturation-selection"),de(this._domNode,this.selection),this.layout(),this._register(ce(this._domNode,Me.POINTER_DOWN,i=>this.onPointerDown(i))),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 Qv);const t=mi(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>this.onDidChangePosition(i.pageX-t.left,i.pageY-t.top),()=>null);const n=ce(document,Me.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){const n=Math.max(0,Math.min(1,e/this.width)),i=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(n,i),this._onDidChange.fire({s:n,v:i})}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,t=new ae(new Vd(e.h,1,1,1)),n=this._canvas.getContext("2d"),i=n.createLinearGradient(0,0,this._canvas.width,0);i.addColorStop(0,"rgba(255, 255, 255, 1)"),i.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),i.addColorStop(1,"rgba(255, 255, 255, 0)");const r=n.createLinearGradient(0,0,0,this._canvas.height);r.addColorStop(0,"rgba(0, 0, 0, 0)"),r.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this._canvas.width,this._canvas.height),n.fillStyle=ae.Format.CSS.format(t),n.fill(),n.fillStyle=i,n.fill(),n.fillStyle=r,n.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class P2e extends ie{constructor(e,t,n=!1){super(),this.model=t,this._onDidChange=new ee,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new ee,this.onColorFlushed=this._onColorFlushed.event,n?(this.domNode=de(e,As(".standalone-strip")),this.overlay=de(this.domNode,As(".standalone-overlay"))):(this.domNode=de(e,As(".strip")),this.overlay=de(this.domNode,As(".overlay"))),this.slider=de(this.domNode,As(".slider")),this.slider.style.top="0px",this._register(ce(this.domNode,Me.POINTER_DOWN,i=>this.onPointerDown(i))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._register(new Qv),n=mi(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,r=>this.onDidChangeTop(r.pageY-n.top),()=>null);const i=ce(document,Me.POINTER_UP,()=>{this._onColorFlushed.fire(),i.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class OEt extends P2e{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:t,g:n,b:i}=e.rgba,r=new ae(new Qt(t,n,i,1)),a=new ae(new Qt(t,n,i,0));this.overlay.style.background=`linear-gradient(to bottom, ${r} 0%, ${a} 100%)`}getValue(e){return e.hsva.a}}class jEt extends P2e{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class VEt extends ie{constructor(e){super(),this._onClicked=this._register(new ee),this.onClicked=this._onClicked.event,this._button=de(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=t=>{this._onClicked.fire()}}get button(){return this._button}}class HEt extends Ol{constructor(e,t,n,i,r=!1){super(),this.model=t,this.pixelRatio=n,this._register($k.onDidChange(()=>this.layout()));const a=As(".colorpicker-widget");e.appendChild(a),this.header=this._register(new PEt(a,this.model,i,r)),this.body=this._register(new REt(a,this.model,this.pixelRatio,r))}layout(){this.body.layout()}}var N2e=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},R2e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},iv=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class $Et{constructor(e,t,n,i){this.owner=e,this.range=t,this.model=n,this.provider=i,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let rw=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,n){return ki.fromPromise(this._computeAsync(e,t,n))}_computeAsync(e,t,n){return iv(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const i=Rg.get(this._editor);if(!i)return[];for(const r of t){if(!i.isColorDecoration(r))continue;const a=i.getColorData(r.range.getStartPosition());if(a)return[yield I2e(this,this._editor.getModel(),a.colorInfo,a.provider)]}return[]})}renderHoverParts(e,t){return O2e(this,this._editor,this._themeService,t,e)}};rw=N2e([R2e(1,Ui)],rw);class KEt{constructor(e,t,n,i){this.owner=e,this.range=t,this.model=n,this.provider=i}}let N2=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}createColorHover(e,t,n){return iv(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!Rg.get(this._editor))return null;const r=yield w2e(n,this._editor.getModel(),Vt.None);let a=null,o=null;for(const d of r){const h=d.colorInfo;O.containsRange(h.range,e.range)&&(a=h,o=d.provider)}const s=a??e,l=o??t,c=!!a;return{colorHover:yield I2e(this,this._editor.getModel(),s,l),foundInEditor:c}})}updateEditorModel(e){return iv(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const t=e.model;let n=new O(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(yield PS(this._editor.getModel(),t,this._color,n,e),n=j2e(this._editor,n,t))})}renderHoverParts(e,t){return O2e(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};N2=N2e([R2e(1,Ui)],N2);function I2e(u,e,t,n){return iv(this,void 0,void 0,function*(){const i=e.getValueInRange(t.range),{red:r,green:a,blue:o,alpha:s}=t.color,l=new Qt(Math.round(r*255),Math.round(a*255),Math.round(o*255),s),c=new ae(l),d=yield z2e(e,t,n,Vt.None),h=new TEt(c,[],0);return h.colorPresentations=d||[],h.guessColorPresentation(c,i),u instanceof rw?new $Et(u,O.lift(t.range),h,n):new KEt(u,O.lift(t.range),h,n)})}function O2e(u,e,t,n,i){if(n.length===0||!e.hasModel())return ie.None;if(i.setMinimumDimensions){const h=e.getOption(65)+8;i.setMinimumDimensions(new Du(302,h))}const r=new fe,a=n[0],o=e.getModel(),s=a.model,l=r.add(new HEt(i.fragment,s,e.getOption(140),t,u instanceof N2));i.setColorPicker(l);let c=!1,d=new O(a.range.startLineNumber,a.range.startColumn,a.range.endLineNumber,a.range.endColumn);if(u instanceof N2){const h=n[0].model.color;u.color=h,PS(o,s,h,d,a),r.add(s.onColorFlushed(E=>{u.color=E}))}else r.add(s.onColorFlushed(h=>iv(this,void 0,void 0,function*(){yield PS(o,s,h,d,a),c=!0,d=j2e(e,d,s,i)})));return r.add(s.onDidChangeColor(h=>{PS(o,s,h,d,a)})),r.add(e.onDidChangeModelContent(h=>{c?c=!1:(i.hide(),e.focus())})),r}function j2e(u,e,t,n){let i,r;if(t.presentation.textEdit){i=[t.presentation.textEdit],r=new O(t.presentation.textEdit.range.startLineNumber,t.presentation.textEdit.range.startColumn,t.presentation.textEdit.range.endLineNumber,t.presentation.textEdit.range.endColumn);const a=u.getModel()._setTrackedRange(null,r,3);u.pushUndoStop(),u.executeEdits("colorpicker",i),r=u.getModel()._getTrackedRange(a)||r}else i=[{range:e,text:t.presentation.label,forceMoveMarkers:!1}],r=e.setEndPosition(e.endLineNumber,e.startColumn+t.presentation.label.length),u.pushUndoStop(),u.executeEdits("colorpicker",i);return t.presentation.additionalTextEdits&&(i=[...t.presentation.additionalTextEdits],u.executeEdits("colorpicker",i),n&&n.hide()),u.pushUndoStop(),r}function PS(u,e,t,n,i){return iv(this,void 0,void 0,function*(){const r=yield z2e(u,{range:n,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},i.provider,Vt.None);e.colorPresentations=r||[]})}function oU(u,e){return!!u[e]}class Gj{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=oU(e.event,t.triggerModifier),this.hasSideBySideModifier=oU(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class j0e{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=oU(e,t.triggerModifier)}}class c7{constructor(e,t,n,i){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=i}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function V0e(u){return u==="altKey"?Yt?new c7(57,"metaKey",6,"altKey"):new c7(5,"ctrlKey",6,"altKey"):Yt?new c7(6,"altKey",57,"metaKey"):new c7(6,"altKey",5,"ctrlKey")}class kN extends ie{constructor(e,t){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new ee),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new ee),this.onExecute=this._onExecute.event,this._onCancel=this._register(new ee),this.onCancel=this._onCancel.event,this._editor=e,this._alwaysFireExecuteOnMouseUp=t,this._opts=V0e(this._editor.getOption(76)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(n=>{if(n.hasChanged(76)){const i=V0e(this._editor.getOption(76));if(this._opts.equals(i))return;this._opts=i,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(n=>this._onEditorMouseMove(new Gj(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new Gj(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new Gj(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new j0e(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new j0e(n,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(n=>this._onDidChangeCursorSelection(n))),this._register(this._editor.onDidChangeModel(n=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(n=>{(n.scrollTopChanged||n.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=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){const t=e.target.position?e.target.position.lineNumber:0;(this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t||this._alwaysFireExecuteOnMouseUp)&&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()}}var WEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Z1=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let Ig=class extends b3{constructor(e,t,n,i,r,a,o,s,l,c,d,h,E){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),n,r,a,o,s,l,c,d,h,E),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration(g=>this._onParentConfigurationChanged(g)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){BF(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Ig=WEt([Z1(4,mt),Z1(5,hu),Z1(6,ei),Z1(7,Et),Z1(8,Ui),Z1(9,ci),Z1(10,B1),Z1(11,an),Z1(12,$e)],Ig);const H0e=new ae(new Qt(0,122,204)),GEt={showArrow:!0,showFrame:!0,className:"",frameColor:H0e,arrowColor:H0e,keepEditorSelection:!1},UEt="vs.editor.contrib.zoneWidget";class qEt{constructor(e,t,n,i,r,a,o,s){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=i,this.showInHiddenAreas=o,this.ordinal=s,this._onDomNodeTop=r,this._onComputedHeight=a}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class JEt{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class yN{constructor(e){this._editor=e,this._ruleName=yN._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),fae(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(){fae(this._ruleName),QK(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:O.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}yN._IdGenerator=new lX(".arrow-decoration-");class ZEt{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new fe,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=lh(t),BF(this.options,GEt,!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 i=this._getWidth(n);this.domNode.style.width=i+"px",this.domNode.style.left=this._getLeft(n)+"px",this._onWidth(i)}))}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 yN(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 t;if(this.domNode.style.height=`${e}px`,this.container){const n=e-this._decoratingElementsHeight();this.container.style.height=`${n}px`;const i=this.editor.getLayoutInfo();this._doLayout(n,this._getWidth(i))}(t=this._resizeSash)===null||t===void 0||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const n=O.isIRange(e)?O.lift(e):O.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId.set([{range:n,options:gt.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(t=>{this._viewZone&&t.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(65);let t=0;if(this.options.showArrow){const n=Math.round(e/3);t+=2*n}if(this.options.showFrame){const n=Math.round(e/9);t+=2*n}return t}_showImpl(e,t){const n=e.getStartPosition(),i=this.editor.getLayoutInfo(),r=this._getWidth(i);this.domNode.style.width=`${r}px`,this.domNode.style.left=this._getLeft(i)+"px";const a=document.createElement("div");a.style.overflow="hidden";const o=this.editor.getOption(65);if(!this.options.allowUnlimitedHeight){const h=Math.max(12,this.editor.getLayoutInfo().height/o*.8);t=Math.min(t,h)}let s=0,l=0;if(this._arrow&&this.options.showArrow&&(s=Math.round(o/3),this._arrow.height=s,this._arrow.show(n)),this.options.showFrame&&(l=Math.round(o/9)),this.editor.changeViewZones(h=>{this._viewZone&&h.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new qEt(a,n.lineNumber,n.column,t,E=>this._onViewZoneTop(E),E=>this._onViewZoneHeight(E),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=h.addZone(this._viewZone),this._overlayWidget=new JEt(UEt+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const h=this.options.frameWidth?this.options.frameWidth:l;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}const c=t*o-this._decoratingElementsHeight();this.container&&(this.container.style.top=s+"px",this.container.style.height=c+"px",this.container.style.overflow="hidden"),this._doLayout(c,r),this.options.keepEditorSelection||this.editor.setSelection(e);const d=this.editor.getModel();if(d){const h=d.validateRange(new O(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(h,h.startLineNumber===d.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new Vr(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){const n=(t.currentY-e.startY)/this.editor.getOption(65),i=n<0?Math.ceil(n):Math.floor(n),r=e.heightInLines+i;r>5&&r<35&&this._relayout(r)}}))}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 V2e=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},H2e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const $2e=Gt("IPeekViewService");iu($2e,class{constructor(){this._widgets=new Map}addExclusiveWidget(u,e){const t=this._widgets.get(u);t&&(t.listener.dispose(),t.widget.dispose());const n=()=>{const i=this._widgets.get(u);i&&i.widget===e&&(i.listener.dispose(),this._widgets.delete(u))};this._widgets.set(u,{widget:e,listener:e.onDidClose(n)})}},1);var Po;(function(u){u.inPeekEditor=new Ne("inReferenceSearchEditor",!0,v("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),u.notInPeekEditor=u.inPeekEditor.toNegated()})(Po||(Po={}));let R2=class{constructor(e,t){e instanceof Ig&&Po.inPeekEditor.bindTo(t)}dispose(){}};R2.ID="editor.contrib.referenceController";R2=V2e([H2e(1,Et)],R2);Eu(R2.ID,R2,0);function YEt(u){const e=u.get(hu).getFocusedCodeEditor();return e instanceof Ig?e.getParentEditor():e}const QEt={headerBackgroundColor:ae.white,primaryHeadingColor:ae.fromHex("#333333"),secondaryHeadingColor:ae.fromHex("#6c6c6cb3")};let aw=class extends ZEt{constructor(e,t,n){super(e,t),this.instantiationService=n,this._onDidClose=new ee,this.onDidClose=this._onDidClose.event,BF(this.options,QEt,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.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=ve(".head"),this._bodyElement=ve(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=ve(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),li(this._titleElement,"click",r=>this._onTitleClick(r))),de(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=ve("span.filename"),this._secondaryHeading=ve("span.dirname"),this._metaHeading=ve("span.meta"),de(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const n=ve(".peekview-actions");de(this._headElement,n);const i=this._getActionBarOptions();this._actionbarWidget=new $s(n,i),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new da("peekview.close",v("label.close","Close"),et.asClassName(Ae.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:N0t.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:fr(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,Qo(this._metaHeading)):Ja(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const n=Math.ceil(this.editor.getOption(65)*1.2),i=Math.round(e-(n+2));this._doLayoutHead(n,t),this._doLayoutBody(i,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};aw=V2e([H2e(2,mt)],aw);const XEt=U("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:ae.black,hcLight:ae.white},v("peekViewTitleBackground","Background color of the peek view title area.")),K2e=U("peekViewTitleLabel.foreground",{dark:ae.white,light:ae.black,hcDark:ae.white,hcLight:ol},v("peekViewTitleForeground","Color of the peek view title.")),W2e=U("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},v("peekViewTitleInfoForeground","Color of the peek view title info.")),egt=U("peekView.border",{dark:Ls,light:Ls,hcDark:Zt,hcLight:Zt},v("peekViewBorder","Color of the peek view borders and arrow.")),tgt=U("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:ae.black,hcLight:ae.white},v("peekViewResultsBackground","Background color of the peek view result list."));U("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:ae.white,hcLight:ol},v("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));U("peekViewResult.fileForeground",{dark:ae.white,light:"#1E1E1E",hcDark:ae.white,hcLight:ol},v("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));U("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},v("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));U("peekViewResult.selectionForeground",{dark:ae.white,light:"#6C6C6C",hcDark:ae.white,hcLight:ol},v("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const _E=U("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:ae.black,hcLight:ae.white},v("peekViewEditorBackground","Background color of the peek view editor."));U("peekViewEditorGutter.background",{dark:_E,light:_E,hcDark:_E,hcLight:_E},v("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));U("peekViewEditorStickyScroll.background",{dark:_E,light:_E,hcDark:_E,hcLight:_E},v("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor."));U("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},v("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));U("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},v("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));U("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:fn,hcLight:fn},v("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));var ugt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Og{constructor(e,t,n,i){this.isProviderFirst=e,this.parent=t,this.link=n,this._rangeCallback=i,this.id=TW.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?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}",t.value,B0(this.uri),this.range.startLineNumber,this.range.startColumn):v("aria.oneReference","in {0} on line {1} at column {2}",B0(this.uri),this.range.startLineNumber,this.range.startColumn)}}class ngt{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const n=this._modelReference.object.textEditorModel;if(!n)return;const{startLineNumber:i,startColumn:r,endLineNumber:a,endColumn:o}=e,s=n.getWordUntilPosition({lineNumber:i,column:r-t}),l=new O(i,s.startColumn,i,r),c=new O(a,o,a,1073741824),d=n.getValueInRange(l).replace(/^\s+/,""),h=n.getValueInRange(e),E=n.getValueInRange(c).replace(/\s+$/,"");return{value:d+h+E,highlight:{start:d.length,end:d.length+h.length}}}}class I2{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new Fa}dispose(){Au(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}",B0(this.uri),this.uri.fsPath):v("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,B0(this.uri),this.uri.fsPath)}resolve(e){return ugt(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const n=yield e.createModelReference(t.uri);this._previews.set(t.uri,new ngt(n))}catch(n){wt(n)}return this})}}class rs{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new ee,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[n]=e;e.sort(rs._compareReferences);let i;for(const r of e)if((!i||!pn.isEqual(i.uri,r.uri,!0))&&(i=new I2(this,r.uri),this.groups.push(i)),i.children.length===0||rs._compareReferences(r,i.children[i.children.length-1])!==0){const a=new Og(n===r,i,r,o=>this._onDidChangeReferenceRange.fire(o));this.references.push(a),i.children.push(a)}}dispose(){Au(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new rs(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,t){const{parent:n}=e;let i=n.children.indexOf(e);const r=n.children.length,a=n.parent.groups.length;return a===1||t&&i+10?(t?i=(i+1)%r:i=(i+r-1)%r,n.children[i]):(i=n.parent.groups.indexOf(n),t?(i=(i+1)%a,n.parent.groups[i].children[0]):(i=(i+a-1)%a,n.parent.groups[i].children[n.parent.groups[i].children.length-1]))}nearestReference(e,t){const n=this.references.map((i,r)=>({idx:r,prefixLen:f3(i.uri.toString(),e.toString()),offsetDist:Math.abs(i.range.startLineNumber-t.lineNumber)*100+Math.abs(i.range.startColumn-t.column)})).sort((i,r)=>i.prefixLen>r.prefixLen?-1:i.prefixLenr.offsetDist?1:0)[0];if(n)return this.references[n.idx]}referenceAt(e,t){for(const n of this.references)if(n.uri.toString()===e.toString()&&O.containsPosition(n.range,t))return n}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return pn.compare(e.uri,t.uri)||O.compareRangesUsingStarts(e.range,t.range)}}var FN=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},AN=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let sU=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof rs||e instanceof I2}getChildren(e){if(e instanceof rs)return e.groups;if(e instanceof I2)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};sU=FN([AN(0,jo)],sU);class igt{getHeight(){return 23}getTemplateId(e){return e instanceof I2?O2.id:lA.id}}let lU=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof Og){const n=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(n)return n.value}return B0(e.uri)}};lU=FN([AN(0,on)],lU);class rgt{getId(e){return e instanceof Og?e.id:e.uri}}let cU=class extends ie{constructor(e,t){super(),this._labelService=t;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new JB(n,{supportHighlights:!0})),this.badge=new xG(de(n,ve(".count")),{},bbe),e.appendChild(n)}set(e,t){const n=jP(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(n,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const i=e.children.length;this.badge.setCount(i),i>1?this.badge.setTitleFormat(v("referencesCount","{0} references",i)):this.badge.setTitleFormat(v("referenceCount","{0} reference",i))}};cU=FN([AN(1,q5)],cU);let O2=class G2e{constructor(e){this._instantiationService=e,this.templateId=G2e.id}renderTemplate(e){return this._instantiationService.createInstance(cU,e)}renderElement(e,t,n){n.set(e.element,WP(e.filterData))}disposeTemplate(e){e.dispose()}};O2.id="FileReferencesRenderer";O2=FN([AN(0,mt)],O2);class agt{constructor(e){this.label=new YE(e)}set(e,t){var n;const i=(n=e.parent.getPreview(e))===null||n===void 0?void 0:n.preview(e.range);if(!i||!i.value)this.label.set(`${B0(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:r,highlight:a}=i;t&&!Tc.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(r,WP(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(r,[a]))}}}class lA{constructor(){this.templateId=lA.id}renderTemplate(e){return new agt(e)}renderElement(e,t,n){n.set(e.element,e.filterData)}disposeTemplate(){}}lA.id="OneReferenceRenderer";class ogt{getWidgetAriaLabel(){return v("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var sgt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Y1=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},$0e=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class _N{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new fe,this._callOnModelChange=new fe,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 t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],n=[];for(let i=0,r=e.children.length;i{const r=i.deltaDecorations([],t);for(let a=0;a{r.equals(9)&&(this._keybindingService.dispatchEvent(r,r.target),r.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(cgt,"ReferencesWidget",this._treeContainer,new igt,[this._instantiationService.createInstance(O2),this._instantiationService.createInstance(lA)],this._instantiationService.createInstance(sU),n),this._splitView.addView({onDidChange:Ke.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:r=>{this._preview.layout({height:this._dim.height,width:r})}},WB.Distribute),this._splitView.addView({onDidChange:Ke.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:r=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${r}px`,this._tree.layout(this._dim.height,r)}},WB.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const i=(r,a)=>{r instanceof Og&&(a==="show"&&this._revealReference(r,!1),this._onDidSelectReference.fire({element:r,kind:a,source:"tree"}))};this._tree.onDidOpen(r=>{r.sideBySide?i(r.element,"side"):r.editorOptions.pinned?i(r.element,"goto"):i(r.element,"show")}),Ja(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Du(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*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"),Qo(this._messageContainer),Promise.resolve(void 0)):(Ja(this._messageContainer),this._decorationsManager=new _N(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:t,target:n}=e;if(t.detail!==2)return;const i=this._getFocusedReference();i&&this._onDidSelectReference.fire({element:{uri:i.uri,range:n.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),Qo(this._treeContainer),Qo(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 Og)return e;if(e instanceof I2&&e.children.length>0)return e.children[0]}revealReference(e){return $0e(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return $0e(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==It.inMemory?this.setTitle(Jnt(e.uri),this._uriLabel.getUriLabel(jP(e.uri))):this.setTitle(v("peekView.alternateTitle","References"));const n=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));const i=yield n;if(!this._model){i.dispose();return}Au(this._previewModelReference);const r=i.object;if(r){const a=this._preview.getModel()===r.textEditorModel?0:1,o=O.lift(e.range).collapseToStart();this._previewModelReference=i,this._preview.setModel(r.textEditorModel),this._preview.setSelection(o),this._preview.revealRangeInCenter(o,a)}else this._preview.setModel(this._previewNotAvailableMessage),i.dispose()})}};dU=sgt([Y1(3,Ui),Y1(4,jo),Y1(5,mt),Y1(6,$2e),Y1(7,q5),Y1(8,VP),Y1(9,on),Y1(10,Dn),Y1(11,an)],dU);var dgt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},lD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},K0e=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const Mp=new Ne("referenceSearchVisible",!1,v("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let jg=class hU{static get(e){return e.getContribution(hU.ID)}constructor(e,t,n,i,r,a,o,s){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=i,this._notificationService=r,this._instantiationService=a,this._storageService=o,this._configurationService=s,this._disposables=new fe,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=Mp.bindTo(n)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,n){let i;if(this._widget&&(i=this._widget.position),this.closeWidget(),i&&e.containsPosition(i))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 r="peekViewLayout",a=lgt.fromJSON(this._storageService.get(r,0,"{}"));this._widget=this._instantiationService.createInstance(dU,this._editor,this._defaultTreeKeyboardSupport,a),this._widget.setTitle(v("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store(r,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(s=>{const{element:l,kind:c}=s;if(l)switch(c){case"open":(s.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(l,!1,!1);break;case"side":this.openReference(l,!0,!1);break;case"goto":n?this._gotoReference(l,!0):this.openReference(l,!1,!0);break}}));const o=++this._requestIdPool;t.then(s=>{var l;if(o!==this._requestIdPool||!this._widget){s.dispose();return}return(l=this._model)===null||l===void 0||l.dispose(),this._model=s,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 c=this._editor.getModel().uri,d=new ue(e.startLineNumber,e.startColumn),h=this._model.nearestReference(c,d);if(h)return this._widget.setSelection(h).then(()=>{this._widget&&this._editor.getOption(85)==="editor"&&this._widget.focusOnPreviewEditor()})}})},s=>{this._notificationService.error(s)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return K0e(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const n=this._model.nearestReference(this._editor.getModel().uri,t);if(!n)return;const i=this._model.nextOrPreviousReference(n,e),r=this._editor.hasTextFocus(),a=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(i),yield this._gotoReference(i,!1),r?this._editor.focus():this._widget&&a&&this._widget.focusOnPreviewEditor()})}revealReference(e){return K0e(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,n;(t=this._widget)===null||t===void 0||t.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,t){var n;(n=this._widget)===null||n===void 0||n.hide(),this._ignoreModelChangeEvent=!0;const i=O.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:i,selectionSource:"code.jump",pinned:t}},this._editor).then(r=>{var a;if(this._ignoreModelChangeEvent=!1,!r||!this._widget){this.closeWidget();return}if(this._editor===r)this._widget.show(i),this._widget.focusOnReferenceTree();else{const o=hU.get(r),s=this._model.clone();this.closeWidget(),r.focus(),o==null||o.toggleWidget(i,$i(l=>Promise.resolve(s)),(a=this._peekMode)!==null&&a!==void 0?a:!1)}},r=>{this._ignoreModelChangeEvent=!1,wt(r)})}openReference(e,t,n){t||this.closeWidget();const{uri:i,range:r}=e;this._editorService.openCodeEditor({resource:i,options:{selection:r,selectionSource:"code.jump",pinned:n}},this._editor,t)}};jg.ID="editor.contrib.referencesController";jg=dgt([lD(2,Et),lD(3,hu),lD(4,ci),lD(5,mt),lD(6,$l),lD(7,nu)],jg);function Tp(u,e){const t=YEt(u);if(!t)return;const n=jg.get(t);n&&e(n)}To.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Ri(2089,60),when:pe.or(Mp,Po.inPeekEditor),handler(u){Tp(u,e=>{e.changeFocusBetweenPreviewAndReferences()})}});To.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:pe.or(Mp,Po.inPeekEditor),handler(u){Tp(u,e=>{e.goToNextOrPreviousReference(!0)})}});To.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:pe.or(Mp,Po.inPeekEditor),handler(u){Tp(u,e=>{e.goToNextOrPreviousReference(!1)})}});Xt.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");Xt.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");Xt.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");Xt.registerCommand("closeReferenceSearch",u=>Tp(u,e=>e.closeWidget()));To.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:pe.and(Po.inPeekEditor,pe.not("config.editor.stablePeek"))});To.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:pe.and(Mp,pe.not("config.editor.stablePeek"))});To.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:pe.and(Mp,Wbe,BX.negate(),wX.negate()),handler(u){var e;const n=(e=u.get(O0).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Og&&Tp(u,i=>i.revealReference(n[0]))}});To.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:pe.and(Mp,Wbe,BX.negate(),wX.negate()),handler(u){var e;const n=(e=u.get(O0).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Og&&Tp(u,i=>i.openReference(n[0],!0,!0))}});Xt.registerCommand("openReference",u=>{var e;const n=(e=u.get(O0).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Og&&Tp(u,i=>i.openReference(n[0],!1,!0))});var U2e=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Eb=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const lee=new Ne("hasSymbols",!1,v("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),SN=Gt("ISymbolNavigationService");let EU=class{constructor(e,t,n,i){this._editorService=t,this._notificationService=n,this._keybindingService=i,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=lee.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const n=new gU(this._editorService),i=n.onDidChange(r=>{if(this._ignoreEditorChange)return;const a=this._editorService.getActiveCodeEditor();if(!a)return;const o=a.getModel(),s=a.getPosition();if(!o||!s)return;let l=!1,c=!1;for(const d of t.references)if(OP(d.uri,o.uri))l=!0,c=c||O.containsPosition(d.range,s);else if(l)break;(!l||!c)&&this.reset()});this._currentState=Dl(n,i)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:O.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),n=t?v("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):v("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(n)}};EU=U2e([Eb(0,Et),Eb(1,hu),Eb(2,ci),Eb(3,on)],EU);iu(SN,EU,1);Be(new class extends Dr{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:lee,kbOpts:{weight:100,primary:70}})}runEditorCommand(u,e){return u.get(SN).revealNext(e)}});To.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:lee,primary:9,handler(u){u.get(SN).reset()}});let gU=class{constructor(e){this._listener=new Map,this._disposables=new fe,this._onDidChange=new ee,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(),Au(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,Dl(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};gU=U2e([Eb(0,hu)],gU);var cee=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function cA(u,e,t,n){return cee(this,void 0,void 0,function*(){const r=t.ordered(u).map(o=>Promise.resolve(n(o,u,e)).then(void 0,s=>{Ni(s)})),a=yield Promise.all(r);return c1(a.flat())})}function BN(u,e,t,n){return cA(e,t,u,(i,r,a)=>i.provideDefinition(r,a,n))}function q2e(u,e,t,n){return cA(e,t,u,(i,r,a)=>i.provideDeclaration(r,a,n))}function J2e(u,e,t,n){return cA(e,t,u,(i,r,a)=>i.provideImplementation(r,a,n))}function Z2e(u,e,t,n){return cA(e,t,u,(i,r,a)=>i.provideTypeDefinition(r,a,n))}function wN(u,e,t,n,i){return cA(e,t,u,(r,a,o)=>cee(this,void 0,void 0,function*(){const s=yield r.provideReferences(a,o,{includeDeclaration:!0},i);if(!n||!s||s.length!==2)return s;const l=yield r.provideReferences(a,o,{includeDeclaration:!1},i);return l&&l.length===1?l:s}))}function dA(u){return cee(this,void 0,void 0,function*(){const e=yield u(),t=new rs(e,""),n=t.references.map(i=>i.link);return t.dispose(),n})}M1("_executeDefinitionProvider",(u,e,t)=>{const n=u.get($e),i=BN(n.definitionProvider,e,t,Vt.None);return dA(()=>i)});M1("_executeTypeDefinitionProvider",(u,e,t)=>{const n=u.get($e),i=Z2e(n.typeDefinitionProvider,e,t,Vt.None);return dA(()=>i)});M1("_executeDeclarationProvider",(u,e,t)=>{const n=u.get($e),i=q2e(n.declarationProvider,e,t,Vt.None);return dA(()=>i)});M1("_executeReferenceProvider",(u,e,t)=>{const n=u.get($e),i=wN(n.referenceProvider,e,t,!1,Vt.None);return dA(()=>i)});M1("_executeImplementationProvider",(u,e,t)=>{const n=u.get($e),i=J2e(n.implementationProvider,e,t,Vt.None);return dA(()=>i)});var vl=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},Uj,qj,Jj,Zj,Yj,Qj,Xj,eV;oa.appendMenuItem(G.EditorContext,{submenu:G.EditorContextPeek,title:v("peek.submenu","Peek"),group:"navigation",order:100});class rv{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof rv||ue.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}}class xa extends vp{static all(){return xa._allSymbolNavigationCommands.values()}static _patchConfig(e){const t=Object.assign(Object.assign({},e),{f1:!0});if(t.menu)for(const n of Jt.wrap(t.menu))(n.id===G.EditorContext||n.id===G.EditorContextPeek)&&(n.when=pe.and(e.precondition,n.when));return t}constructor(e,t){super(xa._patchConfig(t)),this.configuration=e,xa._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,n,i){if(!t.hasModel())return Promise.resolve(void 0);const r=e.get(ci),a=e.get(hu),o=e.get(p4),s=e.get(SN),l=e.get($e),c=e.get(mt),d=t.getModel(),h=t.getPosition(),E=rv.is(n)?n:new rv(d,h),g=new Ng(t,5),m=CP(this._getLocationModel(l,E.model,E.position,g.token),g.token).then(f=>vl(this,void 0,void 0,function*(){var p;if(!f||g.token.isCancellationRequested)return;Aa(f.ariaMessage);let D;if(f.referenceAt(d.uri,h)){const b=this._getAlternativeCommand(t);!xa._activeAlternativeCommands.has(b)&&xa._allSymbolNavigationCommands.has(b)&&(D=xa._allSymbolNavigationCommands.get(b))}const x=f.references.length;if(x===0){if(!this.configuration.muteMessage){const b=d.getWordAtPosition(h);(p=is.get(t))===null||p===void 0||p.showMessage(this._getNoResultFoundMessage(b),h)}}else if(x===1&&D)xa._activeAlternativeCommands.add(this.desc.id),c.invokeFunction(b=>D.runEditorCommand(b,t,n,i).finally(()=>{xa._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(a,s,t,f,i)}),f=>{r.error(f)}).finally(()=>{g.dispose()});return o.showWhile(m,250),m}_onResult(e,t,n,i,r){return vl(this,void 0,void 0,function*(){const a=this._getGoToPreference(n);if(!(n instanceof Ig)&&(this.configuration.openInPeek||a==="peek"&&i.references.length>1))this._openInPeek(n,i,r);else{const o=i.firstReference(),s=i.references.length>1&&a==="gotoAndPeek",l=yield this._openReference(n,e,o,this.configuration.openToSide,!s);s&&l?this._openInPeek(l,i,r):i.dispose(),a==="goto"&&t.put(o)}})}_openReference(e,t,n,i,r){return vl(this,void 0,void 0,function*(){let a;if(Aqe(n)&&(a=n.targetSelectionRange),a||(a=n.range),!a)return;const o=yield t.openCodeEditor({resource:n.uri,options:{selection:O.collapseToStart(a),selectionRevealType:3,selectionSource:"code.jump"}},e,i);if(o){if(r){const s=o.getModel(),l=o.createDecorationsCollection([{range:a,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{o.getModel()===s&&l.clear()},350)}return o}})}_openInPeek(e,t,n){const i=jg.get(e);i&&e.hasModel()?i.toggleWidget(n??e.getSelection(),$i(r=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}}xa._allSymbolNavigationCommands=new Map;xa._activeAlternativeCommands=new Set;class hA extends xa{_getLocationModel(e,t,n,i){return vl(this,void 0,void 0,function*(){return new rs(yield BN(e.definitionProvider,t,n,i),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(57).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(57).multipleDefinitions}}fi((Uj=class mU extends hA{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:mU.id,title:{value:v("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:v({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:pe.and(K.hasDefinitionProvider,K.isInWalkThroughSnippet.toNegated()),keybinding:[{when:K.editorTextFocus,primary:70,weight:100},{when:pe.and(K.editorTextFocus,Hbe),primary:2118,weight:100}],menu:[{id:G.EditorContext,group:"navigation",order:1.1},{id:G.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),Xt.registerCommandAlias("editor.action.goToDeclaration",mU.id)}},Uj.id="editor.action.revealDefinition",Uj));fi((qj=class fU extends hA{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:fU.id,title:{value:v("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:pe.and(K.hasDefinitionProvider,K.isInWalkThroughSnippet.toNegated()),keybinding:[{when:K.editorTextFocus,primary:Ri(2089,70),weight:100},{when:pe.and(K.editorTextFocus,Hbe),primary:Ri(2089,2118),weight:100}]}),Xt.registerCommandAlias("editor.action.openDeclarationToTheSide",fU.id)}},qj.id="editor.action.revealDefinitionAside",qj));fi((Jj=class pU extends hA{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:pU.id,title:{value:v("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:pe.and(K.hasDefinitionProvider,Po.notInPeekEditor,K.isInWalkThroughSnippet.toNegated()),keybinding:{when:K.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:G.EditorContextPeek,group:"peek",order:2}}),Xt.registerCommandAlias("editor.action.previewDeclaration",pU.id)}},Jj.id="editor.action.peekDefinition",Jj));class Y2e extends xa{_getLocationModel(e,t,n,i){return vl(this,void 0,void 0,function*(){return new rs(yield q2e(e.declarationProvider,t,n,i),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(57).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(57).multipleDeclarations}}fi((Zj=class Q2e extends Y2e{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Q2e.id,title:{value:v("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:v({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:pe.and(K.hasDeclarationProvider,K.isInWalkThroughSnippet.toNegated()),menu:[{id:G.EditorContext,group:"navigation",order:1.3},{id:G.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")}},Zj.id="editor.action.revealDeclaration",Zj));fi(class extends Y2e{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:v("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:pe.and(K.hasDeclarationProvider,Po.notInPeekEditor,K.isInWalkThroughSnippet.toNegated()),menu:{id:G.EditorContextPeek,group:"peek",order:3}})}});class X2e extends xa{_getLocationModel(e,t,n,i){return vl(this,void 0,void 0,function*(){return new rs(yield Z2e(e.typeDefinitionProvider,t,n,i),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(57).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(57).multipleTypeDefinitions}}fi((Yj=class eye extends X2e{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:eye.ID,title:{value:v("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:v({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:pe.and(K.hasTypeDefinitionProvider,K.isInWalkThroughSnippet.toNegated()),keybinding:{when:K.editorTextFocus,primary:0,weight:100},menu:[{id:G.EditorContext,group:"navigation",order:1.4},{id:G.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},Yj.ID="editor.action.goToTypeDefinition",Yj));fi((Qj=class tye extends X2e{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:tye.ID,title:{value:v("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:pe.and(K.hasTypeDefinitionProvider,Po.notInPeekEditor,K.isInWalkThroughSnippet.toNegated()),menu:{id:G.EditorContextPeek,group:"peek",order:4}})}},Qj.ID="editor.action.peekTypeDefinition",Qj));class uye extends xa{_getLocationModel(e,t,n,i){return vl(this,void 0,void 0,function*(){return new rs(yield J2e(e.implementationProvider,t,n,i),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(57).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(57).multipleImplementations}}fi((Xj=class nye extends uye{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:nye.ID,title:{value:v("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:v({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:pe.and(K.hasImplementationProvider,K.isInWalkThroughSnippet.toNegated()),keybinding:{when:K.editorTextFocus,primary:2118,weight:100},menu:[{id:G.EditorContext,group:"navigation",order:1.45},{id:G.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},Xj.ID="editor.action.goToImplementation",Xj));fi((eV=class iye extends uye{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:iye.ID,title:{value:v("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:pe.and(K.hasImplementationProvider,Po.notInPeekEditor,K.isInWalkThroughSnippet.toNegated()),keybinding:{when:K.editorTextFocus,primary:3142,weight:100},menu:{id:G.EditorContextPeek,group:"peek",order:5}})}},eV.ID="editor.action.peekImplementation",eV));class rye extends xa{_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(57).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(57).multipleReferences}}fi(class extends rye{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:v("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:v({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:pe.and(K.hasReferenceProvider,Po.notInPeekEditor,K.isInWalkThroughSnippet.toNegated()),keybinding:{when:K.editorTextFocus,primary:1094,weight:100},menu:[{id:G.EditorContext,group:"navigation",order:1.45},{id:G.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,n,i){return vl(this,void 0,void 0,function*(){return new rs(yield wN(e.referenceProvider,t,n,!0,i),v("ref.title","References"))})}});fi(class extends rye{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:v("references.action.label","Peek References"),original:"Peek References"},precondition:pe.and(K.hasReferenceProvider,Po.notInPeekEditor,K.isInWalkThroughSnippet.toNegated()),menu:{id:G.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,n,i){return vl(this,void 0,void 0,function*(){return new rs(yield wN(e.referenceProvider,t,n,!1,i),v("ref.title","References"))})}});class hgt extends xa{constructor(e,t,n){super(e,{id:"editor.action.goToLocation",title:{value:v("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:pe.and(Po.notInPeekEditor,K.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=n}_getLocationModel(e,t,n,i){return vl(this,void 0,void 0,function*(){return new rs(this._references,v("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&v("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(57).multipleReferences}_getAlternativeCommand(){return""}}Xt.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:lt},{name:"position",description:"The position at which to start",constraint:ue.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:(u,e,t,n,i,r,a)=>vl(void 0,void 0,void 0,function*(){Iu(lt.isUri(e)),Iu(ue.isIPosition(t)),Iu(Array.isArray(n)),Iu(typeof i>"u"||typeof i=="string"),Iu(typeof a>"u"||typeof a=="boolean");const o=u.get(hu),s=yield o.openCodeEditor({resource:e},o.getFocusedCodeEditor());if(v1(s))return s.setPosition(t),s.revealPositionInCenterIfOutsideViewport(t,0),s.invokeWithinContext(l=>{const c=new class extends hgt{_getNoResultFoundMessage(d){return r||super._getNoResultFoundMessage(d)}}({muteMessage:!r,openInPeek:!!a,openToSide:!1},n,i);l.get(mt).invokeFunction(c.run.bind(c),s)})})});Xt.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:lt},{name:"position",description:"The position at which to start",constraint:ue.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:(u,e,t,n,i)=>vl(void 0,void 0,void 0,function*(){u.get(ei).executeCommand("editor.action.goToLocations",e,t,n,i,void 0,!0)})});Xt.registerCommand({id:"editor.action.findReferences",handler:(u,e,t)=>{Iu(lt.isUri(e)),Iu(ue.isIPosition(t));const n=u.get($e),i=u.get(hu);return i.openCodeEditor({resource:e},i.getFocusedCodeEditor()).then(r=>{if(!v1(r)||!r.hasModel())return;const a=jg.get(r);if(!a)return;const o=$i(l=>wN(n.referenceProvider,r.getModel(),ue.lift(t),!1,l).then(c=>new rs(c,v("ref.title","References")))),s=new O(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(a.toggleWidget(s,o,!1))})}});Xt.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");var Egt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},tV=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},W0e=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let T3=class NS{constructor(e,t,n,i){this.textModelResolverService=t,this.languageService=n,this.languageFeaturesService=i,this.toUnhook=new fe,this.toUnhookForKeyboard=new fe,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const r=new kN(e);this.toUnhook.add(r),this.toUnhook.add(r.onMouseMoveOrRelevantKeyDown(([a,o])=>{this.startFindDefinitionFromMouse(a,Gr(o))})),this.toUnhook.add(r.onExecute(a=>{this.isEnabled(a)&&this.gotoDefinition(a.target.position,a.hasSideBySideModifier).catch(o=>{wt(o)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(r.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(NS.ID)}startFindDefinitionFromCursor(e){return W0e(this,void 0,void 0,function*(){yield this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const n=e.target.position;this.startFindDefinition(n)}startFindDefinition(e){var t;return W0e(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();const n=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.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 i=new kke(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=$i(o=>this.findDefinition(e,o));let r;try{r=yield this.previousPromise}catch(o){wt(o);return}if(!r||!r.length||!i.validate(this.editor)){this.removeLinkDecorations();return}const a=r[0].originSelectionRange?O.lift(r[0].originSelectionRange):new O(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn);if(r.length>1){let o=a;for(const{originSelectionRange:s}of r)s&&(o=O.plusRange(o,s));this.addDecoration(o,new _r().appendText(v("multipleResults","Click to show {0} definitions.",r.length)))}else{const o=r[0];if(!o.uri)return;this.textModelResolverService.createModelReference(o.uri).then(s=>{if(!s.object||!s.object.textEditorModel){s.dispose();return}const{object:{textEditorModel:l}}=s,{startLineNumber:c}=o.range;if(c<1||c>l.getLineCount()){s.dispose();return}const d=this.getPreviewValue(l,c,o),h=this.languageService.guessLanguageIdByFilepathOrFirstLine(l.uri);this.addDecoration(a,d?new _r().appendCodeblock(h||"",d):void 0),s.dispose()})}})}getPreviewValue(e,t,n){let i=n.range;return i.endLineNumber-i.startLineNumber>=NS.MAX_SOURCE_PREVIEW_LINES&&(i=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,i)}stripIndentationFromPreviewRange(e,t,n){let r=e.getLineFirstNonWhitespaceColumn(t);for(let o=t+1;o{const i=!t&&this.editor.getOption(86)&&!this.isInPeekEditor(n);return new hA({openToSide:t,openInPeek:i,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(n)})}isInPeekEditor(e){const t=e.get(Et);return Po.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};T3.ID="editor.contrib.gotodefinitionatposition";T3.MAX_SOURCE_PREVIEW_LINES=8;T3=Egt([tV(1,jo),tV(2,Dn),tV(3,$e)],T3);Eu(T3.ID,T3,2);const d7=ve;class aye extends ie{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new Xv(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class dee extends ie{static render(e,t,n){return new dee(e,t,n)}constructor(e,t,n){super(),this.actionContainer=de(e,d7("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=de(this.actionContainer,d7("a.action")),this.action.setAttribute("role","button"),t.iconClass&&de(this.action,d7(`span.icon.${t.iconClass}`));const i=de(this.action,d7("span"));i.textContent=n?`${t.label} (${n})`:t.label,this._register(ce(this.actionContainer,Me.CLICK,r=>{r.stopPropagation(),r.preventDefault(),t.run(this.actionContainer)})),this._register(ce(this.actionContainer,Me.KEY_DOWN,r=>{const a=new un(r);(a.equals(3)||a.equals(10))&&(r.stopPropagation(),r.preventDefault(),t.run(this.actionContainer))})),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}var ggt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},mgt=globalThis&&globalThis.__asyncValues||function(u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=u[Symbol.asyncIterator],t;return e?e.call(u):(u=typeof __values=="function"?__values(u):u[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=u[r]&&function(a){return new Promise(function(o,s){a=u[r](a),i(o,s,a.done,a.value)})}}function i(r,a,o,s){Promise.resolve(s).then(function(l){r({value:l,done:o})},a)}};let fgt=class{constructor(e,t,n){this.value=e,this.isComplete=t,this.hasLoadingMessage=n}};class oye extends ie{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new ee),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new Hu(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new Hu(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new Hu(()=>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(59).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=lZe(e=>this._computer.computeAsync(e)),ggt(this,void 0,void 0,function*(){var e,t,n,i;try{try{for(var r=!0,a=mgt(this._asyncIterable),o;o=yield a.next(),e=o.done,!e;r=!0){i=o.value,r=!1;const s=i;s&&(this._result.push(s),this._fireResult())}}catch(s){t={error:s}}finally{try{!r&&!e&&(n=a.return)&&(yield n.call(a))}finally{if(t)throw t.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(s){wt(s)}})):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,t=this._state===4;this._onResult.fire(new fgt(this._result.slice(0),e,t))}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 uV{constructor(e,t,n,i){this.priority=e,this.range=t,this.initialMousePosX=n,this.initialMousePosY=i,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class RS{constructor(e,t,n,i,r,a){this.priority=e,this.owner=t,this.range=n,this.initialMousePosX=i,this.initialMousePosY=r,this.supportsMarkerHover=a,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}const Pp=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class hee{constructor(){this._onDidWillResize=new ee,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new ee,this.onDidResize=this._onDidResize.event,this._sashListener=new fe,this._size=new Du(0,0),this._minSize=new Du(0,0),this._maxSize=new Du(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new Vr(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new Vr(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new Vr(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:CB.North}),this._southSash=new Vr(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:CB.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,n=0;this._sashListener.add(Ke.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,n=0)})),this._sashListener.add(Ke.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,n=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(i=>{e&&(n=i.currentX-i.startX,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(i=>{e&&(n=-(i.currentX-i.startX),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(i=>{e&&(t=-(i.currentY-i.startY),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(i=>{e&&(t=i.currentY-i.startY,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(Ke.any(this._eastSash.onDidReset,this._westSash.onDidReset)(i=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(Ke.any(this._northSash.onDidReset,this._southSash.onDidReset)(i=>{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,t,n,i){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=n?3:0,this._westSash.state=i?3:0}layout(e=this.size.height,t=this.size.width){const{height:n,width:i}=this._minSize,{height:r,width:a}=this._maxSize;e=Math.max(n,Math.min(r,e)),t=Math.max(i,Math.min(a,t));const o=new Du(t,e);Du.equals(o,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=o,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 pgt=30,Dgt=24;class xgt extends ie{constructor(e,t=new Du(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new hee),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=Du.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(n=>{this._resize(new Du(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?ue.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);return!t||!n?void 0:mi(t).top+n.top-pgt}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);if(!t||!n)return;const i=mi(t),r=Zv(document.body),a=i.top+n.top+n.height;return r.height-a-Dgt}_findPositionPreference(e,t){var n,i;const r=Math.min((n=this._availableVerticalSpaceBelow(t))!==null&&n!==void 0?n:1/0,e),a=Math.min((i=this._availableVerticalSpaceAbove(t))!==null&&i!==void 0?i:1/0,e),o=Math.min(Math.max(a,r),e),s=Math.min(e,o);let l;return this._editor.getOption(59).above?l=s<=a?1:2:l=s<=r?2:1,l===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),l}_resize(e){this._resizableNode.layout(e.height,e.width)}}var Eee=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},ow=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const G0e=ve;let sw=class DU extends ie{constructor(e,t,n){super(),this._editor=e,this._instantiationService=t,this._keybindingService=n,this._currentResult=null;const i=this._editor.getOption(65)+8,r=4/3*i,a=new Du(r,i);this._widget=this._register(this._instantiationService.createInstance(XE,this._editor,a)),this._participants=[];for(const o of Pp.getAll())this._participants.push(this._instantiationService.createInstance(o,this._editor));this._participants.sort((o,s)=>o.hoverOrdinal-s.hoverOrdinal),this._computer=new cw(this._editor,this._participants),this._hoverOperation=this._register(new oye(this._editor,this._computer)),this._register(this._hoverOperation.onResult(o=>{if(!this._computer.anchor)return;const s=o.hasLoadingMessage?this._addLoadingMessage(o.value):o.value;this._withResult(new sye(this._computer.anchor,s,o.isComplete))})),this._register(li(this._widget.getDomNode(),"keydown",o=>{o.equals(9)&&this.hide()})),this._register(Kn.onDidChange(()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}get widget(){return this._widget}maybeShowAt(e){if(this._widget.isResizing)return!0;const t=[];for(const i of this._participants)if(i.suggestHoverAnchor){const r=i.suggestHoverAnchor(e);r&&t.push(r)}const n=e.target;if(n.type===6&&t.push(new uV(0,n.range,e.event.posx,e.event.posy)),n.type===7){const i=this._editor.getOption(49).typicalHalfwidthCharacterWidth/2;!n.detail.isAfterLines&&typeof n.detail.horizontalDistanceToText=="number"&&n.detail.horizontalDistanceToTextr.priority-i.priority),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,n,i){this._startShowingOrUpdateHover(new uV(0,e,void 0,void 0),t,n,i,null)}_startShowingOrUpdateHover(e,t,n,i,r){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,t,n,i,!1),!0):!1:this._editor.getOption(59).sticky&&r&&this._widget.isMouseGettingCloser(r.event.posx,r.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,n,i,!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,t,n,i,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,n,i,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,n,i,r){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=i,this._computer.source=n,this._computer.insistOnKeepingHoverVisible=r,this._hoverOperation.start(t))}_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())}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}containsNode(e){return e?this._widget.getDomNode().contains(e):!1}_addLoadingMessage(e){if(this._computer.anchor){for(const t of this._participants)if(t.createLoadingMessage){const n=t.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,t){const{showAtPosition:n,showAtSecondaryPosition:i,highlightRange:r}=DU.computeHoverRanges(this._editor,e.range,t),a=new fe,o=a.add(new lw(this._keybindingService)),s=document.createDocumentFragment();let l=null;const c={fragment:s,statusBar:o,setColorPicker:h=>l=h,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:h=>this._widget.setMinimumDimensions(h),hide:()=>this.hide()};for(const h of this._participants){const E=t.filter(g=>g.owner===h);E.length>0&&a.add(h.renderHoverParts(c,E))}const d=t.some(h=>h.isBeforeContent);if(o.hasContent&&s.appendChild(o.hoverElement),s.hasChildNodes()){if(r){const h=this._editor.createDecorationsCollection();h.set([{range:r,options:DU._DECORATION_OPTIONS}]),a.add(bt(()=>{h.clear()}))}this._widget.showAt(s,new Cgt(l,n,i,this._editor.getOption(59).above,this._computer.shouldFocus,this._computer.source,d,e.initialMousePosX,e.initialMousePosY,a))}else a.dispose()}static computeHoverRanges(e,t,n){let i=1;if(e.hasModel()){const l=e._getViewModel(),c=l.coordinatesConverter,d=c.convertModelRangeToViewRange(t),h=new ue(d.startLineNumber,l.getLineMinColumn(d.startLineNumber));i=c.convertViewPositionToModelPosition(h).column}const r=t.startLineNumber;let a=t.startColumn,o=n[0].range,s=null;for(const l of n)o=O.plusRange(o,l.range),l.range.startLineNumber===r&&l.range.endLineNumber===r&&(a=Math.max(Math.min(a,l.range.startColumn),i)),l.forceShowAtRange&&(s=l.range);return{showAtPosition:s?s.getStartPosition():new ue(r,t.startColumn),showAtSecondaryPosition:s?s.getStartPosition():new ue(r,a),highlightRange:o}}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()}};sw._DECORATION_OPTIONS=gt.register({description:"content-hover-highlight",className:"hoverHighlight"});sw=Eee([ow(1,mt),ow(2,on)],sw);class sye{constructor(e,t,n){this.anchor=e,this.messages=t,this.isComplete=n}filter(e){const t=this.messages.filter(n=>n.isValidForHoverAnchor(e));return t.length===this.messages.length?this:new vgt(this,this.anchor,t,this.isComplete)}}class vgt extends sye{constructor(e,t,n,i){super(t,n,i),this.original=e}filter(e){return this.original.filter(e)}}class Cgt{constructor(e,t,n,i,r,a,o,s,l,c){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=n,this.preferAbove=i,this.stoleFocus=r,this.source=a,this.isBeforeContent=o,this.initialMousePosX=s,this.initialMousePosY=l,this.disposables=c,this.closestMouseDistance=void 0}}const U0e=30,nV=10,bgt=6;let XE=class nh extends xgt{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,t,n){super(e,t),this._hover=this._register(new aye),this._hoverVisibleKey=K.hoverVisible.bindTo(n),this._hoverFocusedKey=K.hoverFocused.bindTo(n),de(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(49)&&this._updateFont()}));const i=this._register(g1(this._resizableNode.domNode));this._register(i.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(i.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setHoverData(void 0),this._layout(),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 nh.ID}static _applyDimensions(e,t,n){const i=typeof t=="number"?`${t}px`:t,r=typeof n=="number"?`${n}px`:n;e.style.width=i,e.style.height=r}_setContentsDomNodeDimensions(e,t){const n=this._hover.contentsDomNode;return nh._applyDimensions(n,e,t)}_setContainerDomNodeDimensions(e,t){const n=this._hover.containerDomNode;return nh._applyDimensions(n,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,n){const i=typeof t=="number"?`${t}px`:t,r=typeof n=="number"?`${n}px`:n;e.style.maxWidth=i,e.style.maxHeight=r}_setHoverWidgetMaxDimensions(e,t){nh._applyMaxDimensions(this._hover.contentsDomNode,e,t),nh._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_hasHorizontalScrollbar(){const e=this._hover.scrollbar.getScrollDimensions();return e.scrollWidth>e.width}_adjustContentsBottomPadding(){const e=this._hover.contentsDomNode,t=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;e.style.paddingBottom!==t&&(e.style.paddingBottom=t)}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const t=e.width,n=e.height;this._setHoverWidgetDimensions(t,n),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(t,n-nV))}_setResizableNodeMaxDimensions(){var e,t;const n=(e=this._findMaximumRenderingWidth())!==null&&e!==void 0?e:1/0,i=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._resizableNode.maxSize=new Du(n,i),this._setHoverWidgetMaxDimensions(n,i)}_resize(e){var t,n;nh._lastDimensions=new Du(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._setResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),(n=(t=this._visibleData)===null||t===void 0?void 0:t.colorPicker)===null||n===void 0||n.layout()}_findAvailableSpaceVertically(){var e;const t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition;if(t)return this._positionPreference===1?this._availableVerticalSpaceAbove(t):this._availableVerticalSpaceBelow(t)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=bgt;return Array.from(this._hover.contentsDomNode.children).forEach(n=>{t+=n.clientHeight}),this._hasHorizontalScrollbar()&&(t+=nV),Math.min(e,t)}_findMaximumRenderingWidth(){return!this._editor||!this._editor.hasModel()?void 0:Zv(document.body).width-14}isMouseGettingCloser(e,t){if(!this._visibleData)return!1;if(typeof this._visibleData.initialMousePosX>"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=t,!1;const n=mi(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=q0e(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,n.left,n.top,n.width,n.height));const i=q0e(e,t,n.left,n.top,n.width,n.height);return i>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,i),!0)}_setHoverData(e){var t;(t=this._visibleData)===null||t===void 0||t.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_layout(){const{fontSize:e,lineHeight:t}=this._editor.getOption(49),n=this._hover.contentsDomNode;n.style.fontSize=`${e}px`,n.style.lineHeight=`${t/e}`,this._updateMaxDimensions()}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_updateContent(e){const t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,nh._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,500,nh._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e,t){this._setHoverData(t),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,t){var n,i;if(!this._editor||!this._editor.hasModel())return;this._render(e,t);const r=kf(this._hover.containerDomNode),a=t.showAtPosition;this._positionPreference=(n=this._findPositionPreference(r,a))!==null&&n!==void 0?n:1,this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),(i=t.colorPicker)===null||i===void 0||i.layout()}hide(){if(!this._visibleData)return;const e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new Du(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")}_adjustHoverHeightForScrollbar(e){var t;const n=this._hover.containerDomNode,i=this._hover.contentsDomNode,r=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._setContainerDomNodeDimensions(vo(n),Math.min(r,e)),this._setContentsDomNodeDimensions(vo(i),Math.min(r,e-nV))}setMinimumDimensions(e){this._resizableNode.minSize=e}onContentsChanged(){var e;this._removeConstraintsRenderNormally();const t=this._hover.containerDomNode;let n=kf(t),i=vo(t);if(this._resizableNode.layout(n,i),this._setHoverWidgetDimensions(i,n),n=kf(t),i=vo(t),this._resizableNode.layout(n,i),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(n)),!((e=this._visibleData)===null||e===void 0)&&e.showAtPosition){const r=kf(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(r,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(49);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(49);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-U0e})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+U0e})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};XE.ID="editor.contrib.resizableContentHoverWidget";XE._lastDimensions=new Du(0,0);XE=Eee([ow(2,Et)],XE);let lw=class extends ie{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=G0e("div.hover-row.status-bar"),this.actionsElement=de(this.hoverElement,G0e("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;return this._hasContent=!0,this._register(dee.render(this.actionsElement,e,n))}append(e){const t=de(this.actionsElement,e);return this._hasContent=!0,t}};lw=Eee([ow(0,on)],lw);class cw{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,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(t.type!==1&&!t.supportsMarkerHover)return[];const n=e.getModel(),i=t.range.startLineNumber;if(i>n.getLineCount())return[];const r=n.getLineMaxColumn(i);return e.getLineDecorations(i).filter(a=>{if(a.options.isWholeLine)return!0;const o=a.range.startLineNumber===i?a.range.startColumn:1,s=a.range.endLineNumber===i?a.range.endColumn:r;if(a.options.showIfCollapsed){if(o>t.range.startColumn+1||t.range.endColumn-1>s)return!1}else if(o>t.range.startColumn||t.range.endColumn>s)return!1;return!0})}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return ki.EMPTY;const n=cw._getLineDecorations(this._editor,t);return ki.merge(this._participants.map(i=>i.computeAsync?i.computeAsync(t,n,e):ki.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=cw._getLineDecorations(this._editor,this._anchor);let t=[];for(const n of this._participants)t=t.concat(n.computeSync(this._anchor,e));return c1(t)}}function q0e(u,e,t,n,i,r){const a=t+i/2,o=n+r/2,s=Math.max(Math.abs(u-a)-i/2,0),l=Math.max(Math.abs(e-o)-r/2,0);return Math.sqrt(s*s+l*l)}const J0e=ve;class a5 extends ie{constructor(e,t,n){super(),this._renderDisposeables=this._register(new fe),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new aye),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new u4({editor:this._editor},t,n)),this._computer=new kgt(this._editor),this._hoverOperation=this._register(new oye(this._editor,this._computer)),this._register(this._hoverOperation.onResult(i=>{this._withResult(i.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(49)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return a5.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,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,t){this._renderDisposeables.clear();const n=document.createDocumentFragment();for(const i of t){const r=J0e("div.hover-row.markdown-hover"),a=de(r,J0e("div.hover-contents")),o=this._renderDisposeables.add(this._markdownRenderer.render(i.value));a.appendChild(o.element),n.appendChild(r)}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 t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),i=this._editor.getScrollTop(),r=this._editor.getOption(65),a=this._hover.containerDomNode.clientHeight,o=n-i-(a-r)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(o),0)}px`}}a5.ID="editor.contrib.modesGlyphHoverWidget";class kgt{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){const e=i=>({value:i}),t=this._editor.getLineDecorations(this._lineNumber),n=[];if(!t)return n;for(const i of t){if(!i.options.glyphMarginClassName)continue;const r=i.options.glyphMarginHoverMessage;!r||U5(r)||n.push(...TY(r).map(e))}return n}}var ygt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Fgt{constructor(e,t,n){this.provider=e,this.hover=t,this.ordinal=n}}function Agt(u,e,t,n,i){return ygt(this,void 0,void 0,function*(){try{const r=yield Promise.resolve(u.provideHover(t,n,i));if(r&&Sgt(r))return new Fgt(u,r,e)}catch(r){Ni(r)}})}function gee(u,e,t,n){const r=u.ordered(e).map((a,o)=>Agt(a,o,e,t,n));return ki.fromPromises(r).coalesce()}function _gt(u,e,t,n){return gee(u,e,t,n).map(i=>i.hover).toPromise()}M1("_executeHoverProvider",(u,e,t)=>{const n=u.get($e);return _gt(n.hoverProvider,e,t,Vt.None)});function Sgt(u){const e=typeof u.range<"u",t=typeof u.contents<"u"&&u.contents&&u.contents.length>0;return e&&t}var Bgt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},h7=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const Z0e=ve;class xc{constructor(e,t,n,i,r){this.owner=e,this.range=t,this.contents=n,this.isBeforeContent=i,this.ordinal=r}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let dw=class{constructor(e,t,n,i,r){this._editor=e,this._languageService=t,this._openerService=n,this._configurationService=i,this._languageFeaturesService=r,this.hoverOrdinal=3}createLoadingMessage(e){return new xc(this,e.range,[new _r().appendText(v("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const n=this._editor.getModel(),i=e.range.startLineNumber,r=n.getLineMaxColumn(i),a=[];let o=1e3;const s=n.getLineLength(i),l=n.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),c=this._editor.getOption(115),d=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:l});let h=!1;c>=0&&s>c&&e.range.startColumn>=c&&(h=!0,a.push(new xc(this,e.range,[{value:v("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,o++))),!h&&typeof d=="number"&&s>=d&&a.push(new xc(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,o++));let E=!1;for(const g of t){const m=g.range.startLineNumber===i?g.range.startColumn:1,f=g.range.endLineNumber===i?g.range.endColumn:r,p=g.options.hoverMessage;if(!p||U5(p))continue;g.options.beforeContentClassName&&(E=!0);const D=new O(e.range.startLineNumber,m,e.range.startLineNumber,f);a.push(new xc(this,D,TY(p),E,o++))}return a}computeAsync(e,t,n){if(!this._editor.hasModel()||e.type!==1)return ki.EMPTY;const i=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(i))return ki.EMPTY;const r=new ue(e.range.startLineNumber,e.range.startColumn);return gee(this._languageFeaturesService.hoverProvider,i,r,n).filter(a=>!U5(a.hover.contents)).map(a=>{const o=a.hover.range?O.lift(a.hover.range):e.range;return new xc(this,o,a.hover.contents,!1,a.ordinal)})}renderHoverParts(e,t){return lye(e,t,this._editor,this._languageService,this._openerService)}};dw=Bgt([h7(1,Dn),h7(2,gs),h7(3,nu),h7(4,$e)],dw);function lye(u,e,t,n,i){e.sort((a,o)=>a.ordinal-o.ordinal);const r=new fe;for(const a of e)for(const o of a.contents){if(U5(o))continue;const s=Z0e("div.hover-row.markdown-hover"),l=de(s,Z0e("div.hover-contents")),c=r.add(new u4({editor:t},n,i));r.add(c.onDidRenderAsync(()=>{l.className="hover-contents code-hover-contents",u.onContentsChanged()}));const d=r.add(c.render(o));l.appendChild(d.element),u.fragment.appendChild(s)}return r}var cye=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},hw=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};class Y0e{constructor(e,t,n){this.marker=e,this.index=t,this.total=n}}let xU=class{constructor(e,t,n){this._markerService=t,this._configService=n,this._onDidChange=new ee,this.onDidChange=this._onDidChange.event,this._dispoables=new fe,this._markers=[],this._nextIdx=-1,lt.isUri(e)?this._resourceFilter=o=>o.toString()===e.toString():e&&(this._resourceFilter=e);const i=this._configService.getValue("problems.sortOrder"),r=(o,s)=>{let l=Hk(o.resource.toString(),s.resource.toString());return l===0&&(i==="position"?l=O.compareRangesUsingStarts(o,s)||Wn.compare(o.severity,s.severity):l=Wn.compare(o.severity,s.severity)||O.compareRangesUsingStarts(o,s)),l},a=()=>{this._markers=this._markerService.read({resource:lt.isUri(e)?e:void 0,severities:Wn.Error|Wn.Warning|Wn.Info}),typeof e=="function"&&(this._markers=this._markers.filter(o=>this._resourceFilter(o.resource))),this._markers.sort(r)};a(),this._dispoables.add(t.onMarkerChanged(o=>{(!this._resourceFilter||o.some(s=>this._resourceFilter(s)))&&(a(),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 Y0e(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,n){let i=!1,r=this._markers.findIndex(a=>a.resource.toString()===e.uri.toString());r<0&&(r=Pk(this._markers,{resource:e.uri},(a,o)=>Hk(a.resource.toString(),o.resource.toString())),r<0&&(r=~r));for(let a=r;ai.resource.toString()===e.toString());if(!(n<0)){for(;n=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},cD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};class zgt{constructor(e,t,n,i,r){this._openerService=i,this._labelService=r,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new fe,this._editor=t;const a=document.createElement("div");a.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),a.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),a.appendChild(this._relatedBlock),this._disposables.add(li(this._relatedBlock,"click",o=>{o.preventDefault();const s=this._relatedDiagnostics.get(o.target);s&&n(s)})),this._scrollable=new TCe(a,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(o=>{a.style.left=`-${o.scrollLeft}px`,a.style.top=`-${o.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){Au(this._disposables)}update(e){const{source:t,message:n,relatedInformation:i,code:r}=e;let a=((t==null?void 0:t.length)||0)+2;r&&(typeof r=="string"?a+=r.length:a+=r.value.length);const o=E1(n);this._lines=o.length,this._longestLineLength=0;for(const h of o)this._longestLineLength=Math.max(h.length+a,this._longestLineLength);fr(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let s=this._messageBlock;for(const h of o)s=document.createElement("div"),s.innerText=h,h===""&&(s.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(s);if(t||r){const h=document.createElement("span");if(h.classList.add("details"),s.appendChild(h),t){const E=document.createElement("span");E.innerText=t,E.classList.add("source"),h.appendChild(E)}if(r)if(typeof r=="string"){const E=document.createElement("span");E.innerText=`(${r})`,E.classList.add("code"),h.appendChild(E)}else{this._codeLink=ve("a.code-link"),this._codeLink.setAttribute("href",`${r.target.toString()}`),this._codeLink.onclick=g=>{this._openerService.open(r.target,{allowCommands:!0}),g.preventDefault(),g.stopPropagation()};const E=de(this._codeLink,ve("span"));E.innerText=r.value,h.appendChild(this._codeLink)}}if(fr(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),ca(i)){const h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(65)*.66)}px`,this._lines+=1;for(const E of i){const g=document.createElement("div"),m=document.createElement("a");m.classList.add("filename"),m.innerText=`${this._labelService.getUriBasenameLabel(E.resource)}(${E.startLineNumber}, ${E.startColumn}): `,m.title=this._labelService.getUriLabel(E.resource),this._relatedDiagnostics.set(m,E);const f=document.createElement("span");f.innerText=E.message,g.appendChild(m),g.appendChild(f),this._lines+=1,h.appendChild(g)}}const l=this._editor.getOption(49),c=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),d=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,scrollHeight:d})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case Wn.Error:t=v("Error","Error");break;case Wn.Warning:t=v("Warning","Warning");break;case Wn.Info:t=v("Info","Info");break;case Wn.Hint:t=v("Hint","Hint");break}let n=v("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const i=this._editor.getModel();return i&&e.startLineNumber<=i.getLineCount()&&e.startLineNumber>=1&&(n=`${i.getLineContent(e.startLineNumber)}, ${n}`),n}}let av=class hye extends aw{constructor(e,t,n,i,r,a,o){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},r),this._themeService=t,this._openerService=n,this._menuService=i,this._contextKeyService=a,this._labelService=o,this._callOnDispose=new fe,this._onDidSelectRelatedInformation=new ee,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Wn.Warning,this._backgroundColor=ae.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Pgt);let t=bU,n=Lgt;this._severity===Wn.Warning?(t=IS,n=Mgt):this._severity===Wn.Info&&(t=kU,n=Tgt);const i=e.getColor(t),r=e.getColor(n);this.style({arrowColor:i,frameColor:i,headerBackgroundColor:r,primaryHeadingColor:e.getColor(K2e),secondaryHeadingColor:e.getColor(W2e)})}_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(i=>this.editor.focus()));const t=[],n=this._menuService.createMenu(hye.TitleMenu,this._contextKeyService);ybe(n,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=de(e,ve(""))}_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 zgt(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,n){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const i=O.lift(e),r=this.editor.getPosition(),a=r&&i.containsPosition(r)?r:i.getStartPosition();super.show(a,this.computeRequiredHeight());const o=this.editor.getModel();if(o){const s=n>1?v("problems","{0} of {1} problems",t,n):v("change","{0} of {1} problem",t,n);this.setTitle(B0(o.uri),s)}this._icon.className=`codicon ${CU.className(Wn.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(a,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,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),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()}};av.TitleMenu=new G("gotoErrorTitleMenu");av=wgt([cD(1,Ui),cD(2,gs),cD(3,L1),cD(4,mt),cD(5,Et),cD(6,q5)],av);const Q0e=t2(Kd,zXe),X0e=t2(zs,e2),ele=t2(Ls,rW),bU=U("editorMarkerNavigationError.background",{dark:Q0e,light:Q0e,hcDark:Zt,hcLight:Zt},v("editorMarkerNavigationError","Editor marker navigation widget error color.")),Lgt=U("editorMarkerNavigationError.headerBackground",{dark:tt(bU,.1),light:tt(bU,.1),hcDark:null,hcLight:null},v("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),IS=U("editorMarkerNavigationWarning.background",{dark:X0e,light:X0e,hcDark:Zt,hcLight:Zt},v("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),Mgt=U("editorMarkerNavigationWarning.headerBackground",{dark:tt(IS,.1),light:tt(IS,.1),hcDark:"#0C141F",hcLight:tt(IS,.2)},v("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),kU=U("editorMarkerNavigationInfo.background",{dark:ele,light:ele,hcDark:Zt,hcLight:Zt},v("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),Tgt=U("editorMarkerNavigationInfo.headerBackground",{dark:tt(kU,.1),light:tt(kU,.1),hcDark:null,hcLight:null},v("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),Pgt=U("editorMarkerNavigation.background",{dark:er,light:er,hcDark:er,hcLight:er},v("editorMarkerNavigationBackground","Editor marker navigation widget background."));var Ngt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},E7=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Eye=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let Vg=class OS{static get(e){return e.getContribution(OS.ID)}constructor(e,t,n,i,r){this._markerNavigationService=t,this._contextKeyService=n,this._editorService=i,this._instantiationService=r,this._sessionDispoables=new fe,this._editor=e,this._widgetVisible=gye.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 t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(av,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 i,r,a;(!(!((i=this._model)===null||i===void 0)&&i.selected)||!O.containsPosition((r=this._model)===null||r===void 0?void 0:r.selected.marker,n.position))&&((a=this._model)===null||a===void 0||a.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:O.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 t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new ue(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){var n,i;return Eye(this,void 0,void 0,function*(){if(this._editor.hasModel()){const r=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(r.move(e,this._editor.getModel(),this._editor.getPosition()),!r.selected)return;if(r.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const a=yield this._editorService.openCodeEditor({resource:r.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:r.selected.marker}},this._editor);a&&((n=OS.get(a))===null||n===void 0||n.close(),(i=OS.get(a))===null||i===void 0||i.nagivate(e,t))}else this._widget.showAtMarker(r.selected.marker,r.selected.index,r.selected.total)}})}};Vg.ID="editor.contrib.markerController";Vg=Ngt([E7(1,dye),E7(2,Et),E7(3,hu),E7(4,mt)],Vg);class zN extends je{constructor(e,t,n){super(n),this._next=e,this._multiFile=t}run(e,t){var n;return Eye(this,void 0,void 0,function*(){t.hasModel()&&((n=Vg.get(t))===null||n===void 0||n.nagivate(this._next,this._multiFile))})}}class eg extends zN{constructor(){super(!0,!1,{id:eg.ID,label:eg.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:K.focus,primary:578,weight:100},menuOpts:{menuId:av.TitleMenu,title:eg.LABEL,icon:Cn("marker-navigation-next",Ae.arrowDown,v("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}eg.ID="editor.action.marker.next";eg.LABEL=v("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class e3 extends zN{constructor(){super(!1,!1,{id:e3.ID,label:e3.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:K.focus,primary:1602,weight:100},menuOpts:{menuId:av.TitleMenu,title:e3.LABEL,icon:Cn("marker-navigation-previous",Ae.arrowUp,v("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}e3.ID="editor.action.marker.prev";e3.LABEL=v("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class Rgt extends zN{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:K.focus,primary:66,weight:100},menuOpts:{menuId:G.MenubarGoMenu,title:v({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class Igt extends zN{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:K.focus,primary:1090,weight:100},menuOpts:{menuId:G.MenubarGoMenu,title:v({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}Eu(Vg.ID,Vg,4);be(eg);be(e3);be(Rgt);be(Igt);const gye=new Ne("markersNavigationVisible",!1),Ogt=Dr.bindToContribution(Vg.get);Be(new Ogt({id:"closeMarkersNavigation",precondition:gye,handler:u=>u.close(),kbOpts:{weight:100+50,kbExpr:K.focus,primary:9,secondary:[1033]}}));var jgt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},iV=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const W0=ve;class Vgt{constructor(e,t,n){this.owner=e,this.range=t,this.marker=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const tle={type:1,filter:{include:_t.QuickFix},triggerAction:Ks.QuickFixHover};let yU=class{constructor(e,t,n,i){this._editor=e,this._markerDecorationsService=t,this._openerService=n,this._languageFeaturesService=i,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];const n=this._editor.getModel(),i=e.range.startLineNumber,r=n.getLineMaxColumn(i),a=[];for(const o of t){const s=o.range.startLineNumber===i?o.range.startColumn:1,l=o.range.endLineNumber===i?o.range.endColumn:r,c=this._markerDecorationsService.getMarker(n.uri,o);if(!c)continue;const d=new O(e.range.startLineNumber,s,e.range.startLineNumber,l);a.push(new Vgt(this,d,c))}return a}renderHoverParts(e,t){if(!t.length)return ie.None;const n=new fe;t.forEach(r=>e.fragment.appendChild(this.renderMarkerHover(r,n)));const i=t.length===1?t[0]:t.sort((r,a)=>Wn.compare(r.marker.severity,a.marker.severity))[0];return this.renderMarkerStatusbar(e,i,n),n}renderMarkerHover(e,t){const n=W0("div.hover-row"),i=de(n,W0("div.marker.hover-contents")),{source:r,message:a,code:o,relatedInformation:s}=e.marker;this._editor.applyFontInfo(i);const l=de(i,W0("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=a,r||o)if(o&&typeof o!="string"){const c=W0("span");if(r){const g=de(c,W0("span"));g.innerText=r}const d=de(c,W0("a.code-link"));d.setAttribute("href",o.target.toString()),t.add(ce(d,"click",g=>{this._openerService.open(o.target,{allowCommands:!0}),g.preventDefault(),g.stopPropagation()}));const h=de(d,W0("span"));h.innerText=o.value;const E=de(i,c);E.style.opacity="0.6",E.style.paddingLeft="6px"}else{const c=de(i,W0("span"));c.style.opacity="0.6",c.style.paddingLeft="6px",c.innerText=r&&o?`${r}(${o})`:r||`(${o})`}if(ca(s))for(const{message:c,resource:d,startLineNumber:h,startColumn:E}of s){const g=de(i,W0("div"));g.style.marginTop="8px";const m=de(g,W0("a"));m.innerText=`${B0(d)}(${h}, ${E}): `,m.style.cursor="pointer",t.add(ce(m,"click",p=>{p.stopPropagation(),p.preventDefault(),this._openerService&&this._openerService.open(d,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:h,startColumn:E}}}).catch(wt)}));const f=de(g,W0("span"));f.innerText=c,this._editor.applyFontInfo(f)}return n}renderMarkerStatusbar(e,t,n){if((t.marker.severity===Wn.Error||t.marker.severity===Wn.Warning||t.marker.severity===Wn.Info)&&e.statusBar.addAction({label:v("view problem","View Problem"),commandId:eg.ID,run:()=>{var i;e.hide(),(i=Vg.get(this._editor))===null||i===void 0||i.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(89)){const i=e.statusBar.append(W0("div"));this.recentMarkerCodeActionsInfo&&($B.makeKey(this.recentMarkerCodeActionsInfo.marker)===$B.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(i.textContent=v("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const r=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?ie.None:n.add(_g(()=>i.textContent=v("checkingForQuickFixes","Checking for quick fixes..."),200));i.textContent||(i.textContent=String.fromCharCode(160));const a=this.getCodeActions(t.marker);n.add(bt(()=>a.cancel())),a.then(o=>{if(r.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:o.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){o.dispose(),i.textContent=v("noQuickFixes","No quick fixes available");return}i.style.display="none";let s=!1;n.add(bt(()=>{s||o.dispose()})),e.statusBar.addAction({label:v("quick fixes","Quick Fix..."),commandId:uee,run:l=>{s=!0;const c=M3.get(this._editor),d=mi(l);e.hide(),c==null||c.showCodeActions(tle,o,{x:d.left,y:d.top,width:d.width,height:d.height})}})},wt)}}getCodeActions(e){return $i(t=>ree(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new O(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),tle,_p.None,t))}};yU=jgt([iV(1,pQ),iV(2,gs),iV(3,$e)],yU);const mye="editor.action.inlineSuggest.commit",fye="editor.action.inlineSuggest.showPrevious",pye="editor.action.inlineSuggest.showNext";var Hgt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class $gt extends ie{constructor(e,t,n={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new tqe),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=new fe,this.options=n,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new j2(()=>{var i;return(i=this.toggleMenuActionViewItem)===null||i===void 0?void 0:i.show()},n.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new $s(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,actionViewItemProvider:(i,r)=>{var a;if(i.id===j2.ID)return this.toggleMenuActionViewItem=new NB(i,i.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:et.asClassNameArray((a=n.moreIcon)!==null&&a!==void 0?a:Ae.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(n.actionViewItemProvider){const o=n.actionViewItemProvider(i,r);if(o)return o}if(i instanceof N5){const o=new NB(i,i.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:i.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});return o.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(o),this.disposables.add(this._onDidChangeDropdownVisibility.add(o.onDidChangeVisibility)),o}}}))}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,t){this.clear();const n=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),n.push(this.toggleMenuAction)),n.forEach(i=>{this.actionBar.push(i,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(i)})})}getKeybindingLabel(e){var t,n;const i=this.lookupKeybindings?(n=(t=this.options).getKeyBinding)===null||n===void 0?void 0:n.call(t,e):void 0;return Gr(i==null?void 0:i.getLabel())}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}}class j2 extends da{constructor(e,t){t=t||v("moreActions","More Actions..."),super(j2.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return Hgt(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}j2.ID="toolbar.toggle.more";var Kgt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},a6=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let FU=class extends $gt{constructor(e,t,n,i,r,a,o){super(e,r,Object.assign(Object.assign({getKeyBinding:l=>{var c;return(c=a.lookupKeybinding(l.id))!==null&&c!==void 0?c:void 0}},t),{allowContextMenu:!0,skipTelemetry:typeof(t==null?void 0:t.telemetrySource)=="string"})),this._options=t,this._menuService=n,this._contextKeyService=i,this._contextMenuService=r,this._sessionDisposables=this._store.add(new fe);const s=t==null?void 0:t.telemetrySource;s&&this._store.add(this.actionBar.onDidRun(l=>o.publicLog2("workbenchActionExecuted",{id:l.action.id,from:s})))}setActions(e,t=[],n){var i,r,a;this._sessionDisposables.clear();const o=e.slice(),s=t.slice(),l=[];let c=0;const d=[];let h=!1;if(((i=this._options)===null||i===void 0?void 0:i.hiddenItemStrategy)!==-1)for(let E=0;E=this._options.maxNumberOfItems&&(o[g]=void 0,d[g]=m)}}Yie(o),Yie(d),super.setActions(o,pr.join(d,s)),l.length>0&&this._sessionDisposables.add(ce(this.getElement(),"contextmenu",E=>{var g,m,f,p,D;const x=new Bs(E),b=this.getItemAction(x.target);if(!b)return;x.preventDefault(),x.stopPropagation();let k=!1;if(c===1&&((g=this._options)===null||g===void 0?void 0:g.hiddenItemStrategy)===0){k=!0;for(let S=0;Sthis._menuService.resetHiddenStates(n)}))),this._contextMenuService.showContextMenu({getAnchor:()=>x,getActions:()=>y,menuId:(f=this._options)===null||f===void 0?void 0:f.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(p=this._options)===null||p===void 0?void 0:p.menuOptions),skipTelemetry:typeof((D=this._options)===null||D===void 0?void 0:D.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};FU=Kgt([a6(2,L1),a6(3,Et),a6(4,Qs),a6(5,on),a6(6,Ys)],FU);var mee=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},vc=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let AU=class extends ie{constructor(e,t,n){super(),this.editor=e,this.model=t,this.instantiationService=n,this.alwaysShowToolbar=to(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(61).showToolbar==="always"),this.sessionPosition=void 0,this.position=gu("position",i=>{var r,a,o;const s=(r=this.model.read(i))===null||r===void 0?void 0:r.ghostText.read(i);if(!this.alwaysShowToolbar.read(i)||!s||s.parts.length===0)return this.sessionPosition=void 0,null;const l=s.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==s.lineNumber&&(this.sessionPosition=void 0);const c=new ue(s.lineNumber,Math.min(l,(o=(a=this.sessionPosition)===null||a===void 0?void 0:a.column)!==null&&o!==void 0?o:Number.MAX_SAFE_INTEGER));return this.sessionPosition=c,c}),this._register(il("setup content widget",(i,r)=>{const a=this.model.read(i);if(!a||!this.alwaysShowToolbar.read(i))return;const o=r.add(this.instantiationService.createInstance(Hg,this.editor,!0,this.position,a.selectedInlineCompletionIndex,a.inlineCompletionsCount,a.selectedInlineCompletion.map(s=>{var l;return(l=s==null?void 0:s.inlineCompletion.source.inlineCompletions.commands)!==null&&l!==void 0?l:[]})));e.addContentWidget(o),r.add(bt(()=>e.removeContentWidget(o))),r.add(nn("request explicit",s=>{this.position.read(s)&&a.lastTriggerKind.read(s)!==Ih.Explicit&&a.triggerExplicitly()}))}))}};AU=mee([vc(2,mt)],AU);const Wgt=Cn("inline-suggestion-hints-next",Ae.chevronRight,v("parameterHintsNextIcon","Icon for show next parameter hint.")),Ggt=Cn("inline-suggestion-hints-previous",Ae.chevronLeft,v("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let Hg=class _U extends ie{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,n){const i=new da(e,t,n,!0,()=>this._commandService.executeCommand(e)),r=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let a=t;return r&&(a=v({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,r.getLabel())),i.tooltip=a,i}constructor(e,t,n,i,r,a,o,s,l,c,d){super(),this.editor=e,this.withBorder=t,this._position=n,this._currentSuggestionIdx=i,this._suggestionCount=r,this._extraCommands=a,this._commandService=o,this.keybindingService=l,this._contextKeyService=c,this._menuService=d,this.id=`InlineSuggestionHintsContentWidget${_U.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=ka("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[ka("div",{style:{display:"flex"}},[ka("div@actionBar",{className:"custom-actions"}),ka("div@toolBar")])]),this.previousAction=this.createCommandAction(fye,v("previous","Previous"),et.asClassName(Ggt)),this.availableSuggestionCountAction=new da("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(pye,v("next","Next"),et.asClassName(Wgt)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(G.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new Hu(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new Hu(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[];const h=this._register(new $s(this.nodes.actionBar));h.push(this.previousAction,{icon:!0,label:!1}),h.push(this.availableSuggestionCountAction),h.push(this.nextAction,{icon:!0,label:!1}),this.toolBar=this._register(s.createInstance(SU,this.nodes.toolBar,G.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:E=>E.startsWith("primary")},actionViewItemProvider:(E,g)=>E instanceof Sl?s.createInstance(Ugt,E,void 0):void 0,telemetrySource:"InlineSuggestionToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility(E=>{_U._dropDownVisible=E})),this._register(nn("update position",E=>{this._position.read(E),this.editor.layoutContentWidget(this)})),this._register(nn("counts",E=>{const g=this._suggestionCount.read(E),m=this._currentSuggestionIdx.read(E);g!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${m+1}/${g}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),g!==void 0&&g>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(nn("extra commands",E=>{const g=this._extraCommands.read(E);if(Ur(this.lastCommands,g))return;this.lastCommands=g;const m=g.map(f=>({class:void 0,id:f.id,enabled:!0,tooltip:f.tooltip||"",label:f.title,run:p=>this._commandService.executeCommand(f.id)}));for(const[f,p]of this.inlineCompletionsActionsMenus.getActions())for(const D of p)D instanceof Sl&&m.push(D);m.length>0&&m.unshift(new pr),this.toolBar.setAdditionalSecondaryActions(m)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};Hg._dropDownVisible=!1;Hg.id=0;Hg=mee([vc(6,ei),vc(7,mt),vc(8,on),vc(9,Et),vc(10,L1)],Hg);let Ugt=class extends y3{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=ka("div.keybinding").root;new eA(t,Ss,Object.assign({disableTitle:!0},Xlt)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}},SU=class extends FU{constructor(e,t,n,i,r,a,o,s){super(e,Object.assign({resetMenu:t},n),i,r,a,o,s),this.menuId=t,this.options2=n,this.menuService=i,this.contextKeyService=r,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,t,n,i,r,a,o;const s=[],l=[];ybe(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:s,secondary:l},(n=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||n===void 0?void 0:n.primaryGroup,(r=(i=this.options2)===null||i===void 0?void 0:i.toolbarOptions)===null||r===void 0?void 0:r.shouldInlineSubmenu,(o=(a=this.options2)===null||a===void 0?void 0:a.toolbarOptions)===null||o===void 0?void 0:o.useSeparatorsInPrimaryActions),l.push(...this.additionalActions),this.setActions(s,l)}setAdditionalSecondaryActions(e){Ur(this.additionalActions,e,(t,n)=>t===n)||(this.additionalActions=e,this.updateToolbar())}};SU=mee([vc(3,L1),vc(4,Et),vc(5,Qs),vc(6,on),vc(7,Ys)],SU);var qgt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},g7=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const Jgt=!1;let No=class Dye{static get(e){return e.getContribution(Dye.ID)}constructor(e,t,n,i,r){this._editor=e,this._instantiationService=t,this._openerService=n,this._languageService=i,this._keybindingService=r,this._toUnhook=new fe,this._hoverActivatedByColorDecoratorClick=!1,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(a=>{a.hasChanged(59)&&(this._unhookEvents(),this._hookEvents())})}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(59);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(n=>this._onEditorMouseDown(n))),this._toUnhook.add(this._editor.onMouseUp(n=>this._onEditorMouseUp(n))),this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))):(this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))),this._toUnhook.add(this._editor.onMouseLeave(n=>this._onEditorMouseLeave(n))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(n=>this._onEditorScrollChanged(n)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){var t;this._isMouseDown=!0;const n=e.target;if(n.type===9&&n.detail===XE.ID){this._hoverClicked=!0;return}n.type===12&&n.detail===a5.ID||(n.type!==12&&(this._hoverClicked=!1),!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t,n;const i=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||!((n=this._contentWidget)===null||n===void 0)&&n.containsNode(i)||this._hideWidgets()}_onEditorMouseMove(e){var t,n,i,r,a,o,s,l,c,d,h;const E=e.target;if(!((t=this._contentWidget)===null||t===void 0)&&t.isFocused||!((n=this._contentWidget)===null||n===void 0)&&n.isResizing||this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&E.type===9&&E.detail===XE.ID||this._isHoverSticky&&(!((i=this._contentWidget)===null||i===void 0)&&i.containsNode((r=e.event.browserEvent.view)===null||r===void 0?void 0:r.document.activeElement))&&!(!((o=(a=e.event.browserEvent.view)===null||a===void 0?void 0:a.getSelection())===null||o===void 0)&&o.isCollapsed)||!this._isHoverSticky&&E.type===9&&E.detail===XE.ID&&(!((s=this._contentWidget)===null||s===void 0)&&s.isColorPickerVisible)||this._isHoverSticky&&E.type===12&&E.detail===a5.ID||this._isHoverSticky&&(!((l=this._contentWidget)===null||l===void 0)&&l.isVisibleFromKeyboard))return;const g=(c=E.element)===null||c===void 0?void 0:c.classList.contains("colorpicker-color-decoration"),m=this._editor.getOption(145);if(g&&(m==="click"&&!this._hoverActivatedByColorDecoratorClick||m==="hover"&&!this._isHoverEnabled&&!Jgt||m==="clickAndHover"&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)||!g&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(d=this._glyphWidget)===null||d===void 0||d.hide();return}if(E.type===2&&E.position){(h=this._contentWidget)===null||h===void 0||h.hide(),this._glyphWidget||(this._glyphWidget=new a5(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(E.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;const n=this._keybindingService.softDispatch(e,this._editor.getDomNode()),i=n.kind===1||n.kind===2&&n.commandId==="editor.action.showHover"&&((t=this._contentWidget)===null||t===void 0?void 0:t.isVisible);e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&!i&&this._hideWidgets()}_hideWidgets(){var e,t,n;this._isMouseDown&&this._hoverClicked&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible)||Hg.dropDownVisible||(this._hoverActivatedByColorDecoratorClick=!1,this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(n=this._contentWidget)===null||n===void 0||n.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(sw,this._editor)),this._contentWidget}showContentHover(e,t,n,i,r=!1){this._hoverActivatedByColorDecoratorClick=r,this._getOrCreateContentWidget().startShowingAtRange(e,t,n,i)}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,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};No.ID="editor.contrib.hover";No=qgt([g7(1,mt),g7(2,gs),g7(3,Dn),g7(4,on)],No);class Zgt extends je{constructor(){super({id:"editor.action.showHover",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.","If the hover is already visible, it will take focus."]},"Show or Focus Hover"),description:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if when triggered with the keyboard, the hover should take focus immediately.",type:"boolean",default:!1}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:K.editorTextFocus,primary:Ri(2089,2087),weight:100}})}run(e,t,n){var i;const r=e.get(nu),a=e.get(B1),o=e.get(on);if(!t.hasModel())return;const s=No.get(t);if(!s)return;const l=t.getPosition(),c=new O(l.lineNumber,l.column,l.lineNumber,l.column),d=t.getOption(2)===2||!!(n!=null&&n.focus);if(s.isHoverVisible?s.focus():s.showContentHover(c,1,1,d),r.getValue("accessibility.verbosity.hover")&&a.isScreenReaderOptimized()){const h=(i=o.lookupKeybinding("editor.action.accessibleView"))===null||i===void 0?void 0:i.getAriaLabel(),E=h?v("chatAccessibleViewHint","Inspect this in the accessible view with {0}",h):v("chatAccessibleViewHintNoKb","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding");M5(E)}}}class Ygt extends je{constructor(){super({id:"editor.action.showDefinitionPreviewHover",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})}run(e,t){const n=No.get(t);if(!n)return;const i=t.getPosition();if(!i)return;const r=new O(i.lineNumber,i.column,i.lineNumber,i.column),a=T3.get(t);if(!a)return;a.startFindDefinitionFromCursor(i).then(()=>{n.showContentHover(r,1,1,!0)})}}class Qgt extends je{constructor(){super({id:"editor.action.scrollUpHover",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:K.hoverFocused,kbOpts:{kbExpr:K.hoverFocused,primary:16,weight:100}})}run(e,t){const n=No.get(t);n&&n.scrollUp()}}class Xgt extends je{constructor(){super({id:"editor.action.scrollDownHover",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:K.hoverFocused,kbOpts:{kbExpr:K.hoverFocused,primary:18,weight:100}})}run(e,t){const n=No.get(t);n&&n.scrollDown()}}class emt extends je{constructor(){super({id:"editor.action.scrollLeftHover",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:K.hoverFocused,kbOpts:{kbExpr:K.hoverFocused,primary:15,weight:100}})}run(e,t){const n=No.get(t);n&&n.scrollLeft()}}class tmt extends je{constructor(){super({id:"editor.action.scrollRightHover",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:K.hoverFocused,kbOpts:{kbExpr:K.hoverFocused,primary:17,weight:100}})}run(e,t){const n=No.get(t);n&&n.scrollRight()}}class umt extends je{constructor(){super({id:"editor.action.pageUpHover",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:K.hoverFocused,kbOpts:{kbExpr:K.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){const n=No.get(t);n&&n.pageUp()}}class nmt extends je{constructor(){super({id:"editor.action.pageDownHover",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:K.hoverFocused,kbOpts:{kbExpr:K.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){const n=No.get(t);n&&n.pageDown()}}class imt extends je{constructor(){super({id:"editor.action.goToTopHover",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:K.hoverFocused,kbOpts:{kbExpr:K.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){const n=No.get(t);n&&n.goToTop()}}class rmt extends je{constructor(){super({id:"editor.action.goToBottomHover",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:K.hoverFocused,kbOpts:{kbExpr:K.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){const n=No.get(t);n&&n.goToBottom()}}Eu(No.ID,No,2);be(Zgt);be(Ygt);be(Qgt);be(Xgt);be(emt);be(tmt);be(umt);be(nmt);be(imt);be(rmt);Pp.register(dw);Pp.register(yU);jl((u,e)=>{const t=u.getColor(GXe);t&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${t.transparent(.5)}; }`))});class BU extends ie{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(145);if(t!=="click"&&t!=="clickAndHover")return;const n=e.target;if(n.type!==6||!n.detail.injectedText||n.detail.injectedText.options.attachedData!==M2e||!n.range)return;const i=this._editor.getContribution(No.ID);if(i&&!i.isColorPickerVisible){const r=new O(n.range.startLineNumber,n.range.startColumn+1,n.range.endLineNumber,n.range.endColumn+1);i.showContentHover(r,1,0,!1,!0)}}}BU.ID="editor.contrib.colorContribution";Eu(BU.ID,BU,2);Pp.register(rw);var xye=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},hc=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},ule=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let $g=class vye extends ie{constructor(e,t,n,i,r,a,o){super(),this._editor=e,this._modelService=n,this._keybindingService=i,this._instantiationService=r,this._languageFeatureService=a,this._languageConfigurationService=o,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=K.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=K.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)===null||e===void 0||e.focus():this._standaloneColorPickerWidget=new Ew(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(vye.ID)}};$g.ID="editor.contrib.standaloneColorPickerController";$g=xye([hc(1,Et),hc(2,Bn),hc(3,on),hc(4,mt),hc(5,$e),hc(6,an)],$g);Eu($g.ID,$g,1);const nle=8,amt=22;let Ew=class Cye extends ie{constructor(e,t,n,i,r,a,o,s){var l;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=n,this._modelService=r,this._keybindingService=a,this._languageFeaturesService=o,this._languageConfigurationService=s,this.allowEditorOverflow=!0,this.body=document.createElement("div"),this._position=void 0,this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new ee),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=i.createInstance(N2,this._editor),this._position=(l=this._editor._getViewModel())===null||l===void 0?void 0:l.getPrimaryCursorState().modelState.position;const c=this._editor.getSelection(),d=c?{startLineNumber:c.startLineNumber,startColumn:c.startColumn,endLineNumber:c.endLineNumber,endColumn:c.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},h=this._register(g1(this.body));this._register(h.onDidBlur(E=>{this.hide()})),this._register(h.onDidFocus(E=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(E=>{var g;const m=(g=E.target.element)===null||g===void 0?void 0:g.classList;m&&m.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(E=>{this._render(E.value,E.foundInEditor)})),this._start(d),this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return Cye.ID}getDomNode(){return this.body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(59).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()}_start(e){return ule(this,void 0,void 0,function*(){const t=yield this._computeAsync(e);t&&this._onResult.fire(new omt(t.result,t.foundInEditor))})}_computeAsync(e){return ule(this,void 0,void 0,function*(){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},n=yield this._standaloneColorPickerParticipant.createColorHover(t,new oee(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return n?{result:n.colorHover,foundInEditor:n.foundInEditor}:null})}_render(e,t){const n=document.createDocumentFragment(),i=this._register(new lw(this._keybindingService));let r;const a={fragment:n,statusBar:i,setColorPicker:m=>r=m,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(a,[e])),r===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),r.layout();const o=r.body,s=o.saturationBox.domNode.clientWidth,l=o.domNode.clientWidth-s-amt-nle,c=r.body.enterButton;c==null||c.onClicked(()=>{this.updateEditor(),this.hide()});const d=r.header,h=d.pickedColorNode;h.style.width=s+nle+"px";const E=d.originalColorNode;E.style.width=l+"px";const g=r.header.closeButton;g==null||g.onClicked(()=>{this.hide()}),t&&(c&&(c.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};Ew.ID="editor.contrib.standaloneColorPickerWidget";Ew=xye([hc(3,mt),hc(4,Bn),hc(5,on),hc(6,$e),hc(7,an)],Ew);class omt{constructor(e,t){this.value=e,this.foundInEditor=t}}class smt extends vp{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:v("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:v({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:G.CommandPalette}]})}runEditorCommand(e,t){var n;(n=$g.get(t))===null||n===void 0||n.showOrFocus()}}class lmt extends je{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:K.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var n;(n=$g.get(t))===null||n===void 0||n.hide()}}class cmt extends je{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:K.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var n;(n=$g.get(t))===null||n===void 0||n.insertColor()}}be(lmt);be(cmt);fi(smt);class SE{constructor(e,t,n){this.languageConfigurationService=n,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,n){if(n<0)return!1;const i=t.length,r=e.length;if(n+i>r)return!1;for(let a=0;a=65&&o<=90&&o+32===s)&&!(s>=65&&s<=90&&s+32===o))return!1}return!0}_createOperationsForBlockComment(e,t,n,i,r,a){const o=e.startLineNumber,s=e.startColumn,l=e.endLineNumber,c=e.endColumn,d=r.getLineContent(o),h=r.getLineContent(l);let E=d.lastIndexOf(t,s-1+t.length),g=h.indexOf(n,c-1-n.length);if(E!==-1&&g!==-1)if(o===l)d.substring(E+t.length,g).indexOf(n)>=0&&(E=-1,g=-1);else{const f=d.substring(E+t.length),p=h.substring(0,g);(f.indexOf(n)>=0||p.indexOf(n)>=0)&&(E=-1,g=-1)}let m;E!==-1&&g!==-1?(i&&E+t.length0&&h.charCodeAt(g-1)===32&&(n=" "+n,g-=1),m=SE._createRemoveBlockCommentOperations(new O(o,E+t.length+1,l,g+1),t,n)):(m=SE._createAddBlockCommentOperations(e,t,n,this._insertSpace),this._usedEndToken=m.length===1?n:null);for(const f of m)a.addTrackedEditOperation(f.range,f.text)}static _createRemoveBlockCommentOperations(e,t,n){const i=[];return O.isEmpty(e)?i.push(An.delete(new O(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(i.push(An.delete(new O(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),i.push(An.delete(new O(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),i}static _createAddBlockCommentOperations(e,t,n,i){const r=[];return O.isEmpty(e)?r.push(An.replace(new O(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(r.push(An.insert(new ue(e.startLineNumber,e.startColumn),t+(i?" ":""))),r.push(An.insert(new ue(e.endLineNumber,e.endColumn),(i?" ":"")+n))),r}getEditOperations(e,t){const n=this._selection.startLineNumber,i=this._selection.startColumn;e.tokenization.tokenizeIfCheap(n);const r=e.getLanguageIdAtPosition(n,i),a=this.languageConfigurationService.getLanguageConfiguration(r).comments;!a||!a.blockCommentStartToken||!a.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,a.blockCommentStartToken,a.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const n=t.getInverseEditOperations();if(n.length===2){const i=n[0],r=n[1];return new Ze(i.range.endLineNumber,i.range.endColumn,r.range.startLineNumber,r.range.startColumn)}else{const i=n[0].range,r=this._usedEndToken?-this._usedEndToken.length-1:0;return new Ze(i.endLineNumber,i.endColumn+r,i.endLineNumber,i.endColumn+r)}}}class oh{constructor(e,t,n,i,r,a,o){this.languageConfigurationService=e,this._selection=t,this._tabSize=n,this._type=i,this._insertSpace=r,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=a,this._ignoreFirstLine=o||!1}static _gatherPreflightCommentStrings(e,t,n,i){e.tokenization.tokenizeIfCheap(t);const r=e.getLanguageIdAtPosition(t,1),a=i.getLanguageConfiguration(r).comments,o=a?a.lineCommentToken:null;if(!o)return null;const s=[];for(let l=0,c=n-t+1;lr?t[s].commentStrOffset=a-1:t[s].commentStrOffset=a}}}class fee extends je{constructor(e,t){super(t),this._type=e}run(e,t){const n=e.get(an);if(!t.hasModel())return;const i=t.getModel(),r=[],a=i.getOptions(),o=t.getOption(22),s=t.getSelections().map((c,d)=>({selection:c,index:d,ignoreFirstLine:!1}));s.sort((c,d)=>O.compareRangesUsingStarts(c.selection,d.selection));let l=s[0];for(let c=1;c=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Pm=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let ov=class bye{static get(e){return e.getContribution(bye.ID)}constructor(e,t,n,i,r,a,o,s){this._contextMenuService=t,this._contextViewService=n,this._contextKeyService=i,this._keybindingService=r,this._menuService=a,this._configurationService=o,this._workspaceContextService=s,this._toDispose=new fe,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(l=>this._onContextMenu(l))),this._toDispose.add(this._editor.onMouseWheel(l=>{if(this._contextMenuIsBeingShownCount>0){const c=this._contextViewService.getContextViewElement(),d=l.srcElement;d.shadowRoot&&x3(c)===d.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(l=>{this._editor.getOption(23)&&l.keyCode===58&&(l.preventDefault(),l.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(23)){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 i of this._editor.getSelections())if(i.containsPosition(e.target.position)){n=!0;break}n||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(23)||!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?G.SimpleEditorContext:G.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const n=[],i=this._menuService.createMenu(t,this._contextKeyService),r=i.getActions({arg:e.uri});i.dispose();for(const a of r){const[,o]=a;let s=0;for(const l of o)if(l instanceof Qk){const c=this._getMenuActions(e,l.item.submenu);c.length>0&&(n.push(new N5(l.id,l.label,c)),s++)}else n.push(l),s++;s&&n.push(new pr)}return n.length&&n.pop(),n}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const n=this._editor.getOption(59);this._editor.updateOptions({hover:{enabled:!1}});let i=t;if(!i){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const a=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),o=mi(this._editor.getDomNode()),s=o.left+a.left,l=o.top+a.top+a.height;i={x:s,y:l}}const r=this._editor.getOption(125)&&!Fl;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:r?this._editor.getDomNode():void 0,getAnchor:()=>i,getActions:()=>e,getActionViewItem:a=>{const o=this._keybindingFor(a);if(o)return new p2(a,a,{label:!0,keybinding:o.getLabel(),isMenu:!0});const s=a;return typeof s.getActionViewItem=="function"?s.getActionViewItem():new p2(a,a,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:a=>this._keybindingFor(a),onHide:a=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:n})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||d0t(this._workspaceContextService.getWorkspace()))return;const t=this._editor.getOption(71);let n=0;const i=l=>({id:`menu-action-${++n}`,label:l.label,tooltip:"",class:void 0,enabled:typeof l.enabled>"u"?!0:l.enabled,checked:l.checked,run:l.run}),r=(l,c)=>new N5(`menu-action-${++n}`,l,c,void 0),a=(l,c,d,h,E)=>{if(!c)return i({label:l,enabled:c,run:()=>{}});const g=f=>()=>{this._configurationService.updateValue(d,f)},m=[];for(const f of E)m.push(i({label:f.label,checked:h===f.value,run:g(f.value)}));return r(l,m)},o=[];o.push(i({label:v("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),o.push(new pr),o.push(i({label:v("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),o.push(a(v("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.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"}])),o.push(a(v("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:v("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:v("context.minimap.slider.always","Always"),value:"always"}]));const s=this._editor.getOption(125)&&!Fl;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:s?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>o,onHide:l=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};ov.ID="editor.contrib.contextmenu";ov=mmt([Pm(1,Qs),Pm(2,f4),Pm(3,Et),Pm(4,on),Pm(5,L1),Pm(6,nu),Pm(7,k3)],ov);class fmt extends je{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:K.textInputFocus,primary:1092,weight:100}})}run(e,t){var n;(n=ov.get(t))===null||n===void 0||n.showContextMenu()}}Eu(ov.ID,ov,2);be(fmt);class rV{constructor(e){this.selections=e}equals(e){const t=this.selections.length,n=e.selections.length;if(t!==n)return!1;for(let i=0;i{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;const n=new rV(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(n)||(this._undoStack.push(new aV(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 aV(new rV(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 aV(new rV(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}}P3.ID="editor.contrib.cursorUndoRedoController";class pmt extends je{constructor(){super({id:"cursorUndo",label:v("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:K.textInputFocus,primary:2099,weight:100}})}run(e,t,n){var i;(i=P3.get(t))===null||i===void 0||i.cursorUndo()}}class Dmt extends je{constructor(){super({id:"cursorRedo",label:v("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,n){var i;(i=P3.get(t))===null||i===void 0||i.cursorRedo()}}Eu(P3.ID,P3,0);be(pmt);be(Dmt);class xmt{constructor(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n,this.targetSelection=null}getEditOperations(e,t){const n=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new O(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 Ze(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 Ze(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(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),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(34)||this._editor.getOption(21)||(dD(e)&&(this._modifierPressed=!0),this._mouseDown&&dD(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(34)||this._editor.getOption(21)||(dD(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===Vh.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 t=e.target;if(this._dragSelection===null){const i=(this._editor.getSelections()||[]).filter(r=>t.position&&r.containsPosition(t.position));if(i.length===1)this._dragSelection=i[0];else return}dD(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.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 t=new ue(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let n=null;if(e.event.shiftKey){const i=this._editor.getSelection();if(i){const{selectionStartLineNumber:r,selectionStartColumn:a}=i;n=[new Ze(r,a,t.lineNumber,t.column)]}}else n=(this._editor.getSelections()||[]).map(i=>i.containsPosition(t)?new Ze(t.lineNumber,t.column,t.lineNumber,t.column):i);this._editor.setSelections(n||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(dD(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(Vh.ID,new xmt(this._dragSelection,t,dD(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 O(e.lineNumber,e.column,e.lineNumber,e.column),options:Vh._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()}}Vh.ID="editor.contrib.dragAndDrop";Vh.TRIGGER_KEY_VALUE=Yt?6:5;Vh._DECORATION_OPTIONS=gt.register({description:"dnd-target",className:"dnd-target"});Eu(Vh.ID,Vh,2);const LN=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let u;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?u=crypto.getRandomValues.bind(crypto):u=function(n){for(let i=0;ikye(this,void 0,void 0,function*(){return u}),asFile:()=>{},value:typeof u=="string"?u:void 0}}function vmt(u,e,t){const n={id:LN(),name:u,uri:e,data:t};return{asString:()=>kye(this,void 0,void 0,function*(){return""}),asFile:()=>n,value:void 0}}class yye{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return Jt.some(this,([n,i])=>i.asFile())&&t.push("files"),Fye(gw(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))===null||t===void 0?void 0:t[0]}append(e,t){const n=this._entries.get(e);n?n.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const n of t)yield[e,n]}toKey(e){return gw(e)}}function gw(u){return u.toLowerCase()}function Cmt(u,e){return Fye(gw(u),e.map(gw))}function Fye(u,e){if(u==="*/*")return e.length>0;if(e.includes(u))return!0;const t=u.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;const[n,i,r]=t;return r==="*"?e.some(a=>a.startsWith(i+"/")):!1}const MN=Object.freeze({create:u=>Cg(u.map(e=>e.toString())).join(`\r `),split:u=>u.split(`\r `),parse:u=>MN.split(u).filter(e=>!e.startsWith("#"))}),ile={EDITORS:"CodeEditors",FILES:"CodeFiles"};class bmt{}const kmt={DragAndDropContribution:"workbench.contributions.dragAndDrop"};Xn.add(kmt.DragAndDropContribution,new bmt);class V2{constructor(){}static getInstance(){return V2.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}V2.INSTANCE=new V2;var ymt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function Aye(u){const e=new yye;for(const t of u.items){const n=t.type;if(t.kind==="string"){const i=new Promise(r=>t.getAsString(r));e.append(n,pee(i))}else if(t.kind==="file"){const i=t.getAsFile();i&&e.append(n,Fmt(i))}}return e}function Fmt(u){const e=u.path?lt.parse(u.path):void 0;return vmt(u.name,e,()=>ymt(this,void 0,void 0,function*(){return new Uint8Array(yield u.arrayBuffer())}))}const Amt=Object.freeze([ile.EDITORS,ile.FILES,f2.RESOURCES,f2.INTERNAL_URI_LIST]);function _ye(u,e=!1){const t=Aye(u),n=t.get(f2.INTERNAL_URI_LIST);if(n)t.replace(Ti.uriList,n);else if(e||!t.has(Ti.uriList)){const i=[];for(const r of u.items){const a=r.getAsFile();if(a){const o=a.path;try{o?i.push(lt.file(o).toString()):i.push(lt.parse(a.name,!0).toString())}catch{}}}i.length&&t.replace(Ti.uriList,pee(MN.create(i)))}for(const i of Amt)t.delete(i);return t}function _mt(u,e,t){var n,i;return{edits:[...e.map(r=>new jh(u,typeof t.insertText=="string"?{range:r,text:t.insertText,insertAsSnippet:!1}:{range:r,text:t.insertText.snippet,insertAsSnippet:!0})),...(i=(n=t.additionalEdit)===null||n===void 0?void 0:n.edits)!==null&&i!==void 0?i:[]]}}var Smt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Bmt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},wmt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const zmt=gt.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:ove,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class TN extends ie{constructor(e,t,n,i,r){super(),this.typeId=e,this.editor=t,this.range=n,this.delegate=r,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(i),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=ve(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=ve("span.icon");this.domNode.append(t),t.classList.add(...et.asClassNameArray(Ae.loading),"codicon-modifier-spin");const n=()=>{const i=this.editor.getOption(65);this.domNode.style.height=`${i}px`,this.domNode.style.width=`${Math.ceil(.8*i)}px`};n(),this._register(this.editor.onDidChangeConfiguration(i=>{(i.hasChanged(51)||i.hasChanged(65))&&n()})),this._register(ce(this.domNode,Me.CLICK,i=>{this.delegate.cancel()}))}getId(){return TN.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)}}TN.baseId="editor.widget.inlineProgressWidget";let mw=class extends ie{constructor(e,t,n){super(),this.id=e,this._editor=t,this._instantiationService=n,this._showDelay=500,this._showPromise=this._register(new Qr),this._currentWidget=new Qr,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}showWhile(e,t,n){return wmt(this,void 0,void 0,function*(){const i=this._operationIdPool++;this._currentOperation=i,this.clear(),this._showPromise.value=_g(()=>{const r=O.fromPositions(e);this._currentDecorations.set([{range:r,options:zmt}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(TN,this.id,this._editor,r,t,n))},this._showDelay);try{return yield n}finally{this._currentOperation===i&&(this.clear(),this._currentOperation=void 0)}})}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};mw=Smt([Bmt(2,mt)],mw);var Sye=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},uk=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},rle=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let fw=class Bye extends ie{constructor(e,t,n,i,r,a,o,s,l,c){super(),this.typeId=e,this.editor=t,this.showCommand=i,this.range=r,this.edits=a,this.onSelectNewEdit=o,this._contextMenuService=s,this._keybindingService=c,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=n.bindTo(l),this.visibleContext.set(!0),this._register(bt(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(bt(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(d=>{r.containsPosition(d.position)||this.dispose()})),this._register(Ke.runAndSubscribe(c.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var e;const t=(e=this._keybindingService.lookupKeybinding(this.showCommand.id))===null||e===void 0?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(t?` (${t})`:"")}create(){this.domNode=ve(".post-edit-widget"),this.button=this._register(new DG(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(ce(this.domNode,Me.CLICK,()=>this.showSelector()))}getId(){return Bye.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=mi(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>Ux({id:"",label:e.label,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}};fw.baseId="editor.widget.postEditWidget";fw=Sye([uk(7,Qs),uk(8,Et),uk(9,on)],fw);let pw=class extends ie{constructor(e,t,n,i,r,a){super(),this._id=e,this._editor=t,this._visibleContext=n,this._showCommand=i,this._instantiationService=r,this._bulkEditService=a,this._currentWidget=this._register(new Qr),this._register(Ke.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}applyEditAndShowIfNeeded(e,t,n,i){var r,a;return rle(this,void 0,void 0,function*(){const o=this._editor.getModel();if(!o||!e.length)return;const s=t.allEdits[t.activeEditIndex];if(!s)return;let l=[];(typeof s.insertText=="string"?s.insertText==="":s.insertText.snippet==="")?l=[]:l=e.map(f=>new jh(o.uri,typeof s.insertText=="string"?{range:f,text:s.insertText,insertAsSnippet:!1}:{range:f,text:s.insertText.snippet,insertAsSnippet:!0}));const d={edits:[...l,...(a=(r=s.additionalEdit)===null||r===void 0?void 0:r.edits)!==null&&a!==void 0?a:[]]},h=e[0],E=o.deltaDecorations([],[{range:h,options:{description:"paste-line-suffix",stickiness:0}}]);let g,m;try{g=yield this._bulkEditService.apply(d,{editor:this._editor,token:i}),m=o.getDecorationRange(E[0])}finally{o.deltaDecorations(E,[])}n&&g.isApplied&&t.allEdits.length>1&&this.show(m??h,t,f=>rle(this,void 0,void 0,function*(){const p=this._editor.getModel();p&&(yield p.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:f,allEdits:t.allEdits},n,i))}))})}show(e,t,n){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(fw,this._id,this._editor,this._visibleContext,this._showCommand,e,t,n))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;(e=this._currentWidget.value)===null||e===void 0||e.showSelector()}};pw=Sye([uk(4,mt),uk(5,YF)],pw);var Lmt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},hD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},P4=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const wye="editor.changePasteType",zye=new Ne("pasteWidgetVisible",!1,v("pasteWidgetVisible","Whether the paste widget is showing")),oV="application/vnd.code.copyMetadata";let N3=class Lye extends ie{static get(e){return e.getContribution(Lye.ID)}constructor(e,t,n,i,r,a,o){super(),this._bulkEditService=n,this._clipboardService=i,this._languageFeaturesService=r,this._quickInputService=a,this._progressService=o,this._editor=e;const s=e.getContainerDomNode();this._register(ce(s,"copy",l=>this.handleCopy(l))),this._register(ce(s,"cut",l=>this.handleCopy(l))),this._register(ce(s,"paste",l=>this.handlePaste(l),!0)),this._pasteProgressManager=this._register(new mw("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(pw,"pasteIntoEditor",e,zye,{id:wye,label:v("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferredId:e},document.execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(83).enabled&&!this._editor.getOption(89)}handleCopy(e){var t,n;if(!this._editor.hasTextFocus()||(em&&this._clipboardService.writeResources([]),!e.clipboardData||!this.isPasteAsEnabled()))return;const i=this._editor.getModel(),r=this._editor.getSelections();if(!i||!(r!=null&&r.length))return;const a=this._editor.getOption(36);let o=r;const s=r.length===1&&r[0].isEmpty();if(s){if(!a)return;o=[new O(o[0].startLineNumber,1,o[0].startLineNumber,1+i.getLineLength(o[0].startLineNumber))]}const l=(t=this._editor._getViewModel())===null||t===void 0?void 0:t.getPlainTextToCopy(r,a,Yr),d={multicursorText:Array.isArray(l)?l:null,pasteOnNewLine:s,mode:null},h=this._languageFeaturesService.documentPasteEditProvider.ordered(i).filter(p=>!!p.prepareDocumentPaste);if(!h.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:d});return}const E=Aye(e.clipboardData),g=h.flatMap(p=>{var D;return(D=p.copyMimeTypes)!==null&&D!==void 0?D:[]}),m=LN();this.setCopyMetadata(e.clipboardData,{id:m,providerCopyMimeTypes:g,defaultPastePayload:d});const f=$i(p=>P4(this,void 0,void 0,function*(){const D=c1(yield Promise.all(h.map(x=>P4(this,void 0,void 0,function*(){try{return yield x.prepareDocumentPaste(i,o,E,p)}catch(b){console.error(b);return}}))));D.reverse();for(const x of D)for(const[b,k]of x)E.replace(b,k);return E}));(n=this._currentCopyOperation)===null||n===void 0||n.dataTransferPromise.cancel(),this._currentCopyOperation={handle:m,dataTransferPromise:f}}handlePaste(e){var t,n;return P4(this,void 0,void 0,function*(){if(!e.clipboardData||!this._editor.hasTextFocus())return;(t=this._currentPasteOperation)===null||t===void 0||t.cancel(),this._currentPasteOperation=void 0;const i=this._editor.getModel(),r=this._editor.getSelections();if(!(r!=null&&r.length)||!i||!this.isPasteAsEnabled())return;const a=this.fetchCopyMetadata(e),o=_ye(e.clipboardData);o.delete(oV);const s=[...e.clipboardData.types,...(n=a==null?void 0:a.providerCopyMimeTypes)!==null&&n!==void 0?n:[],Ti.uriList],l=this._languageFeaturesService.documentPasteEditProvider.ordered(i).filter(c=>{var d;return(d=c.pasteMimeTypes)===null||d===void 0?void 0:d.some(h=>Cmt(h,s))});l.length&&(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,l,r,o,a):this.doPasteInline(l,r,o,a))})}doPasteInline(e,t,n,i){const r=$i(a=>P4(this,void 0,void 0,function*(){const o=this._editor;if(!o.hasModel())return;const s=o.getModel(),l=new Ng(o,3,void 0,a);try{if(yield this.mergeInDataFromCopy(n,i,l.token),l.token.isCancellationRequested)return;const c=e.filter(h=>ale(h,n));if(!c.length||c.length===1&&c[0].id==="text"){yield this.applyDefaultPasteHandler(n,i,l.token);return}const d=yield this.getPasteEdits(c,n,s,t,l.token);if(l.token.isCancellationRequested)return;if(d.length===1&&d[0].id==="text"){yield this.applyDefaultPasteHandler(n,i,l.token);return}if(d.length){const h=o.getOption(83).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:d},h,l.token)}yield this.applyDefaultPasteHandler(n,i,l.token)}finally{l.dispose(),this._currentPasteOperation===r&&(this._currentPasteOperation=void 0)}}));this._pasteProgressManager.showWhile(t[0].getEndPosition(),v("pasteIntoEditorProgress","Running paste handlers. Click to cancel"),r),this._currentPasteOperation=r}showPasteAsPick(e,t,n,i,r){const a=$i(o=>P4(this,void 0,void 0,function*(){const s=this._editor;if(!s.hasModel())return;const l=s.getModel(),c=new Ng(s,3,void 0,o);try{if(yield this.mergeInDataFromCopy(i,r,c.token),c.token.isCancellationRequested)return;const d=t.filter(m=>ale(m,i)),h=yield this.getPasteEdits(d,i,l,n,c.token);if(c.token.isCancellationRequested||!h.length)return;let E;if(typeof e=="string")E=h.find(m=>m.id===e);else{const m=yield this._quickInputService.pick(h.map(f=>({label:f.label,description:f.id,detail:f.detail,edit:f})),{placeHolder:v("pasteAsPickerPlaceholder","Select Paste Action")});E=m==null?void 0:m.edit}if(!E)return;const g=_mt(l.uri,n,E);yield this._bulkEditService.apply(g,{editor:this._editor})}finally{c.dispose(),this._currentPasteOperation===a&&(this._currentPasteOperation=void 0)}}));this._progressService.withProgress({location:10,title:v("pasteAsProgress","Running paste handlers")},()=>a)}setCopyMetadata(e,t){e.setData(oV,JSON.stringify(t))}fetchCopyMetadata(e){if(!e.clipboardData)return;const t=e.clipboardData.getData(oV);if(t)try{return JSON.parse(t)}catch{return}const[n,i]=sW.getTextData(e.clipboardData);if(i)return{defaultPastePayload:{mode:i.mode,multicursorText:y5e(i.multicursorText),pasteOnNewLine:!!i.isFromEmptySelection}}}mergeInDataFromCopy(e,t,n){var i;return P4(this,void 0,void 0,function*(){if(t!=null&&t.id&&((i=this._currentCopyOperation)===null||i===void 0?void 0:i.handle)===t.id){const r=yield this._currentCopyOperation.dataTransferPromise;if(n.isCancellationRequested)return;for(const[a,o]of r)e.replace(a,o)}if(!e.has(Ti.uriList)){const r=yield this._clipboardService.readResources();if(n.isCancellationRequested)return;r.length&&e.append(Ti.uriList,pee(MN.create(r)))}})}getPasteEdits(e,t,n,i,r){return P4(this,void 0,void 0,function*(){const a=yield CP(Promise.all(e.map(o=>{var s;try{return(s=o.provideDocumentPasteEdits)===null||s===void 0?void 0:s.call(o,n,i,t,r)}catch(l){console.error(l);return}})).then(c1),r);return a==null||a.sort((o,s)=>s.priority-o.priority),a??[]})}applyDefaultPasteHandler(e,t,n){var i,r,a;return P4(this,void 0,void 0,function*(){const o=(i=e.get(Ti.text))!==null&&i!==void 0?i:e.get("text");if(!o)return;const s=yield o.asString();if(n.isCancellationRequested)return;const l={text:s,pasteOnNewLine:(r=t==null?void 0:t.defaultPastePayload.pasteOnNewLine)!==null&&r!==void 0?r:!1,multicursorText:(a=t==null?void 0:t.defaultPastePayload.multicursorText)!==null&&a!==void 0?a:null,mode:null};this._editor.trigger("keyboard","paste",l)})}};N3.ID="editor.contrib.copyPasteActionController";N3=Lmt([hD(1,mt),hD(2,YF),hD(3,td),hD(4,$e),hD(5,ud),hD(6,ebe)],N3);function ale(u,e){var t;return!!(!((t=u.pasteMimeTypes)===null||t===void 0)&&t.some(n=>e.matches(n)))}var Dee=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},H2=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},sv=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const xee=v("builtIn","Built-in");class vee{provideDocumentPasteEdits(e,t,n,i){return sv(this,void 0,void 0,function*(){const r=yield this.getEdit(n,i);return r?{id:this.id,insertText:r.insertText,label:r.label,detail:r.detail,priority:r.priority}:void 0})}provideDocumentOnDropEdits(e,t,n,i){return sv(this,void 0,void 0,function*(){const r=yield this.getEdit(n,i);return r?{id:this.id,insertText:r.insertText,label:r.label,priority:r.priority}:void 0})}}class Mye extends vee{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[Ti.text],this.pasteMimeTypes=[Ti.text]}getEdit(e,t){return sv(this,void 0,void 0,function*(){const n=e.get(Ti.text);if(!n||e.has(Ti.uriList))return;const i=yield n.asString();return{id:this.id,priority:0,label:v("text.label","Insert Plain Text"),detail:xee,insertText:i}})}}class Tye extends vee{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[Ti.uriList],this.pasteMimeTypes=[Ti.uriList]}getEdit(e,t){return sv(this,void 0,void 0,function*(){const n=yield Pye(e);if(!n.length||t.isCancellationRequested)return;let i=0;const r=n.map(({uri:o,originalText:s})=>o.scheme===It.file?o.fsPath:(i++,s)).join(" ");let a;return i>0?a=n.length>1?v("defaultDropProvider.uriList.uris","Insert Uris"):v("defaultDropProvider.uriList.uri","Insert Uri"):a=n.length>1?v("defaultDropProvider.uriList.paths","Insert Paths"):v("defaultDropProvider.uriList.path","Insert Path"),{id:this.id,priority:0,insertText:r,label:a,detail:xee}})}}let Dw=class extends vee{constructor(e){super(),this._workspaceContextService=e,this.id="relativePath",this.dropMimeTypes=[Ti.uriList],this.pasteMimeTypes=[Ti.uriList]}getEdit(e,t){return sv(this,void 0,void 0,function*(){const n=yield Pye(e);if(!n.length||t.isCancellationRequested)return;const i=c1(n.map(({uri:r})=>{const a=this._workspaceContextService.getWorkspaceFolder(r);return a?Xnt(a.uri,r):void 0}));if(i.length)return{id:this.id,priority:0,insertText:i.join(" "),label:n.length>1?v("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):v("defaultDropProvider.uriList.relativePath","Insert Relative Path"),detail:xee}})}};Dw=Dee([H2(0,k3)],Dw);function Pye(u){return sv(this,void 0,void 0,function*(){const e=u.get(Ti.uriList);if(!e)return[];const t=yield e.asString(),n=[];for(const i of MN.parse(t))try{n.push({uri:lt.parse(i),originalText:i})}catch{}return n})}let wU=class extends ie{constructor(e,t){super(),this._register(e.documentOnDropEditProvider.register("*",new Mye)),this._register(e.documentOnDropEditProvider.register("*",new Tye)),this._register(e.documentOnDropEditProvider.register("*",new Dw(t)))}};wU=Dee([H2(0,$e),H2(1,k3)],wU);let zU=class extends ie{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new Mye)),this._register(e.documentPasteEditProvider.register("*",new Tye)),this._register(e.documentPasteEditProvider.register("*",new Dw(t)))}};zU=Dee([H2(0,$e),H2(1,k3)],zU);Eu(N3.ID,N3,0);cN(zU);Be(new class extends Dr{constructor(){super({id:wye,precondition:zye,kbOpts:{weight:100,primary:2137}})}runEditorCommand(u,e,t){var n;return(n=N3.get(e))===null||n===void 0?void 0:n.changePasteType()}});be(class extends je{constructor(){super({id:"editor.action.pasteAs",label:v("pasteAs","Paste As..."),alias:"Paste As...",precondition:void 0,description:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:v("pasteAs.id","The id of the paste edit to try applying. If not provided, the editor will show a picker.")}}}}]}})}run(u,e,t){var n;const i=typeof(t==null?void 0:t.id)=="string"?t.id:void 0;return(n=N3.get(e))===null||n===void 0?void 0:n.pasteAs(i)}});class Mmt{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class ole{constructor(e){this.identifier=e}}const Nye=Gt("treeViewsDndService");iu(Nye,Mmt,1);var Tmt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},sV=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},m7=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const Rye="editor.changeDropType",Iye=new Ne("dropWidgetVisible",!1,v("dropWidgetVisible","Whether the drop widget is showing"));let lv=class Oye extends ie{static get(e){return e.getContribution(Oye.ID)}constructor(e,t,n,i){super(),this._languageFeaturesService=n,this._treeViewsDragAndDropService=i,this.treeItemsTransfer=V2.getInstance(),this._dropProgressManager=this._register(t.createInstance(mw,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(pw,"dropIntoEditor",e,Iye,{id:Rye,label:v("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(r=>this.onDropIntoEditor(e,r.position,r.event)))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}onDropIntoEditor(e,t,n){var i;return m7(this,void 0,void 0,function*(){if(!n.dataTransfer||!e.hasModel())return;(i=this._currentOperation)===null||i===void 0||i.cancel(),e.focus(),e.setPosition(t);const r=$i(a=>m7(this,void 0,void 0,function*(){const o=new Ng(e,1,void 0,a);try{const s=yield this.extractDataTransferData(n);if(s.size===0||o.token.isCancellationRequested)return;const l=e.getModel();if(!l)return;const c=this._languageFeaturesService.documentOnDropEditProvider.ordered(l).filter(h=>h.dropMimeTypes?h.dropMimeTypes.some(E=>s.matches(E)):!0),d=yield this.getDropEdits(c,l,t,s,o);if(o.token.isCancellationRequested)return;if(d.length){const h=e.getOption(35).showDropSelector==="afterDrop";yield this._postDropWidgetManager.applyEditAndShowIfNeeded([O.fromPositions(t)],{activeEditIndex:0,allEdits:d},h,a)}}finally{o.dispose(),this._currentOperation===r&&(this._currentOperation=void 0)}}));this._dropProgressManager.showWhile(t,v("dropIntoEditorProgress","Running drop handlers. Click to cancel"),r),this._currentOperation=r})}getDropEdits(e,t,n,i,r){return m7(this,void 0,void 0,function*(){const a=yield CP(Promise.all(e.map(s=>s.provideDocumentOnDropEdits(t,n,i,r.token))),r.token),o=c1(a??[]);return o.sort((s,l)=>l.priority-s.priority),o})}extractDataTransferData(e){return m7(this,void 0,void 0,function*(){if(!e.dataTransfer)return new yye;const t=_ye(e.dataTransfer);if(this.treeItemsTransfer.hasData(ole.prototype)){const n=this.treeItemsTransfer.getData(ole.prototype);if(Array.isArray(n))for(const i of n){const r=yield this._treeViewsDragAndDropService.removeDragOperationTransfer(i.identifier);if(r)for(const[a,o]of r)t.replace(a,o)}}return t})}};lv.ID="editor.contrib.dropIntoEditorController";lv=Tmt([sV(1,mt),sV(2,$e),sV(3,Nye)],lv);Eu(lv.ID,lv,2);Be(new class extends Dr{constructor(){super({id:Rye,precondition:Iye,kbOpts:{weight:100,primary:2137}})}runEditorCommand(u,e,t){var n;(n=lv.get(e))===null||n===void 0||n.changeDropType()}});cN(wU);class pa{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(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){const t=e{if(this._highlightedDecorationId!==null&&(i.changeDecorationOptions(this._highlightedDecorationId,pa._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,i.changeDecorationOptions(this._highlightedDecorationId,pa._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(i.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let r=this._editor.getModel().getDecorationRange(t);if(r.startLineNumber!==r.endLineNumber&&r.endColumn===1){const a=r.endLineNumber-1,o=this._editor.getModel().getLineMaxColumn(a);r=new O(r.startLineNumber,r.startColumn,a,o)}this._rangeHighlightDecorationId=i.addDecoration(r,pa._RANGE_HIGHLIGHT_DECORATION)}}),n}set(e,t){this._editor.changeDecorations(n=>{let i=pa._FIND_MATCH_DECORATION;const r=[];if(e.length>1e3){i=pa._FIND_MATCH_NO_OVERVIEW_DECORATION;const o=this._editor.getModel().getLineCount(),l=this._editor.getLayoutInfo().height/o,c=Math.max(2,Math.ceil(3/l));let d=e[0].range.startLineNumber,h=e[0].range.endLineNumber;for(let E=1,g=e.length;E=m.startLineNumber?m.endLineNumber>h&&(h=m.endLineNumber):(r.push({range:new O(d,1,h,1),options:pa._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),d=m.startLineNumber,h=m.endLineNumber)}r.push({range:new O(d,1,h,1),options:pa._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const a=new Array(e.length);for(let o=0,s=e.length;on.removeDecoration(o)),this._findScopeDecorationIds=[]),t!=null&&t.length&&(this._findScopeDecorationIds=t.map(o=>n.addDecoration(o,pa._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){const n=this._decorations[t],i=this._editor.getModel().getDecorationRange(n);if(!(!i||i.endLineNumber>e.lineNumber)){if(i.endLineNumbere.column))return i}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,n=this._decorations.length;te.lineNumber)return r;if(!(r.startColumn0){const n=[];for(let a=0;aO.compareRangesUsingStarts(a.range,o.range));const i=[];let r=n[0];for(let a=1;a0?e[0].toUpperCase()+e.substr(1):u[0][0].toUpperCase()!==u[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function sle(u,e,t){return u[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&u[0].split(t).length===e.split(t).length}function lle(u,e,t){const n=e.split(t),i=u[0].split(t);let r="";return n.forEach((a,o)=>{r+=jye([i[o]],a)+t}),r.slice(0,-1)}class cle{constructor(e){this.staticValue=e,this.kind=0}}class Nmt{constructor(e){this.pieces=e,this.kind=1}}class cv{static fromStaticValue(e){return new cv([t3.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new cle(""):e.length===1&&e[0].staticValue!==null?this._state=new cle(e[0].staticValue):this._state=new Nmt(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?jye(e,this._state.staticValue):this._state.staticValue;let n="";for(let i=0,r=this._state.pieces.length;i0){const s=[],l=a.caseOps.length;let c=0;for(let d=0,h=o.length;d=l){s.push(o.slice(d));break}switch(a.caseOps[c]){case"U":s.push(o[d].toUpperCase());break;case"u":s.push(o[d].toUpperCase()),c++;break;case"L":s.push(o[d].toLowerCase());break;case"l":s.push(o[d].toLowerCase()),c++;break;default:s.push(o[d])}}o=s.join("")}n+=o}return n}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let n="";for(;e>0;){if(e=i)break;const a=u.charCodeAt(n);switch(a){case 92:t.emitUnchanged(n-1),t.emitStatic("\\",n+1);break;case 110:t.emitUnchanged(n-1),t.emitStatic(` @@ -1073,7 +1073,7 @@ ${c}`)}yield yield Dh(l.map(c=>c.body))}}catch(l){i={error:l}}finally{try{s&&!s. `));let d=l.props,h=typeof(d==null?void 0:d.className)=="function"?(...g)=>aDe(d==null?void 0:d.className(...g),o.className):aDe(d==null?void 0:d.className,o.className),E=h?{className:h}:{};return C.cloneElement(l,Object.assign({},TRe(l.props,qZ(E$(o,["ref"]))),c,s,jPu(l.ref,s.ref),E))}return C.createElement(i,Object.assign({},E$(o,["ref"]),i!==C.Fragment&&s,i!==C.Fragment&&c),l)}function jPu(...u){return{ref:u.every(e=>e==null)?void 0:e=>{for(let t of u)t!=null&&(typeof t=="function"?t(e):t.current=e)}}}function TRe(...u){if(u.length===0)return{};if(u.length===1)return u[0];let e={},t={};for(let n of u)for(let i in n)i.startsWith("on")&&typeof n[i]=="function"?(t[i]!=null||(t[i]=[]),t[i].push(n[i])):e[i]=n[i];if(e.disabled||e["aria-disabled"])return Object.assign(e,Object.fromEntries(Object.keys(t).map(n=>[n,void 0])));for(let n in t)Object.assign(e,{[n](i,...r){let a=t[n];for(let o of a){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;o(i,...r)}}});return e}function Zp(u){var e;return Object.assign(C.forwardRef(u),{displayName:(e=u.displayName)!=null?e:u.name})}function qZ(u){let e=Object.assign({},u);for(let t in e)e[t]===void 0&&delete e[t];return e}function E$(u,e=[]){let t=Object.assign({},u);for(let n of e)n in t&&delete t[n];return t}function VPu(u){let e=u.parentElement,t=null;for(;e&&!(e instanceof HTMLFieldSetElement);)e instanceof HTMLLegendElement&&(t=e),e=e.parentElement;let n=(e==null?void 0:e.getAttribute("disabled"))==="";return n&&HPu(t)?!1:n}function HPu(u){if(!u)return!1;let e=u.previousElementSibling;for(;e!==null;){if(e instanceof HTMLLegendElement)return!1;e=e.previousElementSibling}return!0}function PRe(u={},e=null,t=[]){for(let[n,i]of Object.entries(u))RRe(t,NRe(e,n),i);return t}function NRe(u,e){return u?u+"["+e+"]":e}function RRe(u,e,t){if(Array.isArray(t))for(let[n,i]of t.entries())RRe(u,NRe(e,n.toString()),i);else t instanceof Date?u.push([e,t.toISOString()]):typeof t=="boolean"?u.push([e,t?"1":"0"]):typeof t=="string"?u.push([e,t]):typeof t=="number"?u.push([e,`${t}`]):t==null?u.push([e,""]):PRe(t,e,u)}let $Pu="div";var IRe=(u=>(u[u.None=1]="None",u[u.Focusable=2]="Focusable",u[u.Hidden=4]="Hidden",u))(IRe||{});function KPu(u,e){let{features:t=1,...n}=u,i={ref:e,"aria-hidden":(t&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(t&4)===4&&(t&2)!==2&&{display:"none"}}};return Jp({ourProps:i,theirProps:n,slot:{},defaultTag:$Pu,name:"Hidden"})}let WPu=Zp(KPu),Wne=C.createContext(null);Wne.displayName="OpenClosedContext";var cF=(u=>(u[u.Open=1]="Open",u[u.Closed=2]="Closed",u[u.Closing=4]="Closing",u[u.Opening=8]="Opening",u))(cF||{});function GPu(){return C.useContext(Wne)}function UPu({value:u,children:e}){return M.createElement(Wne.Provider,{value:u},e)}var i0=(u=>(u.Space=" ",u.Enter="Enter",u.Escape="Escape",u.Backspace="Backspace",u.Delete="Delete",u.ArrowLeft="ArrowLeft",u.ArrowUp="ArrowUp",u.ArrowRight="ArrowRight",u.ArrowDown="ArrowDown",u.Home="Home",u.End="End",u.PageUp="PageUp",u.PageDown="PageDown",u.Tab="Tab",u))(i0||{});function qPu(u,e,t){let[n,i]=C.useState(t),r=u!==void 0,a=C.useRef(r),o=C.useRef(!1),s=C.useRef(!1);return r&&!a.current&&!o.current?(o.current=!0,a.current=r,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!r&&a.current&&!s.current&&(s.current=!0,a.current=r,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[r?u:n,gi(l=>(r||i(l),e==null?void 0:e(l)))]}function oDe(u,e){let t=C.useRef([]),n=gi(u);C.useEffect(()=>{let i=[...t.current];for(let[r,a]of e.entries())if(t.current[r]!==a){let o=n(e,i);return t.current=e,o}},[n,...e])}function sDe(u){return[u.screenX,u.screenY]}function JPu(){let u=C.useRef([-1,-1]);return{wasMoved(e){let t=sDe(e);return u.current[0]===t[0]&&u.current[1]===t[1]?!1:(u.current=t,!0)},update(e){u.current=sDe(e)}}}function ZPu(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function YPu(){return/Android/gi.test(window.navigator.userAgent)}function QPu(){return ZPu()||YPu()}function XPu(...u){return C.useMemo(()=>Kne(...u),[...u])}var eNu=(u=>(u[u.Open=0]="Open",u[u.Closed=1]="Closed",u))(eNu||{}),tNu=(u=>(u[u.Single=0]="Single",u[u.Multi=1]="Multi",u))(tNu||{}),uNu=(u=>(u[u.Pointer=0]="Pointer",u[u.Other=1]="Other",u))(uNu||{}),nNu=(u=>(u[u.OpenCombobox=0]="OpenCombobox",u[u.CloseCombobox=1]="CloseCombobox",u[u.GoToOption=2]="GoToOption",u[u.RegisterOption=3]="RegisterOption",u[u.UnregisterOption=4]="UnregisterOption",u[u.RegisterLabel=5]="RegisterLabel",u))(nNu||{});function g$(u,e=t=>t){let t=u.activeOptionIndex!==null?u.options[u.activeOptionIndex]:null,n=zPu(e(u.options.slice()),r=>r.dataRef.current.domRef.current),i=t?n.indexOf(t):null;return i===-1&&(i=null),{options:n,activeOptionIndex:i}}let iNu={1(u){var e;return(e=u.dataRef.current)!=null&&e.disabled||u.comboboxState===1?u:{...u,activeOptionIndex:null,comboboxState:1}},0(u){var e;if((e=u.dataRef.current)!=null&&e.disabled||u.comboboxState===0)return u;let t=u.activeOptionIndex;if(u.dataRef.current){let{isSelected:n}=u.dataRef.current,i=u.options.findIndex(r=>n(r.dataRef.current.value));i!==-1&&(t=i)}return{...u,comboboxState:0,activeOptionIndex:t}},2(u,e){var t,n,i,r;if((t=u.dataRef.current)!=null&&t.disabled||(n=u.dataRef.current)!=null&&n.optionsRef.current&&!((i=u.dataRef.current)!=null&&i.optionsPropsRef.current.static)&&u.comboboxState===1)return u;let a=g$(u);if(a.activeOptionIndex===null){let s=a.options.findIndex(l=>!l.dataRef.current.disabled);s!==-1&&(a.activeOptionIndex=s)}let o=IPu(e,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:s=>s.id,resolveDisabled:s=>s.dataRef.current.disabled});return{...u,...a,activeOptionIndex:o,activationTrigger:(r=e.trigger)!=null?r:1}},3:(u,e)=>{var t,n;let i={id:e.id,dataRef:e.dataRef},r=g$(u,o=>[...o,i]);u.activeOptionIndex===null&&(t=u.dataRef.current)!=null&&t.isSelected(e.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(i));let a={...u,...r,activationTrigger:1};return(n=u.dataRef.current)!=null&&n.__demoMode&&u.dataRef.current.value===void 0&&(a.activeOptionIndex=0),a},4:(u,e)=>{let t=g$(u,n=>{let i=n.findIndex(r=>r.id===e.id);return i!==-1&&n.splice(i,1),n});return{...u,...t,activationTrigger:1}},5:(u,e)=>({...u,labelId:e.id})},Gne=C.createContext(null);Gne.displayName="ComboboxActionsContext";function XA(u){let e=C.useContext(Gne);if(e===null){let t=new Error(`<${u} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,XA),t}return e}let Une=C.createContext(null);Une.displayName="ComboboxDataContext";function wC(u){let e=C.useContext(Une);if(e===null){let t=new Error(`<${u} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,wC),t}return e}function rNu(u,e){return qh(e.type,iNu,u,e)}let aNu=C.Fragment;function oNu(u,e){let{value:t,defaultValue:n,onChange:i,form:r,name:a,by:o=(X,Y)=>X===Y,disabled:s=!1,__demoMode:l=!1,nullable:c=!1,multiple:d=!1,...h}=u,[E=d?[]:void 0,g]=qPu(t,i,n),[m,f]=C.useReducer(rNu,{dataRef:C.createRef(),comboboxState:l?0:1,options:[],activeOptionIndex:null,activationTrigger:1,labelId:null}),p=C.useRef(!1),D=C.useRef({static:!1,hold:!1}),x=C.useRef(null),b=C.useRef(null),k=C.useRef(null),_=C.useRef(null),y=gi(typeof o=="string"?(X,Y)=>{let le=o;return(X==null?void 0:X[le])===(Y==null?void 0:Y[le])}:o),S=C.useCallback(X=>qh(B.mode,{1:()=>E.some(Y=>y(Y,X)),0:()=>y(E,X)}),[E]),B=C.useMemo(()=>({...m,optionsPropsRef:D,labelRef:x,inputRef:b,buttonRef:k,optionsRef:_,value:E,defaultValue:n,disabled:s,mode:d?1:0,get activeOptionIndex(){if(p.current&&m.activeOptionIndex===null&&m.options.length>0){let X=m.options.findIndex(Y=>!Y.dataRef.current.disabled);if(X!==-1)return X}return m.activeOptionIndex},compare:y,isSelected:S,nullable:c,__demoMode:l}),[E,n,s,d,c,l,m]),L=C.useRef(B.activeOptionIndex!==null?B.options[B.activeOptionIndex]:null);C.useEffect(()=>{let X=B.activeOptionIndex!==null?B.options[B.activeOptionIndex]:null;L.current!==X&&(L.current=X)}),y0(()=>{m.dataRef.current=B},[B]),MPu([B.buttonRef,B.inputRef,B.optionsRef],()=>H.closeCombobox(),B.comboboxState===0);let T=C.useMemo(()=>({open:B.comboboxState===0,disabled:s,activeIndex:B.activeOptionIndex,activeOption:B.activeOptionIndex===null?null:B.options[B.activeOptionIndex].dataRef.current.value,value:E}),[B,s,E]),N=gi(X=>{let Y=B.options.find(le=>le.id===X);Y&&V(Y.dataRef.current.value)}),F=gi(()=>{if(B.activeOptionIndex!==null){let{dataRef:X,id:Y}=B.options[B.activeOptionIndex];V(X.current.value),H.goToOption(Ua.Specific,Y)}}),A=gi(()=>{f({type:0}),p.current=!0}),z=gi(()=>{f({type:1}),p.current=!1}),P=gi((X,Y,le)=>(p.current=!1,X===Ua.Specific?f({type:2,focus:Ua.Specific,id:Y,trigger:le}):f({type:2,focus:X,trigger:le}))),I=gi((X,Y)=>(f({type:3,id:X,dataRef:Y}),()=>{var le;((le=L.current)==null?void 0:le.id)===X&&(p.current=!0),f({type:4,id:X})})),j=gi(X=>(f({type:5,id:X}),()=>f({type:5,id:null}))),V=gi(X=>qh(B.mode,{0(){return g==null?void 0:g(X)},1(){let Y=B.value.slice(),le=Y.findIndex(he=>y(he,X));return le===-1?Y.push(X):Y.splice(le,1),g==null?void 0:g(Y)}})),H=C.useMemo(()=>({onChange:V,registerOption:I,registerLabel:j,goToOption:P,closeCombobox:z,openCombobox:A,selectActiveOption:F,selectOption:N}),[]),q=e===null?{}:{ref:e},J=C.useRef(null),Q=$ne();return C.useEffect(()=>{J.current&&n!==void 0&&Q.addEventListener(J.current,"reset",()=>{g==null||g(n)})},[J,g]),M.createElement(Gne.Provider,{value:H},M.createElement(Une.Provider,{value:B},M.createElement(UPu,{value:qh(B.comboboxState,{0:cF.Open,1:cF.Closed})},a!=null&&E!=null&&PRe({[a]:E}).map(([X,Y],le)=>M.createElement(WPu,{features:IRe.Hidden,ref:le===0?he=>{var ze;J.current=(ze=he==null?void 0:he.closest("form"))!=null?ze:null}:void 0,...qZ({key:X,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:r,name:X,value:Y})})),Jp({ourProps:q,theirProps:h,slot:T,defaultTag:aNu,name:"Combobox"}))))}let sNu="input";function lNu(u,e){var t,n,i,r;let a=YA(),{id:o=`headlessui-combobox-input-${a}`,onChange:s,displayValue:l,type:c="text",...d}=u,h=wC("Combobox.Input"),E=XA("Combobox.Input"),g=QA(h.inputRef,e),m=XPu(h.inputRef),f=C.useRef(!1),p=$ne(),D=gi(()=>{E.onChange(null),h.optionsRef.current&&(h.optionsRef.current.scrollTop=0),E.goToOption(Ua.Nothing)}),x=function(){var F;return typeof l=="function"&&h.value!==void 0?(F=l(h.value))!=null?F:"":typeof h.value=="string"?h.value:""}();oDe(([F,A],[z,P])=>{if(f.current)return;let I=h.inputRef.current;I&&((P===0&&A===1||F!==z)&&(I.value=F),requestAnimationFrame(()=>{if(f.current||!I||(m==null?void 0:m.activeElement)!==I)return;let{selectionStart:j,selectionEnd:V}=I;Math.abs((V??0)-(j??0))===0&&j===0&&I.setSelectionRange(I.value.length,I.value.length)}))},[x,h.comboboxState,m]),oDe(([F],[A])=>{if(F===0&&A===1){if(f.current)return;let z=h.inputRef.current;if(!z)return;let P=z.value,{selectionStart:I,selectionEnd:j,selectionDirection:V}=z;z.value="",z.value=P,V!==null?z.setSelectionRange(I,j,V):z.setSelectionRange(I,j)}},[h.comboboxState]);let b=C.useRef(!1),k=gi(()=>{b.current=!0}),_=gi(()=>{p.nextFrame(()=>{b.current=!1})}),y=gi(F=>{switch(f.current=!0,F.key){case i0.Enter:if(f.current=!1,h.comboboxState!==0||b.current)return;if(F.preventDefault(),F.stopPropagation(),h.activeOptionIndex===null){E.closeCombobox();return}E.selectActiveOption(),h.mode===0&&E.closeCombobox();break;case i0.ArrowDown:return f.current=!1,F.preventDefault(),F.stopPropagation(),qh(h.comboboxState,{0:()=>{E.goToOption(Ua.Next)},1:()=>{E.openCombobox()}});case i0.ArrowUp:return f.current=!1,F.preventDefault(),F.stopPropagation(),qh(h.comboboxState,{0:()=>{E.goToOption(Ua.Previous)},1:()=>{E.openCombobox(),p.nextFrame(()=>{h.value||E.goToOption(Ua.Last)})}});case i0.Home:if(F.shiftKey)break;return f.current=!1,F.preventDefault(),F.stopPropagation(),E.goToOption(Ua.First);case i0.PageUp:return f.current=!1,F.preventDefault(),F.stopPropagation(),E.goToOption(Ua.First);case i0.End:if(F.shiftKey)break;return f.current=!1,F.preventDefault(),F.stopPropagation(),E.goToOption(Ua.Last);case i0.PageDown:return f.current=!1,F.preventDefault(),F.stopPropagation(),E.goToOption(Ua.Last);case i0.Escape:return f.current=!1,h.comboboxState!==0?void 0:(F.preventDefault(),h.optionsRef.current&&!h.optionsPropsRef.current.static&&F.stopPropagation(),h.nullable&&h.mode===0&&h.value===null&&D(),E.closeCombobox());case i0.Tab:if(f.current=!1,h.comboboxState!==0)return;h.mode===0&&E.selectActiveOption(),E.closeCombobox();break}}),S=gi(F=>{s==null||s(F),h.nullable&&h.mode===0&&F.target.value===""&&D(),E.openCombobox()}),B=gi(()=>{f.current=!1}),L=Hne(()=>{if(h.labelId)return[h.labelId].join(" ")},[h.labelId]),T=C.useMemo(()=>({open:h.comboboxState===0,disabled:h.disabled}),[h]),N={ref:g,id:o,role:"combobox",type:c,"aria-controls":(t=h.optionsRef.current)==null?void 0:t.id,"aria-expanded":h.comboboxState===0,"aria-activedescendant":h.activeOptionIndex===null||(n=h.options[h.activeOptionIndex])==null?void 0:n.id,"aria-labelledby":L,"aria-autocomplete":"list",defaultValue:(r=(i=u.defaultValue)!=null?i:h.defaultValue!==void 0?l==null?void 0:l(h.defaultValue):null)!=null?r:h.defaultValue,disabled:h.disabled,onCompositionStart:k,onCompositionEnd:_,onKeyDown:y,onChange:S,onBlur:B};return Jp({ourProps:N,theirProps:d,slot:T,defaultTag:sNu,name:"Combobox.Input"})}let cNu="button";function dNu(u,e){var t;let n=wC("Combobox.Button"),i=XA("Combobox.Button"),r=QA(n.buttonRef,e),a=YA(),{id:o=`headlessui-combobox-button-${a}`,...s}=u,l=$ne(),c=gi(m=>{switch(m.key){case i0.ArrowDown:return m.preventDefault(),m.stopPropagation(),n.comboboxState===1&&i.openCombobox(),l.nextFrame(()=>{var f;return(f=n.inputRef.current)==null?void 0:f.focus({preventScroll:!0})});case i0.ArrowUp:return m.preventDefault(),m.stopPropagation(),n.comboboxState===1&&(i.openCombobox(),l.nextFrame(()=>{n.value||i.goToOption(Ua.Last)})),l.nextFrame(()=>{var f;return(f=n.inputRef.current)==null?void 0:f.focus({preventScroll:!0})});case i0.Escape:return n.comboboxState!==0?void 0:(m.preventDefault(),n.optionsRef.current&&!n.optionsPropsRef.current.static&&m.stopPropagation(),i.closeCombobox(),l.nextFrame(()=>{var f;return(f=n.inputRef.current)==null?void 0:f.focus({preventScroll:!0})}));default:return}}),d=gi(m=>{if(VPu(m.currentTarget))return m.preventDefault();n.comboboxState===0?i.closeCombobox():(m.preventDefault(),i.openCombobox()),l.nextFrame(()=>{var f;return(f=n.inputRef.current)==null?void 0:f.focus({preventScroll:!0})})}),h=Hne(()=>{if(n.labelId)return[n.labelId,o].join(" ")},[n.labelId,o]),E=C.useMemo(()=>({open:n.comboboxState===0,disabled:n.disabled,value:n.value}),[n]),g={ref:r,id:o,type:TPu(u,n.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(t=n.optionsRef.current)==null?void 0:t.id,"aria-expanded":n.comboboxState===0,"aria-labelledby":h,disabled:n.disabled,onClick:d,onKeyDown:c};return Jp({ourProps:g,theirProps:s,slot:E,defaultTag:cNu,name:"Combobox.Button"})}let hNu="label";function ENu(u,e){let t=YA(),{id:n=`headlessui-combobox-label-${t}`,...i}=u,r=wC("Combobox.Label"),a=XA("Combobox.Label"),o=QA(r.labelRef,e);y0(()=>a.registerLabel(n),[n]);let s=gi(()=>{var c;return(c=r.inputRef.current)==null?void 0:c.focus({preventScroll:!0})}),l=C.useMemo(()=>({open:r.comboboxState===0,disabled:r.disabled}),[r]);return Jp({ourProps:{ref:o,id:n,onClick:s},theirProps:i,slot:l,defaultTag:hNu,name:"Combobox.Label"})}let gNu="ul",mNu=UZ.RenderStrategy|UZ.Static;function fNu(u,e){let t=YA(),{id:n=`headlessui-combobox-options-${t}`,hold:i=!1,...r}=u,a=wC("Combobox.Options"),o=QA(a.optionsRef,e),s=GPu(),l=(()=>s!==null?(s&cF.Open)===cF.Open:a.comboboxState===0)();y0(()=>{var E;a.optionsPropsRef.current.static=(E=u.static)!=null?E:!1},[a.optionsPropsRef,u.static]),y0(()=>{a.optionsPropsRef.current.hold=i},[a.optionsPropsRef,i]),NPu({container:a.optionsRef.current,enabled:a.comboboxState===0,accept(E){return E.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:E.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(E){E.setAttribute("role","none")}});let c=Hne(()=>{var E,g;return(g=a.labelId)!=null?g:(E=a.buttonRef.current)==null?void 0:E.id},[a.labelId,a.buttonRef.current]),d=C.useMemo(()=>({open:a.comboboxState===0}),[a]),h={"aria-labelledby":c,role:"listbox","aria-multiselectable":a.mode===1?!0:void 0,id:n,ref:o};return Jp({ourProps:h,theirProps:r,slot:d,defaultTag:gNu,features:mNu,visible:l,name:"Combobox.Options"})}let pNu="li";function DNu(u,e){var t,n;let i=YA(),{id:r=`headlessui-combobox-option-${i}`,disabled:a=!1,value:o,...s}=u,l=wC("Combobox.Option"),c=XA("Combobox.Option"),d=l.activeOptionIndex!==null?l.options[l.activeOptionIndex].id===r:!1,h=l.isSelected(o),E=C.useRef(null),g=ZA({disabled:a,value:o,domRef:E,textValue:(n=(t=E.current)==null?void 0:t.textContent)==null?void 0:n.toLowerCase()}),m=QA(e,E),f=gi(()=>c.selectOption(r));y0(()=>c.registerOption(r,g),[g,r]);let p=C.useRef(!l.__demoMode);y0(()=>{if(!l.__demoMode)return;let B=pT();return B.requestAnimationFrame(()=>{p.current=!0}),B.dispose},[]),y0(()=>{if(l.comboboxState!==0||!d||!p.current||l.activationTrigger===0)return;let B=pT();return B.requestAnimationFrame(()=>{var L,T;(T=(L=E.current)==null?void 0:L.scrollIntoView)==null||T.call(L,{block:"nearest"})}),B.dispose},[E,d,l.comboboxState,l.activationTrigger,l.activeOptionIndex]);let D=gi(B=>{if(a)return B.preventDefault();f(),l.mode===0&&c.closeCombobox(),QPu()||requestAnimationFrame(()=>{var L;return(L=l.inputRef.current)==null?void 0:L.focus()})}),x=gi(()=>{if(a)return c.goToOption(Ua.Nothing);c.goToOption(Ua.Specific,r)}),b=JPu(),k=gi(B=>b.update(B)),_=gi(B=>{b.wasMoved(B)&&(a||d||c.goToOption(Ua.Specific,r,0))}),y=gi(B=>{b.wasMoved(B)&&(a||d&&(l.optionsPropsRef.current.hold||c.goToOption(Ua.Nothing)))}),S=C.useMemo(()=>({active:d,selected:h,disabled:a}),[d,h,a]);return Jp({ourProps:{id:r,ref:m,role:"option",tabIndex:a===!0?void 0:-1,"aria-disabled":a===!0?!0:void 0,"aria-selected":h,disabled:void 0,onClick:D,onFocus:x,onPointerEnter:k,onMouseEnter:k,onPointerMove:_,onMouseMove:_,onPointerLeave:y,onMouseLeave:y},theirProps:s,slot:S,defaultTag:pNu,name:"Combobox.Option"})}let xNu=Zp(oNu),vNu=Zp(dNu),CNu=Zp(lNu),bNu=Zp(ENu),kNu=Zp(fNu),yNu=Zp(DNu),zD=Object.assign(xNu,{Input:CNu,Button:vNu,Label:bNu,Options:kNu,Option:yNu});var FNu=Object.defineProperty,Ce=(u,e)=>FNu(u,"name",{value:e,configurable:!0});function vm(u){const e=C.createContext(null);return e.displayName=u,e}Ce(vm,"createNullableContext");function Cm(u){function e(t){var n;const i=C.useContext(u);if(i===null&&t!=null&&t.nonNull)throw new Error(`Tried to use \`${((n=t.caller)==null?void 0:n.name)||e.caller.name}\` without the necessary context. Make sure to render the \`${u.displayName}Provider\` component higher up the tree.`);return i}return Ce(e,"useGivenContext"),Object.defineProperty(e,"name",{value:`use${u.displayName}`}),e}Ce(Cm,"createContextHook");const ORe=vm("StorageContext");function jRe(u){const e=C.useRef(!0),[t,n]=C.useState(new lZ(u.storage));return C.useEffect(()=>{e.current?e.current=!1:n(new lZ(u.storage))},[u.storage]),w.jsx(ORe.Provider,{value:t,children:u.children})}Ce(jRe,"StorageContextProvider");const bm=Cm(ORe),ANu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z",stroke:"currentColor",strokeWidth:1.2}),C.createElement("rect",{x:6,y:6,width:2,height:2,rx:1,fill:"currentColor"})),"SvgArgument"),_Nu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M1 1L7 7L13 1",stroke:"currentColor",strokeWidth:1.5})),"SvgChevronDown"),SNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 7 10",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M6 1.04819L2 5.04819L6 9.04819",stroke:"currentColor",strokeWidth:1.75})),"SvgChevronLeft"),BNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M13 8L7 2L1 8",stroke:"currentColor",strokeWidth:1.5})),"SvgChevronUp"),wNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M1 1L12.9998 12.9997",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{d:"M13 1L1.00079 13.0003",stroke:"currentColor",strokeWidth:1.5})),"SvgClose"),zNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"-2 -2 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M11.25 14.2105V15.235C11.25 16.3479 10.3479 17.25 9.23501 17.25H2.76499C1.65214 17.25 0.75 16.3479 0.75 15.235L0.75 8.76499C0.75 7.65214 1.65214 6.75 2.76499 6.75L3.78947 6.75",stroke:"currentColor",strokeWidth:1.5}),C.createElement("rect",{x:6.75,y:.75,width:10.5,height:10.5,rx:2.2069,stroke:"currentColor",strokeWidth:1.5})),"SvgCopy"),LNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z",stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M5 9L9 5",stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M5 5L9 9",stroke:"currentColor",strokeWidth:1.2})),"SvgDeprecatedArgument"),MNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M4 8L8 4",stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M4 4L8 8",stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z",fill:"currentColor"})),"SvgDeprecatedEnumValue"),TNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:.6,y:.6,width:10.8,height:10.8,rx:3.4,stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M4 8L8 4",stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M4 4L8 8",stroke:"currentColor",strokeWidth:1.2})),"SvgDeprecatedField"),PNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0.5 12 12",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:7,y:5.5,width:2,height:2,rx:1,transform:"rotate(90 7 5.5)",fill:"currentColor"}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8 9L10.8 9.5C10.8 10.4941 9.99411 11.3 9 11.3L3 11.3C2.00589 11.3 1.2 10.4941 1.2 9.5L1.2 9L-3.71547e-07 9L-3.93402e-07 9.5C-4.65826e-07 11.1569 1.34314 12.5 3 12.5L9 12.5C10.6569 12.5 12 11.1569 12 9.5L12 9L10.8 9ZM10.8 4L12 4L12 3.5C12 1.84315 10.6569 0.5 9 0.5L3 0.5C1.34315 0.5 -5.87117e-08 1.84315 -1.31135e-07 3.5L-1.5299e-07 4L1.2 4L1.2 3.5C1.2 2.50589 2.00589 1.7 3 1.7L9 1.7C9.99411 1.7 10.8 2.50589 10.8 3.5L10.8 4Z",fill:"currentColor"})),"SvgDirective"),NNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H17.25C17.8023 0.75 18.25 1.19772 18.25 1.75V5.25",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{d:"M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H18.25C18.8023 5.25 19.25 5.69771 19.25 6.25V22.25C19.25 22.8023 18.8023 23.25 18.25 23.25H3C1.75736 23.25 0.75 22.2426 0.75 21V3Z",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 5.25C1.75736 5.25 0.75 4.24264 0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H3ZM13 11L6 11V12.5L13 12.5V11Z",fill:"currentColor"})),"SvgDocsFilled"),RNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H17.25M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H16.25C16.8023 0.75 17.25 1.19772 17.25 1.75V5.25M0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H17.25",stroke:"currentColor",strokeWidth:1.5}),C.createElement("line",{x1:13,y1:11.75,x2:6,y2:11.75,stroke:"currentColor",strokeWidth:1.5})),"SvgDocs"),INu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:5,y:5,width:2,height:2,rx:1,fill:"currentColor"}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z",fill:"currentColor"})),"SvgEnumValue"),ONu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:.6,y:1.1,width:10.8,height:10.8,rx:2.4,stroke:"currentColor",strokeWidth:1.2}),C.createElement("rect",{x:5,y:5.5,width:2,height:2,rx:1,fill:"currentColor"})),"SvgField"),jNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 24 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M1.59375 9.52344L4.87259 12.9944L8.07872 9.41249",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square"}),C.createElement("path",{d:"M13.75 5.25V10.75H18.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square"}),C.createElement("path",{d:"M4.95427 11.9332C4.55457 10.0629 4.74441 8.11477 5.49765 6.35686C6.25089 4.59894 7.5305 3.11772 9.16034 2.11709C10.7902 1.11647 12.6901 0.645626 14.5986 0.769388C16.5071 0.893151 18.3303 1.60543 19.8172 2.80818C21.3042 4.01093 22.3818 5.64501 22.9017 7.48548C23.4216 9.32595 23.3582 11.2823 22.7203 13.0853C22.0824 14.8883 20.9013 16.4492 19.3396 17.5532C17.778 18.6572 15.9125 19.25 14 19.25",stroke:"currentColor",strokeWidth:1.5})),"SvgHistory"),VNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("circle",{cx:6,cy:6,r:5.4,stroke:"currentColor",strokeWidth:1.2,strokeDasharray:"4.241025 4.241025",transform:"rotate(22.5)","transform-origin":"center"}),C.createElement("circle",{cx:6,cy:6,r:1,fill:"currentColor"})),"SvgImplements"),HNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M1.5 14.5653C1.5 15.211 1.75652 15.8303 2.21314 16.2869C2.66975 16.7435 3.28905 17 3.9348 17C4.58054 17 5.19984 16.7435 5.65646 16.2869C6.11307 15.8303 6.36959 15.211 6.36959 14.5653V12.1305H3.9348C3.28905 12.1305 2.66975 12.387 2.21314 12.8437C1.75652 13.3003 1.5 13.9195 1.5 14.5653Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M3.9348 1.00063C3.28905 1.00063 2.66975 1.25715 2.21314 1.71375C1.75652 2.17035 1.5 2.78964 1.5 3.43537C1.5 4.0811 1.75652 4.70038 2.21314 5.15698C2.66975 5.61358 3.28905 5.8701 3.9348 5.8701H6.36959V3.43537C6.36959 2.78964 6.11307 2.17035 5.65646 1.71375C5.19984 1.25715 4.58054 1.00063 3.9348 1.00063Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M15.0652 12.1305H12.6304V14.5653C12.6304 15.0468 12.7732 15.5175 13.0407 15.9179C13.3083 16.3183 13.6885 16.6304 14.1334 16.8147C14.5783 16.9989 15.0679 17.0472 15.5402 16.9532C16.0125 16.8593 16.4464 16.6274 16.7869 16.2869C17.1274 15.9464 17.3593 15.5126 17.4532 15.0403C17.5472 14.568 17.4989 14.0784 17.3147 13.6335C17.1304 13.1886 16.8183 12.8084 16.4179 12.5409C16.0175 12.2733 15.5468 12.1305 15.0652 12.1305Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M12.6318 5.86775H6.36955V12.1285H12.6318V5.86775Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M17.5 3.43473C17.5 2.789 17.2435 2.16972 16.7869 1.71312C16.3303 1.25652 15.711 1 15.0652 1C14.4195 1 13.8002 1.25652 13.3435 1.71312C12.8869 2.16972 12.6304 2.789 12.6304 3.43473V5.86946H15.0652C15.711 5.86946 16.3303 5.61295 16.7869 5.15635C17.2435 4.69975 17.5 4.08046 17.5 3.43473Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"})),"SvgKeyboardShortcut"),$Nu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("circle",{cx:5,cy:5,r:4.35,stroke:"currentColor",strokeWidth:1.3}),C.createElement("line",{x1:8.45962,y1:8.54038,x2:11.7525,y2:11.8333,stroke:"currentColor",strokeWidth:1.3})),"SvgMagnifyingGlass"),KNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"-2 -2 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M17.2492 6V2.9569C17.2492 1.73806 16.2611 0.75 15.0423 0.75L2.9569 0.75C1.73806 0.75 0.75 1.73806 0.75 2.9569L0.75 6",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{d:"M0.749873 12V15.0431C0.749873 16.2619 1.73794 17.25 2.95677 17.25H15.0421C16.261 17.25 17.249 16.2619 17.249 15.0431V12",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{d:"M6 4.5L9 7.5L12 4.5",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{d:"M12 13.5L9 10.5L6 13.5",stroke:"currentColor",strokeWidth:1.5})),"SvgMerge"),WNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M0.75 13.25L0.0554307 12.967C-0.0593528 13.2488 0.00743073 13.5719 0.224488 13.7851C0.441545 13.9983 0.765869 14.0592 1.04549 13.9393L0.75 13.25ZM12.8214 1.83253L12.2911 2.36286L12.2911 2.36286L12.8214 1.83253ZM12.8214 3.90194L13.3517 4.43227L12.8214 3.90194ZM10.0981 1.17859L9.56773 0.648259L10.0981 1.17859ZM12.1675 1.17859L12.6978 0.648258L12.6978 0.648257L12.1675 1.17859ZM2.58049 8.75697L3.27506 9.03994L2.58049 8.75697ZM2.70066 8.57599L3.23099 9.10632L2.70066 8.57599ZM5.2479 11.4195L4.95355 10.7297L5.2479 11.4195ZM5.42036 11.303L4.89003 10.7727L5.42036 11.303ZM4.95355 10.7297C4.08882 11.0987 3.41842 11.362 2.73535 11.6308C2.05146 11.9 1.35588 12.1743 0.454511 12.5607L1.04549 13.9393C1.92476 13.5624 2.60256 13.2951 3.28469 13.0266C3.96762 12.7578 4.65585 12.4876 5.54225 12.1093L4.95355 10.7297ZM1.44457 13.533L3.27506 9.03994L1.88592 8.474L0.0554307 12.967L1.44457 13.533ZM3.23099 9.10632L10.6284 1.70892L9.56773 0.648259L2.17033 8.04566L3.23099 9.10632ZM11.6371 1.70892L12.2911 2.36286L13.3517 1.3022L12.6978 0.648258L11.6371 1.70892ZM12.2911 3.37161L4.89003 10.7727L5.95069 11.8333L13.3517 4.43227L12.2911 3.37161ZM12.2911 2.36286C12.5696 2.64142 12.5696 3.09305 12.2911 3.37161L13.3517 4.43227C14.2161 3.56792 14.2161 2.16654 13.3517 1.3022L12.2911 2.36286ZM10.6284 1.70892C10.9069 1.43036 11.3586 1.43036 11.6371 1.70892L12.6978 0.648257C11.8335 -0.216088 10.4321 -0.216084 9.56773 0.648259L10.6284 1.70892ZM3.27506 9.03994C3.26494 9.06479 3.24996 9.08735 3.23099 9.10632L2.17033 8.04566C2.04793 8.16806 1.95123 8.31369 1.88592 8.474L3.27506 9.03994ZM5.54225 12.1093C5.69431 12.0444 5.83339 11.9506 5.95069 11.8333L4.89003 10.7727C4.90863 10.7541 4.92988 10.7398 4.95355 10.7297L5.54225 12.1093Z",fill:"currentColor"}),C.createElement("path",{d:"M11.5 4.5L9.5 2.5",stroke:"currentColor",strokeWidth:1.4026,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M5.5 10.5L3.5 8.5",stroke:"currentColor",strokeWidth:1.4026,strokeLinecap:"round",strokeLinejoin:"round"})),"SvgPen"),GNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M1.32226e-07 1.6609C7.22332e-08 0.907329 0.801887 0.424528 1.46789 0.777117L15.3306 8.11621C16.0401 8.49182 16.0401 9.50818 15.3306 9.88379L1.46789 17.2229C0.801886 17.5755 1.36076e-06 17.0927 1.30077e-06 16.3391L1.32226e-07 1.6609Z",fill:"currentColor"})),"SvgPlay"),UNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.25 9.25V13.5H5.75V9.25L10 9.25V7.75L5.75 7.75V3.5H4.25V7.75L0 7.75V9.25L4.25 9.25Z",fill:"currentColor"})),"SvgPlus"),qNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{width:25,height:25,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M10.2852 24.0745L13.7139 18.0742",stroke:"currentColor",strokeWidth:1.5625}),C.createElement("path",{d:"M14.5742 24.0749L17.1457 19.7891",stroke:"currentColor",strokeWidth:1.5625}),C.createElement("path",{d:"M19.4868 24.0735L20.7229 21.7523C21.3259 20.6143 21.5457 19.3122 21.3496 18.0394C21.1535 16.7666 20.5519 15.591 19.6342 14.6874L23.7984 6.87853C24.0123 6.47728 24.0581 6.00748 23.9256 5.57249C23.7932 5.1375 23.4933 4.77294 23.0921 4.55901C22.6908 4.34509 22.221 4.29932 21.7861 4.43178C21.3511 4.56424 20.9865 4.86408 20.7726 5.26533L16.6084 13.0742C15.3474 12.8142 14.0362 12.9683 12.8699 13.5135C11.7035 14.0586 10.7443 14.9658 10.135 16.1L6 24.0735",stroke:"currentColor",strokeWidth:1.5625}),C.createElement("path",{d:"M4 15L5 13L7 12L5 11L4 9L3 11L1 12L3 13L4 15Z",stroke:"currentColor",strokeWidth:1.5625,strokeLinejoin:"round"}),C.createElement("path",{d:"M11.5 8L12.6662 5.6662L15 4.5L12.6662 3.3338L11.5 1L10.3338 3.3338L8 4.5L10.3338 5.6662L11.5 8Z",stroke:"currentColor",strokeWidth:1.5625,strokeLinejoin:"round"})),"SvgPrettify"),JNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M4.75 9.25H1.25V12.75",stroke:"currentColor",strokeWidth:1,strokeLinecap:"square"}),C.createElement("path",{d:"M11.25 6.75H14.75V3.25",stroke:"currentColor",strokeWidth:1,strokeLinecap:"square"}),C.createElement("path",{d:"M14.1036 6.65539C13.8 5.27698 13.0387 4.04193 11.9437 3.15131C10.8487 2.26069 9.48447 1.76694 8.0731 1.75043C6.66173 1.73392 5.28633 2.19563 4.17079 3.0604C3.05526 3.92516 2.26529 5.14206 1.92947 6.513",stroke:"currentColor",strokeWidth:1}),C.createElement("path",{d:"M1.89635 9.34461C2.20001 10.723 2.96131 11.9581 4.05631 12.8487C5.15131 13.7393 6.51553 14.2331 7.9269 14.2496C9.33827 14.2661 10.7137 13.8044 11.8292 12.9396C12.9447 12.0748 13.7347 10.8579 14.0705 9.487",stroke:"currentColor",strokeWidth:1})),"SvgReload"),ZNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:.6,y:.6,width:11.8,height:11.8,rx:5.9,stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M4.25 7.5C4.25 6 5.75 5 6.5 6.5C7.25 8 8.75 7 8.75 5.5",stroke:"currentColor",strokeWidth:1.2})),"SvgRootType"),YNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29186 1.92702C9.06924 1.82745 8.87014 1.68202 8.70757 1.50024L7.86631 0.574931C7.62496 0.309957 7.30773 0.12592 6.95791 0.0479385C6.60809 -0.0300431 6.24274 0.00182978 5.91171 0.139208C5.58068 0.276585 5.3001 0.512774 5.10828 0.815537C4.91645 1.1183 4.82272 1.47288 4.83989 1.83089L4.90388 3.08019C4.91612 3.32348 4.87721 3.56662 4.78968 3.79394C4.70215 4.02126 4.56794 4.2277 4.39571 4.39994C4.22347 4.57219 4.01704 4.7064 3.78974 4.79394C3.56243 4.88147 3.3193 4.92038 3.07603 4.90814L1.8308 4.84414C1.47162 4.82563 1.11553 4.91881 0.811445 5.11086C0.507359 5.30292 0.270203 5.58443 0.132561 5.91671C-0.00508149 6.249 -0.0364554 6.61576 0.0427496 6.9666C0.121955 7.31744 0.307852 7.63514 0.5749 7.87606L1.50016 8.71204C1.68193 8.87461 1.82735 9.07373 1.92692 9.29636C2.02648 9.51898 2.07794 9.76012 2.07794 10.004C2.07794 10.2479 2.02648 10.489 1.92692 10.7116C1.82735 10.9343 1.68193 11.1334 1.50016 11.296L0.5749 12.1319C0.309856 12.3729 0.125575 12.6898 0.0471809 13.0393C-0.0312128 13.3888 9.64098e-05 13.754 0.13684 14.0851C0.273583 14.4162 0.509106 14.6971 0.811296 14.8894C1.11349 15.0817 1.46764 15.1762 1.82546 15.1599L3.0707 15.0959C3.31397 15.0836 3.5571 15.1225 3.7844 15.2101C4.01171 15.2976 4.21814 15.4318 4.39037 15.6041C4.56261 15.7763 4.69682 15.9827 4.78435 16.2101C4.87188 16.4374 4.91078 16.6805 4.89855 16.9238L4.83455 18.1691C4.81605 18.5283 4.90921 18.8844 5.10126 19.1885C5.2933 19.4926 5.5748 19.7298 5.90707 19.8674C6.23934 20.0051 6.60608 20.0365 6.9569 19.9572C7.30772 19.878 7.6254 19.6921 7.86631 19.4251L8.7129 18.4998C8.87547 18.318 9.07458 18.1725 9.29719 18.073C9.51981 17.9734 9.76093 17.9219 10.0048 17.9219C10.2487 17.9219 10.4898 17.9734 10.7124 18.073C10.935 18.1725 11.1341 18.318 11.2967 18.4998L12.1326 19.4251C12.3735 19.6921 12.6912 19.878 13.042 19.9572C13.3929 20.0365 13.7596 20.0051 14.0919 19.8674C14.4241 19.7298 14.7056 19.4926 14.8977 19.1885C15.0897 18.8844 15.1829 18.5283 15.1644 18.1691L15.1004 16.9238C15.0882 16.6805 15.1271 16.4374 15.2146 16.2101C15.3021 15.9827 15.4363 15.7763 15.6086 15.6041C15.7808 15.4318 15.9872 15.2976 16.2145 15.2101C16.4418 15.1225 16.685 15.0836 16.9282 15.0959L18.1735 15.1599C18.5326 15.1784 18.8887 15.0852 19.1928 14.8931C19.4969 14.7011 19.7341 14.4196 19.8717 14.0873C20.0093 13.755 20.0407 13.3882 19.9615 13.0374C19.8823 12.6866 19.6964 12.3689 19.4294 12.1279L18.5041 11.292C18.3223 11.1294 18.1769 10.9303 18.0774 10.7076C17.9778 10.485 17.9263 10.2439 17.9263 10C17.9263 9.75612 17.9778 9.51499 18.0774 9.29236C18.1769 9.06973 18.3223 8.87062 18.5041 8.70804L19.4294 7.87206C19.6964 7.63114 19.8823 7.31344 19.9615 6.9626C20.0407 6.61176 20.0093 6.245 19.8717 5.91271C19.7341 5.58043 19.4969 5.29892 19.1928 5.10686C18.8887 4.91481 18.5326 4.82163 18.1735 4.84014L16.9282 4.90414C16.685 4.91638 16.4418 4.87747 16.2145 4.78994C15.9872 4.7024 15.7808 4.56818 15.6086 4.39594C15.4363 4.2237 15.3021 4.01726 15.2146 3.78994C15.1271 3.56262 15.0882 3.31948 15.1004 3.07619L15.1644 1.83089C15.1829 1.4717 15.0897 1.11559 14.8977 0.811487C14.7056 0.507385 14.4241 0.270217 14.0919 0.132568C13.7596 -0.00508182 13.3929 -0.0364573 13.042 0.0427519C12.6912 0.121961 12.3735 0.307869 12.1326 0.574931L11.2914 1.50024C11.1288 1.68202 10.9297 1.82745 10.7071 1.92702C10.4845 2.02659 10.2433 2.07805 9.99947 2.07805C9.7556 2.07805 9.51448 2.02659 9.29186 1.92702ZM14.3745 10C14.3745 12.4162 12.4159 14.375 9.99977 14.375C7.58365 14.375 5.625 12.4162 5.625 10C5.625 7.58375 7.58365 5.625 9.99977 5.625C12.4159 5.625 14.3745 7.58375 14.3745 10Z",fill:"currentColor"})),"SvgSettings"),QNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z",fill:"currentColor",stroke:"currentColor"})),"SvgStarFilled"),XNu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z",stroke:"currentColor",strokeWidth:1.5})),"SvgStar"),eRu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{width:16,height:16,rx:2,fill:"currentColor"})),"SvgStop"),tRu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{width:"1em",height:"5em",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd","aria-hidden":"true",viewBox:"0 0 23 23",style:{height:"1.5em"},clipRule:"evenodd","aria-labelledby":e,...t},u===void 0?C.createElement("title",{id:e},"trash icon"):u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M19 24h-14c-1.104 0-2-.896-2-2v-17h-1v-2h6v-1.5c0-.827.673-1.5 1.5-1.5h5c.825 0 1.5.671 1.5 1.5v1.5h6v2h-1v17c0 1.104-.896 2-2 2zm0-19h-14v16.5c0 .276.224.5.5.5h13c.276 0 .5-.224.5-.5v-16.5zm-7 7.586l3.293-3.293 1.414 1.414-3.293 3.293 3.293 3.293-1.414 1.414-3.293-3.293-3.293 3.293-1.414-1.414 3.293-3.293-3.293-3.293 1.414-1.414 3.293 3.293zm2-10.586h-4v1h4v-1z",fill:"currentColor",strokeWidth:.25,stroke:"currentColor"})),"SvgTrash"),uRu=Ce(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:.6,y:.6,width:11.8,height:11.8,rx:5.9,stroke:"currentColor",strokeWidth:1.2}),C.createElement("rect",{x:5.5,y:5.5,width:2,height:2,rx:1,fill:"currentColor"})),"SvgType"),nRu=zn(ANu),iRu=zn(_Nu),rRu=zn(SNu),aRu=zn(BNu),qne=zn(wNu),oRu=zn(zNu),sRu=zn(LNu),lRu=zn(MNu),cRu=zn(TNu),dRu=zn(PNu),hRu=zn(NNu,"filled docs icon"),ERu=zn(RNu),gRu=zn(INu),mRu=zn(ONu),fRu=zn(jNu),pRu=zn(VNu),DRu=zn(HNu),xRu=zn($Nu),vRu=zn(KNu),CRu=zn(WNu),bRu=zn(GNu),kRu=zn(UNu),yRu=zn(qNu),FRu=zn(JNu),ARu=zn(ZNu),_Ru=zn(YNu),SRu=zn(QNu,"filled star icon"),BRu=zn(XNu),wRu=zn(eRu),zRu=zn(tRu,"trash icon"),q9=zn(uRu);function zn(u,e=u.name.replace("Svg","").replaceAll(/([A-Z])/g," $1").trimStart().toLowerCase()+" icon"){return u.defaultProps={title:e},u}Ce(zn,"generateIcon");const ua=C.forwardRef((u,e)=>w.jsx("button",{...u,ref:e,className:Ra("graphiql-un-styled",u.className)}));ua.displayName="UnStyledButton";const pc=C.forwardRef((u,e)=>w.jsx("button",{...u,ref:e,className:Ra("graphiql-button",{success:"graphiql-button-success",error:"graphiql-button-error"}[u.state],u.className)}));pc.displayName="Button";const JZ=C.forwardRef((u,e)=>w.jsx("div",{...u,ref:e,className:Ra("graphiql-button-group",u.className)}));JZ.displayName="ButtonGroup";const e_=Ce((u,e)=>Object.entries(e).reduce((t,[n,i])=>(t[n]=i,t),u),"createComponentGroup"),VRe=C.forwardRef((u,e)=>w.jsx(WZt,{asChild:!0,children:w.jsxs(ua,{...u,ref:e,type:"button",className:Ra("graphiql-dialog-close",u.className),children:[w.jsx(xPe,{children:"Close dialog"}),w.jsx(qne,{})]})}));VRe.displayName="Dialog.Close";function HRe({children:u,...e}){return w.jsx(IZt,{...e,children:w.jsxs(jZt,{children:[w.jsx(VZt,{className:"graphiql-dialog-overlay"}),w.jsx(HZt,{className:"graphiql-dialog",children:u})]})})}Ce(HRe,"DialogRoot");const LD=e_(HRe,{Close:VRe,Title:$Zt,Trigger:OZt,Description:KZt}),$Re=C.forwardRef((u,e)=>w.jsx(sQt,{asChild:!0,children:w.jsx("button",{...u,ref:e,className:Ra("graphiql-un-styled",u.className)})}));$Re.displayName="DropdownMenuButton";function KRe({children:u,align:e="start",sideOffset:t=5,className:n,...i}){return w.jsx(lQt,{children:w.jsx(cQt,{align:e,sideOffset:t,className:Ra("graphiql-dropdown-content",n),...i,children:u})})}Ce(KRe,"Content");const LRu=Ce(({className:u,children:e,...t})=>w.jsx(dQt,{className:Ra("graphiql-dropdown-item",u),...t,children:e}),"Item"),NE=e_(oQt,{Button:$Re,Item:LRu,Content:KRe}),DT=new iwu({breaks:!0,linkify:!0}),S1=C.forwardRef(({children:u,onlyShowFirstChild:e,type:t,...n},i)=>w.jsx("div",{...n,ref:i,className:Ra(`graphiql-markdown-${t}`,e&&"graphiql-markdown-preview",n.className),dangerouslySetInnerHTML:{__html:DT.render(u)}}));S1.displayName="MarkdownContent";const Jne=C.forwardRef((u,e)=>w.jsx("div",{...u,ref:e,className:Ra("graphiql-spinner",u.className)}));Jne.displayName="Spinner";function WRe({children:u,align:e="start",side:t="bottom",sideOffset:n=5,label:i}){return w.jsxs(fPu,{children:[w.jsx(pPu,{asChild:!0,children:u}),w.jsx(DPu,{children:w.jsx(xPu,{className:"graphiql-tooltip",align:e,side:t,sideOffset:n,children:i})})]})}Ce(WRe,"TooltipRoot");const ko=e_(WRe,{Provider:mPu}),GRe=C.forwardRef(({isActive:u,value:e,children:t,className:n,...i},r)=>w.jsx(wRe.Item,{...i,ref:r,value:e,"aria-selected":u?"true":void 0,role:"tab",className:Ra("graphiql-tab",u&&"graphiql-tab-active",n),children:t}));GRe.displayName="Tab";const URe=C.forwardRef((u,e)=>w.jsx(ua,{...u,ref:e,type:"button",className:Ra("graphiql-tab-button",u.className),children:u.children}));URe.displayName="Tab.Button";const qRe=C.forwardRef((u,e)=>w.jsx(ko,{label:"Close Tab",children:w.jsx(ua,{"aria-label":"Close Tab",...u,ref:e,type:"button",className:Ra("graphiql-tab-close",u.className),children:w.jsx(qne,{})})}));qRe.displayName="Tab.Close";const m$=e_(GRe,{Button:URe,Close:qRe}),JRe=C.forwardRef(({values:u,onReorder:e,children:t,className:n,...i},r)=>w.jsx(wRe.Group,{...i,ref:r,values:u,onReorder:e,axis:"x",role:"tablist",className:Ra("graphiql-tabs",n),children:t}));JRe.displayName="Tabs";const ZRe=vm("HistoryContext");function YRe(u){var e;const t=bm(),n=C.useRef(new Tqt(t||new lZ(null),u.maxHistoryLength||MRu)),[i,r]=C.useState(((e=n.current)==null?void 0:e.queries)||[]),a=C.useCallback(h=>{var E;(E=n.current)==null||E.updateHistory(h),r(n.current.queries)},[]),o=C.useCallback((h,E)=>{n.current.editLabel(h,E),r(n.current.queries)},[]),s=C.useCallback(h=>{n.current.toggleFavorite(h),r(n.current.queries)},[]),l=C.useCallback(h=>h,[]),c=C.useCallback((h,E=!1)=>{n.current.deleteHistory(h,E),r(n.current.queries)},[]),d=C.useMemo(()=>({addToHistory:a,editLabel:o,items:i,toggleFavorite:s,setActive:l,deleteFromHistory:c}),[a,o,i,s,l,c]);return w.jsx(ZRe.Provider,{value:d,children:u.children})}Ce(YRe,"HistoryContextProvider");const II=Cm(ZRe),MRu=20;function QRe(){const{items:u,deleteFromHistory:e}=II({nonNull:!0});let t=u.slice().map((o,s)=>({...o,index:s})).reverse();const n=t.filter(o=>o.favorite);n.length&&(t=t.filter(o=>!o.favorite));const[i,r]=C.useState(null);C.useEffect(()=>{i&&setTimeout(()=>{r(null)},2e3)},[i]);const a=C.useCallback(()=>{try{for(const o of t)e(o,!0);r("success")}catch{r("error")}},[e,t]);return w.jsxs("section",{"aria-label":"History",className:"graphiql-history",children:[w.jsxs("div",{className:"graphiql-history-header",children:["History",(i||t.length>0)&&w.jsx(pc,{type:"button",state:i||void 0,disabled:!t.length,onClick:a,children:{success:"Cleared",error:"Failed to Clear"}[i]||"Clear"})]}),!!n.length&&w.jsx("ul",{className:"graphiql-history-items",children:n.map(o=>w.jsx(dF,{item:o},o.index))}),!!n.length&&!!t.length&&w.jsx("div",{className:"graphiql-history-item-spacer"}),!!t.length&&w.jsx("ul",{className:"graphiql-history-items",children:t.map(o=>w.jsx(dF,{item:o},o.index))})]})}Ce(QRe,"History");function dF(u){const{editLabel:e,toggleFavorite:t,deleteFromHistory:n,setActive:i}=II({nonNull:!0,caller:dF}),{headerEditor:r,queryEditor:a,variableEditor:o}=Ia({nonNull:!0,caller:dF}),s=C.useRef(null),l=C.useRef(null),[c,d]=C.useState(!1);C.useEffect(()=>{var x;c&&((x=s.current)==null||x.focus())},[c]);const h=u.item.label||u.item.operationName||XRe(u.item.query),E=C.useCallback(()=>{var x;d(!1);const{index:b,...k}=u.item;e({...k,label:(x=s.current)==null?void 0:x.value},b)},[e,u.item]),g=C.useCallback(()=>{d(!1)},[]),m=C.useCallback(x=>{x.stopPropagation(),d(!0)},[]),f=C.useCallback(()=>{const{query:x,variables:b,headers:k}=u.item;a==null||a.setValue(x??""),o==null||o.setValue(b??""),r==null||r.setValue(k??""),i(u.item)},[r,u.item,a,i,o]),p=C.useCallback(x=>{x.stopPropagation(),n(u.item)},[u.item,n]),D=C.useCallback(x=>{x.stopPropagation(),t(u.item)},[u.item,t]);return w.jsx("li",{className:Ra("graphiql-history-item",c&&"editable"),children:c?w.jsxs(w.Fragment,{children:[w.jsx("input",{type:"text",defaultValue:u.item.label,ref:s,onKeyDown:x=>{x.key==="Esc"?d(!1):x.key==="Enter"&&(d(!1),e({...u.item,label:x.currentTarget.value}))},placeholder:"Type a label"}),w.jsx(ua,{type:"button",ref:l,onClick:E,children:"Save"}),w.jsx(ua,{type:"button",ref:l,onClick:g,children:w.jsx(qne,{})})]}):w.jsxs(w.Fragment,{children:[w.jsx(ko,{label:"Set active",children:w.jsx(ua,{type:"button",className:"graphiql-history-item-label",onClick:f,"aria-label":"Set active",children:h})}),w.jsx(ko,{label:"Edit label",children:w.jsx(ua,{type:"button",className:"graphiql-history-item-action",onClick:m,"aria-label":"Edit label",children:w.jsx(CRu,{"aria-hidden":"true"})})}),w.jsx(ko,{label:u.item.favorite?"Remove favorite":"Add favorite",children:w.jsx(ua,{type:"button",className:"graphiql-history-item-action",onClick:D,"aria-label":u.item.favorite?"Remove favorite":"Add favorite",children:u.item.favorite?w.jsx(SRu,{"aria-hidden":"true"}):w.jsx(BRu,{"aria-hidden":"true"})})}),w.jsx(ko,{label:"Delete from history",children:w.jsx(ua,{type:"button",className:"graphiql-history-item-action",onClick:p,"aria-label":"Delete from history",children:w.jsx(zRu,{"aria-hidden":"true"})})})]})})}Ce(dF,"HistoryItem");function XRe(u){return u==null?void 0:u.split(` `).map(e=>e.replace(/#(.*)/,"")).join(" ").replaceAll("{"," { ").replaceAll("}"," } ").replaceAll(/[\s]{2,}/g," ")}Ce(XRe,"formatQuery");const eIe=vm("ExecutionContext");function xT({fetcher:u,getDefaultFieldNames:e,children:t,operationName:n}){if(!u)throw new TypeError("The `ExecutionContextProvider` component requires a `fetcher` function to be passed as prop.");const{externalFragments:i,headerEditor:r,queryEditor:a,responseEditor:o,variableEditor:s,updateActiveTabValues:l}=Ia({nonNull:!0,caller:xT}),c=II(),d=kT({getDefaultFieldNames:e,caller:xT}),[h,E]=C.useState(!1),[g,m]=C.useState(null),f=C.useRef(0),p=C.useCallback(()=>{g==null||g.unsubscribe(),E(!1),m(null)},[g]),D=C.useCallback(async()=>{if(!a||!o)return;if(g){p();return}const k=Ce(F=>{o.setValue(F),l({response:F})},"setResponse");f.current+=1;const _=f.current;let y=d()||a.getValue();const S=s==null?void 0:s.getValue();let B;try{B=ZZ({json:S,errorMessageParse:"Variables are invalid JSON",errorMessageType:"Variables are not a JSON object."})}catch(F){k(F instanceof Error?F.message:`${F}`);return}const L=r==null?void 0:r.getValue();let T;try{T=ZZ({json:L,errorMessageParse:"Headers are invalid JSON",errorMessageType:"Headers are not a JSON object."})}catch(F){k(F instanceof Error?F.message:`${F}`);return}if(i){const F=a.documentAST?pJt(a.documentAST,i):[];F.length>0&&(y+=` `+F.map(A=>Js(A)).join(` -`))}k(""),E(!0);const N=n??a.operationName??void 0;c==null||c.addToHistory({query:y,variables:S,headers:L,operationName:N});try{let F={data:{}};const A=Ce(I=>{if(_!==f.current)return;let j=Array.isArray(I)?I:!1;if(!j&&typeof I=="object"&&I!==null&&"hasNext"in I&&(j=[I]),j){const V={data:F.data},H=[...(F==null?void 0:F.errors)||[],...j.flatMap(q=>q.errors).filter(Boolean)];H.length&&(V.errors=H);for(const q of j){const{path:J,data:Q,errors:X,...Y}=q;if(J){if(!Q)throw new Error(`Expected part to contain a data property, but got ${q}`);TJt(V.data,J,Q,{merge:!0})}else Q&&(V.data=Q);F={...V,...Y}}E(!1),k(sZ(F))}else{const V=sZ(I);E(!1),k(V)}},"handleResponse"),z=u({query:y,variables:B,operationName:N},{headers:T??void 0,documentAST:a.documentAST??void 0}),P=await Promise.resolve(z);if(VTe(P))m(P.subscribe({next(I){A(I)},error(I){E(!1),I&&k(Yy(I)),m(null)},complete(){E(!1),m(null)}}));else if(HTe(P)){m({unsubscribe:()=>{var I,j;return(j=(I=P[Symbol.asyncIterator]()).return)==null?void 0:j.call(I)}});for await(const I of P)A(I);E(!1),m(null)}else A(P)}catch(F){E(!1),k(Yy(F)),m(null)}},[d,i,u,r,c,n,a,o,p,g,l,s]),x=!!g,b=C.useMemo(()=>({isFetching:h,isSubscribed:x,operationName:n??null,run:D,stop:p}),[h,x,n,D,p]);return w.jsx(eIe.Provider,{value:b,children:t})}Ce(xT,"ExecutionContextProvider");const t_=Cm(eIe);function ZZ({json:u,errorMessageParse:e,errorMessageType:t}){let n;try{n=u&&u.trim()!==""?JSON.parse(u):void 0}catch(r){throw new Error(`${e}: ${r instanceof Error?r.message:r}.`)}const i=typeof n=="object"&&n!==null&&!Array.isArray(n);if(n!==void 0&&!i)throw new Error(t);return n}Ce(ZZ,"tryParseJsonObject");const OI="graphiql",jI="sublime";let tIe=!1;typeof window=="object"&&(tIe=window.navigator.platform.toLowerCase().indexOf("mac")===0);const VI={[tIe?"Cmd-F":"Ctrl-F"]:"findPersistent","Cmd-G":"findPersistent","Ctrl-G":"findPersistent","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"};async function zC(u,e){const t=await Le(()=>import("./codemirror.es-52e8b92d.js"),["./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.c).then(n=>typeof n=="function"?n:n.default);return await Promise.all((e==null?void 0:e.useCommonAddons)===!1?u:[Le(()=>import("./show-hint.es-b981493e.js"),["./show-hint.es-b981493e.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.s),Le(()=>import("./matchbrackets.es-97d2e827.js"),["./matchbrackets.es-97d2e827.js","./codemirror.es2-5884f31a.js","./matchbrackets.es2-f53f57e6.js"],import.meta.url).then(n=>n.m),Le(()=>import("./closebrackets.es-e969742b.js"),["./closebrackets.es-e969742b.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.c),Le(()=>import("./brace-fold.es-f2e3735d.js"),["./brace-fold.es-f2e3735d.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.b),Le(()=>import("./foldgutter.es-b6cee46a.js"),["./foldgutter.es-b6cee46a.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.f),Le(()=>import("./lint.es-fe7166bb.js"),["./lint.es-fe7166bb.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.l),Le(()=>import("./searchcursor.es-b1a352a2.js"),["./searchcursor.es-b1a352a2.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js"],import.meta.url).then(n=>n.s),Le(()=>import("./jump-to-line.es-d901ea33.js"),["./jump-to-line.es-d901ea33.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(n=>n.j),Le(()=>import("./dialog.es-dffe62e7.js"),["./dialog.es-dffe62e7.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(n=>n.d),Le(()=>import("./sublime.es-e2a3eb60.js"),["./sublime.es-e2a3eb60.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./matchbrackets.es2-f53f57e6.js"],import.meta.url).then(n=>n.s),...u]),t}Ce(zC,"importCodeMirror");const TRu=Ce(u=>u?Js(u):"","printDefault");function Zne({field:u}){if(!("defaultValue"in u)||u.defaultValue===void 0)return null;const e=Mx(u.defaultValue,u.type);return e?w.jsxs(w.Fragment,{children:[" = ",w.jsx("span",{className:"graphiql-doc-explorer-default-value",children:TRu(e)})]}):null}Ce(Zne,"DefaultValue");const uIe=vm("SchemaContext");function Yne(u){if(!u.fetcher)throw new TypeError("The `SchemaContextProvider` component requires a `fetcher` function to be passed as prop.");const{initialHeaders:e,headerEditor:t}=Ia({nonNull:!0,caller:Yne}),[n,i]=C.useState(),[r,a]=C.useState(!1),[o,s]=C.useState(null),l=C.useRef(0);C.useEffect(()=>{i(XJ(u.schema)||u.schema===null||u.schema===void 0?u.schema:void 0),l.current++},[u.schema]);const c=C.useRef(e);C.useEffect(()=>{t&&(c.current=t.getValue())});const{introspectionQuery:d,introspectionQueryName:h,introspectionQuerySansSubscriptions:E}=nIe({inputValueDeprecation:u.inputValueDeprecation,introspectionQueryName:u.introspectionQueryName,schemaDescription:u.schemaDescription}),{fetcher:g,onSchemaChange:m,dangerouslyAssumeSchemaIsValid:f,children:p}=u,D=C.useCallback(()=>{if(XJ(u.schema)||u.schema===null)return;const k=++l.current,_=u.schema;async function y(){if(_)return _;const S=iIe(c.current);if(!S.isValidJSON){s("Introspection failed as headers are invalid.");return}const B=S.headers?{headers:S.headers}:{},L=Ume(g({query:d,operationName:h},B));if(!Gme(L)){s("Fetcher did not return a Promise for introspection.");return}a(!0),s(null);let T=await L;if(typeof T!="object"||T===null||!("data"in T)){const F=Ume(g({query:E,operationName:h},B));if(!Gme(F))throw new Error("Fetcher did not return a Promise for introspection.");T=await F}if(a(!1),T!=null&&T.data&&"__schema"in T.data)return T.data;const N=typeof T=="string"?T:sZ(T);s(N)}Ce(y,"fetchIntrospectionData"),y().then(S=>{if(!(k!==l.current||!S))try{const B=wWt(S);i(B),m==null||m(B)}catch(B){s(Yy(B))}}).catch(S=>{k===l.current&&(s(Yy(S)),a(!1))})},[g,h,d,E,m,u.schema]);C.useEffect(()=>{D()},[D]),C.useEffect(()=>{function k(_){_.ctrlKey&&_.key==="R"&&D()}return Ce(k,"triggerIntrospection"),window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)});const x=C.useMemo(()=>!n||f?[]:oTe(n),[n,f]),b=C.useMemo(()=>({fetchError:o,introspect:D,isFetching:r,schema:n,validationErrors:x}),[o,D,r,n,x]);return w.jsx(uIe.Provider,{value:b,children:p})}Ce(Yne,"SchemaContextProvider");const V1=Cm(uIe);function nIe({inputValueDeprecation:u,introspectionQueryName:e,schemaDescription:t}){return C.useMemo(()=>{const n=e||"IntrospectionQuery";let i=BWt({inputValueDeprecation:u,schemaDescription:t});e&&(i=i.replace("query IntrospectionQuery",`query ${n}`));const r=i.replace("subscriptionType { name }","");return{introspectionQueryName:n,introspectionQuery:i,introspectionQuerySansSubscriptions:r}},[u,e,t])}Ce(nIe,"useIntrospectionQuery");function iIe(u){let e=null,t=!0;try{u&&(e=JSON.parse(u))}catch{t=!1}return{headers:e,isValidJSON:t}}Ce(iIe,"parseHeaderString");const J9={name:"Docs"},rIe=vm("ExplorerContext");function Qne(u){const{schema:e,validationErrors:t}=V1({nonNull:!0,caller:Qne}),[n,i]=C.useState([J9]),r=C.useCallback(l=>{i(c=>c.at(-1).def===l.def?c:[...c,l])},[]),a=C.useCallback(()=>{i(l=>l.length>1?l.slice(0,-1):l)},[]),o=C.useCallback(()=>{i(l=>l.length===1?l:[J9])},[]);C.useEffect(()=>{e==null||t.length>0?o():i(l=>{if(l.length===1)return l;const c=[J9];let d=null;for(const h of l)if(h!==J9)if(h.def)if(Wue(h.def)){const E=e.getType(h.def.name);if(E)c.push({name:h.name,def:E}),d=E;else break}else{if(d===null)break;if(Ki(d)||Io(d)){const E=d.getFields()[h.name];if(E)c.push({name:h.name,def:E});else break}else{if(pm(d)||L0(d)||Wi(d)||Ml(d))break;{const E=d;if(E.args.find(g=>g.name===h.name))c.push({name:h.name,def:E});else break}}}else d=null,c.push(h);return c})},[o,e,t]);const s=C.useMemo(()=>({explorerNavStack:n,push:r,pop:a,reset:o}),[n,r,a,o]);return w.jsx(rIe.Provider,{value:s,children:u.children})}Ce(Qne,"ExplorerContextProvider");const km=Cm(rIe);function hF(u,e){return wr(u)?w.jsxs(w.Fragment,{children:[hF(u.ofType,e),"!"]}):ss(u)?w.jsxs(w.Fragment,{children:["[",hF(u.ofType,e),"]"]}):e(u)}Ce(hF,"renderType");function Sc(u){const{push:e}=km({nonNull:!0,caller:Sc});return u.type?hF(u.type,t=>w.jsx("a",{className:"graphiql-doc-explorer-type-name",onClick:n=>{n.preventDefault(),e({name:t.name,def:t})},href:"#",children:t.name})):null}Ce(Sc,"TypeLink");function EF({arg:u,showDefaultValue:e,inline:t}){const n=w.jsxs("span",{children:[w.jsx("span",{className:"graphiql-doc-explorer-argument-name",children:u.name}),": ",w.jsx(Sc,{type:u.type}),e!==!1&&w.jsx(Zne,{field:u})]});return t?n:w.jsxs("div",{className:"graphiql-doc-explorer-argument",children:[n,u.description?w.jsx(S1,{type:"description",children:u.description}):null,u.deprecationReason?w.jsxs("div",{className:"graphiql-doc-explorer-argument-deprecation",children:[w.jsx("div",{className:"graphiql-doc-explorer-argument-deprecation-label",children:"Deprecated"}),w.jsx(S1,{type:"deprecation",children:u.deprecationReason})]}):null]})}Ce(EF,"Argument");function Xne(u){return u.children?w.jsxs("div",{className:"graphiql-doc-explorer-deprecation",children:[w.jsx("div",{className:"graphiql-doc-explorer-deprecation-label",children:"Deprecated"}),w.jsx(S1,{type:"deprecation",onlyShowFirstChild:u.preview??!0,children:u.children})]}):null}Ce(Xne,"DeprecationReason");function aIe({directive:u}){return w.jsxs("span",{className:"graphiql-doc-explorer-directive",children:["@",u.name.value]})}Ce(aIe,"Directive");function M0(u){const e=PRu[u.title];return w.jsxs("div",{children:[w.jsxs("div",{className:"graphiql-doc-explorer-section-title",children:[w.jsx(e,{}),u.title]}),w.jsx("div",{className:"graphiql-doc-explorer-section-content",children:u.children})]})}Ce(M0,"ExplorerSection");const PRu={Arguments:nRu,"Deprecated Arguments":sRu,"Deprecated Enum Values":lRu,"Deprecated Fields":cRu,Directives:dRu,"Enum Values":gRu,Fields:mRu,Implements:pRu,Implementations:q9,"Possible Types":q9,"Root Types":ARu,Type:q9,"All Schema Types":q9};function oIe(u){return w.jsxs(w.Fragment,{children:[u.field.description?w.jsx(S1,{type:"description",children:u.field.description}):null,w.jsx(Xne,{preview:!1,children:u.field.deprecationReason}),w.jsx(M0,{title:"Type",children:w.jsx(Sc,{type:u.field.type})}),w.jsx(sIe,{field:u.field}),w.jsx(lIe,{field:u.field})]})}Ce(oIe,"FieldDocumentation");function sIe({field:u}){const[e,t]=C.useState(!1),n=C.useCallback(()=>{t(!0)},[]);if(!("args"in u))return null;const i=[],r=[];for(const a of u.args)a.deprecationReason?r.push(a):i.push(a);return w.jsxs(w.Fragment,{children:[i.length>0?w.jsx(M0,{title:"Arguments",children:i.map(a=>w.jsx(EF,{arg:a},a.name))}):null,r.length>0?e||i.length===0?w.jsx(M0,{title:"Deprecated Arguments",children:r.map(a=>w.jsx(EF,{arg:a},a.name))}):w.jsx(pc,{type:"button",onClick:n,children:"Show Deprecated Arguments"}):null]})}Ce(sIe,"Arguments");function lIe({field:u}){var e;const t=((e=u.astNode)==null?void 0:e.directives)||[];return!t||t.length===0?null:w.jsx(M0,{title:"Directives",children:t.map(n=>w.jsx("div",{children:w.jsx(aIe,{directive:n})},n.name.value))})}Ce(lIe,"Directives");function cIe(u){var e,t,n,i;const r=u.schema.getQueryType(),a=(t=(e=u.schema).getMutationType)==null?void 0:t.call(e),o=(i=(n=u.schema).getSubscriptionType)==null?void 0:i.call(n),s=u.schema.getTypeMap(),l=[r==null?void 0:r.name,a==null?void 0:a.name,o==null?void 0:o.name];return w.jsxs(w.Fragment,{children:[w.jsx(S1,{type:"description",children:u.schema.description||"A GraphQL schema provides a root type for each kind of operation."}),w.jsxs(M0,{title:"Root Types",children:[r?w.jsxs("div",{children:[w.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"query"}),": ",w.jsx(Sc,{type:r})]}):null,a&&w.jsxs("div",{children:[w.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"mutation"}),": ",w.jsx(Sc,{type:a})]}),o&&w.jsxs("div",{children:[w.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"subscription"}),": ",w.jsx(Sc,{type:o})]})]}),w.jsx(M0,{title:"All Schema Types",children:s&&w.jsx("div",{children:Object.values(s).map(c=>l.includes(c.name)||c.name.startsWith("__")?null:w.jsx("div",{children:w.jsx(Sc,{type:c})},c.name))})})]})}Ce(cIe,"SchemaDocumentation");function lp(u,e){let t;return function(...n){t&&window.clearTimeout(t),t=window.setTimeout(()=>{t=null,e(...n)},u)}}Ce(lp,"debounce");function eie(){const{explorerNavStack:u,push:e}=km({nonNull:!0,caller:eie}),t=C.useRef(null),n=vT(),[i,r]=C.useState(""),[a,o]=C.useState(n(i)),s=C.useMemo(()=>lp(200,E=>{o(n(E))}),[n]);C.useEffect(()=>{s(i)},[s,i]),C.useEffect(()=>{function E(g){var m;g.metaKey&&g.key==="k"&&((m=t.current)==null||m.focus())}return Ce(E,"handleKeyDown"),window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[]);const l=u.at(-1),c=C.useCallback(E=>{e("field"in E?{name:E.field.name,def:E.field}:{name:E.type.name,def:E.type})},[e]),d=C.useRef(!1),h=C.useCallback(E=>{d.current=E.type==="focus"},[]);return u.length===1||Ki(l.def)||Wi(l.def)||Io(l.def)?w.jsxs(zD,{as:"div",className:"graphiql-doc-explorer-search",onChange:c,"data-state":d?void 0:"idle","aria-label":`Search ${l.name}...`,children:[w.jsxs("div",{className:"graphiql-doc-explorer-search-input",onClick:()=>{var E;(E=t.current)==null||E.focus()},children:[w.jsx(xRu,{}),w.jsx(zD.Input,{autoComplete:"off",onFocus:h,onBlur:h,onChange:E=>r(E.target.value),placeholder:"⌘ K",ref:t,value:i,"data-cy":"doc-explorer-input"})]}),d.current&&w.jsxs(zD.Options,{"data-cy":"doc-explorer-list",children:[a.within.length+a.types.length+a.fields.length===0?w.jsx("li",{className:"graphiql-doc-explorer-search-empty",children:"No results found"}):a.within.map((E,g)=>w.jsx(zD.Option,{value:E,"data-cy":"doc-explorer-option",children:w.jsx(YZ,{field:E.field,argument:E.argument})},`within-${g}`)),a.within.length>0&&a.types.length+a.fields.length>0?w.jsx("div",{className:"graphiql-doc-explorer-search-divider",children:"Other results"}):null,a.types.map((E,g)=>w.jsx(zD.Option,{value:E,"data-cy":"doc-explorer-option",children:w.jsx(CT,{type:E.type})},`type-${g}`)),a.fields.map((E,g)=>w.jsxs(zD.Option,{value:E,"data-cy":"doc-explorer-option",children:[w.jsx(CT,{type:E.type}),".",w.jsx(YZ,{field:E.field,argument:E.argument})]},`field-${g}`))]})]}):null}Ce(eie,"Search");function vT(u){const{explorerNavStack:e}=km({nonNull:!0,caller:u||vT}),{schema:t}=V1({nonNull:!0,caller:u||vT}),n=e.at(-1);return C.useCallback(i=>{const r={within:[],types:[],fields:[]};if(!t)return r;const a=n.def,o=t.getTypeMap();let s=Object.keys(o);a&&(s=s.filter(l=>l!==a.name),s.unshift(a.name));for(const l of s){if(r.within.length+r.types.length+r.fields.length>=100)break;const c=o[l];if(a!==c&&C8(l,i)&&r.types.push({type:c}),!Ki(c)&&!Wi(c)&&!Io(c))continue;const d=c.getFields();for(const h in d){const E=d[h];let g;if(!C8(h,i))if("args"in E){if(g=E.args.filter(m=>C8(m.name,i)),g.length===0)continue}else continue;r[a===c?"within":"fields"].push(...g?g.map(m=>({type:c,field:E,argument:m})):[{type:c,field:E}])}}return r},[n.def,t])}Ce(vT,"useSearchResults");function C8(u,e){try{const t=e.replaceAll(/[^_0-9A-Za-z]/g,n=>"\\"+n);return u.search(new RegExp(t,"i"))!==-1}catch{return u.toLowerCase().includes(e.toLowerCase())}}Ce(C8,"isMatch");function CT(u){return w.jsx("span",{className:"graphiql-doc-explorer-search-type",children:u.type.name})}Ce(CT,"Type");function YZ({field:u,argument:e}){return w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"graphiql-doc-explorer-search-field",children:u.name}),e?w.jsxs(w.Fragment,{children:["(",w.jsx("span",{className:"graphiql-doc-explorer-search-argument",children:e.name}),":"," ",hF(e.type,t=>w.jsx(CT,{type:t})),")"]}):null]})}Ce(YZ,"Field$1");function dIe(u){const{push:e}=km({nonNull:!0});return w.jsx("a",{className:"graphiql-doc-explorer-field-name",onClick:t=>{t.preventDefault(),e({name:u.field.name,def:u.field})},href:"#",children:u.field.name})}Ce(dIe,"FieldLink");function hIe(u){return Wue(u.type)?w.jsxs(w.Fragment,{children:[u.type.description?w.jsx(S1,{type:"description",children:u.type.description}):null,w.jsx(EIe,{type:u.type}),w.jsx(gIe,{type:u.type}),w.jsx(mIe,{type:u.type}),w.jsx(fIe,{type:u.type})]}):null}Ce(hIe,"TypeDocumentation");function EIe({type:u}){return Ki(u)&&u.getInterfaces().length>0?w.jsx(M0,{title:"Implements",children:u.getInterfaces().map(e=>w.jsx("div",{children:w.jsx(Sc,{type:e})},e.name))}):null}Ce(EIe,"ImplementsInterfaces");function gIe({type:u}){const[e,t]=C.useState(!1),n=C.useCallback(()=>{t(!0)},[]);if(!Ki(u)&&!Wi(u)&&!Io(u))return null;const i=u.getFields(),r=[],a=[];for(const o of Object.keys(i).map(s=>i[s]))o.deprecationReason?a.push(o):r.push(o);return w.jsxs(w.Fragment,{children:[r.length>0?w.jsx(M0,{title:"Fields",children:r.map(o=>w.jsx(QZ,{field:o},o.name))}):null,a.length>0?e||r.length===0?w.jsx(M0,{title:"Deprecated Fields",children:a.map(o=>w.jsx(QZ,{field:o},o.name))}):w.jsx(pc,{type:"button",onClick:n,children:"Show Deprecated Fields"}):null]})}Ce(gIe,"Fields");function QZ({field:u}){const e="args"in u?u.args.filter(t=>!t.deprecationReason):[];return w.jsxs("div",{className:"graphiql-doc-explorer-item",children:[w.jsxs("div",{children:[w.jsx(dIe,{field:u}),e.length>0?w.jsxs(w.Fragment,{children:["(",w.jsx("span",{children:e.map(t=>e.length===1?w.jsx(EF,{arg:t,inline:!0},t.name):w.jsx("div",{className:"graphiql-doc-explorer-argument-multiple",children:w.jsx(EF,{arg:t,inline:!0})},t.name))}),")"]}):null,": ",w.jsx(Sc,{type:u.type}),w.jsx(Zne,{field:u})]}),u.description?w.jsx(S1,{type:"description",onlyShowFirstChild:!0,children:u.description}):null,w.jsx(Xne,{children:u.deprecationReason})]})}Ce(QZ,"Field");function mIe({type:u}){const[e,t]=C.useState(!1),n=C.useCallback(()=>{t(!0)},[]);if(!L0(u))return null;const i=[],r=[];for(const a of u.getValues())a.deprecationReason?r.push(a):i.push(a);return w.jsxs(w.Fragment,{children:[i.length>0?w.jsx(M0,{title:"Enum Values",children:i.map(a=>w.jsx(XZ,{value:a},a.name))}):null,r.length>0?e||i.length===0?w.jsx(M0,{title:"Deprecated Enum Values",children:r.map(a=>w.jsx(XZ,{value:a},a.name))}):w.jsx(pc,{type:"button",onClick:n,children:"Show Deprecated Values"}):null]})}Ce(mIe,"EnumValues");function XZ({value:u}){return w.jsxs("div",{className:"graphiql-doc-explorer-item",children:[w.jsx("div",{className:"graphiql-doc-explorer-enum-value",children:u.name}),u.description?w.jsx(S1,{type:"description",children:u.description}):null,u.deprecationReason?w.jsx(S1,{type:"deprecation",children:u.deprecationReason}):null]})}Ce(XZ,"EnumValue");function fIe({type:u}){const{schema:e}=V1({nonNull:!0});return!e||!pg(u)?null:w.jsx(M0,{title:Wi(u)?"Implementations":"Possible Types",children:e.getPossibleTypes(u).map(t=>w.jsx("div",{children:w.jsx(Sc,{type:t})},t.name))})}Ce(fIe,"PossibleTypes");function bT(){const{fetchError:u,isFetching:e,schema:t,validationErrors:n}=V1({nonNull:!0,caller:bT}),{explorerNavStack:i,pop:r}=km({nonNull:!0,caller:bT}),a=i.at(-1);let o=null;u?o=w.jsx("div",{className:"graphiql-doc-explorer-error",children:"Error fetching schema"}):n.length>0?o=w.jsxs("div",{className:"graphiql-doc-explorer-error",children:["Schema is invalid: ",n[0].message]}):e?o=w.jsx(Jne,{}):t?i.length===1?o=w.jsx(cIe,{schema:t}):$ue(a.def)?o=w.jsx(hIe,{type:a.def}):a.def&&(o=w.jsx(oIe,{field:a.def})):o=w.jsx("div",{className:"graphiql-doc-explorer-error",children:"No GraphQL schema available"});let s;return i.length>1&&(s=i.at(-2).name),w.jsxs("section",{className:"graphiql-doc-explorer","aria-label":"Documentation Explorer",children:[w.jsxs("div",{className:"graphiql-doc-explorer-header",children:[w.jsxs("div",{className:"graphiql-doc-explorer-header-content",children:[s&&w.jsxs("a",{href:"#",className:"graphiql-doc-explorer-back",onClick:l=>{l.preventDefault(),r()},"aria-label":`Go back to ${s}`,children:[w.jsx(rRu,{}),s]}),w.jsx("div",{className:"graphiql-doc-explorer-title",children:a.name})]}),w.jsx(eie,{},a.name)]}),w.jsx("div",{className:"graphiql-doc-explorer-content",children:o})]})}Ce(bT,"DocExplorer");const gF={title:"Documentation Explorer",icon:Ce(function(){const u=HI();return(u==null?void 0:u.visiblePlugin)===gF?w.jsx(hRu,{}):w.jsx(ERu,{})},"Icon"),content:bT},lDe={title:"History",icon:fRu,content:QRe},pIe=vm("PluginContext");function DIe(u){const e=bm(),t=km(),n=II(),i=!!t,r=!!n,a=C.useMemo(()=>{const E=[],g={};i&&(E.push(gF),g[gF.title]=!0),r&&(E.push(lDe),g[lDe.title]=!0);for(const m of u.plugins||[]){if(typeof m.title!="string"||!m.title)throw new Error("All GraphiQL plugins must have a unique title");if(g[m.title])throw new Error(`All GraphiQL plugins must have a unique title, found two plugins with the title '${m.title}'`);E.push(m),g[m.title]=!0}return E},[i,r,u.plugins]),[o,s]=C.useState(()=>{const E=e==null?void 0:e.get(cDe);return a.find(m=>m.title===E)||(E&&(e==null||e.set(cDe,"")),u.visiblePlugin&&a.find(m=>(typeof u.visiblePlugin=="string"?m.title:m)===u.visiblePlugin)||null)}),{onTogglePluginVisibility:l,children:c}=u,d=C.useCallback(E=>{const g=E&&a.find(m=>(typeof E=="string"?m.title:m)===E)||null;s(m=>g===m?m:(l==null||l(g),g))},[l,a]);C.useEffect(()=>{u.visiblePlugin&&d(u.visiblePlugin)},[a,u.visiblePlugin,d]);const h=C.useMemo(()=>({plugins:a,setVisiblePlugin:d,visiblePlugin:o}),[a,d,o]);return w.jsx(pIe.Provider,{value:h,children:c})}Ce(DIe,"PluginContextProvider");const HI=Cm(pIe),cDe="visiblePlugin";function xIe(u,e,t,n,i,r){zC([],{useCommonAddons:!1}).then(o=>{let s,l,c,d,h,E,g,m,f;o.on(e,"select",(p,D)=>{if(!s){const x=D.parentNode;s=document.createElement("div"),s.className="CodeMirror-hint-information",x.append(s);const b=document.createElement("header");b.className="CodeMirror-hint-information-header",s.append(b),l=document.createElement("span"),l.className="CodeMirror-hint-information-field-name",b.append(l),c=document.createElement("span"),c.className="CodeMirror-hint-information-type-name-pill",b.append(c),d=document.createElement("span"),c.append(d),h=document.createElement("a"),h.className="CodeMirror-hint-information-type-name",h.href="javascript:void 0",h.addEventListener("click",a),c.append(h),E=document.createElement("span"),c.append(E),g=document.createElement("div"),g.className="CodeMirror-hint-information-description",s.append(g),m=document.createElement("div"),m.className="CodeMirror-hint-information-deprecation",s.append(m);const k=document.createElement("span");k.className="CodeMirror-hint-information-deprecation-label",k.textContent="Deprecated",m.append(k),f=document.createElement("div"),f.className="CodeMirror-hint-information-deprecation-reason",m.append(f);const _=parseInt(window.getComputedStyle(s).paddingBottom.replace(/px$/,""),10)||0,y=parseInt(window.getComputedStyle(s).maxHeight.replace(/px$/,""),10)||0,S=Ce(()=>{s&&(s.style.paddingTop=x.scrollTop+_+"px",s.style.maxHeight=x.scrollTop+y+"px")},"handleScroll");x.addEventListener("scroll",S);let B;x.addEventListener("DOMNodeRemoved",B=Ce(L=>{L.target===x&&(x.removeEventListener("scroll",S),x.removeEventListener("DOMNodeRemoved",B),s&&s.removeEventListener("click",a),s=null,l=null,c=null,d=null,h=null,E=null,g=null,m=null,f=null,B=null)},"onRemoveFn"))}if(l&&(l.textContent=p.text),c&&d&&h&&E)if(p.type){c.style.display="inline";const x=Ce(b=>{wr(b)?(E.textContent="!"+E.textContent,x(b.ofType)):ss(b)?(d.textContent+="[",E.textContent="]"+E.textContent,x(b.ofType)):h.textContent=b.name},"renderType");d.textContent="",E.textContent="",x(p.type)}else d.textContent="",h.textContent="",E.textContent="",c.style.display="none";g&&(p.description?(g.style.display="block",g.innerHTML=DT.render(p.description)):(g.style.display="none",g.innerHTML="")),m&&f&&(p.deprecationReason?(m.style.display="block",f.innerHTML=DT.render(p.deprecationReason)):(m.style.display="none",f.innerHTML=""))})});function a(o){if(!t||!n||!i||!(o.currentTarget instanceof HTMLElement))return;const s=o.currentTarget.textContent||"",l=t.getType(s);l&&(i.setVisiblePlugin(gF),n.push({name:l.name,def:l}),r==null||r(l))}Ce(a,"onClickHintInformation")}Ce(xIe,"onHasCompletion");function Fb(u,e){C.useEffect(()=>{u&&typeof e=="string"&&e!==u.getValue()&&u.setValue(e)},[u,e])}Ce(Fb,"useSynchronizeValue");function u_(u,e,t){C.useEffect(()=>{u&&u.setOption(e,t)},[u,e,t])}Ce(u_,"useSynchronizeOption");function tie(u,e,t,n,i){const{updateActiveTabValues:r}=Ia({nonNull:!0,caller:i}),a=bm();C.useEffect(()=>{if(!u)return;const o=lp(500,c=>{!a||t===null||a.set(t,c)}),s=lp(100,c=>{r({[n]:c})}),l=Ce((c,d)=>{if(!d)return;const h=c.getValue();o(h),s(h),e==null||e(h)},"handleChange");return u.on("change",l),()=>u.off("change",l)},[e,u,a,t,n,r])}Ce(tie,"useChangeHandler");function uie(u,e,t){const{schema:n}=V1({nonNull:!0,caller:t}),i=km(),r=HI();C.useEffect(()=>{if(!u)return;const a=Ce((o,s)=>{xIe(o,s,n,i,r,l=>{e==null||e({kind:"Type",type:l,schema:n||void 0})})},"handleCompletion");return u.on("hasCompletion",a),()=>u.off("hasCompletion",a)},[e,u,i,r,n])}Ce(uie,"useCompletion");function Bc(u,e,t){C.useEffect(()=>{if(u){for(const n of e)u.removeKeyMap(n);if(t){const n={};for(const i of e)n[i]=()=>t();u.addKeyMap(n)}}},[u,e,t])}Ce(Bc,"useKeyMap");function $I({caller:u,onCopyQuery:e}={}){const{queryEditor:t}=Ia({nonNull:!0,caller:u||$I});return C.useCallback(()=>{if(!t)return;const n=t.getValue();jJt(n),e==null||e(n)},[t,e])}Ce($I,"useCopyQuery");function cp({caller:u}={}){const{queryEditor:e}=Ia({nonNull:!0,caller:u||cp}),{schema:t}=V1({nonNull:!0,caller:cp});return C.useCallback(()=>{const n=e==null?void 0:e.documentAST,i=e==null?void 0:e.getValue();!n||!i||e.setValue(Js(wqt(n,t)))},[e,t])}Ce(cp,"useMergeQuery");function LC({caller:u}={}){const{queryEditor:e,headerEditor:t,variableEditor:n}=Ia({nonNull:!0,caller:u||LC});return C.useCallback(()=>{if(n){const i=n.getValue();try{const r=JSON.stringify(JSON.parse(i),null,2);r!==i&&n.setValue(r)}catch{}}if(t){const i=t.getValue();try{const r=JSON.stringify(JSON.parse(i),null,2);r!==i&&t.setValue(r)}catch{}}if(e){const i=e.getValue(),r=Js(fm(i));r!==i&&e.setValue(r)}},[e,n,t])}Ce(LC,"usePrettifyEditors");function kT({getDefaultFieldNames:u,caller:e}={}){const{schema:t}=V1({nonNull:!0,caller:e||kT}),{queryEditor:n}=Ia({nonNull:!0,caller:e||kT});return C.useCallback(()=>{if(!n)return;const i=n.getValue(),{insertions:r,result:a}=yqt(t,i,u);return r&&r.length>0&&n.operation(()=>{const o=n.getCursor(),s=n.indexFromPos(o);n.setValue(a||"");let l=0;const c=r.map(({index:h,string:E})=>n.markText(n.posFromIndex(h+l),n.posFromIndex(h+(l+=E.length)),{className:"auto-inserted-leaf",clearOnEnter:!0,title:"Automatically added leaf fields"}));setTimeout(()=>{for(const h of c)h.clear()},7e3);let d=s;for(const{index:h,string:E}of r)hu==null?void 0:u.setValue(n),[u]);return C.useMemo(()=>[e,t],[e,t])}Ce(NRu,"useOperationsEditorState");function RRu(){const{variableEditor:u}=Ia({nonNull:!0}),e=(u==null?void 0:u.getValue())??"",t=C.useCallback(n=>u==null?void 0:u.setValue(n),[u]);return C.useMemo(()=>[e,t],[e,t])}Ce(RRu,"useVariablesEditorState");function Nx({editorTheme:u=OI,keyMap:e=jI,onEdit:t,readOnly:n=!1}={},i){const{initialHeaders:r,headerEditor:a,setHeaderEditor:o,shouldPersistHeaders:s}=Ia({nonNull:!0,caller:i||Nx}),l=t_(),c=cp({caller:i||Nx}),d=LC({caller:i||Nx}),h=C.useRef(null);return C.useEffect(()=>{let E=!0;return zC([Le(()=>import("./javascript.es-3c6957c5.js"),["./javascript.es-3c6957c5.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(g=>g.j)]).then(g=>{if(!E)return;const m=h.current;if(!m)return;const f=g(m,{value:r,lineNumbers:!0,tabSize:2,mode:{name:"javascript",json:!0},theme:u,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:n?"nocursor":!1,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:VI});f.addKeyMap({"Cmd-Space"(){f.showHint({completeSingle:!1,container:m})},"Ctrl-Space"(){f.showHint({completeSingle:!1,container:m})},"Alt-Space"(){f.showHint({completeSingle:!1,container:m})},"Shift-Space"(){f.showHint({completeSingle:!1,container:m})}}),f.on("keyup",(p,D)=>{const{code:x,key:b,shiftKey:k}=D,_=x.startsWith("Key"),y=!k&&x.startsWith("Digit");(_||y||b==="_"||b==='"')&&p.execCommand("autocomplete")}),o(f)}),()=>{E=!1}},[u,r,n,o]),u_(a,"keyMap",e),tie(a,t,s?b8:null,"headers",Nx),Bc(a,["Cmd-Enter","Ctrl-Enter"],l==null?void 0:l.run),Bc(a,["Shift-Ctrl-P"],d),Bc(a,["Shift-Ctrl-M"],c),h}Ce(Nx,"useHeaderEditor");const b8="headers",IRu=Array.from({length:11},(u,e)=>String.fromCharCode(8192+e)).concat(["\u2028","\u2029"," "," "]),ORu=new RegExp("["+IRu.join("")+"]","g");function vIe(u){return u.replace(ORu," ")}Ce(vIe,"normalizeWhitespace");function rE({editorTheme:u=OI,keyMap:e=jI,onClickReference:t,onCopyQuery:n,onEdit:i,readOnly:r=!1}={},a){const{schema:o}=V1({nonNull:!0,caller:a||rE}),{externalFragments:s,initialQuery:l,queryEditor:c,setOperationName:d,setQueryEditor:h,validationRules:E,variableEditor:g,updateActiveTabValues:m}=Ia({nonNull:!0,caller:a||rE}),f=t_(),p=bm(),D=km(),x=HI(),b=$I({caller:a||rE,onCopyQuery:n}),k=cp({caller:a||rE}),_=LC({caller:a||rE}),y=C.useRef(null),S=C.useRef(),B=C.useRef(()=>{});C.useEffect(()=>{B.current=N=>{if(!(!D||!x)){switch(x.setVisiblePlugin(gF),N.kind){case"Type":{D.push({name:N.type.name,def:N.type});break}case"Field":{D.push({name:N.field.name,def:N.field});break}case"Argument":{N.field&&D.push({name:N.field.name,def:N.field});break}case"EnumValue":{N.type&&D.push({name:N.type.name,def:N.type});break}}t==null||t(N)}}},[D,t,x]),C.useEffect(()=>{let N=!0;return zC([Le(()=>import("./comment.es-39699bae.js"),["./comment.es-39699bae.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(F=>F.c),Le(()=>import("./search.es-1c15f5ea.js"),["./search.es-1c15f5ea.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(F=>F.s),Le(()=>import("./hint.es-bb5e9099.js"),["./hint.es-bb5e9099.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./show-hint.es-b981493e.js","./Range-52ddcb6a.js"],import.meta.url),Le(()=>import("./lint.es2-963c31c2.js"),["./lint.es2-963c31c2.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./Range-52ddcb6a.js"],import.meta.url),Le(()=>import("./info.es-e3c7d590.js"),["./info.es-e3c7d590.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./SchemaReference.es-a230cb05.js","./forEachState.es-b2033c2b.js","./info-addon.es-c9b2027b.js"],import.meta.url),Le(()=>import("./jump.es-e2480f49.js"),["./jump.es-e2480f49.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./SchemaReference.es-a230cb05.js","./forEachState.es-b2033c2b.js"],import.meta.url),Le(()=>import("./mode.es-da807399.js"),["./mode.es-da807399.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./mode-indent.es-057a4f6a.js"],import.meta.url)]).then(F=>{if(!N)return;S.current=F;const A=y.current;if(!A)return;const z=F(A,{value:l,lineNumbers:!0,tabSize:2,foldGutter:!0,mode:"graphql",theme:u,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:r?"nocursor":!1,lint:{schema:void 0,validationRules:null,externalFragments:void 0},hintOptions:{schema:void 0,closeOnUnfocus:!1,completeSingle:!1,container:A,externalFragments:void 0},info:{schema:void 0,renderDescription:I=>DT.render(I),onClick(I){B.current(I)}},jump:{schema:void 0,onClick(I){B.current(I)}},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{...VI,"Cmd-S"(){},"Ctrl-S"(){}}});z.addKeyMap({"Cmd-Space"(){z.showHint({completeSingle:!0,container:A})},"Ctrl-Space"(){z.showHint({completeSingle:!0,container:A})},"Alt-Space"(){z.showHint({completeSingle:!0,container:A})},"Shift-Space"(){z.showHint({completeSingle:!0,container:A})},"Shift-Alt-Space"(){z.showHint({completeSingle:!0,container:A})}}),z.on("keyup",(I,j)=>{jRu.test(j.key)&&I.execCommand("autocomplete")});let P=!1;z.on("startCompletion",()=>{P=!0}),z.on("endCompletion",()=>{P=!1}),z.on("keydown",(I,j)=>{j.key==="Escape"&&P&&j.stopPropagation()}),z.on("beforeChange",(I,j)=>{var V;if(j.origin==="paste"){const H=j.text.map(vIe);(V=j.update)==null||V.call(j,j.from,j.to,H)}}),z.documentAST=null,z.operationName=null,z.operations=null,z.variableToType=null,h(z)}),()=>{N=!1}},[u,l,r,h]),u_(c,"keyMap",e),C.useEffect(()=>{if(!c)return;function N(A){var z;const P=vJt(o,A.getValue()),I=zqt(A.operations??void 0,A.operationName??void 0,P==null?void 0:P.operations);return A.documentAST=(P==null?void 0:P.documentAST)??null,A.operationName=I??null,A.operations=(P==null?void 0:P.operations)??null,g&&(g.state.lint.linterOptions.variableToType=P==null?void 0:P.variableToType,g.options.lint.variableToType=P==null?void 0:P.variableToType,g.options.hintOptions.variableToType=P==null?void 0:P.variableToType,(z=S.current)==null||z.signal(g,"change",g)),P?{...P,operationName:I}:null}Ce(N,"getAndUpdateOperationFacts");const F=lp(100,A=>{const z=A.getValue();p==null||p.set(yIe,z);const P=A.operationName,I=N(A);(I==null?void 0:I.operationName)!==void 0&&(p==null||p.set(VRu,I.operationName)),i==null||i(z,I==null?void 0:I.documentAST),I!=null&&I.operationName&&P!==I.operationName&&d(I.operationName),m({query:z,operationName:(I==null?void 0:I.operationName)??null})});return N(c),c.on("change",F),()=>c.off("change",F)},[i,c,o,d,p,g,m]),CIe(c,o??null,S),bIe(c,E??null,S),kIe(c,s,S),uie(c,t||null,rE);const L=f==null?void 0:f.run,T=C.useCallback(()=>{var N;if(!L||!c||!c.operations||!c.hasFocus()){L==null||L();return}const F=c.indexFromPos(c.getCursor());let A;for(const z of c.operations)z.loc&&z.loc.start<=F&&z.loc.end>=F&&(A=(N=z.name)==null?void 0:N.value);A&&A!==c.operationName&&d(A),L()},[c,L,d]);return Bc(c,["Cmd-Enter","Ctrl-Enter"],T),Bc(c,["Shift-Ctrl-C"],b),Bc(c,["Shift-Ctrl-P","Shift-Ctrl-F"],_),Bc(c,["Shift-Ctrl-M"],k),y}Ce(rE,"useQueryEditor");function CIe(u,e,t){C.useEffect(()=>{if(!u)return;const n=u.options.lint.schema!==e;u.state.lint.linterOptions.schema=e,u.options.lint.schema=e,u.options.hintOptions.schema=e,u.options.info.schema=e,u.options.jump.schema=e,n&&t.current&&t.current.signal(u,"change",u)},[u,e,t])}Ce(CIe,"useSynchronizeSchema");function bIe(u,e,t){C.useEffect(()=>{if(!u)return;const n=u.options.lint.validationRules!==e;u.state.lint.linterOptions.validationRules=e,u.options.lint.validationRules=e,n&&t.current&&t.current.signal(u,"change",u)},[u,e,t])}Ce(bIe,"useSynchronizeValidationRules");function kIe(u,e,t){const n=C.useMemo(()=>[...e.values()],[e]);C.useEffect(()=>{if(!u)return;const i=u.options.lint.externalFragments!==n;u.state.lint.linterOptions.externalFragments=n,u.options.lint.externalFragments=n,u.options.hintOptions.externalFragments=n,i&&t.current&&t.current.signal(u,"change",u)},[u,n,t])}Ce(kIe,"useSynchronizeExternalFragments");const jRu=/^[a-zA-Z0-9_@(]$/,yIe="query",VRu="operationName";function FIe({defaultQuery:u,defaultHeaders:e,headers:t,defaultTabs:n,query:i,variables:r,storage:a,shouldPersistHeaders:o}){const s=a==null?void 0:a.get(fF);try{if(!s)throw new Error("Storage for tabs is empty");const l=JSON.parse(s),c=o?t:void 0;if(AIe(l)){const d=mF({query:i,variables:r,headers:c});let h=-1;for(let E=0;E=0)l.activeTabIndex=h;else{const E=i?KI(i):null;l.tabs.push({id:aie(),hash:d,title:E||oie,query:i,variables:r,headers:t,operationName:E,response:null}),l.activeTabIndex=l.tabs.length-1}return l}throw new Error("Storage for tabs is invalid")}catch{return{activeTabIndex:0,tabs:(n||[{query:i??u,variables:r,headers:t??e}]).map(iie)}}}Ce(FIe,"getDefaultTabState");function AIe(u){return u&&typeof u=="object"&&!Array.isArray(u)&&SIe(u,"activeTabIndex")&&"tabs"in u&&Array.isArray(u.tabs)&&u.tabs.every(_Ie)}Ce(AIe,"isTabsState");function _Ie(u){return u&&typeof u=="object"&&!Array.isArray(u)&&eY(u,"id")&&eY(u,"title")&&KD(u,"query")&&KD(u,"variables")&&KD(u,"headers")&&KD(u,"operationName")&&KD(u,"response")}Ce(_Ie,"isTabState");function SIe(u,e){return e in u&&typeof u[e]=="number"}Ce(SIe,"hasNumberKey");function eY(u,e){return e in u&&typeof u[e]=="string"}Ce(eY,"hasStringKey");function KD(u,e){return e in u&&(typeof u[e]=="string"||u[e]===null)}Ce(KD,"hasStringOrNullKey");function BIe({queryEditor:u,variableEditor:e,headerEditor:t,responseEditor:n}){return C.useCallback(i=>{const r=(u==null?void 0:u.getValue())??null,a=(e==null?void 0:e.getValue())??null,o=(t==null?void 0:t.getValue())??null,s=(u==null?void 0:u.operationName)??null,l=(n==null?void 0:n.getValue())??null;return rie(i,{query:r,variables:a,headers:o,response:l,operationName:s})},[u,e,t,n])}Ce(BIe,"useSynchronizeActiveTabValues");function nie(u,e=!1){return JSON.stringify(u,(t,n)=>t==="hash"||t==="response"||!e&&t==="headers"?null:n)}Ce(nie,"serializeTabState");function wIe({storage:u,shouldPersistHeaders:e}){const t=C.useMemo(()=>lp(500,n=>{u==null||u.set(fF,n)}),[u]);return C.useCallback(n=>{t(nie(n,e))},[e,t])}Ce(wIe,"useStoreTabs");function zIe({queryEditor:u,variableEditor:e,headerEditor:t,responseEditor:n}){return C.useCallback(({query:i,variables:r,headers:a,response:o})=>{u==null||u.setValue(i??""),e==null||e.setValue(r??""),t==null||t.setValue(a??""),n==null||n.setValue(o??"")},[t,u,n,e])}Ce(zIe,"useSetEditorValues");function iie({query:u=null,variables:e=null,headers:t=null}={}){return{id:aie(),hash:mF({query:u,variables:e,headers:t}),title:u&&KI(u)||oie,query:u,variables:e,headers:t,operationName:null,response:null}}Ce(iie,"createTab");function rie(u,e){return{...u,tabs:u.tabs.map((t,n)=>{if(n!==u.activeTabIndex)return t;const i={...t,...e};return{...i,hash:mF(i),title:i.operationName||(i.query?KI(i.query):void 0)||oie}})}}Ce(rie,"setPropertiesInActiveTab");function aie(){const u=Ce(()=>Math.floor((1+Math.random())*65536).toString(16).slice(1),"s4");return`${u()}${u()}-${u()}-${u()}-${u()}-${u()}${u()}${u()}`}Ce(aie,"guid");function mF(u){return[u.query??"",u.variables??"",u.headers??""].join("|")}Ce(mF,"hashFromTabContents");function KI(u){const e=/^(?!#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/m.exec(u);return(e==null?void 0:e[2])??null}Ce(KI,"fuzzyExtractOperationName");function LIe(u){const e=u==null?void 0:u.get(fF);if(e){const t=JSON.parse(e);u==null||u.set(fF,JSON.stringify(t,(n,i)=>n==="headers"?null:i))}}Ce(LIe,"clearHeadersFromTabs");const oie="",fF="tabState";function xf({editorTheme:u=OI,keyMap:e=jI,onClickReference:t,onEdit:n,readOnly:i=!1}={},r){const{initialVariables:a,variableEditor:o,setVariableEditor:s}=Ia({nonNull:!0,caller:r||xf}),l=t_(),c=cp({caller:r||xf}),d=LC({caller:r||xf}),h=C.useRef(null),E=C.useRef();return C.useEffect(()=>{let g=!0;return zC([Le(()=>import("./hint.es2-37ae5894.js"),["./hint.es2-37ae5894.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./forEachState.es-b2033c2b.js"],import.meta.url),Le(()=>import("./lint.es3-71cb7f77.js"),["./lint.es3-71cb7f77.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js"],import.meta.url),Le(()=>import("./mode.es2-d05684db.js"),["./mode.es2-d05684db.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./mode-indent.es-057a4f6a.js"],import.meta.url)]).then(m=>{if(!g)return;E.current=m;const f=h.current;if(!f)return;const p=m(f,{value:a,lineNumbers:!0,tabSize:2,mode:"graphql-variables",theme:u,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:i?"nocursor":!1,foldGutter:!0,lint:{variableToType:void 0},hintOptions:{closeOnUnfocus:!1,completeSingle:!1,container:f,variableToType:void 0},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:VI});p.addKeyMap({"Cmd-Space"(){p.showHint({completeSingle:!1,container:f})},"Ctrl-Space"(){p.showHint({completeSingle:!1,container:f})},"Alt-Space"(){p.showHint({completeSingle:!1,container:f})},"Shift-Space"(){p.showHint({completeSingle:!1,container:f})}}),p.on("keyup",(D,x)=>{const{code:b,key:k,shiftKey:_}=x,y=b.startsWith("Key"),S=!_&&b.startsWith("Digit");(y||S||k==="_"||k==='"')&&D.execCommand("autocomplete")}),s(p)}),()=>{g=!1}},[u,a,i,s]),u_(o,"keyMap",e),tie(o,n,MIe,"variables",xf),uie(o,t||null,xf),Bc(o,["Cmd-Enter","Ctrl-Enter"],l==null?void 0:l.run),Bc(o,["Shift-Ctrl-P"],d),Bc(o,["Shift-Ctrl-M"],c),h}Ce(xf,"useVariableEditor");const MIe="variables",TIe=vm("EditorContext");function PIe(u){const e=bm(),[t,n]=C.useState(null),[i,r]=C.useState(null),[a,o]=C.useState(null),[s,l]=C.useState(null),[c,d]=C.useState(()=>{const I=(e==null?void 0:e.get(f$))!==null;return u.shouldPersistHeaders!==!1&&I?(e==null?void 0:e.get(f$))==="true":!!u.shouldPersistHeaders});Fb(t,u.headers),Fb(i,u.query),Fb(a,u.response),Fb(s,u.variables);const h=wIe({storage:e,shouldPersistHeaders:c}),[E]=C.useState(()=>{const I=u.query??(e==null?void 0:e.get(yIe))??null,j=u.variables??(e==null?void 0:e.get(MIe))??null,V=u.headers??(e==null?void 0:e.get(b8))??null,H=u.response??"",q=FIe({query:I,variables:j,headers:V,defaultTabs:u.defaultTabs,defaultQuery:u.defaultQuery||HRu,defaultHeaders:u.defaultHeaders,storage:e,shouldPersistHeaders:c});return h(q),{query:I??(q.activeTabIndex===0?q.tabs[0].query:null)??"",variables:j??"",headers:V??u.defaultHeaders??"",response:H,tabState:q}}),[g,m]=C.useState(E.tabState),f=C.useCallback(I=>{if(I){e==null||e.set(b8,(t==null?void 0:t.getValue())??"");const j=nie(g,!0);e==null||e.set(fF,j)}else e==null||e.set(b8,""),LIe(e);d(I),e==null||e.set(f$,I.toString())},[e,g,t]),p=C.useRef();C.useEffect(()=>{const I=!!u.shouldPersistHeaders;p.current!==I&&(f(I),p.current=I)},[u.shouldPersistHeaders,f]);const D=BIe({queryEditor:i,variableEditor:s,headerEditor:t,responseEditor:a}),x=zIe({queryEditor:i,variableEditor:s,headerEditor:t,responseEditor:a}),{onTabChange:b,defaultHeaders:k,children:_}=u,y=C.useCallback(()=>{m(I=>{const j=D(I),V={tabs:[...j.tabs,iie({headers:k})],activeTabIndex:j.tabs.length};return h(V),x(V.tabs[V.activeTabIndex]),b==null||b(V),V})},[k,b,x,h,D]),S=C.useCallback(I=>{m(j=>{const V={...j,activeTabIndex:I};return h(V),x(V.tabs[V.activeTabIndex]),b==null||b(V),V})},[b,x,h]),B=C.useCallback(I=>{m(j=>{const V=j.tabs[j.activeTabIndex],H={tabs:I,activeTabIndex:I.indexOf(V)};return h(H),x(H.tabs[H.activeTabIndex]),b==null||b(H),H})},[b,x,h]),L=C.useCallback(I=>{m(j=>{const V={tabs:j.tabs.filter((H,q)=>I!==q),activeTabIndex:Math.max(j.activeTabIndex-1,0)};return h(V),x(V.tabs[V.activeTabIndex]),b==null||b(V),V})},[b,x,h]),T=C.useCallback(I=>{m(j=>{const V=rie(j,I);return h(V),b==null||b(V),V})},[b,h]),{onEditOperationName:N}=u,F=C.useCallback(I=>{i&&(i.operationName=I,T({operationName:I}),N==null||N(I))},[N,i,T]),A=C.useMemo(()=>{const I=new Map;if(Array.isArray(u.externalFragments))for(const j of u.externalFragments)I.set(j.name.value,j);else if(typeof u.externalFragments=="string")Jc(fm(u.externalFragments,{}),{FragmentDefinition(j){I.set(j.name.value,j)}});else if(u.externalFragments)throw new Error("The `externalFragments` prop must either be a string that contains the fragment definitions in SDL or a list of FragmentDefinitionNode objects.");return I},[u.externalFragments]),z=C.useMemo(()=>u.validationRules||[],[u.validationRules]),P=C.useMemo(()=>({...g,addTab:y,changeTab:S,moveTab:B,closeTab:L,updateActiveTabValues:T,headerEditor:t,queryEditor:i,responseEditor:a,variableEditor:s,setHeaderEditor:n,setQueryEditor:r,setResponseEditor:o,setVariableEditor:l,setOperationName:F,initialQuery:E.query,initialVariables:E.variables,initialHeaders:E.headers,initialResponse:E.response,externalFragments:A,validationRules:z,shouldPersistHeaders:c,setShouldPersistHeaders:f}),[g,y,S,B,L,T,t,i,a,s,F,E,A,z,c,f]);return w.jsx(TIe.Provider,{value:P,children:_})}Ce(PIe,"EditorContextProvider");const Ia=Cm(TIe),f$="shouldPersistHeaders",HRu=`# Welcome to GraphiQL +`))}k(""),E(!0);const N=n??a.operationName??void 0;c==null||c.addToHistory({query:y,variables:S,headers:L,operationName:N});try{let F={data:{}};const A=Ce(I=>{if(_!==f.current)return;let j=Array.isArray(I)?I:!1;if(!j&&typeof I=="object"&&I!==null&&"hasNext"in I&&(j=[I]),j){const V={data:F.data},H=[...(F==null?void 0:F.errors)||[],...j.flatMap(q=>q.errors).filter(Boolean)];H.length&&(V.errors=H);for(const q of j){const{path:J,data:Q,errors:X,...Y}=q;if(J){if(!Q)throw new Error(`Expected part to contain a data property, but got ${q}`);TJt(V.data,J,Q,{merge:!0})}else Q&&(V.data=Q);F={...V,...Y}}E(!1),k(sZ(F))}else{const V=sZ(I);E(!1),k(V)}},"handleResponse"),z=u({query:y,variables:B,operationName:N},{headers:T??void 0,documentAST:a.documentAST??void 0}),P=await Promise.resolve(z);if(VTe(P))m(P.subscribe({next(I){A(I)},error(I){E(!1),I&&k(Yy(I)),m(null)},complete(){E(!1),m(null)}}));else if(HTe(P)){m({unsubscribe:()=>{var I,j;return(j=(I=P[Symbol.asyncIterator]()).return)==null?void 0:j.call(I)}});for await(const I of P)A(I);E(!1),m(null)}else A(P)}catch(F){E(!1),k(Yy(F)),m(null)}},[d,i,u,r,c,n,a,o,p,g,l,s]),x=!!g,b=C.useMemo(()=>({isFetching:h,isSubscribed:x,operationName:n??null,run:D,stop:p}),[h,x,n,D,p]);return w.jsx(eIe.Provider,{value:b,children:t})}Ce(xT,"ExecutionContextProvider");const t_=Cm(eIe);function ZZ({json:u,errorMessageParse:e,errorMessageType:t}){let n;try{n=u&&u.trim()!==""?JSON.parse(u):void 0}catch(r){throw new Error(`${e}: ${r instanceof Error?r.message:r}.`)}const i=typeof n=="object"&&n!==null&&!Array.isArray(n);if(n!==void 0&&!i)throw new Error(t);return n}Ce(ZZ,"tryParseJsonObject");const OI="graphiql",jI="sublime";let tIe=!1;typeof window=="object"&&(tIe=window.navigator.platform.toLowerCase().indexOf("mac")===0);const VI={[tIe?"Cmd-F":"Ctrl-F"]:"findPersistent","Cmd-G":"findPersistent","Ctrl-G":"findPersistent","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"};async function zC(u,e){const t=await Le(()=>import("./codemirror.es-52e8b92d.js"),["./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.c).then(n=>typeof n=="function"?n:n.default);return await Promise.all((e==null?void 0:e.useCommonAddons)===!1?u:[Le(()=>import("./show-hint.es-b981493e.js"),["./show-hint.es-b981493e.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.s),Le(()=>import("./matchbrackets.es-97d2e827.js"),["./matchbrackets.es-97d2e827.js","./codemirror.es2-5884f31a.js","./matchbrackets.es2-f53f57e6.js"],import.meta.url).then(n=>n.m),Le(()=>import("./closebrackets.es-e969742b.js"),["./closebrackets.es-e969742b.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.c),Le(()=>import("./brace-fold.es-f2e3735d.js"),["./brace-fold.es-f2e3735d.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.b),Le(()=>import("./foldgutter.es-b6cee46a.js"),["./foldgutter.es-b6cee46a.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.f),Le(()=>import("./lint.es-fe7166bb.js"),["./lint.es-fe7166bb.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.l),Le(()=>import("./searchcursor.es-b1a352a2.js"),["./searchcursor.es-b1a352a2.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js"],import.meta.url).then(n=>n.s),Le(()=>import("./jump-to-line.es-d901ea33.js"),["./jump-to-line.es-d901ea33.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(n=>n.j),Le(()=>import("./dialog.es-dffe62e7.js"),["./dialog.es-dffe62e7.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(n=>n.d),Le(()=>import("./sublime.es-e2a3eb60.js"),["./sublime.es-e2a3eb60.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./matchbrackets.es2-f53f57e6.js"],import.meta.url).then(n=>n.s),...u]),t}Ce(zC,"importCodeMirror");const TRu=Ce(u=>u?Js(u):"","printDefault");function Zne({field:u}){if(!("defaultValue"in u)||u.defaultValue===void 0)return null;const e=Mx(u.defaultValue,u.type);return e?w.jsxs(w.Fragment,{children:[" = ",w.jsx("span",{className:"graphiql-doc-explorer-default-value",children:TRu(e)})]}):null}Ce(Zne,"DefaultValue");const uIe=vm("SchemaContext");function Yne(u){if(!u.fetcher)throw new TypeError("The `SchemaContextProvider` component requires a `fetcher` function to be passed as prop.");const{initialHeaders:e,headerEditor:t}=Ia({nonNull:!0,caller:Yne}),[n,i]=C.useState(),[r,a]=C.useState(!1),[o,s]=C.useState(null),l=C.useRef(0);C.useEffect(()=>{i(XJ(u.schema)||u.schema===null||u.schema===void 0?u.schema:void 0),l.current++},[u.schema]);const c=C.useRef(e);C.useEffect(()=>{t&&(c.current=t.getValue())});const{introspectionQuery:d,introspectionQueryName:h,introspectionQuerySansSubscriptions:E}=nIe({inputValueDeprecation:u.inputValueDeprecation,introspectionQueryName:u.introspectionQueryName,schemaDescription:u.schemaDescription}),{fetcher:g,onSchemaChange:m,dangerouslyAssumeSchemaIsValid:f,children:p}=u,D=C.useCallback(()=>{if(XJ(u.schema)||u.schema===null)return;const k=++l.current,_=u.schema;async function y(){if(_)return _;const S=iIe(c.current);if(!S.isValidJSON){s("Introspection failed as headers are invalid.");return}const B=S.headers?{headers:S.headers}:{},L=Ume(g({query:d,operationName:h},B));if(!Gme(L)){s("Fetcher did not return a Promise for introspection.");return}a(!0),s(null);let T=await L;if(typeof T!="object"||T===null||!("data"in T)){const F=Ume(g({query:E,operationName:h},B));if(!Gme(F))throw new Error("Fetcher did not return a Promise for introspection.");T=await F}if(a(!1),T!=null&&T.data&&"__schema"in T.data)return T.data;const N=typeof T=="string"?T:sZ(T);s(N)}Ce(y,"fetchIntrospectionData"),y().then(S=>{if(!(k!==l.current||!S))try{const B=wWt(S);i(B),m==null||m(B)}catch(B){s(Yy(B))}}).catch(S=>{k===l.current&&(s(Yy(S)),a(!1))})},[g,h,d,E,m,u.schema]);C.useEffect(()=>{D()},[D]),C.useEffect(()=>{function k(_){_.ctrlKey&&_.key==="R"&&D()}return Ce(k,"triggerIntrospection"),window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)});const x=C.useMemo(()=>!n||f?[]:oTe(n),[n,f]),b=C.useMemo(()=>({fetchError:o,introspect:D,isFetching:r,schema:n,validationErrors:x}),[o,D,r,n,x]);return w.jsx(uIe.Provider,{value:b,children:p})}Ce(Yne,"SchemaContextProvider");const V1=Cm(uIe);function nIe({inputValueDeprecation:u,introspectionQueryName:e,schemaDescription:t}){return C.useMemo(()=>{const n=e||"IntrospectionQuery";let i=BWt({inputValueDeprecation:u,schemaDescription:t});e&&(i=i.replace("query IntrospectionQuery",`query ${n}`));const r=i.replace("subscriptionType { name }","");return{introspectionQueryName:n,introspectionQuery:i,introspectionQuerySansSubscriptions:r}},[u,e,t])}Ce(nIe,"useIntrospectionQuery");function iIe(u){let e=null,t=!0;try{u&&(e=JSON.parse(u))}catch{t=!1}return{headers:e,isValidJSON:t}}Ce(iIe,"parseHeaderString");const J9={name:"Docs"},rIe=vm("ExplorerContext");function Qne(u){const{schema:e,validationErrors:t}=V1({nonNull:!0,caller:Qne}),[n,i]=C.useState([J9]),r=C.useCallback(l=>{i(c=>c.at(-1).def===l.def?c:[...c,l])},[]),a=C.useCallback(()=>{i(l=>l.length>1?l.slice(0,-1):l)},[]),o=C.useCallback(()=>{i(l=>l.length===1?l:[J9])},[]);C.useEffect(()=>{e==null||t.length>0?o():i(l=>{if(l.length===1)return l;const c=[J9];let d=null;for(const h of l)if(h!==J9)if(h.def)if(Wue(h.def)){const E=e.getType(h.def.name);if(E)c.push({name:h.name,def:E}),d=E;else break}else{if(d===null)break;if(Ki(d)||Io(d)){const E=d.getFields()[h.name];if(E)c.push({name:h.name,def:E});else break}else{if(pm(d)||L0(d)||Wi(d)||Ml(d))break;{const E=d;if(E.args.find(g=>g.name===h.name))c.push({name:h.name,def:E});else break}}}else d=null,c.push(h);return c})},[o,e,t]);const s=C.useMemo(()=>({explorerNavStack:n,push:r,pop:a,reset:o}),[n,r,a,o]);return w.jsx(rIe.Provider,{value:s,children:u.children})}Ce(Qne,"ExplorerContextProvider");const km=Cm(rIe);function hF(u,e){return wr(u)?w.jsxs(w.Fragment,{children:[hF(u.ofType,e),"!"]}):ss(u)?w.jsxs(w.Fragment,{children:["[",hF(u.ofType,e),"]"]}):e(u)}Ce(hF,"renderType");function Sc(u){const{push:e}=km({nonNull:!0,caller:Sc});return u.type?hF(u.type,t=>w.jsx("a",{className:"graphiql-doc-explorer-type-name",onClick:n=>{n.preventDefault(),e({name:t.name,def:t})},href:"#",children:t.name})):null}Ce(Sc,"TypeLink");function EF({arg:u,showDefaultValue:e,inline:t}){const n=w.jsxs("span",{children:[w.jsx("span",{className:"graphiql-doc-explorer-argument-name",children:u.name}),": ",w.jsx(Sc,{type:u.type}),e!==!1&&w.jsx(Zne,{field:u})]});return t?n:w.jsxs("div",{className:"graphiql-doc-explorer-argument",children:[n,u.description?w.jsx(S1,{type:"description",children:u.description}):null,u.deprecationReason?w.jsxs("div",{className:"graphiql-doc-explorer-argument-deprecation",children:[w.jsx("div",{className:"graphiql-doc-explorer-argument-deprecation-label",children:"Deprecated"}),w.jsx(S1,{type:"deprecation",children:u.deprecationReason})]}):null]})}Ce(EF,"Argument");function Xne(u){return u.children?w.jsxs("div",{className:"graphiql-doc-explorer-deprecation",children:[w.jsx("div",{className:"graphiql-doc-explorer-deprecation-label",children:"Deprecated"}),w.jsx(S1,{type:"deprecation",onlyShowFirstChild:u.preview??!0,children:u.children})]}):null}Ce(Xne,"DeprecationReason");function aIe({directive:u}){return w.jsxs("span",{className:"graphiql-doc-explorer-directive",children:["@",u.name.value]})}Ce(aIe,"Directive");function M0(u){const e=PRu[u.title];return w.jsxs("div",{children:[w.jsxs("div",{className:"graphiql-doc-explorer-section-title",children:[w.jsx(e,{}),u.title]}),w.jsx("div",{className:"graphiql-doc-explorer-section-content",children:u.children})]})}Ce(M0,"ExplorerSection");const PRu={Arguments:nRu,"Deprecated Arguments":sRu,"Deprecated Enum Values":lRu,"Deprecated Fields":cRu,Directives:dRu,"Enum Values":gRu,Fields:mRu,Implements:pRu,Implementations:q9,"Possible Types":q9,"Root Types":ARu,Type:q9,"All Schema Types":q9};function oIe(u){return w.jsxs(w.Fragment,{children:[u.field.description?w.jsx(S1,{type:"description",children:u.field.description}):null,w.jsx(Xne,{preview:!1,children:u.field.deprecationReason}),w.jsx(M0,{title:"Type",children:w.jsx(Sc,{type:u.field.type})}),w.jsx(sIe,{field:u.field}),w.jsx(lIe,{field:u.field})]})}Ce(oIe,"FieldDocumentation");function sIe({field:u}){const[e,t]=C.useState(!1),n=C.useCallback(()=>{t(!0)},[]);if(!("args"in u))return null;const i=[],r=[];for(const a of u.args)a.deprecationReason?r.push(a):i.push(a);return w.jsxs(w.Fragment,{children:[i.length>0?w.jsx(M0,{title:"Arguments",children:i.map(a=>w.jsx(EF,{arg:a},a.name))}):null,r.length>0?e||i.length===0?w.jsx(M0,{title:"Deprecated Arguments",children:r.map(a=>w.jsx(EF,{arg:a},a.name))}):w.jsx(pc,{type:"button",onClick:n,children:"Show Deprecated Arguments"}):null]})}Ce(sIe,"Arguments");function lIe({field:u}){var e;const t=((e=u.astNode)==null?void 0:e.directives)||[];return!t||t.length===0?null:w.jsx(M0,{title:"Directives",children:t.map(n=>w.jsx("div",{children:w.jsx(aIe,{directive:n})},n.name.value))})}Ce(lIe,"Directives");function cIe(u){var e,t,n,i;const r=u.schema.getQueryType(),a=(t=(e=u.schema).getMutationType)==null?void 0:t.call(e),o=(i=(n=u.schema).getSubscriptionType)==null?void 0:i.call(n),s=u.schema.getTypeMap(),l=[r==null?void 0:r.name,a==null?void 0:a.name,o==null?void 0:o.name];return w.jsxs(w.Fragment,{children:[w.jsx(S1,{type:"description",children:u.schema.description||"A GraphQL schema provides a root type for each kind of operation."}),w.jsxs(M0,{title:"Root Types",children:[r?w.jsxs("div",{children:[w.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"query"}),": ",w.jsx(Sc,{type:r})]}):null,a&&w.jsxs("div",{children:[w.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"mutation"}),": ",w.jsx(Sc,{type:a})]}),o&&w.jsxs("div",{children:[w.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"subscription"}),": ",w.jsx(Sc,{type:o})]})]}),w.jsx(M0,{title:"All Schema Types",children:s&&w.jsx("div",{children:Object.values(s).map(c=>l.includes(c.name)||c.name.startsWith("__")?null:w.jsx("div",{children:w.jsx(Sc,{type:c})},c.name))})})]})}Ce(cIe,"SchemaDocumentation");function lp(u,e){let t;return function(...n){t&&window.clearTimeout(t),t=window.setTimeout(()=>{t=null,e(...n)},u)}}Ce(lp,"debounce");function eie(){const{explorerNavStack:u,push:e}=km({nonNull:!0,caller:eie}),t=C.useRef(null),n=vT(),[i,r]=C.useState(""),[a,o]=C.useState(n(i)),s=C.useMemo(()=>lp(200,E=>{o(n(E))}),[n]);C.useEffect(()=>{s(i)},[s,i]),C.useEffect(()=>{function E(g){var m;g.metaKey&&g.key==="k"&&((m=t.current)==null||m.focus())}return Ce(E,"handleKeyDown"),window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[]);const l=u.at(-1),c=C.useCallback(E=>{e("field"in E?{name:E.field.name,def:E.field}:{name:E.type.name,def:E.type})},[e]),d=C.useRef(!1),h=C.useCallback(E=>{d.current=E.type==="focus"},[]);return u.length===1||Ki(l.def)||Wi(l.def)||Io(l.def)?w.jsxs(zD,{as:"div",className:"graphiql-doc-explorer-search",onChange:c,"data-state":d?void 0:"idle","aria-label":`Search ${l.name}...`,children:[w.jsxs("div",{className:"graphiql-doc-explorer-search-input",onClick:()=>{var E;(E=t.current)==null||E.focus()},children:[w.jsx(xRu,{}),w.jsx(zD.Input,{autoComplete:"off",onFocus:h,onBlur:h,onChange:E=>r(E.target.value),placeholder:"⌘ K",ref:t,value:i,"data-cy":"doc-explorer-input"})]}),d.current&&w.jsxs(zD.Options,{"data-cy":"doc-explorer-list",children:[a.within.length+a.types.length+a.fields.length===0?w.jsx("li",{className:"graphiql-doc-explorer-search-empty",children:"No results found"}):a.within.map((E,g)=>w.jsx(zD.Option,{value:E,"data-cy":"doc-explorer-option",children:w.jsx(YZ,{field:E.field,argument:E.argument})},`within-${g}`)),a.within.length>0&&a.types.length+a.fields.length>0?w.jsx("div",{className:"graphiql-doc-explorer-search-divider",children:"Other results"}):null,a.types.map((E,g)=>w.jsx(zD.Option,{value:E,"data-cy":"doc-explorer-option",children:w.jsx(CT,{type:E.type})},`type-${g}`)),a.fields.map((E,g)=>w.jsxs(zD.Option,{value:E,"data-cy":"doc-explorer-option",children:[w.jsx(CT,{type:E.type}),".",w.jsx(YZ,{field:E.field,argument:E.argument})]},`field-${g}`))]})]}):null}Ce(eie,"Search");function vT(u){const{explorerNavStack:e}=km({nonNull:!0,caller:u||vT}),{schema:t}=V1({nonNull:!0,caller:u||vT}),n=e.at(-1);return C.useCallback(i=>{const r={within:[],types:[],fields:[]};if(!t)return r;const a=n.def,o=t.getTypeMap();let s=Object.keys(o);a&&(s=s.filter(l=>l!==a.name),s.unshift(a.name));for(const l of s){if(r.within.length+r.types.length+r.fields.length>=100)break;const c=o[l];if(a!==c&&C8(l,i)&&r.types.push({type:c}),!Ki(c)&&!Wi(c)&&!Io(c))continue;const d=c.getFields();for(const h in d){const E=d[h];let g;if(!C8(h,i))if("args"in E){if(g=E.args.filter(m=>C8(m.name,i)),g.length===0)continue}else continue;r[a===c?"within":"fields"].push(...g?g.map(m=>({type:c,field:E,argument:m})):[{type:c,field:E}])}}return r},[n.def,t])}Ce(vT,"useSearchResults");function C8(u,e){try{const t=e.replaceAll(/[^_0-9A-Za-z]/g,n=>"\\"+n);return u.search(new RegExp(t,"i"))!==-1}catch{return u.toLowerCase().includes(e.toLowerCase())}}Ce(C8,"isMatch");function CT(u){return w.jsx("span",{className:"graphiql-doc-explorer-search-type",children:u.type.name})}Ce(CT,"Type");function YZ({field:u,argument:e}){return w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"graphiql-doc-explorer-search-field",children:u.name}),e?w.jsxs(w.Fragment,{children:["(",w.jsx("span",{className:"graphiql-doc-explorer-search-argument",children:e.name}),":"," ",hF(e.type,t=>w.jsx(CT,{type:t})),")"]}):null]})}Ce(YZ,"Field$1");function dIe(u){const{push:e}=km({nonNull:!0});return w.jsx("a",{className:"graphiql-doc-explorer-field-name",onClick:t=>{t.preventDefault(),e({name:u.field.name,def:u.field})},href:"#",children:u.field.name})}Ce(dIe,"FieldLink");function hIe(u){return Wue(u.type)?w.jsxs(w.Fragment,{children:[u.type.description?w.jsx(S1,{type:"description",children:u.type.description}):null,w.jsx(EIe,{type:u.type}),w.jsx(gIe,{type:u.type}),w.jsx(mIe,{type:u.type}),w.jsx(fIe,{type:u.type})]}):null}Ce(hIe,"TypeDocumentation");function EIe({type:u}){return Ki(u)&&u.getInterfaces().length>0?w.jsx(M0,{title:"Implements",children:u.getInterfaces().map(e=>w.jsx("div",{children:w.jsx(Sc,{type:e})},e.name))}):null}Ce(EIe,"ImplementsInterfaces");function gIe({type:u}){const[e,t]=C.useState(!1),n=C.useCallback(()=>{t(!0)},[]);if(!Ki(u)&&!Wi(u)&&!Io(u))return null;const i=u.getFields(),r=[],a=[];for(const o of Object.keys(i).map(s=>i[s]))o.deprecationReason?a.push(o):r.push(o);return w.jsxs(w.Fragment,{children:[r.length>0?w.jsx(M0,{title:"Fields",children:r.map(o=>w.jsx(QZ,{field:o},o.name))}):null,a.length>0?e||r.length===0?w.jsx(M0,{title:"Deprecated Fields",children:a.map(o=>w.jsx(QZ,{field:o},o.name))}):w.jsx(pc,{type:"button",onClick:n,children:"Show Deprecated Fields"}):null]})}Ce(gIe,"Fields");function QZ({field:u}){const e="args"in u?u.args.filter(t=>!t.deprecationReason):[];return w.jsxs("div",{className:"graphiql-doc-explorer-item",children:[w.jsxs("div",{children:[w.jsx(dIe,{field:u}),e.length>0?w.jsxs(w.Fragment,{children:["(",w.jsx("span",{children:e.map(t=>e.length===1?w.jsx(EF,{arg:t,inline:!0},t.name):w.jsx("div",{className:"graphiql-doc-explorer-argument-multiple",children:w.jsx(EF,{arg:t,inline:!0})},t.name))}),")"]}):null,": ",w.jsx(Sc,{type:u.type}),w.jsx(Zne,{field:u})]}),u.description?w.jsx(S1,{type:"description",onlyShowFirstChild:!0,children:u.description}):null,w.jsx(Xne,{children:u.deprecationReason})]})}Ce(QZ,"Field");function mIe({type:u}){const[e,t]=C.useState(!1),n=C.useCallback(()=>{t(!0)},[]);if(!L0(u))return null;const i=[],r=[];for(const a of u.getValues())a.deprecationReason?r.push(a):i.push(a);return w.jsxs(w.Fragment,{children:[i.length>0?w.jsx(M0,{title:"Enum Values",children:i.map(a=>w.jsx(XZ,{value:a},a.name))}):null,r.length>0?e||i.length===0?w.jsx(M0,{title:"Deprecated Enum Values",children:r.map(a=>w.jsx(XZ,{value:a},a.name))}):w.jsx(pc,{type:"button",onClick:n,children:"Show Deprecated Values"}):null]})}Ce(mIe,"EnumValues");function XZ({value:u}){return w.jsxs("div",{className:"graphiql-doc-explorer-item",children:[w.jsx("div",{className:"graphiql-doc-explorer-enum-value",children:u.name}),u.description?w.jsx(S1,{type:"description",children:u.description}):null,u.deprecationReason?w.jsx(S1,{type:"deprecation",children:u.deprecationReason}):null]})}Ce(XZ,"EnumValue");function fIe({type:u}){const{schema:e}=V1({nonNull:!0});return!e||!pg(u)?null:w.jsx(M0,{title:Wi(u)?"Implementations":"Possible Types",children:e.getPossibleTypes(u).map(t=>w.jsx("div",{children:w.jsx(Sc,{type:t})},t.name))})}Ce(fIe,"PossibleTypes");function bT(){const{fetchError:u,isFetching:e,schema:t,validationErrors:n}=V1({nonNull:!0,caller:bT}),{explorerNavStack:i,pop:r}=km({nonNull:!0,caller:bT}),a=i.at(-1);let o=null;u?o=w.jsx("div",{className:"graphiql-doc-explorer-error",children:"Error fetching schema"}):n.length>0?o=w.jsxs("div",{className:"graphiql-doc-explorer-error",children:["Schema is invalid: ",n[0].message]}):e?o=w.jsx(Jne,{}):t?i.length===1?o=w.jsx(cIe,{schema:t}):$ue(a.def)?o=w.jsx(hIe,{type:a.def}):a.def&&(o=w.jsx(oIe,{field:a.def})):o=w.jsx("div",{className:"graphiql-doc-explorer-error",children:"No GraphQL schema available"});let s;return i.length>1&&(s=i.at(-2).name),w.jsxs("section",{className:"graphiql-doc-explorer","aria-label":"Documentation Explorer",children:[w.jsxs("div",{className:"graphiql-doc-explorer-header",children:[w.jsxs("div",{className:"graphiql-doc-explorer-header-content",children:[s&&w.jsxs("a",{href:"#",className:"graphiql-doc-explorer-back",onClick:l=>{l.preventDefault(),r()},"aria-label":`Go back to ${s}`,children:[w.jsx(rRu,{}),s]}),w.jsx("div",{className:"graphiql-doc-explorer-title",children:a.name})]}),w.jsx(eie,{},a.name)]}),w.jsx("div",{className:"graphiql-doc-explorer-content",children:o})]})}Ce(bT,"DocExplorer");const gF={title:"Documentation Explorer",icon:Ce(function(){const u=HI();return(u==null?void 0:u.visiblePlugin)===gF?w.jsx(hRu,{}):w.jsx(ERu,{})},"Icon"),content:bT},lDe={title:"History",icon:fRu,content:QRe},pIe=vm("PluginContext");function DIe(u){const e=bm(),t=km(),n=II(),i=!!t,r=!!n,a=C.useMemo(()=>{const E=[],g={};i&&(E.push(gF),g[gF.title]=!0),r&&(E.push(lDe),g[lDe.title]=!0);for(const m of u.plugins||[]){if(typeof m.title!="string"||!m.title)throw new Error("All GraphiQL plugins must have a unique title");if(g[m.title])throw new Error(`All GraphiQL plugins must have a unique title, found two plugins with the title '${m.title}'`);E.push(m),g[m.title]=!0}return E},[i,r,u.plugins]),[o,s]=C.useState(()=>{const E=e==null?void 0:e.get(cDe);return a.find(m=>m.title===E)||(E&&(e==null||e.set(cDe,"")),u.visiblePlugin&&a.find(m=>(typeof u.visiblePlugin=="string"?m.title:m)===u.visiblePlugin)||null)}),{onTogglePluginVisibility:l,children:c}=u,d=C.useCallback(E=>{const g=E&&a.find(m=>(typeof E=="string"?m.title:m)===E)||null;s(m=>g===m?m:(l==null||l(g),g))},[l,a]);C.useEffect(()=>{u.visiblePlugin&&d(u.visiblePlugin)},[a,u.visiblePlugin,d]);const h=C.useMemo(()=>({plugins:a,setVisiblePlugin:d,visiblePlugin:o}),[a,d,o]);return w.jsx(pIe.Provider,{value:h,children:c})}Ce(DIe,"PluginContextProvider");const HI=Cm(pIe),cDe="visiblePlugin";function xIe(u,e,t,n,i,r){zC([],{useCommonAddons:!1}).then(o=>{let s,l,c,d,h,E,g,m,f;o.on(e,"select",(p,D)=>{if(!s){const x=D.parentNode;s=document.createElement("div"),s.className="CodeMirror-hint-information",x.append(s);const b=document.createElement("header");b.className="CodeMirror-hint-information-header",s.append(b),l=document.createElement("span"),l.className="CodeMirror-hint-information-field-name",b.append(l),c=document.createElement("span"),c.className="CodeMirror-hint-information-type-name-pill",b.append(c),d=document.createElement("span"),c.append(d),h=document.createElement("a"),h.className="CodeMirror-hint-information-type-name",h.href="javascript:void 0",h.addEventListener("click",a),c.append(h),E=document.createElement("span"),c.append(E),g=document.createElement("div"),g.className="CodeMirror-hint-information-description",s.append(g),m=document.createElement("div"),m.className="CodeMirror-hint-information-deprecation",s.append(m);const k=document.createElement("span");k.className="CodeMirror-hint-information-deprecation-label",k.textContent="Deprecated",m.append(k),f=document.createElement("div"),f.className="CodeMirror-hint-information-deprecation-reason",m.append(f);const _=parseInt(window.getComputedStyle(s).paddingBottom.replace(/px$/,""),10)||0,y=parseInt(window.getComputedStyle(s).maxHeight.replace(/px$/,""),10)||0,S=Ce(()=>{s&&(s.style.paddingTop=x.scrollTop+_+"px",s.style.maxHeight=x.scrollTop+y+"px")},"handleScroll");x.addEventListener("scroll",S);let B;x.addEventListener("DOMNodeRemoved",B=Ce(L=>{L.target===x&&(x.removeEventListener("scroll",S),x.removeEventListener("DOMNodeRemoved",B),s&&s.removeEventListener("click",a),s=null,l=null,c=null,d=null,h=null,E=null,g=null,m=null,f=null,B=null)},"onRemoveFn"))}if(l&&(l.textContent=p.text),c&&d&&h&&E)if(p.type){c.style.display="inline";const x=Ce(b=>{wr(b)?(E.textContent="!"+E.textContent,x(b.ofType)):ss(b)?(d.textContent+="[",E.textContent="]"+E.textContent,x(b.ofType)):h.textContent=b.name},"renderType");d.textContent="",E.textContent="",x(p.type)}else d.textContent="",h.textContent="",E.textContent="",c.style.display="none";g&&(p.description?(g.style.display="block",g.innerHTML=DT.render(p.description)):(g.style.display="none",g.innerHTML="")),m&&f&&(p.deprecationReason?(m.style.display="block",f.innerHTML=DT.render(p.deprecationReason)):(m.style.display="none",f.innerHTML=""))})});function a(o){if(!t||!n||!i||!(o.currentTarget instanceof HTMLElement))return;const s=o.currentTarget.textContent||"",l=t.getType(s);l&&(i.setVisiblePlugin(gF),n.push({name:l.name,def:l}),r==null||r(l))}Ce(a,"onClickHintInformation")}Ce(xIe,"onHasCompletion");function Fb(u,e){C.useEffect(()=>{u&&typeof e=="string"&&e!==u.getValue()&&u.setValue(e)},[u,e])}Ce(Fb,"useSynchronizeValue");function u_(u,e,t){C.useEffect(()=>{u&&u.setOption(e,t)},[u,e,t])}Ce(u_,"useSynchronizeOption");function tie(u,e,t,n,i){const{updateActiveTabValues:r}=Ia({nonNull:!0,caller:i}),a=bm();C.useEffect(()=>{if(!u)return;const o=lp(500,c=>{!a||t===null||a.set(t,c)}),s=lp(100,c=>{r({[n]:c})}),l=Ce((c,d)=>{if(!d)return;const h=c.getValue();o(h),s(h),e==null||e(h)},"handleChange");return u.on("change",l),()=>u.off("change",l)},[e,u,a,t,n,r])}Ce(tie,"useChangeHandler");function uie(u,e,t){const{schema:n}=V1({nonNull:!0,caller:t}),i=km(),r=HI();C.useEffect(()=>{if(!u)return;const a=Ce((o,s)=>{xIe(o,s,n,i,r,l=>{e==null||e({kind:"Type",type:l,schema:n||void 0})})},"handleCompletion");return u.on("hasCompletion",a),()=>u.off("hasCompletion",a)},[e,u,i,r,n])}Ce(uie,"useCompletion");function Bc(u,e,t){C.useEffect(()=>{if(u){for(const n of e)u.removeKeyMap(n);if(t){const n={};for(const i of e)n[i]=()=>t();u.addKeyMap(n)}}},[u,e,t])}Ce(Bc,"useKeyMap");function $I({caller:u,onCopyQuery:e}={}){const{queryEditor:t}=Ia({nonNull:!0,caller:u||$I});return C.useCallback(()=>{if(!t)return;const n=t.getValue();jJt(n),e==null||e(n)},[t,e])}Ce($I,"useCopyQuery");function cp({caller:u}={}){const{queryEditor:e}=Ia({nonNull:!0,caller:u||cp}),{schema:t}=V1({nonNull:!0,caller:cp});return C.useCallback(()=>{const n=e==null?void 0:e.documentAST,i=e==null?void 0:e.getValue();!n||!i||e.setValue(Js(wqt(n,t)))},[e,t])}Ce(cp,"useMergeQuery");function LC({caller:u}={}){const{queryEditor:e,headerEditor:t,variableEditor:n}=Ia({nonNull:!0,caller:u||LC});return C.useCallback(()=>{if(n){const i=n.getValue();try{const r=JSON.stringify(JSON.parse(i),null,2);r!==i&&n.setValue(r)}catch{}}if(t){const i=t.getValue();try{const r=JSON.stringify(JSON.parse(i),null,2);r!==i&&t.setValue(r)}catch{}}if(e){const i=e.getValue(),r=Js(fm(i));r!==i&&e.setValue(r)}},[e,n,t])}Ce(LC,"usePrettifyEditors");function kT({getDefaultFieldNames:u,caller:e}={}){const{schema:t}=V1({nonNull:!0,caller:e||kT}),{queryEditor:n}=Ia({nonNull:!0,caller:e||kT});return C.useCallback(()=>{if(!n)return;const i=n.getValue(),{insertions:r,result:a}=yqt(t,i,u);return r&&r.length>0&&n.operation(()=>{const o=n.getCursor(),s=n.indexFromPos(o);n.setValue(a||"");let l=0;const c=r.map(({index:h,string:E})=>n.markText(n.posFromIndex(h+l),n.posFromIndex(h+(l+=E.length)),{className:"auto-inserted-leaf",clearOnEnter:!0,title:"Automatically added leaf fields"}));setTimeout(()=>{for(const h of c)h.clear()},7e3);let d=s;for(const{index:h,string:E}of r)hu==null?void 0:u.setValue(n),[u]);return C.useMemo(()=>[e,t],[e,t])}Ce(NRu,"useOperationsEditorState");function RRu(){const{variableEditor:u}=Ia({nonNull:!0}),e=(u==null?void 0:u.getValue())??"",t=C.useCallback(n=>u==null?void 0:u.setValue(n),[u]);return C.useMemo(()=>[e,t],[e,t])}Ce(RRu,"useVariablesEditorState");function Nx({editorTheme:u=OI,keyMap:e=jI,onEdit:t,readOnly:n=!1}={},i){const{initialHeaders:r,headerEditor:a,setHeaderEditor:o,shouldPersistHeaders:s}=Ia({nonNull:!0,caller:i||Nx}),l=t_(),c=cp({caller:i||Nx}),d=LC({caller:i||Nx}),h=C.useRef(null);return C.useEffect(()=>{let E=!0;return zC([Le(()=>import("./javascript.es-3c6957c5.js"),["./javascript.es-3c6957c5.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(g=>g.j)]).then(g=>{if(!E)return;const m=h.current;if(!m)return;const f=g(m,{value:r,lineNumbers:!0,tabSize:2,mode:{name:"javascript",json:!0},theme:u,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:n?"nocursor":!1,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:VI});f.addKeyMap({"Cmd-Space"(){f.showHint({completeSingle:!1,container:m})},"Ctrl-Space"(){f.showHint({completeSingle:!1,container:m})},"Alt-Space"(){f.showHint({completeSingle:!1,container:m})},"Shift-Space"(){f.showHint({completeSingle:!1,container:m})}}),f.on("keyup",(p,D)=>{const{code:x,key:b,shiftKey:k}=D,_=x.startsWith("Key"),y=!k&&x.startsWith("Digit");(_||y||b==="_"||b==='"')&&p.execCommand("autocomplete")}),o(f)}),()=>{E=!1}},[u,r,n,o]),u_(a,"keyMap",e),tie(a,t,s?b8:null,"headers",Nx),Bc(a,["Cmd-Enter","Ctrl-Enter"],l==null?void 0:l.run),Bc(a,["Shift-Ctrl-P"],d),Bc(a,["Shift-Ctrl-M"],c),h}Ce(Nx,"useHeaderEditor");const b8="headers",IRu=Array.from({length:11},(u,e)=>String.fromCharCode(8192+e)).concat(["\u2028","\u2029"," "," "]),ORu=new RegExp("["+IRu.join("")+"]","g");function vIe(u){return u.replace(ORu," ")}Ce(vIe,"normalizeWhitespace");function rE({editorTheme:u=OI,keyMap:e=jI,onClickReference:t,onCopyQuery:n,onEdit:i,readOnly:r=!1}={},a){const{schema:o}=V1({nonNull:!0,caller:a||rE}),{externalFragments:s,initialQuery:l,queryEditor:c,setOperationName:d,setQueryEditor:h,validationRules:E,variableEditor:g,updateActiveTabValues:m}=Ia({nonNull:!0,caller:a||rE}),f=t_(),p=bm(),D=km(),x=HI(),b=$I({caller:a||rE,onCopyQuery:n}),k=cp({caller:a||rE}),_=LC({caller:a||rE}),y=C.useRef(null),S=C.useRef(),B=C.useRef(()=>{});C.useEffect(()=>{B.current=N=>{if(!(!D||!x)){switch(x.setVisiblePlugin(gF),N.kind){case"Type":{D.push({name:N.type.name,def:N.type});break}case"Field":{D.push({name:N.field.name,def:N.field});break}case"Argument":{N.field&&D.push({name:N.field.name,def:N.field});break}case"EnumValue":{N.type&&D.push({name:N.type.name,def:N.type});break}}t==null||t(N)}}},[D,t,x]),C.useEffect(()=>{let N=!0;return zC([Le(()=>import("./comment.es-39699bae.js"),["./comment.es-39699bae.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(F=>F.c),Le(()=>import("./search.es-1c15f5ea.js"),["./search.es-1c15f5ea.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(F=>F.s),Le(()=>import("./hint.es-aabaaa11.js"),["./hint.es-aabaaa11.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./show-hint.es-b981493e.js","./Range-52ddcb6a.js"],import.meta.url),Le(()=>import("./lint.es2-285cd615.js"),["./lint.es2-285cd615.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./Range-52ddcb6a.js"],import.meta.url),Le(()=>import("./info.es-76dbdced.js"),["./info.es-76dbdced.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./SchemaReference.es-db37d28c.js","./forEachState.es-b2033c2b.js","./info-addon.es-c9b2027b.js"],import.meta.url),Le(()=>import("./jump.es-c4a73c76.js"),["./jump.es-c4a73c76.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./SchemaReference.es-db37d28c.js","./forEachState.es-b2033c2b.js"],import.meta.url),Le(()=>import("./mode.es-0a36625a.js"),["./mode.es-0a36625a.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./mode-indent.es-057a4f6a.js"],import.meta.url)]).then(F=>{if(!N)return;S.current=F;const A=y.current;if(!A)return;const z=F(A,{value:l,lineNumbers:!0,tabSize:2,foldGutter:!0,mode:"graphql",theme:u,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:r?"nocursor":!1,lint:{schema:void 0,validationRules:null,externalFragments:void 0},hintOptions:{schema:void 0,closeOnUnfocus:!1,completeSingle:!1,container:A,externalFragments:void 0},info:{schema:void 0,renderDescription:I=>DT.render(I),onClick(I){B.current(I)}},jump:{schema:void 0,onClick(I){B.current(I)}},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{...VI,"Cmd-S"(){},"Ctrl-S"(){}}});z.addKeyMap({"Cmd-Space"(){z.showHint({completeSingle:!0,container:A})},"Ctrl-Space"(){z.showHint({completeSingle:!0,container:A})},"Alt-Space"(){z.showHint({completeSingle:!0,container:A})},"Shift-Space"(){z.showHint({completeSingle:!0,container:A})},"Shift-Alt-Space"(){z.showHint({completeSingle:!0,container:A})}}),z.on("keyup",(I,j)=>{jRu.test(j.key)&&I.execCommand("autocomplete")});let P=!1;z.on("startCompletion",()=>{P=!0}),z.on("endCompletion",()=>{P=!1}),z.on("keydown",(I,j)=>{j.key==="Escape"&&P&&j.stopPropagation()}),z.on("beforeChange",(I,j)=>{var V;if(j.origin==="paste"){const H=j.text.map(vIe);(V=j.update)==null||V.call(j,j.from,j.to,H)}}),z.documentAST=null,z.operationName=null,z.operations=null,z.variableToType=null,h(z)}),()=>{N=!1}},[u,l,r,h]),u_(c,"keyMap",e),C.useEffect(()=>{if(!c)return;function N(A){var z;const P=vJt(o,A.getValue()),I=zqt(A.operations??void 0,A.operationName??void 0,P==null?void 0:P.operations);return A.documentAST=(P==null?void 0:P.documentAST)??null,A.operationName=I??null,A.operations=(P==null?void 0:P.operations)??null,g&&(g.state.lint.linterOptions.variableToType=P==null?void 0:P.variableToType,g.options.lint.variableToType=P==null?void 0:P.variableToType,g.options.hintOptions.variableToType=P==null?void 0:P.variableToType,(z=S.current)==null||z.signal(g,"change",g)),P?{...P,operationName:I}:null}Ce(N,"getAndUpdateOperationFacts");const F=lp(100,A=>{const z=A.getValue();p==null||p.set(yIe,z);const P=A.operationName,I=N(A);(I==null?void 0:I.operationName)!==void 0&&(p==null||p.set(VRu,I.operationName)),i==null||i(z,I==null?void 0:I.documentAST),I!=null&&I.operationName&&P!==I.operationName&&d(I.operationName),m({query:z,operationName:(I==null?void 0:I.operationName)??null})});return N(c),c.on("change",F),()=>c.off("change",F)},[i,c,o,d,p,g,m]),CIe(c,o??null,S),bIe(c,E??null,S),kIe(c,s,S),uie(c,t||null,rE);const L=f==null?void 0:f.run,T=C.useCallback(()=>{var N;if(!L||!c||!c.operations||!c.hasFocus()){L==null||L();return}const F=c.indexFromPos(c.getCursor());let A;for(const z of c.operations)z.loc&&z.loc.start<=F&&z.loc.end>=F&&(A=(N=z.name)==null?void 0:N.value);A&&A!==c.operationName&&d(A),L()},[c,L,d]);return Bc(c,["Cmd-Enter","Ctrl-Enter"],T),Bc(c,["Shift-Ctrl-C"],b),Bc(c,["Shift-Ctrl-P","Shift-Ctrl-F"],_),Bc(c,["Shift-Ctrl-M"],k),y}Ce(rE,"useQueryEditor");function CIe(u,e,t){C.useEffect(()=>{if(!u)return;const n=u.options.lint.schema!==e;u.state.lint.linterOptions.schema=e,u.options.lint.schema=e,u.options.hintOptions.schema=e,u.options.info.schema=e,u.options.jump.schema=e,n&&t.current&&t.current.signal(u,"change",u)},[u,e,t])}Ce(CIe,"useSynchronizeSchema");function bIe(u,e,t){C.useEffect(()=>{if(!u)return;const n=u.options.lint.validationRules!==e;u.state.lint.linterOptions.validationRules=e,u.options.lint.validationRules=e,n&&t.current&&t.current.signal(u,"change",u)},[u,e,t])}Ce(bIe,"useSynchronizeValidationRules");function kIe(u,e,t){const n=C.useMemo(()=>[...e.values()],[e]);C.useEffect(()=>{if(!u)return;const i=u.options.lint.externalFragments!==n;u.state.lint.linterOptions.externalFragments=n,u.options.lint.externalFragments=n,u.options.hintOptions.externalFragments=n,i&&t.current&&t.current.signal(u,"change",u)},[u,n,t])}Ce(kIe,"useSynchronizeExternalFragments");const jRu=/^[a-zA-Z0-9_@(]$/,yIe="query",VRu="operationName";function FIe({defaultQuery:u,defaultHeaders:e,headers:t,defaultTabs:n,query:i,variables:r,storage:a,shouldPersistHeaders:o}){const s=a==null?void 0:a.get(fF);try{if(!s)throw new Error("Storage for tabs is empty");const l=JSON.parse(s),c=o?t:void 0;if(AIe(l)){const d=mF({query:i,variables:r,headers:c});let h=-1;for(let E=0;E=0)l.activeTabIndex=h;else{const E=i?KI(i):null;l.tabs.push({id:aie(),hash:d,title:E||oie,query:i,variables:r,headers:t,operationName:E,response:null}),l.activeTabIndex=l.tabs.length-1}return l}throw new Error("Storage for tabs is invalid")}catch{return{activeTabIndex:0,tabs:(n||[{query:i??u,variables:r,headers:t??e}]).map(iie)}}}Ce(FIe,"getDefaultTabState");function AIe(u){return u&&typeof u=="object"&&!Array.isArray(u)&&SIe(u,"activeTabIndex")&&"tabs"in u&&Array.isArray(u.tabs)&&u.tabs.every(_Ie)}Ce(AIe,"isTabsState");function _Ie(u){return u&&typeof u=="object"&&!Array.isArray(u)&&eY(u,"id")&&eY(u,"title")&&KD(u,"query")&&KD(u,"variables")&&KD(u,"headers")&&KD(u,"operationName")&&KD(u,"response")}Ce(_Ie,"isTabState");function SIe(u,e){return e in u&&typeof u[e]=="number"}Ce(SIe,"hasNumberKey");function eY(u,e){return e in u&&typeof u[e]=="string"}Ce(eY,"hasStringKey");function KD(u,e){return e in u&&(typeof u[e]=="string"||u[e]===null)}Ce(KD,"hasStringOrNullKey");function BIe({queryEditor:u,variableEditor:e,headerEditor:t,responseEditor:n}){return C.useCallback(i=>{const r=(u==null?void 0:u.getValue())??null,a=(e==null?void 0:e.getValue())??null,o=(t==null?void 0:t.getValue())??null,s=(u==null?void 0:u.operationName)??null,l=(n==null?void 0:n.getValue())??null;return rie(i,{query:r,variables:a,headers:o,response:l,operationName:s})},[u,e,t,n])}Ce(BIe,"useSynchronizeActiveTabValues");function nie(u,e=!1){return JSON.stringify(u,(t,n)=>t==="hash"||t==="response"||!e&&t==="headers"?null:n)}Ce(nie,"serializeTabState");function wIe({storage:u,shouldPersistHeaders:e}){const t=C.useMemo(()=>lp(500,n=>{u==null||u.set(fF,n)}),[u]);return C.useCallback(n=>{t(nie(n,e))},[e,t])}Ce(wIe,"useStoreTabs");function zIe({queryEditor:u,variableEditor:e,headerEditor:t,responseEditor:n}){return C.useCallback(({query:i,variables:r,headers:a,response:o})=>{u==null||u.setValue(i??""),e==null||e.setValue(r??""),t==null||t.setValue(a??""),n==null||n.setValue(o??"")},[t,u,n,e])}Ce(zIe,"useSetEditorValues");function iie({query:u=null,variables:e=null,headers:t=null}={}){return{id:aie(),hash:mF({query:u,variables:e,headers:t}),title:u&&KI(u)||oie,query:u,variables:e,headers:t,operationName:null,response:null}}Ce(iie,"createTab");function rie(u,e){return{...u,tabs:u.tabs.map((t,n)=>{if(n!==u.activeTabIndex)return t;const i={...t,...e};return{...i,hash:mF(i),title:i.operationName||(i.query?KI(i.query):void 0)||oie}})}}Ce(rie,"setPropertiesInActiveTab");function aie(){const u=Ce(()=>Math.floor((1+Math.random())*65536).toString(16).slice(1),"s4");return`${u()}${u()}-${u()}-${u()}-${u()}-${u()}${u()}${u()}`}Ce(aie,"guid");function mF(u){return[u.query??"",u.variables??"",u.headers??""].join("|")}Ce(mF,"hashFromTabContents");function KI(u){const e=/^(?!#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/m.exec(u);return(e==null?void 0:e[2])??null}Ce(KI,"fuzzyExtractOperationName");function LIe(u){const e=u==null?void 0:u.get(fF);if(e){const t=JSON.parse(e);u==null||u.set(fF,JSON.stringify(t,(n,i)=>n==="headers"?null:i))}}Ce(LIe,"clearHeadersFromTabs");const oie="",fF="tabState";function xf({editorTheme:u=OI,keyMap:e=jI,onClickReference:t,onEdit:n,readOnly:i=!1}={},r){const{initialVariables:a,variableEditor:o,setVariableEditor:s}=Ia({nonNull:!0,caller:r||xf}),l=t_(),c=cp({caller:r||xf}),d=LC({caller:r||xf}),h=C.useRef(null),E=C.useRef();return C.useEffect(()=>{let g=!0;return zC([Le(()=>import("./hint.es2-40045f85.js"),["./hint.es2-40045f85.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./forEachState.es-b2033c2b.js"],import.meta.url),Le(()=>import("./lint.es3-eda84a87.js"),["./lint.es3-eda84a87.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js"],import.meta.url),Le(()=>import("./mode.es2-b413cff7.js"),["./mode.es2-b413cff7.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./mode-indent.es-057a4f6a.js"],import.meta.url)]).then(m=>{if(!g)return;E.current=m;const f=h.current;if(!f)return;const p=m(f,{value:a,lineNumbers:!0,tabSize:2,mode:"graphql-variables",theme:u,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:i?"nocursor":!1,foldGutter:!0,lint:{variableToType:void 0},hintOptions:{closeOnUnfocus:!1,completeSingle:!1,container:f,variableToType:void 0},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:VI});p.addKeyMap({"Cmd-Space"(){p.showHint({completeSingle:!1,container:f})},"Ctrl-Space"(){p.showHint({completeSingle:!1,container:f})},"Alt-Space"(){p.showHint({completeSingle:!1,container:f})},"Shift-Space"(){p.showHint({completeSingle:!1,container:f})}}),p.on("keyup",(D,x)=>{const{code:b,key:k,shiftKey:_}=x,y=b.startsWith("Key"),S=!_&&b.startsWith("Digit");(y||S||k==="_"||k==='"')&&D.execCommand("autocomplete")}),s(p)}),()=>{g=!1}},[u,a,i,s]),u_(o,"keyMap",e),tie(o,n,MIe,"variables",xf),uie(o,t||null,xf),Bc(o,["Cmd-Enter","Ctrl-Enter"],l==null?void 0:l.run),Bc(o,["Shift-Ctrl-P"],d),Bc(o,["Shift-Ctrl-M"],c),h}Ce(xf,"useVariableEditor");const MIe="variables",TIe=vm("EditorContext");function PIe(u){const e=bm(),[t,n]=C.useState(null),[i,r]=C.useState(null),[a,o]=C.useState(null),[s,l]=C.useState(null),[c,d]=C.useState(()=>{const I=(e==null?void 0:e.get(f$))!==null;return u.shouldPersistHeaders!==!1&&I?(e==null?void 0:e.get(f$))==="true":!!u.shouldPersistHeaders});Fb(t,u.headers),Fb(i,u.query),Fb(a,u.response),Fb(s,u.variables);const h=wIe({storage:e,shouldPersistHeaders:c}),[E]=C.useState(()=>{const I=u.query??(e==null?void 0:e.get(yIe))??null,j=u.variables??(e==null?void 0:e.get(MIe))??null,V=u.headers??(e==null?void 0:e.get(b8))??null,H=u.response??"",q=FIe({query:I,variables:j,headers:V,defaultTabs:u.defaultTabs,defaultQuery:u.defaultQuery||HRu,defaultHeaders:u.defaultHeaders,storage:e,shouldPersistHeaders:c});return h(q),{query:I??(q.activeTabIndex===0?q.tabs[0].query:null)??"",variables:j??"",headers:V??u.defaultHeaders??"",response:H,tabState:q}}),[g,m]=C.useState(E.tabState),f=C.useCallback(I=>{if(I){e==null||e.set(b8,(t==null?void 0:t.getValue())??"");const j=nie(g,!0);e==null||e.set(fF,j)}else e==null||e.set(b8,""),LIe(e);d(I),e==null||e.set(f$,I.toString())},[e,g,t]),p=C.useRef();C.useEffect(()=>{const I=!!u.shouldPersistHeaders;p.current!==I&&(f(I),p.current=I)},[u.shouldPersistHeaders,f]);const D=BIe({queryEditor:i,variableEditor:s,headerEditor:t,responseEditor:a}),x=zIe({queryEditor:i,variableEditor:s,headerEditor:t,responseEditor:a}),{onTabChange:b,defaultHeaders:k,children:_}=u,y=C.useCallback(()=>{m(I=>{const j=D(I),V={tabs:[...j.tabs,iie({headers:k})],activeTabIndex:j.tabs.length};return h(V),x(V.tabs[V.activeTabIndex]),b==null||b(V),V})},[k,b,x,h,D]),S=C.useCallback(I=>{m(j=>{const V={...j,activeTabIndex:I};return h(V),x(V.tabs[V.activeTabIndex]),b==null||b(V),V})},[b,x,h]),B=C.useCallback(I=>{m(j=>{const V=j.tabs[j.activeTabIndex],H={tabs:I,activeTabIndex:I.indexOf(V)};return h(H),x(H.tabs[H.activeTabIndex]),b==null||b(H),H})},[b,x,h]),L=C.useCallback(I=>{m(j=>{const V={tabs:j.tabs.filter((H,q)=>I!==q),activeTabIndex:Math.max(j.activeTabIndex-1,0)};return h(V),x(V.tabs[V.activeTabIndex]),b==null||b(V),V})},[b,x,h]),T=C.useCallback(I=>{m(j=>{const V=rie(j,I);return h(V),b==null||b(V),V})},[b,h]),{onEditOperationName:N}=u,F=C.useCallback(I=>{i&&(i.operationName=I,T({operationName:I}),N==null||N(I))},[N,i,T]),A=C.useMemo(()=>{const I=new Map;if(Array.isArray(u.externalFragments))for(const j of u.externalFragments)I.set(j.name.value,j);else if(typeof u.externalFragments=="string")Jc(fm(u.externalFragments,{}),{FragmentDefinition(j){I.set(j.name.value,j)}});else if(u.externalFragments)throw new Error("The `externalFragments` prop must either be a string that contains the fragment definitions in SDL or a list of FragmentDefinitionNode objects.");return I},[u.externalFragments]),z=C.useMemo(()=>u.validationRules||[],[u.validationRules]),P=C.useMemo(()=>({...g,addTab:y,changeTab:S,moveTab:B,closeTab:L,updateActiveTabValues:T,headerEditor:t,queryEditor:i,responseEditor:a,variableEditor:s,setHeaderEditor:n,setQueryEditor:r,setResponseEditor:o,setVariableEditor:l,setOperationName:F,initialQuery:E.query,initialVariables:E.variables,initialHeaders:E.headers,initialResponse:E.response,externalFragments:A,validationRules:z,shouldPersistHeaders:c,setShouldPersistHeaders:f}),[g,y,S,B,L,T,t,i,a,s,F,E,A,z,c,f]);return w.jsx(TIe.Provider,{value:P,children:_})}Ce(PIe,"EditorContextProvider");const Ia=Cm(TIe),f$="shouldPersistHeaders",HRu=`# Welcome to GraphiQL # # GraphiQL is an in-browser tool for writing, validating, and # testing GraphQL queries. @@ -1104,7 +1104,7 @@ ${c}`)}yield yield Dh(l.map(c=>c.body))}}catch(l){i={error:l}}finally{try{s&&!s. # Auto Complete: Ctrl-Space (or just start typing) # -`;function yT({isHidden:u,...e}){const{headerEditor:t}=Ia({nonNull:!0,caller:yT}),n=Nx(e,yT);return C.useEffect(()=>{u||t==null||t.refresh()},[t,u]),w.jsx("div",{className:Ra("graphiql-editor",u&&"hidden"),ref:n})}Ce(yT,"HeaderEditor");function FT(u){var e;const[t,n]=C.useState({width:null,height:null}),[i,r]=C.useState(null),a=C.useRef(null),o=(e=sie(u.token))==null?void 0:e.href;C.useEffect(()=>{if(a.current){if(!o){n({width:null,height:null}),r(null);return}fetch(o,{method:"HEAD"}).then(l=>{r(l.headers.get("Content-Type"))}).catch(()=>{r(null)})}},[o]);const s=t.width!==null&&t.height!==null?w.jsxs("div",{children:[t.width,"x",t.height,i===null?null:" "+i]}):null;return w.jsxs("div",{children:[w.jsx("img",{onLoad:()=>{var l,c;n({width:((l=a.current)==null?void 0:l.naturalWidth)??null,height:((c=a.current)==null?void 0:c.naturalHeight)??null})},ref:a,src:o}),s]})}Ce(FT,"ImagePreview");FT.shouldRender=Ce(function(u){const e=sie(u);return e?NIe(e):!1},"shouldRender");function sie(u){if(u.type!=="string")return;const e=u.string.slice(1).slice(0,-1).trim();try{const{location:t}=window;return new URL(e,t.protocol+"//"+t.host)}catch{return}}Ce(sie,"tokenToURL");function NIe(u){return/(bmp|gif|jpeg|jpg|png|svg)$/.test(u.pathname)}Ce(NIe,"isImageURL");function lie(u){const e=rE(u,lie);return w.jsx("div",{className:"graphiql-editor",ref:e})}Ce(lie,"QueryEditor");function AT({responseTooltip:u,editorTheme:e=OI,keyMap:t=jI}={},n){const{fetchError:i,validationErrors:r}=V1({nonNull:!0,caller:n||AT}),{initialResponse:a,responseEditor:o,setResponseEditor:s}=Ia({nonNull:!0,caller:n||AT}),l=C.useRef(null),c=C.useRef(u);return C.useEffect(()=>{c.current=u},[u]),C.useEffect(()=>{let d=!0;return zC([Le(()=>import("./foldgutter.es-b6cee46a.js"),["./foldgutter.es-b6cee46a.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(h=>h.f),Le(()=>import("./brace-fold.es-f2e3735d.js"),["./brace-fold.es-f2e3735d.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(h=>h.b),Le(()=>import("./dialog.es-dffe62e7.js"),["./dialog.es-dffe62e7.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(h=>h.d),Le(()=>import("./search.es-1c15f5ea.js"),["./search.es-1c15f5ea.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(h=>h.s),Le(()=>import("./searchcursor.es-b1a352a2.js"),["./searchcursor.es-b1a352a2.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js"],import.meta.url).then(h=>h.s),Le(()=>import("./jump-to-line.es-d901ea33.js"),["./jump-to-line.es-d901ea33.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(h=>h.j),Le(()=>import("./sublime.es-e2a3eb60.js"),["./sublime.es-e2a3eb60.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./matchbrackets.es2-f53f57e6.js"],import.meta.url).then(h=>h.s),Le(()=>import("./mode.es3-0c1c2d6c.js"),["./mode.es3-0c1c2d6c.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./mode-indent.es-057a4f6a.js"],import.meta.url),Le(()=>import("./info-addon.es-c9b2027b.js"),["./info-addon.es-c9b2027b.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js"],import.meta.url)],{useCommonAddons:!1}).then(h=>{if(!d)return;const E=document.createElement("div");h.registerHelper("info","graphql-results",(f,p,D,x)=>{const b=[],k=c.current;return k&&b.push(w.jsx(k,{pos:x,token:f})),FT.shouldRender(f)&&b.push(w.jsx(FT,{token:f},"image-preview")),b.length?(m5.render(b,E),E):(m5.unmountComponentAtNode(E),null)});const g=l.current;if(!g)return;const m=h(g,{value:a,lineWrapping:!0,readOnly:!0,theme:e,mode:"graphql-results",foldGutter:!0,gutters:["CodeMirror-foldgutter"],info:!0,extraKeys:VI});s(m)}),()=>{d=!1}},[e,a,s]),u_(o,"keyMap",t),C.useEffect(()=>{i&&(o==null||o.setValue(i)),r.length>0&&(o==null||o.setValue(Yy(r)))},[o,i,r]),l}Ce(AT,"useResponseEditor");function cie(u){const e=AT(u,cie);return w.jsx("section",{className:"result-window","aria-label":"Result Window","aria-live":"polite","aria-atomic":"true",ref:e})}Ce(cie,"ResponseEditor");function _T({isHidden:u,...e}){const{variableEditor:t}=Ia({nonNull:!0,caller:_T}),n=xf(e,_T);return C.useEffect(()=>{t&&!u&&t.refresh()},[t,u]),w.jsx("div",{className:Ra("graphiql-editor",u&&"hidden"),ref:n})}Ce(_T,"VariableEditor");function RIe({children:u,dangerouslyAssumeSchemaIsValid:e,defaultQuery:t,defaultHeaders:n,defaultTabs:i,externalFragments:r,fetcher:a,getDefaultFieldNames:o,headers:s,inputValueDeprecation:l,introspectionQueryName:c,maxHistoryLength:d,onEditOperationName:h,onSchemaChange:E,onTabChange:g,onTogglePluginVisibility:m,operationName:f,plugins:p,query:D,response:x,schema:b,schemaDescription:k,shouldPersistHeaders:_,storage:y,validationRules:S,variables:B,visiblePlugin:L}){return w.jsx(jRe,{storage:y,children:w.jsx(YRe,{maxHistoryLength:d,children:w.jsx(PIe,{defaultQuery:t,defaultHeaders:n,defaultTabs:i,externalFragments:r,headers:s,onEditOperationName:h,onTabChange:g,query:D,response:x,shouldPersistHeaders:_,validationRules:S,variables:B,children:w.jsx(Yne,{dangerouslyAssumeSchemaIsValid:e,fetcher:a,inputValueDeprecation:l,introspectionQueryName:c,onSchemaChange:E,schema:b,schemaDescription:k,children:w.jsx(xT,{getDefaultFieldNames:o,fetcher:a,operationName:f,children:w.jsx(Qne,{children:w.jsx(DIe,{onTogglePluginVisibility:m,plugins:p,visiblePlugin:L,children:u})})})})})})})}Ce(RIe,"GraphiQLProvider");function IIe(){const u=bm(),[e,t]=C.useState(()=>{if(!u)return null;const i=u.get(p$);switch(i){case"light":return"light";case"dark":return"dark";default:return typeof i=="string"&&u.set(p$,""),null}});C.useLayoutEffect(()=>{typeof window>"u"||(document.body.classList.remove("graphiql-light","graphiql-dark"),e&&document.body.classList.add(`graphiql-${e}`))},[e]);const n=C.useCallback(i=>{u==null||u.set(p$,i||""),t(i)},[u]);return C.useMemo(()=>({theme:e,setTheme:n}),[e,n])}Ce(IIe,"useTheme");const p$="theme";function k8({defaultSizeRelation:u=$Ru,direction:e,initiallyHidden:t,onHiddenElementChange:n,sizeThresholdFirst:i=100,sizeThresholdSecond:r=100,storageKey:a}){const o=bm(),s=C.useMemo(()=>lp(500,D=>{a&&(o==null||o.set(a,D))}),[o,a]),[l,c]=C.useState(()=>{const D=a&&(o==null?void 0:o.get(a));return D===Z9||t==="first"?"first":D===Y9||t==="second"?"second":null}),d=C.useCallback(D=>{D!==l&&(c(D),n==null||n(D))},[l,n]),h=C.useRef(null),E=C.useRef(null),g=C.useRef(null),m=C.useRef(`${u}`);C.useLayoutEffect(()=>{const D=a&&(o==null?void 0:o.get(a))||m.current;h.current&&(h.current.style.display="flex",h.current.style.flex=D===Z9||D===Y9?m.current:D),g.current&&(g.current.style.display="flex",g.current.style.flex="1"),E.current&&(E.current.style.display="flex")},[e,o,a]);const f=C.useCallback(D=>{const x=D==="first"?h.current:g.current;if(x&&(x.style.left="-1000px",x.style.position="absolute",x.style.opacity="0",x.style.height="500px",x.style.width="500px",h.current)){const b=parseFloat(h.current.style.flex);(!Number.isFinite(b)||b<1)&&(h.current.style.flex="1")}},[]),p=C.useCallback(D=>{const x=D==="first"?h.current:g.current;if(x&&(x.style.width="",x.style.height="",x.style.opacity="",x.style.position="",x.style.left="",o&&a)){const b=o.get(a);h.current&&b!==Z9&&b!==Y9&&(h.current.style.flex=b||m.current)}},[o,a]);return C.useLayoutEffect(()=>{l==="first"?f("first"):p("first"),l==="second"?f("second"):p("second")},[l,f,p]),C.useEffect(()=>{if(!E.current||!h.current||!g.current)return;const D=E.current,x=h.current,b=x.parentElement,k=e==="horizontal"?"clientX":"clientY",_=e==="horizontal"?"left":"top",y=e==="horizontal"?"right":"bottom",S=e==="horizontal"?"clientWidth":"clientHeight";function B(T){T.preventDefault();const N=T[k]-D.getBoundingClientRect()[_];function F(z){if(z.buttons===0)return A();const P=z[k]-b.getBoundingClientRect()[_]-N,I=b.getBoundingClientRect()[y]-z[k]+N-D[S];if(P{D.removeEventListener("mousedown",B),D.removeEventListener("dblclick",L)}},[e,d,i,r,s]),C.useMemo(()=>({dragBarRef:E,hiddenElement:l,firstRef:h,setHiddenElement:c,secondRef:g}),[l,c])}Ce(k8,"useDragResize");const $Ru=1,Z9="hide-first",Y9="hide-second",y8=C.forwardRef(({label:u,onClick:e,...t},n)=>{const[i,r]=C.useState(null),a=C.useCallback(o=>{try{e==null||e(o),r(null)}catch(s){r(s instanceof Error?s:new Error(`Toolbar button click failed: ${s}`))}},[e]);return w.jsx(ko,{label:u,children:w.jsx(ua,{...t,ref:n,type:"button",className:Ra("graphiql-toolbar-button",i&&"error",t.className),onClick:a,"aria-label":i?i.message:u,"aria-invalid":i?"true":t["aria-invalid"]})})});y8.displayName="ToolbarButton";function ST(){const{queryEditor:u,setOperationName:e}=Ia({nonNull:!0,caller:ST}),{isFetching:t,isSubscribed:n,operationName:i,run:r,stop:a}=t_({nonNull:!0,caller:ST}),o=(u==null?void 0:u.operations)||[],s=o.length>1&&typeof i!="string",l=t||n,c=`${l?"Stop":"Execute"} query (Ctrl-Enter)`,d={type:"button",className:"graphiql-execute-button",children:l?w.jsx(wRu,{}):w.jsx(bRu,{}),"aria-label":c};return s&&!l?w.jsxs(NE,{children:[w.jsx(ko,{label:c,children:w.jsx(NE.Button,{...d})}),w.jsx(NE.Content,{children:o.map((h,E)=>{const g=h.name?h.name.value:``;return w.jsx(NE.Item,{onSelect:()=>{var m;const f=(m=h.name)==null?void 0:m.value;u&&f&&f!==u.operationName&&e(f),r()},children:g},`${g}-${E}`)})})]}):w.jsx(ko,{label:c,children:w.jsx("button",{...d,onClick:()=>{l?a():r()}})})}Ce(ST,"ExecuteButton");const KRu=Ce(({button:u,children:e,label:t,...n})=>w.jsxs(NE,{...n,children:[w.jsx(ko,{label:t,children:w.jsx(NE.Button,{className:Ra("graphiql-un-styled graphiql-toolbar-menu",n.className),"aria-label":t,children:u})}),w.jsx(NE.Content,{children:e})]}),"ToolbarMenuRoot");e_(KRu,{Item:NE.Item});var tY=globalThis&&globalThis.__assign||function(){return tY=Object.assign||function(u){for(var e,t=1,n=arguments.length;t0)&&!(i=n.next()).done;)r.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return r},GRu=parseInt(M.version.slice(0,2),10);if(GRu<16)throw new Error(["GraphiQL 0.18.0 and after is not compatible with React 15 or below.","If you are using a CDN source (jsdelivr, unpkg, etc), follow this example:","https://github.com/graphql/graphiql/blob/master/examples/graphiql-cdn/index.html#L49"].join(` +`;function yT({isHidden:u,...e}){const{headerEditor:t}=Ia({nonNull:!0,caller:yT}),n=Nx(e,yT);return C.useEffect(()=>{u||t==null||t.refresh()},[t,u]),w.jsx("div",{className:Ra("graphiql-editor",u&&"hidden"),ref:n})}Ce(yT,"HeaderEditor");function FT(u){var e;const[t,n]=C.useState({width:null,height:null}),[i,r]=C.useState(null),a=C.useRef(null),o=(e=sie(u.token))==null?void 0:e.href;C.useEffect(()=>{if(a.current){if(!o){n({width:null,height:null}),r(null);return}fetch(o,{method:"HEAD"}).then(l=>{r(l.headers.get("Content-Type"))}).catch(()=>{r(null)})}},[o]);const s=t.width!==null&&t.height!==null?w.jsxs("div",{children:[t.width,"x",t.height,i===null?null:" "+i]}):null;return w.jsxs("div",{children:[w.jsx("img",{onLoad:()=>{var l,c;n({width:((l=a.current)==null?void 0:l.naturalWidth)??null,height:((c=a.current)==null?void 0:c.naturalHeight)??null})},ref:a,src:o}),s]})}Ce(FT,"ImagePreview");FT.shouldRender=Ce(function(u){const e=sie(u);return e?NIe(e):!1},"shouldRender");function sie(u){if(u.type!=="string")return;const e=u.string.slice(1).slice(0,-1).trim();try{const{location:t}=window;return new URL(e,t.protocol+"//"+t.host)}catch{return}}Ce(sie,"tokenToURL");function NIe(u){return/(bmp|gif|jpeg|jpg|png|svg)$/.test(u.pathname)}Ce(NIe,"isImageURL");function lie(u){const e=rE(u,lie);return w.jsx("div",{className:"graphiql-editor",ref:e})}Ce(lie,"QueryEditor");function AT({responseTooltip:u,editorTheme:e=OI,keyMap:t=jI}={},n){const{fetchError:i,validationErrors:r}=V1({nonNull:!0,caller:n||AT}),{initialResponse:a,responseEditor:o,setResponseEditor:s}=Ia({nonNull:!0,caller:n||AT}),l=C.useRef(null),c=C.useRef(u);return C.useEffect(()=>{c.current=u},[u]),C.useEffect(()=>{let d=!0;return zC([Le(()=>import("./foldgutter.es-b6cee46a.js"),["./foldgutter.es-b6cee46a.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(h=>h.f),Le(()=>import("./brace-fold.es-f2e3735d.js"),["./brace-fold.es-f2e3735d.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(h=>h.b),Le(()=>import("./dialog.es-dffe62e7.js"),["./dialog.es-dffe62e7.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(h=>h.d),Le(()=>import("./search.es-1c15f5ea.js"),["./search.es-1c15f5ea.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(h=>h.s),Le(()=>import("./searchcursor.es-b1a352a2.js"),["./searchcursor.es-b1a352a2.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js"],import.meta.url).then(h=>h.s),Le(()=>import("./jump-to-line.es-d901ea33.js"),["./jump-to-line.es-d901ea33.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(h=>h.j),Le(()=>import("./sublime.es-e2a3eb60.js"),["./sublime.es-e2a3eb60.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./matchbrackets.es2-f53f57e6.js"],import.meta.url).then(h=>h.s),Le(()=>import("./mode.es3-96157044.js"),["./mode.es3-96157044.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./mode-indent.es-057a4f6a.js"],import.meta.url),Le(()=>import("./info-addon.es-c9b2027b.js"),["./info-addon.es-c9b2027b.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js"],import.meta.url)],{useCommonAddons:!1}).then(h=>{if(!d)return;const E=document.createElement("div");h.registerHelper("info","graphql-results",(f,p,D,x)=>{const b=[],k=c.current;return k&&b.push(w.jsx(k,{pos:x,token:f})),FT.shouldRender(f)&&b.push(w.jsx(FT,{token:f},"image-preview")),b.length?(m5.render(b,E),E):(m5.unmountComponentAtNode(E),null)});const g=l.current;if(!g)return;const m=h(g,{value:a,lineWrapping:!0,readOnly:!0,theme:e,mode:"graphql-results",foldGutter:!0,gutters:["CodeMirror-foldgutter"],info:!0,extraKeys:VI});s(m)}),()=>{d=!1}},[e,a,s]),u_(o,"keyMap",t),C.useEffect(()=>{i&&(o==null||o.setValue(i)),r.length>0&&(o==null||o.setValue(Yy(r)))},[o,i,r]),l}Ce(AT,"useResponseEditor");function cie(u){const e=AT(u,cie);return w.jsx("section",{className:"result-window","aria-label":"Result Window","aria-live":"polite","aria-atomic":"true",ref:e})}Ce(cie,"ResponseEditor");function _T({isHidden:u,...e}){const{variableEditor:t}=Ia({nonNull:!0,caller:_T}),n=xf(e,_T);return C.useEffect(()=>{t&&!u&&t.refresh()},[t,u]),w.jsx("div",{className:Ra("graphiql-editor",u&&"hidden"),ref:n})}Ce(_T,"VariableEditor");function RIe({children:u,dangerouslyAssumeSchemaIsValid:e,defaultQuery:t,defaultHeaders:n,defaultTabs:i,externalFragments:r,fetcher:a,getDefaultFieldNames:o,headers:s,inputValueDeprecation:l,introspectionQueryName:c,maxHistoryLength:d,onEditOperationName:h,onSchemaChange:E,onTabChange:g,onTogglePluginVisibility:m,operationName:f,plugins:p,query:D,response:x,schema:b,schemaDescription:k,shouldPersistHeaders:_,storage:y,validationRules:S,variables:B,visiblePlugin:L}){return w.jsx(jRe,{storage:y,children:w.jsx(YRe,{maxHistoryLength:d,children:w.jsx(PIe,{defaultQuery:t,defaultHeaders:n,defaultTabs:i,externalFragments:r,headers:s,onEditOperationName:h,onTabChange:g,query:D,response:x,shouldPersistHeaders:_,validationRules:S,variables:B,children:w.jsx(Yne,{dangerouslyAssumeSchemaIsValid:e,fetcher:a,inputValueDeprecation:l,introspectionQueryName:c,onSchemaChange:E,schema:b,schemaDescription:k,children:w.jsx(xT,{getDefaultFieldNames:o,fetcher:a,operationName:f,children:w.jsx(Qne,{children:w.jsx(DIe,{onTogglePluginVisibility:m,plugins:p,visiblePlugin:L,children:u})})})})})})})}Ce(RIe,"GraphiQLProvider");function IIe(){const u=bm(),[e,t]=C.useState(()=>{if(!u)return null;const i=u.get(p$);switch(i){case"light":return"light";case"dark":return"dark";default:return typeof i=="string"&&u.set(p$,""),null}});C.useLayoutEffect(()=>{typeof window>"u"||(document.body.classList.remove("graphiql-light","graphiql-dark"),e&&document.body.classList.add(`graphiql-${e}`))},[e]);const n=C.useCallback(i=>{u==null||u.set(p$,i||""),t(i)},[u]);return C.useMemo(()=>({theme:e,setTheme:n}),[e,n])}Ce(IIe,"useTheme");const p$="theme";function k8({defaultSizeRelation:u=$Ru,direction:e,initiallyHidden:t,onHiddenElementChange:n,sizeThresholdFirst:i=100,sizeThresholdSecond:r=100,storageKey:a}){const o=bm(),s=C.useMemo(()=>lp(500,D=>{a&&(o==null||o.set(a,D))}),[o,a]),[l,c]=C.useState(()=>{const D=a&&(o==null?void 0:o.get(a));return D===Z9||t==="first"?"first":D===Y9||t==="second"?"second":null}),d=C.useCallback(D=>{D!==l&&(c(D),n==null||n(D))},[l,n]),h=C.useRef(null),E=C.useRef(null),g=C.useRef(null),m=C.useRef(`${u}`);C.useLayoutEffect(()=>{const D=a&&(o==null?void 0:o.get(a))||m.current;h.current&&(h.current.style.display="flex",h.current.style.flex=D===Z9||D===Y9?m.current:D),g.current&&(g.current.style.display="flex",g.current.style.flex="1"),E.current&&(E.current.style.display="flex")},[e,o,a]);const f=C.useCallback(D=>{const x=D==="first"?h.current:g.current;if(x&&(x.style.left="-1000px",x.style.position="absolute",x.style.opacity="0",x.style.height="500px",x.style.width="500px",h.current)){const b=parseFloat(h.current.style.flex);(!Number.isFinite(b)||b<1)&&(h.current.style.flex="1")}},[]),p=C.useCallback(D=>{const x=D==="first"?h.current:g.current;if(x&&(x.style.width="",x.style.height="",x.style.opacity="",x.style.position="",x.style.left="",o&&a)){const b=o.get(a);h.current&&b!==Z9&&b!==Y9&&(h.current.style.flex=b||m.current)}},[o,a]);return C.useLayoutEffect(()=>{l==="first"?f("first"):p("first"),l==="second"?f("second"):p("second")},[l,f,p]),C.useEffect(()=>{if(!E.current||!h.current||!g.current)return;const D=E.current,x=h.current,b=x.parentElement,k=e==="horizontal"?"clientX":"clientY",_=e==="horizontal"?"left":"top",y=e==="horizontal"?"right":"bottom",S=e==="horizontal"?"clientWidth":"clientHeight";function B(T){T.preventDefault();const N=T[k]-D.getBoundingClientRect()[_];function F(z){if(z.buttons===0)return A();const P=z[k]-b.getBoundingClientRect()[_]-N,I=b.getBoundingClientRect()[y]-z[k]+N-D[S];if(P{D.removeEventListener("mousedown",B),D.removeEventListener("dblclick",L)}},[e,d,i,r,s]),C.useMemo(()=>({dragBarRef:E,hiddenElement:l,firstRef:h,setHiddenElement:c,secondRef:g}),[l,c])}Ce(k8,"useDragResize");const $Ru=1,Z9="hide-first",Y9="hide-second",y8=C.forwardRef(({label:u,onClick:e,...t},n)=>{const[i,r]=C.useState(null),a=C.useCallback(o=>{try{e==null||e(o),r(null)}catch(s){r(s instanceof Error?s:new Error(`Toolbar button click failed: ${s}`))}},[e]);return w.jsx(ko,{label:u,children:w.jsx(ua,{...t,ref:n,type:"button",className:Ra("graphiql-toolbar-button",i&&"error",t.className),onClick:a,"aria-label":i?i.message:u,"aria-invalid":i?"true":t["aria-invalid"]})})});y8.displayName="ToolbarButton";function ST(){const{queryEditor:u,setOperationName:e}=Ia({nonNull:!0,caller:ST}),{isFetching:t,isSubscribed:n,operationName:i,run:r,stop:a}=t_({nonNull:!0,caller:ST}),o=(u==null?void 0:u.operations)||[],s=o.length>1&&typeof i!="string",l=t||n,c=`${l?"Stop":"Execute"} query (Ctrl-Enter)`,d={type:"button",className:"graphiql-execute-button",children:l?w.jsx(wRu,{}):w.jsx(bRu,{}),"aria-label":c};return s&&!l?w.jsxs(NE,{children:[w.jsx(ko,{label:c,children:w.jsx(NE.Button,{...d})}),w.jsx(NE.Content,{children:o.map((h,E)=>{const g=h.name?h.name.value:``;return w.jsx(NE.Item,{onSelect:()=>{var m;const f=(m=h.name)==null?void 0:m.value;u&&f&&f!==u.operationName&&e(f),r()},children:g},`${g}-${E}`)})})]}):w.jsx(ko,{label:c,children:w.jsx("button",{...d,onClick:()=>{l?a():r()}})})}Ce(ST,"ExecuteButton");const KRu=Ce(({button:u,children:e,label:t,...n})=>w.jsxs(NE,{...n,children:[w.jsx(ko,{label:t,children:w.jsx(NE.Button,{className:Ra("graphiql-un-styled graphiql-toolbar-menu",n.className),"aria-label":t,children:u})}),w.jsx(NE.Content,{children:e})]}),"ToolbarMenuRoot");e_(KRu,{Item:NE.Item});var tY=globalThis&&globalThis.__assign||function(){return tY=Object.assign||function(u){for(var e,t=1,n=arguments.length;t0)&&!(i=n.next()).done;)r.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return r},GRu=parseInt(M.version.slice(0,2),10);if(GRu<16)throw new Error(["GraphiQL 0.18.0 and after is not compatible with React 15 or below.","If you are using a CDN source (jsdelivr, unpkg, etc), follow this example:","https://github.com/graphql/graphiql/blob/master/examples/graphiql-cdn/index.html#L49"].join(` `));function RE(u){var e=u.dangerouslyAssumeSchemaIsValid,t=u.defaultQuery,n=u.defaultTabs,i=u.externalFragments,r=u.fetcher,a=u.getDefaultFieldNames,o=u.headers,s=u.inputValueDeprecation,l=u.introspectionQueryName,c=u.maxHistoryLength,d=u.onEditOperationName,h=u.onSchemaChange,E=u.onTabChange,g=u.onTogglePluginVisibility,m=u.operationName,f=u.plugins,p=u.query,D=u.response,x=u.schema,b=u.schemaDescription,k=u.shouldPersistHeaders,_=u.storage,y=u.validationRules,S=u.variables,B=u.visiblePlugin,L=u.defaultHeaders,T=WRu(u,["dangerouslyAssumeSchemaIsValid","defaultQuery","defaultTabs","externalFragments","fetcher","getDefaultFieldNames","headers","inputValueDeprecation","introspectionQueryName","maxHistoryLength","onEditOperationName","onSchemaChange","onTabChange","onTogglePluginVisibility","operationName","plugins","query","response","schema","schemaDescription","shouldPersistHeaders","storage","validationRules","variables","visiblePlugin","defaultHeaders"]);if(typeof r!="function")throw new TypeError("The `GraphiQL` component requires a `fetcher` function to be passed as prop.");return M.createElement(RIe,{getDefaultFieldNames:a,dangerouslyAssumeSchemaIsValid:e,defaultQuery:t,defaultHeaders:L,defaultTabs:n,externalFragments:i,fetcher:r,headers:o,inputValueDeprecation:s,introspectionQueryName:l,maxHistoryLength:c,onEditOperationName:d,onSchemaChange:h,onTabChange:E,onTogglePluginVisibility:g,plugins:f,visiblePlugin:B,operationName:m,query:p,response:D,schema:x,schemaDescription:b,shouldPersistHeaders:k,storage:_,validationRules:y,variables:S},M.createElement(URu,tY({showPersistHeadersSettings:k!==!1},T)))}RE.Logo=OIe;RE.Toolbar=jIe;RE.Footer=VIe;function URu(u){var e,t,n,i=(e=u.isHeadersEditorEnabled)!==null&&e!==void 0?e:!0,r=Ia({nonNull:!0}),a=t_({nonNull:!0}),o=V1({nonNull:!0}),s=bm(),l=HI(),c=$I({onCopyQuery:u.onCopyQuery}),d=cp(),h=LC(),E=IIe(),g=E.theme,m=E.setTheme,f=(t=l==null?void 0:l.visiblePlugin)===null||t===void 0?void 0:t.content,p=k8({defaultSizeRelation:1/3,direction:"horizontal",initiallyHidden:l!=null&&l.visiblePlugin?void 0:"first",onHiddenElementChange:function(Ee){Ee==="first"&&(l==null||l.setVisiblePlugin(null))},sizeThresholdSecond:200,storageKey:"docExplorerFlex"}),D=k8({direction:"horizontal",storageKey:"editorFlex"}),x=k8({defaultSizeRelation:3,direction:"vertical",initiallyHidden:function(){if(!(u.defaultEditorToolsVisibility==="variables"||u.defaultEditorToolsVisibility==="headers"))return typeof u.defaultEditorToolsVisibility=="boolean"?u.defaultEditorToolsVisibility?void 0:"second":r.initialVariables||r.initialHeaders?void 0:"second"}(),sizeThresholdSecond:60,storageKey:"secondaryEditorFlex"}),b=F8(C.useState(function(){return u.defaultEditorToolsVisibility==="variables"||u.defaultEditorToolsVisibility==="headers"?u.defaultEditorToolsVisibility:!r.initialVariables&&r.initialHeaders&&i?"headers":"variables"}),2),k=b[0],_=b[1],y=F8(C.useState(null),2),S=y[0],B=y[1],L=F8(C.useState(null),2),T=L[0],N=L[1],F=M.Children.toArray(u.children),A=F.find(function(Ee){return x$(Ee,RE.Logo)})||M.createElement(RE.Logo,null),z=F.find(function(Ee){return x$(Ee,RE.Toolbar)})||M.createElement(M.Fragment,null,M.createElement(y8,{onClick:h,label:"Prettify query (Shift-Ctrl-P)"},M.createElement(yRu,{className:"graphiql-toolbar-icon","aria-hidden":"true"})),M.createElement(y8,{onClick:d,label:"Merge fragments into query (Shift-Ctrl-M)"},M.createElement(vRu,{className:"graphiql-toolbar-icon","aria-hidden":"true"})),M.createElement(y8,{onClick:c,label:"Copy query (Shift-Ctrl-C)"},M.createElement(oRu,{className:"graphiql-toolbar-icon","aria-hidden":"true"})),(n=u.toolbar)===null||n===void 0?void 0:n.additionalContent),P=F.find(function(Ee){return x$(Ee,RE.Footer)}),I=C.useCallback(function(){p.hiddenElement==="first"&&p.setHiddenElement(null)},[p]),j=C.useCallback(function(){try{s==null||s.clear(),N("success")}catch{N("error")}},[s]),V=C.useCallback(function(Ee){r.setShouldPersistHeaders(Ee.currentTarget.dataset.value==="true")},[r]),H=C.useCallback(function(Ee){var ut=Ee.currentTarget.dataset.theme;m(ut||null)},[m]),q=r.addTab,J=o.introspect,Q=r.moveTab,X=C.useCallback(function(Ee){B(Ee.currentTarget.dataset.value)},[]),Y=C.useCallback(function(Ee){var ut=l,we=Number(Ee.currentTarget.dataset.index),Ge=ut.plugins.find(function(Ht,eu){return we===eu}),nt=Ge===ut.visiblePlugin;nt?(ut.setVisiblePlugin(null),p.setHiddenElement("first")):(ut.setVisiblePlugin(Ge),p.setHiddenElement(null))},[l,p]),le=C.useCallback(function(Ee){x.hiddenElement==="second"&&x.setHiddenElement(null),_(Ee.currentTarget.dataset.name)},[x]),he=C.useCallback(function(){x.setHiddenElement(x.hiddenElement==="second"?null:"second")},[x]),ze=C.useCallback(function(Ee){Ee||B(null)},[]),Ie=C.useCallback(function(Ee){Ee||(B(null),N(null))},[]),We=M.createElement(ko,{label:"Add tab"},M.createElement(ua,{type:"button",className:"graphiql-tab-add",onClick:q,"aria-label":"Add tab"},M.createElement(kRu,{"aria-hidden":"true"})));return M.createElement(ko.Provider,null,M.createElement("div",{"data-testid":"graphiql-container",className:"graphiql-container"},M.createElement("div",{className:"graphiql-sidebar"},M.createElement("div",{className:"graphiql-sidebar-section"},l==null?void 0:l.plugins.map(function(Ee,ut){var we=Ee===l.visiblePlugin,Ge="".concat(we?"Hide":"Show"," ").concat(Ee.title),nt=Ee.icon;return M.createElement(ko,{key:Ee.title,label:Ge},M.createElement(ua,{type:"button",className:we?"active":"",onClick:Y,"data-index":ut,"aria-label":Ge},M.createElement(nt,{"aria-hidden":"true"})))})),M.createElement("div",{className:"graphiql-sidebar-section"},M.createElement(ko,{label:"Re-fetch GraphQL schema"},M.createElement(ua,{type:"button",disabled:o.isFetching,onClick:J,"aria-label":"Re-fetch GraphQL schema"},M.createElement(FRu,{className:o.isFetching?"graphiql-spin":"","aria-hidden":"true"}))),M.createElement(ko,{label:"Open short keys dialog"},M.createElement(ua,{type:"button","data-value":"short-keys",onClick:X,"aria-label":"Open short keys dialog"},M.createElement(DRu,{"aria-hidden":"true"}))),M.createElement(ko,{label:"Open settings dialog"},M.createElement(ua,{type:"button","data-value":"settings",onClick:X,"aria-label":"Open settings dialog"},M.createElement(_Ru,{"aria-hidden":"true"}))))),M.createElement("div",{className:"graphiql-main"},M.createElement("div",{ref:p.firstRef,style:{minWidth:"200px"}},M.createElement("div",{className:"graphiql-plugin"},f?M.createElement(f,null):null)),(l==null?void 0:l.visiblePlugin)&&M.createElement("div",{className:"graphiql-horizontal-drag-bar",ref:p.dragBarRef}),M.createElement("div",{ref:p.secondRef,className:"graphiql-sessions"},M.createElement("div",{className:"graphiql-session-header"},M.createElement(JRe,{values:r.tabs,onReorder:Q,"aria-label":"Select active operation"},r.tabs.length>1&&M.createElement(M.Fragment,null,r.tabs.map(function(Ee,ut){return M.createElement(m$,{key:Ee.id,value:Ee,isActive:ut===r.activeTabIndex},M.createElement(m$.Button,{"aria-controls":"graphiql-session",id:"graphiql-session-tab-".concat(ut),onClick:function(){a.stop(),r.changeTab(ut)}},Ee.title),M.createElement(m$.Close,{onClick:function(){r.activeTabIndex===ut&&a.stop(),r.closeTab(ut)}}))}),We)),M.createElement("div",{className:"graphiql-session-header-right"},r.tabs.length===1&&We,A)),M.createElement("div",{role:"tabpanel",id:"graphiql-session",className:"graphiql-session","aria-labelledby":"graphiql-session-tab-".concat(r.activeTabIndex)},M.createElement("div",{ref:D.firstRef},M.createElement("div",{className:"graphiql-editors".concat(r.tabs.length===1?" full-height":"")},M.createElement("div",{ref:x.firstRef},M.createElement("section",{className:"graphiql-query-editor","aria-label":"Query Editor"},M.createElement(lie,{editorTheme:u.editorTheme,keyMap:u.keyMap,onClickReference:I,onCopyQuery:u.onCopyQuery,onEdit:u.onEditQuery,readOnly:u.readOnly}),M.createElement("div",{className:"graphiql-toolbar",role:"toolbar","aria-label":"Editor Commands"},M.createElement(ST,null),z))),M.createElement("div",{ref:x.dragBarRef},M.createElement("div",{className:"graphiql-editor-tools"},M.createElement(ua,{type:"button",className:k==="variables"&&x.hiddenElement!=="second"?"active":"",onClick:le,"data-name":"variables"},"Variables"),i&&M.createElement(ua,{type:"button",className:k==="headers"&&x.hiddenElement!=="second"?"active":"",onClick:le,"data-name":"headers"},"Headers"),M.createElement(ko,{label:x.hiddenElement==="second"?"Show editor tools":"Hide editor tools"},M.createElement(ua,{type:"button",onClick:he,"aria-label":x.hiddenElement==="second"?"Show editor tools":"Hide editor tools",className:"graphiql-toggle-editor-tools"},x.hiddenElement==="second"?M.createElement(aRu,{className:"graphiql-chevron-icon","aria-hidden":"true"}):M.createElement(iRu,{className:"graphiql-chevron-icon","aria-hidden":"true"}))))),M.createElement("div",{ref:x.secondRef},M.createElement("section",{className:"graphiql-editor-tool","aria-label":k==="variables"?"Variables":"Headers"},M.createElement(_T,{editorTheme:u.editorTheme,isHidden:k!=="variables",keyMap:u.keyMap,onEdit:u.onEditVariables,onClickReference:I,readOnly:u.readOnly}),i&&M.createElement(yT,{editorTheme:u.editorTheme,isHidden:k!=="headers",keyMap:u.keyMap,onEdit:u.onEditHeaders,readOnly:u.readOnly}))))),M.createElement("div",{className:"graphiql-horizontal-drag-bar",ref:D.dragBarRef}),M.createElement("div",{ref:D.secondRef},M.createElement("div",{className:"graphiql-response"},a.isFetching?M.createElement(Jne,null):null,M.createElement(cie,{editorTheme:u.editorTheme,responseTooltip:u.responseTooltip,keyMap:u.keyMap}),P))))),M.createElement(LD,{open:S==="short-keys",onOpenChange:ze},M.createElement("div",{className:"graphiql-dialog-header"},M.createElement(LD.Title,{className:"graphiql-dialog-title"},"Short Keys"),M.createElement(LD.Close,null)),M.createElement("div",{className:"graphiql-dialog-section"},M.createElement(JRu,{keyMap:u.keyMap||"sublime"}))),M.createElement(LD,{open:S==="settings",onOpenChange:Ie},M.createElement("div",{className:"graphiql-dialog-header"},M.createElement(LD.Title,{className:"graphiql-dialog-title"},"Settings"),M.createElement(LD.Close,null)),u.showPersistHeadersSettings?M.createElement("div",{className:"graphiql-dialog-section"},M.createElement("div",null,M.createElement("div",{className:"graphiql-dialog-section-title"},"Persist headers"),M.createElement("div",{className:"graphiql-dialog-section-caption"},"Save headers upon reloading."," ",M.createElement("span",{className:"graphiql-warning-text"},"Only enable if you trust this device."))),M.createElement(JZ,null,M.createElement(pc,{type:"button",id:"enable-persist-headers",className:r.shouldPersistHeaders?"active":"","data-value":"true",onClick:V},"On"),M.createElement(pc,{type:"button",id:"disable-persist-headers",className:r.shouldPersistHeaders?"":"active",onClick:V},"Off"))):null,M.createElement("div",{className:"graphiql-dialog-section"},M.createElement("div",null,M.createElement("div",{className:"graphiql-dialog-section-title"},"Theme"),M.createElement("div",{className:"graphiql-dialog-section-caption"},"Adjust how the interface looks like.")),M.createElement(JZ,null,M.createElement(pc,{type:"button",className:g===null?"active":"",onClick:H},"System"),M.createElement(pc,{type:"button",className:g==="light"?"active":"","data-theme":"light",onClick:H},"Light"),M.createElement(pc,{type:"button",className:g==="dark"?"active":"","data-theme":"dark",onClick:H},"Dark"))),s?M.createElement("div",{className:"graphiql-dialog-section"},M.createElement("div",null,M.createElement("div",{className:"graphiql-dialog-section-title"},"Clear storage"),M.createElement("div",{className:"graphiql-dialog-section-caption"},"Remove all locally stored data and start fresh.")),M.createElement(pc,{type:"button",state:T||void 0,disabled:T==="success",onClick:j},{success:"Cleared data",error:"Failed"}[T]||"Clear data")):null)))}var D$=typeof window<"u"&&window.navigator.platform.toLowerCase().indexOf("mac")===0?"Cmd":"Ctrl",qRu=Object.entries({"Search in editor":[D$,"F"],"Search in documentation":[D$,"K"],"Execute query":[D$,"Enter"],"Prettify editors":["Ctrl","Shift","P"],"Merge fragments definitions into operation definition":["Ctrl","Shift","M"],"Copy query":["Ctrl","Shift","C"],"Re-fetch schema using introspection":["Ctrl","Shift","R"]});function JRu(u){var e=u.keyMap;return M.createElement("div",null,M.createElement("table",{className:"graphiql-table"},M.createElement("thead",null,M.createElement("tr",null,M.createElement("th",null,"Short Key"),M.createElement("th",null,"Function"))),M.createElement("tbody",null,qRu.map(function(t){var n=F8(t,2),i=n[0],r=n[1];return M.createElement("tr",{key:i},M.createElement("td",null,r.map(function(a,o,s){return M.createElement(C.Fragment,{key:a},M.createElement("code",{className:"graphiql-key"},a),o!==s.length-1&&" + ")})),M.createElement("td",null,i))}))),M.createElement("p",null,"The editors use"," ",M.createElement("a",{href:"https://codemirror.net/5/doc/manual.html#keymaps",target:"_blank",rel:"noopener noreferrer"},"CodeMirror Key Maps")," ","that add more short keys. This instance of Graph",M.createElement("em",null,"i"),"QL uses"," ",M.createElement("code",null,e),"."))}function OIe(u){return M.createElement("div",{className:"graphiql-logo"},u.children||M.createElement("a",{className:"graphiql-logo-link",href:"https://github.com/graphql/graphiql",target:"_blank",rel:"noreferrer"},"Graph",M.createElement("em",null,"i"),"QL"))}OIe.displayName="GraphiQLLogo";function jIe(u){return M.createElement(M.Fragment,null,u.children)}jIe.displayName="GraphiQLToolbar";function VIe(u){return M.createElement("div",{className:"graphiql-footer"},u.children)}VIe.displayName="GraphiQLFooter";function x$(u,e){var t;return!((t=u==null?void 0:u.type)===null||t===void 0)&&t.displayName&&u.type.displayName===e.displayName?!0:u.type===e}/** * @remix-run/router v1.8.0 * diff --git a/assets/info.es-e3c7d590.js b/assets/info.es-76dbdced.js similarity index 94% rename from assets/info.es-e3c7d590.js rename to assets/info.es-76dbdced.js index cffc8fdd..7da631dd 100644 --- a/assets/info.es-e3c7d590.js +++ b/assets/info.es-76dbdced.js @@ -1 +1 @@ -import{C as g}from"./codemirror.es-52e8b92d.js";import{E as L,L as C,R as M,_ as x,G as V,O as l}from"./SchemaReference.es-a230cb05.js";import"./info-addon.es-c9b2027b.js";import"./codemirror.es2-5884f31a.js";import"./forEachState.es-b2033c2b.js";import{X as u,Y as f}from"./index-7e44875f.js";var k=Object.defineProperty,d=(r,e)=>k(r,"name",{value:e,configurable:!0});g.registerHelper("info","graphql",(r,e)=>{if(!e.schema||!r.state)return;const{kind:i,step:t}=r.state,n=L(e.schema,r.state);if(i==="Field"&&t===0&&n.fieldDef||i==="AliasedField"&&t===2&&n.fieldDef){const c=document.createElement("div");c.className="CodeMirror-info-header",v(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.fieldDef),o}if(i==="Directive"&&t===1&&n.directiveDef){const c=document.createElement("div");c.className="CodeMirror-info-header",D(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.directiveDef),o}if(i==="Argument"&&t===0&&n.argDef){const c=document.createElement("div");c.className="CodeMirror-info-header",y(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.argDef),o}if(i==="EnumValue"&&n.enumValue&&n.enumValue.description){const c=document.createElement("div");c.className="CodeMirror-info-header",N(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.enumValue),o}if(i==="NamedType"&&n.type&&n.type.description){const c=document.createElement("div");c.className="CodeMirror-info-header",m(c,n,e,n.type);const o=document.createElement("div");return o.append(c),p(o,e,n.type),o}});function v(r,e,i){E(r,e,i),s(r,e,i,e.type)}d(v,"renderField");function E(r,e,i){var t;const n=((t=e.fieldDef)===null||t===void 0?void 0:t.name)||"";a(r,n,"field-name",i,C(e))}d(E,"renderQualifiedField");function D(r,e,i){var t;const n="@"+(((t=e.directiveDef)===null||t===void 0?void 0:t.name)||"");a(r,n,"directive-name",i,M(e))}d(D,"renderDirective");function y(r,e,i){var t;const n=((t=e.argDef)===null||t===void 0?void 0:t.name)||"";a(r,n,"arg-name",i,x(e)),s(r,e,i,e.inputType)}d(y,"renderArg");function N(r,e,i){var t;const n=((t=e.enumValue)===null||t===void 0?void 0:t.name)||"";m(r,e,i,e.inputType),a(r,"."),a(r,n,"enum-value",i,V(e))}d(N,"renderEnumValue");function s(r,e,i,t){const n=document.createElement("span");n.className="type-name-pill",t instanceof u?(m(n,e,i,t.ofType),a(n,"!")):t instanceof f?(a(n,"["),m(n,e,i,t.ofType),a(n,"]")):a(n,(t==null?void 0:t.name)||"","type-name",i,l(e,t)),r.append(n)}d(s,"renderTypeAnnotation");function m(r,e,i,t){t instanceof u?(m(r,e,i,t.ofType),a(r,"!")):t instanceof f?(a(r,"["),m(r,e,i,t.ofType),a(r,"]")):a(r,(t==null?void 0:t.name)||"","type-name",i,l(e,t))}d(m,"renderType");function p(r,e,i){const{description:t}=i;if(t){const n=document.createElement("div");n.className="info-description",e.renderDescription?n.innerHTML=e.renderDescription(t):n.append(document.createTextNode(t)),r.append(n)}T(r,e,i)}d(p,"renderDescription");function T(r,e,i){const t=i.deprecationReason;if(t){const n=document.createElement("div");n.className="info-deprecation",r.append(n);const c=document.createElement("span");c.className="info-deprecation-label",c.append(document.createTextNode("Deprecated")),n.append(c);const o=document.createElement("div");o.className="info-deprecation-reason",e.renderDescription?o.innerHTML=e.renderDescription(t):o.append(document.createTextNode(t)),n.append(o)}}d(T,"renderDeprecation");function a(r,e,i="",t={onClick:null},n=null){if(i){const{onClick:c}=t;let o;c?(o=document.createElement("a"),o.href="javascript:void 0",o.addEventListener("click",h=>{c(n,h)})):o=document.createElement("span"),o.className=i,o.append(document.createTextNode(e)),r.append(o)}else r.append(document.createTextNode(e))}d(a,"text"); +import{C as g}from"./codemirror.es-52e8b92d.js";import{E as L,L as C,R as M,_ as x,G as V,O as l}from"./SchemaReference.es-db37d28c.js";import"./info-addon.es-c9b2027b.js";import"./codemirror.es2-5884f31a.js";import"./forEachState.es-b2033c2b.js";import{X as u,Y as f}from"./index-9671150e.js";var k=Object.defineProperty,d=(r,e)=>k(r,"name",{value:e,configurable:!0});g.registerHelper("info","graphql",(r,e)=>{if(!e.schema||!r.state)return;const{kind:i,step:t}=r.state,n=L(e.schema,r.state);if(i==="Field"&&t===0&&n.fieldDef||i==="AliasedField"&&t===2&&n.fieldDef){const c=document.createElement("div");c.className="CodeMirror-info-header",v(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.fieldDef),o}if(i==="Directive"&&t===1&&n.directiveDef){const c=document.createElement("div");c.className="CodeMirror-info-header",D(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.directiveDef),o}if(i==="Argument"&&t===0&&n.argDef){const c=document.createElement("div");c.className="CodeMirror-info-header",y(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.argDef),o}if(i==="EnumValue"&&n.enumValue&&n.enumValue.description){const c=document.createElement("div");c.className="CodeMirror-info-header",N(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.enumValue),o}if(i==="NamedType"&&n.type&&n.type.description){const c=document.createElement("div");c.className="CodeMirror-info-header",m(c,n,e,n.type);const o=document.createElement("div");return o.append(c),p(o,e,n.type),o}});function v(r,e,i){E(r,e,i),s(r,e,i,e.type)}d(v,"renderField");function E(r,e,i){var t;const n=((t=e.fieldDef)===null||t===void 0?void 0:t.name)||"";a(r,n,"field-name",i,C(e))}d(E,"renderQualifiedField");function D(r,e,i){var t;const n="@"+(((t=e.directiveDef)===null||t===void 0?void 0:t.name)||"");a(r,n,"directive-name",i,M(e))}d(D,"renderDirective");function y(r,e,i){var t;const n=((t=e.argDef)===null||t===void 0?void 0:t.name)||"";a(r,n,"arg-name",i,x(e)),s(r,e,i,e.inputType)}d(y,"renderArg");function N(r,e,i){var t;const n=((t=e.enumValue)===null||t===void 0?void 0:t.name)||"";m(r,e,i,e.inputType),a(r,"."),a(r,n,"enum-value",i,V(e))}d(N,"renderEnumValue");function s(r,e,i,t){const n=document.createElement("span");n.className="type-name-pill",t instanceof u?(m(n,e,i,t.ofType),a(n,"!")):t instanceof f?(a(n,"["),m(n,e,i,t.ofType),a(n,"]")):a(n,(t==null?void 0:t.name)||"","type-name",i,l(e,t)),r.append(n)}d(s,"renderTypeAnnotation");function m(r,e,i,t){t instanceof u?(m(r,e,i,t.ofType),a(r,"!")):t instanceof f?(a(r,"["),m(r,e,i,t.ofType),a(r,"]")):a(r,(t==null?void 0:t.name)||"","type-name",i,l(e,t))}d(m,"renderType");function p(r,e,i){const{description:t}=i;if(t){const n=document.createElement("div");n.className="info-description",e.renderDescription?n.innerHTML=e.renderDescription(t):n.append(document.createTextNode(t)),r.append(n)}T(r,e,i)}d(p,"renderDescription");function T(r,e,i){const t=i.deprecationReason;if(t){const n=document.createElement("div");n.className="info-deprecation",r.append(n);const c=document.createElement("span");c.className="info-deprecation-label",c.append(document.createTextNode("Deprecated")),n.append(c);const o=document.createElement("div");o.className="info-deprecation-reason",e.renderDescription?o.innerHTML=e.renderDescription(t):o.append(document.createTextNode(t)),n.append(o)}}d(T,"renderDeprecation");function a(r,e,i="",t={onClick:null},n=null){if(i){const{onClick:c}=t;let o;c?(o=document.createElement("a"),o.href="javascript:void 0",o.addEventListener("click",h=>{c(n,h)})):o=document.createElement("span"),o.className=i,o.append(document.createTextNode(e)),r.append(o)}else r.append(document.createTextNode(e))}d(a,"text"); diff --git a/assets/javascript-6a33dd26.js b/assets/javascript-2a7fa81e.js similarity index 89% rename from assets/javascript-6a33dd26.js rename to assets/javascript-2a7fa81e.js index 8644105d..3af66d10 100644 --- a/assets/javascript-6a33dd26.js +++ b/assets/javascript-2a7fa81e.js @@ -1,4 +1,4 @@ -import{conf as t,language as e}from"./typescript-69a62869.js";import"./index-7e44875f.js";/*!----------------------------------------------------------------------------- +import{conf as t,language as e}from"./typescript-d2a7c870.js";import"./index-9671150e.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) * Released under the MIT license diff --git a/assets/jsonMode-60663a8e.js b/assets/jsonMode-2a0c8d22.js similarity index 99% rename from assets/jsonMode-60663a8e.js rename to assets/jsonMode-2a0c8d22.js index 39424eab..caccd99d 100644 --- a/assets/jsonMode-60663a8e.js +++ b/assets/jsonMode-2a0c8d22.js @@ -1,4 +1,4 @@ -var Ge=Object.defineProperty;var Qe=(e,n,i)=>n in e?Ge(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var C=(e,n,i)=>(Qe(e,typeof n!="symbol"?n+"":n,i),i);import{m as Ze}from"./index-7e44875f.js";/*!----------------------------------------------------------------------------- +var Ge=Object.defineProperty;var Qe=(e,n,i)=>n in e?Ge(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var C=(e,n,i)=>(Qe(e,typeof n!="symbol"?n+"":n,i),i);import{m as Ze}from"./index-9671150e.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) * Released under the MIT license diff --git a/assets/jump.es-e2480f49.js b/assets/jump.es-c4a73c76.js similarity index 95% rename from assets/jump.es-e2480f49.js rename to assets/jump.es-c4a73c76.js index 4a688d1f..e8f8e58e 100644 --- a/assets/jump.es-e2480f49.js +++ b/assets/jump.es-c4a73c76.js @@ -1 +1 @@ -import{C as u}from"./codemirror.es-52e8b92d.js";import{E as g,L as M,R as k,_ as v,G as y,O}from"./SchemaReference.es-a230cb05.js";import"./codemirror.es2-5884f31a.js";import"./forEachState.es-b2033c2b.js";import"./index-7e44875f.js";var D=Object.defineProperty,s=(t,n)=>D(t,"name",{value:n,configurable:!0});u.defineOption("jump",!1,(t,n,i)=>{if(i&&i!==u.Init){const e=t.state.jump.onMouseOver;u.off(t.getWrapperElement(),"mouseover",e);const r=t.state.jump.onMouseOut;u.off(t.getWrapperElement(),"mouseout",r),u.off(document,"keydown",t.state.jump.onKeyDown),delete t.state.jump}if(n){const e=t.state.jump={options:n,onMouseOver:c.bind(null,t),onMouseOut:d.bind(null,t),onKeyDown:f.bind(null,t)};u.on(t.getWrapperElement(),"mouseover",e.onMouseOver),u.on(t.getWrapperElement(),"mouseout",e.onMouseOut),u.on(document,"keydown",e.onKeyDown)}});function c(t,n){const i=n.target||n.srcElement;if(!(i instanceof HTMLElement)||(i==null?void 0:i.nodeName)!=="SPAN")return;const e=i.getBoundingClientRect(),r={left:(e.left+e.right)/2,top:(e.top+e.bottom)/2};t.state.jump.cursor=r,t.state.jump.isHoldingModifier&&p(t)}s(c,"onMouseOver");function d(t){if(!t.state.jump.isHoldingModifier&&t.state.jump.cursor){t.state.jump.cursor=null;return}t.state.jump.isHoldingModifier&&t.state.jump.marker&&l(t)}s(d,"onMouseOut");function f(t,n){if(t.state.jump.isHoldingModifier||!j(n.key))return;t.state.jump.isHoldingModifier=!0,t.state.jump.cursor&&p(t);const i=s(o=>{o.code===n.code&&(t.state.jump.isHoldingModifier=!1,t.state.jump.marker&&l(t),u.off(document,"keyup",i),u.off(document,"click",e),t.off("mousedown",r))},"onKeyUp"),e=s(o=>{const{destination:a,options:m}=t.state.jump;a&&m.onClick(a,o)},"onClick"),r=s((o,a)=>{t.state.jump.destination&&(a.codemirrorIgnore=!0)},"onMouseDown");u.on(document,"keyup",i),u.on(document,"click",e),t.on("mousedown",r)}s(f,"onKeyDown");const w=typeof navigator<"u"&&navigator&&navigator.appVersion.includes("Mac");function j(t){return t===(w?"Meta":"Control")}s(j,"isJumpModifier");function p(t){if(t.state.jump.marker)return;const{cursor:n,options:i}=t.state.jump,e=t.coordsChar(n),r=t.getTokenAt(e,!0),o=i.getDestination||t.getHelper(e,"jump");if(o){const a=o(r,i,t);if(a){const m=t.markText({line:e.line,ch:r.start},{line:e.line,ch:r.end},{className:"CodeMirror-jump-token"});t.state.jump.marker=m,t.state.jump.destination=a}}}s(p,"enableJumpMode");function l(t){const{marker:n}=t.state.jump;t.state.jump.marker=null,t.state.jump.destination=null,n.clear()}s(l,"disableJumpMode");u.registerHelper("jump","graphql",(t,n)=>{if(!n.schema||!n.onClick||!t.state)return;const{state:i}=t,{kind:e,step:r}=i,o=g(n.schema,i);if(e==="Field"&&r===0&&o.fieldDef||e==="AliasedField"&&r===2&&o.fieldDef)return M(o);if(e==="Directive"&&r===1&&o.directiveDef)return k(o);if(e==="Argument"&&r===0&&o.argDef)return v(o);if(e==="EnumValue"&&o.enumValue)return y(o);if(e==="NamedType"&&o.type)return O(o)}); +import{C as u}from"./codemirror.es-52e8b92d.js";import{E as g,L as M,R as k,_ as v,G as y,O}from"./SchemaReference.es-db37d28c.js";import"./codemirror.es2-5884f31a.js";import"./forEachState.es-b2033c2b.js";import"./index-9671150e.js";var D=Object.defineProperty,s=(t,n)=>D(t,"name",{value:n,configurable:!0});u.defineOption("jump",!1,(t,n,i)=>{if(i&&i!==u.Init){const e=t.state.jump.onMouseOver;u.off(t.getWrapperElement(),"mouseover",e);const r=t.state.jump.onMouseOut;u.off(t.getWrapperElement(),"mouseout",r),u.off(document,"keydown",t.state.jump.onKeyDown),delete t.state.jump}if(n){const e=t.state.jump={options:n,onMouseOver:c.bind(null,t),onMouseOut:d.bind(null,t),onKeyDown:f.bind(null,t)};u.on(t.getWrapperElement(),"mouseover",e.onMouseOver),u.on(t.getWrapperElement(),"mouseout",e.onMouseOut),u.on(document,"keydown",e.onKeyDown)}});function c(t,n){const i=n.target||n.srcElement;if(!(i instanceof HTMLElement)||(i==null?void 0:i.nodeName)!=="SPAN")return;const e=i.getBoundingClientRect(),r={left:(e.left+e.right)/2,top:(e.top+e.bottom)/2};t.state.jump.cursor=r,t.state.jump.isHoldingModifier&&p(t)}s(c,"onMouseOver");function d(t){if(!t.state.jump.isHoldingModifier&&t.state.jump.cursor){t.state.jump.cursor=null;return}t.state.jump.isHoldingModifier&&t.state.jump.marker&&l(t)}s(d,"onMouseOut");function f(t,n){if(t.state.jump.isHoldingModifier||!j(n.key))return;t.state.jump.isHoldingModifier=!0,t.state.jump.cursor&&p(t);const i=s(o=>{o.code===n.code&&(t.state.jump.isHoldingModifier=!1,t.state.jump.marker&&l(t),u.off(document,"keyup",i),u.off(document,"click",e),t.off("mousedown",r))},"onKeyUp"),e=s(o=>{const{destination:a,options:m}=t.state.jump;a&&m.onClick(a,o)},"onClick"),r=s((o,a)=>{t.state.jump.destination&&(a.codemirrorIgnore=!0)},"onMouseDown");u.on(document,"keyup",i),u.on(document,"click",e),t.on("mousedown",r)}s(f,"onKeyDown");const w=typeof navigator<"u"&&navigator&&navigator.appVersion.includes("Mac");function j(t){return t===(w?"Meta":"Control")}s(j,"isJumpModifier");function p(t){if(t.state.jump.marker)return;const{cursor:n,options:i}=t.state.jump,e=t.coordsChar(n),r=t.getTokenAt(e,!0),o=i.getDestination||t.getHelper(e,"jump");if(o){const a=o(r,i,t);if(a){const m=t.markText({line:e.line,ch:r.start},{line:e.line,ch:r.end},{className:"CodeMirror-jump-token"});t.state.jump.marker=m,t.state.jump.destination=a}}}s(p,"enableJumpMode");function l(t){const{marker:n}=t.state.jump;t.state.jump.marker=null,t.state.jump.destination=null,n.clear()}s(l,"disableJumpMode");u.registerHelper("jump","graphql",(t,n)=>{if(!n.schema||!n.onClick||!t.state)return;const{state:i}=t,{kind:e,step:r}=i,o=g(n.schema,i);if(e==="Field"&&r===0&&o.fieldDef||e==="AliasedField"&&r===2&&o.fieldDef)return M(o);if(e==="Directive"&&r===1&&o.directiveDef)return k(o);if(e==="Argument"&&r===0&&o.argDef)return v(o);if(e==="EnumValue"&&o.enumValue)return y(o);if(e==="NamedType"&&o.type)return O(o)}); diff --git a/assets/lint.es2-285cd615.js b/assets/lint.es2-285cd615.js new file mode 100644 index 00000000..09f71323 --- /dev/null +++ b/assets/lint.es2-285cd615.js @@ -0,0 +1,6 @@ +import{C as q}from"./codemirror.es-52e8b92d.js";import{K as u,G as p,d as _,i as ue,a as S,n as fe,b as w,s as F,c as h,e as R,p as v,f as X,h as y,j as T,D as E,O as G,k as Ae,l as Pe,o as O,q as P,r as I,u as k,v as te,w as ke,x as Ue,y as de,z as $,A as pe,B as U,C as Ve,E as je,F as Le,H as Me,I as Ye,J as Xe,L as Be,M as re,T as me,N as ge,P as Te,Q as qe,R as Ge,S as Je,U as Qe,V as He,W as Ke}from"./index-9671150e.js";import{R as Ee,P as V}from"./Range-52ddcb6a.js";import"./codemirror.es2-5884f31a.js";function We(e){return e.kind===u.OPERATION_DEFINITION||e.kind===u.FRAGMENT_DEFINITION}function ze(e){return e.kind===u.SCHEMA_DEFINITION||B(e)||e.kind===u.DIRECTIVE_DEFINITION}function B(e){return e.kind===u.SCALAR_TYPE_DEFINITION||e.kind===u.OBJECT_TYPE_DEFINITION||e.kind===u.INTERFACE_TYPE_DEFINITION||e.kind===u.UNION_TYPE_DEFINITION||e.kind===u.ENUM_TYPE_DEFINITION||e.kind===u.INPUT_OBJECT_TYPE_DEFINITION}function Ze(e){return e.kind===u.SCHEMA_EXTENSION||Ne(e)}function Ne(e){return e.kind===u.SCALAR_TYPE_EXTENSION||e.kind===u.OBJECT_TYPE_EXTENSION||e.kind===u.INTERFACE_TYPE_EXTENSION||e.kind===u.UNION_TYPE_EXTENSION||e.kind===u.ENUM_TYPE_EXTENSION||e.kind===u.INPUT_OBJECT_TYPE_EXTENSION}function ve(e){return{Document(t){for(const n of t.definitions)if(!We(n)){const r=n.kind===u.SCHEMA_DEFINITION||n.kind===u.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new p(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}function xe(e){return{Field(t){const n=e.getParentType();if(n&&!e.getFieldDef()){const i=e.getSchema(),s=t.name.value;let a=_("to use an inline fragment on",en(i,n,s));a===""&&(a=_(nn(n,s))),e.reportError(new p(`Cannot query field "${s}" on type "${n.name}".`+a,{nodes:t}))}}}}function en(e,t,n){if(!ue(t))return[];const r=new Set,i=Object.create(null);for(const a of e.getPossibleTypes(t))if(a.getFields()[n]){r.add(a),i[a.name]=1;for(const o of a.getInterfaces()){var s;o.getFields()[n]&&(r.add(o),i[o.name]=((s=i[o.name])!==null&&s!==void 0?s:0)+1)}}return[...r].sort((a,o)=>{const l=i[o.name]-i[a.name];return l!==0?l:S(a)&&e.isSubType(a,o)?-1:S(o)&&e.isSubType(o,a)?1:fe(a.name,o.name)}).map(a=>a.name)}function nn(e,t){if(w(e)||S(e)){const n=Object.keys(e.getFields());return F(t,n)}return[]}function tn(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const r=h(e.getSchema(),n);if(r&&!R(r)){const i=v(n);e.reportError(new p(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){const n=h(e.getSchema(),t.typeCondition);if(n&&!R(n)){const r=v(t.typeCondition);e.reportError(new p(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}function rn(e){return{...sn(e),Argument(t){const n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){const s=t.name.value,a=r.args.map(l=>l.name),o=F(s,a);e.reportError(new p(`Unknown argument "${s}" on field "${i.name}.${r.name}".`+_(o),{nodes:t}))}}}}function sn(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():X;for(const a of r)t[a.name]=a.args.map(o=>o.name);const i=e.getDocument().definitions;for(const a of i)if(a.kind===u.DIRECTIVE_DEFINITION){var s;const o=(s=a.arguments)!==null&&s!==void 0?s:[];t[a.name.value]=o.map(l=>l.name.value)}return{Directive(a){const o=a.name.value,l=t[o];if(a.arguments&&l)for(const c of a.arguments){const f=c.name.value;if(!l.includes(f)){const d=F(f,l);e.reportError(new p(`Unknown argument "${f}" on directive "@${o}".`+_(d),{nodes:c}))}}return!1}}}function ye(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():X;for(const s of r)t[s.name]=s.locations;const i=e.getDocument().definitions;for(const s of i)s.kind===u.DIRECTIVE_DEFINITION&&(t[s.name.value]=s.locations.map(a=>a.value));return{Directive(s,a,o,l,c){const f=s.name.value,d=t[f];if(!d){e.reportError(new p(`Unknown directive "@${f}".`,{nodes:s}));return}const m=on(c);m&&!d.includes(m)&&e.reportError(new p(`Directive "@${f}" may not be used on ${m}.`,{nodes:s}))}}}function on(e){const t=e[e.length-1];switch("kind"in t||y(!1),t.kind){case u.OPERATION_DEFINITION:return an(t.operation);case u.FIELD:return E.FIELD;case u.FRAGMENT_SPREAD:return E.FRAGMENT_SPREAD;case u.INLINE_FRAGMENT:return E.INLINE_FRAGMENT;case u.FRAGMENT_DEFINITION:return E.FRAGMENT_DEFINITION;case u.VARIABLE_DEFINITION:return E.VARIABLE_DEFINITION;case u.SCHEMA_DEFINITION:case u.SCHEMA_EXTENSION:return E.SCHEMA;case u.SCALAR_TYPE_DEFINITION:case u.SCALAR_TYPE_EXTENSION:return E.SCALAR;case u.OBJECT_TYPE_DEFINITION:case u.OBJECT_TYPE_EXTENSION:return E.OBJECT;case u.FIELD_DEFINITION:return E.FIELD_DEFINITION;case u.INTERFACE_TYPE_DEFINITION:case u.INTERFACE_TYPE_EXTENSION:return E.INTERFACE;case u.UNION_TYPE_DEFINITION:case u.UNION_TYPE_EXTENSION:return E.UNION;case u.ENUM_TYPE_DEFINITION:case u.ENUM_TYPE_EXTENSION:return E.ENUM;case u.ENUM_VALUE_DEFINITION:return E.ENUM_VALUE;case u.INPUT_OBJECT_TYPE_DEFINITION:case u.INPUT_OBJECT_TYPE_EXTENSION:return E.INPUT_OBJECT;case u.INPUT_VALUE_DEFINITION:{const n=e[e.length-3];return"kind"in n||y(!1),n.kind===u.INPUT_OBJECT_TYPE_DEFINITION?E.INPUT_FIELD_DEFINITION:E.ARGUMENT_DEFINITION}default:y(!1,"Unexpected kind: "+T(t.kind))}}function an(e){switch(e){case G.QUERY:return E.QUERY;case G.MUTATION:return E.MUTATION;case G.SUBSCRIPTION:return E.SUBSCRIPTION}}function Ie(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new p(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function he(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(const s of e.getDocument().definitions)B(s)&&(r[s.name.value]=!0);const i=[...Object.keys(n),...Object.keys(r)];return{NamedType(s,a,o,l,c){const f=s.name.value;if(!n[f]&&!r[f]){var d;const m=(d=c[2])!==null&&d!==void 0?d:o,g=m!=null&&ln(m);if(g&&ie.includes(f))return;const N=F(f,g?ie.concat(i):i);e.reportError(new p(`Unknown type "${f}".`+_(N),{nodes:s}))}}}}const ie=[...Ae,...Pe].map(e=>e.name);function ln(e){return"kind"in e&&(ze(e)||Ze(e))}function cn(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===u.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new p("This anonymous operation must be the only defined operation.",{nodes:n}))}}}function un(e){var t,n,r;const i=e.getSchema(),s=(t=(n=(r=i==null?void 0:i.astNode)!==null&&r!==void 0?r:i==null?void 0:i.getQueryType())!==null&&n!==void 0?n:i==null?void 0:i.getMutationType())!==null&&t!==void 0?t:i==null?void 0:i.getSubscriptionType();let a=0;return{SchemaDefinition(o){if(s){e.reportError(new p("Cannot define a new schema within a schema extension.",{nodes:o}));return}a>0&&e.reportError(new p("Must provide only one schema definition.",{nodes:o})),++a}}}function fn(e){const t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(s){return i(s),!1}};function i(s){if(t[s.name.value])return;const a=s.name.value;t[a]=!0;const o=e.getFragmentSpreads(s.selectionSet);if(o.length!==0){r[a]=n.length;for(const l of o){const c=l.name.value,f=r[c];if(n.push(l),f===void 0){const d=e.getFragment(c);d&&i(d)}else{const d=n.slice(f),m=d.slice(0,-1).map(g=>'"'+g.name.value+'"').join(", ");e.reportError(new p(`Cannot spread fragment "${c}" within itself`+(m!==""?` via ${m}.`:"."),{nodes:d}))}n.pop()}r[a]=void 0}}}function dn(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i}of r){const s=i.name.value;t[s]!==!0&&e.reportError(new p(n.name?`Variable "$${s}" is not defined by operation "${n.name.value}".`:`Variable "$${s}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}function Oe(e){const t=[],n=[];return{OperationDefinition(r){return t.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){const r=Object.create(null);for(const i of t)for(const s of e.getRecursivelyReferencedFragments(i))r[s.name.value]=!0;for(const i of n){const s=i.name.value;r[s]!==!0&&e.reportError(new p(`Fragment "${s}" is never used.`,{nodes:i}))}}}}}function pn(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){const r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(const{node:s}of i)r[s.name.value]=!0;for(const s of t){const a=s.variable.name.value;r[a]!==!0&&e.reportError(new p(n.name?`Variable "$${a}" is never used in operation "${n.name.value}".`:`Variable "$${a}" is never used.`,{nodes:s}))}}},VariableDefinition(n){t.push(n)}}}function z(e){switch(e.kind){case u.OBJECT:return{...e,fields:mn(e.fields)};case u.LIST:return{...e,values:e.values.map(z)};case u.INT:case u.FLOAT:case u.STRING:case u.BOOLEAN:case u.NULL:case u.ENUM:case u.VARIABLE:return e}}function mn(e){return e.map(t=>({...t,value:z(t.value)})).sort((t,n)=>fe(t.name.value,n.name.value))}function De(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+De(n)).join(" and "):e}function gn(e){const t=new In,n=new Map;return{SelectionSet(r){const i=Tn(e,n,t,e.getParentType(),r);for(const[[s,a],o,l]of i){const c=De(a);e.reportError(new p(`Fields "${s}" conflict because ${c}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:o.concat(l)}))}}}}function Tn(e,t,n,r,i){const s=[],[a,o]=M(e,t,r,i);if(Nn(e,s,t,n,a),o.length!==0)for(let l=0;l1)for(let o=0;o[s.value,a]));return n.every(s=>{const a=s.value,o=i.get(s.name.value);return o===void 0?!1:se(a)===se(o)})}function se(e){return v(z(e))}function Q(e,t){return P(e)?P(t)?Q(e.ofType,t.ofType):!0:P(t)?!0:I(e)?I(t)?Q(e.ofType,t.ofType):!0:I(t)?!0:k(e)||k(t)?e!==t:!1}function M(e,t,n,r){const i=t.get(r);if(i)return i;const s=Object.create(null),a=Object.create(null);be(e,n,r,s,a);const o=[s,Object.keys(a)];return t.set(r,o),o}function H(e,t,n){const r=t.get(n.selectionSet);if(r)return r;const i=h(e.getSchema(),n.typeCondition);return M(e,t,i,n.selectionSet)}function be(e,t,n,r,i){for(const s of n.selections)switch(s.kind){case u.FIELD:{const a=s.name.value;let o;(w(t)||S(t))&&(o=t.getFields()[a]);const l=s.alias?s.alias.value:a;r[l]||(r[l]=[]),r[l].push([t,s,o]);break}case u.FRAGMENT_SPREAD:i[s.name.value]=!0;break;case u.INLINE_FRAGMENT:{const a=s.typeCondition,o=a?h(e.getSchema(),a):t;be(e,o,s.selectionSet,r,i);break}}}function yn(e,t,n,r){if(e.length>0)return[[t,e.map(([i])=>i)],[n,...e.map(([,i])=>i).flat()],[r,...e.map(([,,i])=>i).flat()]]}class In{constructor(){this._data=new Map}has(t,n,r){var i;const[s,a]=ts.name.value));for(const s of r.args)if(!i.has(s.name)&&pe(s)){const a=T(s.type);e.reportError(new p(`Field "${r.name}" argument "${s.name}" of type "${a}" is required, but it was not provided.`,{nodes:t}))}}}}}function Fn(e){var t;const n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:X;for(const o of i)n[o.name]=U(o.args.filter(pe),l=>l.name);const s=e.getDocument().definitions;for(const o of s)if(o.kind===u.DIRECTIVE_DEFINITION){var a;const l=(a=o.arguments)!==null&&a!==void 0?a:[];n[o.name.value]=U(l.filter(Rn),c=>c.name.value)}return{Directive:{leave(o){const l=o.name.value,c=n[l];if(c){var f;const d=(f=o.arguments)!==null&&f!==void 0?f:[],m=new Set(d.map(g=>g.name.value));for(const[g,N]of Object.entries(c))if(!m.has(g)){const b=Ve(N.type)?T(N.type):v(N.type);e.reportError(new p(`Directive "@${l}" argument "${g}" of type "${b}" is required, but it was not provided.`,{nodes:o}))}}}}}}function Rn(e){return e.type.kind===u.NON_NULL_TYPE&&e.defaultValue==null}function $n(e){return{Field(t){const n=e.getType(),r=t.selectionSet;if(n){if(k(O(n))){if(r){const i=t.name.value,s=T(n);e.reportError(new p(`Field "${i}" must not have a selection since type "${s}" has no subfields.`,{nodes:r}))}}else if(!r){const i=t.name.value,s=T(n);e.reportError(new p(`Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}function Cn(e,t,n){var r;const i={},s=(r=t.arguments)!==null&&r!==void 0?r:[],a=U(s,o=>o.name.value);for(const o of e.args){const l=o.name,c=o.type,f=a[l];if(!f){if(o.defaultValue!==void 0)i[l]=o.defaultValue;else if(I(c))throw new p(`Argument "${l}" of required type "${T(c)}" was not provided.`,{nodes:t});continue}const d=f.value;let m=d.kind===u.NULL;if(d.kind===u.VARIABLE){const N=d.name.value;if(n==null||!An(n,N)){if(o.defaultValue!==void 0)i[l]=o.defaultValue;else if(I(c))throw new p(`Argument "${l}" of required type "${T(c)}" was provided the variable "$${N}" which was not provided a runtime value.`,{nodes:d});continue}m=n[N]==null}if(m&&I(c))throw new p(`Argument "${l}" of non-null type "${T(c)}" must not be null.`,{nodes:d});const g=je(d,c,n);if(g===void 0)throw new p(`Argument "${l}" has invalid value ${v(d)}.`,{nodes:d});i[l]=g}return i}function oe(e,t,n){var r;const i=(r=t.directives)===null||r===void 0?void 0:r.find(s=>s.name.value===e.name);if(i)return Cn(e,i,n)}function An(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Pn(e,t,n,r,i){const s=new Map;return K(e,t,n,r,i,s,new Set),s}function K(e,t,n,r,i,s,a){for(const o of i.selections)switch(o.kind){case u.FIELD:{if(!J(n,o))continue;const l=kn(o),c=s.get(l);c!==void 0?c.push(o):s.set(l,[o]);break}case u.INLINE_FRAGMENT:{if(!J(n,o)||!ae(e,o,r))continue;K(e,t,n,r,o.selectionSet,s,a);break}case u.FRAGMENT_SPREAD:{const l=o.name.value;if(a.has(l)||!J(n,o))continue;a.add(l);const c=t[l];if(!c||!ae(e,c,r))continue;K(e,t,n,r,c.selectionSet,s,a);break}}}function J(e,t){const n=oe(Le,t,e);if((n==null?void 0:n.if)===!0)return!1;const r=oe(Me,t,e);return(r==null?void 0:r.if)!==!1}function ae(e,t,n){const r=t.typeCondition;if(!r)return!0;const i=h(e,r);return i===n?!0:ue(i)?e.isSubType(i,n):!1}function kn(e){return e.alias?e.alias.value:e.name.value}function Un(e){return{OperationDefinition(t){if(t.operation==="subscription"){const n=e.getSchema(),r=n.getSubscriptionType();if(r){const i=t.name?t.name.value:null,s=Object.create(null),a=e.getDocument(),o=Object.create(null);for(const c of a.definitions)c.kind===u.FRAGMENT_DEFINITION&&(o[c.name.value]=c);const l=Pn(n,o,s,r,t.selectionSet);if(l.size>1){const d=[...l.values()].slice(1).flat();e.reportError(new p(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:d}))}for(const c of l.values())c[0].name.value.startsWith("__")&&e.reportError(new p(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:c}))}}}}}function Se(e,t){const n=new Map;for(const r of e){const i=t(r),s=n.get(i);s===void 0?n.set(i,[r]):s.push(r)}return n}function we(e){return{Field:t,Directive:t};function t(n){var r;const i=(r=n.arguments)!==null&&r!==void 0?r:[],s=Se(i,a=>a.name.value);for(const[a,o]of s)o.length>1&&e.reportError(new p(`There can be only one argument named "${a}".`,{nodes:o.map(l=>l.name)}))}}function Vn(e){const t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){const i=r.name.value;if(n!=null&&n.getDirective(i)){e.reportError(new p(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new p(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}function Fe(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():X;for(const o of r)t[o.name]=!o.isRepeatable;const i=e.getDocument().definitions;for(const o of i)o.kind===u.DIRECTIVE_DEFINITION&&(t[o.name.value]=!o.repeatable);const s=Object.create(null),a=Object.create(null);return{enter(o){if(!("directives"in o)||!o.directives)return;let l;if(o.kind===u.SCHEMA_DEFINITION||o.kind===u.SCHEMA_EXTENSION)l=s;else if(B(o)||Ne(o)){const c=o.name.value;l=a[c],l===void 0&&(a[c]=l=Object.create(null))}else l=Object.create(null);for(const c of o.directives){const f=c.name.value;t[f]&&(l[f]?e.reportError(new p(`The directive "@${f}" can only be used once at this location.`,{nodes:[l[f],c]})):l[f]=c)}}}}function jn(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(s){var a;const o=s.name.value;r[o]||(r[o]=Object.create(null));const l=(a=s.values)!==null&&a!==void 0?a:[],c=r[o];for(const f of l){const d=f.name.value,m=n[o];de(m)&&m.getValue(d)?e.reportError(new p(`Enum value "${o}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):c[d]?e.reportError(new p(`Enum value "${o}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function Ln(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(s){var a;const o=s.name.value;r[o]||(r[o]=Object.create(null));const l=(a=s.fields)!==null&&a!==void 0?a:[],c=r[o];for(const f of l){const d=f.name.value;Mn(n[o],d)?e.reportError(new p(`Field "${o}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):c[d]?e.reportError(new p(`Field "${o}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function Mn(e,t){return w(e)||S(e)||$(e)?e.getFields()[t]!=null:!1}function Yn(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){const r=n.name.value;return t[r]?e.reportError(new p(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}function Re(e){const t=[];let n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){const r=t.pop();r||y(!1),n=r}},ObjectField(r){const i=r.name.value;n[i]?e.reportError(new p(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}function Xn(e){const t=Object.create(null);return{OperationDefinition(n){const r=n.name;return r&&(t[r.value]?e.reportError(new p(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}function Bn(e){const t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(s){var a;const o=(a=s.operationTypes)!==null&&a!==void 0?a:[];for(const l of o){const c=l.operation,f=n[c];r[c]?e.reportError(new p(`Type for ${c} already defined in the schema. It cannot be redefined.`,{nodes:l})):f?e.reportError(new p(`There can be only one ${c} type in schema.`,{nodes:[f,l]})):n[c]=l}return!1}}function qn(e){const t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){const s=i.name.value;if(n!=null&&n.getType(s)){e.reportError(new p(`Type "${s}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[s]?e.reportError(new p(`There can be only one type named "${s}".`,{nodes:[t[s],i.name]})):t[s]=i.name,!1}}function Gn(e){return{OperationDefinition(t){var n;const r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=Se(r,s=>s.variable.name.value);for(const[s,a]of i)a.length>1&&e.reportError(new p(`There can be only one variable named "$${s}".`,{nodes:a.map(o=>o.variable.name)}))}}}function Jn(e){return{ListValue(t){const n=Ye(e.getParentInputType());if(!P(n))return D(e,t),!1},ObjectValue(t){const n=O(e.getInputType());if(!$(n))return D(e,t),!1;const r=U(t.fields,i=>i.name.value);for(const i of Object.values(n.getFields()))if(!r[i.name]&&Xe(i)){const a=T(i.type);e.reportError(new p(`Field "${n.name}.${i.name}" of required type "${a}" was not provided.`,{nodes:t}))}},ObjectField(t){const n=O(e.getParentInputType());if(!e.getInputType()&&$(n)){const i=F(t.name.value,Object.keys(n.getFields()));e.reportError(new p(`Field "${t.name.value}" is not defined by type "${n.name}".`+_(i),{nodes:t}))}},NullValue(t){const n=e.getInputType();I(n)&&e.reportError(new p(`Expected value of type "${T(n)}", found ${v(t)}.`,{nodes:t}))},EnumValue:t=>D(e,t),IntValue:t=>D(e,t),FloatValue:t=>D(e,t),StringValue:t=>D(e,t),BooleanValue:t=>D(e,t)}}function D(e,t){const n=e.getInputType();if(!n)return;const r=O(n);if(!k(r)){const i=T(n);e.reportError(new p(`Expected value of type "${i}", found ${v(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){const s=T(n);e.reportError(new p(`Expected value of type "${s}", found ${v(t)}.`,{nodes:t}))}}catch(i){const s=T(n);i instanceof p?e.reportError(i):e.reportError(new p(`Expected value of type "${s}", found ${v(t)}; `+i.message,{nodes:t,originalError:i}))}}function Qn(e){return{VariableDefinition(t){const n=h(e.getSchema(),t.type);if(n!==void 0&&!Be(n)){const r=t.variable.name.value,i=v(t.type);e.reportError(new p(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}function Hn(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i,type:s,defaultValue:a}of r){const o=i.name.value,l=t[o];if(l&&s){const c=e.getSchema(),f=h(c,l.type);if(f&&!Kn(c,f,l.defaultValue,s,a)){const d=T(f),m=T(s);e.reportError(new p(`Variable "$${o}" of type "${d}" used in position expecting type "${m}".`,{nodes:[l,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function Kn(e,t,n,r,i){if(I(r)&&!I(t)){if(!(n!=null&&n.kind!==u.NULL)&&!(i!==void 0))return!1;const o=r.ofType;return re(e,t,o)}return re(e,t,r)}const $e=Object.freeze([ve,Xn,cn,Un,he,tn,Qn,$n,xe,Yn,Ie,Oe,hn,fn,Gn,dn,pn,ye,Fe,rn,we,Jn,wn,Hn,gn,Re]);class Wn{constructor(t,n){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(const r of this.getDocument().definitions)r.kind===u.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];const r=[t];let i;for(;i=r.pop();)for(const s of i.selections)s.kind===u.FRAGMENT_SPREAD?n.push(s):s.selectionSet&&r.push(s.selectionSet);this._fragmentSpreads.set(t,n)}return n}getRecursivelyReferencedFragments(t){let n=this._recursivelyReferencedFragments.get(t);if(!n){n=[];const r=Object.create(null),i=[t.selectionSet];let s;for(;s=i.pop();)for(const a of this.getFragmentSpreads(s)){const o=a.name.value;if(r[o]!==!0){r[o]=!0;const l=this.getFragment(o);l&&(n.push(l),i.push(l.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}}class zn extends Wn{constructor(t,n,r,i){super(n,i),this._schema=t,this._typeInfo=r,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let n=this._variableUsages.get(t);if(!n){const r=[],i=new me(this._schema);ge(t,Te(i,{VariableDefinition:()=>!1,Variable(s){r.push({node:s,type:i.getInputType(),defaultValue:i.getDefaultValue()})}})),n=r,this._variableUsages.set(t,n)}return n}getRecursiveVariableUsages(t){let n=this._recursiveVariableUsages.get(t);if(!n){n=this.getVariableUsages(t);for(const r of this.getRecursivelyReferencedFragments(t))n=n.concat(this.getVariableUsages(r));this._recursiveVariableUsages.set(t,n)}return n}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function Ce(e,t,n=$e,r,i=new me(e)){var s;const a=(s=r==null?void 0:r.maxErrors)!==null&&s!==void 0?s:100;t||qe(!1,"Must provide document."),Ge(e);const o=Object.freeze({}),l=[],c=new zn(e,t,i,d=>{if(l.length>=a)throw l.push(new p("Too many validation errors, error limit reached. Validation aborted.")),o;l.push(d)}),f=Je(n.map(d=>d(c)));try{ge(t,Te(i,f))}catch(d){if(d!==o)throw d}return l}function Zn(e){return{Field(t){const n=e.getFieldDef(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=e.getParentType();i!=null||y(!1),e.reportError(new p(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){const n=e.getArgument(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=e.getDirective();if(i!=null)e.reportError(new p(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{const s=e.getParentType(),a=e.getFieldDef();s!=null&&a!=null||y(!1),e.reportError(new p(`Field "${s.name}.${a.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){const n=O(e.getParentInputType());if($(n)){const r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new p(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){const n=e.getEnumValue(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=O(e.getInputType());i!=null||y(!1),e.reportError(new p(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}const xn=[un,Bn,qn,jn,Ln,Vn,he,ye,Fe,Dn,we,Re];function et(e,t,n,r,i){const s=$e.filter(o=>!(o===Oe||o===ve||r&&o===Ie));return n&&Array.prototype.push.apply(s,n),i&&Array.prototype.push.apply(s,xn),Ce(e,t,s).filter(o=>{if(o.message.includes("Unknown directive")&&o.nodes){const l=o.nodes[0];if(l&&l.kind===u.DIRECTIVE){const c=l.name.value;if(c==="arguments"||c==="argumentDefinitions")return!1}}return!0})}const A={Error:"Error",Warning:"Warning",Information:"Information",Hint:"Hint"},W={[A.Error]:1,[A.Warning]:2,[A.Information]:3,[A.Hint]:4},Y=(e,t)=>{if(!e)throw new Error(t)};function nt(e,t=null,n,r,i){var s,a;let o=null,l="";i&&(l=typeof i=="string"?i:i.reduce((f,d)=>f+v(d)+` + +`,""));const c=l?`${e} + +${l}`:e;try{o=Qe(c)}catch(f){if(f instanceof p){const d=rt((a=(s=f.locations)===null||s===void 0?void 0:s[0])!==null&&a!==void 0?a:{line:0,column:0},c);return[{severity:W.Error,message:f.message,source:"GraphQL: Syntax",range:d}]}throw f}return tt(o,t,n,r)}function tt(e,t=null,n,r){if(!t)return[];const i=et(t,e,n,r).flatMap(a=>le(a,W.Error,"Validation")),s=Ce(t,e,[Zn]).flatMap(a=>le(a,W.Warning,"Deprecation"));return i.concat(s)}function le(e,t,n){if(!e.nodes)return[];const r=[];for(const[i,s]of e.nodes.entries()){const a=s.kind!=="Variable"&&"name"in s&&s.name!==void 0?s.name:"variable"in s&&s.variable!==void 0?s.variable:s;if(a){Y(e.locations,"GraphQL validation error requires locations.");const o=e.locations[i],l=it(a),c=o.column+(l.end-l.start);r.push({source:`GraphQL: ${n}`,message:e.message,severity:t,range:new Ee(new V(o.line-1,o.column-1),new V(o.line-1,c))})}}return r}function rt(e,t){const n=Ke(),r=n.startState(),i=t.split(` +`);Y(i.length>=e.line,"Query text must have more lines than where the error happened");let s=null;for(let c=0;c{const{schema:n,validationRules:r,externalFragments:i}=t;return nt(e,n,r,void 0,i).map(s=>({message:s.message,severity:s.severity?ce[s.severity-1]:ce[0],type:s.source?st[s.source]:void 0,from:q.Pos(s.range.start.line,s.range.start.character),to:q.Pos(s.range.end.line,s.range.end.character)}))}); diff --git a/assets/lint.es2-963c31c2.js b/assets/lint.es2-963c31c2.js deleted file mode 100644 index bf9d1ec3..00000000 --- a/assets/lint.es2-963c31c2.js +++ /dev/null @@ -1,6 +0,0 @@ -import{C as q}from"./codemirror.es-52e8b92d.js";import{K as u,G as p,d as _,i as ue,a as S,n as fe,b as w,s as F,c as h,e as R,p as v,f as B,h as y,j as T,D as E,O as G,k as Ae,l as ke,o as O,q as k,r as I,u as P,v as te,w as Pe,x as Ue,y as de,z as $,A as pe,B as U,C as Ve,E as je,F as Le,H as Me,I as Ye,J as Be,L as Xe,M as re,T as me,N as ge,P as Te,Q as qe,R as Ge,S as Je,U as Qe,V as He,W as Ke}from"./index-7e44875f.js";import{R as Ee,P as V}from"./Range-52ddcb6a.js";import"./codemirror.es2-5884f31a.js";function We(e){return e.kind===u.OPERATION_DEFINITION||e.kind===u.FRAGMENT_DEFINITION}function ze(e){return e.kind===u.SCHEMA_DEFINITION||X(e)||e.kind===u.DIRECTIVE_DEFINITION}function X(e){return e.kind===u.SCALAR_TYPE_DEFINITION||e.kind===u.OBJECT_TYPE_DEFINITION||e.kind===u.INTERFACE_TYPE_DEFINITION||e.kind===u.UNION_TYPE_DEFINITION||e.kind===u.ENUM_TYPE_DEFINITION||e.kind===u.INPUT_OBJECT_TYPE_DEFINITION}function Ze(e){return e.kind===u.SCHEMA_EXTENSION||Ne(e)}function Ne(e){return e.kind===u.SCALAR_TYPE_EXTENSION||e.kind===u.OBJECT_TYPE_EXTENSION||e.kind===u.INTERFACE_TYPE_EXTENSION||e.kind===u.UNION_TYPE_EXTENSION||e.kind===u.ENUM_TYPE_EXTENSION||e.kind===u.INPUT_OBJECT_TYPE_EXTENSION}function ve(e){return{Document(n){for(const t of n.definitions)if(!We(t)){const r=t.kind===u.SCHEMA_DEFINITION||t.kind===u.SCHEMA_EXTENSION?"schema":'"'+t.name.value+'"';e.reportError(new p(`The ${r} definition is not executable.`,{nodes:t}))}return!1}}}function xe(e){return{Field(n){const t=e.getParentType();if(t&&!e.getFieldDef()){const i=e.getSchema(),s=n.name.value;let a=_("to use an inline fragment on",en(i,t,s));a===""&&(a=_(nn(t,s))),e.reportError(new p(`Cannot query field "${s}" on type "${t.name}".`+a,{nodes:n}))}}}}function en(e,n,t){if(!ue(n))return[];const r=new Set,i=Object.create(null);for(const a of e.getPossibleTypes(n))if(a.getFields()[t]){r.add(a),i[a.name]=1;for(const o of a.getInterfaces()){var s;o.getFields()[t]&&(r.add(o),i[o.name]=((s=i[o.name])!==null&&s!==void 0?s:0)+1)}}return[...r].sort((a,o)=>{const l=i[o.name]-i[a.name];return l!==0?l:S(a)&&e.isSubType(a,o)?-1:S(o)&&e.isSubType(o,a)?1:fe(a.name,o.name)}).map(a=>a.name)}function nn(e,n){if(w(e)||S(e)){const t=Object.keys(e.getFields());return F(n,t)}return[]}function tn(e){return{InlineFragment(n){const t=n.typeCondition;if(t){const r=h(e.getSchema(),t);if(r&&!R(r)){const i=v(t);e.reportError(new p(`Fragment cannot condition on non composite type "${i}".`,{nodes:t}))}}},FragmentDefinition(n){const t=h(e.getSchema(),n.typeCondition);if(t&&!R(t)){const r=v(n.typeCondition);e.reportError(new p(`Fragment "${n.name.value}" cannot condition on non composite type "${r}".`,{nodes:n.typeCondition}))}}}}function rn(e){return{...sn(e),Argument(n){const t=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!t&&r&&i){const s=n.name.value,a=r.args.map(l=>l.name),o=F(s,a);e.reportError(new p(`Unknown argument "${s}" on field "${i.name}.${r.name}".`+_(o),{nodes:n}))}}}}function sn(e){const n=Object.create(null),t=e.getSchema(),r=t?t.getDirectives():B;for(const a of r)n[a.name]=a.args.map(o=>o.name);const i=e.getDocument().definitions;for(const a of i)if(a.kind===u.DIRECTIVE_DEFINITION){var s;const o=(s=a.arguments)!==null&&s!==void 0?s:[];n[a.name.value]=o.map(l=>l.name.value)}return{Directive(a){const o=a.name.value,l=n[o];if(a.arguments&&l)for(const c of a.arguments){const f=c.name.value;if(!l.includes(f)){const d=F(f,l);e.reportError(new p(`Unknown argument "${f}" on directive "@${o}".`+_(d),{nodes:c}))}}return!1}}}function ye(e){const n=Object.create(null),t=e.getSchema(),r=t?t.getDirectives():B;for(const s of r)n[s.name]=s.locations;const i=e.getDocument().definitions;for(const s of i)s.kind===u.DIRECTIVE_DEFINITION&&(n[s.name.value]=s.locations.map(a=>a.value));return{Directive(s,a,o,l,c){const f=s.name.value,d=n[f];if(!d){e.reportError(new p(`Unknown directive "@${f}".`,{nodes:s}));return}const m=on(c);m&&!d.includes(m)&&e.reportError(new p(`Directive "@${f}" may not be used on ${m}.`,{nodes:s}))}}}function on(e){const n=e[e.length-1];switch("kind"in n||y(!1),n.kind){case u.OPERATION_DEFINITION:return an(n.operation);case u.FIELD:return E.FIELD;case u.FRAGMENT_SPREAD:return E.FRAGMENT_SPREAD;case u.INLINE_FRAGMENT:return E.INLINE_FRAGMENT;case u.FRAGMENT_DEFINITION:return E.FRAGMENT_DEFINITION;case u.VARIABLE_DEFINITION:return E.VARIABLE_DEFINITION;case u.SCHEMA_DEFINITION:case u.SCHEMA_EXTENSION:return E.SCHEMA;case u.SCALAR_TYPE_DEFINITION:case u.SCALAR_TYPE_EXTENSION:return E.SCALAR;case u.OBJECT_TYPE_DEFINITION:case u.OBJECT_TYPE_EXTENSION:return E.OBJECT;case u.FIELD_DEFINITION:return E.FIELD_DEFINITION;case u.INTERFACE_TYPE_DEFINITION:case u.INTERFACE_TYPE_EXTENSION:return E.INTERFACE;case u.UNION_TYPE_DEFINITION:case u.UNION_TYPE_EXTENSION:return E.UNION;case u.ENUM_TYPE_DEFINITION:case u.ENUM_TYPE_EXTENSION:return E.ENUM;case u.ENUM_VALUE_DEFINITION:return E.ENUM_VALUE;case u.INPUT_OBJECT_TYPE_DEFINITION:case u.INPUT_OBJECT_TYPE_EXTENSION:return E.INPUT_OBJECT;case u.INPUT_VALUE_DEFINITION:{const t=e[e.length-3];return"kind"in t||y(!1),t.kind===u.INPUT_OBJECT_TYPE_DEFINITION?E.INPUT_FIELD_DEFINITION:E.ARGUMENT_DEFINITION}default:y(!1,"Unexpected kind: "+T(n.kind))}}function an(e){switch(e){case G.QUERY:return E.QUERY;case G.MUTATION:return E.MUTATION;case G.SUBSCRIPTION:return E.SUBSCRIPTION}}function Ie(e){return{FragmentSpread(n){const t=n.name.value;e.getFragment(t)||e.reportError(new p(`Unknown fragment "${t}".`,{nodes:n.name}))}}}function he(e){const n=e.getSchema(),t=n?n.getTypeMap():Object.create(null),r=Object.create(null);for(const s of e.getDocument().definitions)X(s)&&(r[s.name.value]=!0);const i=[...Object.keys(t),...Object.keys(r)];return{NamedType(s,a,o,l,c){const f=s.name.value;if(!t[f]&&!r[f]){var d;const m=(d=c[2])!==null&&d!==void 0?d:o,g=m!=null&&ln(m);if(g&&ie.includes(f))return;const N=F(f,g?ie.concat(i):i);e.reportError(new p(`Unknown type "${f}".`+_(N),{nodes:s}))}}}}const ie=[...Ae,...ke].map(e=>e.name);function ln(e){return"kind"in e&&(ze(e)||Ze(e))}function cn(e){let n=0;return{Document(t){n=t.definitions.filter(r=>r.kind===u.OPERATION_DEFINITION).length},OperationDefinition(t){!t.name&&n>1&&e.reportError(new p("This anonymous operation must be the only defined operation.",{nodes:t}))}}}function un(e){var n,t,r;const i=e.getSchema(),s=(n=(t=(r=i==null?void 0:i.astNode)!==null&&r!==void 0?r:i==null?void 0:i.getQueryType())!==null&&t!==void 0?t:i==null?void 0:i.getMutationType())!==null&&n!==void 0?n:i==null?void 0:i.getSubscriptionType();let a=0;return{SchemaDefinition(o){if(s){e.reportError(new p("Cannot define a new schema within a schema extension.",{nodes:o}));return}a>0&&e.reportError(new p("Must provide only one schema definition.",{nodes:o})),++a}}}function fn(e){const n=Object.create(null),t=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(s){return i(s),!1}};function i(s){if(n[s.name.value])return;const a=s.name.value;n[a]=!0;const o=e.getFragmentSpreads(s.selectionSet);if(o.length!==0){r[a]=t.length;for(const l of o){const c=l.name.value,f=r[c];if(t.push(l),f===void 0){const d=e.getFragment(c);d&&i(d)}else{const d=t.slice(f),m=d.slice(0,-1).map(g=>'"'+g.name.value+'"').join(", ");e.reportError(new p(`Cannot spread fragment "${c}" within itself`+(m!==""?` via ${m}.`:"."),{nodes:d}))}t.pop()}r[a]=void 0}}}function dn(e){let n=Object.create(null);return{OperationDefinition:{enter(){n=Object.create(null)},leave(t){const r=e.getRecursiveVariableUsages(t);for(const{node:i}of r){const s=i.name.value;n[s]!==!0&&e.reportError(new p(t.name?`Variable "$${s}" is not defined by operation "${t.name.value}".`:`Variable "$${s}" is not defined.`,{nodes:[i,t]}))}}},VariableDefinition(t){n[t.variable.name.value]=!0}}}function Oe(e){const n=[],t=[];return{OperationDefinition(r){return n.push(r),!1},FragmentDefinition(r){return t.push(r),!1},Document:{leave(){const r=Object.create(null);for(const i of n)for(const s of e.getRecursivelyReferencedFragments(i))r[s.name.value]=!0;for(const i of t){const s=i.name.value;r[s]!==!0&&e.reportError(new p(`Fragment "${s}" is never used.`,{nodes:i}))}}}}}function pn(e){let n=[];return{OperationDefinition:{enter(){n=[]},leave(t){const r=Object.create(null),i=e.getRecursiveVariableUsages(t);for(const{node:s}of i)r[s.name.value]=!0;for(const s of n){const a=s.variable.name.value;r[a]!==!0&&e.reportError(new p(t.name?`Variable "$${a}" is never used in operation "${t.name.value}".`:`Variable "$${a}" is never used.`,{nodes:s}))}}},VariableDefinition(t){n.push(t)}}}function z(e){switch(e.kind){case u.OBJECT:return{...e,fields:mn(e.fields)};case u.LIST:return{...e,values:e.values.map(z)};case u.INT:case u.FLOAT:case u.STRING:case u.BOOLEAN:case u.NULL:case u.ENUM:case u.VARIABLE:return e}}function mn(e){return e.map(n=>({...n,value:z(n.value)})).sort((n,t)=>fe(n.name.value,t.name.value))}function De(e){return Array.isArray(e)?e.map(([n,t])=>`subfields "${n}" conflict because `+De(t)).join(" and "):e}function gn(e){const n=new yn,t=new Map;return{SelectionSet(r){const i=Tn(e,t,n,e.getParentType(),r);for(const[[s,a],o,l]of i){const c=De(a);e.reportError(new p(`Fields "${s}" conflict because ${c}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:o.concat(l)}))}}}}function Tn(e,n,t,r,i){const s=[],[a,o]=M(e,n,r,i);if(Nn(e,s,n,t,a),o.length!==0)for(let l=0;l1)for(let o=0;o({kind:u.OBJECT_FIELD,name:i.name,value:i.value}))};return v(z(r))}function Q(e,n){return k(e)?k(n)?Q(e.ofType,n.ofType):!0:k(n)?!0:I(e)?I(n)?Q(e.ofType,n.ofType):!0:I(n)?!0:P(e)||P(n)?e!==n:!1}function M(e,n,t,r){const i=n.get(r);if(i)return i;const s=Object.create(null),a=Object.create(null);be(e,t,r,s,a);const o=[s,Object.keys(a)];return n.set(r,o),o}function H(e,n,t){const r=n.get(t.selectionSet);if(r)return r;const i=h(e.getSchema(),t.typeCondition);return M(e,n,i,t.selectionSet)}function be(e,n,t,r,i){for(const s of t.selections)switch(s.kind){case u.FIELD:{const a=s.name.value;let o;(w(n)||S(n))&&(o=n.getFields()[a]);const l=s.alias?s.alias.value:a;r[l]||(r[l]=[]),r[l].push([n,s,o]);break}case u.FRAGMENT_SPREAD:i[s.name.value]=!0;break;case u.INLINE_FRAGMENT:{const a=s.typeCondition,o=a?h(e.getSchema(),a):n;be(e,o,s.selectionSet,r,i);break}}}function vn(e,n,t,r){if(e.length>0)return[[n,e.map(([i])=>i)],[t,...e.map(([,i])=>i).flat()],[r,...e.map(([,,i])=>i).flat()]]}class yn{constructor(){this._data=new Map}has(n,t,r){var i;const[s,a]=ns.name.value));for(const s of r.args)if(!i.has(s.name)&&pe(s)){const a=T(s.type);e.reportError(new p(`Field "${r.name}" argument "${s.name}" of type "${a}" is required, but it was not provided.`,{nodes:n}))}}}}}function wn(e){var n;const t=Object.create(null),r=e.getSchema(),i=(n=r==null?void 0:r.getDirectives())!==null&&n!==void 0?n:B;for(const o of i)t[o.name]=U(o.args.filter(pe),l=>l.name);const s=e.getDocument().definitions;for(const o of s)if(o.kind===u.DIRECTIVE_DEFINITION){var a;const l=(a=o.arguments)!==null&&a!==void 0?a:[];t[o.name.value]=U(l.filter(Fn),c=>c.name.value)}return{Directive:{leave(o){const l=o.name.value,c=t[l];if(c){var f;const d=(f=o.arguments)!==null&&f!==void 0?f:[],m=new Set(d.map(g=>g.name.value));for(const[g,N]of Object.entries(c))if(!m.has(g)){const b=Ve(N.type)?T(N.type):v(N.type);e.reportError(new p(`Directive "@${l}" argument "${g}" of type "${b}" is required, but it was not provided.`,{nodes:o}))}}}}}}function Fn(e){return e.type.kind===u.NON_NULL_TYPE&&e.defaultValue==null}function Rn(e){return{Field(n){const t=e.getType(),r=n.selectionSet;if(t){if(P(O(t))){if(r){const i=n.name.value,s=T(t);e.reportError(new p(`Field "${i}" must not have a selection since type "${s}" has no subfields.`,{nodes:r}))}}else if(!r){const i=n.name.value,s=T(t);e.reportError(new p(`Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:n}))}}}}}function $n(e,n,t){var r;const i={},s=(r=n.arguments)!==null&&r!==void 0?r:[],a=U(s,o=>o.name.value);for(const o of e.args){const l=o.name,c=o.type,f=a[l];if(!f){if(o.defaultValue!==void 0)i[l]=o.defaultValue;else if(I(c))throw new p(`Argument "${l}" of required type "${T(c)}" was not provided.`,{nodes:n});continue}const d=f.value;let m=d.kind===u.NULL;if(d.kind===u.VARIABLE){const N=d.name.value;if(t==null||!Cn(t,N)){if(o.defaultValue!==void 0)i[l]=o.defaultValue;else if(I(c))throw new p(`Argument "${l}" of required type "${T(c)}" was provided the variable "$${N}" which was not provided a runtime value.`,{nodes:d});continue}m=t[N]==null}if(m&&I(c))throw new p(`Argument "${l}" of non-null type "${T(c)}" must not be null.`,{nodes:d});const g=je(d,c,t);if(g===void 0)throw new p(`Argument "${l}" has invalid value ${v(d)}.`,{nodes:d});i[l]=g}return i}function oe(e,n,t){var r;const i=(r=n.directives)===null||r===void 0?void 0:r.find(s=>s.name.value===e.name);if(i)return $n(e,i,t)}function Cn(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function An(e,n,t,r,i){const s=new Map;return K(e,n,t,r,i,s,new Set),s}function K(e,n,t,r,i,s,a){for(const o of i.selections)switch(o.kind){case u.FIELD:{if(!J(t,o))continue;const l=kn(o),c=s.get(l);c!==void 0?c.push(o):s.set(l,[o]);break}case u.INLINE_FRAGMENT:{if(!J(t,o)||!ae(e,o,r))continue;K(e,n,t,r,o.selectionSet,s,a);break}case u.FRAGMENT_SPREAD:{const l=o.name.value;if(a.has(l)||!J(t,o))continue;a.add(l);const c=n[l];if(!c||!ae(e,c,r))continue;K(e,n,t,r,c.selectionSet,s,a);break}}}function J(e,n){const t=oe(Le,n,e);if((t==null?void 0:t.if)===!0)return!1;const r=oe(Me,n,e);return(r==null?void 0:r.if)!==!1}function ae(e,n,t){const r=n.typeCondition;if(!r)return!0;const i=h(e,r);return i===t?!0:ue(i)?e.isSubType(i,t):!1}function kn(e){return e.alias?e.alias.value:e.name.value}function Pn(e){return{OperationDefinition(n){if(n.operation==="subscription"){const t=e.getSchema(),r=t.getSubscriptionType();if(r){const i=n.name?n.name.value:null,s=Object.create(null),a=e.getDocument(),o=Object.create(null);for(const c of a.definitions)c.kind===u.FRAGMENT_DEFINITION&&(o[c.name.value]=c);const l=An(t,o,s,r,n.selectionSet);if(l.size>1){const d=[...l.values()].slice(1).flat();e.reportError(new p(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:d}))}for(const c of l.values())c[0].name.value.startsWith("__")&&e.reportError(new p(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:c}))}}}}}function Se(e,n){const t=new Map;for(const r of e){const i=n(r),s=t.get(i);s===void 0?t.set(i,[r]):s.push(r)}return t}function we(e){return{Field:n,Directive:n};function n(t){var r;const i=(r=t.arguments)!==null&&r!==void 0?r:[],s=Se(i,a=>a.name.value);for(const[a,o]of s)o.length>1&&e.reportError(new p(`There can be only one argument named "${a}".`,{nodes:o.map(l=>l.name)}))}}function Un(e){const n=Object.create(null),t=e.getSchema();return{DirectiveDefinition(r){const i=r.name.value;if(t!=null&&t.getDirective(i)){e.reportError(new p(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return n[i]?e.reportError(new p(`There can be only one directive named "@${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name,!1}}}function Fe(e){const n=Object.create(null),t=e.getSchema(),r=t?t.getDirectives():B;for(const o of r)n[o.name]=!o.isRepeatable;const i=e.getDocument().definitions;for(const o of i)o.kind===u.DIRECTIVE_DEFINITION&&(n[o.name.value]=!o.repeatable);const s=Object.create(null),a=Object.create(null);return{enter(o){if(!("directives"in o)||!o.directives)return;let l;if(o.kind===u.SCHEMA_DEFINITION||o.kind===u.SCHEMA_EXTENSION)l=s;else if(X(o)||Ne(o)){const c=o.name.value;l=a[c],l===void 0&&(a[c]=l=Object.create(null))}else l=Object.create(null);for(const c of o.directives){const f=c.name.value;n[f]&&(l[f]?e.reportError(new p(`The directive "@${f}" can only be used once at this location.`,{nodes:[l[f],c]})):l[f]=c)}}}}function Vn(e){const n=e.getSchema(),t=n?n.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(s){var a;const o=s.name.value;r[o]||(r[o]=Object.create(null));const l=(a=s.values)!==null&&a!==void 0?a:[],c=r[o];for(const f of l){const d=f.name.value,m=t[o];de(m)&&m.getValue(d)?e.reportError(new p(`Enum value "${o}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):c[d]?e.reportError(new p(`Enum value "${o}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function jn(e){const n=e.getSchema(),t=n?n.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(s){var a;const o=s.name.value;r[o]||(r[o]=Object.create(null));const l=(a=s.fields)!==null&&a!==void 0?a:[],c=r[o];for(const f of l){const d=f.name.value;Ln(t[o],d)?e.reportError(new p(`Field "${o}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):c[d]?e.reportError(new p(`Field "${o}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function Ln(e,n){return w(e)||S(e)||$(e)?e.getFields()[n]!=null:!1}function Mn(e){const n=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(t){const r=t.name.value;return n[r]?e.reportError(new p(`There can be only one fragment named "${r}".`,{nodes:[n[r],t.name]})):n[r]=t.name,!1}}}function Re(e){const n=[];let t=Object.create(null);return{ObjectValue:{enter(){n.push(t),t=Object.create(null)},leave(){const r=n.pop();r||y(!1),t=r}},ObjectField(r){const i=r.name.value;t[i]?e.reportError(new p(`There can be only one input field named "${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name}}}function Yn(e){const n=Object.create(null);return{OperationDefinition(t){const r=t.name;return r&&(n[r.value]?e.reportError(new p(`There can be only one operation named "${r.value}".`,{nodes:[n[r.value],r]})):n[r.value]=r),!1},FragmentDefinition:()=>!1}}function Bn(e){const n=e.getSchema(),t=Object.create(null),r=n?{query:n.getQueryType(),mutation:n.getMutationType(),subscription:n.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(s){var a;const o=(a=s.operationTypes)!==null&&a!==void 0?a:[];for(const l of o){const c=l.operation,f=t[c];r[c]?e.reportError(new p(`Type for ${c} already defined in the schema. It cannot be redefined.`,{nodes:l})):f?e.reportError(new p(`There can be only one ${c} type in schema.`,{nodes:[f,l]})):t[c]=l}return!1}}function Xn(e){const n=Object.create(null),t=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){const s=i.name.value;if(t!=null&&t.getType(s)){e.reportError(new p(`Type "${s}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return n[s]?e.reportError(new p(`There can be only one type named "${s}".`,{nodes:[n[s],i.name]})):n[s]=i.name,!1}}function qn(e){return{OperationDefinition(n){var t;const r=(t=n.variableDefinitions)!==null&&t!==void 0?t:[],i=Se(r,s=>s.variable.name.value);for(const[s,a]of i)a.length>1&&e.reportError(new p(`There can be only one variable named "$${s}".`,{nodes:a.map(o=>o.variable.name)}))}}}function Gn(e){return{ListValue(n){const t=Ye(e.getParentInputType());if(!k(t))return D(e,n),!1},ObjectValue(n){const t=O(e.getInputType());if(!$(t))return D(e,n),!1;const r=U(n.fields,i=>i.name.value);for(const i of Object.values(t.getFields()))if(!r[i.name]&&Be(i)){const a=T(i.type);e.reportError(new p(`Field "${t.name}.${i.name}" of required type "${a}" was not provided.`,{nodes:n}))}},ObjectField(n){const t=O(e.getParentInputType());if(!e.getInputType()&&$(t)){const i=F(n.name.value,Object.keys(t.getFields()));e.reportError(new p(`Field "${n.name.value}" is not defined by type "${t.name}".`+_(i),{nodes:n}))}},NullValue(n){const t=e.getInputType();I(t)&&e.reportError(new p(`Expected value of type "${T(t)}", found ${v(n)}.`,{nodes:n}))},EnumValue:n=>D(e,n),IntValue:n=>D(e,n),FloatValue:n=>D(e,n),StringValue:n=>D(e,n),BooleanValue:n=>D(e,n)}}function D(e,n){const t=e.getInputType();if(!t)return;const r=O(t);if(!P(r)){const i=T(t);e.reportError(new p(`Expected value of type "${i}", found ${v(n)}.`,{nodes:n}));return}try{if(r.parseLiteral(n,void 0)===void 0){const s=T(t);e.reportError(new p(`Expected value of type "${s}", found ${v(n)}.`,{nodes:n}))}}catch(i){const s=T(t);i instanceof p?e.reportError(i):e.reportError(new p(`Expected value of type "${s}", found ${v(n)}; `+i.message,{nodes:n,originalError:i}))}}function Jn(e){return{VariableDefinition(n){const t=h(e.getSchema(),n.type);if(t!==void 0&&!Xe(t)){const r=n.variable.name.value,i=v(n.type);e.reportError(new p(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:n.type}))}}}}function Qn(e){let n=Object.create(null);return{OperationDefinition:{enter(){n=Object.create(null)},leave(t){const r=e.getRecursiveVariableUsages(t);for(const{node:i,type:s,defaultValue:a}of r){const o=i.name.value,l=n[o];if(l&&s){const c=e.getSchema(),f=h(c,l.type);if(f&&!Hn(c,f,l.defaultValue,s,a)){const d=T(f),m=T(s);e.reportError(new p(`Variable "$${o}" of type "${d}" used in position expecting type "${m}".`,{nodes:[l,i]}))}}}}},VariableDefinition(t){n[t.variable.name.value]=t}}}function Hn(e,n,t,r,i){if(I(r)&&!I(n)){if(!(t!=null&&t.kind!==u.NULL)&&!(i!==void 0))return!1;const o=r.ofType;return re(e,n,o)}return re(e,n,r)}const $e=Object.freeze([ve,Yn,cn,Pn,he,tn,Jn,Rn,xe,Mn,Ie,Oe,In,fn,qn,dn,pn,ye,Fe,rn,we,Gn,Sn,Qn,gn,Re]);class Kn{constructor(n,t){this._ast=n,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=t}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(n){this._onError(n)}getDocument(){return this._ast}getFragment(n){let t;if(this._fragments)t=this._fragments;else{t=Object.create(null);for(const r of this.getDocument().definitions)r.kind===u.FRAGMENT_DEFINITION&&(t[r.name.value]=r);this._fragments=t}return t[n]}getFragmentSpreads(n){let t=this._fragmentSpreads.get(n);if(!t){t=[];const r=[n];let i;for(;i=r.pop();)for(const s of i.selections)s.kind===u.FRAGMENT_SPREAD?t.push(s):s.selectionSet&&r.push(s.selectionSet);this._fragmentSpreads.set(n,t)}return t}getRecursivelyReferencedFragments(n){let t=this._recursivelyReferencedFragments.get(n);if(!t){t=[];const r=Object.create(null),i=[n.selectionSet];let s;for(;s=i.pop();)for(const a of this.getFragmentSpreads(s)){const o=a.name.value;if(r[o]!==!0){r[o]=!0;const l=this.getFragment(o);l&&(t.push(l),i.push(l.selectionSet))}}this._recursivelyReferencedFragments.set(n,t)}return t}}class Wn extends Kn{constructor(n,t,r,i){super(t,i),this._schema=n,this._typeInfo=r,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(n){let t=this._variableUsages.get(n);if(!t){const r=[],i=new me(this._schema);ge(n,Te(i,{VariableDefinition:()=>!1,Variable(s){r.push({node:s,type:i.getInputType(),defaultValue:i.getDefaultValue()})}})),t=r,this._variableUsages.set(n,t)}return t}getRecursiveVariableUsages(n){let t=this._recursiveVariableUsages.get(n);if(!t){t=this.getVariableUsages(n);for(const r of this.getRecursivelyReferencedFragments(n))t=t.concat(this.getVariableUsages(r));this._recursiveVariableUsages.set(n,t)}return t}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function Ce(e,n,t=$e,r,i=new me(e)){var s;const a=(s=r==null?void 0:r.maxErrors)!==null&&s!==void 0?s:100;n||qe(!1,"Must provide document."),Ge(e);const o=Object.freeze({}),l=[],c=new Wn(e,n,i,d=>{if(l.length>=a)throw l.push(new p("Too many validation errors, error limit reached. Validation aborted.")),o;l.push(d)}),f=Je(t.map(d=>d(c)));try{ge(n,Te(i,f))}catch(d){if(d!==o)throw d}return l}function zn(e){return{Field(n){const t=e.getFieldDef(),r=t==null?void 0:t.deprecationReason;if(t&&r!=null){const i=e.getParentType();i!=null||y(!1),e.reportError(new p(`The field ${i.name}.${t.name} is deprecated. ${r}`,{nodes:n}))}},Argument(n){const t=e.getArgument(),r=t==null?void 0:t.deprecationReason;if(t&&r!=null){const i=e.getDirective();if(i!=null)e.reportError(new p(`Directive "@${i.name}" argument "${t.name}" is deprecated. ${r}`,{nodes:n}));else{const s=e.getParentType(),a=e.getFieldDef();s!=null&&a!=null||y(!1),e.reportError(new p(`Field "${s.name}.${a.name}" argument "${t.name}" is deprecated. ${r}`,{nodes:n}))}}},ObjectField(n){const t=O(e.getParentInputType());if($(t)){const r=t.getFields()[n.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new p(`The input field ${t.name}.${r.name} is deprecated. ${i}`,{nodes:n}))}},EnumValue(n){const t=e.getEnumValue(),r=t==null?void 0:t.deprecationReason;if(t&&r!=null){const i=O(e.getInputType());i!=null||y(!1),e.reportError(new p(`The enum value "${i.name}.${t.name}" is deprecated. ${r}`,{nodes:n}))}}}}const Zn=[un,Bn,Xn,Vn,jn,Un,he,ye,Fe,On,we,Re];function xn(e,n,t,r,i){const s=$e.filter(o=>!(o===Oe||o===ve||r&&o===Ie));return t&&Array.prototype.push.apply(s,t),i&&Array.prototype.push.apply(s,Zn),Ce(e,n,s).filter(o=>{if(o.message.includes("Unknown directive")&&o.nodes){const l=o.nodes[0];if(l&&l.kind===u.DIRECTIVE){const c=l.name.value;if(c==="arguments"||c==="argumentDefinitions")return!1}}return!0})}const A={Error:"Error",Warning:"Warning",Information:"Information",Hint:"Hint"},W={[A.Error]:1,[A.Warning]:2,[A.Information]:3,[A.Hint]:4},Y=(e,n)=>{if(!e)throw new Error(n)};function et(e,n=null,t,r,i){var s,a;let o=null,l="";i&&(l=typeof i=="string"?i:i.reduce((f,d)=>f+v(d)+` - -`,""));const c=l?`${e} - -${l}`:e;try{o=Qe(c)}catch(f){if(f instanceof p){const d=tt((a=(s=f.locations)===null||s===void 0?void 0:s[0])!==null&&a!==void 0?a:{line:0,column:0},c);return[{severity:W.Error,message:f.message,source:"GraphQL: Syntax",range:d}]}throw f}return nt(o,n,t,r)}function nt(e,n=null,t,r){if(!n)return[];const i=xn(n,e,t,r).flatMap(a=>le(a,W.Error,"Validation")),s=Ce(n,e,[zn]).flatMap(a=>le(a,W.Warning,"Deprecation"));return i.concat(s)}function le(e,n,t){if(!e.nodes)return[];const r=[];for(const[i,s]of e.nodes.entries()){const a=s.kind!=="Variable"&&"name"in s&&s.name!==void 0?s.name:"variable"in s&&s.variable!==void 0?s.variable:s;if(a){Y(e.locations,"GraphQL validation error requires locations.");const o=e.locations[i],l=rt(a),c=o.column+(l.end-l.start);r.push({source:`GraphQL: ${t}`,message:e.message,severity:n,range:new Ee(new V(o.line-1,o.column-1),new V(o.line-1,c))})}}return r}function tt(e,n){const t=Ke(),r=t.startState(),i=n.split(` -`);Y(i.length>=e.line,"Query text must have more lines than where the error happened");let s=null;for(let c=0;c{const{schema:t,validationRules:r,externalFragments:i}=n;return et(e,t,r,void 0,i).map(s=>({message:s.message,severity:s.severity?ce[s.severity-1]:ce[0],type:s.source?it[s.source]:void 0,from:q.Pos(s.range.start.line,s.range.start.character),to:q.Pos(s.range.end.line,s.range.end.character)}))}); diff --git a/assets/lint.es3-71cb7f77.js b/assets/lint.es3-eda84a87.js similarity index 98% rename from assets/lint.es3-71cb7f77.js rename to assets/lint.es3-eda84a87.js index 91321649..96243e21 100644 --- a/assets/lint.es3-71cb7f77.js +++ b/assets/lint.es3-eda84a87.js @@ -1 +1 @@ -import{C as H}from"./codemirror.es-52e8b92d.js";import"./codemirror.es2-5884f31a.js";import{X as B,Y as J,Z as P,_ as U,a6 as D}from"./index-7e44875f.js";var M=Object.defineProperty,n=(e,r)=>M(e,"name",{value:r,configurable:!0});function L(e){d=e,x=e.length,s=u=g=-1,a(),N();const r=S();return p("EOF"),r}n(L,"jsonParse");let d,x,s,u,g,t,l;function S(){const e=s,r=[];if(p("{"),!v("}")){do r.push(V());while(v(","));p("}")}return{kind:"Object",start:e,end:g,members:r}}n(S,"parseObj");function V(){const e=s,r=l==="String"?j():null;p("String"),p(":");const i=T();return{kind:"Member",start:e,end:g,key:r,value:i}}n(V,"parseMember");function G(){const e=s,r=[];if(p("["),!v("]")){do r.push(T());while(v(","));p("]")}return{kind:"Array",start:e,end:g,values:r}}n(G,"parseArr");function T(){switch(l){case"[":return G();case"{":return S();case"String":case"Number":case"Boolean":case"Null":const e=j();return N(),e}p("Value")}n(T,"parseVal");function j(){return{kind:l,start:s,end:u,value:JSON.parse(d.slice(s,u))}}n(j,"curToken");function p(e){if(l===e){N();return}let r;if(l==="EOF")r="[end of file]";else if(u-s>1)r="`"+d.slice(s,u)+"`";else{const i=d.slice(s).match(/^.+?\b/);r="`"+(i?i[0]:d[s])+"`"}throw m(`Expected ${e} but found ${r}.`)}n(p,"expect");class F extends Error{constructor(r,i){super(r),this.position=i}}n(F,"JSONSyntaxError");function m(e){return new F(e,{start:s,end:u})}n(m,"syntaxError");function v(e){if(l===e)return N(),!0}n(v,"skip");function a(){return u31;)if(t===92)switch(t=a(),t){case 34:case 47:case 92:case 98:case 102:case 110:case 114:case 116:a();break;case 117:a(),k(),k(),k(),k();break;default:throw m("Bad character escape sequence.")}else{if(u===x)throw m("Unterminated string.");a()}if(t===34){a();return}throw m("Unterminated string.")}n(Q,"readString");function k(){if(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)return a();throw m("Expected hexadecimal digit.")}n(k,"readHex");function I(){t===45&&a(),t===48?a():w(),t===46&&(a(),w()),(t===69||t===101)&&(t=a(),(t===43||t===45)&&a(),w())}n(I,"readNumber");function w(){if(t<48||t>57)throw m("Expected decimal digit.");do a();while(t>=48&&t<=57)}n(w,"readDigits");H.registerHelper("lint","graphql-variables",(e,r,i)=>{if(!e)return[];let f;try{f=L(e)}catch(c){if(c instanceof F)return[O(i,c.position,c.message)];throw c}const{variableToType:o}=r;return o?A(i,o,f):[]});function A(e,r,i){var f;const o=[];for(const c of i.members)if(c){const b=(f=c.key)===null||f===void 0?void 0:f.value,h=r[b];if(h)for(const[E,C]of y(h,c.value))o.push(O(e,E,C));else o.push(O(e,c.key,`Variable "$${b}" does not appear in any GraphQL query.`))}return o}n(A,"validateVariables");function y(e,r){if(!e||!r)return[];if(e instanceof B)return r.kind==="Null"?[[r,`Type "${e}" is non-nullable and cannot be null.`]]:y(e.ofType,r);if(r.kind==="Null")return[];if(e instanceof J){const i=e.ofType;if(r.kind==="Array"){const f=r.values||[];return $(f,o=>y(i,o))}return y(i,r)}if(e instanceof P){if(r.kind!=="Object")return[[r,`Type "${e}" must be an Object.`]];const i=Object.create(null),f=$(r.members,o=>{var c;const b=(c=o==null?void 0:o.key)===null||c===void 0?void 0:c.value;i[b]=!0;const h=e.getFields()[b];if(!h)return[[o.key,`Type "${e}" does not have a field "${b}".`]];const E=h?h.type:void 0;return y(E,o.value)});for(const o of Object.keys(e.getFields())){const c=e.getFields()[o];!i[o]&&c.type instanceof B&&!c.defaultValue&&f.push([r,`Object of type "${e}" is missing required field "${o}".`])}return f}return e.name==="Boolean"&&r.kind!=="Boolean"||e.name==="String"&&r.kind!=="String"||e.name==="ID"&&r.kind!=="Number"&&r.kind!=="String"||e.name==="Float"&&r.kind!=="Number"||e.name==="Int"&&(r.kind!=="Number"||(r.value|0)!==r.value)?[[r,`Expected value of type "${e}".`]]:(e instanceof U||e instanceof D)&&(r.kind!=="String"&&r.kind!=="Number"&&r.kind!=="Boolean"&&r.kind!=="Null"||q(e.parseValue(r.value)))?[[r,`Expected value of type "${e}".`]]:[]}n(y,"validateValue");function O(e,r,i){return{message:i,severity:"error",type:"validation",from:e.posFromIndex(r.start),to:e.posFromIndex(r.end)}}n(O,"lintError");function q(e){return e==null||e!==e}n(q,"isNullish");function $(e,r){return Array.prototype.concat.apply([],e.map(r))}n($,"mapCat"); +import{C as H}from"./codemirror.es-52e8b92d.js";import"./codemirror.es2-5884f31a.js";import{X as B,Y as J,Z as P,_ as U,a6 as D}from"./index-9671150e.js";var M=Object.defineProperty,n=(e,r)=>M(e,"name",{value:r,configurable:!0});function L(e){d=e,x=e.length,s=u=g=-1,a(),N();const r=S();return p("EOF"),r}n(L,"jsonParse");let d,x,s,u,g,t,l;function S(){const e=s,r=[];if(p("{"),!v("}")){do r.push(V());while(v(","));p("}")}return{kind:"Object",start:e,end:g,members:r}}n(S,"parseObj");function V(){const e=s,r=l==="String"?j():null;p("String"),p(":");const i=T();return{kind:"Member",start:e,end:g,key:r,value:i}}n(V,"parseMember");function G(){const e=s,r=[];if(p("["),!v("]")){do r.push(T());while(v(","));p("]")}return{kind:"Array",start:e,end:g,values:r}}n(G,"parseArr");function T(){switch(l){case"[":return G();case"{":return S();case"String":case"Number":case"Boolean":case"Null":const e=j();return N(),e}p("Value")}n(T,"parseVal");function j(){return{kind:l,start:s,end:u,value:JSON.parse(d.slice(s,u))}}n(j,"curToken");function p(e){if(l===e){N();return}let r;if(l==="EOF")r="[end of file]";else if(u-s>1)r="`"+d.slice(s,u)+"`";else{const i=d.slice(s).match(/^.+?\b/);r="`"+(i?i[0]:d[s])+"`"}throw m(`Expected ${e} but found ${r}.`)}n(p,"expect");class F extends Error{constructor(r,i){super(r),this.position=i}}n(F,"JSONSyntaxError");function m(e){return new F(e,{start:s,end:u})}n(m,"syntaxError");function v(e){if(l===e)return N(),!0}n(v,"skip");function a(){return u31;)if(t===92)switch(t=a(),t){case 34:case 47:case 92:case 98:case 102:case 110:case 114:case 116:a();break;case 117:a(),k(),k(),k(),k();break;default:throw m("Bad character escape sequence.")}else{if(u===x)throw m("Unterminated string.");a()}if(t===34){a();return}throw m("Unterminated string.")}n(Q,"readString");function k(){if(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)return a();throw m("Expected hexadecimal digit.")}n(k,"readHex");function I(){t===45&&a(),t===48?a():w(),t===46&&(a(),w()),(t===69||t===101)&&(t=a(),(t===43||t===45)&&a(),w())}n(I,"readNumber");function w(){if(t<48||t>57)throw m("Expected decimal digit.");do a();while(t>=48&&t<=57)}n(w,"readDigits");H.registerHelper("lint","graphql-variables",(e,r,i)=>{if(!e)return[];let f;try{f=L(e)}catch(c){if(c instanceof F)return[O(i,c.position,c.message)];throw c}const{variableToType:o}=r;return o?A(i,o,f):[]});function A(e,r,i){var f;const o=[];for(const c of i.members)if(c){const b=(f=c.key)===null||f===void 0?void 0:f.value,h=r[b];if(h)for(const[E,C]of y(h,c.value))o.push(O(e,E,C));else o.push(O(e,c.key,`Variable "$${b}" does not appear in any GraphQL query.`))}return o}n(A,"validateVariables");function y(e,r){if(!e||!r)return[];if(e instanceof B)return r.kind==="Null"?[[r,`Type "${e}" is non-nullable and cannot be null.`]]:y(e.ofType,r);if(r.kind==="Null")return[];if(e instanceof J){const i=e.ofType;if(r.kind==="Array"){const f=r.values||[];return $(f,o=>y(i,o))}return y(i,r)}if(e instanceof P){if(r.kind!=="Object")return[[r,`Type "${e}" must be an Object.`]];const i=Object.create(null),f=$(r.members,o=>{var c;const b=(c=o==null?void 0:o.key)===null||c===void 0?void 0:c.value;i[b]=!0;const h=e.getFields()[b];if(!h)return[[o.key,`Type "${e}" does not have a field "${b}".`]];const E=h?h.type:void 0;return y(E,o.value)});for(const o of Object.keys(e.getFields())){const c=e.getFields()[o];!i[o]&&c.type instanceof B&&!c.defaultValue&&f.push([r,`Object of type "${e}" is missing required field "${o}".`])}return f}return e.name==="Boolean"&&r.kind!=="Boolean"||e.name==="String"&&r.kind!=="String"||e.name==="ID"&&r.kind!=="Number"&&r.kind!=="String"||e.name==="Float"&&r.kind!=="Number"||e.name==="Int"&&(r.kind!=="Number"||(r.value|0)!==r.value)?[[r,`Expected value of type "${e}".`]]:(e instanceof U||e instanceof D)&&(r.kind!=="String"&&r.kind!=="Number"&&r.kind!=="Boolean"&&r.kind!=="Null"||q(e.parseValue(r.value)))?[[r,`Expected value of type "${e}".`]]:[]}n(y,"validateValue");function O(e,r,i){return{message:i,severity:"error",type:"validation",from:e.posFromIndex(r.start),to:e.posFromIndex(r.end)}}n(O,"lintError");function q(e){return e==null||e!==e}n(q,"isNullish");function $(e,r){return Array.prototype.concat.apply([],e.map(r))}n($,"mapCat"); diff --git a/assets/liquid-7812bba1.js b/assets/liquid-ff24b95f.js similarity index 98% rename from assets/liquid-7812bba1.js rename to assets/liquid-ff24b95f.js index f9541d84..db3bbad4 100644 --- a/assets/liquid-7812bba1.js +++ b/assets/liquid-ff24b95f.js @@ -1,4 +1,4 @@ -import{m as d}from"./index-7e44875f.js";/*!----------------------------------------------------------------------------- +import{m as d}from"./index-9671150e.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) * Released under the MIT license diff --git a/assets/mdx-9c7605cd.js b/assets/mdx-5bad2419.js similarity index 98% rename from assets/mdx-9c7605cd.js rename to assets/mdx-5bad2419.js index 00c08f9c..9444dd83 100644 --- a/assets/mdx-9c7605cd.js +++ b/assets/mdx-5bad2419.js @@ -1,4 +1,4 @@ -import{m as d}from"./index-7e44875f.js";/*!----------------------------------------------------------------------------- +import{m as d}from"./index-9671150e.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) * Released under the MIT license diff --git a/assets/mode.es-da807399.js b/assets/mode.es-0a36625a.js similarity index 89% rename from assets/mode.es-da807399.js rename to assets/mode.es-0a36625a.js index 84a62508..6ea46780 100644 --- a/assets/mode.es-da807399.js +++ b/assets/mode.es-0a36625a.js @@ -1 +1 @@ -import{C as r}from"./codemirror.es-52e8b92d.js";import{W as o,a2 as s,a3 as i,a4 as n}from"./index-7e44875f.js";import{r as l}from"./mode-indent.es-057a4f6a.js";import"./codemirror.es2-5884f31a.js";var c=Object.defineProperty,p=(e,a)=>c(e,"name",{value:a,configurable:!0});const m=p(e=>{const a=o({eatWhitespace:t=>t.eatWhile(s),lexRules:i,parseRules:n,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:a.startState,token:a.token,indent:l,electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}},"graphqlModeFactory");r.defineMode("graphql",m); +import{C as r}from"./codemirror.es-52e8b92d.js";import{W as o,a2 as s,a3 as i,a4 as n}from"./index-9671150e.js";import{r as l}from"./mode-indent.es-057a4f6a.js";import"./codemirror.es2-5884f31a.js";var c=Object.defineProperty,p=(e,a)=>c(e,"name",{value:a,configurable:!0});const m=p(e=>{const a=o({eatWhitespace:t=>t.eatWhile(s),lexRules:i,parseRules:n,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:a.startState,token:a.token,indent:l,electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}},"graphqlModeFactory");r.defineMode("graphql",m); diff --git a/assets/mode.es2-d05684db.js b/assets/mode.es2-b413cff7.js similarity index 95% rename from assets/mode.es2-d05684db.js rename to assets/mode.es2-b413cff7.js index ebe78899..922f6df1 100644 --- a/assets/mode.es2-d05684db.js +++ b/assets/mode.es2-b413cff7.js @@ -1 +1 @@ -import{C as s}from"./codemirror.es-52e8b92d.js";import{W as o,a7 as e,a8 as l,a9 as n,aa as r}from"./index-7e44875f.js";import{r as c}from"./mode-indent.es-057a4f6a.js";import"./codemirror.es2-5884f31a.js";var b=Object.defineProperty,d=(a,t)=>b(a,"name",{value:t,configurable:!0});s.defineMode("graphql-variables",a=>{const t=o({eatWhitespace:u=>u.eatSpace(),lexRules:m,parseRules:V,editorConfig:{tabSize:a.tabSize}});return{config:a,startState:t.startState,token:t.token,indent:c,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const m={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},V={Document:[e("{"),l("Variable",n(e(","))),e("}")],Variable:[i("variable"),e(":"),"Value"],Value(a){switch(a.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(a.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(a.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[r("Number","number")],StringValue:[r("String","string")],BooleanValue:[r("Keyword","builtin")],NullValue:[r("Keyword","keyword")],ListValue:[e("["),l("Value",n(e(","))),e("]")],ObjectValue:[e("{"),l("ObjectField",n(e(","))),e("}")],ObjectField:[i("attribute"),e(":"),"Value"]};function i(a){return{style:a,match:t=>t.kind==="String",update(t,u){t.name=u.value.slice(1,-1)}}}d(i,"namedKey"); +import{C as s}from"./codemirror.es-52e8b92d.js";import{W as o,a7 as e,a8 as l,a9 as n,aa as r}from"./index-9671150e.js";import{r as c}from"./mode-indent.es-057a4f6a.js";import"./codemirror.es2-5884f31a.js";var b=Object.defineProperty,d=(a,t)=>b(a,"name",{value:t,configurable:!0});s.defineMode("graphql-variables",a=>{const t=o({eatWhitespace:u=>u.eatSpace(),lexRules:m,parseRules:V,editorConfig:{tabSize:a.tabSize}});return{config:a,startState:t.startState,token:t.token,indent:c,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const m={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},V={Document:[e("{"),l("Variable",n(e(","))),e("}")],Variable:[i("variable"),e(":"),"Value"],Value(a){switch(a.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(a.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(a.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[r("Number","number")],StringValue:[r("String","string")],BooleanValue:[r("Keyword","builtin")],NullValue:[r("Keyword","keyword")],ListValue:[e("["),l("Value",n(e(","))),e("]")],ObjectValue:[e("{"),l("ObjectField",n(e(","))),e("}")],ObjectField:[i("attribute"),e(":"),"Value"]};function i(a){return{style:a,match:t=>t.kind==="String",update(t,u){t.name=u.value.slice(1,-1)}}}d(i,"namedKey"); diff --git a/assets/mode.es3-0c1c2d6c.js b/assets/mode.es3-96157044.js similarity index 95% rename from assets/mode.es3-0c1c2d6c.js rename to assets/mode.es3-96157044.js index 9dae7143..ec18ec13 100644 --- a/assets/mode.es3-0c1c2d6c.js +++ b/assets/mode.es3-96157044.js @@ -1 +1 @@ -import{C as n}from"./codemirror.es-52e8b92d.js";import{W as s,a7 as e,a8 as a,aa as r}from"./index-7e44875f.js";import{r as i}from"./mode-indent.es-057a4f6a.js";import"./codemirror.es2-5884f31a.js";n.defineMode("graphql-results",t=>{const u=s({eatWhitespace:l=>l.eatSpace(),lexRules:o,parseRules:c,editorConfig:{tabSize:t.tabSize}});return{config:t,startState:u.startState,token:u.token,indent:i,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const o={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},c={Document:[e("{"),a("Entry",e(",")),e("}")],Entry:[r("String","def"),e(":"),"Value"],Value(t){switch(t.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(t.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(t.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[r("Number","number")],StringValue:[r("String","string")],BooleanValue:[r("Keyword","builtin")],NullValue:[r("Keyword","keyword")],ListValue:[e("["),a("Value",e(",")),e("]")],ObjectValue:[e("{"),a("ObjectField",e(",")),e("}")],ObjectField:[r("String","property"),e(":"),"Value"]}; +import{C as n}from"./codemirror.es-52e8b92d.js";import{W as s,a7 as e,a8 as a,aa as r}from"./index-9671150e.js";import{r as i}from"./mode-indent.es-057a4f6a.js";import"./codemirror.es2-5884f31a.js";n.defineMode("graphql-results",t=>{const u=s({eatWhitespace:l=>l.eatSpace(),lexRules:o,parseRules:c,editorConfig:{tabSize:t.tabSize}});return{config:t,startState:u.startState,token:u.token,indent:i,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const o={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},c={Document:[e("{"),a("Entry",e(",")),e("}")],Entry:[r("String","def"),e(":"),"Value"],Value(t){switch(t.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(t.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(t.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[r("Number","number")],StringValue:[r("String","string")],BooleanValue:[r("Keyword","builtin")],NullValue:[r("Keyword","keyword")],ListValue:[e("["),a("Value",e(",")),e("]")],ObjectValue:[e("{"),a("ObjectField",e(",")),e("}")],ObjectField:[r("String","property"),e(":"),"Value"]}; diff --git a/assets/python-5ef08dec.js b/assets/python-a979b408.js similarity index 98% rename from assets/python-5ef08dec.js rename to assets/python-a979b408.js index a5bc5823..36e3b9fe 100644 --- a/assets/python-5ef08dec.js +++ b/assets/python-a979b408.js @@ -1,4 +1,4 @@ -import{m as a}from"./index-7e44875f.js";/*!----------------------------------------------------------------------------- +import{m as a}from"./index-9671150e.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) * Released under the MIT license diff --git a/assets/razor-9b697dd4.js b/assets/razor-7be18b7f.js similarity index 99% rename from assets/razor-9b697dd4.js rename to assets/razor-7be18b7f.js index 24528597..2c1b0f7a 100644 --- a/assets/razor-9b697dd4.js +++ b/assets/razor-7be18b7f.js @@ -1,4 +1,4 @@ -import{m as s}from"./index-7e44875f.js";/*!----------------------------------------------------------------------------- +import{m as s}from"./index-9671150e.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) * Released under the MIT license diff --git a/assets/tsMode-138afb3a.js b/assets/tsMode-08480a58.js similarity index 99% rename from assets/tsMode-138afb3a.js rename to assets/tsMode-08480a58.js index 6d84580b..c3d2a20e 100644 --- a/assets/tsMode-138afb3a.js +++ b/assets/tsMode-08480a58.js @@ -1,4 +1,4 @@ -var M=Object.defineProperty;var R=(e,t,r)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _=(e,t,r)=>(R(e,typeof t!="symbol"?t+"":t,r),r);import{t as K,m as E}from"./index-7e44875f.js";/*!----------------------------------------------------------------------------- +var M=Object.defineProperty;var R=(e,t,r)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _=(e,t,r)=>(R(e,typeof t!="symbol"?t+"":t,r),r);import{t as K,m as E}from"./index-9671150e.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) * Released under the MIT license diff --git a/assets/typescript-69a62869.js b/assets/typescript-d2a7c870.js similarity index 98% rename from assets/typescript-69a62869.js rename to assets/typescript-d2a7c870.js index 94ed3e10..96fdd7d7 100644 --- a/assets/typescript-69a62869.js +++ b/assets/typescript-d2a7c870.js @@ -1,4 +1,4 @@ -import{m as a}from"./index-7e44875f.js";/*!----------------------------------------------------------------------------- +import{m as a}from"./index-9671150e.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) * Released under the MIT license diff --git a/assets/xml-f214c576.js b/assets/xml-bb4e8a16.js similarity index 97% rename from assets/xml-f214c576.js rename to assets/xml-bb4e8a16.js index 3d663069..779d6a32 100644 --- a/assets/xml-f214c576.js +++ b/assets/xml-bb4e8a16.js @@ -1,4 +1,4 @@ -import{m}from"./index-7e44875f.js";/*!----------------------------------------------------------------------------- +import{m}from"./index-9671150e.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) * Released under the MIT license diff --git a/assets/yaml-2fd0c875.js b/assets/yaml-0163eac1.js similarity index 98% rename from assets/yaml-2fd0c875.js rename to assets/yaml-0163eac1.js index 70662d7b..895be55a 100644 --- a/assets/yaml-2fd0c875.js +++ b/assets/yaml-0163eac1.js @@ -1,4 +1,4 @@ -import{m as i}from"./index-7e44875f.js";/*!----------------------------------------------------------------------------- +import{m as i}from"./index-9671150e.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) * Released under the MIT license diff --git a/index.html b/index.html index e74200fe..18c6b594 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> daed - +